query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
cba1644fcffde086f0b4a18aea21cc64
MINHUE: 0 MAXHUE: 65280 MINSAT: 25 MAXSAT: 200 MINBRI: 0 MAXBRI: 254
[ { "docid": "4ab2c15df74c7625c28183fd7d63ffe1", "score": "0.0", "text": "function turnRed() {\n setHue(0, 200, 254);\n}", "title": "" } ]
[ { "docid": "f7c6511e16f53ede90cfd0639a52fe2f", "score": "0.5996805", "text": "function V(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": "27889352acad2679ca14c5f4e6121779", "score": "0.59765095", "text": "function converteHoras(ex, sx) //Função chamada para converter valores de horas para deciamais\n{\n if (ex.length == 5 && sx.length == 5) {\n var ehm = ex.split(\":\");\n var shm = sx.split(\":\");\n var resultE = parseFloat(ehm[0]) + parseFloat((ehm[1] / 60));\n var resultS = parseFloat(shm[0]) + parseFloat((shm[1] / 60));\n if (resultE < resultS) {\n return resultS - resultE;\n } else {\n return 0;\n }\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "f86cd91054d5fa780ea088cf660c9547", "score": "0.5823711", "text": "function wt(e,t,o,n){var r=e+\" \";switch(o){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": "c9bebb36394c1cf6b86f4aa45582ccab", "score": "0.5791971", "text": "function Mi(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},r=\" \";return(e%100>=20||e>=100&&e%100===0)&&(r=\" de \"),e+r+i[n]}", "title": "" }, { "docid": "a93db72d325c992d8254c797e3dee70f", "score": "0.57242495", "text": "function ki(e,t,n){var i={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},r=\" \";return(e%100>=20||e>=100&&e%100===0)&&(r=\" de \"),e+r+i[n]}", "title": "" }, { "docid": "72d3aa4af005397c2826e37c32daf8e1", "score": "0.5712478", "text": "function B(e,t,a){var n={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+n[a]}", "title": "" }, { "docid": "72d3aa4af005397c2826e37c32daf8e1", "score": "0.5712478", "text": "function B(e,t,a){var n={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+n[a]}", "title": "" }, { "docid": "565897e7ad47af5a266f96b499cee719", "score": "0.56778824", "text": "function ya(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": "ab75f1cdc996637c38e45917b1490808", "score": "0.56678915", "text": "function me(e,t,a){return 255*(60>e?t+(a-t)*e/60:180>e?a:240>e?t+(a-t)*(240-e)/60:t)}", "title": "" }, { "docid": "403fec4a77c84311cc09ff29cbab04f2", "score": "0.56352055", "text": "function H(e,t,n){var r={mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100==0)&&(o=\" de \"),e+o+r[n]}", "title": "" }, { "docid": "a42d1e3e292b41253dde11424b3face0", "score": "0.56216085", "text": "function gi(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "062d61bcac47d6ab015cd3f9e223048b", "score": "0.5615833", "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": "a6ab2d5a32bbf3d15bc874d66754e726", "score": "0.5593273", "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\";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": "2c0e02164ea35e10a0096fbbd1b4fd21", "score": "0.5590063", "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\",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": "2c0e02164ea35e10a0096fbbd1b4fd21", "score": "0.5590063", "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\",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": "2c0e02164ea35e10a0096fbbd1b4fd21", "score": "0.5590063", "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\",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": "2c0e02164ea35e10a0096fbbd1b4fd21", "score": "0.5590063", "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\",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": "2c0e02164ea35e10a0096fbbd1b4fd21", "score": "0.5590063", "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\",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": "2c0e02164ea35e10a0096fbbd1b4fd21", "score": "0.5590063", "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\",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": "94ef873f9cb151805a734fef184cb4ac", "score": "0.55863327", "text": "function e(t,e,i,n){var a=t+\" \";switch(i){case\"s\":return e||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||n?\"sekundi\":\"sekundah\":t<5?e||n?\"sekunde\":\"sekundah\":\"sekund\",a;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===t?e?\"minuta\":\"minuto\":2===t?e||n?\"minuti\":\"minutama\":t<5?e||n?\"minute\":\"minutami\":e||n?\"minut\":\"minutami\",a;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===t?e?\"ura\":\"uro\":2===t?e||n?\"uri\":\"urama\":t<5?e||n?\"ure\":\"urami\":e||n?\"ur\":\"urami\",a;case\"d\":return e||n?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===t?e||n?\"dan\":\"dnem\":2===t?e||n?\"dni\":\"dnevoma\":e||n?\"dni\":\"dnevi\",a;case\"M\":return e||n?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===t?e||n?\"mesec\":\"mesecem\":2===t?e||n?\"meseca\":\"mesecema\":t<5?e||n?\"mesece\":\"meseci\":e||n?\"mesecev\":\"meseci\",a;case\"y\":return e||n?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===t?e||n?\"leto\":\"letom\":2===t?e||n?\"leti\":\"letoma\":t<5?e||n?\"leta\":\"leti\":e||n?\"let\":\"leti\",a}}", "title": "" }, { "docid": "4d7d3f722e92df744a38cf2b4519c856", "score": "0.5579671", "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\",a;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\",a;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\",a;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\",a;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\",a;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\",a}}", "title": "" }, { "docid": "4d7d3f722e92df744a38cf2b4519c856", "score": "0.5579671", "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\",a;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\",a;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\",a;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\",a;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\",a;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\",a}}", "title": "" }, { "docid": "a2a9d926f5b72f9b5eca24fd20216c20", "score": "0.5578538", "text": "function e(t,e,n,i){var a=t+\" \";switch(n){case\"s\":return e||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return a+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||i?\"sekundi\":\"sekundah\":t<5?e||i?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return a+=1===t?e?\"minuta\":\"minuto\":2===t?e||i?\"minuti\":\"minutama\":t<5?e||i?\"minute\":\"minutami\":e||i?\"minut\":\"minutami\";case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return a+=1===t?e?\"ura\":\"uro\":2===t?e||i?\"uri\":\"urama\":t<5?e||i?\"ure\":\"urami\":e||i?\"ur\":\"urami\";case\"d\":return e||i?\"en dan\":\"enim dnem\";case\"dd\":return a+=1===t?e||i?\"dan\":\"dnem\":2===t?e||i?\"dni\":\"dnevoma\":e||i?\"dni\":\"dnevi\";case\"M\":return e||i?\"en mesec\":\"enim mesecem\";case\"MM\":return a+=1===t?e||i?\"mesec\":\"mesecem\":2===t?e||i?\"meseca\":\"mesecema\":t<5?e||i?\"mesece\":\"meseci\":e||i?\"mesecev\":\"meseci\";case\"y\":return e||i?\"eno leto\":\"enim letom\";case\"yy\":return a+=1===t?e||i?\"leto\":\"letom\":2===t?e||i?\"leti\":\"letoma\":t<5?e||i?\"leta\":\"leti\":e||i?\"let\":\"leti\"}}", "title": "" }, { "docid": "35524ce599d115df3cfb70f13d3503df", "score": "0.5571749", "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.5571749", "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.5571749", "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.5571749", "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.5571749", "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.5571749", "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.5571749", "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.5571749", "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": "c68512bc5177661cf90ebccdb43cd96f", "score": "0.55640244", "text": "function e(t,e,i,n){var r=t+\" \";switch(i){case\"s\":return e||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||n?\"sekundi\":\"sekundah\":t<5?e||n?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===t?e?\"minuta\":\"minuto\":2===t?e||n?\"minuti\":\"minutama\":t<5?e||n?\"minute\":\"minutami\":e||n?\"minut\":\"minutami\",r;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===t?e?\"ura\":\"uro\":2===t?e||n?\"uri\":\"urama\":t<5?e||n?\"ure\":\"urami\":e||n?\"ur\":\"urami\",r;case\"d\":return e||n?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===t?e||n?\"dan\":\"dnem\":2===t?e||n?\"dni\":\"dnevoma\":e||n?\"dni\":\"dnevi\",r;case\"M\":return e||n?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===t?e||n?\"mesec\":\"mesecem\":2===t?e||n?\"meseca\":\"mesecema\":t<5?e||n?\"mesece\":\"meseci\":e||n?\"mesecev\":\"meseci\",r;case\"y\":return e||n?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===t?e||n?\"leto\":\"letom\":2===t?e||n?\"leti\":\"letoma\":t<5?e||n?\"leta\":\"leti\":e||n?\"let\":\"leti\",r}}", "title": "" }, { "docid": "1b7eb6b1982c4acab46f948eb92ca333", "score": "0.55604404", "text": "p(){\n if(this.type == \"Hex Bolts\"){\n return this.tm\n }\n else{\n if((this.L-this.ts)/this.D >= 10){\n return Math.min(this.L-this.ts,this.tm)\n }\n else{\n return Math.min(this.L-this.ts-this.data.E,this.tm)\n }\n }\n }", "title": "" }, { "docid": "67826876ca544ce19e6337aa953070bc", "score": "0.55532914", "text": "function e(t,e,n,i){var r=t+\" \";switch(n){case\"s\":return e||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||i?\"sekundi\":\"sekundah\":t<5?e||i?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===t?e?\"minuta\":\"minuto\":2===t?e||i?\"minuti\":\"minutama\":t<5?e||i?\"minute\":\"minutami\":e||i?\"minut\":\"minutami\",r;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===t?e?\"ura\":\"uro\":2===t?e||i?\"uri\":\"urama\":t<5?e||i?\"ure\":\"urami\":e||i?\"ur\":\"urami\",r;case\"d\":return e||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===t?e||i?\"dan\":\"dnem\":2===t?e||i?\"dni\":\"dnevoma\":e||i?\"dni\":\"dnevi\",r;case\"M\":return e||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===t?e||i?\"mesec\":\"mesecem\":2===t?e||i?\"meseca\":\"mesecema\":t<5?e||i?\"mesece\":\"meseci\":e||i?\"mesecev\":\"meseci\",r;case\"y\":return e||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===t?e||i?\"leto\":\"letom\":2===t?e||i?\"leti\":\"letoma\":t<5?e||i?\"leta\":\"leti\":e||i?\"let\":\"leti\",r}}", "title": "" }, { "docid": "67826876ca544ce19e6337aa953070bc", "score": "0.55532914", "text": "function e(t,e,n,i){var r=t+\" \";switch(n){case\"s\":return e||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||i?\"sekundi\":\"sekundah\":t<5?e||i?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===t?e?\"minuta\":\"minuto\":2===t?e||i?\"minuti\":\"minutama\":t<5?e||i?\"minute\":\"minutami\":e||i?\"minut\":\"minutami\",r;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===t?e?\"ura\":\"uro\":2===t?e||i?\"uri\":\"urama\":t<5?e||i?\"ure\":\"urami\":e||i?\"ur\":\"urami\",r;case\"d\":return e||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===t?e||i?\"dan\":\"dnem\":2===t?e||i?\"dni\":\"dnevoma\":e||i?\"dni\":\"dnevi\",r;case\"M\":return e||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===t?e||i?\"mesec\":\"mesecem\":2===t?e||i?\"meseca\":\"mesecema\":t<5?e||i?\"mesece\":\"meseci\":e||i?\"mesecev\":\"meseci\",r;case\"y\":return e||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===t?e||i?\"leto\":\"letom\":2===t?e||i?\"leti\":\"letoma\":t<5?e||i?\"leta\":\"leti\":e||i?\"let\":\"leti\",r}}", "title": "" }, { "docid": "67826876ca544ce19e6337aa953070bc", "score": "0.55532914", "text": "function e(t,e,n,i){var r=t+\" \";switch(n){case\"s\":return e||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||i?\"sekundi\":\"sekundah\":t<5?e||i?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===t?e?\"minuta\":\"minuto\":2===t?e||i?\"minuti\":\"minutama\":t<5?e||i?\"minute\":\"minutami\":e||i?\"minut\":\"minutami\",r;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===t?e?\"ura\":\"uro\":2===t?e||i?\"uri\":\"urama\":t<5?e||i?\"ure\":\"urami\":e||i?\"ur\":\"urami\",r;case\"d\":return e||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===t?e||i?\"dan\":\"dnem\":2===t?e||i?\"dni\":\"dnevoma\":e||i?\"dni\":\"dnevi\",r;case\"M\":return e||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===t?e||i?\"mesec\":\"mesecem\":2===t?e||i?\"meseca\":\"mesecema\":t<5?e||i?\"mesece\":\"meseci\":e||i?\"mesecev\":\"meseci\",r;case\"y\":return e||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===t?e||i?\"leto\":\"letom\":2===t?e||i?\"leti\":\"letoma\":t<5?e||i?\"leta\":\"leti\":e||i?\"let\":\"leti\",r}}", "title": "" }, { "docid": "67826876ca544ce19e6337aa953070bc", "score": "0.55532914", "text": "function e(t,e,n,i){var r=t+\" \";switch(n){case\"s\":return e||i?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||i?\"sekundi\":\"sekundah\":t<5?e||i?\"sekunde\":\"sekundah\":\"sekund\",r;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===t?e?\"minuta\":\"minuto\":2===t?e||i?\"minuti\":\"minutama\":t<5?e||i?\"minute\":\"minutami\":e||i?\"minut\":\"minutami\",r;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===t?e?\"ura\":\"uro\":2===t?e||i?\"uri\":\"urama\":t<5?e||i?\"ure\":\"urami\":e||i?\"ur\":\"urami\",r;case\"d\":return e||i?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===t?e||i?\"dan\":\"dnem\":2===t?e||i?\"dni\":\"dnevoma\":e||i?\"dni\":\"dnevi\",r;case\"M\":return e||i?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===t?e||i?\"mesec\":\"mesecem\":2===t?e||i?\"meseca\":\"mesecema\":t<5?e||i?\"mesece\":\"meseci\":e||i?\"mesecev\":\"meseci\",r;case\"y\":return e||i?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===t?e||i?\"leto\":\"letom\":2===t?e||i?\"leti\":\"letoma\":t<5?e||i?\"leta\":\"leti\":e||i?\"let\":\"leti\",r}}", "title": "" }, { "docid": "9d64522648c2d5c3228db32a451a4c9b", "score": "0.55522054", "text": "function e(t,e,i,r){var n=t+\" \";switch(i){case\"s\":return e||r?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return n+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||r?\"sekundi\":\"sekundah\":t<5?e||r?\"sekunde\":\"sekundah\":\"sekund\",n;case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return n+=1===t?e?\"minuta\":\"minuto\":2===t?e||r?\"minuti\":\"minutama\":t<5?e||r?\"minute\":\"minutami\":e||r?\"minut\":\"minutami\",n;case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return n+=1===t?e?\"ura\":\"uro\":2===t?e||r?\"uri\":\"urama\":t<5?e||r?\"ure\":\"urami\":e||r?\"ur\":\"urami\",n;case\"d\":return e||r?\"en dan\":\"enim dnem\";case\"dd\":return n+=1===t?e||r?\"dan\":\"dnem\":2===t?e||r?\"dni\":\"dnevoma\":e||r?\"dni\":\"dnevi\",n;case\"M\":return e||r?\"en mesec\":\"enim mesecem\";case\"MM\":return n+=1===t?e||r?\"mesec\":\"mesecem\":2===t?e||r?\"meseca\":\"mesecema\":t<5?e||r?\"mesece\":\"meseci\":e||r?\"mesecev\":\"meseci\",n;case\"y\":return e||r?\"eno leto\":\"enim letom\";case\"yy\":return n+=1===t?e||r?\"leto\":\"letom\":2===t?e||r?\"leti\":\"letoma\":t<5?e||r?\"leta\":\"leti\":e||r?\"let\":\"leti\",n}}", "title": "" }, { "docid": "792129a2f87dbfe232a8191ccfe18a2b", "score": "0.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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.5549302", "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": "de36411410433d56246c99f4cf47e7a8", "score": "0.5548107", "text": "function e(t,e,i,n){var r=t+\" \";switch(i){case\"s\":return e||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===t?e?\"sekundo\":\"sekundi\":2===t?e||n?\"sekundi\":\"sekundah\":t<5?e||n?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===t?e?\"minuta\":\"minuto\":2===t?e||n?\"minuti\":\"minutama\":t<5?e||n?\"minute\":\"minutami\":e||n?\"minut\":\"minutami\";case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===t?e?\"ura\":\"uro\":2===t?e||n?\"uri\":\"urama\":t<5?e||n?\"ure\":\"urami\":e||n?\"ur\":\"urami\";case\"d\":return e||n?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===t?e||n?\"dan\":\"dnem\":2===t?e||n?\"dni\":\"dnevoma\":e||n?\"dni\":\"dnevi\";case\"M\":return e||n?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===t?e||n?\"mesec\":\"mesecem\":2===t?e||n?\"meseca\":\"mesecema\":t<5?e||n?\"mesece\":\"meseci\":e||n?\"mesecev\":\"meseci\";case\"y\":return e||n?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===t?e||n?\"leto\":\"letom\":2===t?e||n?\"leti\":\"letoma\":t<5?e||n?\"leta\":\"leti\":e||n?\"let\":\"leti\"}}", "title": "" }, { "docid": "ee20282bfd7e06874765472e25af6ac1", "score": "0.55355746", "text": "function v(e,t,n){var r=e+\" \";switch(n){case\"ss\":return r+=1===e?\"sekunda\":2===e||3===e||4===e?\"sekunde\":\"sekundi\";case\"m\":return t?\"jedna minuta\":\"jedne minute\";case\"mm\":return r+=1===e?\"minuta\":2===e||3===e||4===e?\"minute\":\"minuta\";case\"h\":return t?\"jedan sat\":\"jednog sata\";case\"hh\":return r+=1===e?\"sat\":2===e||3===e||4===e?\"sata\":\"sati\";case\"dd\":return r+=1===e?\"dan\":\"dana\";case\"MM\":return r+=1===e?\"mjesec\":2===e||3===e||4===e?\"mjeseca\":\"mjeseci\";case\"yy\":return r+=1===e?\"godina\":2===e||3===e||4===e?\"godine\":\"godina\"}}", "title": "" }, { "docid": "df03a2bc01a51ccda9559cbdbd6b892a", "score": "0.55277234", "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\",a;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\",a;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\",a;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\",a;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\",a;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\",a}}", "title": "" }, { "docid": "df03a2bc01a51ccda9559cbdbd6b892a", "score": "0.55277234", "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\",a;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\",a;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\",a;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\",a;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\",a;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\",a}}", "title": "" }, { "docid": "df03a2bc01a51ccda9559cbdbd6b892a", "score": "0.55277234", "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\",a;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\",a;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\",a;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\",a;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\",a;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\",a}}", "title": "" }, { "docid": "df03a2bc01a51ccda9559cbdbd6b892a", "score": "0.55277234", "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\",a;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\",a;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\",a;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\",a;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\",a;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\",a}}", "title": "" }, { "docid": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "75644183aabd638fcb3003ba804e4da8", "score": "0.5515239", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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": "bbd03741cca0a03b96cdd9f14d19f91b", "score": "0.5510716", "text": "function h(e,t,n,r){var a={s:[\"mõne sekundi\",\"mõni sekund\",\"paar sekundit\"],ss:[e+\"sekundi\",e+\"sekundit\"],m:[\"ühe minuti\",\"üks minut\"],mm:[e+\" minuti\",e+\" minutit\"],h:[\"ühe tunni\",\"tund aega\",\"üks tund\"],hh:[e+\" tunni\",e+\" tundi\"],d:[\"ühe päeva\",\"üks päev\"],M:[\"kuu aja\",\"kuu aega\",\"üks kuu\"],MM:[e+\" kuu\",e+\" kuud\"],y:[\"ühe aasta\",\"aasta\",\"üks aasta\"],yy:[e+\" aasta\",e+\" aastat\"]};return t?a[n][2]?a[n][2]:a[n][1]:r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "63f26e6f294d0236c761e4d386f920e6", "score": "0.5505471", "text": "function overtime_phut_vao(time_in,gio_in) { \r\nvar phut_in = 0;\r\n if ((gio_in < 8) && (gio_in > 5)) {\r\n\t\t\t \r\n if ((time_in <= 45)&&(time_in > 30)) {\r\n phut_in = 0.25;\r\n }\r\n else if ((time_in <= 30)&&(time_in > 15 )) {\r\n phut_in = 0.5;\r\n }\r\n else if ((time_in < 15)) {\r\n\t\t phut_in = 0.75;\r\n\t\t }\r\n\t else {\r\n\t\t\tphut_in = 0;\r\n\t\t } \r\n \r\n\t}\r\n\treturn phut_in;\r\n}", "title": "" }, { "docid": "0fa6089645555ad6e0e3fd8310fed096", "score": "0.54987234", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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\";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\";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\";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\";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\";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\"}}", "title": "" }, { "docid": "0fa6089645555ad6e0e3fd8310fed096", "score": "0.54987234", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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\";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\";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\";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\";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\";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\"}}", "title": "" }, { "docid": "0fa6089645555ad6e0e3fd8310fed096", "score": "0.54987234", "text": "function e(t,e,n,r){var i=t+\" \";switch(n){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\";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\";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\";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\";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\";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\"}}", "title": "" }, { "docid": "4ef09e9da8324f7db25dccfa180ec4dc", "score": "0.5490496", "text": "function t(e,t,r,n){var i=e+\" \";switch(r){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": "9ba731f027b80663f5dabe4d7b2fbd08", "score": "0.54864275", "text": "function e(A,e,t,n){var r=A+\" \";switch(t){case\"s\":return e||n?\"nekaj sekund\":\"nekaj sekundami\";case\"ss\":return r+=1===A?e?\"sekundo\":\"sekundi\":2===A?e||n?\"sekundi\":\"sekundah\":A<5?e||n?\"sekunde\":\"sekundah\":\"sekund\";case\"m\":return e?\"ena minuta\":\"eno minuto\";case\"mm\":return r+=1===A?e?\"minuta\":\"minuto\":2===A?e||n?\"minuti\":\"minutama\":A<5?e||n?\"minute\":\"minutami\":e||n?\"minut\":\"minutami\";case\"h\":return e?\"ena ura\":\"eno uro\";case\"hh\":return r+=1===A?e?\"ura\":\"uro\":2===A?e||n?\"uri\":\"urama\":A<5?e||n?\"ure\":\"urami\":e||n?\"ur\":\"urami\";case\"d\":return e||n?\"en dan\":\"enim dnem\";case\"dd\":return r+=1===A?e||n?\"dan\":\"dnem\":2===A?e||n?\"dni\":\"dnevoma\":e||n?\"dni\":\"dnevi\";case\"M\":return e||n?\"en mesec\":\"enim mesecem\";case\"MM\":return r+=1===A?e||n?\"mesec\":\"mesecem\":2===A?e||n?\"meseca\":\"mesecema\":A<5?e||n?\"mesece\":\"meseci\":e||n?\"mesecev\":\"meseci\";case\"y\":return e||n?\"eno leto\":\"enim letom\";case\"yy\":return r+=1===A?e||n?\"leto\":\"letom\":2===A?e||n?\"leti\":\"letoma\":A<5?e||n?\"leta\":\"leti\":e||n?\"let\":\"leti\"}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" }, { "docid": "f523840cf7da04343c7026eff4b9eaac", "score": "0.54799753", "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\",i;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\",i;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\",i;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\",i;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\",i;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\",i}}", "title": "" } ]
9da7b482f1d217b8abe77fefb8d4d4b5
Get/show help for f2help row
[ { "docid": "576d28db8b615bd24b9f9d8b6385e288", "score": "0.5456638", "text": "function f2Help(id){\n if($('#f2help_contain_'+id).hasClass('open')){ \n $('#f2help_contain_'+id).removeClass('open');\n }else{ \n var html = $('#f2help_'+id).html(); \n if(html.length == 0){\n doAjax('helps/getHelpTXT/'+id, {}, f2HelpDone);\n }else{\n $('#f2help_contain_'+id).addClass('open');\n }\n }\n}", "title": "" } ]
[ { "docid": "b9d605e31b8d2e1c6988cec751c9ed1c", "score": "0.6543377", "text": "function showToolTipHelp() {\n\t\tvar link = tip.triggerElement;\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\t\tvar table = link.getAttribute('data-table');\n\t\tvar field = link.getAttribute('data-field');\n\t\tvar key = table + '.' + field;\n\t\tvar response = cshHelp.key(key);\n\t\ttip.target = tip.triggerElement;\n\t\tif (response) {\n\t\t\tupdateTip(response);\n\t\t} else {\n\t\t\t\t// If a table is defined, use ExtDirect call to get the tooltip's content\n\t\t\tif (table) {\n\t\t\t\t\t// Clear old tooltip contents\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: top.TYPO3.LLL.core.csh_tooltip_loading,\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: ''\n\t\t\t\t});\n\t\t\t\t\t// Load content\n\t\t\t\tTYPO3.CSH.ExtDirect.getTableContextHelp(table, function(response, options) {\n\t\t\t\t\tExt.iterate(response, function(key, value){\n\t\t\t\t\t\tcshHelp.add(value);\n\t\t\t\t\t\tif (key === field) {\n\t\t\t\t\t\t\tupdateTip(value);\n\t\t\t\t\t\t\t\t// Need to re-position because the height may have increased\n\t\t\t\t\t\t\ttip.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}, this);\n\n\t\t\t\t// No table was given, use directly title and description\n\t\t\t} else {\n\t\t\t\tupdateTip({\n\t\t\t\t\tdescription: link.getAttribute('data-description'),\n\t\t\t\t\tcshLink: '',\n\t\t\t\t\tmoreInfo: '',\n\t\t\t\t\ttitle: link.getAttribute('data-title')\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9b4af60b9bee42516c30e93989f79d07", "score": "0.65108067", "text": "requestedForHelp()\n\t{\n\t\treturn this.inputs.help;\n\t}", "title": "" }, { "docid": "175084b0e50fd3b30a89af2353b2bcb8", "score": "0.6461858", "text": "function helpline(e) \r\n\t\t\t\t{\r\n\t\t\t\t\tif(typeof help[e] !== 'undefined') $('#helpbox').html(help[e]);\r\n\t\t\t\t}", "title": "" }, { "docid": "a10ebd2c853962d7fbb41b0c8c6fc235", "score": "0.6461412", "text": "help() {\n let helpData = getHelpData();\n let keywords = Object.keys(helpData.keywords);\n let ids = null;\n this._help = this._help.toUpperCase();\n for (let i = 0; i < keywords.length; i++) {\n if (keywords[i].toUpperCase().indexOf(this._help) !== -1) {\n ids = helpData.keywords[keywords[i]];\n }\n }\n if (!ids) {\n return;\n }\n let id = ids[0];\n let item = null;\n if (id in helpData.subjectById) {\n item = helpData.subjectById[id];\n } else if (id in helpData.sectionById) {\n item = helpData.sectionById[id];\n }\n if (!item) {\n return;\n }\n dispatcher.dispatch(\n 'Dialog.Help.Show',\n {\n keyword: this._help,\n fileIndex: item.fileIndex\n }\n );\n }", "title": "" }, { "docid": "8f5c0231a90b0d9bc4c6ac7472854468", "score": "0.64394796", "text": "function displayHelp()\n{\n // Replace the following call if you are modifying this file for your own use.\n dwscripts.displayDWHelp(HELP_DOC);\n}", "title": "" }, { "docid": "8f5c0231a90b0d9bc4c6ac7472854468", "score": "0.64394796", "text": "function displayHelp()\n{\n // Replace the following call if you are modifying this file for your own use.\n dwscripts.displayDWHelp(HELP_DOC);\n}", "title": "" }, { "docid": "8f5c0231a90b0d9bc4c6ac7472854468", "score": "0.64394796", "text": "function displayHelp()\n{\n // Replace the following call if you are modifying this file for your own use.\n dwscripts.displayDWHelp(HELP_DOC);\n}", "title": "" }, { "docid": "8f5c0231a90b0d9bc4c6ac7472854468", "score": "0.64394796", "text": "function displayHelp()\n{\n // Replace the following call if you are modifying this file for your own use.\n dwscripts.displayDWHelp(HELP_DOC);\n}", "title": "" }, { "docid": "ee9ddc1715338582150c3657468d4625", "score": "0.6431426", "text": "function displayHelp() {\n\tdwscripts.displayDWHelp(HELP_DOC);\n}", "title": "" }, { "docid": "49a11a04744c721878dddad8eace2ad8", "score": "0.6410324", "text": "function displayHelp()\r\n{\r\n // Replace the following call if you are modifying this file for your own use.\r\n dwscripts.displayDWHelp(HELP_DOC);\r\n}", "title": "" }, { "docid": "ee93634b9d3e93cbe103c1e9e6de68da", "score": "0.63649964", "text": "getHelp(rightMargin) {\n if (this.commandInfoArray.length === 0)\n return \"Help is not available.\";\n \n let help = this.getHelpIntro(rightMargin);\n let self = this;\n this.commandInfoArray.forEach(function (commandInfo) {\n if (commandInfo.firstOfGroup)\n help += \"\\n\";\n help += self.getHelpSummaryEntry(commandInfo, rightMargin);\n });\n return help + this.getHelpTrailer(rightMargin);\n }", "title": "" }, { "docid": "cea87994b9678a20599bdba26d6f9b18", "score": "0.63392234", "text": "function showHelp()\n{\n\n}", "title": "" }, { "docid": "b8bec447c1e22027bf24dce730b174c8", "score": "0.6278491", "text": "getHelpSummaryEntry(commandInfo, rightMargin) {\n let syntax = commandInfo.syntax.substr(commandInfo.name.length);\n return commandInfo.name.toUpperCase() + syntax +\"\\n\"+\n optionhelp.wrapText(' '+ commandInfo.summary, rightMargin,\n true) +\"\\n\"; \n }", "title": "" }, { "docid": "cd8d1de7bf4ed11d769f3a03e061e652", "score": "0.6270872", "text": "function getShowHelp() {\n return helpservice.getHelp();\n }", "title": "" }, { "docid": "57df7e945091599a6a70a8e5fb7f2032", "score": "0.6268622", "text": "function help() {\n var msg = \"%s--- Fisherman help ---\";\n msg += \"%sYou are currently fishing. Available commands:\";\n msg += \"%s inv -- Displays the player inventory\";\n msg += \"%s fish -- Attempts to catch a fish\";\n msg += \"%s quit -- Quit the game\";\n msg += \"%s exit -- Synonymous to quit\";\n return msg;\n}", "title": "" }, { "docid": "39a35dc42f707d380b21fdae8d0a55f8", "score": "0.62407994", "text": "_showHelp() {\n const sections = [\n {\n header: 'HMR_ReduxMapper',\n content: 'This is a module which generates a [italic]{global} and [italic]{component specific} mapping file ' +\n 'which should eliminate the need to manually list all reducers needed to render a given route when using ' +\n 'hot-module-reloading. To use this, each redux reducer file should contain a [bold]{PRM_REDUCER_NAME} ' +\n 'constant which this tool will look for. See https://github.com/paulbrom/hmr-redux-mapper for more information.',\n },\n {\n header: 'Options',\n optionList: COMMAND_LINE_ARGS,\n }\n ];\n const usage = cliUsage(sections)\n console.log(usage);\n }", "title": "" }, { "docid": "96a6eb70975ee67ccf109d6c31dfa1a2", "score": "0.62308675", "text": "format_help() {\n let help = this._root_section.format_help();\n if (help) {\n help = help.replace(this._long_break_matcher, \"\\n\\n\");\n help = help.replace(/^\\n+|\\n+$/g, \"\") + \"\\n\";\n }\n return help;\n }", "title": "" }, { "docid": "9ff2f065eac18cde4d7c70cc05d506eb", "score": "0.6200497", "text": "function showHelp() {\n\n var helpTitle = level.helpTitle || \"\";\n var help = level.help || \"\";\n var examples = level.examples ||[];\n var selector = level.selector || \"\";\n var syntax = level.syntax || \"\";\n var syntaxExample = level.syntaxExample || \"\";\n var selectorName = level.selectorName || \"\";\n\n $(\".display-help .syntax\").html(syntax);\n $(\".display-help .syntax-example\").html(syntaxExample);\n $(\".display-help .selector-name\").html(selectorName);\n $(\".display-help .title\").html(helpTitle);\n $(\".display-help .examples\").html(\"\");\n $(\".display-help .examples-title\").hide(); // Hide the \"Examples\" heading\n\n for(var i = 0; i < examples.length; i++){\n var example = $(\"<div class='example'>\" + examples[i] + \"</div>\");\n $(\".display-help .examples\").append(example);\n $(\".display-help .examples-title\").show(); // Show it if there are examples\n }\n\n $(\".display-help .hint\").html(help);\n $(\".display-help .selector\").text(selector);\n}", "title": "" }, { "docid": "1b56b4bfb3f40656de95a155f8e4cfe6", "score": "0.61966485", "text": "function f2HelpDone(resp){\n if(resp && resp.help){\n $('#f2help_'+resp.help.id).html(resp.help.help);\n $('#f2help_contain_'+resp.help.id).addClass('open');\n }\n}", "title": "" }, { "docid": "15dc2ed83e4e9af0532f178868478b08", "score": "0.6127796", "text": "function helpline(help) {\n document.adminForm.helpbox.value = eval(help + \"_help\");\n}", "title": "" }, { "docid": "8555e362d683223e30263f639fa3be8f", "score": "0.61232793", "text": "helpInfo () {\n\t\tlet me = this;\n\n\t\treturn [\n\t\t\t$('<h3>').append(\n\t\t\t\tt('Listar cadernos da aventura')\n\t\t\t),\n\t\t\tsprintf(t('Para ver o que foi anotado no caderno, clique em <b>%s</b>'), Notebook.EMOJI_VISUALIZE)\n\t\t];\n\t}", "title": "" }, { "docid": "133aec7ae4ac991eb93832a3dbfb1418", "score": "0.6045459", "text": "FindHelp({ commit }, data) {\n commit(\"appendFindHelp\", data);\n }", "title": "" }, { "docid": "6d85cdc7fcb865f9179b4459016a0645", "score": "0.6019705", "text": "_showHelp() {\n if (!this._helpWindow) this._helpWindow = new N2Help(this.helpInfo);\n else this._helpWindow.show().modal(true);\n }", "title": "" }, { "docid": "657adcd8d0a3cf39da99e30552acb5e3", "score": "0.6018876", "text": "function help() {\n let res = \"To show a list of possible commands, use `/ttt help` \\n\";\n res += \"To challenge `@user` to a game, use `/ttt challenge @user` \\n\";\n res += \"To accept `@user`'s challenge, use `/ttt accept @user`\\n\";\n res += \"To reject `@user`'s challenge , use `/ttt reject @user`\\n\";\n res += \"To make a move on cell [num], use `/ttt move [num]`\\n\";\n res +=\n \"To show the current game in the channel, and who's turn it is, use `/ttt show` \\n\\n\";\n res += \"Have fun with the game!\";\n\n return buildSuccessMsg(res);\n}", "title": "" }, { "docid": "b0152d0456f25c8c0ec47c9365523f27", "score": "0.59864783", "text": "function showCommandHelpFucntion(){\n console.log('\"show\" command is used to show the list of clients, servers or both ');\n console.log('that are created by the user during the wrt-c session');\n console.log('The syntax of the command is the follows:');\n console.log('');\n console.log('show [client/server/all]');\n console.log('');\n}", "title": "" }, { "docid": "728f0123a57dc6819b35d95012ee09bf", "score": "0.5985429", "text": "function myhelp() {\n\tpopHelp(\"wizardSettings_wireless_settings\");\n}", "title": "" }, { "docid": "91ad1204a47d2a9cb616ece1e536fdc4", "score": "0.5980005", "text": "getHelp(locale) {\n return this.help ? this.help : \"no help information given\";\n }", "title": "" }, { "docid": "6bd20a187dee580676e341b59cc64a7b", "score": "0.5973562", "text": "function showHelp ( field )\n{\n // Get the parent node\n var sb1 = document.getElementById ( \"sidebar1\" );\n\n // Make sure the nodes have not already been added\n ensureEmpty ( sb1 );\n\n // Based on the field, fill in the help text\n var ti;\t// Title shown in tip area\n var tx;\t// Text shown in tip area\n switch ( field )\n {\n\tcase \"emailaddress\":\n\t ti = \"Email Address\";\n\t tx = \"Your email address is used as your user login identifier. \" +\n\t\t \"Type in your email address in the field provided.\"\n\t addNodes ( sb1, ti, tx );\n\t break;\n\n\tcase \"confirmemailaddress\":\n\t ti = \"Confirm Email Address\";\n\t tx = \"To make sure you typed your email address correctly, \" +\n\t\t \"type it again in this field.\";\n\t addNodes ( sb1, ti, tx );\n\t break;\n\n\tcase \"password\":\n\t ti = \"Password\";\n\t tx = \"To make your new account secure, enter a password in the \" +\n\t\t \"password field.\";\n\t addNodes ( sb1, ti, tx );\n\t break;\n\n\tcase \"confirmpassword\":\n\t ti = \"Password\";\n\t tx = \"To make sure you typed your password correctly, \" +\n\t\t \"type it again in this field.\";\n\t addNodes ( sb1, ti, tx );\n\t break;\n\n\t// TODO: Put the other fields here...\n\n\tdefault:\n\t ti = \"Input Tip Area\";\n\t tx = \"Look for helpful hints on what to type in the form here.\";\n\t addNodes ( sb1, ti, tx );\n\t break;\n }\n}", "title": "" }, { "docid": "d4698c25a5ab55e75e626e0b4796def2", "score": "0.5962713", "text": "showHelp() {\n super.sendMsgToPc('showHelp');\n }", "title": "" }, { "docid": "83cd63db83be0075ea5339e97b0b0694", "score": "0.5938436", "text": "getHelpIntro(rightMargin) {\n return \"This tool supports the following commands:\\n\\n\";\n }", "title": "" }, { "docid": "fa95324ac742fc3b14ae33b336f5483b", "score": "0.59233814", "text": "function help() {\n\tvar commandsArray = ['Help: Список доступных комманд',\n\t\t'>help - посмотреть команды',\n\t\t'>signup - пройти регистрацию',\n\t\t'>signin - войти в СУБД.',\n\t\t'>students - посмотреть студентов',\n\t\t'>ping - пингануть меня',\n\t\t'>time - узнать время',\n\t\t'>clear - почистить экран',\n\t\t'>say - сказать в консоль'];\n\tfor (var i = 0; i < commandsArray.length; i++) {\n\t\tvar out = '<span>' + commandsArray[i] + '</span><br/>'\n\t\tOutput(out);\n\t}\n}", "title": "" }, { "docid": "4ce7450b9e919eaa317b6edeaa7c3470", "score": "0.59141195", "text": "function help () {\n return `INSTRUCTIONS:\\nBlacksmith is a simple text base game. As a blacksmith you convert ore and wood into swords and axes. You buy your resources using gold and sell your weapons for gold. \\n\\nCOMMANDS:\\n- buy(item)\\n- make(item)\\n- sell(item)\\n- fire()\\n- inventory()\\n- help()`\n}", "title": "" }, { "docid": "dd41ce8c83ed914c50d7ed2f7fb96caf", "score": "0.5827011", "text": "function helpline(help, champ) {\n\tchamp.value = help;\n}", "title": "" }, { "docid": "ba6ad827ffe003553645b5cfc43ad784", "score": "0.5819176", "text": "function getting_help() {\n return {verb: \"help\"};\n}", "title": "" }, { "docid": "648fa31bad674b41861d27f048d869c7", "score": "0.58041525", "text": "function do_help(cmd) {\n let helptext = [\n \"Use meld_tool --help for command summary\",\n // \"meld-tool make-workset <container_url> <workset_name>\",\n // \"meld-tool add-fragment <workset_url> <fragment_url> <fragment_name>\",\n // \"\",\n // \"\",\n ];\n helptext.forEach(\n (txt) => { console.log(txt); }\n );\n return Promise.resolve(null)\n .then(() => meld.process_exit(meld.EXIT_STS.SUCCESS, \"Help OK\"))\n ;\n}", "title": "" }, { "docid": "6f6309cfdc3918bba21fc0da3a0e2641", "score": "0.5792032", "text": "function help() {\n var fs = require(\"fs\");\n console.log(fs.readFileSync(\"USAGE\").toString().substring(0, fs.readFileSync(\"USAGE\").toString().length - 1));\n}", "title": "" }, { "docid": "af18ef664c7306da0c4e9d069d64a812", "score": "0.57698375", "text": "function viewHelp() {\n\t\twindow.open('http://labs.mbrooks.info/demos/SQLinJS/README.html#syntax');\n\t}", "title": "" }, { "docid": "764c05d1b2051c0b3e9736635c096b5a", "score": "0.5754547", "text": "static buildHelpText(examples, isLightningBundle, extra) {\n return (this.getHelpHead(isLightningBundle) +\n (extra || '') +\n this.messages.getMessage('HelpExamplesTitle') +\n examples.reduce((acc, current) => acc + ` ${current}\\n`, ''));\n }", "title": "" }, { "docid": "a07391433000f90a1caced712640cf83", "score": "0.5750489", "text": "function showHelp(...args) {\n const context = this;\n\n try {\n return Help_showHelp.call(context, ...args);\n }\n catch (error) {\n error.message += `\n\nIf you tried to execute and API action you can see\navailable options by displaying the \"sdk:query\" command help:\n - kourou sdk:query --help`;\n\n throw error;\n }\n}", "title": "" }, { "docid": "ed7157de2350b78411ce487be6050fcc", "score": "0.5747299", "text": "function getHelp() {\n self.location = g_appServerUrl + 'CustomerSupport.flow';\n}", "title": "" }, { "docid": "de1a7ebb6ec8d234b22a130cb2c22963", "score": "0.5697766", "text": "function showHelp() {\n sendMessage(BOT, \"Dit zijn de vragen die ik kan beantwoorden:\");\n\n QUESTIONS.forEach((question) => {\n sendMessage(BOT, QUESTION_FORMAT(question.question));\n });\n}", "title": "" }, { "docid": "af552bb0af14cba81a6468a7d9d90171", "score": "0.5692981", "text": "function help () {\n console.log(getHelp())\n process.exit(1)\n}", "title": "" }, { "docid": "9c51284ce1fd744a1c5494cdaa31a2ef", "score": "0.5681462", "text": "function _cmdHelp(cmd, cmdArgs){\n var _cmdApi = plugin.getCmd(cmd);\n if(!_cmdApi){\n sys.logTask('Command ', cmd, 'not found!');\n return;\n }\n if(plugin.checkApi(_cmdApi)){\n if(typeof _cmdApi.getHelpFile != 'function'){\n throw new Error('Command [' + cmd + '] has no help information!');\n return;\n }\n var _helpFile = _cmdApi.getHelpFile(),\n _helpFilePath = fs.combine(_helpPathBase,_helpFile);\n _get(_helpFile, 'resources/help/{name}', 'help/{name}');\n if(!fs.fileExists(_helpFilePath)){\n throw new Error(_helpFile + ' not found!');\n return;\n }\n var _helpContent = fs.getTextFileContent(_helpFilePath);\n _printHeader();\n sys.log(_helpContent);\n }\n }", "title": "" }, { "docid": "7c75f6a11c10d275d3da011485195383", "score": "0.5668244", "text": "function showHelp() {\n updateHelpWidth(170);\n $('#show-help').hide(); $('#help').show('slide', {direction:'right'}, 'slow');\n}", "title": "" }, { "docid": "49907d8bbbdf24b9580795e87014b4fd", "score": "0.5660181", "text": "function setHelp() {\n scoreboard.showHelp();\n}", "title": "" }, { "docid": "401523d1cb909f0f30700bb772ca3e6b", "score": "0.5648219", "text": "function getHelp() {\n console.log(' ')\n console.log(chalk`{bgRed.bold Do you need help?}`)\n console.log(' ')\n console.log(chalk`{green.bold To create a new Composi project you need to provide a name for the project.}`)\n console.log(chalk`{white.bold This should come after the flag '-n'.}`)\n console.log(' ')\n console.log(chalk`{bold Example: create-composi-app -n \"Project Name\"}`)\n console.log(' ')\n console.log(chalk`{green.bold You can also provide a path for where to create the project.}`)\n console.log(chalk`{green.bold This should come after the flag '-p'.}`)\n console.log(' ')\n console.log(chalk`{green.bold Mac & Linux:} create-composi-app -n \"Project Name\" -p \"~/Desktop/dev/personal\"`)\n console.log(' ')\n console.log(chalk`{green.bold Windows:} create-composi-app -n \"Project Name\" -p\"~\\\\Desktop\\\\dev\\\\personal\"`)\n console.log(' ')\n console.log('If no path is provided, the new project will be created on the Desktop.')\n console.log(' ')\n console.log('If a folder already exists with your project\\'s name, it will be overwritten.')\n console.log(' ')\n console.log('To get more help for using create-composi-app visit the website:'); console.log(chalk`{green.cyan https://composi.github.io/en/docs/create-composi-app/usage.html}`)\n console.log(' ')\n }", "title": "" }, { "docid": "2bcc59d927d39a6ec889bb0d1dea0e22", "score": "0.5644742", "text": "help() {\n\t\tconst { languages } = this.cumplebot;\n\n\t\treturn async (ctx) => {\n\t\t\tconst { language_code: lanCode = 'en' } = ctx.from;\n\t\t\tconst lan = languages.getLocale(lanCode);\n\n\t\t\tconst commands = await ctx.getMyCommands();\n\t\t\tconst info = commands.reduce(\n\t\t\t\t(acc, val) => `${acc}/${val.command} - ${val.description}\\n`,\n\t\t\t\t''\n\t\t\t);\n\t\t\treturn ctx.reply(`${lan.DESCRIPTION}\\n\\n${info}`);\n\t\t};\n\t}", "title": "" }, { "docid": "82e0f87ae8d732aec8bdadcd65ff36e6", "score": "0.563346", "text": "function mainHelpFucntion(){\n console.log('');\n console.log('WRT-CONSOLE HELP:');\n console.log('');\n console.log('If you want exit from wrt-c you can use the \"exit\"');\n console.log('command.');\n console.log('');\n console.log('Using \"new\" command you can create a client or a server');\n console.log('that uses the websocket reverse tunnel protocol.');\n console.log('\"new ?\" for command help');\n console.log('');\n console.log('Using \"rm\" command you can remove a client or a server');\n console.log('that are previously created by the user.');\n console.log('\"rm ?\" for command help');\n console.log('');\n console.log('Using \"show\" command you can list clients, server or both');\n console.log('that are created by the user during the wrt-c session.');\n console.log('\"show ?\" for command help');\n console.log('');\n console.log('Using \"start\" command if you want to start client or server');\n console.log('that are previously created during the wrt-c session.');\n console.log('\"start ?\" for command help');\n console.log('');\n}", "title": "" }, { "docid": "e273fe4005bd18c966dcd6d591118b75", "score": "0.5631815", "text": "renderHelp() {\n const leftArrow = chalk.cyan.bold(`${figures.arrowLeft}`);\n const rightArrow = chalk.cyan.bold(`${figures.arrowRight}`);\n const upArrow = chalk.cyan.bold(`${figures.arrowUp}`);\n const downArrow = chalk.cyan.bold(`${figures.arrowDown}`);\n const a = chalk.cyan.bold('<a>');\n const helps = [\n `${leftArrow} or ${rightArrow} to change anchors`,\n `${upArrow} or ${downArrow} to move anchors`,\n `${a} to select all`,\n ].join(', ');\n return `(Press ${helps})`;\n }", "title": "" }, { "docid": "34a356fdb8665be5f415a810869f4fc5", "score": "0.561276", "text": "function hdlClickUpdateHelp() {\n\tvar reqObj = {};\n\treqObj.value = $(\"#input_help_flg\")[0].checked;\n\tc4s.invokeApi_ex({\n\t\tlocation: \"manage.writeUseHelp\",\n\t\tbody: reqObj,\n\t\tonSuccess: function(data) {\n\t\t\talert(\"更新しました\");\n\t\t\tc4s.invokeApi_ex({\n\t\t\t\tlocation: env.current,\n\t\t\t\tbody: {ctrl_selectedTab: \"ct_help\"},\n\t\t\t\tpageMove: true,\n\t\t\t});\n\t\t},\n\t});\n}", "title": "" }, { "docid": "f9d695809ae9669d39112b28716efd32", "score": "0.5612011", "text": "function showHelp(){\n Logger.log('in ShowHelp()\\n'); \n var message = \"*Available commands:*\\n\\n\";\n message += \"- *help*: Lists availible commands.\\n\";\n message += \"- *request <date> <draw time>*: Request a spare. Leauge, date, and draw time must be provided.\\n\";\n message += \"- *fill <name>*: Fill <name>'s spare request.\\n\";\n message += \"- *cancel <date> <draw time>*: Cancel a submitted spare request.\\n\";\n message += \"- *list*: List all open spare requests.\\n\";\n\n sendMessage(message);\n}", "title": "" }, { "docid": "c160843bf092f1cc2be736063a90ad14", "score": "0.5605092", "text": "help() {\n return \"Lists files, directories and more informations if specified in options.<br/>usage: ls [-l][-a] [dir]\";\n }", "title": "" }, { "docid": "2b153e753476000675eb4db5b5900554", "score": "0.5604793", "text": "moreHelp(context) {\n return __awaiter(this, void 0, void 0, function* () {\n const helps = [\n {\n type: botbuilder_1.ActionTypes.PostBack,\n title: 'Yes',\n value: 'yes'\n },\n {\n type: botbuilder_1.ActionTypes.PostBack,\n title: 'No',\n value: 'no'\n }\n ];\n var reply = botbuilder_1.MessageFactory.suggestedActions(helps, 'Do you need more help');\n yield context.sendActivity(reply);\n });\n }", "title": "" }, { "docid": "fcb5321ab4415739bbdc1a5b5d35c9ce", "score": "0.55978346", "text": "function printHelp() {\n console.log(\"ex1 usage:\")\n console.log(\" ex.js --file={FILENAME}\");\n console.log(\"\");\n console.log(\"--help print this help\");\n console.log(\"--file={FILENAME}\" process the file);\n console.log(\"--in, - process stdin\");\n console.log(\"\");\n}", "title": "" }, { "docid": "a5f14453f9bafb0893272ab655608507", "score": "0.5586309", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "a5f14453f9bafb0893272ab655608507", "score": "0.5586309", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "a5f14453f9bafb0893272ab655608507", "score": "0.5586309", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "a5f14453f9bafb0893272ab655608507", "score": "0.5586309", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "a5f14453f9bafb0893272ab655608507", "score": "0.5586309", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "a5f14453f9bafb0893272ab655608507", "score": "0.5586309", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "a5f14453f9bafb0893272ab655608507", "score": "0.5586309", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "a71b70180f7a9f31572ee1f6f2b11dba", "score": "0.55771923", "text": "function help() {\n console.group('\\nHelp Menu:');\n console.log('To run program correctly please type \"node liri.js\" to run the program then the correct commands.');\n console.log('The commands are as follows: ');\n console.log(' concert-this <artist/band name here>');\n console.log(' spotify-this-song <song name here>');\n console.log(' movie-this <movie name here>');\n console.log(' do-what-it-says');\n console.groupEnd();\n}", "title": "" }, { "docid": "6d1dd30394c8c1f4f188f0350b01d8e1", "score": "0.5576882", "text": "function showHelp(help) {\r\n document.getElementById('help').innerHTML = help;\r\n}", "title": "" }, { "docid": "07b3691ee884eecaf88710e7cccba316", "score": "0.55575556", "text": "function learnMore(){\n dwscripts.displayDWHelp(MM.HELP_FW8PopupMenus);\n}", "title": "" }, { "docid": "4691960b007313a7a6c35450923eedee", "score": "0.5556307", "text": "function help() {\r\n window.open(\"extRSHelpPRO.html\", \"helpwindow\");\r\n }", "title": "" }, { "docid": "080dbdca80e2499f49b6ad481628f8b5", "score": "0.555455", "text": "getHelp()\n {\n for(var i = 0; i < this.hotkeys.length; i++)\n {\n console.log(this.hotkeys[i])\n console.log()\n }\n }", "title": "" }, { "docid": "96b69ce3825af09bcc719ca9159fa0fe", "score": "0.55529773", "text": "handleExpand() {\n this.props.expandHelp();\n }", "title": "" }, { "docid": "97fd73a3427619404e46290ab99dba95", "score": "0.5548936", "text": "static help() {\n console.log('Usage: hashbrown-cli <command> [<args>]');\n console.log();\n \n console.log('general');\n columns([INDENT, 'get', 'Get a settings value, such as \"editor\"']);\n columns([INDENT, 'help', 'Display this help dialogue']);\n columns([INDENT, 'login', 'Log in to a HashBrown instance']);\n columns([INDENT, 'set', 'Set a settings value, such as \"editor\"']);\n columns([INDENT, 'use', 'Switch between projects and environments']);\n console.log();\n \n console.log('connection');\n columns([INDENT, 'edit', 'Edit a connection']);\n columns([INDENT, 'ls', 'List all available connections']);\n columns([INDENT, 'new', 'Create a new connection']);\n columns([INDENT, 'rm', 'Remove a connection']);\n console.log();\n \n console.log('content');\n columns([INDENT, 'edit', 'Edit a content node']);\n columns([INDENT, 'ls', 'List all available content']);\n columns([INDENT, 'new', 'Create a new content node']);\n columns([INDENT, 'rm', 'Remove a content node']);\n console.log();\n \n console.log('form');\n columns([INDENT, 'edit', 'Edit a form']);\n columns([INDENT, 'ls', 'List all available forms']);\n columns([INDENT, 'new', 'Create a new form']);\n columns([INDENT, 'rm', 'Remove a form']);\n console.log();\n \n console.log('schema');\n columns([INDENT, 'edit', 'Edit a schema']);\n columns([INDENT, 'ls', 'List all available schemas']);\n columns([INDENT, 'new', 'Create a new schema']);\n columns([INDENT, 'rm', 'Remove a schema']);\n console.log();\n\n console.log('project');\n columns([INDENT, 'ls', 'List all projects']);\n }", "title": "" }, { "docid": "c597a2ba6db7ecd295d8d1e446495510", "score": "0.55407155", "text": "function show_help(nick) {\n\n var str = \" Hello, I'm a bot. Here are my commands : \\n \"\n var function_names = [];\n for(var fn in FUNCTIONS){ function_names.push(fn); }\n function_names.sort();\n\n for(var i = 0; i<function_names.length; i++){\n var name = function_names[i];\n var func = FUNCTIONS[name];\n if(func.description != null){ str+= \" - \"+name+\" : \"+func.description+\"\\n\" }\n }\n\n say_to_user(nick, str);\n}", "title": "" }, { "docid": "e1c45f4cd147f50e1269729a6d57f905", "score": "0.5529702", "text": "function _nomination_show_help(event) {\n var $help_type = $(this).attr('id'),\n $selected_value = $('#edit-field-nomination-select-award-und').val(),\n $help_dialog_options = {\n title: 'Supporting Documentation Guidelines',\n width: 600,\n height: 600,\n buttons: {\n ' Close ': function() {\n $(this).dialog('close');\n }\n }\n };\n if ($help_type == 'select-award') {\n $help_dialog_options.title = 'Small Business Champion Awards';\n }\n _nomination_set_help_text($help_type, $selected_value);\n var $help_dialog = $('#nomination-help-dialog');\n _dialog_init($help_dialog, $help_dialog_options);\n $help_dialog.dialog('open');\n }", "title": "" }, { "docid": "328afe88b2c92b4a5c0f5c5d15fb2041", "score": "0.5529195", "text": "function $core_SYSREQ_writeErrorHelp()\n{\n\t$SYSREQ_ensureValidation();\n\tif ($m_bValid_SysReqs)\n\t\treturn;\n\n\tdocument.writeln(ERRORMSG_ERROR_HELP);\n}", "title": "" }, { "docid": "d7560efcec6fd19fc5d4bfd05fee50ec", "score": "0.5529061", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "d7560efcec6fd19fc5d4bfd05fee50ec", "score": "0.5529061", "text": "function showHelp(help) {\n document.getElementById('help').innerHTML = help;\n}", "title": "" }, { "docid": "fa36f182d00dd4ab23fb2bf6fab4c40d", "score": "0.55212075", "text": "helpInfo () {\n\t\tlet me = this;\n\n\t\treturn [\n\t\t\t$('<h3>').append(\n\t\t\t\tt('Inserir um antecedente nessa aventura')\n\t\t\t),\n\t\t\t$('<p>').append(\n\t\t\t\tt('<b>Legendas:</b>')\n\t\t\t),\n\t\t\t$('<ul>').append(\n\t\t\t\t$('<li>').append(\n\t\t\t\t\tsprintf(t('<b>%s Nome:</b> nome do antecedente.'), Background.EMOJI_NAME)\n\t\t\t\t),\n\t\t\t\t$('<li>').append(\n\t\t\t\t\tsprintf(t('<b>%s Descrição:</b> Breve descrição do que faz e a ideia.'), Background.EMOJI_DESCRIPTION)\n\t\t\t\t)\n\t\t\t),\n\t\t];\n\t}", "title": "" }, { "docid": "5fd8c1744a3e9e1e13ad8912fd25fb30", "score": "0.55054814", "text": "function buildKeybindingsHelpHTML(keybindings){\r\n\tvar doc = buildKeybindingsHelp(keybindings)\r\n\r\n\tvar res = '<table class=\"keyboard-help\">'\r\n\tfor(var mode in doc){\r\n\t\tif(mode == 'doc'){\r\n\t\t\tcontinue\r\n\t\t}\r\n\t\t// section head...\r\n\t\tres += ' <tr class=\"section-title\"><th colspan=2>' + mode + '</th></tr>\\n' \r\n\t\tmode = doc[mode]\r\n\t\tres += ' <tr class=\"section-doc\"><td colspan=2>'+ mode.doc + '</td></tr>\\n'\r\n\r\n\t\t// keys...\r\n\t\tfor(var action in mode){\r\n\t\t\tif(action == 'doc'){\r\n\t\t\t\tcontinue\r\n\t\t\t}\r\n\t\t\tres += ' <tr><td>' + mode[action].join(', ') +'</td><td>'+ action + '</td></tr>\\n'\r\n\t\t}\r\n\t}\r\n\tres += '</table>'\r\n\r\n\treturn $(res)\r\n}", "title": "" }, { "docid": "abbf460e236b22c817112854dfc37ca9", "score": "0.55038273", "text": "ShowHelpOptions() {\n // show help about declared options\n console.log()\n console.log(\"-\".repeat(60))\n console.log(\"Options:\")\n for (const key in this.optDeclarations) {\n let line = \"\"\n const opt = this.optDeclarations[key]\n let text = \"--\" + key\n if (opt.valueType) text = text + \" \" + opt.valueType\n if (opt.shortName) {\n text = text + \", -\" + opt.shortName\n if (opt.valueType) text = text + \" \" + opt.valueType\n }\n line = ` ${text}`.padEnd(50) + (opt.helpText ? opt.helpText : \"\")\n console.log(line)\n }\n console.log(\"-\".repeat(60))\n }", "title": "" }, { "docid": "a59231d7051286e958deac380ac955c2", "score": "0.5499004", "text": "function Help( target ) {\n\tif ( ! target ) {\n\t\tNodelint.leave( 0, Help._display );\n\t}\n\telse if ( Help[ target ] ) {\n\t\tHelp[ target ]();\n\t}\n\telse {\n\t\tNodelint.leave( 1, \"Unknown Help Target - \" + target );\n\t}\n}", "title": "" }, { "docid": "662388bda0cc38e01430c580705de4c6", "score": "0.54908687", "text": "async function printHelpScreen() {\n\tlet i, j;\n\tconst dbuf = GRID(COLS, ROWS, cellDisplayBuffer), rbuf = GRID(COLS, ROWS, cellDisplayBuffer); // cellDisplayBuffer[COLS][ROWS];\n\tlet helpText = [\n\t\t\"\",\n\t\t\"\",\n\t\t\" -- Commands --\",\n\t\t\"\",\n\t\t\" mouse ****move cursor (including to examine monsters and terrain)\",\n\t\t\" click ****travel\",\n\t\t\" control-click ****advance one space\",\n\t\t\" <return> ****enable keyboard cursor control\",\n\t\t\" <space/esc> ****disable keyboard cursor control\",\n\t\t\"hjklyubn, arrow keys, or numpad ****move or attack (control or shift to run)\",\n\t\t\"\",\n\t\t\" a/e/r/t/d/c/R ****apply/equip/remove/throw/drop/call/relabel an item\",\n\t\t\"i, right-click ****view inventory\",\n\t\t\" D ****list discovered items\",\n \"\",\n\t\t\" z ****rest once\",\n\t\t\" Z ****rest for 100 turns or until something happens\",\n\t\t\" s ****search for secret doors and traps\",\n\t\t\" <, > ****travel to stairs\",\n\t\t\" x ****auto-explore (control-x: fast forward)\",\n\t\t\" A ****autopilot (control-A: fast forward)\",\n\t\t\" M ****display old messages\",\n \"\",\n\t\t\" Q ****quit to title screen\",\n \"\",\n\t\t\" \\\\ ****disable/enable color effects\",\n\t\t\" ] ****display/hide stealth range\",\n\t\t// \" [ ****enable/disable low HP warning\",\n\t\t\" <space/esc> ****clear message or cancel command\",\n\t\t\"\",\n\t\t\" -- press space or click to continue --\"\n\t];\n\n\tconst BROGUE_HELP_LINE_COUNT = helpText.length;\n\n\t// Replace the \"****\"s with color escapes.\n\tfor (i=0; i<BROGUE_HELP_LINE_COUNT; i++) {\n\t\thelpText[i] = STRING(helpText[i]);\n\t\tfor (j=0; j < strlen(helpText[i]); j++) {\n\t\t\tif (helpText[i].charAt(j) == '*') {\n\t\t\t\tj = encodeMessageColor(helpText[i], j, white);\n\t\t\t}\n\t\t}\n\t}\n\n\tclearDisplayBuffer(dbuf);\n\n\t// Print the text to the dbuf.\n\tfor (i=0; i<helpText.length && i < ROWS; i++) {\n\t\tprintString(helpText[i], mapToWindowX(1), i, itemMessageColor, black, dbuf);\n\t}\n\n\t// Set the dbuf opacity.\n\tfor (i=0; i<DCOLS; i++) {\n\t\tfor (j=0; j<ROWS; j++) {\n\t\t\t//plotCharWithColor(' ', mapToWindowX(i), j, &black, &black);\n\t\t\tdbuf[mapToWindowX(i)][j].opacity = INTERFACE_OPACITY;\n\t\t}\n\t}\n\n\t// Display.\n\toverlayDisplayBuffer(dbuf, rbuf);\n\tcommitDraws();\n\tawait waitForAcknowledgment();\n\toverlayDisplayBuffer(rbuf, 0);\n\tupdateFlavorText();\n\tupdateMessageDisplay();\n\tcommitDraws();\n}", "title": "" }, { "docid": "57e3a877edc4cd65e90a2ed573bc36f5", "score": "0.5488048", "text": "function getHelp() {\n const version = require('./version').getVersion();\n\n console.log(`\nSKY UX App Builder (${version})\nUsage: skyux [command] [options]\n\nArguments:\n [command] The skyux command to execute.\n [options] Options to pass to the command.\n\nCommon Commands:\n new Initializes a new SKY UX application.\n serve Serves the current SKY UX application.\n build Builds the current SKY UX application into dist/.\n test Runs unit tests.\n e2e Runs end-to-end tests.\n watch Runs unit tests and watches the file system for changes.\n version Returns the version of SKY UX CLI.\n help Displays help information for SKY UX CLI arguments.\n\nCommon Options:\n -l | --launch Specifies the URL to launch during serve.\n Possible values are host (default), local, or none.\n Ex: skyux serve --launch local\n -t | --template Specifies the base template to use when creating a SKY UX application.\n The value should be the suffix of an existing SKY UX template repo.\n Ex: provided the repo 'blackbaud/skyux-template-my-team/' exists,\n type: 'skyux new --template my-team'\n`);\n\n}", "title": "" }, { "docid": "9fbad0fc24a8f79e6baabc93c4d1aab0", "score": "0.5471518", "text": "function displayHelp() {\n /* eslint-disable no-console */\n console.log(\n /* eslint-disable indent */\n`Usage: node generate_full_demo.js [options]\nOptions:\n -h, --help Display this help\n -m, --minify Minify the built demo\n -p, --production-mode Build all files in production mode (less runtime checks, mostly).\n -w, --watch Re-build each time either the demo or library files change`,\n /* eslint-enable indent */\n );\n /* eslint-enable no-console */\n}", "title": "" }, { "docid": "b9748437be93ab148344b91c32499551", "score": "0.54690385", "text": "getHelp() {\n return {\n syntax: `esm test`,\n short: `run the test suite defined by the test command in the module.yml file`,\n description: ``,\n examples: [{\n syntax: `esm test`,\n short: `run the tests`,\n }]\n }\n }", "title": "" }, { "docid": "74e6f1dc405cf0a5b38f6d32faf7b5e4", "score": "0.54688966", "text": "function displayHelpHeader()\n{\n // Construct the header text lines only once.\n if (typeof(displayHelpHeader.headerLines) == \"undefined\")\n {\n displayHelpHeader.headerLines = new Array();\n\n var headerText = EDITOR_PROGRAM_NAME + \" Help \u0001w(\u0001y\"\n + (EDITOR_STYLE == \"DCT\" ? \"DCT\" : \"Ice\")\n + \" mode\u0001w)\";\n var headerTextLen = strip_ctrl(headerText).length;\n\n // Top border\n var headerTextStr = \"\u0001n\u0001h\u0001c\" + UPPER_LEFT_SINGLE;\n for (var i = 0; i < headerTextLen + 2; ++i)\n headerTextStr += HORIZONTAL_SINGLE;\n headerTextStr += UPPER_RIGHT_SINGLE;\n displayHelpHeader.headerLines.push(headerTextStr);\n\n // Middle line: Header text string\n headerTextStr = VERTICAL_SINGLE + \"\u00014\u0001y \" + headerText + \" \u0001n\u0001h\u0001c\"\n + VERTICAL_SINGLE;\n displayHelpHeader.headerLines.push(headerTextStr);\n\n // Lower border\n headerTextStr = LOWER_LEFT_SINGLE;\n for (var i = 0; i < headerTextLen + 2; ++i)\n headerTextStr += HORIZONTAL_SINGLE;\n headerTextStr += LOWER_RIGHT_SINGLE;\n displayHelpHeader.headerLines.push(headerTextStr);\n }\n\n // Print the header strings\n for (var index in displayHelpHeader.headerLines)\n console.center(displayHelpHeader.headerLines[index]);\n}", "title": "" }, { "docid": "32ecdf2019e3afb5edc723d7d7314974", "score": "0.54396325", "text": "function showHelp() {\n console.log(\"\\n Weather CLI\\n\\n Options:\\n -c, --city Set city to look for weather information. Default: Dallas.\\n -e, --export Export weather information as a CSV file called 'weather.csv'.\\n -f, --filename Name for exported file. Only available when export option is set. Default: weather.csv\\n\\n Examples:\\n $ node dist/index.js -c Mexico City\\n $ weather-cli --city Mexico City\\n \");\n}", "title": "" }, { "docid": "26eae26994944295cca6dc555cc26b62", "score": "0.543215", "text": "function getHelpName() {\n document.write(\"help\");\n}", "title": "" }, { "docid": "236ea44c98469f1c7835e4ba2d056fd0", "score": "0.5428149", "text": "function help() {\n return new Promise(function (resolve) {\n resolve({\n commandResult: React__default.createElement(HelpMenu, null),\n });\n });\n}", "title": "" }, { "docid": "f7b92514462d8d8c60dd463e92431d7e", "score": "0.5418009", "text": "_get_help_string(action) {\n let help = action.help;\n if (!action.help.includes(\"%(default)\") && !action.help.includes(\"%(defaultValue)\")) {\n if (action.default !== SUPPRESS) {\n let defaulting_nargs = [OPTIONAL, ZERO_OR_MORE];\n if (action.option_strings.length || defaulting_nargs.includes(action.nargs)) {\n help += \" (default: %(default)s)\";\n }\n }\n }\n return help;\n }", "title": "" }, { "docid": "4701f0566aee1e374a65e151e78862b9", "score": "0.5404876", "text": "function showHelp() {\n var container = $(\"#container\"),\n width = container[0].offsetWidth - 2 * Hanoi.HELP_MARGIN,\n height = container[0].offsetHeight - 2 * Hanoi.HELP_MARGIN;\n\n $(\"#help-dialog\").dialog({\n dialogClass: \"info\",\n title : \"Help\",\n width : width,\n height : height,\n position : [\"middle\", Hanoi.HELP_MARGIN],\n modal : true\n });\n }", "title": "" }, { "docid": "450f68981a00ccf556e7246b3da65f2f", "score": "0.539921", "text": "function btnHelp(){\n updateDisplay (\"The valid moves are North, South, East, West, N, S, E, W.\" +\n \"\\n\\n\" + \"Or use the buttons below\" + \"\\n\" + \"Commands are 'Lets Hike', 'Help', 'Take' and 'Inventory.'\" + \"\\n\" + \"Press 'Lets Hike' to input your directional command.\" + \"\\n\" + \"Press 'Help' for a list of valid commands and inputs.\" + \"\\n\" + \"Press 'Take' to store the item in your inventory.\" + \"\\n\" + \"Press 'Inventory' to see your inventory.\"\n );\n }", "title": "" }, { "docid": "73315f8136ffb9727156279920deec59", "score": "0.53956896", "text": "function open_help() {\n // this flag is used to check whether we are on catalog pages or OP pages\n // because depending on that we will go to the relative location of help directory\n flag=0;\n url = document.URL;\n urlContent = new Array();\n urlContent = url.split(\"/\");\n for (i=0; (i<url.length && flag==0); i++) {\n if (urlContent[i]==\"gems\") flag=1;\n }\n if (typeof(sHelp)==\"undefined\") {\n sHelp = \"hlp1.html\"\n if (flag==0) {\n n = open(cr+\"/apps2/browse/catalog/gems/help/frameset_help.jhtml?sHelp=\"+ sHelp,\"help\",\"width=790,height=600,status=yes,menubar=no,resizable=yes,toolbar=no,scrollable=no\");n.focus();\n }\n else {\n n = open(cr+\"/apps2/browse/catalog/gems/help/frameset_help.jhtml?sHelp=\"+ sHelp,\"help\",\"width=790,height=600,status=yes,menubar=no,resizable=yes,toolbar=no,scrollable=no\");n.focus();\n }\n }\n else {\n if (flag==0) {\n n = open(cr+\"/apps2/browse/catalog/gems/help/frameset_help.jhtml?sHelp=\"+ sHelp,\"help\",\"width=790,height=600,status=yes,menubar=no,resizable=yes,toolbar=no,scrollable=no\");\n }\n else {\n n = open(cr+\"/apps2/browse/catalog/gems/help/frameset_help.jhtml?sHelp=\"+ sHelp,\"help\",\"width=790,height=600,status=yes,menubar=no,resizable=yes,toolbar=no,scrollable=no\");\n }\n n.focus();\n }\n}", "title": "" }, { "docid": "76e4924a95e86274bcda4834816a731c", "score": "0.53934205", "text": "function help(req, res) {\n res.render(\"help\", {\n emergencyNumber: 3334444,\n title: \"help page title\",\n name: \"help page name\",\n });\n}", "title": "" }, { "docid": "1dd8dad66b4e66516e328128a856acce", "score": "0.5392958", "text": "_onHelpTextChange() {\n\n\t}", "title": "" }, { "docid": "59f8b89cf8ccf5e7420174910e9ba691", "score": "0.53923815", "text": "function displayHelp(text) {\n\talert(text);\n}", "title": "" }, { "docid": "3471637ed82f781f5ced35f604212943", "score": "0.5382637", "text": "function theHelp (request,response,pathname){\n\tconsole.log(pathname[4]);\n\tresponse.writeHead(200,{\"Content-Type\":\"text/html\"});\n\tresponse.write(swig.renderFile('./templates/the_help.html',{\n messageId:pathname[4]}));\n\tresponse.end();\n\treturn (\"API handler 'the_help' was called\");\n}", "title": "" }, { "docid": "0e40e3f09c962a2e8366ef76c520cb79", "score": "0.53622836", "text": "showHelp(...groups) {\n this.core.showHelp(...groups);\n }", "title": "" }, { "docid": "29a63e1922694a13b8259fa456683e4d", "score": "0.53597385", "text": "async function help() {\n console.log(\"Usage: \" + bold(\"npx faharmony/cli [param]\"));\n console.log(\n \"where param (case-insensitive) is \" +\n chalk.bold(\"one\") +\n \" of the following:\"\n );\n const green = chalk.green;\n const blue = chalk.blue;\n const tab = \" \";\n for (const p in params) {\n const { param, description, values, usage } = params[p];\n console.log(\"\" + color(param.join(\", \")) + \"\\t\" + description);\n values && console.log(tab + \"param value:\\t\" + blue(values.join(\", \")));\n const usageLine = `npx faharmony/cli ${param[0]} ${usage}`;\n usage && console.log(\"\\t\\t%s\", green(usageLine));\n }\n}", "title": "" }, { "docid": "fc0ad4dfae8df37ed02c9baf854b1bfb", "score": "0.53564876", "text": "function vtlib_field_help_show(basenode, fldname) {\n\tvar domnode = jQuery('#vtlib_fieldhelp_div');\n\n\tif (typeof(fieldhelpinfo) == 'undefined') {\n\t\treturn;\n\t}\n\n\tvar helpcontent = fieldhelpinfo[fldname];\n\tif (typeof(helpcontent) == 'undefined') {\n\t\treturn;\n\t}\n\n\tif (domnode.length==0) {\n\t\tdomnode = document.createElement('div');\n\t\tdomnode.id = 'vtlib_fieldhelp_div';\n\t\tdomnode.className = 'slds-popover slds-popover_tooltip slds-popover__body';\n\t\tdomnode.style.position = 'absolute';\n\t\tdomnode.style.color = 'white';\n\t\tdomnode.style.fontWeight = 'bold';\n\t\tdocument.body.appendChild(domnode);\n\t\tdomnode = jQuery('#vtlib_fieldhelp_div');\n\t\tdomnode.on('mouseenter', function () {\n\t\t\tjQuery(this).show();\n\t\t});\n\t\tdomnode.on('mouseleave', vtlib_field_help_hide);\n\t} else {\n\t\tdomnode.show();\n\t}\n\tdomnode.html(helpcontent);\n\tfnvshobj(basenode, 'vtlib_fieldhelp_div');\n}", "title": "" }, { "docid": "93aedb82a04de59f8761f50e171db845", "score": "0.53550315", "text": "mapUserGuide() {\n const helpItems = this.props.terria.configParameters.helpContent;\n const mapUserGuideItem = helpItems?.find(\n ({ itemName }) => itemName === \"mapuserguide\"\n );\n if (!mapUserGuideItem) {\n return undefined;\n }\n const title = applyTranslationIfExists(\n mapUserGuideItem.title,\n this.props.i18n\n );\n return {\n href: mapUserGuideItem.url,\n caption: title,\n onClick: () => {\n this.props.terria.analytics?.logEvent(\n Category.help,\n HelpAction.itemSelected,\n title\n );\n }\n };\n }", "title": "" }, { "docid": "65d3f569ddd3a9a587a0157a53414e86", "score": "0.5348607", "text": "getHelpInfo() {\n const parent = d3.select(this.toolbarButton.node().parentNode);\n let primaryGrpBtnId = null;\n const expansionItem = parent.classed('toolbar-group-expandable');\n\n if (expansionItem) {\n const grandparent = d3.select(parent.node().parentNode);\n primaryGrpBtnId = grandparent.select(':first-child').attr('id');\n }\n\n return {\n 'id': this.id.replace('#', ''),\n 'desc': this.help ? this.help : this.tooltips[0],\n 'bbox': this.toolbarButton.node().getBoundingClientRect(),\n 'expansionItem': expansionItem,\n 'primaryGrpBtnId': primaryGrpBtnId\n };\n }", "title": "" }, { "docid": "524551c46d9fbd5b9fac08849aeb545e", "score": "0.53459847", "text": "helpInfo () {\n\t\tlet me = this;\n\n\t\treturn [\n\t\t\t$('<h3>').append(\n\t\t\t\tt('Listar antecedentes')\n\t\t\t),\n\t\t\t$('<p>').append(\n\t\t\t\tt('Para ver os detalhes de uma antecedente, clique no nome do antecedente')\n\t\t\t),\n\t\t\t$('<p>').append(\n\t\t\t\tsprintf(t('Para editar uma antecedente, clique em %s'), Background.EMOJI_VISUALIZE)\n\t\t\t),\n\t\t\t$('<p>').append(\n\t\t\t\tt('A primeira vez que se entra na listagem das antecedentes da aventura, se não houver nenhum antecedente cadastrado, o sistema roda um setup e insere todos os antecedentes globais para facilitar. Os antecedentes globais são sugestões de antecedentes pré cadastrados. Esses antecedentes globais podem ser visualizados no menu <b>Acessórios > Listar Antecedentes</b>')\n\t\t\t),\n\t\t\t$('<p>').append(\n\t\t\t\t'<b>' + t('Legendas') + ':</b>'\n\t\t\t),\n\t\t\t$('<ul>').append(\n\t\t\t\t$('<li>').append(\n\t\t\t\t\tsprintf(t('<b>%s Nome:</b> Nome dessa antecedente'), Background.EMOJI_NAME)\n\t\t\t\t)\n\t\t\t)\n\t\t];\n\t}", "title": "" }, { "docid": "c97eddc48f4f897dcb886301655de2fc", "score": "0.5338334", "text": "toggle_help(help = false)\n\t{\n\t\tif (help == true) {\n\t\t\t$(\"#help\").hide();\n\t\t\t$(\"#no_help\").fadeIn(\"slow\");\n\t\t\tif (jQuery(\"#start_page\").css('display') != 'none' && jQuery(\"#start_page\").css(\"visibility\") != \"hidden\") {\n\t\t\t\t$(\"#start_help\").fadeIn(\"slow\");\n\t\t\t} else if (jQuery(\"#page_edit\").css('display') != 'none' && jQuery(\"#page_edit\").css(\"visibility\") != \"hidden\") {\n\t\t\t\t$(\"#edit_help\").fadeIn(\"slow\");\n\t\t\t} else if (jQuery(\"#page_perso\").css('display') != 'none' && jQuery(\"#page_perso\").css(\"visibility\") != \"hidden\") {\n\t\t\t\t$(\"#perso_help\").fadeIn(\"slow\");\n\t\t\t}\n\t\t} else {\n\t\t\t$(\"#help\").fadeIn(\"slow\");\n\t\t\t$(\"#no_help\").hide();\n\t\t\t$(\".help_content\").hide();\n\t\t}\n\t}", "title": "" } ]
2d6f9cc67eb5ecf426c5826326654b61
The call to twist Bob's cube H^b1 times. For the final twisting sequence, Bob needs to apply G^0 H^b1 to his original cube. Afterwards, the carousel is set to advanced to final, congratulatory tooltip.
[ { "docid": "f25b661d7c784a69341a99a5d081e3a1", "score": "0.6924104", "text": "function bobActionLinkC() {\n\tdualAnimSwitchNaive();\t//Animation pausing on the cubes is toggled\n\ttwistG(cube2, 0, secrets[3], weighSeq(0, secrets[3]), done);\n\t$('#carouselCube').carousel(\"next\");\t//The tooltip carousel is iterated\n}", "title": "" } ]
[ { "docid": "362ab14f0386b26500b8aa7baafce0dc", "score": "0.66627973", "text": "function bobActionLinkB() {\n\tdualAnimSwitchNaive();\t//Animation pausing on the cubes is toggled\n\ttwistG(cube1, secrets[2], secrets[3], weighSeq(secrets[2], secrets[3]), cubeFadeOut, aliceActionLinkC);\n\t$('#carouselCube').carousel(\"next\");\t//The tooltip carousel is iterated\n}", "title": "" }, { "docid": "7a38849af5e47415bbca66918e558ced", "score": "0.66248375", "text": "function aliceActionLinkC() {\n\ttwistG(cube1, 0, secrets[1], weighSeq(0, secrets[1]), bobActionLinkC);\n\t$('#carouselCube').carousel(\"next\");\t//The tooltip carousel is iterated\n}", "title": "" }, { "docid": "3b9fead689f8c73f2deb67e7f894467e", "score": "0.65580505", "text": "function bobActionLinkA() {\n\tdualAnimSwitchNaive();\t//Animation pausing on the cubes is toggled\n\ttwistG(cube2, secrets[2], 0, weighSeq(secrets[2], 0), cubeFadeOut, aliceActionLinkB); //Call for a G^b0 * H^0 twist on Bob's cube, running into the cube swapping functions and then into the next link\n\t$('#carouselCube').carousel(\"next\"); \t//The tooltip carousel is iterated\n}", "title": "" }, { "docid": "749c90fd3c15ee14f2727a6a48c5e1d4", "score": "0.649809", "text": "function aliceActionLinkB() {\n\ttwistG(cube2, secrets[0], secrets[1], weighSeq(secrets[0], secrets[1]), bobActionLinkB);\n\t$('#carouselCube').carousel(\"next\");\t//The tooltip carousel is iterated\n}", "title": "" }, { "docid": "31f3d27420d3fe55e639eed53fe4bf1c", "score": "0.60186803", "text": "function aliceActionLinkA() {\n\t//Sequence tracking tables are initialized to blank\n\tdocument.getElementById(\"cube1Table\").innerHTML = \"\";\n\tdocument.getElementById(\"cube2Table\").innerHTML = \"\";\n\t\n\ttwistG(cube1, secrets[0], 0, weighSeq(secrets[0], 0), bobActionLinkA);\t//Call to twist Alice's cube G^a0 * H^0, running into the next link afterwards\n\t$('#carouselCube').carousel(\"next\");\t//The tooltip carousel is iterated\n}", "title": "" }, { "docid": "53095db62e3e7e3a44cb19ff654d917b", "score": "0.5938203", "text": "function done() {\n\t$('#carouselCube').carousel(\"next\");\t//The tooltip carousel is iterated\n}", "title": "" }, { "docid": "6068d8e84380671f2db071b58482a180", "score": "0.5692324", "text": "function augmenterMultiplicateur(){\r\n multiplicateur = multiplicateur + 1;\r\n score = score - cout;\r\n\r\n //double le cout du multiplicateur//\r\n cout = cout *2;\r\n 'affichage'.innerText = score;\r\n}", "title": "" }, { "docid": "ddcccd57a37040f25caac37b0799513f", "score": "0.56138295", "text": "decomposeSwingTimesTwist(v1, qSwing, qTwist) {\n // var v2 = this.rotate(v1);\n // qSwing = this.align(v1, v2);\n // qTwist = qSwing.conjugate().multiply(this); \n }", "title": "" }, { "docid": "f72d5cc334c8af4e8eaea006f11462e7", "score": "0.5415863", "text": "decomposeTwistTimesSwing(v1, qTwist, qSwing) {\n // var v2 = this.rotate(v1);\n // qSwing = this.align(v1, v2);\n // qTwist = this.multiply(qSwing.conjugate());\n }", "title": "" }, { "docid": "6782175e13237e5ef8fcbf42e3918401", "score": "0.5402858", "text": "function addAnother() {console.log(\"things getting harder\")\n\t\t\t\t\t\t\t\t\t\t\t stepCounter = 0; Limit ++; // it adds a note to the sequence to repeat\n\t\t\t\t\t\t\t\t\t\t\t thePlayerSequence = []; // it resets the sequence to repeat to zero \n\t\t\t\t\t\t\t\t\t\t\t displayVar(); // check html\n\t\t\t\t\t\t\t\t\t\t\t tryToFollowMe(); // calls try to follow me function\n\t\t\t\t\t\t\t\t\t\t\t }", "title": "" }, { "docid": "b56ed4886feb26689d6cf093ac95f5b8", "score": "0.53643686", "text": "function tutorial() {\n\t$('#joyRideTipContent').joyride({\n\t\t autoStart : true,\n\t\t postStepCallback : function (index, tip) {\n\t\t\t if (index == -2) {\n\t\t\t $(this).joyride('set_li', false, 1);\n\t\t\t }\n\t\t },\n\t\t modal:true,\n\t\t expose: true\n\t});\n}", "title": "" }, { "docid": "165652cd2fff0378441c7d7eb4537d69", "score": "0.5304351", "text": "hikesExtraAnim(){\n gsap.from('.hike-h1', {opacity:0, y:-50, ease: \"power1\", duration: 0.6})\n gsap.from('.filter-menu div', {opacity:0, y:50, ease: \"power1\", duration: 0.6}, \"-=1\")\n gsap.from('.clear-fltr', {opacity:0, y:50, ease: \"power1\", duration: 0.6}, \"-=1\")\n gsap.from('.hike-card', {opacity:0, y:-60, ease: \"slow\", duration: 1, stagger: 0.5})\n }", "title": "" }, { "docid": "5bcf1034d55cb77624df14300bfe647c", "score": "0.5295829", "text": "function GShomeSliderCaption() {\n var $thisCaption = $('.active .gs-home-slider-item').children('.gs-home-slider-caption');\n\n $thisCaption.each(function() {\n var delayTime = $(this).index() * 1500 + 600;\n $(this).css('animation', 'fadeInUp 500ms ' + delayTime + 'ms forwards');\n\n });\n }", "title": "" }, { "docid": "1b17f2391178be817310af5965d25980", "score": "0.52693784", "text": "function showHint() {\n document.getElementById(\"H\").style.display = \"inline-block\";\n document.getElementById(\"H\").innerHTML = (listOfQuestions[random])[2];\n }", "title": "" }, { "docid": "ef4179ebeef7a5b9409c108fa6645a82", "score": "0.52676344", "text": "function showNextClue()\n\t\t{\n\t\tsettingsData.current.clueNo++;\n\t\tif (settingsData.current.clueNo >= CLUES)\n\t\t\t{\n\t\t\tsettingsData.current.questionNo++;\n\n\t\t\tif (currentQuestionIsBonus)\n\t\t\t\t{\n\t\t\t\tvar newScore = parseInt($score.text(), 10);\n\n\t\t\t\t// add up all bonus scores\n\t\t\t\tfor (var i = 0; i < settingsData.current.pendingBonus.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\tnewScore += settingsData.current.pendingBonus[i];\n\t\t\t\t\t}\n\n\t\t\t\t// show message indicating points earned in bonus round\n\t\t\t\t$message.text('You have earned ' + (newScore - parseInt($score.text(), 10)) + ' bonus pts!');\n\t\t\t\t$message.addClass('fadeInOutSlow');\n\n\t\t\t\tsetTimeout(function()\n\t\t\t\t\t{\n\t\t\t\t\t$message.removeClass('fadeInOutSlow');\n\n\t\t\t\t\t// reset pending bonuses\n\t\t\t\t\tsettingsData.current.pendingBonus.length = 0;\n\t\t\t\t\tsettingsData.current.score = newScore;\n\t\t\t\t\tcountUp(newScore, showNextQuestion);\n\t\t\t\t\t}, WAIT_FOR_MESSAGE);\n\n\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\tshowNextQuestion();\n\t\t\treturn;\n\t\t\t}\n\n clearBonusLetters();\n\t\tresetGuess();\n\t\tsaveSettings();\n\t\tGAME.sound.play('ding');\n\t\tshowClue();\n\n\t\tif (currentQuestionIsBonus)\n\t\t\t{\n\t\t\tshowBonusButtons();\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tadjustWorth(-CLUE_REDUCTION);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "50850d00088f36bb51bc6ea984599b49", "score": "0.5249563", "text": "function subscribe() {\n if (annyang) {\n let subscribe = {\n 'I subscribed': function() {\n console.log('THANK YOU FOR SUBSCRIBING WOW');\n\n //after saying \"I subscribed\", all spawned elements get animated back to the top of the screen\n let randomSpeed = (Math.random() * 2500)+500;\n let distToBottom = window.innerHeight+50;\n $('.credit').animate({top:\"-=\"+distToBottom}, randomSpeed);\n $('#tyrant').css(\"opacity\", \"1\");\n\n // $('.credit').remove();\n }\n };\n annyang.addCommands(subscribe);\n annyang.start();\n }\n\n\n}", "title": "" }, { "docid": "0d58595cde67f56e1414821a6ad51aef", "score": "0.5249519", "text": "function looper() {\n addX += mouseX;\n TweenMax.to( carousel, 1, { rotationY:addX, rotationX:mouseY, ease:Quint.easeOut } );\n //TweenMax.set( carousel, {z:mouseZ } );\n //output.innerHTML = addX +'-'+ radius;\n}", "title": "" }, { "docid": "79cc06ce0254147cdcd713c3988afdc6", "score": "0.52157587", "text": "function outcomeReveal() {\n var fontSize;\n if (i < 100) {\n ctx.save();\n ctx.fillStyle = \"dodgerblue\";\n ctx.fillRect(0, 0, 350, 350);\n ctx.globalCompositeOperation = \"xor\";\n fontSize = 154 - i;\n ctx.font = \"\" + fontSize + \"pt Verdana\";\n ctx.fillText(str, -50 + i, 360 - i);\n ctx.restore();\n }\n i++;\n if (i < 150) {\n requestAnimationFrame(outcomeReveal);\n } else {\n c.width = c.width;\n coverBoardRemoved = true;\n textCover();\n }\n }", "title": "" }, { "docid": "ed4ba550cccfeb4a38d3329a8844c86b", "score": "0.5209204", "text": "function squarex1y1(){\n if(x1y1count < 1){\n TweenMax.to(x1y1,{duration:.1, alpha:.5})\n console.log(\"h\");\n }\n x1y1count++;\n console.log(x1y1count);\n}", "title": "" }, { "docid": "359a2c1debc600851ca8cbcecaf06a59", "score": "0.5207385", "text": "function generateHints() {\n //generate two random numbers to get an index from existing questionsClone objects\n let x = Math.floor(Math.random()* questionsClone.length);\n let y = Math.floor(Math.random()* questionsClone.length);\n\n while (x === y) {\n x = Math.floor(Math.random()* questionsClone.length);\n }\n\n //saving 2 question objects from questionsClone as the 2 current display questions\n questionOne = questionsClone[x];\n questionTwo = questionsClone[y];\n}", "title": "" }, { "docid": "1ab944796ea825891f67069f63c1387c", "score": "0.51935107", "text": "function golScored(elemento){\n $(elemento)\n .animate(\n {\n top: \"400px\",\n },{\n step: function(now, fx){\n $(this).css(\"transform\",\"rotate(\"+now*2+\"deg)\")\n },\n duration: 1000,\n complete: function() {\n $(\"h1\").fadeIn(1000, function(){\n $(this)\n .css(\"color\",\"green\")\n })\n }\n }\n )\n\n}", "title": "" }, { "docid": "852ecabab0b0c24d8f8e490fa15c7cd9", "score": "0.5192332", "text": "function science(){\n var liquidOrange = $('#liquidOrange'),\n liquidBlue = $('#liquidblue'),\n drop = $('#drop'),\n pops = $('#pops circle'),\n tube = $('#tube'),\n boile = $('#boile circle');\n \n var master = new TimelineMax();\n master\n .add(animationA())\n .add(animationB());\n \n function animationA(){\n var tl1 = new TimelineMax();\n tl1\n .to(liquidOrange, 1.5, {x:'+=135', y:'-=200', ease: Power0.easeNone})\n .to(tube, 3, {strokeDashoffset:0 , ease: Sine.easeOut})\n .to(drop, 1.1, {scale:'+=2',y:195 , ease: Expo.easeIn, onComplete: function(){\n tl1.set(drop,{css:{display:'none'}});\n }},'-=.2')\n .to(liquidBlue,.2,{css:{fill:'#00FF1E'}})\n return tl1;\n }\n \n function animationB(){\n var tl1 = new TimelineMax({repeat:-1});\n tl1\n .staggerTo(pops,.5, { opacity:0,scale:'-=.7',y:-130 , ease: Power0.easeNone},.4,0)\n .staggerFromTo(boile,.5, { opacity:0, ease: Power0.easeNone }, { opacity:1,scale:0,y:'-=60' , ease: Power0.easeNone},.1,0);\n \n \n return tl1;\n }\n \n return master;\n }", "title": "" }, { "docid": "a90322bf3146d38939c3d4ea1153ee3e", "score": "0.5183629", "text": "function run(){\n\t\t\tn++; \n\t\t\t// 变量n进行限定\n\t\t\tif(n>=aLii.length){\n\t\t\t\tn=0;\t\n\t\t\t}\t\t\t\n\t\t\tfor(var i=0;i<aLii.length;i++){\n\t\t\t\taLii[i].className=\"\";\n\t\t\t\toPic[i].style.display=\"none\";\n\t\t\t}\t\t\t\n\t\t\t// 让索引为n的li增加ac\n\t\t\taLii[n].className=\"tips\";\n\t\t\toPic[n].style.display=\"block\";\t\n\t\t}", "title": "" }, { "docid": "d5f0850e1001f2db32d09e64eddd0985", "score": "0.5170236", "text": "bumpedAgain() {\n if (this.bumpInProgress)\n return;\n if (( ! this.coinInProgress) && (this.coinCount > 0)){\n this.coinCount -= 1;\n this.coinInProgress = true;\n let coin = this.worldManager.spawnEffectSprite(\n this.worldPosition.x, this.worldPosition.y-1, LITE_TUX_SPRITE_INFO.BLOCK_COIN);\n coin.sequenceDoneCallback = this;\n this.worldManager.earnPoints(10);\n this.worldManager.playSound(LITE_TUX_SOUND_IDS.COIN);\n console.log(`coin animatiion ${coin.id} should be visible`);\n }\n this.cur_frame = 0;\n this.currentSequenceFrame = 0;\n this.setVisible(true);\n this.bumpInProgress = true;\n }", "title": "" }, { "docid": "e72be324f43a7c40cf544a1e9b2350fc", "score": "0.5145665", "text": "function wheel_bearings_greased(){/*...*/}", "title": "" }, { "docid": "336e1ee619b1b0555f8e88d5f8633a80", "score": "0.5131657", "text": "_setIntro() {\n for (var i = 0; i < 6; i++) {\n for (var j = 0; j < 6; j++) {\n this.ctx.fillStyle = 'rgb(' + Math.floor(255 - 42.5 * i) + ',' +\n Math.floor(255 - 42.5 * j) + ',' + Math.floor(255 - 42.5 * i) + ')';\n this.ctx.fillRect(j * (this.height * 0.10), i * (this.height * 0.05), this.width, this.height);\n }\n }\n }", "title": "" }, { "docid": "e7dea797a5538b0e109ae5c341308194", "score": "0.51260287", "text": "displayNextStep(){\n this.stepsToDisplay++;\n this.display();\n }", "title": "" }, { "docid": "8972c7479b9b8412b657c72dae28d4ef", "score": "0.5125377", "text": "lit() {\n let d = dist(pin.tip.x, pin.tip.y, this.x, this.y);\n if (d < this.size / 2) {\n this.activeColor = true;\n // adds a score\n this.addingScore();\n // Plays a igniting sound effect\n if (!igniteSFX.isPlaying()) {\n bgSFX.setVolume(0.5);\n igniteSFX.play();\n }\n }\n }", "title": "" }, { "docid": "10288e5887edb9487f5f7b5c8a833def", "score": "0.51242465", "text": "function cubeBksp() {\n\tinput1 = input1.slice(0, -1);\t//Last twist of the input sequence is sliced off\n\tconsole.log(input1);\t\t\t//New sequence is printed to the console for debug\n\t\n\tif (len == 1) toggleLowerLimitKeys();\t\t\t\t//Lower limit keys are toggled if the length is decreasing to zero\n\telse if (len == SEQ_LIM) toggleUpperLimitKeys();\t//Upper limit keys are toggled if the length is decreasing from SEQ_LIM\n\tlen--\t\t\t\t\t\t\t\t\t\t\t\t//The length tracker decrements\n\t\n\tif (len == 0) {\t//If the length decreases to zero the H and G preview fields change to an input print\n\t\tif (confirmHHandler) document.getElementById(\"Hvalue\").innerHTML = \"select move set H\";\t//H field is updated only if it has not been submitted\n\t\tif (confirmGHandler) document.getElementById(\"Gvalue\").innerHTML = \"select move set G\";\t//^ for G\n\t}\n\telse {\t//Otherwise the fields are updated with the new input sequence formatted\n\t\tif (confirmHHandler) document.getElementById(\"Hvalue\").innerHTML = twistsToString(input1);\t//H field only updates if it has not been submitted\n\t\tif (confirmGHandler) document.getElementById(\"Gvalue\").innerHTML = twistsToString(input1);\t//^ for G\n\t}\n\t\n}", "title": "" }, { "docid": "4c728ccca929b36312147c9f04234b72", "score": "0.5118061", "text": "function advancedExamples(){\n\tLeanTween.delayedCall(gameObject, 14f, function(){\n\t\tfor(var i:int=0; i < 10; i++){\n\t\t\t// Instantiate Container\n\t\t\tvar rotator:GameObject = new GameObject(\"rotator\"+i);\n\t\t\trotator.transform.position = new Vector3(2.71208f,7.100643f,-12.37754f);\n\n\t\t\t// Instantiate Avatar\n\t\t\tvar dude:GameObject = createSpriteDude( \"dude\"+i, new Vector3(-2.51208f,7.100643f,-14.37754f), false);//(GameObject)GameObject.Instantiate(prefabAvatar, Vector3.zero, prefabAvatar.transform.rotation );\n\t\t\tdude.transform.parent = rotator.transform;\n\t\t\tdude.transform.localPosition = new Vector3(0f,0.5f,0.5f*i);\n\n\t\t\t// Scale, pop-in\n\t\t\tdude.transform.localScale = new Vector3(0f,0f,0f);\n\t\t\tLeanTween.scale(dude, new Vector3(0.65f,0.65f,0.65f), 1f).setDelay(i*0.2f).setEase(LeanTweenType.easeOutBack);\n\n\t\t\t// Color like the rainbow\n\t\t\tvar period:float = LeanTween.tau/10*i;\n\t\t\tvar red:float = Mathf.Sin(period + LeanTween.tau*0f/3f) * 0.5f + 0.5f;\n \t\t\tvar green:float = Mathf.Sin(period + LeanTween.tau*1f/3f) * 0.5f + 0.5f;\n \t\t\tvar blue:float = Mathf.Sin(period + LeanTween.tau*2f/3f) * 0.5f + 0.5f;\n\t\t\tvar rainbowColor:Color = new Color(red, green, blue);\n\t\t\tLeanTween.color(dude, rainbowColor, 0.3f).setDelay(1.2f + i*0.4f);\n\t\t\t\n\t\t\t// Push into the wheel\n\t\t\tLeanTween.moveLocalZ(dude, -2f, 0.3f).setDelay(1.2f + i*0.4f).setEase(LeanTweenType.easeSpring).setOnComplete(\n\t\t\t\tfunction( rot:GameObject ){\n\t\t\t\t\tLeanTween.rotateAround(rot, Vector3.forward, -1080f, 12f);\n\t\t\t\t}\n\t\t\t).setOnCompleteParam( rotator );\n\n\t\t\t// Jump Up and back down\n\t\t\tLeanTween.moveLocalY(dude,1.17f,1.2f).setDelay(5f + i*0.2f).setLoopPingPong(1).setEase(LeanTweenType.easeInOutQuad);\n\t\t\n\t\t\t// Alpha Out, and destroy\n\t\t\tLeanTween.alpha(dude, 0f, 0.6f).setDelay(9.2f + i*0.4f).setDestroyOnComplete(true).setOnComplete(\n\t\t\t\tfunction(rot:GameObject){\n\t\t\t\t\tDestroy( rot ); // destroying parent as well\n\t\t\t\t}\n\t\t\t).setOnCompleteParam( rotator );;\t\n\t\t}\n\n\t}).setOnCompleteOnStart(true).setRepeat(-1); // Have the OnComplete play in the beginning and have the whole group repeat endlessly\n}", "title": "" }, { "docid": "2d687bb198fc3d1aba999e2ba1e27f50", "score": "0.5100748", "text": "function giveHint() {\n let outputArray = output.split(\"\");\n for (let i = 0; i < outputArray.length; i++) {\n if (i % 2 > 0) {\n outputArray.splice(i, 1, \"*\");\n }\n }\n answerBox.innerHTML = outputArray.join(\"\");\n answerBox.classList.add(\"hinted\");\n}", "title": "" }, { "docid": "2898af3f7c84d3319865e58a217bc4b1", "score": "0.5086709", "text": "function scaffold(){\n\tif(helpable==false) return;\n\t\n\thelpable=false;\n\n\ta1.show();\n\ta2.show();\n\ta3.show();\n\ta4.show();\n\ta5.show();\n\t\n\ta0.deactivate();\n\ta1.activate();\n\t\n\tnAttempts = 0;\n\twindow.scrollTo(0,0);\n\tlogScaffold(\"oli_stoich_ars_mixt\");\n}", "title": "" }, { "docid": "b971f0f5b97882c6db9e99c6ee4f6db1", "score": "0.50858897", "text": "function showBonusClue(clue)\n\t\t{\n\t\t$answerLength.text(clue.length);\n\t\tremoveAllChildren($guess[0]);\n\t\tguessedWord = '';\n\t\t$guess.html(showBlanks(clue));\n\t\t}", "title": "" }, { "docid": "5fb536cf5952dbf48bd328f5137ba070", "score": "0.5084281", "text": "function showClue()\n\t\t{\n\t\t$clueCover[0].className = 'clueCover clue' + (parseInt(settingsData.current.clueNo, 10) + 1);\n\t\tif (settingsData.current.clueNo === CLUES)\n\t\t\t{\n\t\t\t$cluesLeft.text('');\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t$cluesLeft.text(CLUES - settingsData.current.clueNo - 1);\n\t\t\t}\n\n\t\t// if the clue is the last clue\n\t\tif (settingsData.current.clueNo + 1 >= CLUES)\n\t\t\t{\n\t\t\t$lifeSaver.removeClass('dim');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c7a0ef2c86357bc372e0367440d0db40", "score": "0.50840145", "text": "function addAnother() {console.log(\"things getting harder\")\n\t\t\t\t\t\t\t stepCounter = 0; Limit ++;\n\t\t\t\t\t\t\t thePlayerSequence = [];\n\t\t\t\t\t\t\t displayVar();\n\t\t\t\t\t\t\t tryToFollowMe();\n\t\t\t\t\t\t\t }", "title": "" }, { "docid": "9acde3e72bc0263a50e54a492498f494", "score": "0.5083482", "text": "function hanzidisplaysteps(item,index) {\n var size = 100;\n demoP = document.getElementById(\"hanzisteps\");\n url = \"https://dictionary.writtenchinese.com/giffile.action?&localfile=true&fileName=\" + item + \".gif\";\n fullurl = \"<img src=\\\"\" + url + \"\\\" height=\\\"\"+size+\"px\\\">\"\n demoP.innerHTML += fullurl;\n}", "title": "" }, { "docid": "d14941939762e4aca78e6f01672c84c5", "score": "0.5076849", "text": "function questionCorrectDisplay() {\n\t\tvar delay2 = setTimeout(function() {\n questionGen();\n\t\t setFontColorReset();\n\t\t \n }, 2000);\n\t\tcountdown = 31;\n\t}", "title": "" }, { "docid": "d9bf9e5c5fff26ef160bd5b323947059", "score": "0.5073964", "text": "function nextTextDisplay(){\r\n\r\n\trightBitmap.alpha=0;\r\n\twrongBitmap.alpha=0;\r\n\t\r\n\t\r\n\tstage.update();\r\n\t\r\n\t\r\n\tif(createdTime!=0&&clickedTime!=0){\r\n\t\t\treactionTime+=(clickedTime-createdTime)/1000;\t\t\r\n\t}\r\n\t\r\n\tcreatedTime=Date.now(); // SET TIME FOR SHOWING NEW TIMER\r\n\t\r\n\t//alert(tutorialResponse);\r\n\tif(tutorialResponse==false){\r\n\t\trightWord=radomNumber[Math.floor(Math.random() * radomNumber.length)]; // right Text\r\n\t}\r\n\t\r\n\t\r\n\tif(setTutorial==false){\r\n\t\t\r\n\t\tleftWord=radomNumber[Math.floor(Math.random() * radomNumber.length)]; // left Text\r\n\t\trandomColor=radomNumber[Math.floor(Math.random() * radomNumber.length)]; // random right color\r\n\t\t\r\n\t}else{ // for tutorial\r\n\t\t\r\n\t\tif(tutorialResponse==false){\r\n\r\n\t\t\tif(tutorialCorrect<5){\r\n\t\t\t\t\r\n\t\t\t\tleftWord = tutorialRandomNumber[totalQuestion];\r\n\t\t\t\trandomColor = helpRandomNumber[totalQuestion]; // for tutorial, first five only \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(leftWord==randomColor){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(\".text-blink\").each(function(){\r\n\t\t\t\t\t\tif($(this).data(\"ref\")==\"right\"){\r\n\t\t\t\t\t\t\t$(this).html(\"Press the RIGHT ARROW key\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$(this).html(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$(\".tutorial-indicator\").each(function(){\r\n\t\t\t\t\t\tif($(this).data(\"ref\")==\"right\"){\r\n\t\t\t\t\t\t\t$(this).addClass(\"active\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$(this).removeClass(\"active\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$(\".text-blink\").each(function(){\r\n\t\t\t\t\t\tif($(this).data(\"ref\")==\"left\"){\r\n\t\t\t\t\t\t\t$(this).html(\"Press the LEFT ARROW key\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$(this).html(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$(\".tutorial-indicator\").each(function(){\r\n\t\t\t\t\t\tif($(this).data(\"ref\")==\"left\"){\r\n\t\t\t\t\t\t\t$(this).addClass(\"active\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$(this).removeClass(\"active\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t}else if(tutorialAnswer==6){\r\n\t\t\t\t\r\n\t\t\t\t\t$(\"#help-bottom-indicator\").addClass(\"hide\");\r\n\t\t\t\t\tcongratulationMessage();\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tleftWord = radomNumber[Math.floor(Math.random() * radomNumber.length)]; // left Text\r\n\t\t\t\trandomColor = radomNumber[Math.floor(Math.random() * radomNumber.length)]; // random right color\r\n\t\t\t\t\r\n\t\t\t\t$(\".tutorial-indicator\").each(function(){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($(this).data(\"ref\")!=\"bottom\"){\r\n\t\t\t\t\t\t$(this).addClass(\"active\");\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\t$(\".text-blink\").each(function(){\r\n\t\t\t\t\t$(this).html(\"\");\r\n\t\t\t\t});\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t//alert(\"left word::\"+leftWord);\r\n\r\n\t}\r\n\t\r\n\t\r\n\tleftText.text = leftWord;\t\r\n\t\r\n\tif(setTutorial==false){\r\n\t\t\r\n\t\trightText.text = rightWord; \r\n\t\trightText.color=colorNumber[randomColor];\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\t}else{\r\n\t\r\n\t\t\tif(tutorialCorrect<5){\r\n\t\t\t\trightText.text = rightWord; \r\n\t\t\t\trightText.color=colorNumber[randomColor];\r\n\t\t\t\t//tutorialAnswerShape.graphics.beginFill(colorNumber[randomColor]).drawRoundRect(0,0,250,100,5);\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t// if(tutorialCorrect==5){\r\n\t\t\t\t//\ttutorialAnswerShape.graphics.clear();\r\n\t\t\t\t// }\r\n\t\t\t\tguideLineTop.text=\"Does the meaning of the left word match the color on the right ?\";\r\n\t\t\t\tstage.update();\r\n\t\t\t\tif(tutorialResponse==false){\r\n\t\t\t\t\trightText.text = rightWord;\r\n\t\t\t\t\trightText.color=colorNumber[randomColor];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t}\r\n\tstage.update();\r\n\r\n\tif($(\"#paused-div\").hasClass(\"game-pause\")){\r\n\t\t\t\r\n\t\tkeyBoardHandlervariable=false;\r\n\t\tkeyPress=false;\t\r\n\t\r\n\t}else{\r\n\t\t\r\n\t\tkeyBoardHandlervariable=true;\r\n\t\tkeyPress=true;\r\n\t}\r\n}", "title": "" }, { "docid": "d383bc6c6403095209d45e2f4abae961", "score": "0.50692856", "text": "function displayName() {\n\n document.getElementById(\"results\").textContent = \"Puzzle 1: Announcements - lecturers release updates about their module!\"\n\n}", "title": "" }, { "docid": "865402d8d1a0de0ced6aee464edc30e7", "score": "0.506734", "text": "function displayNext() {\n currentQuestion++;\n console.log(\"# \" + currentQuestion);\n generateQnA();\n}", "title": "" }, { "docid": "7f03fa1a206f5541a29e5fcd130d00ac", "score": "0.5066308", "text": "function blinger() {\n\n function animate() {\n $bling.show().animate({'opacity': '0', 'top': \"19rem\"}, 500,\n function() {\n $(this).hide();\n $bling.css('top', '25.125rem');\n $bling.css('opacity', '1');\n }\n )\n }\n\n if (test) {\n\n $bling.text('+' + time);\n $bling.css('color', 'rgba(142, 210, 255, 1)');\n $question.remove();\n $input.val('');\n points += time;\n\n animate();\n \n\n } else {\n\n $bling.text('-2');\n $bling.css('color', 'rgba(121, 36, 5, 1)');\n points -= 2;\n\n animate();\n }\n\n counterAdj();\n\n }", "title": "" }, { "docid": "d78732c65a79120e42c460e56a9280a5", "score": "0.50616485", "text": "function rndChange() {\n round.innerText = \"Round \" + level;\n level++; //increase the level\n addCompColor(); // ~This adds new color added to compArray~\n flash(); // call function to show sequence compiled to player\n}", "title": "" }, { "docid": "f6f8bd7a91fc84032d440fc56cf8eaf9", "score": "0.5047807", "text": "function DEMO1() {\n\t\t\n\t\t//U_show_narrative_extended(\"You are watching a DEMO\");\t\t\t\n\t\t\n\t\t/*\n\t\tC_prepare_and_place_plate('HSP96','P1','A0',null,{\"columnShownTo\": 2});\n\t\tC_move_labware('P1','A5');\n\t\tC_move_head('A5');\n\t\tC_move_labware('P1','D4');\n\t\tC_move_head('D4');\n\t\tC_move_labware('P1','D0');\n\t\tC_move_head('D0');\n\t\t\n\t\t//C_pipette('D4','P1',3,1,'LiquidClassYellow',-0.9);\t\t\t\t\t\n\t\t\n\t\t\n\t\tC_prepare_and_place_plate('HSP96','P3','3',\n\t\t\t\t\t[{column:'1',liquidClass: 'LiquidClassRed',relativeVolume:0.9}],\n\t\t\t\t\t{\"columnShownTo\": 2});\n\t\t\n\t\tC_prepare_and_place_plate('HSP96','P5','5',null,\n\t\t\t\t\t{\"columnShownTo\": 2});\n\t\tC_prepare_and_place_tip_box('TIPBOX1','T25',1);\n\t\tC_load_tips('TIPBOX1','T25',1,2);\t\t\t\n\t\tC_pipette('3','P3',1,2,'LiquidClassRed',0.9);\n\t\tC_pipette('5','P5',1,1,'LiquidClassRed',-0.3);\n\t\tC_pipette('5','P5',1,2,'LiquidClassRed',-0.3);\n\t\tC_pipette('5','P5',1,3,'LiquidClassRed',-0.3);\t\t\n\t\tC_discard_tips\t(\"X\");\n\t\t\n\t\t*/\n\t\tC_prepare_and_place_tip_box('TIPBOX1','C3',1);\t\t\n\t\tC_prepare_and_place_plate('HSP96','P2','D4',\n\t\t\t\t\t[{column:'1',liquidClass: 'LiquidClassRed',relativeVolume:0.9}],\n\t\t\t\t\t{\"columnShownTo\": 5});\n\t\tC_load_tips('TIPBOX1','C3',1,1);\t\n\t\tC_pipette('D4','P2',1,1,'LiquidClassRed',0.9);\t\t\n\t\tC_pipette('D4','P2',1,2,'LiquidClassRed',-0.9);\t\t\n\t\tC_discard_tips\t();\n\t\t\n\t\t/*\n\t\tC_prepare_and_place_plate('SealingFilmForHSP96','P2sealing','Cool',null);\n\t\tC_prepare_and_place_plate('LidForHSP96','P2Lid','Cool',null);\n\t\t\n\t\tC_prepare_and_place_plate('DeepWell96','P3','Heat',null,\n\t\t\t\t\t{\"columnShownTo\": 2});\n\t\t\t\t\t\n\t\tC_prepare_and_place_plate('LidForDeepWell96','P3Lid','Heat',null);\t\t\t\t\t\n\t\t\n\t\t\t\t\n\t\tC_prepare_and_place_plate('Corning384','P6','3',null,\t\t\t\t\n\t\t\t\t\t{\"columnShownTo\": 5});\n\t\t\t\t\n\t\t/*\n\t\tC_prepare_and_place_plate('HSP96','P2','Cool',\n\t\t\t\t\t[{column:'1',liquidClass: 'LiquidClassPink',relativeVolume:0.9},\n\t\t\t\t {column:'2',liquidClass: 'LiquidClassYellow',relativeVolume:0.6}\t\t\t\t\t \n\t\t\t\t\t ],\t\t\t\t\t\n\t\t\t\t\t {wellsToShowString: 'A1 A2 A3 A4 A5 A6 B1 B2 H3'}\t\t\t\t\t \n\t\t\t\t\t );\t\t\n\t\t\n\t\t/*\n\t\tC_prepare_and_place_plate('TubeCarrier32','CAR1','E1',\n\t\t\t[{wellId:'1',liquidClass: 'LiquidClassPink',relativeVolume:0.9},\n\t\t\t {wellId:'2',liquidClass: 'LiquidClassWhite',relativeVolume:0.5},\n\t\t\t {wellId:'3',liquidClass: 'LiquidClassYellow',relativeVolume:0.3}\n\t\t\t],\t\t\n\t\t\t{wellsToShowString:'1 2 3 30 31 32'}\n\t\t\t);\n\t\t\n\t\t/*\t\t\n\t\tC_prepare_and_place_plate('TroughCarrier5','CAR2','W3',\t\t\t\n\t\t\t[{wellId:'1',liquidClass: 'EtOH',relativeVolume:0.9},\n\t\t\t {wellId:'2',liquidClass: 'LiquidClassRed',relativeVolume:0.6}\n\t\t\t],\n\t\t\t{wellsToShowString:'1 2 5'}\n\t\t\t);\n\t\t\n\t\tC_prepare_and_place_plate('CoolTubeModule','P1','Cool',null,{wellsToShowString:'1 2'});\n\t\t\n\t\t/*\n\t\tC_prepare_and_place_plate('DeepWell96','P1','Cool',null,null);\n\t\n\t\t\t\t\t[{column:'1',liquidClass: 'EtOH',relativeVolume:0.9},\n\t\t\t\t {column:'2',liquidClass: 'EtOH',relativeVolume:0.9},\n\t\t\t\t\t {column:'3',liquidClass: 'EtOH',relativeVolume:0.9}\n\t\t\t\t\t ],\n\t\t\t\t\t {\"columnShownTo\": 2}\n\t\t\t\t\t );\n\t\tC_prepare_and_place_plate('TroughCarrier5','CAR2','W3',\t\t\t\n\t\t\t[{row:'1',liquidClass: 'EtOH',relativeVolume:0.9},\n\t\t\t {row:'2',liquidClass: 'LiquidClassRed',relativeVolume:0.6},\n\t\t\t],\n\t\t\t{\"rowShownTo\": 4});\n\t\tC_prepare_and_place_plate('TubeCarrier32','CAR1','E1',\n\t\t\t[{row:'1',liquidClass: 'LiquidClassPink',relativeVolume:0.9},\n\t\t\t {row:'2',liquidClass: 'LiquidClassWhite',relativeVolume:0.5},\n\t\t\t {row:'3',liquidClass: 'LiquidClassYellow',relativeVolume:0.3}\n\t\t\t],\n\t\t\t{\"rowShownTo\": 2});\n\t\t\n\t\t/*\n\t\tC_prepare_and_place_tip_box('TIPBOX1','T11',1);\n\t\t\n\t\tU_show_details('TIPBOX1',0);\n\t\tC_prepare_and_place_plate('DeepWell96','WASTE','A5',null,{\"columnShownTo\": 2});\n\t\tC_prepare_and_place_plate('DeepWell96','P1','B5',\n\t\t\t\t\t[{column:1,liquidClass: 'EtOH',relativeVolume:0.9},\n\t\t\t\t {column:2,liquidClass: 'EtOH',relativeVolume:0.9},\n\t\t\t\t\t {column:3,liquidClass: 'EtOH',relativeVolume:0.9}],\n\t\t\t\t\t {\"columnShownTo\": 2}\n\t\t\t\t\t );\n\t\t\n\t\tC_prepare_and_place_plate('Corning384','P384a1','C4',null,{\"columnShownTo\": 5});\n\t\tC_pipette_384('C4','P384a1',1,1,'B2','LiquidClassRed',-0.5);\n\t\tC_discard_tips\t();\n\t\t\n\t\t//C_prepare_and_place_tip_box('TIPBOX1','C3',1);\t\n\t\t//C_prepare_and_place_tip_box('TIPBOX1','C3',1);\t\n\t\t//C_load_tips('TIPBOX1','C3',1,1);\t\t\t\n\t\t//C_prepare_and_place_plate('HSP96','P7','D4',null,{\"columnShownTo\": 2});\n\t\t//C_shake('P7',standardShakeTime);\n\t\t//U_wait(standardShakeTime);\t\t\n\t\t//C_move_labware('P7','C4');\n\t\t//C_incubate_on_magnet('C4',standardHeatTime,1);\n\t\t\n\t\t//C_pipette('D3','P2',1,1,'LiquidClassYellow',0.9);\t\t\t\n\t\t\n\t\t/*\n\t\tC_prepare_and_place_plate('DeepWell96','WASTE','A5',null,{\"columnShownTo\": 2});\n\t\tC_prepare_and_place_plate('HSP96','P2','D3',null,{\"columnShownTo\": 2});\t\t\n\t\tC_prepare_and_place_plate('Corning384','P384a1','D4',null,{\"columnShownTo\": 5});\n\t\t\n\t\t//C_pipette_384('D4','P384a1',1,1,'B2','LiquidClassRed',-0.5);\n\t\t//C_prepare_and_place_plate('HSP96','P2','D4',null);\t\t\n\t\t\t\t\n\t\t/*\t\t\n\t\tC_prepare_and_place_tip_box('TIPBOX1','C3',1);\t\n\t\t\n\t\tC_prepare_and_place_plate('HSP96','P1','D3',\n\t\t\t\t\t[{column:1,liquidClass:'LiquidClassYellow',relativeVolume:0.9},\n\t\t\t\t\t {column:2,liquidClass:'LiquidClassRed',relativeVolume:0.9}]\n\t\t\t\t );\t\t\t\t\t \n\n\t\tC_prepare_and_place_plate('HSP96','P2','D4',null);\t\t\n\t\t\n\t\tU_show_narrative_extended(\"\");\n\t\t\t\t\n\t\tC_load_tips('TIPBOX1','C3',1,1);\t\t\t\n\t\tC_pipette('D3','P1',1,1,'LiquidClassYellow',0.9);\t\t\t\n\t\tC_pipette('D4','P2',1,1,'LiquidClassYellow',-0.3);\n\t\tC_pipette('D4','P2',1,2,'LiquidClassYellow',-0.3);\n\t\tC_pipette('D4','P2',1,3,'LiquidClassYellow',-0.3);\t\t\n\t\tC_discard_tips\t();\n\t\t\n\t\tC_load_tips('TIPBOX1','C3',1,2);\t\t\t\n\t\tC_pipette('D3','P1',1,2,'LiquidClassRed',0.9);\n\t\tC_pipette('D4','P2',1,1,'LiquidClassRed',-0.3);\n\t\tC_pipette('D4','P2',1,2,'LiquidClassRed',-0.3);\n\t\tC_pipette('D4','P2',1,3,'LiquidClassRed',-0.3);\t\t\n\t\tC_discard_tips\t();\n\t\t\n\t\tC_load_tips('TIPBOX1','C3',3,3);\t\t\n\t\tC_mix('D4','P2',3,1,'LiquidClassRed',0.25);\t\t\n\t\tC_discard_tips\t();\t\t\n\t\t\t\t\n\t\tC_shake('P2',standardShakeTime);\t\t\n\t\tU_wait(standardShakeTime);\t\t\t\t\t\t\n\t\t*/\n}", "title": "" }, { "docid": "803a464127d4039adc72adba1740b87d", "score": "0.5036002", "text": "function setStory(){\n storyCountHr = storyCount+1;//set a human friendly storyCount\n\n $(\"#storyTitle\").html(\"<h1>Story \"+storyCountHr+\" of \" + storyList.length + \"</h1><p class='text-center'>Mouse over elements for more detail</p>\")\n $(\"#story\").html(\"<blockquote>\"+storyList[storyCount]+\"</blockquote><br>\");\n $('[data-toggle=\"tooltip\"]').tooltip();\n}", "title": "" }, { "docid": "4d8c57c32c5f2ee154351845aa8730b2", "score": "0.5035793", "text": "shout() {return 'Im drunk like alwayz'}", "title": "" }, { "docid": "6eda3cf84060aeff520fa4071597dc56", "score": "0.50317895", "text": "function showHint() {\r\n if (!gGame.isOn) return;\r\n gHint = true;\r\n gHintCounter--;\r\n if (gHintCounter !== 0) {\r\n lifeAndHint('hint', HINT, gHintCounter);\r\n } else {\r\n lifeAndHint('hint', HINT, gHintCounter);\r\n }\r\n}", "title": "" }, { "docid": "3e8e492889519d9750546310c7ace59d", "score": "0.5030601", "text": "function moreInfo(choice) {\n\n tippy('#goalTooltip', {\n placement: 'right',\n content: \"Why we need this data? <br><h7>If <u>lose weight</u> is chosen, a calorie defecit of 500 calories is applied with the aim to lose 1lb per week</h7><br><h7>If <u>gain weight</u> is chosen, a calorie surplus of 500 calories is applied with the aim to gain 1lb per week</h7><br><h7>If <u>maintain weight</u> is chosen, no calorie defecit/surplus is applied</h7>\",\n })\n\n tippy('#activityTooltip', {\n placement: 'right',\n content: \"Why we need this data? <br><h7>To provide you with an accurate calorie reading, it's important to know how active you are on a daily basis as this factor contributes to your daily calorie allowance.</h7> <br> <h7><u>Sedentary</u>: Very little exercise weekly </h7><br><h7><u>Lightly Active</u>: Light Exercise: 1-3 days per week </h7><br><h7><u>Moderately Active</u>: A good amount of exercise, 5-7 times per week </h7><br><h7><u>Very Active</u>: Hard Exercise Daily: 2x's per day </h7><br><h7><u>Extremely Active</u>: Hard Exercise: Twice or more daily, marathon training, triathalon etc. </h7>\",\n })\n}", "title": "" }, { "docid": "2c4ffa548a1014946a24f128c5e0d962", "score": "0.5028676", "text": "function hideAfterHint(corIJ) {\r\n for (var i = 0; i < corIJ.length; i++) {\r\n var currCellH = gBoard[corIJ[i].i][corIJ[i].j];\r\n var elCell = document.querySelector(`.cell${corIJ[i].i}-${corIJ[i].j}`);\r\n gGame.shownCount--;\r\n currCellH.minesAroundCount = 0;\r\n currCellH.isShown = false;\r\n elCell.innerText = '';\r\n elCell.style.backgroundColor = 'gray';\r\n }\r\n\r\n}", "title": "" }, { "docid": "178cf75fbf7f6f6027f94260537c1f84", "score": "0.502783", "text": "function step1() {\n loggedin.css('opacity', 0);\n login.show();\n marker.removeClass('explanation-marker-clicked');\n fruum.stop(true,true).css('width', '0%');\n fruum_actions.hide();\n fruum_comments.hide()\n\n var question_pos = position(question);\n marker.animate({\n top: question_pos.top + question.height()/2 + 'px',\n left: question_pos.left + question.width()/2 + 'px'\n }, 2000, step2);\n }", "title": "" }, { "docid": "ed9502868da03dab148713c180907c03", "score": "0.5024099", "text": "function firstSequence() {\n nextQuestion();\n console.log(\"second display\", displayQuestionTwo);\n displayQuestionTwo();\n\n }", "title": "" }, { "docid": "03fae2654959f1b265b3a4f9560adcd9", "score": "0.5012088", "text": "function changeData() {\n steph2.innerText = `Step :- ${counter.step}`;\n maxh2.innerText = `Max :- ${counter.max}`;\n}", "title": "" }, { "docid": "c32296b2c3ed56210efb82d7464f3be8", "score": "0.5011451", "text": "function Show_N_Tell () {\n\n Console.writeln(\"\\n Target Image: \", MixImages.TargetImage.id);\n Console.writeln(\" Source Image: \", MixImages.SourceImage.id);\n if( MixImages.EquationNo !== \"3\" ) {\n Console.writeln(\" Mask: \", MixImages.Mask.id);\n }\n Console.writeln(\" Target Weighting Coef: \", MixImages.KTarget);\n Console.writeln(\" Source Weighting Coef: \", MixImages.KSource);\n Console.writeln(\" Using Equation: #\", MixImages.EquationNo);\n Console.writeln(\" Rescale Results: \", MixImages.RescaleResult);\n Console.writeln(\"\\n\");\n\n return CheckInputs();\n}", "title": "" }, { "docid": "d44ebb38d3f23651621154f63a9324e9", "score": "0.5004724", "text": "function animateHopD(){\n animateHop(Date.now(),1);\n }", "title": "" }, { "docid": "2f728fa8c2368d01fe70f854f136ea9c", "score": "0.5000926", "text": "function nextHint() {\n // Set the next tip\n var tip = tips[allTips[tipUpto++]];\n //var tip = tips[5];\n setHint(tip.img, $.Localize(tip.txt));\n\n if(tipUpto >= allTips.length) {\n tipUpto = 0;\n }\n\n // Schedule the next tip\n $.Schedule(tipDelay, function() {\n nextHint();\n });\n }", "title": "" }, { "docid": "a3e1d09035c014748ff075b40fa0eadb", "score": "0.49993223", "text": "function pro() {\n var x = cbwInput.val();\n var y = x / 2.2\n var z = y * 1\n animateCount(\"prorequirement\", Math.round(z));\n $('#hiddenproreq').val(Math.round(z));\n}", "title": "" }, { "docid": "6c34faf3605f47b43377f6f548ba6f45", "score": "0.4998437", "text": "function getHint(){\r\n\tif(hintOrder.length > 1){\r\n\t\tsquare[hintOrder[0]].style.backgroundColor = \"#232323\";\r\n\t\tsquare[hintOrder[0]].style.display = \"inline-block\";\r\n\t\thintOrder.splice(0,1);\r\n\t}\r\n}", "title": "" }, { "docid": "8648fd0f9bcf6f6b7fec00dfe595dbc5", "score": "0.49940097", "text": "function track() {\n\n // vendor prefix for old browsers\n function _vendor( elem, prop, val ) {\n var vs = [\"webkit\", \"Webkit\", \"Moz\", \"ms\"];\n for (var i=0; i<vs.length; i++) {\n elem.style[ vs[i]+prop ] = val;\n }\n }\n\n // when a step is changed\n roll.on( \"step\", Roll.stepHandler( roll, views, \"prev\", \"next\", \"curr\", true ) );\n\n // when scrolling, just print some debugging info in an element\n roll.on( \"roll\", function ( step, stepProgress, position, totalProgress ) {\n var curr = (step >= 0) ? \"Step \"+(step+1) : \"(padding)\";\n\n var vals = {\n numSteps: roll.steps.length,\n viewportHeight: roll.getViewportHeight(),\n paneHeight: roll.getHeight(),\n currStep: curr,\n currPos: position + \"px\",\n currStepProgress: Math.floor( stepProgress * 100 ) + \"%\",\n totalProgress: Math.floor( totalProgress * 100) + \"%\"\n };\n\n for (var k in vals) {\n var el = document.querySelector(\"#\"+k);\n if (el) {\n el.textContent = vals[k];\n }\n }\n\n if (step >= 0) {\n var currStep = document.querySelector( \"#s\" + step );\n var ings = currStep.querySelectorAll( \".ingredient\" );\n for (var i = 0; i < ings.length; i++) {\n var ang1 = parseInt( ings[i].getAttribute( \"data-angle\" ) );\n var ang2 = parseInt( ings[i].getAttribute( \"data-rotate\" ) );\n //var tm = \"rotate(\" + (ang1 + (stepProgress*0.2) * ang2 ) + \"deg) scale(\" + (0.25 + totalProgress * 0.5) + \")\";\n var tm = \"scale(\" + (0.25 + totalProgress * 0.5) + \") translate(0, \"+Math.floor(-ang1*stepProgress*3)+\"px)\";\n ings[i].style.transform = tm;\n _vendor( ings[i], \"Transform\", tm );\n }\n }\n\n var progress = document.querySelector(\"#progress\");\n progress.style.height = Math.floor(roll.getViewportHeight() * totalProgress) + \"px\";\n\n });\n }", "title": "" }, { "docid": "092e140a9474f7aedc152e8de37de3a6", "score": "0.49835274", "text": "function setup() {\n //picks random word from words list\n ansWord = words[Math.floor(Math.random() * words.length)];\n\n ansWordArr = [];\n\n // adds \"_\" to ansWordArr\n for (var i = 0; i < ansWord.length; i++) {\n ansWordArr[i] = \"_\";\n }\n\n // reset the variables \n numGuessesRemaining = maxNumGuesses;\n guessedLetters = [];\n\n //clears giphy-embed to now show any gifs\n document.getElementById(\"giphy-embed\").src = \"\";\n //removes color from numGuesses\n document.getElementById(\"numGuesses\").style.color = \"\";\n\n //show the elements on the screen \n updateScreen();\n}", "title": "" }, { "docid": "b891cedd3d24f29b4e52e182dc5b367c", "score": "0.49767572", "text": "function drawpausemask_thennexttrial(){\n document.getElementById(\"uberdiv\").innerHTML= \"<h3>Use the arrow keys to select the largest triangle</h3><h1>+</h1>\";\n setTimeout(nextTrial,500);\n}", "title": "" }, { "docid": "fd840ad0f426c9fa372ee3f69abed2d1", "score": "0.49710628", "text": "function anteUp() {\n smallBlind();\n bigBlind();\n console.log('posting the small/big blinds');\n}", "title": "" }, { "docid": "e7c6758f4731a875d131487025f2a6cc", "score": "0.49685553", "text": "function converse (sprite1, sprite2) { \n\tvar displayTextArray = getConversation(sprite1.customConversation);\n\tvar bpmText;\n \tvar rand = Math.floor(Math.random() * displayTextArray.length);\n\tvar text = displayTextArray[rand];\n\tbmpText = game.add.bitmapText(sprite1.body.x , sprite1.body.y - sprite1.body.halfHeight, 'gem', text, 16);\n\tbmpText.maxWidth = 400;\n\tdisplayTextArray.splice(rand, 1);\n\tgame.time.events.add(Phaser.Timer.SECOND * 2, textEffect, this, bmpText);\n}", "title": "" }, { "docid": "cf7a890a0825ea0fd510ee578a99b17c", "score": "0.49684513", "text": "function C004_ArtClass_Jennifer_Tickle() {\n\tif (C004_ArtClass_Jennifer_TickleDone == false) {\n\t\tif (Common_PlayerNotRestrained) OverridenIntroText = GetText(\"Tickle\");\n\t\telse OverridenIntroText = GetText(\"TickleFail\");\n\t\tActorChangeAttitude(-1, 0);\n\t\tC004_ArtClass_Jennifer_TickleDone = true;\n\t}\n}", "title": "" }, { "docid": "baa98a1985f534da384a57e81cbe7125", "score": "0.4961306", "text": "function shake(divid)\r\n{\r\nanni(divid, 'shack');\t\r\n}", "title": "" }, { "docid": "d7d0bb1eb1684c7e3e54d5ce9dc0c135", "score": "0.4961039", "text": "function animateDescription() {\n $('#watching').hover(\n function(){\n $('#what').addClass('flipOutX')\n $('#what').css('display','none')\n $('#explanation').css('display','block')\n $('#explanation').removeClass('flipOutX')\n $('#explanation').addClass('flipInX') \n },\n function(){\n $('#explanation').removeClass('flipInX')\n $('#explanation').addClass('flipOutX')\n setTimeout(function(){\n $('#explanation').css('display','none')\n $('#what').css('display','block')\n $('#what').removeClass('flipOutX')\n $('#what').addClass('flipInX')\n }, 500)\n }\n )\n }", "title": "" }, { "docid": "2e69262b2564e8ab8c57acdbcfd704c8", "score": "0.4959095", "text": "function setup()\n{\n createCanvas(700, 500); // window size in px before we go into fullScreen()\n frameRate(60); // frame rate (DO NOT CHANGE!)\n \n // DO NOT CHANGE THESE!\n shuffle(phrases, true); // randomize the order of the phrases list (N=501)\n target_phrase = phrases[current_trial];\n \n drawUserIDScreen(); // draws the user input screen (student number and display size)\n\n\n}", "title": "" }, { "docid": "7339b19801cf5be0da5c7aa449e4b222", "score": "0.4954709", "text": "function animateTheCaptions(nextli, opt,actli) {\r\n\r\n\r\n\t\t\t\t\t\t//if (jQuery(\"body\").find('#debug').length==0)\r\n\t\t\t\t\t\t//\t\tjQuery(\"body\").append('<div id=\"debug\" style=\"background:#000;z-index:1000;position:fixed;top:5px;left:5px;width:100px;height:500px;color:#fff;font-size:10px;font-family:Arial;\"</div>');\r\n\r\n\r\n\t\t\t\t\t\tvar offsetx=0;\r\n\t\t\t\t\t\tvar offsety=0;\r\n\r\n\t\t\t\t\t\tnextli.find('.tp-caption').each(function(i) {\r\n\r\n\t\t\t\t\t\t\t\toffsetx = opt.width/2 - opt.startwidth/2;\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\tif (opt.bh>1) {\r\n\t\t\t\t\t\t\t\t\topt.bw=1;\r\n\t\t\t\t\t\t\t\t\topt.bh=1;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tif (opt.bw>1) {\r\n\t\t\t\t\t\t\t\t\topt.bw=1;\r\n\t\t\t\t\t\t\t\t\topt.bh=1;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tvar xbw = opt.bw;\r\n\t\t\t\t\t\t\t\tvar xbh = opt.bh;\r\n\r\n\r\n\t\t\t\t\t\t\t\tif (opt.fullScreen==\"on\")\r\n\t\t\t\t\t\t\t\t offsety = opt.height/2 - (opt.startheight*opt.bh)/2;\r\n\r\n\t\t\t\t\t\t\t\tif (offsety<0) offsety=0;\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\tvar nextcaption=nextli.find('.tp-caption:eq('+i+')');\r\n\r\n\t\t\t\t\t\t\t\tvar handlecaption=0;\r\n\r\n\t\t\t\t\t\t\t\t// HIDE CAPTION IF RESOLUTION IS TOO LOW\r\n\t\t\t\t\t\t\t\tif (opt.width<opt.hideCaptionAtLimit && nextcaption.data('captionhidden')==\"on\") {\r\n\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\r\n\t\t\t\t\t\t\t\t\thandlecaption=1;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (opt.width<opt.hideAllCaptionAtLilmit)\t{\r\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\r\n\t\t\t\t\t\t\t\t\t\thandlecaption=1;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass(\"tp-hidden-caption\")\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\tnextcaption.stop(true,true);\r\n\t\t\t\t\t\t\t\tif (handlecaption==0) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=undefined) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'cursor':'pointer'});\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=\"no\") {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.click(function() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar dir = nextcaption.data('linktoslide');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir!=\"next\" && dir!=\"prev\") {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.data('showus',dir);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"next\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"prev\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-leftarrow').click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"coloredbg\")) offsetx=0;\r\n\t\t\t\t\t\t\t\t\t\t\tif (offsetx<0) offsetx=0;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t//var offsety = 0; //opt.height/2 - (opt.startheight*xbh)/2;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tclearTimeout(nextcaption.data('timer'));\r\n\t\t\t\t\t\t\t\t\t\t\tclearTimeout(nextcaption.data('timer-end'));\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// YOUTUBE AND VIMEO LISTENRES INITIALISATION\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvar frameID = \"iframe\"+Math.round(Math.random()*1000+1);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('iframe').each(function() {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar ifr=jQuery(this);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('youtube')>=0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t opt.nextslideatend = nextcaption.data('nextslideatend');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'onReady': onPlayerReady\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('player',player);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//console.log(\"VideoPlay set to True due youtube 1st load AutoPlay\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player=nextcaption.data('player');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.playVideo();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//console.log(\"VideoPlay set to True due youtube 2nd load AutoPlay\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('vimeo')>=0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t opt.nextslideatend = nextcaption.data('nextslideatend');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar isrc = ifr.attr('src');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar queryParameters = {}, queryString = isrc,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tre = /([^&=]+)=([^&]*)/g, m;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Creates a map with the query string parameters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile (m = re.exec(queryString)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tqueryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (queryParameters['player_id']!=undefined) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc = isrc.replace(queryParameters['player_id'],frameID);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&player_id=\"+frameID;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc = isrc.replace('api=0','api=1');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&api=1\";\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',isrc);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player = nextcaption.find('iframe')[0];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$f(player).addEvent('ready', vimeoready_auto);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//console.log(\"VideoPlay set to True due vimeo 1st load AutoPlay\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$f(player).addEvent('ready', vimeoready);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ifr = nextcaption.find('iframe');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = ifr.attr('id');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar froogaloop = $f(id);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"pause\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//console.log(\"VideoPlay set to True due youtube 2nd load AutoPlay\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t// IF HTML5 VIDEO IS EMBEDED\r\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('video').length>0) {\r\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('video').each(function(i) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = jQuery(this).parent();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"video-js\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!html5vid.hasClass(\"HasListener\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"HasListener\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar videoID = \"videoid_\"+Math.round(Math.random()*1000+1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.attr('id',videoID);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vidready(this)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideoID = html5vid.attr('id');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//console.log(\"VideoPlay set to True due HTML5 VIDEO 1st/2nd load AutoPlay\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = this;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('timerplay',setTimeout(function() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.play();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('ww') == undefined) html5vid.data('ww',html5vid.width());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('hh') == undefined) html5vid.data('hh',html5vid.height());\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass(\"fullscreenvideo\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = videojs(videoID);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.width(html5vid.data('ww')*opt.bw);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.height(html5vid.data('hh')*opt.bh);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t} // END OF VIDEO JS FUNCTIONS\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\") && (opt.ie || opt.ie9)) nextcaption.removeClass(\"randomrotate\").addClass(\"sfb\");\r\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass('noFilterClass');\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t var imw =0;\r\n\t\t\t\t\t\t\t\t\t\t var imh = 0;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('img').length>0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('img');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('ww') == undefined) im.data('ww',im.width());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('hh') == undefined) im.data('hh',im.height());\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = im.data('ww');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = im.data('hh');\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('iframe');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('ww') == undefined) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ww',im.width());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hh') == undefined) nextcaption.data('hh',im.height());\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = nextcaption.data('ww');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = nextcaption.data('hh');\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar nc =nextcaption;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('fsize') == undefined) nc.data('fsize',parseInt(nc.css('font-size'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pt') == undefined) nc.data('pt',parseInt(nc.css('paddingTop'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pb') == undefined) nc.data('pb',parseInt(nc.css('paddingBottom'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pl') == undefined) nc.data('pl',parseInt(nc.css('paddingLeft'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pr') == undefined) nc.data('pr',parseInt(nc.css('paddingRight'),0) || 0);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mt') == undefined) nc.data('mt',parseInt(nc.css('marginTop'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mb') == undefined) nc.data('mb',parseInt(nc.css('marginBottom'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('ml') == undefined) nc.data('ml',parseInt(nc.css('marginLeft'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mr') == undefined) nc.data('mr',parseInt(nc.css('marginRight'),0) || 0);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bt') == undefined) nc.data('bt',parseInt(nc.css('borderTop'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bb') == undefined) nc.data('bb',parseInt(nc.css('borderBottom'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bl') == undefined) nc.data('bl',parseInt(nc.css('borderLeft'),0) || 0);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('br') == undefined) nc.data('br',parseInt(nc.css('borderRight'),0) || 0);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('lh') == undefined) nc.data('lh',parseInt(nc.css('lineHeight'),0) || 0);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvwidth=opt.width;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvheight=opt.height;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvwidth>opt.startwidth) fvwidth=opt.startwidth;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvheight>opt.startheight) fvheight=opt.startheight;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass('fullscreenvideo'))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'font-size': (nc.data('fsize') * opt.bw)+\"px\",\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-top': (nc.data('bt') * opt.bh) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-left': (nc.data('bl') * opt.bw) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-right': (nc.data('br') * opt.bw) + \"px\",\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'line-height': (nc.data('lh') * opt.bh) + \"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'height':(hh*opt.bh)+'px',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'white-space':\"nowrap\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width':opt.startwidth*opt.bw,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height':opt.startheight*opt.bh\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-resizeme, .tp-resizeme *').each(function() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(nextcaption,opt);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh=nextcaption.outerHeight(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw=nextcaption.outerWidth(true);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION FRONTCORNER CHANGES\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ncch = nextcaption.outerHeight();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bgcol = nextcaption.css('backgroundColor');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcorner').css({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcornertop').css({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcorner').css({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcornertop').css({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('voffset')==undefined) nextcaption.data('voffset',0);\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hoffset')==undefined) nextcaption.data('hoffset',0);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvar vofs= nextcaption.data('voffset')*xbw;\r\n\t\t\t\t\t\t\t\t\t\t\tvar hofs= nextcaption.data('hoffset')*xbw;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tvar crw = opt.startwidth*xbw;\r\n\t\t\t\t\t\t\t\t\t\t\tvar crh = opt.startheight*xbw;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION HORIZONTALLY\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center') {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xcenter','center');\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2)/xbw+ hofs);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN LEFT THE CAPTION HORIZONTALLY\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"left\" || nextcaption.data('xleft')=='left') {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xleft','left');\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(0)/xbw+hofs);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN RIGHT THE CAPTION HORIZONTALLY\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"right\" || nextcaption.data('xright')=='right') {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xright','right');\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',((crw - nextcaption.outerWidth(true))+hofs)/xbw);\r\n\t\t\t\t\t\t\t\t\t\t\t\t//console.log(\"crw:\"+crw+\" width:\"+nextcaption.outerWidth(true)+\" xbw:\"+xbw);\r\n\t\t\t\t\t\t\t\t\t\t\t\t//console.log(\"x-pos:\"+nextcaption.data('x'))\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION VERTICALLY\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center') {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ycenter','center');\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(crh/2 - nextcaption.outerHeight(true)/2)/opt.bh + vofs);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN TOP THE CAPTION VERTICALLY\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"top\" || nextcaption.data('ytop')=='top') {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ytop','top');\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(0)/opt.bh+vofs);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN BOTTOM THE CAPTION VERTICALLY\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom') {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ybottom','bottom');\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',((crh - nextcaption.outerHeight(true))+vofs)/xbw);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('fade')) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':0,'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':(opt.bh*nextcaption.data('y')+offsety)+\"px\"});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\")) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':((xbh*nextcaption.data('y'))+offsety)+\"px\" });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar sc=Math.random()*2+1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ro=Math.round(Math.random()*200-100);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar xx=Math.round(Math.random()*200-100);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar yy=Math.round(Math.random()*200-100);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('repx',xx);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('repy',yy);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('repo',nextcaption.css('opacity'));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('rotate',ro);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('scale',sc);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.transition({opacity:0, scale:sc, rotate:ro, x:xx, y: yy,duration: '0ms'});\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (opt.ie || opt.ie9 )\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.transition({ scale:1, rotate:0});\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfr')) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':1,'left':(15+opt.width)+'px','top':(opt.bh*nextcaption.data('y')+offsety)+\"px\"});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfl')) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':1,'left':(-15-imw)+'px','top':(opt.bh*nextcaption.data('y')+offsety)+\"px\"});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfl')) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':0,'left':((xbw*nextcaption.data('x'))-50+offsetx)+'px','top':(opt.bh*nextcaption.data('y')+offsety)+\"px\"});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfr')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':0,'left':((xbw*nextcaption.data('x'))+50+offsetx)+'px','top':(opt.bh*nextcaption.data('y')+offsety)+\"px\"});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lft')) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':1,'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':(-25 - imh)+\"px\"});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfb')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':1,'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':(25+opt.height)+\"px\"});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sft')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':0,'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':((opt.bh*nextcaption.data('y')+offsety)-50)+\"px\"});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfb')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'opacity':0,'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':((opt.bh*nextcaption.data('y')+offsety)+50)+\"px\"});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timer',setTimeout(function() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar easetype=nextcaption.data('easing');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (easetype==undefined) easetype=\"linear\";\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'visibility':'visible'});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('fade')) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('repo',nextcaption.css('opacity'));\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//nextcaption.animate({'opacity':1},{duration:nextcaption.data('speed'),complete:function() { if (opt.ie) jQuery(this).addClass('noFilterClass');}});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.transition({'opacity':1,duration:nextcaption.data('speed')});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if (opt.ie) nextcaption.addClass('noFilterClass');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\")) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\teasetype = easetype.replace('Elastic','Back');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\teasetype = easetype.replace('Bounce','Back');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.transition({opacity:1, scale:1, 'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':(xbh*(nextcaption.data('y'))+offsety)+\"px\", rotate:0, x:0, y:0,duration: nextcaption.data('speed'), easing:easetype});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (opt.ie) nextcaption.addClass('noFilterClass');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfr') ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.hasClass('lfl') ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.hasClass('sfr') ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.hasClass('sfl') ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.hasClass('lft') ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.hasClass('lfb') ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.hasClass('sft') ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.hasClass('sfb')\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('repx',nextcaption.position().left);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('repy',nextcaption.position().top);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('repo',nextcaption.css('opacity'));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (easetype.indexOf(\"Bounce\")>=0 || easetype.indexOf(\"Elastic\")>=0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.animate({'opacity':1,'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':opt.bh*(nextcaption.data('y'))+offsety+\"px\"},{duration:nextcaption.data('speed'), easing:easetype,complete:function() { if (opt.ie) jQuery(this).addClass('noFilterClass');}});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.transition({'opacity':1,'left':(xbw*nextcaption.data('x')+offsetx)+'px','top':opt.bh*(nextcaption.data('y'))+offsety+\"px\",duration:nextcaption.data('speed'), easing:easetype});\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if (opt.ie) nextcaption.addClass('noFilterClass');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// IF THERE IS ANY EXIT ANIM DEFINED\r\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('end')!=undefined)\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timer-end',setTimeout(function() {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((opt.ie || opt.ie9) && (nextcaption.hasClass(\"randomrotate\") || nextcaption.hasClass(\"randomrotateout\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass(\"randomrotate\").removeClass(\"randomrotateout\").addClass('fadeout');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('end')));\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t})\r\n\r\n\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\r\n\t\t\t\t\t\tbt.data('opt',opt);\r\n\t\t\t\t}", "title": "" }, { "docid": "70d2461205d19d2f30ee852dbb6e8f34", "score": "0.49538884", "text": "function herAbout() {\n for (var i = 0; i < data.results.length; i++) {\n var showherAbout = data.results[i].about;\n textSize(12);\n fill(0);\n text(showherAbout, random(0, 400), random(0, 400));\n }\n}", "title": "" }, { "docid": "0350378159811df01ee0c92132f7b1b2", "score": "0.49529785", "text": "function triggerTrivia(villainTriv){\n if(missionLocations.length>=locationCounter) {\n var pickTrivia=missionLocations[locationCounter].trivia;\n var randomIndex=Math.floor(Math.random() * pickTrivia.length);\n $('#midModalP').text(pickTrivia[randomIndex]);\n $('#midModalP2').text(villainTriv);\n $('#hint').text(pickTrivia[randomIndex]);\n $('#villainTr').text(villainTriv);\n $('#midModal').css('display', 'block');\n $('#wrongTurn').text('');\n }\n}", "title": "" }, { "docid": "5583a04143ef641b6dd03979f8c65677", "score": "0.49527663", "text": "function getHint() {\n // Keep track of how many hints are used for score verification\n NumHints++;\n var gemCoords = possibleMatches();\n updateScore(-1); // Update the score with penalty\n\n // Show the gem that could be moved\n $gem = gemAt(gemCoords[0].row, gemCoords[0].col);\n $gem.addClass(\"hint\");\n var faded = false;\n var count = 0;\n var blinker = setInterval(function () {\n var opacity = faded == true ? 1 : .1;\n faded = !faded;\n $gem.fadeTo(400, opacity);\n count++;\n if (count >11) clearInterval(blinker);\n }, 400);\n\n }", "title": "" }, { "docid": "c9ddff692cd3d9e9df180a1eb210870f", "score": "0.49511677", "text": "function displayNext () {\n // Remove any trace of a tetrmonio from the mini grid\n displaySquares.forEach(square => {\n square.classList.remove('tetromino')\n })\n upNextTetrominoes[nextRandom].forEach(index => {\n displaySquares[displayIndex + index].classList.add('tetromino')\n })\n }", "title": "" }, { "docid": "c25c792fe77d2fd6c35dcdb6ea78dc62", "score": "0.4944755", "text": "run() {\n this.Et -= 1, this.Tt();\n }", "title": "" }, { "docid": "adc3fe8a5c208afa9f4f49d27804133e", "score": "0.49400544", "text": "function l(e){if(!e.done){\n// repeat through all answers\nfor(var a in e.correct?(c.score+=h.ansQCorrect,g.score.text=c.score,c.coins++,e.coin.alpha=1,u.correct.play(),\n// add a coin to the next coin counter\ng.coinsGroup.getAt(c.coins-1).loadTexture(\"pngSheet\",\"coin-disk-full\"),console.log(e)):(c.score+=h.ansQWrong,g.score.text=c.score,e.cross.alpha=1,u.wrong.play(),u.wrong.play(),\n//re-enable chest\nu.activeChest.found=!1,u.activeChest.input.useHandCursor=!0,u.game.canvas.style.cursor=\"default\"),p)p[a].done=!0,\n//show tick if made incorrect answer\np[a].aid&&b.showIncorrect&&p[a].correct&&(p[a].tick.alpha=1);u.game.time.events.add(2e3,function(){t(e)},u)}}", "title": "" }, { "docid": "aa7742efb7afcca6a28ba17d8f0a8ab5", "score": "0.49392846", "text": "function playTrick() {\n // TODO: Optimize displaying of instructions to be simpler with an array of strings\n\n // Display instructions\n $(\"#instructions\")\n .delay(2000)\n .fadeOut(function() { $(this).text(\"I will riffle through the cards\") })\n .fadeIn()\n .delay(2000)\n .fadeOut(function() { $(this).text(\"Try to see one card in the deck\") })\n .fadeIn()\n .delay(2000)\n .fadeOut(function() { $(this).text(\"Not the bottom card... try to focus on one inside\") })\n .fadeIn();\n\n // Raises and riffles the deck\n setTimeout(function() {\n riffleDeck();\n }, 8000);\n\n // Reveal buttons\n $('#trick-buttons').delay(14000).fadeTo(1000, 1);\n}", "title": "" }, { "docid": "688f1cd6dce86868ea2de41aaf5e83e4", "score": "0.49373558", "text": "favExtraAnim(){\n gsap.from('.fav-h1', {opacity:0, y:-50, ease: \"power1\", duration: 0.6})\n //gsap.from('.fav-grid .fav-card', {opacity:0, y:-60, ease: \"back\", duration: 1, stagger: 0.5})\n }", "title": "" }, { "docid": "9338ed68505c2562aa74bec7f5587a91", "score": "0.4937204", "text": "function C101_KinbakuClub_Erica_AloneTimeEgg() {\n\tC101_KinbakuClub_Eric_PullCount++\n\tif (C101_KinbakuClub_Erica_GoodEgg) {\n\t\tOverridenIntroText = GetText(\"PullGood1\");\n\t\tif (C101_KinbakuClub_Eric_PullCount >= 2) OverridenIntroText = GetText(\"PullGood2\");\n\t\tif (C101_KinbakuClub_Eric_PullCount >= 3) OverridenIntroText = GetText(\"PullGood3\");\n\t\tif (C101_KinbakuClub_Eric_PullCount >= 4) {\n\t\t\tOverridenIntroText = GetText(\"PullGood4\");\n\t\t\tActorAddOrgasm();\n\t\t\tActorChangeAttitude(1, -1);\n\t\t}\n\t\tif (C101_KinbakuClub_Eric_PullCount >= 5) OverridenIntroText = GetText(\"PullGood5\");\n\t}\n\telse {\n\t\tif (C101_KinbakuClub_Eric_PullCount >= 2) OverridenIntroText = GetText(\"PullFrustrating2\");\n\t\tif (C101_KinbakuClub_Eric_PullCount >= 3) OverridenIntroText = GetText(\"PullFrustrating3\");\n\t\tif (C101_KinbakuClub_Eric_PullCount >= 4) OverridenIntroText = GetText(\"PullFrustrating4\");\n\t}\n\tC101_KinbakuClub_Erica_AloneTime()\n}", "title": "" }, { "docid": "1985a8f25a2b2c13ab5a9bc268927960", "score": "0.49271446", "text": "function title() {\n if (result_frame > 0) {\n if (result_frame != 30)\n result_frame--;\n var dd = map(result_frame, 60, 0, sqrt(width), -sqrt(width));\n dd = dd * dd;\n fill(0);\n text('RESULT', width / 2 + dd, height / 5);\n text(result_score, width / 2 + dd, height * 3 / 5);\n } else {\n fill(0);\n noStroke();\n text(\"Click Start!!\", width / 2, height / 2);\n }\n}", "title": "" }, { "docid": "3adbb4a44f1a9c68da1e0976161dcb38", "score": "0.4922986", "text": "function revealGuessedTiles(firstPick, secondPick){ \n for (let each of arguments){\n\t each.classList.add('squareGuessed');\n\t each.classList.remove('active');\n\t each.childNodes[0].classList.remove('hidden');\n\t each.removeEventListener('click', resolveTileInteractions);\n }\n}", "title": "" }, { "docid": "cee84a51e0d54fe2e03b2c67079cc7a7", "score": "0.49217573", "text": "function drawHandpoints() {\n //console.log(\"predictions length: \", predictions.length);\n\n for (let i = 0; i < predictions.length; i += 1) {\n const prediction = predictions[i];\n for (let j = 0; j < prediction.landmarks.length; j += 1) {\n if(oldprediction) okeypoint = oldprediction.landmarks[j];\n const keypoint = prediction.landmarks[j];\n push();\n fill(j/prediction.landmarks.length*255, 200, 255);\n //text(j, keypoint[0] * 0.5 + 320 + 5, keypoint[1] * 0.5);\n //0: wrist, 4: thumb tip, 8: pointing fingertip, 12: rude fingertip, 16: ring fingertip & 20: pinky tip\n //ellipse(keypoint[0] * 0.5 + 320, keypoint[1] * 0.5, 10, 10);\n line(keypoint[0] * 0.5 + 320, keypoint[1] * 0.5, okeypoint[0] * 0.5 + 320, okeypoint[1] * 0.5)\n pop();\n }\n playSynth(okeypoint[0], okeypoint[1])\n oldprediction = prediction;\n }\n if (predictions.length > 0) {\n if (isPlaying == false) {\n mySound.play();\n isPlaying = true;\n }\n } else {\n if (isPlaying == true) {\n mySound.pause();\n isPlaying = false;\n }\n }\n}", "title": "" }, { "docid": "8ae67a8c48c7fe8561d016f6623f090e", "score": "0.4919324", "text": "function step() {\r\n canvas.fillStyle = opts.color.replace(\"hue\", currentHue);\r\n for (var i = 0; i < Math.round(opts.count); i++) {\r\n var random = Math.random() * opts.sizeRandom;\r\n canvas.fillRect(\r\n \t-(opts.size / 2) + Math.random() * w, -\r\n\t\t\t(opts.size / 2) + Math.random() * h,\r\n\t\t\topts.size + random,\r\n\t\t\topts.size + random\r\n\t\t)\r\n }\r\n drawTxt();\r\n}", "title": "" }, { "docid": "5d1eab38786e0ef5021624e21a73d631", "score": "0.49020264", "text": "function inizializzatitoli(){\nvar timeline_titoli = new TimelineMax();\n\ntimeline_titoli\n\n.fromTo('.main',0.5, {autoAlpha:0},{autoAlpha:1, ease:Power4.easeInOut}, 0.5)\n.add(\"step1\")\n\n.fromTo('.plus h1',0.5, {autoAlpha:0},{autoAlpha:1, ease:Power4.easeInOut}, 'step1+=0.3')\n.fromTo('.plus .underline',1, {autoAlpha:0, x:\"-=250\"},{autoAlpha:1, x:\"0\", ease:Power4.easeInOut}, 'step1+=0.3')\n.add(\"step2\")\n\n.fromTo('.plus p',0.5, {autoAlpha:0},{autoAlpha:1, ease:Power4.easeInOut}, 'step1+=0.8')\n.add(homeTxt, 'step2').add(homeTxt2, 'step2'); // innesto le timeline sulla principale\n\nmasterTL.add(timeline_titoli);\n\n\n\n}", "title": "" }, { "docid": "f0227f3325612d01ef4bbe3e9039fdc7", "score": "0.49014857", "text": "function coolText(e, fps) {\n $(e).addClass('fadeIn');\n if (fps) {\n $(e).shuffleLetters(fps);\n }\n }", "title": "" }, { "docid": "4b056869ef5e2f8987c0d80505d3cbc2", "score": "0.48976693", "text": "function defHan(t, q, n){\n return [t * (t * (q[n][0] - 2 * q[n+1][0] + q[n+2][0]) + 2 * (q[n+1][0] - q[n][0])) + q[n][0],\n t * (t * (q[n][1] - 2 * q[n+1][1] + q[n+2][1]) + 2 * (q[n+1][1] - q[n][1])) + q[n][1]];\n}", "title": "" }, { "docid": "84cfc85d166dc634b824ffff3cb4a635", "score": "0.48910877", "text": "function playThesis() {\n // stop tickMaker\n $(\"body\").unbind(\"click\", initialTickMaker);\n createjs.Ticker.removeAllEventListeners();\n stage.clear();\n \n // play new music\n introMusic.fadeOut(0.0, 3000);\n buttonPushCinema.play();\n afterButtonPush.play();\n panningGuitar.play();\n \n // remove click event from play button\n $(\"#play-thesis\").unbind(\"click\");\n \n if (!firstClickHappened)\n $(\"h4\").fadeOut(2000);\n \n // reset click for next sequence\n firstClickHappened = false;\n \n $(\"body\").animate({backgroundColor: \"#000\"}, 4000);\n $(\"#play-thesis\").fadeOut(2000);\n $(\"header\").fadeOut(2000);\n \n // append new instructions for user\n $( \"#top\" ).append( \"<h4 style='color: white; opacity: 0.0; margin-top: 20px'>(click and drag)</h4>\");\n \n setTimeout(function() {\n $(\"h4\").animate({opacity: \"1.0\"}, 2000);\n startDrawing();\n }, 3000);\n\n \n // show transition 10 seconds before next sequence\n setTimeout(function() {\n startClocks(); \n }, 19500);\n \n \n // transition to sequence 2\n setTimeout(function() {\n startSecondSequence();\n }, 29500);\n \n}", "title": "" }, { "docid": "6ea3fd8af8f0500468f31e41314f51f0", "score": "0.48891607", "text": "function showAllClues()\n\t\t{\n\t\tresetGuess();\n\t\tsettingsData.current.clueNo = CLUES - 1;\n\t\tsettingsData.current.allCluesRevealed = true;\n\t\tsaveSettings();\n\t\tGAME.sound.play('ding');\n\t\tshowClue();\n\t\t}", "title": "" }, { "docid": "739aa26529b3cd7ddf62f41226c4827f", "score": "0.48874003", "text": "generateActualJoke(){\n let index = Math.floor(Math.random()*this._whosThereAnswer.length);\n let answer = this.whosThereAnswer[index];\n let punchline = this.punchLine[index];\n console.log('Knock Knock!');\n console.log('Who\\'s there?');\n console.log(answer);\n console.log(this.answerWho(answer));\n console.log('...')\n console.log(punchline);\n }", "title": "" }, { "docid": "92b8e7c0235cd1b34b795f84966594be", "score": "0.48803854", "text": "function cycle() {\n const div = document.getElementById('gamble-result');\n const message = document.getElementById('message');\n div.classList.add('cycle');\n message.innerText = \"Selecting recipient of the gamble...\";\n setTimeout(zoom, trial.gamble_animation_cycle_duration);\n }", "title": "" }, { "docid": "aeade8fcf7bc6b04afe30a7491eab32a", "score": "0.4872327", "text": "function resultsTie() { //display player's tie\r\n audioTied.play();\r\n result.innerHTML = sameResult; //display message\r\n winner.style.display = 'none';\r\n loser.style.display = 'none';\r\n tie.style.display = 'block';\r\n document.querySelector(\".show-hands\").style.background = \"linear-gradient(0deg,#ff5722,#ff8a65,#ff5722)no-repeat\";\r\n}", "title": "" }, { "docid": "4982d25f03eacfe9a2868e090d4e0da1", "score": "0.48685074", "text": "function nextSequence(){\n userclickedpattern=[];\n level++;\n $(\"#level-title\").text(\"level \"+ level);\n if(highscore<level)highscore=level;\n $(\"h2\").text(\"highscore \"+highscore).css(\"color\",\"pink\");\n\n var n=Math.random();\n n= Math.floor(n*4);\n var col=color[n];\n getcol.push(col);\n$('#'+col).fadeIn(100).fadeOut(100).fadeIn(100);\nplaysound(col);\nanimate(col);\n}", "title": "" }, { "docid": "4f503cee1a8fa2454100015552e36f9a", "score": "0.4866383", "text": "function setHint() {\n hint.style.animation = \"hintAnim 0.5s ease\";\n setTimeout(() => {\n hint.innerHTML =\n currentHint + 1 + \" / \" + hints.length + \"<br><br>\" + hints[currentHint];\n }, 200);\n setTimeout(() => {\n hint.style.animation = \"\";\n }, 500);\n}", "title": "" }, { "docid": "e7810b657e9ad8ba52f979379a801e1d", "score": "0.4864446", "text": "function jelly1() {\n\t\t\n\t\tvar splat1 = document.getElementById('jelly1');\n\t\tvar dead1 = document.getElementById('dead1');\n\t\t\n\t\tsplat1.style.setProperty(\"animation\", \"jelly1 0s infinite\");\n\t\tsplat1.style.setProperty(\"-webkit-animation\", \"jelly1 0s infinite\");\n\t\tsplat1.style.display=\"none\";\n\t\tdead1.innerHTML=\"<img src='splat.jpg' width='60' height='60'/>\";\n\t\tcount++;\n\t}", "title": "" }, { "docid": "3d36a96539bb248d60268eb4652dd40d", "score": "0.4864197", "text": "get HintedSmooth() {}", "title": "" }, { "docid": "aa18632fb5db7736c6203af56ad0da7b", "score": "0.48632836", "text": "displaySequence(e,it){\n this.setState({curS:it,mod:1});\n }", "title": "" }, { "docid": "b088f644a2894cccd0265e66e33c75dc", "score": "0.486207", "text": "function drawARaffle(t, n) {\n t.list.children(\"p\").removeClass(\"pitch\"),\n $(t.button).unbind(\"click\").css(\"cursor\", \"default\");\n var s = 250;\n //var s = Math.ceil(200 * Math.random()) + 90;\n slotMachine(t.list, s),\n setTimeout(function () {\n $(t.list.children(\"p\")[297 - s]).addClass(\"pitch\");\n for (var i = $(t.list.children(\"p\")[297 - s]).html(), o = $(\".pitch\").html(), a = n.length, c = 0; a > c; c++) o == n[c];\n setTimeout(function () {\n $(\".screen span\").html(i),\n $(\".screen\").css(\"display\", \"flex\"),\n $(\".prize\").show(\"nomal\"), // displays winner\n $(t.button).on(\"click\", function () { // enables joystick to be clicked again after raffle\n t.list.remove(),\n t.list = $(\"<div>\", { \"class\": \"list\" }).appendTo(t.winning),\n t.joysticks.addClass(\"joysticksAnimate\"),\n setTimeout(function () {\n t.joysticks.removeClass(\"joysticksAnimate\")\n }, 1850)\n , putList(t.list, n)\n , animateButton($(t.button))\n , drawARaffle(t, n)\n }).css(\"cursor\", \"pointer\")\n }, 400)\n }, 15500)\n\n}", "title": "" }, { "docid": "331c2224ac269bebadb074aa1aa2e175", "score": "0.48574153", "text": "function toolbit(a){this._currentTooltip=undefined,a=a||{},a.animationOut&&(this.animationOut=a.animationOut),a.animationIn&&(this.animationIn=a.animationIn)}", "title": "" }, { "docid": "1402a84c9b9b5a6129b51526bc60a744", "score": "0.4856022", "text": "function hint() {\n var tiles = _.map(shuffle(_.keys(GAME.target)), function(key) {\n return TILES[key];\n });\n console.log(\"hinting. target tiles = \" + tiles);\n if (_.any(tiles, function(tile) {\n return tile.hinted;\n })) {\n // There is already a hint.\n console.log(\"there is already a hint\");\n return;\n }\n var hintable = _.find(tiles, function(tile) {\n return !tile.matchesTarget();\n });\n if (hintable) {\n console.log(\"hinting \" + hintable.x + \",\" + hintable.y);\n hintable.hinted = true;\n hintable.show();\n } else {\n var extender = _.map(GAME.answer.nextWord.split(\"\"), function() {\n return \" _\";\n });\n setMessage(GAME.answer.fragment + extender.join(\"\"));\n }\n}", "title": "" }, { "docid": "f1510f02b258378e5c95e0daa70819d2", "score": "0.48549095", "text": "function animateTheCaptions(nextli, opt,recalled) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar offsetx=0;\n\t\t\t\t\t\tvar offsety=0;\n\n\t\t\t\t\t\tnextli.find('.tp-caption').each(function(i) {\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\toffsetx = opt.width/2 - (opt.startwidth*opt.bw)/2;\n\n\n\n\t\t\t\t\t\t\t\tvar xbw = opt.bw;\n\t\t\t\t\t\t\t\tvar xbh = opt.bh;\n\n\n\t\t\t\t\t\t\t\tif (opt.fullScreen==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.height/2 - (opt.startheight*opt.bh)/2;\n\n\t\t\t\t\t\t\t\tif (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t offsety = opt.container.height()/2 - (opt.startheight*opt.bh)/2;;\n\n\t\t\t\t\t\t\t\tif (offsety<0) offsety=0;\n\n\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);//nextli.find('.tp-caption:eq('+i+')');\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tvar handlecaption=0;\n\n\t\t\t\t\t\t\t\t// HIDE CAPTION IF RESOLUTION IS TOO LOW\n\t\t\t\t\t\t\t\tif (opt.width<opt.hideCaptionAtLimit && nextcaption.data('captionhidden')==\"on\") {\n\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (opt.width<opt.hideAllCaptionAtLimit || opt.width<opt.hideAllCaptionAtLilmit)\t{\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t\thandlecaption=1;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tnextcaption.removeClass(\"tp-hidden-caption\")\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (handlecaption==0) {\n\n\t\t\t\t\t\t\t\t\t// ADD A CLICK LISTENER TO THE CAPTION\n\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=undefined && !nextcaption.hasClass(\"hasclicklistener\")) {\n\t\t\t\t\t\t\t\t\t\tnextcaption.addClass(\"hasclicklistener\")\n\t\t\t\t\t\t\t\t\t\tnextcaption.css({'cursor':'pointer'});\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('linktoslide')!=\"no\") {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar nextcaption=jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\tvar dir = nextcaption.data('linktoslide');\n\t\t\t\t\t\t\t\t\t\t\t\tif (dir!=\"next\" && dir!=\"prev\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.data('showus',dir);\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"next\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-rightarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (dir==\"prev\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.container.parent().find('.tp-leftarrow').click();\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}// END OF CLICK LISTENER\n\n\n\t\t\t\t\t\t\t\t\tif (offsetx<0) offsetx=0;\n\n\n\t\t\t\t\t\t\t\t\t// YOUTUBE AND VIMEO LISTENRES INITIALISATION\n\n\t\t\t\t\t\t\t\t\tvar frameID = \"iframe\"+Math.round(Math.random()*1000+1);\n\n\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('video').length>0) {\n\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',true);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tnextcaption.find('iframe').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\tvar ifr=jQuery(this);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t// START YOUTUBE HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('thumbimage')!=undefined && nextcaption.data('thumbimage').length>2 && nextcaption.data('autoplay')!=true && !recalled) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.append('<div class=\"tp-thumb-image\" style=\"cursor:pointer; position:absolute;top:0px;left:0px;width:100%;height:100%;background-image:url('+nextcaption.data('thumbimage')+'); background-size:cover\"></div>');\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('youtube')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'onReady': function(event) {event.target.playVideo()}\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\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer = new YT.Player(frameID, {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tevents: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"onStateChange\": onPlayerStateChange\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\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('player',player);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.seekTo(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tplayer.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t } // END YOUTUBE HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var player=nextcaption.data('player');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t player.playVideo();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// START VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (ifr.attr('src').toLowerCase().indexOf('vimeo')>=0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!ifr.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('id',frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar isrc = ifr.attr('src');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar queryParameters = {}, queryString = isrc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tre = /([^&=]+)=([^&]*)/g, m;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Creates a map with the query string parameters\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twhile (m = re.exec(queryString)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tqueryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (queryParameters['player_id']!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc = isrc.replace(queryParameters['player_id'],frameID);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&player_id=\"+frameID;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{ isrc = isrc.replace('api=0','api=1'); } catch(e) {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisrc=isrc+\"&api=1\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tifr.attr('src',isrc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar player = nextcaption.find('iframe')[0];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$f(player).addEvent('ready', function() {vimeoready_auto(frameID,nextcaption.data('autoplay'))});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"seekTo\",0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfroogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }// END HAS LISTENER HANDLING\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // PLAY VIDEO IF THUMBNAIL HAS BEEN CLICKED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').click(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t TweenLite.to(jQuery(this),0.3,{opacity:0,ease:Power3.easeInOut,onComplete: function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.find('.tp-thumb-image').remove();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ifr = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var id = ifr.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var froogaloop = $f(id);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t froogaloop.api(\"play\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t })\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} // END OF VIMEO HANDLING\n\t\t\t\t\t\t\t\t\t\t\t} // END OF CHOOSE BETWEEN YOUTUBE AND VIMEO\n\t\t\t\t\t\t\t\t\t\t}); // END OF LOOP THROUGH IFRAMES\n\n\t\t\t\t\t\t\t\t\t\t// START OF VIDEO JS\n\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('video').length>0) {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('video').each(function(i) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar html5vid = jQuery(this).parent();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('dottedoverlay')!=\"none\" && nextcaption.data('dottedoverlay')!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('.tp-dottedoverlay').length!=1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.append('<div class=\"tp-dottedoverlay '+nextcaption.data('dottedoverlay')+'\"></div>');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar mediaaspect=16/9;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('aspectratio')==\"4:3\") mediaaspect=4/3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('mediaAspect',mediaaspect);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.closest('.tp-caption').data('forcecover')==1) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.hasClass(\"video-js\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.nextslideatend = nextcaption.data('nextslideatend');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!html5vid.hasClass(\"HasListener\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"HasListener\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar videoID = \"videoid_\"+Math.round(Math.random()*1000+1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.attr('id',videoID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vidready(this,videoID)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideoID = html5vid.attr('id');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.vjs-poster').css({display:\"block\"});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},200);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"VideoPlay set to True due HTML5 VIDEO 1st/2nd load AutoPlay\");\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = this;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t myPlayer.currentTime(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.data('timerplay',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('forcerewind')==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t myPlayer.currentTime(0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.closest('.tp-caption').data('volume')==\"mute\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t myPlayer.volume(0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.play(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.find('.vjs-poster').css({display:\"none\"});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},50);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},10+nextcaption.data('start')));\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\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('ww') == undefined) html5vid.data('ww',html5vid.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.data('hh') == undefined) html5vid.data('hh',html5vid.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvideojs(videoID).ready(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass(\"fullscreenvideo\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar myPlayer = videojs(videoID);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.width(html5vid.data('ww')*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmyPlayer.height(html5vid.data('hh')*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} catch(e) {}\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\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (html5vid.closest('.tp-caption').data('forcecover')==1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdateHTML5Size(html5vid,opt.container);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtml5vid.addClass(\"fullcoveredvideo\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t} // END OF VIDEO JS FUNCTIONS\n\n\t\t\t\t\t\t\t\t\t\t\t// IF AUTOPLAY IS ON, WE NEED SOME STOP FUNCTION ON\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplay')==true) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbt.stop();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t},200)\n\t\t\t\t\t\t\t\t\t\t\t\t\topt.videoplaying=true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('autoplayonlyfirsttime') == true || nextcaption.data('autoplayonlyfirsttime')==\"true\" ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplay',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('autoplayonlyfirsttime',false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t// NEW ENGINE\n\t\t\t\t\t\t\t\t\t\t//if (nextcaption.hasClass(\"randomrotate\") && (opt.ie || opt.ie9)) nextcaption.removeClass(\"randomrotate\").addClass(\"sfb\");\n\t\t\t\t\t\t\t\t\t\t//\tnextcaption.removeClass('noFilterClass');\n\n\n\n\t\t\t\t\t\t\t\t\t\t var imw =0;\n\t\t\t\t\t\t\t\t\t\t var imh = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('img').length>0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('img');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('ww') == undefined) im.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (im.data('hh') == undefined) im.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = im.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = im.data('hh');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(nextcaption.find('.tp-resizeme').length>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.find('iframe').length>0 || nextcaption.find('.video-js').length>0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar im = nextcaption.find('iframe');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.css({display:\"block\"});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('ww') == undefined) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ww',im.width());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hh') == undefined) nextcaption.data('hh',im.height());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ww = nextcaption.data('ww');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar hh = nextcaption.data('hh');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar nc =nextcaption;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('fsize') == undefined) nc.data('fsize',parseInt(nc.css('font-size'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pt') == undefined) nc.data('pt',parseInt(nc.css('paddingTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pb') == undefined) nc.data('pb',parseInt(nc.css('paddingBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pl') == undefined) nc.data('pl',parseInt(nc.css('paddingLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('pr') == undefined) nc.data('pr',parseInt(nc.css('paddingRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mt') == undefined) nc.data('mt',parseInt(nc.css('marginTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mb') == undefined) nc.data('mb',parseInt(nc.css('marginBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('ml') == undefined) nc.data('ml',parseInt(nc.css('marginLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('mr') == undefined) nc.data('mr',parseInt(nc.css('marginRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bt') == undefined) nc.data('bt',parseInt(nc.css('borderTop'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bb') == undefined) nc.data('bb',parseInt(nc.css('borderBottom'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('bl') == undefined) nc.data('bl',parseInt(nc.css('borderLeft'),0) || 0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nc.data('br') == undefined) nc.data('br',parseInt(nc.css('borderRight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if (nc.data('lh') == undefined) nc.data('lh',parseInt(nc.css('lineHeight'),0) || 0);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvwidth=opt.width;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar fvheight=opt.height;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvwidth>opt.startwidth) fvwidth=opt.startwidth;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (fvheight>opt.startheight) fvheight=opt.startheight;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!nextcaption.hasClass('fullscreenvideo'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'font-size': (nc.data('fsize') * opt.bw)+\"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-top': (nc.data('pt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-bottom': (nc.data('pb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-left': (nc.data('pl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'padding-right': (nc.data('pr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-top': (nc.data('mt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-bottom': (nc.data('mb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-left': (nc.data('ml') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'margin-right': (nc.data('mr') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-top': (nc.data('bt') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-bottom': (nc.data('bb') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-left': (nc.data('bl') * opt.bw) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'border-right': (nc.data('br') * opt.bw) + \"px\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //'line-height': (nc.data('lh') * opt.bh) + \"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'height':(hh*opt.bh)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'white-space':\"nowrap\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t offsetx=0; offsety=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('x',0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('y',0)\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t var ovhh = opt.height\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (opt.autoHeight==\"on\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\tovhh = opt.container.height()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'width':opt.width,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'height':ovhh\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.width(ww*opt.bw);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tim.height(hh*opt.bh);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw = im.width();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh = im.height();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.tp-resizeme, .tp-resizeme *').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"tp-resizeme\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('*').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt,\"first\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(nextcaption,opt,\"first\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('*').each(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(jQuery(this),opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalcCaptionResponsive(nextcaption,opt);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timh=nextcaption.outerHeight(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\timw=nextcaption.outerWidth(true);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION FRONTCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar ncch = nextcaption.outerHeight();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar bgcol = nextcaption.css('backgroundColor');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.frontcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'left':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderRight':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcorner').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderBottomColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// NEXTCAPTION BACKCORNER CHANGES\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.find('.backcornertop').css({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderWidth':ncch+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'right':(0-ncch)+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderLeft':'0px solid transparent',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'borderTopColor':bgcol\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t\t\txbw = 1;\n\t\t\t\t\t\t\t\t\t\t\t\txbh = 1;\n\t\t\t\t\t\t\t\t\t\t\t\toffsetx=0;\n\t\t\t\t\t\t\t\t\t\t\t\toffsety=0;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('voffset')==undefined) nextcaption.data('voffset',0);\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('hoffset')==undefined) nextcaption.data('hoffset',0);\n\n\t\t\t\t\t\t\t\t\t\t\tvar vofs= nextcaption.data('voffset')*xbw;\n\t\t\t\t\t\t\t\t\t\t\tvar hofs= nextcaption.data('hoffset')*xbw;\n\n\t\t\t\t\t\t\t\t\t\t\tvar crw = opt.startwidth*xbw;\n\t\t\t\t\t\t\t\t\t\t\tvar crh = opt.startheight*xbw;\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\") {\n\t\t\t\t\t\t\t\t\t\t\t\tcrw = opt.container.width();\n\t\t\t\t\t\t\t\t\t\t\t\tcrh = opt.container.height();\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"center\" || nextcaption.data('xcenter')=='center') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xcenter','center');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(crw/2 - nextcaption.outerWidth(true)/2)/xbw+ hofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN LEFT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"left\" || nextcaption.data('xleft')=='left') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xleft','left');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',(0)/xbw+hofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN RIGHT THE CAPTION HORIZONTALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('x')==\"right\" || nextcaption.data('xright')=='right') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('xright','right');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('x',((crw - nextcaption.outerWidth(true))+hofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"crw:\"+crw+\" width:\"+nextcaption.outerWidth(true)+\" xbw:\"+xbw);\n\t\t\t\t\t\t\t\t\t\t\t\t//konsole.log(\"x-pos:\"+nextcaption.data('x'))\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\t\t// CENTER THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"center\" || nextcaption.data('ycenter')=='center') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ycenter','center');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(crh/2 - nextcaption.outerHeight(true)/2)/xbh + vofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN TOP THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"top\" || nextcaption.data('ytop')=='top') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ytop','top');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',(0)/opt.bh+vofs);\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// ALIGN BOTTOM THE CAPTION VERTICALLY\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('y')==\"bottom\" || nextcaption.data('ybottom')=='bottom') {\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('ybottom','bottom');\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('y',((crh - nextcaption.outerHeight(true))+vofs)/xbw);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t// THE TRANSITIONS OF CAPTIONS\n\t\t\t\t\t\t\t\t\t\t\t// MDELAY AND MSPEED\n\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('start') == undefined) nextcaption.data('start',1000);\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tvar easedata=nextcaption.data('easing');\n\t\t\t\t\t\t\t\t\t\t\tif (easedata==undefined) easedata=\"Power1.easeOut\";\n\n\n\t\t\t\t\t\t\t\t\t\t\tvar mdelay = nextcaption.data('start')/1000;\n\t\t\t\t\t\t\t\t\t\t\tvar mspeed = nextcaption.data('speed')/1000;\n\t\t\t\t\t\t\t\t\t\t\tvar d_x = nextcaption.data('x');\n\t\t\t\t\t\t\t\t\t\t\tvar d_y = nextcaption.data('y');\n\t\t\t\t\t\t\t\t\t\t\tif(\tnextcaption.attr(\"changePostion\") == \"1\"){\n\t\t\t\t\t\t\t\t\t\t\t\td_x = nextcaption.attr('dataleft');\n\t\t\t\t\t\t\t\t\t\t\t\td_y = nextcaption.attr('datatop');\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar calcx = (xbw*d_x+offsetx);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar calcy = (opt.bh*d_y+offsety);\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\tif (opt.fullScreenAlignForce == \"on\")\n\t\t\t\t\t\t\t\t\t\t\t\tcalcy = nextcaption.data('y')+offsety;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tTweenLite.killTweensOf(nextcaption,false);\n\t\t\t\t\t\t\t\t\t\t\t\t\tclearTimeout(nextcaption.data('reversetimer'));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar tlop = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \ttlxx = calcx, tlyy = calcy, tlzz = 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t tlsc = 1,tlro = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t sc=1,scX=1,scY= 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ro=0,roX=0,roY=0,roZ = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX=0, skwY = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topa = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrorig = \"center,center\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttper = 300,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trepeatV = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tyoyoV = false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t repeatdelayV = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeat')!=undefined) repeatV = nextcaption.data('repeat');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('yoyo')!=undefined) yoyoV = nextcaption.data('yoyo');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('repeatdelay')!=undefined) repeatdelayV = nextcaption.data('repeatdelay');\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar customarray = nextcaption.data('customin').split(';');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery.each(customarray,function(index,param) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparam = param.split(\":\")\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar w = param[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = param[1];\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationX\") roX = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationY\") roY = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"rotationZ\") roZ = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"scaleX\") scX = parseFloat(v);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"scaleY\") scY = parseFloat(v);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"opacity\") opa = parseFloat(v);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"skewX\") skwX = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"skewY\") skwY = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"x\") tlxx = calcx + parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"y\") tlyy = calcy + parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"z\") tlzz = parseInt(v,0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"transformOrigin\") trorig = v.toString();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (w==\"transformPerspective\") tper=parseInt(v,0);\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"randomrotate\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsc = Math.random()*3+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tro = Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx + Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy + Math.round(Math.random()*200-100);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfr') || nextcaption.hasClass('skewfromright'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = 15+opt.width;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfl') || nextcaption.hasClass('skewfromleft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = -15-imw;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfl') | nextcaption.hasClass('skewfromleftshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx-50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfr') | nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx = calcx+50;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = -25 - imh;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('lfb'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = 25 + opt.height;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sft'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy-50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('sfb'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy = calcy+50;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromright') || nextcaption.hasClass('skewfromrightshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX = -85\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass('skewfromleft') || nextcaption.hasClass('skewfromleftshort'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tskwX = 85\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (get_browser().toLowerCase()==\"safari\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\troX=0;roY=0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttlxx=Math.round(tlxx);\n\t\t\t\t\t\t\t\t\t\t\t\t\ttlyy=Math.round(tlyy);\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalcx=Math.round(calcx);\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalcy=Math.round(calcy);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// CHANGE to TweenMax. if Yoyo and Repeat is used. Dont forget to laod the Right Tools for it !!\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"customin\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('anim',TweenLite.fromTo(nextcaption,mspeed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ scaleX:scX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleY:scY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:roX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:roY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationZ:roZ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t x:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t y:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:tlxx,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:tlyy,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:tlzz,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:opa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformPerspective:tper,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformOrigin:trorig,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'hidden'},\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:calcx,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:calcy,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleX:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scaleY:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationZ:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t x:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t y:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t delay:mdelay,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ease:easedata,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t overwrite:\"all\",\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t /*yoyo:yoyoV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeat:repeatV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeatDelay:repeatdelayV*/\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('anim',TweenLite.fromTo(nextcaption,mspeed,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ scale:sc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotationY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewY:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotation:ro,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t left:tlxx+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:tlyy+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t x:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t y:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:skwX,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t transformPerspective:600,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t },\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ left:calcx+'px',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t top:calcy+\"px\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t scale:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t skewX:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t rotation:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t z:0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t visibility:'visible',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t opacity:1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t delay:mdelay,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ease:easedata,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t overwrite:\"all\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t yoyo:yoyoV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeat:repeatV,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t repeatDelay:repeatdelayV,\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t nextcaption.data('killall',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t nextcaption.css({transform:\"none\",'-moz-transform':'none','-webkit-transform':'none'});\n\t\t\t\t\t\t\t\t\t\t\t },(mspeed*1000)+(mdelay*1000)+20))\n\n\n\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.data('timer',setTimeout(function() {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.hasClass(\"fullscreenvideo\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextcaption.css({'display':'block'});\n\n\t\t\t\t\t\t\t\t\t\t\t\t},nextcaption.data('start')));\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t// IF THERE IS ANY EXIT ANIM DEFINED\n\t\t\t\t\t\t\t\t\t\t\t\tif (nextcaption.data('end')!=undefined)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendMoveCaption(nextcaption,opt,nextcaption.data('end')/1000);\n\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tvar bt=jQuery('body').find('#'+opt.container.attr('id')).find('.tp-bannertimer');\n\t\t\t\t\t\tbt.data('opt',opt);\n\t\t\t\t}", "title": "" }, { "docid": "5acb4efc3d1fe5804bfec46e082e2d5e", "score": "0.485249", "text": "function jenniferLoop3(){\n var x = Math.random() * 700;\n $('.Jennifer-3').css({\"left\": x, \"top\": \"0px\"});\n $('.Jennifer-3').animate({top: '950px'}, 6000, jenniferLoop3);\n}", "title": "" }, { "docid": "d51320be5c127884d4dbc7f4b8bbf47f", "score": "0.48524597", "text": "function tester() {\n //document.getElementById(\"output\").innerHTML += sleepIn(true, false);\n //document.getElementById(\"output\").innerHTML += nextOne(true, false);\n document.getElementById(\"output\").innerHTML += countClumps([2,2,1,1,1,2,1,1,2,2]);\n //test third method, etc\n}", "title": "" }, { "docid": "0801e4e313c802801afde6202a6a0fbd", "score": "0.48522508", "text": "function animate() {\n\treset_single();\n\tshow_metric();\n}", "title": "" }, { "docid": "51d01bd40b3c74fba7fd674663e1e0ce", "score": "0.48517558", "text": "function twist(ev, gl, canvas, a_Position){\r\n for (var i =0 ; i < highlighted.length;i++){\r\n if (highlighted[i]==1){\r\n twst[i] = twst[i] + 2\r\n }\r\n }\r\n // Clear color and depth buffer\r\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\r\n draw_All(gl,canvas,a_Position,oldc_points,oldc_normals)\r\n}", "title": "" } ]
5f56e24c3d2b72ffc9d5632d8f306ec0
funzione per eliminare l'elemento al click sull'icona cestino
[ { "docid": "4883868409c1a3d6addee94764e7d125", "score": "0.0", "text": "function deleteElement(thisElement, id){\r\n $.ajax(\r\n {\r\n \"url\": \"http://157.230.17.132:3020/todos/\" + id,\r\n \"method\": \"DELETE\",\r\n \"success\": function (data) {\r\n thisElement.remove();\r\n },\r\n \"error\": function (richiesta, stato, errori) {\r\n alert(\"E' avvenuto un errore. \" + errori);\r\n }\r\n }\r\n );\r\n}", "title": "" } ]
[ { "docid": "5ac2dd82989d07327e405ff1d19046c8", "score": "0.7373329", "text": "function poistaTehtävä(e) {\r\n\te.target.parentElement.removeChild(e.target);\r\n}", "title": "" }, { "docid": "ef2cb7f878c2fc2ef20fe96c860822b6", "score": "0.72950435", "text": "function eliminarCurso(e) {\n e.preventDefault();\n if(e.target.classList.contains('borrar-curso') ) {\n e.target.parentElement.remove();\n const cursoId = e.target.getAttribute('data-id')\n console.log(cursoId);\n // Eliminar del arreglo del carrito\n articulosCarrito = articulosCarrito.filter(curso => curso.id !== cursoId);\n\n carritoHTML(articulosCarrito);\n }\n }", "title": "" }, { "docid": "6dddff1ea95ca66a04564321dda9151e", "score": "0.7274144", "text": "function eliminarCurso (e) {\r\n if(e.target.classList.contains(\"borrar-curso\")){\r\n const cursoId = e.target.getAttribute(\"data-id\");\r\n\r\n //elimina del arreglo de articulosCarrito por el data-id\r\n articulosCarrito = articulosCarrito.filter ( curso => curso.id !== cursoId);\r\n carritoHTML(); // iterar sobre el carrito y mostrar su html \r\n }; \r\n}", "title": "" }, { "docid": "b88991c0f87ed6f6e309f5d6756ea538", "score": "0.72023827", "text": "function eliminarCurso(e){\n if(e.target.classList.contains('borrar-curso')){\n const cursoId = e.target.getAttribute('data-id')\n //Eliminar del arreglo articulosCarrito poer el id\n articulosCarrito = articulosCarrito.filter(curso => curso.id !== cursoId)\n carritoHTML() //Iterar sobre carrito y mostrar su HTML \n }\n}", "title": "" }, { "docid": "6bc5e81c42d32b3358d5fae489078ddc", "score": "0.71986353", "text": "function borrarLista() {\n //cada que el boton \"limpiarLista sea clickeado...\"\n if (onclick = limpiarLista) {\n //elimino del cuerpo de la pagina el elemento lista, y todos sus hijos\n lista.remove()\n \n }\n \n}", "title": "" }, { "docid": "4d6b3b9e5bfd1bfd035a236402ef6a54", "score": "0.71970034", "text": "function removerCarritoitem(event){\n var botonclicleado = event.target;\n //eliminamos el div que lo contiene.\n //es decir el div que nosotros creamos mas arriba carrito row\n //este mismo boton al darle clic me lleva al elemento padre,\n //recordar que este mismo elemento fue creado con html desde una variable\n console.log(botonclicleado.parentElement.parentElement);\n botonclicleado.parentElement.parentElement.remove();\n console.log(botonclicleado);\n}", "title": "" }, { "docid": "b53294fc0ae3618b3db28e1890150093", "score": "0.7193732", "text": "function destroyClickedElement(event) {\n document.body.removeChild(event.target);\n }", "title": "" }, { "docid": "c32818e9c63f7a647271a543411e2bf4", "score": "0.7153484", "text": "function eliminarCurso(e)\n{\nconsole.log(e.target.classList);\nif(e.target.classList.contains(\"borrar-curso\"))\n{\n const cursoId=e.target.getAttribute('data-id');\n \n // como eliminar del arreglo de articulosCarrito por el data-id\n \n // con filter nos retornara todos los articulos que cumplan con la condicion , en este caso sera la que no sea igual al id del que tenemos \n articulosCarrito=articulosCarrito.filter((curso)=>\n {\n return curso.id!==cursoId;\n })\n \n carritoHtml(); //iterar sobre el carrito y mostrar el html\n\n}\n}", "title": "" }, { "docid": "115d52020b8ad75cc1df663db59d4a1d", "score": "0.7146685", "text": "function eliminarCurso (e){\n console.log(e.target.classList);\n if (e.target.classList.contains('borrar-curso')){\n const cursoId = e.target.getAttribute('data-id');\n\n //Elimando del arreglo de articlosCarrito por el data-id\n //que se traiga todos menos el que queremos eliminar\n artriculosCarrito= artriculosCarrito.filter(curso=>curso.id !== cursoId);\n carritoHtml(); //volvemos iterar sobre el html y muestra su contenido\n }\n}", "title": "" }, { "docid": "7969a4da0885fb803eab51b6ecb53287", "score": "0.7098965", "text": "function eliminaCurso(e){\n // console.log(\"desde eliminar curso.\");\n // console.log(e.target.classList);\n if(e.target.classList.contains('borrar-curso')){\n // console.log(e.target.getAttribute('data-id'));\n\n const cursoId = e.target.getAttribute('data-id');\n\n // elimina del arreglo de articulos por el data-id\n articulosCarrito = articulosCarrito.filter( curso =>curso.id !== cursoId);\n // console.log(articulosCarrito);\n\n carritoHTML(); /* iterar sobre el carrito y mostrar su HTML */\n }\n}", "title": "" }, { "docid": "9f97df6dd168cf7db3cda74b98ce81d6", "score": "0.7082416", "text": "function remover(e){\n let botonClicked = e.target\n botonClicked.closest('.shoppingCartItem').remove(cantidadPrevia);\n total(-precio);\n\n}", "title": "" }, { "docid": "9d6bdce4af53e5bc0208a66b2384adaf", "score": "0.7065491", "text": "function eliminarCurso(e) {\n \n console.log('desde eliminarCurso');//Verificar que el llamado a la funcion esta operativo\n console.log(e.target.classList);\n if(e.target.classList.contains('borrar-curso')) {\n console.log(e.target.getAttribute('data-id'));\n const cursoId = e.target.getAttribute('data-id');\n\n // Eliminar del arreglo articulosCarrito por el data-id\n articulosCarrito = articulosCarrito.filter( (curso) => curso.id !== cursoId);\n console.log(articulosCarrito);\n }\n carritoHTML();\n}", "title": "" }, { "docid": "4238e02a4677fdc37f717c2f94b09aa1", "score": "0.7058356", "text": "function onClick(ev) {\n ev.target.parentNode.remove() \n \n }", "title": "" }, { "docid": "68050cd271ce7849d443c41c82613aee", "score": "0.70442593", "text": "function makeClick(elBoton){\n elBoton.addEventListener('click', function(){\n this.parentElement.remove()\n });\n}", "title": "" }, { "docid": "d4fabbb4239c997216ea0fb951ab055d", "score": "0.70039845", "text": "function eliminarCurso(e) {\n e.preventDefault();\n if(e.target.classList.contains('borrar-curso') ) {\n e.target.parentElement.parentElement.remove();\n }\n actualizarContadorItemsCarrito()\n\n}", "title": "" }, { "docid": "018806c7d5252864e3dbaf641d2e9b22", "score": "0.6991702", "text": "function removeElement(e){\n\t//Calls the element parentnode's parentnode, and removes the child node of the parent node\n\t//The top parent node is the .items div with the children of sections. \n\te.srcElement.parentNode.parentNode.removeChild(e.srcElement.parentNode);\n\n\t//Calls saveList on the app. \n\tsaveList(); \n}", "title": "" }, { "docid": "cecb6bba6a2f699623ff6e02cd9525fa", "score": "0.6980059", "text": "function eliminarItem(e){\n if(e.target.classList.contains('eliminar')){\n if(confirm('Seguro desea elimnar el elemnto?')){\n let li = e.target.parentElement;\n lista.removeChild(li);\n }\n\n }\n }", "title": "" }, { "docid": "4bf5dd64629ac22f18a33a0d08dfc45c", "score": "0.6972935", "text": "function destroyClickedElement(event) {\n document.body.removeChild(event.target);\n}", "title": "" }, { "docid": "a2379680b41e0f309fac053891939a18", "score": "0.6952051", "text": "function eliminarCurso(e){\n e.preventDefault();\n \n let curso,cursoId;\n if(e.target.classList.contains('borrar-curso')){\n //traversing\n e.target.parentElement.parentElement.remove();\n curso=e.target.parentElement.parentElement;\n cursoId=curso.querySelector('a').getAttribute('data-id');\n }\n eliminarCursoLocalStorage(cursoId)\n}", "title": "" }, { "docid": "faa3097dd68ae023f7d0bc3ca3bc949e", "score": "0.69275767", "text": "function eliminarCurso(e){\n e.preventDefault();\n\n let curso, cursoId;\n\n if(e.target.classList.contains('borrar-curso')){\n e.target.parentElement.parentElement.remove();\n\n curso=e.target.parentElement.parentElement;\n\n cursoId=curso.querySelector('a').getAttribute('data-id');\n\n }\n eliminarCursoLocalStorage(cursoId);\n}", "title": "" }, { "docid": "b5b94b00f8ca89c5c0d1070899dbb9d6", "score": "0.6926296", "text": "function remover(e) {\n var item = e.currentTarget;\n var saldoRetiradas = somarMultiplicador(item);\n\n // remove o produto clicado\n item.parentNode.removeChild(item);\n\n // adiciona o botao add para o usuário clicar e inserir um novo produto\n botao.style.display = 'block';\n let _lista = document.querySelector(\"#produtosList\");\n let _iconesRemover = _lista.querySelectorAll(\"li .remove-icon\");\n var arr = lista.querySelectorAll(\"li\");\n\n /*\n * verifica a quantidade de alterações o usuário já realizou se for igual a\n * quantidade limite remove o evento remover e limita novas alterações\n */\n if (qtdProdutosRetirados == qtdAlteracoesPermitidas) {\n\tfor (var indice = 0; indice < _iconesRemover.length; indice++) {\n\t _iconesRemover[indice].style.visibility = \"hidden\";\n\t arr[indice].removeEventListener('click', remover);\n\t}\n }\n}", "title": "" }, { "docid": "29e1068754375e7d03e9c090b915cef7", "score": "0.691077", "text": "function eliminarJuego(e) {\n \n if(e.target.classList.contains(\"borrar-juego\")){\n const juegoId = e.target.getAttribute(\"data-id\");\n\n //Eliminar juego mediante el data-id\n articulosCarrito = articulosCarrito.filter(juego => juego.id !== juegoId);\n\n console.log(articulosCarrito);\n\n carritoHTML(); //invoco de nuevo al carrito para mostrar e iterar\n\n }\n}", "title": "" }, { "docid": "a0a9ec1148c9404c6c329af325e74f8c", "score": "0.6907197", "text": "function eliminarCurso(e) {\n e.preventDefault();\n\n let curso, cursoId;\n\n if (e.target.classList.contains(\"borrar-curso\")) {\n e.target.parentElement.parentElement.remove();\n curso = e.target.parentElement.parentElement;\n cursoId = curso.querySelector(\"a\").getAttribute(\"data-id\");\n eliminarLocalStorge(cursoId);\n }\n}", "title": "" }, { "docid": "2dbf1fd8358ac5654f4dc796157a190e", "score": "0.68676984", "text": "function borrarCurso(e){\n e.preventDefault();\n let curso, cursoId;\n if(e.target.classList.contains('borrar-curso')){\n //if(confirm('¿Estas seguro de eliminar el curso?')){\n //el parentElement te da a que padre pertenece el elemento, mientras mas parentElement colocques va subiendo en el dom\n e.target.parentElement.parentElement.remove(); \n curso=e.target.parentElement.parentElement;\n cursoId=curso.querySelector('a').getAttribute('data-id');\n \n //} \n }\n eliminarCursoLocalStorage(cursoId); \n}", "title": "" }, { "docid": "dc3ceb98d6a81a7138ebd5bebe60a408", "score": "0.6846942", "text": "function eliminarReg(e) {\n e.preventDefault();\n\n if (e.target.classList.contains('close-item')) {\n\n const obj = parseInt(e.target.getAttribute('data-id'));\n\n // console.log(obj);\n\n arreglo_registros = arreglo_registros.filter((registroObj) => registroObj.id !== obj);\n numRegistros();\n crearHTML();\n\n }\n}", "title": "" }, { "docid": "dbafc87eb5d1c578eff9d18b86fcfd41", "score": "0.68344957", "text": "function eliminarCurso(e) {\r\n e.preventDefault();\r\n\r\n let curso, cursoId;\r\n //delego para asignar solo click si se da en la x por eso la clase\r\n //de otra manera se tomara todo\r\n if(e.target.classList.contains('borrar-curso')){\r\n e.target.parentElement.parentElement.remove();//voy hasya el tr\r\n //para eliminar esa fila osea el curso completo\r\n curso = e.target.parentElement.parentElement;\r\n cursoId = curso.querySelector('a').getAttribute('data-id');\r\n }\r\n\r\n eliminarLocalStorage(cursoId);\r\n\r\n console.log('curso eliminado');\r\n}", "title": "" }, { "docid": "be0172599f16cb794292cfc9c8ca0e13", "score": "0.6805582", "text": "function eliminaConto(e) {\n var elementoStruttura = e.data[0];\n var idx = e.data[1];\n var str = \"\";\n\n if(elementoStruttura.movimentoDettalgio && elementoStruttura.movimentoDettaglio.conto && elementoStruttura.movimentoDettaglio.conto.descrizione) {\n str = \" \" + elementoStruttura.movimentoDettaglio.conto.descrizione;\n }\n $(\"#modaleEliminazioneElementoSelezionato\").html(str);\n // Apro il modale\n $(\"#modaleEliminazione\").modal(\"show\");\n // Lego l'azione di cancellazione\n $(\"#modaleEliminazionePulsanteSalvataggio\").substituteHandler(\"click\", function() {\n eliminazioneConto(idx);\n });\n }", "title": "" }, { "docid": "5d6095ec08d9f94231accc571ecdf551", "score": "0.6803252", "text": "eliminarItem(event){\n event.preventDefault();\n let productoD, productoID;\n if(event.target.classList.contains('btn-borra')){\n event.target.parentElement.parentElement.remove();\n productoD = event.target.parentElement.parentElement;\n productoID = producto.querySelector('a').getAttribute('data-id') \n }\n\n this.eliminarItemLS();\n this.total();\n }", "title": "" }, { "docid": "d5090ff6a8f221d7d496656c78063819", "score": "0.6801429", "text": "function eliminarcurso(e){\n e.preventDefault()\n let curso, cursoid\n if(e.target.classList.contains('borrar-curso')){\n e.target.parentElement.parentElement.remove()\n curso = e.target.parentElement.parentElement\n cursoid = curso.querySelector('a').getAttribute('data-id')\n }\n eliminarcursols(cursoid)\n carritonotificaciones()\n carritototal()\n}", "title": "" }, { "docid": "8fd93a0fa5cd5aa83fba879f12038be4", "score": "0.67967546", "text": "function eliminarCurso(event){\n event.preventDefault();\n let cursoId, curso;\n\n if(event.target.classList.contains('borrar-curso')){\n curso = event.target.parentElement.parentElement;\n cursoId = curso.querySelector('a').getAttribute('data-id')\n event.target.parentElement.parentElement.remove();\n }\n eliminarCursoLocalStorage(cursoId)\n}", "title": "" }, { "docid": "62476fd216cd1015bbeab557172b0556", "score": "0.679264", "text": "function remove() {\n let updated = document.getElementById(\"todo-list\");\n updated.onclick = function(event) {\n var target = getEventTarget(event);\n listEle.removeTodo(target.innerText);\n console.log(\"current ...........\", listEle.getList); // obteniendo método\n };\n }", "title": "" }, { "docid": "a2949bbcd15e79283d5efa6a2511b3bb", "score": "0.67476535", "text": "function supprimer(event){\n //Récupère le <li> qui a subi le clic\n const article = event.currentTarget;\n const libelle = article\n .getElementsByClassName('article')[0].innerText;\n\n if(confirm('Voulez-vous supprimer cet article \"'+ libelle +'\" ?')){\n article.remove();\n }\n\n}", "title": "" }, { "docid": "75bb19f3ca19f683c65dffabb6145500", "score": "0.6708185", "text": "function _removeElement() {\n px.rules.find('.btn-remove-action').unbind('click').click(function() {\n $(this).parents('div:first').remove();\n\n px.rules.find('.rules-left-side-element:eq(0)').find('.rule-container').remove();\n\n _addLabelNoRules();\n });\n }", "title": "" }, { "docid": "276836eae1779ed8af4043d05a6800ba", "score": "0.67043626", "text": "eliminarEventosClick() {\n this.colores.celeste.removeEventListener('click', this.elegirColor)\n this.colores.verde.removeEventListener('click', this.elegirColor)\n this.colores.violeta.removeEventListener('click', this.elegirColor)\n this.colores.naranja.removeEventListener('click', this.elegirColor)\n }", "title": "" }, { "docid": "c6761c24060c843b3858ee8e1ba92a75", "score": "0.6696349", "text": "removeAttente() {\n let currentDiv = document.getElementById('attente');\n currentDiv.remove();\n }", "title": "" }, { "docid": "9ddda0d336feced956a9ca3bd3586641", "score": "0.668865", "text": "function eliminaGiustificativo(e) {\n // TODO: diversificare le stringhe\n var str = e.data[0].numeroGiustificativo\n ? 'giustificativo numero ' + e.data[0].numeroGiustificativo\n : 'giustificativo numero ' + (e.data[1] + 1);\n $(\"#elementoSelezionatoModaleAnnullamentoElemento\").html(str);\n $(\"#confermaModaleAnnullamentoElemento\").off(\"click\").click(e.data, eliminazioneGiustificativo);\n $(\"#modaleAnnullamentoElemento\").modal(\"show\");\n }", "title": "" }, { "docid": "79a65594480adff82b888e6d49c879c9", "score": "0.66619664", "text": "function eliminardelcarrito(e){\n e.preventDefault(); \n let curso;\n let cursoid;\n\n if (e.target.classList.contains('borrar-curso')){\n e.target.parentElement.parentElement.remove();\n curso = e.target.parentElement.parentElement;\n cursoid = curso.querySelector('a').getAttribute('data-id');\n console.log(cursoid);\n }\n\n eliminarcursodelocalstorage(curso);\n\n}", "title": "" }, { "docid": "d99a53b391654e055c59986e8b92096d", "score": "0.66551477", "text": "function removeItem(event) {\n if (event.target.classList.contains('cross')) {\n event.target.parentElement.remove();\n \n // remove from local storage\n removeFromLocalStorage(event.target.parentElement.textContent); \n }\n}", "title": "" }, { "docid": "343fab3e379acdd96f067a98896630e8", "score": "0.66419333", "text": "function destroyClickedElement(event) {\n // remove the link from the DOM\n document.body.removeChild(event.target);\n}", "title": "" }, { "docid": "09f3b167218681bcb7f8ee14ece23075", "score": "0.66284645", "text": "function removercarritoitems(){\n //creamos una vairable buscando el boton\n //esta clase contiene todos los botones que se creen del div\n var eliminarItems = document.getElementsByClassName(\"btn-danger\");\n\n //como es un html collection es decir un array de elementos procedo\n //para cada uno dar un clic\n for(var i = 0; i < eliminarItems.length; i++){\n var button = eliminarItems[i];\n //creamos el event listenes.\n\n button.addEventListener('click',removerCarritoitem);\n }\n\n actualizarCarriTotal()\n cantidadCambiada()\n\n}", "title": "" }, { "docid": "6c90283fb2acae3237113baff3b7ddc9", "score": "0.66262907", "text": "function removeAllClicked() {\n $(\".model\").removeClass(\"model-clicked\");\n $(\".project_header\").removeClass(\"project-clicked\");\n $(\".template\").removeClass(\"template-clicked\");\n $(\".instruction\").popover('hide');\n $(\".overlay\").hide();\n}", "title": "" }, { "docid": "4e47907e08fdaa2604857d54da419e33", "score": "0.66250575", "text": "clickHandler () {\n if (event.target.className === 'target') {\n event.target.remove();\n }\n }", "title": "" }, { "docid": "c0f650ca7306353356e5fb0a36aa90a1", "score": "0.6607213", "text": "function remove(){\r\n // 'this' represents the current DOM-object which is the remove button. Retrieves value of its id using getAttribute.\r\n var id = this.getAttribute('id');\r\n var todos = get_todos();\r\n // Removes specific element from array\r\n todos.splice(id,1);\r\n // Stores new list back into database\r\n localStorage.setItem('todo', JSON.stringify(todos));\r\n // Update list in the browser\r\n show();\r\n // Stops propagination of click event\r\n return false;\r\n}", "title": "" }, { "docid": "7a6dc4d09dd330d90dee1ae8c60d7aa2", "score": "0.6603273", "text": "function deleteElement(){\n const miElemento = document.getElementById('divAeliminar');\n console.info(miElemento);\n miElemento.remove();\n }", "title": "" }, { "docid": "cd6a0f03d5dbe938428d964781a6e1be", "score": "0.6597033", "text": "function ocultarBoton(){\n document.getElementById('contenedorBoton').remove(); \n}", "title": "" }, { "docid": "f7401aeb6019854e91c5419e4bd8a0ee", "score": "0.6594423", "text": "function borrarCurso(e){\n e.preventDefault;\n let curso,cursoId;\n if (e.target.classList.contains('borrar-curso')){\n e.target.parentElement.parentElement.remove();\n curso = e.target.parentElement.parentElement;\n cursoId= curso.querySelector('a').getAttribute('data-id'); \n }\n eliminarCursoLocalStorage(cursoId);\n\n}", "title": "" }, { "docid": "497924376639163574a26b24190a0275", "score": "0.65868634", "text": "function selectTileAndRemove(){\r\n let tiles = qsa(\".tile\");\r\n let choices = qsa(\".choice-user\");\r\n for (let i=0; i<36; i++){\r\n choices[i].addEventListener(\"click\", function(){\r\n //console.log(choices[i]);\r\n choices[i].remove();\r\n clearRedo();\r\n choices = \"\";\r\n });\r\n }\r\n}", "title": "" }, { "docid": "a91438522fc189efb5e99bbdbb756482", "score": "0.6578111", "text": "function ElementClick_ToDelete(itsID,source){\n\tvar queue = document.getElementById(itsID);\n\tvar eles = queue.getElementsByTagName('div');\n\n\tfor (var i = 0; i < eles.length; i++) {\n\t\teles[i].onclick = function(event){\n\t\t\tdeleteElement(event.target,itsID,source);\n\t\t}\n\t\teles[i].onmouseenter = function(event){\n\t\t\tevent.target.innerHTML = \"delete \"+event.target.innerHTML;\n\t\t\tevent.target.style.cursor = 'pointer';\n\t\t\tevent.target.style.backgroundColor = 'tomato';\n\t\t\t// event.stopPropagation();\n\t\t}\n\t\teles[i].onmouseleave = function(event){\n\t\t\tevent.target.innerHTML = event.target.innerHTML.replace('delete ', '');\n\t\t\tevent.target.style.backgroundColor = '#333';\n\t\t}\n\t};\n}", "title": "" }, { "docid": "73b48f7e1fbf6d9609fdac721cf24c74", "score": "0.65735096", "text": "function removeItem(element) {\n // debugger;\n $(element).parent().remove();\n }", "title": "" }, { "docid": "4d975fb13d3f090c6c829871345411e8", "score": "0.6568644", "text": "function suppAlerte(elem)\n{\n\tvar element = elem.parentNode.parentNode;\n\telement.parentNode.removeChild(element);\n}", "title": "" }, { "docid": "d0dccb0f60e8c0960e6b78f160079575", "score": "0.6561612", "text": "function bullshit() {\n $('.deleteable').click((event) => {\n console.log(event.target);\n $(event.target).parent().remove();\n });\n}", "title": "" }, { "docid": "e2331d7aa9a658147bccb7aab34ad984", "score": "0.6560572", "text": "function deleteLiElement(eventObject){\n const parentElement = eventObject.target.parentElement;\n itemlistcontainer.removeChild(parentElement)\n const parentElementid = parseInt(parentElement.id);\nItemlist.splice(parentElementid, 1);\nUpdateDom()\n}", "title": "" }, { "docid": "b2bcfc40b0b2d91f4dfd1e21c5fab9b4", "score": "0.6556182", "text": "function DelEl(e)\n{\n var src = e.srcElement || e.target; \n var objEle = src.parentNode.parentNode.parentNode.parentNode.parentNode;\n objEle.parentNode.removeChild(objEle);\n}", "title": "" }, { "docid": "83f1cb75646026baf5b20830ea753d41", "score": "0.65478027", "text": "function removeElement(event){\r\n //console.log(\"object selected during click\" + childNode[i]); \r\n console.log(\"event\"+event); \r\n console.log(\"event.target\"+event.target); \r\n console.log(\"this\" +this);\r\n //event.target pulls current element\r\n //\"this\" pulls the parent element\r\n this.parentNode.remove();\r\n}", "title": "" }, { "docid": "e85fcb4caaf29e2431772bfa1ca6d72a", "score": "0.654692", "text": "function removeFromSelected(){\n\tvar elementId = $(this).attr(\"id\");\n\tpageAdaptation[elementId] = {\"xpath\":[\"none\"],\"pattern\":\"none\"};\n\tcloseModal($(\"[id='aryta-table']\"));\n\tsaveLocal();\n\tviewSelected();\n\tactualizarIFrame();\n}", "title": "" }, { "docid": "c88ce8331903348a13a2f830e3700b14", "score": "0.6528835", "text": "function borrarItem(e) {\n var botonClickeado = e.target\n botonClickeado.closest('.itemsCarrito').remove()\n //AL REMOVER EL ITEM, AGREGANDO LA FUNCIÓN DE SUMA, SE ACTUALIZA EL TOTAL\n sumaTotal()\n}", "title": "" }, { "docid": "85ac09a578560a830fb30ccbe86058e4", "score": "0.65245545", "text": "function eliminar(e) {\r\n\r\n //Traversing para obtener los datos de cada cita \r\n const elementoPadre = e.target.parentElement.parentElement.children\r\n const inptDueño = elementoPadre[0].value;\r\n\r\n\r\n //Obtenemos los datos de la cita segun su dueño\r\n let citasModificadas = totalCitas.filter(citaModificada => {\r\n return citaModificada.dueño == inptDueño\r\n })\r\n const cedulaCita = citasModificadas[0].cedula\r\n\r\n //Mensaje de cita eliminar\r\n document.getElementById('formulario__mensaje-eliminar').classList.add('mensaje__accion-eliminar-activo')\r\n setTimeout(() => {\r\n document.getElementById('formulario__mensaje-eliminar').classList.remove('mensaje__accion-eliminar-activo')\r\n }, 3000)\r\n localStorage.removeItem(cedulaCita)\r\n setTimeout(() => {\r\n location.reload();\r\n }, 3000)\r\n }", "title": "" }, { "docid": "eef8162d36a28eed1e1733ed30782f85", "score": "0.6518919", "text": "function excluirTudo() {\n let excluir = document.getElementById(\"lista\");\n excluir.parentNode.removeChild(excluir);\n}", "title": "" }, { "docid": "92e2aece6cf4fa66aebd56e5077d3a09", "score": "0.6517091", "text": "function deleteToDo(event) {\n const btn = event.target; //target the btn\n const li = btn.parentNode; //target the parent of btn which is li\n toDoList.removeChild(li); //from ul remove the targetted li\n let cleanToDos = toDosArray.filter(function(something) {\n return something.id !== parseInt(li.id); //eliminate function something and return only those with id that is not clicked\n }); //parsed is to make the li.id into integer\n toDosArray = cleanToDos; //now original toDosArray is the new cleanToDos\n saveToDos(); //saves the fact that an object was deleted from the array\n}", "title": "" }, { "docid": "5bb79ffae46bc560019c0c834f3f353b", "score": "0.6511548", "text": "function removeElem(elem){\n if (confirm('Etes vous sur de vouloir supprimer cet objet ?'))\n {\n var root = elem.parentNode.parentNode;\n var ul = document.getElementsByClassName(\"divElemNav\");\n var id = root.getAttribute(\"id\");\n var supNode = document.getElementById(\"navitem\"+ id);\n supNode.parentNode.removeChild(supNode);\n root.parentNode.removeChild(root);\n }\n else\n {\n }\n}", "title": "" }, { "docid": "9b6f776f2bd173db647067d5d9f8e5ce", "score": "0.65069485", "text": "function eliminar(e){\n\tvar fila = e.parentNode.getAttribute('id');\n\tnode = document.getElementById(fila);\n\tnode.parentNode.removeChild(node);\n\n}", "title": "" }, { "docid": "7d264101c0fab554a98f6c0714bfcd29", "score": "0.650399", "text": "function eliminar(elemento)\n{\n var id=elemento.parentNode.getAttribute(\"id\");\n node=document.getElementById(id);\n node.parentNode.removeChild(node);\n}", "title": "" }, { "docid": "e2973535e04e0151b03fba242f86f77b", "score": "0.6502407", "text": "function removeItemmToShopCar(e) {\r\n let course, courseID;\r\n //remove from dom\r\n if (e.target.classList.contains('remove')) {\r\n e.target.parentElement.parentElement.remove();\r\n course = e.target.parentElement.parentElement;\r\n courseID = course.querySelector('a').getAttribute('data-id');\r\n }\r\n //remove from local storage\r\n removeItemFromLocalStorage(courseID);\r\n}", "title": "" }, { "docid": "0b0fe7e675069890d84207c8d73ee427", "score": "0.6498071", "text": "function ocultarIconRemove(icons) {\n icons.style.display = 'none';\n}", "title": "" }, { "docid": "9b9bcede47698d86f1fddfe8d4c9c823", "score": "0.64900696", "text": "function removeElement() {\n baseCase.data.pop();\n refreshElement();\n }", "title": "" }, { "docid": "dd8d4148aff1301f65d264c0e013b188", "score": "0.6486258", "text": "function eliminarProducto(e) {\n e.preventDefault()\n console.log('Eliminado')\n let curso, productoId;\n if (e.target.classList.contains('borrar-producto')) {\n e.target.parentElement.parentElement.remove();\n console.log(e.target.parentElement.parentElement + \" Eliminado Carrito\")\n curso = e.target.parentElement.parentElement;\n productoId = curso.querySelector('button').getAttribute('data-id')\n console.log(productoId)\n }\n eliminarDeLocalStorage(productoId);\n\n}", "title": "" }, { "docid": "0f6c42bd0f9b290bf4358ca41a0bc52a", "score": "0.64712113", "text": "clickHandler(e, listItem) { \n\t\te.target.style.backgroundColor = \"pink\";\n\n\t\t// let somethingParenty = this.parent.deleteChild(this.value);\n\t\t// console.log(this.value);\n\n\t\tthis.todolist.deleteChild(listItem);\n\t}", "title": "" }, { "docid": "3d7a9f8ae289c23bec85abf6a67f3b15", "score": "0.6465854", "text": "function clickOnElimina(attivita) {\n $(\"#SPAN_elementoSelezionatoElimina\").html(\" \" + attivita.codice);\n $(\"#BUTTON_siElimina\").substituteHandler(\"click\", function(e) {\n e.preventDefault();\n eliminaAssociazione(attivita.uid);\n });\n $(\"#modaleElimina\").find(\".alert\").slideDown().end().modal(\"show\");\n }", "title": "" }, { "docid": "90b6acea134d36863fab7b3c41f8bd93", "score": "0.64565337", "text": "removeItemFromList() {\n this.list.addEventListener(\"click\", function (e) {\n if (e.target.classList.contains(\"fa-times\")) {\n e.target.parentElement.parentElement.remove();\n }\n });\n }", "title": "" }, { "docid": "f16af8b5af774a30e150e23537e8be74", "score": "0.6447123", "text": "function Del(e){\n var a = Get(e); \n if ( a ) {\n var p = a.parentNode;\n p.removeChild(a);\n } \n}", "title": "" }, { "docid": "e230efecc1e53bd4fc10a7dff3f3d20c", "score": "0.6446592", "text": "function remove_op_clickable()\n{\n var boxes = document.getElementsByClassName(\"boxo\");\n for(var i = 0 ; i<boxes.length ;i++)\n {\n boxes[i].removeAttribute(\"onclick\");\n }\n}", "title": "" }, { "docid": "06cb5ed4a50791a11b1ded1bcc179d6f", "score": "0.64377105", "text": "function deleteItem(e) {\n if (e.target.className == 'fas fa-times') {\n //important!!keşfetmem biraz zaman aldı\n e.target.parentElement.parentElement.remove()\n\n //delete item from local storage\n deleteItemFromLS(e.target.parentElement.parentElement.textContent)\n }\n e.preventDefault()\n}", "title": "" }, { "docid": "69f13b93992569587e4b7c80e044c677", "score": "0.64375424", "text": "function removeItem(event) {\n\tlet index = data.findIndex((item) => item.id === event.target.parentElement.id);\n\n\tdata.splice(index, 1);\n\tdisplayItem();\n}", "title": "" }, { "docid": "a68856cc225e99612e188aebc5eceee4", "score": "0.6431236", "text": "function eliminarcondiciones(element) {\n $(element).closest(\"div[name = divc]\").remove();\n addcondicion = addcondicion - 1;\n}", "title": "" }, { "docid": "453de0effd24048154fb87ab92bc644c", "score": "0.6428637", "text": "function deleteli(evt){\n evt.target.parentNode.remove();\n}", "title": "" }, { "docid": "661e5e524dc29ca3d2d0db8cb34380b9", "score": "0.64247996", "text": "function removerTour(e) {\r\n let tour, tourID;\r\n // Remover\r\n if(e.target.classList.contains('remove')) {\r\n e.target.parentElement.parentElement.remove();\r\n tour = e.target.parentElement.parentElement;\r\n tourID = tour.querySelector('a').getAttribute('data-id');\r\n }\r\n console.log(tourID);\r\n // Remover de localStorage - Item\r\n removerTourLocalStorage(tourID);\r\n}", "title": "" }, { "docid": "a3a07accf0747e0c71d3488c11ccfa49", "score": "0.64198357", "text": "deleteHandler(element, listviewObj) {\n let iconEle = element.getElementsByClassName('e-sort-delete')[0];\n //Event handler to bind the click event for delete icon\n iconEle.addEventListener('click', () => {\n if (element) {\n listviewObj.removeItem(element);\n }\n });\n }", "title": "" }, { "docid": "579879737aa2b8cf0c1dcdc7a1fcd550", "score": "0.6410009", "text": "function removeJoke(){\n $(tempJoke).remove();\n $(tempBtn).remove();\n}", "title": "" }, { "docid": "00ccf13808465d136d01502e0d6eb70a", "score": "0.64078695", "text": "function function_criteria_remove(x){\n\t\tconsole.log(\"la\");\n\t\tx.style.visibiliy = 'hidden';\n\t\tdocument.getElementById(this).remove();\n\t\tx.setVisible(false);\n\t\t/*\n\t\tconsole.log(\"x.name\"+x.name);\n\t\tcriteria.removeChild(x);\n\t\tbutton_list.splice(x,1);\n\t\t*/\n\t\t}", "title": "" }, { "docid": "cb41d9fa9b2bce2e0befec54a93c5fe0", "score": "0.6407376", "text": "initDelBtn(element, imgDiv) {\n\n let delButtons = imgDiv.querySelectorAll(\".btn-del\");\n\n delButtons.forEach((btn, index) => {\n btn.addEventListener('click', e => {\n e.preventDefault();\n\n let id = btn.id\n\n \n id = id.replace(\"del\",\"\");\n\n\n let ind = element.image.findIndex(imgId => imgId.id === id);\n\n\n let imgToRemove = imgDiv.querySelector(`#vnImg${id}`);\n\n\n imgDiv.removeChild(imgToRemove);\n let splice = element.image.splice(ind, 1);\n imgDiv.removeChild(btn);\n });\n });\n\n }", "title": "" }, { "docid": "adb0b437a2984b82e003a280ff27cf0c", "score": "0.63957506", "text": "function clearBoardOnClick(event) {\n console.log('the board was wiped clean!');\n elements.forEach((target) => {\n document.querySelector(`[data-sq=\"${target}\"]`).textContent = ' ';\n });\n //reset / clear out the winObject for future gameplay:\n for (var keys in winObject) {\n delete winObject[keys];\n }\n //reset the event listeners\n elements.forEach((target) => {\n document.querySelector(`[data-sq=\"${target}\"]`).addEventListener('click', placePieceOnClick);\n })\n}", "title": "" }, { "docid": "3aa67ccb2322a60fe556bdeb97541887", "score": "0.6393037", "text": "function trashIt(e) {\n let id = e.target.id;\n let li = e.target.parentElement;\n let key = id;\n let ul = document.getElementById('list')\n chrome.storage.sync.remove(key);\n ul.removeChild(li);\n }", "title": "" }, { "docid": "9f72444689b89073701d6c1c1b19f89c", "score": "0.638988", "text": "function removeDOMtask(e, list = inbox) { // e es el evento \n\n // detectar que se hizo click en el enlace en la x \n if (e.target.tagName === 'A') { //target es donde se ejcuto el evento, tagName es el nombre de la tiqueta\n // remover tarea de la lista, se necesita el indice\n list.removeTask(getTaskIndex(e),taskContainerElement)\n }\n}", "title": "" }, { "docid": "1a32841bc99b9928055f818fb88aa3cd", "score": "0.63835776", "text": "function removeShoppingCartItem(e){ //Al clickear, sucederá el siguiente evento:\n let buttonClicked = e.target;\n buttonClicked.closest('.shoppingCartItem').remove();\n updateShoppingCartTotal();\n}", "title": "" }, { "docid": "c0b077e6706c5aafaaeda97516300ef7", "score": "0.6373829", "text": "function excluir(id){\n deletar(id);\n //captura a linha informada\n var linha = document.getElementById(\"linha\"+id);\n //remove a linha da tabela\n linha.remove();\n}", "title": "" }, { "docid": "6ab3939ae6e30bc1d0f01c58e2a63073", "score": "0.6373807", "text": "function removeIconEvent(iconElem) {\n $(iconElem).find(\".fa-times\").click((event) => {\n\n // Get classes.\n const iconClasses = $(event.target).parent().find(\"i:not(.close)\").attr(\"class\");\n removeIcon(iconClasses);\n\n $(event.target).parent().remove();\n }); \n}", "title": "" }, { "docid": "b1c0c2fd48469f8c588f1b57f7f5424c", "score": "0.63710475", "text": "function removeElement(element) {\r\n\r\n element.addEventListener('click', (e) => {\r\n \r\n let targetElement = e.target.id.split('-');\r\n \r\n if(targetElement[0] === 'income') {\r\n idNumber = targetElement[2];\r\n let number = +e.target.closest('.right').children[0].textContent;\r\n let value = Number(budgetIncomeValue.textContent);\r\n value -= number;\r\n budgetIncomeValue.textContent = value;\r\n budgetValue.textContent = getFinalBudget(); \r\n document.getElementById(`income-${idNumber}`).remove();\r\n currentIncome--;\r\n \r\n }\r\n else if(targetElement[0] === 'expense') {\r\n idNumber = targetElement[2];\r\n let number = +e.target.closest('.right').children[0].textContent;\r\n let value = Number(budgetExpensesValue.textContent);\r\n value -= number;\r\n budgetExpensesValue.textContent = value;\r\n budgetValue.textContent = getFinalBudget(); \r\n document.getElementById(`expense-${Number(idNumber)}`).remove();\r\n \r\n currentExpense--;\r\n }\r\n // e.target.closest('.item__delete').remove()\r\n\r\n });\r\n\r\n}", "title": "" }, { "docid": "0e3841e0d647d19dd5f42f6e115559f0", "score": "0.6368587", "text": "function removerElemento(_atomo) {\n\n var achou = false;\n var codigo = null;\n var nome = null;\n var numeroCarb = carbonosEmTela();\n\n if((_atomo.nome == 'carbono') && (_atomo.numero != -1))\n {\n for(var i = 0; i < elementsInGame.length; i++)\n {\n if(elementsInGame[i].nome == 'carbono')\n {\n if(elementsInGame[i].numero >= numeroCarb)\n {\n elementsInGame[i].numero--;\n }\n }\n }\n numerarCarbonos();\n numerarCarbonos();\n }\n\n for(var i = 0; i < elementsInGame.length; i++)\n {\n if(elementsInGame[i] == _atomo)\n {\n _atomo.div.remove();\n codigo = elementsInGame[i].codigo;\n nome = elementsInGame[i].nome;\n elementsInGame.splice(i,1);\n achou = true;\n }\n\n if(achou && i < elementsInGame.length)\n {\n if(elementsInGame[i].nome == nome)\n {\n elementsInGame[i].codigo = codigo;\n\n $(elementsInGame[i].div).attr('id', elementsInGame[i].nome + '-' + elementsInGame[i].codigo);\n codigo++;\n }\n }\n }\n}", "title": "" }, { "docid": "a5f85a7f25b6c2ab56e76f0c16cdee19", "score": "0.6366467", "text": "removePion(joueur, x, y) {\n let tab = document.getElementById('plateau');\n let cell = tab.rows[y].cells[x];\n if (cell.firstChild !== null) {\n // si l'on place les pions, il faut supprimer le pion dans la grid\n if (!this.sauter && !this.varJeu.enJeu) {\n if (joueur.color === this.joueur_courant.color) {\n socket.emit('enlevePion', this.joueur_courant, Number(cell.firstChild.getAttribute('alt')));\n }\n } else this.sauter = false;\n\n cell.removeChild(cell.firstChild);\n }\n }", "title": "" }, { "docid": "d95a4ab5254c7fe74c94cd1d27b8dd0c", "score": "0.63652724", "text": "function deleteGifo(e) {\r\n\r\n if (e.target.classList.contains('fa-trash-alt')) {\r\n const gifoToDelete = e.target.parentElement.parentElement.parentElement.parentElement;\r\n const gifoToDeleteId = gifoToDelete.querySelector('img').id;\r\n\r\n favorites = favorites.filter(gifo => gifo.id !== gifoToDeleteId);\r\n\r\n showAlert('Gifo eliminado correctamente!');\r\n\r\n // Llamo a la función que imprime los gifos\r\n while (myList.firstChild) {\r\n myList.removeChild(myList.firstChild);\r\n };\r\n\r\n showInFavorites();\r\n };\r\n}", "title": "" }, { "docid": "067b17b6833d018d558a02fcd45d990a", "score": "0.6365033", "text": "function revocarOrden() {\n\n let cajas = document.querySelectorAll('box');\n cajas.forEach(element => element.removeEventListener('click', revocarOrden, false));\n\n const seres = document.querySelectorAll('.ultimate');\n seres.forEach(element => element.removeEventListener('click', girar, false));\n seres.forEach(element => element.removeEventListener('click', recorrer, false));\n seres.forEach(element => element.removeEventListener('click', quitarClase, false));\n\n}", "title": "" }, { "docid": "abe9451739e07f77361fd7e68189a90d", "score": "0.63580245", "text": "removeCtrlElements(){\n\t\tthis.div.classList.remove(\"tapFunction\");\n\t\tfor( var i =0;i<this.elements.length;i++ ){\n\t\t\ttry{\n\t\t\t\tthis.div.removeChild(this.elements[i].element);\n\t\t\t}catch(e){\n\t\t\t\t// The list could be empty -\n\t\t\t}\n\t\t}\n\t\tthis.isClicked = false;\n\t}", "title": "" }, { "docid": "2cd55001f28fd13e22363cf91241833f", "score": "0.6352739", "text": "function deleteElement(evento){\n evento.preventDefault();\n let boton = evento.target;\n let idElemento = boton.getAttribute('data-idelement');\n let botonDelete = $(\"#buttonDelete\");\n botonDelete.unbind();\n botonDelete.on(\"click\",ejecutarDelete(idElemento));\n $(\"#delete\").modal();\n}", "title": "" }, { "docid": "60f56fdc66f5d5b98f8a8622e06ebbd5", "score": "0.635127", "text": "function destroy() {\n elem.removeEventListener('click', onClick);\n }", "title": "" }, { "docid": "c4a7d71f13674cb50f5e57771d6d4674", "score": "0.6350278", "text": "function deletereminder(){\n for(let span of spans){\n span.addEventListener (\"click\",function (){\n span.parentElement.remove();\n event.stopPropagation();\n });\n }\n}", "title": "" }, { "docid": "78c5c773b8f83ad0f2b83956223f0131", "score": "0.6343115", "text": "function deleteClickHandler () {\n\n const newElements = elements.filter((ele,index)=> ele.shapeName !== selectedShapeId )\n dispatch({\n type:actionTypes.SET_DELETE,\n elements:newElements,\n })\n setButton(false)\n setSelectedShapeId('')\n setMouseX('')\n setMouseY('')\n setName(\"--\")\n \n }", "title": "" }, { "docid": "6c7a5fd980117d2d9fb48e1b2d4e6924", "score": "0.63427186", "text": "function deleteButton(event) {\n const clickButton = event.currentTarget;\n clickButton.parentElement.remove();\n}", "title": "" }, { "docid": "22a0ea8d0a824ef1f45836a7a0970e19", "score": "0.63427055", "text": "function remove(event){\n let buttonClicked = event.target\n if (buttonClicked.parentElement.className == \"row\"){\n removeVertex(buttonClicked)\n } else if (buttonClicked.parentElement.className == \"prereq\"){\n removeEdge(buttonClicked)\n }\n buttonClicked.parentElement.remove()\n graph()\n}", "title": "" }, { "docid": "43eb01244962bf1fca7a54dfd75e292a", "score": "0.63421834", "text": "deleteClickOnPoly(){\n this.poly.off();\n }", "title": "" }, { "docid": "84dbe1b1ab6e988660fb3807ddbf2073", "score": "0.63385093", "text": "function removeElement(elem){ if (elem) elem.parentNode.removeChild(elem) }", "title": "" }, { "docid": "5b83f80911db374d7696312c8086ba1f", "score": "0.6337374", "text": "function eliminar(data, event, thisElem){\n\t event.preventDefault(); //Previene comportamiento por defect (no se refresca).\n\t let pos = $(thisElem).attr(\"id\"); //Guarda el 'ID' de este boton en la variable 'pos'. (El ID corresponde a la fila donde se encuentra ese dato en el arreglo del servidor).\n\t $.ajax({\n\t\t\"url\": \"http://web-unicen.herokuapp.com/api/thing/\" + data.information[pos]._id, //Borra la 'data' ubicada en la posicion de 'information' con el '_id' correspondiente.\n\t\t\"method\": \"DELETE\",\n\t\t\"success\": function(result){\n\t\t quitarDatosFila(result, pos); //Llama a la función 'quitarDatosFila' y le pasa 'result' y 'pos' por parámetro.\n\t\t }\n\t });\n\t}", "title": "" } ]
f2fd40e421e2031c2579de2b6870b03f
translate_m_zhCN.js:formatted Line 8099 fun Ko
[ { "docid": "cca893634c7645065163b6294fb27803", "score": "0.0", "text": "function tk(a, tkk) {\n var b = tkk || ''\n var d = Ho(String.fromCharCode(116));\n var c = Ho(String.fromCharCode(107));\n d = [d(), d()];\n d[1] = c();\n c = '&' + d.join('') + '=';\n d = b.split('.');\n b = Number(d[0]) || 0;\n for (var e = [], f = 0, g = 0; g < a.length; g++) {\n var k = a.charCodeAt(g);\n 128 > k ? e[f++] = k : (2048 > k ? e[f++] = k >> 6 | 192 : (55296 == (k & 64512) && g + 1 < a.length && 56320 == (a.charCodeAt(g + 1) & 64512) ? (k = 65536 + ((k & 1023) << 10) + (a.charCodeAt(++g) & 1023),\n e[f++] = k >> 18 | 240,\n e[f++] = k >> 12 & 63 | 128) : e[f++] = k >> 12 | 224,\n e[f++] = k >> 6 & 63 | 128),\n e[f++] = k & 63 | 128)\n }\n a = b;\n for (f = 0; f < e.length; f++)\n a += e[f],\n a = Io(a, '+-a^+6');\n a = Io(a, '+-3^+b+-f');\n a ^= Number(d[1]) || 0;\n 0 > a && (a = (a & 2147483647) + 2147483648);\n a %= 1E6;\n return c + (a.toString() + '.' + (a ^ b))\n}", "title": "" } ]
[ { "docid": "f09e5d659540634651ee58fbbbceaf87", "score": "0.6578022", "text": "function zh(){var a=this;this.ra=new Oe(function(){return Ah(a)},function(b){var c=Ah(a);c&&(fa(b.y)&&(a.ra.scrollY=-c.qc*b.y-c.Nc),a.ra.Ta.setAttribute(\"transform\",\"translate(0,\"+(a.ra.scrollY+c.pc)+\")\"))});this.ra.im=!0;this.Sl=[];this.Hb=this.Ka=0;this.Ji=[];this.dd=[]}", "title": "" }, { "docid": "0a665b8c4c8fac0f84edfa244bc3f47b", "score": "0.6262351", "text": "function c(e,c,t,n){var o={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return n?o[t][0]:o[t][1]}", "title": "" }, { "docid": "8cddca0deffc51529242fefc7eb27c95", "score": "0.62072176", "text": "function trs(what, atts) {\n var struct = that.messages[what];\n\n if (struct && struct[language])\n return translate(what, atts);\n return what;\n }", "title": "" }, { "docid": "4452386929b52a6d3bb50683e34b821b", "score": "0.6179431", "text": "onTranslation() {\n }", "title": "" }, { "docid": "2940ad2b81a1b2b254504368f80ab860", "score": "0.61189187", "text": "function LangMap() {}", "title": "" }, { "docid": "2940ad2b81a1b2b254504368f80ab860", "score": "0.61189187", "text": "function LangMap() {}", "title": "" }, { "docid": "d40c95263c1b9d8224ecf047de752a7e", "score": "0.6005622", "text": "function c(e,c,t,n){switch(t){case\"s\":return c?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(c?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(c?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(c?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(c?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(c?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(c?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "d1fc241fb8f2840ef641e44bcdf5bf90", "score": "0.59771854", "text": "function mFromPhoneWebLang(index) {\r\n\tvar type = {\r\n\t\t'ko': 0,\r\n\t\t'ko-KR': 0,\r\n\t\t'en-US': 1,\r\n \t'ja': 2,\r\n \t'ja-JP': 2,\r\n \t'cn': 3,\r\n \t'zh-cn': 3\r\n\t}\r\n\r\n\tvar text = [\r\n\t\t[\r\n\t\t\t\"구동에 실패하였습니다.\",\t// 0\r\n\t\t\t\"세션이 종료되었습니다.\",\r\n\t\t\t\"인증서 비밀번호를 입력하세요.\",\r\n\t\t\t\"파일을 선택해 주세요.\",\r\n\r\n\t\t\t\"휴대폰에서 인증서 가져오기\",\t\t// 4\r\n\t\t\t\"인증서 패스워드를 입력하세요\",\t// 5\r\n\r\n\t\t\t\"확인\",\t// 6\r\n\t\t\t\"취소\",\r\n\r\n \"지원하지 않는 운영체제입니다.\" // 8\r\n\t\t],\r\n\t\t[\r\n\t\t\t\r\n\t\t],\r\n\t\t[\r\n\t\t\t\r\n\t\t],\r\n\t\t[\r\n\t\t\t\r\n\t\t]\r\n\t];\r\n\r\n\tvar brwoserLang = (function () {\r\n\t\tif (typeof (window.navigator.browserLanguage) === 'undefined')\r\n\t\t\treturn window.navigator.language;\r\n\t\treturn window.navigator.browserLanguage;\r\n\t\t// return 'ja-JP';\r\n\t})();\r\n\r\n\tvar _config = VestSign.getConfig();\r\n\tif(_config.langIndex === undefined)\r\n\t\treturn text[type[brwoserLang]][index];\r\n\r\n\treturn text[_config.langIndex][index];\r\n}", "title": "" }, { "docid": "5c1784d86203dca005bc0a86282b2897", "score": "0.5928657", "text": "function TI18n() {}", "title": "" }, { "docid": "5c1784d86203dca005bc0a86282b2897", "score": "0.5928657", "text": "function TI18n() {}", "title": "" }, { "docid": "5c1784d86203dca005bc0a86282b2897", "score": "0.5928657", "text": "function TI18n() {}", "title": "" }, { "docid": "b1645f96b58c6802e8d7ca2793a46845", "score": "0.5921128", "text": "function TI18n() { }", "title": "" }, { "docid": "b1645f96b58c6802e8d7ca2793a46845", "score": "0.5921128", "text": "function TI18n() { }", "title": "" }, { "docid": "8893c25a21758a90ea68abdbe8b9a49a", "score": "0.59146655", "text": "translate(...args) {\n\t\tif (this._localizationEnabled) {\n\t\t\treturn this.__(...args)\n\t\t}\n\n\t\treturn args[0]\n\t}", "title": "" }, { "docid": "dab6d28c085361cc64c6bcbf8ce06ff0", "score": "0.58957165", "text": "function translate(key) { return ___WEBPACK_IMPORTED_MODULE_0__[\"Translator\"].translate(key); }", "title": "" }, { "docid": "d9bd6ed94d014d1f9addd52bf87767b4", "score": "0.58539087", "text": "function Me(e,t,a,s){var n={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return s?n[a][0]:n[a][1]}", "title": "" }, { "docid": "c372db53d2e375953aab876fbe025ab1", "score": "0.5842926", "text": "function a(e,a,c,n){var t={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return n?t[c][0]:t[c][1]}", "title": "" }, { "docid": "cba2c7af15bd7ca3e6370adb79805fc7", "score": "0.5822742", "text": "function PlcGeral(){\r\n}", "title": "" }, { "docid": "c0e05122cdfdf1de908ea71848f23807", "score": "0.5819582", "text": "function testLty() {\n console.log(\"en\");\n console.log(\"ch\");\n}", "title": "" }, { "docid": "81f1217a97c31b1c3b70ecad044f4627", "score": "0.5808693", "text": "function t(e,t,n,i){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return i?a[n][0]:a[n][1]}", "title": "" }, { "docid": "81f1217a97c31b1c3b70ecad044f4627", "score": "0.5808693", "text": "function t(e,t,n,i){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return i?a[n][0]:a[n][1]}", "title": "" }, { "docid": "81f1217a97c31b1c3b70ecad044f4627", "score": "0.5808693", "text": "function t(e,t,n,i){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return i?a[n][0]:a[n][1]}", "title": "" }, { "docid": "81f1217a97c31b1c3b70ecad044f4627", "score": "0.5808693", "text": "function t(e,t,n,i){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return i?a[n][0]:a[n][1]}", "title": "" }, { "docid": "c557a6c73d325f5c6a145552b42315dc", "score": "0.5806252", "text": "function t(e,t,n,o){var i={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return o?i[n][0]:i[n][1]}", "title": "" }, { "docid": "4f6bc50e98384d79f6a5a750ede2a8e4", "score": "0.5801445", "text": "function t(e,t,n,a){var i={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?i[n][0]:i[n][1]}", "title": "" }, { "docid": "4f6bc50e98384d79f6a5a750ede2a8e4", "score": "0.5801445", "text": "function t(e,t,n,a){var i={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?i[n][0]:i[n][1]}", "title": "" }, { "docid": "4552251176115f276638d0aa24f21690", "score": "0.5795964", "text": "function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n\n default:\n return number;\n }\n }", "title": "" }, { "docid": "f5c221bbea9584fddd9f0473a046f021", "score": "0.57869244", "text": "function e(t,e,n,i){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[t+\" सॅकंडांनी\",t+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[t+\" मिणटांनी\",t+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[t+\" वरांनी\",t+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[t+\" दिसांनी\",t+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[t+\" म्हयन्यानी\",t+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[t+\" वर्सांनी\",t+\" वर्सां\"]};return i?a[n][0]:a[n][1]}", "title": "" }, { "docid": "f5c221bbea9584fddd9f0473a046f021", "score": "0.57869244", "text": "function e(t,e,n,i){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[t+\" सॅकंडांनी\",t+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[t+\" मिणटांनी\",t+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[t+\" वरांनी\",t+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[t+\" दिसांनी\",t+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[t+\" म्हयन्यानी\",t+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[t+\" वर्सांनी\",t+\" वर्सां\"]};return i?a[n][0]:a[n][1]}", "title": "" }, { "docid": "752b2731d0ecb409026b8ebe20541112", "score": "0.5786697", "text": "function q(a){var c=g(a);if(c.id){\n// get the related l10n object\nvar d=n(c.id,c.args);if(!d)return void console.warn(\"#\"+c.id+\" is undefined.\");\n// translate element (TODO: security checks?)\nif(d[v]){// XXX\nif(0===r(a))a[v]=d[v];else{for(var e=a.childNodes,f=!1,h=0,i=e.length;i>h;h++)3===e[h].nodeType&&/\\S/.test(e[h].nodeValue)&&(f?e[h].nodeValue=\"\":(e[h].nodeValue=d[v],f=!0));\n// if no (non-empty) textNode is found, insert a textNode before the\n// first element child.\nif(!f){var j=b.createTextNode(d[v]);a.insertBefore(j,a.firstChild)}}delete d[v]}for(var k in d)a[k]=d[k]}}", "title": "" }, { "docid": "d880bba1d8403f358a2a3384317a40ac", "score": "0.57808274", "text": "function translate(el){\n/* 306 */ \t\t\t\t$(el).attr(\"title\", $(el).attr(\"title\").replace(/_/g, \"\").replace(/\\\\n/g, \"<br/>\").replace(/\\\\r\\\\n/g, \"<br />\"));\n/* 307 */ \t\t\t}", "title": "" }, { "docid": "67aeb5e4d5829d34bbff60edda943f7c", "score": "0.57791805", "text": "function translate(number,withoutSuffix,key,isFuture){switch(key){case\"s\":return withoutSuffix?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return number+(withoutSuffix?\" секунд\":\" секундын\");case\"m\":case\"mm\":return number+(withoutSuffix?\" минут\":\" минутын\");case\"h\":case\"hh\":return number+(withoutSuffix?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return number+(withoutSuffix?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return number+(withoutSuffix?\" сар\":\" сарын\");case\"y\":case\"yy\":return number+(withoutSuffix?\" жил\":\" жилийн\");default:return number}}", "title": "" }, { "docid": "abaf4ea8e24597c1b803e2a3b8b3d68d", "score": "0.5761584", "text": "function translate(number, withoutSuffix, key, isFuture) {\n\t switch (key) {\n\t case 's':\n\t return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n\t case 'ss':\n\t return number + (withoutSuffix ? ' секунд' : ' секундын');\n\t case 'm':\n\t case 'mm':\n\t return number + (withoutSuffix ? ' минут' : ' минутын');\n\t case 'h':\n\t case 'hh':\n\t return number + (withoutSuffix ? ' цаг' : ' цагийн');\n\t case 'd':\n\t case 'dd':\n\t return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n\t case 'M':\n\t case 'MM':\n\t return number + (withoutSuffix ? ' сар' : ' сарын');\n\t case 'y':\n\t case 'yy':\n\t return number + (withoutSuffix ? ' жил' : ' жилийн');\n\t default:\n\t return number;\n\t }\n\t }", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "2727e13a10cd98e74eb147eb9a7e11c3", "score": "0.57608753", "text": "function t(e,t,n,a){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "f84007cd84f658f8fceea5cdae13d508", "score": "0.5751164", "text": "function translate(word, lang) {\n /*var data = {\n \"client\": \"t\",\n \"sl\": 'zh-CN',\n \"tl\": lang,\n \"hl\": \"zh-CN\",\n \"dt\": \"at\",\n \"dt\": \"bd\",\n \"dt\": \"ex\",\n \"dt\": \"ld\",\n \"dt\": \"md\",\n \"dt\": \"qca\",\n \"dt\": \"rw\",\n \"dt\": \"rm\",\n \"dt\": \"ss\",\n \"dt\": \"t\",\n \"ie\": \"UTF-8\",\n \"oe\": \"UTF-8\",\n \"source\": \"btn\",\n \"ssel\": \"0\",\n \"tsel\": \"0\",\n \"kc\": \"0\",\n \"tk\": token(word),\n \"q\": word\n };*/\n var dataArr = [\n {\"client\": \"webapp\"},\n {\"sl\": 'zh-CN'},\n {\"tl\": lang},\n {\"hl\": \"zh-CN\"},\n {\"dt\": \"at\"},\n {\"dt\": \"bd\"},\n {\"dt\": \"ex\"},\n {\"dt\": \"ld\"},\n {\"dt\": \"md\"},\n {\"dt\": \"qca\"},\n {\"dt\": \"rw\"},\n {\"dt\": \"rm\"},\n {\"dt\": \"ss\"},\n {\"dt\": \"t\"},\n {\"ie\": \"UTF-8\"},\n {\"oe\": \"UTF-8\"},\n {\"source\": \"btn\"},\n {\"ssel\": \"0\"},\n {\"tsel\": \"0\"},\n {\"kc\": \"0\"},\n {\"tk\": token(word)},\n {\"q\": urlencode(word)}\n ];\n var paramStr = dataArr.reduce(function (res, item) {\n let key = Object.keys(item)[0];\n let value = Object.values(item)[0];\n //console.log(item)\n return res += key + '=' + value + '&';\n }, '');\n paramStr = paramStr.substr(0, paramStr.length - 1);\n var options = {\n hostname: 'translate.google.cn',\n port: 443,\n parth: '/translate_a/single' + '?' + paramStr,\n method: 'GET',\n header: {\n ':authority': 'translate.google.cn',\n ':method': 'GET',\n ':path': '/translate_a/single?client=webapp&sl=zh-CN&tl=zh-TW&hl=zh-CN&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&otf=1&ssel=0&tsel=0&kc=1&tk=156578.327048&q=%E5%A4%A7%E5%B0%8F',\n ':scheme': 'https',\n 'accept': '*/*',\n 'accept-encoding': 'gzip, deflate, br',\n 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ko;q=0.6,ja;q=0.5,zh-TW;q=0.4',\n 'cookie': '_ga=GA1.3.218848242.1557732963; NID=183=bNPRYdO5-MN3A4UUG5KlmsEc4HEOCalDZCXgD436IkmVqbOCk1GFr4Iw-X0wuNqjAdwO8CLfYplPCPlGtXCx8qPE0XLWj_F8VDQoWycplLgFpDjZ0p83wm--M4TVXRWMlHNYr8Np5Ik7KlHR-7VGey5Zg68ajHb70JJynEd25VE; _gid=GA1.3.1016028292.1561342885; 1P_JAR=2019-6-24-3',\n 'referer': 'https://translate.google.cn/',\n 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36',\n 'x-client-data': 'CIS2yQEIo7bJAQjBtskBCNC3yQEIqZ3KAQioo8oBCLGnygEI4qjKAQjxqcoBCJatygEIxa3KAQifrsoB',\n }\n };\n\n console.log('paramStr',paramStr)\n\n var req = https.request(options, function (res) {\n res.setEncoding('utf8');\n res.on('data', function (chunk) {\n console.log('BODY: ' + chunk);\n });\n });\n req.on('error', function (e) {\n console.error('请求失败');\n console.error(e);\n });\n req.end();\n}", "title": "" }, { "docid": "17041ffeee0b93f6060ed92a6f5ff00f", "score": "0.5749292", "text": "function translate(key) {\n \"use strict\";\n if (langData.hasOwnProperty(lang)) {\n if (langData[lang].hasOwnProperty(key)) {\n return langData[lang][key];\n } else {\n return \"Undefined\";\n }\n } else {\n return \"Undefined\";\n }\n}", "title": "" }, { "docid": "e5780afa86d2e61a4ce7f65c62a6d12a", "score": "0.57455355", "text": "function t(e,t,a,n){switch(a){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": "e5780afa86d2e61a4ce7f65c62a6d12a", "score": "0.57455355", "text": "function t(e,t,a,n){switch(a){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": "ef6c45385b1ecbaf6cc40f7cc2c5c88d", "score": "0.5742541", "text": "function t(e,t,n){var r={ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"хвіліна_хвіліны_хвілін\":\"хвіліну_хвіліны_хвілін\",hh:t?\"гадзіна_гадзіны_гадзін\":\"гадзіну_гадзіны_гадзін\",dd:\"дзень_дні_дзён\",MM:\"месяц_месяцы_месяцаў\",yy:\"год_гады_гадоў\"};return\"m\"===n?t?\"хвіліна\":\"хвіліну\":\"h\"===n?t?\"гадзіна\":\"гадзіну\":e+\" \"+function(e,t){var n=e.split(\"_\");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}(r[n],+e)}", "title": "" }, { "docid": "cf287131610bbc8d97a532ba883d313d", "score": "0.57387656", "text": "function ui(e,t,n,a){var i={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?i[n][0]:i[n][1]}", "title": "" }, { "docid": "d4f8e5f66f1b8a1659fd4e827e40ecbe", "score": "0.5735933", "text": "function t(e,t,n,i){var s={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return i?s[n][0]:s[n][1]}", "title": "" }, { "docid": "d4f8e5f66f1b8a1659fd4e827e40ecbe", "score": "0.5735933", "text": "function t(e,t,n,i){var s={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return i?s[n][0]:s[n][1]}", "title": "" }, { "docid": "880025685d0ba2c139ab57b7b91059a8", "score": "0.5732651", "text": "function t(e,t,n,o){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "fe5e1b38cb437ace7a4eb1fdfe7ed75d", "score": "0.57314897", "text": "function t(e,t,n){var r,a,i={ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"хвіліна_хвіліны_хвілін\":\"хвіліну_хвіліны_хвілін\",hh:t?\"гадзіна_гадзіны_гадзін\":\"гадзіну_гадзіны_гадзін\",dd:\"дзень_дні_дзён\",MM:\"месяц_месяцы_месяцаў\",yy:\"год_гады_гадоў\"};return\"m\"===n?t?\"хвіліна\":\"хвіліну\":\"h\"===n?t?\"гадзіна\":\"гадзіну\":e+\" \"+(r=+e,a=i[n].split(\"_\"),r%10==1&&r%100!=11?a[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?a[1]:a[2])}", "title": "" }, { "docid": "fe5e1b38cb437ace7a4eb1fdfe7ed75d", "score": "0.57314897", "text": "function t(e,t,n){var r,a,i={ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"хвіліна_хвіліны_хвілін\":\"хвіліну_хвіліны_хвілін\",hh:t?\"гадзіна_гадзіны_гадзін\":\"гадзіну_гадзіны_гадзін\",dd:\"дзень_дні_дзён\",MM:\"месяц_месяцы_месяцаў\",yy:\"год_гады_гадоў\"};return\"m\"===n?t?\"хвіліна\":\"хвіліну\":\"h\"===n?t?\"гадзіна\":\"гадзіну\":e+\" \"+(r=+e,a=i[n].split(\"_\"),r%10==1&&r%100!=11?a[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?a[1]:a[2])}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "7cf31c1f87000ab399f84299242a9631", "score": "0.57304543", "text": "function t(e,t,n,i){switch(n){case\"s\":return t?\"хэдхэн секунд\":\"хэдхэн секундын\";case\"ss\":return e+(t?\" секунд\":\" секундын\");case\"m\":case\"mm\":return e+(t?\" минут\":\" минутын\");case\"h\":case\"hh\":return e+(t?\" цаг\":\" цагийн\");case\"d\":case\"dd\":return e+(t?\" өдөр\":\" өдрийн\");case\"M\":case\"MM\":return e+(t?\" сар\":\" сарын\");case\"y\":case\"yy\":return e+(t?\" жил\":\" жилийн\");default:return e}}", "title": "" }, { "docid": "8418e5773810dc35e8304106033ea093", "score": "0.57296914", "text": "function t(e,t,i,n){var s={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return n?s[i][0]:s[i][1]}", "title": "" }, { "docid": "5a1d408b462500fb976b0cbce178086b", "score": "0.5726291", "text": "function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n default:\n return number;}\n\n }", "title": "" }, { "docid": "0664b1d9cf975c0a06fa38575391721a", "score": "0.57249796", "text": "function t(e,t,i,n){switch(i){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": "52b64fbfa48bc95d11ed241ebbfa874b", "score": "0.5722048", "text": "protected internal function m252() {}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "dcff6d3b3d428aa5b3a731414165d9b8", "score": "0.5701931", "text": "function t(e,t,n,a){var r={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return a?r[n][0]:r[n][1]}", "title": "" }, { "docid": "a6b163abcbf941402142dbbe17552fbb", "score": "0.57009006", "text": "function TI18n(){}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" }, { "docid": "0c40bcef93b55f716aa48ecbd89c67ce", "score": "0.57001716", "text": "function t(e,t,n,r){var a={s:[\"थोडया सॅकंडांनी\",\"थोडे सॅकंड\"],ss:[e+\" सॅकंडांनी\",e+\" सॅकंड\"],m:[\"एका मिणटान\",\"एक मिनूट\"],mm:[e+\" मिणटांनी\",e+\" मिणटां\"],h:[\"एका वरान\",\"एक वर\"],hh:[e+\" वरांनी\",e+\" वरां\"],d:[\"एका दिसान\",\"एक दीस\"],dd:[e+\" दिसांनी\",e+\" दीस\"],M:[\"एका म्हयन्यान\",\"एक म्हयनो\"],MM:[e+\" म्हयन्यानी\",e+\" म्हयने\"],y:[\"एका वर्सान\",\"एक वर्स\"],yy:[e+\" वर्सांनी\",e+\" वर्सां\"]};return r?a[n][0]:a[n][1]}", "title": "" } ]
21c6e6ed2258fee4b229736bd350201e
Dummy constructor functions that we use as the .constructor and .constructor.prototype properties for functions that return Generator objects. For full spec compliance, you may wish to configure your minifier not to mangle the names of these two functions.
[ { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.0", "text": "function Generator() {}", "title": "" } ]
[ { "docid": "3a0df0814032bf6fe65ab66f00f794d1", "score": "0.7217743", "text": "function tempCtor() {}", "title": "" }, { "docid": "0ed778c92d09b7e19119b756eabcb307", "score": "0.70240647", "text": "function temporaryConstructor() {}", "title": "" }, { "docid": "57eb0dae55206821eb04e46a89693c11", "score": "0.69522345", "text": "function TempCtor() {}", "title": "" }, { "docid": "57eb0dae55206821eb04e46a89693c11", "score": "0.69522345", "text": "function TempCtor() {}", "title": "" }, { "docid": "57eb0dae55206821eb04e46a89693c11", "score": "0.69522345", "text": "function TempCtor() {}", "title": "" }, { "docid": "57eb0dae55206821eb04e46a89693c11", "score": "0.69522345", "text": "function TempCtor() {}", "title": "" }, { "docid": "57eb0dae55206821eb04e46a89693c11", "score": "0.69522345", "text": "function TempCtor() {}", "title": "" }, { "docid": "57eb0dae55206821eb04e46a89693c11", "score": "0.69522345", "text": "function TempCtor() {}", "title": "" }, { "docid": "a64990ad88a2f4f41d21d275c154d1ee", "score": "0.67609185", "text": "function HelperConstructor() {}", "title": "" }, { "docid": "97412bb4e367d33b0e22e2a9210df613", "score": "0.6599183", "text": "function DummyClass() {\r\n // All construction is actually done in the construct method\r\n if ( !init && this.construct )\r\n this.construct.apply(this, arguments);\r\n }", "title": "" }, { "docid": "f7c71079e81c3353ce1f79449166bb1d", "score": "0.65726477", "text": "function Constructor() {}", "title": "" }, { "docid": "f7c71079e81c3353ce1f79449166bb1d", "score": "0.65726477", "text": "function Constructor() {}", "title": "" }, { "docid": "f7c71079e81c3353ce1f79449166bb1d", "score": "0.65726477", "text": "function Constructor() {}", "title": "" }, { "docid": "4afee93d45515f28f6e4ce6c2d544ee4", "score": "0.6487231", "text": "function Ctor() {}", "title": "" }, { "docid": "7f58b93841fb12b1189524352b8113d4", "score": "0.64442104", "text": "function SomeConstructor() {\n\n}", "title": "" }, { "docid": "45cba8b62c928db848e214faf18c602a", "score": "0.64004076", "text": "__init2() {this.noAnonFunctionType = false}", "title": "" }, { "docid": "087025b5607124428735874e4980c64e", "score": "0.6395088", "text": "function GeneratorClass () {}", "title": "" }, { "docid": "53ab2e25dea57be8d94cb924039cae72", "score": "0.63756734", "text": "function Dummy() {}", "title": "" }, { "docid": "53ab2e25dea57be8d94cb924039cae72", "score": "0.63756734", "text": "function Dummy() {}", "title": "" }, { "docid": "c39c0349fff397f31196a6832dee54ad", "score": "0.6339147", "text": "function Ctor() {\n\t// Empty...\n}", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "254dccd7c058e6d30f7c95013df9dd36", "score": "0.627675", "text": "function ctor() {\n return function(){};\n }", "title": "" }, { "docid": "6de1fadd6542182e5acbecfbe9fd859a", "score": "0.6268898", "text": "function $makeBlank(ctor)\n{\n var blank = function() {};\n blank.prototype = ctor.prototype;\n return blank;\n}", "title": "" }, { "docid": "cf345626c9c0baaa190d13a7115c4fda", "score": "0.6205371", "text": "function new_constructor(extend, initializer, methods){\n\t\t\tvar func,\n\t\t\t\tmethodsArr,\n\t\t\t\tmethodsLen,\n\t\t\t\tk,\n\t\t\t\tprototype = Object.create(extend && extend.prototype);\t// ES5, but backup function provided above\n\t\t\t\n\t\t\tif(methods){\n\t\t\t\tmethodsArr = Object.keys(methods);\t\t\t\t\t\t// ES5, but backup function provided above\n\t\t\t\tmethodsLen = methodsArr.length;\n\t\t\t\tfor(k = methodsLen; k--;){\n\t\t\t\t\tprototype[methodsArr[k]] = methods[methodsArr[k]];\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunc = function(){\t\t\n\t\t\t\tvar that = Object.create(prototype);\t\t\t\t\t// ES5, but backup function provided above\n\t\t\t\tif(typeof initializer === \"function\"){\n\t\t\t\t\tinitializer.apply(that, arguments);\n\t\t\t\t}\n\t\t\t\treturn that;\n\t\t\t};\n\t\t\t\n\t\t\tfunc.prototype = prototype;\n\t\t\tprototype.constructor = func;\n\t\t\treturn func;\n\t\t}", "title": "" }, { "docid": "73ae994272f7a3b8687704519392a1fc", "score": "0.6197846", "text": "function makeObjectWithFakeCtor() {\n function fakeCtor() {\n }\n fakeCtor.prototype = ctor.prototype;\n return new fakeCtor();\n }", "title": "" }, { "docid": "ceb2a01f1518a7ab187a365c546658fa", "score": "0.61959124", "text": "function o(e,t,n){try{return{type:\"normal\",arg:e.call(t,n)}}catch(e){return{type:\"throw\",arg:e}}}// Dummy constructor functions that we use as the .constructor and", "title": "" }, { "docid": "24a8f7cc611a2d744f01ea24b389b803", "score": "0.6125976", "text": "function r(e,t,o){try{return{type:\"normal\",arg:e.call(t,o)}}catch(e){return{type:\"throw\",arg:e}}}// Dummy constructor functions that we use as the .constructor and", "title": "" }, { "docid": "3efcea846ffb48966558f20639909f5f", "score": "0.6084226", "text": "function new_constructor(initializer, methods, extend) {\n var prototype = Object.create(typeof extend === 'function'\n ? extend.prototype\n : extend);\n if (methods) {\n methods.keys().forEach(function (key) {\n prototype[key] = methods[key];\n}); }\n function constructor() {\n var that = Object.create(prototype);\n if (typeof initializer === 'function') {\n initializer.apply(that, arguments);\n }\n return that;\n }\n constructor.prototype = prototype;\n prototype.constructor = constructor;\n return constructor;\n }", "title": "" }, { "docid": "b762ba73dbe0c6e8acc47c8b94fa5559", "score": "0.6050084", "text": "function _ctor() {\n\t}", "title": "" }, { "docid": "82500c0e80d7ea5efbb2e1414fcb699a", "score": "0.60455483", "text": "function simpleConstructor(bases){\n\t\treturn function(){\n\t\t\tvar a = arguments, i = 0, f, m;\n\n\t\t\tif(!(this instanceof a.callee)){\n\t\t\t\t// not called via new, so force it\n\t\t\t\treturn applyNew(a);\n\t\t\t}\n\n\t\t\t//this._inherited = {};\n\t\t\t// perform the shaman's rituals of the original dojo.declare()\n\t\t\t// 1) do not call the preamble\n\t\t\t// 2) call the top constructor (it can use this.inherited())\n\t\t\tfor(; f = bases[i]; ++i){ // intentional assignment\n\t\t\t\tm = f._meta;\n\t\t\t\tf = m ? m.ctor : f;\n\t\t\t\tif(f){\n\t\t\t\t\tf.apply(this, a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 3) call the postscript\n\t\t\tf = this.postscript;\n\t\t\tif(f){\n\t\t\t\tf.apply(this, a);\n\t\t\t}\n\t\t};\n\t}", "title": "" }, { "docid": "fd759fb495d691211f8a9608b4398dd7", "score": "0.60171443", "text": "function Clazz () {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "586732913259f371782836682c53342e", "score": "0.6008265", "text": "constructor() {}", "title": "" }, { "docid": "2ce013a8111e7e57aeeb8a7014bfc095", "score": "0.5980389", "text": "function c(a,b,c){try{return{type:\"normal\",arg:a.call(b,c)}}catch(a){return{type:\"throw\",arg:a}}}// Dummy constructor functions that we use as the .constructor and", "title": "" }, { "docid": "452ed63bc202889b040ef739579d829b", "score": "0.5963857", "text": "function SpoofConstructor(name){\n this.name=\"I am \" + name;\n return {name:\"I am Deadpool\"};\n}", "title": "" }, { "docid": "4af4bdf523fc850c0240877766cb3a40", "score": "0.59467715", "text": "function SimpleClass() {\n }", "title": "" }, { "docid": "4ad7f98553b03dac61770c3da7cd1a9d", "score": "0.5916565", "text": "function simpleConstructor(bases){\n\t\treturn function(){\n\t\t\tvar a = arguments, i = 0, f, m;\n\n\t\t\tif(!(this instanceof a.callee)){\n\t\t\t\t// not called via new, so force it\n\t\t\t\treturn applyNew(a);\n\t\t\t}\n\n\t\t\t//this._inherited = {};\n\t\t\t// perform the shaman's rituals of the original declare()\n\t\t\t// 1) do not call the preamble\n\t\t\t// 2) call the top constructor (it can use this.inherited())\n\t\t\tfor(; f = bases[i]; ++i){ // intentional assignment\n\t\t\t\tm = f._meta;\n\t\t\t\tf = m ? m.ctor : f;\n\t\t\t\tif(f){\n\t\t\t\t\tf.apply(this, a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 3) call the postscript\n\t\t\tf = this.postscript;\n\t\t\tif(f){\n\t\t\t\tf.apply(this, a);\n\t\t\t}\n\t\t};\n\t}", "title": "" }, { "docid": "4ad7f98553b03dac61770c3da7cd1a9d", "score": "0.5916565", "text": "function simpleConstructor(bases){\n\t\treturn function(){\n\t\t\tvar a = arguments, i = 0, f, m;\n\n\t\t\tif(!(this instanceof a.callee)){\n\t\t\t\t// not called via new, so force it\n\t\t\t\treturn applyNew(a);\n\t\t\t}\n\n\t\t\t//this._inherited = {};\n\t\t\t// perform the shaman's rituals of the original declare()\n\t\t\t// 1) do not call the preamble\n\t\t\t// 2) call the top constructor (it can use this.inherited())\n\t\t\tfor(; f = bases[i]; ++i){ // intentional assignment\n\t\t\t\tm = f._meta;\n\t\t\t\tf = m ? m.ctor : f;\n\t\t\t\tif(f){\n\t\t\t\t\tf.apply(this, a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 3) call the postscript\n\t\t\tf = this.postscript;\n\t\t\tif(f){\n\t\t\t\tf.apply(this, a);\n\t\t\t}\n\t\t};\n\t}", "title": "" }, { "docid": "c3eb3bf8ccb7e69c9aeb767521f5e8c6", "score": "0.58940154", "text": "function asCtor(constr) {\n return primFreeze(asCtorOnly(constr));\n }", "title": "" }, { "docid": "b0f2deb9d8c90f1dd1aa5465fab74d09", "score": "0.58866996", "text": "function Proto() {\n\n // empty functions\n}", "title": "" }, { "docid": "a72ed9fe174bbfac266ef4aeee6219ac", "score": "0.5856667", "text": "function createConstructor(name, opts) {\n\t var func = create.bind(null, name);\n\n\t // Assigning defaults gives a predictable definition and prevents us from\n\t // having to do defaults checks everywhere.\n\t assign(func, defaults);\n\n\t // Inherit all options. This takes into account object literals as well as\n\t // ES2015 classes that may have inherited static props which would not be\n\t // considered \"own\".\n\t utilDefineProperties(func, getAllPropertyDescriptors(opts));\n\n\t return func;\n\t}", "title": "" }, { "docid": "985d741711e91e0b8165e92c95d82cef", "score": "0.5854825", "text": "function markCtor(constr, opt_Sup, opt_name) {\n enforceType(constr, 'function', opt_name);\n if (isFunc(constr)) {\n fail(\"Simple functions can't be constructors: \", constr);\n }\n if (isXo4aFunc(constr)) {\n fail(\"Exophoric functions can't be constructors: \", constr);\n }\n constr.CONSTRUCTOR___ = true;\n if (opt_Sup) {\n derive(constr, opt_Sup);\n } else if (constr !== Object) {\n fail('Only \"Object\" has no super: ', constr);\n }\n if (opt_name) {\n constr.NAME___ = String(opt_name);\n }\n if (constr !== Object && constr !== Array) {\n // Iff constr is not Object nor Array, then any object inheriting from\n // constr.prototype is a constructed object which therefore tames to\n // itself by default. We do this with AS_TAMED___ and AS_FERAL___\n // methods on the prototype so it can be overridden either by overriding\n // these methods or by pre-taming with ___.tamesTo or ___.tamesToSelf.\n constr.prototype.AS_TAMED___ =\n constr.prototype.AS_FERAL___ = function() {\n return this;\n };\n }\n return constr; // translator freezes constructor later\n }", "title": "" }, { "docid": "a7764a55d605f7cc057e7432110f8ea9", "score": "0.582639", "text": "function FooObj(){}", "title": "" }, { "docid": "7807f5032cc6bbf0aca154ca8eca379a", "score": "0.57970196", "text": "function getBlockedFunctionConstructor() {\n\n\t\t\tfunction FakeFunction(execCode) {\n\t\t\t\tvar code = \"FUNCTION_CONSTRUCTOR_DETECTED\";\n\t\t\t\tvar message = \"function constructor with code: \" + execCode;\n\t\t\t\terror = {code: code, message: message};\n\n\t\t\t\treturn function() {};\n\t\t\t}\n\n\t\t\treturn FakeFunction;\n\t\t}", "title": "" }, { "docid": "d70a588c9c8603d0d6763381e733fdbd", "score": "0.5790772", "text": "constructor( ) {}", "title": "" }, { "docid": "785f102278dc0fc3fd0da22500bb9bfe", "score": "0.5786515", "text": "function Foo() { /* .. */ }", "title": "" }, { "docid": "6669f18c6942337d155c2b110a14d3a9", "score": "0.57862616", "text": "function Ctor() {\r\n }", "title": "" }, { "docid": "ebad0346c9010e7f280a52067c979eb3", "score": "0.5755636", "text": "function Generator() {} // 80", "title": "" }, { "docid": "6d7c4236c5172568cbeefead831c0a27", "score": "0.57448053", "text": "function YourConstructor() {\n\t// initialization\n}", "title": "" }, { "docid": "f20b62b1f2217018585570f2a1fa49ae", "score": "0.574112", "text": "static clear() {\n CallbackConstructorRegistry.constructors = {};\n }", "title": "" }, { "docid": "8bf9187596a93a6be28b1817e3b0aba6", "score": "0.57363415", "text": "function Generator() {} // 84", "title": "" }, { "docid": "35ba9e798ee3936a88ee952d284b29d1", "score": "0.5728702", "text": "constructur() {}", "title": "" }, { "docid": "5ed6f6785f3c09aec04924d133985d7d", "score": "0.5698529", "text": "function populateConstructorExports(exports,codes,HttpError){codes.forEach(function forEachCode(code){var CodeError;var name=toIdentifier(statuses[code]);switch(codeClass(code)){case 400:CodeError=createClientErrorConstructor(HttpError,name,code);break;case 500:CodeError=createServerErrorConstructor(HttpError,name,code);break;}if(CodeError){// export the constructor\nexports[code]=CodeError;exports[name]=CodeError;}});// backwards-compatibility\nexports[\"I'mateapot\"]=deprecate.function(exports.ImATeapot,'\"I\\'mateapot\"; use \"ImATeapot\" instead');}", "title": "" }, { "docid": "e7f8b27591ce4fe6020655dc6ef60f43", "score": "0.5681321", "text": "function ctor() {\n this.constructor = ChildFunc;\n }", "title": "" }, { "docid": "4b380023d0c8e9a5ab64f52bd866f89f", "score": "0.568119", "text": "function Foo() { .. }", "title": "" }, { "docid": "a2b87ca7fb3bab17eec4813b72db97a9", "score": "0.5674163", "text": "function make_class(){\n\tvar isInternal;\n\tvar constructor = function(args){\n if ( this instanceof constructor ) {\n\t\tif ( typeof this.init == \"function\" ) {\n this.init.apply( this, isInternal ? args : arguments );\n\t\t}\n } else {\n\t\tisInternal = true;\n\t\tvar instance = new constructor( arguments );\n\t\tisInternal = false;\n\t\treturn instance;\n }\n\t};\n\treturn constructor;\n }", "title": "" }, { "docid": "a2b87ca7fb3bab17eec4813b72db97a9", "score": "0.5674163", "text": "function make_class(){\n\tvar isInternal;\n\tvar constructor = function(args){\n if ( this instanceof constructor ) {\n\t\tif ( typeof this.init == \"function\" ) {\n this.init.apply( this, isInternal ? args : arguments );\n\t\t}\n } else {\n\t\tisInternal = true;\n\t\tvar instance = new constructor( arguments );\n\t\tisInternal = false;\n\t\treturn instance;\n }\n\t};\n\treturn constructor;\n }", "title": "" }, { "docid": "16a47861159046dc7590ae9341dad244", "score": "0.5670773", "text": "constructor(){}", "title": "" }, { "docid": "16a47861159046dc7590ae9341dad244", "score": "0.5670773", "text": "constructor(){}", "title": "" }, { "docid": "16a47861159046dc7590ae9341dad244", "score": "0.5670773", "text": "constructor(){}", "title": "" }, { "docid": "16a47861159046dc7590ae9341dad244", "score": "0.5670773", "text": "constructor(){}", "title": "" } ]
8f9d542723ba8351681df2024f2603e8
Code angepasst Vorlesung Ende
[ { "docid": "9612ee0830cb0b6dc0fff87e1cce55ed", "score": "0.0", "text": "function handleMouseDown() {\n //if (kugelpreis[i] == \"Schmuck\") {\n //stepper[i] = <HTMLInputElement>document.getElementById(\"stepper\" + i);\n //Test console.log(\"Einfache Preisrechnung\" + \" \" + (baumpreis[1] + lichtpreis[1] + (kugelpreis * 2) + lamettapreis + staenderpreis[1]) + \"€\")\n console.log(\"Preisrechnung\" + \" \" + (baumrechnung + lichtrechnung + (L10.kugelpreis * kugelrechnung) + lamettarechnung + staenderrechnung) + \"€\");\n console.log(L10.kugelpreis * kugelrechnung);\n }", "title": "" } ]
[ { "docid": "80827b078cb89ee43b5f3e91c006b29c", "score": "0.7089462", "text": "get code () {\r\n\t\treturn this._code;\r\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.7030341", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.68775666", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.68775666", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.68775666", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.68775666", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "e21fad2f10f825a84582d6b81f254929", "score": "0.65558493", "text": "nextCode() {\n\t\t\tconst { curr } = this\n\t\t\tif (curr[4] === null) curr[4] = curr[2] < this.orglen ? curr[0].charCodeAt(curr[1]) : 0\n\t\t\treturn curr[4]\n\t\t}", "title": "" }, { "docid": "b5e0b8d812a54a015a29c72754db986d", "score": "0.6442049", "text": "function setCode(c) {\n code = c;\n }", "title": "" }, { "docid": "ded8a80877bedb08ad67b06ed489884e", "score": "0.6432462", "text": "code() {\n return getPieceCode(this.name());\n }", "title": "" }, { "docid": "523825daac17802f4c4ea445ac0fec05", "score": "0.6379171", "text": "get CODE() {\n return CODE;\n }", "title": "" }, { "docid": "39902f0071f920119bfa26a7f271cd4e", "score": "0.63145953", "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": "1c18ddccde14bfcb125b84c92b55f658", "score": "0.62698054", "text": "getGerman(code){\n for(var i in this.codes){\n if(this.codes[i].code == code){\n return this.codes[i].de;\n }\n }\n throw \"code \" + code + \" not found\";\n }", "title": "" }, { "docid": "068e646095a37ad0f3ba5cc8ad52964e", "score": "0.6231979", "text": "function recogerCod(_codigo){\r\n\t_cod=_codigo;\r\n}", "title": "" }, { "docid": "89a8b5759474c9f7485d81e23976d0cd", "score": "0.61793303", "text": "get codes() { return this._codes; }", "title": "" }, { "docid": "8ff81d296ca3b1b228ac03fe4343f472", "score": "0.6164817", "text": "function cHR(TheCode) {\n \"use strict\";\n return String.fromCharCode(TheCode);\n}", "title": "" }, { "docid": "18521eb55b4ee38fdf158416df2e82ae", "score": "0.61249", "text": "function getCodeMsg(code) {\n switch (code){\n case 200:\n return \"OK\";\n case 301:\n return \"Moved Permanently\";\n case 302:\n return \"Moved Temporarily\";\n case 303:\n return \"See Other\";\n case 400:\n return \"Bad Request\";\n case 404:\n return \"Not Found\";\n case 500:\n return \"Server Error\";\n default:\n return \"Unmatched Code\";\n }\n}", "title": "" }, { "docid": "3c345abf55373d50ea2c5e633c6f4097", "score": "0.6110677", "text": "function toCode(code) {\n return code && code.slice(0, 12);\n }", "title": "" }, { "docid": "1655db00a6354a8378c47590300c1db9", "score": "0.609534", "text": "get isCode() {\n return true;\n }", "title": "" }, { "docid": "9a99e55d975e926d4a3ae531d0c7bb24", "score": "0.60949516", "text": "function getEngineCode(data) {\r\n var domain = URI.parse(data.u).host_without_www;\r\n var code = '';\r\n\r\n for(item in engineCodes) {\r\n if(domain.indexOf(item) >= 0) {\r\n code = engineCodes[item];\r\n break;\r\n }\r\n }\r\n\r\n return code;\r\n }", "title": "" }, { "docid": "c01e9115654e123a9b464942c8507e87", "score": "0.60714734", "text": "function getLanguageCode(){\n var code;\n if (language == 'english'){\n code = 'en'\n }else if(language == 'chinese'){\n code = 'zh'\n }else{\n code = 'ms'\n }\n return code;\n }", "title": "" }, { "docid": "c01e9115654e123a9b464942c8507e87", "score": "0.60714734", "text": "function getLanguageCode(){\n var code;\n if (language == 'english'){\n code = 'en'\n }else if(language == 'chinese'){\n code = 'zh'\n }else{\n code = 'ms'\n }\n return code;\n }", "title": "" }, { "docid": "e603699592fb63bc9554150e29c176f6", "score": "0.60571885", "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.60571885", "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.60571885", "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": "32264c0f0dee154609a5518a3308aa49", "score": "0.605411", "text": "function code() {\n\tcod=codetext.value;\n\tmal=pin.value;\n\tkim='';\n\toutputPSW.innerHTML='';\n\text=[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"e\",\"r\",\"t\",\"z\",\"u\",\"i\",\"o\",\"p\",\"ő\",\" \",\"ú\",\"ö\",\"ü\",\"ó\",\"a\",\"s\",\"d\",\"f\",\"g\",\"h\",\"j\",\"k\",\"l\",\"é\",\"á\",\"ű\",\"í\",\"y\",\"c\",\"v\",\"b\",\"n\",\"m\",\",\",\".\",\"!\",\"?\",\"E\",\"R\",\"T\",\"Z\",\"U\",\"I\",\"O\",\"P\",\"Ő\",\"Ú\",\"Ö\",\"Ü\",\"Ó\",\"A\",\"S\",\"D\",\"F\",\"G\",\"H\",\"J\",\"K\",\"L\",\"É\",\"Á\",\"Ű\",\"Í\",\"Y\",\"C\",\"V\",\"B\",\"N\",\"M\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"-\",\"@\",\"_\",\":\",\"=\",\"q\",\"w\",\"Q\",\"W\",\"X\",\"x\"];\n\t\t\tconsole.log('start');\n\t\tif (cod.length>50)\n\t\t{\n\t\toutputPSW.innerHTML='<b>Hiba! a TapCoder2 jelenleg csak 9 karakternél rövidebb kódot tud írni/olvasni. </b>'\n\t\t}\n\t\telse \n\t\t{\n\t\tfor (i=0;i<cod.length;i++)\n\t\t{\n\t\t\tfor (j=0;j<ext.length;j++)\n\t\t\t{ \n\t\t\t\n\t\t\t\tif (ext[j]==cod.charAt(i))\n\t\t\t\t{\n\t\t\t\tkim+=String(j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\tconsole.log(kim);\n\t\t\toutputPSW.innerHTML+=String(String(kim));\n\t\t}//else\n\t}//fun", "title": "" }, { "docid": "3e7f555358b0bbbfd9d1ed877746c7c5", "score": "0.6042527", "text": "get code() { return gLanguage; }", "title": "" }, { "docid": "3e7f555358b0bbbfd9d1ed877746c7c5", "score": "0.6042527", "text": "get code() { return gLanguage; }", "title": "" }, { "docid": "95817dd9a8065bbf31c4a97edb39a173", "score": "0.60404027", "text": "getCode () { \n /* gethost */\n var code=null;\n var domain=functions.getAllUrl(); \n var appid = this.appid;\n code = this.getUrlCode().code // 截取code\n if (code == null || code === '') { // 如果没有code,则去请求\n window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${domain}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`;\n }\n return code;\n }", "title": "" }, { "docid": "39cac871758fb6928c6bb843187d0863", "score": "0.6022944", "text": "getEnglish(code){\n for(var i in this.codes){\n if(this.codes[i].code == code){\n return this.codes[i].en;\n }\n }\n throw \"code \" + code + \" not found\";\n }", "title": "" }, { "docid": "c74828b9f6293494268628643d2be417", "score": "0.6022892", "text": "function getModifiedLanguageCode (code) {\n switch (code) {\n case 'en':\n return 'en_US';\n case 'es':\n return 'es_ES';\n case 'fr':\n return 'fr_FR';\n default:\n return code;\n }\n}", "title": "" }, { "docid": "bfe49b865c08c75f0e80864c7a826a31", "score": "0.6016982", "text": "nextAvailableCode (){\n for(let i= \"A\".charCodeAt(0); i <= \"Z\".charCodeAt(0); i++){\n let c = String.fromCharCode(i);\n if (! (c in this.code2c))\n return c;\n }\n return null;\n }", "title": "" }, { "docid": "f8aca595b9c0ecdbcc4a685313e5b948", "score": "0.6005749", "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": "f8d7ac8d00dca2354f173f2957999809", "score": "0.5978881", "text": "getCode(term){\n term = term.toLowerCase();\n for(var i in this.codes){\n if(this.codes[i].de.toLowerCase() == term || this.codes[i].en.toLowerCase() == term){\n return this.codes[i].code;\n }\n }\n throw \"term <\" + term + \"> not found\";\n }", "title": "" }, { "docid": "0abac54772e4abc51f25bb85205bf731", "score": "0.5953215", "text": "getCodeNorm() {\n const c = this.getCode();\n return c === NL_LIKE ? NL : c;\n }", "title": "" }, { "docid": "ef2b520b6bb7cc354b4eab4841d5e262", "score": "0.5915663", "text": "function getStatusText(code){\nswitch(code) {\n\tcase 100:\n\t\tstatusText = \"Buch oder Benutzer scannen\";\n\t\tbreak;\n\tcase 200:\n\t\tstatusText = \"Ausleihvorgang abgeschlossen. Bereit für neuen Vorgang\";\n\t\tbreak;\n\tcase 201:\n\t\tstatusText = \"Kontoinformationen nebenstehend\";\n\t\tbreak;\n\tcase 202:\n\t\tstatusText = \"Artikelinformationen nebenstehend\";\n\t\tbreak;\n\tcase 203:\n\t\tstatusText = \"Artikel zurückgegeben!\";\n\t\tbreak;\n\tcase 300:\n\t\tstatusText = \"Buch scannen um Vorgang abzuschließen\";\n\t\tbreak;\n\tcase 402:\n\t\tstatusText = \"Beginnen Sie die Ausleihe mit einem Buch!\";\n\t\tbreak;\n\tcase 403:\n\t\tstatusText = \"Artikel ist nicht verliehen!\";\n\t\tbreak;\n\tcase 404:\n\t\tstatusText = \"Barcode ist keinem Benutzer zugeordnet\";\n\t\tbreak;\n\tcase 405:\n\t\tstatusText = \"Barcode ist keinem Buch zugeordnet!\";\n\t\tbreak;\n\tcase 406:\n\t\tstatusText = \"Artikel nicht verfügbar! Neues Buch scannen!\";\n\t\tbreak;\n\tcase 407:\n\t\tstatusText = \"Dieser Artikel ist zur Zeit verliehen!\";\n\t\tbreak;\n\tcase 408:\n\t\tstatusText = \"Ungültiger Barcode!\";\n\t\tbreak;\n\tcase 409:\n\t\tstatusText = \"identischer Scan bereits erfolgt!\";\n\t\tbreak;\n\tcase 410:\n\t\tstatusText = \"Barcode mehrfach vorhanden! Führen Sie eine Doublettenprüfung durch!\";\n\t\tbreak;\n\tdefault:\n\t\tstatusText = \"\";\n\t\tbreak;\n}\nreturn statusText;\n}", "title": "" }, { "docid": "051eeedc033d7ef4a152812af724f38c", "score": "0.58711547", "text": "static code(message) {\n\t\treturn this._evaluate(message, true)\n\t}", "title": "" }, { "docid": "63c270921715b091e0c5ad7ba65b53c5", "score": "0.5862791", "text": "get usedCode() {\n\t\treturn this.__usedCode;\n\t}", "title": "" }, { "docid": "f2a526c679de38101ea70db8e2d6a7a4", "score": "0.5859223", "text": "get valueCode () {\n\t\treturn this._valueCode;\n\t}", "title": "" }, { "docid": "ae6dda04eb580a730ba746e024023c09", "score": "0.5848829", "text": "function VerifyErroCode(errorCode) {\n switch (errorCode) {\n case 'auth/app-deleted':\n return 'O banco de dados não foi localizado.';\n case 'auth/expired-action-code':\n return 'O código da ação o ou link expirou.';\n case 'auth/invalid-action-code':\n return 'O código da ação é inválido. Isso pode acontecer se o código estiver malformado ou já tiver sido usado.';\n case 'auth/user-disabled':\n return 'O usuário correspondente à credencial fornecida foi desativado.';\n case 'auth/user-not-found':\n return 'O usuário não correponde à nenhuma credencial.';\n case 'auth/weak-password':\n return 'A senha é muito fraca.';\n case 'auth/email-already-in-use':\n return 'Já existi uma conta com o endereço de email fornecido.';\n case 'auth/invalid-email':\n return 'O endereço de e-mail não é válido.';\n case 'auth/operation-not-allowed':\n return 'O tipo de conta correspondente à esta credencial, ainda não encontra-se ativada.';\n case 'auth/account-exists-with-different-credential':\n return 'E-mail já associado a outra conta.';\n case 'auth/auth-domain-config-required':\n return 'A configuração para autenticação não foi fornecida.';\n case 'auth/credential-already-in-use':\n return 'Já existe uma conta para esta credencial.';\n case 'auth/operation-not-supported-in-this-environment':\n return 'Esta operação não é suportada no ambiente que está sendo executada. Verifique se deve ser http ou https.';\n case 'auth/timeout':\n return 'Excedido o tempo de resposta. O domínio pode não estar autorizado para realizar operações.';\n case 'auth/missing-android-pkg-name':\n return 'Deve ser fornecido um nome de pacote para instalação do aplicativo Android.';\n case 'auth/missing-continue-uri':\n return 'A próxima URL deve ser fornecida na solicitação.';\n case 'auth/missing-ios-bundle-id':\n return 'Deve ser fornecido um nome de pacote para instalação do aplicativo iOS.';\n case 'auth/invalid-continue-uri':\n return 'A próxima URL fornecida na solicitação é inválida.';\n case 'auth/unauthorized-continue-uri':\n return 'O domínio da próxima URL não está na lista de autorizações.';\n case 'auth/invalid-dynamic-link-domain':\n return 'O domínio de link dinâmico fornecido, não está autorizado ou configurado no projeto atual.';\n case 'auth/argument-error':\n return 'Verifique a configuração de link para o aplicativo.';\n case 'auth/invalid-persistence-type':\n return 'O tipo especificado para a persistência dos dados é inválido.';\n case 'auth/unsupported-persistence-type':\n return 'O ambiente atual não suportar o tipo especificado para persistência dos dados.';\n case 'auth/invalid-credential':\n return 'A credencial expirou ou está mal formada.';\n case 'auth/wrong-password':\n return 'Senha incorreta.';\n case 'auth/invalid-verification-code':\n return 'O código de verificação da credencial não é válido.';\n case 'auth/invalid-verification-id':\n return 'O ID de verificação da credencial não é válido.';\n case 'auth/custom-token-mismatch':\n return 'O token está diferente do padrão solicitado.';\n case 'auth/invalid-custom-token':\n return 'O token fornecido não é válido.';\n case 'auth/captcha-check-failed':\n return 'O token de resposta do reCAPTCHA não é válido, expirou ou o domínio não é permitido.';\n case 'auth/invalid-phone-number':\n return 'O número de telefone está em um formato inválido (padrão E.164).';\n case 'auth/missing-phone-number':\n return 'O número de telefone é requerido.';\n case 'auth/quota-exceeded':\n return 'A cota de SMS foi excedida.';\n case 'auth/cancelled-popup-request':\n return 'Somente uma solicitação de janela pop-up é permitida de uma só vez.';\n case 'auth/popup-blocked':\n return 'A janela pop-up foi bloqueado pelo navegador.';\n case 'auth/popup-closed-by-user':\n return 'A janela pop-up foi fechada pelo usuário sem concluir o login no provedor.';\n case 'auth/unauthorized-domain':\n return 'O domínio do aplicativo não está autorizado para realizar operações.';\n case 'auth/invalid-user-token':\n return 'O usuário atual não foi identificado.';\n case 'auth/user-token-expired':\n return 'O token do usuário atual expirou.';\n case 'auth/null-user':\n return 'O usuário atual é nulo.';\n case 'auth/app-not-authorized':\n return 'Aplicação não autorizada para autenticar com a chave informada.';\n case 'auth/invalid-api-key':\n return 'A chave da API fornecida é inválida.';\n case 'auth/network-request-failed':\n return 'Falha de conexão com a rede.';\n case 'auth/requires-recent-login':\n return 'O último horário de acesso do usuário não atende ao limite de segurança.';\n case 'auth/too-many-requests':\n return 'As solicitações foram bloqueadas devido a atividades incomuns. Tente novamente depois que algum tempo.';\n case 'auth/web-storage-unsupported':\n return 'O navegador não suporta armazenamento ou se o usuário desativou este recurso.';\n case 'auth/invalid-claims':\n return 'Os atributos de cadastro personalizado são inválidos.';\n case 'auth/claims-too-large':\n return 'O tamanho da requisição excede o tamanho máximo permitido de 1 Megabyte.';\n case 'auth/id-token-expired':\n return 'O token informado expirou.';\n case 'auth/id-token-revoked':\n return 'O token informado perdeu a validade.';\n case 'auth/invalid-argument':\n return 'Um argumento inválido foi fornecido a um método.';\n case 'auth/invalid-creation-time':\n return 'O horário da criação precisa ser uma data UTC válida.';\n case 'auth/invalid-disabled-field':\n return 'A propriedade para usuário desabilitado é inválida.';\n case 'auth/invalid-display-name':\n return 'O nome do usuário é inválido.';\n case 'auth/invalid-email-verified':\n return 'O e-mail é inválido.';\n case 'auth/invalid-hash-algorithm':\n return 'O algoritmo de HASH não é uma criptografia compatível.';\n case 'auth/invalid-hash-block-size':\n return 'O tamanho do bloco de HASH não é válido.';\n case 'auth/invalid-hash-derived-key-length':\n return 'O tamanho da chave derivada do HASH não é válido.';\n case 'auth/invalid-hash-key':\n return 'A chave de HASH precisa ter um buffer de byte válido.';\n case 'auth/invalid-hash-memory-cost':\n return 'O custo da memória HASH não é válido.';\n case 'auth/invalid-hash-parallelization':\n return 'O carregamento em paralelo do HASH não é válido.';\n case 'auth/invalid-hash-rounds':\n return 'O arredondamento de HASH não é válido.';\n case 'auth/invalid-hash-salt-separator':\n return 'O campo do separador de SALT do algoritmo de geração de HASH precisa ser um buffer de byte válido.';\n case 'auth/invalid-id-token':\n return 'O código do token informado não é válido.';\n case 'auth/invalid-last-sign-in-time':\n return 'O último horário de login precisa ser uma data UTC válida.';\n case 'auth/invalid-page-token':\n return 'A próxima URL fornecida na solicitação é inválida.';\n case 'auth/invalid-password':\n return 'A senha é inválida, precisa ter pelo menos 6 caracteres.';\n case 'auth/invalid-password-hash':\n return 'O HASH da senha não é válida.';\n case 'auth/invalid-password-salt':\n return 'O SALT da senha não é válido.';\n case 'auth/invalid-photo-url':\n return 'A URL da foto de usuário é inválido.';\n case 'auth/invalid-provider-id':\n return 'O identificador de provedor não é compatível.';\n case 'auth/invalid-session-cookie-duration':\n return 'A duração do COOKIE da sessão precisa ser um número válido em milissegundos, entre 5 minutos e 2 semanas.';\n case 'auth/invalid-uid':\n return 'O identificador fornecido deve ter no máximo 128 caracteres.';\n case 'auth/invalid-user-import':\n return 'O registro do usuário a ser importado não é válido.';\n case 'auth/invalid-provider-data':\n return 'O provedor de dados não é válido.';\n case 'auth/maximum-user-count-exceeded':\n return 'O número máximo permitido de usuários a serem importados foi excedido.';\n case 'auth/missing-hash-algorithm':\n return 'É necessário fornecer o algoritmo de geração de HASH e seus parâmetros para importar usuários.';\n case 'auth/missing-uid':\n return 'Um identificador é necessário para a operação atual.';\n case 'auth/reserved-claims':\n return 'Uma ou mais propriedades personalizadas fornecidas usaram palavras reservadas.';\n case 'auth/session-cookie-revoked':\n return 'O COOKIE da sessão perdeu a validade.';\n case 'auth/uid-alread-exists':\n return 'O indentificador fornecido já está em uso.';\n case 'auth/email-already-exists':\n return 'O e-mail fornecido já está em uso.';\n case 'auth/phone-number-already-exists':\n return 'O telefone fornecido já está em uso.';\n case 'auth/project-not-found':\n return 'Nenhum projeto foi encontrado.';\n case 'auth/insufficient-permission':\n return 'A credencial utilizada não tem permissão para acessar o recurso solicitado.';\n case 'auth/internal-error':\n return 'O servidor de autenticação encontrou um erro inesperado ao tentar processar a solicitação.';\n default:\n return null;\n }\n}", "title": "" }, { "docid": "21dbf3158f9dff1653e3b5c74e29f492", "score": "0.58466107", "text": "function helloWorld(code) {\n\tif (code===\"es\") {\n\t\tconsole.log(\"hola! World\");\n\t} else if (code===\"en\") {\n\t\tconsole.log(\"Hello World\");\n\t} else { console.log(\"Hallo World\");\n\t}\n}", "title": "" }, { "docid": "3de55dec7bc60913ede498b5e414265f", "score": "0.57684815", "text": "function _codeFromEvent (e) {\n if ((e.charCode) && (e.keyCode==0))\n return e.charCode\n return e.keyCode;\n}", "title": "" }, { "docid": "0cf5c30c72bd070621bc51aed668e133", "score": "0.5741346", "text": "function specifyCode(code){\n var codeUpper = code.toUpperCase(); //make the given code be upper case\n var str = \"\";\n for (i = 0; i < codeUpper.length; i++){\n str += codeUpper.charCodeAt(i);\n }\n secret = str;\n}", "title": "" }, { "docid": "003aa894df31ff512cafbb7b7eeca16c", "score": "0.5732507", "text": "static setCode(err, code) {\n err.postgresCode = err.code;\n err.chinchayCode = err.code;\n err.code = code;\n err.suggestedHTTPCode = code;\n }", "title": "" }, { "docid": "a9a63260643199e616c1485c3e33578d", "score": "0.5681708", "text": "function typedCode(event) {\n var code = 0;\n if (event == null && window.event) {\n event = window.event;\n }\n if (event != null) {\n if (event.keyCode) {\n code = event.keyCode;\n } else if (event.which) {\n code = event.which;\n }\n }\n return code;\n}", "title": "" }, { "docid": "8b8363bc8356a6ff46ba24be63aaf741", "score": "0.565075", "text": "function encender (code){\n\tif (code == dispositivos.lamparaRoja.code){\n\t\tdispositivos.lamparaRoja.state = true;\n\t\tconsole.log(\"Guardado lamparaRoja como encendida\");\n\t\tif ($('#lamparaRoja').is(\":visible\")){\n\t\t\tcont = 0;\n\t\t\tctx=$('#lamparaRoja')[0].getContext('2d');\n\t\t\tconsole.log(\"Ejecutando la animacion de lamparaRoja\");\n\t\t\tencenderLamparaRoja();\n\t\t}\t\n\t}else if (code == dispositivos.lamparaPie.code){\n\t\tdispositivos.lamparaPie.state = true;\n\t\tconsole.log(\"Guardado lamparaPie como encendida\");\n\t\tif ($('#lamparaPie').is(\":visible\")){\n\t\t\tencenderLamparPie();\n\t\t}\t\n\t}else if (code == dispositivos.persiana.code){\n\t\tdispositivos.persiana.state = true;\n\t\tconsole.log(\"Guardado persiana como encendida\");\n\t\tif ($('#persiana').is(\":visible\")){\n\t\t\tcont = 25;\n\t\t\tctx=$('#persiana')[0].getContext('2d');\n\t\t\tsubirPersiana();\n\t\t}\t\n\t}\n}", "title": "" }, { "docid": "903b729a22aa2a5b7411e58e82557ddf", "score": "0.5634519", "text": "function encode(arg) {\n // seu código aqui\n let code = ['a', 'e', 'i', 'o', 'u'];\n for (let i = 1; i <= code.length; i += 1) {\n arg = arg.replace(RegExp(code[i - 1], 'g'), i);\n }\n return arg;\n}", "title": "" }, { "docid": "e3175a528eb3bf4eba1715d31fa3bb09", "score": "0.56285965", "text": "function macheoCodigo(cod,cod1){\r\n var igual=false;\r\n var contador=0;\r\n var len=cod.length;\r\n var len1=cod1.length;\r\n if (len==len1){\r\n if ((cod)==(cod1)){\r\n igual=true;\r\n }else{\r\n igual=false;\r\n }\r\n }else{\r\n igual=false;\r\n\r\n } \r\n return igual;\r\n }", "title": "" }, { "docid": "8199dd08e316f95364b3898c4b949c27", "score": "0.56244236", "text": "function getMeteocon(code) {\n switch (code) {\n case \"01d\":\n return \"B\";\n case \"01n\":\n return \"C\";\n case \"02d\":\n return \"H\";\n case \"02n\":\n return \"I\";\n case \"03d\":\n case \"03n\":\n return \"N\";\n case \"04d\":\n case \"04n\":\n return \"Y\";\n case \"09d\":\n case \"09n\":\n case \"10d\":\n case \"10n\":\n return \"R\";\n case \"11d\":\n case \"11n\":\n return \"0\";\n case \"13d\":\n case \"13n\":\n return \"W\";\n case \"50d\":\n case \"50n\":\n return \"M\";\n } // end 'switch'\n } // end 'getMeteocon()'", "title": "" }, { "docid": "0e470476c5c0da53392ed5ccca48afd7", "score": "0.5615989", "text": "function validCodeCours(theChamp, obligatoire, decl)\r\n{\r\n\tvar val = theChamp.value;\r\n\tif (strip(val) == '')\r\n\t{\r\n\t\tif (obligatoire)\r\n\t\t{\r\n\t\t\twindow.alert(\"Le code de déclinaison est obligatoire !\");\r\n\t\t\ttheChamp.focus();\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn (true);\r\n\t\t}\r\n\t}\r\n\r\n\tif (decl)\r\n\t{\r\n\t\tif (val.indexOf('-') == -1)\r\n\t\t{\r\n\t\t\twindow.alert(\"Un code de déclinaison de cours doit être sous la forme de : CINE0000-0\");\r\n\t\t\ttheChamp.focus();\r\n\t\t\treturn (false);\r\n\t\t}\r\n\r\n\t\tval = val.substr(0, val.indexOf('-'));\r\n\t}\r\n\r\n\tif (val.length == 8) // code : INFO0000\r\n\t{\r\n\t\tif (!verifChars(val.toUpperCase().substr(0, 4), \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"))\r\n\t\t{\r\n\t\t\twindow.alert(\"Le code de cours doit commencer par 4 lettres (ex : CINE0000)\");\r\n\t\t\ttheChamp.focus();\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t\tif (!verifChars(val.substr(4, 7), \"0123456789\"))\r\n\t\t{\r\n\t\t\twindow.alert(\"Le code de cours doit se terminer par 4 chiffres (ex : CINE0000)\");\r\n\t\t\ttheChamp.focus();\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\twindow.alert(\"Un code de cours est composé de 4 lettres suivi de 4 chiffres (ex : CINE0000)\");\r\n\t\ttheChamp.focus();\r\n\t\treturn (false);\r\n\t}\r\n\treturn (true);\r\n}", "title": "" }, { "docid": "b870559e1e4531d6083d24cf799eb6cf", "score": "0.5605338", "text": "function creaCodice(){\n\n// il codice identificativo (codeplayer) si compone di un numero di tre cifre\n// ovvero (casualNumber ripetuto 3 volte) e di tre lettere (casualLetter ripetuta 3 volte)\n\n var codePlayer = '';\n var casualNumber = '';\n\n for (var i = 0; i < 3; i++) {\n //Genero una lettera casuale maiuscola prendendo i valori dall'unicode\n var casualLetter = String.fromCharCode(Math.floor((Math.random()*(90 - 65 + 1) + 65)));\n codePlayer += casualLetter;\n }\n\n for (var i = 0; i < 3; i++) {\n // genero un numero casuale da 1 a 9\n casualNumber = Math.floor((Math.random() * 9) + 1);\n codePlayer += casualNumber;\n }\n\n return codePlayer;\n}", "title": "" }, { "docid": "4d5371614d10f2ac2d99eef36969cc0e", "score": "0.5600194", "text": "function toknam(code) {\n var keys = Object.keys(C);\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n if (C[key] === code) { return key; }\n }\n return code && (\"0x\" + code.toString(16));\n}", "title": "" }, { "docid": "ce4b69657e1a0d98f9d71ab507659e3f", "score": "0.5584932", "text": "function resolveCode(key) {\n if (key >= 93) key--;\n if (key >= 35) key--;\n key -= 32;\n return key;\n }", "title": "" }, { "docid": "ce4b69657e1a0d98f9d71ab507659e3f", "score": "0.5584932", "text": "function resolveCode(key) {\n if (key >= 93) key--;\n if (key >= 35) key--;\n key -= 32;\n return key;\n }", "title": "" }, { "docid": "ce4b69657e1a0d98f9d71ab507659e3f", "score": "0.5584932", "text": "function resolveCode(key) {\n if (key >= 93) key--;\n if (key >= 35) key--;\n key -= 32;\n return key;\n }", "title": "" }, { "docid": "ce4b69657e1a0d98f9d71ab507659e3f", "score": "0.5584932", "text": "function resolveCode(key) {\n if (key >= 93) key--;\n if (key >= 35) key--;\n key -= 32;\n return key;\n }", "title": "" }, { "docid": "ce4b69657e1a0d98f9d71ab507659e3f", "score": "0.5584932", "text": "function resolveCode(key) {\n if (key >= 93) key--;\n if (key >= 35) key--;\n key -= 32;\n return key;\n }", "title": "" }, { "docid": "41966d671e6a89751fc53a965fea9538", "score": "0.55752045", "text": "static get UNKNOWN_CODE() {\n return owlterms.UNKNOWN_CODE;\n }", "title": "" }, { "docid": "b212fca1e160212995d05351c0dce89a", "score": "0.5569802", "text": "function showCodeFoutmelding() {\n const code1 = \"lastminute\";\n const code2 = \"zomer2020\";\n const vandaag = new Date();\n console.log(dateToString(vandaag));\n console.log(aankomstDatumElement.value)\n if (codeElement.value == \"\") {\n boekenForm.querySelector(\"#errorCode\").innerText = \"\";\n } else if (code1 == codeElement.value && dateToString(vandaag) == aankomstDatumElement.value) {\n boekenForm.querySelector(\"#errorCode\").innerText = \"\";\n berekenTotaalBedrag();\n } else if (code1 == codeElement.value && dateToString(vandaag) !== aankomstDatumElement.value) {\n boekenForm.querySelector(\"#errorCode\").innerText = \"Alleen geldig als aankomst vandaag is\";\n } else if (code2 == codeElement.value) {\n boekenForm.querySelector(\"#errorCode\").innerText = \"\";\n berekenTotaalBedrag();\n } else {\n boekenForm.querySelector(\"#errorCode\").innerText = \"Gebruik een geldige code.\";\n berekenTotaalBedrag();\n }\n }", "title": "" }, { "docid": "8304ff62f62008f08980f14260a1659d", "score": "0.55680007", "text": "setCode(newCode){\n this.code = newCode;\n this.run();\n }", "title": "" }, { "docid": "c76388a8013d73e73b6bc17be5c94275", "score": "0.556151", "text": "function getCode(long,type)\n{\n\ttype || (type = 0);\n\tcheck = type;\n\n\tsetDictionary();\n\tloadDictionaries();\n\treturn getPass(long);\n}", "title": "" }, { "docid": "85589f22eaa4e457d258fb2dff063157", "score": "0.5555137", "text": "get type() {\n return 'code';\n }", "title": "" }, { "docid": "1f6916e7bbf2dd839d6e7eceb599db58", "score": "0.55452156", "text": "function getCodeText(){\n var codeFilters = [+paxHrFra, +paxPol, +paxEps, +paxMps, +paxPolps, +paxTerps, +paxTjMech, +paxGeWom]; //+paxHrFra,\n var codeFilterCount = codeFilters.length;\n var codeText = \"\";\n var vizCodes = [\"Human Rights/Rule of Law\", \"Political Institutions\", \"Power Sharing: Economic\", \"Power Sharing: Military\", \"Power Sharing: Political\", \"Power Sharing: Territorial\", \"Transitional Justice Past Mechanism\", \"Women, Girls and Gender\"]; //\"Human Rights Framework\",\n var codeIndeces = [];\n for (i = 0; i < codeFilterCount; i++){\n if (codeFilters[i] > 0){\n // codeIndeces.push(i);\n codeText += \" \" + vizCodes[i] + \",\";\n }\n }\n if (codeText.length == 0){\n return \"None selected\";\n }\n codeText = codeText.slice(0,-1);\n return codeText;\n }", "title": "" }, { "docid": "6ae1f9b93f4cc19256c597229bd48740", "score": "0.55417407", "text": "function letraControl(numero) {\r\n var Dig = \"ATRWAGMYFPDXBNJZSQVHLCKE\"; \r\n\r\n return Dig.charCodeAt((numero%23)+1);\r\n}", "title": "" }, { "docid": "272edd2ce0e37dfbc5ded64fc4b0bcee", "score": "0.5529949", "text": "function codificar(){\n document.getElementById('resultado').innerHTML = cesar.encode(\n document.getElementById('cadena').value, 3\n );\n}", "title": "" }, { "docid": "fb179c06244415f211e985a274141ece", "score": "0.5529134", "text": "function codeMessage(string){\n var arrayCode = string.split(\"\")\n const code = (arrayCode) => {\n return arrayCode.map(value => {\n if (value === 'a' || value === 'A'){\n return '4'\n }\n else if (value === 'e' || value === 'E'){\n return '3'\n }\n else if (value === 'i' || value === 'I'){\n return '1'\n }\n else if (value === 'o' || value === 'O'){\n return '0'\n }\n else {\n return value\n } \n })\n }\n return code(arrayCode).join(\"\")\n}", "title": "" }, { "docid": "0d825d1bc14de088cf800b5a588a4fe6", "score": "0.55246073", "text": "setCode (code) {\n this.code = code; return this }", "title": "" }, { "docid": "8572c7b5393c3ef52a4568e3624084dc", "score": "0.5506926", "text": "function generarId(nombre, codigo) {\n console.log(typeof(codigo));\n return nombre + (codigo % 2);\n}", "title": "" }, { "docid": "e0d3c193802efab59633ba1cf63e4c81", "score": "0.5502418", "text": "function Isikukood(code) {\n\n 'use strict';\n\n this.code = code;\n\n /**\n * Gets the control number of personal ID.\n *\n * @return number\n */\n this.getControlNumber = function () {\n var multiplier1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],\n multiplier2 = [3, 4, 5, 6, 7, 8, 9, 1, 2, 3],\n mod,\n total = 0;\n\n for (var i = 0; i < 10; i++) {\n total += this.code.charAt(i) * multiplier1[i];\n }\n mod = total % 11;\n\n total = 0;\n if (10 === mod) {\n for (i = 0; i < 10; i++) {\n total += this.code.charAt(i) * multiplier2[i];\n }\n mod = total % 11;\n if (10 === mod) {\n mod = 0;\n }\n }\n return mod;\n };\n\n /**\n * Validates the Estonian personal ID.\n *\n * @return boolean\n */\n this.validate = function () {\n if (this.code.length !== 11) {\n return false;\n }\n var control = this.getControlNumber(code);\n if (control !== parseInt(this.code.charAt(10))) {\n return false;\n }\n \n var year = Number(this.code.substr(1, 2));\n var month = Number(this.code.substr(3, 2));\n var day = Number(this.code.substr(5, 2));\n var birthDate = this.getBirthday();\n return year === birthDate.getFullYear() % 100 && birthDate.getMonth() + 1 === month && day === birthDate.getDate();\n };\n\n /**\n * Gets the gender of a person\n *\n * @return string\n */\n this.getGender = function () {\n var firstNumber = this.code.charAt(0),\n retval = '';\n switch (firstNumber) {\n case '1':\n case '3':\n case '5':\n retval = 'male';\n break;\n case '2':\n case '4':\n case '6':\n retval = 'female';\n break;\n default:\n retval = 'unknown';\n }\n return retval;\n };\n\n /**\n * Get the age of a person in years.\n *\n * @return number\n */\n this.getAge = function () {\n return Math.floor((new Date().getTime() - this.getBirthday().getTime()) / (86400 * 1000) / 365.25);\n };\n\n /**\n * Get the birthday of a person.\n *\n * @return Date\n */\n this.getBirthday = function () {\n var year = parseInt(this.code.substring(1, 3)),\n month = parseInt(this.code.substring(3, 5).replace(/^0/, '')) - 1,\n day = this.code.substring(5, 7).replace(/^0/, ''),\n firstNumber = this.code.charAt(0);\n\n if (firstNumber === '1' || firstNumber === '2') {\n year += 1800;\n } else if (firstNumber === '3' || firstNumber === '4') {\n year += 1900;\n } else if (firstNumber === '5' || firstNumber === '6') {\n year += 2000;\n } else {\n year += 2100;\n }\n\n return new Date(year, month, day);\n };\n }", "title": "" }, { "docid": "502503570c15151cfafb430459cf6293", "score": "0.5502071", "text": "function zig_keycode(e)\n{\t\n\t//e is event object passed from function invocation\n\tvar characterCode ; //literal character code will be stored in this variable\n\tif(e && e.which)\n\t{\n\t\t//if which property of event object is supported (NN4)\n\t\te = e ;\n\t\tcharacterCode = e.which ; //character code is contained in NN4's which property\n\t}\n\telse\n\t{\n\t\te = event ;\n\t\tcharacterCode = e.keyCode ; //character code is contained in IE's keyCode property\n\t}\n\treturn characterCode ;\n}", "title": "" }, { "docid": "e4a1b20e000d78a181f4fab48ab62e50", "score": "0.5499603", "text": "function obtenerIdProvincia(prov){\n if(prov === \"San José\"){\n return 1;\n }\n if(prov === \"Alajuela\"){\n return 2;\n }\n if(prov === \"Cartago\"){\n return 3;\n }\n if(prov === \"Heredia\"){\n return 4;\n }\n if(prov === \"Guanacaste\"){\n return 5;\n }\n if(prov === \"Puntarenas\"){\n return 6;\n }\n if(prov === \"Limón\"){\n return 7;\n }\n}", "title": "" }, { "docid": "05571805ab3c8518229183b30408b427", "score": "0.54702497", "text": "function codigoV(c, suma) {\n var cod = 11 - (suma - (11 * Math.trunc(suma / 11)));\n switch (cod) {\n case 11:\n return 0;\n break;\n case 10:\n return \"k\";\n break;\n default:\n return cod;\n }\n}", "title": "" }, { "docid": "f0754b8e59c113e5db66b7be9d68f8a3", "score": "0.5465914", "text": "function _6yZECZP9ozm5xQDaInToeg() {}", "title": "" }, { "docid": "bdde839811258b84dd9e0e5a4c9c952c", "score": "0.54589266", "text": "function binaryCode(str) {\n}", "title": "" }, { "docid": "223985bf00d8d8fb7079556a470e8fe6", "score": "0.54589045", "text": "_getCodeLocation() {\n \n }", "title": "" }, { "docid": "9a0eea379e236d1814d59c6330335f61", "score": "0.54585975", "text": "static async getInviteCode(accountId) {\n const inviteCode = await db.GrowthInviteCode.findOne({\n where: { ethAddress: accountId }\n })\n if (!inviteCode) {\n throw new Error(`Can not fetch invite code for user: ${accountId}`)\n }\n return inviteCode.code\n }", "title": "" }, { "docid": "6e86b9b388a2b337ecd5cc430ab1de02", "score": "0.54445213", "text": "changeCode(code) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tcode: code\r\n\t\t\t})\r\n\t\t}", "title": "" }, { "docid": "613434307fd28e562754ba55a6025807", "score": "0.54429525", "text": "get reasonCode() {\n\t\treturn this.__reasonCode;\n\t}", "title": "" }, { "docid": "41f47ad1f7256c11979b70fd2abc55e0", "score": "0.54401755", "text": "function __emailToMCode(email) {\n let mcode;\n if (email) {\n const hash = crypto.createHash('sha256');\n hash.update(email, 'utf-8');\n mcode = hash.digest('hex').substring(0, 32);\n }\n return mcode;\n}", "title": "" }, { "docid": "dcff1dcb53c07f61fa19685ffc67347a", "score": "0.5432803", "text": "function sendCode() {\n let p = new Person(document.getElementById('nameField').value, \n document.getElementById('surnameField').value, \n document.getElementById('genderField').value, \n document.getElementById('birthdateField').value);\n\n document.getElementById('fiscal-code').innerHTML = p.getCode();\n}", "title": "" }, { "docid": "c8b8cf55edd92e5896260631d38ad838", "score": "0.5422407", "text": "function holis() {\r\n var b = \"Estoy en funcion?\"; // solo puede acceder su mismo bloque, porque está dentro de una función\r\n }", "title": "" }, { "docid": "3a37e2f95b9a390d8a9416bacf5ca6f3", "score": "0.54178476", "text": "function check_code(msg, key) {\n var encMsg = \"\";\n\n for (var i = 0; i < msg.length; i++) {\n var code = msg.charCodeAt(i);\n\n // Encrypt only letters in 'A' ... 'Z' interval\n if (code >= 65 && code <= 65 + 26 - 1) {\n code -= 65;\n code = mod(code + key, 26);\n code += 65;\n }\n\n encMsg += String.fromCharCode(code);\n }\n\n return encMsg;\n}", "title": "" }, { "docid": "037d9818f32f4bd4b175004a17079032", "score": "0.54140735", "text": "function send_code(s, c, tree)\n{\n return send_bits(s, tree[c].fc, tree[c].dl);\n}", "title": "" }, { "docid": "784dab5131302744202e237abf6e2e73", "score": "0.54106754", "text": "function CZuI766j7zueWbRKKKV3Lw(){}", "title": "" }, { "docid": "8739835e1ad1b6c43bb6584be3d544a7", "score": "0.54047793", "text": "function c_e(e){\n return \"string\" == typeof e && (e = encrypt_str(e)),\n (0, h_default)(e, 41405).toString(16).replace(/^0+/, \"\")\n // 待定\n // h_default(e, 41405)\n}", "title": "" }, { "docid": "aa7113046ac48a4cd343c69c20b8eef1", "score": "0.53984344", "text": "function getIsa(code) {\n let isacode = isa.codes.find(function (e) {\n return e.opcode === code;\n });\n if (isacode === undefined) {\n console.error(\"unkown opcode\", code);\n }\n return isacode;\n}", "title": "" }, { "docid": "b3269e461d9e814ad11ae6dffd708373", "score": "0.53934395", "text": "handleAuthorizationCode() {\n let token;\n try {\n token = jwt.verify(this.request.body.code, config.jwtSecret);\n } catch (e) {\n return Lib.replyWithError(this.response, \"invalid_token\", 401, e.message);\n }\n return this.finish(token);\n }", "title": "" }, { "docid": "78dbe155cfa78634e3fdd4e3a7027ff0", "score": "0.53899", "text": "async function getCurrentCode() {\n var email = classNumber + profile.getEmail();\n var code;\n await fetch(`/generatecode?email=${encodeURI(email)}`)\n .then(response => response.json())\n .then(data => {\n code = data.code;\n });\n return code;\n}", "title": "" }, { "docid": "e6bfb052a4b89757985ac72086d380b6", "score": "0.5389503", "text": "writeByte(code) {\n this.liveFunc.writeByte(code);\n return _yocto_api.YAPI_SUCCESS;\n }", "title": "" }, { "docid": "d819716f27d2431e91117af98d81e4db", "score": "0.5385165", "text": "function get_finalidadConsulta(codigo) {\n var msj = false;\n switch (codigo) {\n case '0':\n msj = \"\"\n break;\n case '1':\n msj = \"ATENCION PARTO PUERPERIO\";\n break;\n case '2':\n msj = \"ATENCION REC.NACID\";\n break;\n case '3':\n msj = \"ATENC.PLANIF.FAMIL\";\n break;\n case '4':\n msj = \"DET.ALT CRECIM <10\";\n break;\n case '5':\n msj = \"DET.ALT.DESA.JOVEN\";\n break;\n case '6':\n msj = \"DET.ALT.EMBARAZO\";\n break;\n case '7':\n msj = \"DET.ALT. ADULTO\";\n break;\n case '8':\n msj = \"DET.ALT.AGUD.VISUA\";\n break;\n case '9':\n msj = \"DET.ENFERM.PROFES.\";\n break;\n case '10':\n msj = \"NO APLICA\";\n break;\n case '11':\n msj = \"PATOLOGIA CRONICA\";\n break;\n }\n return msj;\n}", "title": "" }, { "docid": "f4170024548231262674e6c02682f219", "score": "0.5381211", "text": "function gestioneErrore(errore){\n if(errore.code === 1){\n ;//Se non permetti la localizzazione non fare niente. alert('Dato che non hai permesso la tua localizzazione non so dirti dove sei')\n }\n else if(errore.code === 2){\n alert('Non riesco a recuperare ed inviare le informazioni necessarie');\n }\n else\n alert('Si è verificato un errore nella tua localizzazione');\n }", "title": "" }, { "docid": "348f2ea9c9be0ad8cbad83662814a558", "score": "0.5378931", "text": "function ConversorOpCode(OpCode){\r\n var opcode_bin_return = \"000000\";\r\n for (var i = 0; i < opcode_names.length; i++) {\r\n if (opcode_names[i] == OpCode) {\r\n opcode_bin_return = opcode_bin[i];\r\n }\r\n }\r\n return opcode_bin_return;\r\n}", "title": "" }, { "docid": "4dc24535983cb939586472ac2fa9c6f0", "score": "0.5378525", "text": "function e(n,e,t,a){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": "" } ]
239f1f7aa91095d1c3a0899e044622e3
param: strategy: 'apriori' | 'pseudo' | 'random'
[ { "docid": "03b279d76144d2c820e920b90995e61e", "score": "0.52363384", "text": "function generateDataPool(strategy) {\n const data = [];\n for (let index = 0; index < NUM_SCENARIOS; index++) {\n data.push({\n title: strategy === 'random' ? fakerLoremMethods[index] : fakerLoremMethods[index]()\n });\n }\n console.log('generateDataPool ', data);\n return data;\n}", "title": "" } ]
[ { "docid": "e55c5dd30704a8bc1a78d9e79bd1c98d", "score": "0.62587315", "text": "function Strategy() {\n}", "title": "" }, { "docid": "e55c5dd30704a8bc1a78d9e79bd1c98d", "score": "0.62587315", "text": "function Strategy() {\n}", "title": "" }, { "docid": "dca2d90da4ffb698bf7f5d64773e1cbd", "score": "0.58370304", "text": "function dirk_update(po, strategy) {\n\t\t\tif(r === 1 && q === 0) return strategy;\n\n\t\t\tif(Math.random() > r) {\n\t\t\t\t// Update with best strategy\n\t\t\t\tstrategy[po['o_site']] = strategy[po['best_site']];\n\t\t\t} else if(Math.random() < q) {\n\t\t\t\tstrategy[po['o_site']] = 1;\n\t\t\t} else {\n\t\t\t\tstrategy[po['o_site']] = 0;\n\t\t\t}\n\t\t\treturn strategy;\n\t\t}", "title": "" }, { "docid": "3f6ce5360e9afd720d8b621bee3302b0", "score": "0.57622254", "text": "function SNIPESTRATEGY(actor) {\n \"use strict\";\n STRATEGY.call(this, actor);\n}", "title": "" }, { "docid": "8c785e368953dc68ac8f5565a1d7d3bb", "score": "0.5724769", "text": "register(name, strategy) {\n // Call the functions a strategy can implement\n if (typeof strategy.setName === 'function') {\n strategy.setName(name);\n }\n if (typeof strategy.setApplication === 'function') {\n strategy.setApplication(this.app);\n }\n if (typeof strategy.setAuthentication === 'function') {\n strategy.setAuthentication(this);\n }\n if (typeof strategy.verifyConfiguration === 'function') {\n strategy.verifyConfiguration();\n }\n // Register strategy as name\n this.strategies[name] = strategy;\n }", "title": "" }, { "docid": "8d79d24605e4041ed7748d8d3ad5472a", "score": "0.5718396", "text": "register (name, strategy) {\n // Call the functions a strategy can implement\n if (typeof strategy.setName === 'function') {\n strategy.setName(name);\n }\n\n if (typeof strategy.setApplication === 'function') {\n strategy.setApplication(this.app);\n }\n\n if (typeof strategy.setAuthentication === 'function') {\n strategy.setAuthentication(this);\n }\n\n if (typeof strategy.verifyConfiguration === 'function') {\n strategy.verifyConfiguration();\n }\n\n // Register strategy as name\n this.strategies[name] = strategy;\n }", "title": "" }, { "docid": "78643cd6a6af7aba62cd210b34b6ab89", "score": "0.56254774", "text": "function Strategies(strategies) {\n this.del = strategies.delete;\n this.equal = strategies.equal;\n this.insert = strategies.insert;\n}", "title": "" }, { "docid": "e66a99cce0a475b83416796024eb6b7e", "score": "0.5547631", "text": "callback(strategy) {\n if (!this.providers.has(strategy)) {\n throw new Error(`E_AUTH_USER_PROVIDER: Could not provide user for strategy [${strategy}]`);\n }\n\n return (...strategyParameters) => {\n const providingMethod = this.providers.get(strategy);\n const done = strategyParameters.pop();\n\n providingMethod(...strategyParameters)\n .then(identity => done(null, identity))\n .catch(error => done(error))\n ;\n }\n }", "title": "" }, { "docid": "e0fd77d5671fdfb92900fa9bb1341056", "score": "0.5499023", "text": "getAction(strategy) {\n let rand = Math.random();\n let i = 0;\n let cumulativeProbability = 0;\n while (i < NUM_ACTIONS - 1) {\n cumulativeProbability += strategy[i];\n if (rand < cumulativeProbability) break;\n i++;\n }\n return i;\n }", "title": "" }, { "docid": "3e24c7e523db790216f303d14e12ec09", "score": "0.54880905", "text": "getAction(strategy) {\n let rand = Math.random();\n let i = 0;\n let cumulativeProbability = 0;\n while (i < NUM_ACTIONS - 1) {\n cumulativeProbability += strategy[i];\n if (rand < cumulativeProbability) break;\n i++;\n }\n return i;\n }", "title": "" }, { "docid": "5a2a4105324737cd3453d1e62773b16b", "score": "0.5429389", "text": "useStrategy() {\n return true;\n }", "title": "" }, { "docid": "15c8e177bdfdc084095c0f6271776f0b", "score": "0.54204816", "text": "function influencedWithStrategy(strategy, lang, graph) {\n var results = [];\n\n strategy(function(x) {\n if (Array.isArray(x) && getFirst(x) === lang){\n results.push(getSecond(x));\n }\n\n return x;\n\n }, graph);\n\n return results;\n}", "title": "" }, { "docid": "2b77da1ff5603e9b52165a012d4ebbf7", "score": "0.53822666", "text": "useStrategy(callback){\n let that = this;\n (async() => {\n let exchangePromise = new Promise((resolve,reject) => {\n that.exchange = new EXCHANGE(function(){\n resolve();\n })\n });\n await exchangePromise;\n\n that.exchange = that.exchange.getExchange();\n that.exchange.init();\n that.strategy = that._getStrategy();\n that.strategy.setExchange(that.exchange);\n that._setTradeTicker();\n\n if(callback){\n callback(that.strategy);\n }\n })();\n }", "title": "" }, { "docid": "29d1053140039caeae78f5a18ca5d498", "score": "0.5311769", "text": "function execute(strategy) {\n strategy.solve();\n}", "title": "" }, { "docid": "548647312b3ec09fcd746afe27c0d55d", "score": "0.5308545", "text": "function parseStrategy(index, tokens) {\n\n tokens.eat(\"strategy\");\n var identifier = tokens.eat();\n\n tokens.eat(\"(\");\n var parameters = [];\n while (!tokens.nextIs(\")\")) {\n parameters.push(tokens.eat()); // Consume arguments\n }\n tokens.eat(\")\"); // Consume right parenthesis\n var strategyId = identifier + index.toString();\n // Consume statements.\n var statements = parseStatements(strategyId, tokens, 1);\n\n // Consume any number of newlines.\n while (tokens.nextIs(\"\\n\")) tokens.eat(\"\\n\");\n\n return {\n type: \"strategy\",\n name: identifier,\n id: strategyId,\n parameters: parameters,\n statements: statements,\n text: \"Strategy \" + identifier + \"(\" + parameters.join(' ') + \")\"\n };\n}", "title": "" }, { "docid": "c20ee411e348c34283eb4d20f66e45dd", "score": "0.5285994", "text": "function CHARGESTRATEGY(actor) {\n \"use strict\";\n STRATEGY.call(this, actor);\n}", "title": "" }, { "docid": "0272019b3fbb49f092fd8ffbc2bbd1e7", "score": "0.5281817", "text": "function toggleStrategy(){\n if (TagTracker.strategy == \"chron\"){\n TagTracker.strategy = \"sample\";\n }else{\n TagTracker.theCurveType = \"chron\";\n }\n }", "title": "" }, { "docid": "daeb3bf20f39460bfd32e891181ce41a", "score": "0.5210696", "text": "getStrategy(config) {\n return resolveApplicable(this.renderStrategies, [config]);\n }", "title": "" }, { "docid": "69f1ca4256dedbf7137797161749b89a", "score": "0.50950146", "text": "_enterFirstCompatibleMode(strategies) {\n return async (ftp) => {\n ftp.log(\"Trying to find optimal transfer strategy...\");\n let lastError = undefined;\n for (const strategy of strategies) {\n try {\n const res = await strategy(ftp);\n ftp.log(\"Optimal transfer strategy found.\");\n this.prepareTransfer = strategy; // eslint-disable-line require-atomic-updates\n return res;\n }\n catch (err) {\n // Try the next candidate no matter the exact error. It's possible that a server\n // answered incorrectly to a strategy, for example a PASV answer to an EPSV.\n lastError = err;\n }\n }\n throw new Error(`None of the available transfer strategies work. Last error response was '${lastError}'.`);\n };\n }", "title": "" }, { "docid": "86d7038bc1c62dfe2ccd91e1ad9f031b", "score": "0.5085383", "text": "addStrategy(collectionStrategy: Function, matcher: (items: any) => boolean) {\n this.strategies.push(collectionStrategy);\n this.matchers.push(matcher);\n }", "title": "" }, { "docid": "4358488144c219cd6da1247e47c96189", "score": "0.50836086", "text": "function icon(strategy) {\n if (_index3.STRATEGIES[strategy]) return strategy;\n if (strategy === \"google-apps\") return strategy;\n if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n return \"auth0\";\n}", "title": "" }, { "docid": "c4872ed44c7119ba52d398408460fe21", "score": "0.5068697", "text": "function icon(strategy) {\n\t if (_index3.STRATEGIES[strategy]) return strategy;\n\t if (strategy === \"google-apps\") return strategy;\n\t if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n\t return \"auth0\";\n\t}", "title": "" }, { "docid": "c4872ed44c7119ba52d398408460fe21", "score": "0.5068697", "text": "function icon(strategy) {\n\t if (_index3.STRATEGIES[strategy]) return strategy;\n\t if (strategy === \"google-apps\") return strategy;\n\t if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n\t return \"auth0\";\n\t}", "title": "" }, { "docid": "c4872ed44c7119ba52d398408460fe21", "score": "0.5068697", "text": "function icon(strategy) {\n\t if (_index3.STRATEGIES[strategy]) return strategy;\n\t if (strategy === \"google-apps\") return strategy;\n\t if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n\t return \"auth0\";\n\t}", "title": "" }, { "docid": "3578cb6fe70fc7074dc7da7dd5d66a4c", "score": "0.5065767", "text": "function icon(strategy) {\n if (_index3.STRATEGIES[strategy]) return strategy;\n if (strategy === 'google-apps') return strategy;\n if (~['adfs', 'office365', 'waad'].indexOf(strategy)) return 'windows';\n return 'auth0';\n}", "title": "" }, { "docid": "bcc86ae4e31d33e2cc6d2b8f24d9108e", "score": "0.50369394", "text": "get strategyNames () {\n return Object.keys(this.strategies);\n }", "title": "" }, { "docid": "5681a08ca515e89d2af203246c217d96", "score": "0.49765703", "text": "getStrategy(items: any): CollectionStrategy {\n let matchers = this.matchers;\n\n for (let i = 0, ii = matchers.length; i < ii; ++i) {\n if (matchers[i](items)) {\n return this.container.get(this.strategies[i]);\n }\n }\n\n throw new Error('Object in \"repeat\" must have a valid collection strategy.');\n }", "title": "" }, { "docid": "f6d5c94b616fb23728771fd55aa3fa48", "score": "0.49731585", "text": "async consider(strategy, orderRequest) {\n // this is not a clever trader--just create an order\n return this.exchange.createOrder(orderRequest);\n }", "title": "" }, { "docid": "710c2b3be086d023f7a0abb81b2a50a1", "score": "0.49542934", "text": "function strategyInterceptor(strategy) {\n var interceptor = function(layout) {\n var start = new Date().getMilliseconds();\n var finalLayout = strategy(data);\n var time = new Date().getMilliseconds() - start;\n\n // record some statistics on this strategy\n if (!interceptor.time) {\n Object.defineProperty(interceptor, 'time', { enumerable: false, writable: true });\n }\n interceptor.time = time;\n return finalLayout;\n };\n\n interceptor.bucketSize = function() {\n return strategy.bucketSize.apply(this, arguments);\n };\n\n return interceptor;\n}", "title": "" }, { "docid": "400dde9f3653375a763feb5c1cb64267", "score": "0.49525046", "text": "function suggest (appId, strategy) {\n strategy = strategy || suggest.similar;\n return resolveApps(appId, strategy).then(getSuggestions);\n}", "title": "" }, { "docid": "04c79137edecd406c8b7f74dc35bd308", "score": "0.49466765", "text": "function log(strategy) {\n strategy.handle();\n}", "title": "" }, { "docid": "8dc519c68b2567e8a65f448726800805", "score": "0.49389416", "text": "function autoPairFnBuilder( options ){\n options = options || {};\n options.createPair = options.createPair || function _defaultCreatePair( params ){\n params = params || {};\n var a = params.listA.splice( params.indexA, 1 )[0],\n b = params.listB.splice( params.indexB, 1 )[0],\n aInBIndex = params.listB.indexOf( a ),\n bInAIndex = params.listA.indexOf( b );\n if( aInBIndex !== -1 ){ params.listB.splice( aInBIndex, 1 ); }\n if( bInAIndex !== -1 ){ params.listA.splice( bInAIndex, 1 ); }\n return this._pair( a, b, { silent: true });\n };\n // compile these here outside of the loop\n var _regexps = [];\n function getRegExps(){\n if( !_regexps.length ){\n _regexps = [\n new RegExp( this.filters[0] ),\n new RegExp( this.filters[1] )\n ];\n }\n return _regexps;\n }\n // mangle params as needed\n options.preprocessMatch = options.preprocessMatch || function _defaultPreprocessMatch( params ){\n var regexps = getRegExps.call( this );\n return _.extend( params, {\n matchTo : params.matchTo.name.replace( regexps[0], '' ),\n possible : params.possible.name.replace( regexps[1], '' )\n });\n };\n\n return function _strategy( params ){\n this.debug( 'autopair _strategy ---------------------------' );\n params = params || {};\n var listA = params.listA,\n listB = params.listB,\n indexA = 0, indexB,\n bestMatch = {\n score : 0.0,\n index : null\n },\n paired = [];\n //console.debug( 'params:', JSON.stringify( params, null, ' ' ) );\n this.debug( 'starting list lens:', listA.length, listB.length );\n this.debug( 'bestMatch (starting):', JSON.stringify( bestMatch, null, ' ' ) );\n\n while( indexA < listA.length ){\n var matchTo = listA[ indexA ];\n bestMatch.score = 0.0;\n\n for( indexB=0; indexB<listB.length; indexB++ ){\n var possible = listB[ indexB ];\n this.debug( indexA + ':' + matchTo.name );\n this.debug( indexB + ':' + possible.name );\n\n // no matching with self\n if( listA[ indexA ] !== listB[ indexB ] ){\n bestMatch = options.match.call( this, options.preprocessMatch.call( this, {\n matchTo : matchTo,\n possible: possible,\n index : indexB,\n bestMatch : bestMatch\n }));\n this.debug( 'bestMatch:', JSON.stringify( bestMatch, null, ' ' ) );\n if( bestMatch.score === 1.0 ){\n this.debug( 'breaking early due to perfect match' );\n break;\n }\n }\n }\n var scoreThreshold = options.scoreThreshold.call( this );\n this.debug( 'scoreThreshold:', scoreThreshold );\n this.debug( 'bestMatch.score:', bestMatch.score );\n\n if( bestMatch.score >= scoreThreshold ){\n //console.debug( 'autoPairFnBuilder.strategy', listA[ indexA ].name, listB[ bestMatch.index ].name );\n paired.push( options.createPair.call( this, {\n listA : listA,\n indexA : indexA,\n listB : listB,\n indexB : bestMatch.index\n }));\n //console.debug( 'list lens now:', listA.length, listB.length );\n } else {\n indexA += 1;\n }\n if( !listA.length || !listB.length ){\n return paired;\n }\n }\n this.debug( 'paired:', JSON.stringify( paired, null, ' ' ) );\n this.debug( 'autopair _strategy ---------------------------' );\n return paired;\n };\n}", "title": "" }, { "docid": "c2db552c743341566f7629292184d54d", "score": "0.49231097", "text": "function log(strategy) {\n strategy.handle();\n}", "title": "" }, { "docid": "5ce0a1b8d9a87818d17418b0fb987cab", "score": "0.49143657", "text": "getStrategies (...names) {\n // Returns all strategies for a list of names (including undefined)\n return names.map(name => this.strategies[name])\n .filter(current => !!current);\n }", "title": "" }, { "docid": "603bbe8a25dced3948610d3ec149a949", "score": "0.48600343", "text": "function heuristics(weight) {\n choice = 1;\n w = weight;\n}", "title": "" }, { "docid": "c92c7f883ba8debc5f0c2110c151d627", "score": "0.48542324", "text": "function StrategyInterface (opts) {\n var validatedOptions = Joi.validate(opts || {}, Joi.object().keys({\n logFunction: Joi.func().default(_.noop)\n , strategyOptions: Joi.object()\n , id: Joi.string()\n }).requiredKeys('id'), {allowUnknown: true, stripUnknown: false})\n\n if (validatedOptions.error != null) {\n throw new Error(prettifyJoiError(validatedOptions.error))\n }\n\n this.id = validatedOptions.value.id\n this._logFunction = validatedOptions.value.logFunction\n this._closed = false\n}", "title": "" }, { "docid": "e6f6cca36228c788f05aa534c243b090", "score": "0.48391584", "text": "function icon(strategy) {\n if (strategy === \"google-apps\") return strategy;\n if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n return \"auth0\";\n}", "title": "" }, { "docid": "c7169a40d56830428ffe3caa59dc0bf4", "score": "0.48285064", "text": "function icon(strategy) {\n\t if (strategy === \"google-apps\") return strategy;\n\t if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n\t return \"auth0\";\n\t}", "title": "" }, { "docid": "c7169a40d56830428ffe3caa59dc0bf4", "score": "0.48285064", "text": "function icon(strategy) {\n\t if (strategy === \"google-apps\") return strategy;\n\t if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n\t return \"auth0\";\n\t}", "title": "" }, { "docid": "c7169a40d56830428ffe3caa59dc0bf4", "score": "0.48285064", "text": "function icon(strategy) {\n\t if (strategy === \"google-apps\") return strategy;\n\t if (~[\"adfs\", \"office365\", \"waad\"].indexOf(strategy)) return \"windows\";\n\t return \"auth0\";\n\t}", "title": "" }, { "docid": "19a381875db691ad77cac231c3eea690", "score": "0.48026782", "text": "function icon(strategy) {\n if (strategy === 'google-apps') return strategy;\n if (~['adfs', 'office365', 'waad'].indexOf(strategy)) return 'windows';\n return 'auth0';\n}", "title": "" }, { "docid": "4bfc8e160d5c51171fa6c947c2f4ade1", "score": "0.47935572", "text": "getStrategies(...names) {\n return names.map(name => this.strategies[name])\n .filter(current => !!current);\n }", "title": "" }, { "docid": "625c65dd0a1def1ec73426dea0480af2", "score": "0.47835398", "text": "function Strategy(boundary){\n var DEFAULT_BOUNDARY = 10;\n this._boundary = boundary || DEFAULT_BOUNDARY;\n}", "title": "" }, { "docid": "9711a8989ca3a67fc5aff3b0ec6cdc2e", "score": "0.47689402", "text": "constructor(container) {\n this.container = container;\n this.strategies = [];\n this.matchers = [];\n\n this.addStrategy(ArrayCollectionStrategy, items => items instanceof Array);\n this.addStrategy(MapCollectionStrategy, items => items instanceof Map);\n this.addStrategy(NumberStrategy, items => typeof items === 'number');\n }", "title": "" }, { "docid": "a7a762320287bbc5b9199bf6f4fbd83f", "score": "0.47656775", "text": "async appStrategyRequired(ctx, next) {\n const { service: { mysql } } = ctx;\n const strategyId = ctx.query.strategyId;\n const appId = ctx.query.appId;\n const strategy = await mysql.getStrategyById(strategyId);\n if (strategy.app_id === +appId) {\n await next();\n } else {\n ctx.body = { ok: false, message: '您的应用下没有此规则!' };\n }\n }", "title": "" }, { "docid": "9789c01274e74f10ba13d2410f8f1988", "score": "0.47413182", "text": "get strategyNames() {\n return Object.keys(this.strategies);\n }", "title": "" }, { "docid": "066ab4f5facb85bc1f98f6b40943c5fa", "score": "0.4728141", "text": "getRandomRule(elem) {\n var rules = this.rules[elem];\n\n // Just one, no need to roll dices\n if (rules.length == 1) return rules[0];\n\n var pointer = Math.random() * rules.totalWeight;\n\n for (let i = 0; i < rules.length; i++) {\n if (pointer < rules[i].weight)\n return rules[i];\n pointer -= rules[i].weight;\n }\n }", "title": "" }, { "docid": "f8b81085256ada0af1b86816516447b7", "score": "0.47272384", "text": "constructor (playerID, opponentID, maxLookahead, placementStrategy) {\n this.playerID = playerID;\n\n this.opponentID = opponentID;\n\n this.ruleChecker = new Rulechecker();\n\n this.maxLookahead = maxLookahead;\n\n // 0 is diagonal strategy, 1 is max distance strategy\n if (placementStrategy !== 0 && placementStrategy !== 1) throw 'Invalid placement strategy';\n this.placementStrategy = placementStrategy;\n }", "title": "" }, { "docid": "fe20af9ba00710377d1cd02e02c0c3a8", "score": "0.4723266", "text": "function heuristics1(weight) {\n choice = 2;\n w = weight;\n}", "title": "" }, { "docid": "d2e42d29946578c7625a86d5a863229b", "score": "0.4716406", "text": "function materializedRetryStrategy(strategy) {\n return function (source) {\n switch (strategy.kind) {\n case \"ignoreErrorJustComplete\":\n return source.pipe(catchError_1.catchError(function (e) {\n dispatchError(e);\n return rx.empty();\n }));\n case \"ignoreErrorAndReturn\":\n return source.pipe(catchError_1.catchError(function (e) {\n dispatchError(e);\n return rx.of(strategy.value);\n }));\n case \"exponentialBackoff\":\n return rx.defer(function () {\n var counter = 1;\n return source.pipe(tap_1.tap(function () {\n counter = 1;\n }, function () {\n if (counter * 2 <= strategy.maxBackoffFactor) {\n counter *= 2;\n }\n }), retryWhen_1.retryWhen(function (e) {\n return e.pipe(switchMap_1.switchMap(function (x) {\n dispatchError(x);\n return rx.of(0).pipe(delay_1.delay(strategy.initialTimeout * counter * 1000));\n }));\n }));\n });\n case \"catchError\":\n return source.pipe(catchError_1.catchError(function (e) {\n dispatchError(e);\n return rx.of(strategy.handle(e));\n }));\n default:\n return js_extensions_1.unhandledCase(strategy);\n }\n };\n}", "title": "" }, { "docid": "bb40202067062c89791277fd8e395cba", "score": "0.46878335", "text": "function choose_algorithm(algorithm) {\n sort_algo = algorithm;\n \n if (sort_algo == \"Bubble Sort\")\n document.getElementById(\"algo-type\").text = \"Bubble Sort\";\n else \n document.getElementById(\"algo-type\").text = \"Insertion Sort\";\n}", "title": "" }, { "docid": "d3229a5c0394323dbd671470f4734662", "score": "0.45837855", "text": "function mergeStrategies(data) {\n ns.state = data.state;\n ns.stateString = JSON.stringify(ns.state);\n\n for (var newOrdering in ns.state) {\n if (newOrdering != \"length\" && newOrdering != \"count\") {\n var strategyId = ns.state[newOrdering].id;\n if (wdk.strategy.model.isLoaded(strategyId)) {\n if (wdk.strategy.model.getStrategyFromBackId(ns.state[newOrdering].id).checksum ==\n ns.state[newOrdering].checksum) {\n // If the checksums are not the same, reload the model.\n // This assumes the strategy object in the response (`data`)\n // matches the current strategy in the global state object.\n mergeModel(data.strategies[ns.state[newOrdering].checksum]);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "01a94f429f0091ec53eec7020e2cac48", "score": "0.45659283", "text": "function PasswordlessStrategy() {\n // Inherit from base Strategy (despite it being empty)\n Strategy.call(this);\n}", "title": "" }, { "docid": "8a7d23b3cc205d40ae07f94d2c7a1b5e", "score": "0.4555248", "text": "function theImplementation(automata){\n\n}", "title": "" }, { "docid": "ab3ff0aea2bc4717cb2b8563ae945b73", "score": "0.45382643", "text": "function Generated(strategy) {\n if (strategy === void 0) { strategy = \"increment\"; }\n return function (object, propertyName) {\n __1.getMetadataArgsStorage().generations.push({\n target: object.constructor,\n propertyName: propertyName,\n strategy: strategy\n });\n };\n}", "title": "" }, { "docid": "1e211fd437e9c9db96508f1f0ebe9b67", "score": "0.4516307", "text": "setAlgoToGreedy(){\n this.setState({algorithm: 'greedy'});\n }", "title": "" }, { "docid": "0455a46c7bdb2c4916b0e98015fab971", "score": "0.45075646", "text": "predict(player) { // predicts player hand\n\tconsole.log(\"player \" + player);\n var rnd = Math.random();\n\tvar returnThis;\n\tvar val;\n // if mode 0: copy\n if (this.mode_val == 0) {\n\t val = this.downgrade(player) // pred of player hand, if we predict \n\t}\n\n // else mode 1: downgrade/upgrade with prob 0.5\n else if (this.mode_val == 1) {\n //if (rnd < 0.5) {return this.downgrade(player)}\n\t val = this.downgrade(player);\n\t val = this.downgrade(val);\n //else {return this.upgrade(player)}\n }\n else if (this.mode_val == 2) {\n //if (rnd < 0.5) {return this.downgrade(player)}\n\t val = this.downgrade(player);\n\t val = this.upgrade(val);\n //else {return this.upgrade(player)}\n }\n\n\n\tif (Math.random() < this.epsilon)\n\t{ // add a bit of noise\n\t if (Math.random() < 0.5)\n\t {\n\t\tval = this.downgrade(val);\n\t }\n\t else\n\t {\n\t\tval = this.upgrade(val);\n\t }\n\t}\n\treturn val;\n }", "title": "" }, { "docid": "6d377c7de3ce34db5fc1f25e15bcb57c", "score": "0.450091", "text": "getPassportStrategy(strategyConfig) {\n if (!this.ServiceStrategy) {\n throw new Error(\n `Must provide PassportJs strategy Type in constructor or override this method in ${\n this.authType\n }`\n );\n }\n\n return new this.ServiceStrategy(\n {\n clientID: this.config.consumerKey,\n clientSecret: this.config.consumerSecret,\n callbackURL: this.config.callbackURL,\n passReqToCallback: true,\n ...strategyConfig,\n },\n async (req, accessToken, refreshToken, profile, done) => {\n try {\n let result = await this.validate({\n accessToken,\n });\n if (!result.success) {\n // false indicates an authentication failure\n // `done` is the callback passed to `passport.authenticate`, so\n // params passed here will be the arguments to that function\n return done(null, false, { ...result, profile });\n }\n // `done` is the callback passed to `passport.authenticate`, so params\n // passed here will be the arguments to that function\n return done(null, result.item, { ...result, profile });\n } catch (error) {\n return done(error);\n }\n }\n );\n }", "title": "" }, { "docid": "8e8f41611264d8ab456822dff52e9c49", "score": "0.44968084", "text": "function select_any_provider(reason) {\n var candidates = find_keynote_candidates('countries', request.country);\n\n if (candidates.length === 0) {\n candidates = find_keynote_candidates('markets', request.market);\n }\n\n if (candidates.length === 0) {\n selected_provider = settings.default_provider;\n reason_code = reasons.no_available_keynote_provider + reasons.default_provider;\n }\n else if (candidates.length === 1) {\n selected_provider = candidates[0];\n reason_code = reason;\n }\n else {\n selected_provider = candidates[(Math.random() * candidates.length) >> 0];\n reason_code = reasons.random_available + reason;\n }\n }", "title": "" }, { "docid": "4abc275402baebb824a7837d378daf0a", "score": "0.4491269", "text": "function makeAssay(label, strategy) {\n mustBeComparable(label);\n\n // The brand represents recognition of the amount as authorized.\n const brand = new WeakSet();\n\n const assay = harden({\n getLabel() {\n return label;\n },\n\n getStrategy() {\n return strategy;\n },\n\n // Given the raw quantity that this kind of amount would label, return\n // an amount so labeling that quantity.\n make(allegedQuantity) {\n strategy.insistKind(allegedQuantity);\n const amount = harden({\n label,\n quantity: allegedQuantity,\n });\n brand.add(amount);\n return amount;\n },\n\n // Is this like an amount object made by this assay, such as one\n // received by pass-by-copy from an otherwise-identical remote\n // amount? On success, return an amount object made by this\n // assay. Otherwise error.\n //\n coerce(allegedAmount) {\n if (brand.has(allegedAmount)) {\n return allegedAmount;\n }\n if (!Object.prototype.hasOwnProperty.call(allegedAmount, 'quantity')) {\n // This is not an amount. Let's see if it's a quantity. Will\n // throw on inappropriate quantity.\n return assay.make(allegedAmount);\n }\n const { label: allegedLabel, quantity } = allegedAmount;\n mustBeSameStructure(label, allegedLabel, 'Unrecognized label');\n // Will throw on inappropriate quantity\n return assay.make(quantity);\n },\n\n // Return the raw quantity that this amount labels.\n quantity(amount) {\n return assay.coerce(amount).quantity;\n },\n\n // Represents the empty set of erights, i.e., no erights\n empty() {\n return assay.make(strategy.empty());\n },\n\n isEmpty(amount) {\n return strategy.isEmpty(assay.quantity(amount));\n },\n\n // Set inclusion of erights.\n // Does the set of erights described by `leftAmount` include all\n // the erights described by `rightAmount`?\n includes(leftAmount, rightAmount) {\n const leftQuantity = assay.quantity(leftAmount);\n const rightQuantity = assay.quantity(rightAmount);\n return strategy.includes(leftQuantity, rightQuantity);\n },\n\n equals(leftAmount, rightAmount) {\n const leftQuantity = assay.quantity(leftAmount);\n const rightQuantity = assay.quantity(rightAmount);\n return strategy.equals(leftQuantity, rightQuantity);\n },\n\n // Set union of erights.\n // Combine the amounts described by 'leftAmount' and 'rightAmount'.\n with(leftAmount, rightAmount) {\n const leftQuantity = assay.quantity(leftAmount);\n const rightQuantity = assay.quantity(rightAmount);\n return assay.make(strategy.with(leftQuantity, rightQuantity));\n },\n\n // Covering set subtraction of erights.\n // If leftAmount does not include rightAmount, error.\n // Return the amount included in 'leftAmount' but not included in 'rightAmount'.\n without(leftAmount, rightAmount) {\n const leftQuantity = assay.quantity(leftAmount);\n const rightQuantity = assay.quantity(rightAmount);\n return assay.make(strategy.without(leftQuantity, rightQuantity));\n },\n });\n return assay;\n}", "title": "" }, { "docid": "f6bd807cd4e7a989fb73620ed75981af", "score": "0.44864306", "text": "function OktaConfigurationStrategy() {\n\n}", "title": "" }, { "docid": "0f10cbe31e79128db9227354b4ac58d8", "score": "0.44720328", "text": "function AssignPersonality() {\n\tswitch(Dice(1)) {\n\t\tdefault:\n\t\t\tOPC.personality = \"balanced\";\n\t\t\tbreak;\n\t}\t\n}", "title": "" }, { "docid": "3162af197b6d9736dcdb5d5aca17e8d0", "score": "0.4471979", "text": "generatePlan(planType, data) {\n if(planType === \"random\")\n return Algorithms.randomAlgorithm(data);\n else if(planType === \"best random\")\n return Algorithms.bestRandom(data);\n else if(planType === \"greedy\")\n return Algorithms.greedyAlgorithm(data);\n else if(planType === \"knapsack\")\n return Algorithms.knapsackAlgorithm(data);\n }", "title": "" }, { "docid": "1f32e179fd2badc3a47cd752a274aac7", "score": "0.4461089", "text": "function GoalFactory() {\n\n}", "title": "" }, { "docid": "c51405b02f70b43cf7c7715b6b746eae", "score": "0.4460481", "text": "function runAlgoSelected() {\n let algo;\n for (let i = 0; i < algoTracker.length; i++) {\n if (algoTracker[i][1] === true) {\n algo = algoTracker[i][0]\n }\n }\n if (!algo) {\n alert('Select an Algorithm first')\n } else {\n if (algo === 'quick') {\n return main.quick();\n } else if (algo === 'bubble') {\n return main.bubble();\n } else if (algo === 'merge') {\n return main.merge();\n } else if (algo === 'heap') {\n return main.heap();\n }\n }\n}", "title": "" }, { "docid": "1591743bc549eba2d56655898920df80", "score": "0.44463125", "text": "getPassportStrategy() {\n if (!this.ServiceStrategy) {\n throw new Error(\n `Must provide PassportJs strategy Type in constructor or override this method in ${\n this.authType\n }`\n );\n }\n\n return new this.ServiceStrategy(\n {\n clientID: this.config.consumerKey,\n clientSecret: this.config.consumerSecret,\n callbackURL: this.config.callbackURL,\n passReqToCallback: true,\n },\n async (req, accessToken, refreshToken, profile, done) => {\n try {\n let result = await this.validate({\n accessToken,\n });\n if (!result.success) {\n // false indicates an authentication failure\n return done(null, false, { ...result, profile });\n }\n return done(null, result.item, { ...result, profile });\n } catch (error) {\n return done(error);\n }\n }\n );\n }", "title": "" }, { "docid": "a5db13b6bf2f05ae46afa48a0edc8d5e", "score": "0.4428386", "text": "lookupCallback(found, rawInput) {\n\n\n switch (found.length) {\n case 0:\n this.agent.ask(`\n I heard you say: \"${rawInput}\". Could you be more specific?\n `, { lastOperator: null });\n break;\n case 1:\n const op = found[0];\n const successPhrase = () => {\n const s = [\n 'Alright, you should try out the \"%s\" operator.',\n 'Well, the \"%s\" operator is what you are looking for.',\n 'For this specific use case, the \"%s\" operator would be fine.',\n 'May be the \"%s\" operator could help.',\n 'I believe the \"%s\" operator is perfect for that.',\n 'André Staltz suggests you try the \"%s\" operator.',\n 'Kwon Oh-joong thinks the \"%s\" operator is what you are looking for.'\n ];\n return s[(Math.random() * (s.length - 1)) | 0];\n }\n this.agent.ask(`\n ${ successPhrase().replace('%s', op) }\n ${this.agent.getRandomConversationMessage()}\n `, { lastOperator: found });\n break;\n case 2:\n this.agent.ask(`\n I found 2 operators for you. The \"${found[0]}\" operator and \"${found[1]}\" operator.\n ${this.agent.getRandomConversationMessage()}\n `, { lastOperator: found });\n break;\n default:\n const partial = (found) => {\n const cloned = Object.create(found);\n const r = () => (Math.random() * (cloned.length - 1)) | 0;\n return [\n cloned.splice(r(), 1),\n cloned.splice(r(), 1),\n cloned.splice(r(), 1)\n ];\n };\n const phrase = () => {\n return (found.length === 3) ? ':' : '. Here are 3 of them:';\n };\n const smartJoin = (arr) => {\n const last = arr.pop();\n return `\"${arr.join('\", \"')}\" and \"${last}\"`;\n };\n const arr = partial(found);\n this.agent.ask(`\n I found ${found.length} operators that match your request${phrase(arr)} \n ${smartJoin(arr)}. \n ${this.agent.getRandomConversationMessage()}\n `, { lastOperator: arr });\n }\n }", "title": "" }, { "docid": "77255d39c69ebf4afd199e4a5253df72", "score": "0.4426837", "text": "async getAppsForStrategy(strategyName) {\n const rows = await this.db.select(COLUMNS).from(TABLE);\n return rows\n .map(mapRow)\n .filter(apps => apps.filter(app => app.strategies.includes(strategyName)));\n }", "title": "" }, { "docid": "1b35dfcd1c4f2e3bef2545c933214bbb", "score": "0.4426302", "text": "async cmd_random_face(params) {\n this.initBarber()\n\n await this.resetReqId()\n\n let json = await this.query({\n url: \"/user/getprofile/\",\n body: {\n hero_id: this.bot.id,\n req_id: 10,\n },\n })\n\n let sex = json.data.profile.sex\n\n let url = \"/barbershop/buymulti/\"\n\n let keepGender = !!this.rand(0,1)\n\n if ( !keepGender ) {\n sex = (sex===SEX[0]) ? SEX[1] : SEX[0]\n url = \"/user/changesex/\"\n }\n\n let skinColor = this.rand(this.barber.skin.min, this.barber.skin.max)\n let hairColor = this.rand(this.barber.hair.min, this.barber.hair.max)\n\n let productIDs = []\n\n let order = [\"hair\",\"eyes\",\"eyebrows\",\"nose\",\"facespecial\",\"facialhair\"]\n let types = this.barber.body[sex]\n\n order.forEach(type => {\n if ( !types[type] ) { return }\n productIDs.push(types[type][this.rand(0, types[type].length - 1)])\n })\n\n return this.query({\n url,\n body: {\n productIDs,\n skinColor,\n hairColor,\n req_id: 11,\n },\n })\n }", "title": "" }, { "docid": "38e36d7a9d3a9d1353f86ee3ec26848f", "score": "0.4404566", "text": "function chooseAction(me, opponent, t) {\n // This strategy uses the state variable 'evil'.\n // In every round, turn 'not angel' with 10% probability.\n // (And remain this way until the 200 rounds are over.)\n if (Math.random() < 0.1) {\n angel = false;\n }\n\n // If angel, recycle\n if (angel) return 1;\n\n return 0; // Waste otherwise\n }", "title": "" }, { "docid": "edd4fecdfb70614b613259c1dbff1360", "score": "0.44034067", "text": "function Strategy(options, verify) {\n if (typeof options == 'function') {\n verify = options;\n options = {};\n }\n if (!verify) throw new Error('local authentication strategy requires a verify function'); \n passport.Strategy.call(this);\n this.name = 'custom';\n this._verify = verify;\n this._passReqToCallback = options.passReqToCallback;\n}", "title": "" }, { "docid": "0fa6e638d04141108f5479db086e4959", "score": "0.43965906", "text": "function fetchStrategies(cb, options = {}) {\n var data = {\n state: encodeURIComponent(ns.stateString),\n updateResults: Boolean(options.updateResults)\n };\n\n $.ajax({\n url: \"showStrategy.do\",\n type: \"POST\",\n dataType: \"json\",\n data: data,\n success: function(data) {\n cb(data);\n }\n });\n }", "title": "" }, { "docid": "3cb7524c67c171268182a32fce29c260", "score": "0.43823287", "text": "async generate(strategizer) {\n var results = Recipe.over(strategizer.generated, new class extends Recipe.Walker {\n onRecipe(recipe) {\n this.score = 0;\n }\n\n onView(recipe, view) {\n if (!view.id && !view.create) {\n this.score--;\n return (recipe, view) => view.create = true;\n }\n }\n }(Recipe.Walker.ApplyAll), this);\n\n return { results, generate: null };\n }", "title": "" }, { "docid": "b107a82ea77fb3bb4df9599177c951ba", "score": "0.43645474", "text": "determinePersonality() {\n // reset our chicken probability\n this.chickenThreshold = config.BOT_CHICKEN_THRESHOLD;\n this.chicken = false;\n\n // then check what we should do.\n this.analyse();\n }", "title": "" }, { "docid": "911f804df849543e8035a564db42f637", "score": "0.43518072", "text": "function payoff(loc, strategy) {\n\t\t\tvar site = typeof loc === \"number\" ? loc: loc[0],\n\t\t\t\thood = find_neighbors(site, strategy);\n\n\t\t\treturn hood.map(function(d) {\n\t\t\t\treturn game_set[strategy.get(site)][strategy.get(d)][0];\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "38612401efa87016ac502566812890f3", "score": "0.4346168", "text": "function useNextProvider()\n{\n iProvider = ( iProvider + 1 ) % providers.length;\n}", "title": "" }, { "docid": "8c7a4ded6797e9830762ef6bb7ab2970", "score": "0.43406552", "text": "function usePaper() {\n let aiChoice = aiTurn();\n let lastRound = comparator(1, aiChoice);\n endRound(aiChoice, lastRound);\n }", "title": "" }, { "docid": "6fc72ba02c6511b5689911c0597c313c", "score": "0.43405482", "text": "function Adaptor() {}", "title": "" }, { "docid": "cc14aebaf19c6c01b26965a44c45c812", "score": "0.43335134", "text": "updatePositionStrategy(strategy) {\n if (strategy === this._positionStrategy) {\n return;\n }\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._positionStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n this.updatePosition();\n }\n }", "title": "" }, { "docid": "1fecf28063a4bbdb912cd4c51fbc105c", "score": "0.43109488", "text": "function AlgorithmBaseAdaptor(args){\r\n\t// inheritance\r\n\tAlgorithm.call(this, args);\r\n\t\r\n\t\r\n\t/**\r\n\t * Requests execution of external algorithm.\r\n\t * @param args : {url: string,\r\n\t * \t\t\t\t method: string ('post', 'get'),\r\n\t * \t\t\t\t data:{test:\"hello\"}, // data passed to REST method (only useful in POST, PUT or PATCH methods)\r\n * path:{\"id\":120}, // path substitution var used in http://remote.site/rest/json/${id}/method?arg1=${arg1}&arg2=${arg2}\r\n * parameters: {arg1:\"hello\",arg2:\"world\"}, // query parameter substitution vars\r\n\t */\r\n\tthis.request = function(args){\t\t\r\n\t\treturn q.Promise(function(resolve, reject, notify){\r\n\t\t\tif(args.method !== 'get' && args.method !== 'post'){\r\n\t\t\t\tthrow new Error('Not supported http request method: '+args.method);\t\t\t\t\r\n\t\t\t} \r\n\t\t\tvar client = new Client();\r\n\t\t\tvar clientArgs = _.extend({headers:{\"Content-Type\": \"application/json\"}}, _.pick(args, ['data', 'path', 'parameters']));\r\n\t\t\tvar req = client[args.method](args.url, clientArgs, resolve);\r\n\t\t\t\r\n\t\t\treq.on('requestTimeout',function(req){\t\r\n\t\t\t reject('request timeout');\r\n\t\t\t});\r\n\r\n\t\t\treq.on('responseTimeout',function(res){\r\n\t\t\t reject('response timeout');\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\treq.on('error',function(err){\r\n\t\t\t\treject(err);\r\n\t\t\t});\r\n\t\t});\r\n\t};\t\r\n\r\n\t\r\n}", "title": "" }, { "docid": "448fd0acab3a7bbc2a06edb08f1f8c5f", "score": "0.43049884", "text": "takeDecision(input) {\n return [(Math.random() - 0.5) / 2, (Math.random() - 0.5) / 2];\n }", "title": "" }, { "docid": "75f08152db6bc37dda07b53eaacbf132", "score": "0.43001482", "text": "function tagBy(pred) {\n return ifElse (pred) (Right) (Left);\n }", "title": "" }, { "docid": "265677b0b8b46e3b9fd3cdc74fff2f32", "score": "0.42956504", "text": "updateScrollStrategy(strategy) {\n if (strategy === this._scrollStrategy) {\n return;\n }\n this._disposeScrollStrategy();\n this._scrollStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n strategy.enable();\n }\n }", "title": "" }, { "docid": "7ccc45545d752ae751389320b8d6c209", "score": "0.42924482", "text": "function runQueenStrategies() {\n debugme(\"runQueenStrategies: adjFriends: \" + adjFriends);\n switch (adjFriends[ANT_NAVIGATOR]) {\n case 0:\n\treturn (runQueenScramblingStrategy());\n case 1:\n\tfor (var i = 0; i < TOTAL_NBRS; i++) {\n\t var cell = view[CCW[i]];\n\t if (cell.ant && cell.ant.friend &&\n\t\tcell.ant.type == ANT_NAVIGATOR) {\n\t\tcompass = i & 6;\n\t\tdebugme(\"Queen: compass is set at \" + compass);\n\t\tif (i & 1) {\n\t\t return (runQueenLightspeedStrategy());\n\t\t} else {\n\t\t return (runQueenConfusedStrategy());\n\t\t}\n\t }\n\t}\n\tbreak; // notreached\n default:\n\treturn (runQueenChooseNavigatorStrategy());\n }\n return CELL_NOP; // notreached\n}", "title": "" }, { "docid": "edb546cb97a973a93d2911be8aec7730", "score": "0.4290005", "text": "whichRelationIsThis(i) {\n switch(i) {\n case 1:\n return \"Dual (Soulmate). \\nRank: 1\";\n \n case 2:\n return \"Identical (Same type). \\nRank: 2\";\n \n case 3:\n return \"Activity (Chill friends). \\nRank: 3\";\n \n case 4:\n return \"Mirror (The introverted/extrovered versions of each other). \\nRank: 4\";\n \n case 5:\n return \"Kindred (Share 1st function). \\nRank: 5\";\n \n case 6:\n return \"Look-a-like (Share 2nd function). \\nRank: 6\";\n \n case 7: \n return \"Semi-dual (Same as soulmate but with different second function). \\nRank: 7\";\n \n case 8:\n return \"Illusionary (Same as soulmate but with different first function). \\nRank: 8\";\n \n case 9:\n return \"Super-ego (Each type seems most detrimental to society to the other). \\nRank: 9\";\n \n case 10:\n return \"Benefit: \"+this.type.toTypeCode()+\" is Benifactee. \\nRank: 10\";\n \n case 11: \n return \"Benefit: \"+this.type.toTypeCode()+\" is Benefactor. \\nRank: 11\";\n \n case 12:\n return \"Supervision: \"+this.type.toTypeCode()+\" is Supervisor. \\nRank: 12\";\n \n case 13:\n return \"Supervision: \"+this.type.toTypeCode()+\" is Supervisee. \\nRank: 13\";\n \n case 14:\n return \"Quasi-identical (Rival). \\nRank: 14\";\n \n case 15:\n return \"Contrary (Ultimate Rival). \\nRank: 15\";\n \n default:\n return \"Conflict. \\nRank: 16\";\n \n }\n }", "title": "" }, { "docid": "d668c7e2263bca09395e9fbd98933303", "score": "0.42898554", "text": "constructor(initialBalance, strategy, timeframe, pair) {\n this.balance = initialBalance\n this.strategy = strategy\n this.timeframe = timeframe\n this.pair = pair\n this.running = false\n this.evaluations = []\n }", "title": "" }, { "docid": "ed5cff6961d6cf6301320fefab498782", "score": "0.42888823", "text": "setAlgoToAStar(){\n this.setState({algorithm: 'a-star'});\n }", "title": "" }, { "docid": "8647e3ccdd013cceeb199ded1501c164", "score": "0.42651138", "text": "setAlgorithm(index) {\n if (index > algorithms.length || index < 0) throw 'algorithm not valid';\n\n this._initRouting();\n this.algorithm = algorithms[index];\n\n // bus routing\n this.algorithm.output.forEach((routing, i) => {\n routing.forEach(function (outputIndex) {\n this.operators[i].source.connect(this.outputBusses[outputIndex]);\n }, this);\n });\n\n // modulator routing\n this.algorithm.modulations.forEach((modulations, i) => {\n modulations.forEach(modIndex => {\n if (i === modIndex) { // feedback\n this.feedbackNodes[i].gain.connect(this.operators[i].source);\n } else {\n this.operators[i].gain.connect(this.operators[modIndex].source);\n }\n });\n });\n\n }", "title": "" }, { "docid": "8b7630eae96d2c9b53eaa8d37f7b04af", "score": "0.42567074", "text": "function _onLdapStrategy(estudiante, next) {\n var username;\n\n if (!estudiante) {\n return next(null, false, {message: 'No se encontro el usuario.'});\n }\n username = {\n nombre: estudiante.givenName + \" \"+ estudiante.sn,\n nombreUsuario: estudiante.uid,\n identificacion: estudiante.uidNumber,\n rol: estudiante.gidNumber\n };\n return next(null, username, {message: 'Identificado correctamente.'})\n}", "title": "" }, { "docid": "70914d1143483b60d9790008ab407c8a", "score": "0.42560393", "text": "findToolWithDefaultStrategy (name, options = {}) {\n if (isFalsy(name) || name.constructor !== String || name.trim() === '') {\n return Promise.resolve(false)\n }\n\n // Default Strategy Is: Look For The Tool In GOPATH, Then Look In PATH\n return Promise.resolve().then(() => {\n return this.findToolInDelimitedEnvironmentVariable(name, 'GOPATH', options)\n }).then((tool) => {\n if (isTruthy(tool)) {\n return tool\n }\n return this.findToolInDelimitedEnvironmentVariable(name, this.pathKey, options)\n })\n }", "title": "" }, { "docid": "cdc1181d98287ba5d3cfc10ed3a56408", "score": "0.4248462", "text": "function generatePasswordRandomness(userInput, pLength) {\n \n var valueRandom = 0;\n var counter = userInput.length \n var UserCounter = userInput.length \n var finalPassword = \"\"; \n \n for (var i = 0; i < userInput.length; i++) {\n\n var guaranteedCriteria = userInput[i];\n \n if (guaranteedCriteria === \"1\") {\n \n valueRandom = Math.floor(Math.random() * 26);\n finalPassword += rCriteria.lowercase.criteria[valueRandom];\n\n } else if (guaranteedCriteria === \"2\") {\n \n valueRandom = Math.floor(Math.random() * 26);\n finalPassword += rCriteria.uppercase.criteria[valueRandom];\n\n } else if (guaranteedCriteria === \"3\") {\n\n valueRandom = Math.floor(Math.random() * 10);\n finalPassword += rCriteria.numeric.criteria[valueRandom];\n\n } else if (guaranteedCriteria === \"4\") {\n\n valueRandom = Math.floor(Math.random() * 31);\n finalPassword += rCriteria.symbols.criteria[valueRandom];\n } \n }\n\n \n while ( counter < pLength ) {\n\n if (!userInput[(UserCounter - 1)]) {\n \n UserCounter -= Math.floor( ( (Math.random() * userInput.length) + 1) );\n counter += 1;\n \n } else {\n \n UserCounter = Math.floor( ( (Math.random() * userInput.length) + 1) );\n counter += 1;\n }\n\n \n var inputCriteria = userInput[(UserCounter - 1)];\n \n \n var inputCriteriaInteger = parseInt(inputCriteria);\n\n switch(inputCriteriaInteger) { \n case 1:\n \n valueRandom = Math.floor(Math.random() * 26);\n finalPassword += rCriteria.lowercase.criteria[valueRandom];\n break; \n case 2:\n valueRandom = Math.floor(Math.random() * 26);\n finalPassword += rCriteria.uppercase.criteria[valueRandom];\n break;\n case 3:\n valueRandom = Math.floor(Math.random() * 10);\n finalPassword += rCriteria.numeric.criteria[valueRandom];\n break;\n case 4:\n valueRandom = Math.floor(Math.random() * 31);\n finalPassword += rCriteria.symbols.criteria[valueRandom];\n break;\n }\n }\n \n return finalPassword;\n}", "title": "" }, { "docid": "121de44564aa1399d9a0cab45f1f53ee", "score": "0.42398408", "text": "function Strategy (options, verify) {\n if (typeof options === 'function') {\n verify = options\n options = {}\n }\n if (!verify) {\n throw new Error('cas authentication strategy requires a verify function')\n }\n\n this.ssoBase = options.ssoBaseURL\n this.serverBaseURL = options.serverBaseURL\n this.parsed = url.parse(this.ssoBase)\n if (this.parsed.protocol === 'http:') {\n this.client = http\n } else {\n this.client = https\n }\n\n passport.Strategy.call(this)\n\n this.name = 'cas'\n this._verify = verify\n}", "title": "" }, { "docid": "3f859d25b24e3819a189ebe2d50af269", "score": "0.42385077", "text": "create(argv) {\n const resourceRule = argv.strategy_resource ?\n argv.strategy_resource : \"./resource/never\";\n\n return require(resourceRule);\n }", "title": "" }, { "docid": "f421d741c5e830f2d528f168459108f8", "score": "0.4234962", "text": "function test_bottleneck_provider() {}", "title": "" }, { "docid": "51d932b928b9c5d651ffd6a4021c7614", "score": "0.4232762", "text": "_learnRules() {\n each(this._perimeters || [], (perimeter) => {\n this.governess.learnRules(perimeter);\n });\n }", "title": "" }, { "docid": "2f36c6a0689d72e5cabc778b91bfefac", "score": "0.421818", "text": "function parseApproach(owner, name, displayName, type, tokens, robotoText) {\n\n var strategies = [];\n var descriptions = [];\n var index = 0;\n\n // If it's a comment, read a comment.\n while (tokens.peek().charAt(0) === \"#\") {\n descriptions.push(tokens.eat());\n tokens.eat(\"\\n\");\n }\n\n // Parse one or more strategies.\n while (tokens.nextIs(\"strategy\")) {\n strategies.push(parseStrategy(index, tokens));\n index++;\n }\n // Parse one or more strategies.\n\n if (tokens.hasNext()) console.error(\"I'm not smart enough to handle anything other than strategies, so I got stuck on '\" + tokens.tokens.slice(0, 5).join(\" \") + \"'\");\n\n return {\n owner: owner,\n name: name,\n description: descriptions,\n displayName: displayName,\n robotoText: robotoText,\n strategies: strategies\n };\n}", "title": "" }, { "docid": "b1afeaf421f0a6a39e8f7bc3b75bf4d0", "score": "0.42104134", "text": "function ControllerMode_01(_interfaceKO, _mode) {\n var self = this;\n\n var mode = _mode; // {blast4, classic}\n\n self.getMode = function () { return mode; }\n self.bombsOn = function () { return self.getMode() == 'blast4'; }\n self.fullRowOn = function () { return self.getMode() == 'blast4'; }\n\n var lastThrow = null; // { null, 'U (user)', 'C (computer)'}\n\n //To activate throwEffect set throwEffectIni to 'on'\n var THROW_EFFECT_INI = 'off'; // { on, off }\n var throwEffect = THROW_EFFECT_INI;\n\n //To start match in test mode set to true\n var TEST_ON = false;\n self.testOn = function() { return TEST_ON; }\n //To print log at console.\n var LOG_ON = false;\n self.logOn = function() { return LOG_ON; }\n\n\n var TEST_IA = null;\n //To test an specific IA set it in variable TEST_IA \n //TEST_IA = new IA2('classic', true);\n //TEST_IA = new IA2('blast4', true);\n var IA = null;\n\n self.getIA = function () { return IA; }\n\n self.setIA = function () {\n if (TEST_IA != null) {\n window.activeLog(true);\n IA = TEST_IA;\n window.log('play with forced IA ' + IA.getName());\n return;\n }\n\n var iaMatch = null;\n\n if (window.score.matches == 0) {\n // first match with IA2 in blast4 and classic mode.\n iaMatch = new IA2(self.getMode(), false);\n } else { // second match or over\n var randNumber = (Math.floor(Math.random() * 5));\n\n if (self.getMode() == 'blast4') {\n // if user score is equal or higher, IA2 High\n // if is lower, 40 % of times IA1, 60 % of times IA2 (mediumhigh false)\n iaMatch = (window.score.user >= window.score.computer)\n ? new IA2(self.getMode(), true)\n : randNumber <= 1 ? new IA1(self.getMode()) : new IA2(self.getMode(), false);\n } else { // mode classic\n //if user score is equal or higher. set MediumHigh parameter to true\n iaMatch = (window.score.user >= window.score.computer)\n ? new IA2(self.getMode(), true)\n : new IA2(self.getMode(), false); \n }\n }\n\n\n IA = iaMatch;\n window.log('play with IA ' + IA.getName());\n }\n\n\n //Method new match. Clear board and starts new match\n self.newMatch = function() {\n if (self.logOn()) {\n window.activeLog(true);\n }\n\n window.log('new match');\n self.setIA();\n self.lastThrow = null;\n _interfaceKO.board(board.newBoard());\n var dashboard = _interfaceKO.getDashboard();\n _interfaceKO.winner(null);\n\n\n if (self.testOn()) {\n self.throwEffect = 'off';\n window.activeLog(true);\n self.testStartPosition(dashboard);\n return;\n }\n\n if (self.getMode() == 'blast4') {\n self.throwEffect = 'off';\n self.setRandomItems(dashboard);\n } else {\n self.setClassicBoard(dashboard);\n\t }\n\n\n self.throwEffect = THROW_EFFECT_INI;\n if (self.getMode() == 'classic')\n\t self.throwEffect = 'off'; // { on, off }\n }\n\n\n self.userThrow = function (column) {\n if (self.lastThrow == 'U') return;\n self.lastThrow = 'U';\n\n var dashboard = _interfaceKO.getDashboard();\n var row = self.throw(column, \"O\");\n var bomb = self.bombsOn() && board.thereIsBomb(dashboard, column, row);\n\n var next = function () {\n var dashboard = _interfaceKO.getDashboard();\n \n var bombOrFullRow = self.fullRowOn() && (bomb || board.fullRow(dashboard, row));\n\n if (!bombOrFullRow && self.getIA().checkThrowWinner(dashboard, column, row, \"O\")) {\n dashboard[row].cols[column] = 'O' + 'W';\n _interfaceKO.board(dashboard);\n self.showYouWin();\n return;\n }\n\n if (self.fullRowOn()) {\n setTimeout(self.checkFullRow(dashboard, row), (300 + throwEffect ? (row * 80) : 0));\n }\n\n if (!board.checkItemsFree(dashboard)) {\n self.showDraw();\n return;\n }\n\n if (self.bombsOn()) {\n setTimeout(function () { self.checkBomb(dashboard, column, row); }, (300 + throwEffect ? (row * 80) : 0));\n }\n\n setTimeout(function () { self.computerThrow(); }, !bomb ? 800 : 1100);\n };\n\n setTimeout(function () { next(); }, !bomb ? (4 + throwEffect ? (row * 80) : 0) : 20);\n }\n\n\n //Method computerThrow. Called from userThrow\n self.computerThrow = function () {\n var dashboard = _interfaceKO.getDashboard();\n\n var computerThrow = self.getIA().nextComputerThrow(dashboard);\n var row = self.throw(computerThrow, \"X\");\n var bomb = self.bombsOn() && board.thereIsBomb(dashboard, computerThrow, row)\n\n var next = function () {\n dashboard = _interfaceKO.getDashboard();\n\n self.lastThrow = 'C';\n\n var bombOrFullRow = self.fullRowOn() && (bomb || board.fullRow(dashboard, row));\n\n if (!bombOrFullRow && self.getIA().checkThrowWinner(dashboard, computerThrow, row, \"X\")) {\n dashboard[row].cols[computerThrow] = 'X' + 'W';\n _interfaceKO.board(dashboard);\n self.showYouLose();\n return;\n }\n\n if (self.fullRowOn()) {\n setTimeout(self.checkFullRow(dashboard, row), (300 + throwEffect ? (row * 80) : 0));\n }\n\n if (!board.checkItemsFree(dashboard)) {\n self.showDraw();\n return;\n }\n\n if (self.bombsOn()) {\n setTimeout(function () { self.checkBomb(dashboard, computerThrow, row); }, (300 + throwEffect ? (row * 80) : 0));\n }\n }\n\n setTimeout(function () { next(); }, !bomb ? (400 + throwEffect ? (row * 80) : 0) : 20);\n };\n\n\n //Throw action. It sets the state of the dashboard, then KnockOut refresh DOM\n self.throw = function (column, ficha) {\n var dashboard = _interfaceKO.getDashboard();\n var row = board.getLastRowFree(dashboard, column);\n if (row < 0) return;\n var bomb = board.thereIsBomb(dashboard, column, row);\n\n if (self.throwEffect == 'on' && row>0) {\n self.throwMovement(column, ficha, row, 0);\n } else {\n dashboard[row].cols[column] = !bomb ? ficha : null;\n }\n\n _interfaceKO.board(dashboard);\n return row;\n };\n\n\n\n //TODO: Movement in mobile is very slow\n //Activate it only in computers\n //Also suggest a test with several smartphones.\n self.throwMovement = function (column, ficha, row, i) {\n var dashboard = _interfaceKO.getDashboard();\n var _idx = i;\n if (_idx <= row) {\n if (_idx > 0) {\n dashboard[_idx - 1].cols[column] = null;\n }\n\n var bomb = (_idx < row || _idx == 8) ? false\n : dashboard[_idx + 1].cols[column][0] == 'B';\n dashboard[_idx].cols[column] = ficha;\n\n _interfaceKO.board(dashboard);\n\n _idx = _idx + 1;\n }\n\n if (_idx > row) return row;\n\n setTimeout(function () { self.throwMovement(column, ficha, row, _idx); }, 75 - (_idx * 5));\n };\n\n\n\n self.checkBomb = function (dashboard, column, row) {\n if (board.thereIsBomb(dashboard, column, row)) {\n setTimeout(function () { self.bombExplodes(column, row); }, 50);\n return true;\n }\n\n return false;\n }\n\n\n self.bombExplodes = function (column, row) {\n var dashboard = _interfaceKO.getDashboard();\n dashboard[row].cols[column] = null;\n dashboard[row + 1].cols[column] = self.lastThrow == 'U' ? 'BEO' : 'BEX';\n\n\n _interfaceKO.board(dashboard);\n\n window.playAudio(window.audioBomb);\n setTimeout(function () { self.bombDestroys(column, row); }, 350);\n }\n\n\n self.bombDestroys = function (column, row) {\n var dashboard = _interfaceKO.getDashboard();\n dashboard[row + 1].cols[column] = null;\n\n _interfaceKO.board(dashboard);\n }\n\n\n self.checkFullRow = function (dashboard, row) {\n if (board.fullRow(dashboard, row)) {\n window.playAudio(window.audioFullRow);\n setTimeout(function () { self.rowInBlack(dashboard, row); }, 300);\n return true;\n }\n return false;\n }\n\n\n self.rowInBlack = function (dashboard, row) {\n for (var col = 0; col <= (dashboard.length - 1) ; col++) {\n dashboard[row].cols[col] = 'M';\n }\n\n self.throwNewRandomBomb(dashboard);\n _interfaceKO.board(dashboard);\n }\n\n self.throwNewRandomBomb = function (dashboard) {\n var randNumber = (Math.floor(Math.random() * dashboard[0].cols.length));\n //window.log('booomba en col ' + randNumber);\n var row = board.getLastRowFree(dashboard, randNumber);\n //window.log('booomba en row ' + row);\n if (row > 0) dashboard[row].cols[randNumber] = 'B';\n }\n\n\n self.setRandomItems = function (dashboard) {\n //avoid center\n var numBlocks = 0;\n while (numBlocks < 6) {\n var randNumber = (Math.floor(Math.random() * dashboard[0].cols.length));\n\n if (randNumber < 3 || randNumber > 5) {\n self.throw(randNumber, 'M');\n numBlocks = numBlocks + 1;\n }\n }\n\n for (var i = 1; i <= 3; i++) {\n var randNumber = (Math.floor(Math.random() * dashboard[0].cols.length));\n self.bombCol = randNumber;\n self.throw(randNumber, 'B');\n }\n }\n\n self.setClassicBoard = function (dashboard) \n {\n //Cols 0 and 8 locked\n for (var i = 0; i <= 8; i++) {\n self.throw(0, 'M');\n self.throw(8, 'M');\n };\n\n //3 rows locked\n for (i = 1; i <= 3; i++) {\n self.throw(1, 'M'); self.throw(2, 'M'); self.throw(3, 'M'); self.throw(4, 'M');\n self.throw(5, 'M'); self.throw(6, 'M'); self.throw(7, 'M');\n }\n }\n\n self.showYouWin = function () {\n $('#matchResult').attr('src', './img/youWin.png');\n window.playAudio(window.audioWin);\n gameControllerBase.increaseScore('U');\n _interfaceKO.winner(\"You Win!!\");\n self.showOutcomeSentence();\n self.endMatch();\n }\n\n self.showDraw = function () {\n _interfaceKO.winner(\"Draw\");\n self.endMatch();\n }\n\n self.showYouLose = function () {\n $('#matchResult').attr('src', './img/youLose2.png');\n window.playAudio(window.audioLose);\n _interfaceKO.winner(\"I Win\");\n\n gameControllerBase.increaseScore('C');\n self.showOutcomeSentence();\n self.endMatch();\n }\n\n self.showOutcomeSentence = function () {\n\n if (window.score.computer == 0 && window.score.user == 1) {\n $('#outcomeSentence').html(\"Let’s go! I dare you to win 4 matches in a row!\");\n return;\n }\n\n if (window.score.computer == 0 && window.score.user == 4) {\n $('#outcomeSentence').html(\"Excellent! You made it!\");\n return;\n }\n\n if (window.score.computer > window.score.user + 2) {\n $('#outcomeSentence').html(\"Have you tried kids mode?\");\n } else if (window.score.computer == window.score.user + 1 || window.score.computer == window.score.user + 2) {\n $('#outcomeSentence').html(\"I’ll make it easier for you so that you can do it.\");\n } else if (window.score.computer == window.score.user) {\n $('#outcomeSentence').html(\"We’re tied, this is getting exciting...\");\n } else if (window.score.computer == window.score.user - 1) {\n $('#outcomeSentence').html(\"Let’s go! Will you be able to stay ahead?\");\n } else if (window.score.computer < window.score.user) {\n $('#outcomeSentence').html(\"You’re so good! I’ll think a bit more and we’ll see whether you can beat me then\");\n }\n }\n\n self.endMatch = function () {\n setTimeout(function () {\n $('#playAgain').attr('style', 'display: inline-block;');\n $('#matchEndContainer').attr('style', 'display:inline-block');\n }, 600);\n }\n\n\n //To test IA or game in an sepecific scenario\n self.testStartPosition = function (dashboard) {\n self.setClassicBoard(dashboard);\n\n //Cover/No Cover GAP\n //self.throw(2, 'M'); self.throw(3, 'O'); self.throw(5, 'O'); self.throw(6, 'M');\n //return;\n\n //Cover diagonals\n //self.throw(1, 'O'); self.throw(2, 'X'); \n //self.throw(4, 'O'); self.throw(4, 'X'); self.throw(4, 'O'); self.throw(4, 'O');\n //return;\n\n //Cover diagonals\n //self.throw(2, 'X'); self.throw(2, 'O'); self.throw(2, 'X'); self.throw(2, 'O');\n //self.throw(4, 'O'); self.throw(4, 'X'); self.throw(4, 'O');\n //return;\n\n //Test WAIT the check.\n //self.throw(2, 'O'); self.throw(2, 'X');\n //self.throw(3, 'X'); self.throw(3, 'X');\n //self.throw(5, 'X'); self.throw(5, 'X');\n //return;\n\n //Test defense gap below\n //self.throw(2, 'M'); self.throw(3, 'M'); self.throw(4, 'M'); \n //self.throw(2, 'O'); \n //return;\n\n //Test defense gap patter right (offset 2)\n //self.throw(3, 'X'); self.throw(3, 'O');\n //self.throw(5, 'O'); self.throw(5, 'O');\n //return;\n\n //Test defense gap pattern Left (offset 2)\n //self.throw(4, 'X'); self.throw(4, 'O');\n //self.throw(6, 'O'); self.throw(6, 'O');\n //return;\n\n\n\n //Test Attack gap pattern right (offset 2)\n //self.throw(3, 'O'); self.throw(3, 'X');\n //self.throw(5, 'X'); self.throw(5, 'X');\n //return;\n\n\n //Test Attack gap Left (offset 2)\n //self.throw(4, 'O'); self.throw(4, 'X');\n //self.throw(6, 'X'); self.throw(6, 'X');\n //return;\n\n \n //Test eases check mate in col 4.\n //self.throw(2, 'O');\n //self.throw(3, 'X'); self.throw(3, 'X'); self.throw(3, 'O'); self.throw(3, 'X'); self.throw(3, 'X');\n //self.throw(4, 'O'); self.throw(4, 'O'); self.throw(4, 'X'); self.throw(4, 'O');\n //self.throw(5, 'X'); self.throw(5, 'O'); self.throw(5, 'O');\n\n\n\n //Test full row\n //self.throw(0, 'O'); self.throw(1, 'O'); self.throw(2, 'O');\n //self.throw(3, 'X'); self.throw(4, 'X'); self.throw(5, 'X');\n //self.throw(7, 'M'); self.throw(8, 'M');\n\n //self.throw(3, 'X'); self.throw(3, 'O'); self.throw(3, 'X'); self.throw(3, 'X'); self.throw(3, 'O');\n //self.throw(4, 'X'); self.throw(4, 'O');\n //self.throw(5, 'O'); self.throw(5, 'X'); self.throw(5, 'O'); self.throw(5, 'X'); self.throw(5, 'O'); \n //self.throw(6, 'O'); self.throw(6, 'O'); self.throw(6, 'O'); self.throw(6, 'X'); self.throw(6, 'O'); self.throw(6, 'O');\n //self.throw(7, 'M'); self.throw(7, 'M'); self.throw(7, 'M'); self.throw(7, 'M'); self.throw(7, 'M'); self.throw(7, 'M'); self.throw(7, 'O');\n\n //Test Attack GAPPattern\n //self.throw(0, 'M');\n //self.throw(2, 'M'); self.throw(2, 'X');\n //self.throw(3, 'M'); self.throw(3, 'X');\n\n //Test defende GAPPattern\n //self.throw(0, 'M'); \n //self.throw(2, 'M'); self.throw(2, 'O');\n //self.throw(3, 'M'); self.throw(3, 'O');\n\n //Test attack in diagonal\n //self.throw(0, 'X');\n //self.throw(1, 'M');\n //self.throw(2, 'M'); self.throw(2, 'M');\n //self.throw(3, 'M'); self.throw(3, 'M'); self.throw(3, 'M'); self.throw(3, 'X');\n\n //8. test Defense to avoid this situation: Called Pattern4\n // 00\n // 00\n //self.throw(2, 'O');\n //self.throw(2, 'O');\n //self.throw(3, 'O');\n //self.throw(4, 'X');\n\n //To test patter X..X\n //self.throw(0, 'X');\n //self.throw(3, 'X');\n }\n}", "title": "" }, { "docid": "00acb48fe9e3b686cf3128e68ec94beb", "score": "0.4207129", "text": "function baseresidue (query,prims,facts,rules)\r {var answer = baseresone(query,seq(),seq(),nil,prims,seq(),seq(),facts,rules);\n if (answer) {return maksand(answer[0])};\n return false}", "title": "" }, { "docid": "9801138174a9f3c2b35a5b84dfae6065", "score": "0.42012447", "text": "get authenticationStrategyInput() {\n return this._authenticationStrategy;\n }", "title": "" }, { "docid": "8faa6175a52c1e9f70a4d302362264cb", "score": "0.4192593", "text": "onClickAlgorithm(e, algorithm) {\n e.preventDefault();\n this.setState({ activeAlgorithm: algorithm });\n }", "title": "" } ]
8c20db1268c4d95826e9ee84a0f4e56f
Set the edge thickness for the free product graph, based on the user controls
[ { "docid": "430c40ab4e92f6209914e97ba29ac388", "score": "0.59658927", "text": "function setThickness(depth=0,subgraph=0){\n var usethickness = document.getElementById(\"thethicknessFP\").checked;\n var maxDepth = document.getElementById(\"thedepth\").value;\n return (usethickness?Math.max(1,maxDepth - depth):2*(1+subgraph));\n}", "title": "" } ]
[ { "docid": "07b6adcb417450f8eef4f4fe59a77194", "score": "0.63832915", "text": "function getBendShapesLength(edge) {\n var factor = options().bendShapeSizeFactor;\n if (parseFloat(edge.css('width')) <= 2.5)\n return 2.5 * factor;\n else return parseFloat(edge.css('width'))*factor;\n }", "title": "" }, { "docid": "89edbe5e9bcd9bff29e0c70eda0e75fb", "score": "0.6038484", "text": "edgeWeight(edge) { return 1; }", "title": "" }, { "docid": "a59dbee6687666054c3a44e98e087393", "score": "0.59989065", "text": "function thicknessSelectListener (e) {\n // Determine which option was selected\n var newThickness = this.options[this.selectedIndex].value;\n // Locally, set the line thickness to the selected value\n localLineThickness = getValidThickness(newThickness);\n}", "title": "" }, { "docid": "8620ae7e4a7d5187237c12829993ae0b", "score": "0.5934557", "text": "function changeStrokeThickness(comp){\n var source = comp.source;\n var shape = findShapeLayer(source.layers);\n shape.property(\"Contents\").property(\"Stroke 1\").property(\"Stroke Width\").setValue(parseInt(borderWidth.text));\n}", "title": "" }, { "docid": "cfa456d431b66eca90158c6dcc66df02", "score": "0.59211475", "text": "function setPenToolSize(dblSize) {\n var idslct = charIDToTypeID('slct');\n var desc3 = new ActionDescriptor();\n var idnull = charIDToTypeID('null');\n var ref2 = new ActionReference();\n var idPcTl = charIDToTypeID('PcTl');\n ref2.putClass(idPcTl);\n desc3.putReference(idnull, ref2);\n executeAction(idslct, desc3, DialogModes.NO);\n\n var idsetd = charIDToTypeID('setd');\n var desc2 = new ActionDescriptor();\n var ref1 = new ActionReference();\n var idBrsh = charIDToTypeID('Brsh');\n var idOrdn = charIDToTypeID('Ordn');\n var idTrgt = charIDToTypeID('Trgt');\n ref1.putEnumerated(idBrsh, idOrdn, idTrgt);\n desc2.putReference(idnull, ref1);\n var idT = charIDToTypeID('T ');\n var idmasterDiameter = stringIDToTypeID('masterDiameter');\n var idPxl = charIDToTypeID('#Pxl');\n desc3.putUnitDouble(idmasterDiameter, idPxl, dblSize);\n desc2.putObject(idT, idBrsh, desc3);\n executeAction(idsetd, desc2, DialogModes.NO);\n }", "title": "" }, { "docid": "883b01ea014b5f684b1dba8ea41bf1a1", "score": "0.59025186", "text": "function calculateLinkThickness() {\n links.forEach(function (link) {\n link.thickness = link.value * yScaleFactor / 6;\n\n });\n }", "title": "" }, { "docid": "dd5896a6f4a8d3ee39aa357836dad852", "score": "0.5826818", "text": "function calculateLinkThickness() {\n links.forEach(function (link) {\n link.thickness = link.value * yScaleFactor / 6;\n\n });\n }", "title": "" }, { "docid": "f886f3446d98fdb43c56006a712f1341", "score": "0.5825561", "text": "function setPenToolSize(dblSize) {\r var idslct = charIDToTypeID( \"slct\" );\r var desc3 = new ActionDescriptor();\r var idnull = charIDToTypeID( \"null\" );\r var ref2 = new ActionReference();\r var idPcTl = charIDToTypeID( \"PcTl\" );\r ref2.putClass( idPcTl );\r desc3.putReference( idnull, ref2 );\r executeAction( idslct, desc3, DialogModes.NO );\r\r var idsetd = charIDToTypeID( \"setd\" );\r var desc2 = new ActionDescriptor();\r var idnull = charIDToTypeID( \"null\" );\r var ref1 = new ActionReference();\r var idBrsh = charIDToTypeID( \"Brsh\" );\r var idOrdn = charIDToTypeID( \"Ordn\" );\r var idTrgt = charIDToTypeID( \"Trgt\" );\r ref1.putEnumerated( idBrsh, idOrdn, idTrgt );\r desc2.putReference( idnull, ref1 );\r var idT = charIDToTypeID( \"T \" );\r var desc3 = new ActionDescriptor();\r var idmasterDiameter = stringIDToTypeID( \"masterDiameter\" );\r var idPxl = charIDToTypeID( \"#Pxl\" );\r desc3.putUnitDouble( idmasterDiameter, idPxl, dblSize ); //1.000000\r var idBrsh = charIDToTypeID( \"Brsh\" );\r desc2.putObject( idT, idBrsh, desc3 );\r executeAction( idsetd, desc2, DialogModes.NO );\r}", "title": "" }, { "docid": "be1bf208b020a2e871e58e660f1953e0", "score": "0.58130085", "text": "function changeWidth2(){\n if(($('#checkbox0').hasClass('checked')) || ($('#line0').hasClass('checked'))){\n context.lineWidth = 1; }\n if(($('#checkbox1').hasClass('checked')) || ($('#line1').hasClass('checked'))){\n lineThickness = 1;\n context.lineWidth = 1;\n } \n if(($('#checkbox2').hasClass('checked')) || ($('#line2').hasClass('checked'))){\n lineThickness = 3;\n context.lineWidth = 3;\n } \n if(($('#checkbox3').hasClass('checked')) || ($('#line3').hasClass('checked'))){\n lineThickness = 5;\n context.lineWidth = 5;\n } \n if(($('#checkbox4').hasClass('checked')) || ($('#line4').hasClass('checked'))){\n lineThickness = 8;\n context.lineWidth = 8;\n } \n }", "title": "" }, { "docid": "dee7d20234cee96437040f19acb90af0", "score": "0.5798598", "text": "get strokeWidth() {\n return this._strokeWidth || this.diameter / 10;\n }", "title": "" }, { "docid": "dee7d20234cee96437040f19acb90af0", "score": "0.5798598", "text": "get strokeWidth() {\n return this._strokeWidth || this.diameter / 10;\n }", "title": "" }, { "docid": "2dddb36cd45b93f4ae86c5b7f49c490e", "score": "0.5761205", "text": "function adjustCanvasSize() {\n var offsetContainer = jqGraph.offsetParent();\n var graphOffset = jqGraph.offset();\n var padding = layoutSettings.graphPadding;\n var scollbarSpace = 20;\n var width = offsetContainer.width() - scollbarSpace;\n var height = offsetContainer.height() - scollbarSpace;\n $( '.vertex, .edge', jqGraph[ 0 ] ).each( function( i, domNode ) {\n var jqVertex = $( domNode );\n var pos = jqVertex.offset();\n width = Math.max( width, pos.left - graphOffset.left + jqVertex.width() + padding );\n height = Math.max( height, pos.top - graphOffset.top + jqVertex.height() + padding );\n } );\n jqGraph.width( width ).height( height );\n }", "title": "" }, { "docid": "b13ea953a492fde4a5c8cf70b3874ab3", "score": "0.5759683", "text": "function setSize(size) {\n context.lineWidth = size;\n}", "title": "" }, { "docid": "101e549b2060f1dab7a93d70c4125de1", "score": "0.57542497", "text": "function edgeWidth(edge,width) {\n edge.width = width;\n edges.update(edge);\n isReset = false;\n}", "title": "" }, { "docid": "cc3f62f51749960d5f44d77a97ccabec", "score": "0.5740011", "text": "idealEdgeLength(edge) { return 32; }", "title": "" }, { "docid": "c9871cae9dc388838cc2d36fb01c3af5", "score": "0.5659861", "text": "function changeLineWidthSelection(){\n var selected_shape_width_index = $(\"#width_selection\").prop('selectedIndex');//Stores the electio of the user\n //Based on the selection of the user, the width of the shape is changed accordingly\n if(selected_shape_width_index == 0){//Small size\n ctx.lineWidth = 2;\n lineW = 2;\n }\n else if(selected_shape_width_index == 1){//Medium size \n ctx.lineWidth = 5;\n lineW = 5;\n }\n else if(selected_shape_width_index == 2){//Large size\n ctx.lineWidth = 10;\n lineW = 10;\n }\n else{//Huge size\n ctx.lineWidth = 15;\n lineW = 15;\n }\n $(\"#width_selection\").prop('selectedIndex', selected_shape_width_index);\n}", "title": "" }, { "docid": "b7c58ec98512a221c47d0a3719b421e9", "score": "0.5648586", "text": "function ThicknessButton(sw, propname) {\r\n if (!propname) propname = \"thickness\";\r\n return $(go.Shape, \"LineH\",\r\n {\r\n width: 16, height: 16, strokeWidth: sw,\r\n margin: 1, background: \"transparent\",\r\n mouseEnter: function(e, shape) { shape.background = \"dodgerblue\"; },\r\n mouseLeave: function(e, shape) { shape.background = \"transparent\"; },\r\n click: ClickFunction(propname, sw), contextClick: ClickFunction(propname, sw)\r\n });\r\n }", "title": "" }, { "docid": "b36b164872be710c4dbb49b25dd7e960", "score": "0.56443053", "text": "setLineWidth(line_width)\n{\n this.lineWidth = line_width;\n}", "title": "" }, { "docid": "f12e0faeaa3ee56ae2ca0ae00ae19b94", "score": "0.56266046", "text": "function thicknessSelectListener (e) {\n // Determine which option was selected\n var newThickness = this.options[this.selectedIndex].value;\n // Locally, set the line thickness to the selected value\n localLineThickness = getValidThickness(newThickness);\n // Share the selected thickness with other users by setting the client\n // attribute named \"thickness\". Attributes are automatically shared with other\n // clients in the room, triggering clientAttributeUpdateListener().\n // Arguments for SET_CLIENT_ATTR are:\n // clientID\n // userID (None in this case)\n // attrName\n // escapedAttrValue\n // attrScope (The room)\n // attrOptions (An integer whose bits specify options. \"4\" means\n // the attribute should be shared).\n msgManager.sendUPC(UPC.SET_CLIENT_ATTR,\n orbiter.getClientID(),\n \"\",\n Attributes.THICKNESS,\n newThickness,\n appRoomID,\n \"4\");\n // After the user selects a value in the drop-down menu, the iPhone\n // automatically scrolls the page, so scroll back to the top-left.\n iPhoneToTop();\n }", "title": "" }, { "docid": "0de9d174f2ec5df48eb28e77b9242958", "score": "0.55904794", "text": "function pickWeight(newWidth){\n //Create a new style with the new width and base color\n var newStyle = new ol.style.Style({\n fill: new ol.style.Fill({\n color: 'rgba(255, 255, 255, 0.4)',\n weight: newWidth\n }),\n stroke: new ol.style.Stroke({\n color: baseColor,\n width: newWidth\n })\n });\n //Set new style and now the new width is the base width\n vector.setStyle(newStyle);\n baseWidth = newWidth;\n //Update de number for the user\n document.getElementById(\"resWidth\").innerHTML = newWidth;\n\n}", "title": "" }, { "docid": "fd235155141078057a42a9aea49a1535", "score": "0.55786794", "text": "function createBorder(element){\n // alert(element.source);\n var source = element.source;\n var shape = source.layers.addShape();\n var rect = shape.property(\"Contents\").addProperty(\"ADBE Vector Shape - Rect\");\n rect.property(\"Size\").setValue([source.width,source.height]);\n\n var shapeFill = shape.property(\"Contents\").addProperty(\"ADBE Vector Graphic - Fill\");\n shapeFill.property(\"Color\").setValue([1,1,1,1]);\n\n var shapeStroke = shape.property(\"Contents\").addProperty(\"ADBE Vector Graphic - Stroke\");\n shapeStroke.property(\"Color\").setValue([0,0,0,1]);\n shapeStroke.property(\"Stroke Width\").setValue(parseInt(borderWidth.text));\n shapeStroke.property(\"Composite\").setValue(2);\n\n if (detectEdgesOption.value == 1) {\n var detectedEdges = edgeDetection(element);\n var rect = shape.property(\"Contents\").property(\"Rectangle Path 1\");\n\n //prepare scale\n if (checkContent(detectedEdges,\"top\") || checkContent(detectedEdges,\"bottom\")) {\n var scaleX = rect.property(\"Size\").value[0];\n var scaleY = rect.property(\"Size\").value[1];\n var newScaleY = scaleY*1.5;\n\n rect.property(\"Size\").setValue([scaleX,newScaleY]);\n }\n\n if (checkContent(detectedEdges,\"left\") || checkContent(detectedEdges,\"right\")) {\n var scaleX = rect.property(\"Size\").value[0];\n var scaleY = rect.property(\"Size\").value[1];\n var newScaleX = scaleX*1.5;\n\n rect.property(\"Size\").setValue([newScaleX,scaleY]);\n }\n\n //set position\n var heightDifference = (rect.property(\"Size\").value[1]-source.height)/2;\n var widthDifference = (rect.property(\"Size\").value[0]-source.width)/2;\n var previousPosition = rect.property(\"Position\").value;\n\n if (checkContent(detectedEdges,\"top\") && checkContent(detectedEdges,\"bottom\") != true) {\n var newPosition = previousPosition - [0,heightDifference];\n rect.property(\"Position\").setValue(newPosition);\n }\n\n if (checkContent(detectedEdges,\"bottom\") && checkContent(detectedEdges,\"top\") != true) {\n var newPosition = previousPosition + [0,heightDifference];\n rect.property(\"Position\").setValue(newPosition);\n }\n\n previousPosition = rect.property(\"Position\").value;\n\n if (checkContent(detectedEdges,\"left\") && checkContent(detectedEdges,\"right\") != true) {\n var newPosition = previousPosition - [widthDifference,0];\n rect.property(\"Position\").setValue(newPosition);\n }\n\n if (checkContent(detectedEdges,\"right\") && checkContent(detectedEdges,\"left\") != true) {\n var newPosition = previousPosition + [widthDifference,0];\n rect.property(\"Position\").setValue(newPosition);\n }\n\n }\n}", "title": "" }, { "docid": "49a409a37bea8d627ab5269b7670ab6d", "score": "0.5550084", "text": "function setThickness(item, type) {\n var value = !item.segments ? item.borderWidth : item.lineWidth;\n $(\"#\" + type).ejDropDownList(\"option\", { selectedItems: [Math.round(value - 1)] });\n}", "title": "" }, { "docid": "333eb088222413de980caff17ec38142", "score": "0.5521923", "text": "set lineWidth(linewidth){\n this._lineWidth = linewidth;\n this.context.lineWidth = this._lineWidth\n }", "title": "" }, { "docid": "3622511d2327da98b3debb4b4c748e70", "score": "0.55153257", "text": "function setLineThickness(id, thickness) {\n var chartSvg = id ? d3.select('#wmChart' + id + ' svg') : d3.select(chartId + ' svg');\n thickness = thickness || 1.5;\n chartSvg.selectAll('.nv-line').style({'stroke-width': thickness});\n }", "title": "" }, { "docid": "a1205d158c763129189e00be3b12ec50", "score": "0.5510842", "text": "get strokeThickness() {\n return this._strokeThickness;\n }", "title": "" }, { "docid": "e6aeb3e72f7fb13885aa44c84905673a", "score": "0.5446395", "text": "edgeElasticity(edge) { return 32; }", "title": "" }, { "docid": "21400476693ebf47216eab36f9208ab6", "score": "0.543698", "text": "function setNodeDimension(item) {\n $('#chkAspectRatio').ejCheckBox({ checked: (item.constraints & ej.datavisualization.Diagram.NodeConstraints.AspectRatio) ? true : false });\n $(\"#nodeWidth\").ejNumericTextbox({ value: item.width });\n $(\"#nodeHeight\").ejNumericTextbox({ value: item.height });\n $(\"#nodeOffsetX\").ejNumericTextbox({ value: item.offsetX });\n $(\"#nodeOffsetY\").ejNumericTextbox({ value: item.offsetY });\n}", "title": "" }, { "docid": "2c4999c40b5b7316f2d44272ec1b165b", "score": "0.5432328", "text": "function increaseLineWidth() {\n \"use strict\";\n lineWidth = lineWidth + 1;\n if (gridState === false) {\n clearGrid(false, false, 10);\n changeBackgroundColour(\"green\");\n displayScreen(); //draw curves\n } else {\n clearGrid(true, true, 10);\n displayScreen(); //draw curves\n }\n}", "title": "" }, { "docid": "d2c245301659370dbec88c28b03d3250", "score": "0.5426827", "text": "get lineThickness(){ return this.__shp.lineThickness; }", "title": "" }, { "docid": "cce2769ea26141a1a571afb44abd9a3b", "score": "0.5409462", "text": "get strokeThickness() {\n return this.i.p;\n }", "title": "" }, { "docid": "ee737ee3bcb0f9f32ad0274fe767d25a", "score": "0.54023284", "text": "function sizeGraph(precision, choicecount, check)\n\t{\n\t if(precision=='Second')\n\t\t{\n\t\tif(choicecount>=2)\n\t\t{\t\t\n\t\t\t$(\"#placeholder2\").css({\"height\": \"80%\"});\n\t\t\t$(\"#placeholder3\").css({\"height\": \"10%\"});\n\t\t}\n\t\telse\n\t\t\t$('.demo-placeholder').css({\"height\":\"90%\"});\n\t\t}\n\telse{\n\t\t//* ok now we need to adjust the size of the graphs depending on what is selected *//\n\t\tif(choicecount ==4)\n\t\t\t$('.demo-placeholder').css({\"height\": \"30%\"});\t\n\t\telse if(choicecount ==3){\n\t\t\tif(check==2)\n\t\t\t\t$('.demo-placeholder').css({\"height\": \"45%\"});\n\t\t\telse\n\t\t\t\t$('.demo-placeholder').css({\"height\": \"30%\"});\t\n\t\t}\n\t\telse if(choicecount==2)\n\t\t{\n\t\t\tif(check==2)\n\t\t\t\t$('.demo-placeholder').css({\"height\": \"90%\"});\n\t\t\telse\n\t\t\t\t$('.demo-placeholder').css({\"height\": \"45%\"});\n\t\t}\n\t\telse\n\t\t\t$('.demo-placeholder').css({\"height\": \"90%\"});\n\t\t}\n\t\t$('#placeholder4').css({\"height\": \"10%\"});\n\t}", "title": "" }, { "docid": "084ed79d7856f179eb72a24beaaac351", "score": "0.5371587", "text": "function update_thickness(d){\n\treturn scale(d.thickness) - y_offset;\n }", "title": "" }, { "docid": "f26587977213166fce6db4a180cb854f", "score": "0.5345648", "text": "function event_lineWidth_change(e) {\n\t\tif (toolset.lineWidth != this.value) {\n\t\t\ttoolset.lineWidth = this.value;\n\t\t\ttempContext.lineWidth = this.value;\n\t\t}\n\t}", "title": "" }, { "docid": "61efd8c88f26817c77727c25d4123fc6", "score": "0.53359216", "text": "function border(borderSizeOff,borderSizeOn,borderColorFront,borderColorBack,multiplierCanvasSVGFormatX,multiplierCanvasSVGFormatY){\n document.getElementById('frontConfiguration').style.border=borderSizeOn+\"px solid\" + borderColorFront;\n document.getElementById('backConfiguration').style.border=borderSizeOn+\"px solid\" + borderColorBack;\n //recalculer le format\n canvasSvgSize(multiplierCanvasSVGFormatX, multiplierCanvasSVGFormatY,borderSizeOff);\n}", "title": "" }, { "docid": "b348b1204d8bad833536c3bebb172bfb", "score": "0.53063935", "text": "edgeLength() {\n return this.getFace().sideLength();\n }", "title": "" }, { "docid": "190f4a372586f7faa6eccde95649b6ca", "score": "0.5277142", "text": "function initLineWidthSettings() {\r\n const settingsEl = document.getElementById('line_width_layers');\r\n settingsEl.innerHTML = '';\r\n\r\n const keys = Object.keys(settings.lineWidths);\r\n keys.forEach(function (key) {\r\n const wrapper = document.createElement('div');\r\n settingsEl.appendChild(wrapper);\r\n\r\n const keyLabel = document.createElement('div');\r\n keyLabel.innerText = key;\r\n wrapper.appendChild(keyLabel);\r\n\r\n const topWrapper = document.createElement('div');\r\n topWrapper.className = 'flex-row justify';\r\n wrapper.appendChild(topWrapper);\r\n\r\n const topLabel = document.createElement('div');\r\n topLabel.innerText = 'Top';\r\n topWrapper.appendChild(topLabel);\r\n\r\n const topInput = document.createElement('input');\r\n topInput.type = 'text';\r\n topInput.size = 4;\r\n topInput.value = settings.lineWidths[key].top;\r\n topWrapper.appendChild(topInput);\r\n\r\n const bottomWrapper = document.createElement('div');\r\n bottomWrapper.className = 'flex-row justify';\r\n wrapper.appendChild(bottomWrapper);\r\n\r\n const bottomLabel = document.createElement('div');\r\n bottomLabel.innerText = 'Bottom';\r\n bottomWrapper.appendChild(bottomLabel);\r\n\r\n const bottomInput = document.createElement('input');\r\n bottomInput.type = 'text';\r\n bottomInput.size = 4;\r\n bottomInput.value = settings.lineWidths[key].bottom;\r\n bottomWrapper.appendChild(bottomInput);\r\n });\r\n}", "title": "" }, { "docid": "2787d044b763c04d5ec412ceb02c2a22", "score": "0.5251136", "text": "function setDiagramSize(showpropeditor) {\n var width = window.innerWidth - $(\"#main-left\").width();\n var pwidth = $(\"#propertyEditor\").width();\n if (!showpropeditor)\n pwidth = 0;\n $(\"#main-right\").css(\"width\", width - pwidth);\n /* \n We have set the diagram size in percentage. \n The diagram client side API method \"updateViewPort\" is used to update the diagram based on view port size.\n */\n diagram.updateViewPort();\n}", "title": "" }, { "docid": "3f5aa80028c7c1c7be456984552b3cc2", "score": "0.52438754", "text": "function decreaseLineWidth() {\n \"use strict\";\n if (lineWidth > 0) {\n lineWidth = lineWidth - 1;\n }\n if (gridState === false) {\n clearGrid(false, false, 10);\n changeBackgroundColour(\"green\");\n displayScreen(); //draw curves\n } else {\n clearGrid(true, true, 10);\n displayScreen(); //draw curves\n }\n}", "title": "" }, { "docid": "4cc529684b6c12778de446b164d94726", "score": "0.52431214", "text": "function drawAddEdge(edgeData, capacity, callback){\n edgeData.id = newEdgeID, edgeData.arrows = {to: {enabled: true}}, edgeData.font = {strokeWidth: 5};\n edgeData.width = 3, edgeData.arrowStrikethrough = false;\n edgeData.label = 0 + '/' + capacity;\n edges = addEdge(edges, newEdgeID, edgeData.from, edgeData.to, capacity);\n topEdges.update(edges);\n newEdgeID++;\n callback(edgeData);\n}", "title": "" }, { "docid": "1d8904fda4927d7f8f5398e5ffa9083e", "score": "0.52372897", "text": "function newtickfn(e){\n // see what options the user has chosen with the page controls:\n var useboundary = document.getElementById(\"theboundaryFP\").checked;\n var useedgecolours = document.getElementById(\"theedgecoloursFP\").checked;\n var useopacity = document.getElementById(\"theopacityFP\").checked;\n var usefixedroot = document.getElementById(\"thefixrootnodeFP\").checked;\n var usethickness = document.getElementById(\"thethicknessFP\").checked;\n var maxDepth = document.getElementById(\"thedepth\").checked;\n\n var newlink = thenewsvg.selectAll(\".productlink\");\n newlink.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\", function(d){return setEdgecolour(d.subgraph);})\n .style(\"stroke-width\", function(d,i){ return setThickness(d.depth,d.subgraph);} )\n .style(\"stroke-opacity\", function(d){ return (useopacity?1.0/d.depth:1); });\n\n // the node itself:\n var newnode = thenewsvg.selectAll(\".productnode\");\n newnode.each(newgravityfn(0.2*e.alpha));\n\n newnode.style(\"fill-opacity\", function(d){ return (useopacity?1.0/d.depth:1); })\n .style(\"stroke-opacity\", function(d){ return (useopacity?1.0/d.depth:1); });\n // How to fix the root node when the control is changed?\n // -- this isn't working:\n newnode.attr(\"fixed\", function(d){ return (d.id==\"rootnode\"&usefixedroot?\"true\":\"false\"); });\n\n newnode.attr(\"cx\", function(d) { return (useboundary? d.x = Math.max(nodeRadius, Math.min(outputWidth - nodeRadius, d.x)) : d.x); })\n .attr(\"cy\", function(d) { return (useboundary? d.y = Math.max(nodeRadius, Math.min(outputHeight - nodeRadius, d.y)) : d.y); });\n\n // the node update function text:\n var newtext = thenewsvg.selectAll(\".productupdatefn\");\n newtext.each(newgravityfn(0.2*e.alpha));\n newtext.attr(\"dx\", function(d) { return (useboundary? d.x = Math.max(nodeRadius, Math.min(outputWidth - nodeRadius, d.x)) : d.x + updatefnDeltaX); })\n .attr(\"dy\", function(d) { return (useboundary? d.y = Math.max(nodeRadius, Math.min(outputHeight - nodeRadius, d.y)) : d.y + updatefnDeltaY); });\n\n // the node address text:\n var newtext = thenewsvg.selectAll(\".productaddress\");\n newtext.each(newgravityfn(0.2*e.alpha));\n newtext.attr(\"dx\", function(d) { return (useboundary? d.x = Math.max(nodeRadius, Math.min(outputWidth - nodeRadius, d.x)) : d.x + addressDeltaX); })\n .attr(\"dy\", function(d) { return (useboundary? d.y = Math.max(nodeRadius, Math.min(outputHeight - nodeRadius, d.y)) : d.y + addressDeltaY); });\n\n // the node group:\n var newnodegroup = thenewsvg.selectAll(\"g\");\n newnodegroup.each(newgravityfn(0.2*e.alpha));\n newnodegroup.attr(\"cx\", function(d) { return (useboundary? d.x = Math.max(nodeRadius, Math.min(outputWidth - nodeRadius, d.x)) : d.x); })\n .attr(\"cy\", function(d) { return (useboundary? d.y = Math.max(nodeRadius, Math.min(outputHeight - nodeRadius, d.y)) : d.y) });\n\n return 0;\n}", "title": "" }, { "docid": "e50ea6d8beb030e0808ff5bfbf70f276", "score": "0.5233511", "text": "function increasePointSize() {\n var circles = document.querySelectorAll('g.graph>circle');\n\n for (var i = 0; i < circles.length; i++) {\n circles[i].r.baseVal.value = 3;\n }\n }", "title": "" }, { "docid": "7eca781b1529ccfb56872204c6367468", "score": "0.52332246", "text": "function strokeWidth(selection) {\n selection.attr(\"stroke\", \"grey\").attr(\"stroke-width\", \"5px\");\n }", "title": "" }, { "docid": "b0bb08a3f5c247ca0f050d61dabe8534", "score": "0.52046865", "text": "function edge_style(vertex, opacity){\n // renvoie une fn currifiee\n return function(e){ \n var e_color = \"stroke:\"+d3.schemeCategory20b[vertex.id % 20];\n var e_width = \"stroke-width:\"+( e.thickness / 2 );\n var e_opac = \"stroke-opacity:\"+opacity;\n return e_color+\";\"+e_width+\";\"+e_opac;\n };\n }", "title": "" }, { "docid": "045669d779c570fc790daac4d606f743", "score": "0.51949275", "text": "_resize() {\n\t\tthis.graphOptions.width = window.innerWidth * 0.7;\n\t\tthis.graphOptions.height = window.innerWidth * 0.5;\n\t\tthis.notifyPath('graphOptions.width');\n\t\tthis.notifyPath('graphOptions.height');\n\t}", "title": "" }, { "docid": "d88e7d0564d1ab20bc925df75b809151", "score": "0.5179876", "text": "function refreshGraphStyle(){\n\t zoom = zoom.scaleExtent([options.minMagnification(), options.maxMagnification()]);\n\t if ( graphContainer ) {\n\t zoom.event(graphContainer);\n\t }\n\t \n\t force.charge(function ( element ){\n\t var charge = options.charge();\n\t if ( elementTools.isLabel(element) ) {\n\t charge *= 0.8;\n\t }\n\t return charge;\n\t })\n\t .size([options.width(), options.height()])\n\t .linkDistance(calculateLinkPartDistance)\n\t .gravity(options.gravity())\n\t .linkStrength(options.linkStrength()); // Flexibility of links\n\t \n\t force.nodes().forEach(function ( n ){\n\t n.frozen(paused);\n\t });\n\t }", "title": "" }, { "docid": "7e6a2ccc5f793720e1f975aaa0285c84", "score": "0.5178672", "text": "set size( v )\n\t{\n\t\tthis._size = v;\n\t\tif ( this._canvas )\n\t\t{\n\t\t\tvar s = 2*this._border + this._size;\n\t\t\tthis._canvas.height = s;\n\t\t\tthis._canvas.width = s;\n\t\t\tthis.redraw();\n\t\t}\n\t}", "title": "" }, { "docid": "a7b071792eff3c753b87978ddd3d4ce8", "score": "0.517812", "text": "function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/=2;_.forEach(g.edges(),function(e){var edge=g.edge(e);edge.minlen*=2;if(edge.labelpos.toLowerCase()!==\"c\"){if(graph.rankdir===\"TB\"||graph.rankdir===\"BT\"){edge.width+=edge.labeloffset}else{edge.height+=edge.labeloffset}}})}", "title": "" }, { "docid": "da555563d2cf2939ca3819ebb2f11a5a", "score": "0.5177418", "text": "function setSizing () {\n bounds = d3.select('.graph').node().getBoundingClientRect()\n\n svgSize = {\n width: bounds.width,\n height: 550\n }\n\n graphSize = {\n width: svgSize.width - margin.right - margin.left,\n height: svgSize.height - margin.bottom - margin.top\n }\n\n helper.setCanvasSize(svgSize.width, svgSize.height)\n }", "title": "" }, { "docid": "810a5874797a582c3b95b1839d4aaa86", "score": "0.51753277", "text": "function refreshGraphStyle(){\n zoom = zoom.scaleExtent([options.minMagnification(), options.maxMagnification()]);\n if ( graphContainer ) {\n zoom.event(graphContainer);\n }\n \n force.charge(function ( element ){\n var charge = options.charge();\n if ( elementTools.isLabel(element) ) {\n charge *= 0.8;\n }\n return charge;\n })\n .size([options.width(), options.height()])\n .linkDistance(calculateLinkPartDistance)\n .gravity(options.gravity())\n .linkStrength(options.linkStrength()); // Flexibility of links\n \n force.nodes().forEach(function ( n ){\n n.frozen(paused);\n });\n }", "title": "" }, { "docid": "7bf44e127661b23d1bb26dc16be6dffd", "score": "0.5165642", "text": "function SizeCanvas()\n{\n with (EPE)\n {\n //Resize the Canvas (because it does not support style)\n var w = parseInt(pad.style.width) - canvas_border * 2;\n var h = parseInt(pad.style.height) - canvas_border * 2;\n\n ResizeCanvas(w, h);\n\n\n EPE_SetDrawing();\n }\n}", "title": "" }, { "docid": "2441a5c46d902b3a3af9f9f5d1d53679", "score": "0.51577836", "text": "setSettings() {\n this.density =\n this.canvas.width < 600 ? 12 : this.canvas.width < 1000 ? 20 : 30;\n this.drawDistance = 1;\n this.baseRadius =\n this.canvas.width < 600 ? 6 : this.canvas.width < 1000 ? 10 : 15;\n this.maxLineThickness = 10;\n this.reactionSensitivity = 5;\n this.lineThickness = 100;\n }", "title": "" }, { "docid": "41b0b6318002d3fea7ee522c4c814dcb", "score": "0.51417446", "text": "function biggerBrush(){\n\tvar brushSize = ctx.lineWidth;\n\tvar newSize = brushSize + 5;\n\tctx.lineWidth = newSize;\t\n}", "title": "" }, { "docid": "ee71fc555049662cc01a5101a68ee1c3", "score": "0.51287216", "text": "function updateWidth() {\n for (var key in map_graph) {\n map_graph[key].setWidth(width);\n } \n context_graph.width(width);\n }", "title": "" }, { "docid": "e9b580487b154af6b207e73e2b059bb5", "score": "0.51258886", "text": "function strokeSliderChanged() {\n lineWidth = document.getElementById(\"strokeslider\").value;\n document.getElementById(\"strokeoutput\").innerHTML = lineWidth;\n drawboard.context.lineWidth = lineWidth;\n}", "title": "" }, { "docid": "4baf6bd27c85175635562045df887b62", "score": "0.5123939", "text": "function canvasSvgSize(multiplierCanvasSVGFormatX,multiplierCanvasSVGFormatY,borderSizeOff){\n document.getElementById('frontConfiguration').setAttribute('width',(tableCanvasSVG.width)* multiplierCanvasSVGFormatX-borderSizeOff*2);\n document.getElementById('frontConfiguration').setAttribute('height',(tableCanvasSVG.height)* multiplierCanvasSVGFormatY-borderSizeOff*2);\n document.getElementById('backConfiguration').setAttribute('width',(tableCanvasSVG.width)* multiplierCanvasSVGFormatX-borderSizeOff*2);\n document.getElementById('backConfiguration').setAttribute('height',(tableCanvasSVG.height)* multiplierCanvasSVGFormatY-borderSizeOff*2);\n document.getElementById('frontConfigurationXSize').innerHTML=('Largeur Panneau:'+((tableCanvasSVG.width* multiplierCanvasSVGFormatX-borderSizeOff*2)*2) + \" mm\");\n document.getElementById('frontConfigurationYSize').innerHTML=('Hauteur Panneau:'+((tableCanvasSVG.height* multiplierCanvasSVGFormatY-borderSizeOff*2)*2) + \" mm\");\n}", "title": "" }, { "docid": "6f35f94ce86dc35209852b5a53df3e58", "score": "0.5120298", "text": "function style(edges) {\n\n var marker = vars.edges.arrows.value\n\n edges\n .style(\"stroke-width\",function(e){\n return vars.edges.scale(e[vars.edges.size])\n })\n .style(\"stroke\",vars.edges.color)\n .attr(\"opacity\",vars.edges.opacity)\n .attr(\"marker-start\",function(e){\n\n var direction = vars.edges.arrows.direction.value\n\n if (\"bucket\" in e.d3plus) {\n var d = \"_\"+e.d3plus.bucket\n }\n else {\n var d = \"\"\n }\n\n return direction == \"source\" && marker\n ? \"url(#d3plus_edge_marker_default\"+d+\")\" : \"none\"\n\n })\n .attr(\"marker-end\",function(e){\n\n var direction = vars.edges.arrows.direction.value\n\n if (\"bucket\" in e.d3plus) {\n var d = \"_\"+e.d3plus.bucket\n }\n else {\n var d = \"\"\n }\n\n return direction == \"target\" && marker\n ? \"url(#d3plus_edge_marker_default\"+d+\")\" : \"none\"\n\n })\n .attr(\"vector-effect\",\"non-scaling-stroke\")\n .attr(\"pointer-events\",\"none\")\n }", "title": "" }, { "docid": "31984f69c8333f54b3cc19ab56be494d", "score": "0.51065284", "text": "function LengthofEdges() {\r\n\tvar length = l.value;\r\n\tvar width = w.value;\r\n\tvar height = h.value;\r\n\treturn ((4*height)+(2*length)+(2*width));\r\n}", "title": "" }, { "docid": "b9b5fbf77a65b8c0552fb9d7d26b2737", "score": "0.510152", "text": "_refreshOutlineNotchWidth() {\n if (!this._hasOutline() || !this._floatingLabel || !this._shouldLabelFloat()) {\n this._notchedOutline?._setNotchWidth(0);\n }\n else {\n this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());\n }\n }", "title": "" }, { "docid": "86da31d362c2fc12f44e9470844dde24", "score": "0.51000446", "text": "getSize() {\r\n return 12 * this.sides;\r\n }", "title": "" }, { "docid": "86da31d362c2fc12f44e9470844dde24", "score": "0.51000446", "text": "getSize() {\r\n return 12 * this.sides;\r\n }", "title": "" }, { "docid": "8888cb6f5389ae2b279e9088fe5a65f4", "score": "0.50913006", "text": "function extEdge(edge,len) {\r\n\t\t// extends Edge Properties\r\n\t\tedge.length = len;\r\n\t}", "title": "" }, { "docid": "958c3830b018714d0d85706b70d2cca3", "score": "0.5085596", "text": "penSizeDown() {\n this.setState({\n lineWidth: this.state.lineWidth -= 5\n })\n }", "title": "" }, { "docid": "7b1166858d06e4bb8d8c69a736f87da4", "score": "0.50818807", "text": "function border(bmd, borderColor, edge, thickness) {\r\n var height = bmd.height;\r\n var width = bmd.width;\r\n fill(bmd, borderColor, edge);\r\n }", "title": "" }, { "docid": "c9e0e7e072e9923ed3c3dd49353350b5", "score": "0.5072415", "text": "setGraphSize(width=this.state.rowOneHorizontalFactor,\n height=this.state.verticalFactor,\n callback=()=>{}){\n\n var padding = this.panelPadding,\n newHFactor = window.innerWidth-((window.innerWidth)*(width/100)+padding*2)-1,\n newVFactor = (window.innerHeight)*(height/100)+padding;\n this.setState(\n {\n rowOneHorizontalFactor:newHFactor,\n verticalFactor:newVFactor\n },\n callback\n );\n }", "title": "" }, { "docid": "2f8272011a0527cf2da91256cc439a82", "score": "0.5071114", "text": "_setupVisuals(){\n this.startCross = new CrossHelper({size:this.crossSize,color:this.crossColor})\n this.startCross.hide()\n this.add( this.startCross )\n\n this.endCross = new CrossHelper({size:this.crossSize,color:this.crossColor})\n this.endCross.hide()\n this.add( this.endCross )\n \n this.sizeArrow = new SizeHelper( { \n lineWidth:this.lineWidth,\n textColor:this.textColor, \n textBgColor:this.textBgColor, \n fontSize:this.fontSize,\n fontFace:this.fontFace,\n labelType:this.labelType,\n arrowColor: this.arrowColor,\n sideLength:this.sideLength,//6\n sideLineColor:this.arrowColor,\n sideLineSide:\"back\"} )\n \n this.sizeArrow.hide()\n this.add( this.sizeArrow )\n }", "title": "" }, { "docid": "bae9a867cc3ca16c25e19dac8a76fa27", "score": "0.50636595", "text": "function addSVGProperties(el, obj) {\n obj.id = el.getAttribute('id');\n if (obj.id == \"border\") {\n obj.set({\"height\": whRatio*imgWidth+25}); \n }\n }", "title": "" }, { "docid": "d1f20037d0d92a4a17797442f6246a99", "score": "0.5050814", "text": "function drawSize1(){\n\n var visualization = d3plus.viz()\n .container(\"#viz3\")\n .data({\"value\" : changeOrderBySize(appData), \"sort\":true})\n .type(\"box\")\n .id([\"repository\", \"size\"])\n .x(\"size\")\n .y({\"value\": \"percentualmult\", \"label\": \"Percentage\", \"range\": [0,1]})\n //.width({\"value\": width})\n //.height({\"value\": height})\n .order({\"value\":\"key\", \"sort\" : \"asc\"})\n .draw();\n }", "title": "" }, { "docid": "100852e5dd81cbabada24c9a02a4aca3", "score": "0.50452095", "text": "function updateDimFields(evt) {\r\n var element = evt.srcElement;\r\n var elementId = element.id;\r\n var size = element.value;\r\n var targetElement = null;\r\n\r\n evt.preventDefault();\r\n\r\n switch (elementId) {\r\n case \"colorwidth\":\r\n targetElement = document.getElementById(\"colorheight\");\r\n targetElement.value = (1080 * size) / 1920;\r\n break;\r\n\r\n case \"colorheight\":\r\n targetElement = document.getElementById(\"colorwidth\");\r\n targetElement.value = (1920 * size) / 1080;\r\n break;\r\n\r\n case \"depthwidth\":\r\n targetElement = document.getElementById(\"depthheight\");\r\n targetElement.value = (424 * size) / 512;\r\n break;\r\n\r\n case \"depthheight\":\r\n targetElement = document.getElementById(\"depthwidth\");\r\n targetElement.value = (512 * size) / 424;\r\n break;\r\n }\r\n}", "title": "" }, { "docid": "00b0202d2e1e726d63eb9a99a083a732", "score": "0.5034633", "text": "function set_dynamic_patch_ChartWidth_for_SVGSaving()\n{\n var chart_PX_Width_Value = Math.floor($(\"svg\").width());\n $(\"svg\").attr(\"width\", chart_PX_Width_Value.toString());\n}", "title": "" }, { "docid": "7699ca674beeb1b5071328c6aea54538", "score": "0.5033069", "text": "updateOutline() {\n if (!this.outline_ || !this.label_) {\n return;\n }\n\n const isDense = this.adapter_.hasClass(cssClasses$16.DENSE);\n const labelScale = isDense ? numbers$4.DENSE_LABEL_SCALE : numbers$4.LABEL_SCALE;\n const labelWidth = this.label_.getWidth() * labelScale;\n const isRtl = this.adapter_.isRtl();\n this.outline_.updateSvgPath(labelWidth, isRtl);\n }", "title": "" }, { "docid": "69e812ad17c4980a774284f73d6bb2cf", "score": "0.50052387", "text": "getSize() {\r\n return 6 * this.sides + 6 * this.sides * this.bands;\r\n }", "title": "" }, { "docid": "69e812ad17c4980a774284f73d6bb2cf", "score": "0.50052387", "text": "getSize() {\r\n return 6 * this.sides + 6 * this.sides * this.bands;\r\n }", "title": "" }, { "docid": "30d7b356223b06ce5686a57ece723095", "score": "0.49933892", "text": "styling() {\n // Styling for shapes\n strokeWeight(this.strokeThickness);\n noFill();\n }", "title": "" }, { "docid": "022d56c36d9dd62d854f85f2f2a1f8a9", "score": "0.49859154", "text": "drawEdge(figure, n1, n2) { return figure.connector(n1.gobj, n2.gobj) }", "title": "" }, { "docid": "5c45e84933125150fcb9303ef42f1e03", "score": "0.49651736", "text": "function newrestart(){\n // only act if the free product graph (in the \"thenewsvg\" element) exists:\n if (typeof thenewsvg != \"undefined\") {\n // see what options the user has chosen with the page controls:\n var useboundary = document.getElementById(\"theboundaryFP\").checked;\n var useedgecolours = document.getElementById(\"theedgecoloursFP\").checked;\n var useopacity = document.getElementById(\"theopacityFP\").checked;\n var usefixedroot = document.getElementById(\"thefixrootnodeFP\").checked;\n var usethickness = document.getElementById(\"thethicknessFP\").checked;\n var maxDepth = document.getElementById(\"thedepth\").value;\n\n // set the physics forces according to what the user has set on the page:\n newforce.charge(-document.getElementById(\"thecharge\").value); // repulsion\n newforce.linkDistance(document.getElementById(\"thespread\").value); // springs\n\n /* ********** set up the links as SVG objects: ********** */\n /* ********** set up the links as SVG objects: ********** */\n /* ********** set up the links as SVG objects: ********** */\n var newlink = thenewsvg.selectAll(\".productlink\").data(newlinks);\n newlink.enter().insert(\"line\", \".node\")\n .attr(\"class\", \"productlink\")\n .style(\"display\", \"initial\") // not needed?\n .attr(\"ondisplay\",true) // a variable for us to check which objects are supposed to be showing (visible)\n .attr(\"id\", function(d,i){ return \"link_\"+ newlinks[i].source +\"_\"+ newlinks[i].target;} )\n .style(\"stroke-width\", function(d,i){ return setThickness(newlinks[i].depth,newlinks[i].subgraph);} )\n .style(\"stroke\", function(d,i){ return setEdgecolour(newlinks[i].subgraph); })\n .style(\"stroke-opacity\", function(d){ return (useopacity?1.0/d.depth:1); });\n\n\n /* ********** set up the nodes as SVG objects: ********** */\n /* ********** set up the nodes as SVG objects: ********** */\n /* ********** set up the nodes as SVG objects: ********** */\n var newnode = thenewsvg.selectAll(\"g\").data(newnodes); // add a group for each node (each group will shortly contain a circle and a text label)\n var newnodeEnter = newnode.enter()\n .append(\"g\")\n .call(newforce.drag);\n\n // ADD A CIRCLE TO REPRESENT THE NODE\n newnode.enter()\n .append(\"circle\")\n .attr(\"r\", productnodeRadius)\n .attr(\"class\", \"productnode\")\n .attr(\"id\", function(d){return d.id;} )\n .on(\"dblclick\", newdblclickNodefn)\n .on(\"mousemove\", mousemovefn)\n .style(\"display\", \"initial\")\n .attr(\"ondisplay\",true)\n .style(\"fill-opacity\", function(d){ return (useopacity?1.0/d.depth:1); })\n .style(\"stroke-opacity\", function(d){ return (useopacity?1.0/d.depth:1); })\n .call(newforce.drag);\n\n // ADD A TEXT LABEL CONTAINING THE NODE'S UPDATE FUNCTION\n newnode.enter()\n .append(\"text\")\n .attr(\"class\", \"productupdatefn\")\n .attr(\"display\", \"none\")\n .attr(\"ondisplay\",false)\n .style(\"text-anchor\", \"end\") // start, middle or end\n .style(\"pointer-events\", \"none\") // none or auto // mainly this is so that the text labels don't get in the way of dragging nodes\n .text(function(d){return d.title;});\n\n // ADD A TEXT LABEL CONTAINING THE NODE'S ADDRESS\n newnode.enter()\n .append(\"text\")\n .attr(\"class\", \"productaddress\")\n .attr(\"display\", \"none\")\n .attr(\"ondisplay\",false)\n .style(\"text-anchor\", \"start\") // start, middle or end\n .style(\"pointer-events\", \"none\") // none or auto // mainly this is so that the text labels don't get in the way of dragging nodes\n .text(function(d){return \"\"+(d.address.length?d.address:\"\\u{d8}\");}); // if d.address is undefined, this label object causes problems for bounds()...\n\n /* ********** put the DOT format text in its place on the page ********* */\n showDot();\n\n /* apply the control settings */\n showAllLabels();\n\n /* ********** now run the physics simulation ********* */\n newforce.start();\n }\n return 0;\n}", "title": "" }, { "docid": "6d8a97be918f48ee0f6f4fad299a398f", "score": "0.49571857", "text": "function onSetLineWidth(lineIdx) {\n setLineWidth(lineIdx);\n}", "title": "" }, { "docid": "bba54a4049f699fcde242b9eb738b873", "score": "0.49539888", "text": "set canvasBorder(value) {\n this.canvasBorderProperty = Object.assign(Object.assign({}, this.canvasBorderProperty), value);\n this.notifyPropertyChanged(\"Border\");\n }", "title": "" }, { "docid": "b7868d1bd6d69ecbc3a53cbaa5d2b75c", "score": "0.49312603", "text": "function setWidth(width) {\n _context.lineWidth = width;\n }", "title": "" }, { "docid": "3fc03713a73731f057c55c59b9adade2", "score": "0.49273908", "text": "function updateScales() {\n combWidth = settings.combWidth;\n combHeight = (Math.sqrt(3) * combWidth) / 2;\n edgeWidth = combWidth / 2;\n\n $(element).find('.comb').width(combWidth).height(combHeight);\n $(element).find('.hex_l, .hex_r').width(combWidth).height(combHeight);\n $(element).find('.hex_inner').width(combWidth).height(combHeight);\n }", "title": "" }, { "docid": "7bfedf15d5480edd9230931d2dd73bc9", "score": "0.49258876", "text": "function updateConnector(args, prop, item) {\n var option = {};\n var selectedObject = diagram._selectedObject;\n switch (prop) {\n case \"lineColor\":\n option.sourceDecorator = {};\n option.targetDecorator = {};\n selectedObject.lineColor = option.lineColor = args.style.backgroundColor;\n option.sourceDecorator.borderColor = option.targetDecorator.borderColor = args.style.backgroundColor;\n option.sourceDecorator.fillColor = option.targetDecorator.fillColor = args.style.backgroundColor;\n break;\n case \"lineWidth\":\n option.sourceDecorator = {};\n option.targetDecorator = {};\n selectedObject.lineWidth = option.lineWidth = Number(String(args.text.trim()).substring(0, (args.text.trim()).length - 3));\n option.sourceDecorator.width = option.lineWidth * item.sourceDecorator.width / item.lineWidth;;\n option.sourceDecorator.height = option.lineWidth * item.sourceDecorator.height / item.lineWidth;\n option.targetDecorator.width = option.lineWidth * item.targetDecorator.width / item.lineWidth;\n option.targetDecorator.height = option.lineWidth * item.targetDecorator.height / item.lineWidth;\n break;\n case \"headDecorator\":\n case \"tailDecorator\":\n var decorator = new Object();\n switch (String(args.itemId)) {\n case \"0\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"none\", fillColor: item.lineColor });\n break;\n case \"1\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"arrow\", fillColor: item.lineColor });\n break;\n case \"2\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"diamond\", fillColor: item.lineColor });\n break;\n case \"3\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"circle\", fillColor: item.lineColor });\n break;\n case \"4\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"path\", pathData: \"M 376.892,225.284L 371.279,211.95L 376.892,198.617L 350.225,211.95L 376.892,225.284 Z\", fillColor: item.lineColor });\n break;\n case \"5\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"arrow\", fillColor: \"white\" });\n break;\n case \"6\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"diamond\", fillColor: \"white\" });\n break;\n case \"7\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"circle\", fillColor: \"white\" });\n break;\n case \"8\":\n decorator = ej.datavisualization.Diagram.Decorator({ shape: \"path\", pathData: \"M 376.892,225.284L 371.279,211.95L 376.892,198.617L 350.225,211.95L 376.892,225.284 Z\", fillColor: \"white\" });\n break;\n }\n if (prop === \"headDecorator\") {\n decorator.width = item.sourceDecorator.width;\n decorator.height = item.sourceDecorator.height;\n decorator.borderColor = item.lineColor;\n option.sourceDecorator = decorator;\n }\n else {\n decorator.width = item.targetDecorator.width;\n decorator.height = item.targetDecorator.height;\n decorator.borderColor = item.lineColor;\n option.targetDecorator = decorator;\n }\n break;\n case \"lineType\":\n switch (args.text.trim()) {\n case \"Straight\":\n case \"Bezier\":\n case \"Orthogonal\":\n var value = args.text.trim().toLowerCase();\n option.segments = [{ type: value }];\n break;\n }\n break;\n case \"lineStyle\":\n switch (String(args.itemId)) {\n case \"0\":\n option.lineDashArray = \"0,0\";\n break;\n case \"1\":\n option.lineDashArray = \"10,10\";\n break;\n case \"2\":\n option.lineDashArray = \"2,2\";\n break;\n case \"3\":\n option.lineDashArray = \"20,5,5,5\";\n break;\n }\n break;\n case \"Lock\":\n var constraints;\n var connectorconstraints = ej.datavisualization.Diagram.ConnectorConstraints;\n constraints = !selectedObject.lock ? connectorconstraints.Select | connectorconstraints.PointerEvents : connectorconstraints.Default;\n option.constraints = constraints;\n selectedObject.lock = !selectedObject.lock;\n break;\n case \"cornerRadius\":\n option.cornerRadius = args.value;\n break;\n }\n if (Object.keys(option).length > 0) {\n /* update the node properties at runtime using diagram client side API method \"updateConnector\". */\n diagram.updateConnector(item.name, option);\n if (prop === \"ConnectorType\") {\n /* While changing the connector type, connector segments will be rendered and selection will be updated. Here we retain the property panel state and diagram size. */\n setDiagramSize(true);\n document.getElementById(\"propertyEditor\").style.display = \"block\";\n }\n /* binding the selected object to visualize the connector appearance in the property panel. */\n ko.applyBindings(diagram._selectedObject);\n }\n else\n this.updateText(args, prop, item);\n\n}", "title": "" }, { "docid": "e2e8b07d81e00dce84d29e2841ddbaa5", "score": "0.4920526", "text": "function draw() {\n background(240);\n for (edge of edgeArr) {\n edge.show();\n }\n for (node of nodeArr) {\n node.show();\n }\n // To show the currently added edge as dragable one in real time\n if (radio.value() == \"edge\" && dim.length == 1){\n stroke(159, 186, 198,110);\n strokeWeight(5);\n line(dim[0][0], dim[0][1], mouseX, mouseY);\n }\n}", "title": "" }, { "docid": "d84d13fb600f8f6a4377e4dae83c8225", "score": "0.49186623", "text": "_setupVisuals(){\n this.startCross = new CrossHelper({size:this.crossSize,color:this.crossColor})\n this.startCross.hide()\n this.add( this.startCross )\n \n this.sizeArrow = new SizeHelper( { \n textColor:this.textColor, \n textBgColor:this.textBgColor, \n fontSize:this.fontSize,\n fontFace:this.fontFace,\n labelType:this.labelType,\n arrowColor: this.arrowColor,\n sideLength:this.sideLength,//6\n sideLineColor:this.arrowColor,\n sideLineSide:\"back\"} )\n \n this.sizeArrow.hide()\n this.add( this.sizeArrow )\n }", "title": "" }, { "docid": "2e5c2b27d682992a0a9750879868bbc9", "score": "0.4911789", "text": "function changeNodeSize() {\n // recompute the normalization\n _nodeSizeScale.domain(\n d3.extent(_nodeData,\n function(d) {\n return _nodeSizeAccessor(d.data);\n }));\n _node.selectAll(\"circle\")\n .attr(\"r\", function(d) {\n return _nodeSizeScale(_nodeSizeAccessor(d.data));\n });\n }", "title": "" }, { "docid": "8612ae2b4705b2afec0eb8d9ee5fb0af", "score": "0.49109563", "text": "setArcLength() {\n for (let edge of this) {\n this.setOneEdgeArcLength(edge);\n edge.face = this;\n }\n }", "title": "" }, { "docid": "d9c6b61638d2bc6a59d7c699b0df0b3d", "score": "0.49087223", "text": "edges() {\r\n this.e_edges = Math.round((this.density / 100) * this.max_dir_edges);\r\n return this.e_edges;\r\n }", "title": "" }, { "docid": "190167f4c0ec307ac63946d2bb0bb49c", "score": "0.49065578", "text": "function resize() {\n // width = parseInt(graphic.style(\"width\")) - 260;\n width = parseInt(graphic.style(\"width\"));\n\n collection.select(\"canvas\")\n .attr(\"width\", width * storeRatio)\n .style(\"width\", width + \"px\")\n .each(function(d) {\n var context = d.context = this.getContext(\"2d\");\n context.scale(storeRatio, storeRatio);\n context.strokeStyle = \"rgba(0,0,0,0.8)\";\n if (d.enabled) d.resize();\n });\n\n scroll();\n}", "title": "" }, { "docid": "ecd7335819feb908e61a8dfcdf01bf84", "score": "0.4902315", "text": "function renderBendShapes(edge) {\n \n if(!edge.hasClass('edgebendediting-hasbendpoints')) {\n return;\n }\n \n var segpts = bendPointUtilities.getSegmentPoints(edge);//edge._private.rdata.segpts;\n var length = getBendShapesLength(edge) * 0.65;\n \n var srcPos = edge.source().position();\n var tgtPos = edge.target().position();\n \n var weights = edge.data('cyedgebendeditingWeights');\n var distances = edge.data('cyedgebendeditingDistances');\n\n for(var i = 0; segpts && i < segpts.length; i = i + 2){\n var bendX = segpts[i];\n var bendY = segpts[i + 1];\n\n var oldStyle = ctx.fillStyle;\n ctx.fillStyle = \"#000\"; // black\n renderBendShape(bendX, bendY, length);\n ctx.fillStyle = oldStyle;\n }\n }", "title": "" }, { "docid": "69f3f384eaf72ceb3d934240035e9e12", "score": "0.48916203", "text": "function changeLine() {\n var lineWidth = $(\"#lineWidth\").val();\n $(\"#newLine\").css(\"height\",lineWidth);\n\t$(\"#newLine\").css(\"width\",lineWidth);\n\tcontext.lineWidth = lineWidth;\n}", "title": "" }, { "docid": "11fde7d68bdc1a903f728ad497f03e92", "score": "0.4891569", "text": "static prop_size(editor) {\n editor.el.size = new Components.input.NV2D({\n label: 'Width x Height:',\n parent: editor,\n x: {\n min: 1,\n max: 1000,\n step: .1,\n onchange: (value) => {\n $.controller.target.frame.width = Haya.DMath.float(parseFloat(value))\n //SceneManager._scene.spriteset_grid();\n },\n value: $.controller.target.frame.width\n },\n y: {\n min: 1,\n max: 1000,\n step: .1,\n onchange: (value) => {\n $.controller.target.frame.height = Haya.DMath.float(parseFloat(value))\n //SceneManager._scene.spriteset_grid();\n },\n value: $.controller.target.frame.height\n }\n })\n }", "title": "" }, { "docid": "9f15d143b0f999a7869585b3454e442d", "score": "0.4889449", "text": "function updateSize() {\n\t\t//$log.log(preDebugMsg + \"updateSize\");\n\t\tfontSize = parseInt($scope.gimme(\"FontSize\"));\n\t\tif(fontSize < 5) {\n\t\t\tfontSize = 5;\n\t\t}\n\n\t\tvar rw = $scope.gimme(\"DrawingArea:width\");\n\t\tif(typeof rw === 'string') {\n\t\t\trw = parseFloat(rw);\n\t\t}\n\t\tif(rw < 1) {\n\t\t\trw = 1;\n\t\t}\n\n\t\tvar rh = $scope.gimme(\"DrawingArea:height\");\n\t\tif(typeof rh === 'string') {\n\t\t\trh = parseFloat(rh);\n\t\t}\n\t\tif(rh < 1) {\n\t\t\trh = 1;\n\t\t}\n\n\t\tvar bgDirty = false;\n\t\tif(bgCanvas === null) {\n\t\t\tbgDirty = true;\n\t\t\tvar myCanvasElement = $scope.theView.parent().find('#theBgCanvas');\n\t\t\tif(myCanvasElement.length > 0) {\n\t\t\t\tbgCanvas = myCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no canvas to resize!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(bgCanvas.width != rw) {\n\t\t\tbgDirty = true;\n\t\t\tbgCanvas.width = rw;\n\t\t}\n\t\tif(bgCanvas.height != rh) {\n\t\t\tbgDirty = true;\n\t\t\tbgCanvas.height = rh;\n\t\t}\n\n\t\tvar dotDirty = false;\n\t\tif(dotCanvas === null) {\n\t\t\tdotDirty = true;\n\t\t\tvar myCanvasElement = $scope.theView.parent().find('#theDotCanvas');\n\t\t\tif(myCanvasElement.length > 0) {\n\t\t\t\tdotCanvas = myCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no canvas to resize!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(dotCanvas.width != rw) {\n\t\t\tdotDirty = true;\n\t\t\tdotCanvas.width = rw;\n\t\t}\n\t\tif(dotCanvas.height != rh) {\n\t\t\tdotDirty = true;\n\t\t\tdotCanvas.height = rh;\n\t\t}\n\n\t\tif(undotCanvas === null) {\n\t\t\tundotDirty = true;\n\t\t\tvar myCanvasElement = $scope.theView.parent().find('#theUnselectedDotCanvas');\n\t\t\tif(myCanvasElement.length > 0) {\n\t\t\t\tundotCanvas = myCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no canvas to resize!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(undotCanvas.width != rw) {\n\t\t\tundotDirty = true;\n\t\t\tundotCanvas.width = rw;\n\t\t}\n\t\tif(undotCanvas.height != rh) {\n\t\t\tundotDirty = true;\n\t\t\tundotCanvas.height = rh;\n\t\t}\n\n\t\tvar axesDirty = false;\n\t\tif(axesCanvas === null) {\n\t\t\taxesDirty = true;\n\t\t\tvar myCanvasElement = $scope.theView.parent().find('#theAxesCanvas');\n\t\t\tif(myCanvasElement.length > 0) {\n\t\t\t\taxesCanvas = myCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no canvas to resize!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(axesCanvas.width != rw) {\n\t\t\taxesDirty = true;\n\t\t\taxesCanvas.width = rw;\n\t\t}\n\t\tif(axesCanvas.height != rh) {\n\t\t\taxesDirty = true;\n\t\t\taxesCanvas.height = rh;\n\t\t}\n\n\n\t\tif(dropCanvas.width != rw) {\n\t\t\tdropCanvas.width = rw;\n\t\t}\n\t\tif(dropCanvas.height != rh) {\n\t\t\tdropCanvas.height = rh;\n\t\t}\n\n\t\tif(selectionCanvas === null) {\n\t\t\tvar selectionCanvasElement = $scope.theView.parent().find('#theSelectionCanvas');\n\t\t\tif(selectionCanvasElement.length > 0) {\n\t\t\t\tselectionCanvas = selectionCanvasElement[0];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//$log.log(preDebugMsg + \"no selectionCanvas to resize!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tselectionCanvas.width = rw;\n\t\tselectionCanvas.height = rh;\n\t\tselectionCanvas.style.left = 0;\n\t\tselectionCanvas.style.top = 0;\n\n\t\tif(selectionHolderElement === null) {\n\t\t\tselectionHolderElement = $scope.theView.parent().find('#selectionHolder');\n\t\t}\n\t\tselectionHolderElement.width = rw;\n\t\tselectionHolderElement.height = rh;\n\t\tselectionHolderElement.top = 0;\n\t\tselectionHolderElement.left = 0;\n\n\t\tvar selectionRectElement = $scope.theView.parent().find('#selectionRectangle');\n\t\tselectionRectElement.width = rw;\n\t\tselectionRectElement.height = rh;\n\t\tselectionRectElement.top = 0;\n\t\tselectionRectElement.left = 0;\n\t\tif(selectionRectElement.length > 0) {\n\t\t\tselectionRect = selectionRectElement[0];\n\t\t\tselectionRect.width = rw;\n\t\t\tselectionRect.height = rh;\n\t\t\tselectionRect.top = 0;\n\t\t\tselectionRect.left = 0;\n\t\t}\n\n\t\tvar W = selectionCanvas.width;\n\t\tvar H = selectionCanvas.height;\n\t\tdrawW = W - leftMarg - rightMarg;\n\t\tdrawH = H - topMarg - bottomMarg * 2 - fontSize;\n\n\t\t//$log.log(preDebugMsg + \"updateSize found selections: \" + JSON.stringify(selections));\n\t\tupdateSelectionsWhenZoomingOrResizing();\n\t\tupdateDropZones(textColor, 0.3, false);\n\t\t//$log.log(preDebugMsg + \"updateSize updated selections to: \" + JSON.stringify(selections));\n\t}", "title": "" }, { "docid": "82f83a752c7deed826bd2a5a155f1c20", "score": "0.48893332", "text": "function defaultLineWidth() {\n if (ctx.lineWidth >= 100 || ctx.lineWidth <= 1) {\n lineDirection = !lineDirection;\n }\n if (lineDirection) {\n ++ctx.lineWidth;\n } else {\n --ctx.lineWidth;\n }\n }", "title": "" }, { "docid": "cc42c9975820676f5c738220c7b6a8a8", "score": "0.48885182", "text": "function setWidth(val) {\n\tbookshelf.width = val;\n\tvoronoi.setDimensions(bookshelf.width,bookshelf.height);\n}", "title": "" }, { "docid": "09d6559c29d5003558da1ffa476eecff", "score": "0.48814884", "text": "function resize() {\n width = parseInt(graphic.style(\"width\"));\n\n collection.select(\"canvas\")\n .attr(\"width\", width * storeRatio)\n .style(\"width\", width + \"px\")\n .each(function(d) {\n var context = d.context = this.getContext(\"2d\");\n context.scale(storeRatio, storeRatio);\n context.strokeStyle = \"rgba(0,0,0,0.8)\";\n if (d.enabled) d.resize();\n });\n\n scroll();\n }", "title": "" }, { "docid": "61f01812ae5dbdcc1480ceddc494cce4", "score": "0.4879881", "text": "function findStrokeWidthForDottedLine(key) {\n return Settings.BorderWidth;\n }", "title": "" }, { "docid": "3738222f5d3bd5434b571bb98a80fcb4", "score": "0.48783952", "text": "function changeNodeSize() {\n// // recompute the normalization\n// _nodeSizeScale.domain(\n// d3.extent(_nodeData,\n// function(d) {\n// return _nodeSizeAccessor(d.data);\n// }));\n// _node.selectAll(\"circle\")\n// .attr(\"r\", function(d) {\n// return _nodeSizeScale(_nodeSizeAccessor(d.data));\n// });\n }", "title": "" }, { "docid": "deb091f0c4a1a732fefd5243dbc58f09", "score": "0.48739004", "text": "edge() {\n if( this.x >= width || this.x <= 0){\n this.deltaX *= -1;\n }\n if( this.y >= height || this.y <= 0) {\n this.deltaY *= -1;\n }\n }", "title": "" }, { "docid": "ebf06b4d73e162a7d3c93ee0a28bd067", "score": "0.48699844", "text": "function makeSpaceForEdgeLabels(g) {\n\t var graph = g.graph();\n\t graph.ranksep /= 2;\n\t _.each(g.edges(), function (e) {\n\t var edge = g.edge(e);\n\t edge.minlen *= 2;\n\t if (edge.labelpos.toLowerCase() !== \"c\") {\n\t if (graph.rankdir === \"TB\" || graph.rankdir === \"BT\") {\n\t edge.width += edge.labeloffset;\n\t } else {\n\t edge.height += edge.labeloffset;\n\t }\n\t }\n\t });\n\t}", "title": "" }, { "docid": "eedd364e4a758d09e8dabc6efa5c9e1d", "score": "0.48682922", "text": "function updateSize() {\n $scope.height = firstElement.clientHeight - 48 - 17;\n $scope.width = firstElement.clientWidth - 17;\n $scope.svg.attr(\"height\", $scope.height)\n .attr(\"width\", $scope.width);\n $scope.render();\n }", "title": "" }, { "docid": "de3721d13ae9e909a1b001a2f4659271", "score": "0.48682147", "text": "function makeSpaceForEdgeLabels(g) {\n\t var graph = g.graph();\n\t graph.ranksep /= 2;\n\t _.each(g.edges(), function(e) {\n\t var edge = g.edge(e);\n\t edge.minlen *= 2;\n\t if (edge.labelpos.toLowerCase() !== \"c\") {\n\t if (graph.rankdir === \"TB\" || graph.rankdir === \"BT\") {\n\t edge.width += edge.labeloffset;\n\t } else {\n\t edge.height += edge.labeloffset;\n\t }\n\t }\n\t });\n\t}", "title": "" }, { "docid": "528cbfe58a47d82751c6e7070a08bcc5", "score": "0.48654193", "text": "function canvasSize(){\n\tcanvas.setAttribute('width',inputwidth.value);\n\tcanvas.setAttribute('height',inputheight.value);\n\n}", "title": "" } ]
95e2a354e2f362fdbd6e4e298e0a4d55
Viewport handling // All the actual 'cheating'
[ { "docid": "fe36a737d3daad9a4bc4cce58a1fc1c2", "score": "0.0", "text": "function transform(d) {\n actualcontent.style.transform = 'translate(0px, ' + d + 'px)';\n actualcontent.style.webkitTransform = 'translate(0px, ' + d + 'px)';\n }", "title": "" } ]
[ { "docid": "b54fe6bb90e6844e76d20c6fc8fd6f4f", "score": "0.72339183", "text": "function ViewportScrollPosition() { }", "title": "" }, { "docid": "27c077899adce5bd45892c9eeb720a45", "score": "0.72104", "text": "function ViewportScrollPosition() {}", "title": "" }, { "docid": "86dafb2ba28422eadcb59d84e14441ea", "score": "0.70847344", "text": "function viewportGo_m() {\n\tviewportGo_s();\n}", "title": "" }, { "docid": "86dafb2ba28422eadcb59d84e14441ea", "score": "0.70847344", "text": "function viewportGo_m() {\n\tviewportGo_s();\n}", "title": "" }, { "docid": "c6ae890106a7b36905a0141678087e44", "score": "0.6810409", "text": "function initInViewport() {\n jQuery('.viewport-section').itemInViewport({});\n}", "title": "" }, { "docid": "3331c6f480f2b43f75c80f68a6983c68", "score": "0.6770921", "text": "getViewport() {\n return this.viewport;\n }", "title": "" }, { "docid": "c103e05215aea77480c5f42ebf148b17", "score": "0.66541827", "text": "function checkViewport() {\n var i = 0,\n width = document.body.clientWidth,\n point = points[0],\n breakPoint,\n hasChange,\n funcs;\n\n for (i = 0; i < points.length; i += 1) {\n if (width >= points[i]) {\n point = points[i];\n }\n }\n\n breakPoint = getBreakPointName(point);\n hasChange = (current !== breakPoint);\n current = breakPoint;\n\n funcs = listeners[current];\n for (i = 0; i < funcs.length; i += 1) {\n funcs[i](hasChange);\n }\n }", "title": "" }, { "docid": "91ef7c49e3ebc5145e56152b4b27dc37", "score": "0.663088", "text": "initViewport() {\n // attach the viewport to the #div view\n this.viewport = new window.FluxViewport(document.querySelector(\"#view\"));\n //var viewport = new window.FluxViewport(this.view);\n // set up default lighting for the viewport\n this.viewport.setupDefaultLighting();\n // set the viewport background to white\n //this.viewport.setClearColor(0xffffff);\n\n this.viewport.setGeometryEntity(this.box_data);\n }", "title": "" }, { "docid": "151ad4db897f173af975b275ea49956d", "score": "0.6626034", "text": "function viewportGo_l() {\n\t// home page slideshow\n\t$('.slideshow').html('&nbsp;');\n\t$('body.home').addClass('background-cover');\n\t\n\tundropclick();\n}", "title": "" }, { "docid": "52f9b56b2f1f7e8bd6f4f41be606c028", "score": "0.6584572", "text": "function viewportGo_l() {\n\tundropclick();\n}", "title": "" }, { "docid": "47809c91ce7b1b13afe1bfc886a8fc84", "score": "0.6579386", "text": "scrollTo(instant, x, y) {\n if (this.slide) {\n /* Don't attempt to scroll while the level is sliding a new area in */\n return;\n }\n if (!isNaN(x) && !isNaN(y)) {\n this.playerpos.x = x;\n this.playerpos.y = y;\n /* This will be moved during tick() */\n if (!instant) {\n return;\n }\n }\n else {\n x = this.playerpos.x;\n y = this.playerpos.y;\n }\n let minX = this.viewport.x + this.marginX;\n let maxX = this.viewport.x + this.viewport.w - this.marginX;\n let minY = this.viewport.y + this.marginY;\n let maxY = this.viewport.y + this.viewport.h - this.marginY;\n // console.log(\"x:\", x, minX, maxX);\n // console.log(\"y:\", y, minY, maxY);\n if (minX < maxX) {\n if (x < minX) {\n if (instant) {\n this.viewport.x -= minX - x;\n }\n else {\n this.viewport.x--;\n }\n }\n if (x >= maxX) {\n if (instant) {\n this.viewport.x += x - maxX;\n }\n else {\n this.viewport.x++;\n }\n }\n }\n if (minY < maxY) {\n if (y < minY) {\n if (instant) {\n this.viewport.y -= minY - y;\n }\n else {\n this.viewport.y--;\n }\n }\n if (y >= maxY) {\n if (instant) {\n this.viewport.y += y - maxY;\n }\n else {\n this.viewport.y++;\n }\n }\n }\n // console.log('now at:', this.viewport.x, this.viewport.y);\n if (this.viewport.x < 0) {\n this.viewport.x = 0;\n }\n if (this.viewport.x >= (this.width * TILE_SIZE) - this.viewport.w) {\n this.viewport.x = (this.width * TILE_SIZE) - this.viewport.w;\n }\n if (this.viewport.y < 0) {\n this.viewport.y = 0;\n }\n if (this.viewport.y >= (this.height * TILE_SIZE) - this.viewport.h) {\n this.viewport.y = (this.height * TILE_SIZE) - this.viewport.h;\n }\n }", "title": "" }, { "docid": "065c88ce6458e3f03acd67b638a83230", "score": "0.65457463", "text": "function update_viewport_vars() {\n\t\tviewport_width = $(window).width();\n\t\tviewport_height = $(window).height();\n\t}", "title": "" }, { "docid": "5c551c9bb95506d49df884ae3d43dca2", "score": "0.65370834", "text": "function resizeViewport1() {\n var width = $('.main-container').width(),\n height = $('.main-container').height(),\n options = $('.magazine').turn('options');\n\n $('.magazine').removeClass('animated');\n\n $('.magazine-viewport').css({\n width: width,\n height: height\n }).\n\tzoom('resize');\n\n\n if ($('.magazine').turn('zoom') == 1) {\n var bound = calculateBound({\n width: options.width,\n height: options.height,\n boundWidth: Math.min(options.width, width),\n boundHeight: Math.min(options.height, height)\n });\n\n\n\n if (bound.width % 2 !== 0)\n bound.width -= 1;\n if (bound.width != $('.magazine').width() || bound.height != $('.magazine').height()) {\n\n $('.magazine').turn('size', bound.width, bound.height);\n\n if ($('.magazine').turn('page') == 1)\n $('.magazine').turn('peel', 'br');\n\n $('.next-button').css({ height: bound.height, backgroundPosition: '-38px ' + (bound.height / 2 - 32 / 2) + 'px' });\n $('.previous-button').css({ height: bound.height, backgroundPosition: '-4px ' + (bound.height / 2 - 32 / 2) + 'px' });\n }\n\n // $('.magazine').css({ top: -bound.height / 2, left: -bound.width / 2 });\n }\n\n}", "title": "" }, { "docid": "9ad17c5ef603bd49435d7312aa52ffbb", "score": "0.6515448", "text": "function zoomOut() {\r\n iWidth *= 0.65;\r\n iHeight *= 0.65;\r\n iMult *= 0.65;\r\n\r\n canvas.style.width = iWidth + \"px\";\r\n canvas.style.height = iHeight + \"px\";\r\n clear();\r\n drawScene();\r\n\r\n pageHeight = (doc.scrollHeight - doc.clientHeight);\r\n pageWidth = (doc.scrollWidth - doc.clientWidth);\r\n var toX = Math.floor(percentageScrolledX*pageWidth/100);\r\n var toY = Math.floor(percentageScrolledY*pageHeight/100);\r\n window.scrollTo(toX, toY);\r\n}", "title": "" }, { "docid": "9448f56b391be5e999eb456bc30562f9", "score": "0.64284307", "text": "function onWindowResize() {\n viewportWidth = window.innerWidth;\n viewportHeight = window.innerHeight;\n }", "title": "" }, { "docid": "80016eb94ed3e636f434317f47875834", "score": "0.6417187", "text": "function onWindowResize() {\n viewportWidth = window.innerWidth;\n viewportHeight = window.innerHeight;\n }", "title": "" }, { "docid": "f7ac67214128053d72ef8b14c5302296", "score": "0.6409182", "text": "onRender() {\n let hits = $('.hit');\n function onVisible(hit) {\n $(hit).addClass('hit__inViewport');\n }\n _.each(hits, (hit) => {\n inViewport(hit, {offset: 50}, onVisible);\n });\n }", "title": "" }, { "docid": "4cbf8fa57838484e3f918f9a967856c0", "score": "0.6399323", "text": "_updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser ?\n { width: window.innerWidth, height: window.innerHeight } :\n { width: 0, height: 0 };\n }", "title": "" }, { "docid": "4cbf8fa57838484e3f918f9a967856c0", "score": "0.6399323", "text": "_updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser ?\n { width: window.innerWidth, height: window.innerHeight } :\n { width: 0, height: 0 };\n }", "title": "" }, { "docid": "4cbf8fa57838484e3f918f9a967856c0", "score": "0.6399323", "text": "_updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser ?\n { width: window.innerWidth, height: window.innerHeight } :\n { width: 0, height: 0 };\n }", "title": "" }, { "docid": "4cbf8fa57838484e3f918f9a967856c0", "score": "0.6399323", "text": "_updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser ?\n { width: window.innerWidth, height: window.innerHeight } :\n { width: 0, height: 0 };\n }", "title": "" }, { "docid": "d7d3673254ad583bab40370c6b3ea2b6", "score": "0.6398808", "text": "function resizeViewport() {\n var width = $(window).width(),\n height = $(window).height(),\n options = $('.flipbook').turn('options')\n\n $('.flipbook-viewport').css({\n width: width,\n height: height\n });\n\n if ($('.flipbook').turn('zoom') == 1) {\n var bound = calculateBound({\n width: options.width,\n height: options.height,\n boundWidth: Math.min(options.width, width),\n boundHeight: Math.min(options.height, height)\n });\n\n if (bound.width % 2 !== 0)\n bound.width -= 1;\n\n if (bound.width != $('.flipbook').width() || bound.height != $('.flipbook').height()) {\n $('.flipbook').turn('size', bound.width, height);\n if ($('.flipbook').turn('page') == 1)\n $('.flipbook').turn('peel', 'br');\n }\n $('.flipbook').css({ top: -bound.height / 2, left: -bound.width / 2 });\n }\n }", "title": "" }, { "docid": "ab07332f2c625771c87fb241a6eaf6f3", "score": "0.6389645", "text": "_updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser\n ? { width: window.innerWidth, height: window.innerHeight }\n : { width: 0, height: 0 };\n }", "title": "" }, { "docid": "a3575e4c63fec08a45dd7e0fb118e8fd", "score": "0.63490677", "text": "_reset_viewport() {\n this._start_row = undefined;\n this._end_row = undefined;\n this._start_col = undefined;\n this._end_col = undefined;\n }", "title": "" }, { "docid": "f414effd5f071102e04d7e7810fa0946", "score": "0.63457084", "text": "function init() {\r\n // initialize configuration object\r\n $info(\"Initializing Viewport: \" + el.id);\r\n cfg = cfg || {};\r\n lang.augmentObject(cfg, {\r\n visible : true, // FIXME make this actually do something\r\n vpWidth : 600, // Max width of the viewport \r\n vpHeight : 400, // Max height of the viewport \r\n width : 600, // Width of the content pane at 100% zoom \r\n height : 400, // Height of the content pane at 100% zoom\r\n x : 0, // Initial x position\r\n y : 0, // Initial y position\r\n maxRatio : 1.0, // Maximum zoom ratio\r\n minRatio : 0.001, // Minimum zoom ratio\r\n ratio : 1 // Current zoom ratio \r\n });\r\n \r\n m_dim.width = Math.round(cfg.width * cfg.ratio);\r\n m_dim.height = Math.round(cfg.height * cfg.ratio);\r\n \r\n // construct the viewport frame\r\n m_frame = document.createElement(\"div\");\r\n m_frame.id = cfg.id || \"tzivi-vp-\" + g_viewportId++;\r\n dom.addClass(m_frame, CSS_VIEWPORT);\r\n dom.setStyle(m_frame, \"width\", cfg.vpWidth + \"px\");\r\n dom.setStyle(m_frame, \"height\", cfg.vpHeight + \"px\");\r\n \r\n // create the underlying div on which content will be placed\r\n m_pane = document.createElement(\"div\");\r\n m_pane.id = m_frame.id + \"_pane\";\r\n dom.addClass(m_pane, CSS_VP_PANE);\r\n dom.setStyle(m_pane, \"width\", cfg.width + \"px\");\r\n dom.setStyle(m_pane, \"height\", cfg.height + \"px\");\r\n \r\n // make the pane draggable\r\n m_paneDD = new util.DD(m_pane, null, { scroll:false });\r\n m_paneDD.onDrag = function(e) {\r\n for (var i = 0; i < m_layers.length; i++) {\r\n try { m_layers[i].paint(); } \r\n catch (ex) {\r\n // insulate from errors in third party code\r\n $warn(\"Failed to paint layer: \" + ex);\r\n }\r\n }\r\n };\r\n \r\n m_paneDD.endDrag = function(e) {\r\n provider.fireEvent(PAN_EVENT, [that, dom.getXY(m_pane)]);\r\n };\r\n \r\n var region = dom.getRegion(m_frame); // maybe getX, getY\r\n dom.setXY(m_paneDD.getEl(), [region.left, region.top]);\r\n // hide and append to the parent element\r\n dom.setStyle(m_frame, \"display\", \"none\");\r\n m_frame.appendChild(m_pane);\r\n el.appendChild(m_frame);\r\n dom.addClass(this.innerElement, CSS_VIEWPORT);\r\n}", "title": "" }, { "docid": "5a1ca77333c41b3f4d9c7ee12ee955d1", "score": "0.6345169", "text": "function initViewport(gl, canvas)\n{\n gl.viewport(0, 0, canvas.width, canvas.height);\n}", "title": "" }, { "docid": "6901b1a6c915cd869ac9c54a3c8a73ee", "score": "0.6340873", "text": "_updateViewportSize() {\n const window = this._getWindow();\n\n this._viewportSize = this._platform.isBrowser ? {\n width: window.innerWidth,\n height: window.innerHeight\n } : {\n width: 0,\n height: 0\n };\n }", "title": "" }, { "docid": "7d97f67f5490b1c0cc4d700ea89a1193", "score": "0.63266987", "text": "setViewport(x2, y2, width, height) {\n const v2 = this.viewport;\n x2 = Math.round(x2), y2 = Math.round(y2), width = Math.round(width), height = Math.round(height), (v2.width !== width || v2.height !== height || v2.x !== x2 || v2.y !== y2) && (v2.x = x2, v2.y = y2, v2.width = width, v2.height = height, this.gl.viewport(x2, y2, width, height));\n }", "title": "" }, { "docid": "333a22e74751a3d519713b78be23f836", "score": "0.6323885", "text": "function updateViewportHeight(){\n\t\tstate.viewportHeight= Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n\t\tstate.range=$container.height()-state.viewportHeight;\n\t}", "title": "" }, { "docid": "c13f59ddd93c939b4e0454b8744a77e9", "score": "0.6311564", "text": "get fixedInViewport() { return this._fixedInViewport; }", "title": "" }, { "docid": "e04811c4889d7d21733171f9ca51d499", "score": "0.63057745", "text": "function viewport(xLoc, yLoc, zLoc, sW, sH, sD, xThe, yThe, zThe) {\n this.xLoc = xLoc;\n this.yLoc = yLoc;\n this.zLoc = zLox;\n this.sW = sW;\n this.sH = sH;\n this.sD = sD;\n this.xThe = xThe;\n this.yThe = yThe;\n this.zThe = zThe;\n this.zoom = function (percent) {\n\n }\n}", "title": "" }, { "docid": "2875c649a57ba1c71570fced19fa2a4f", "score": "0.62738377", "text": "function resizeViewport() {\r\n linkedScene.vWidth = canvas.clientWidth;\r\n linkedScene.vHeight = canvas.clientHeight;\r\n var ratio = linkedScene.vWidth / linkedScene.vHeight;\r\n linkedScene.updateViewport(ratio);\r\n}", "title": "" }, { "docid": "4de9a14e0d9ed8558515a91a575b2e1a", "score": "0.62580734", "text": "updateViewport() {\n if (this.song.currentTick >= this.viewport.lastTick) {\n this.viewport.firstTick = this.song.tick;\n }\n if (this.song.currentTick < this.viewport.firstTick) {\n this.viewport.firstTick = this.song.tick;\n }\n }", "title": "" }, { "docid": "8df8e954172e7710cb9fa92c3970c1c5", "score": "0.6252906", "text": "function Viewport(el, cfg) {\r\n\r\n// ===================================\r\n// CONFIGURE EVENTS \r\n// ===================================\r\n\r\n/**\r\n * The <code>EventProvider</code> used to create and fire events for this \r\n * <code>Viewport</code>.\r\n * \r\n * @property provider\r\n * @type YAHOO.util.EventProvider\r\n * @private\r\n */\r\nvar provider = new EventProvider();\r\n\r\n/**\r\n * Indicates that the zoom ratio has changed.\r\n * @event zoom \r\n * @param args { Array } The arguments provided when this event is fired. These \r\n * are, in order:\r\n * <ul>\r\n * <li>The viewport whose zoom level changed</li>\r\n * <li>The ratio to which the zoom level changed</li>\r\n * </ul>\r\n */\r\nprovider.createEvent(ZOOM_EVENT);\r\n\r\n/** \r\n * Indicates that the Viewport's content has been panned.\r\n * @event pan\r\n * @param args { Array } The arguments provided when this event is fired. These \r\n * are, in order:\r\n * <ul>\r\n * <li>The viewport whose content was panned</li>\r\n * <li>An array containing the x, y coordinates of top left hand corner of \r\n * content pane</li>\r\n * </ul>\r\n */\r\nprovider.createEvent(PAN_EVENT);\r\n\r\n/** \r\n * Indicates that the size of the content displayed by this \r\n * <code>Viewport</code> has changed. \r\n * @event resize\r\n * @param args { Array } The arguments provided when this event is fired. These \r\n * are, in order:\r\n * <ul>\r\n * <li>The <code>Viewport</code> whose content has been resized</li>\r\n * <li>An array containing the new width and height of the content</li>\r\n * </ul>\r\n */\r\nprovider.createEvent(RESIZE_EVENT);\r\n\r\n/**\r\n * Indicates that the <code>Viewport</code> (not its content) has been resized.\r\n * @event vp-resize\r\n * @param args { Array } The arguments provided when this event is fired. These \r\n * are, in order:\r\n * <ul>\r\n * <li>The <code>Viewport</code> that has been resized</li>\r\n * <li>An array containing the new width and height of the \r\n * <code>Viewport</code></li>\r\n * </ul>\r\n * \r\n */\r\nprovider.createEvent(VP_RESIZE_EVENT);\r\n\r\n/** \r\n * Indicates that a new layer has been added to this <code>Viewport</code>.\r\n * @event addLayer\r\n * @param args { Array } The arguments provided when this event is fired. These \r\n * are, in order:\r\n * <ul>\r\n * <li>The <code>Viewport</code> to which the layer was added</li>\r\n * <li>The <code>Layer</code> that was added</li>\r\n * </ul>\r\n */\r\nprovider.createEvent(ADD_LAYER_EVENT);\r\n\r\n/** \r\n * Indicates that a layer was removed from <code>Viewport</code>.\r\n * @event removeLayer\r\n * @param args { Array } The arguments provided when this event is fired. These \r\n * are, in order:\r\n * <ul>\r\n * <li>The <code>Viewport</code> from which the layer was removed</li>\r\n * <li>The <code>Layer</code> that was removed</li>\r\n * </ul>\r\n */\r\nprovider.createEvent(REMOVE_LAYER_EVENT);\r\n\r\n\r\n/** \r\n * Indicates that the <code>Viewport</code> has been shown. \r\n * @event show\r\n * @param viewport { Viewport } The shown viewport.\r\n */\r\nprovider.createEvent(SHOW_EVENT);\r\n\r\n/** \r\n * Indicates that the <code>Viewport</code> has been hidden. \r\n * @event hide\r\n * @param viewport { Viewport } The hidden viewport.\r\n */\r\nprovider.createEvent(HIDE_EVENT);\r\n\r\n/** \r\n * Indicates that the <code>Viewport</code> has been destroyed and should \r\n * no-longer be used. \r\n * @event destroy\r\n * @param viewport { Viewport } The destroyed viewport.\r\n */\r\nprovider.createEvent(DESTROY_EVENT, { fireOnce : true });\r\n\r\n//===================================\r\n//PRIVATE VARIABLES \r\n//===================================\r\n\r\n\r\n/** \r\n* The DIV forming the outer border of this viewport.\r\n* @property frame\r\n* @type HTMLElement\r\n* @private\r\n*/\r\nvar m_frame = null;\r\n\r\n/** \r\n * The DIV on which content will be displayed. The element is not used to \r\n * display data directly, but acts as the parent for the different layers\r\n * that are displayed.\r\n * \r\n * @property pane\r\n * @type HTMLElement\r\n * @private\r\n */\r\nvar m_pane = null; \r\n\r\n/**\r\n * The DragDrop object that controls the panning of the content pane.\r\n * \r\n * @property paneDD\r\n * @type YAHOO.util.DD \r\n * @private\r\n */\r\nvar m_paneDD = null; \r\n\r\n/**\r\n * Container for the different information layers displayed in the viewer. \r\n * These inherit from the abstract class implemented by IDCH.tzivi.Layers.\r\n * \r\n * @property layers \r\n * @type IDCH.tzivi.Layer*\r\n * @private\r\n * \r\n */\r\nvar m_layers = []; \r\n\r\n/**\r\n * The content <code>Layer<code> that currently has the user's focus (if\r\n * any). \r\n * \r\n * @property selectedLayer\r\n */\r\nvar m_selectedLayer = null;\r\n\r\n/** \r\n * The current dimensions of the viewport. This has two members, width \r\n * and height.\r\n * \r\n * @property dimensions\r\n * @type Object\r\n * @private \r\n */\r\nvar m_dim = {\r\n width : 0, \r\n height : 0 \r\n};\r\n\r\n// ===================================\r\n// PRIVATE METHODS \r\n// ===================================\r\n\r\n/**\r\n * Initializes the internal structures. \r\n * @method init\r\n * @private \r\n */\r\nfunction init() {\r\n // initialize configuration object\r\n $info(\"Initializing Viewport: \" + el.id);\r\n cfg = cfg || {};\r\n lang.augmentObject(cfg, {\r\n visible : true, // FIXME make this actually do something\r\n vpWidth : 600, // Max width of the viewport \r\n vpHeight : 400, // Max height of the viewport \r\n width : 600, // Width of the content pane at 100% zoom \r\n height : 400, // Height of the content pane at 100% zoom\r\n x : 0, // Initial x position\r\n y : 0, // Initial y position\r\n maxRatio : 1.0, // Maximum zoom ratio\r\n minRatio : 0.001, // Minimum zoom ratio\r\n ratio : 1 // Current zoom ratio \r\n });\r\n \r\n m_dim.width = Math.round(cfg.width * cfg.ratio);\r\n m_dim.height = Math.round(cfg.height * cfg.ratio);\r\n \r\n // construct the viewport frame\r\n m_frame = document.createElement(\"div\");\r\n m_frame.id = cfg.id || \"tzivi-vp-\" + g_viewportId++;\r\n dom.addClass(m_frame, CSS_VIEWPORT);\r\n dom.setStyle(m_frame, \"width\", cfg.vpWidth + \"px\");\r\n dom.setStyle(m_frame, \"height\", cfg.vpHeight + \"px\");\r\n \r\n // create the underlying div on which content will be placed\r\n m_pane = document.createElement(\"div\");\r\n m_pane.id = m_frame.id + \"_pane\";\r\n dom.addClass(m_pane, CSS_VP_PANE);\r\n dom.setStyle(m_pane, \"width\", cfg.width + \"px\");\r\n dom.setStyle(m_pane, \"height\", cfg.height + \"px\");\r\n \r\n // make the pane draggable\r\n m_paneDD = new util.DD(m_pane, null, { scroll:false });\r\n m_paneDD.onDrag = function(e) {\r\n for (var i = 0; i < m_layers.length; i++) {\r\n try { m_layers[i].paint(); } \r\n catch (ex) {\r\n // insulate from errors in third party code\r\n $warn(\"Failed to paint layer: \" + ex);\r\n }\r\n }\r\n };\r\n \r\n m_paneDD.endDrag = function(e) {\r\n provider.fireEvent(PAN_EVENT, [that, dom.getXY(m_pane)]);\r\n };\r\n \r\n var region = dom.getRegion(m_frame); // maybe getX, getY\r\n dom.setXY(m_paneDD.getEl(), [region.left, region.top]);\r\n // hide and append to the parent element\r\n dom.setStyle(m_frame, \"display\", \"none\");\r\n m_frame.appendChild(m_pane);\r\n el.appendChild(m_frame);\r\n dom.addClass(this.innerElement, CSS_VIEWPORT);\r\n}\r\n \r\n/**\r\n * Reset the content pane's contraints after it has been resized. \r\n * \r\n * @method resetPane\r\n * @private\r\n * @param absX { Number } The X coordinate for the center of the pane \r\n * (relative to the 100% resolution) after it has been reset.\r\n * @param absY { Number } The Y coordinate for the center of the pane \r\n * (relative to the 100% resolution) after it has been reset.\r\n */\r\nfunction resetPane(absX, absY) {\r\n // make sure we know where the center should be\r\n absX = lang.isNumber(absX) ? absX : 0;\r\n absY = lang.isNumber(absY) ? absY : 0;\r\n \r\n // update pane dimensions\r\n dom.setStyle(m_pane, \"width\", m_dim.width + \"px\");\r\n dom.setStyle(m_pane, \"height\", m_dim.height + \"px\");\r\n \r\n $debug(\"Pane Dimensions: (\" + m_dim.width + \" x \" + m_dim.height + \")\",\r\n VP_LOGGER); \r\n\r\n that.resetConstraints();\r\n that.setCenter(absX, absY);\r\n}\r\n \r\n/**\r\n * Listens for <code>Layer.RESIZE_EVENT</code>s and updates the viewport's \r\n * content pane if the dimensions of a layer have extended beyond the current \r\n * boundaries of this pane.\r\n *\r\n * @method onLayerResize\r\n * @private\r\n * @param { Layer } layer The layer who's \r\n */\r\nfunction onLayerResize(layer) {\r\n var w = layer.getWidth(); \r\n var h = layer.getHeight();\r\n \r\n var changed = false;\r\n if (w > cfg.width) { \r\n cfg.width = w; \r\n changed = true; \r\n }\r\n \r\n if (h > cfg.height) { \r\n cfg.height = h; \r\n changed = true; \r\n }\r\n \r\n if (changed) {\r\n that.setRatio();\r\n provider.fireEvent(RESIZE_EVENT, [that, [cfg.width, cfg.height]]);\r\n }\r\n}\r\n \r\n/** \r\n * Shows all layers present in this viewport. The layers are shown silently, \r\n * meaning that they will not fire their show event.\r\n * \r\n * @method showLayers\r\n * @private\r\n * @param silent { Boolean } If true, indicates that that the layers should be\r\n * shown silently (i.e. without firing the layer's SHOW event). True by \r\n * default.\r\n */\r\nfunction showLayers(silent) {\r\n var layer;\r\n if (!lang.isBoolean(silent)) silent = true;\r\n \r\n for (var i = 0; i < m_layers.length; i++) {\r\n layer = m_layers[i]; \r\n try {\r\n dom.setStyle(layer.getPane(), \"zIndex\", i);\r\n layer.show(silent);\r\n } catch (ex) {\r\n // insulate from errors in external code\r\n $warn(\"Failed to show layer (\" + layer[i] + \"): \" + ex, VP_LOGGER)\r\n }\r\n }\r\n}\r\n\r\n/** \r\n* Hide all layers present in this viewport. The layers are hidden silently, \r\n* meaning that they will not fire their hide event.\r\n* \r\n* @method hideLayers\r\n* @private\r\n* @param silent { Boolean } If true, indicates that that the layers should be\r\n* shown silently (i.e. without firing the layer's SHOW event). True by \r\n* default.\r\n*/\r\nfunction hideLayers(silent) {\r\n if (!lang.isBoolean(silent)) silent = true;\r\n \r\n for (var i = 0; i < m_layers.length; i++) {\r\n try {\r\n m_layers[i].hide(silent);\r\n } catch (ex) {\r\n // insulate from errors in external code\r\n $warn(\"Failed to hide layer (\" + m_layers[i] + \"): \" + ex, VP_LOGGER)\r\n }\r\n }\r\n}\r\n\r\n//=================================\r\n// VIEWPORT OBJECT\r\n//=================================\r\n\r\nvar that = {\r\n \r\n /**\r\n * Constrains the underlying display pane to stay within the bounding box\r\n * of the viewport. This should be called whenever the diminsions of the \r\n * pane or the dimensions or location of the viewport might have changed. \r\n * It is also called when the panel is initially rendered.\r\n * \r\n * @method resetConstraints\r\n */\r\n resetConstraints : function() {\r\n var paneR = dom.getRegion(m_pane);\r\n var region = dom.getRegion(m_frame);\r\n \r\n // adjust in case the pane has shrunk out of bounds\r\n var adj = { top:paneR.top, left:paneR.left }; \r\n if (region.right > paneR.right) \r\n adj.left = region.right - m_dim.width; \r\n if (region.bottom > paneR.bottom) \r\n adj.top = region.bottom - m_dim.height; \r\n\r\n // make sure we are as wide and/or tall as the viewport\r\n if (adj.left > region.left) adj.left = region.left;\r\n if (adj.top > region.top) adj.top = region.top;\r\n \r\n // set the position of the pane, if needed\r\n if ((paneR.left != adj.left) || (paneR.top != adj.top)) {\r\n dom.setXY(m_pane, [adj.left, adj.top]);\r\n paneR = dom.getRegion(m_pane);\r\n }\r\n\r\n // calculate the maximum amount of movement allowed.\r\n var mvLeft = Math.max(0, paneR.right - region.right);\r\n var mvRight = Math.max(0, region.left - paneR.left);\r\n var mvDown = Math.max(0, region.top - paneR.top);\r\n var mvUp = Math.max(0, paneR.bottom - region.bottom);\r\n\r\n // Reinitialize the DD object's constraint parameters. \r\n m_paneDD.clearConstraints();\r\n m_paneDD.setStartPosition(); \r\n m_paneDD.setInitPosition(); \r\n \r\n m_paneDD.setXConstraint(mvLeft, mvRight);\r\n m_paneDD.setYConstraint(mvUp, mvDown);\r\n\r\n // print lots of debug information\r\n $debug(\"Movement Constraints (up, down, left, right): \" +\r\n mvUp + \", \" + mvDown + \", \" + mvLeft + \", \" + mvRight, VP_LOGGER);\r\n $debug(\"Pane and Body Top: \" + paneR.top + \", \" + region.top, VP_LOGGER);\r\n $debug(\"Pane Constraints: \" + m_paneDD.minY + \", \" + m_paneDD.maxX + \r\n \", \" + m_paneDD.maxY + \", \" + m_paneDD.minX, VP_LOGGER);\r\n },\r\n \r\n //=================================\r\n // Content Positioning and Control \r\n //=================================\r\n \r\n /** \r\n * Return the minimum zoom ratio for this <code>Viewport</code>. The \r\n * Viewport will not allow the ratio to be set to a samller value.\r\n * \r\n * @method getMinRatio\r\n * @return { Number } The minimum zoom ratio for this <code>Viewport</code>\r\n */\r\n getMinRatio : function() { return cfg.minRatio; },\r\n \r\n /** \r\n * Return the maximum zoom ratio for this <code>Viewport</code>. The \r\n * Viewport will not allow the ratio to be set to a larger value.\r\n * \r\n * @method getMaxRatio\r\n * @return { Number } The maximum zoom ratio for this <code>Viewport</code>\r\n */\r\n getMaxRatio : function() { return cfg.maxRatio; },\r\n \r\n /**\r\n * Returns a reference to the HTML content pane used by this \r\n * <code>Viewport</code>. \r\n * \r\n * <p>\r\n * NOTE this reference MUST be used in a read only context. Clients that \r\n * obtain a reference to this element must not attempt to reposition \r\n * or resize this element manually. \r\n * \r\n * @method getContentPane \r\n * @return { HTMLElement } The content pane used by this \r\n * <code>Viewport</code>.\r\n */\r\n getContentPane : function() { return m_pane; },\r\n \r\n /**\r\n * Returns the width of the content being displayed by this viewport as an \r\n * absolute value (that is, relative to 100% zoom ratio).\r\n * \r\n * @method getContentWidth\r\n * @return { Number } The width of the content displayed by this viewport.\r\n */\r\n getContentWidth : function() { return cfg.width; },\r\n \r\n /**\r\n * Returns the height of the content being displayed by this viewport as an \r\n * absolute value (that is, relative to 100% zoom ratio).\r\n * \r\n * @method getContentHeight\r\n * @return { Number } The height of the content displayed by this viewport.\r\n */\r\n getContentHeight : function() { return cfg.height; }, \r\n \r\n /**\r\n * Translates the provided x, y page coordinates (e.g., from a mouse \r\n * pointer position) into the x, y coordinates on the underlying \r\n * content pane. This returned object will have two properties, \r\n * <code>abs</code> and <code>rel</code>. <code>abs</code> contains the x,y\r\n * coordinates relative to the image at 100% resolution. <code>rel</code>\r\n * contains the x,y coordinates relative to the content pane at the current \r\n * resolution. Both contain this informaiton in two properties \r\n * <code>x</code> and <code>y</code>. \r\n * \r\n * <p>\r\n * The returned object has the following properties:\r\n * \r\n * rel : x,y coordinates of the point relative to the content pane\r\n * at the current resolution.\r\n * abs : x,y coordinates of the point relative to the content pane\r\n * at the 100% resolution.\r\n *\r\n * @param iPageX { Number } X coordinate of a point relative to the \r\n * webpage (e.g. coordinates returned by mouse events).\r\n * @param iPageY { Number } Y coordinate of a point relative to the \r\n * webpage (e.g. coordinates returned by mouse events).\r\n * @return { Object } The position of the coordinates relative to the \r\n * underlying content both in absolute terms (i.e., relative to the \r\n * content at 100% zoom level) and in relative terms (i.e. relative to \r\n * the current upper left hand corner of the content pane at the \r\n * current zoom level. \r\n */\r\n getXY : function(iPageX, iPageY) {\r\n // restate x and y relative to image pane\r\n var OoB = OUT_OF_BOUNDS,\r\n ratio = cfg.ratio,\r\n paneR = dom.getRegion(m_pane),\r\n x = iPageX - paneR.left,\r\n y = iPageY - paneR.top;\r\n\r\n x = ((x < 0) || (x > m_dim.width)) ? OoB : Math.round(x / ratio);\r\n y = ((y < 0) || (y > m_dim.height)) ? OoB : Math.round(y / ratio);\r\n \r\n return [x, y];\r\n },\r\n \r\n /**\r\n * Translates the provided absolute x, y coordinates (i.e., relative to \r\n * the viewport pane at a 100% zoom ratio) into x, y coordinates on the \r\n * page. \r\n *\r\n * @method getPageXY\r\n * @public\r\n * @param iAbsX { Number } X coordinate of a point relative to the \r\n * viewport's content pane at a 100% zoom ratio\r\n * @param iPageY { Number } Y coordinate of a point relative to the \r\n * viewport's content pane at a 100% zoom ratio \r\n * @return { Array } An array containing two elements, the x and y \r\n * coordinates on the page of the supplied absolute point. \r\n */\r\n getPageXY : function(iAbsX, iAbsY) {\r\n var region = dom.getRegion(m_pane),\r\n iRelX = Math.round(iAbsX * cfg.ratio), \r\n iRelY = Math.round(iAbsY * cfg.ratio);\r\n \r\n return [iRelX + region.left, iRelY + region.top];\r\n },\r\n \r\n /**\r\n * Returns the center of the viewport relative to the content pane at \r\n * the 100% zoom ratio.\r\n * \r\n * @method getCenter\r\n * @return { Array } The [x, y] coordinates of the center of this viewport. \r\n * If the viewport is not visible, this will return false. \r\n */\r\n getCenter : function() {\r\n if (!that.isVisible())\r\n return false;\r\n \r\n var region = dom.getRegion(m_frame);\r\n iPageX = Math.round((region.left + region.right) / 2),\r\n iPageY = Math.round((region.top + region.bottom ) / 2);\r\n \r\n return that.getXY(iPageX, iPageY);\r\n },\r\n \r\n /**\r\n * Moves the specified point on the pane to the center of the viewport \r\n * (or as close to the center as possible). The coordinates for the \r\n * point to be centered are provided as absolute x, y image coordinates \r\n * (i.e., x, y values relative to the 100% size of the underlying \r\n * content pane). \r\n *\r\n * @method setCenter\r\n * @param iAbsX { Number } The x coordinate of the point to be moved \r\n * to the center of the image.\r\n * @param iAbsY { Number } The y coordinate of the point to be moved \r\n * to the center of the image.\r\n */\r\n setCenter : function(iAbsX, iAbsY) {\r\n if ((iAbsX < 0) || (iAbsY < 0)) {\r\n $warn(\"Invalid center position (negative x or y value): \" + \r\n iAbsX + \", \" + iAbsY, VP_LOGGER);\r\n return;\r\n }\r\n\r\n // calculate offset from the point to center \r\n var center = that.getCenter(), \r\n absOffsetX = center[0] - iAbsX, \r\n absOffsetY = center[1] - iAbsY;\r\n\r\n // adjust for the case that the center of the viewport is out of bounds\r\n if (!lang.isNumber(absOffsetX)) absOffsetX = 0;\r\n if (!lang.isNumber(absOffsetY)) absOffsetY = 0;\r\n \r\n // convert to page pixels\r\n var relOffsetX = Math.round(absOffsetX * cfg.ratio),\r\n relOffsetY = Math.round(absOffsetY * cfg.ratio),\r\n\r\n // find shifted top\r\n paneR = dom.getRegion(m_pane),\r\n left = paneR.left + relOffsetX,\r\n top = paneR.top + relOffsetY;\r\n\r\n // check to make sure this is in bounds\r\n if (top < m_paneDD.minY) top = m_paneDD.minY;\r\n else if (top > m_paneDD.maxY) top = m_paneDD.maxY;\r\n\r\n if (left < m_paneDD.minX) left = m_paneDD.minX;\r\n else if (left > m_paneDD.maxX) left = m_paneDD.maxX;\r\n\r\n // position the pane \r\n dom.setXY(m_pane, [left, top]);\r\n provider.fireEvent(PAN_EVENT, [that, [left, top]]);\r\n\r\n $debug(\"Set Center: \" + iAbsX + \", \" + iAbsY, VP_LOGGER);\r\n $debug(\"Set Center - Current Ratio: \" + cfg.ratio, VP_LOGGER);\r\n $debug(\"Set Center - Moved Pane to : \" + top + \", \" + left, VP_LOGGER);\r\n },\r\n \r\n //=============================================\r\n // LAYER MANIPULATION METHODS\r\n //=============================================\r\n \r\n /**\r\n * Adds a display layer to the viewport. \r\n * \r\n * @method addLayer\r\n * @param layer { IDCH.tzivi.Layer } The layer to be added. \r\n * @param cfg { Object } Optional configuration parameters to be supplied \r\n * to the Layer.\r\n * @throws { String } If the provided layer is already attached to another \r\n * <code>Viewport</code>.\r\n */\r\n addLayer : function(layer) {\r\n var lPane = null, \r\n changed = false, \r\n w = 0, \r\n h = 0;\r\n \r\n try {\r\n lPane = layer.getPane(); \r\n m_pane.appendChild(lPane); \r\n \r\n layer.setViewport(that); // throws ViewportAlreadySetException\r\n m_layers.add(layer);\r\n provider.fireEvent(ADD_LAYER_EVENT, [that, layer]);\r\n \r\n layer.subscribe(Layer.READY_EVENT, function() {\r\n // reset constraints\r\n onLayerResize(layer); // update the underlying content pane if needed\r\n \r\n var visible = that.isVisible();\r\n that.show(); // update dragable constraints\r\n if (!visible) // but hide this again if the viewport\r\n that.hide(); // wasn't originally being displayed\r\n \r\n layer.paint();\r\n layer.subscribe(Layer.RESIZE_EVENT, onLayerResize); \r\n });\r\n layer.configure(cfg);\r\n } catch (ex) {\r\n var msg = \"Could not add layer. Is this a valid layer object? \" +\r\n \t\t\"(\"+ ex + \")\";\r\n $warn(msg);\r\n \r\n // if it's still there, try to remove it, but don't destory it.\r\n if (m_layers.contains(layer)) \r\n that.remove(layer, true);\r\n throw msg;\r\n }\r\n \r\n return true;\r\n },\r\n \r\n /**\r\n * Removes the specified <code>Layer</code> from this <code>Viewport</code>.\r\n * By default, the removed <code>Layer</code> is destroyed. If this layer \r\n * is to be attached to another <code>Viewport</code>, then specifying false\r\n * for the destroy parameter will prevent the destruction of the layer, \r\n * allowing it to be reused.\r\n * \r\n * <p>\r\n * Throws an exception if the supplied <code>Layer</code> does belong to \r\n * this <code>Viewport</code>. \r\n * \r\n * @method removeLayer\r\n * @param layer { IDCH.tzivi.Layer } The layer to be removed.\r\n * @param keep { boolean } Optional parameter. If set to true, the removed \r\n * <code>Layer</code> will not be destroyed.\r\n */\r\n removeLayer : function(layer, keep) {\r\n if (!m_layers.contains(layer)) {\r\n var msg = \"Could not remove layer: The specified layer does not \" \r\n + \"belong to this Viewport.\";\r\n $warn(msg, VP_LOGGER);\r\n }\r\n \r\n // detach from internal controls\r\n m_layers.remove(m_layers.indexOf(layer));\r\n \r\n // supress errors in external code\r\n try {\r\n layer.hide();\r\n layer.unsubscribe(Layer.RESIZE_EVENT, onLayerResize);\r\n\r\n if (true !== keep) \r\n layer.destroy(); \r\n } catch (ex) {\r\n var msg = \"An error occured trying to remove a layer: \" + ex;\r\n $warn(msg, VP_LOGGER);\r\n }\r\n \r\n provider.fireEvent(REMOVE_LAYER_EVENT, [that, layer]);\r\n },\r\n \r\n /** \r\n * Indicates whether the provided layer belongs to this \r\n * <code>Viewport</code>.\r\n * @method hasLayer\r\n * @param layer { IDCH.tzivi.Layer } The layer to test.\r\n * @return { boolean } <code>true</code> if the supplied layer belongs to\r\n * this <code>Viewport</code>, <code>false</code> if it does not. \r\n */\r\n hasLayer : function(layer) {\r\n return m_layers.indexOf(layer) >= 0;\r\n },\r\n \r\n /**\r\n * Removes and destroys all layers in this <code>Viewport</code>.\r\n * \r\n * @method clear\r\n */\r\n clear : function() {\r\n var name = null;\r\n \r\n for (var i = 0; i < m_layers.length; i++) {\r\n var layer = m_layers[i]; \r\n m_layers[i] = null;\r\n try {\r\n name = layer.getName(); // for error reporting purposes\r\n layer.destroy();\r\n } catch (ex) {\r\n // insulate from errors in external code\r\n $warn(\"Failed to destroy layer (\" + name + \"): \" + ex);\r\n }\r\n }\r\n \r\n // create a new, empty layers array.\r\n m_layers = [];\r\n },\r\n \r\n //======================================\r\n // Content Zooming \r\n //======================================\r\n \r\n /** \r\n * Returns the current zoom ratio for this <code>Viewport</code>.\r\n * \r\n * @method getRatio\r\n * @return { Number } The current zoom ratio of this <code>Viewport</code>\r\n */\r\n getRatio : function() { return cfg.ratio; },\r\n \r\n /**\r\n * Attempts to set the desired ratio for this <code>Viewport</code>. This \r\n * ratio will be propegated to all layers which will update accordingly. The \r\n * supplied value should be between <code>getMinRatio</code> and \r\n * <code>getMaxRatio</code>. If it is not, it will be forced to the min or\r\n * max value respectively. The actual value set will be returned so the \r\n * client can determine if any adjustments were performed.\r\n *\r\n * <p>\r\n * This fires a 'zoom' event to notify viewport listeners of the changed\r\n * zoom ratio.\r\n * \r\n * @method setRatio\r\n * @param value { Number } The value of the zoom level to be set. This \r\n * value should be between the values <code>getMinRatio</code> and\r\n * <code>getMaxRatio</code>. \r\n * @return { Number } The actual zoom ratio that was set. This may be \r\n * adjusted to fit in the range defined for the viewport.\r\n */\r\n setRatio : function(value) {\r\n var center, iAbsX, iAbsY, visible = [];\r\n \r\n \r\n // adjust supplied ratio as needed \r\n value = lang.isValue(value) ? value : cfg.ratio;\r\n if (value > cfg.maxRatio) {\r\n value = cfg.maxRatio;\r\n } else if (value < cfg.minRatio) { \r\n value = cfg.minRatio;\r\n }\r\n \r\n center = that.getCenter(); // find initial viewport center\r\n \r\n // update the zoom ratio and content pane dimensions \r\n cfg.ratio = value; \r\n m_dim.width = Math.round(cfg.width * cfg.ratio); \r\n m_dim.height = Math.round(cfg.height * cfg.ratio); \r\n \r\n iAbsX = (center === false) ? 0 : center[0];\r\n iAbsY = (center === false) ? 0 : center[1];\r\n \r\n // reset to center\r\n hideLayers();\r\n resetPane(iAbsX, iAbsY);\r\n showLayers();\r\n \r\n provider.fireEvent(ZOOM_EVENT, [that, cfg.ratio]);\r\n \r\n $debug(\"Ratio set: \" + cfg.ratio, VP_LOGGER);\r\n return cfg.ratio; // return the actual ratio, in case we adjusted it\r\n },\r\n \r\n //====================================\r\n // Viewport Positioning and Control \r\n //====================================\r\n \r\n /**\r\n * Returns the HTML element that defines this viewport's display area.\r\n * \r\n * @method getFrame\r\n * @return { HTMLElement } The HTML element that defines this viewport's \r\n * display area \r\n */\r\n getFrame : function() { return m_frame; },\r\n \r\n /**\r\n * Returns an object that defines the extent of the viewport on the page.\r\n * This attaches measurements for the width and height to the standard\r\n * object returned by <code>YAHOO.util.Dom.getRegion</code>. \r\n * \r\n * @method getRegion\r\n * @public\r\n * @return { Object } An object that defines the extend of the viewport or \r\n * false if the viewport is not visible.\r\n */\r\n getRegion : function() {\r\n if (!that.isVisible())\r\n return false;\r\n \r\n var region = dom.getRegion(m_frame);\r\n region.height = region.bottom - region.top;\r\n region.width = region.right - region.left;\r\n \r\n return region;\r\n },\r\n \r\n /** \r\n * Returns an object that defines the extent of the viewport relative to \r\n * the underlying content pane at 100% zoom. The object has the same \r\n * properties as that returned by <code>getRegion</code> (<code>top</code>,\r\n * <code>left</code>, <code>bottom</code>, <code>right</code>,\r\n * <code>width</code>, <code>height</code>).\r\n * \r\n * @method getAbsRegion\r\n * @public\r\n * @return { Object } An object that defines the extend of the viewport or \r\n * false if the viewport is not visible.\r\n */\r\n getAbsRegion : function() {\r\n if (!that.isVisible())\r\n return false;\r\n \r\n var region = dom.getRegion(m_frame),\r\n topLeft = that.getAbsXY(region.left, region.top),\r\n bottomRight = that.getAbsXY(region.right, region.bottom);\r\n \r\n return {\r\n top : topLeft[1], left : topLeft[0],\r\n bottom : bottomRight[1], right : bottomRight[0], \r\n width : bottomRight[0] - topLeft[0], \r\n height : bottomRight[1] - topLeft[1] \r\n };\r\n },\r\n \r\n /** \r\n * Returns an object that defines the extent of the viewport relative to \r\n * the underlying content pane at the current ratio. The object has the same \r\n * properties as that returned by <code>getRegion</code> (<code>top</code>,\r\n * <code>left</code>, <code>bottom</code>, <code>right</code>,\r\n * <code>width</code>, <code>height</code>).\r\n * \r\n * @method getRelRegion\r\n * @public\r\n * @return { Object } An object that defines the extend of the viewport or \r\n * false if the viewport is not visible.\r\n */\r\n getRelRegion : function() {\r\n if (!that.isVisible())\r\n return false;\r\n \r\n var region = dom.getRegion(m_frame),\r\n topLeft = that.getXY(region.left, region.top),\r\n bottomRight = that.getXY(region.right, region.bottom);\r\n \r\n return {\r\n top : topLeft[1], left : topLeft[0],\r\n bottom : bottomRight[1], right : bottomRight[0], \r\n width : bottomRight[0] - topLeft[0], \r\n height : bottomRight[1] - topLeft[1] \r\n };\r\n },\r\n \r\n /** \r\n * Returns the height of the <code>Viewport</code> area (relative to \r\n * the HTML page). \r\n * \r\n * @method getHeight\r\n * @return { Number } The height of the <code>Viewport</code> area \r\n * (relative to the HTML page) or NaN if the viewport is not visible. \r\n */\r\n getHeight : function() {\r\n var reg = that.getRegion();\r\n return reg.bottom - reg.top;\r\n },\r\n\r\n /** \r\n * Returns the width of the <code>Viewport</code> area (relative to \r\n * the HTML page). \r\n * \r\n * @method getWidth\r\n * @return { Number } The width of the <code>Viewport</code> area \r\n * (relative to the HTML page) or NaN if the viewport is not visible. \r\n */\r\n getWidth : function() {\r\n var reg = that.getRegion();\r\n return reg.right - reg.left;\r\n },\r\n\r\n /** \r\n * Sets the width and height of the <code>Viewport</code>.\r\n * \r\n * @method setSize\r\n * @param w { Number } The width of the \r\n */\r\n setSize : function(w, h) { \r\n if (!lang.isNumber(w)) w = that.getWidth();\r\n if (!lang.isNumber(h)) h = that.getHeight();\r\n \r\n dom.setStyle(m_frame, \"width\", w + \"px\");\r\n dom.setStyle(m_frame, \"height\", h + \"px\");\r\n \r\n showLayers();\r\n provider.fireEvent(VP_RESIZE_EVENT, that);\r\n },\r\n \r\n /** \r\n * Causes the <code>Viewport</code> and its content layers to be displayed.\r\n * This will call the <code>show</code> method on all content layers. Note,\r\n * however, that the <code>show</code> method on the content layer \r\n * specifies that panels that are marked as not visible will not be made \r\n * visible by a call to <code>show</code>. \r\n * \r\n * <p>\r\n * This method fires the <code>show</code> event.\r\n * \r\n * @method show\r\n */\r\n show : function() { \r\n dom.setStyle(m_frame, \"display\", \"block\");\r\n that.resetConstraints();\r\n showLayers(false /* not silent */);\r\n provider.fireEvent(SHOW_EVENT, that);\r\n },\r\n \r\n /**\r\n * Hides this <code>Viewport</code> (i.e., sets the display property of the \r\n * frame to 'none') and invokes the <code>hide</code> method on all content\r\n * layers to enable them to perform any necessary cleanup.\r\n *\r\n * <p>\r\n * This method fires the <code>hide</code> event.\r\n * \r\n * @method hide\r\n */\r\n hide : function() { \r\n dom.setStyle(m_frame, \"display\", \"none\");\r\n hideLayers(false /* silent */);\r\n provider.fireEvent(HIDE_EVENT, that);\r\n },\r\n \r\n /** \r\n * Indicates whether or not this <code>Viewport</code> is visible.\r\n * \r\n * @method isVisible\r\n * @public\r\n * @return { Boolean } <code>true</code> if this <code>Viewport</code> is\r\n * visible, <code>false</code> if it is not.\r\n */\r\n isVisible : function() {\r\n return (dom.getStyle(m_frame, \"display\") == \"block\");\r\n },\r\n \r\n /**\r\n * Destroys this <code>Viewport</code> freeing all resources and \r\n * unsubscribing all event listeners. This method will destroy all content\r\n * layers as well.\r\n * \r\n * <p>\r\n * This method fires the <code>destroy</code> event.\r\n * \r\n * @method destroy\r\n */\r\n destroy : function() {\r\n m_paneDD.unreg();\r\n\r\n // clear all layers\r\n that.clear();\r\n\r\n // remove the frame\r\n Event.removeListener(m_frame);\r\n var parent = m_frame.parent;\r\n if (lang.isValue(parent)) parent.removeChild(m_frame);\r\n m_frame = null;\r\n \r\n // fire event and destroy the provider\r\n provider.fireEvent(DESTROY_EVENT, that);\r\n provider.unsubscribeAll();\r\n }\r\n \r\n}; // END OF VIEW PORT OBJECT\r\n \r\n \r\n //=======================================================================\r\n // ATTACH EVENT PROVIDER\r\n //=======================================================================\r\n that.on = provider.subscribe.bind(provider);\r\n that.subscribe = provider.subscribe.bind(provider);\r\n that.unsubscribe = provider.unsubscribe.bind(provider);\r\n that.unsubscribeAll = provider.unsubscribeAll.bind(provider);\r\n \r\n init();\r\n return that; // return the constructed Viewport\r\n}", "title": "" }, { "docid": "9ff1b6bdd733e7a69f9874c565b6883e", "score": "0.6250387", "text": "Viewport_OnResized() {\n //this.UpdateScrollHeight();\n //this.RenderNodes();\n //this.BuildGroups();\n\n this.HideEditor(false);\n this.BuildGroups();\n }", "title": "" }, { "docid": "72c5b8286f9fac75c5421324683ded64", "score": "0.6247475", "text": "async getViewport() {\n return await this.page.viewport();\n }", "title": "" }, { "docid": "dea8b02c5c5cba0fc27b1aa1536059b3", "score": "0.62337536", "text": "handleViewportChange(viewport, parentWidth) {\n // Scroll zoom has been disbled, but there may be instances where the viewport changes zoom level.\n // This will ensure zooming in again doesn't break.\n if (viewport.zoom === 5) {\n this.setState({ zoomed: false });\n }\n this.setState({ viewport: this.calculateViewPort(viewport) });\n }", "title": "" }, { "docid": "22a1cbb53e586ee59463d257fc06649d", "score": "0.620058", "text": "function viewport(e) {\n //console.log( $(e).parent().outerHeight() );\n var elementTop = $(e).offset().top,\n elementBottom = elementTop + $(e).parent().outerHeight(),\n viewportTop = $(window).scrollTop(),\n viewportBottom = viewportTop + $(window).height();\n return [elementBottom > viewportTop && elementTop < viewportBottom, sliderID];\n }", "title": "" }, { "docid": "dc6b6781c80732bb5e9e7345798ebcec", "score": "0.6198967", "text": "function zoomIn() {\r\n iWidth /= 0.65;\r\n iHeight /= 0.65;\r\n iMult /= 0.65;\r\n\r\n canvas.style.width = iWidth + \"px\";\r\n canvas.style.height = iHeight + \"px\";\r\n clear();\r\n drawScene();\r\n\r\n pageHeight = (doc.scrollHeight - doc.clientHeight);\r\n pageWidth = (doc.scrollWidth - doc.clientWidth);\r\n var toX = Math.floor(percentageScrolledX*pageWidth/100);\r\n var toY = Math.floor(percentageScrolledY*pageHeight/100);\r\n window.scrollTo(toX, toY);\r\n}", "title": "" }, { "docid": "d227a2907bdacd0a22a92a6627904a81", "score": "0.6192386", "text": "constructor(viewport){\n this.viewport = viewport;\n this.touches = [];\n this.addListeners();\n }", "title": "" }, { "docid": "7981dae0c874792f219e2507d417f21e", "score": "0.61761373", "text": "function setCssViewport() {\n var cw = document.body.clientWidth;\n document.documentElement.style.setProperty('--vw', cw / 100 + 'px');\n var ch = document.body.clientHeight;\n document.documentElement.style.setProperty('--vh', ch / 100 + 'px');\n}", "title": "" }, { "docid": "0284882c751adbc9e2e5e4cd8ba4acdf", "score": "0.6152059", "text": "function getViewportDimensions() {\n\tsession.scrollLeft = $window.scrollLeft();\n\tsession.scrollTop = $window.scrollTop();\n\tsession.windowWidth = $window.width();\n\tsession.windowHeight = $window.height();\n}", "title": "" }, { "docid": "d45e556e0ae858d05fa1899fc597ae04", "score": "0.61437", "text": "function resizeViewport() {\r\n\t\r\n\tvar width = parseInt($(\"#all\").width());\r\n\twidth = width-200;\r\n\twidth=width+\"px\";\r\n\tvar height = $(window).height(),\r\n\t\toptions = $('.magazine').turn('options');\r\n\t$('.magazine').removeClass('animated');\r\n\r\n\t$('.magazine-viewport').css({\r\n\t\twidth: width,\r\n\t\theight: height\r\n\t}).\r\n\tzoom('resize');\r\n\r\n\r\n\tif ($('.magazine').turn('zoom')==1) {\r\n\t\tvar bound = calculateBound({\r\n\t\t\twidth: options.width,\r\n\t\t\theight: options.height,\r\n\t\t\tboundWidth: Math.min(options.width, width),\r\n\t\t\tboundHeight: Math.min(options.height, height)\r\n\t\t});\r\n\r\n\t\tif (bound.width%2!==0)\r\n\t\t\tbound.width-=1;\r\n\r\n\t\t\t\r\n\t\tif (bound.width!=$('.magazine').width() || bound.height!=$('.magazine').height()) {\r\n\r\n\t\t\t$('.magazine').turn('size', bound.width, bound.height);\r\n\r\n\t\t\tif ($('.magazine').turn('page')==1)\r\n\t\t\t\t$('.magazine').turn('peel', 'br');\r\n\r\n\t\t\t$('.next-button').css({height: bound.height, backgroundPosition: '-38px '+(bound.height/2-32/2)+'px'});\r\n\t\t\t$('.previous-button').css({height: bound.height, backgroundPosition: '-4px '+(bound.height/2-32/2)+'px'});\r\n\t\t}\r\n\r\n\t\t$('.magazine').css({top: -bound.height/2, left: -bound.width/2});\r\n\t}\r\n\r\n\tvar magazineOffset = $('.magazine').offset(),\r\n\t\tboundH = height - magazineOffset.top - $('.magazine').height(),\r\n\t\tmarginTop = (boundH - $('.thumbnails > div').height()) / 2;\r\n\r\n\tif (marginTop<0) {\r\n\t\t$('.thumbnails').css({height:1});\r\n\t} else {\r\n\t\t$('.thumbnails').css({height: boundH});\r\n\t\t$('.thumbnails > div').css({marginTop: marginTop});\r\n\t}\r\n\r\n\tif (magazineOffset.top<$('.made').height())\r\n\t\t$('.made').hide();\r\n\telse\r\n\t\t$('.made').show();\r\n\r\n\t$('.magazine').addClass('animated');\r\n\t\r\n}", "title": "" }, { "docid": "2df47b4b4b381ca4574791f3254990a1", "score": "0.6130538", "text": "didEnterViewport() {\n set(this, '_isInViewPort', true);\n this.trySendImpression();\n }", "title": "" }, { "docid": "e3efc8855281eca577e4ecb74632cec3", "score": "0.6120268", "text": "function GetWidthAndHeightOfViewport(){ return [ViewportElement.width,ViewportElement.height]; }", "title": "" }, { "docid": "bf32a1ccf49cb195fa40497e62bf4dce", "score": "0.60933393", "text": "function updateViewportHeight() {\n viewHeight = inst.calculateViewportHeight();\n }", "title": "" }, { "docid": "7f3b5ee019fe36d6727409566e2362e6", "score": "0.6085874", "text": "static getViewport(viewport) {\n return new OrbitViewport(viewport);\n }", "title": "" }, { "docid": "0e5e270b081beba6b2fc3b281e39e904", "score": "0.6080835", "text": "function setViewportProperty(){\n var vh = window.innerHeight * 0.01;\n document.documentElement.style.setProperty('--vh', vh + 'px');\n}", "title": "" }, { "docid": "bd89e9533b514429f42a2a72306e166b", "score": "0.6065597", "text": "function scroll(evt) {\n \n let elHeight = document.getElementById(\"scroll\").clientHeight-window.innerHeight;\n let scrollVal = window.pageYOffset;\n let horScroll = (view.childElementCount-1)*scrollVal/elHeight*100;\n\n/*\n let currnentTile = Math.floor(horScroll/100)\n let distance=horScroll-currnentTile*100;\n\n console.log(currnentTile+\" \"+ distance+\" \"+prevDistance);\n \n if(distance>prevDistance && distance>80) window.scrollTo(0, scrollVal+0.2*(elHeight/(view.childElementCount-1)));\n if(distance<prevDistance && distance<20) window.scrollTo(0, scrollVal-0.2*(elHeight/(view.childElementCount-1)));\n \n\n prevDistance=distance;\n */\n // for(let i=0; i<view.childElementCount; i++) {\n // distance = i*view.clientWidth-horScroll;\n // if(Math.abs(distance)<150) { \n // if(Math.abs(distance)<Math.abs(prevDistance)) {\n // //zblizanie\n // horScroll+=distance;\n // window.scrollTo(0, horScroll/(view.clientWidth*(view.childElementCount-1))*elHeight);\n // prevDistance = distance;\n // } else {\n // //oddalanie\n // }\n // // console.log(distance);\n // }\n // }\n\n view.style.transform = \"translate(-\"+horScroll+\"%, 0)\";\n}", "title": "" }, { "docid": "28353c54e64598ded510d5eeb34de109", "score": "0.60622674", "text": "_updateViewPort (x, y, width, height) {\n if (this._viewPort.width === width && \n this._viewPort.height === height &&\n this._viewPort.x === x &&\n this._viewPort.y === y) {\n return;\n }\n this._viewPort.x = x;\n this._viewPort.y = y;\n this._viewPort.width = width;\n this._viewPort.height = height;\n\n // if map's type is iso, reserve bottom line is 2 to avoid show empty grid because of iso grid arithmetic\n let reserveLine = 1;\n if (this._layerOrientation === cc.TiledMap.Orientation.ISO) {\n reserveLine = 2;\n }\n\n let vpx = this._viewPort.x - this._offset.x + this._leftDownToCenterX;\n let vpy = this._viewPort.y - this._offset.y + this._leftDownToCenterY;\n\n let leftDownX = vpx - this._leftOffset;\n let leftDownY = vpy - this._downOffset;\n let rightTopX = vpx + width + this._rightOffset;\n let rightTopY = vpy + height + this._topOffset;\n\n let leftDown = this._cullingRect.leftDown;\n let rightTop = this._cullingRect.rightTop;\n\n if (leftDownX < 0) leftDownX = 0;\n if (leftDownY < 0) leftDownY = 0;\n\n // calc left down\n this._positionToRowCol(leftDownX, leftDownY, _tempRowCol);\n // make range large\n _tempRowCol.row-=reserveLine;\n _tempRowCol.col-=reserveLine;\n // insure left down row col greater than 0\n _tempRowCol.row = _tempRowCol.row > 0 ? _tempRowCol.row : 0;\n _tempRowCol.col = _tempRowCol.col > 0 ? _tempRowCol.col : 0; \n\n if (_tempRowCol.row !== leftDown.row || _tempRowCol.col !== leftDown.col) {\n leftDown.row = _tempRowCol.row;\n leftDown.col = _tempRowCol.col;\n this._cullingDirty = true;\n }\n\n // show nothing\n if (rightTopX < 0 || rightTopY < 0) {\n _tempRowCol.row = -1;\n _tempRowCol.col = -1;\n } else {\n // calc right top\n this._positionToRowCol(rightTopX, rightTopY, _tempRowCol);\n // make range large\n _tempRowCol.row++;\n _tempRowCol.col++;\n }\n\n // avoid range out of max rect\n if (_tempRowCol.row > this._rightTop.row) _tempRowCol.row = this._rightTop.row;\n if (_tempRowCol.col > this._rightTop.col) _tempRowCol.col = this._rightTop.col;\n\n if (_tempRowCol.row !== rightTop.row || _tempRowCol.col !== rightTop.col) {\n rightTop.row = _tempRowCol.row;\n rightTop.col = _tempRowCol.col;\n this._cullingDirty = true;\n }\n }", "title": "" }, { "docid": "44fb90f65a5ab4f00a7f49df061f1c9c", "score": "0.60607874", "text": "function init () {\n _self.events = new pwlib.appEvents(_self);\n resizeHandle.addEventListener('mousedown', ev_mousedown, false);\n\n // Find the viewport parent element.\n var cs, pNode = _self.container.parentNode,\n found = null;\n while (!found && pNode) {\n if (pNode.nodeName.toLowerCase() === 'html') {\n found = pNode;\n break;\n }\n\n cs = win.getComputedStyle(pNode, null);\n if (cs && (cs.overflow === 'scroll' || cs.overflow === 'auto')) {\n found = pNode;\n } else {\n pNode = pNode.parentNode;\n }\n }\n\n _self.viewport = found;\n }", "title": "" }, { "docid": "7c49db363d69676b20642f8b187f833f", "score": "0.6058804", "text": "function getViewport() {\n if (typeof window !== \"undefined\") {\n return { width: window.innerWidth, height: window.innerHeight };\n }\n return { width: 0, height: 0 };\n}", "title": "" }, { "docid": "f70329d92f18509d4069eab77ea99289", "score": "0.6057508", "text": "firstWithinViewport() {\n this.stopIsInViewportCheck();\n this.loadImage(this.src);\n }", "title": "" }, { "docid": "e13b3039654b228dad578a987024ccc6", "score": "0.6049832", "text": "renderOnlyInViewport() {\n let previouslyInView = true;\n const isInView = () => {\n const rect = this._simulationElt.getBoundingClientRect();\n const windowHeight = window.innerHeight || document.documentElement.clientHeight;\n const windowWidth = window.innerWidth || document.documentElement.clientWidth;\n const vertInView = rect.top <= windowHeight && rect.top + rect.height >= 0;\n const horInView = rect.left <= windowWidth && rect.left + rect.width >= 0;\n\n return vertInView && horInView;\n };\n\n window.addEventListener('scroll', () => {\n const inView = isInView();\n if (previouslyInView && !inView) {\n // Went out of view\n this._renderEnabled = false;\n previouslyInView = false;\n } else if (!previouslyInView && inView) {\n // Came into view\n this._renderEnabled = true;\n window.requestAnimationFrame(this._boundAnimate);\n previouslyInView = true;\n }\n });\n\n if (!isInView()) {\n // Initial state is render enabled, so disable it if currently out of\n // view.\n this._renderEnabled = false;\n previouslyInView = false;\n }\n }", "title": "" }, { "docid": "455eee17747820c4331de298204fe0d4", "score": "0.60368615", "text": "updateViewport()\n\t\t{\n\t\t\tvar gl = this.gl;\n\t\t\tvar canvas = this.canvas;\n\t\t\t\n\t\t\tif ( canvas.clientWidth != gl.viewportWidth || canvas.clientHeight != gl.viewportHeight )\n\t\t\t{\n\t\t\t\tgl.viewportWidth = canvas.clientWidth;\n\t\t\t\tgl.viewportHeight = canvas.clientHeight;\n\t\t\t\t\n\t\t\t\tcanvas.width = canvas.clientWidth;\n\t\t\t\tcanvas.height = canvas.clientHeight;\n\t\t\t\t\n\t\t\t\t// Update perspective projection based on new w/h ratio\n\t\t\t\tthis.setPerspective( this.fov, this.min, this.max );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3b3ad0d9464c4b935c4d6a835655ea75", "score": "0.603437", "text": "setViewPort() {\n gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);\n }", "title": "" }, { "docid": "367bb5c450015b025a079be6023d9dc9", "score": "0.6016247", "text": "function screenZoom() {\r\n var el = document.getElementById(\"container\"),\r\n screenWidth = window.innerWidth,\r\n screenHeight = window.innerHeight,\r\n screenRatio = screenHeight / screenWidth,\r\n checkMobile = pageVar.checkMobile;\r\n if (screenWidth > screenHeight) {\r\n // pc사용자를 위한 체크\r\n if (screenRatio < 0.75) {\r\n if (screenRatio < 0.5) {\r\n // iPad 11인치의 경우 iPad로 구분되지 않음..... iPhobe으로 채크\r\n if (checkMobile.mobile == true && checkMobile.device == \"iPhone\") {\r\n document.getElementById(\"stage\").style.width = \"1464px\";\r\n }\r\n }\r\n el.style.zoom = window.innerHeight / 768;\r\n } else {\r\n el.style.zoom = window.innerWidth / 1024;\r\n }\r\n } else {\r\n el.style.zoom = window.innerWidth / 1024;\r\n }\r\n $(\"#container\").removeClass(\"top-layer\");\r\n return el.style.zoom;\r\n }", "title": "" }, { "docid": "8883be88eaf743d15ae3c1c775434647", "score": "0.60094666", "text": "function resizeViewport() {\n\tvar cut = 150;\n\n\tvar width = $(window).width(),\n\t\theight = $(window).height(),\n\t\toptions = $('.magazine').turn('options');\n\n\t$('.magazine').removeClass('animated');\n\n\t$('.magazine-viewport').css({\n\t\twidth: width,\n\t\theight: height\n\t}).zoom('resize');\n\n\n\tif ($('.magazine').turn('zoom')==1) {\n\t\tvar bound = calculateBound({\n\t\t\twidth: options.width,\n\t\t\theight: options.height,\n\t\t\tboundWidth: Math.min(options.width, width - cut),\n\t\t\tboundHeight: Math.min(options.height, height - cut)\n\t\t});\n\n\t\tif (bound.width%2!==0)\n\t\t\tbound.width-=1;\n\n\t\t\t\n\t\tif (bound.width!=$('.magazine').width() || bound.height!=$('.magazine').height()) {\n\n\t\t\t$('.magazine').turn('size', bound.width, bound.height);\n\n\t\t\tif ($('.magazine').turn('page')==1)\n\t\t\t\t$('.magazine').turn('peel', 'br');\n\n\t\t\t$('.next-button').css({height: bound.height, backgroundPosition: '-38px '+(bound.height/2-32/2)+'px'});\n\t\t\t$('.previous-button').css({height: bound.height, backgroundPosition: '-4px '+(bound.height/2-32/2)+'px'});\n\t\t}\n\n\t\t$('.magazine').css({top: -bound.height/2, left: -bound.width/2});\n\t}\n\n\tvar magazineOffset = $('.magazine').offset(),\n\t\tboundH = height - magazineOffset.top - $('.magazine').height(),\n\t\tmarginTop = (boundH - $('.thumbnails > div').height()) / 2;\n\n\tif (marginTop<0) {\n\t\t$('.thumbnails').css({height:1});\n\t} else {\n\t\t$('.thumbnails').css({height: boundH});\n\t\t$('.thumbnails > div').css({marginTop: marginTop});\n\t}\n\n\tif (magazineOffset.top<$('.made').height())\n\t\t$('.made').hide();\n\telse\n\t\t$('.made').show();\n\n\t$('.magazine').addClass('animated');\n\n\trefreshCanvas(width,height);\n}", "title": "" }, { "docid": "d033e9d8c4bb3d2735db0dee83453b51", "score": "0.60031646", "text": "function setupViewportBehaviors() {\n pointbreak.addChangeListener(function() {\n updateHeroCarousels();\n });\n }", "title": "" }, { "docid": "a56138fb1ada53c45487b179e04c8974", "score": "0.5998139", "text": "function isElementInViewport(el) {\n \n }", "title": "" }, { "docid": "f9783fd447532183c8815c834d55d955", "score": "0.5995933", "text": "renderOnlyInViewport() {\n let previouslyInView = true;\n const isInView = () => {\n const rect = this._simulationElt.getBoundingClientRect();\n const windowHeight =\n window.innerHeight || document.documentElement.clientHeight;\n const windowWidth =\n window.innerWidth || document.documentElement.clientWidth;\n const vertInView =\n rect.top <= windowHeight && rect.top + rect.height >= 0;\n const horInView = rect.left <= windowWidth && rect.left + rect.width >= 0;\n\n return vertInView && horInView;\n };\n\n window.addEventListener('scroll', () => {\n const inView = isInView();\n if (previouslyInView && !inView) {\n // Went out of view\n this._renderEnabled = false;\n previouslyInView = false;\n } else if (!previouslyInView && inView) {\n // Came into view\n this._renderEnabled = true;\n window.requestAnimationFrame(this._boundAnimate);\n previouslyInView = true;\n }\n });\n\n if (!isInView()) {\n // Initial state is render enabled, so disable it if currently out of\n // view.\n this._renderEnabled = false;\n previouslyInView = false;\n }\n }", "title": "" }, { "docid": "483572861a6c649c6c1ea94d6e30aae0", "score": "0.59802234", "text": "function viewportCheck() {\n var returnViewport = viewport( $('#'+sliderID).parent() ),\n inViewport = returnViewport[0],\n id = returnViewport[1];\n viewportLoad(sliderID, inViewport, $('#'+sliderID).parent());\n }", "title": "" }, { "docid": "2396798d8d8e216bb7995f1fbf18d505", "score": "0.5962708", "text": "function setViewportProperty(){\n let vh = window.innerHeight * 0.01;\n document.documentElement.style.setProperty('--vh', vh + 'px');\n}", "title": "" }, { "docid": "e1c80a5b94505fed0c17b604551730fd", "score": "0.59621125", "text": "function getViewport() {\n var $win = jQuery(window);\n return {\n l: $win.scrollLeft(),\n t: $win.scrollTop(),\n w: $win.width(),\n h: $win.height()\n }\n }", "title": "" }, { "docid": "220a6a07ebf5f4049943b415d81240d6", "score": "0.59605277", "text": "function getViewport() {\n\tvar viewport = {\n\t\t'x' : $(window).width(),\n\t\t'y' : $(window).height()\n\t};\n\t\n\treturn viewport;\n}", "title": "" }, { "docid": "d04077aaf2838d2051c6908c3507aba3", "score": "0.59603006", "text": "get viewportScroll() {\n return this._latestCoords;\n }", "title": "" }, { "docid": "8254e94d00dc2448f85c4e682b339ebc", "score": "0.59587485", "text": "async setViewport(height, width) {\n return this.page.setViewport({\n width: width,\n height: height,\n });\n }", "title": "" }, { "docid": "5c91627b3cdd52f85a3e93568c51915d", "score": "0.5953544", "text": "function resetVP(){ \n var vpw = '640'; \n var viewport = document.querySelector(\"meta[name=viewport]\"); \n //windowWidth = screen.width;\n windowWidth = window.innerWidth ? window.innerWidth : $(window).width();\n windowHeight = window.innerHeight ? window.innerHeight : $(window).height();\n if(screen.width > 640 && windowHeight < windowWidth) { \n vpw='1024'; \n alert(viewport);\n viewport.setAttribute('content', 'width='+vpw+', initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0'); \n \n } else if (screen.width > 640 && windowHeight > windowWidth){ \n vpw='640';\n viewport.setAttribute('content', 'width='+vpw+', initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0');\n };\n }", "title": "" }, { "docid": "d86a2b594798dcbb6206e30ef7d6b06b", "score": "0.5945826", "text": "function adaptToViewport() {\n const r = { view: bb(document.body), frame: bb(frame), logo: bb(logo) };\n console.clear();\n doc.responsiveNodes.forEach(node => {\n if (node.adapt) node.adapt(r);\n else console.warn(node, 'has no adapt() method.');\n });\n console.log(doc);\n}", "title": "" }, { "docid": "14649ad20f24326c20ccb5377d728151", "score": "0.5942893", "text": "function isInViewport(el) {\n const rect = el.getBoundingClientRect();\n return rect.top >= 0 && rect.top <= 600 && rect.left >= 0;\n}", "title": "" }, { "docid": "19cdbc9ef90f1120f612d4d54fd39caa", "score": "0.59400105", "text": "function check_viewport() {\n var isInViewport = function (elem) {\n\tvar distance = elem.getBoundingClientRect();\n\treturn (\n\t\tdistance.top >= 70 &&\n\t\tdistance.left >= 0 &&\n\t\tdistance.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\tdistance.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n};\n\n const section_active = document.getElementsByClassName(\"temp\");\n for (let target_element of section_active) {\n let to_be_active = target_element;\n window.addEventListener(\"scroll\", function(event){\n if (isInViewport(to_be_active)){\n to_be_active.classList.add(\"your-active-class\");\n }\n },false);\n }\n}", "title": "" }, { "docid": "af71bc26dfec981e93b91520786e9c29", "score": "0.5938409", "text": "function rendererSetViewportCanv(x, y, width, height) {\n renderer.setViewport(x / devicePixelRatio, y / devicePixelRatio, width / devicePixelRatio, height / devicePixelRatio);\n}", "title": "" }, { "docid": "db9696c68910788bea5c2fa8f2db977f", "score": "0.59353846", "text": "checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n\n this._scrollStrategy.onDataLengthChanged();\n }", "title": "" }, { "docid": "91872a43d8fa8d23c01ad84003ebf156", "score": "0.59344065", "text": "function isInViewport(el){\n let rect = el.getBoundingClientRect()\n //500 and 100 are for increased bounds\n return(!(rect.top >= 500 || rect.bottom <= ((window.innerHeight) - 100)))\n}", "title": "" }, { "docid": "829fe2566e4317a782d1df6e0626e6f2", "score": "0.5932934", "text": "function getViewportInfo () {\n return info\n}", "title": "" }, { "docid": "cf4f9772a69a3be4c946addd75c7304e", "score": "0.593273", "text": "function viewportResized() {\n window.addEventListener('resize', function () {\n setViewportWidth();\n setNavBar();\n });\n}", "title": "" }, { "docid": "df07b8163a6f424b0f994f083639f6dc", "score": "0.5927794", "text": "function getViewport(){\n if (document.compatMode == \"BackCompat\"){\n return {\n width: document.body.clientWidth,\n height: document.body.clientHeight\n };\n } else {\n return {\n width: document.documentElement.clientWidth,\n height: document.documentElement.clientHeight\n }; \n }\n}", "title": "" }, { "docid": "b8dbf8639be32717a4b2a626eecf9c57", "score": "0.5927705", "text": "getViewportSize() {\n return this._viewportSize;\n }", "title": "" }, { "docid": "bc5f3bdd050bbbe322954d08565e872e", "score": "0.59232897", "text": "function updateViewport(s_filter) {\n /**\n * Update the viewport based on the index of the navigator\n */ \n //set the dimensions for brush\n if (s_filter==\"(-5.95, -4.573](0.936, 2.313]\") {\n viewport.clear();\n } else {\n //change the extent of the retangle\n var l =s_filter.split(\"]\")\n viewport.extent([bar_xScale(l[0]+\"]\"), bar_xScale(l[1]+\"]\") + barWidth]);\n }\n //update the chart\n bar_svg.select('.viewport').call(viewport);\n updateBoxplot(s_filter);\n updateScatterplot(s_filter);\n\n \n }", "title": "" }, { "docid": "7e89e4a8b4aa0b132cccb8d7f02cdcc5", "score": "0.5916786", "text": "function mm_viewport() { // @return Hash: { innerWidth, innerHeight,\n // pageXOffset, pageYOffset,\n // orientation, devicePixelRatio }\n // innerWidth - Number:\n // innerHeight - Number:\n // pageXOffset - Number:\n // pageYOffset - Number:\n // orientation - Number: last orientation\n // devicePixelRatio - Number: 1 is not Retina display\n // 2 is iPhone4 Retina dispiay\n // 0 is Portrait\n // -90 is Landscape\n // 90 is Landscape\n // 180 is Portrait\n//{@mb\n var undef;\n\n/*\n if (mm.env.ie8) { // [IE6][IE7][IE8] CSSOM View Module\n return { innerWidth: htmlNode.clientWidth, // [IE9] supported\n innerHeight: htmlNode.clientHeight, // [IE9] supported\n pageXOffset: htmlNode.scrollLeft, // [IE9] supported\n pageYOffset: htmlNode.scrollTop, // [IE9] supported\n orientation: 0, // [WebKit/iPhone/Android] only\n devicePixelRatio: 1 }; // [WebKit/iPhone/Android] only\n }\n */\n/*\n global.orientation === undef && (global.orientation = 0);\n global.devicePixelRatio === undef && (global.devicePixelRatio = 1);\n */\n//}@mb\n global.orientation === undef && (global.orientation = 0);\n global.devicePixelRatio === undef && (global.devicePixelRatio = 1);\n\n return {\n x: global.pageXOffset,\n y: global.pageYOffset,\n w: global.innerWidth,\n h: global.innerHeight,\n dpr: devicePixelRatio,\n o: global.orientation,\n orientation: global.orientation,\n };\n}", "title": "" }, { "docid": "3c6ca1ba8aebe6b1dd13acdfbb9474a6", "score": "0.59117526", "text": "function resizeViewport() {\n\tvar width = $(window).width(),\n\t\theight = $(window).height(),\n\t\toptions = $('.magazine').turn('options');\n\n\t$('.magazine').removeClass('animated');\n\n\t$('.magazine-viewport').css({\n\t\twidth: width,\n\t\theight: height\n\t});\n\n\tif ($('.magazine').turn('zoom')==1) {\n\t\tvar bound = calculateBound({\n\t\t\twidth: options.width,\n\t\t\theight: options.height,\n\t\t\tboundWidth: Math.min(options.width, width),\n\t\t\tboundHeight: Math.min(options.height, height)\n\t\t});\n\n\t\tif (bound.width%2!==0)\n\t\t\tbound.width-=1;\n\n\t\t\t\n\t\tif (bound.width!=$('.magazine').width() || bound.height!=$('.magazine').height()) {\n\n\t\t\t$('.magazine').turn('size', bound.width, bound.height);\n\n\t\t\tif ($('.magazine').turn('page')==1)\n\t\t\t\t$('.magazine').turn('peel', 'br');\n\n\t\t\t$('.next-button').css({height: bound.height, backgroundPosition: '-38px '+(bound.height/2-32/2)+'px'});\n\t\t\t$('.previous-button').css({height: bound.height, backgroundPosition: '-4px '+(bound.height/2-32/2)+'px'});\n\t\t}\n\n\t\t$('.magazine').css({top: -bound.height/2, left: -bound.width/2});\n\t}\n\n\tvar magazineOffset = $('.magazine').offset(),\n\t\tboundH = height - magazineOffset.top - $('.magazine').height(),\n\t\tmarginTop = (boundH - $('.thumbnails > div').height()) / 2;\n\n\tif (marginTop<0) {\n\t\t$('.thumbnails').css({height:1});\n\t} else {\n\t\t$('.thumbnails').css({height: boundH});\n\t\t$('.thumbnails > div').css({marginTop: marginTop});\n\t}\n\n\tif (magazineOffset.top<$('.made').height())\n\t\t$('.made').hide();\n\telse\n\t\t$('.made').show();\n\n\t$('.magazine').addClass('animated');\n}", "title": "" }, { "docid": "a9bf6edf9faa4d2e57189ad995662473", "score": "0.59023595", "text": "get viewportSize() {\n return this._viewportSize;\n }", "title": "" }, { "docid": "9ae38960008a82ec5ce60afeaaa3a9b1", "score": "0.58902013", "text": "function onResize() {\n\trender();\n}", "title": "" }, { "docid": "9ae38960008a82ec5ce60afeaaa3a9b1", "score": "0.58902013", "text": "function onResize() {\n\trender();\n}", "title": "" }, { "docid": "2ece326453fa5a4d2aa5aa9b48815717", "score": "0.5885988", "text": "checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n this._scrollStrategy.onDataLengthChanged();\n }", "title": "" }, { "docid": "2ece326453fa5a4d2aa5aa9b48815717", "score": "0.5885988", "text": "checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n this._scrollStrategy.onDataLengthChanged();\n }", "title": "" }, { "docid": "2ece326453fa5a4d2aa5aa9b48815717", "score": "0.5885988", "text": "checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n this._scrollStrategy.onDataLengthChanged();\n }", "title": "" }, { "docid": "2ece326453fa5a4d2aa5aa9b48815717", "score": "0.5885988", "text": "checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n this._scrollStrategy.onDataLengthChanged();\n }", "title": "" }, { "docid": "16da697e783f74a5d127a0debfccf7d6", "score": "0.5874306", "text": "getvieport(gl = this.gl){\n gl.getParameter(gl.VIEWPORT);\n }", "title": "" }, { "docid": "6bac46cd4dc7a9006c26a8a51ff79bf4", "score": "0.5866253", "text": "function isElementInViewport(e){\n var rect = e.getBoundingClientRect();\n return (\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n }", "title": "" }, { "docid": "1e6d30a86fc06a6eecc8c560490e3de9", "score": "0.586208", "text": "function VirtualScrollStrategy() { }", "title": "" }, { "docid": "5ec8146dc863a81265e199c962f08eb0", "score": "0.5857118", "text": "function getViewport(){\n\n var ret={left:0, top:0, width:0, height:0};\n var d=document;\n var db=document.body||null;\n var dde=document.documentElement||null;\n var win=(\"parentWindow\" in d) ? d.parentWindow : window;\n // exclude scrollbars, so check these items in order;\n // check document.body, then document.documentElement\n if(db && \"clientWidth\" in db){\n ret.width=db.clientWidth;\n } else if(dde && \"clientWidth\" in dde){\n ret.width=dde.clientWidth;\n } else if(db && \"scrollWidth\" in db){\n ret.width=db.scrollWidth;\n } else if(dde && \"scrollWidth\" in dde){\n ret.width=dde.scrollWidth;\n } else if(win && \"innerWidth\" in win){\n ret.width=win.innerWidth;\n } else if(db && \"offsetWidth\" in db){\n ret.width=db.offsetWidth;\n } else if(dde && \"offsetWidth\" in dde){\n ret.width=dde.offsetWidth;\n } else if(d.width){\n ret.width=d.width;\n }\n // exclude scrollbars, so check these items in order;\n // document.documentElement.clientHeight contains\n // the best estimate of the viewport height\n if(dde && \"clientHeight\" in dde){\n ret.height=dde.clientHeight;\n } else if(db && \"clientHeight\" in db){\n // the following may overestimate the height\n ret.height=db.clientHeight;\n } else if(win && \"innerHeight\" in win){\n ret.height=win.innerHeight;\n } else if(db && \"offsetHeight\" in db){\n ret.height=db.offsetHeight;\n } else if(dde && \"offsetHeight\" in dde){\n ret.height=dde.offsetHeight;\n } else if(db && \"scrollHeight\" in db){\n ret.height=db.scrollHeight;\n } else if(dde && \"scrollHeight\" in dde){\n ret.height=dde.scrollHeight;\n } else if(d.height){\n ret.height=d.height;\n }\nif(dde&&dde.scrollTop)\n ret.top=dde.scrollTop;\n else if(db&&db.scrollTop)\n ret.top=db.scrollTop;\n else if(window.pageYOffset)\n ret.top=window.pageYOffset;\n else if(window.scrollY)\n ret.top=window.scrollY;\nif(dde&&dde.scrollLeft)\n ret.left=dde.scrollLeft;\n else if(db&&db.scrollLeft)\n ret.left=db.scrollLeft;\n else if(window.pageXOffset)\n ret.left=window.pageXOffset;\n else if(window.scrollX)\n ret.left=window.scrollX;\n return ret;\n}", "title": "" }, { "docid": "33efebca0b9579dab1571ecbe53cd382", "score": "0.58490884", "text": "function VirtualScrollStrategy() {}", "title": "" }, { "docid": "a64315fd383b76ce0f4a2f2886f6e4ff", "score": "0.58360386", "text": "function initViewportUnitsOnMobile() {\n\t\tvar vh = window.innerHeight * 0.01;\n\t\tdocument.documentElement.style.setProperty('--vh', vh + 'px');\n\n\t\t$(window).on('resize', function() {\n\t\t\tvh = window.innerHeight * 0.01;\n\t\t\tdocument.documentElement.style.setProperty('--vh', vh + 'px');\n\t\t});\n\t}", "title": "" }, { "docid": "69011f383eedc67390d59c3a847f4a4d", "score": "0.5828168", "text": "function setViewport(container, img, x, y, width, height) {\r\n //choose the central part of photo as thumbnail\r\n\r\n if(x >= width){\r\n offsetX = (x-width)/2;\r\n }else{\r\n offsetX = 0;\r\n }\r\n\r\n if(y >= height){ \r\n offsetY = (y-height)/2;\r\n }else{\r\n offsetY = 0;\r\n }\r\n\r\n\t\t\t img.style.left = \"-\" + offsetX + \"px\";\r\n img.style.top = \"-\" + offsetY + \"px\";\r\n //change size of container with photo\r\n\t\t\t if (width !== undefined) {\r\n\t\t\t img.parentNode.style.width = width + \"px\";\r\n\t\t\t img.parentNode.style.height = height + \"px\";\r\n\t\t }\r\n\t\t }", "title": "" }, { "docid": "daa93ab92f4ab1539d98d5f93144cf71", "score": "0.5827379", "text": "function checkViewport() {\n viewportWidth = $(window).width();\n if (viewportWidth > 768) {\n // Desktop fade target\n $fadeTarget = '95%';\n }\n else {\n // Mobile fade target\n $fadeTarget = '200%';\n };\n if (lazyLoadImgDebug == 'true') {\n console.log('fade target is ' + $fadeTarget);\n };\n \n}", "title": "" }, { "docid": "7cc6528e91359dce4386b7115104620f", "score": "0.5819071", "text": "function elementIsInViewport(el) {\n return $(el).isInViewport()\n }", "title": "" }, { "docid": "910e7b6fa01bd93aaa1f3782eedaa714", "score": "0.5816893", "text": "resizeCanvas() {\n // fix weird height glitch\n var scale = RayTracer.isRetina() ? 2 : 1;\n var canvas = this.$canvas.get(0);\n canvas.width = this.$canvas.width() * scale;\n canvas.height = this.$canvas.height() * scale;\n this.gl.viewport(0, 0, canvas.width, canvas.height);\n }", "title": "" }, { "docid": "939ce3779853cb8585a260fe45ce8a09", "score": "0.5813133", "text": "function TrackViewport(options) {\n\tthis.view = \"\";\n\tthis.options = options;\n\tthis.trackElement = $(\"#body-container\");\n}", "title": "" }, { "docid": "80bb5dcb282aa7ad148242cca65ba235", "score": "0.5811248", "text": "ensureVisible(x, y, width, height, resizeToFit) {\n if (resizeToFit && (width > this.worldScreenWidth || height > this.worldScreenHeight)) {\n this.fit(true, width, height);\n this.emit(\"zoomed\", {\n viewport: this,\n type: \"ensureVisible\"\n });\n }\n let moved = false;\n if (x < this.left) {\n this.left = x;\n moved = true;\n } else if (x + width > this.right) {\n this.right = x + width;\n moved = true;\n }\n if (y < this.top) {\n this.top = y;\n moved = true;\n } else if (y + height > this.bottom) {\n this.bottom = y + height;\n moved = true;\n }\n if (moved) this.emit(\"moved\", {\n viewport: this,\n type: \"ensureVisible\"\n });\n }", "title": "" }, { "docid": "1136d606832a1cd8795d08e89076544a", "score": "0.5798039", "text": "function container_close_to_viewport( unit_element ) {\n /* Get the information regarding the offset\n * of the container in relation to the viewport. */\n var unit_offset = unit_element.getBoundingClientRect();\n var top_offset = unit_offset.top;\n var bottom_offset = unit_offset.bottom;\n var screen_height = $( window ).height();\n\n return (\n // Ad unit container is about to enter viewport from above.\n ( bottom_offset < - AD_LOAD_OFFSET ) ||\n // Ad unit container is about to enter viewport from below.\n ( ( top_offset > 0 ) && ( top_offset < screen_height + AD_LOAD_OFFSET ) )\n );\n }", "title": "" } ]
3edb006fbb6ed57aa61538ab508cc6e6
return number of 1 bits in x
[ { "docid": "3171b4cb48eeb6d5b08ee92e4841c7ce", "score": "0.0", "text": "function cbit(x) {\n var r = 0;\n while(x != 0) { x &= x-1; ++r; }\n return r;\n}", "title": "" } ]
[ { "docid": "aca6bc8ab4a8766aa272adeaab9ddc1f", "score": "0.8247451", "text": "function countBits(x) {\n let bits = ((x.n - 1) * BITS_PER_BLOCK) + 1;\n let y = x.a[x.n - 1];\n while (y >= 2) {\n bits++;\n y >>>= 1;\n }\n return bits;\n }", "title": "" }, { "docid": "1e6d83a9b3c0755760d9f4343d315dea", "score": "0.8181295", "text": "function countBits(x) {\n var c = 0;\n while (x > 0) {\n if (x % 2 == 1) {\n c++;\n }\n x = Math.floor(x / 2);\n }\n return c;\n}", "title": "" }, { "docid": "e931f7de5386ba3bc558f3e0e12ceff3", "score": "0.78737456", "text": "function nbits(x) {\n var n = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n n += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n n += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n n += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n n += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n n += 1;\n }\n return n;\n}", "title": "" }, { "docid": "0bea18d7ad7c68f5c48381a6aae8f8c3", "score": "0.7785619", "text": "function nbits(x)\n{\n var n = 1, t;\n if((t=x>>>16) != 0) { x = t; n += 16; }\n if((t=x>>8) != 0) { x = t; n += 8; }\n if((t=x>>4) != 0) { x = t; n += 4; }\n if((t=x>>2) != 0) { x = t; n += 2; }\n if((t=x>>1) != 0) { x = t; n += 1; }\n return n;\n}", "title": "" }, { "docid": "7aac694b038d554125ce7aba1935112a", "score": "0.7768007", "text": "function bitSize(x) {\n var j,z,w;\n for (j=x.length-1; (x[j]==0) && (j>0); j--);\n for (z=0,w=x[j]; w; (w>>=1),z++);\n z+=bpe*j;\n return z;\n}", "title": "" }, { "docid": "82a9226d0e7fc1dfb16cff20f1346002", "score": "0.76869947", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "6b82936f271c971aec119ebef264ae5d", "score": "0.7676592", "text": "function nbits(x) {\n\t\tvar r = 1, t;\n\t\tif ((t = x >>> 16) != 0) { x = t; r += 16; }\n\t\tif ((t = x >> 8) != 0) { x = t; r += 8; }\n\t\tif ((t = x >> 4) != 0) { x = t; r += 4; }\n\t\tif ((t = x >> 2) != 0) { x = t; r += 2; }\n\t\tif ((t = x >> 1) != 0) { x = t; r += 1; }\n\t\treturn r;\n\t}", "title": "" }, { "docid": "6b82936f271c971aec119ebef264ae5d", "score": "0.7676592", "text": "function nbits(x) {\n\t\tvar r = 1, t;\n\t\tif ((t = x >>> 16) != 0) { x = t; r += 16; }\n\t\tif ((t = x >> 8) != 0) { x = t; r += 8; }\n\t\tif ((t = x >> 4) != 0) { x = t; r += 4; }\n\t\tif ((t = x >> 2) != 0) { x = t; r += 2; }\n\t\tif ((t = x >> 1) != 0) { x = t; r += 1; }\n\t\treturn r;\n\t}", "title": "" }, { "docid": "86738948051904f65f7354d503277938", "score": "0.76742667", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "77d2e23e979ae157a55d7d1194e151db", "score": "0.76726234", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "b41adee1bb1922d1e79e86384d29af91", "score": "0.765995", "text": "function nbits(x) {\n\tvar r = 1, t;\n\tif ((t = x >>> 16) != 0) {\n\t\tx = t;\n\t\tr += 16;\n\t}\n\tif ((t = x >> 8) != 0) {\n\t\tx = t;\n\t\tr += 8;\n\t}\n\tif ((t = x >> 4) != 0) {\n\t\tx = t;\n\t\tr += 4;\n\t}\n\tif ((t = x >> 2) != 0) {\n\t\tx = t;\n\t\tr += 2;\n\t}\n\tif ((t = x >> 1) != 0) {\n\t\tx = t;\n\t\tr += 1;\n\t}\n\treturn r;\n}", "title": "" }, { "docid": "ac740897583dd173051d04711a797e1c", "score": "0.765537", "text": "function nbits(x)\n{\n var r = 1,\n t;\n if ((t = x >>> 16) != 0)\n {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0)\n {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0)\n {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0)\n {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0)\n {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "1135351de460999d0277069c47d138bf", "score": "0.7643023", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "1135351de460999d0277069c47d138bf", "score": "0.7643023", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "ba7c78d355291b6d511e29b8200fde55", "score": "0.7623894", "text": "function nbits(x) {\r\n var r = 1, t;\r\n if ((t = x >>> 16) != 0) {\r\n x = t;\r\n r += 16;\r\n }\r\n if ((t = x >> 8) != 0) {\r\n x = t;\r\n r += 8;\r\n }\r\n if ((t = x >> 4) != 0) {\r\n x = t;\r\n r += 4;\r\n }\r\n if ((t = x >> 2) != 0) {\r\n x = t;\r\n r += 2;\r\n }\r\n if ((t = x >> 1) != 0) {\r\n x = t;\r\n r += 1;\r\n }\r\n return r;\r\n}", "title": "" }, { "docid": "4288d1548c4767627480ac8eb9a41f6d", "score": "0.7613131", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "4288d1548c4767627480ac8eb9a41f6d", "score": "0.7613131", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "c785409f91880cd0060c36dd1e916186", "score": "0.7595481", "text": "function nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) { x = t; r += 16; }\n if ((t = x >> 8) != 0) { x = t; r += 8; }\n if ((t = x >> 4) != 0) { x = t; r += 4; }\n if ((t = x >> 2) != 0) { x = t; r += 2; }\n if ((t = x >> 1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "8f91efc2823f7b4064bd56e7f6036e25", "score": "0.75895715", "text": "function nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "8f91efc2823f7b4064bd56e7f6036e25", "score": "0.75895715", "text": "function nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.75839937", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "0b5282c9b491996283ab7eab0bfc8303", "score": "0.757217", "text": "function nbits(x) {\n\t var r = 1,\n\t t\n\t if ((t = x >>> 16) != 0) {\n\t x = t\n\t r += 16\n\t }\n\t if ((t = x >> 8) != 0) {\n\t x = t\n\t r += 8\n\t }\n\t if ((t = x >> 4) != 0) {\n\t x = t\n\t r += 4\n\t }\n\t if ((t = x >> 2) != 0) {\n\t x = t\n\t r += 2\n\t }\n\t if ((t = x >> 1) != 0) {\n\t x = t\n\t r += 1\n\t }\n\t return r\n\t}", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.75705284", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "6919a7985314832e7e6bb1dc44495dba", "score": "0.75691223", "text": "function count1Bits (n) {\n let ones = 0\n const maxBit = Math.floor(Math.log2(n))\n\n for (let i = maxBit; i >= 0; i--) {\n if (Math.pow(2, i) & n) {\n ones++\n }\n }\n // console.log(\"=======================\")\n return ones\n}", "title": "" }, { "docid": "af025a620ae7b9bece9e7f1b12c41ab5", "score": "0.75686854", "text": "function nbits(x) {\r\n var r = 1, t;\r\n if((t=x>>>16) != 0) { x = t; r += 16; }\r\n if((t=x>>8) != 0) { x = t; r += 8; }\r\n if((t=x>>4) != 0) { x = t; r += 4; }\r\n if((t=x>>2) != 0) { x = t; r += 2; }\r\n if((t=x>>1) != 0) { x = t; r += 1; }\r\n return r;\r\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75652325", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.75315344", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "9db35262be330294f1ed1052c9d5d36e", "score": "0.7524222", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t}", "title": "" }, { "docid": "f1f777d002b5eeeaf7cebfb9119bdfa3", "score": "0.7519231", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "4d63f47434492d92c8da9cd1f70d01f7", "score": "0.75087494", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t }", "title": "" }, { "docid": "4d63f47434492d92c8da9cd1f70d01f7", "score": "0.75087494", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t }", "title": "" }, { "docid": "4d63f47434492d92c8da9cd1f70d01f7", "score": "0.75087494", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t }", "title": "" }, { "docid": "4d63f47434492d92c8da9cd1f70d01f7", "score": "0.75087494", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t }", "title": "" }, { "docid": "4d63f47434492d92c8da9cd1f70d01f7", "score": "0.75087494", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t }", "title": "" } ]
c8d6d0420cf667a49049502409008c21
Assets When a vm is present (instance creation), we need to do a threeway merge between constructor options, instance options and parent options.
[ { "docid": "aecd54d4583c072ec1bf0cc73d15f8b7", "score": "0.60446006", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "title": "" } ]
[ { "docid": "9f18d27ebdefbd769afc6f2ba4c001c7", "score": "0.62122196", "text": "function mergeAssets(parentVal,childVal,vm,key){var res=Object.create(parentVal||null);if(childVal){true&&assertObjectType(key,childVal,vm);return extend(res,childVal);}else{return res;}}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "c738dbda12682dec4ed0ac56eec0eee0", "score": "0.61756474", "text": "function mergeOptions(parent,child,vm){if(process.env.NODE_ENV!=='production'){checkComponents(child);}if(typeof child==='function'){child=child.options;}normalizeProps(child);normalizeDirectives(child);var extendsFrom=child.extends;if(extendsFrom){parent=mergeOptions(parent,extendsFrom,vm);}if(child.mixins){for(var i=0,l=child.mixins.length;i<l;i++){parent=mergeOptions(parent,child.mixins[i],vm);}}var options={};var key;for(key in parent){mergeField(key);}for(key in child){if(!hasOwn(parent,key)){mergeField(key);}}function mergeField(key){var strat=strats[key]||defaultStrat;options[key]=strat(parent[key],child[key],vm,key);}return options;}", "title": "" }, { "docid": "079df7c6428aeb6eefbe31cfc49f9d3c", "score": "0.6148229", "text": "function mergeAssets(\nparentVal,\nchildVal,\nvm,\nkey)\n{\nvar res=Object.create(parentVal||null);\nif(childVal){\nassertObjectType(key,childVal,vm);\nreturn extend(res,childVal);\n}else {\nreturn res;\n}\n}", "title": "" }, { "docid": "6dc9d7d7fdf402ed63eac5daf7e76a97", "score": "0.6089309", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "title": "" }, { "docid": "26b1e61f9bd953decd99b191629a4f36", "score": "0.6069488", "text": "function mergeOptions(\nparent,\nchild,\nvm)\n{\n{\ncheckComponents(child);\n}\n\nif(typeof child==='function'){\nchild=child.options;\n}\n\nnormalizeProps(child,vm);\nnormalizeInject(child,vm);\nnormalizeDirectives(child);\n\n// Apply extends and mixins on the child options,\n// but only if it is a raw options object that isn't\n// the result of another mergeOptions call.\n// Only merged options has the _base property.\nif(!child._base){\nif(child.extends){\nparent=mergeOptions(parent,child.extends,vm);\n}\nif(child.mixins){\nfor(var i=0,l=child.mixins.length;i<l;i++){\nparent=mergeOptions(parent,child.mixins[i],vm);\n}\n}\n}\n\nvar options={};\nvar key;\nfor(key in parent){\nmergeField(key);\n}\nfor(key in child){\nif(!hasOwn(parent,key)){\nmergeField(key);\n}\n}\nfunction mergeField(key){\nvar strat=strats[key]||defaultStrat;\noptions[key]=strat(parent[key],child[key],vm,key);\n}\nreturn options;\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "af1b2274c75c8e226e7259fe2c048de1", "score": "0.60473675", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "b56d9f4e807a5c5e91b88e6a7d222ae4", "score": "0.60393023", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n }", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "42abac4cb49c14915b383a159a6c1c3f", "score": "0.60231405", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "03e572c5313163c631602a3717ea6620", "score": "0.6022794", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "title": "" }, { "docid": "738c589b311255169588a029b9f6a60b", "score": "0.60102093", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = (0, _create2.default)(parentVal || null);\n if (childVal) {\n \"development\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n }", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "024533fce7b08278cb38637f51f8a60e", "score": "0.600436", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6af7b122c5d68109379692dc5ac63895", "score": "0.5997441", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n \"production\" !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "title": "" }, { "docid": "3254feaad303be4a1a713df63a35762c", "score": "0.5970832", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n undefined !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "3254feaad303be4a1a713df63a35762c", "score": "0.5970832", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n undefined !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "46a53c91c7070306df9442730d7d75d2", "score": "0.594393", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = babel_runtime_core_js_object_create__WEBPACK_IMPORTED_MODULE_0___default()(parentVal || null);\n if (childVal) {\n \"none\" !== 'production' && assertObjectType(key, childVal, vm);\n return Object(shared_util__WEBPACK_IMPORTED_MODULE_7__[\"extend\"])(res, childVal);\n } else {\n return res;\n }\n}", "title": "" }, { "docid": "50ec29e5d71908ba99fa11a64e2550f5", "score": "0.59047675", "text": "function mergeAssets(parentVal, childVal, vm, key) {\n var res = Object.create(parentVal || null);\n\n if (childVal) {\n true && assertObjectType(key, childVal, vm);\n return extend(res, childVal);\n } else {\n return res;\n }\n}", "title": "" }, { "docid": "0486790a4957b2e4181a1646281c71ae", "score": "0.589234", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n return extend(res, childVal)\n } else {\n return res\n }\n }", "title": "" }, { "docid": "29baaaacdb6d2199d1534e12426eda0d", "score": "0.5891243", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "title": "" }, { "docid": "29baaaacdb6d2199d1534e12426eda0d", "score": "0.5891243", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "title": "" }, { "docid": "29baaaacdb6d2199d1534e12426eda0d", "score": "0.5891243", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n ) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n }", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" }, { "docid": "6a8d9dcfe906e16b3063edf1408e2441", "score": "0.588383", "text": "function mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}", "title": "" } ]
fd540d9dbf519aaa48933e091dc1ad08
Check to see if the objects position is outside the table
[ { "docid": "b5d5c3a8f42a7bc02eb074fe9efe5871", "score": "0.8465234", "text": "function checkObjectOutsideTable() {\n let outsideTable = false;\n if (movingObject.positionX < 0 || movingObject.positionX >= table.width) {\n outsideTable = true;\n } else if (\n movingObject.positionY < 0 ||\n movingObject.positionY >= table.height\n ) {\n outsideTable = true;\n }\n if (outsideTable) {\n movingObject.positionX = -1;\n movingObject.positionY = -1;\n }\n return outsideTable;\n}", "title": "" } ]
[ { "docid": "70157f5c4fe635fe4c2d9bb1fbb05fa3", "score": "0.6902828", "text": "isOutOfBounds () {\n const head = this.body[this.body.length - 1];\n return (\n head.x > canvasSize - cell ||\n head.x < 0 ||\n head.y > canvasSize - cell ||\n head.y < 0\n );\n }", "title": "" }, { "docid": "bb09d01ea71540959ec0e09e42a8bc48", "score": "0.6885432", "text": "function checkMouseIsOutsideObjectBorder(currentGridLocation, object) {\n let xLimits = {\n min: object.rectCorners.topL.x,\n max: object.rectCorners.topR.x\n }\n let yLimits = {\n min: object.rectCorners.topL.y,\n max: object.rectCorners.bottomL.y\n }\n let mouseLocation = {\n x: currentGridLocation.x * gridDimension.x,\n y: currentGridLocation.y * gridDimension.y\n }\n\n if ( \n mouseLocation.x > xLimits.min \n && \n mouseLocation.x < xLimits.max\n &&\n mouseLocation.y > yLimits.min \n && \n mouseLocation.y < yLimits.max\n ) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "fc2fbbd698803fef571071fcd0100bec", "score": "0.6765604", "text": "function isOutOfBounds(obj) {\n if (obj.hasOwnProperty(\"hitBoxX\")) {\n if ((obj.hitBoxY + obj.hitBoxHeight < myGameArea.canvas.height) && (obj.hitBoxY > 0) && (obj.hitBoxX >= 0) && (obj.hitBoxX + obj.hitBoxWidth < canvasWidth)) {\n return false;\n } else {\n return true;\n }\n } else {\n console.log(obj.name + \" is missing a hit box\");\n }\n }", "title": "" }, { "docid": "315ebd1eebc14ae88c6552c28d1eb8a2", "score": "0.667286", "text": "outsideMap() {\n let x = this.pos.x;\n let y = this.pos.y;\n let r = this.r * 2;\n return (x + r < this.mapLeft || x - r > this.mapRight || y + r < this.mapTop || y - r > this.mapBottom);\n }", "title": "" }, { "docid": "01cce5af9c2dd0c0b3c79017e91e342f", "score": "0.66716385", "text": "function inBounds(obj) {\n\t\treturn obj.x >= 0 - obj.width * 0.5;\n\t }", "title": "" }, { "docid": "5e83208bb7ffc4fbe9802ea9a7ec1d8e", "score": "0.6619287", "text": "function checkCol (object1, object2) {\n\tif (!(\n\t\t((object2.y + object2.h) < object1.y ) ||\n\t\t(object2.y > (object1.y + object1.h)) ||\n\t\t((object2.x + object2.w) < object1.x ) ||\n\t\t(object2.x > (object1.x + object1.w))\n\t\t)){\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "9931cff3b53898a10c4d45197adabe89", "score": "0.6589411", "text": "function checkOverlap(x,y,Width,Height)\r\n{\r\n if(objects.length>0)\r\n {\r\n for (var i = 0; i < objects.length; i++) \r\n {\r\n if(!(x+45<objects[i].x)&&!(objects[i].x+45<x)&&!(y+110<objects[i].y)&&!(objects[i].y+110<y))\r\n {\r\n return false;\r\n\r\n }\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "e63e2b8366eedaba55d2a474116b6456", "score": "0.65861785", "text": "checkIfOutOfBorders() {\n let head = this.state.snakeDots[this.state.snakeDots.length - 1];\n if (head[0] >= 100 || head[1] >= 100 || head[0] < 0 || head[1] < 0) {\n this.onGameOver();\n }\n }", "title": "" }, { "docid": "96056fa3bc5bbee07212a75dc64fd880", "score": "0.65797484", "text": "isOutsideCanvas() {\n const width = this.scene.game.config.width;\n const height = this.scene.game.config.height;\n return this.x > width || this.x < 0 || this.y > height || this.y < 0;\n }", "title": "" }, { "docid": "83db7ab28d453e4f48119c19c1566ab1", "score": "0.65762836", "text": "outOfBounds() {\n return (this.x < 0 || this.x > this.bounds.x ||\n this.y < 0 || this.y > this.bounds.y);\n }", "title": "" }, { "docid": "7f4254420a40fdfca1d45055de1694af", "score": "0.65422106", "text": "collisionTop() {\n if (this.posY + this.canvasWidth * 0.05 <= 0) {\n return true;\n }\n }", "title": "" }, { "docid": "cc2a4d222c5a34e4e795c15a3788d21a", "score": "0.64790267", "text": "isInside(){\n return this.x < MouseX && this.x + this.width > MouseX && \n this.y < MouseY && this.y + this.height > MouseY;\n }", "title": "" }, { "docid": "ffbb2ad02dbe6babe183200604854a6c", "score": "0.6472045", "text": "checkIfOutOfBounds() {\n return this.currentMeasureObject == null\n }", "title": "" }, { "docid": "4ff78e48b8d5dab8e6bf959b970d0cdb", "score": "0.6413937", "text": "function notoutoftable(i, j, x, y, ncol, nrow) {\n\tif (((x + i >= 0) && (x + i <= ncol - 1))\n\t\t\t&& ((y + j >= 0) && (y + j <= nrow - 1))) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "bdd7e496e81723df68d011b919f665d3", "score": "0.640656", "text": "function wouldLeaveGrid(nextPosition) {\n return nextPosition.some(position => {\n return currentPosition + position >= cellCount\n })\n }", "title": "" }, { "docid": "542d6c45f009daadaaf977262925a308", "score": "0.6340596", "text": "outsideMap(room,yCoord,xCoord){\n\t\tif(yCoord < 0) return true\n\t\tif(xCoord < 0) return true\n\t\tif(yCoord >= room.height) return true\n\t\tif(xCoord >= room.width) return true\n\n\t\treturn false\n\t}", "title": "" }, { "docid": "720ecbc691dbdbfd11d15073bf954dd1", "score": "0.63157684", "text": "function OutOfBounds(entity)\n{\n if (entity.Pos[0] + entity.Radius*4 < 0 || entity.Pos[0] - entity.Radius*4 > canvas.width ||\n entity.Pos[1] + entity.Radius*4 < 0 || entity.Pos[1] - entity.Radius*4 > canvas.height)\n return true;\n\n return false;\n}", "title": "" }, { "docid": "15cc6c22f65bebdf2621526f8e5f1ae9", "score": "0.63127655", "text": "function checkIsMovable(currentObj) {\n var curRNum = getRowNumByObj(currentObj);\n var curCNum = getColNumByObj(currentObj);\n \n// if the current tile is in the up/down/left/top direction of the empty tile, then it can be moved\n var sameRowBool = Math.abs(curRNum - emptyRowNum) === 1 && curCNum === emptyColNum;\n var sameColBool = Math.abs(curCNum - emptyColNum) === 1 && curRNum === emptyRowNum;\n if (sameRowBool || sameColBool){\n return true;\n\t\t}\n else{\n return false;\n\t\t}\n}", "title": "" }, { "docid": "d9388f200bd003642075539f3f4e5f9a", "score": "0.63067764", "text": "function isInBoundaries(x, y) {\n return x >= 0 && x < rows && y >= 0 && y < columns;\n }", "title": "" }, { "docid": "30584e079f80fbd1fc70b479041fa733", "score": "0.62974894", "text": "function verificarColisao(objeto1, objeto2) {\n var object2extraYPixels;\n if(objeto2.tipo === typeOfComponent.Veiculo){\n //inclui na conta o tamanho das rodas\n object2extraYPixels = 10;\n }\n else{\n object2extraYPixels = 0;\n }\n //Verifica colisao na parte superior do objeto\n if (((objeto1.x >= objeto2.x && objeto1.x <= objeto2.x + objeto2.width) || (objeto1.x + objeto1.width >= objeto2.x && objeto1.x + objeto1.width <= objeto2.x + objeto2.width) ) && ((objeto1.y >= objeto2.y && objeto1.y <= objeto2.y + objeto2.height + object2extraYPixels ) || (objeto1.y + objeto1.height >= objeto2.y && objeto1.y + objeto1.height <= objeto2.y + objeto2.height + object2extraYPixels ) ) )\n return true;\n else\n return false;\n\n}", "title": "" }, { "docid": "b0961974cbbcad4c66bb9df35b2d09ea", "score": "0.6282566", "text": "function outOfBounds_v()\n{\n\tif ((current_y + (current_size - 1)) < 10)\n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true; \n\t}\n}", "title": "" }, { "docid": "296cb2a0e7583008f73f398be0515b3d", "score": "0.62723243", "text": "isOut () {\n return (this.x < 0 || this.x > width || this.y < 0 || this.y > height);\n }", "title": "" }, { "docid": "224e3b977dc6c78b9c4bb9a76d0675d3", "score": "0.6261206", "text": "containsLoc(x, y) {\n let xInBounds = x >= 0 && x < this.rowCount;\n let yInBounds = y >= 0 && y < this.colCount;\n return xInBounds && yInBounds;\n }", "title": "" }, { "docid": "62cd6d9869c222bc5751e2b4852aed2e", "score": "0.6257315", "text": "function contains(obj) {\n return obj.position.x < this.position.x + this.size.w &&\n obj.position.x + obj.size.w > this.position.x &&\n obj.position.y < this.position.y + this.size.h &&\n obj.position.y + obj.size.h > this.position.y;\n}", "title": "" }, { "docid": "490e7380ac7c16f313604678cd61445e", "score": "0.6252042", "text": "isInside(){\n return this.sliderX - this.width / 2 < MouseX && this.sliderX + this.width / 2 > MouseX && \n this.y - this.height / 2 < MouseY && this.y + this.height / 2 > MouseY;\n }", "title": "" }, { "docid": "f2d7c88e8f2cd3c6fecad60209300bd6", "score": "0.6244856", "text": "function wouldOverlapPiece(nextPosition) {\n return nextPosition.some(position => {\n return cells[currentPosition + position].classList.contains('occupied')\n })\n }", "title": "" }, { "docid": "d282ad492c81cbec5946739951a2d7c7", "score": "0.6225878", "text": "function insideBoard(e){\n var pos = getBlock(e);\n var col = pos.col;\n var row = pos.row;\n return (col >= 0 && col <= 19) && (row >= 0 && row <= 19);\n}", "title": "" }, { "docid": "6a7ac597e0920dbec4e28a281bfec8dc", "score": "0.6216831", "text": "function isOutsideBoard(x,y){\n\treturn x < 0 || y < 0 || x >= NUM_TILES_SIDE || y >= NUM_TILES_SIDE;\n}", "title": "" }, { "docid": "1997d08e1efa3bef59561d1c00612abd", "score": "0.62130105", "text": "function hasCells() \n {\n if (!isNull()) {\n return (Easel.cells.length > 0);\n } \n return false;\n }", "title": "" }, { "docid": "72ad3b2c2581fbd377eca0e2c434858b", "score": "0.61985195", "text": "function insideObject(X, Y, obj, dist) {\n var xMin = obj.offset().left - dist;\n var xMax = obj.offset().left + obj.width() + dist;\n\n var yMin = obj.offset().top - dist;\n var yMax = obj.offset().top + obj.height() + dist;\n\n if ((X < xMax) && (X > xMin) && (Y > yMin) && (Y < yMax)) {\n return true;\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "6b3780caf24390e3670344f71937f45d", "score": "0.61912644", "text": "function outOfBounds(a,x,y) { \n // a=object,x=object x postition, y=object y position\n var newBottomY = y + a.height,\n newTopY = y,\n newRightX = x + a.width,\n newLeftX = x,\n treeLineTop = 5,\n treeLineBottom = 570,\n treeLineRight = 750,\n treeLineLeft = 65;\n \n return newBottomY > treeLineBottom ||\n newTopY < treeLineTop ||\n newRightX > treeLineRight ||\n newLeftX < treeLineLeft;\n}", "title": "" }, { "docid": "c8614a58179a7f68d153fb6ef317a9fc", "score": "0.6176665", "text": "isOver(loc){\n // needs to be rewritten!\n let x = loc.x;\n let y = loc.y;\n return this.location.x <= x && x <= this.location.x + this.strokeWeight &&\n this.location.y <= y && y <= this.location.y + this.size;\n }", "title": "" }, { "docid": "6a1ede4c8f16188177809fafce6b0c42", "score": "0.617362", "text": "function outOfBounds(pos) {\n if (pos.y < -50 || pos.y < -50 || pos.x > width + 50 || pos.y > 50 + height) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "dbf3abb365bdc9215ee1d5b0fa3d9d7e", "score": "0.61693984", "text": "inBounds(player) {\n \n if (this.isHorizontal()) {\n // Horizontal boundary, check x\n let tolerance = this.size / 2 + player.size.x / 2;\n\n let xMin = this.pos.x - tolerance;\n let xMax = this.pos.x + tolerance;\n\n return (player.pos.x > xMin && player.pos.x < xMax);\n }\n else {\n // Vertical boundary, check y\n let tolerance = this.size / 2 + player.size.y / 2;\n\n let yMin = this.pos.y - tolerance;\n let yMax = this.pos.y + tolerance;\n\n return (player.pos.y > yMin && player.pos.y < yMax);\n }\n\n return false;\n }", "title": "" }, { "docid": "cdf1830fa957f04616619c16fe0bbb21", "score": "0.6161626", "text": "checkNearby(row, col) {\n\n let topCell = this.game.gameContainerElement.querySelector(\n `.cell_${row - 1}_${col}`\n );\n let bottomCell = this.game.gameContainerElement.querySelector(\n `.cell_${row + 1}_${col}`\n );\n let rightCell = this.game.gameContainerElement.querySelector(\n `.cell_${row}_${col + 1}`\n );\n let leftCell = this.game.gameContainerElement.querySelector(\n `.cell_${row}_${col - 1}`\n );\n\n if (\n this.isCloseTo(\n topCell,\n bottomCell,\n rightCell,\n leftCell,\n this.avoidItems[0]\n )\n ) {\n if (\n this.isCloseTo(\n topCell,\n bottomCell,\n rightCell,\n leftCell,\n this.avoidItems[1]\n )\n ) {\n if (\n this.isCloseTo(\n topCell,\n bottomCell,\n rightCell,\n leftCell,\n this.avoidItems[2]\n )\n ) {\n if (\n this.isCloseTo(\n topCell,\n bottomCell,\n rightCell,\n leftCell,\n this.avoidItems[3]\n )\n ) {\n if (\n this.isCloseTo(\n topCell,\n bottomCell,\n rightCell,\n leftCell,\n this.avoidItems[4]\n )\n ) {\n if (\n this.isCloseTo(\n topCell,\n bottomCell,\n rightCell,\n leftCell,\n this.avoidItems[5]\n )\n ) {\n if (\n this.isCloseTo(\n topCell,\n bottomCell,\n rightCell,\n leftCell,\n this.avoidItems[6]\n )\n ) {\n return true;\n }\n }\n }\n }\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "898dfce5cb6eacdcec3215054bd9bc66", "score": "0.6158192", "text": "function outsideGrid(x, y) {\n var gridBoundary = grid.length - 1\n if (x < 0 || x > gridBoundary || y < 0 || y > gridBoundary) {\n console.log(\"outside grid\")\n return true\n }\n else {\n return false\n }\n}", "title": "" }, { "docid": "57cc63087ce57de92126682b903401d7", "score": "0.61509854", "text": "offscreen() {\n return (this.x.x < 0 || this.x.y > height || this.x.x > width)\n }", "title": "" }, { "docid": "233623f2d6bc7185a15bd5b207dce470", "score": "0.61484444", "text": "function i(t){var e=t.getBoundingClientRect();return!(e.right>window.innerWidth||e.bottom>window.innerHeight)&&!(e.top<0||e.left<0)}", "title": "" }, { "docid": "3f1d928857eb2c8b5fe07a45e3c59cdb", "score": "0.6136547", "text": "atBoundary() {\n return this.x === 0\n || this.y === 0\n || this.x === this.layer.width - 1\n || this.y === this.layer.height - 1;\n }", "title": "" }, { "docid": "90707bd16af96e9c18458243c052a38b", "score": "0.6133329", "text": "function checkBoundary(object){\n\n\t\tif(object.x >= object.canvasWidth){\n\t\t\tobject.x = 0;\n\t\t}else if(object.x <= -object.width){\n\t\t\tobject.x = object.canvasWidth-object.width;\n\t\t}else if(object.y >= object.canvasHeight+object.height){\n\t\t\tobject.y = 0;\n\t\t}else if(object.y <= -object.height){\n\t\t\tobject.y = object.canvasHeight-object.height;\n\t\t}\t\n\t}", "title": "" }, { "docid": "63717f12f488f9d51abd10f23fee97b3", "score": "0.61260813", "text": "function isInside(x,y,w,h,tk)\r\n {\r\n\t// alert(tk.id+\":\\r\\n\"+x+\"<\"+parseInt(tk.style.left)+\"<\"+(x+w)+\"\\r\\n\"+y+\"<\"+parseInt(tk.style.top)+\"<\"+(y+h));\r\n\tif(x<parseInt(tk.style.left))\r\n\t{\r\n\t if(y<parseInt(tk.style.top))\r\n\t {\r\n\t\tif((x+w)>parseInt(tk.style.left))\r\n\t\t{\r\n\t\t if((y+h)>parseInt(tk.style.top))\r\n\t\t {\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t}\r\n\treturn false;\r\n }", "title": "" }, { "docid": "647a150702edd38bd56e1f21d54bbf9f", "score": "0.6122403", "text": "function hasMoving() {\n const length = size * size;\n for (let index = 0; index < length; index++) {\n if (cells[index] < 0) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "f09ddee835805c31bd1dcac238dd4d22", "score": "0.61179525", "text": "function isEndSub(){\n\n let countTop = 0 \n for(let i = 0; i <= 10 - x; i++){\n if(x + i >= 10 || y - i < 0){\n break\n }\n if(chessboard[y - i][x + i].value === cell.type){\n countTop++\n }\n else{\n break\n }\n }\n \n let countBottom = 0\n for(let i = 1; i <= 10 - x; i++){\n if(x - i < 0 || y + i >= 10){\n break\n }\n if(chessboard[y + i][x - i].value === cell.type){\n countBottom++\n }\n else{\n break\n }\n }\n \n if(countBottom + countTop === 5){\n return false\n }\n return true\n }", "title": "" }, { "docid": "0c9b3d98ddbf5dce73c4b29b57739b83", "score": "0.61041003", "text": "function inboundsCheck() {\n var maxX = canvas.width - 10;\n var maxY = canvas.height - 10;\n var inBounds = true;\n\n for (var i = 0; i < lineArray.length; i++) {\n l = lineArray[i];\n if (l.startx > maxX || l.starty > maxY || l.endx > maxX || l.endy > maxY) {\n inBounds = false;\n }\n }\n\n return inBounds;\n}", "title": "" }, { "docid": "e2c464190b4c979fd68c0103ccbfa8cc", "score": "0.6098553", "text": "function checkArea(e) {\r\n\t\t\t\tvar dragObj = $.data(e.data.target, \"draggable\");\r\n\t\t\t\tvar handle = dragObj.handle;\r\n\t\t\t\tvar offset = $(handle).offset();\r\n\t\t\t\tvar width = $(handle).outerWidth();\r\n\t\t\t\tvar height = $(handle).outerHeight();\r\n\t\t\t\tvar t = e.pageY - offset.top;\r\n\t\t\t\tvar r = offset.left + width - e.pageX;\r\n\t\t\t\tvar b = offset.top + height - e.pageY;\r\n\t\t\t\tvar l = e.pageX - offset.left;\r\n\t\t\t\treturn Math.min(t, r, b, l) > dragObj.options.edge;\r\n\t\t\t}", "title": "" }, { "docid": "fe3da536bba8cfd1180ae2a098195164", "score": "0.608776", "text": "crash(object) {\n const playerLeft = this.x;\n const playerRight = this.x + 70;\n const playerTop = this.y + 50;\n const playerBottom = this.y + 100;\n const objectLeft = object.x;\n const objectRight = object.x + 65;\n const objectTop = object.y + 50;\n const objectBottom = object.y + 100;\n let collision = true;\n if ((playerBottom < objectTop) ||\n (playerTop > objectBottom) ||\n (playerRight < objectLeft) ||\n (playerLeft > objectRight)) {\n collision = false;\n }\n return collision;\n }", "title": "" }, { "docid": "4fa7b166244969a222383b7adace1aac", "score": "0.6050227", "text": "function checkOutOfBounds(item){\n if (item.bounds.left > view.size.width) {\n item.position.x = 0;\n }\n if (item.bounds.top > view.size.height) {\n item.position.y = 0;\n }\n if (item.bounds.right < 0) {\n item.position.x = view.size.width;\n }\n if (item.bounds.bottom < 0) {\n item.position.y = view.size.height;\n }\n }", "title": "" }, { "docid": "92380e7f42b2f32cd379fc6b0ceaa482", "score": "0.6035288", "text": "function borderDetection(){\n if ($gameCharacter.css('top') < '0' || $gameCharacter.css('bottom') < '0'){\n gameOver();\n }\n }", "title": "" }, { "docid": "ecd43a0958959cd5cdb0c7a1723c4ea3", "score": "0.60335076", "text": "function mouseIsOverAbsElement(obj) {\n\tif ((mouseX < obj.offsetLeft) || (mouseX > obj.offsetLeft + obj.offsetWidth)) return false;\n\telse if ((mouseY < obj.offsetTop) || (mouseY > obj.offsetTop + obj.offsetHeight)) return false;\n\telse return true;\n}", "title": "" }, { "docid": "617b4bb10d4e2c7e76ca4de25d77e5be", "score": "0.6031426", "text": "outOfBoundsSoft() {\n return this.y < -90 || this.y > 1000;\n }", "title": "" }, { "docid": "4ec2598b73f6370986307f034527c063", "score": "0.6022479", "text": "inMiddle(){\n if (this._max_start_bound_box['x_max'] - 50 > this._x_location){\n if (this._max_start_bound_box['x_min']+50 < this._x_location){\n if(this._y_location < (this.window.height/2+300)){\n if (this._y_location > (this.window.height/2 -300)){\n return true;\n }\n }\n \n }\n }\n return false;\n }", "title": "" }, { "docid": "63a33eeaaabb4f947a7a3a6cb1023e63", "score": "0.602216", "text": "isLocated() {\n return (this._x !== null) && (this._y !== null)\n && (this._level !== null);\n }", "title": "" }, { "docid": "1bc07663dd11f95121722e2ec146d574", "score": "0.60166174", "text": "function checkCanvasElements(element) {\n if (yPos > element.top &&\n yPos < element.top + element.height &&\n xPos > element.left &&\n xPos < element.left + element.width) {\n console.log(xPos, yPos, \"inside of element\");\n }\n}", "title": "" }, { "docid": "0a11de6d09daa49f359177f221aee377", "score": "0.6008798", "text": "_checkCollision(elem1, elem2){\n let mario = document.getElementsByClassName(\"mario\")[0];\n let marioPosition = mario.getBoundingClientRect();\n let obstacleDownPosition = elem1.getBoundingClientRect();\n let obstacleTopPosition = elem2.getBoundingClientRect();\n let crashHelp = 500 - marioPosition.bottom < obstacleDownPosition.height || marioPosition.top <= obstacleTopPosition.height;\n let crash = marioPosition.left <= obstacleDownPosition.right \n && obstacleDownPosition.left <= marioPosition.right \n && crashHelp;\n return crash;\n }", "title": "" }, { "docid": "5c17eac5aad0b1aa3341736c7cfd6583", "score": "0.60020936", "text": "static isOutOfCanvas(gameObject){ // canvas rect starts at 0 and ends at canvas.size - 1\n\t\treturn gameObject.x < 0 || gameObject.x >= Ramu.canvas.width ||\n\t\t\t gameObject.y < 0 || gameObject.y >= Ramu.canvas.height;\n\t}", "title": "" }, { "docid": "e5ca5c59c895293df78d53816ac5e4d3", "score": "0.60004956", "text": "InContainer(p) {\n return p.x >= -Maxwell.k_containerHalfWidth && p.x <= Maxwell.k_containerHalfWidth &&\n p.y >= 0.0 && p.y <= Maxwell.k_containerHalfHeight * 2.0;\n }", "title": "" }, { "docid": "2549df4f3c787b5a4443f1ea75c78777", "score": "0.59998655", "text": "hasReachedTarget() {\n return this.y >= CANVAS_HEIGHT - SHOOTER_SIZE;\n }", "title": "" }, { "docid": "224e0b874bb0d7841728b7096f11ec54", "score": "0.5989408", "text": "function checkOverlap() {\n \n for (var i = 0; i < 4; i++) {\n if (piece[i][0] < 0) continue;\n \n// check active blocks against bottom\n if (piece[i][0] >= 20) return true;\n \n// check active blocks against locked blocks\n if (model[piece[i][0]][piece[i][1]] != 0) return true;\n \n// check active blocks against sides\n if (piece[i][1] < 0 || piece[i][1] > 9) return true;\n \n }\n \n return false;\n}", "title": "" }, { "docid": "a3a62a476a11bd781493352eadbb4a27", "score": "0.5977909", "text": "function bulletIsOut(obj, co){\n if(obj.x > co.width || obj.x < - obj.w || obj.y > co.height || obj.y < - obj.h){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "3e22706ece41ccb394bab7409f3e617d", "score": "0.5977897", "text": "function has_win() {\n for (var i=0; i<cells.length; i++) {\n var cell = cells[i];\n if (cell.type == 4)\n return cell.x == 1 && cell.y == 3;\n }\n return false;\n}", "title": "" }, { "docid": "29706e9cf2f3321abb7e6af8abc8d5ab", "score": "0.5972936", "text": "containsObject(x, y, obj) {\n return ((obj.x <= x) && ((obj.x + obj.width) >= x) &&\n (obj.y <= y) && ((obj.y + obj.height) >= y));\n }", "title": "" }, { "docid": "4e184d7a713d02629653ee34c657bb8b", "score": "0.5970832", "text": "checkCollision() {\n let collide = false;\n let player_left = this.player.left;\n let player_right = player_left + this.player.width;\n let player_bottom = this.player.top + this.player.height;\n\n for (let i = 0; i < this.obstacles.length; i++) {\n let obst = this.obstacles[i].corners();\n\n if (player_bottom < obst['top']) {\n continue;\n }\n\n if ((player_right >= obst['left'] && player_left <= obst['left']) ||\n (player_left <= obst['right'] && player_right >= obst['right']) ||\n (player_left <= obst['left'] && player_right >= obst['right'])) {\n \n collide = true;\n }\n }\n\n if (collide) {\n this.lose();\n }\n }", "title": "" }, { "docid": "d9d2dba680d0a6e9087c63d5a819289b", "score": "0.59607595", "text": "function checkArea (e) {\r\n\t\t\t\tvar offset = $(handle).offset();\r\n\t\t\t\tvar width = $(handle).outerWidth();\r\n\t\t\t\tvar height = $(handle).outerHeight();\r\n\t\t\t\tvar t = e.pageY - offset.top;\r\n\t\t\t\tvar r = offset.left + width - e.pageX;\r\n\t\t\t\tvar b = offset.top + height - e.pageY;\r\n\t\t\t\tvar l = e.pageX - offset.left;\r\n\t\t\t\t\r\n\t\t\t\treturn Math.min(t,r,b,l) > opts.edge;\r\n\t\t\t}", "title": "" }, { "docid": "b1fbf5f2b9f2e333258509d7a53e95f7", "score": "0.5959761", "text": "function verifyAround(x, y, nrow, ncol) {\n\tvar count = 0;\n\tfor ( var i = -1; i < 2; i++) {\n\t\tfor ( var j = -1; j < 2; j++) {\n\t\t\tif (notoutoftable(i, j, x, y, ncol, nrow)\n\t\t\t\t\t&& board[x + i][y + j] < -9 && board[x + i][y + j] > -20) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t}\n\treturn count;\n}", "title": "" }, { "docid": "6a3fc8a994f7db2e4780dcc672f970c4", "score": "0.59568346", "text": "function isInside(a, b) {\n a = (a.nodeType ? a : a.el).getBoundingClientRect();\n b = b === viewport ? b : (b.nodeType ? b : b.el).getBoundingClientRect();\n\n return !(a.right < b.left || a.left > b.right || a.top > b.bottom || a.bottom < b.top);\n }", "title": "" }, { "docid": "ccf0f15aefbf887d81e672a62b0c30e9", "score": "0.595313", "text": "IsOver() {\r\n let empty = 0;\r\n for (let i = 0; i < row; i++) {\r\n for (let j = 0; j < col; j++) {\r\n if (this.grid[i][j] === 0) {\r\n empty++;\r\n }\r\n }\r\n }\r\n return empty === 0 || this.over;\r\n }", "title": "" }, { "docid": "40f7d147369a8c18da34ba701cb49b6c", "score": "0.59497535", "text": "function inRange() {\n\treturn (plane.x < canvas.width - plane.width) && (plane.x > 0);\n}", "title": "" }, { "docid": "784dcb73fefd19735b8877ba0945ad24", "score": "0.5945242", "text": "outOfBounds() {\n return this.y < -101 || this.y > 1010;\n }", "title": "" }, { "docid": "07b6565743beeac90f12d0aa528c1327", "score": "0.5944208", "text": "check(){\n if(am.y-tr.y >= 0 && am.y-tr.y <= am.h && Math.abs(am.x-tr.x) < am.w + 8)\n return true;\n else\n false;\n }", "title": "" }, { "docid": "2a4ef72a47757ae41f083e68360b4c00", "score": "0.593522", "text": "full() {\n return this.emptyCells.length === 0;\n }", "title": "" }, { "docid": "cd5413d6cbec752949d6bf8164906436", "score": "0.5934551", "text": "function n(e,t){const i=e.bounds,s=t.bounds;return e.key.id!==t.key.id&&e.key.world===t.key.world&&i[0]<=s[0]&&i[1]<=s[1]&&i[2]>=s[2]&&i[3]>=s[3]}", "title": "" }, { "docid": "1b3da132275ec025dfe2c36556744a28", "score": "0.59328353", "text": "function mouse_in_world() { return (mouse_x < View.view_px_width); }", "title": "" }, { "docid": "a098ccbf20b83340d75e7d1c3a8f7e69", "score": "0.59261394", "text": "function overlapsCheck(table){\r\n if(table.length==1){\r\n return false;\r\n // console.log(\"yes\");\r\n }else{\r\n for(var k=1; k<table.length;k++){\r\n var start=table[k][1];\r\n var end=table[k][2];\r\n for(var j=k-1;j>=0; j--){\r\n if((table[j][1]<=start&&start<=table[j][2]) || (table[j][1]<=end&&end<=table[j][2])){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "4b466790270d37fe94959c350a3a4bd2", "score": "0.59227884", "text": "function checkInputTableAndStartPosition(tableAndStartPosition) {\n if (tableAndStartPosition.match(/^([1-9]+,){2}[0-9]+,[0-9]+$/)) {\n // The input is saved in the global variables for the check of the objects position\n saveInputTableAndStartPosition(tableAndStartPosition);\n if (checkObjectOutsideTable()) {\n return false;\n }\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "84b6853f1e4066794d2d4912037a3082", "score": "0.59167933", "text": "isBounded(top, bottom){\n if(this.y >= bottom || this.y <= top){\n return false\n }\n else return true\n }", "title": "" }, { "docid": "c7f51d34514a37206ed618514f2ea0bb", "score": "0.59105307", "text": "function overlap(obj1, obj2) {\n return obj1.pos.x + obj1.size.x > obj2.pos.x &&\n obj1.pos.x < obj2.pos.x + obj2.size.x &&\n obj1.pos.y + obj1.size.y > obj2.pos.y &&\n obj1.pos.y < obj2.pos.y + obj2.size.y;\n}", "title": "" }, { "docid": "d15b5908d37b7a18a0dddeab841143cd", "score": "0.5909051", "text": "function checkArea(e) {\r\n\t\t\t\tvar state = $.data(e.data.target, 'draggable');\r\n\t\t\t\tvar handle = state.handle;\r\n\t\t\t\tvar offset = $(handle).offset();\r\n\t\t\t\tvar width = $(handle).outerWidth();\r\n\t\t\t\tvar height = $(handle).outerHeight();\r\n\t\t\t\tvar t = e.pageY - offset.top;\r\n\t\t\t\tvar r = offset.left + width - e.pageX;\r\n\t\t\t\tvar b = offset.top + height - e.pageY;\r\n\t\t\t\tvar l = e.pageX - offset.left;\r\n\t\t\t\t\r\n\t\t\t\treturn Math.min(t,r,b,l) > state.options.edge;\r\n\t\t\t}", "title": "" }, { "docid": "dd4da6a180a105570fce059c1110cfbf", "score": "0.59087014", "text": "function crashWith(otherobj) {\n var myleft = x+25;\n var myright = x + 75;\n var mytop = y;\n var mybottom = y + 100;\n var otherleft = otherobj.x;\n var otherright = otherobj.x + (otherobj.width);\n var othertop = otherobj.y;\n var otherbottom = otherobj.y + (otherobj.height);\n var crash = true;\n flag = true;\n if ((mybottom < othertop) || (myright < otherleft) || (myleft > otherright)) {\n crash = false;\n }\n if((myleft > otherright) || (mytop > otherbottom - (otherobj.height + 200)) || (myright < otherleft) || (mybottom < othertop - 250)) {\n flag=false;\n }\n return crash;\n}", "title": "" }, { "docid": "0baf6a353250feff9a8d3d244093b4b6", "score": "0.59070635", "text": "function isInside(a, b) {\n a = a.getBoundingClientRect();\n b = b === viewport ? b : b.getBoundingClientRect();\n\n return !(a.right < b.left || a.left > b.right || a.top > b.bottom || a.bottom < b.top);\n }", "title": "" }, { "docid": "5bb42f8e00eb77f66c3e8620c61c2c58", "score": "0.59065664", "text": "function collides(canvas, obj) {\n for (var row = 0; row < obj.shape.length; row++) {\n for (var col = 0; col < obj.shape[row].length; col++) {\n if (obj.shape[row][col] !== 0) {\n if (canvas[obj.y + row] === undefined || canvas[obj.y + row][obj.x + col] === undefined || canvas[obj.y + row][obj.x + col] !== 0) {\n return true;\n }\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "88f26a07952cc5c8b4fcd2313b519df1", "score": "0.58938086", "text": "outOfBounds() {\n let head = this.state.body[this.state.body.length -1];\n if (head[0] >= 100 || head[1] >= 100 || head[0] < 0 || head[1] < 0){\n this.onGameOver()\n }\n }", "title": "" }, { "docid": "f5c783389c6255ab252a2f69159a8e0b", "score": "0.5888855", "text": "static isInsideOfCanvas(gameObject){ // canvas rect starts at 0 and ends at canvas.size - 1\n\t\treturn (gameObject.x + gameObject.width) >= 0 && \n\t\t\t\tgameObject.x < Ramu.width &&\n\t\t\t\t(gameObject.y + gameObject.height) >= 0 &&\n\t\t\t\tgameObject.y < Ramu.height;\t \n\t}", "title": "" }, { "docid": "b14185c4a28e9e0a4af669501b46fc46", "score": "0.58836925", "text": "function n(e, t) {\n var i = e.bounds,\n s = t.bounds;\n return e.key.id !== t.key.id && e.key.world === t.key.world && i[0] <= s[0] && i[1] <= s[1] && i[2] >= s[2] && i[3] >= s[3];\n }", "title": "" }, { "docid": "7022b23fc2c89b8aa37c81ec269d00ff", "score": "0.5882778", "text": "function isPosOnRectangle() {\r\n normalizeRectangle();\r\n if (\r\n mousePointer.pos.x >= rectangle.left && mousePointer.pos.x <= rectangle.right\r\n && mousePointer.pos.y <= rectangle.bottom && mousePointer.pos.y >= rectangle.top\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "b8c237b4794eafb618706cffa856be35", "score": "0.58725977", "text": "checkCollisions() {\n if(this.row === player.getRow()) {\n let dist = player.getY() - this.y;\n if(dist > -60 && dist < 60) {\n this.collideWithPlayer();\n }\n }\n }", "title": "" }, { "docid": "5e55a70f277957a7ea676bd987f08016", "score": "0.5868324", "text": "function outOfBounds(cell) {\n const col = toNumber(cell[0]);\n const row = parseInt(cell.slice(1));\n if (col < 0 || col > 7) return true;\n if (row < 1 || row > 8) return true;\n return false;\n}", "title": "" }, { "docid": "8b0e98a5f4f01836f6ba8a562acf4ada", "score": "0.5867448", "text": "contains(x, y){\n return x > this.left && x <this.right && y > this.top && y <this.bottom;\n }", "title": "" }, { "docid": "7bc0aeed5f2efc2216d7eaac6627c23b", "score": "0.58645636", "text": "function objectCollision(playerNextPos, room)\r\n{\r\n\t//check for each object in the current room\r\n\tfor(var i = 0; i < room.objects.length; i++)\r\n\t{\r\n\t\t//if statement to skip items, since they don't have collision\r\n\t\tif(room.objects[i].layerCode != 2)\r\n\t\t{\r\n\t\t\t/* these for statements make sure to check for each tile the object\r\n\t\t\t * takes up, if it has a length and/or width greater than 1\r\n\t\t\t */\r\n\t\t\tfor(var length = 0; length < room.objects[i].length; length++)\r\n\t\t\t{\r\n\t\t\t\tfor(var height = 0; height < room.objects[i].height; height++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(playerNextPos[0] == room.objects[i].x ++ length &&\r\n\t\t\t\t\t\t\tplayerNextPos[1] == room.objects[i].y ++ width)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn false;\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}\t\r\n\treturn true;\r\n}", "title": "" }, { "docid": "84097a414b3a9238300a866eb621a5d9", "score": "0.5864162", "text": "_isNewPositionFree() {\n const nutrientSprite = this.sprite;\n const wormSprite = this.worm.sprite;\n const bodyParts = this.worm.body;\n\n // check to see if the new position is intersecting with a body part\n for (const part of bodyParts) {\n const partSprite = part.sprite;\n const positionOccupied = Util.Math.circlesIntersect(\n // first circle\n nutrientSprite.x, nutrientSprite.y, nutrientSprite.width / 2,\n // second circle\n partSprite.x, partSprite.y, partSprite.width / 2\n );\n\n if (positionOccupied) {\n return false;\n }\n }\n\n // check to see if the new position is intersecting with the worms head\n return !Util.Math.circlesIntersect(\n // first circle\n nutrientSprite.x, nutrientSprite.y, nutrientSprite.width / 2,\n // second circle\n wormSprite.x, wormSprite.y, wormSprite.width / 2\n );\n }", "title": "" }, { "docid": "419fb662d65033725632777392dd37b9", "score": "0.5859056", "text": "function inside_grid(x, y) {\n if (x < 0 || x >= row_size || y < 0 || y >= col_size) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "8d11eaa1f2ee468fa54f914d055394cc", "score": "0.5856829", "text": "collidesWith(o) {\n\n // Check quickly if it definitely does not intersect\n // if (Algebra.distance(this.center, o.geometry.start.toVector2D()) > MAX_SIZE / 2 + o.metadata.type.SEGMENT_WIDTH / 2 + o.metadata.type.LENGTH) {\n // return false;\n // }\n\n // TODO: this only checks if the planes are close. Use Axis Theorem.\n let p = Algebra.projectOnSegment(this.center, o.geometry.start.toVector2D(), o.geometry.end.toVector2D());\n return Algebra.distance(this.center, p) < MAX_SIZE / 2 + o.metadata.type.SEGMENT_WIDTH / 2;\n }", "title": "" }, { "docid": "38b25746831f7e47e2fd5fb59b8830fb", "score": "0.58549523", "text": "function checkAllBoundaries(size){\r\n let inAnyBoundary = false;\r\n for(let i = 0; i < positionArray.length; i++){ //checks all boundaries\r\n let boundary = {\r\n left: positionArray[i].x - size,\r\n right: positionArray[i].x + size,\r\n top: positionArray[i].y - size,\r\n bottom: positionArray[i].y + size\r\n }\r\n rect(boundary.left, boundary.top, size*2); //for testing purposes\r\n if(mouseX > boundary.left && mouseX < boundary.right && mouseY < boundary.bottom && mouseY > boundary.top){\r\n // console.log(\"you in da boundary foo\");\r\n inAnyBoundary = true;\r\n }\r\n }\r\n if(!inAnyBoundary){ //if not in bounds of any dot then clear the screen\r\n //console.log(\"not in bounds\");\r\n clear();\r\n }\r\n}", "title": "" }, { "docid": "fd1da4de4086581afdb7ec004324a856", "score": "0.5851833", "text": "checkBoundaries(){\n\t\tvar x = this.getX();\n\t\tvar y = this.getY();\n\t\tif ( x < 0){\n\t\t\tthis.createTail();\n\t\t\tthis.distanceSinceLastTurn = this.width*3;\n\t\t\tthis.moveTo( 100, y);\n\t\t}else if ( x > 100 ){\n\t\t\tthis.createTail();\n\t\t\tthis.distanceSinceLastTurn = this.width*3;\n\t\t\tthis.moveTo( 0, y);\n\t\t}else if ( y < 0){\n\t\t\tthis.createTail();\n\t\t\tthis.distanceSinceLastTurn = this.width*3;\n\t\t\tthis.moveTo( x, 100);\n\t\t}else if ( y > 100){\n\t\t\tthis.createTail();\n\t\t\tthis.distanceSinceLastTurn = this.width*3;\n\t\t\tthis.moveTo( x, 0);\n\t\t}\n\t}", "title": "" }, { "docid": "e4b12abcc76d829b87b03ae4264037dd", "score": "0.58497465", "text": "mouseIsOver() {\n return mouseX >= this.pos.x -this.w/2 && mouseX <= this.pos.x + this.w/2\n && mouseY >= this.pos.y -this.h/2 && mouseY <= this.pos.y + this.h/2;\n }", "title": "" }, { "docid": "a601b6a904deee40302ae663851d856f", "score": "0.58491844", "text": "insideBoard(point) {\n\t\treturn (\n\t\t\tpoint.x >= 0 && point.x < this.size && point.y >= 0 && point.y < this.size\n\t\t);\n\t}", "title": "" }, { "docid": "ac0a763586aee00e12f0a8db6fb7a95c", "score": "0.5841381", "text": "function hasCollided(object1, object2) {\n return !(\n ((object1.y + object1.height) < (object2.y)) ||\n (object1.y > (object2.y + object2.height)) ||\n ((object1.x + object1.width) < object2.x) ||\n (object1.x > (object2.x + object2.width))\n );\n }", "title": "" }, { "docid": "7dc57980317f7c5633c458b0f346603e", "score": "0.58402246", "text": "checkAround(cell) {\n let x = cell.x;\n let y = cell.y;\n let sz = this.size;\n\n if (x > 0) { // check left \n this.check(x - sz, y);\n if (y > 0)\n this.check(x - sz, y - sz);\n if (y < (this.height - 1) * sz)\n this.check(x - sz, y + sz);\n }\n if (x < (this.width - 1) * sz) { // check right\n this.check(x + sz, y);\n if (y > 0)\n this.check(x + sz, y - sz);\n if (y < (this.height - 1) * sz)\n this.check(x + sz, y + sz);\n }\n if (y > 0)\n this.check(x, y - sz);\n if (y < (this.height - 1) * sz)\n this.check(x, y + sz);\n }", "title": "" }, { "docid": "6e606009a635cb5818e331a0c5e9b3a3", "score": "0.58382046", "text": "function checkMovable(data) {\n for (let i = 0; i < data.length; i++) {\n for (let j = 0; j < data[0].length; j++) {\n if (i > 0 && data[i][j].value === data[i-1][j].value) {\n return true;\n }\n if (j > 0 && data[i][j].value === data[i][j-1].value) {\n return true;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "7e5cfc1dca97d69ca0b0b28279bd01b3", "score": "0.58325297", "text": "checkOutOfBound (x, y) {\n if (x < 0 || y < 0) return true;\n else if (x > (this.width - 1)) return true;\n else if (y > (this.height - 1)) return true;\n else return false;\n }", "title": "" }, { "docid": "987116dd0fe99631d362ac240a06811e", "score": "0.58314574", "text": "function check_boundaries()\n{\n\tfor (var i = 0; i < pArmy.pFootSoldiers.length; i++)\n\t{\n\t \tif (pArmy.pFootSoldiers[i].x >= 500)\n\t \t{\n\t \t\tpArmy.pFootSoldiers.splice(i, 1);\n\t \t\tmaterials += 5;\n\t \t}\n\t}\n\n\tfor (var e = 0; e < eArmy.eFootSoldiers.length; e++)\n\t{\n\t \tif (eArmy.eFootSoldiers[e].x <= 40)\n\t \t{\n\t \t\tpFortHealth -= 1;\n\t \t\teArmy.eFootSoldiers[e].fight = true;\n\t \t\tfort_damage.play();\n\t \t}\n\t}\n}", "title": "" } ]
b2e24adda4316605b1af30f52432ce4b
Connect or disconnect spans from a line.
[ { "docid": "7810658bc462b1529a0b09713127c64d", "score": "0.0", "text": "function detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n }", "title": "" } ]
[ { "docid": "387c8efd737d39f6a0a017b3b5780f3e", "score": "0.5986234", "text": "function switchLine() {\n gMeme.selectedLineIdx++\n if (gMeme.selectedLineIdx >= gMeme.lines.length) gMeme.selectedLineIdx = 0\n}", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "788b0d4348a48d231ad7602e34489842", "score": "0.5948326", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "cc01735798cde2381739cbe916925fcd", "score": "0.5943927", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n }", "title": "" }, { "docid": "d6076441e94e10deab866f0e13b6682d", "score": "0.5936889", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "dbc7168ac52cbf27a94921cb26dad96e", "score": "0.59336156", "text": "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "title": "" }, { "docid": "dbc7168ac52cbf27a94921cb26dad96e", "score": "0.59336156", "text": "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "title": "" }, { "docid": "dbc7168ac52cbf27a94921cb26dad96e", "score": "0.59336156", "text": "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line }\n return line\n}", "title": "" }, { "docid": "2b6ec14f21be26a0e721fdf74bd5b5e9", "score": "0.5930223", "text": "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "2b6ec14f21be26a0e721fdf74bd5b5e9", "score": "0.5930223", "text": "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "2b6ec14f21be26a0e721fdf74bd5b5e9", "score": "0.5930223", "text": "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "2b6ec14f21be26a0e721fdf74bd5b5e9", "score": "0.5930223", "text": "function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }", "title": "" }, { "docid": "40c0aa15624b06418073c205e6839c63", "score": "0.5928825", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n}", "title": "" }, { "docid": "40c0aa15624b06418073c205e6839c63", "score": "0.5928825", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n}", "title": "" }, { "docid": "40c0aa15624b06418073c205e6839c63", "score": "0.5928825", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n span.marker.attachLine(line)\n}", "title": "" }, { "docid": "466c3d1197e8f2c4eea9df5603581969", "score": "0.5913909", "text": "function addMarkedSpan(line, span) {\r\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\r\n span.marker.attachLine(line);\r\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "ef754918b21c900b852c8fd1ea8a09a7", "score": "0.5907481", "text": "function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n}", "title": "" }, { "docid": "f9685b87776e432762bd133637f9fea6", "score": "0.5904655", "text": "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t}", "title": "" }, { "docid": "f9685b87776e432762bd133637f9fea6", "score": "0.5904655", "text": "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t}", "title": "" }, { "docid": "9e50afb28c3d812f423fc18bf4668dfd", "score": "0.5900341", "text": "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "title": "" }, { "docid": "9e50afb28c3d812f423fc18bf4668dfd", "score": "0.5900341", "text": "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n\t span.marker.attachLine(line);\n\t }", "title": "" }, { "docid": "9d8376fe602526bf48d02dc0c1897b39", "score": "0.5891469", "text": "function addMarkedSpan(line, span) {\n\t line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]\n\t span.marker.attachLine(line)\n\t}", "title": "" }, { "docid": "e2de83c179fe55a6314a4a1878b5d27a", "score": "0.58760184", "text": "function visualLine(line) {\n var merged\n while (merged = collapsedSpanAtStart(line)) { line = merged.find(-1, true).line }\n return line\n }", "title": "" }, { "docid": "6f7e7b18f9f806af3c7924bc988208f7", "score": "0.58520234", "text": "function connectPoints(point1, point2, color, thickness, lineId) {\n\t\tvar htmlLine = getLinHtml(point1, point2, color, thickness, lineId);\n\n\t\t//Remove previous\n\t\t$('#' + lineId).remove();\n\n\t\t$(htmlLine).appendTo(\"body\");\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "9840e6afa05f28a2f7b147aad61a8ff8", "score": "0.5848662", "text": "line(x1, y1, x2, y2){\n this.next.line(x1, y1, x2, y2);\n }", "title": "" }, { "docid": "6f4d61e0ce9e5c76a65813dbc5922965", "score": "0.5833705", "text": "function drawLine() {\r\n for(var i = 0; i < links.length; ++i) {\r\n if(links[i].source.id != \"cell\")\r\n return;\r\n var id = links[i].source.id + \"_\" + links[i].target.id;\r\n svg.select(\"#\" + id).remove();\r\n svg.append(\"line\")\r\n .attr(\"class\", \"link\")\r\n .attr(\"x1\", 0)\r\n .attr(\"y2\", 0)\r\n .attr(\"x2\", links[i].target.y * Math.cos((links[i].target.x + 270) * Math.PI / 180))\r\n .attr(\"y2\", links[i].target.y * Math.sin((links[i].target.x + 270) * Math.PI / 180));\r\n }\r\n}", "title": "" }, { "docid": "0cf654133890747c94f6a65afa8bd6dc", "score": "0.5829904", "text": "function updateLine(line,text,markedSpans,estimateHeight){line.text=text;if(line.stateAfter){line.stateAfter=null;}if(line.styles){line.styles=null;}if(line.order!=null){line.order=null;}detachMarkedSpans(line);attachMarkedSpans(line,markedSpans);var estHeight=estimateHeight?estimateHeight(line):1;if(estHeight!=line.height){updateLineHeight(line,estHeight);}}// Detach a line from the document tree and its markers.", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "b23bf82701b8b324c0a847b68e60bd30", "score": "0.582191", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "a52a3ecc3f3ac29e14a57ee57f5b832b", "score": "0.5788244", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n}", "title": "" }, { "docid": "7312250089c391077e255c63843aa3f4", "score": "0.5786953", "text": "function visualLine(line) {\r\n var merged;\r\n while (merged = collapsedSpanAtStart(line))\r\n { line = merged.find(-1, true).line; }\r\n return line\r\n}", "title": "" }, { "docid": "c4bdf98b1c33dc99be36371c565bc0cb", "score": "0.57789385", "text": "function visualLine(line) {\n\t var merged\n\t while (merged = collapsedSpanAtStart(line))\n\t { line = merged.find(-1, true).line }\n\t return line\n\t}", "title": "" }, { "docid": "9e13a23a4b07a967950becdf9b335688", "score": "0.5765855", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n {\n line = merged.find(-1, true).line;\n }\n return line\n }", "title": "" }, { "docid": "b85f85125013d8ed6151eb3a4bc61978", "score": "0.5746642", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line)) {\n line = merged.find(-1, true).line;\n }\n return line;\n }", "title": "" }, { "docid": "9c29b0b9dd58448f0d1cd04cff3096c5", "score": "0.57402104", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "title": "" }, { "docid": "9c29b0b9dd58448f0d1cd04cff3096c5", "score": "0.57402104", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "title": "" }, { "docid": "9c29b0b9dd58448f0d1cd04cff3096c5", "score": "0.57402104", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "title": "" }, { "docid": "9c29b0b9dd58448f0d1cd04cff3096c5", "score": "0.57402104", "text": "function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }", "title": "" } ]
e630fc398db917744d5f6bcf8975131b
Implements the instructions for completeValue as defined in the "Field entries" section of the spec. If the field type is NonNull, then this recursively completes the value for the inner type. It throws a field error if that completion returns null, as per the "Nullability" section of the spec. If the field type is a List, then this recursively completes the value for the inner type on each item in the list. If the field type is a Scalar or Enum, ensures the completed value is a legal value of the type by calling the `serialize` method of GraphQL type definition. If the field is an abstract type, determine the runtime type of the value and then complete based on that type Otherwise, the field type expects a subselection set, and will complete the value by evaluating all subselections.
[ { "docid": "2eb278479d87fa989b04d14c1a4d6b8a", "score": "0.81904125", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_15__[\"isNonNullType\"])(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null-ish (null, undefined, or NaN) then return null.\n\n\n if (Object(_jsutils_isNullish__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(result)) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_15__[\"isListType\"])(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_15__[\"isLeafType\"])(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_15__[\"isAbstractType\"])(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_15__[\"isObjectType\"])(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // Not reachable. All possible output types have been considered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Cannot complete value of unexpected type \\\"\".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(returnType), \"\\\".\"));\n}", "title": "" } ]
[ { "docid": "daa62235d09b0e6d8773d67ab07285b9", "score": "0.83059597", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_17__[\"isNonNullType\"])(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null or undefined then return null.\n\n\n if (result == null) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_17__[\"isListType\"])(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_17__[\"isLeafType\"])(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_17__[\"isAbstractType\"])(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_17__[\"isObjectType\"])(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // istanbul ignore next (Not reachable. All possible output types have been considered)\n\n\n false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0, 'Cannot complete value of unexpected output type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(returnType));\n}", "title": "" }, { "docid": "1fe78dec5e50b9818bb1b16b332f601f", "score": "0.81805164", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if ((0, _definition.isNonNullType)(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null or undefined then return null.\n\n\n if (result == null) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if ((0, _definition.isListType)(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if ((0, _definition.isObjectType)(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // istanbul ignore next (Not reachable. All possible output types have been considered)\n\n\n false || (0, _invariant.default)(0, 'Cannot complete value of unexpected output type: ' + (0, _inspect.default)(returnType));\n}", "title": "" }, { "docid": "2c81bc3041907cc4675b7860d6a44def", "score": "0.817288", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_18__[\"isNonNullType\"])(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null-ish (null, undefined, or NaN) then return null.\n\n\n if (Object(_jsutils_isNullish__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(result)) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_18__[\"isListType\"])(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_18__[\"isLeafType\"])(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_18__[\"isAbstractType\"])(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n\n\n /* istanbul ignore else */\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_18__[\"isObjectType\"])(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // Not reachable. All possible output types have been considered.\n\n\n /* istanbul ignore next */\n Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(false, 'Cannot complete value of unexpected output type: ' + Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(returnType));\n}", "title": "" }, { "docid": "fc82bbd933db98d256558c7ca5c469df", "score": "0.8160183", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_14__[\"isNonNullType\"])(returnType)) {\n const completed = completeValue(\n exeContext,\n returnType.ofType,\n fieldNodes,\n info,\n path,\n result,\n );\n\n if (completed === null) {\n throw new Error(\n `Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`,\n );\n }\n\n return completed;\n } // If result value is null or undefined then return null.\n\n if (result == null) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_14__[\"isListType\"])(returnType)) {\n return completeListValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_14__[\"isLeafType\"])(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_14__[\"isAbstractType\"])(returnType)) {\n return completeAbstractValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n } // If field type is Object, execute and complete all sub-selections.\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_14__[\"isObjectType\"])(returnType)) {\n return completeObjectValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n }\n /* c8 ignore next 6 */\n // Not reachable, all possible output types have been considered.\n\n false ||\n Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__[\"invariant\"])(\n false,\n 'Cannot complete value of unexpected output type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[\"inspect\"])(returnType),\n );\n}", "title": "" }, { "docid": "ffd89019daa03c07049658c2b51e2513", "score": "0.81549", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if ((0, _definition.isNonNullType)(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null-ish (null, undefined, or NaN) then return null.\n\n\n if ((0, _isNullish.default)(result)) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if ((0, _definition.isListType)(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n\n\n if ((0, _definition.isObjectType)(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // Not reachable. All possible output types have been considered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Cannot complete value of unexpected type \\\"\".concat((0, _inspect.default)(returnType), \"\\\".\"));\n}", "title": "" }, { "docid": "af6976526bff4b74864fd6d7a0fcfa87", "score": "0.81232303", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if (Object(type_definition[\"L\" /* isNonNullType */])(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null-ish (null, undefined, or NaN) then return null.\n\n\n if (Object(isNullish[\"a\" /* default */])(result)) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if (Object(type_definition[\"J\" /* isListType */])(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if (Object(type_definition[\"I\" /* isLeafType */])(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if (Object(type_definition[\"C\" /* isAbstractType */])(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n\n\n /* istanbul ignore else */\n if (Object(type_definition[\"N\" /* isObjectType */])(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // Not reachable. All possible output types have been considered.\n\n\n /* istanbul ignore next */\n Object(invariant[\"a\" /* default */])(false, 'Cannot complete value of unexpected output type: ' + Object(inspect[\"a\" /* default */])(returnType));\n}", "title": "" }, { "docid": "dbdc67f14d095954fbdab3a26cbf413b", "score": "0.81128556", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is a Promise, apply-lift over completeValue.\n if ((0, _isPromise2.default)(result)) {\n return result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n }\n\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n }\n\n // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n if ((0, _definition.isNonNullType)(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n if (completed === null) {\n throw new Error('Cannot return null for non-nullable field ' + info.parentType.name + '.' + info.fieldName + '.');\n }\n return completed;\n }\n\n // If result value is null-ish (null, undefined, or NaN) then return null.\n if ((0, _isNullish2.default)(result)) {\n return null;\n }\n\n // If field type is List, complete each item in the list with the inner type\n if ((0, _definition.isListType)(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n }\n\n // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is Object, execute and complete all sub-selections.\n if ((0, _definition.isObjectType)(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Not reachable. All possible output types have been considered.\n /* istanbul ignore next */\n throw new Error('Cannot complete value of unexpected type \"' + String(returnType) + '\".');\n}", "title": "" }, { "docid": "8eb86d4c2d6a7f7154682998cc5b1c1d", "score": "0.80747604", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is a Promise, apply-lift over completeValue.\n var promise = getPromise(result);\n if (promise) {\n return promise.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n }\n\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n }\n\n // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n if (returnType instanceof _definition.GraphQLNonNull) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n if (completed === null) {\n throw new Error('Cannot return null for non-nullable field ' + info.parentType.name + '.' + info.fieldName + '.');\n }\n return completed;\n }\n\n // If result value is null-ish (null, undefined, or NaN) then return null.\n if ((0, _isNullish2.default)(result)) {\n return null;\n }\n\n // If field type is List, complete each item in the list with the inner type\n if (returnType instanceof _definition.GraphQLList) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n }\n\n // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is Object, execute and complete all sub-selections.\n if (returnType instanceof _definition.GraphQLObjectType) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Not reachable. All possible output types have been considered.\n throw new Error('Cannot complete value of unexpected type \"' + String(returnType) + '\".');\n}", "title": "" }, { "docid": "8eb86d4c2d6a7f7154682998cc5b1c1d", "score": "0.80747604", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is a Promise, apply-lift over completeValue.\n var promise = getPromise(result);\n if (promise) {\n return promise.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n }\n\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n }\n\n // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n if (returnType instanceof _definition.GraphQLNonNull) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n if (completed === null) {\n throw new Error('Cannot return null for non-nullable field ' + info.parentType.name + '.' + info.fieldName + '.');\n }\n return completed;\n }\n\n // If result value is null-ish (null, undefined, or NaN) then return null.\n if ((0, _isNullish2.default)(result)) {\n return null;\n }\n\n // If field type is List, complete each item in the list with the inner type\n if (returnType instanceof _definition.GraphQLList) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n }\n\n // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is Object, execute and complete all sub-selections.\n if (returnType instanceof _definition.GraphQLObjectType) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Not reachable. All possible output types have been considered.\n throw new Error('Cannot complete value of unexpected type \"' + String(returnType) + '\".');\n}", "title": "" }, { "docid": "6cfecbdfa68001f03c62b68d6a42ee2f", "score": "0.80693775", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is a Promise, apply-lift over completeValue.\n if (isThenable(result)) {\n return result.then(function(resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n }\n\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n }\n\n // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n if (returnType instanceof _definition.GraphQLNonNull) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n if (completed === null) {\n throw new Error('Cannot return null for non-nullable field ' + info.parentType.name + '.' + info.fieldName + '.');\n }\n return completed;\n }\n\n // If result value is null-ish (null, undefined, or NaN) then return null.\n if ((0, _isNullish2.default)(result)) {\n return null;\n }\n\n // If field type is List, complete each item in the list with the inner type\n if (returnType instanceof _definition.GraphQLList) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n if (returnType instanceof _definition.GraphQLScalarType || returnType instanceof _definition.GraphQLEnumType) {\n return completeLeafValue(returnType, result);\n }\n\n // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n if (returnType instanceof _definition.GraphQLInterfaceType || returnType instanceof _definition.GraphQLUnionType) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is Object, execute and complete all sub-selections.\n if (returnType instanceof _definition.GraphQLObjectType) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Not reachable. All possible output types have been considered.\n throw new Error('Cannot complete value of unexpected type \"' + String(returnType) + '\".');\n }", "title": "" }, { "docid": "913d08c7b1691d94fed67a4eecd4eff8", "score": "0.8051499", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if ((0, _definition.isNonNullType)(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null-ish (null, undefined, or NaN) then return null.\n\n\n if ((0, _isNullish.default)(result)) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if ((0, _definition.isListType)(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n\n\n /* istanbul ignore else */\n if ((0, _definition.isObjectType)(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // Not reachable. All possible output types have been considered.\n\n\n /* istanbul ignore next */\n (0, _invariant.default)(false, 'Cannot complete value of unexpected output type: ' + (0, _inspect.default)(returnType));\n}", "title": "" }, { "docid": "913d08c7b1691d94fed67a4eecd4eff8", "score": "0.8051499", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if ((0, _definition.isNonNullType)(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null-ish (null, undefined, or NaN) then return null.\n\n\n if ((0, _isNullish.default)(result)) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if ((0, _definition.isListType)(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n\n\n /* istanbul ignore else */\n if ((0, _definition.isObjectType)(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // Not reachable. All possible output types have been considered.\n\n\n /* istanbul ignore next */\n (0, _invariant.default)(false, 'Cannot complete value of unexpected output type: ' + (0, _inspect.default)(returnType));\n}", "title": "" }, { "docid": "1c01bf347fd39e4c2a25e98d07290df5", "score": "0.79955006", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is a Promise, apply-lift over completeValue.\n if (isThenable(result)) {\n return result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n }\n\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n }\n\n // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n if (returnType instanceof _definition.GraphQLNonNull) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n if (completed === null) {\n throw new Error('Cannot return null for non-nullable field ' + info.parentType.name + '.' + info.fieldName + '.');\n }\n return completed;\n }\n\n // If result value is null-ish (null, undefined, or NaN) then return null.\n if ((0, _isNullish2.default)(result)) {\n return null;\n }\n\n // If field type is List, complete each item in the list with the inner type\n if (returnType instanceof _definition.GraphQLList) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n if (returnType instanceof _definition.GraphQLScalarType || returnType instanceof _definition.GraphQLEnumType) {\n return completeLeafValue(returnType, result);\n }\n\n // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n if (returnType instanceof _definition.GraphQLInterfaceType || returnType instanceof _definition.GraphQLUnionType) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is Object, execute and complete all sub-selections.\n if (returnType instanceof _definition.GraphQLObjectType) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Not reachable. All possible output types have been considered.\n throw new Error('Cannot complete value of unexpected type \"' + String(returnType) + '\".');\n}", "title": "" }, { "docid": "6ad3e105bce791518277035d19d29ee0", "score": "0.7910945", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is a Promise, apply-lift over completeValue.\n var promise = Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_getPromise__[\"a\" /* default */])(result);\n if (promise) {\n return promise.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n }\n\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n }\n\n // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n if (Object(__WEBPACK_IMPORTED_MODULE_12__type_definition__[\"I\" /* isNonNullType */])(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n if (completed === null) {\n throw new Error('Cannot return null for non-nullable field ' + info.parentType.name + '.' + info.fieldName + '.');\n }\n return completed;\n }\n\n // If result value is null-ish (null, undefined, or NaN) then return null.\n if (Object(__WEBPACK_IMPORTED_MODULE_5__jsutils_isNullish__[\"a\" /* default */])(result)) {\n return null;\n }\n\n // If field type is List, complete each item in the list with the inner type\n if (Object(__WEBPACK_IMPORTED_MODULE_12__type_definition__[\"G\" /* isListType */])(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n if (Object(__WEBPACK_IMPORTED_MODULE_12__type_definition__[\"F\" /* isLeafType */])(returnType)) {\n return completeLeafValue(returnType, result);\n }\n\n // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n if (Object(__WEBPACK_IMPORTED_MODULE_12__type_definition__[\"z\" /* isAbstractType */])(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is Object, execute and complete all sub-selections.\n if (Object(__WEBPACK_IMPORTED_MODULE_12__type_definition__[\"K\" /* isObjectType */])(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Not reachable. All possible output types have been considered.\n /* istanbul ignore next */\n throw new Error('Cannot complete value of unexpected type \"' + String(returnType) + '\".');\n}", "title": "" }, { "docid": "f1828eb3f8471820e145ada105bdd1c2", "score": "0.7899322", "text": "function completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is a Promise, apply-lift over completeValue.\n var promise = getPromise(result);\n if (promise) {\n return promise.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n }\n\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n }\n\n // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n if (Object(__WEBPACK_IMPORTED_MODULE_8__type_definition__[\"I\" /* isNonNullType */])(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n if (completed === null) {\n throw new Error('Cannot return null for non-nullable field ' + info.parentType.name + '.' + info.fieldName + '.');\n }\n return completed;\n }\n\n // If result value is null-ish (null, undefined, or NaN) then return null.\n if (Object(__WEBPACK_IMPORTED_MODULE_4__jsutils_isNullish__[\"a\" /* default */])(result)) {\n return null;\n }\n\n // If field type is List, complete each item in the list with the inner type\n if (Object(__WEBPACK_IMPORTED_MODULE_8__type_definition__[\"G\" /* isListType */])(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n if (Object(__WEBPACK_IMPORTED_MODULE_8__type_definition__[\"F\" /* isLeafType */])(returnType)) {\n return completeLeafValue(returnType, result);\n }\n\n // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n if (Object(__WEBPACK_IMPORTED_MODULE_8__type_definition__[\"z\" /* isAbstractType */])(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // If field type is Object, execute and complete all sub-selections.\n if (Object(__WEBPACK_IMPORTED_MODULE_8__type_definition__[\"K\" /* isObjectType */])(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Not reachable. All possible output types have been considered.\n /* istanbul ignore next */\n throw new Error('Cannot complete value of unexpected type \"' + String(returnType) + '\".');\n}", "title": "" }, { "docid": "ad42e621612de354487711296288c691", "score": "0.67746365", "text": "function completeObjectValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n // Collect sub-fields to execute to complete this value.\n const subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n\n if (returnType.isTypeOf) {\n const isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isPromise\"])(isTypeOf)) {\n return isTypeOf.then((resolvedIsTypeOf) => {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return executeFields(\n exeContext,\n returnType,\n result,\n path,\n subFieldNodes,\n );\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return executeFields(exeContext, returnType, result, path, subFieldNodes);\n}", "title": "" }, { "docid": "c5f9980a8a0617d2c3f715500d8aa323", "score": "0.6750421", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "c5f9980a8a0617d2c3f715500d8aa323", "score": "0.6750421", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "dd28050e9b19b4560cadb24d1a92e460", "score": "0.6731197", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (Object(isPromise[\"a\" /* default */])(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "b38ac9da8104c93008b27617a37fb7db", "score": "0.672071", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "11292d78960346b7c8a693c2edc2304d", "score": "0.6716557", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n var promise = Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_getPromise__[\"a\" /* default */])(isTypeOf);\n if (promise) {\n return promise.then(function (isTypeOfResult) {\n if (!isTypeOfResult) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "1508b63aa174bc8dfda616199e65c287", "score": "0.67152494", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if ((0, _isPromise.default)(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "1508b63aa174bc8dfda616199e65c287", "score": "0.67152494", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if ((0, _isPromise.default)(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "1508b63aa174bc8dfda616199e65c287", "score": "0.67152494", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if ((0, _isPromise.default)(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "1508b63aa174bc8dfda616199e65c287", "score": "0.67152494", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if ((0, _isPromise.default)(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}", "title": "" }, { "docid": "165440e132a9cedc469a1ae0449ca17c", "score": "0.67136025", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n var promise = getPromise(isTypeOf);\n if (promise) {\n return promise.then(function (isTypeOfResult) {\n if (!isTypeOfResult) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "165440e132a9cedc469a1ae0449ca17c", "score": "0.67136025", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n var promise = getPromise(isTypeOf);\n if (promise) {\n return promise.then(function (isTypeOfResult) {\n if (!isTypeOfResult) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "165440e132a9cedc469a1ae0449ca17c", "score": "0.67136025", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n var promise = getPromise(isTypeOf);\n if (promise) {\n return promise.then(function (isTypeOfResult) {\n if (!isTypeOfResult) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "b93753f5c3b6fd8db1fe87162549ed25", "score": "0.668443", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if ((0, _isPromise2.default)(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "a567db560d66c14efe799e879b32c968", "score": "0.66822475", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (isThenable(isTypeOf)) {\n return isTypeOf.then(function(isTypeOfResult) {\n if (!isTypeOfResult) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n }", "title": "" }, { "docid": "14675e0eee75cf84d259441431f4c91f", "score": "0.6567667", "text": "function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (isThenable(isTypeOf)) {\n return isTypeOf.then(function (isTypeOfResult) {\n if (!isTypeOfResult) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "32bd59f5ff867144d05635f1994b0b35", "score": "0.6399524", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "1bb59e19aa36d1dd2a7f56714db78685", "score": "0.63984984", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n var promise = getPromise(runtimeType);\n if (promise) {\n return promise.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "1bb59e19aa36d1dd2a7f56714db78685", "score": "0.63984984", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n var promise = getPromise(runtimeType);\n if (promise) {\n return promise.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "1bb59e19aa36d1dd2a7f56714db78685", "score": "0.63984984", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n var promise = getPromise(runtimeType);\n if (promise) {\n return promise.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "1620034cc074691b0207c1fdc8a96a7f", "score": "0.63777846", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var resolveTypeFn = returnType.resolveType || exeContext.typeResolver;\n var contextValue = exeContext.contextValue;\n var runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "4141578b8deaad3e04c52b3de858601c", "score": "0.63757485", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n if ((0, _isPromise.default)(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "a2dfcf98630b87f480fa3bb3aab483f8", "score": "0.6370343", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n if ((0, _isPromise2.default)(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "3a0187a69230536e3bdecdb6bb1a96eb", "score": "0.6353252", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n var promise = Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_getPromise__[\"a\" /* default */])(runtimeType);\n if (promise) {\n return promise.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "bfa6179b2d6330ea7646fd0ec6f4f7ea", "score": "0.6352965", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var resolveTypeFn = returnType.resolveType || exeContext.typeResolver;\n var contextValue = exeContext.contextValue;\n var runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if ((0, _isPromise.default)(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "bfa6179b2d6330ea7646fd0ec6f4f7ea", "score": "0.6352965", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var resolveTypeFn = returnType.resolveType || exeContext.typeResolver;\n var contextValue = exeContext.contextValue;\n var runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if ((0, _isPromise.default)(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "67586c19b594a063774fb273f28b9a04", "score": "0.6325368", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var resolveTypeFn = returnType.resolveType || exeContext.typeResolver;\n var contextValue = exeContext.contextValue;\n var runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if (Object(isPromise[\"a\" /* default */])(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "fdac49d9d1e09345e7c606f79997651a", "score": "0.63051796", "text": "function completeAbstractValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n var _returnType$resolveTy;\n\n const resolveTypeFn =\n (_returnType$resolveTy = returnType.resolveType) !== null &&\n _returnType$resolveTy !== void 0\n ? _returnType$resolveTy\n : exeContext.typeResolver;\n const contextValue = exeContext.contextValue;\n const runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isPromise\"])(runtimeType)) {\n return runtimeType.then((resolvedRuntimeType) =>\n completeObjectValue(\n exeContext,\n ensureValidRuntimeType(\n resolvedRuntimeType,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n ),\n fieldNodes,\n info,\n path,\n result,\n ),\n );\n }\n\n return completeObjectValue(\n exeContext,\n ensureValidRuntimeType(\n runtimeType,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n ),\n fieldNodes,\n info,\n path,\n result,\n );\n}", "title": "" }, { "docid": "ad130fc81ca62c5c812ac94b48438c41", "score": "0.62798446", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var _returnType$resolveTy;\n\n var resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver;\n var contextValue = exeContext.contextValue;\n var runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if ((0, _isPromise.default)(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "d2256e3b26879f34f30ede454496c069", "score": "0.6268642", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (returnType instanceof _definition.GraphQLNonNull) {\n return completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n try {\n var completed = completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n var promise = getPromise(completed);\n if (promise) {\n // If `completeValueWithLocatedError` returned a rejected promise, log\n // the rejection error and resolve to null.\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return promise.then(undefined, function (error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n return completed;\n } catch (error) {\n // If `completeValueWithLocatedError` returned abruptly (threw an error),\n // log the error and return null.\n exeContext.errors.push(error);\n return null;\n }\n}", "title": "" }, { "docid": "d2256e3b26879f34f30ede454496c069", "score": "0.6268642", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (returnType instanceof _definition.GraphQLNonNull) {\n return completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n try {\n var completed = completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n var promise = getPromise(completed);\n if (promise) {\n // If `completeValueWithLocatedError` returned a rejected promise, log\n // the rejection error and resolve to null.\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return promise.then(undefined, function (error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n return completed;\n } catch (error) {\n // If `completeValueWithLocatedError` returned abruptly (threw an error),\n // log the error and return null.\n exeContext.errors.push(error);\n return null;\n }\n}", "title": "" }, { "docid": "aca303b69751bfe756199a5ee8acf526", "score": "0.62324524", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var _returnType$resolveTy;\n\n var resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver;\n var contextValue = exeContext.contextValue;\n var runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "527676125c81aaf53e527a0aac398eb5", "score": "0.6174921", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n if (isThenable(runtimeType)) {\n // Cast to Promise\n var runtimeTypePromise = runtimeType;\n return runtimeTypePromise.then(function(resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n }", "title": "" }, { "docid": "35a6248bfa1033bde2b627c397c93a49", "score": "0.61695695", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n try {\n var completed;\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "35a6248bfa1033bde2b627c397c93a49", "score": "0.61695695", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n try {\n var completed;\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if (Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "46db591a8592368ea592cbb203de8389", "score": "0.61427844", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (returnType instanceof _definition.GraphQLNonNull) {\n return completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n try {\n var completed = completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n if (isThenable(completed)) {\n // If `completeValueWithLocatedError` returned a rejected promise, log\n // the rejection error and resolve to null.\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n return completed;\n } catch (error) {\n // If `completeValueWithLocatedError` returned abruptly (threw an error),\n // log the error and return null.\n exeContext.errors.push(error);\n return null;\n }\n}", "title": "" }, { "docid": "b585a4012cf1b02b85c47858095f8ffe", "score": "0.61413777", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (returnType instanceof _definition.GraphQLNonNull) {\n return completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n try {\n var completed = completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n if (isThenable(completed)) {\n // If `completeValueWithLocatedError` returned a rejected promise, log\n // the rejection error and resolve to null.\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function(error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n return completed;\n } catch (error) {\n // If `completeValueWithLocatedError` returned abruptly (threw an error),\n // log the error and return null.\n exeContext.errors.push(error);\n return null;\n }\n }", "title": "" }, { "docid": "a6474d6f3094680489d0c78e46c98a60", "score": "0.61404824", "text": "function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var runtimeType = returnType.resolveType ? returnType.resolveType(result, exeContext.contextValue, info) : defaultResolveTypeFn(result, exeContext.contextValue, info, returnType);\n\n if (isThenable(runtimeType)) {\n // Cast to Promise\n var runtimeTypePromise = runtimeType;\n return runtimeTypePromise.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}", "title": "" }, { "docid": "f1c9305db58f56028c2d2a38325dcd55", "score": "0.6111319", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = (0, _safeArrayFrom.default)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var itemPath = (0, _Path.addPath)(path, index, undefined);\n\n try {\n var completedItem;\n\n if ((0, _isPromise.default)(item)) {\n completedItem = item.then(function (resolved) {\n return completeValue(exeContext, itemType, fieldNodes, info, itemPath, resolved);\n });\n } else {\n completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item);\n }\n\n if ((0, _isPromise.default)(completedItem)) {\n containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n\n return completedItem.then(undefined, function (rawError) {\n var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath));\n return handleFieldError(error, itemType, exeContext);\n });\n }\n\n return completedItem;\n } catch (rawError) {\n var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(itemPath));\n return handleFieldError(error, itemType, exeContext);\n }\n });\n\n if (completedResults == null) {\n throw new _GraphQLError.GraphQLError(\"Expected Iterable, but did not find one for field \\\"\".concat(info.parentType.name, \".\").concat(info.fieldName, \"\\\".\"));\n }\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "e2adab44214e14832d73cd9de914b09e", "score": "0.6102351", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n try {\n var completed;\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "6f4099d54eefc10c4550d78dda905a91", "score": "0.60525936", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if ((0, _definition.isNonNullType)(returnType)) {\n return completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n try {\n var completed = completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n if ((0, _isPromise2.default)(completed)) {\n // If `completeValueWithLocatedError` returned a rejected promise, log\n // the rejection error and resolve to null.\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n return completed;\n } catch (error) {\n // If `completeValueWithLocatedError` returned abruptly (threw an error),\n // log the error and return null.\n exeContext.errors.push(error);\n return null;\n }\n}", "title": "" }, { "docid": "cd9eef7c3d03c90a72ee2abab80f0c1b", "score": "0.6014519", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n try {\n var completed;\n\n if ((0, _isPromise.default)(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if ((0, _isPromise.default)(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "cd9eef7c3d03c90a72ee2abab80f0c1b", "score": "0.6014519", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n try {\n var completed;\n\n if ((0, _isPromise.default)(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if ((0, _isPromise.default)(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "cd9eef7c3d03c90a72ee2abab80f0c1b", "score": "0.6014519", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n try {\n var completed;\n\n if ((0, _isPromise.default)(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if ((0, _isPromise.default)(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "b43d1eadf159392a0de57c95ee831b21", "score": "0.601351", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (Object(__WEBPACK_IMPORTED_MODULE_12__type_definition__[\"I\" /* isNonNullType */])(returnType)) {\n return completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n try {\n var completed = completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n var promise = Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_getPromise__[\"a\" /* default */])(completed);\n if (promise) {\n // If `completeValueWithLocatedError` returned a rejected promise, log\n // the rejection error and resolve to null.\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return promise.then(undefined, function (error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n return completed;\n } catch (error) {\n // If `completeValueWithLocatedError` returned abruptly (threw an error),\n // log the error and return null.\n exeContext.errors.push(error);\n return null;\n }\n}", "title": "" }, { "docid": "07c48bbcefa9412427f67dbf01b8657b", "score": "0.6006832", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (Object(__WEBPACK_IMPORTED_MODULE_8__type_definition__[\"I\" /* isNonNullType */])(returnType)) {\n return completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n try {\n var completed = completeValueWithLocatedError(exeContext, returnType, fieldNodes, info, path, result);\n var promise = getPromise(completed);\n if (promise) {\n // If `completeValueWithLocatedError` returned a rejected promise, log\n // the rejection error and resolve to null.\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return promise.then(undefined, function (error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n return completed;\n } catch (error) {\n // If `completeValueWithLocatedError` returned abruptly (threw an error),\n // log the error and return null.\n exeContext.errors.push(error);\n return null;\n }\n}", "title": "" }, { "docid": "66ee1c2b2cd20d5c07091dd545bcfe15", "score": "0.60008633", "text": "function completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result) {\n try {\n var completed;\n\n if (Object(isPromise[\"a\" /* default */])(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if (Object(isPromise[\"a\" /* default */])(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (error) {\n return handleFieldError(error, fieldNodes, path, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "dc90fb9863373b3ac9fc09d387da727c", "score": "0.585918", "text": "function completeListValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n if (!Object(_jsutils_isIterableObject_mjs__WEBPACK_IMPORTED_MODULE_3__[\"isIterableObject\"])(result)) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_10__[\"GraphQLError\"](\n `Expected Iterable, but did not find one for field \"${info.parentType.name}.${info.fieldName}\".`,\n );\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n const itemType = returnType.ofType;\n let containsPromise = false;\n const completedResults = Array.from(result, (item, index) => {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n const itemPath = Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_7__[\"addPath\"])(path, index, undefined);\n\n try {\n let completedItem;\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isPromise\"])(item)) {\n completedItem = item.then((resolved) =>\n completeValue(\n exeContext,\n itemType,\n fieldNodes,\n info,\n itemPath,\n resolved,\n ),\n );\n } else {\n completedItem = completeValue(\n exeContext,\n itemType,\n fieldNodes,\n info,\n itemPath,\n item,\n );\n }\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isPromise\"])(completedItem)) {\n containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n\n return completedItem.then(undefined, (rawError) => {\n const error = Object(_error_locatedError_mjs__WEBPACK_IMPORTED_MODULE_11__[\"locatedError\"])(\n rawError,\n fieldNodes,\n Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_7__[\"pathToArray\"])(itemPath),\n );\n return handleFieldError(error, itemType, exeContext);\n });\n }\n\n return completedItem;\n } catch (rawError) {\n const error = Object(_error_locatedError_mjs__WEBPACK_IMPORTED_MODULE_11__[\"locatedError\"])(rawError, fieldNodes, Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_7__[\"pathToArray\"])(itemPath));\n return handleFieldError(error, itemType, exeContext);\n }\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "8ba87dd1f8ac64230c67c60d8096bded", "score": "0.5855369", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n if (!Object(iterall__WEBPACK_IMPORTED_MODULE_0__[\"isCollection\"])(result)) {\n throw new _error_GraphQLError__WEBPACK_IMPORTED_MODULE_12__[\"GraphQLError\"](\"Expected Iterable, but did not find one for field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n Object(iterall__WEBPACK_IMPORTED_MODULE_0__[\"forEach\"])(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = Object(_jsutils_Path__WEBPACK_IMPORTED_MODULE_11__[\"addPath\"])(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(completedItem)) {\n containsPromise = true;\n }\n\n completedResults.push(completedItem);\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "e3ea9aa693903f99834b5a313aee4152", "score": "0.5804293", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n if (!(0, _iterall.isCollection)(result)) {\n throw new _GraphQLError.GraphQLError(\"Expected Iterable, but did not find one for field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = (0, _Path.addPath)(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && (0, _isPromise.default)(completedItem)) {\n containsPromise = true;\n }\n\n completedResults.push(completedItem);\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "e3ea9aa693903f99834b5a313aee4152", "score": "0.5804293", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n if (!(0, _iterall.isCollection)(result)) {\n throw new _GraphQLError.GraphQLError(\"Expected Iterable, but did not find one for field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = (0, _Path.addPath)(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && (0, _isPromise.default)(completedItem)) {\n containsPromise = true;\n }\n\n completedResults.push(completedItem);\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "e2382edfbcd2bb38de7a637a84559f68", "score": "0.580328", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n if (!Object(iterall[\"e\" /* isCollection */])(result)) {\n throw new GraphQLError[\"a\" /* GraphQLError */](\"Expected Iterable, but did not find one for field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n Object(iterall[\"b\" /* forEach */])(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = Object(Path[\"a\" /* addPath */])(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && Object(isPromise[\"a\" /* default */])(completedItem)) {\n containsPromise = true;\n }\n\n completedResults.push(completedItem);\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "163b0205738a750dbb43e4c5201949a3", "score": "0.5764671", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n !Object(__WEBPACK_IMPORTED_MODULE_0_iterall__[\"isCollection\"])(result) ? Object(__WEBPACK_IMPORTED_MODULE_3__jsutils_invariant__[\"a\" /* default */])(0, 'Expected Iterable, but did not find one for field ' + info.parentType.name + '.' + info.fieldName + '.') : void 0;\n\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n Object(__WEBPACK_IMPORTED_MODULE_0_iterall__[\"forEach\"])(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_getPromise__[\"a\" /* default */])(completedItem)) {\n containsPromise = true;\n }\n completedResults.push(completedItem);\n });\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "baa70c05bc8ed87354900c55b9f267e6", "score": "0.57552636", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n !(0, _iterall.isCollection)(result) ? (0, _invariant2.default)(0, 'Expected Iterable, but did not find one for field ' + info.parentType.name + '.' + info.fieldName + '.') : void 0;\n\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && (0, _isPromise2.default)(completedItem)) {\n containsPromise = true;\n }\n completedResults.push(completedItem);\n });\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "4a742c1c6442862eb7b0b2e11421566f", "score": "0.5738115", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n !(0, _iterall.isCollection)(result) ? (0, _invariant2.default)(0, 'Expected Iterable, but did not find one for field ' + info.parentType.name + '.' + info.fieldName + '.') : void 0;\n\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && getPromise(completedItem)) {\n containsPromise = true;\n }\n completedResults.push(completedItem);\n });\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "e8fb2ba3009adc76b1ca9bce49dffe96", "score": "0.571781", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n if (!Object(_jsutils_isCollection_mjs__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(result)) {\n throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_11__[\"GraphQLError\"](\"Expected Iterable, but did not find one for field \\\"\".concat(info.parentType.name, \".\").concat(info.fieldName, \"\\\".\"));\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = Object(_polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_10__[\"addPath\"])(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(completedItem)) {\n containsPromise = true;\n }\n\n return completedItem;\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "61395141cdcbd3eb6030c63afbe2cdf7", "score": "0.57029873", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n !Object(__WEBPACK_IMPORTED_MODULE_0_iterall__[\"isCollection\"])(result) ? Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_invariant__[\"a\" /* default */])(0, 'Expected Iterable, but did not find one for field ' + info.parentType.name + '.' + info.fieldName + '.') : void 0;\n\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n Object(__WEBPACK_IMPORTED_MODULE_0_iterall__[\"forEach\"])(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && getPromise(completedItem)) {\n containsPromise = true;\n }\n completedResults.push(completedItem);\n });\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "1eceb85109a9c3eca0eff94be91dfd2b", "score": "0.567814", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n !(0, _iterall.isCollection)(result) ? (0, _invariant.default)(0, \"Expected Iterable, but did not find one for field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\")) : void 0; // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && (0, _isPromise.default)(completedItem)) {\n containsPromise = true;\n }\n\n completedResults.push(completedItem);\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "55e171ea7d4330ad8a9856e853e8879d", "score": "0.5661847", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n (0, _invariant2.default)((0, _iterall.isCollection)(result), 'Expected Iterable, but did not find one for field ' + info.parentType.name + '.' + info.fieldName + '.');\n\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function(item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && isThenable(completedItem)) {\n containsPromise = true;\n }\n completedResults.push(completedItem);\n });\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n }", "title": "" }, { "docid": "1f10fc831d361a5735cba9132c83ee08", "score": "0.56604445", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n !Object(iterall__WEBPACK_IMPORTED_MODULE_0__[\"isCollection\"])(result) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(0, \"Expected Iterable, but did not find one for field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\")) : void 0; // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n Object(iterall__WEBPACK_IMPORTED_MODULE_0__[\"forEach\"])(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(completedItem)) {\n containsPromise = true;\n }\n\n completedResults.push(completedItem);\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "dfb0e2c9e15cb2a64d27ce8e0179988f", "score": "0.56593984", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n (0, _invariant2.default)((0, _iterall.isCollection)(result), 'Expected Iterable, but did not find one for field ' + info.parentType.name + '.' + info.fieldName + '.');\n\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && getPromise(completedItem)) {\n containsPromise = true;\n }\n completedResults.push(completedItem);\n });\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "61eb2e3f66fa8904fba09b4f889d7816", "score": "0.56337196", "text": "function resolveField(exeContext, parentType, source, fieldNodes, path) {\n var _fieldDef$resolve;\n\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 returnType = fieldDef.type;\n var resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver;\n var info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal or abrupt (error).\n\n try {\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n // TODO: find a way to memoize, in case this field is within a List type.\n var args = (0, _values.getArgumentValues)(fieldDef, fieldNodes[0], exeContext.variableValues); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n var _contextValue = exeContext.contextValue;\n var result = resolveFn(source, args, _contextValue, info);\n var completed;\n\n if ((0, _isPromise.default)(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if ((0, _isPromise.default)(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (rawError) {\n var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path));\n return handleFieldError(error, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (rawError) {\n var error = (0, _locatedError.locatedError)(rawError, fieldNodes, (0, _Path.pathToArray)(path));\n return handleFieldError(error, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "3ecb5ed21d689c465b7965a22e3a9d75", "score": "0.5609869", "text": "function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n (0, _invariant2.default)((0, _iterall.isCollection)(result), 'Expected Iterable, but did not find one for field ' + info.parentType.name + '.' + info.fieldName + '.');\n\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = [];\n (0, _iterall.forEach)(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var fieldPath = addPath(path, index);\n var completedItem = completeValueCatchingError(exeContext, itemType, fieldNodes, info, fieldPath, item);\n\n if (!containsPromise && isThenable(completedItem)) {\n containsPromise = true;\n }\n completedResults.push(completedItem);\n });\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}", "title": "" }, { "docid": "2fabdf9274e4bdef7339cdc15a45d3fc", "score": "0.5473454", "text": "function executeField(exeContext, parentType, source, fieldNodes, path) {\n var _fieldDef$resolve;\n\n const fieldDef = getFieldDef(exeContext.schema, parentType, fieldNodes[0]);\n\n if (!fieldDef) {\n return;\n }\n\n const returnType = fieldDef.type;\n const resolveFn =\n (_fieldDef$resolve = fieldDef.resolve) !== null &&\n _fieldDef$resolve !== void 0\n ? _fieldDef$resolve\n : exeContext.fieldResolver;\n const info = buildResolveInfo(\n exeContext,\n fieldDef,\n fieldNodes,\n parentType,\n path,\n ); // Get the resolve function, regardless of if its result is normal or abrupt (error).\n\n try {\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n // TODO: find a way to memoize, in case this field is within a List type.\n const args = Object(_values_mjs__WEBPACK_IMPORTED_MODULE_18__[\"getArgumentValues\"])(\n fieldDef,\n fieldNodes[0],\n exeContext.variableValues,\n ); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n const contextValue = exeContext.contextValue;\n const result = resolveFn(source, args, contextValue, info);\n let completed;\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isPromise\"])(result)) {\n completed = result.then((resolved) =>\n completeValue(exeContext, returnType, fieldNodes, info, path, resolved),\n );\n } else {\n completed = completeValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n }\n\n if (Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isPromise\"])(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, (rawError) => {\n const error = Object(_error_locatedError_mjs__WEBPACK_IMPORTED_MODULE_11__[\"locatedError\"])(rawError, fieldNodes, Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_7__[\"pathToArray\"])(path));\n return handleFieldError(error, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (rawError) {\n const error = Object(_error_locatedError_mjs__WEBPACK_IMPORTED_MODULE_11__[\"locatedError\"])(rawError, fieldNodes, Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_7__[\"pathToArray\"])(path));\n return handleFieldError(error, returnType, exeContext);\n }\n}", "title": "" }, { "docid": "b35ff2f65cea37c09b0f0d90b83954e3", "score": "0.5336096", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var containsPromise = false;\n\n var finalResults = Object.keys(fields).reduce(function (results, responseName) {\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n if (result === undefined) {\n return results;\n }\n results[responseName] = result;\n if (!containsPromise && (0, _isPromise2.default)(result)) {\n containsPromise = true;\n }\n return results;\n }, Object.create(null));\n\n // If there are no promises, we can just return the object\n if (!containsPromise) {\n return finalResults;\n }\n\n // Otherwise, results is a map from field name to the result\n // of resolving that field, which is possibly a promise. Return\n // a promise that will return this same map, but with any\n // promises replaced with the values they resolved to.\n return (0, _promiseForObject2.default)(finalResults);\n}", "title": "" }, { "docid": "0475037c2f401c51adcd7d08f08b1426", "score": "0.531544", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var containsPromise = false;\n\n var finalResults = Object.keys(fields).reduce(function (results, responseName) {\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n if (result === undefined) {\n return results;\n }\n results[responseName] = result;\n if (Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_getPromise__[\"a\" /* default */])(result)) {\n containsPromise = true;\n }\n return results;\n }, Object.create(null));\n\n // If there are no promises, we can just return the object\n if (!containsPromise) {\n return finalResults;\n }\n\n // Otherwise, results is a map from field name to the result\n // of resolving that field, which is possibly a promise. Return\n // a promise that will return this same map, but with any\n // promises replaced with the values they resolved to.\n return Object(__WEBPACK_IMPORTED_MODULE_7__jsutils_promiseForObject__[\"a\" /* default */])(finalResults);\n}", "title": "" }, { "docid": "8b627cbcc650f3847fad7ce58d71f1f8", "score": "0.5278637", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var containsPromise = false;\n\n var finalResults = Object.keys(fields).reduce(function (results, responseName) {\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n if (result === undefined) {\n return results;\n }\n results[responseName] = result;\n if (getPromise(result)) {\n containsPromise = true;\n }\n return results;\n }, Object.create(null));\n\n // If there are no promises, we can just return the object\n if (!containsPromise) {\n return finalResults;\n }\n\n // Otherwise, results is a map from field name to the result\n // of resolving that field, which is possibly a promise. Return\n // a promise that will return this same map, but with any\n // promises replaced with the values they resolved to.\n return promiseForObject(finalResults);\n}", "title": "" }, { "docid": "8b627cbcc650f3847fad7ce58d71f1f8", "score": "0.5278637", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var containsPromise = false;\n\n var finalResults = Object.keys(fields).reduce(function (results, responseName) {\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n if (result === undefined) {\n return results;\n }\n results[responseName] = result;\n if (getPromise(result)) {\n containsPromise = true;\n }\n return results;\n }, Object.create(null));\n\n // If there are no promises, we can just return the object\n if (!containsPromise) {\n return finalResults;\n }\n\n // Otherwise, results is a map from field name to the result\n // of resolving that field, which is possibly a promise. Return\n // a promise that will return this same map, but with any\n // promises replaced with the values they resolved to.\n return promiseForObject(finalResults);\n}", "title": "" }, { "docid": "8b627cbcc650f3847fad7ce58d71f1f8", "score": "0.5278637", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var containsPromise = false;\n\n var finalResults = Object.keys(fields).reduce(function (results, responseName) {\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n if (result === undefined) {\n return results;\n }\n results[responseName] = result;\n if (getPromise(result)) {\n containsPromise = true;\n }\n return results;\n }, Object.create(null));\n\n // If there are no promises, we can just return the object\n if (!containsPromise) {\n return finalResults;\n }\n\n // Otherwise, results is a map from field name to the result\n // of resolving that field, which is possibly a promise. Return\n // a promise that will return this same map, but with any\n // promises replaced with the values they resolved to.\n return promiseForObject(finalResults);\n}", "title": "" }, { "docid": "c3e7904253bef1745639f1b40bd6476d", "score": "0.52366054", "text": "function resolveField(exeContext, parentType, source, fieldNodes, path) {\n var fieldNode = fieldNodes[ 0 ];\n var fieldName = fieldNode.name.value;\n\n var fieldDef = getFieldDef(exeContext.schema, parentType, fieldName);\n if (!fieldDef) {\n return;\n }\n\n var returnType = fieldDef.type;\n var resolveFn = fieldDef.resolve || defaultFieldResolver;\n\n // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n var context = exeContext.contextValue;\n\n // The resolve function's optional fourth argument is a collection of\n // information about the current execution state.\n var info = {\n fieldName: fieldName,\n fieldNodes: fieldNodes,\n returnType: returnType,\n parentType: parentType,\n path: path,\n schema: exeContext.schema,\n fragments: exeContext.fragments,\n rootValue: exeContext.rootValue,\n operation: exeContext.operation,\n variableValues: exeContext.variableValues\n };\n\n // Get the resolve function, regardless of if its result is normal\n // or abrupt (error).\n var result = resolveOrError(exeContext, fieldDef, fieldNode, resolveFn, source, context, info);\n\n return completeValueCatchingError(exeContext, returnType, fieldNodes, info, path, result);\n }", "title": "" }, { "docid": "674d2b14253994506c61baf679e7e944", "score": "0.52290714", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {\n var responseName = _Object$keys2[_i4];\n var fieldNodes = fields[responseName];\n var fieldPath = (0, _Path.addPath)(path, responseName, parentType.name);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if ((0, _isPromise.default)(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return (0, _promiseForObject.default)(results);\n}", "title": "" }, { "docid": "4a9f31baa701052d84e44c658c0a2d21", "score": "0.5223369", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {\n var responseName = _Object$keys2[_i4];\n var fieldNodes = fields[responseName];\n var fieldPath = Object(Path[\"a\" /* addPath */])(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (!containsPromise && Object(isPromise[\"a\" /* default */])(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return promiseForObject(results);\n}", "title": "" }, { "docid": "f9fdc33443c93b8fb0314c9a50b9d1ea", "score": "0.5221247", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {\n var responseName = _Object$keys2[_i4];\n var fieldNodes = fields[responseName];\n var fieldPath = (0, _Path.addPath)(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (!containsPromise && (0, _isPromise.default)(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return (0, _promiseForObject.default)(results);\n}", "title": "" }, { "docid": "f9fdc33443c93b8fb0314c9a50b9d1ea", "score": "0.5221247", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {\n var responseName = _Object$keys2[_i4];\n var fieldNodes = fields[responseName];\n var fieldPath = (0, _Path.addPath)(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (!containsPromise && (0, _isPromise.default)(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return (0, _promiseForObject.default)(results);\n}", "title": "" }, { "docid": "3b19dc0448c2c3b0548df68de28554a4", "score": "0.51997674", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {\n var responseName = _Object$keys2[_i4];\n var fieldNodes = fields[responseName];\n var fieldPath = Object(_jsutils_Path__WEBPACK_IMPORTED_MODULE_11__[\"addPath\"])(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (!containsPromise && Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return Object(_jsutils_promiseForObject__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(results);\n}", "title": "" }, { "docid": "c4e8c33d58722419350e7732d95032fc", "score": "0.5195665", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var containsPromise = false;\n\n var finalResults = Object.keys(fields).reduce(function(results, responseName) {\n var fieldNodes = fields[ responseName ];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n if (result === undefined) {\n return results;\n }\n results[ responseName ] = result;\n if (isThenable(result)) {\n containsPromise = true;\n }\n return results;\n }, Object.create(null));\n\n // If there are no promises, we can just return the object\n if (!containsPromise) {\n return finalResults;\n }\n\n // Otherwise, results is a map from field name to the result\n // of resolving that field, which is possibly a promise. Return\n // a promise that will return this same map, but with any\n // promises replaced with the values they resolved to.\n return promiseForObject(finalResults);\n }", "title": "" }, { "docid": "e806d14bd8dcefe980e85c7da7d8bca6", "score": "0.518888", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var i = 0, keys = Object.keys(fields); i < keys.length; ++i) {\n var responseName = keys[i];\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (!containsPromise && (0, _isPromise.default)(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return (0, _promiseForObject.default)(results);\n}", "title": "" }, { "docid": "7abd5d16bf60b272d8d1978c191aa31c", "score": "0.5170068", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {\n var responseName = _Object$keys2[_i4];\n var fieldNodes = fields[responseName];\n var fieldPath = Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_10__[\"addPath\"])(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (!containsPromise && Object(_jsutils_isPromise_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return Object(_jsutils_promiseForObject_mjs__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(results);\n}", "title": "" }, { "docid": "63b871fe5849f15607da178368c47117", "score": "0.51592094", "text": "function resolveField(exeContext, parentType, source, fieldNodes, path) {\n var _fieldDef$resolve;\n\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 = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _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": "" }, { "docid": "dbc09fdf0701fca947e70bbeee7e86f8", "score": "0.5158269", "text": "function executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var i = 0, keys = Object.keys(fields); i < keys.length; ++i) {\n var responseName = keys[i];\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (!containsPromise && Object(_jsutils_isPromise__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return Object(_jsutils_promiseForObject__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(results);\n}", "title": "" }, { "docid": "fb3b91854789f1f1abc3fa62182a507c", "score": "0.51562023", "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": "" }, { "docid": "fb3b91854789f1f1abc3fa62182a507c", "score": "0.51562023", "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": "" }, { "docid": "fb3b91854789f1f1abc3fa62182a507c", "score": "0.51562023", "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": "" }, { "docid": "fb3b91854789f1f1abc3fa62182a507c", "score": "0.51562023", "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": "" }, { "docid": "fb3b91854789f1f1abc3fa62182a507c", "score": "0.51562023", "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": "" } ]
94d3280b81b2ae7c60ad6f8d1e4f6e02
final callback to sort table
[ { "docid": "cd023d570d5a1481b2eb50169da8423d", "score": "0.0", "text": "function trigger() {\n\t\tif (tableLoaded) // reload existing table\n\t\t{\n\t\t\t$(\"#transactionsTable\").trigger(\"update\", [true, () => { }]);\n\t\t\t$(\"#transactionsTable thead th\").data(\"sorter\", true);\n\t\t\t//$(\"table\").trigger(\"sorton\", [[0,0]]);\n\n\t\t} else {\n\t\t\t$(\"#transactionsTable thead th\").data(\"sorter\", true);\n\t\t\tlet defaultSortIndex = 7;\n\t\t\tif (historyConfig.showRelayers)\n\t\t\t\tdefaultSortIndex = 8;\n\t\t\t$(\"#transactionsTable\").tablesorter({\n\t\t\t\ttextExtraction: {\n\t\t\t\t\t2: function (node, table, cellIndex) { return $(node).find(\"a\").text(); },\n\t\t\t\t},\n\t\t\t\twidgets: ['scroller'],\n\t\t\t\twidgetOptions: {\n\t\t\t\t\tscroller_height: 500,\n\t\t\t\t},\n\t\t\t\tsortList: [[defaultSortIndex, \"d\"]]\n\t\t\t});\n\n\t\t\ttableLoaded = true;\n\t\t}\n\t\tif (displayedLogs)\n\t\t\ttrigger1 = true;\n\n\n\t\tif (trigger1) {\n\t\t\tdisableInput(false);\n\t\t\thideLoading(true);\n\t\t\trunning = false;\n\t\t\trequestID++;\n\t\t\tbuttonLoading(true);\n\t\t\tdownloadAllTrades();\n\t\t}\n\t\telse {\n\t\t\thideLoading(trigger1);\n\t\t}\n\t\ttableLoaded = true;\n\t}", "title": "" } ]
[ { "docid": "f24deca285d3fb4f6891dec1adc9d8b7", "score": "0.7244202", "text": "function callback(data) {\n adminSort = data; // store the array of data in a global for later use\n populateTable(); // within view\n}", "title": "" }, { "docid": "465b73ded0db969651ece5237038d78a", "score": "0.71112156", "text": "function sortProtocolTable(){\n $(\"#protocolTable\").tablesorter();\n}", "title": "" }, { "docid": "105ad0ba199cd08066fc3c23bc175a6f", "score": "0.70623446", "text": "function sortClick(table){\n $(\".sort\").on(\"click\", function() {\n console.log(\"truck\");\n // table.order([0, 'desc']).draw();\n table.order([0][1, \"asc\"]).draw()\n // table.search( \"hel\" ).draw();\n // var data = table\n // .ordering( [ 1, 'asc' ] )\n // .draw();\n });\n}", "title": "" }, { "docid": "609d9176c0773f227dfa0cb00c304da0", "score": "0.705593", "text": "function sortRenderTable() {\n filteredTrainees = sortedTrainees(filteredTrainees);\n rerenderTable();\n}", "title": "" }, { "docid": "5de60f0645555f29ead1116d85cd51f4", "score": "0.7037722", "text": "function byRent() {\n $.each(adminSort, function (i, val) {\n console.log('what is val ' + val);\n adminSort = adminSort.sort(Comparator);\n\n function Comparator(a, b) {\n console.log('what is a :' + a[6] + ' what is b :' + b[6]);\n return (a[6]) - (b[6]);\n };\n\n populateTable();\n\n })\n\n ;\n}", "title": "" }, { "docid": "06b0196c1fd4581fddda1a47fff05b44", "score": "0.69562507", "text": "onSort(evt) {\n self.reorder(evt)\n }", "title": "" }, { "docid": "8068bf19ccad931c2e83717c15989348", "score": "0.6955987", "text": "onConfirmSort(oEvent){\r\n var oView = this.getView();\r\n var oTable = oView.byId(\"idBooksTable\");\r\n var mParams = oEvent.getParameters();\r\n var oBinding = oTable.getBinding(\"items\");\r\n\r\n // apply the sorter\r\n var aSorters = [];\r\n var sPath = mParams.sortItem.getKey();\r\n var bDescending = mParams.sortDescending;\r\n aSorters.push(new Sorter(sPath, bDescending));\r\n oBinding.sort(aSorters);\r\n }", "title": "" }, { "docid": "b3f2e85972246203c2fc7cde571d1435", "score": "0.6920283", "text": "function sortTable(i) {\n collapseList();\n if (sortDir == 'ascending') {\n tableElements.sort(function (a, b) {\n return sortFun(b, a)\n })\n sortDir = 'descending'\n }\n else {\n tableElements.sort(function (a, b) {\n return sortFun(a, b)\n })\n sortDir = 'ascending'\n }\n\n updateTable();\n sortColumn = i;\n\n function sortFun(a,b) {\n switch (i) {\n case 0:\n a = a.key.toUpperCase();\n b = b.key.toUpperCase();\n if (a < b) {\n return -1;\n }\n else {\n return 1;\n }\n break;\n case 1:\n return a.value['Goals Made'] - b.value['Goals Made'];\n break;\n case 2:\n return a.value.Result.ranking - b.value.Result.ranking;\n break;\n case 3:\n return a.value.Wins - b.value.Wins;\n break;\n case 4:\n return a.value.Losses - b.value.Losses;\n break;\n case 5:\n return a.value.TotalGames - b.value.TotalGames;\n }\n };\n}", "title": "" }, { "docid": "2ad5740153811e9f2ff32f64ff742e71", "score": "0.6900699", "text": "function populateTable() {\n deleteTable();\n $.each(adminSort, function (i, val) {\n populateTableRow(val);\n });\n}", "title": "" }, { "docid": "5b30222f92bdd0532489d24abfb0adf2", "score": "0.6886226", "text": "function setSort() {\n document.getElementById(\"sortButton\").addEventListener(\"click\", sortTable, false);\n}", "title": "" }, { "docid": "ddc49b27d0d765edb4ebaf5ab82853be", "score": "0.6874454", "text": "function sortTable(sortOn,type,id) \n\t{\n\t\tif(id != \"fake\"){\n\t\tif(oldLinkId.id != undefined){\n\t\t\tdocument.getElementById(oldLinkId.id).href= oldLinkId.href\n\t\t\tdocument.getElementById(oldLinkId.id).onclick= oldLinkId.onclick\n\t\t\tdocument.getElementById(oldLinkId.id).firstChild.title = oldLinkId.title\n\t\t}\n\t\t\n\t\toldLinkId.id = id.id;\n\t\toldLinkId.href = id.href;\n\t\toldLinkId.onclick = id.onclick;\n\t\toldLinkId.title = id.firstChild.title\n\t\tid.firstChild.title = 'Column already sorted on this'\n\t\tid.removeAttribute('href')\n\t\tid.removeAttribute('onclick')\n\t\t}\n\t\t//document.getElementById(id.id).pare\n\t \tvar table = document.getElementById('results');\n\t\tvar tbody = table.getElementsByTagName('tbody')[0];\n\t\tvar rows = tbody.getElementsByTagName('tr');\n\t\t//Mah\n\t\tvar valuePresent = false;\n\t\tvar prevRowValue = \"\";\n\t\t\n\t\tvar rowArray = new Array();\n\t\tvar k =0;\n\t\tfor (var i=0, length=rows.length; i<length; i++) \n\t\t{\n\t\t\t rowArray[k] = new Object;\n\t\t\t rowArray[k].oldIndex = i;\n\t\t\t rowArray[k].value = rows[i].getElementsByTagName('td')[sortOn].innerHTML.trim();\n\t\t\t\t//Mah\n\t\t\t if (rowArray[k].value != null && rowArray[k].value != \"-\") {\n\t\t\t\t valuePresent = true;\n\t\t\t }\n\t\t\t \n\t\t\t k++;\n\t\t}\n\t\tif (valuePresent) { \n\t\t\t//if the current column is sorted already the this will sort in decending order\n\t\t\tif (sortOn != sortedOn || type != oldType) \n\t\t\t{\n\t\t\t\toldType = type;\n\t\t\t\tsortedOn = sortOn;\n\t\t\t\t//if our table column number 1,7 are numbers so we are calling funciton RowCompareNumbers\n\t\t\t\tif(altTable==1)\n\t\t\t\t{\n\t\t\t\t\tif (sortOn == 0 || sortOn == 3+alterTable || sortOn == 4+alterTable || sortOn == 5+alterTable || sortOn == 6+alterTable || sortOn == 7+alterTable || sortOn == 8+alterTable || sortOn == 10+alterTable || sortOn == 16+alterTable ) \n\t\t\t\t\t{\n\t\t\t\t\t\tif(type == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareNumbers);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareNumbersReverse);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(sortOn == 16+alterTable) \n\t\t\t\t\t{ \n\t\t\t\t\t\tif(type == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareDollars);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareDollarsReverse);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else \n\t\t\t\t\t{\n\t\t\t\t\t\tif(type == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompare);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareReverse);\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (sortOn == 0 || sortOn == 3+alterTable || sortOn == 4+alterTable || sortOn == 5+alterTable || sortOn == 6+alterTable || sortOn == 8+alterTable || sortOn == 15+alterTable) \n\t\t\t\t\t{\n\t\t\t\t\t\tif(type == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareNumbers);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareNumbersReverse);\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\n\t\t\t\t\telse if(sortOn == 15+alterTable) \n\t\t\t\t\t{ \n\t\t\t\t\t\tif(type == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareDollars);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareDollarsReverse);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else \n\t\t\t\t\t{\n\t\t\t\t\t\tif(type == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompare);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trowArray.sort(rowCompareReverse);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t var newTbody = document.createElement('tbody');\n\t\tfor (var i=0, length=rowArray.length; i<length; i++) \n\t\t{\n\t\t\tnewTbody.appendChild(rows[rowArray[i].oldIndex].cloneNode(true));\n\t\t}\n\t\t\t\t\n\t\ttable.replaceChild(newTbody, tbody);\n\t\t\n\t\t//change the background color of rows when user clicks on the column heads link.\n\t\t\n\t\tvar sortRows = newTbody.getElementsByTagName('tr');\n\t\tvar rowSortArray = new Array();\n\t var z=0;\n\t\tfor (var i=0, length=sortRows.length; i<length; i++) \n\t\t{\n\t\t if(sortRows[i].style.display != \"none\") \n\t\t { \n\t\t\trowSortArray[z] = new Object;\n\t\t\trowSortArray[z].oldIndex = i;\n\t\t\trowSortArray[z].value = sortRows[i].getElementsByTagName('td')[sortOn].innerHTML.trim();\n\t\t\tz++;\n\t\t\t}\n\t\t}\n\t\t \n\t\tvar k=0;\n\t\tvar q=0;\n\t\tvar y=0;\n\t\n\t\tfor(i=0;i<sortRows.length;i++) \n\t\t{ \n\t\t if(sortRows[i].style.display != \"none\") \n\t\t { \n\t\t \n\t\t if(y!=0) \n\t\t {\n\t\t if(q==1) \n\t\t { \n\t\t\t if(rowSortArray[y-1].value== rowSortArray[y].value) \n\t\t\t {\n\t\t\t sortRows[i].className = \"onchange\";\n\t\t\t \n\t\t\t } else if (rowSortArray[y-1].value!= rowSortArray[y].value) \n\t\t\t { \n\t\t\t q=0;\n\t\t\t sortRows[i].className = \"default\";\n\t\t\t \t\t\t \n\t\t\t }\n\t\t\t } else if(rowSortArray[y-1].value!= rowSortArray[y].value) \n\t\t\t {\n\t\t\t\t sortRows[i].className = \"onchange\";\n\t\t\t q=1;\n\t\t\t \n\t\t\t } else \n\t\t\t { \n\t\t\t sortRows[i].className = \"default\";\n\t\t\t }\n\t\t\t } else if(y==0) \n\t\t\t {\n\t\t\t sortRows[i].className = \"default\";\n\t\t\t }\n\t\t\t \n\t\t\t if(rowSortArray[y].value==\"-\") \n\t\t\t {\n\t\t k++;\n\t\t }\n\t\t y++;\n\t\t }\n\t\t\t\n\t\t}//end of for \n\t\tvar rowSArray = new Array();\n\t\tvar f=0;\n\t\tvar g=0; \n\t\tif(k==rowSortArray.length) \n\t\t{\n\t\t for (var i=0, length=sortRows.length; i<length; i++) \n\t\t {\n\t\t if(sortRows[i].style.display != \"none\") \n\t\t { \n\t\t\trowSArray[f] = new Object;\n\t\t\trowSArray[f].oldIndex = i;\n\t\t\trowSArray[f].value = sortRows[i].getElementsByTagName('td')[0].innerHTML;\n\t\t\tf++;\n\t\t\t\n\t\t\t}\n\t\t }\n\t\t for(i=0;i<rowSArray.length;i++) \n\t\t {\n\t\t if(sortRows[i].style.display != \"none\") \n\t\t { \n\t\t sortRows[i].className = \"default\";\n\t\t\t}\n\t\t }\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "62ee43992ea69253092aa15d034434d3", "score": "0.68723005", "text": "function sort(e, index){\n /* MAKE CURSOR TO WAIT */\n $('.mainDiv').css('cursor', 'wait');\n setTimeout(() => {\n let ascOrder = true;\n\n /* ITERATE THROUGH ALL TABLE HEADERS */\n $(\".fileDetails table thead th\").each(function(i) {\n\n /* IF INDEX DOES NOT MATCH WITH CLICKED COLUMN INDEX THEN REMOVE ALL CLASS */\n if(i == index){\n\n /* IF SORTING IS NOT APPLIED ON THAT COLUMN THEN START WITH ASCENDING SORT */\n if($(e.target).hasClass('sorted')){\n\n /* IF SORTING ORDER IS ASCENDING THEN APPLY DESCENDING ORDER ELSE APPLY ASCENDING ORDER */\n if($(e.target).hasClass('asc')){\n $(e.target).removeClass('asc')\n $(e.target).addClass('desc')\n ascOrder = false;\n }else{\n $(e.target).removeClass('desc')\n $(e.target).addClass('asc')\n ascOrder = true;\n }\n }else{\n $(e.target).addClass('sorted asc');\n ascOrder = true;\n }\n }else{\n $(this).removeClass('sorted asc desc');\n }\n });\n /* DONE ITERATIONS OF TABLE HEADERS */\n\n /* GET ALL TABLE BODY ROWS */\n let rows = $('.fileDetails tbody tr');\n let value = $($('.fileDetails tbody tr')[0]).find('td')[index].innerHTML;\n let isNumber = !isNaN(parseFloat(value));\n\n /* ITERATE THROUGH ALL ROWS FOR SORTING */\n rows.sort(function(a, b){\n var x = $(a).find('td')[index].innerHTML;\n var y = $(b).find('td')[index].innerHTML;\n \n /* SORT BASED ON NUMBER OR STRING */\n if(isNumber) {\t\n if(ascOrder) {\n return x - y;\n } else {\n return y - x;\n }\n } else {\n if(ascOrder) {\n if(x < y) return -1;\n if(x > y) return 1;\n return 0;\n } else {\t\t\n if(x > y) return -1;\n if(x < y) return 1;\n return 0;\n }\n }\n })\n /* DONE WITH SORTING */\n \n /* APPEND SORTED ROWS TO TABLE BODY */\n $.each(rows, function(index, row) {\n $('.fileDetails tbody').append(row);\n });\n\n /* MAKE CURSOR TO DEFAULT */\n $('.mainDiv').css('cursor', 'unset');\n }, 1000);\n}", "title": "" }, { "docid": "c186e533e389f4150d8bc4e176d51215", "score": "0.6830643", "text": "sortTable(e) {\n const { sortTable } = this.props;\n const text = e.target.textContent;\n sortTable(text);\n }", "title": "" }, { "docid": "83eb6dc9c25d99831e95bb14fa38a3db", "score": "0.6802895", "text": "function sort() {\n}", "title": "" }, { "docid": "1a6c57233885667dde4bbd50d557efc3", "score": "0.678986", "text": "function byType() {\n $.each(adminSort, function (i, val) {\n console.log('what is val ' + val);\n adminSort = adminSort.sort(Comparator);\n\n function Comparator(a, b) {\n if (a[7] < b[7]) return -1;\n if (a[7] > b[7]) return 1;\n return 0;\n };\n\n populateTable();\n }\n );\n}", "title": "" }, { "docid": "00b3d452333c23e5a1c5e8d8a9bfb586", "score": "0.67784303", "text": "handleSort(e){\n if(e.target){\n const field = e.target.parentNode.getAttribute('field')\n const direction = e.target.classList.contains('asc') ? 'DESC' : 'ASC'\n\n // Loop over and remove any other active sort\n const sorts = this.table.querySelectorAll('.simpletable-sort')\n sorts.forEach(function(sort){\n sort.classList.remove('asc', 'sorted')\n })\n\n if(direction === 'DESC') {\n e.target.classList.remove('asc')\n } else {\n e.target.classList.add('asc')\n }\n e.target.classList.add('sorted')\n\n // Update sorting \n this.sorting = {\n field,\n direction\n }\n\n // Make request with new sort data\n this.request();\n }\n }", "title": "" }, { "docid": "66c5edf5e3e8c314e501881743826df6", "score": "0.67464864", "text": "function ts_makeSortable (table)\r\n{\r\n\t//get header\r\n\theadersRow = table.tHead.rows[0];\r\n\tif (!headersRow) return;\r\n\t//make headers content clickable (but first and last 2 columns)\r\n\tfor (var i=1; i<headersRow.cells.length-2; i++)\r\n\t{\r\n\t\tvar cell = headersRow.cells[i];\r\n\t\tvar txt = ts_getInnerText(cell);\r\n\t\t// The number of the column is safed as a custom attribute for later reference when calling the ts_resortTabel function.\r\n\t\tcell.innerHTML = '<a class=\"sortheader\" column=\"'+i+'\" style=\"cursor: pointer;\">'+\r\n\t\t\t\t\t\t txt+'<span class=\"sortarrow\">&nbsp;&nbsp;</span></a>';\r\n\t\t// Get link as object and addEventListener\r\n\t\telmLinks = cell.getElementsByTagName(\"a\")\r\n\t\telmLinks[0].addEventListener('click', \r\n\t\t\t\t\t\t\t\t\tfoo=function(event){\r\n\t\t\t\t\t\t\t\t\t\tvar lnk = event.target;\r\n\t\t\t\t\t\t\t\t\t\tvar col = lnk.getAttribute('column');\r\n\t\t\t\t\t\t\t\t\t\tts_resortTable(lnk, col);\t// the call to the original function\r\n\t\t\t\t\t\t\t\t\t}, false)\r\n\t}\r\n}", "title": "" }, { "docid": "dcc556f774c07dd88748203d7ea829ea", "score": "0.6716804", "text": "function sort_table(table, col) {\r\n $('.sortorder').remove();\r\n if (asc == 2) {\r\n asc = -1;\r\n } else {\r\n asc = 2;\r\n }\r\n var rows = table.tBodies[0].rows;\r\n var rlen = rows.length;\r\n var arr = [];\r\n var i, j, cells, clen;\r\n // fill the array with values from the table\r\n for (i = 0; i < rlen; i++) {\r\n cells = rows[i].cells;\r\n clen = cells.length;\r\n arr[i] = [];\r\n for (j = 0; j < clen; j++) {\r\n arr[i][j] = cells[j].innerHTML;\r\n }\r\n }\r\n // sort the array by the specified column number (col) and order (asc)\r\n arr.sort(function (a, b) {\r\n var retval = 0;\r\n var col1 = a[col].toLowerCase().replace(',', '').replace('$', '').replace(' usd', '')\r\n var col2 = b[col].toLowerCase().replace(',', '').replace('$', '').replace(' usd', '')\r\n var fA = parseFloat(col1);\r\n var fB = parseFloat(col2);\r\n if (col1 != col2) {\r\n if ((fA == col1) && (fB == col2)) {\r\n retval = (fA > fB) ? asc : -1 * asc;\r\n }\r\n else {\r\n retval = (col1 > col2) ? asc : -1 * asc;\r\n }\r\n }\r\n return retval;\r\n });\r\n\r\n // place the elements in the correct order\r\n for (var rowidx = 0; rowidx < rlen; rowidx++) {\r\n for (var colidx = 1; colidx < arr[rowidx].length; colidx++) {\r\n table.tBodies[0].rows[rowidx].cells[colidx].innerHTML = arr[rowidx][colidx];\r\n }\r\n }\r\n\r\n // update the arrow in the heading to denote ascending or descending\r\n hdr = table.rows[0].cells[col];\r\n if (asc == -1) {\r\n $(hdr).html($(hdr).html() + '<span class=\"sortorder\"> ▲</span>');\r\n }\r\n else {\r\n $(hdr).html($(hdr).html() + '<span class=\"sortorder\"> ▼</span>');\r\n }\r\n}", "title": "" }, { "docid": "c5de2fd42aaecf97e60ada11ce6bda86", "score": "0.6672728", "text": "function $colSort(e, item, table) {\r\n\t\tif (table.sortCol) table.$getHead(table.sortCol).$delClass(table.sortClass);\r\n\t\ttable.sortCol = table.sortList[item].col;\r\n\t\ttable.$getHead(table.sortCol).$addClass(table.sortClass);\r\n\t\tfor (var i=0,l=table.$getNumRows(); i<l; i++)\r\n\t\t\ttable.$getRow(i).$stopAllObserve();\r\n\t\ttable.$sortBy(table.sortList[item].col, table.sortList[item].type);\r\n\t\ttable.$upgrate();\r\n\t}", "title": "" }, { "docid": "3da73d8f8b754ea06dc9caf5ef0aebba", "score": "0.6671336", "text": "function tableSorter( tableId, sortList )\r\n{\r\n\tif(sortList==undefined) sortList = [[0,0]];\r\n\t\r\n\tjQuery(\"#\" + tableId ).tablesorter(); \r\n\t\r\n\tif($(\"#\" + tableId ).find(\"tbody\").children().size() > 0 )\r\n\t{\r\n\t\tjQuery(\"#\" + tableId ).trigger(\"sorton\",[sortList]);\r\n\t}\r\n}", "title": "" }, { "docid": "9c1c0a732127684aa95d74ff641fff0c", "score": "0.66509396", "text": "sortChange(sort) {\n this.sort = sort;\n this.loadHeaders();\n }", "title": "" }, { "docid": "933287466bff8509987dd9336e90c64e", "score": "0.6637694", "text": "function setSortingListener() {\n $('.TIERPRICE_SORTING_CHANGED').on('change', function (event) {\n var element = event.target;\n var tableElement = $(element).parent().parent().parent().parent().parent();\n tierPriceTableSort(tableElement.attr('id'));\n });\n}", "title": "" }, { "docid": "0deb60ab02fef67a9716b471d3fb6e24", "score": "0.66173047", "text": "_sort(direction, dataKey) {\n this.worker.postMessage({ action: 'SORT', direction, dataKey});\n this._selectColumn(null);\n }", "title": "" }, { "docid": "0f55a646927afb296acb0259abe620f7", "score": "0.66059303", "text": "function sortTable(headers) {\n if (columnOrder == headers.attr(\"data-model\")) {\n if (typeOrder == 'ascending') {\n descendingTable(headers);\n } else {\n ascendingTable(headers);\n }\n } else {\n columnOrder = headers.attr(\"data-model\");\n ascendingTable(headers);\n }\n repaintBody(getDataByLimit(data));\n}", "title": "" }, { "docid": "047bb235a2c1e595fdfe4de1b108974c", "score": "0.66023934", "text": "function sortTable(n) {\r\n sort_table(document.getElementById(\"table_here\"), n);\r\n}", "title": "" }, { "docid": "7b5ec0b6a72816b3599f0351d61be39a", "score": "0.6599321", "text": "function TableSort(selector, highlightClass, footerCnt) {\n var objThis = this;\n var $table = $(selector);\n if ($table.length !== 1) {\n $table.each(function(table) {\n new TableSort(table, highlightClass, footerCnt);\n });\n return;\n }\n var $th = $table.find('th').addClass(CLASS_TH);\n for (var i = 0; i < $th.length; i++) {\n (function(th, index) {\n $(th).click(function() {\n var $arrow = $(th).find('.' + CLASS_ARROW);\n var desc = 0;\n var cName = CLASS_ARROW;\n if ($arrow.length > 0 && !$arrow.hasClass(CLASS_ARROW_DESC)) {\n desc = 1;\n cName += ' ' + CLASS_ARROW_DESC;\n }\n $table.find('.' + CLASS_ARROW).remove();//remove old arrow\n $(th).append('<span class=\"' + cName + '\"></span>');//append new arrow\n _sort($table, index, desc, highlightClass, footerCnt);\n });\n })($th[i], i);\n }\n objThis.$dom = $table;\n }", "title": "" }, { "docid": "8c6c15f5147a85ddb87b84def99da4fc", "score": "0.65667117", "text": "function sortTrialsOwnedChangedCallBack(grid, sortColumns) {\n\n if (sortColumns.length === 0) {\n vm.searchOwnedParams.sort = 'nci_id';\n vm.searchOwnedParams.order = 'desc';\n } else {\n vm.searchOwnedParams.sort = sortColumns[0].name; //sort the column\n switch (sortColumns[0].sort.direction) {\n case uiGridConstants.ASC:\n vm.searchOwnedParams.order = 'ASC';\n break;\n case uiGridConstants.DESC:\n vm.searchOwnedParams.order = 'DESC';\n break;\n case undefined:\n break;\n }\n }\n\n //do the search with the updated sorting\n vm.getUserTrials();\n } //sortChangedCallBack", "title": "" }, { "docid": "6ffea9e678a05c26718f5c67ff150af9", "score": "0.65523887", "text": "function sortTableValues(columnIndex) // ascending and descending sorting\n{\n console.log(\"sort\" );\n clicks = clicks +1;\n table = document.getElementById(\"mylist\");\n var colIndex = columnIndex.cellIndex;\n (clicks % 2 == 0) ? sortDescending(colIndex) : sortAscending(colIndex);\n}", "title": "" }, { "docid": "6ffea9e678a05c26718f5c67ff150af9", "score": "0.65523887", "text": "function sortTableValues(columnIndex) // ascending and descending sorting\n{\n console.log(\"sort\" );\n clicks = clicks +1;\n table = document.getElementById(\"mylist\");\n var colIndex = columnIndex.cellIndex;\n (clicks % 2 == 0) ? sortDescending(colIndex) : sortAscending(colIndex);\n}", "title": "" }, { "docid": "f584087093c7d8ab47beccef818bfcac", "score": "0.65397394", "text": "function _clickHandler() {\n $sortButtons.on( 'click', function() {\n var $button = $( this ),\n $headercell = $button.closest( 'th, td' ),\n $table = $headercell.closest( '.table__sortable' ),\n sortType = $button.attr( 'data-sort_type' ),\n sign = 1,\n $firstChild = $table.find( 'tr:first-child' ),\n index = $firstChild.children( 'th, td' ).index( $headercell );\n\n _getRows( index );\n\n // Determine sign\n if ( $button.hasClass( 'sorted-up' ) || $button.hasClass( 'sortable__start-down' ) ) {\n sign = -1;\n }\n\n $sortButtons.removeClass( 'sortable__start-down sortable__start-up' );\n $sortButtons.removeClass( 'sorted-down sorted-up' );\n\n // Add correct class\n if ( sign === 1 ) {\n $button.addClass( 'sorted-up' );\n } \n else {\n $button.addClass( 'sorted-down' );\n }\n\n // Perform the row sort\n rows.sort( _arraySorter( sign, sortType ) );\n\n _updateTable( index );\n\n } );\n }", "title": "" }, { "docid": "7f74926319083b411c4c4c256e880509", "score": "0.65124285", "text": "function prepare_table() {\n // clear onclick events on table headers, so they don't layer on each other\n $('#main_table th').unbind();\n \n $('#main_table').tablesorter({\n widgets: ['zebra'],\n sortInitialOrder: 'desc'\n });\n \n $('#main_table th.header').click(function() {\n $('.sorting.help').show();\n });\n}", "title": "" }, { "docid": "f1a6bce3486e83eb32c7f639f7032ee8", "score": "0.6509429", "text": "function sortTable(table, colIndex, forward) {\n\tfor(var i = 0; i < table.tBodies.length; i++) {\n\t\tsortBody(table.tBodies[i], colIndex, forward);\n\t}\n\ttable.setAttribute(\"data-sorted-col\", colIndex);\n\ttable.setAttribute(\"data-sorted-dir\", (forward) ? \"asc\" : \"desc\");\n}", "title": "" }, { "docid": "78e71c1e28cfbbe3053cce5ff5418fe3", "score": "0.65049636", "text": "function create_sort_event_handler(contributions) {\n $('#committee-header').on('click', () => {\n if ($('#committee-header').attr('sorted') === 'desc'){\n contributions.sort(function(a,b) {\n $('#committee-header').attr('sorted', 'asc');\n return b.committee > a.committee;\n });\n\n }\n else{\n contributions.sort(function(a,b) {\n $('#committee-header').attr('sorted', 'desc');\n return a.committee > b.committee;\n });\n };\n $('#amount-header').attr('sorted', '')\n $('#state-header').attr('sorted', '')\n populate_contribution_table(contributions);\n });\n\n\n $('#amount-header').on('click', () => {\n if ($('#amount-header').attr('sorted') === 'desc'){\n contributions.sort(function(a,b) {\n $('#amount-header').attr('sorted', 'asc');\n return a.amount - b.amount;\n });\n\n }\n else{\n contributions.sort(function(a,b) {\n $('#amount-header').attr('sorted', 'desc');\n return b.amount - a.amount;\n });\n };\n $('#committee-header').attr('sorted', '')\n $('#state-header').attr('sorted', '')\n populate_contribution_table(contributions);\n });\n\n $('#state-header').on('click', () => {\n if ($('#state-header').attr('sorted') === 'desc'){\n contributions.sort(function(a,b) {\n $('#state-header').attr('sorted', 'asc');\n return b.state > a.state;\n });\n\n }\n else{\n contributions.sort(function(a,b) {\n $('#state-header').attr('sorted', 'desc');\n return a.state > b.state;\n });\n };\n $('#amount-header').attr('sorted', '')\n $('#committee-header').attr('sorted', '')\n populate_contribution_table(contributions);\n });\n}", "title": "" }, { "docid": "1ade358395ced9c3e753f42b2b1a48ca", "score": "0.65026057", "text": "changeSort(sort, sortAscending){\n }", "title": "" }, { "docid": "345bb57927224001d28a4cd9c1556fce", "score": "0.65003216", "text": "function initializeColumnSort(tableColumn) {\n\n var sort = tableColumn.enhancedTable.sort;\n\n // Add the pointer style to the header element\n $(sort.element).css('cursor', 'pointer');\n\n $(sort.element).on(\"click\", function (e) {\n\n e.stopPropagation();\n\n // Adjust the direction based on the previous direction\n // Ordering flow is Ascending -> Descending -> no sort\n switch (sort.direction) {\n case \"asc\":\n // We were ascending... so change to Descending\n sort.direction = \"desc\";\n break;\n\n case \"desc\":\n // We were descending... so change to NULL, no sort\n sort.direction = null;\n sort.position = null;\n\n // Since we removed a sort item, re-sort the headers based on their sort position\n properties.sortColumns = _.sortBy(properties.sortColumns, function (item) {\n return item.enhancedTable.sort.position == null ? 10000 : item.enhancedTable.sort.position;\n });\n break;\n\n default:\n // We were null or undefined, so we go to ascending now\n sort.direction = \"asc\";\n sort.position = 1000;\n\n // Since we added a sort item, re-sort the fields based on their sort position\n properties.sortColumns = _.sortBy(properties.sortColumns, function (item) {\n return item.enhancedTable.sort.position == null ? 10000 : item.enhancedTable.sort.position;\n });\n break;\n }\n\n // Recalculate the sortPosition property, for use in the header display\n _.each(properties.sortColumns, function (item, index) {\n if (item.enhancedTable.sort.position != null) {\n item.enhancedTable.sort.position = index;\n }\n });\n\n // If batchMode was sent as true, then don't set the sort, user will do this\n if (!properties.batchMode) reQuery();\n\n // Update the headers with the sort information (graphic, position)\n updateTableHeaders();\n\n });\n }", "title": "" }, { "docid": "76557efb17155cfb46438b71e0adc34d", "score": "0.6493817", "text": "function tableSortMain(rows,sortBy){\n rows.sort(function(a, b) {\n var A = $(a).data(sortBy);\n var B = $(b).data(sortBy);\n if(sortBy == 'name'){\n A = A.toUpperCase();\n B = B.toUpperCase();\n }\n if(A < B) {\n return (-1 * decision);\n }\n if(A > B) {\n return (1 * decision);\n }\n return 0;\n });\n}", "title": "" }, { "docid": "c41ad252af3387fcf6b010b4437abf75", "score": "0.6485393", "text": "function sorting_request(Painting_Local_Data_Parsed){\n\n let artist_sort = document.getElementById('btn_artist');\n let title_sort = document.getElementById('btn_title');\n let year_sort = document.getElementById('btn_year');\n\n artist_sort.addEventListener('click', ()=>{\n refresh_table_data();\n basedOnArtist(Painting_Local_Data_Parsed);\n });\n\n title_sort.addEventListener('click', ()=>{\n refresh_table_data();\n basedOnTitle(Painting_Local_Data_Parsed);\n });\n\n year_sort.addEventListener('click', ()=>{\n refresh_table_data();\n basedOnYear(Painting_Local_Data_Parsed);\n });\n \n }", "title": "" }, { "docid": "82f940a3f205e17d3defbbd4644c7626", "score": "0.6485015", "text": "sortData(sort, sortAscending, data){\n }", "title": "" }, { "docid": "a5532a3050124f435f8bb2366447fbf9", "score": "0.64845824", "text": "function sortTable(index) {\n function sortData(a, b) {\n switch (index) {\n case 0:\n if (a.name.firstName < b.name.firstName) return -1;\n else if (a.name.firstName > b.name.firstName) return 1;\n return 0;\n case 1:\n if (a.name.lastName < b.name.lastName) return -1;\n else if (a.name.lastName > b.name.lastName) return 1;\n return 0;\n case 2:\n if (a.about < b.about) return -1;\n else if (a.about > b.about) return 1;\n return 0;\n case 3:\n if (a.eyeColor < b.eyeColor) return -1;\n else if (a.eyeColor > b.eyeColor) return 1;\n return 0;\n default:\n break;\n }\n }\n if (sortDirection) {\n arr.sort(sortData).reverse()\n sortDirection = !sortDirection\n } else {\n arr.sort(sortData)\n sortDirection = !sortDirection\n }\n currentPage = 0;\n renderPagination()\n renderTable(currentPage)\n}", "title": "" }, { "docid": "963ebeb942e92c10e9d4506ef270774c", "score": "0.647154", "text": "headerClick(e) {\n this.sortData(e.target.id);\n this.renderTable();\n }", "title": "" }, { "docid": "a21931d081f26fe3f3e16b866187cbcb", "score": "0.6461429", "text": "function handleSort() {\n if (document.getElementById('sorted').checked) {\n topSpots.sort((a,b) => {\n return (a[\"distance\"] - b[\"distance\"]);\n }); //sort the array by distance\n } else {\n topSpots.sort((a,b) => {\n return a[\"origOrder\"] - b[\"origOrder\"];\n }); //sort the array by origOrder\n }\n updateTable(topSpots);\n}", "title": "" }, { "docid": "a8a8761391904d7620a04b4f7f6c7e56", "score": "0.64443034", "text": "function sortableTable(tableId, defaultSortField, defaultSortType, callback) {\r\n\tif ($(\"#\" + tableId) == \"undefined\")\r\n\t\treturn;\r\n\tsortFields = $(\"#\" + tableId + \" thead span:not(.unsort)\");\r\n\tsortFields.addClass(\"link\");\r\n\r\n\t// Click function of each column head.\r\n\tsortFields.click( function() {\r\n\t\tvar sortType = \"Desc\";\r\n\t\tif ($(this).is(\".sortAsc,.sortDesc\")) {\r\n\t\t\tif ($(this).is(\".sortDesc\")) {\r\n\t\t\t\t$(this).removeClass(\"sortDesc\");\r\n\t\t\t\t$(this).addClass(\"sortAsc\");\r\n\t\t\t\tsortType = \"Asc\"; \r\n\t\t\t} else {\r\n\t\t\t\t$(this).removeClass(\"sortAsc\");\r\n\t\t\t\t$(this).addClass(\"sortDesc\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$(\"#\" + tableId + \" .sortAsc\").removeClass(\"sortAsc\");\r\n\t\t\t$(\"#\" + tableId + \" .sortDesc\").removeClass(\"sortDesc\");\r\n\t\t\t$(this).addClass(\"sortDesc\");\r\n\t\t}\r\n\t\tif ($.isFunction(callback)) {\r\n\t\t\tcallback(tableId, $(this).attr('id'), sortType);\r\n\t\t}\r\n\t});\r\n\r\n\tif(defaultSortType.toLowerCase()=='desc'){defaultSortType=\"Desc\"}\r\n\tif(defaultSortType.toLowerCase()=='asc'){defaultSortType=\"Asc\"}\r\n\t\r\n\tsortFields.filter(\"[id='\" + defaultSortField+\"']\")\r\n\t\t\t.addClass(\"sort\" + defaultSortType);\r\n}", "title": "" }, { "docid": "752ec54601b054438d62a853834e3028", "score": "0.643735", "text": "function tableSortEvents(container, onTableSort = () => { }) {\n container.find('thead th .sort-header').unbind().click(function () {\n const sortKey = $(this).data('sort-key');\n const arrow = $(this).find('.arrow');\n let direction; // desc or asc\n const isArrowHidden = arrow.hasClass('d-none');\n if (isArrowHidden) {\n // showing arrow down, hence descending\n container.find('thead th .sort-header .arrow').addClass('d-none');\n arrow.removeClass('d-none');\n direction = 'desc';\n } else {\n const isArrowUp = arrow.hasClass('up-arrow-sort');\n // if up arrow is present remove and add down arrow\n if (isArrowUp) {\n // adding arrow down, hence descending\n arrow.removeClass('up-arrow-sort').addClass('down-arrow-sort');\n direction = 'desc';\n } else {\n // if down arrow remove and add up arrow, hence ascending\n direction = 'asc';\n arrow.removeClass('down-arrow-sort').addClass('up-arrow-sort');\n }\n }\n onTableSort(sortKey, direction);\n })\n}", "title": "" }, { "docid": "0b302fa50436a8d0167a23683854d4b0", "score": "0.64322966", "text": "function makeSortable(table) {\n\tvar headers = table.getElementsByTagName(\"th\");\n\tfor (var i = 0; i < headers.length; i++) {\n\t\t(function (n) {\n\t\t\t// Nested funtion to create a local scope\n\t\t\theaders[i].onclick = function () {\n\t\t\t\tsortrows(table, n);\n\t\t\t};\n\t\t})(i); // Assign value of i to the local variable n\n\t}\n}", "title": "" }, { "docid": "06f18968a3e78f2f42aeef01e74c2a50", "score": "0.64238554", "text": "constructor(props /*: TableProps */) {\n super(props);\n\n this.handleSort = sortBy => {\n if (this.props.sortBy === sortBy) {\n this.props.onSortChange({\n sortBy,\n isDescending: !this.props.isDescending\n });\n } else {\n this.props.onSortChange({\n sortBy,\n isDescending: false\n });\n }\n };\n }", "title": "" }, { "docid": "5fefa225783722770b6daa54dc9d8aef", "score": "0.64136016", "text": "onInit() {\n this.isReverseSorting = false;\n this.sortedColumnName = 'title';\n this.sortTableByColumn(this.sortedColumnName, this.isReverseSorting);\n }", "title": "" }, { "docid": "465dd429d7bb3a333ee518e92215e7bf", "score": "0.6406101", "text": "function sortTable() {\n getFromDb().then((allEmployees) => {\n var sortBy = document.getElementById('sortBy').value;\n\n switch (sortBy) {\n case '1':\n allEmployees.sort(sortNameAscending);\n break;\n case '2':\n allEmployees.sort(sortNameDescending);\n break;\n case '3':\n allEmployees.sort(sortAgeAscending);\n break;\n case '4':\n allEmployees.sort(sortAgeDescending);\n break;\n }\n document.getElementById(\"table-employees\").innerHTML = '';\n \n allEmployees.forEach(e => {\n AppendTable(e);\n });\n })\n}", "title": "" }, { "docid": "ab61386961c328127fd0b32a559435f1", "score": "0.6399086", "text": "function sort_table(sort_direction, sort_value) {\n sort_key = sort_value;\n sort_direction = sort_direction;\n\n let button_id = \"#table_key_\"+ sort_value;\n let this_sort_value = sort_value;\n let this_sort_direction = sort_direction;\n\n if(sort_direction ===\"desc\") {\n document.querySelector(button_id).setAttribute(\"data-sort\", \"asc\");\n\n\n let sorted_desc = global_obj.sort( function(a,b) {\n return (\"\"+ b[this_sort_value]).localeCompare(a[this_sort_value]);\n })\n // make all other field button sort-value \"no\"\n let sort_classes = document.querySelectorAll(\".key-name\");\n\n for(let button of sort_classes) {\n\n if(button.getAttribute(\"data-sortkey\") != this_sort_value) {\n button.setAttribute(\"data-sort\", \"no\");\n }\n }\n\n // update global values and build table\n global_obj = sorted_desc;\n sorted = sort(global_obj , fetch_n_rows());\n\n populate_table( table_id, sorted[+current]);\n add_nav_pagination(sorted, +current);\n update_url(fetch_n_rows(), +current , sort_value, sort_direction)\n // create a sort function make all other use a queryselect to sett all other fields to data-direction-no\n\n }\n else {\n\n document.querySelector(button_id).setAttribute(\"data-sort\", \"desc\");\n\n let sorted_desc = global_obj.sort( function(a,b) {\n return (\"\"+ a[this_sort_value]).localeCompare(b[this_sort_value]);\n })\n // make all other field button sort-value \"no\"\n let sort_classes = document.querySelectorAll(\".key-name\");\n\n for(let button of sort_classes) {\n\n if(button.getAttribute(\"data-sortkey\") != this_sort_value) {\n button.setAttribute(\"data-sort\", \"no\");\n }\n }\n\n // update global values and build table\n global_obj = sorted_desc;\n sorted = sort(global_obj , fetch_n_rows());\n populate_table( table_id, sorted[+current]);\n add_nav_pagination(sorted, +current);\n update_url(fetch_n_rows(), +current , this_sort_value, sort_direction)\n }\n }", "title": "" }, { "docid": "640e75bebf82b1b4b5d6ec17897041f9", "score": "0.63967466", "text": "sort() {\n \n // implement sort function\n // this.broadCastChanges(this.data);\n }", "title": "" }, { "docid": "ad7195bb73515453ee63697d26bb81f9", "score": "0.63829154", "text": "function sortTable() {\r\n //some variables\r\n var table = document.getElementById(\"myTable\");\r\n var rows, i;\r\n var switching = true;\r\n var first_row, second_row;\r\n var switchcount = 0;\r\n var sort_direction = 0; //ascending direction\r\n\r\n //start loop\r\n while (switching) {\r\n switching = false;\r\n rows = table.rows;\r\n //go through table data\r\n for (i = 1; i < (rows.length - 1); i++) {\r\n //get first and second row disctance\r\n first_row = rows[i].getElementsByTagName(\"td\")[3];\r\n second_row = rows[i + 1].getElementsByTagName(\"td\")[3];\r\n //dir is asc\r\n if (sort_direction == 0) {\r\n if (Number(first_row.innerHTML) > Number(second_row.innerHTML)) {\r\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\r\n switching = true;\r\n switchcount++;\r\n break;\r\n }\r\n } else {\r\n //dir is desc\r\n if (Number(first_row.innerHTML) < Number(second_row.innerHTML)) {\r\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\r\n switching = true;\r\n switchcount++;\r\n break;\r\n }\r\n }\r\n }\r\n //change direction after each click\r\n if (switchcount == 0 && sort_direction == 0) {\r\n sort_direction = 1;\r\n switching = true;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "d4192a2e9a19db348bcee7e085106cc5", "score": "0.6366842", "text": "function sort_table(head) {\r\n switch (head) {\r\n case 0:\r\n\r\n arr.sort(function (a, b) {\r\n if (a.FirstName < b.FirstName)\r\n return -1;\r\n if (a.FirstName > b.FirstName)\r\n return 1;\r\n return 0;\r\n });\r\n\r\n\r\n\r\n break;\r\n case 1:\r\n arr.sort(function (a, b) {\r\n if (a.LastName < b.LastName)\r\n return -1;\r\n if (a.LastName > b.LastName)\r\n return 1;\r\n return 0;\r\n });\r\n\r\n\r\n break;\r\n case 2:\r\n arr.sort(function (a, b) {\r\n if (a.Email < b.Email)\r\n return -1;\r\n if (a.Email > b.Email)\r\n return 1;\r\n return 0;\r\n });\r\n\r\n\r\n break;\r\n case 3:\r\n arr.sort(function (a, b) {\r\n return a.Id - b.Id;\r\n });\r\n\r\n break;\r\n case 4:\r\n arr.sort(function (a, b) {\r\n return a.PhoneNumber - b.PhoneNumber;\r\n });\r\n\r\n break;\r\n case 5:\r\n arr.sort(function (a, b) {\r\n if (a.Designation < b.Designation)\r\n return -1;\r\n if (a.Designation > b.Designation)\r\n return 1;\r\n return 0;\r\n });\r\n\r\n\r\n break;\r\n default:\r\n arr.sort(function (a, b) {\r\n return a.DOB - b.DOB;\r\n });\r\n\r\n }\r\n tabledata.remove();\r\n Generate();\r\n\r\n}", "title": "" }, { "docid": "b406b99dbe708d20cb7994738239fdab", "score": "0.6359466", "text": "function sortTable(index,tobj,doInit,isIndex)\n{\n\tvar obj, tIndex;\n\tif (isIndex != null)\n\t\tif (isIndex)\n\t\t{\n\t\t\ttIndex = tobj;\n\t\t\t// Look up the table object\n\t\t\tobj = tableIdArray[tobj];\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\ttIndex = findTableIndex(tobj.id);\n\t\t\tobj = tobj;\n\t\t}\n\n\t// Re-inializing the table object\n\tif (doInit) \n\t{\n\t\tif (colsToIgnore != null) \n\t\t\tinitTable(obj,colsToIgnore);\n\t\telse\n\t\t\tinitTable(obj);\n\t}\n\n\t// Local variables\n\tvar rowContent, rowProp, cellProp;\n\tvar rowCount;\n\tvar rowIndex;\n \tvar cellClass, cellOnClick, cellMouseOver, cellMouseOut;\n\tvar cmd;\n\t\n\t// Can't sort past the max allowed column size\n\tif (index < 0 || index >= maxNCol) return;\n\t\n\t// Assignment of sort index\n\tsortIndex = index;\n\t// Doing the sort using JavaScript generic function for an Array\n\trowArray.sort(compare);\n\n\t// Re-drawing the title row\n\tif (doInit || doSortUponLoad) redrawTitle(true);\n\n\t// Re-drawing the table\n\trowCount = 0;\n\tfor (var i=0; i<nRow; i++)\n\t{\n\t\tif (! colSpanArray[i])\n\t\t{\n\t\t\tfor (var j=0; j<maxNCol; j++)\n\t\t\t{\n\t\t\t\t// Skips the columns if set to ignore\n\t\t\t\tif (colsToIgnore != null)\n\t\t\t\t\tif (indexExist(colsToIgnoreArray,j)) \n\t\t\t\t\t\tcontinue;\n\t\t\t\trowContent = rowArray[rowCount].\n\t\t\t\t\tsplit(recDelimiter);\n\t\t\t\trowIndex = rowContent[maxNCol];\n\t\t\t\trowProp = rowPropArray[rowIndex].\n\t\t\t\t\tsplit(recDelimiter);\n\t\t\t\tcellProp = rowProp[j].split(cellPropDelimiter);\n\t\t\t\tcellClass = \n\t\t\t\t\ttable.rows[i].cells[j].getAttribute(\n\t\t\t\t\t\t'className');\n \t\t\t\tcellOnClick = table.rows[i].cells[j].onclick;\n \t\t\t\tcellMouseOver = \n \t\t\t\t\ttable.rows[i].cells[j].onmouseover;\n \t\t\t\tcellMouseOut = \n \t\t\t\t\ttable.rows[i].cells[j].onmouseout;\n\n\t\t\t\ttable.rows[i].deleteCell(j);\n\t\t\t\ttable.rows[i].insertCell(j);\n\n\t\t\t\t// Restoring cell properties\n\t\t\t\tfor (var k=0; k<cellPropArray.length; k++)\n\t\t\t\t{\n\t\t\t\t\tcmd = \"table.rows[i].cells[j].\" +\n\t\t\t\t\t\tcellPropArray[k] +\n\t\t\t\t\t\t\"=cellProp[\" + k + \"];\";\n\t\t\t\t\teval(cmd);\n\t\t\t\t}\n\n\t\t\t\ttable.rows[i].cells[j].innerHTML =\n\t\t\t\t\trowContent[j];\n\t\t\t\ttable.rows[i].cells[j].setAttribute(\n\t\t\t\t\t'className', cellClass, 0);\n \t\t\t\ttable.rows[i].cells[j].onclick = cellOnClick;\n \t\t\t\ttable.rows[i].cells[j].onmouseover = \n \t\t\t\t\tcellMouseOver;\n \t\t\t\ttable.rows[i].cells[j].onmouseout =\n \t\t\t\t\tcellMouseOut;\n\t\t\t}\n\t\t\trowCount++;\n\t\t}\n\t}\n\n\t// Switching btw descending/ascending sort\n\tif (doInit)\n\t{\n\t\tif (sortDirArray[tIndex])\n\t\t\tsortDirArray[tIndex] = false;\n\t\telse\n\t\t\tsortDirArray[tIndex] = true;\n\t}\n\tsetCursorDefault();\n}", "title": "" }, { "docid": "4d81b274319fb81ad47d5a9447e4ba68", "score": "0.63438666", "text": "onSortChanged() {\n if (this._sortChanged) {\n this._sortChanged.raise();\n }\n this.onFieldValueChanged('sort', this.sort);\n }", "title": "" }, { "docid": "9dfdeda240226a12c61a5efae6bb74ae", "score": "0.6329504", "text": "function sortTable(sTableID, iCol, sDataType) {\n //log(3, \"function sortTable\");\n return function(){\n var oTable = get(sTableID);\n var oTBody = oTable.tBodies[0];\n var colDataRows = oTBody.rows;\n var aTRs = new Array;\n\n for (var i = 0; i < colDataRows.length; i++) aTRs[i] = colDataRows[i];\n if (oTable.getAttribute(\"sortCol\") == iCol) aTRs.reverse();\n else aTRs.sort(generateCompareTRs(iCol, sDataType));\n\n var oFragment = document.createDocumentFragment();\n for (var i = 0; i < aTRs.length; i++) oFragment.appendChild(aTRs[i]);\n\n oTBody.appendChild(oFragment);\n oTable.setAttribute(\"sortCol\", iCol);\n }\n }", "title": "" }, { "docid": "a629c15de7bc7ceed39d6a022efcaff3", "score": "0.63267803", "text": "handleSortingButtonClicked_() {\n\t\tthis.emit('sortingButtonClicked', {\n\t\t\tsortingOrder: this.sortingOrder,\n\t\t});\n\t}", "title": "" }, { "docid": "eb618945487d12faac3b11d28d66153e", "score": "0.6326329", "text": "function sort_toDo_List(){\r\n if(sortBool===false)\r\n sort_toDo_List_by_date();\r\n else\r\n sort_toDo_List_by_name();\r\n refreshTable();\r\n }", "title": "" }, { "docid": "f6d145adab663c72ac3480afd0b1c551", "score": "0.6316317", "text": "function sortResults(e){\n switch (this.value) {\n case 'name':sortName(); break;\n case 'rating':sortRating(); break;\n case 'open':sortOpen(); break;\n default: {console.log('poop');}\n }\n }", "title": "" }, { "docid": "66fefc57299c6a54d27b5247d9eb555c", "score": "0.6316279", "text": "function doSort () {\r\n\t\t\tWidget.Data.Store.sort(getSorters());\r\n\t\t}", "title": "" }, { "docid": "8a695a26f4d71abeb7760b5cac33ad87", "score": "0.6314645", "text": "function sortChangedCallBack(grid, sortColumns) {\n if (sortColumns.length === 0) {\n console.log('removing sorting');\n //remove sorting\n vm.searchParams.sort = '';\n vm.searchParams.order = '';\n } else {\n vm.searchParams.sort = sortColumns[0].name; //sort the column\n switch( sortColumns[0].sort.direction ) {\n case uiGridConstants.ASC:\n vm.searchParams.order = 'ASC';\n break;\n case uiGridConstants.DESC:\n vm.searchParams.order = 'DESC';\n break;\n case undefined:\n break;\n }\n }\n\n //do the search with the updated sorting\n vm.searchFamilies();\n }", "title": "" }, { "docid": "2b016dfef294eb3c25a5a3cfb0064914", "score": "0.63143665", "text": "function handleSort(n) {\n var i, j, x, y;\n\n let rows = app.list.rows;\n\n for(j=rows.length-1; j>=0; j--){\n for(i=0; i<j; i++){\n x = rows[i].getElementsByTagName(\"td\")[n].innerHTML;\n y = rows[i + 1].getElementsByTagName(\"td\")[n].innerHTML;\n\n //it has problem to compare integer, so convert to float first\n if(n>0){\n x=parseFloat(x)\n y=parseFloat(y)\n }\n\n if(app.sortList==1){\n if(x > y){\n //insertedNode = parentNode.insertBefore(newNode, referenceNode)\n //parentNode : The parent of the newly inserted node.\n //newNode: The node to be inserted.\n //referenceNode :The node before which newNode is inserted. If this is null, then newNode is inserted at the end of parentNode's child nodes.\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\n }\n }\n\n else{\n if(x < y){\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\n }\n }\n }\n }\n //console.log(app.sortList)\n app.sortList= -app.sortList //double click will switch the order\n \n}", "title": "" }, { "docid": "f386310e8bc6352d967b5dce2bbf704a", "score": "0.63143253", "text": "sortHandle(e) {\n if (e.target.textContent === \"Account Name\") {\n this.sortValue = \"Account.Name\";\n\n e.target.classList.add(\"sorted\");\n } else if (e.target.textContent === \"City\") {\n this.sortValue = \"Account.BillingCity\";\n } else if (e.target.textContent === \"Account Type\") {\n this.sortValue = \"Account.Type\";\n } else if (e.target.textContent === \"Billing City\") {\n this.sortValue = \"Account.BillingCity\";\n } else {\n this.sortValue = e.target.textContent;\n }\n\n // removing sorted css class from all the th's\n let columnHeadings = this.template.querySelectorAll(\"th\");\n for (let i = 0; i < columnHeadings.length; i++) {\n columnHeadings[i].classList.remove(\"sorted\");\n }\n\n // add sorted css class on the clicked th\n e.target.classList.add(\"sorted\");\n\n // calling getSortedContacts method to get sorted contacts from salesforce\n this.getSortedContacts();\n }", "title": "" }, { "docid": "a85f414a31dcb661589c7f631d0f805c", "score": "0.6309162", "text": "function sortTableBy(btnID) {\n\tvar table = document.getElementById(\"theTable\");\n\tvar tableArr = [[]];\n\t//copy table into array format\n\tfor (var i=1; i<table.rows.length; i++) {\n\t\tvar row = [];\n\t\tfor (var j=0; j<table.rows[0].cells.length; j++) {\n\t\t\trow.push(table.rows[i].cells[j].innerHTML);\n\t\t}\n\t\ttableArr.push(row);\n\t}\n\t//determine which sort function to use\n\tswitch(btnID) {\n\t\tcase 0:\n\t\t\tif (sort_wasPressed[0]) {\n\t\t\t\t//sorting alphabetically\n\t\t\t\ttableArr.sort(function(a,b) {\n\t\t\t\t\tif (a[0]<b[0]) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\treturn 1;\n\t\t\t\t});\n\t\t\t\tsort_wasPressed[0] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//sorting reverse alphabetically\n\t\t\t\ttableArr.sort(function(a,b) {\n\t\t\t\t\tif (a[0]>b[0]) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\treturn 1;\n\t\t\t\t});\n\t\t\t\tsort_wasPressed[0] = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (sort_wasPressed[1]) {\n\t\t\t\ttableArr.sort(function(a,b) {\n\t\t\t\t\tif (a[0]<b[0]) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\treturn 1;\n\t\t\t\t});\n\t\t\t\tsort_wasPressed[1] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttableArr.sort(function(a,b) {\n\t\t\t\t\tif (a[0]>b[0]) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\treturn 1;\n\t\t\t\t});\n\t\t\t\tsort_wasPressed[1] = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (sort_wasPressed[2]) {\n\t\t\t\ttableArr.sort(function(a,b){return a[2]-b[2]});\n\t\t\t\tsort_wasPressed[2] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttableArr.sort(function(a,b){return b[2]-a[2]});\n\t\t\t\tsort_wasPressed[2] = 1;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\t//write new values into table\n\tfor (var i=1; i<table.rows.length; i++) {\n\t\tfor (var j=0; j<table.rows[0].cells.length; j++) {\n\t\t\ttable.rows[i].cells[j].innerHTML = tableArr[i][j];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d836a3aa9df637e43ab44318f699eb7d", "score": "0.6307926", "text": "function ts_resortTable( lnk ) {\n\tvar span = lnk.getElementsByTagName( 'span' )[0];\n\tvar td = lnk.parentNode;\n\tvar tr = td.parentNode;\n\tvar column = td.cellIndex;\n\tvar table = tr.parentNode;\n\n\twhile( table && !( table.tagName && table.tagName.toLowerCase() == 'table' ) ) {\n\t\ttable = table.parentNode;\n\t}\n\n\tif( !table ) {\n\t\treturn;\n\t}\n\n\tif( table.rows.length <= 1 ) {\n\t\treturn;\n\t}\n\n\tif( ts_number_transform_table == null ) {\n\t\tts_initTransformTable();\n\t}\n\n\tvar rowStart = table.tHead && table.tHead.rows.length > 0 ? 0 : 1;\n\tvar itm = '';\n\tfor( var i = rowStart; i < table.rows.length; i++ ) {\n\t\tif( table.rows[i].cells.length > column ) {\n\t\t\titm = ts_getInnerText( table.rows[i].cells[column] );\n\t\t\titm = itm.replace(/^[\\s\\xa0]+/,\"\").replace(/[\\s\\xa0]+$/,\"\");\n\t\t\tif( itm != '' ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tvar sortfn = ts_sort_generic;\n\tvar preprocessor = ts_toLowerCase;\n\tif( /^\\d\\d[\\/. -][a-zA-Z]{3}[\\/. -]\\d\\d\\d\\d$/.test( itm ) ) {\n\t\tpreprocessor = ts_dateToSortKey;\n\t} else if( /^\\d\\d[\\/.-]\\d\\d[\\/.-]\\d\\d\\d\\d$/.test( itm ) ) {\n\t\tpreprocessor = ts_dateToSortKey;\n\t} else if( /^\\d\\d[\\/.-]\\d\\d[\\/.-]\\d\\d$/.test( itm ) ) {\n\t\tpreprocessor = ts_dateToSortKey;\n\t} else if( /(^[\\u00a3$\\u20ac\\u00a4\\u00a5]|\\u00a2$)/.test( itm ) ) {\n\t\tpreprocessor = ts_currencyToSortKey;\n\t} else if( ts_number_regex.test( itm ) || /sm=n$/.test( itm ) ) {\n\t\tpreprocessor = ts_parseFloat;\n\t}\n\tvar reverse = span.getAttribute( 'sortdir' ) == 'down';\n\tvar newRows = new Array;\n\tvar staticRows = new Array;\n\tfor( var j = rowStart; j < table.rows.length; j++ ) {\n\t\tvar row = table.rows[j];\n\t\tif( ( ' ' + row.className + ' ' ).indexOf( ' unsortable ' ) < 0 ) {\n\t\t\tvar keyText = ts_getInnerText( row.cells[column] );\n\t\t\tvar oldIndex = reverse ? -j : j;\n\t\t\tvar preprocessed = preprocessor( keyText );\n\t\t\tnewRows[newRows.length] = new Array( row, preprocessed, oldIndex );\n\t\t} else {\n\t\t\tstaticRows[staticRows.length] = new Array( row, false, j-rowStart );\n\t\t}\n\t}\n\tnewRows.sort( sortfn );\n\tvar arrowHTML;\n\tif( reverse ) {\n\t\tarrowHTML = \"<img src=\\\"\" + ts_image_path + ts_image_down + \"\\\" alt=\\\"&darr;\\\"/>\";\n\t\tnewRows.reverse();\n\t\tspan.setAttribute( 'sortdir', 'up' );\n\t} else {\n\t\tarrowHTML = \"<img src=\\\"\" + ts_image_path + ts_image_up + \"\\\" alt=\\\"&uarr;\\\"/>\";\n\t\tspan.setAttribute( 'sortdir', 'down' );\n\t}\n\tfor( var i = 0; i < staticRows.length; i++ ) {\n\t\tvar row = staticRows[i];\n\t\tnewRows.splice( row[2], 0, row );\n\t}\n\tfor( var i = 0; i < newRows.length; i++ ) {\n\t\tif( ( ' ' + newRows[i][0].className + ' ' ).indexOf( ' sortbottom ' ) == -1 ) {\n\t\t\ttable.tBodies[0].appendChild( newRows[i][0] )\n\t\t}\n\t}\n\tfor( var i = 0; i < newRows.length; i++ ) {\n\t\tif( ( ' ' + newRows[i][0].className + ' ' ).indexOf( ' sortbottom ' ) != -1 ) {\n\t\t\ttable.tBodies[0].appendChild( newRows[i][0] )\n\t\t}\n\t}\n\tvar spans = getElementsByClassName( tr, 'span', 'sortarrow' );\n\tfor( var i = 0; i < spans.length; i++ ) {\n\t\tspans[i].innerHTML = \"<img src=\\\"\" + ts_image_path + ts_image_none + \"\\\" alt=\\\"&darr;\\\"/>\";\n\t}\n\tspan.innerHTML = arrowHTML;\n\tif( ts_alternate_row_colors ) {\n\t\tts_alternate( table );\n\t}\n}", "title": "" }, { "docid": "d5121f90bcbfc501ede9ebdf47b6cb32", "score": "0.6293758", "text": "cleanup() {\n this.updateSort();\n super.cleanup();\n }", "title": "" }, { "docid": "c87dadcaf63fd566dff6baf85d039f7b", "score": "0.62896", "text": "function renderTable(data) {\n\n var table = document.createElement(\"TABLE\");\n table.id = 'dataTable';\n table.border = \"1\";\n var tableHeader = [\"Payment ID\", \"Date\", \"Merchant ID\", \"Email ID\", \"Amount\", \"Status\"];\n table.className += ' data-table';\n var columnCount = Object.keys(data[0]).length;\n var row = table.insertRow(-1);\n for (var i = 0; i < columnCount; i++) {\n var headerCell = document.createElement(\"TH\");\n headerCell.addEventListener('click', sortTable.bind(null, i));\n headerCell.innerHTML = tableHeader[i];\n row.appendChild(headerCell);\n }\n\n //Add the data rows.\n for (var i = 1; i < data.length; i++) {\n row = table.insertRow(-1);\n for (var property in data[i]) {\n if (data[i].hasOwnProperty(property)) {\n\n var cell = row.insertCell(-1);\n cell.innerHTML = data[i][property];\n }\n }\n }\n\n var dvTable = document.getElementById(\"dvTable\");\n dvTable.innerHTML = \"\";\n dvTable.appendChild(table);\n\n}", "title": "" }, { "docid": "4e7a12c940e3b6ee9b8939a8c117cb45", "score": "0.6278696", "text": "function sortTable(n, object) {\n var table, vartype, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0;\n\n var object_id = object.id;\n var object_header = document.getElementById(object_id);\n var object_span = object_header.getElementsByTagName('span')[0].innerHTML;\n var presort = '<i class=\"fas fa-sort\"></i>';\n var sortup = '<i class=\"fas fa-sort-up\"></i>';\n var sortdown = '<i class=\"fas fa-sort-down\"></i>';\n\n table = document.getElementById(\"indexTable\");\n switching = true;\n // Set the sorting direction to ascending:\n dir = \"asc\";\n /* Make a loop that will continue until\n no switching has been done: */\n while (switching) {\n // Start by saying: no switching is done:\n switching = false;\n rows = table.rows;\n /* Loop through all table rows (except the\n first, which contains table headers): */\n for (i = 1; i < (rows.length - 1); i++) {\n // Start by saying there should be no switching:\n shouldSwitch = false;\n /* Get the two elements you want to compare,\n one from current row and one from the next: */\n x = rows[i].getElementsByTagName(\"TD\")[n];\n y = rows[i + 1].getElementsByTagName(\"TD\")[n];\n\n rowText1 = x.textContent;\n rowText2 = y.textContent;\n\n if (x.textContent === 'No Ratings') {\n rowText1 = '0';\n }\n if (y.textContent === 'No Ratings') {\n rowText2 = '0';\n }\n if (isNaN(rowText1) == false) {\n vartype = \"number\";\n }\n else {\n vartype = \"string\";\n }\n /* Check if the two rows should switch place,\n based on the direction, asc or desc: */\n if (vartype == \"string\") {\n if (dir == \"asc\") {\n if (rowText1.toLowerCase() > rowText2.toLowerCase()) {\n // If so, mark as a switch and break the loop:\n shouldSwitch = true;\n break;\n }\n }\n else if (dir == \"desc\") {\n if (rowText1.toLowerCase() < rowText2.toLowerCase()) {\n // If so, mark as a switch and break the loop:\n shouldSwitch = true;\n break;\n }\n }\n }\n else if (vartype == \"number\") {\n if (dir == \"asc\") {\n if (Number(rowText1) > Number(rowText2)) {\n // If so, mark as a switch and break the loop:\n shouldSwitch = true;\n break;\n }\n }\n else if (dir == \"desc\") {\n if (Number(rowText1) < Number(rowText2)) {\n // If so, mark as a switch and break the loop:\n shouldSwitch = true;\n break;\n }\n }\n }\n }\n if (shouldSwitch) {\n /* If a switch has been marked, make the switch\n and mark that a switch has been done: */\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\n\n document.getElementById(object.id).getElementsByTagName('span')[0].innerHTML = sortup;\n\n if (dir == \"desc\") {\n document.getElementById(object.id).getElementsByTagName('span')[0].innerHTML = sortdown;\n }\n switching = true;\n // Each time a switch is done, increase this count by 1:\n switchcount++;\n } else {\n /* If no switching has been done AND the direction is \"asc\",\n set the direction to \"desc\" and run the while loop again. */\n if (switchcount == 0 && dir == \"asc\") {\n dir = \"desc\";\n switching = true;\n }\n }\n }\n reapplyStripes()\n}", "title": "" }, { "docid": "d70bfd661339f4d4b8a04c4e18ceab96", "score": "0.6277142", "text": "function sortTable(sortOrder, sortBy) {\n setSort({ sortOrder, sortBy });\n }", "title": "" }, { "docid": "d8bf5599e362e97b9bdf4c0696d31e83", "score": "0.62739545", "text": "function ts_resortTable(lnk,clid) {\n\t\t// get the span\n\t\tvar span;\n\t\tfor (var ci=0;ci<lnk.childNodes.length;ci++) {\n\t\t\tif (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') {\n\t\t\t\tspan = lnk.childNodes[ci];\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar spantext = ts_getInnerText(span);\n\t\tvar td = lnk.parentNode;\n\t\tvar column = clid || td.cellIndex;\n\t\tvar table = getParent(td,'table');\n\t\t\n\t\t// Work out a type for the column\n\t\tif (table.rows.length <= 1) return;\n\t\tvar itm = ts_getInnerText(table.rows[1].cells[column]);\n\t\tsortfn = ts_sort_caseinsensitive;\n\t\n\t\t//ts_sort_date currently only handles these two formats\n\t\tif (itm.match(/^\\d\\d[\\/-]\\d\\d[\\/-]\\d\\d\\d\\d$/)) sortfn = ts_sort_date;\n\t\tif (itm.match(/^\\d\\d[\\/-]\\d\\d[\\/-]\\d\\d$/)) sortfn = ts_sort_date;\n\t\t\n\t\tif (itm.match(/^[£$]/)) sortfn = ts_sort_currency;\n\t\tif (itm.match(/^[\\d\\.]+$/)) sortfn = ts_sort_numeric;\n\t\tif (itm.match(/^(-)?[\\d\\.]+$/)) sortfn = ts_sort_numeric;\n\t\tSORT_COLUMN_INDEX = column;\n\t\t\n\t\t\n\t\tvar tbodies = table.getElementsByTagName(\"tbody\");\n\t\tfor (var h = 0; h < tbodies.length; h++) {\n\t\t\tvar tableBody = tbodies[h];\n\t\t\tvar newRows = new Array();\n\t\t\t\n\t\t\n\t\t\tvar trs = tableBody.getElementsByTagName(\"tr\");\n\t\n\t\t\tfor (var i = 0; i < trs.length; i++) {\n\t\t\t\tnewRows[i] = trs[i]; \n\t\t\t}\n\t\t\tnewRows.sort(sortfn);\n\t\n\t\n\t\t\tif (span.getAttribute(\"sortdir\") == 'down') {\n\t\t\t\tnewRows.reverse();\n\t\t\t}\n\t\t\t\n\t\t\t// We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones\n\t\t\t// don't do sortbottom rows\n\t\t\tfor (var i=0;i<newRows.length;i++) { \n\t\t\t\tif (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) {\n\t\t\t\t\ttableBody.appendChild(newRows[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t// do sortbottom rows only\n\t\t\tfor (var i=0;i<newRows.length;i++) { \n\t\t\t\tif (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) { \n\t\t\t\t\ttableBody.appendChild(newRows[i]);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\n\t\t}\n\n\t\n\t\tif (span.getAttribute(\"sortdir\") == 'down') {\n\t\t\tARROW = '&nbsp;&nbsp;&uarr;';\n\t\t\tspan.setAttribute('sortdir','up');\n\t\t} else {\n\t\t\tARROW = '&nbsp;&nbsp;&darr;';\n\t\t\tspan.setAttribute('sortdir','down');\n\t\t}\n\t\t\n\t\t// Delete any other arrows there may be showing\n\t\tvar allspans = document.getElementsByTagName(\"span\");\n\t\tfor (var ci=0;ci<allspans.length;ci++) {\n\t\t\tif (allspans[ci].className == 'sortarrow') {\n\t\t\t\tif (getParent(allspans[ci],\"table\") == getParent(lnk,\"table\")) { // in the same table as us?\n\t\t\t\t\tallspans[ci].innerHTML = '&nbsp;&nbsp;&nbsp;';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tspan.innerHTML = ARROW;\n\t}", "title": "" }, { "docid": "98937fc5602f9206454ffc998a237503", "score": "0.62666374", "text": "function sortFavorite(sortBy, orderBy) {\n var localArr=getLocalArr();\n var sortArr= new Array();\n if (sortBy==\"default\") {\n sortArr = ascendingSort(localArr,sortBy);\n // console.log(sortArr);\n } else {\n if(orderBy=='ascending') {\n sortArr = ascendingSort(localArr,sortBy);\n // console.log(\"ascending sortArray:\");\n // console.log(sortArr);\n }\n else {\n sortArr = descendingSort(localArr,sortBy);\n // console.log(\"descending sortArray:\");\n // console.log(sortArr);\n }\n\n }\n // show result on html\n refreshFavoriteTable(sortArr);\n}", "title": "" }, { "docid": "ce307451ab5f9dbddb5ac09a871f73af", "score": "0.6265288", "text": "function onSortChange() {\n offset = 0;\n $.bbq.pushState({sort:$('select#sort').val()});\n resources.sort(comparator);\n displayPage();\n}", "title": "" }, { "docid": "49f2ca088d64ae4fc1281390ae3bd797", "score": "0.62641597", "text": "function Sort(parent,sortSettings,sortedColumns,locator){_classCallCheck(this,Sort);this.contentRefresh=true;this.isModelChanged=true;this.aria=new AriaService();this.parent=parent;this.sortSettings=sortSettings;this.sortedColumns=sortedColumns;this.focus=locator.getService('focus');this.addEventListener();}", "title": "" }, { "docid": "300e756e88b693c60b1237d170192c92", "score": "0.62463653", "text": "function sub_table_sort(aTH)\r\n{\r\n\tvar tableData = app.get_parent_owner_by_tag(aTH, \"TABLE\");\t\r\n\tif(tableData.rows.length<2)return;\r\n\r\n\tvar strColName = aTH.getAttribute(\"dbname\");\r\n\tvar strTblName = aTH.getAttribute(\"tablename\");\r\n\tif(strTblName!=\"\") strColName = strTblName + \".\" + strColName;\r\n\r\n\tvar divSubData = app.get_parent_owner_by_id(tableData, \"subdataholder\");\t\r\n\tvar strFormID = divSubData.getAttribute(\"formid\");\r\n\tif(strFormID!=null)\r\n\t{\r\n\t\tvar oForm = document.getElementById(\"table\"+strFormID+\"_\");\r\n\t\tvar strOrderDir = oForm.getAttribute(\"orderbydir\");\r\n\t\tstrOrderDir=(strOrderDir==\"ASC\")?\"DESC\":\"ASC\";\r\n\t\toForm.setAttribute(\"orderbydir\",strOrderDir);\r\n\t\tget_sub_data(strFormID, strColName,strOrderDir);\r\n\t}\r\n}", "title": "" }, { "docid": "48459a528cc0de716f0144adb281dd67", "score": "0.62321234", "text": "doSort(col) {\n if (false == this.settings.multisort) {\n let state = this.sort[col];\n this.sort = {};\n this.sort[col] = state;\n }\n this.toggleSortColumn(col);\n return this.fetchData();\n }", "title": "" }, { "docid": "f3ad3d91e54ecf65dfc54bcbbbc8bf8e", "score": "0.62320805", "text": "function sortBy(sortArg) {\n let sortedArray;\n\n if (sortArg === \"id\") {\n sortedArray = tableData.sort(sortId);\n } else if (sortArg === \"datetime\") {\n sortedArray = tableData.sort(sortDate);\n } else if (sortArg === \"name\") {\n sortedArray = tableData.sort(sortName);\n } else if (sortArg === \"gender\") {\n sortedArray = tableData.sort(sortgender);\n }\n\n if (sortedArray) {\n tableBody.innerHTML = \"\";\n drawTableBody(sortedArray);\n }\n}", "title": "" }, { "docid": "b295aac5cf71851518d4fec97b50fbef", "score": "0.6230423", "text": "function fnOnload(){\n\tsortRows();\n\tsearchRows();\n}", "title": "" }, { "docid": "e40a7a2d239e3ee74130a9d95f63c12a", "score": "0.62238026", "text": "function menu_sort(menuIndex, rowIndex) {\n switch(menuIndex)\n {\n case 0:\n var cols = colIDtoShow[rowIndex];\n var content = colValuestoShow[rowIndex];\n var html = \"\";\n html += '<table class=\"table table-bordered text-left sortable\">';\n html += \"<thead><tr>\";\n html += '<th data-defaultsort=\"asc\" data-sortcolumn=\"0\" data-sortkey=\"0-1\">value</th>';\n html += '<th data-sortcolumn=\"1\" data-sortkey=\"1-1\">bin</th>';\n html += '<th data-sortcolumn=\"2\" data-sortkey=\"2-1\">process</th>';\n html += \"</tr></thead><tbody>\";\n for (var j=0;j<content.length;j++ ){\n html += \"<tr>\";\n if (content[j]+\"\".indexOf(\"<button\") < 0)\n html += '<td data-value =\"'+content[j]+'\">'+content[j]+\"</td>\";\n else{\n html += '<td data-value =\"'+j+'\">'+content[j]+\"</td>\";\n }\n html += '<td data-value =\"'+bins[cols[j].data]+'\">'+bins[cols[j].data]+\"</td>\";\n html += '<td style=\"background-color:'+colors[cols[j].data]+'\" data-value =\"'+processes[cols[j].data]+'\">'+processes[cols[j].data]+\"</td>\";\n html += \"</tr>\";\n }\n html += \"</tbody></table>\";\n // PopUp Sort Window \n BootstrapDialog.show({\n title: 'Datacard table sort by '+nuisances[rowIndex][0]+\": \"+nuisances[rowIndex][1]+' nuisance',\n message: function(){\n var $dialogTable = $(html);\n $dialogTable.find(\":button\").each(function(index, button) {\n add_cell_dialog_event($(button));\n });\n return $dialogTable;\n }\n });\n break;\n case 1:\n var cols = colIDtoShow[rowIndex];\n var content = colValuestoShow[rowIndex];\n var othersValues = [];\n var othersIDs = [];\n for (var j = 0;j<content.length;j++){\n if(othersValues.indexOf(content[j]) == -1)\n othersValues.push(content[j]);\n }\n for (var j = 0;j<othersValues.length;j++){\n othersIDs.push(getColIndicesOf(othersValues[j], content));\n }\n var html = \"\";\n html += '<table class=\"table table-bordered text-left sortable\">';\n html += \"<thead><tr>\";\n html += '<th data-defaultsort=\"asc\" data-sortcolumn=\"0\" data-sortkey=\"0-1\">value</th>';\n html += '<th data-sortcolumn=\"1\" data-sortkey=\"1-1\">others (bin/process)</th>';\n html += \"</tr></thead><tbody>\";\n for (var j = 0;j<othersValues.length;j++){\n html += \"<tr>\";\n if (othersValues[j]+\"\".indexOf(\"<button\") < 0)\n html += '<td data-value =\"'+othersValues[j]+'\">'+othersValues[j]+\"</td>\";\n else{\n html += '<td data-value =\"'+j+'\">'+othersValues[j]+\"</td>\";\n }\n var temp = \"\";\n for(var i = 0; i<othersIDs[j].length; i++){\n temp += bins[cols[othersIDs[j][i]].data]+'/' + processes[cols[othersIDs[j][i]].data]+'; ';\n }\n html += '<td data-value =\"'+ temp +'\">'+ temp+\"</td>\";\n html += \"</tr>\";\n }\n html += \"</tbody></table>\";\n\n BootstrapDialog.show({\n title: 'Datacard table sort by '+nuisances[rowIndex][0]+\": \"+nuisances[rowIndex][1]+' nuisance,<br>grouped by value',\n message: function(){\n var $dialogTable = $(html);\n $dialogTable.find(\":button\").each(function(index, button) {\n add_cell_dialog_event($(button));\n });\n return $dialogTable;\n }\n });\n break;\n case 2:\n var cols = colIDtoShow[rowIndex];\n var content = colValuestoShow[rowIndex];\n var othersValues = [];\n var othersIDs = [];\n for (var j = 0;j<cols.length;j++){\n if(othersValues.indexOf(processes[cols[j].data]) == -1)\n othersValues.push(processes[cols[j].data]);\n }\n var proclist = [];\n for (var j = 0;j<cols.length;j++){\n proclist.push(processes[cols[j].data]);\n }\n for (var j = 0;j<othersValues.length;j++){\n othersIDs.push(getColIndicesOf(othersValues[j], proclist));\n }\n var html = \"\";\n html += '<table class=\"table table-bordered text-left sortable\">';\n html += \"<thead><tr>\";\n html += '<th data-defaultsort=\"asc\" data-sortcolumn=\"0\" data-sortkey=\"0-1\">process</th>';\n html += '<th data-sortcolumn=\"1\" data-sortkey=\"1-1\">others (bin/value)</th>';\n html += \"</tr></thead><tbody>\";\n for (var j = 0;j<othersValues.length;j++){\n html += \"<tr>\";\n html += '<td style=\"background-color:'+colors[processes.indexOf(othersValues[j])]+'\" data-value =\"'+othersValues[j]+'\">'+othersValues[j]+\"</td>\";\n var temp = \"\";\n for(var i = 0; i<othersIDs[j].length; i++){\n temp += bins[cols[othersIDs[j][i]].data]+'/' + content[othersIDs[j][i]]+'; ';\n }\n html += '<td data-value =\"'+ temp +'\">'+ temp+\"</td>\";\n html += \"</tr>\";\n }\n html += \"</tbody></table>\";\n\n BootstrapDialog.show({\n title: 'Datacard table sort by '+nuisances[rowIndex][0]+\": \"+nuisances[rowIndex][1]+' nuisance,<br>grouped by process',\n message: function(){\n var $dialogTable = $(html);\n $dialogTable.find(\":button\").each(function(index, button) {\n add_cell_dialog_event($(button));\n });\n return $dialogTable;\n }\n });\n break;\n case 3:\n var cols = colIDtoShow[rowIndex];\n var content = colValuestoShow[rowIndex];\n var othersValues = [];\n var othersIDs = [];\n for (var j = 0;j<cols.length;j++){\n if(othersValues.indexOf(bins[cols[j].data]) == -1)\n othersValues.push(bins[cols[j].data]);\n }\n var binlist = [];\n for (var j = 0;j<cols.length;j++){\n binlist.push(bins[cols[j].data]);\n }\n for (var j = 0;j<othersValues.length;j++){\n othersIDs.push(getColIndicesOf(othersValues[j], binlist));\n }\n var html = \"\";\n html += '<table class=\"table table-bordered text-left sortable\">';\n html += \"<thead><tr>\";\n html += '<th data-defaultsort=\"asc\" data-sortcolumn=\"0\" data-sortkey=\"0-1\">bin</th>';\n html += '<th data-sortcolumn=\"1\" data-sortkey=\"1-1\">others (process/value)</th>';\n html += \"</tr></thead><tbody>\";\n for (var j = 0;j<othersValues.length;j++){\n html += \"<tr>\";\n html += '<td data-value =\"'+othersValues[j]+'\">'+othersValues[j]+\"</td>\";\n var temp = \"\";\n for(var i = 0; i<othersIDs[j].length; i++){\n temp += processes[cols[othersIDs[j][i]].data]+'/' + content[othersIDs[j][i]]+'; ';\n }\n html += '<td data-value =\"'+ temp +'\">'+ temp+\"</td>\";\n html += \"</tr>\";\n }\n html += \"</tbody></table>\";\n\n BootstrapDialog.show({\n title: 'Datacard table sort by '+nuisances[rowIndex][0]+\": \"+nuisances[rowIndex][1]+' nuisance,<br>grouped by bin',\n message: function(){\n var $dialogTable = $(html);\n $dialogTable.find(\":button\").each(function(index, button) {\n add_cell_dialog_event($(button));\n });\n return $dialogTable;\n }\n });\n break;\n case 4:\n //TODO OTHERS\n break;\n default:\n //code to be executed if n is different from case 1 and 2\n }\n}", "title": "" }, { "docid": "af96f33610cba42756638b4f1775124a", "score": "0.62191397", "text": "function sortData(colOrderNo) {\n\n var prevSortBy = $(colSortByName).val();\n var prevOrderNumber = $(colOrderNumber).val();\n\n // Logic to set ascending, when the previous sort by is descending OR vice versa.\n if (prevSortBy === null) {\n $(colSortByName).val('Ascending');\n }\n else if (prevSortBy === 'Ascending' && prevOrderNumber == colOrderNo) {\n $(colSortByName).val('Descending');\n }\n else if (prevSortBy === 'Descending' && prevOrderNumber == colOrderNo) {\n $(colSortByName).val('Ascending');\n }\n else {\n $(colSortByName).val('Ascending');\n }\n\n $(colOrderNumber).val(colOrderNo);\n\n // Call the Grid Paging JS function to rebind the partial view with paged plus sorted data.\n loadGridByPageID($(hidLastSelectedPageID).val());\n}", "title": "" }, { "docid": "4497115a5cd84c0d516be98d26e01dac", "score": "0.6215733", "text": "function noteAndSort(button, n, type) {\n /* Create notifications and start table sorting*/\n var notification = $('#sortingNotification');\n $('#sortingNotification h5').html('Подождите, идет сортировка...');\n notification.show();\n var endOfSort = $('#sortingEnded');\n var sorting = async function() {\n sort_table(button, n, type);\n }\n /* Without timeout notification can't be showed*/\n setTimeout(() => { sorting().then(function() {\n notification.hide();\n new Noty({\n type: 'success',\n text: '<h5>Сортировка завершена</h5>',\n timeout: '1000',\n progressBar: false,\n container: '#sortingEnded',\n callbacks: {\n onShow: function() {endOfSort.show();},\n onClose: function() {\n endOfSort.hide();\n endOfSort.empty()},\n }\n }).show();\n } );}, 10);\n}", "title": "" }, { "docid": "78c927eb19f125a78d0c5a1dd94055da", "score": "0.6214469", "text": "function sortTable() {\n const sort = id(\"db-sort\").value;\n const entries = [...qsa(\"#decks > li\")];\n \n const sorted = entries.sort((a, b) => {\n if (sort === \"NEW\") { return b.dataset.updated.localeCompare(a.dataset.updated); }\n if (sort === \"TITLE\") { return a.dataset.title.localeCompare(b.dataset.title); }\n if (sort === \"COLOR\") { return convertColor(a.dataset.colors) - convertColor(b.dataset.colors); }\n return 0;\n });\n \n const decks = id(\"decks\");\n sorted.forEach(item => decks.appendChild(item));\n}", "title": "" }, { "docid": "3352aaf35b941cfa742874a0f0fa4661", "score": "0.6213128", "text": "function toggleSort(){if(!self.activated){self.sort(true);return;}self.sort(!self.asc);}", "title": "" }, { "docid": "861769a2bbd58a930b231dd50c06400b", "score": "0.62028897", "text": "emitSortChange() {\n return this.sortFn && this.sortFn(this);\n }", "title": "" }, { "docid": "da6d5ef82ec8ae37028daa2b17743b4e", "score": "0.6199416", "text": "function resetTableSorting(e) {\n\n\tvar resetBtn = e.target;\n\tvar table = findAncestor(resetBtn, 'card__table-container').querySelector('table');\n\tvar tbody = table.querySelector('tbody');\n\tvar sortedTh = table.querySelectorAll('.tablesaw-sortable-descending, .tablesaw-sortable-ascending'); //only one in fact\n\tvar rows = Array.prototype.slice.call(tbody.querySelectorAll('tr'));\n\t\n\tsortedTh[0].classList.remove('tablesaw-sortable-descending'); //clear sorting styles\n\tsortedTh[0].classList.remove('tablesaw-sortable-ascending');\t\n\trows.sort(defaultTableSorting); //sort rows as at initial load\n\t\n\tfor(var i=0; i<rows.length; i++) { //sort dom elements of rows\n\t\ttbody.appendChild(rows[i]);\n\t\trows[i].classList.remove('table-container__row_hidden'); //show hidden rows\n\t}\n}", "title": "" }, { "docid": "c458a089fcda6a69224be1cb3243cb32", "score": "0.6193057", "text": "sort(compareFn) {\n this.data.sort(compareFn);\n }", "title": "" }, { "docid": "2ea05fff84b23e26484204de27d939d7", "score": "0.61721385", "text": "function sortTable(n, tableName) {\n var table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0;\n table = document.getElementById(tableName);\n switching = true;\n dir = \"asc\";\n while (switching) {\n switching = false;\n rows = table.getElementsByTagName(\"TR\");\n for (i = 1; i < (rows.length - 1); i++) {\n shouldSwitch = false;\n x = rows[i].getElementsByTagName(\"TD\")[n];\n y = rows[i + 1].getElementsByTagName(\"TD\")[n];\n if (dir == \"asc\") {\n if (parseInt(x.innerHTML) < parseInt(y.innerHTML)) {\n shouldSwitch= true;\n break;\n }\n } else if (dir == \"desc\") {\n if (parseInt(x.innerHTML) > parseInt(y.innerHTML)) {\n shouldSwitch= true;\n break;\n }\n }\n }\n if (shouldSwitch) {\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\n switching = true;\n switchcount ++;\n } else {\n if (switchcount == 0 && dir == \"asc\") {\n dir = \"desc\";\n switching = true;\n }\n }\n }\n}", "title": "" }, { "docid": "4293b930c5540f75b64cd56c22f2f1f0", "score": "0.6170953", "text": "sortKey () {\n this.dataSortby()\n }", "title": "" }, { "docid": "93e7d65ef4d7bc1e912735074dd9375c", "score": "0.61686265", "text": "function sortTable(){\r\n\t \r\n\tvar rows = $('.rate-row').get();\r\n\r\n\trows.sort(function(a, b) {\r\n\r\n\t\tvar e1 = $(a).children('td').eq(2).text();\r\n\t\tvar e2 = $(b).children('td').eq(2).text();\r\n\r\n\t\tvar E1 = parseInt(e1);\r\n\t\tvar E2 = parseInt(e2);\r\n\t\t\r\n\t\tif(E1 < E2) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(E1 > E2) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 0;\r\n\t});\r\n\r\n\t$.each(rows, function(index, row) {\r\n \r\n\t\t$('#rates-table').children('tbody').append(row);\r\n\t\t\r\n\t});\r\n}", "title": "" }, { "docid": "ea3828e70c33f28db39e5be667082378", "score": "0.61655664", "text": "function updateSort(){sorts.forEach(function(sort){if(!angular.equals(sort,self.activeSort)){sort.clear();}});}", "title": "" }, { "docid": "6c9f43fb107792875aa2b3598ed5ec6b", "score": "0.61582196", "text": "function SortRows(table,column) {\n\tsort_object = table;\n\tif (!sort_object.dosort) { return; }\n\tif (sort_column == column) { reverse=1-reverse; }\n\telse { reverse=0; }\n\tsort_column = column;\n\n\t// Save all form column contents into a temporary object\n\t// This is a nasty hack to keep the current values of form elements intact\n\tif (table.tablecontainsforms) {\n\t\tvar iname=\"1\";\n\t\tvar tempcolumns = new Object();\n\t\tfor (var i=0; i<table.Lines.length; i++) {\n\t\t\tfor (var j=0; j<table.Columns.length; j++) {\n\t\t\t\tif(table.Columns[j].type == \"form\") {\n\t\t\t\t\tvar cell_name = \"d\"+table.name+\"-\"+i+\"-\"+j;\n\t\t\t\t\tif (use_css) {\n\t\t\t\t\t\ttempcolumns[iname] = document.all[cell_name].innerHTML;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttempcolumns[iname] = document.getElementById(cell_name).innerHTML;\n\t\t\t\t\t}\n\t\t\t\t\ttable.Lines[i][j].text = iname;\n\t\t\t\t\tiname++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\n\tif (table.Columns[column].type == \"numeric\") {\n\t\t// Sort by Float\n\t\ttable.Lines.sort(\tfunction by_name(a,b) {\n\t\t\t\t\t\t\t\t\tif (parseFloat(a[column].data) < parseFloat(b[column].data) ) { return -1; }\n\t\t\t\t\t\t\t\t\tif (parseFloat(a[column].data) > parseFloat(b[column].data) ) { return 1; }\n\t\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t}\n\telse if (table.Columns[column].type == \"money\") {\n\t\t// Sort by Money\n\t\ttable.Lines.sort(\tfunction by_name(a,b) {\n\t\t\t\t\t\t\t\t\tif (parseFloat(a[column].data.substring(1)) < parseFloat(b[column].data.substring(1)) ) { return -1; }\n\t\t\t\t\t\t\t\t\tif (parseFloat(a[column].data.substring(1)) > parseFloat(b[column].data.substring(1)) ) { return 1; }\n\t\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t}\n\telse if (table.Columns[column].type == \"date\") {\n\t\t// Sort by Date\n\t\ttable.Lines.sort(\tfunction by_name(a,b) {\n\t\t\t\t\t\t\t\t\tif (Date.parse(a[column].data) < Date.parse(b[column].data) ) { return -1; }\n\t\t\t\t\t\t\t\t\tif (Date.parse(a[column].data) > Date.parse(b[column].data) ) { return 1; }\n\t\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t}\n\n\telse {\n\t\t// Sort by alphanumeric\n\t\ttable.Lines.sort(\tfunction by_name(a,b) {\n\t\t\t\t\t\t\t\t\tif (a[column].data+\"\" < b[column].data+\"\") { return -1; }\n\t\t\t\t\t\t\t\t\tif (a[column].data+\"\" > b[column].data+\"\") { return 1; }\n\t\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t}\n\n\tif (reverse) { table.Lines.reverse(); }\n\tfor (var i=0; i<table.Lines.length; i++) {\n\t\tfor (var j=0; j<table.Columns.length; j++) {\n\t\t\tvar cell_name = \"d\"+table.name+\"-\"+i+\"-\"+j;\n\t\t\tif (use_dom) {\n\t\t\t\tif(table.Columns[j].type == \"form\") {\n\t\t\t\t\tvar iname = table.Lines[i][j].text;\n\t\t\t\t\tdocument.getElementById(cell_name).innerHTML = tempcolumns[iname];\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdocument.getElementById(cell_name).innerHTML = table.Lines[i][j].text;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if (use_css) {\n\t\t\t\tif(table.Columns[j].type == \"form\") {\n\t\t\t\t\tvar iname = table.Lines[i][j].text;\n\t\t\t\t\tdocument.all[cell_name].innerHTML = tempcolumns[iname];\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdocument.all[cell_name].innerHTML = table.Lines[i][j].text;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse if (use_layers) {\n\t\t\t\tvar cell_namex= \"d\"+table.name+\"-\"+i+\"-\"+j+\"x\";\n\t\t\t\tif (table.Columns[j].align != '') {\n\t\t\t\t\tdocument.layers[cell_name].document.layers[cell_namex].document.write(\"<SPAN CLASS=\\\"\"+table.Columns[j].align+\"\\\">\");\n\t\t\t\t\t}\n\t\t\t\tdocument.layers[cell_name].document.layers[cell_namex].document.write(table.Lines[i][j].text);\n\t\t\t\tif (table.Columns[j].align != '') {\n\t\t\t\t\tdocument.layers[cell_name].document.layers[cell_namex].document.write(\"</SPAN>\");\n\t\t\t\t\t}\n\t\t\t\tdocument.layers[cell_name].document.layers[cell_namex].document.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "9646d209e289904a8f216ae1c7ed0a0a", "score": "0.6153918", "text": "function sortTable(n) {\n var orderArrow, table, rows, switching, i, x, y, shouldSwitch, dir, switchcount = 0;\n table = document.getElementById(\"movies\");\n orderArrow = document.getElementById(\"orderArrow\");\n\n if(orderArrow.classList.contains(\"fa-arrow-circle-left\")) {\n orderArrow.classList.remove(\"fa-arrow-circle-left\");\n orderArrow.classList.toggle(\"fa-arrow-circle-down\");\n }\n else if(orderArrow.classList.contains(\"fa-arrow-circle-down\")){\n orderArrow.classList.remove(\"fa-arrow-circle-down\");\n orderArrow.classList.toggle(\"fa-arrow-circle-up\");\n }\n else if(orderArrow.classList.contains(\"fa-arrow-circle-up\")){\n orderArrow.classList.remove(\"fa-arrow-circle-up\");\n orderArrow.classList.toggle(\"fa-arrow-circle-down\");\n }\n\n switching = true;\n dir = \"asc\"\n while (switching) {\n switching = false;\n rows = table.rows;\n\n for (i = 1; i < (rows.length - 1); i++) {\n shouldSwitch = false;\n x = rows[i].getElementsByTagName(\"TD\")[n];\n y = rows[i + 1].getElementsByTagName(\"TD\")[n];\n\n if (dir == \"asc\") {\n if (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase()) {\n shouldSwitch = true;\n break;\n }\n } else if (dir == \"desc\") {\n if (x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase()) {\n shouldSwitch = true;\n break;\n }\n }\n }\n\n if (shouldSwitch) {\n rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);\n switching = true;\n switchcount ++;\n } else {\n if (switchcount == 0 && dir == \"asc\") {\n dir = \"desc\";\n switching = true;\n }\n }\n }\n }", "title": "" }, { "docid": "d3373f09af0ab847b7baabed84031e74", "score": "0.61348766", "text": "function sortTableRows(event, idHtmlElementWithTableData) {\n try {\n // Retreive table data and table's metadata\n const tableData = $(`#${idHtmlElementWithTableData}`).prop(\"tableData\")\n const tableMetadata = $(`#${idHtmlElementWithTableData}`).prop(\"tableMetadata\")\n if (!tableData || !tableMetadata) throw (\"Asked to sort with unknown table data/metadata\")\n\n // Sort table data\n const currentSortOrder = $(event.currentTarget).prop(\"order\")\n let newSortOrder\n if ((currentSortOrder == \"descending\") || (currentSortOrder == \"ascending\")) {\n // Previously sorted on this column, so simply reverse data order\n tableData.reverse()\n newSortOrder = (currentSortOrder === \"ascending\") ? \"descending\" : \"ascending\"\n }\n else { // Not previously sorted\n newSortOrder = \"descending\" // default for sort\n\n // Make a compare function (specific to sort column's data type, and sort order)\n const dataAttribute = $(`#${event.currentTarget.id}`).attr(\"dataObjectAttribute\")\n const functionBody = createCompareFunctionBody(tableData[0], dataAttribute, newSortOrder)\n const compareFunction = Function(\"a, b\", functionBody)\n\n // Sort the table data\n tableData.sort(compareFunction)\n }\n\n // Store sorted table data\n $(`#${idHtmlElementWithTableData}`).prop(\"tableData\", tableData)\n\n // Update the table (with sorted data)\n tableMetadata.populateTableFunction(tableData)\n setColumnHeadersSortOrder(event.currentTarget.id, newSortOrder)\n }\n catch (errMsg) {\n throw(\"In sortTableRows(event, idHtmlElementWithTableData): \" + errMsg)\n }\n}", "title": "" }, { "docid": "12b72870063389d12c636d8db8b08c12", "score": "0.6132845", "text": "function sort($p) {\n /* create ($rows) a variable to hold the group of rows\n ** to be displayed on the selected page,\n ** ($s) the start point .. the first row in each page, Do The Math\n */\n var $rows = $th,$s = (($n * $p)-$n);\n for ($i = $s; $i < ($s+$n) && $i < $tr.length; $i++)\n $rows += $tr[$i];\n \n // now the table has a processed group of rows ..\n $table.innerHTML = $rows;\n // create the pagination buttons\n document.getElementById(\"buttons\").innerHTML = pageButtons($pageCount,$p);\n // CSS Stuff\n document.getElementById(\"id\"+$p).setAttribute(\"class\",\"active\");\n}", "title": "" }, { "docid": "384e8a072bcb60fda4918961b9ea6b3a", "score": "0.61306", "text": "function changeTS() {\nwindow['ts_alternate'] = function (table) {\n$(table).find(\"tbody\").find(\"tr:odd\").removeClass(\"alt\");\n$(table).find(\"tbody\").find(\"tr:even\").addClass(\"alt\");\n}\nwindow['ts_makeSortable'] = function (table) {\nif ($(table).find(\"tr\").length>0) firstRow = ($(table).find(\"th\").length>0)?$(table).find(\"tr:has(th)\").eq(0):$(table).find(\"tr\").eq(0);\nif (!firstRow) return;\nfirstRow.children(\":not('.unsortable')\").append('&nbsp;&nbsp;<a href=\"javascript:;\" class=\"sortheader\" onclick=\"ts_resortTable(this); return false;\"><span class=\"sortarrow\"><img src=\"'+ts_image_path+ts_image_none+'\" alt=\"&darr;\"/></span></a>');\nif (ts_alternate_row_colors) ts_alternate(table);\n}\n}", "title": "" }, { "docid": "2a21841c1cf2f8196eacd69bb42662b8", "score": "0.6128962", "text": "function onAfterSort() {\n\t\t$(document).on('sortCompleted', async function (e, ui) {\n\t\t\tlet itemId = ui.item.data('itemid'),\n\t\t\t\tparentId = ui.item.data('parent'),\n\t\t\t\tparent = ui.item.getParent(),\n\t\t\t\tnewParentId = parent.length ? parent.data('itemid') : 1;\n\n\t\t\tif (+parentId !== +newParentId) {\n\t\t\t\tconst resp = await parentAdoption({\n\t\t\t\t\tid: itemId,\n\t\t\t\t\tparent: newParentId,\n\t\t\t\t});\n\n\t\t\t\tif (resp.status) {\n\t\t\t\t\tui.item.data('parent', newParentId).attr('data-parent', newParentId);\n\t\t\t\t\thandleBranchOrdering(parent);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\thandleBranchOrdering(parent, true);\n\t\t});\n\t}", "title": "" }, { "docid": "4e1db5ec65d9a441db1da80e59c1434e", "score": "0.61274767", "text": "function sortRows(){\n\t//grab all header rows\n\t$('thead th').each(function(column) {\n\t $(this).addClass('sortable').click(function(){\n\t var findSortKey = function($cell) {\n\t return $cell.find('.sort-key').text().toUpperCase() + ' ' + $cell.text().toUpperCase();\n\t };\n\t var sortDirection = $(this).is('.sorted-asc') ? -1 : 1;\n\t \n\t //step back up the tree and get the rows with data\n\t //for sorting\n\t var $rows = $(this).parent().parent().parent().find('tbody tr').get();\n\t \n\t //loop through all the rows and find \n\t $.each($rows, function(index, row) {\n\t row.sortKey = findSortKey($(row).children('td').eq(column));\n\t });\n\t \n\t //compare and sort the rows alphabetically\n\t $rows.sort(function(a, b) {\n\t if (a.sortKey < b.sortKey) return -sortDirection;\n\t if (a.sortKey > b.sortKey) return sortDirection;\n\t return 0;\n\t });\n\t \n\t //add the rows in the correct order to the bottom of the table\n\t $.each($rows, function(index, row) {\n\t $('tbody').append(row);\n\t row.sortKey = null;\n\t });\n\t \n\t //identify the column sort order\n\t $('th').removeClass('sorted-asc sorted-desc');\n\t var $sortHead = $('th').filter(':nth-child(' + (column + 1) + ')');\n\t sortDirection == 1 ? $sortHead.addClass('sorted-asc') : $sortHead.addClass('sorted-desc');\n\t \n\t //identify the column to be sorted by\n\t $('td').removeClass('sorted')\n\t .filter(':nth-child(' + (column + 1) + ')')\n\t .addClass('sorted');\n\t \n\t $('.visible td').removeClass('odd');\n\t zebraRows('.visible:even td', 'odd');\n\t });\n\t});\n}", "title": "" }, { "docid": "59d1c66e7046d454dfafa0e5aa49d004", "score": "0.61248314", "text": "updateColumnSorting(event) {\n var fieldName = event.detail.fieldName;\n var sortDirection = event.detail.sortDirection; \n }", "title": "" }, { "docid": "a6a9579ed29e9284bdbf836141320150", "score": "0.61233944", "text": "function onSortChange(sortObject) {\n currentSort = sortObject;\n fetchProducts();\n}", "title": "" }, { "docid": "75be54be22b81441ea48bcc85ae4d0bf", "score": "0.6117187", "text": "sortToggle () {\n if(this.lastSortMethod == \"dec\") {\n this.sortPriceAscending();\n this.lastSortMethod = \"asc\";\n } else {\n this.sortPriceDecending();\n this.lastSortMethod = \"dec\";\n }\n }", "title": "" }, { "docid": "5ab4afa59dfc4454350ded442ca9f10a", "score": "0.6116916", "text": "function tierPriceTableSort(tableId) {\n var table = $('#' + tableId);\n\n function comperator(a, b) {\n\n function getValue(cell) {\n return Number(cell.find('input')[0].value);\n }\n\n return getValue($(a)) > getValue($(b));\n }\n\n table.find('th.table-column-quantity')\n .wrapInner('<span title=\"sort this column\"/>')\n .each(function () {\n var th = $(this),\n thIndex = th.index();\n // Filters through the table to just extract the sorting column\n table.find('td').filter(function () {\n return $(this).index() === thIndex;\n }).sortElements(comperator, function () {\n // parentNode is the element we want to move\n return this.parentNode;\n });\n\n });\n\n}", "title": "" }, { "docid": "cdc5fcc3f8cde4976f42b6c81ca408c5", "score": "0.61083484", "text": "doSort(e) {\n const value = e.target.value;\n if (value === \"sortByTitle\") { this.sortByTitle() }\n else if (value === \"sortByYear\") { this.sortByYear() }\n else if (value === \"sortByRating\") { this.sortByRatings() }\n }", "title": "" }, { "docid": "fd1f81f887435d5a519e826c9853c988", "score": "0.61072487", "text": "function sortFn() {\n console.time('fullsort');\n\n hideList();\n sort(desc);\n appendBack();\n desc = !desc;\n fixIcon(desc);\n showList();\n\n console.timeEnd('fullsort');\n}", "title": "" }, { "docid": "8bf06caa4f31c20c91d04a72b4b8c744", "score": "0.61030877", "text": "function enableSorting(flag) {\r\n\t\tif (flag) {\r\n\t\r\n\t\t\tvar usersTable = $(\"#report-list\");\r\n\t\t\tusersTable.trigger(\"update\");\r\n\t\t}\r\n\t\r\n\t}", "title": "" } ]
561623c1c42c48897f0dcb1281497958
opening calculation expendature modal popup with checking validation
[ { "docid": "269d58bc9b1cb7c3b3a4329c44b9fddd", "score": "0.6768339", "text": "function openCalExp(){debugger;\n\t//validating vendor details\n\tvar valVendorStatus=validateVendorDetails();\n\tif(valVendorStatus==false){\n\t\treturn false;\n\t}\n\t//validating product table\n\tvar flag = checkQuantityEnteredOrNot();\n\tif(flag==false){\n\t\treturn false;\n\t}\n\tmaincalculateOtherCharges();\n\tloadChildQty();\n\t\n\tchildprdctquantity = [];\n\t//reading child product Quantity from product table and pushing to childprdctquantity\n\t$(\".qtyinput\").each(function(){\n\t\tvar tempval = $(this).val();\n\t\tif(tempval!=0){\n\t\t\tchildprdctquantity.push(tempval);\n\t\t}\t\t\n\t});\n\t$(\"#anchorMarket\").attr(\"data-toggle\", \"modal\");\n\t$(\"#anchorMarket\").attr(\"data-target\", \"#modal-marketing\");\t\n\t$(\"#Quantity\").val(sessionStorage.tomodalqunval);\n\t$('#Quantity').bind('paste', function (e) { e.preventDefault();\t});\n}", "title": "" } ]
[ { "docid": "99779020362b97d7cd09ada1d3fafdc9", "score": "0.67937225", "text": "function showNormalPopup(price) {\n $(\"#modal-price\").html(price.toFixed(2));\n $(\"#normal-modal\").modal(\"show\");\n}", "title": "" }, { "docid": "d51b27297326aaa45efbefd556e0bdfc", "score": "0.65201575", "text": "function showDiscountedPopup(original_price, percent_off, free_movie) {\n $(\"#modal-original-price\").html(original_price.toFixed(2));\n $(\"#modal-discount-percent\").html(percent_off);\n $(\"#modal-discounted-price\").html((original_price * (100 - percent_off) / 100).toFixed(2));\n $(\"#modal-free-movie\").html(free_movie);\n $(\"#discount-modal\").modal(\"show\");\n}", "title": "" }, { "docid": "a75bd04629f8c2a88045676017cf993a", "score": "0.6435511", "text": "static confirmOtherExceptions() {\n if (calc.confirmException()) {\n window.alert(\"Enter a valid number in Highlighted fields\");\n } else {\n calc.amountPerPerson(\"show\");\n calc.tipPerPerson(\"show\");\n }\n\n }", "title": "" }, { "docid": "c9b80492c27c1cc693fb4f2f5377c767", "score": "0.63152057", "text": "function validation(btnname, myForm) {\n var validFields = formValidation(myForm,validatePO);\n\n if (validFields==true){\n displayPopUp(btnname);\n }\n }", "title": "" }, { "docid": "3f3c9ce5e1ec6e0ddffe65b7bc736ad7", "score": "0.63137716", "text": "function pay1(){\r\n\r\n\tjQuery(document).ready(function($){\r\n\t\t//open popup\r\n\t\t$('.btn-signin').on('click', function(event){\r\n\t\t\tevent.preventDefault();\r\n\t\t\t$('.cd-popup').addClass('is-visible');\r\n\t\t});\r\n \r\n var weight = document.getElementById(\"weight\").value;\r\n var category = document.getElementById(\"category\").value;\r\n\r\n var y=weight/10;\r\n\t\tdocument.getElementById(\"max\").innerHTML=\"Total Carbon Captured-\"+y+\"kg \"\r\n\t\t//close popup\r\n\t\t$('.cd-popup').on('click', function(event){\r\n\t\t\tif( $(event.target).is('.cd-popup-close') || $(event.target).is('.cd-popup') ) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t$(this).removeClass('is-visible');\r\n\t\t\t}\r\n\t\t});\r\n\t\t//close popup when clicking the esc keyboard button\r\n\t\t$(document).keyup(function(event){\r\n\t\t\tif(event.which=='27'){\r\n\t\t\t\t$('.cd-popup').removeClass('is-visible');\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n\t\r\n}", "title": "" }, { "docid": "39bcbb9e2213f22ab9ddd5e5390d4190", "score": "0.62794054", "text": "function cobrarView() {\n total = document.getElementById(\"cant_total\").innerText;\n document.getElementById(\"fac_total\").value = total;\n if (parseFloat(total) > 0) {\n $('#modal_cobrar').modal('toggle');\n $('#modal_cobrar').modal('show');\n } else {\n swal.fire(\"Ingrese productos!\", \"\", \"error\");\n }\n\n}", "title": "" }, { "docid": "987b76b9b224b85c76a4c8f5934bef63", "score": "0.6271133", "text": "function addNewCalculationsModal() {\n try {\n $('#calculation-modal').modal('show');\n var calc_modal_form = $('#calculation-modal-form');\n calc_modal_form.find('.btn-submit').removeAttr('disabled');\n calc_modal_form.find('.bk-yellow').removeClass('bk-yellow');\n calc_modal_form.find('select[name=SourceId], select[name=TargetId]').val(getParamModelId());\n calc_modal_form.find('select[name=SourceId], select[name=TargetId]').select2();\n calc_modal_form.find('select[name=SourceId], select[name=TargetId]').trigger('change');\n calc_modal_form.find('input[name=CalcId]').val('');\n calc_modal_form.find('input[name=CalcId]').trigger('keyup');\n var calc_order = parseInt(getMaxCalculationOrderNumber()) + 1;\n calc_modal_form.find('input[name=CalcOrder]').val(calc_order);\n showDataSourceTab();\n } catch (error) {\n displayCatchError('add-calculation-form-error');\n return false;\n }\n}", "title": "" }, { "docid": "03561c14014f6e0e3d96695820d5f437", "score": "0.6262318", "text": "function validate_and_calculate( form )\n{\n\n { var p = parseFloat(form.elements['Property_Price'].value.replace(/,/g, ''));\n var d = parseFloat(form.elements['Deposit'].value.replace(/,/g, ''));\n if( d>p ) { alert(\"El depósito necesita ser menor al precio de la propiedad, por favor revisarlo.\"); form.elements['Property_Price'].focus(); return false; }\n } \n \n calc();\n}", "title": "" }, { "docid": "c84de9aaddd6449c104b8b9014761077", "score": "0.6224851", "text": "function ShowResultbuytolet()\n{\n\n ///declare variables\n var\tPropertyValue\t=\t document.getElementById(\"valTextInput\").value;\n PropertyValue = parseFloat(PropertyValue.replace(/[^0-9.]/g, ''));\n var\tMonthlyRent\t\t=\t document.getElementById(\"rentTextInput\").value;\n MonthlyRent\t=\tparseFloat(MonthlyRent.replace(/[^0-9.]/g, ''));\n var MaxLoanLtv = 0\n var MaxLoantoRent = 0\n var MaxLoan = 0\n if (MonthlyRent > 0) {\n MaxLoantoRent = (MonthlyRent * 12)/ 0.06875;\n MaxLoantoRent = parseFloat(MaxLoantoRent);\n MaxLoan = MaxLoantoRent;\n }\n if (PropertyValue > 0) {\n MaxLoanLtv = PropertyValue * 0.75;\n MaxLoan = MaxLoanLtv;\n }\n if (MonthlyRent > 0 && PropertyValue > 0){\n if (MaxLoanLtv > MaxLoantoRent) { MaxLoan = MaxLoantoRent }\n else {MaxLoan = MaxLoanLtv}\n }\n MaxLoan = Math.round(MaxLoan * 100)\n MaxLoan = MaxLoan / 100\n\n MaxLoan = addCommas(MaxLoan);\n\n document.getElementById(\"maxborrow\").innerHTML = MaxLoan\n //document.getElementById('resultPane').style.display = \"block\";\n\n var resultPane = document.getElementById('resultPane')\n\n //validateForm(PropertyValue, MonthlyRent, resultPane)\n validateForm(resultPane,PropertyValue,MonthlyRent,0,0)\n\n}", "title": "" }, { "docid": "6b6a535e07c2e0905c3b117e609f5239", "score": "0.62161577", "text": "function verTerminosRequisitos() {\n $(\"#popUpterminos\").modal('show');\n}", "title": "" }, { "docid": "bcd0eb1ef1a3db59a02f7e32f3d9e565", "score": "0.6212935", "text": "function winPopUp() {\n $winAlert.show();\n }", "title": "" }, { "docid": "79b85d716b253e4b5306406799b6f6e3", "score": "0.6176392", "text": "popupDamage(readydamage = \"\", readysoak = \"\") {\n let confirmed = false;\n let speaker = getMacroSpeaker(this);\n let addeddamage = 0;\n let addedconditions = \"\";\n\n if (hasConditionsIronclaw(\"hurt\", this)) {\n addeddamage++;\n addedconditions = game.i18n.localize(CommonConditionInfo.getConditionLabel(\"hurt\"));\n }\n if (hasConditionsIronclaw(\"injured\", this)) {\n addeddamage++;\n addedconditions += (addedconditions ? \", \" : \"\") + game.i18n.localize(CommonConditionInfo.getConditionLabel(\"injured\"));\n }\n const confirmSend = game.settings.get(\"urbanjungle\", \"defaultSendDamage\");\n\n let dlog = new Dialog({\n title: game.i18n.format(\"urbanjungle.dialog.damageCalc.title\", { \"name\": speaker.alias }),\n content: `\n <form class=\"urbanjungle\">\n <h1>${game.i18n.format(\"urbanjungle.dialog.damageCalc.header\", { \"name\": this.data.name })}</h1>\n <div class=\"form-group\">\n <label class=\"normal-label\">${game.i18n.localize(\"urbanjungle.dialog.damageCalc.received\")}:</label>\n\t <input id=\"damage\" name=\"damage\" value=\"${readydamage}\" onfocus=\"this.select();\"></input>\n </div>\n <div class=\"form-group\">\n <label class=\"normal-label\">${game.i18n.localize(\"urbanjungle.dialog.damageCalc.soaked\")}:</label>\n\t <input id=\"soak\" name=\"soak\" value=\"${readysoak}\" onfocus=\"this.select();\"></input>\n </div>\n <div class=\"form-group\">\n <span class=\"normal-label\" title=\"${addeddamage ? game.i18n.format(\"urbanjungle.dialog.damageCalc.conditionDamageAdded\", { \"conditions\": addedconditions }) : game.i18n.localize(\"urbanjungle.dialog.damageCalc.conditionDamageNothing\")}\">\n ${game.i18n.localize(\"urbanjungle.dialog.damageCalc.conditionDamage\")}: ${addeddamage}</span>\n <input type=\"checkbox\" id=\"added\" name=\"added\" value=\"1\" checked></input>\n </div>\n <div class=\"form-group\">\n <label>${game.i18n.localize(\"urbanjungle.dialog.damageCalc.knockoutStrike\")}</label>\n <input type=\"checkbox\" id=\"knockout\" name=\"knockout\" value=\"1\"></input>\n </div>\n <div class=\"form-group\">\n <label>${game.i18n.localize(\"urbanjungle.dialog.damageCalc.nonLethal\")}</label>\n <input type=\"checkbox\" id=\"nonlethal\" name=\"nonlethal\" value=\"1\"></input>\n </div>\n <div class=\"form-group\">\n <label>${game.i18n.localize(\"urbanjungle.dialog.sendToChat\")}</label>\n <input type=\"checkbox\" id=\"send\" name=\"send\" value=\"1\" ${confirmSend ? \"checked\" : \"\"}></input>\n </div>\n </form>\n `,\n buttons: {\n one: {\n icon: '<i class=\"fas fa-check\"></i>',\n label: game.i18n.localize(\"urbanjungle.dialog.add\"),\n callback: () => confirmed = true\n },\n two: {\n icon: '<i class=\"fas fa-times\"></i>',\n label: game.i18n.localize(\"urbanjungle.dialog.cancel\"),\n callback: () => confirmed = false\n }\n },\n default: \"one\",\n render: html => { document.getElementById(\"damage\").focus(); },\n close: html => {\n if (confirmed) {\n let DAMAGE = html.find('[name=damage]')[0].value;\n let damage = 0; if (DAMAGE.length > 0) damage = parseInt(DAMAGE);\n let SOAK = html.find('[name=soak]')[0].value;\n let soak = 0; if (SOAK.length > 0) soak = parseInt(SOAK);\n let ADDED = html.find('[name=added]')[0];\n let added = ADDED.checked;\n let KNOCKOUT = html.find('[name=knockout]')[0];\n let knockout = KNOCKOUT.checked;\n let ALLOW = html.find('[name=nonlethal]')[0];\n let allow = ALLOW.checked;\n let SEND = html.find('[name=send]')[0];\n let send = SEND.checked;\n\n let statuses = this.applyDamage(damage + (added ? addeddamage : 0) - soak, knockout, allow);\n\n if (send) {\n const reportedStatus = statuses[statuses.length - 1];\n let chatData = {\n \"content\": game.i18n.format(\"urbanjungle.dialog.damageCalc.chatMessage\", { \"name\": speaker.alias, \"condition\": game.i18n.localize(CommonConditionInfo.getConditionLabel(reportedStatus)) }),\n \"speaker\": speaker\n };\n ChatMessage.applyRollMode(chatData, game.settings.get(\"core\", \"rollMode\"));\n CONFIG.ChatMessage.documentClass.create(chatData);\n }\n }\n }\n });\n dlog.render(true);\n }", "title": "" }, { "docid": "447735605ab37e09ecc8f3bdd54f7107", "score": "0.61689293", "text": "function Amount_validation_estimate(cur_html,cur_rate_val,main_amt)\n{\n if (cur_rate_val!=\"\" && cur_rate_val > main_amt) {\n if(main_amt!=0){\n $.alert({\n title: 'Alert!',\n content: 'Discount amount must be less than '+main_amt+'.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() { \n cur_html.val(\"\");\n reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n cur_html.focus();\n }\n }\n });\n }\n else{\n $.alert({\n title: 'Alert!',\n content: 'You are not allowed to enter any amount.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() { \n cur_html.val(\"\");\n reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n cur_html.focus();\n }\n }\n });\n }\n } \n else if (cur_rate_val!=\"\" && cur_rate_val<0) {\n $.alert({\n title: 'Alert!',\n content: 'Discount amount must be greater than '+main_amt+'.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() {\n cur_html.val(\"\");\n cur_html.focus();\n }\n }\n });\n }\n}", "title": "" }, { "docid": "501ab8c90dfe6152e7e382a5067cd36c", "score": "0.6137135", "text": "function isValid() {\n\t\tif (xSelect === \"metric\") {\n\t\t\tanswer = y.value / Math.pow(x.value, 2);\n\n\t\t}\n\t\tif (xSelect === \"metric2\") {\n\t\t\tanswer = y.value / Math.pow((x.value / 100), 2);\n\n\t\t}\n\t\tif (xSelect === \"eng\") {\n\t\t\tanswer = [ y.value / Math.pow(x.value, 2) ] * 703;\n\n\t\t}\n\t\tif (xSelect === \"eng2\") {\n\t\t\tgetinVal = parseFloat(za.value);\n\t\t\tgetInches = z.value * 12 + getinVal;\n\t\t\tanswer = [ y.value / Math.pow(getInches, 2) ] * 703;\n\n\t\t}\n\n\t\t// Invoke popup and display output\n\t\t$.mobile.changePage(answerOne, slide);\n\t\tdocument.getElementById('answer').innerHTML = Math.round(answer * 100) / 100;\n\t}", "title": "" }, { "docid": "0d188d1e05d5c437b3b7e1fb30a59506", "score": "0.609247", "text": "function popup() {\n if (\n window.confirm(\n `${myTeddy.name} , couleur : ${tedColor.value} , quantité : ${tedQuantity.value} , a été ajouté au panier .\nAller au panier \"OK\" ou Continuer vos achats \"Annuler\"`\n )\n ) {\n window.location.href = \"panier.html\";\n } else {\n window.location.href = \"index.html\";\n }\n }", "title": "" }, { "docid": "58c372083dc4fe656eaa7a1578e41558", "score": "0.6089915", "text": "function showExcursionValidation() {\n $ionicPopup.show({\n title : \"Nouvelle sortie\",\n templateUrl: 'app/connect-module/new-excursion.html',\n scope : $scope,\n buttons : [{\n text: \"Pas du tout\",\n type: \"button-assertive button-outline\"\n }, {\n text : \"C'est ça !\",\n type : \"button-balanced\",\n /**\n * When this button is tapped, creates the scanned excursion in the device memory and redirect to it.\n * @returns {boolean}\n */\n onTap: createScannedExcursion\n }]\n });\n }", "title": "" }, { "docid": "953b82ecddb704d4719be4a277f08b93", "score": "0.60890526", "text": "function displayExpressDonationDialog() {\n vex.closeTop();\n var dialogInput = [\n '<style>',\n '.vex-custom-field-wrapper {',\n 'margin: 1em 0;',\n '}',\n '.vex-custom-field-wrapper > label {',\n 'display: inline-block;',\n 'margin-bottom: .2em;',\n '}',\n '</style>',\n '<div class=\"vex-custom-field-wrapper\">',\n '<label for=\"date\">Amount to donate (USD).</label>',\n '<div class=\"vex-custom-input-wrapper\">',\n '<input name=\"donation\" type=\"number\" />',\n '</div>',\n '</div>'\n ]\n\n // if (Meteor.user()) {\n // dialogInput = dialogInput.concat([\n // '<div class=\"vex-custom-field-wrapper t20\">',\n // // set checkbox to show subscription options\n // // frequency, amount\n // '<div class=\"container\">',\n // '<form>',\n // '<div class=\"span4\">',\n // '<div class=\"\">',\n // '<p>Would you like to make subscription payments?</p>',\n // '<div class=\"col-xs-12 col-sm-6 col-md-4 checkbox\">',\n // '<input type=\"checkbox\" id=\"checkbox-Subscribe\" name=\"Subscribe\">',\n // '<label for=\"checkbox-Subscribe\">Subscribe</label>',\n // '</div>',\n // '</div>',\n // '<div class=\"t60 showSubscribeDates nodisplay\">',\n // '<div class=\"form-inline\">',\n // '<label class=\"control-label\">',\n // 'How frequently?</label>',\n // '<label class=\"radio\">',\n // '<input name=\"subscription_opt\" class=\"subscription_opt\" value=\"Daily\" type=\"radio\">Daily',\n // '</label>&nbsp;',\n // '<label class=\"radio\">',\n // '<input name=\"subscription_opt\" class=\"subscription_opt\" value=\"Weekly\" type=\"radio\">Weekly',\n // '</label>&nbsp;',\n // '<label class=\"radio\">',\n // '<input name=\"subscription_opt\" class=\"subscription_opt\" value=\"Monthly\" type=\"radio\" checked>Monthly',\n // '</label>&nbsp;',\n // '<label class=\"radio\">',\n // '<input name=\"subscription_opt\" class=\"subscription_opt\" value=\"Annually\" type=\"radio\">Annually',\n // '</label>',\n // '</div>',\n // '</div>',\n // '<div class=\"alert alert-info small showSubscribeDates nodisplay t20\">',\n // '<p><span id=\"subscriptionfreq\">Monthly</span> selected</p>',\n // '</div>',\n // '</div>',\n // '</form>',\n // '</div>',\n\n // '</div>'\n // ])\n // } else {\n // dialogInput = dialogInput.concat([\n // '<div class=\"vex-custom-field-wrapper t20 b20\">',\n // '<h4>Login to make subscription donation to this member!</h4>',\n // '</div>'\n // ])\n // };\n\n // dialogInput = dialogInput.concat([\n // '<div class=\"vex-custom-field-wrapper t20\">',\n // '<p>We are currently in test mode. You can make all your transactions with a test credit card number 4000 0000 0000 0077 exp 02/22 cvc 222 for your transactions.</p>',\n // '</div>'\n // ])\n\n vex.dialog.open({\n input: dialogInput.join(''),\n callback: expressDonationHandler,\n afterOpen: function() {\n $('#checkbox-Subscribe').off()\n $('#checkbox-Subscribe').on('change', function() {\n if($(this).prop('checked')) {\n $('.showSubscribeDates').show()\n } else {\n $('.showSubscribeDates').hide()\n }\n })\n\n $('#checkbox-SubscriptionDate').off()\n $('#checkbox-SubscriptionDate').on('change',function() {\n if($(this).prop('checked')) {\n $('.showSubscribeDatesInput').show()\n } else {\n $('.showSubscribeDatesInput').hide()\n }\n })\n\n $('.subscription_opt').off()\n $('.subscription_opt').on('change', function() {\n $('#subscriptionfreq').text($(this).val())\n })\n }\n });\n }", "title": "" }, { "docid": "eaca3b274eb8da2722e126068af6b7be", "score": "0.60802054", "text": "function showDiffParticipanValidation(excursions) {\n auth.existingExcursions = excursions;\n $ionicPopup.show({\n title : \"Sortie existante\",\n subTitle : auth.excursion.name,\n templateUrl: \"app/connect-module/diff-participant-validation.html\",\n scope : $scope,\n buttons : [{\n text: \"Hum... non\",\n type: \"button-assertive button-outline\"\n }, {\n text : \"Tout à fait.\",\n type : \"button-balanced\",\n /**\n * When this button is tapped, creates the scanned excursion in the device memory and redirect to it.\n * @returns {boolean}\n */\n onTap: createScannedExcursion\n }]\n });\n }", "title": "" }, { "docid": "bd2b78ebe35881229ae87b156065980d", "score": "0.6040784", "text": "function edit_Amount_validation_estimate(cur_html,cur_rate_val,main_amt,count)\n{\n // if (cur_rate_val!=\"\" && cur_rate_val>main_amt) {\n // if(main_amt!=0){\n // $.alert({\n // title: 'Alert!',\n // content: 'Discount amount must be less than '+main_amt+'.',\n // type: 'dark',\n // typeAnimated: true,\n // buttons: {\n // ok: function() {\n // cur_html.val(\"\");\n // edit_reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n // cur_html.focus();\n // }\n // }\n // });\n // }\n // else{\n // $.alert({\n // title: 'Alert!',\n // content: 'You are not allowed to enter any amount.',\n // type: 'dark',\n // typeAnimated: true,\n // buttons: {\n // ok: function() { \n // cur_html.val(\"\");\n // edit_reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n // cur_html.focus();\n // }\n // }\n // });\n // }\n // } \n // else if (cur_rate_val!=\"\" && cur_rate_val<0) {\n // $.alert({\n // title: 'Alert!',\n // content: 'Discount amount must be greater than '+main_amt+'.',\n // type: 'dark',\n // typeAnimated: true,\n // buttons: {\n // ok: function() {\n // cur_html.val(\"\");\n // cur_html.focus();\n // }\n // }\n // });\n // }\n\n if(count==0)\n {\n if (cur_rate_val!=\"\" && cur_rate_val>main_amt) {\n if(main_amt!=0){\n $.alert({\n title: 'Alert!',\n content: 'Discount amount must be less than '+main_amt+'.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() {\n cur_html.val(\"\");\n edit_reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n cur_html.focus();\n }\n }\n });\n }\n else{\n $.alert({\n title: 'Alert!',\n content: 'You are not allowed to enter any amount.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() { \n cur_html.val(\"\");\n edit_reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n cur_html.focus();\n }\n }\n });\n }\n } \n else if (cur_rate_val!=\"\" && cur_rate_val<0) \n {\n $.alert({\n title: 'Alert!',\n content: 'Discount amount must be greater than '+main_amt+'.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() {\n cur_html.val(\"\");\n cur_html.focus();\n }\n }\n });\n }\n \n count++;\n\n }\n return count;\n}", "title": "" }, { "docid": "5ba40280de1e3794785e315b981f5a69", "score": "0.603536", "text": "function PopUpInstruction(){\n ClearCanvas();\n swal({\n title:\"Calibration\",\n text: \"Please click on each of the 9 points on the screen. When clicking, make sure you are looking at that point. You must click on each point 5 times till it goes yellow. This will calibrate your eye movements.\",\n buttons:{\n cancel: \"Skip\",\n confirm: true\n }\n }).then((value) => {\n if (value) {\n ShowCalibrationPoint();\n } else {\n headmodel.calibrated = true;\n }\n });\n\n}", "title": "" }, { "docid": "ce3119ba0d41d55795e9a313eab8cb38", "score": "0.60285455", "text": "function ShowResult()\n{\n\n var\tLoan\t\t=\tdocument.getElementById(\"loanTextInput\").value;\n Loan\t\t\t=\tparseFloat(Loan.replace(/[^0-9.]/g, ''));\n var\tRate\t\t=\tdocument.getElementById(\"rateTextInput\").value;\n Rate\t\t\t=\tparseFloat(Rate.replace(/[^0-9.]/g, ''));\n var\tTerm\t\t=\tnew Number(document.getElementById(\"termTextInput\").value);\n Term\t\t\t=\tparseFloat(Term);\n\n var RepaymentAmount = calculaterepaymentpayment(Loan, Rate, Term);\n var InterestOnly = (Loan * (Rate/100))/12\n InterestOnly = Math.round(InterestOnly);\n\n RepaymentAmount = addCommas(RepaymentAmount);\n InterestOnly = addCommas(InterestOnly);\n\n document.getElementById('RepaymentAmount').innerHTML = RepaymentAmount;\n document.getElementById('InterestOnly').innerHTML = InterestOnly;\n\n //document.getElementById('resultPane').style.display = \"block\";\n\n var resultPane = document.getElementById('resultPane');\n\n validateForm(resultPane,Loan,Rate,Term,0)\n\n}", "title": "" }, { "docid": "58c2682e45afc027b862f2a59877506a", "score": "0.6020775", "text": "function showPresentValueCalculus(asset_id){\n if(asset_id) {\n $.ajax({\n url : '/lease/lease-valuation/show-lease-liability-calculus/'+asset_id,\n beforeSend : function(){\n $('.calculus_spinner_'+asset_id).show();\n },\n success : function (response) {\n $('.current_modal_body').html(response);\n $('#myModal').modal('show');\n $('.calculus_spinner_'+asset_id).hide();\n }\n });\n }\n}", "title": "" }, { "docid": "f4044f2e07986e57c06866850fb38741", "score": "0.60177046", "text": "function GetFormulaOld(parent, named, Index) {\n \n var element_LampInstalled = document.getElementById('txtbLampInstalled' + Index);\n var element_AverageHours = document.getElementById('txtbAverageHours' + Index);\n var element_PriceOld = document.getElementById('txtbPriceOld' + Index);\n var element_WattOld = document.getElementById('lblWattOld' + Index);\n var element_LifetimeOld = document.getElementById('lblLifetimeOld' + Index);\n\n var varTotalYCOld, varTotalYCNew, varTotalSaving;\n var electricityPrice, installationCost;\n var lampInstalled, averageHours, priceOld;\n\n // Assign 0 for those textboxes /inputs empty data\n // No. of Lamp Installed\n if (element_LampInstalled.value.length == 0) { lampInstalled = 0; } else { lampInstalled = element_LampInstalled.value; }\n // Average Hours\n if (element_AverageHours.value.length == 0) { averageHours = 0; } else { averageHours = element_AverageHours.value; }\n // Price Old\n if (element_PriceOld.value.length == 0) { priceOld = 0; } else { priceOld = element_PriceOld.value; }\n\n \n //parent.style.backgroundColor = \"#fdd29b\";\n // Return Total[YearlyCostOld, YearlyCostNew, Saving]\n display_PopupFormula('old', parent, named, lampInstalled, averageHours, priceOld, element_WattOld.innerHTML, element_LifetimeOld.innerHTML);\n\n\n}", "title": "" }, { "docid": "c9a8fb74db5817a802fb94824a5e7330", "score": "0.60133255", "text": "function addExistingCalculationsModal() {\n try {\n $('#select-existing-calculation-modal').modal({ backdrop: 'static', keyboard: false });\n var dataSources = getActiveDataSources(getParamCalcGroupId());\n var option = '';\n var data_sources = [];\n if (typeof (dataSources) !== 'undefined' && !$.isArray(dataSources)) {\n data_sources.push(dataSources);\n } else {\n data_sources = dataSources;\n }\n $.each(data_sources, function (i, item) {\n option += `<option value=\"${item.DobjectId}\">${item.DobjectId}</option>`;\n });\n $(\"#select-existing-calc-model-field\").html(option);\n $(\"#select-existing-calc-model-field\").val(getParamModelId());\n $(\"#select-existing-calc-model-field\").select2();\n $(\"#select-existing-calc-model-field\").trigger('change');\n } catch (error) {\n displayCatchError('add-existing-calculation-form-error');\n return false;\n }\n}", "title": "" }, { "docid": "253fde3b3d54cb6d1836776fb4825f02", "score": "0.60068554", "text": "function calcul(){\n\tif ($('form[name=\"form_calcul\"] button').hasClass('disabled') == false)\n\t{\n\t\tvar obj=document.form_calcul;\n\t\tvar C=obj.montant.value;\n\t\tvar t=obj.taux.value;\n\t\tvar m=obj.mensualite.value;\n\t\tvar n=obj.duree.value;\n\t\tvar temp=0;\n\t\tvar msg=\"\";\t\t\n\t\tt=t.replace(\",\",\".\");\n\t\tC=C.replace(\",\",\".\");\n\t\tm=m.replace(\",\",\".\");\n\t\tn=n.replace(\",\",\".\");\n\t\t\n\t\tif(msg==\"\"){\n\t\t\tif(C!=\"\"){\n\t\t\t\ttaux=t/1200;\n\t\t\t\tduree=n*12;\n\t\t\t\ttemp=1+taux;\n\t\t\t\ttemp=Math.pow(temp, -duree);\n\t\t\t\ttemp=1-temp;\n\t\t\t\ttemp=taux/temp;\n\t\t\t\ttemp=C*temp;\n\t\t\t\ttemp=Math.round(temp*100)/100;\n\t\t\t\tobj.mensualite.value=temp;\n\t\t\t\t$('.control-group:nth-of-type(4)').addClass(\"success\");\n\t\t\t}else{\n\t\t\t\ttaux=t/1200;\n\t\t\t\tduree=n*12;\n\t\t\t\ttemp=1+taux;\n\t\t\t\ttemp=Math.pow(temp, -duree);\n\t\t\t\ttemp=1-temp;\n\t\t\t\ttemp=temp/taux;\n\t\t\t\ttemp=m*temp;\n\t\t\t\ttemp=Math.round(temp*100)/100;\n\t\t\t\tobj.montant.value=temp;\n\t\t\t\t$('.control-group:nth-of-type(3)').addClass(\"success\");\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "185c70109939bcf3c8f0c778fe730fbf", "score": "0.60012186", "text": "function ShowResultaffordability() {\n\n // don't keep doing it, honestly, everything will go crazy.\n\n var App1Income = document.getElementById(\"app1incomeTextInput\").value;\n App1Income = parseFloat(App1Income.replace(/[^0-9.]/g, ''));\n App1Income = +App1Income || 0\n var App2Income = document.getElementById(\"app2incomeTextInput\").value;\n App2Income = parseFloat(App2Income.replace(/[^0-9.]/g, ''));\n\n\n App2Income = +App2Income || 0\n var income = App1Income + App2Income;\n var loweramount = income * 3;\n var higheramount = income * 4.25;\n loweramount = addCommas(loweramount);\n higheramount = addCommas(higheramount);\n document.getElementById('loweramount').innerHTML = loweramount;\n document.getElementById('higheramount').innerHTML = higheramount;\n var resultPane = document.getElementById('resultPane')\n //console.log(App2Income)\n\n validateForm(resultPane,App1Income,App2Income,0,0)\n\n //if(App1Income !== 0 || App2Income !==0){\n // console.log(\"it is empty\");\n // document.getElementById('resultPane').style.display = \"block\";\n //\n //}else{\n // console.log(\"Please fill in the blank spaces\");\n // document.getElementById(\"field-error\").style.display = \"block\";\n //}\n\n}", "title": "" }, { "docid": "63af5f3bbd28250aa31c2cecb5174e6e", "score": "0.59787226", "text": "function openmodal(){\n if (inputlength()<0){\n errorModal.style.display = \"block\";\n }\n}", "title": "" }, { "docid": "406449ce52cd714f5078d6876a2429ac", "score": "0.5976063", "text": "function showImportModal() {}", "title": "" }, { "docid": "1022c9d8455bcfb5761aa210f7031378", "score": "0.5967523", "text": "function clickHandler() {\n const ip = Number(initialPrice.value); //initial price\n const stockQ = Number(stocksQuantity.value);\n const curr = Number(curruntPrice.value); // currunt price\n if(ip > 0) {\n\n calculateProfitAndLoss(ip, curr, stockQ);\n }\n else {\n showOutput.innerText = \"please put your data!\";\n \n }\n}", "title": "" }, { "docid": "1b39bd9fe5d31e36ac1733c8ca2b66f7", "score": "0.59544146", "text": "function validate() {\n (props.theHoursX && props.theHoursX.length > 0) ?\n (function () {\n props.next();\n })()\n :\n setModalShow(true)\n } // end function validate", "title": "" }, { "docid": "6b45addb40af606d86f786c015653359", "score": "0.59407765", "text": "static buttonException(id) {\n let target = document.getElementById(id);\n\n if (Number(target.value) == 1 && id == \"number\") {\n window.alert(\"Number Exception\\nAtleast one member should be there\");\n } else if (Number(target.value) == 0) {\n window.alert(\"Tip Exception\\nTip Should be a positive in Value\");\n } else {\n (target.value) --\n if (id == \"tip\") {\n calc.tip = target.value;\n\n } else {\n calc.number = target.value;\n\n }\n this.confirmOtherExceptions();\n\n }\n\n }", "title": "" }, { "docid": "0efa230db9f2d794d8c423e6e9db7510", "score": "0.5928501", "text": "function popUp() {\n document.getElementById(\"pointsPopUp\").innerHTML = `Points: ${points}`\n document.querySelector(\".modal\").style.display = \"block\";\n}", "title": "" }, { "docid": "d9098abe5e5cf56a5edfc6530f4af0db", "score": "0.5889147", "text": "static billException() {\n let target = document.getElementById(\"bill\").value;\n\n if (Number(target) < 0) {\n this.showExceptionMessage(\"billException\",\n \"Bill Should be +ve in value\");\n calc.billException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n } else if (target.length == 0) {\n this.showExceptionMessage(\"billException\",\n \"Enter a valid number\");\n calc.billException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n\n } else {\n this.hideExceptionMessage(\"billException\");\n calc.billException = false;\n calc.bill = bill.value;\n this.confirmOtherExceptions();\n\n }\n\n }", "title": "" }, { "docid": "c75b5d0195c2be5c4dd3ebb0e0dd36cc", "score": "0.58842456", "text": "function callModal(){\n\t\tvar myModal = document.querySelector(\".modal\");\n\t\t\tmyModal.style.display = \"block\";\n\t\tvar alertHeader = document.getElementById(\"alertHeader\");\n alertHeader.innerHTML=\"DONE!\";\n var alertMain = document.getElementById(\"alertMain\");\n alertMain.innerHTML=\"SUCCESSFULLY ADDED!\";\n\t}", "title": "" }, { "docid": "836255d940f1d28f61121cdd53f6afad", "score": "0.5869777", "text": "function priceHandler(data) {\n setModalData(data);\n setModalIsOpen(true);\n }", "title": "" }, { "docid": "f4414aec0b8a2e438525a11632c6a448", "score": "0.58653367", "text": "function show_amountsave() {\n $(\"div.poamount-save\").show();\n}", "title": "" }, { "docid": "3193be81023db3214e19052ea516d172", "score": "0.58589196", "text": "function validateManage(){\r\n //hide loader\r\n loader.classList.add(\"hidden\");\r\n\r\n //validate input fields\r\n if(necessity.value == \"\" || accessories.value == \"\" || emergency.value == \"\" || savings.value == \"\" ){\r\n error_manage.innerHTML = \"Value for the input is not given . Please provide the value for all inputs.\";\r\n }\r\n else{\r\n error_manage.innerHTML = \"\";\r\n\r\n //check whether the percentage s exceeding 100\r\n var necessity_percentage = parseInt(necessity.value);\r\n var accessories_percentage = parseInt(accessories.value);\r\n var emergency_percentage = parseInt(emergency.value);\r\n var savings_percentage = parseInt(savings.value);\r\n\r\n let total = necessity_percentage + accessories_percentage + emergency_percentage + savings_percentage;\r\n\r\n if(total > 100){\r\n //show percentage exceeded error\r\n error_manage.innerHTML = \"The total percentage is exceeding 100 . Please make sure that it does not exceed 100\";\r\n }\r\n else{\r\n //evaluate the result\r\n error_manage.innerHTML = \"\";\r\n calculate(necessity_percentage , accessories_percentage , emergency_percentage , savings_percentage)\r\n }\r\n }\r\n}", "title": "" }, { "docid": "9a3eec75f63400b88feda36837945d47", "score": "0.58499706", "text": "function PopUpInstruction() {\n ClearCanvas();\n swal({\n title: \"Calibration\",\n text: \"Please click on each of the 9 points on the screen. You must click on each point 5 times till it goes yellow. This will calibrate your eye movements.\",\n buttons: {\n cancel: false,\n confirm: true\n }\n }).then(isConfirm => {\n ShowCalibrationPoint();\n });\n\n}", "title": "" }, { "docid": "eae4a1e1c6c90d09e62dbbf09073b30d", "score": "0.584948", "text": "function validate_mortgage_calculator_form( form )\n{\n if( isNaN( parseInt( form.elements['Property_Price'].value ) ) ) { alert(\"Por favor ingresa el precio de compra de la propiedad.\"); form.elements['Property_Price'].focus(); return false; }\n if( isNaN( parseInt( form.elements['Deposit'].value ) ) ) { alert(\"Por favor ingresa la cantidad de depósito o un 0 si no hay ningún depósito.\"); form.elements['Deposit'].focus(); return false; }\n if( isNaN( parseInt( form.elements['Duration'].value ) ) ) { alert(\"Por favor ingresa la duración de la hipoteca.\"); form.elements['Duration'].focus(); return false; }\n if( isNaN( parseInt( form.elements['InterestRate'].value ) ) ) { alert(\"Por favor ingresa la tasa de interés de la hipoteca.\"); form.elements['InterestRate'].focus(); return false; }\n validate_and_calculate( form );\n return true;\n}", "title": "" }, { "docid": "8e634a354239d988a6f9db522b94b96d", "score": "0.5833808", "text": "static numberException() {\n let target = document.getElementById(\"number\").value;\n if (Number(target) == 0) {\n this.showExceptionMessage(\"numberException\",\n \"Number should be greater than zero\");\n calc.numberException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n } else if (Number(target) < 0) {\n this.showExceptionMessage(\"numberException\",\n \"Number Should be +ve in value\");\n calc.numberException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n } else if (target.length == 0) {\n this.showExceptionMessage(\"numberException\",\n \"Enter a Valid Number\");\n calc.numberException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n } else if (!(Number.isInteger(Number(target)))) {\n this.showExceptionMessage(\"numberException\",\n \"Number should be a positive integer\");\n calc.numberException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n\n } else {\n this.hideExceptionMessage(\"numberException\");\n calc.numberException = false;\n calc.number = number.value;\n this.confirmOtherExceptions();\n\n }\n\n }", "title": "" }, { "docid": "20416e70ba86059ec867bfcea8eb2e07", "score": "0.5829488", "text": "function ValidModal(e){\n const element = e.target;\n if (!window[validationTypes[element.name].fct](element)){\n addErrorMessage(element, validationTypes[element.name].errorMsg);\n validations[element.name] = false;\n } else {\n validations[element.name] = true;\n removeErrorMessage(element);\n }\n}", "title": "" }, { "docid": "31b34e2cc58064910435181e6aa8695f", "score": "0.5818094", "text": "function openCustomerPriceModal(){\n _this.isAmountError = false;\n _this.isEditPaymentError = false;\n _this.customerPaymentTypeCopy = _this.customerPaymentType;\n modalInstanceCustomerPrice = $uibModal.open({\n scope:$scope,\n backdrop:'static',\n animation: true,\n templateUrl: 'scripts/modules/home/content/job/jobdetail/customerPrice.template.html',\n windowClass:'modalEditTeamMember InputCretCardPopup alertUpdateTimingPopUp CancelJobPopup'\n });\n }", "title": "" }, { "docid": "db36ae905b20933ceea02b893355526d", "score": "0.581558", "text": "function under6Prompt() {\n var under6Prompt = new gModal({\n title: \"Buy Tickets\",\n body: \"<center><p>How many under 6?</p><input type='text' id='under6'></center>\",\n buttons: [\n {\n content: \"Cancel\",\n classes: \"gmodal-button-gray\",\n bindKey: false, /* no key! */\n callback: function(modal){\n modal.hide();\n cancelAlert().show();\n }\n },{\n content: \"Confirm\",\n classes: \"gmodal-button-blue\",\n bindKey: 13, /* Enter */\n callback: function(modal){\n modal.hide();\n // Set HTML of where button was to the total price message\n document.getElementById(\"tickets\").innerHTML =\n \"<strong>Your total is:</strong><br>\" +\n \"$\" + totalPrice + \"<br>\" +\n \"Enjoy the flowers!\";\n if(isNaN(totalPrice)) {\n document.getElementById(\"tickets\").innerHTML = \"You didn't put in all numbers!\"\n }\n // totalAlert.show();\n }\n }\n ],\n close: {\n closable: false,\n }\n })\n return under6Prompt;\n}", "title": "" }, { "docid": "2e39cfa7f67126a9ad245ddaee639eff", "score": "0.5814712", "text": "function popupEmailDialog(invoiceData,profData,settings)\n {\n $mdDialog.show({\n templateUrl: 'app/main/invoices/dialogs/email/email.html',\n controller: 'InvoemailCtrl',\n controllerAs: 'vm',\n locals:{\n item : invoiceData,\n profData : profData,\n template : 'T_EMAIL_REC_NEWMAIL',\n type : 'recinvoice',\n amount : '',\n settings : settings\n }\n }).then(function(data){\n \n }, function(data){\n\n })\n }", "title": "" }, { "docid": "43959736cdee2c06509f82b6230a5f50", "score": "0.581186", "text": "showDialogReceipts() {\n isPay = 1;\n $('.action-isdisable').css({\n 'background': '',\n 'pointer-events': ''\n });\n var _settingPage = new SettingPage();\n var _settingPage = new SettingPage();\n var code = _settingPage.getRandCode();\n var valueCheck = _settingPage.getCookie(\"rdMoneyFund\");\n $('#dialogform .dialog-vouchers').removeClass('dialog-vouchers');\n $('#dialogform').addClass('dialog-receipts');\n $('#dialogform input[type=\"text\"]').val('');\n $('#dialogform input[type=\"number\"]').val('0');\n $('#dialogform td input').val('');\n //set code cho input \n $('input[name=\"inpVoucherNumber\"]').val(code);\n //set ngày hiện tại cho input \n $('#dialogform input#VoucherCreatedDate').val(toDay);\n $('input[name=\"inpItem\"]').val('Công nợ');\n _settingPage.settingDialogFrom('nhận', 'thu', 'thu nợ');\n //dialog thêm phiếu thu tiền\n var dialogAddReceipts = new Dialog('.dialog-receipts', 'Thêm phiếu thu tiền', 960, 600);\n dialogAddReceipts.Open();\n $('#dialogform input').attr('disabled', false);\n $('.btn-editOfDialog').attr('disabled', true);\n $('.btn-saveOfDialog').attr('disabled', false);\n $('#dialogform div.input-container').css('background-color', '#fff');\n\n if (valueCheck == 'moneyFundOther') {\n\n $('#moneyFundOther').prop(\"checked\", true);\n //disable input with id employeeSpend\n document.getElementById(\"employeeSpend\").disabled = true;\n $('.documentNumber').css('visibility', 'visible');\n $('.isDisabled').attr('disabled', false);\n $('input[name=\"inpItem\"]').val('Công nợ');\n document.getElementById(\"employeeSpend\").disabled = true;\n // đổi text\n //$('div.changeObj').html('Đối tượng');\n // setting on/off các trường khi chọn radio button other/pay\n _settingPage.settingDisplay(false);\n }\n else {\n $('#moneyFundPay').prop(\"checked\", true);\n //radiobtn = document.getElementById(\"moneyFundPay\");\n //radiobtn.checked = true;\n $('.selectVoucher').css({\n 'visibility': 'visible',\n 'opacity': '1',\n 'pointer-events': 'all'\n });\n $('.documentNumber').css('visibility', 'hidden');\n $('.isDisabled').attr('disabled', true);\n $('input.isDisabled').val('');\n // đổi text\n //$('div.changeObj').html('Nhà cung cấp');\n // setting on/off các trường khi chọn radio button other/pay\n _settingPage.settingDisplay(true);\n }\n }", "title": "" }, { "docid": "1f62f3f0485c23daa22092c1cc0d19b5", "score": "0.58064073", "text": "function calc()\n{\n document.getElementById('Mortgage').value=formatMoney(IDv('Property_Price')-IDv('Deposit'));\n document.getElementById('Repayment').value=formatMoney(((IDv('Property_Price')-IDv('Deposit'))*(((IDv('InterestRate')/100))/12)*Math.pow((1+(IDv('InterestRate')/100)/12),(IDv('Duration')*12)))/(Math.pow((1+(IDv('InterestRate')/100)/12),IDv('Duration')*12)-1));\n document.getElementById('Interest').value=formatMoney(((IDv('Property_Price')-IDv('Deposit'))*(IDv('InterestRate')/100))/12);\n}", "title": "" }, { "docid": "45d5a9d7c938ab31f56f771d74953db6", "score": "0.58058953", "text": "function popUpModal() {\n\tlet openModa = document.querySelector('.showsummary');\n\topenModa.style.display = 'block';\n\tgetInputValue()\n\tlet username = document.querySelector('#username').value;\n\tlet message = document.querySelector('.summaryMessage');\n\tmessage.innerText = 'Thank you ' + username + ' for patronizing us';\n\tclearCart();\n}", "title": "" }, { "docid": "ddc2bb58e225f31d28a0f55315722914", "score": "0.5805447", "text": "function displayEstimations() {\n\n if (!validateNumNights()) {\n return;\n };\n if (!validateRoomOccupency()) {\n return;\n }\n\n let roomCost = getRoomCost(roomTypeField.value, checkinDateField.value, noOfNightsField.value);\n\n let discountType = document.querySelector(\"input[name=discount]:checked\").value;\n let discount = getDiscount(roomCost, discountType);\n\n let breakfastCost = 0.0;\n let breakfastVal = document.querySelector(\"input[name=breakfast]:checked\").value;\n if (breakfastVal == \"true\") {\n breakfastCost = getbreakfastCost(adultsField.value, kidsField.value, noOfNightsField.value, \"\");\n }\n\n let tax = (roomCost + breakfastCost - discount) * 0.12;\n let totalCost = (roomCost + breakfastCost - discount) + tax;\n\n alertDiv.style.display = \"none\";\n resultDiv.style.display = \"block\";\n resultDiv.innerHTML = \"<p><strong>Checkin Date:</strong> \" + checkinDateField.value + \"</p>\" +\n \"<p><strong>Checkout Date:</strong> \" + checkoutDateField.value + \"</p>\" +\n \"<p><strong>Hotel Cost:</strong> $\" + (roomCost + breakfastCost).toFixed(2) + \"</p>\" +\n \"<p class='red'><strong>Discount:</strong> ($\" + discount.toFixed(2) + \")</p>\" +\n \"<p><strong>Tax:</strong> $\" + tax.toFixed(2) + \"</p>\" +\n \"<p><strong>Total Cost:</strong> $\" + totalCost.toFixed(2) + \"</p>\";\n }", "title": "" }, { "docid": "54aa9eec353d99542e34fb9d50dc8617", "score": "0.5796842", "text": "showDialogVoucher() {\n isPay = 0;\n $('.action-isdisable').css({\n 'background': '',\n 'pointer-events': ''\n });\n var _settingPage = new SettingPage();\n var code = _settingPage.getRandCode();\n var valueCheck = _settingPage.getCookie(\"rdMoneyFund\");\n $('#dialogform input[type=\"text\"]').val('');\n $('#dialogform input[type=\"number\"]').val('0');\n $('#dialogform td input').val('');\n //set code cho input \n $('input[name=\"inpVoucherNumber\"]').val(code);\n //set ngày hiện tại cho input \n $('#dialogform input#VoucherCreatedDate').val(toDay);\n $('#dialogform .dialog-receipts').removeClass('dialog-receipts');\n $('#dialogform').addClass('dialog-vouchers');\n _settingPage.settingDialogFrom('nộp', 'chi', 'trả nợ');\n //dialog thêm phiếu chi tiền\n var dialogAddVouchers = new Dialog('.dialog-vouchers', 'Thêm phiếu chi tiền', 960, 600);\n dialogAddVouchers.Open();\n $('#dialogform input').attr('disabled', false);\n $('.btn-editOfDialog').attr('disabled', true);\n $('.btn-saveOfDialog').attr('disabled', false);\n $('#dialogform div.input-container').css('background-color', '#fff');\n \n if (valueCheck == 'moneyFundOther') {\n \n $('#moneyFundOther').prop(\"checked\", true);\n //disable input with id employeeSpend\n document.getElementById(\"employeeSpend\").disabled = true;\n $('.documentNumber').css('visibility', 'visible');\n $('.isDisabled').attr('disabled', false);\n $('input[name=\"inpItem\"]').val('Công nợ');\n document.getElementById(\"employeeSpend\").disabled = true;\n // đổi text\n //$('div.changeObj').html('Đối tượng');\n // setting on/off các trường khi chọn radio button other/pay\n _settingPage.settingDisplay(false);\n }\n else {\n $('#moneyFundPay').prop(\"checked\", true);\n //radiobtn = document.getElementById(\"moneyFundPay\");\n //radiobtn.checked = true;\n $('.selectVoucher').css({\n 'visibility': 'visible',\n 'opacity': '1',\n 'pointer-events': 'all'\n });\n $('.documentNumber').css('visibility', 'hidden');\n $('.isDisabled').attr('disabled', true);\n $('input.isDisabled').val('');\n // đổi text\n //$('div.changeObj').html('Nhà cung cấp');\n // setting on/off các trường khi chọn radio button other/pay\n _settingPage.settingDisplay(true);\n }\n }", "title": "" }, { "docid": "6ed7a61c90fabb9421f6b1c23222c5a4", "score": "0.5789621", "text": "function showComplianceDocWindow(elem) {\n if ($(elem).hasClass('action-disabled')) return false;\n AskComplianceWnd.center().open();\n $(\"#AskComplianceWndForm\").validationEngine();\n return true;\n}", "title": "" }, { "docid": "434f0792bca4f298e2d672f0235eb983", "score": "0.57881904", "text": "function fnFetchClauseDetails()\n{\nvar radio_buttons = $(\"input[name='leadClauseSeqNo']\");\nif( radio_buttons.filter(':checked').length == 0){\n\t\tvar id = '20';\n\t\thideErrors();\n\t\taddMsgNum(id);\n\t\tshowScrollSuggestErrors(\"leadClauseSeqNo\",radio_buttons.length-1);\n}\nelse{\n//$.modal.close(); //Commented for CR-131\n$('#modal').modal('toggle'); //added for CR-131\nvar ModClause=document.forms['ModelAddClauseForm'];\nvar leadClaMdlSeq= document.forms[0].leadClaMdlSeq.value;\nvar leadClaSubSecSeq=document.forms[0].leadClaSubSecSeq.value;\n\ndocument.forms[0].action=\"modelAddClauseAction.do?method=fetchClauseDetails&leadClaMdlSeqNo=\"+leadClaMdlSeq+\"&leadClaSubSecSeq=\"+leadClaSubSecSeq+\"\";\ndocument.forms[0].submit();\n}\n}", "title": "" }, { "docid": "3748eefcf13f4ffa36d8a67e5e54ba0a", "score": "0.57853246", "text": "function OnFailedApproveOEQ() {\n\n $(\"#form-primary-approve\").modal(\"hide\");\n $('#next').prop('disabled', true);\n alert('Select any Custom OEQ Template.');\n}", "title": "" }, { "docid": "fc274b0eae6e7da692c3a14b54c8ba2b", "score": "0.57845163", "text": "function invalid() {\n\t$('#badSearch').modal('show');\n}", "title": "" }, { "docid": "d22dc3b3b8d2d7257244519c0cbdea81", "score": "0.5769824", "text": "function verifyConfig(modal_id, form_id){\n\tvar passed = true;\n\tpassed = passed && (Number(document.getElementById(\"srate_value\").value) >= 5.0);\n\tif(passed)\n\t\tsubmitFormAJAX(modal_id, form_id)\n\telse\n\t\talert(\"Tasa de muestreo mínima de 5 s. Corrija el valor e inténtelo nuevamente.\");\n}", "title": "" }, { "docid": "b532586e742c4b21974551788112e7cb", "score": "0.57581383", "text": "function openStepForm(step_id, action = \"edit\", calc_id = '') {\n try {\n getCalcVariablesData(getParamCalcGroupId());\n if ($(\"#param-context-menu-action\").val() != '') {\n return true;\n }\n $('#step-modal').find('.bk-yellow').removeClass('bk-yellow');\n $('#step-modal').find('.step-id-input-field .text-red').html('');\n\n $(\".repeat-step-btn\").removeClass('btn-success');\n $(\".repeat-step-btn\").addClass('btn-grey');\n $('.step-error-message').html('');\n if (action === 'add') {\n $('.step-id-rename').addClass('hide');\n $('#step-id').removeAttr('readonly');\n $(\"#step-modal .modal-title\").html('Add New Step');\n } else {\n $('.step-id-rename').removeClass('hide');\n $('#step-id').attr('readonly', 'readonly');\n if (!hasWriteAccess()) {\n $('.input-group-addon').addClass('hide');\n disableFormInputModal('#step-modal', 'View Step');\n } else {\n $(\"#step-modal .modal-title\").html('Edit Step');\n }\n }\n\n $('#step-form #step_action').val(action);\n\n $('#step-form')[0].reset();\n $(\"#write-results, #reuse-results-in-calc, #reuse-results-in-grp\").prop(\"checked\", false);\n updateSwitchery('#step-enabled', true);\n $('#step-modal .styled').uniform();\n\n $('#step-modal').modal({ backdrop: 'static', keyboard: false });\n // $('#step-modal .CodeMirror').remove();\n setPopover('REPEAT STEP PARAMETER', '', '.modal .repeat-step-btn');\n\n if (step_id !== '') {\n loadStep(step_id, calc_id);\n } else {\n initializeStepFormCodeMirror();\n }\n return true;\n } catch (error) {\n displayCatchError('add-step-form-error');\n return false;\n }\n}", "title": "" }, { "docid": "b4730f5da0e9bc2689635e889c7124c1", "score": "0.57576746", "text": "function _popup() {\n\n }", "title": "" }, { "docid": "0f62241e2e5735b423d9696b5fc18813", "score": "0.5755911", "text": "function validarFactor(){\n if (calcularTotalFactor() <= 105){\n return true;\n }else{\n swal({\n title: 'Factor de evaluación superado o no asignado',\n text: 'Revise los factores, Factor Actual: ' +calcularTotalFactor() + ' %', \n type: 'warning',\n confirmButtonText: 'Aceptar', \n showConfirmButton: true,\n }); \n \n return false;\n }\n }", "title": "" }, { "docid": "8f91963463ca0ba2ba1800eb90ecf361", "score": "0.5755765", "text": "function newChargesValidation(){\n //Input file to refer\n var testData2 = protractor.loginHelpers.dashboard();\n \n element(by.xpath(testData3.LayerSelector.Dropdown)).click();\n element(by.xpath(testData3.LayerSelector.Bills)).click();\n browser.sleep(10000);\n\n expect(element(by.xpath(testData3.Charges.Widget)).isPresent()).toBe(true);\n \n expect(element(by.xpath(testData3.Charges.Title)).getText()).toEqual(testData2.TEXT_CHARGES_TEXT);\n expect(element(by.xpath(testData3.Charges.SubCharges)).isDisplayed()).toBe(true);\n expect(element(by.xpath(testData3.Charges.ChargeAmount)).isDisplayed()).toBe(true);\n expect(element(by.xpath(testData3.Charges.PrebillAdjustment)).isPresent()).toBe(true);\n expect(element(by.xpath(testData3.Charges.PrebillAdjustment)).getText()).toEqual(testData2.TEXT_PREBILL_ADJUSTMENTS);\n \n //The user should able to click/touch on the link of 'Prebill adjustments'\n browser.actions().mouseMove(element(by.xpath(testData3.Charges.PrebillAdjustment))).perform();\n browser.sleep(3000);\n \n //validation of prebill adjustments\n //The overlay with list of transactions shall be opened as a popup \n expect(element(by.xpath(testData3.Charges.PrebillAdjustment_Popup)).isPresent()).toBe(true);\n expect(element(by.xpath(testData3.Charges.PrebillAdjustment_Popup)).getText()).toEqual(testData2.TEXT_PREBILL_ADJUSTMENTS);\n \n browser.sleep(1000);\n expect(element(by.xpath(testData3.Charges.PrebillAdjustment_Popup_EndDate)).getText()).toEqual(localizedDate());\n expect(element(by.xpath(testData3.Charges.PrebillAdjustment_Popup_PoName)).getText()).toContain(testData.po1);\n expect(element(By.xpath(testData3.Charges.PrebillAdjustment_Popup_ViewAll)).isPresent()).toBe(true);\n browser.sleep(2000);\n \n element(By.xpath(testData3.Charges.PrebillAdjustment_Popup_ViewAll)).click();\n browser.sleep(2000);\n \n //view that prebill adjustments are in tabular view\n expect(element(by.xpath(testData3.Adjustment.AdjustmentTable)).isDisplayed()).toBe(true);\n element(by.xpath(testData3.Adjustment.SelectByDropdown)).click();\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.FilterIcon)).click();\n browser.sleep(2000);\n \n browser.actions().mouseMove(element(by.xpath(testData3.Adjustment.Filter_SortBy))).perform();\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.Filter_ApplyButton)).click();\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.SelectTabularView)).click();\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.Settings)).click();\n browser.sleep(2000);\n \n browser.actions().mouseMove(element(by.xpath(testData3.Adjustment.Settings_Label))).perform();\n element(by.xpath(testData3.Adjustment.Settings_UnselectAll)).click();\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.Settings_SelectAll)).click();\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.Settings_ApplyChanges)).click();\n browser.sleep(2000);\n \n //Click on card view\n element(by.xpath(testData3.Adjustment.SelectCardView)).click();\n browser.sleep(2000);\n \n //validate it is in card view mode\n expect(element(by.xpath(testData3.Adjustment.CardView)).isDisplayed()).toBe(true);\n \n //click on cancel button to redirect to bills page\n element(by.xpath(testData3.Adjustment.CloseButton)).click();\n browser.sleep(3000);\n \n \n //Q1-Bug :MVIEW-2702 Charges widget: The taxes are not in the correct place - should be at the bottom\n expect(element(by.xpath(testData3.Charges.Charges_BottomRow)).getText()).toEqual(testData2.TEXT_TAX);\n \n //expect(element(by.xpath(testData3.Charges.NonStandardCharges_Value)).getText()).toContain(nscValues());\n browser.sleep(2000);\n \n //click on Non Standard charges\n element(by.xpath(testData3.OfferCharge.Non_Standard_Charge_Label+testData2.TEXT_NON_STANDARD_CHARGES+testData3.ChildAccounts.CloseXpath)).click();\n browser.sleep(3000);\n\n \n expect(element(by.xpath(testData3.Adjustment.AdjustmentTable)).isDisplayed()).toBe(true);\n\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.SortByDropdown)).click();\n browser.sleep(2000);\n \n element(by.xpath(testData3.Adjustment.FilterIcon)).click();\n browser.actions().mouseMove(element(by.xpath(testData3.Adjustment.Filter_SortBy))).perform();\n \n browser.sleep(2000);\n element(by.xpath(testData3.Adjustment.Filter_SortByButton)).click();\n \n element(by.xpath(testData3.Adjustment.Filter_ApplyButton)).click();\n browser.sleep(1000);\n \n element(by.xpath(testData3.Adjustment.SelectTabularView)).click();\n element(by.xpath(testData3.Adjustment.Settings)).click();\n browser.actions().mouseMove(element(by.xpath(testData3.Adjustment.Settings_Label))).perform();\n element(by.xpath(testData3.Adjustment.Settings_UnselectAll)).click();\n element(by.xpath(testData3.Adjustment.Settings_SelectAll)).click();\n expect(element(by.xpath(testData3.Adjustment.Settings_CheckBox)).getAttribute('checked')).toBe('true');\n browser.sleep(1000);\n \n //Cancel settings\n element(by.xpath(testData3.Adjustment.Settings_ApplyChanges)).click();\n element(by.xpath(testData3.Adjustment.Settings)).click();\n browser.sleep(1000);\n \n //The user should able to close column settings for charge details by touch/click on [close] icon\n element(by.xpath(testData3.Adjustment.Settings_Cancel)).click();\n browser.sleep(1000);\n \n //Click on Card view\n element(by.xpath(testData3.Adjustment.Card_View)).click();\n browser.sleep(1000);\n \n //validate it is in card view\n expect(element(by.xpath(testData3.Adjustment.CardView)).isDisplayed()).toBe(true);\n element(by.xpath(testData3.Adjustment.Close_NSC)).click();\n browser.sleep(3000);\n \n //misc display\n expect(element(by.xpath(testData3.Charges.MiscAdjustment)).isPresent()).not.toBe(true);\n console.log('Miscellaneous Adjustments are absent in Charges widget');\n \n //click on Misc adjustments\n element(by.xpath(testData3.OfferCharge.Misc_Adjustments_Label+testData2.TEXT_MISC_ADJUSTMENTS+testData3.ChildAccounts.CloseXpath)).click();\n browser.sleep(1000);\n //Validate Miscellaneous Adjsutmetns Details are opened\n //Test Case: MetraView_Folder/ MV2.0_AAS_Q1_Release/ 2902_NavigationToNewPageByClickingCharge\n //No Non Standard in Charges to validate it so Validating it udner Offer Charge Summary\n \n element(by.xpath(testData3.Adjustment.SortByDropdown)).click();\n element(by.xpath(testData3.Adjustment.SortByDropdownFirstValue)).click();\n browser.sleep(3000);\n \n element(by.xpath(testData3.Adjustment.FilterIcon)).click();\n browser.actions().mouseMove(element(by.xpath(testData3.Adjustment.Filter_SortBy))).perform();\n browser.sleep(3000);\n \n element(by.xpath(testData3.Adjustment.Filter_ApplyButton)).click();\n browser.sleep(1000);\n \n element(by.xpath(testData3.Adjustment.SelectTabularView)).click();\n element(by.xpath(testData3.Adjustment.Settings)).click();\n browser.sleep(3000);\n \n browser.actions().mouseMove(element(by.xpath(testData3.Adjustment.Settings_Label))).perform();\n browser.sleep(3000);\n \n element(by.xpath(testData3.Adjustment.Settings_UnselectAll)).click();\n element(by.xpath(testData3.Adjustment.Settings_SelectAll)).click();\n element(by.xpath(testData3.Adjustment.Settings_ApplyChanges)).click();\n browser.sleep(3000);\n \n //click on card view\n element(by.xpath(testData3.Adjustment.Card_View)).click();\n browser.sleep(1000);\n \n //Validate it is in card view\n expect(element(by.xpath(testData3.Adjustment.CardView)).isDisplayed()).toBe(true);\n element(by.xpath(testData3.Adjustment.Close_Misc)).click();\n browser.sleep(3000);\n \n //Text-tax\n expect(element(by.xpath(testData3.Charges.Tax)).getText()).toEqual(testData2.TEXT_TAX);\n \n //0_MTHF_17.0/ MTHF_17.0-S012/ ESRs-MetraView/ ESR-10520/ 001__The_tax_should_be_populated_in_MV_2.0\n //Verify in the \u001cCharges \u001d widget, the tax is populated\n expect(element(by.xpath(testData3.Charges.TaxAmount)).getText()).not.toEqual(\"0.00\");\n expect(element(by.xpath(testData3.Charges.TaxAmount)).getText()).not.toEqual(\"0,00\");\n }", "title": "" }, { "docid": "b09f3131e7508bd8f6ff7b349dbed8f7", "score": "0.5750267", "text": "popupAddCondition(readyname = \"\") {\n let confirmed = false;\n let speaker = getMacroSpeaker(this);\n let dlog = new Dialog({\n title: game.i18n.format(\"urbanjungle.dialog.addCondition.title\", { \"name\": speaker.alias }),\n content: `\n <form>\n <h1>${game.i18n.format(\"urbanjungle.dialog.addCondition.header\", { \"name\": this.data.name })}</h1>\n <div class=\"form-group\">\n <label>${game.i18n.localize(\"urbanjungle.dialog.addCondition.toAdd\")}:</label>\n </div>\n\t <div class=\"form-group\">\n\t <input id=\"cond\" name=\"cond\" value=\"${readyname}\" onfocus=\"this.select();\"></input>\n </div>\n </form>\n `,\n buttons: {\n one: {\n icon: '<i class=\"fas fa-check\"></i>',\n label: game.i18n.localize(\"urbanjungle.dialog.add\"),\n callback: () => confirmed = true\n },\n two: {\n icon: '<i class=\"fas fa-times\"></i>',\n label: game.i18n.localize(\"urbanjungle.dialog.cancel\"),\n callback: () => confirmed = false\n }\n },\n default: \"one\",\n render: html => { document.getElementById(\"cond\").focus(); },\n close: html => {\n if (confirmed) {\n let COND = html.find('[name=cond]')[0].value;\n if (COND.length > 0) this.addEffect(makeStatCompareReady(COND));\n }\n }\n });\n dlog.render(true);\n }", "title": "" }, { "docid": "394b325d0e74012695527352b7b8e280", "score": "0.57499135", "text": "function Ex3Action(){\n\t//get Number need checked\n\tlet numberEx3 = document.getElementById(\"numberEx3\").value;\n\tlet isNotFill = (numberEx3.length == 0);\n\tif (isNotFill){\n\t\talert(\"Vui lòng không để trống\");\n\t\treturn;\n\t}\n\tif (checkIncDigit(numberEx3)){\n\t\talert(\"Chuẩn ui! \" + numberEx3 + \" có các chữ số tăng dần ấy\")\n\t} else {\n\t\talert(\"Bậy ui! \" + numberEx3 + \" không có các chữ số tăng dần nha\")\n\t}\n\t\n}", "title": "" }, { "docid": "5b78ad2fcf47ca575b98b8fbee34a99e", "score": "0.5746818", "text": "function onReviewWarrantyDetails(){\n var form = View.panels.get('equipmentPanel');\n\t//get the equipment code\n var eqId = form.getFieldValue('activity_log.eq_id');\n\t//if equipment code is not null open the details panel as a pop up window\n if (eqId) {\n var restriction = new Ab.view.Restriction();\n restriction.addClause('eq.eq_id', eqId, '=');\n var detailsPanel = View.panels.get('eq_warranty_grid');\n detailsPanel.show(true);\n detailsPanel.refresh(restriction);\n detailsPanel.showInWindow({\n width: 800,\n height: 300\n });\n }\n}", "title": "" }, { "docid": "087a1d7c3fb20bef70f11194374668ac", "score": "0.5746126", "text": "function mostrarElementoActividades(e){\n if(e.status==\"success\"){\n nombre = \"formCrearNotasCalificables\"\n input = \"nombreNotaCalificar\"\n \n var windowWidth = document.documentElement.clientWidth;\n var windowHeight = document.documentElement.clientHeight;\n var popupHeight = $(\"#\" + nombre).height();\n var popupWidth = $(\"#\" + nombre).width();\n //centering\n $(\"#\" + nombre).css({\n \"position\": \"absolute\",\n \"top\": windowHeight / 2 - popupHeight / 2,\n \"left\": windowWidth / 2 - popupWidth / 2,\n \"z-index\":999\n });\n\n $(\"#backgroundPopup\").css({\n \"height\": windowHeight,\n \"width\":\"99%\",\n \"top\":\"0\",\n \"position\":\"absolute\"\n });\n \n //loads popup only if it is disabled\n $(\"#backgroundPopup\").css({\n \"opacity\": \"0.7\",\n \"background\":\"white\"\n });\n \n \n $(\"#\" + nombre).fadeIn(\"fast\")\n $(\"#backgroundPopup\").fadeIn(\"fast\")\n\n \n banderaClick = false\n $(\"#\"+nombre+\"\\\\:\"+input).focus()\n }\n}", "title": "" }, { "docid": "ef840bfb5c93b6cc959c54e50960cd8b", "score": "0.5742148", "text": "function openModal(name, image, description, amountAlface, amountBacon, amountHamburguer, amountOvo, amountQueijo)\n{\n\t$(\".modalBackground\").css(\"display\", \"flex\");\n\t$(\"#spanTitleProduct\").html(name);\n\t$(\"#spanDescriptionProduct\").html(description);\n\t$(\".additionalImage\")[0].src = image;\n\t$(\"#inputAmountalface\").val(amountAlface);\n\t$(\"#inputAmountbacon\").val(amountBacon);\n\t$(\"#inputAmounthamburguer\").val(amountHamburguer);\n\t$(\"#inputAmountovo\").val(amountOvo);\n\t$(\"#inputAmountqueijo\").val(amountQueijo);\n\trefreshSubTotal();\n}", "title": "" }, { "docid": "e3b7e74ba765abfaf73ffe61e5edf827", "score": "0.57396793", "text": "function validarpopup() {\n if (!(window.opener && window.opener !== window)) {\n// SE DEBE COLOCAR LA RUTA CORRECTA DE LA PAGINA DE ERROR\n// \n// window.location.href = 'http://localhost:7001/bdspnweb/sec/menu/menu.xhtml';\n }\n}", "title": "" }, { "docid": "00d634f2591ad229266cd9a58b537058", "score": "0.57368064", "text": "function paymentSuccessful(){\n\tconst cash = document.getElementById('cashtextid').value;\n\tconst due = parseFloat(cash) - getTotal(cart);\n\tdocument.getElementById('modaltotallabel').innerHTML = \"Change Due:\";\n\tdocument.getElementById('modaltotalvalue').innerHTML = \"$\" + due.toFixed(2);\n\tdocument.getElementById('modalcashlabel').innerHTML = '';\n\tdocument.getElementById('cashtextid').style.display = 'none';\n\tdocument.getElementById('enterbuttonid').style.display = 'none';\n}", "title": "" }, { "docid": "44ff7972d2fdb4be656807e0fc664ada", "score": "0.57242376", "text": "function openModalGasto(){\n (calcOpenedFromCreateGastoModal) ? openModalCreateSpending() : openModalEditSpending();\n }", "title": "" }, { "docid": "bcff6e808836a85c01df941ea29f4ce5", "score": "0.57083887", "text": "function popupmodalui(url) {\n\n // Set the required properties.\n var options = { autoSize: true,\n title: \"Definir Salário\",\n showClose: true,\n allowMaximize: true\n };\n // Pop up the application page in the modal dialog box, \n // and pass the site URL as a query string to the application page.\n SP.UI.ModalDialog.commonModalDialogOpen(\"../_layouts/Globosat.Remuneracao.CustomPages/AlteraSalarioProposto.aspx?url=\"\n + url,\n\noptions, closecallback, null);\n}", "title": "" }, { "docid": "6bf52b154135e9894ff3fe98e2d10f7a", "score": "0.57034045", "text": "function validateForm() {\n// instanciate new popup\n// code revieved from https://tingle.robinparisi.com/\n var modal = new tingle.modal({\n footer: true,\n stickyFooter: false,\n closeMethods: ['overlay', 'button', 'escape'],\n closeLabel: \"Close\",\n cssClass: ['custom-class-1', 'custom-class-2'],\n onOpen: function() {\n console.log('modal open');\n },\n onClose: function() {\n console.log('modal closed');\n },\n });\n\n if(document.myForm.name.value == \"\") {\n modal.setContent('<div id=\"contactme\"><h3 style=\"color:black\">Error:</h3><p style=\"color:black\">Empty name field, please provide a name</p></div>');\n } else if(document.myForm.email.value == \"\") {\n modal.setContent('<div id=\"contactme\"><h3 style=\"color:black\">Error:</h3><p style=\"color:black\">Empty email field, please provide a email</p></div>');\n } else if(!(validateEmail(document.myForm.email.value))) {\n modal.setContent('<div id=\"contactme\"><h3 style=\"color:black\">Error:</h3><p style=\"color:black\">Invalid email address, please provide a valid email</p></div>');\n } else if(document.myForm.subject.value == \"\") {\n modal.setContent('<div id=\"contactme\"><h3 style=\"color:black\">Error:</h3><p style=\"color:black\">Empty message field, please provide a message</p></div>');\n } else if(getCookie(\"contact\") == \"true\") {\n modal.setContent('<div id=\"contactme\"><h3 style=\"color:black\">Error:</h3><p style=\"color:black\">Too many submissions, try again in a few minutes</p></div>');\n } else {\n //cant use profanity filter library client side, so message says it \n modal.setContent('<div id=\"contactme\"><h3 style=\"color:black\">Thank you!</h3><p style=\"color:black\">Given your message gets past the profanity/spam filter, I will get back to you within 2 business days!</p></div>');\n }\n\n // open popup\n modal.open();\n}", "title": "" }, { "docid": "b633032a37d52da975345590892f68a9", "score": "0.56878716", "text": "function DefinirEstadoConsulta(funcao) {\r\n $(\"#myModalEstados\").modal({ show: true });\r\n}", "title": "" }, { "docid": "19c1b8db2af97fd2c9c14c92ee6ed10e", "score": "0.56835616", "text": "function PopUpInstruction(){\n ClearCanvas();\n ShowCalibrationPoint();\n}", "title": "" }, { "docid": "31ea24828ac41e59f9307465825bee13", "score": "0.5677365", "text": "function vipSeeBalance(){\n var modal = document.getElementById(\"modal-vip-balance\");\n modal.style.display = \"block\";\n console.log(\"payment.onclick\");\n}", "title": "" }, { "docid": "a623b8cf589121ea54434a6f404c42be", "score": "0.56720006", "text": "function checkRequired(frmid,checkbit=0,modal='myModal',callback=popup,para=''){\n var frm=document.getElementById(frmid);\n var pt='';var wht;var alttext='';\n for(var i=0;i<frm.elements.length;i++){\n //alert(frm.elements[i].id);\n\t\tif((frm.elements[i].hasAttribute(\"required\")) && (frm.elements[i].value=='' || frm.elements[i].value==null)){\n\t\t //pr=frm.elements[i].parentNode.parentNode;\n wht=checkPreviousLabelNode(frm.elements[i]);\n if(wht instanceof HTMLLabelElement)\n alttext='Check Field :'+wht.innerHTML;\n else{\n alttext='All Values Required ';\n }\n if(!isHidden(frm.elements[i]) && frm.elements[i].disabled==false){\n if(confirm(alttext))\n frm.elements[i].focus(); \n return false;\n }\n \n\t\t}\n if(document.getElementById(modal))\n modalTDID(frm.elements[i].id+'_td',frm.elements[i]);\n }\n //alert('Checkbit ='+checkbit);\n if(document.getElementById(modal))\n $('#'+modal).modal({show: 'true'});\n else{\n if(para==''){\n callback(frmid,para);\n } \n else{\n callback(frm,para);\n }\n }\n //popup(frmid);\n /*if(checkbit==0)\n $('#myModal').modal({show: 'true'});\n else if(checkbit==1)\n popup(frmid);*/\n}", "title": "" }, { "docid": "c445930e78aa5e28930725ec2361d25b", "score": "0.56675756", "text": "function initDetailModalValidate() {\n $('#detailsModalForm').validetta({\n realTime: true,\n display: 'inline',\n errorTemplateClass: 'validetta-inline',\n onValid: function (event) {\n promiseDetailModal(event);\n }\n });\n}", "title": "" }, { "docid": "64b6bd6da94582ce87c757036d8da270", "score": "0.5667135", "text": "function mostraModaleConfermaStampa1() {\n modaleConferma1.modal(\"show\");\n\n }", "title": "" }, { "docid": "d8593632be439461237d4ec8150e91bd", "score": "0.56669974", "text": "function Percentage_validation_estimate(cur_html,cur_rate_val)\n{\n if (cur_rate_val!=\"\" && cur_rate_val>100) {\n $.alert({\n title: 'Alert!',\n content: 'Maximum Discount % can be 100%.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() {\n cur_html.val(\"\");\n reset_percentage_validation_estimate(cur_html,cur_rate_val);\n cur_html.focus();\n }\n }\n });\n } \n else if (cur_rate_val!=\"\" && cur_rate_val<0) {\n $.alert({\n title: 'Alert!',\n content: 'Minimum Discount % can be 0%.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() {\n cur_html.val(\"\");\n reset_percentage_validation_estimate(cur_html,cur_rate_val);\n cur_html.focus();\n }\n }\n });\n }\n}", "title": "" }, { "docid": "01a02efb91888a369c6dbca6157ac4bb", "score": "0.56612486", "text": "function showModal() {\n\t\t$('#modal_offer_box').modal({overlayClose:true, minWidth:680, minHeight:366});\n\t}", "title": "" }, { "docid": "dedf312d0a43ecaa3e77bf17c29f346e", "score": "0.56598425", "text": "function createExpedition() {\n var d = new $.Deferred();\n var message = \"<input type='text' id='new_expedition' />\";\n var buttons = {\n \"Create\": function() {\n d.resolve($(\"#new_expedition\").val());\n },\n \"Cancel\": function() {\n d.reject();\n $(this).dialog(\"close\");\n }\n }\n dialog(message, \"Dataset Code\", buttons);\n return d.promise();\n}", "title": "" }, { "docid": "10f494bf29babc81ad6542d27ff6546a", "score": "0.56578577", "text": "function handleClickEvent(e) {\n if (document.getElementById(\"amount-due\").value == \"\") {\n alert(\"ERROR - Please enter a number in both fields\");\n }\n else if (document.getElementById(\"amount-received\").value == \"\") {\n alert(\"ERROR - Please enter a number in both fields\");\n }\n else if (isNaN(totalChangeDue()) == true) {\n alert(\"ERROR - Please enter a valid number\");\n }\n else {\n totalChangeMessage();\n dollarsMessage();\n quartersMessage();\n dimesMessage();\n nickelsMessage();\n penniesMessage();\n document.getElementById(\"total-dollars\").style.display = \"initial\";\n document.getElementById(\"total-coins\").style.display = \"initial\";\n document.getElementById(\"quarters\").style.display = \"initial\";\n document.getElementById(\"nickels\").style.display = \"initial\";\n document.getElementById(\"dimes\").style.display = \"initial\";\n document.getElementById(\"pennies\").style.display = \"initial\";\n document.getElementById(\"card2\").className = \"card is-visible\";\n document.getElementById(\"card3\").className = \"card is-visible\";\n showCheckbox();\n }\n \n}", "title": "" }, { "docid": "4ff80897fc2301317a2c2fc86774c61d", "score": "0.5652196", "text": "static tipException() {\n let target = document.getElementById(\"tip\").value;\n if (Number(target) < 0) {\n this.showExceptionMessage(\"tipException\",\n \"Tip Should be +ve in value\");\n calc.tipException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n } else if (target.length == 0) {\n this.showExceptionMessage(\"tipException\",\n \"Enter a Valid Number\");\n calc.tipException = true;\n calc.amountPerPerson(\"hide\");\n calc.tipPerPerson(\"hide\");\n } else {\n this.hideExceptionMessage(\"tipException\");\n calc.tipException = false;\n calc.tip = Number(target);\n this.confirmOtherExceptions();\n\n }\n }", "title": "" }, { "docid": "fa1676dd7efbbe56c3c6f0f613002eaf", "score": "0.56492436", "text": "function popup() {\n modal.style.display = \"block\";\n }", "title": "" }, { "docid": "eed7afbd030422daf6e920aef55a6c7b", "score": "0.564854", "text": "_assignButtonCallback(){\n //On click calculates the next mathbirthday.\n this.button.onclick = () => {\n this.alertMessage.classList.remove('hidden');\n if (this._dateValidation()){\n const mathbirthday = this._calculateNextMathbirthday();\n this.alertMessage.innerHTML = `Your # ${mathbirthday.power} MathBirthday is on\n ${this.months[mathbirthday.mbday.getMonth()].text} ${mathbirthday.mbday.getDate()}, ${mathbirthday.mbday.getFullYear()}!` ;\n }\n };\n }", "title": "" }, { "docid": "052b74f41980b7a3ad7694fc4d138fd0", "score": "0.564619", "text": "function afficheFormulaire() {\r\n // vide les champs input\r\n viderChampsInput();\r\n\r\n //Titre modal\r\n $(\"#ModalLabel\").html(\"Ajouter un nouvel animé\");\r\n $(\".modal-header\").css({\"background-color\": \"blue\", \"color\": \"white\"});\r\n\r\n //Couleurs du footer\r\n $(\".modal-footer\").css({\"background-color\": \"blue\", \"color\": \"white\"});\r\n\r\n // Inputs du modal\r\n $(\"#modalText\").html(\"<div id=\\\"input\\\" class=\\\"hide\\\"><p>ID# :<br> <input type=\\\"text\\\" name=\\\"ID_Anim\\\" id=\\\"ID_Anim\\\" readonly></p><p>Titre :<br><input type=\\\"text\\\" name=\\\"Titre\\\" id=\\\"Titre\\\"></p><p>Titre en kanji :<br><input type=\\\"text\\\" name=\\\"Kanji\\\" id=\\\"Kanji\\\"></p><p>Titre en Japonais :<br><input type=\\\"text\\\" name=\\\"Jap\\\" id=\\\"Jap\\\"></p><p>Réalisateur :<br><input type=\\\"text\\\" name=\\\"Reali\\\" id=\\\"Reali\\\"></p><p>Année :<br><input type=\\\"number\\\" name=\\\"Annee\\\" id=\\\"Annee\\\"></p></div>\")\r\n\r\n\r\n //affiche les inputs, boutton 'confirmation ajouter' et 'annuler', cache message (eventuel) et autres bouttons confirmation\r\n $(\"#ID_Anim\").val(\"ID_\" + (parseInt(aOfGhibli[(aOfGhibli.length-1)][\"id_anim\"]) + 1));\r\n $(\"#input\").show();\r\n $(\"#message\").hide();\r\n $(\"#btn_confAjouter\").show();\r\n $(\"#btn_termine\").show();\r\n $(\"#btn_confEdit\").hide();\r\n $(\"#btn_confSupp\").hide();\r\n}", "title": "" }, { "docid": "452e14c70d18a30f254ad9898d53c546", "score": "0.5645139", "text": "function validationForPayment() { \n\n //********************************************************************************//\n //* You will need to call the functions that validate the following: *//\n //********************************************************************************//\n //* (1) (2) (3) (4) *//\n //********************************************************************************//\n //* Property value - Down payment - Interest rate - Amortization *//\n //********************************************************************************//\n //* If there are no errors, then call *//\n //* *//\n //* detailPaymentCalculation(...., ......, ......, ......); *//\n //* *//\n //* and make sure to pass the four values in the order shown above. *//\n //* *//\n //********************************************************************************//\n //* If there are errors, simply update the comments area with the message: *//\n //* Please complete the form first and then click on Calculate Monthly Payment *//\n //* *//\n //********************************************************************************//\n\n\n\tvar errMessages=\"\";\n\t\n errMessages = propvalueCheck(errMessages); \n errMessages = dpCheck(errMessages);\n errMessages = amortizationCheck(errMessages);\n errMessages = IntRateCheck(errmessages);\n\n\tif(errMessages=\"\")\n\t{\n\t\tvar prop = document.mortgage.propValue.value;\n\t\tvar d_p = document.mortgage.downPay.value;\n\t\tvar intRate = document.mortgage.intRate.value;\n\t\tvar Amortization = document.mortgage.amortization.value;\n\t\tdetailPaymentCalculation(prop,d_p,intRate,Amortization);\n\t}\n\telse\n\t{\n\t\tshowErrors(errMessages);\n\t}\t\n\t\t\n\n} // End of validationForPayment function", "title": "" }, { "docid": "59bd7dc397b26ad0ee2973c7a8884248", "score": "0.5638647", "text": "function OpenSustanceUseHistoryPopUp(obj, baseUrl) {\r\n \r\n returnValue = window.showModalDialog(baseUrl + \"SubstanceUseHistoryPopUp.aspx?TextVal=\" + obj.value + \"\", \"null\", \"status:no;edge:center:yes;sunken;resizable:no;dialogWidth:850px;dialogHeight:500px\");\r\n parseInt(returnValue)\r\n\r\n }", "title": "" }, { "docid": "33593e1eacd05593edd0eb9de3b694da", "score": "0.56295687", "text": "function expenditures() {\n\t\n\tvar expenseModalName\t\t\t\t =\t\"#expenseModal\";\n\tvar expenseModal\t\t\t\t\t =\t$(expenseModalName);\n\tvar expenseForm\t\t\t\t\t\t =\texpenseModal.find(\"form\");\n\tvar expenseTableName\t\t\t\t =\t\"#allExpensesModal\";\n\t\n\t//EDITS EXPENDITURE\n\t$(\"body\").on(\"click\", `${ expenseTableName } table tbody tr`, function(e) {\n\t\t\n\t\te.preventDefault();\n\t\t\n\t\tvar values\t\t\t\t\t\t =\t$(this).data(\"values\");\n\t\texpenseForm.attr(\"action\", expenseForm.data(\"edit-url\").replace(-1, values.id))\n\t\t\n\t\tformValues(expenseForm, values);\n\t\t\n\t\texpenseModal.modal(\"show\");\n\t\t\n\t});\n\t\n}", "title": "" }, { "docid": "728b02398da719f1cd1262ee1ebe29f3", "score": "0.56274134", "text": "function display(parm1, parm2, parm3, parm4){\n \n document.getElementById(\"subtotal\").value = parm1;\n document.getElementById(\"discount\").value = parm2;\n document.getElementById(\"vat\").value = parm3;\n document.getElementById(\"total\").value = parm4;\n \n enablebtnProceed();\n}", "title": "" }, { "docid": "4593c1ddb60bceee850cc8c82a01550e", "score": "0.5626778", "text": "function validazionePrimaNotaLibera(e){\n var primaNotaLibera = e.data[0];\n var href = $(this).data(\"href\");\n $(\"#modaleValidazioneElementoSelezionato\").html(primaNotaLibera.numero);\n $(\"#modaleValidazionePulsanteSalvataggio\").substituteHandler(\"click\", function() {\n $(\"#SPINNER_modaleValidazionePulsanteSalvataggio\").addClass(\"activated\");\n document.location = href;\n });\n $(\"#modaleValidazione\").modal(\"show\");\n }", "title": "" }, { "docid": "dc7dfa696486b1cd353182fe7459eb9f", "score": "0.56256676", "text": "function openRefundPopUp(){\n modalInstanceRefund = $uibModal.open({\n backdrop:'static',\n animation: true,\n templateUrl: 'scripts/modules/home/content/job/jobdetail/refund/refund.template.html',\n controller:'refund.controller',\n controllerAs:'refund',\n windowClass:'modalEditTeamMember InputCretCardPopup alertUpdateTimingPopUp',\n resolve: {\n 'activeJobDetail':function(){\n return _this.activeJobDetail;\n }\n }\n });\n }", "title": "" }, { "docid": "d82e6679beb3b6cc4f41c862c0761344", "score": "0.5625582", "text": "function edit_Percentage_validation_estimate(cur_html,cur_rate_val,main_amt,count)\n{\n // if (cur_rate_val!=\"\" && cur_rate_val>100) {\n // $.alert({\n // title: 'Alert!',\n // content: 'Maximum Discount % can be 100%.',\n // type: 'dark',\n // typeAnimated: true,\n // buttons: {\n // ok: function() { \n // cur_html.val(\"\");\n // edit_reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n // cur_html.focus();\n // }\n // }\n // });\n // } \n // else if (cur_rate_val!=\"\" && cur_rate_val<0) {\n // $.alert({\n // title: 'Alert!',\n // content: 'Minimum Discount % can be 0%.',\n // type: 'dark',\n // typeAnimated: true,\n // buttons: {\n // ok: function() {\n // cur_html.val(\"\");\n // cur_html.focus();\n // }\n // }\n // });\n // }\n\n\n if(count==0)\n {\n if (cur_rate_val!=\"\" && cur_rate_val>100) {\n $.alert({\n title: 'Alert!',\n content: 'Maximum Discount % can be 100%.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() { \n cur_html.val(\"\");\n edit_reset_percentage_validation_estimate(cur_html,cur_rate_val,main_amt);\n cur_html.focus();\n }\n }\n });\n } \n else if (cur_rate_val!=\"\" && cur_rate_val<0) {\n $.alert({\n title: 'Alert!',\n content: 'Minimum Discount % can be 0%.',\n type: 'dark',\n typeAnimated: true,\n buttons: {\n ok: function() {\n cur_html.val(\"\");\n cur_html.focus();\n }\n }\n });\n }\n\n count++;\n\n }\n return count;\n\n}", "title": "" }, { "docid": "7e8cbc28d330201edfcbc11e6ba662e7", "score": "0.56166524", "text": "function showInstructions() {\n $('#modal-ins')\n .modal('show');\n}", "title": "" }, { "docid": "662a540de91e997910f1195aab2d90c1", "score": "0.56147474", "text": "function donation_expenses_Show(){\n\tdocument.getElementById('donation_expenses_fraction_or_total').style.display ='block';\n\tdocument.getElementById('donation_expenses_verification').style.display ='none';\n\t\n}", "title": "" }, { "docid": "7c9ca7dd3c11bc4dcbe53f32f577e18a", "score": "0.5611293", "text": "function Fcn_OpenCouponModal() {\n\n //re-check if coupon available/qualified\n if (Fcn_QualifyForCoupon() == false) { \n return;\n }\n\n let TotalDiscount = 0;\n //Notify user of the available/awarded coupon\n TotalDiscount = Number(sessionStorage.getItem(\"cartTotalBeforeVAT\")) * Number(CouponsMap.get(CouponsMap.get(\"available-coupon\")));\n\n $(\".Cls_CouponType\").text(CouponsMap.get(\"available-coupon\"));\n $(\"#ID_CouponsModal #ID_Purchaser\").text(JSON.parse(localStorage.getItem(localStorage.key(0))).purchaserdetails.fullname);\n $(\"#ID_CouponsModal .Cls_TotalCouponValue\").text(Fcn_FormartToCurrency(TotalDiscount));\n $(\"#ID_CouponsModal .Cls_CouponPercentage\").text(`${(CouponsMap.get(CouponsMap.get(\"available-coupon\")) * 100)}%`);\n $(\"#ID_CouponsModal\").modal('show');\n\n //Manually recreate and add the fade effect (+ css also), since the original bootstrap one causes conflicts and modal wouldnt close\n $(\"#ID_CouponsModal\").animate({\n opacity: 1\n }, 500)\n\n }", "title": "" }, { "docid": "12c1c536d8df3bb6fe398117b6286b8c", "score": "0.560792", "text": "function showExceedBudgetMessage(value){\n var currencySymbol = getValue(\"currencySymbol\");\n var content = \"<span class='alertIcon'>!</span>You have exceeded your budget by \" + currencySymbol + value + \"<span></span>\";\n $(\"#exceedBudgetMsg\").html(content);\n $(\"#exceedBudgetMsg\").css(\"display\",\"block\");\n $(\"#meanEntryProjection\").css(\"display\",\"none\");\n}", "title": "" }, { "docid": "e125a2b058f22b310cf2abb9d843ca43", "score": "0.560455", "text": "function showDiscardSolutionModal() {\n if (answered) {\n $('#tst_discard_solution_modal').modal('show');\n }\n }", "title": "" }, { "docid": "2ecef55b95e9e81d97a27b12f1bb2a15", "score": "0.5597931", "text": "function OpenAreasInteresseModal() {\n modal.style.display = \"block\";\n}", "title": "" }, { "docid": "17badb20d12e014ce945bda03023ffa0", "score": "0.5597757", "text": "function displayPopup() {\n \n $(dialogItem).dialog({\n modal: true,\n autoOpen: false,\n title: dialogTitle,\n width: 400,\n height: 150\n });\n $(dialogItem).dialog('open');\n \n}", "title": "" }, { "docid": "6c196ebf860237a65502b244f4a4c368", "score": "0.5594299", "text": "function loss_deductions_expenses_Show(){\n\tdocument.getElementById('loss_deductions_expenses_fraction_or_total').style.display ='block';\n\tdocument.getElementById('loss_deductions_expenses_verification').style.display ='none';\n\t\n}", "title": "" }, { "docid": "61a6fbc04131e029cf06043815bad248", "score": "0.5593394", "text": "function balancePopup(isWithdraw) {\n var id = isWithdraw ? \"minus-amount\" : \"add-amount\";\n var amount = document.getElementById(id).value;\n if (!validAmount(amount)) return;\n var text = isWithdraw ? \"Withdrawing $\" + amount + \"?\"\n : \"Depositing $\" + amount + \"?\";\n swal({\n title: text,\n text: \"Once processed, this action cannot be undone.\",\n icon: \"warning\",\n buttons: true,\n }).then((confirmed) => {\n if (confirmed) {\n if (isWithdraw) {\n document.getElementById(\"withdraw\").submit();\n } else {\n document.getElementById(\"deposit\").submit();\n }\n }\n });\n}", "title": "" }, { "docid": "7f13fa02637066e694769e211362d6ba", "score": "0.558657", "text": "function showModalEval(){\n idCurso = $('#idCurso').val();\n idTipoEval = $('#idTipoEval').val();\n idModalidad = $('#idModalidad').val();\n idRubrica = $('#idRubrica').val();\n idGrupoAlum = $('#idGrupoAlum').val();\n\n editaEval = $('#editEvaluadores').val();\n idEvaluacion = $('#idEvaluacion').val();\n\n if(editaEval!=1){\n urlModalEval = './modal/modalAddEvaluadores.php?idCurso='+idCurso+'&idTipoEval='+idTipoEval+'&idModalidad='+idModalidad+'&idRubrica='+idRubrica+'&idGrupoAlum='+idGrupoAlum;\n }else {\n urlModalEval = './modal/modalAddEvaluadores.php?idCurso='+idCurso+'&idTipoEval='+idTipoEval+'&idModalidad='+idModalidad+'&editaEval='+editaEval+'&idEvaluacion='+idEvaluacion+'&idRubrica='+idRubrica+'&idGrupoAlum='+idGrupoAlum;\n }\n\n $.get(urlModalEval, function(data){\n $('#modalAddEvaluadores').html(data).modal();\n })\n}", "title": "" }, { "docid": "1b2af3f0b3d468f6b6c5656d30615ecf", "score": "0.558596", "text": "function showExp(ele){\r\n\tresetExp();\r\n\tif(ele.value == 'text'){\r\n\t\tdocument.getElementById(\"expTextDiv\").style.display=\"\";\r\n\t\tdocument.getElementById(\"expText\").setAttribute('required','true');\r\n\t\t\r\n\t}else{\r\n\t\tdocument.getElementById(\"expLinkDiv\").style.display=\"\";\r\n\t\tdocument.getElementById(\"expLink\").setAttribute('required','true');\t\r\n\t}\r\n}", "title": "" } ]
3062b873625c4b89de0b1c4e7bcb6771
HTTP CLient Module add Forms Modul to handle form from .html view Auth Guard
[ { "docid": "f970228b3594cfe717f25685855cbe1a", "score": "0.0", "text": "function tokenGetter() {\n return localStorage.getItem('token');\n}", "title": "" } ]
[ { "docid": "70dbb9c1e9f0248421a8d470e0fc3b5e", "score": "0.5898456", "text": "function renderForm () {\n $el = $.helpers.insertTemplate({\n template: 'user-authentication',\n renderTo: $el,\n type: 'html',\n bind: {\n '.cbl-name': {\n 'submit': submitName\n },\n '#installExtension': {\n 'click': clickInstallExtension\n },\n }\n });\n\n function removeInstructions(){\n if (respoke.hasScreenShare()) {\n $el.find('.screen-share-instructions').remove();\n }\n }\n\n respoke.listen('extension-loaded', removeInstructions);\n\n removeInstructions();\n }", "title": "" }, { "docid": "16020d67aebc625d33d9d07f946ecf27", "score": "0.58656526", "text": "static loginForm(req, res) {\n res.render('login');\n }", "title": "" }, { "docid": "600871f142028c527e5f083d323bc118", "score": "0.57175684", "text": "login(form) {\n this.authorizable = false;\n return this.endpoint.post(this.path('/login'), form);\n }", "title": "" }, { "docid": "e7214e1f796f9eea13ac3a77ac6f1d73", "score": "0.5572934", "text": "function LawForm(law) {\n if (!(this instanceof LawForm)) {\n return new LawForm(law);\n };\n\n this.setLocals(law);\n\n // this.formsubmit = this.formsubmit.bind(this);\n // this.onsuccess = this.onsuccess.bind(this);\n\n FormView.call(this, template, this.locals);\n this.renderDateTimePickers();\n}", "title": "" }, { "docid": "7ea27357349d5eef7d6bb709689ce71e", "score": "0.5528825", "text": "showLoginForm(req, res) {\n \tconsole.log('You made it to the party');\n \tres.render('views/login');\n }", "title": "" }, { "docid": "adcdae901b0dca53c19469a9c5983230", "score": "0.55115813", "text": "function handleLogin(form, page) {\n var result = handleForm(form, page);\n \n if (result[\"status\"] == 0) {\n if (result[\"result\"].state == 'ok') {\n if (null != result[\"result\"].data.token) {\n this.document.location.href = \"pastes.py?tk=\"+result[\"result\"].data.token;\n } else {\n errorHandler.handel(\"failed to load data\");\n }\n } else {\n if (null != result[\"result\"].msg) {\n errorHandler.handel(result[\"result\"].msg);\n } else {\n errorHandler.handel(\"failed to load data\");\n }\n }\n } else {\n errorHandler.handel(\"your login-Data was not correct please register or try again\");\n }\n}", "title": "" }, { "docid": "57359efbb31a569e08886ac69ddf510f", "score": "0.5504273", "text": "function AuthenticationHandler() { }", "title": "" }, { "docid": "348d9c892700d554b403ae2c7c05c3a8", "score": "0.5503789", "text": "function passwordResetForm() {\n passwordResetFormHandler('account/password/requestpasswordreset', URLUtils.https('Account-PasswordResetForm'));\n}", "title": "" }, { "docid": "4be0d85c3ab2324eddbd244f3aca99d6", "score": "0.547574", "text": "static postForm(req, res) {\n HashBrown.forms.postEntry(req.params.id, req.body)\n .then(() => {\n res.status(200).send('OK');\n })\n .catch((e) => {\n res.status(502).send(e.message);\n });\n }", "title": "" }, { "docid": "ad979fba887b7601827144311eeba47d", "score": "0.54590595", "text": "function halShowForm(hf, href, title) {\n var elm, coll, val, f;\n var form, header, fs, p, inp;\n \n elm = d.find(\"form\");\n d.clear(elm);\n\n // grab HAL-FORM properties\n f = hf._templates.default;\n \n form = d.node(\"form\");\n form.action = href;\n form.method = f.method;\n form.setAttribute(\"halmethod\", f.method);\n form.className = f.rel;\n form.onsubmit = halSubmit;\n fs = d.node(\"div\");\n fs.className = \"ui form\";\n header = d.node(\"div\");\n header.innerHTML = title||\"Form\";\n header.className = \"ui dividing header\";\n d.push(header, fs);\n\n coll = f.properties;\n for(var prop of coll) {\n segment = d.node(\"div\");\n segment.className = \"ui green segment\";\n\n val = prop.value;\n if(g.hal[prop.name]) {\n val = val.replace(\"{\"+prop.name+\"}\",g.hal[prop.name]);\n } \n else {\n val = val.replace(\"{\"+prop.name+\"}\",\"\");\n }\n \n p = d.input({\n prompt:prop.prompt,\n name:prop.name,\n value:val, \n required:prop.required,\n readOnly:prop.readOnly,\n pattern:prop.pattern\n });\n d.push(p,fs);\n }\n \n p = d.node(\"p\");\n inp = d.node(\"input\");\n inp.type = \"submit\";\n inp.className = \"ui mini positive submit button\";\n d.push(inp,p);\n\n inp = d.node(\"input\");\n inp.type = \"button\";\n inp.value = \"Cancel\";\n inp.onclick = function(){elm = d.find(\"form\");d.clear(elm);}\n inp.className = \"ui mini cancel button\";\n d.push(inp,p);\n\n d.push(p,fs); \n d.push(fs,form);\n d.push(form, segment);\n d.push(segment, elm);\n }", "title": "" }, { "docid": "4999ce76e28dd7c0d9f81fe95a5bd1a2", "score": "0.5426943", "text": "function load_form(ev) {\n var target = YAHOO.util.Event.getTarget(ev);\n var data = YAHOO.util.Connect.setForm(target);\n var link = document.getElementById(target.getAttribute(\"id\")).getAttribute('action');\n lastrequest = link + '?' + data;\n //todo: considering changing the ? to a & in the next line\n //and figure out if we still need this file and curriculum/js/associate.js (CM repo)\n YAHOO.util.Connect.asyncRequest(\"POST\", link + \"?mode=bare\", set_content_callback, null);\n YAHOO.util.Event.preventDefault(ev);\n}", "title": "" }, { "docid": "8c70e1bf1e533b74b234f35a730b7d9b", "score": "0.5384847", "text": "function getForm(formName) {\r\n // cargar form en div.id=\"container\"\r\n var html = [];\r\n //switch (formName) {\r\n // case \"frmLogin\":\r\n // html.push(\"<form id=\\\"frmLogin\\\" role=\\\"form\\\">\\n\");\r\n // html.push(\" <h2>Login</h2>\\n\");\r\n // html.push(\" <div class=\\\"form-group\\\">\\n\");\r\n // //html.push(\" <label for=\\\"txtEmail\\\">Email address</label>\\n\");\r\n // html.push(\" <input type=\\\"email\\\" class=\\\"form-control\\\" id=\\\"txtEmail\\\" placeholder=\\\"Enter email\\\" name=\\\"email\\\" />\\n\");\r\n // html.push(\" </div>\\n\");\r\n // html.push(\" <div class=\\\"form-group\\\">\\n\");\r\n // //html.push(\" <label for=\\\"txtPass\\\">Password</label>\\n\");\r\n // html.push(\" <input type=\\\"password\\\" class=\\\"form-control\\\" id=\\\"txtPass\\\" placeholder=\\\"Password\\\" name=\\\"password\\\" />\\n\");\r\n // html.push(\" </div>\\n\");\r\n // html.push(\" <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-block\\\">Login</button>\\n\");\r\n // html.push(\" <br /><br />\\n\");\r\n // html.push(\" <h4>Login with</h4>\\n\");\r\n // html.push(\" <a href=\\\"#\\\" class=\\\"btn btn-primary bt-social\\\" data-provider=\\\"facebook\\\">Facebook</a>\\n\");\r\n // html.push(\" <a href=\\\"#\\\" class=\\\"btn btn-info bt-social\\\" data-provider=\\\"twitter\\\">Twitter</a>\\n\");\r\n // html.push(\" <!-- <a href=\\\"#\\\" class=\\\"btn btn-danger bt-social\\\" data-provider=\\\"google\\\">Google+</a> -->\\n\");\r\n // html.push(\" <a href=\\\"#\\\" class=\\\"btn btn-default bt-social\\\" data-provider=\\\"github\\\">GitHub</a>\\n\");\r\n // html.push(\" <a href=\\\"#\\\" class=\\\"btn btn-warning\\\" id=\\\"btAnon\\\">Anon</a>\\n\");\r\n // html.push(\"</form>\\n\");\r\n // break;\r\n // default:\r\n // break;\r\n //}\r\n\r\n try {\r\n $.ajax({\r\n type: \"GET\",\r\n cache: !1,\r\n async: \"true\",\r\n url: _epuUrlBase + \"/epuForms/\" + formName + \"/.json\",\r\n data: \"\",\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\",\r\n processData: !1,\r\n async: !1,\r\n success: function (a, t, e) {\r\n switch (formName) {\r\n case \"frmLogin\":\r\n a = a.replace(\"+fra013+\", getWord(\"fra013\", \"Credentials\")).replace(\"+fra004+\", getWord(\"fra004\", \"Email\").capitalize()).replace(\"+pal013+\", getWord(\"pal013\", \"Password\")).replace(\"+fra015+\", getWord(\"fra015\", \"Log in\"));\r\n break;\r\n case \"frmAbout\":\r\n // pal050 fra017 fra018 fra019 fra020 fra021 fra022 imgLogo1 \r\n a = a.replace(\"+pal050+\", getWord(\"pal050\", \"sin valor...\")).replace(\"+fra017+\", getWord(\"fra017\", \"sin valor...\")).replace(\"+fra018+\", getWord(\"fra018\", \"sin valor...\")).replace(\"+fra019+\", getWord(\"fra019\", \"sin valor...\")).replace(\"+fra020+\", getWord(\"fra020\", \"sin valor...\")).replace(\"+fra021+\", getWord(\"fra021\", \"sin valor...\")).replace(\"+fra022+\", getWord(\"fra022\", \"sin valor...\"));\r\n break;\r\n case \"frmLanguages\":\r\n break;\r\n case \"frmLogout\":\r\n break;\r\n case \"frmRegister\":\r\n break;\r\n case \"frmCarrierRutas\":\r\n break;\r\n case \"frmCarrierRemesa\":\r\n break;\r\n case \"frmOverseeOrdenesTrabajo\":\r\n break;\r\n case \"frmOverseeTransportistas\":\r\n break;\r\n case \"frmAdministrativeFacturas\":\r\n break;\r\n case \"frmAdministrativeOrdenesTrabajo\":\r\n break;\r\n case \"frmAdministrativeSupervisores\":\r\n break;\r\n case \"frmAdministrativeEmpresas\":\r\n break;\r\n case \"frmCustomer\":\r\n break;\r\n case \"frmAdminCompanies\":\r\n break;\r\n case \"frmAdminAdministrative\":\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n html.push(a);\r\n\r\n },\r\n error: function (a, t, e) {\r\n w = y;\r\n }\r\n })\r\n } catch (s) {\r\n //alert(s.message)\r\n return;\r\n }\r\n\r\n // -- ALERT BOX --\r\n if (formName !== \"frmAbout\")\r\n html.push(\"<hr />\\n<div id=\\\"alert\\\" class=\\\"alert\\\" role=\\\"alert\\\">\\n<h4 id=\\\"alert-title\\\">\" + getWord(\"msg039\", \"UserStatus\") + \"</h4>\\n<p id=\\\"alert-detail\\\"></p>\\n</div>\\n\");\r\n\r\n // -- FOOTER --\r\n if (formName === \"frmLogin\" || formName === \"frmAbout\") {\r\n var dtAhora = new Date();\r\n html.push(\"<hr /><footer><p>&copy;\" + dtAhora.getFullYear() + \"&nbsp;<img src=\\\"\" + companyData.ilg1+ \"\\\" width=\\\"70\\\" height=\\\"30\\\" /> &nbsp;&nbsp; <span style=\\\"font-size:9; color: gray\\\">Powered By <span style=\\\"font-size:13; color: blue\\\"><i>t<span style=\\\"font-size:9;\\\">&</span>d-epu</i></span></span></p></footer></div>\\n\");\r\n }\r\n return html.join(\"\");\r\n }", "title": "" }, { "docid": "c4e3c581c6bf86283378bdc38f7f2056", "score": "0.5361741", "text": "validateLoginForm(){\n\n }", "title": "" }, { "docid": "72e1bcc05fe964b518b05fe4e3d08a48", "score": "0.5353576", "text": "static mod2form() {\n var form;\n // variables:['url','opts'] \n form = 'p\\nform(action= url,method=\\'POST\\' id=\"bootform\")\\n - for(attr in opts){\\n .form-group\\n label(for= \\'id\\' + attr)= attr\\n - if(opts[attr].widget===\\'textarea\\')\\n textarea(class=\"form-control\",rows=\"5\",name=attr,id= \\'id\\' + attr) \\n - else{\\n - if(opts[attr].type === \\'integer\\') \\n - type=\\'number\\'\\n - else if(opts[attr].type === \\'timestamp\\')\\n - type=\\'datetime\\'\\n - else\\n - type=\\'text\\'\\n input(class=\"form-control\",id= \\'id\\' + attr,name= attr,type= type )\\n - }\\n - }\\n .form-group \\n button(class=\"idoido btn btn-lg btn-default\") Submit! \\np';\n return form;\n }", "title": "" }, { "docid": "c524924b40cfa2c9ab545ea36d2a2c17", "score": "0.5344971", "text": "function autenticar2() {\n\tif (generateResponse2()) {\n\t\tvar myForm = document.forms[0];\n\t\tmyForm.submit();\n\t} else {\n\t\tshowWaitDialog(false);\n\t}\n}", "title": "" }, { "docid": "1c9bd85b60772bb0f036cf4396614d0c", "score": "0.5325346", "text": "aviso(req, res){\n res.render('user/formfail')\n }", "title": "" }, { "docid": "b454d839fa69373e21fee21eb0f8fb79", "score": "0.5317638", "text": "function _login_handler(b){\n //console.log(b)\n // parse the body for the form url, with the correct jsessionid\n var form_regex = /id=\"fm1\".*action=\"(.*)\">/;\n var result = form_regex.exec(b.body)\n //console.log(\"login handler form parse is \", result[0], result[1])\n var opts={}\n opts.url=casservice+'/'+result[1]\n opts.form={'username':cuser\n ,'password':cpass\n ,'submit':'LOGIN'\n }\n // scrape hidden input values\n var name_regex = /name=\"(.*?)\"/\n var value_regex = /value=\"(.*?)\"/\n var hidden_regex = /<input.*?type=\"hidden\".*?\\/>/g\n while ((result = hidden_regex.exec(b.body)) !== null)\n {\n //console.log(\"hidden form value:\", result[0])\n var n = name_regex.exec(result[0])\n var v = value_regex.exec(result[0])\n if (v){\n opts.form[n[1]]=v[1]\n }else{\n opts.form[n[1]]=''\n }\n }\n //console.log('opts is' )\n //console.log(opts)\n //console.log('--' )\n return opts\n}", "title": "" }, { "docid": "5554fe997acbacfc6deb34fadfdaceba", "score": "0.5314846", "text": "function loginAndSubmitForm() {\n\t\t// hide the forms for logging in and signing up\n\t\t$loginForm.hide();\n\t\t$createAccountForm.hide();\n\n\t\t// reset those forms\n\t\t$loginForm.trigger('reset');\n\t\t$createAccountForm.trigger('reset');\n\n\t\t// show the stories\n\t\t$allStoriesList.show();\n\n\t\t// update the navigation bar\n\t\tshowNavForLoggedInUser();\n\t\tgenerateProfile();\n\t}", "title": "" }, { "docid": "1b00baf49c470cb1888353cd3d94f660", "score": "0.53121793", "text": "function requestForm(){\n let endpoint = \"/check\";\n api.get(endpoint, token)\n .then((res) => res.json())\n .then((data) => {\n \n console.log(data);\n if(data.message == \"Authenticated\") {\n console.log(data.message);\n document.getElementById(\"myDiv\").style.display = \"block\";\n }else{\n localStorage.setItem(\"msg\",\"Login To Continue\");\n window.location.href = \"../auth/login.html\";\n }\n });\n\n }", "title": "" }, { "docid": "e5cc97da85d620e09a65e2a8b3455335", "score": "0.5310784", "text": "function postForm(form, api, payload, router, view) {\n const options = {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n accept: \"application/json\",\n },\n body: JSON.stringify(payload),\n };\n api\n .makeAPIRequest(`auth/${view}`, options)\n .then((res) => {\n if (res.status === 200) {\n return res.json();\n } else if (res.status === 403) {\n form.username.setCustomValidity(\n \"User doesn't exit or incorrect password\"\n );\n form.reportValidity();\n } else if (res.status === 409) {\n form.username.setCustomValidity(\"User name already exits\");\n form.reportValidity();\n }\n })\n .then((data) => {\n if (data) {\n // store user profile in localStorage\n const user = { token: data.token };\n api\n .makeAPIRequest(\"user\", {\n headers: {\n Authorization: `Token ${data.token}`,\n },\n })\n .then((res) => res.json())\n .then((json) => {\n user.id = json.id;\n user.name = json.name;\n user.username = json.username;\n user.email = json.email;\n return user;\n })\n .then((user) => {\n localStorage.setItem(\"user\", JSON.stringify(user));\n // route to \"/\" view\n router.visit(\"/\");\n })\n .catch((err) => console.warn(err.message));\n }\n })\n .catch((err) => console.warn(err.message));\n}", "title": "" }, { "docid": "dcc10e779dad508d840e767be3ddfda3", "score": "0.5308675", "text": "function loginHandler(app){\n\treturn function(req, res) {\n \t \tconst isDisplay = (typeof req.query.submit === 'undefined');\n \t\tif (isDisplay) { //simply render search page\n \t\t\tres.send(doMustache(app, 'login', {}));\n \t\t}\n \t\telse {\n\t\t\tconst q = req.query.q;\n\t\t\tconst p = req.query.p;\n\t\t\tif(typeof q === 'undefined' || q.trim().length === 0 || !(EMAIL_REG.test(q))){\n\t\t\t\tconst view = {qError : 'Please enter email in valid format', q : q};\n\t\t\t\tres.send(doMustache(app, 'login', view));\n\t\t\t}\n\t\t\telse if (typeof p === 'undefined' || p.trim().length === 0) {\n\t\t\t\tconst view = {qError : 'Please enter password', q : q};\n\t\t\t\tres.send(doMustache(app, 'login', view));\n \t\t\t}\n\t\t\telse{\n\t\t\t\tapp.users.login(q, p)\n\t\t\t\t.then((auth) => {\n\t\t\t\t\tres.cookie('ID', q, {maxAge: 365 * 24 * 60 * 60 * 1000});\n\t\t\t\t\tres.cookie('AUTH', auth, {maxAge: 365 * 24 * 60 * 60 * 1000});\n\t\t\t\t\tviewUserHandler(app, auth,res, q);})\n\t\t\t\t.catch(() => res.send(doMustache(app, 'login', { q: q, qError: 'Please enter valid user email and password' }))\n\t\t\t\t);\n\t\t\t}\n \t\t}\n \t};\n}", "title": "" }, { "docid": "42440c3f5594d4ab8cbf216b079a66ff", "score": "0.5298835", "text": "_renderForm() {\r\n const html = `\r\n <form action=\"\" method=\"POST\" id=\"form\">\r\n <label for=\"userName\">Nom</label>\r\n <input type=\"text\" id=\"userName\" />\r\n <small></small>\r\n <br />\r\n\r\n <label for=\"userSurname\">Prenom</label>\r\n <input type=\"text\" id=\"userSurname\" />\r\n <small></small>\r\n <br />\r\n\r\n <label for=\"userMail\">Email</label>\r\n <input type=\"email\" id=\"userMail\" />\r\n <small></small>\r\n <br />\r\n\r\n <label for=\"userPassword\">Mot de passe</label>\r\n <input type=\"password\" id=\"userPassword\" />\r\n <small></small>\r\n <br />\r\n\r\n <button type=\"submit\">Valider</button>\r\n </form>\r\n `;\r\n\r\n this.appEl.insertAdjacentHTML('beforeend', html);\r\n\r\n this._form = document.getElementById('form');\r\n this._userName = document.getElementById('userName');\r\n this._userSurname = document.getElementById('userSurname');\r\n this._userMail = document.getElementById('userMail');\r\n this._userPassword = document.getElementById('userPassword');\r\n }", "title": "" }, { "docid": "e33841e987316c2542d70d685eacd8c3", "score": "0.52969146", "text": "function pageLoaded() {\n const form = document.forms.namedItem(\"register\");\n form.addEventListener(\"submit\", async function (event) {\n event.preventDefault();\n \n // Create a FormData passing the form by parameters\n const formData = new FormData(this);\n\n fetch(\"http://puigmal.salle.url.edu/api/users\", {\n method: \"post\",\n body: formData,\n })\n .then((response) => {\n if (!response.ok) {\n response.json().then((error) => {\n //Something wrong with the register so we let the user in the view know what is happening.\n console.log(error);\n p = document.getElementById('errResponse');\n p.innerHTML = \"\";\n t = document.createTextNode(\"Something wrong with data, or maybe try to login\");\n p.appendChild(t);\n });\n } else {\n response.json().then((data) => {\n //The register has gone well so we redirect the user to the login Page.\n console.log(\"Usari registrat correctament\");\n window.location.replace(\"../html/login.html\");\n });\n }\n })\n .catch(ex => {\n console.log(ex);\n }); \n });\n}", "title": "" }, { "docid": "a06c5a344a681d4a5ac6e60e28834fd2", "score": "0.5296422", "text": "submit() {\n\t\t\tthis.set(\"isLoading\", true);\n\t\t\tvar u = Ember.$(\"#username\")[0].value;\n\t\t\tvar p = Ember.$(\"#password\")[0].value;\n\t\t\tif (u === '' || p === '') {\n\t\t\t\tconsole.log(\"Form error\");\n\t\t\t\tthis.set(\"isLoading\", false);\n\t\t\t\tthis.send(\"formError\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.send(\"checkContent\", u);\n\t\t\tvar c1 = this.get(\"badContent\");\n\t\t\tthis.send(\"checkContent\", p);\n\t\t\tvar c2 = this.get(\"badContent\");\n\t\t\tif (c1 || c2) {\n\t\t\t\tconsole.log(\"Content error\");\n\t\t\t\tthis.set(\"isLoading\", false);\n\t\t\t\tthis.send(\"contentError\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar t = this;\n\t\t\t//Ember.$.ajax(\"http://localhost:5000/p/login\", {\n\t\t\tEmber.$.ajax(\"https://liugues-api.herokuapp.com/p/login\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tdata: {username: u, password: p},\n\t\t\t\tsuccess: function(data) {\n\t\t\t\t\tif (data.login) {\n\t\t\t\t\t\tt.send(\"loginSuccess\", data.token);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt.set(\"isLoading\", false);\n\t\t\t\t\t\tt.send(\"loginError\");\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\tt.set(\"isLoading\", false);\n\t\t\t\t\tt.send(\"connectionError\");\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "0237b200a52dabacf187d9c1026eae0b", "score": "0.5293862", "text": "async function handleGetForm(req, res) {\n try {\n console.log(\"Handle GET admin\", req.params.siteId)\n const siteHandler = new SiteHandler(req.params.siteId)\n const config = await siteHandler.loadConfig();\n await siteHandler.respondWithForm(res, config);\n }\n catch (error) {\n console.log(error);\n res.status(500).send(error.toString())\n }\n}", "title": "" }, { "docid": "6045e7018502132292436ee7285ee106", "score": "0.52918035", "text": "function handleFormSubmission(e) {\n e.preventDefault();\n registerDispatch({ type: 'usernameImmediately', value: state.username.value });\n registerDispatch({\n type: 'usernameAfterDelay',\n value: state.email.value,\n dontSendReqToServer: true,\n });\n registerDispatch({ type: 'firstNameImmediately', value: state.firstName.value });\n registerDispatch({ type: 'lastNameImmediately', value: state.lastName.value });\n registerDispatch({\n type: 'emailImmediately',\n value: state.email.value,\n dontSendReqToServer: true,\n });\n registerDispatch({ type: 'passwordImmediately', value: state.password.value });\n registerDispatch({ type: 'confirmPasswordImmediately', value: state.confirmPassword.value });\n registerDispatch({ type: 'submitForm' });\n }", "title": "" }, { "docid": "330349840ed2e6a93ee073e040eb4a30", "score": "0.5290625", "text": "function loginAndSubmitForm() {\n // hide the forms for logging in and signing up\n $loginForm.hide();\n $createAccountForm.hide();\n\n // reset those forms\n $loginForm.trigger(\"reset\");\n $createAccountForm.trigger(\"reset\");\n\n // show the stories\n $allStoriesList.show();\n\n // update the navigation bar\n showNavForLoggedInUser();\n }", "title": "" }, { "docid": "330349840ed2e6a93ee073e040eb4a30", "score": "0.5290625", "text": "function loginAndSubmitForm() {\n // hide the forms for logging in and signing up\n $loginForm.hide();\n $createAccountForm.hide();\n\n // reset those forms\n $loginForm.trigger(\"reset\");\n $createAccountForm.trigger(\"reset\");\n\n // show the stories\n $allStoriesList.show();\n\n // update the navigation bar\n showNavForLoggedInUser();\n }", "title": "" }, { "docid": "ba0c6ba2da11a0f7f30d31ada18c6a52", "score": "0.52556324", "text": "function loginAndSubmitForm() {\n\t\t// hide the forms for logging in and signing up\n\t\t$loginForm.hide();\n\t\t$createAccountForm.hide();\n\t\t// reset those forms\n\t\t$loginForm.trigger(\"reset\");\n\t\t$createAccountForm.trigger(\"reset\");\n\t\t// show the stories\n\t\tgenerateStories();\n\t\t// append user's name, username & created time/date to the DOM\n\t\tloadProfileInfo();\n\t\t$allStoriesList.show();\n\t\t// update the navigation bar\n\t\tshowNavForLoggedInUser();\n\t}", "title": "" }, { "docid": "b0129860323d68d315837f9fcd5ef302", "score": "0.5254296", "text": "function prepareForm($inputForm, offsite) {\n\n if (parms.returnPath === false) {\n parms.returnPath = window.location.pathname;\n if (parms.returnPath.substr(0, 1) !== '/')\n parms.returnPath = '/' + parms.returnPath;\n var _hash = window.location.hash;\n if (_hash.substr(0, 1) === '#')\n _hash = _hash.substr(1);\n if (window.location.hash)\n parms.returnPath = parms.returnPath + '!!!' + _hash;\n }\n\n if (/localhost/i.test(window.location.hostname) || offsite) {\n\n parms.hostname = parms.domain;\n parms.returnPath = window.location.origin + parms.returnPath;\n }\n else {\n parms.hostname = window.location.hostname;\n }\n\n var acctNum = ('0000000000' + parms.userName);\n acctNum = acctNum.substr(acctNum.length - 10, 10);\n\n var action = 'https:' + '//' + parms.hostname + '/auth/openid/' + acctNum + '/one?' + parms.returnPath;\n $inputForm.attr('action', action);\n\n /*\n * add click handlers to host specific buttons\n */\n var $inputFld = $('[name=\"openidurl\"]', $inputForm);\n $('#google', $inputForm).click(function (ev) {\n\n ev.stopPropagation();\n $inputFld.val('https://www.google.com/accounts/o8/id');\n $inputForm.submit();\n });\n\n $('#yahoo', $inputForm).click(function (ev) {\n\n ev.stopPropagation();\n $inputFld.val('https://me.yahoo.com');\n $inputForm.submit();\n });\n }", "title": "" }, { "docid": "7965bd1ba8b22b4d4a5695cb49f3585c", "score": "0.5250548", "text": "buildForm() {\n\n this.form = document.createElement('form');\n this.form.setAttribute('id', this.id);\n this.form.setAttribute('novalidate', true); // turn off browser validation 'cause we do it by hand\n if (this.name) { this.form.setAttribute('name', this.name); }\n this.form.setAttribute('method', this.method);\n if (this.enctype) { this.form.setAttribute('enctype', this.enctype); }\n this.form.setAttribute('role', 'form');\n this.form.setAttribute('autocomplete', this.autocomplete);\n this.form.classList.add('cornflowerblue');\n for (let c of this.classes) {\n this.form.classList.add(c);\n }\n\n this.form.addEventListener('submit', (e) => {\n e.preventDefault();\n this.submit();\n });\n\n if ((this.handler) && (typeof this.handler !== 'function') && (this.target)) {\n this.form.setAttribute('target', this.target);\n }\n\n this.contentbox.appendChild(this.headerbox);\n this.contentbox.appendChild(this.elementbox);\n\n this.form.appendChild(this.shade.container);\n this.form.appendChild(this.contentbox);\n if ((this.actions) && (this.actions.length > 0)) {\n this.form.appendChild(this.actionbox);\n } else {\n this.form.classList.add('noactions');\n }\n if ((this.passiveactions) && (this.passiveactions.length > 0)) { this.form.appendChild(this.passiveactionbox); }\n\n this.validate(true);\n\n if (this.passive) {\n this.pacify();\n }\n\n }", "title": "" }, { "docid": "604f7773b0aa04536c1a1a9ea71d18f9", "score": "0.5246563", "text": "function MainCtrl($s, $state, $cookies, FormSrvc, SessionSrvc, UtilSrvc, $timeout, $root) {\n 'use strict';\n\n/*===============================================================\n VARIABLES INITIALIZATION\n===============================================================*/\n\n $root.server = \"localhost\";\n $root.port = \"57772\";\n $root.webapp = \"forms\";\n\n $s.main = {};\n $s.utils = UtilSrvc;\n $.loginError = false;\n\n var main = $s.main;\n\n main.loading = false;\n main.busy = false;\n main.loadingClass = '';\n main.loginState = $cookies['Token'] ? 1 : 0;\n main.authToken = $cookies['Token'];\n\n main.showBusyDimmer = function() { main.busy = true };\n main.hideBusyDimmer = function() { main.busy = false };\n main.isLoggedIn = function() { return !!main.loginState };\n\n $s.extensionsCSS = {\n 'pdf' : 'pdf',\n 'txt' : 'text',\n 'ppt' : 'powerpoint',\n 'pptx' : 'powerpoint',\n 'pps' : 'powerpoint',\n 'doc' : 'word',\n 'docx' : 'word',\n 'jpg' : 'image',\n 'xls' : 'excel',\n 'xlsx' : 'excel'\n };\n\n/*===============================================================\n PRIVATE FUNCTIONS\n===============================================================*/\n\n /// Creates string for BaseAuth HTTP header\n function makeBaseAuth(user, password) {\n var token = user + ':' + password;\n var hash = Base64.encode(token);\n return 'Basic ' + hash;\n }\n\n/*===============================================================\n EXPORTED FUNCTIONS\n===============================================================*/\n\n $s.getErrorText = function(err) {\n return (err && err.summary) ? err.summary : '';\n };\n\n $s.closeObject = function() {\n $s.$broadcast('closeObject');\n };\n\n /// Goes to specified state\n main.goState = function(state) {\n main.showBusyDimmer();\n $state.go(state, {}, { reload: true, inherit: false });\n };\n\n $s.getExtension = function(fileName) {\n var regex = /(?:\\.([^.]+))?$/;\n return regex.exec(fileName)[1];\n };\n\n main.getLocalDate = UtilSrvc.toJSONLocal;\n\n /// Makes user log in\n main.doLogin = function(login, password, server, port, webapp) {\n\n $root.server = server;\n $root.port = port;\n $root.webapp = webapp;\n\n var authToken = makeBaseAuth(login, password);\n main.loading = true;\n main.loadingClass = 'loading';\n \n\n FormSrvc.getFormsList(authToken)\n .then(function(data) {\n main.loginState = 1;\n $s.loginError = false;\n\n main.authToken = authToken;\n // set cookie to restore loginState after page reload\n $cookies['User'] = login;\n $cookies['Token'] = main.authToken;\n\n $s.$broadcast('login', data);\n $state.go('forms', {}, { reload: true, inherit: false, notify: true });\n })\n .catch(function(err) {\n $s.loginError = true;\n })\n .finally(function () {\n main.loading = false;\n main.loadingClass = '';\n });\n };\n\n /// Makes user log out\n main.doExit = function () {\n return SessionSrvc.logout(main.authToken)\n .then(function(data) {\n main.loginState = 0;\n main.page = 'login';\n main.loading = false;\n main.loadingClass = '';\n\n // clear cookies\n delete $cookies['User'];\n delete $cookies['Token'];\n document.cookie = \"CacheBrowserId\" + \"=; Path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\n document.cookie = \"CSPSESSIONID\" + \"=; Path=\" + $root.webapp + \"; expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\n document.cookie = \"CSPWSERVERID\" + \"=; Path=\" + $root.webapp + \"; expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\n })\n .catch(function(err) {\n var errorText = $s.getErrorText(err);\n alert('An unexpected error occurred, contact your administrator \\n' + errorText);\n });\n };\n\n main.logout = function() {\n $s.$broadcast('logout');\n };\n\n main.goMain = function() {\n $s.$broadcast('goMain');\n };\n\n main.dataInit = function() {\n $s.$broadcast('refresh');\n };\n\n/*===============================================================\n CONTROLLER INITIALIZATION\n===============================================================*/\n\n $s.init = function() {\n if (!main.loginState) {\n return\n }\n };\n\n $s.init();\n}", "title": "" }, { "docid": "80613f911b0e1ad7075b13419acc51d7", "score": "0.52345085", "text": "function loginAndSubmitForm() {\n // hide the forms for logging in and signing up\n $loginForm.hide();\n $createAccountForm.hide();\n\n // reset those forms\n $loginForm.trigger(\"reset\");\n $createAccountForm.trigger(\"reset\");\n\n // show the stories\n $allStoriesList.show();\n\n // show new story form\n $submitForm.removeClass(\"hidden\");\n\n // update the navigation bar\n showNavForLoggedInUser();\n }", "title": "" }, { "docid": "cabaf1778512a19383f52b3f1286306c", "score": "0.52332", "text": "submitForm(e) {\n\t\te.preventDefault();\n\t\tif(this.handleValidation()){\n\t\t\talert('You have logged in successfully');\n\t\t}\n\t}", "title": "" }, { "docid": "31b034c075195bb4c48d639fdbed0252", "score": "0.5230396", "text": "function getPermitFormulateAccess(services) {\n\n // Variables.\n var notificationsService = services.notificationsService,\n formulateVars = services.formulateVars;\n\n // Return function.\n return function () {\n\n // Variables.\n var url = formulateVars.PermitAccess;\n\n // Send request to set permissions.\n services.formulateServer.post(url, {}, function (data) {\n\n // Success notification.\n showSuccess(notificationsService);\n\n // Reload page.\n reloadPage();\n\n });\n\n };\n\n}", "title": "" }, { "docid": "be112738c5ea4366e37c412ead1f4c29", "score": "0.5221333", "text": "options() {\n return {\n form: {\n 'IDemail': this._options.username,\n 'password': this._options.password,\n 'login': 'Login'\n },\n jar: this._jar,\n followRedirect: true,\n simple: false\n };\n }", "title": "" }, { "docid": "8b1e977880310abe26eef412b6f4783e", "score": "0.5210352", "text": "function initAuthPage(firstrun) {\n var form = $(\"#form\");\n\n $(\"#pass\").register(\"keydown\", function (event) {\n if (event.keyCode === 13) form.submit();\n });\n\n $(\".remember\").register(\"click\", function () {\n $(\".remember\").toggleClass(\"checked\");\n $(\"[name=remember]\").attr(\"value\", $(\".remember\").hasClass(\"checked\") ? \"1\" : \"\");\n });\n\n $(\".submit\").register(\"click\", function () {\n form.submit();\n });\n\n $(\"#form\").register(\"submit\", function () {\n $.post(getRootPath() + (firstrun ? \"adduser\" : \"login\"), form.serialize(), null, \"json\").always(function (xhr) {\n if (xhr.status === 202) {\n window.location.reload(true);\n } else if (xhr.status === 401) {\n $(\"#login-info\").text(firstrun ? \"Please fill both fields.\" : \"Wrong login!\");\n $(\"#login-info-box\").attr(\"class\", \"error\");\n if (!firstrun) $(\"#pass\").val(\"\").focus();\n }\n });\n return false;\n });\n }", "title": "" }, { "docid": "1edd809c274efe79bbe53edaf55717a8", "score": "0.5208032", "text": "loginRoute (app) {\n app.post('/' + this.Config.loginPage, this.processLogin);\n }", "title": "" }, { "docid": "ddbf33551959fcacd2cba08c5c51b5d5", "score": "0.5183548", "text": "function getLoginForm(req, res, next) {\n // Render the images gallery\n res.render('account/login', {\n title: \"Login Form\"\n });\n}", "title": "" }, { "docid": "83b9be2eac9b18a12ea7a52122626e88", "score": "0.51740205", "text": "function loginAndSubmitForm() {\n // hide the forms for logging in and signing up\n $loginForm.hide();\n $createAccountForm.hide();\n\n // reset those forms\n $loginForm.trigger('reset');\n $createAccountForm.trigger('reset');\n\n generateStories();\n\n // show the stories\n $allStoriesList.show();\n\n // update the navigation bar\n showNavForLoggedInUser();\n addUSerFavorites();\n fillUserProfile();\n }", "title": "" }, { "docid": "1eb12b7d7f62055804d619afa049a849", "score": "0.5173907", "text": "function loginAndSubmitForm() {\n // hide the forms for logging in and signing up\n $loginForm.hide();\n $createAccountForm.hide();\n\n // reset those forms\n $loginForm.trigger(\"reset\");\n $createAccountForm.trigger(\"reset\");\n\n // show the stories\n $allStoriesList.show();\n\n // update the navigation bar\n showNavForLoggedInUser();\n\n // get the user profile\n generateProfile();\n }", "title": "" }, { "docid": "5b1e37c9c543fb45a57dbcbb98341787", "score": "0.51654947", "text": "function loginAndSubmitForm() {\n // hide the forms for logging in and signing up\n $loginForm.hide();\n $createAccountForm.hide();\n\n // reset those forms\n $loginForm.trigger(\"reset\");\n $createAccountForm.trigger(\"reset\");\n\n // show the stories\n $allStoriesList.show();\n\n // update the navigation bar\n showNavForLoggedInUser();\n\n // get a user profile\n generateUserProfile();\n }", "title": "" }, { "docid": "cd842c652eb7cf385f1ad1012537539b", "score": "0.5165174", "text": "function handleAPILoaded() {\n enableForm();\n}", "title": "" }, { "docid": "cd842c652eb7cf385f1ad1012537539b", "score": "0.5165174", "text": "function handleAPILoaded() {\n enableForm();\n}", "title": "" }, { "docid": "9ff0d76f239ca40a538ed0955cf6a228", "score": "0.51597375", "text": "function renderForm (req, res, locals){\n\n\tres.render('pages/index', extend({\n\t\ttitle: 'Fite Me!',\n\t\tcsrfToken: req.csrfToken(),\n\t\tgivenName: req.user.givenName\n\t}, locals || {} ));\n}", "title": "" }, { "docid": "3517381d11156f401f57ff53136d1ca8", "score": "0.51474243", "text": "manualAuth({commit, state}, o){\n localStorage.setItem(state.storageName, btoa(JSON.stringify({ form: o.form })));\n state.veza.token.value = o.form;\n commit(\"login\");\n }", "title": "" }, { "docid": "56cb0e82f824c62a34ef15958d3a6c1d", "score": "0.51413924", "text": "function halForms() {\n\n // return form\n function lookUp(rel) {\n var rtn, i, x;\n\n for(i=0, x=forms.length;i<x;i++) {\n if(forms[i].rel && rel.indexOf(forms[i].rel)!==-1) {\n rtn = forms[i];\n break;\n }\n }\n return rtn;\n } \n\n // load forms once\n var forms = [];\n \n // TASK FORMS\n forms.push({\n rel:\"/files/hal-task-create-form\",\n method:\"post\",\n properties: [\n {name:\"title\",required:true, value:\"\", prompt:\"Title\"},\n {name:\"tags\", value:\"\", prompt:\"Tags\"},\n {name:\"completeFlag\",required:false,value:\"false\", prompt:\"Completed\"}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-edit\",\n method:\"put\",\n properties: [\n {name:\"id\",required:true, value:\"{id}\", prompt:\"ID\", readOnly:true},\n {name:\"title\",required:true, value:\"{title}\", prompt:\"Title\", regex:\"\"},\n {name:\"tags\", value:\"{tags}\", prompt:\"Tags\"},\n {name:\"completeFlag\",value:\"{completeFlag}\", prompt:\"Completed\"},\n {name:\"assignedUser\",value:\"{assignedUser}\", prompt:\"Assigned User\"}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-remove\",\n method:\"delete\",\n properties: [\n {name:\"id\",required:true, value:\"{id}\", prompt:\"ID\", readOnly:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-active\",\n method:\"get\",\n properties: [\n {name:\"completeFlag\",value:\"false\", prompt:\"Completed\", readOnly:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-completed\",\n method:\"get\",\n properties: [\n {name:\"completeFlag\",value:\"true\", prompt:\"Completed\", readOnly:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-markcompleted\",\n method:\"post\",\n properties: [\n {name:\"id\",value:\"{id}\", prompt:\"ID\",readOnly:true},\n {name:\"completeFlag\",value:\"true\", prompt:\"Completed\",readOnly:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-markactive\",\n method:\"post\",\n properties: [\n {name:\"id\",value:\"{id}\", prompt:\"ID\",readOnly:true},\n {name:\"completeFlag\",value:\"false\", prompt:\"Completed\",readOnly:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-assignuser\",\n method:\"post\",\n properties: [\n {name:\"id\",value:\"{id}\", prompt:\"ID\",readOnly:true},\n {name:\"assignedUser\",value:\"\", prompt:\"AssignedUser\",required:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-bytitle\",\n method:\"get\",\n properties: [\n {name:\"title\",value:\"\", prompt:\"Title\",required:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-byuser\",\n method:\"get\",\n properties: [\n {name:\"assignedUser\",value:\"\", prompt:\"Assigned User\",required:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-task-bytag\",\n method:\"get\",\n properties: [\n {name:\"tags\",value:\"\", prompt:\"Tags\",required:true}\n ]\n });\n \n // USER FORMS\n forms.push({\n rel:\"/files/hal-user-create-form\",\n method:\"post\",\n properties: [\n {name:\"nick\",value:\"\", prompt:\"Nickname\",required:true,pattern:\"[a-zA-Z0-9]+\"},\n {name:\"password\",required:true,value:\"\", prompt:\"Password\",pattern:\"[a-zA-Z0-9!@#$%^&*-]+\"},\n {name:\"name\", value:\"\", prompt:\"Full Name\", required:true}\n ]\n });\n \n forms.push({\n rel:\"/files/hal-user-usersbynick\",\n method:\"get\",\n properties: [\n {name:\"nick\",value:\"\", prompt:\"Nickname\", required:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-user-usersbyname\",\n method:\"get\",\n properties: [\n {name:\"name\",value:\"\", prompt:\"Full Name\", required:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-user-edit-form\",\n method:\"put\",\n properties: [\n {name:\"id\",value:\"{id}\", prompt:\"ID\",readOnly:true},\n {name:\"nick\",value:\"{nick}\", prompt:\"Nickname\",readOnly:true},\n {name:\"name\", value:\"{name}\", prompt:\"Full Name\", required:true}\n ]\n });\n\n forms.push({\n rel:\"/files/hal-user-changepw\",\n method:\"post\",\n properties: [\n {name:\"id\",value:\"{id}\", prompt:\"ID\",readOnly:true},\n {name:\"oldpass\",value:\"\", prompt:\"Old Password\",required:true, pattern:\"[a-zA-Z0-9!@#$%^&*-]+\"},\n {name:\"newpass\",value:\"\", prompt:\"New Password\",required:true, pattern:\"[a-zA-Z0-9!@#$%^&*-]+\"},\n {name:\"checkpass\",value:\"\", prompt:\"Confirm Password\",required:true, pattern:\"[a-zA-Z0-9!@#$%^&*-]+\"}\n ]\n });\n \n var that = {};\n that.lookUp = lookUp;\n\n return that;\n}", "title": "" }, { "docid": "4cfd809c2b996ef549e4e7eb21a6b419", "score": "0.51408756", "text": "upgradeForm(req, res, next){\n res.render(\"users/upgrade\");\n }", "title": "" }, { "docid": "c3352dd5841bd8fc5f0d0f2474a3e921", "score": "0.51408356", "text": "async function addUserFormHandler(UserForm) {\n const rawResponse = await fetch('http://localhost:8085/api/v1/signup', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(UserForm),\n });\n const data = await rawResponse.json();\n if (data.status === 'ACTIVE') {\n setStatus('Registration Successful. Please Login!');\n } else {\n setStatus('Error , Please try again!');\n }\n }", "title": "" }, { "docid": "446c9eab2775a8fa218a88b77c4651a5", "score": "0.5140643", "text": "function toTRateLLHome(){\n document.forms.taddratingonlandlordwithoutloginform.action = \"index.html\";\n}", "title": "" }, { "docid": "c8b816825fdb0337b7f84c5a44e15093", "score": "0.512238", "text": "function handle_submitted_token() {\n // hide the token popup form\n document.getElementById('tokenPopup').style.display = 'none';\n // hide the gray page overlay\n document.getElementById('grayPageOverlay').style.display = 'none';\n // make sure that we don't duplicate efforts\n // with the `tokenForm` submit handler above that might also make these calls\n if (window.WMSRetrievalInitiated != true) {\n // request the WMS capabilities to build the UI\n getWMSCapabilities('basic');\n // check permissions\n test_optimized_point_api();\n test_vessels_api();\n }\n }", "title": "" }, { "docid": "cb8abef525a4080d362adf217eb02ea5", "score": "0.5117827", "text": "function doApplicationValidation(form){\n return true;\n}", "title": "" }, { "docid": "8e70df0837d129980eb66cff9bea77b6", "score": "0.51092345", "text": "async showLinkRequestForm() {\n const ctx = this.ctx;\n await ctx.render('auth/password/email');\n }", "title": "" }, { "docid": "734a9e3bedc813550cc9015b51ee1e7a", "score": "0.5108816", "text": "loadForm(elem) {\n this._qs(`.${elem}`).addEventListener(\"click\", () => {\n dispatchEvent(new Event(`load-${elem}-form`));\n });\n if (this.isLogin()) this._qs(`.${elem}`).style.display = \"none\";\n }", "title": "" }, { "docid": "24cd4499c924865627beb4057e788746", "score": "0.5107978", "text": "function authenticate (form) {\n \tvar empty = false;\n\t\t$('form :input:not(button)').each(function() {\n\n if ($(this).val() == '') {\n empty = true;\n\t $('.error-div').removeClass('hidden');\n }\n\t if (empty) return false;\n\t });\n if (empty) return;\n\t $(form).submit();\n\t}", "title": "" }, { "docid": "64caf5df4a627332bf713c9ca7dd2509", "score": "0.51078445", "text": "function toLLRateTHome(){\n document.forms.taddratingontenantwithoutloginform.action = \"index.html\";\n}", "title": "" }, { "docid": "488ac6b8a087109fc29d2404e4f73296", "score": "0.50917983", "text": "function get(req, res) {\n res.sendFile(path.join(__dirname, \"views/initform.html\"));\n}", "title": "" }, { "docid": "1b1c1de52dd5f199b515766a66bc6138", "score": "0.50902367", "text": "function handleSubmit(event){\n event.preventDefault(); // prevents the default form flow.\n\n // make an api GET request using Axios\n // using the user credentials as parameter\n Axios.get('http://localhost:9000/users/'+credentials.username,{\n params:{\n password: credentials.password\n }\n })\n // user is authenticated\n // is allowed access\n .then(async function (response) {\n window.location.href = \"/success\";\n })\n // authentication failed\n // handle with error message display\n .catch(function (err) {\n displayError()\n\n })\n \n }", "title": "" }, { "docid": "eeede73be340a616a379e2c85e16b2f6", "score": "0.5090083", "text": "function displayForm(res) {\n fs.readFile('index.html', function (err, data) {\n res.writeHead(200, {\n 'Content-Type': 'text/html',\n 'Content-Length': data.length\n });\n res.write(data);\n res.end();\n });\n}", "title": "" }, { "docid": "cafa02f8dd148e77494405b778b4c1f6", "score": "0.5089549", "text": "function handleSubmit(event){\n //evitamos que hmtl envie el formulario por url (necesario cuando trabajamos con react)\n event.preventDefault();\n \n //enviamos la informacion por medio del loginRequest hacia mi estado\n props.loginRequest(form);\n\n /**\n * Una vez hecho session, enviamos al usuario al Home por medio de react-router\n * props.historia -> accede al browser router que maneja todo el flujo de la navegación\n * si a cumplido con los requisitos para el login lo dirigimos al home\n */\n props.history.push('/');\n }", "title": "" }, { "docid": "bdd2e56f1184e5deffe94843d34540e8", "score": "0.5089293", "text": "function halSubmit(e) {\n var form, query, nodes, i, x, args, url, method, template, accept;\n \n args = {};\n form = e.target;\n query = form.action;\n query = query.replace(/%7B/,'{').replace(/%7D/,'}'); // hack\n template = UriTemplate.parse(query);\n method = form.getAttribute(\"halmethod\")||form.method;\n accept = form.getAttribute(\"type\")||g.ctype;\n \n // gather inputs\n nodes = d.tags(\"input\", form);\n for(i=0, x=nodes.length;i<x;i++) {\n if(nodes[i].name && nodes[i].name!=='') {\n args[nodes[i].name] = nodes[i].value;\n }\n }\n\n // resolve any URITemplates\n url = template.expand(args);\n\n // use app/json for bodies \n if(method!==\"get\" && method!==\"delete\") {\n req(url, method, JSON.stringify(args), \"application/json\", accept);\n }\n else {\n req(url, method ,null, null, accept);\n }\n return false;\n }", "title": "" }, { "docid": "2755b838af5aa60185a74d199ce86bff", "score": "0.5087671", "text": "function getCSRF(body) {\n\t\tconsole.log('Logging into Patty...')\n\t\tlet $ = cheerio.load(body)\n\t\tlet csrf = $('input[name=\"_csrf\"]').attr('value')\n\t\t\n\t\t// Pass csrf to subsequent requests\n\t\tsubmitForm(csrf) \n\t}", "title": "" }, { "docid": "53d66013e0912040dea936f3025c8bc0", "score": "0.50847375", "text": "function initPage() {\n updateForm('email', validatingInput('email', document.getElementById('emailInput').value));\n updateForm('password', validatingInput('password', document.getElementById('passwordInput').value));\n}", "title": "" }, { "docid": "abda8b9deb0493d4ae1839dbb8fdde4b", "score": "0.50837153", "text": "async onLoadForm(event) {\n try {\n if (event) event.stopPropagation();\n this.setMode('downloadable');\n this.setStatus('read ciphertext');\n if (!this.app.msg.debug) {\n // this.onGoToNewURL();\n }\n } catch (err) {\n console.error(err);\n this.setMode('error');\n this.setStatus(err.message);\n }\n }", "title": "" }, { "docid": "3c471189aac711c19f46f1ccea2194d3", "score": "0.5077587", "text": "function ForgetForm(){\n this.trails = 0;\n this.form_tpl_html = '';\n}", "title": "" }, { "docid": "9b868daa001b0d4bbdb92dbed76ad296", "score": "0.5074675", "text": "function submit (e) {\n e.preventDefault();\n\n if (username ===\"Benjamin\" && password ===\"54321\") {\n console.log('It\\'s working')\n goToPage('/dashboard')\n }\n else {\n setMessage('Wrong Usename or Password')\n }\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "853df840be86497b20ba958302ffa6fc", "score": "0.50724113", "text": "canHandleAuthentication() {\n return false;\n }", "title": "" }, { "docid": "13ca0b7ed65a34143b50a4ade27fb00d", "score": "0.50716805", "text": "logoutSource(form) {\n // this => koa context;\n this.body = `<!DOCTYPE html>\n<head>\n <title>Logout</title>\n</head>\n<body>\n ${form}\n Do you want to logout from OP too?\n <button type=\"submit\" form=\"op.logoutForm\" name=\"logout\" value=\"yes\">Yes</button>\n <button type=\"submit\" form=\"op.logoutForm\">Please, don't!</button>\n</body>\n</html>`;\n }", "title": "" }, { "docid": "ede8aa80e1548392f8263ac14e35224e", "score": "0.50676453", "text": "function overrideBind(form) {\n var bind = form.bind;\n form.bind = function (data) {\n if (form.fields._csrf && form.fields._csrf.value)\n data._csrf = form.fields._csrf.value;\n return bind(data);\n }\n return form;\n}", "title": "" }, { "docid": "1133324d2ffd8a8f4c07df773308fa58", "score": "0.506729", "text": "render(){\n\n const currentPage = this.props.match.params.page\n\n let currentForm =<div></div>\n\n // test the url to render correct form in single page \n // loginform and register form return only FORMS!\n if(currentPage === 'login') {\n currentForm = (<LoginForm action={this.handleLoginRequest}/>)\n } else if(currentPage === 'register'){\n currentForm = (<RegisterForm action={this.handleRegisterRequest}/>)\n }else {\n currentForm = (<Redirect to=\"/home\"/>)\n } \n \n return(\n <div className=\"flex-container\">\n <h3 className=\"help-message\"><a href=\"https://github.com/SalvadorM/hunter-front-end\" target=\"_blank\">Find more information about how to user ClassHub </a></h3>\n\n <div className=\"flex-item\">\n <div className=\"register-form\">\n <div className=\"form\">\n <nav className=\"nav nav-tabs\">\n <NavLink to=\"/user/login\" activeClassName=\"active\" className=\"nav-link\">Sign In</NavLink>\n <NavLink to=\"/user/register\" activeClassName=\"active\" className=\"nav-link\">Register</NavLink>\n </nav>\n <div className=\"form-content\">\n {currentForm}\n </div>\n </div>\n </div>\n </div>\n <h3 className=\"help-message2\"><a href=\"https://github.com/SalvadorM/hunter-front-end#errors\" className=\"bottom-message\" target=\"_blank\">App does not work properly in safari or mobile browsers </a></h3>\n\n </div>\n )\n\n\n\n }", "title": "" }, { "docid": "26bbf70698f5ff1ed8cd6725d638a92f", "score": "0.50669485", "text": "get form() {\n return this._internals.form;\n }", "title": "" }, { "docid": "c0c3129da635f51ce1b7850c39e7bd8d", "score": "0.5066383", "text": "function FormHandler(form){\n this.form = form;\n this.manufacturer = form.querySelector('#id_manufacturer');\n this.model = form.querySelector('#id_model');\n this.year = form.querySelector('#id_year');\n this.token = form.querySelector('input[name=\"csrfmiddlewaretoken\"]').getAttribute('value');\n }", "title": "" }, { "docid": "db803f4a633282de323446ea0686a3b7", "score": "0.50557554", "text": "function loginFormHandler(e) {\n e.preventDefault()\n const emailInput = document.querySelector(\"#email\").value\n const pwInput = document.querySelector(\"#password\").value\n loginFetch(emailInput, pwInput)\n}", "title": "" }, { "docid": "451028e82e136610fd57fae84b1105a2", "score": "0.50499505", "text": "function passwordResetDialogForm() {\n // @FIXME reimplement using dialogify\n passwordResetFormHandler('account/password/requestpasswordresetdialog', URLUtils.https('Account-PasswordResetDialogForm'));\n}", "title": "" }, { "docid": "4a758b6f8a347d454b379dd589ec6499", "score": "0.5048654", "text": "function loginAndSubmitForm() {\n // hide the forms for logging in and signing up\n $loginForm.hide();\n $createAccountForm.hide();\n\n // reset those forms using the jQuery trigger method and the the javascript reset event\n $loginForm.trigger(\"reset\");\n $createAccountForm.trigger(\"reset\");\n\n // show the stories\n $allStoriesList.show();\n\n // update the navigation bar to include favorites, submit, and user-stories\n showNavForLoggedInUser();\n }", "title": "" } ]
7aa4914cac3d5e17bdc377d4aec82a3b
Reverts the setup performed by the `setUpFormContainer` function.
[ { "docid": "404624684efbc519f67e563716eb9659", "score": "0.0", "text": "function cleanUpFormContainer(control, dir) {\n return cleanUpValidators(control, dir);\n}", "title": "" } ]
[ { "docid": "65fb933f20b57c72514dfa1653bcd191", "score": "0.64001", "text": "resetForm() {\n this.form = Object.assign({}, this.initialForm)\n }", "title": "" }, { "docid": "6fd45fc90952ba1fafba5b2f774029d2", "score": "0.5926833", "text": "reset() {\n const { modalTitle } = this.options;\n const { modalRoot } = this.getElements();\n\n modalRoot.remove();\n\n // display the support up form or standard form\n if (this.options.support) {\n $('body').append(template_support({ modalTitle }));\n } else {\n $('body').append(template({ modalTitle }));\n }\n }", "title": "" }, { "docid": "8e3ad99b3f8460d67d12fbb851db9dbf", "score": "0.5897081", "text": "function resetCourseForm() {\r\n\t\tCostField.reset();\r\n\t\tDateField.reset();\r\n\t\tReasonField.reset();\r\n\r\n\t}", "title": "" }, { "docid": "1ac7611bcecd0d27d3e4a430d132afea", "score": "0.58059096", "text": "reset () {\n this.initFields(this.originalData)\n this.errors.clear()\n }", "title": "" }, { "docid": "3845aaf5dbaf9cad58aea012070d8c40", "score": "0.5757051", "text": "function resetForm(e) {\n setForm(defaultForm)\n }", "title": "" }, { "docid": "a9a39eaac0595cedc7cae5689036082a", "score": "0.5753576", "text": "reset () {\n Object.keys(this)\n .filter(key => !Form.ignore.includes(key))\n .forEach(key => {\n this[key] = deepCopy(this.originalData[key])\n })\n }", "title": "" }, { "docid": "3d520596111d61eb2b203060fb447a4c", "score": "0.5739448", "text": "resetForm() {\n this.setState({form: this.initialForm()});\n }", "title": "" }, { "docid": "dc43debe3fb1bf8cfb6e96eacfeba8e8", "score": "0.5732347", "text": "resetDataForm() {\n $(this.wrapper)[0].reset();\n }", "title": "" }, { "docid": "6e20d0969a9fe4b68f6a1937296cf588", "score": "0.57067555", "text": "reset () {\n Object.keys(this)\n .filter(key => !Form.ignore.includes(key))\n .forEach(key => {\n this[key] = deepCopy(this.originalData[key]);\n })\n }", "title": "" }, { "docid": "6b643a74c643536367f1fd34f881b67f", "score": "0.5675595", "text": "function resetModifyForm() {\r\n\t\t$slideNameError.html(\"\");\r\n\t\t$slideLinkError.html(\"\");\r\n\t\t$slideDescriptionError.html(\"\");\r\n\t\t$slidePhotoError.html(\"\");\r\n\t\t$slide_photo_description.removeClass(\"hide\").removeClass(\"transparent\");\t\r\n\t\t$slideshow_modify_form[0].reset();\r\n\t}", "title": "" }, { "docid": "e3682329893bb34bafb1fdd2169aa0dc", "score": "0.56666034", "text": "@api\n resetTestInputs() { \n this.titulo=\"\";\n this.descripcion=\"\";\n this.instrucciones=\"\";\n this.autor = \"\";\n this.tipo = \"\";\n }", "title": "" }, { "docid": "643ec8a2bda18e6ef2f6e304dd55e491", "score": "0.5661344", "text": "_resetSettings() {\n this._restoreSettings(this._initialSettings);\n this._filterStepTwo = false;\n this._recentlyFocused = this._sortOrder;\n this._focusRecentlyUsedControl();\n }", "title": "" }, { "docid": "218e30f123b1d4949a0956431545b852", "score": "0.56476796", "text": "$reset() {\n // Delete individual properties on this\n for (let k in this.props) {\n delete this[k]\n }\n // And delete this.props\n delete this.props\n // Then restore this.props from this._back\n this.$assign(_.clone(this._back))\n }", "title": "" }, { "docid": "1630edeb673150262495fd218e57c651", "score": "0.56427217", "text": "function cleanUp() {\r\n if (form) {\r\n form.remove();\r\n }\r\n form = null;\r\n iframe = null;\r\n }", "title": "" }, { "docid": "3c06832b4388ad5af93df2decea389e2", "score": "0.5623539", "text": "function clearForms() {\n setStartform(false);\n setJoinform(false);\n }", "title": "" }, { "docid": "9f75e9df62dfe0f94876963b80fa51d0", "score": "0.56102604", "text": "function resetCourseForm(){\r\n VNameField.reset();\r\n VAddField.reset();\r\n VMainContactField.reset();\r\n VDistrictField.reset();\r\n CFNameField.reset();\r\n CLNameField.reset();\r\n CAddField.reset();\r\n CMailField.reset();\r\n CTelephoneField.reset();\r\n CMobileField.reset();\r\n CTitleField.reset(); \t\t\r\n }", "title": "" }, { "docid": "c03bb9538c2cac8c1d15d9e8e05b1f8a", "score": "0.5599032", "text": "function resetForm(){\n form.reset();\n }", "title": "" }, { "docid": "0c6dc23f8072e9be976f95acc3e32442", "score": "0.55965126", "text": "function resetForm() {\n if (!opts.lexusOnly) {\n $yearSelect.val(\"\");\n $yearSelect.dropkick(\"refresh\");\n disableFields([$makeSelect, $modelSelect, $trimSelect]);\n } else {\n $modelSelect.val(\"\");\n $modelSelect.dropkick(\"refresh\");\n disableFields([$trimSelect]);\n }\n }", "title": "" }, { "docid": "0c30f0e7fd0a55c2c52c2771e8527ac1", "score": "0.55879515", "text": "function clearForm() {\n form = {};\n }", "title": "" }, { "docid": "5f80d44d9e0c0a0d071a80cedb4509a3", "score": "0.55878866", "text": "function resetHierarchy(theForm){\n //buildOrigiinalHierarchy(theForm)\n setHierarchyDesc(theForm, theForm.hdn_delimitiedHierarchy.value )\n}", "title": "" }, { "docid": "b5730aa04c0a0f286e680f5d952c0185", "score": "0.55721056", "text": "_reset() {\n let form = this.$.checkoutForm;\n\n this._setWaiting(false);\n form.reset && form.reset();\n\n let nativeForm = form._form;\n if (!nativeForm) {\n return;\n }\n\n // Remove the `aria-invalid` attribute from the form inputs.\n for (let el, i = 0; el = nativeForm.elements[i], i < nativeForm.elements.length; i++) {\n el.removeAttribute('aria-invalid');\n }\n }", "title": "" }, { "docid": "425cbc3861c5d1c0878ed0fad1e62c49", "score": "0.55706215", "text": "function resetInventoryForm(){\n\t\t\t FirstNameField.setValue(''),\n\t\t\t\tLastNameField.setValue(''),\n\t\t\t\tDeptField.setValue(''),\n\t\t\t\tBuildingField.setValue(''),\n\t\t\t\tRoomField.setValue(''),\t \n\t\t\t\tTagField.setValue(''),\n\t\t\t\tPurchaseDateField.setValue(''),\n\t\t\t\tPurchaseByField.setValue(''),\n\t\t\t\tMakeField.setValue(''),\n\t\t\t\tModelField.setValue(''),\n\t\t\t\tSerialField.setValue(''),\n\t\t\t\tLocationField.setValue(''),\n\t\t\t\tOperatingSystemField.setValue(''),\n\t\t\t\tMacAddressField.getValue(''),\n\t\t\t\tWirelessMacAddressField.setValue(''),\n\t\t\t\tPrinterField.setValue(''),\n\t\t\t\tNotesField.setValue('')\n\t\t }", "title": "" }, { "docid": "ce0abb1cc761a1f1e9a458755afe83ed", "score": "0.55679625", "text": "function resetCourseForm(){\r\n \t\r\n \tAddCourseForm.getForm().reset();\r\n \t\r\n CourseNameCombo.reset();\r\n CourseNumOfRuns.reset();\r\n CourseNumDays.reset();\r\n CoursePriceTypeCombo.reset();\r\n CoursePriceTypeCombo.enable();\r\n CourseNumParticipants.reset();\r\n CourseType.reset();\r\n CoursePrice.reset();\r\n\r\n }", "title": "" }, { "docid": "e04f8b0773809ab6d013a0f98c765f52", "score": "0.556353", "text": "resetToOriginal() {\n this.errors.forget();\n this.data = _.cloneDeep(this.original);\n }", "title": "" }, { "docid": "46cef872b8ad80eebb65a774fcda7b32", "score": "0.5549989", "text": "function fmdf_resetVars() {\n\t\n\tfmd.form = {};\n\tfmd.form.formtype = fmd.inputformtype;\n\tfmd.version = {};\n\t//form designer data\n\tfmd.version.formdata = {};\n\tfmd.version.formdata.tableNames = \"TEST01,TEST02\";\n\t//form designer properties config data\n\tfmd.version.formdata.propconf = {};\n\n\t//default font size in px, the same as that in body css\n\tfmdc.fontsize = 16;\n\t//default canvas width in em, the same as width in class fmdcanvas\n\tfmdc.canvas_size_widthem = 60;\n\t//auto hide elements prop\n\tfmdc.autohideprop = true;\n\t//properties cell\n\t//fmdc.cell_prop = null;\n\t//tab ui object\n\tfmdf_initTabs();\n\t//canvas status bar\n\t//fmdc.statusbar = null;\n\t//selection holder\n\tfmdc.selection = {selectedobj:null};\n\tfmdf_unselect();\n\t//tab page index for adding tab id\n\tfmdc.tabpageidx = 1;\n\t//fmcontainer index for adding container id\n\tfmdc.contidx = 1;\n\t//control index for adding new control\n\tfmdc.uiidx = 1;\n\t//tempdata for properties window of the designer\n\tfmdc.proptemp = null;\n\t//unsaved change flag\n\tfmdc.unsavedchange = false;\n}", "title": "" }, { "docid": "ab1e334a4b6735de5f2a5d5550c43cdc", "score": "0.5519985", "text": "function resetForm(){\n\tform.reset();\n}", "title": "" }, { "docid": "bafaf1588bfecfa9a0f3aa09941b2d9c", "score": "0.54953384", "text": "function clearForm() {\n setFormObject({});\n }", "title": "" }, { "docid": "72505fd8f73be58d9fd5648815d39edb", "score": "0.5492771", "text": "resetForm() {\n var $form = this.$element,\n opts = this.options;\n\n $(`.${opts.labelErrorClass}`, $form).not('small').removeClass(opts.labelErrorClass);\n $(`.${opts.inputErrorClass}`, $form).not('small').removeClass(opts.inputErrorClass);\n $(`${opts.formErrorSelector}.${opts.formErrorClass}`).removeClass(opts.formErrorClass);\n $form.find('[data-abide-error]').css('display', 'none');\n $(':input', $form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr('data-invalid');\n /**\n * Fires when the form has been reset.\n * @event Abide#formreset\n */\n $form.trigger('formreset.zf.abide', [$form]);\n }", "title": "" }, { "docid": "0eab1c72fa0e74865d974bae03a07197", "score": "0.54839337", "text": "clearInputFields() {\n form.reset();\n }", "title": "" }, { "docid": "0b8e40d91a08e82b4e3017ac0cab96b3", "score": "0.54706275", "text": "function resetForm() {\n\t\tprocessedTags = [];\n\t}", "title": "" }, { "docid": "ec6e09c4426d4774ce2edb768633ca67", "score": "0.5470041", "text": "function cleanUp() {\n env.bus.destroy();\n Object.keys(env.services).forEach(function (s) {\n var service = env.services[s];\n if (service.destroy && !service.isDestroyed()) {\n service.destroy();\n }\n });\n\n DebouncedField.prototype.DEBOUNCE = initialDebounceValue;\n dom.DEBOUNCE = initialDOMDebounceValue;\n _.debounce = initialDebounce;\n _.throttle = initialThrottle;\n\n // clear the caches (e.g. data_manager, ModelFieldSelector) at the end\n // of each test to avoid collisions\n core.bus.trigger('clear_cache');\n\n $('body').off('DOMNodeInserted.removeSRC');\n $('.blockUI').remove(); // fixme: move to qunit_config in OdooAfterTestHook?\n\n restoreMockedGlobalObjects();\n\n Component.env = originalEnv;\n }", "title": "" }, { "docid": "79cac5590afd812f62c3fd753e45236d", "score": "0.54662657", "text": "function resetForm (form) {\n form.reset()\n response = {}\n}", "title": "" }, { "docid": "dc592fe9e592c0c81627fdde917224ff", "score": "0.54597825", "text": "function _reset(){\n $(\".wireframe-canvas .draggable-item\").removeClass(\"focus\");\n $(\".remove-item\").remove();\n $(\".edit-item\").remove(); \n $(\".edit-item-confirm\").remove(); \n $(\".customization-tools\").hide();\n initResizable();\n }", "title": "" }, { "docid": "a5e543655081a7e4053e046f2888293c", "score": "0.5458781", "text": "reset() {\r\n this.setState(this.baseState);\r\n document.getElementById(\"form\").reset();\r\n this.fetchData();\r\n }", "title": "" }, { "docid": "b88c8ac73681c8194e81499b5be2cecf", "score": "0.544693", "text": "function resetFormElement(e) {\n e.wrap('<form>').closest('form').get(0).reset();\n e.unwrap();\n}", "title": "" }, { "docid": "b88c8ac73681c8194e81499b5be2cecf", "score": "0.544693", "text": "function resetFormElement(e) {\n e.wrap('<form>').closest('form').get(0).reset();\n e.unwrap();\n}", "title": "" }, { "docid": "813c08de741ac1d76601b0c9cac14189", "score": "0.54351354", "text": "function resetUI() {\n\n ui.data.rekogResultLabel = null\n ui.data.rekogResultText = null\n ui.data.rekogResultFace = null\n ui.data.filename = null\n \n ui.flow.activateDiv = ui.flow.activateDiv || 'label-result-div'\n ui.flow.activateButton = ui.flow.activateButton || 'label-button'\n\n}", "title": "" }, { "docid": "7c13a4a55119008c7b0e662b2124932c", "score": "0.54322064", "text": "_resetUI() {\n\t\tthis._hide([\n\t\t\t'#replace',\n\t\t\t'#fillin_1_',\n\t\t\t'#chain',\n\t\t\t'#octhigh',\n\t\t\t'#rubber',\n\t\t\t'#octdown',\n\t\t\t'#octup'\n\t\t]);\n\t\tthis._toggle('#hold', c.CLASS_FADED, true);\n\t}", "title": "" }, { "docid": "3a4ff9d05edde777aa55fb43143a2221", "score": "0.5427572", "text": "resetForm () {\r\n return {\r\n constraints : [],\r\n paretos : [],\r\n sorting : []\r\n };\r\n }", "title": "" }, { "docid": "716dbc48d98723ba936ce31df72e7a75", "score": "0.5427326", "text": "function resetForm() {\n\t$(form)[0].reset();\n\tresetPollForm();\n\tresetLinkForm();\n\tresetPostVideoForm();\n\tresetPostingOptions();\n resetPostPhotoForm();\n\tisTextPresent = false;\n\t$('#PostDescription').attr('placeholder', defaultPlaceHolderText);\n\t$('#posting_errors').html('').hide();\n\t$('#video_posting_error').html('').hide();\n\t$('.normal_post_thumb').removeClass('hidden');\n\t$('.anonymous_post_thumb').addClass('hidden');\n}", "title": "" }, { "docid": "82450e7de0bcba30d32b65a93ba9be7b", "score": "0.54247224", "text": "reset() {\n this.loadConfig(this.DEFAULTS);\n this.setFields();\n this.app.message('Settings reset');\n }", "title": "" }, { "docid": "f53920c76c40e05c65dd5e9f1861bf35", "score": "0.5423671", "text": "function ResetForm() {\n service.IsBusy = false;\n service.Client = angular.copy(service.ClientCopy);\n service.ClientPhones = \"\";\n service.formClientMaintenance.$setPristine();\n }", "title": "" }, { "docid": "98ef2f63134865fbc5a0b25841b997da", "score": "0.53903365", "text": "function reset() {\n if (_settings) {\n var lock = _settings.createLock();\n fields.forEach(updateInput.bind(null, lock));\n }\n }", "title": "" }, { "docid": "a9bbd5842fe9d18975991dd5b0598f01", "score": "0.53741306", "text": "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n setCurrentStyleSanitizer(null);\n resetAllStylingState();\n}", "title": "" }, { "docid": "dea5e8202f8ea5b8a93c79dfba7be2f5", "score": "0.5371502", "text": "function resetFormulario() {\r\n\tformulario.reset();\r\n\tiniciarApp();\r\n}", "title": "" }, { "docid": "4a382d0aa9802e0565f6f39826c23542", "score": "0.5364505", "text": "function resetForm() {\n carRentalAmountField.innerHTML = \" \";\n optionsRateField.innerHTML = \" \";\n surchargeAmountField.innerHTML = \" \";\n totalDueField.innerHTML = \" \";\n dropOfDateField.innerHTML = \" \";\n errorMsgIdField.innerHTML = \" \";\n }", "title": "" }, { "docid": "2bcb7b8bc01b1889a1c8f34801c239d1", "score": "0.53629917", "text": "resetJobDefinitionForm () {\n let jobDefinitionForm = {\n name: '',\n jobRoleArn: '',\n containerImage: '',\n hostImage: '',\n command: '',\n vcpus: '1',\n description: '',\n memory: '2000',\n analysisLevels: [],\n analysisLevelOptions: [],\n parameters: [],\n edit: false,\n shortDescription: '',\n acknowledgements:'',\n tags:'',\n support:''\n };\n\n this.update({jobDefinitionForm});\n }", "title": "" }, { "docid": "712f40b8d77724c2754ebe4dafa23a01", "score": "0.5359461", "text": "function resetFields () {\n this.input.value = '';\n this.output.value = '';\n }", "title": "" }, { "docid": "cddc2ab71381e85a153b96df2f6d31b9", "score": "0.53574806", "text": "initialise() {\n if(this.restoreAnswer()) {\n this.form.$setDirty();\n } else {\n this.setAnswer(undefined);\n }\n }", "title": "" }, { "docid": "c2ccf667a06deb0097535625892fa33a", "score": "0.5351002", "text": "function clearForms() {\r\n $('form').trigger('reset');\r\n }", "title": "" }, { "docid": "114e7badaef7f1f39f382ae073646705", "score": "0.53480124", "text": "function resetForm() {\n newQuoteForm.reset();\n}", "title": "" }, { "docid": "b1d7b56309b1c40de5747c7e4a5e6d87", "score": "0.5344451", "text": "resetForm() {\n try {\n this.inputLabels.forEach((label) => {\n this.refs[label].getInputDOMNode().value = '';\n });\n } catch (err) {\n return;\n }\n this.props.clearState();\n }", "title": "" }, { "docid": "a0d5df55836b71d0ea5debb8e421904e", "score": "0.5335385", "text": "resetDependent() {\n const {fields: {form1}} = this.props;\n form1.name.onChange(null);\n form1.phone.onChange(null);\n form1.mail.onChange(null);\n form1.relation.onChange(null);\n form1.depOtherRelation.onChange(null)\n }", "title": "" }, { "docid": "7561644d968db3ec8ae7de241039941f", "score": "0.53325814", "text": "function resetControls() {\n detailsControlForm = top.details.document.forms.detailsControlForm;\n detailsControlForm.elements.edit.checked = '';\n detailsControlForm.elements.save.disabled= 'true';\n}", "title": "" }, { "docid": "391ce28ef75b99fcdcfa9041c0317bb1", "score": "0.5328117", "text": "function resetForm(){\n $('.slds-has-error').removeClass('slds-has-error');\n $('.slds-form-element__help').addClass('slds-hide');\n}", "title": "" }, { "docid": "1349e6b74288d43dba99b590afe304c9", "score": "0.5321775", "text": "clearForm() {\n this.setState(this.initialState);\n }", "title": "" }, { "docid": "c366104cc622dd91659bfc84de1854ec", "score": "0.53209686", "text": "function resetPresidentForm(){\n tituloField.setValue('');\n descripcionField.setValue('');\n }", "title": "" }, { "docid": "c98788cd3b477e029682941a483b50f3", "score": "0.53199273", "text": "componentWillUnmount() {\n // find the forms we created and distroy them ourselves\n Blaze.remove(this.view);\n }", "title": "" }, { "docid": "749b42c258c130a92ccd7407474bda6a", "score": "0.53140813", "text": "_restoreForm()\n {\n // restore form\n const form = this.$cookies.getObject('login');\n if (form) {\n this.email = form.email;\n this.masterURL = form.url;\n this.realm = form.realm;\n }\n }", "title": "" }, { "docid": "61dd1e263c7029cf7a9d5f65dfba8472", "score": "0.5312463", "text": "function resetFormFields() {\n console.log(\"reseting form\");\n //Reseting form input fields\n document.getElementById(\"taskForm\").reset();\n\n //Reseting checkboxes\n $('#notifyCheckBox').attr('checked', false);\n $('#notifyUrlCheckBox').attr('checked', false);\n\n //Reseting priority button value to None\n var option = 'None' + ' <span class=\"caret\"></span>';\n $('.dropdown-menu').closest('.btn-group').find('.dropdown-toggle').html(option);\n\n }", "title": "" }, { "docid": "c32de8490f67ca20f2e638362c1400ec", "score": "0.5309473", "text": "function resetForm(){\r\n\r\n formulario.reset();\r\n inciarApp();\r\n}", "title": "" }, { "docid": "5acfc58173c9b472d68bc0c01a2d57f4", "score": "0.5304482", "text": "resetClipForm() {\n this.FormService.resetForm(this.$scope.form, this.$scope);\n\n // Clear in-point and out-point\n this.PlaybackService.clearPoints();\n }", "title": "" }, { "docid": "eb0c0291a90d4413c8ec0965ea13d82f", "score": "0.5303124", "text": "function inner_clear_form()\n\t\t{\n\t\t\ttitle.setValue(\"\");\n\t\t\tauthor.setValue(\"\");\n\t\t\tversion.setValue(\"\");\n\t\t\tdescription.setValue(\"\");\n\t\t\tscript_url_widget.setValue(\"\");\n\t\t\tscript_repository_widget.setValue(\"\");\n\t\t\tselected = null;\n\t\t\tLiteGUI.removeClass( scripts_container, \".selected\", \"selected\" );\n\t\t}", "title": "" }, { "docid": "74ccf5117ca4560767bf324e49e437ad", "score": "0.52910125", "text": "setup () {\n this._formElements = this._setupFormElements(this.options.inputs);\n this._UIElements = this._buildUIElements(this._formElements);\n this._setupEvents();\n }", "title": "" }, { "docid": "63521f17dd189abe610e23c33c75ce10", "score": "0.52857375", "text": "reset() {\n this.overrides = undefined;\n }", "title": "" }, { "docid": "c4e6cd044b9733f47528b613b48a4065", "score": "0.5268064", "text": "fnresetform(){\n this.fnGetDataFromStore();\n }", "title": "" }, { "docid": "5d29d4c433508258a56a3ccb712216bb", "score": "0.52648675", "text": "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "title": "" }, { "docid": "5d29d4c433508258a56a3ccb712216bb", "score": "0.52648675", "text": "function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n}", "title": "" }, { "docid": "8c4b183b92f6b7a6982833bfe77f020f", "score": "0.5264782", "text": "function resetRouteTrackForm() {\r\n if (editorWindowState.routeTrackFormRendered) {\r\n map.destroyMap();\r\n map = null;\r\n\r\n $ctrlFormMapContainer.empty().html(renderFormMapUnselected());\r\n $ctrlMapRetryContainer.hide();\r\n createTrackUploader();\r\n }\r\n }", "title": "" }, { "docid": "85c040b54a5d1bd84b84f2f01068aef7", "score": "0.52639526", "text": "function _updateFormContainers(oThis) {\n\n\t\toThis._changedFormContainers = [];\n\n\t\tvar sLayout = oThis.getLayout();\n\t\tvar oLayout = oThis.getAggregation(\"form\").getLayout();\n\n\t\toLayout.setBackgroundDesign(oThis.getBackgroundDesign());\n\n\t\tswitch (sLayout) {\n\t\tcase sap.ui.layout.form.SimpleFormLayout.ResponsiveLayout:\n\t\t\t// set the default values for linebreakes to avoid flickering for default case\n\t\t\toThis._applyLinebreaks();\n\t\t\tbreak;\n\t\tcase sap.ui.layout.form.SimpleFormLayout.GridLayout:\n\t\t\t_applyContainerSize(oThis);\n\t\t\tbreak;\n\t\tcase sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout:\n\t\t\toLayout.setLabelSpanXL(oThis.getLabelSpanXL());\n\t\t\toLayout.setLabelSpanL(oThis.getLabelSpanL());\n\t\t\toLayout.setLabelSpanM(oThis.getLabelSpanM());\n\t\t\toLayout.setLabelSpanS(oThis.getLabelSpanS());\n\t\t\toLayout.setAdjustLabelSpan(oThis.getAdjustLabelSpan());\n\t\t\toLayout.setEmptySpanXL(oThis.getEmptySpanXL());\n\t\t\toLayout.setEmptySpanL(oThis.getEmptySpanL());\n\t\t\toLayout.setEmptySpanM(oThis.getEmptySpanM());\n\t\t\toLayout.setEmptySpanS(oThis.getEmptySpanS());\n\t\t\toLayout.setColumnsXL(oThis.getColumnsXL());\n\t\t\toLayout.setColumnsL(oThis.getColumnsL());\n\t\t\toLayout.setColumnsM(oThis.getColumnsM());\n\t\t\toLayout.setSingleContainerFullSize(oThis.getSingleContainerFullSize());\n\t\t\toLayout.setBreakpointXL(oThis.getBreakpointXL());\n\t\t\toLayout.setBreakpointL(oThis.getBreakpointL());\n\t\t\toLayout.setBreakpointM(oThis.getBreakpointM());\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\tfor ( var i = 0; i < oThis._changedFormElements.length; i++) {\n\t\t\tvar oFormElement = oThis._changedFormElements[i];\n\n\t\t\tswitch (sLayout) {\n\t\t\tcase sap.ui.layout.form.SimpleFormLayout.ResponsiveLayout:\n\t\t\t\t_applyFieldWeight(oThis, oFormElement);\n\t\t\t\tbreak;\n\t\t\tcase sap.ui.layout.form.SimpleFormLayout.GridLayout:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t_updateVisibility(oThis, oFormElement);\n\t\t}\n\t\toThis._changedFormElements = [];\n\n\t}", "title": "" }, { "docid": "bce1be7714b81fe5be7c9a087da6152e", "score": "0.52630913", "text": "function formReset() {\n document.getElementById(\"feelingFormArea\").reset();\n}", "title": "" }, { "docid": "352a2d5a11aa38edbbde2948c90cdba8", "score": "0.52620214", "text": "function restoreOptions() {\n\tvar form = getForm();\n\tform.pdfServer.value = localStorage[\"pdfServer\"] || \"http://localhost:27000/\";\n\tform.pdfConverter.value = localStorage['pdfConverter'] || \"http://localhost:26000/pdf_converter\";\n \tform.authUrl.value = localStorage['authenticationUrl'] || \"http://localhost:26000/login_as_printerABCDEFG\";\n \tform.buttonMode.value = localStorage['buttonMode'] || \"SaveCurrent\";\n \tif (localStorage['pollForWork'] != \"off\")\n\t\tform.pollForWork.setAttribute('checked');\n}", "title": "" }, { "docid": "bd0fa3ce0c3f6896bc461cdeec6b44e6", "score": "0.5249771", "text": "reset() {\r\n this.toolstack.reset();\r\n }", "title": "" }, { "docid": "1fed51cfcfd2283dfdfdc9f33b6c95dd", "score": "0.5249269", "text": "resetForm() {\r\n document.getElementById('product-form').reset()\r\n }", "title": "" }, { "docid": "b88b8a5f6ace6195ba3075b92fc13978", "score": "0.52314645", "text": "reset()\n {\n // Override for implementation\n }", "title": "" }, { "docid": "c5b51ad1edeecc05458452e973f00952", "score": "0.52296025", "text": "resetLoginForm() {\n this.setState(this.defaultState);\n this.loginForm.reset();\n }", "title": "" }, { "docid": "82ff64e814705a15795d7a99cb807b20", "score": "0.5229402", "text": "reset(){\n this.showStep2(false);\n this._$nameField.val(\"\");\n }", "title": "" }, { "docid": "2802d02b3a5c4e325431ed8bfd779e6a", "score": "0.5224325", "text": "resetForm() {\n\tthis.setState({\n\t\tname: '',\n\t\tspecifics: '',\n\t\tpairs: ''\n\t});\n}", "title": "" }, { "docid": "ede20def2782a509b518dfa401646b2f", "score": "0.52232426", "text": "function genericResetForm() {\r\n\t$('form').trigger('reset');\r\n\t$(\"form [role=radio]\").attr(\"tabindex\",\"-1\");\r\n\t$(\"form [role=radio]\").attr(\"aria-checked\",\"false\");\r\n\tscrollTo(0,0);\r\n\tenableForm();\r\n}", "title": "" }, { "docid": "426e35b6f727bcc3fdf6e7320bbefe57", "score": "0.52230376", "text": "function resetearFormulario(){\n\n formulario.reset();\n\n iniciarApp();\n\n}", "title": "" }, { "docid": "a3eae90d2a4052e51bc7dff02d3da96c", "score": "0.522156", "text": "function clearForm() { // private function\n var selector = thisInstance.constants.selector;\n $(document).on('click', '.js-clear-form', function(e) {\n e.preventDefault();\n var $cycleSlideshow = $(selector.cycleSlidShow),\n index = $cycleSlideshow.data(\"cycle.opts\").currSlide,\n $cycleSlides = $cycleSlideshow.find(\".js-cycle-slide\").not(\".cycle-sentinel\");\n $cycleSlides.eq(index).find('.js-rank-form')[0].reset();\n });\n }", "title": "" }, { "docid": "ee9beadaf05086bbd7bd7cfcc8daf03f", "score": "0.52186996", "text": "function formReset() {\n \"use strict\";\n document.getElementById(\"submitForm\").reset();\n}", "title": "" }, { "docid": "c4c2a9a9e3f62e207a8cd5085a144af0", "score": "0.52157944", "text": "function resetForm(form) {\n form.find('input').each(function() {\n if ($(this).attr('type') == 'checkbox' || $(this).attr('type') == 'radio') {\n if ($(this).data('value-preset') == 'checked') {\n\n $(this).prop('checked', 'checked');\n\n var showWarning = $(this).val() === 'postOnly' || $(this).val() === 'both';\n var hasEPP = $('.acc-info-module.-epp').length;\n\n if (hasEPP && showWarning) {\n var $togglePane = $(this).parent().find('.toggle-pane');\n $togglePane.stop().slideDown();\n } else {\n var $togglePanes = $('.acc-info-module.-epp .toggle-pane');\n $togglePanes.slideUp();\n }\n } else {\n $(this).prop('checked', '');\n }\n } else {\n if ($(this).attr('type') != 'hidden') {\n $(this).val($(this).data('value-preset'));\n }\n }\n });\n\n form.find('select').each(function() {\n $(this).parents('.c-input-select').removeClass('valid invalid error');\n $(this).val('');\n $(this).siblings('.cs-placeholder').text('-Select-');\n\n // The below code would work if the data-value-preset wasn't being stripped\n // and a comparison to what's currently in production didn't make it\n // redundant anyway\n\n // var $selected = $(this).find(\":selected\").val();\n // if ($(this).data('value-preset') == '' || $selected.length ==) {\n // $(this).siblings('.cs-placeholder').text('-Select-');\n // } else {\n // $(this).val($(this).data('value-preset'));\n // $(this).siblings('.cs-placeholder').text($(this).data('value-preset'));\n // }\n });\n }", "title": "" }, { "docid": "a79090f6e15f0cbc8e9310ea5fe6708d", "score": "0.5211107", "text": "function resetNewRequest() {\n newRequestFactory.setRequest(undefined);\n newRequestFactory.isSubmitButtonClicked = false;\n newRequestFactory.questionsSaveClicked = false;\n newRequestFactory.temporaryNotificationEmails = [];\n newRequestFactory.temporarySelectedContacts = [];\n newRequestFactory.removedProductIndexes = {};\n newRequestFactory.productSpecificQuestions = [];\n newRequestFactory.selectedReviseQuote = undefined;\n newRequestFactory.selectedReviseProduct = undefined;\n newRequestFactory.selectedRequestQuote = undefined;\n newRequestFactory.selectedReviseConfig = undefined;\n newRequestFactory.selectedReviseTab = 1;\n newRequestFactory.isReviseConfig = false;\n }", "title": "" }, { "docid": "d69704f2a5a0531a2f404875bacf377f", "score": "0.52099365", "text": "resetFormFields() {\r\n this.setState({\r\n destination: \"\",\r\n cityTours: false,\r\n sports: false,\r\n cycling: false,\r\n museums: false,\r\n boating: false,\r\n sailing: false,\r\n beach: false,\r\n hiking: false,\r\n theatre: false,\r\n parksRec: false,\r\n snorkeling: false,\r\n firstname: \"\",\r\n lastname: \"\",\r\n userEmail: \"\",\r\n userPhone: \"\",\r\n adults: \"\",\r\n children: \"\",\r\n travelDate: \"\",\r\n });\r\n }", "title": "" }, { "docid": "35741cb36c152b0a21551d00379bcaf3", "score": "0.5208767", "text": "function resetFields()\n{\n\t// Reset suggestions input\n\t$(\"#inputSuggestion\").val(\"\");\n\n\t// Change back button to normal state\n\t$(\"#submitButton\").button(\"reset\");\n}", "title": "" }, { "docid": "28e34330aecc6b977fb72b3e1f0dd2f4", "score": "0.51970035", "text": "componentWillReceiveProps() {\n this.resetFormFields()\n }", "title": "" }, { "docid": "956f77edcec63620b9d7a9e314d9e210", "score": "0.51963365", "text": "Reset() {\n this.IsRendered = false;\n this.setBounds(null);\n this.setContentBounds(null);\n this.setLabelBounds(null);\n this.setDirty();\n }", "title": "" }, { "docid": "97a430bb02497b9fc2ba16c4966e5dd0", "score": "0.51928025", "text": "reset() {\n const currentBackend = this.config.backend;\n this.config = JSON.parse(JSON.stringify(config));\n this.config.backend = currentBackend;\n reset();\n env.initial = true;\n }", "title": "" }, { "docid": "becfb5ee2a14760967cc65d3722fcf16", "score": "0.5192487", "text": "function resetApp(){\t\t\n\t// reset global variables\n\tresetGlobalVariables();\n\t\n\t// reset join contexts\n\tresetJoinContexts();\n\t\n\t// reset saved report template info, if applicable\n\tresetCurrentSavedReport();\n\t\n\t// reset search results, if applicable\n\tclearTableSearch();\n\t\n\t// reset reports wizard, if applicable\n\tresetWizard();\n\t\n\t// deselected all selected questions\n\tjQuery('input[id^=check_]:checked').each(function(){\n\t\tjQuery(this).attr('checked',false);\n\t\tinvokeAttachedDOMEvent(jQuery(this),function(){removeOverlayScreen();});\n\t});\n}", "title": "" }, { "docid": "bb955aa27119ec0419d7f3ca9c0e4ea1", "score": "0.5192106", "text": "function resetForm() {\n recipeName.value = '';\n recipeCategory.value ='';\n ingredients.value = '';\n directions.value = '';\n}", "title": "" }, { "docid": "07323c120c2f2fd5d3782fd01955f71a", "score": "0.5188362", "text": "function resetPresidentForm(){\n descAltaRmcTextfield.setValue('');\n sectorAltaRmcCombo.setValue('');\n }", "title": "" }, { "docid": "a393175be054b81a2759aa0cb3f7532b", "score": "0.51881355", "text": "function cb_resetState(){\n species = \"none\";\n $(\"#wizard-species\").text(\"Species: None\");\n $(\"#wizard-pane\").html(startState);\n $(\"#no\").text(\"No\").unbind(\"click\").click(cb_amiNo);\n $(\"#yes\").text(\"Yes\").unbind(\"click\").click(cb_oligodesignerForm);\n $(\"#reset\").unbind(\"click\");\n $(\".oligodesigner\").unbind(\"submit\");\n $(\".designer\").unbind(\"submit\");\n $(\".result\").removeClass(\"alert alert-danger alert-warning\");\n $(\".result\").addClass(\"hidden\");\n $(\".name\").unbind(\"click\");\n $(\".modal\").unbind(\"click\");\n }", "title": "" }, { "docid": "4b19f953b66c362da053046d63dce532", "score": "0.5182509", "text": "function loadDefault(form){\r\n form.reset();\r\n}", "title": "" }, { "docid": "a398480e482c689001a370f9a8d7c933", "score": "0.51787907", "text": "function reset() {\n attachSource(null);attachView(null);protectionData = null;if (protectionController) {\n protectionController.reset();protectionController = null;\n }if (metricsReportingController) {\n metricsReportingController.reset();metricsReportingController = null;\n }\n }", "title": "" }, { "docid": "f3fdf2cdef21645101ea990826b4a364", "score": "0.51718485", "text": "destroy () {\n this.triggerAll(function (formElement, UIElement) {\n UIElement.parentNode.replaceChild(formElement, UIElement);\n this.removeEventListener(formElement, 'click', '_onFormElementClickEventListener', this);\n this.removeEventListener(UIElement, 'click', '_onUIElementClickEventListener', this, true);\n }.bind(this));\n super.destroy();\n }", "title": "" }, { "docid": "f930e21797d995b29ab9a03bdbaa2096", "score": "0.5164836", "text": "function reset() {\n setOptions(model);\n updatePlaceholder();\n }", "title": "" }, { "docid": "d0c3d707d14581e88c23a25e4126d491", "score": "0.516364", "text": "resetForm() {\n this.bundle.reset();\n this.setState({\n hash: \"\",\n ipfsLocation: \"\",\n patentName: \"\",\n price: \"\",\n file: \"\",\n fileState: FileState.NOT_ENCRYPTED,\n email_address: \"\",\n repeat_email: \"\",\n waitingTransaction: false\n })\n }", "title": "" }, { "docid": "3764bcf3383cc993232211fc6b3b6a06", "score": "0.51630265", "text": "reset() {\n for (let field in this.originalData) {\n this[field] = '';\n }\n\n this.mode = 'new';\n this.errors.clear();\n }", "title": "" }, { "docid": "573320dcf364d826234ee3fc8a6f97fd", "score": "0.5162744", "text": "function restoreForm(form) {\n form.querySelectorAll('input,textarea').forEach(el => {\n el.disabled = false;\n });\n\n const submit_input = form.querySelector('input[type=\"submit\"]');\n submit_input.value = submit_input.dataset.original_value;\n}", "title": "" }, { "docid": "36e5f52ea90e9dc3b70bc4ac3dd0df9f", "score": "0.51616585", "text": "function resetApplicationState() {\n isParent = false;\n previousOrParentNode = null;\n}", "title": "" } ]
061a1261bdff9b1453b6ca71b4a4c5ef
========== tracing and logging ==========
[ { "docid": "8f89f9ee0af7dd4ef47cdb3ea0bb2282", "score": "0.0", "text": "function logErrors(func, prefix) {\n var advice = function logErrorsAdvice(proceed /*,args*/) {\n var args = Array.prototype.slice.call(arguments);\n args.shift();\n try {\n return proceed.apply(func, args);\n } catch (er) {\n if (typeof lively !== \"undefined\" && lively.morphic && lively.morphic.World && lively.morphic.World.current()) {\n lively.morphic.World.current().logError(er);\n throw er;\n }\n\n if (prefix) console.warn(\"ERROR: %s.%s(%s): err: %s %s\", func, prefix, args, er, er.stack || \"\");else console.warn(\"ERROR: %s %s\", er, er.stack || \"\");\n throw er;\n }\n };\n\n advice.methodName = \"$logErrorsAdvice\";\n var result = wrap(func, advice);\n result.originalFunction = func;\n result.methodName = \"$logErrorsWrapper\";\n return result;\n}", "title": "" } ]
[ { "docid": "0598a723cdc5c6b4148d670833e03611", "score": "0.77725923", "text": "trace() {\n //\n }", "title": "" }, { "docid": "83efe6da2dc3a1b1ff2e0547d39a9aa3", "score": "0.76149476", "text": "trace () {}", "title": "" }, { "docid": "c598255c7e90e6851440c08a247ce352", "score": "0.741995", "text": "function trace () {}", "title": "" }, { "docid": "f91e12b3eb31c09ca672574411880222", "score": "0.66621655", "text": "static trace() {\n console.trace();\n }", "title": "" }, { "docid": "ad45b3dc097c0d3e415b9d8fafd7c99a", "score": "0.6611726", "text": "trace(...args) {\n this.logger.trace('%s#%s#%s#%s#%s', this.logSource, ...args);\n }", "title": "" }, { "docid": "d122379fd8db47e13bbe2bf2ab44c83e", "score": "0.64132214", "text": "function trace(a){window.console?console.log(a):typeof jsTrace!=\"undefined\"&&jsTrace.send(a)}", "title": "" }, { "docid": "0a9cfba4d7d4bf250769441cb1ea1c54", "score": "0.6397857", "text": "logging(){}", "title": "" }, { "docid": "63150b680f0a6cc3bfc6f35a801f5a23", "score": "0.63634217", "text": "function traceLog(toLog) {\n if ( TRACE ) {\n\tconsole.log(toLog);\n }\n}", "title": "" }, { "docid": "0f7dc441c7366e6691d5bd377587881c", "score": "0.63408506", "text": "trace(message) {\n this.log(CONS.logLevel.TRACE, message);\n }", "title": "" }, { "docid": "77943c3742a1ff75fb0d4779c7b471bc", "score": "0.6339482", "text": "_log() {\n if (this[config].debug === false) return;\n let logObj = thorin.logger(this.name);\n logObj.log.apply(logObj, arguments);\n }", "title": "" }, { "docid": "b54368a02a450da2bc4225f79566d768", "score": "0.63303053", "text": "function trace(){\n\tif(debugging)\n\t\t$().trace(\"quicktrace\");\n}", "title": "" }, { "docid": "980fe74b3a626521514d608016005bd1", "score": "0.6284812", "text": "function TraceObject() {\n\tthis.status = false;\n\tthis.write = function(strSection, strNote) {\n\t\tif (this.status) {\n\t\t\tif (strNote) {\n\t\t\t\tif (bbs.online)\n\t\t\t\t\tprintf(\"\\1h \\b\\1nTRACE : %-15s %-50s\\r\\n\",strSection,strNote);\n\t\t\t\tlog(\"TRACE: \" + strSection + \", \" + strNote);\n\t\t\t}else{\n\t\t\t\tif (bbs.online)\n\t\t\t\t\tprintf(\"\\1h \\b\\1nTRACE : %-15s %-50s\\r\\n\",\"\",strSection);\n\t\t\t\tlog(\"TRACE: , \" + strSection);\n\t\t\t}\n\t\t}\n\t}\n\tthis.warn = function(strSection, strNote) {\n\t\tif (this.status) {\n\t\t\tif (strNote) {\n\t\t\t\tif (bbs.online)\n\t\t\t\t\tprintf(\"\\1h \\b\\1n\\1h\\1rTRACE WARN: %-15s %-50s\\r\\n\",strSection,strNote);\n\t\t\t\tlog(\"TRACE WARN: \" + strSection + \", \" + strNote);\n\t\t\t}else{\n\t\t\t\tif (bbs.online)\n\t\t\t\t\tprintf(\"\\1h \\b\\1n\\1h\\1rTRACE WARN: %-15s %-50s\\r\\n\",\"\",strSection);\n\t\t\t\tlog(\"TRACE WARN: , \" + strSection);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ecd298d36930776bb523e9171baf0bf7", "score": "0.6267312", "text": "function event_tracer (e)\n{\n var name = \"\";\n var data = (\"debug\" in e) ? e.debug : \"\";\n \n switch (e.set)\n {\n case \"server\":\n name = e.destObject.connection.host;\n if (e.type == \"rawdata\")\n data = \"'\" + e.data + \"'\";\n if (e.type == \"senddata\")\n {\n var nextLine =\n e.destObject.sendQueue[e.destObject.sendQueue.length - 1];\n if (\"logged\" in nextLine)\n return true; /* don't print again */\n \n if (nextLine) {\n data = \"'\" + nextLine.replace (\"\\n\", \"\\\\n\") + \"'\";\n nextLine.logged = true;\n }\n else\n data = \"!!! Nothing to send !!!\"; \n }\n break;\n\n case \"network\":\n case \"channel\":\n case \"user\":\n name = e.destObject.unicodeName;\n break;\n\n case \"httpdoc\":\n name = e.destObject.server + e.destObject.path;\n if (e.destObject.state != \"complete\")\n data = \"state: '\" + e.destObject.state + \"', received \" +\n e.destObject.data.length;\n else\n dd (\"document done:\\n\" + dumpObjectTree (this));\n break;\n\n case \"dcc-chat\":\n case \"dcc-file\":\n name = e.destObject.localIP + \":\" + e.destObject.port;\n if (e.type == \"rawdata\")\n data = \"'\" + e.data + \"'\";\n break;\n\n case \"client\":\n if (e.type == \"do-connect\")\n data = \"attempt: \" + e.attempt + \"/\" +\n e.destObject.MAX_CONNECT_ATTEMPTS;\n break;\n\n default:\n break;\n }\n\n if (name)\n name = \"[\" + name + \"]\";\n\n if (e.type == \"info\")\n data = \"'\" + e.msg + \"'\";\n \n var str = \"Level \" + e.level + \": '\" + e.type + \"', \" +\n e.set + name + \".\" + e.destMethod;\n\tif (data)\n\t str += \"\\ndata : \" + data;\n\n dd (str);\n\n return true;\n\n}", "title": "" }, { "docid": "6466c4126eb5402e6a5f7a95bb701398", "score": "0.62622327", "text": "function Log(){}", "title": "" }, { "docid": "c62725928dded3895c6168d188823c09", "score": "0.6209552", "text": "function TraceCollector() {\n /**\n * used to track whether we have emitted a call log entry from the caller.\n * If so, then functionEnter in the callee need not emit the log entry\n * @type {boolean}\n */\n this.emittedCall = false;\n /**\n * used to track whether a call is known to be a constructor call. set at\n * invokeFunPre, unset in functionEnter\n * @type {boolean}\n */\n this.isConstructor = false;\n \n /**\n * if true, log all putfields, even if value before\n * and after is a primitive\n * @type {boolean}\n */\n this.logAllPutfields = false;\n /**\n * for each call frame, either the metadata for the unannotated this parameter,\n * or 0 if this was annotated\n * @type {Array}\n */\n this.unannotThisMetadata = [];\n /**\n * public flag indicating when logging is complete\n * @type {boolean}\n */\n this.doneLogging = false;\n }", "title": "" }, { "docid": "cabc3d60cc43dac4fbb49f9804dc1a6d", "score": "0.6201848", "text": "static trace(txt) {\n if (LogAx.TRACE) {\n //let t = LogAx.groupTexts[appName];\n //LogAx.groupTexts[appName] = (!t) ? Dates.getTimestampPrefix() + txt : t + '\\n' + Dates.getTimestampPrefix() + txt;\n console.log(\"<\" + appName + \">\" + \"[\" + spt_dates_1.Dates.getTimestampPrefix() + \"]: \" + txt);\n }\n }", "title": "" }, { "docid": "36a44334044762e9aabe299988d3483c", "score": "0.6193815", "text": "function Trace(msg,req,fwd) {\n\t\"totem\".trace(msg,req,fwd);\n}", "title": "" }, { "docid": "7541edfb968010d8108b383b4e7339fc", "score": "0.61550933", "text": "function foo() {\n console.trace('Foo');\n}", "title": "" }, { "docid": "2ca6c95084e8e979ece2221f9686cde9", "score": "0.61288613", "text": "info (...args) {\n checkAndSetTraceId(this.getMdc(), this)\n let result = extractArgs(args, this.getMdc())\n let { msg, data, msgTokens } = result\n data = addTraceIdAndEventToSerializerObject(data, this.getMdc())\n checkAndUpdateEvent(this, data.event)\n this._logger.info(data, msg, msgTokens)\n }", "title": "" }, { "docid": "261a9c0acf64ebb0c1f2b5c631e12d09", "score": "0.61224425", "text": "trace(...args) {\n if (DEBUG) {\n if (args.includes(\"-verbose\")) {\n let callStack = new Error().stack.split(\"\\n\");\n // var callerLine = callStack[callStack.length - 2];\n console.log(...args);\n } else {\n console.log(...args);\n }\n }\n }", "title": "" }, { "docid": "074a5eaa1626347ea0b1f74882ae7bca", "score": "0.6116067", "text": "function trace(text) {\n console.log((performance.now() / 1000).toFixed(3) + \": \" + text);\n }", "title": "" }, { "docid": "f184ba2528da52a202611825aea79f21", "score": "0.610224", "text": "function Trace(desc, msg){\r\n\tif (!msg)\r\n\t{\r\n\t\tmsg = desc;\r\n\t\tdesc = eon.GetNodeName(eonthis);\r\n\t}\r\n\teon.Trace2(eon.getnodepath(eonthis), desc, msg);\r\n}", "title": "" }, { "docid": "bc0a43cffe3b390bc15a24d8a72beb18", "score": "0.6100702", "text": "static logStart(context) {\n return new Promise(resolve => {\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].log({\n data: _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].activeLogLevel === 1 /* Info */ ? {} : context,\n level: 1 /* Info */,\n message: `[${context.requestId}] (${(new Date()).getTime()}) Beginning ${context.method} request (${context.url})`,\n });\n resolve(context);\n });\n }", "title": "" }, { "docid": "817658ccaac41f09139839d105b0f236", "score": "0.60820943", "text": "_handleRpcLog(e) {\n this.$.reporting.reportRpcTiming(e.detail.anonymizedUrl,\n e.detail.elapsed);\n }", "title": "" }, { "docid": "108bd58bf3298287abff4374b7ed3276", "score": "0.6075498", "text": "info(object,...additionalArguments){return this.log(object,false,false,'info',...additionalArguments)}", "title": "" }, { "docid": "30c567e32a97888997063a2d8eea1bc2", "score": "0.6067488", "text": "debug (...args) {\n checkAndSetTraceId(this.getMdc(), this)\n let result = extractArgs(args, this.getMdc())\n let { msg, data, msgTokens } = result\n data = addTraceIdAndEventToSerializerObject(data, this.getMdc())\n checkAndUpdateEvent(this, data.event)\n this._logger.debug(data, msg, msgTokens)\n }", "title": "" }, { "docid": "0153052f7e0f8a4ba4b026bb72f44107", "score": "0.6062491", "text": "function log(){\n\n\n}", "title": "" }, { "docid": "823985ffdbe7dbd073ddbcfcec4cc12b", "score": "0.6019654", "text": "drawTrace() {\n super.drawTrace();\n }", "title": "" }, { "docid": "6dcf503e940e6b29bd837703d713190f", "score": "0.59969074", "text": "writing(){\n this._custLog('Call writing');\n }", "title": "" }, { "docid": "9ff0b6684d7bb1c94ea38b0060d692c7", "score": "0.5993133", "text": "function Sc(t) {\n var e;\n e = t, D.setLogLevel(e);\n }", "title": "" }, { "docid": "79f1db9d6dbff81eacb47e6be80286a9", "score": "0.59675366", "text": "function verbose(text, requestId) {\n debug.assertValue(text, 'text');\n logTraceInternal(new jsCommon.TraceItem(text, 1 /* Verbose */, requestId));\n }", "title": "" }, { "docid": "cbac59e8c9e14a6371c40b932ec7b9e2", "score": "0.59578395", "text": "constructor() {\n /** A list of end span event listeners */\n this.eventListenersLocal = [];\n /** Bit to represent whether trace is sampled or not. */\n this.IS_SAMPLED = 0x1;\n /** An object to log information */\n this.logger = logger.logger();\n this.activeLocal = false;\n this.activeTraceParams = {};\n }", "title": "" }, { "docid": "aff91d2e4dec91e3201f98f8ad57aed4", "score": "0.59569454", "text": "function DummyLogger(){\n\n}", "title": "" }, { "docid": "a23a14197283136424b8dfa9b0a17cc8", "score": "0.59337527", "text": "debugLog() {\n if (this.enabled) {\n console.info('[jump-to-import] Debug Report: ', this.toReport);\n }\n }", "title": "" }, { "docid": "7f411a5d9412eb60cd550def08b55853", "score": "0.59281063", "text": "function log(depth, verb, test, index) {\n console.log(\n (' ' + depth).slice(-3) + ' : ' +\n Array(depth * 2).join(' ') + // depth + ' ' +\n (' ' + verb).slice(-5) +\n (' ' + test + ' ').slice(0,16) +\n (' ' + index).slice(-5))\n}", "title": "" }, { "docid": "7f6416308d22b36304d3f93da096e48a", "score": "0.5924703", "text": "log(kind, msg, data){ this.logger(kind, msg, data) }", "title": "" }, { "docid": "6e87f9860ebe7255ffd09dab55b35f88", "score": "0.59196454", "text": "function logging () {\r\n\tgetRapper(this.id);\r\n}", "title": "" }, { "docid": "9babad6e2268f375c84d7b3590539f27", "score": "0.59007275", "text": "trace(traceContext = this._traceContext, traceOptions = { action: EventMessage_1.TraceEventAction.span }) {\n return __awaiter(this, void 0, void 0, function* () {\n let { state } = extractLoggerOptions(EventMessage_1.EventType.trace, traceOptions);\n if (this._traceContext.finishTimestamp && this.finished)\n throw new Error('span already finished');\n if (!state)\n throw new Error('no valid state provided');\n let event = EventMessage_1.EventMetadata.trace({ action: EventMessage_1.TraceEventAction.span, state });\n let message = new EventMessage_1.EventMessage({\n type: 'trace',\n content: traceContext,\n metadata: {\n event,\n trace: traceContext\n }\n });\n let logResult = yield this.record(message);\n if (EventMessage_1.LogResponseStatus.accepted == logResult.status) {\n this.finished = this._traceContext.finishTimestamp ? true : false;\n return logResult;\n }\n else {\n throw new Error(`Error when logging trace. status: ${logResult.status}`);\n }\n });\n }", "title": "" }, { "docid": "c3433b508800c69bc279990e48f75292", "score": "0.5894667", "text": "function testLogging(callback) {\n loggingSetMetadata([{'bingo': 'bongo', 'smurf': 'geburf'}], function() {\n loggingStart(function() {\n loggingUploadOnRenderClose();\n loggingStop(function() {\n callback('');\n });\n });\n });\n}", "title": "" }, { "docid": "2860fff8090efe22b09a57b51fc42d69", "score": "0.5884771", "text": "function trace(arg) {\n var now = (window.performance.now() / 1000).toFixed(3);\n console.log(now + ': ', arg);\n}", "title": "" }, { "docid": "a0f300cd112e8e857c004587a588c301", "score": "0.5878914", "text": "function Sc(t) {\n var e;\n e = t, D.setLogLevel(e);\n}", "title": "" }, { "docid": "d52c00ea09c05fb651c83bfb95b78e6f", "score": "0.58785474", "text": "configuring(){\n this._custLog('Configuration');\n }", "title": "" }, { "docid": "aad2350e388e2376707d43cee38c6af7", "score": "0.58700097", "text": "trace(text) {\n text = text.trim();\n const now = (window.performance.now() / 1000).toFixed(3);\n \n console.log(now, text);\n }", "title": "" }, { "docid": "c57b4c3c37d0fe94aaecc62846463657", "score": "0.585075", "text": "function trace(text)\r\n{\r\n\tif(debug == false) return;\r\n\tif(applet != null)\r\n\t\tapplet.log(text);\r\n\telse\r\n\t\tSystem.out.println(text);\r\n}", "title": "" }, { "docid": "5dc1e4bb463bc9da92e667258caded27", "score": "0.58468145", "text": "function trace(message){\n\tif (typeof console == \"object\"){\n\t\tconsole.log(message);\n\t}\n}", "title": "" }, { "docid": "1c2ba1faa7d33080b60d1e3202e06322", "score": "0.5843558", "text": "debug(object,...additionalArguments){return this.log(object,false,false,'debug',...additionalArguments)}", "title": "" }, { "docid": "60d8e95a09c44c00c0d07fbad749ddd8", "score": "0.5830775", "text": "function Sc(t) {\n var e;\n e = t, E.setLogLevel(e);\n}", "title": "" }, { "docid": "13b624f685ac9f2de1b11298320af386", "score": "0.58095556", "text": "log( something ) {\n if ( this.debug ) {\n console.log( something );\n }\n }", "title": "" }, { "docid": "e96e9ea58ab58d8b62ee90271ad18923", "score": "0.5798719", "text": "log(entry) {\n this.method(entry);\n }", "title": "" }, { "docid": "6aaa06d69b4b2b3b944f60d2ced836cb", "score": "0.57944196", "text": "function log(msg){\n if(VERBOSE) console.log(\"[Pavlok API] \" + msg);\n}", "title": "" }, { "docid": "17eb917919c8c82b2b380a0640aaeb88", "score": "0.5789798", "text": "function log () {\n\tlogMode && console.log('wasavi: ' + toArray(arguments).join(' '));\n}", "title": "" }, { "docid": "a8f17a3a6c8cb2d77d85d0d93cabdd40", "score": "0.5784489", "text": "function initLog() {\r\n\r\n console.log('treesIndexCtrl init');\r\n }", "title": "" }, { "docid": "61b2dda42c2a0fbd2c98c0e6bc1a399d", "score": "0.57825905", "text": "log() {\n if (this.debug != true) return;\n\n console.log(Array.prototype.slice.call(arguments, 0).join(\"\\t\"));\n }", "title": "" }, { "docid": "559c14cae3a771d6a9d3156d0c270757", "score": "0.5775108", "text": "function trace(message) {\n if (typeof console != 'undefined') {\n console.log(message);\n }\n}", "title": "" }, { "docid": "76e04e76b370f076bb2d02169b970958", "score": "0.5763578", "text": "trace(text) {\n text = text.trim()\n const now = (window.performance.now() / 1000).toFixed(3)\n\n console.log(now, text)\n }", "title": "" }, { "docid": "5a41c19163d985c2cbc40eeceaf1488f", "score": "0.5756717", "text": "function trace(str) {\n if (conf.trace) conf.trace(\"CommWrapper:\"+str);\n }", "title": "" }, { "docid": "624072bb8b26f6beb4ba405250e71983", "score": "0.5752577", "text": "function foo() {\n function bar() {\n console.trace(\"This is a trace message\");\n }\n bar();\n}", "title": "" }, { "docid": "88ee7ac84a3e7b791d9960630395bf92", "score": "0.5735082", "text": "start() {\n super.start();\n this.logger.debug('starting %s %o', this.className, {\n traceId: this.traceId,\n id: this.id,\n parentSpanId: this.parentSpanId,\n traceState: this.traceState\n });\n this.tracer.onStartSpan(this);\n }", "title": "" }, { "docid": "88ee7ac84a3e7b791d9960630395bf92", "score": "0.5735082", "text": "start() {\n super.start();\n this.logger.debug('starting %s %o', this.className, {\n traceId: this.traceId,\n id: this.id,\n parentSpanId: this.parentSpanId,\n traceState: this.traceState\n });\n this.tracer.onStartSpan(this);\n }", "title": "" }, { "docid": "fef47262358bd49f9111049d4c98d473", "score": "0.5727194", "text": "function trace(str){\n\n\tif(typeof console != \"undefined\")\n\t\tconsole.log(str);\n\n}", "title": "" }, { "docid": "4e6341fc287b019456578d6a51fc86ff", "score": "0.57250375", "text": "function myLogger(req, res, next) {\n\tconsole.log('request ' + req.method + ' ' + req.path);\n\tnext(); // passes the request to the next department\n}", "title": "" }, { "docid": "6f5320af179fd39e6f543b7c4df5f2d2", "score": "0.57167345", "text": "function hello(){\n log(\"hello world!\");\n}", "title": "" }, { "docid": "ef6fd0bd0f08e0d28dd0b4f5dfd00e1e", "score": "0.5715509", "text": "function log(msg){\n\tTi.API.info(\"=== DEBUG API ===\");\n\tTi.API.info(msg);\n}", "title": "" }, { "docid": "1f2bf30bb179cbd1024b5c6f3aa468b7", "score": "0.5707528", "text": "function startLogging(path) {\n console.log(\"startLogging\");\n }", "title": "" }, { "docid": "cc5e85157ff13ca0a5dc819c7582598c", "score": "0.57038224", "text": "get isTracingEnabled() {\n return this.tracingEnabled_;\n }", "title": "" }, { "docid": "4210fb300199f61e23457939f84dcc34", "score": "0.57032675", "text": "static logTwice(){\n console.log(\"Me llamare 1\");\n console.log(\"NO! dos veces...\");\n }", "title": "" }, { "docid": "953e5456bf3166cd221e28e17001bdd9", "score": "0.56989074", "text": "async handle(ctx, next) {\n if (this._logger.enabled) {\n this.log(ctx);\n }\n await next();\n }", "title": "" }, { "docid": "27c359560416244602936f6cf9a36c75", "score": "0.56986666", "text": "function logTrace(...msg) {\n\t\tconsole.log(msg.join(\"\"));\n\t\tif(logger && logger.trace) {\n\t\t\ttry {\n\t\t\t\tlogger.trace(...msg);\n\t\t\t}\n\t\t\tcatch(e) {\n\t\t\t\tconsole.error(\"external logger call [info] failed: \" + e);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e50814cf4b3ee0527326dc94dfef823a", "score": "0.56785613", "text": "function log(msg) {\r\n}", "title": "" }, { "docid": "92cac4c3620059e5ab50e9ffb54a1dda", "score": "0.5676273", "text": "function main () {\n try {\n tracer.init()\n } catch (err) {\n logNope(err.message)\n return\n }\n\n // install the module.load shim\n if (typeof modModule.prototype.load !== 'function') {\n logNope('require(\"module\").load not found')\n return\n }\n\n // create the log stream\n const logsDir = userhome('.peakfun', 'logs')\n try {\n mkdirp.sync(logsDir)\n } catch (err) {\n logNope(`unable to create directory \"${logsDir}\"`)\n return\n }\n\n const logStream = LogStream.create(logsDir)\n\n Logger.log(`writing peakfun log to ${logStream.getFileName()}`)\n tracer.setLogStream(logStream)\n functions.setLogStream(logStream)\n\n ModuleLoadOriginal = modModule.prototype.load\n modModule.prototype.load = moduleLoadShim\n}", "title": "" }, { "docid": "74bd89e908a4ba32af979a017715e051", "score": "0.56732196", "text": "_custLog(logMessage) {\n this.log(\n chalk.bold.black.bgYellow('TG1: ') +\n chalk.black.bgYellow(logMessage)\n )\n }", "title": "" }, { "docid": "da9166b71661a8536b6d7b104cfa655b", "score": "0.56690985", "text": "function log(callback) {\n console.log(\"robot active\");\n\n var payload = { value: new Date().toISOString() };\n console.log(payload);\n datastore.log(config, payload);\n services.log(config, payload);\n}", "title": "" }, { "docid": "76ccedf498cdda19699004648d2214f2", "score": "0.5655906", "text": "function log(msg) {}", "title": "" }, { "docid": "69861670f5cebaf1b55718171a95c158", "score": "0.56508356", "text": "function initLog() {\r\n\r\n console.log('responsesIndexCtrl init');\r\n }", "title": "" }, { "docid": "f3bfc6f241d6a13aca68b422930b7bcb", "score": "0.56466395", "text": "logger_() {}", "title": "" }, { "docid": "8711c0f9aac2e828be15c0d4d919d087", "score": "0.5645632", "text": "trace(type, obj, body) {\n const dir = HttpTracer.dir(this.environ);\n // if trace is enabled...\n if ( dir ) {\n // write a file synchronously\n const write = (path, content) => {\n let fd = fs.openSync(dir + path, 'wx');\n fs.writeSync(fd, content);\n fs.fsyncSync(fd);\n };\n // log the http entity, and maybe its body\n let base = this.stamp + '-' + type;\n write(base + '.json', JSON.stringify(obj));\n if ( body instanceof buf.Buffer ) {\n write(base + '.bin', body);\n }\n }\n }", "title": "" }, { "docid": "734dcf8ef0e233f8e1af07f6fbe0f6fe", "score": "0.56375664", "text": "function logger() {}", "title": "" }, { "docid": "fc328e9fa62b90fe19d85c57e01249d2", "score": "0.56296575", "text": "function initLog() {\r\n\r\n console.log('treesStoreCtrl init');\r\n }", "title": "" }, { "docid": "026770031d87b7c61a83b9af2adb46af", "score": "0.5629099", "text": "function trace(msg) {\r\n\t\ttry {window.console.log(msg)} catch (err) {}\r\n\t}", "title": "" }, { "docid": "72ad94c75a24d2683c71c4785936271c", "score": "0.5627948", "text": "function loaderLog(msg){\n\tconsole.log(\"[fileLoader]~> \" + msg) ; \n}", "title": "" }, { "docid": "8b813a528a712deb01ad11563dc41f2c", "score": "0.5627926", "text": "function TraceAPI() {\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;\n this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;\n this.deleteSpan = context_utils_1.deleteSpan;\n this.getSpan = context_utils_1.getSpan;\n this.getSpanContext = context_utils_1.getSpanContext;\n this.setSpan = context_utils_1.setSpan;\n this.setSpanContext = context_utils_1.setSpanContext;\n }", "title": "" }, { "docid": "d3e5b7015090ddab992648463f5ebd0d", "score": "0.56244993", "text": "function erisTrace(msg) {\r\n\r\n if (erisTraceLevel) console.info(erisTimestamp() + ': eRIS - Trace: ' + msg);\r\n}", "title": "" }, { "docid": "72dceb54045dcd589d2f178d3befe7bb", "score": "0.5620359", "text": "function initLog() {\r\n\r\n console.log('treesUpdateCtrl init');\r\n }", "title": "" }, { "docid": "f3f612728cac31eab59ef3571d798f80", "score": "0.561399", "text": "function log(requestType, msg) {\n console.log(`/service/analytics:${requestType}: ${msg}`);\n}", "title": "" }, { "docid": "1ddd237135ab9403055d82ffbe7b88c6", "score": "0.56081814", "text": "log() {\n if (this.debug) {\n console.log.apply(window, arguments);\n }\n }", "title": "" }, { "docid": "375fa67bf32765764070600170ec3b1b", "score": "0.56009275", "text": "function myLogging(defaultLog) {\n console.log('Fixtures: processing ...')\n }", "title": "" }, { "docid": "20aeb7506182d465e380941750f99027", "score": "0.5595198", "text": "function logRequest(req, res, next) {\n\tconsole.log(`${new Date()} ${req.ip} : ${req.method} ${req.path}`);\n\tnext();\n}", "title": "" }, { "docid": "99538f725f0d66528a82a470777390d7", "score": "0.5588071", "text": "static log(){\n\n if(!this.logging) { return; } //Disabled when not in devmode\n\n console.log(\"GWatch: \",[].slice.call(arguments).join(\",\")); \n }", "title": "" }, { "docid": "c4fb036cfc5283f6adff47cf6961383d", "score": "0.5581712", "text": "function ConsoleLog(){\n\t\n}", "title": "" }, { "docid": "5049e32f0f86003429a8eb12c5f84724", "score": "0.55763793", "text": "function getSourceLog() {\n\t'use strict';\n\tds.source.log({\n\t\t'id': sourceDetails.id\n\t}, function(err, response) {\n\t\tif (err) {\n\t\t\tconsole.log(err);\n\t\t} else {\n\t\t\tconsole.log('Source log: ' + JSON.stringify(response));\n\t\t\tstopSource();\n\t\t}\n\t});\n}", "title": "" }, { "docid": "35b8d26f0dcc4117c2ca7820b959afb9", "score": "0.5571988", "text": "function logging_action() {\n // make sure responselog is enabled\n var hasResponseLog = logging.responseLogEnabled();\n if (!hasResponseLog) {\n logging.enableResponseLog();\n log.debug(\"enabling response log\");\n }\n if (req.data.info) {\n log.info(\"Hello world!\");\n } else if (req.data.error) {\n try {\n foo.bar.moo;\n } catch (e) {\n log.error(e, e.rhinoException);\n }\n }\n render('skins/logging.html', { title: \"Logging Demo\" });\n if (!hasResponseLog) {\n log.debug(\"disabling response log\");\n logging.disableResponseLog();\n }\n logging.flushResponseLog();\n}", "title": "" }, { "docid": "8d17fa290e7f452d98784c6fbc4ff71d", "score": "0.55707145", "text": "log () {\nconsole.log(dev_struc);\n}", "title": "" }, { "docid": "f313a32265957c539d3387bf3989922c", "score": "0.55649465", "text": "logActivity() {\n AWSService.logActivity(this);\n }", "title": "" }, { "docid": "9b66c8c2ee243be0e31e86791aa5cf36", "score": "0.5564944", "text": "function initLog() {\r\n\r\n console.log('treesShowCtrl init');\r\n }", "title": "" }, { "docid": "72b8fa5916ee099d09ae879dd56d2c58", "score": "0.5562034", "text": "function logging(){\n console.log(\"Logging function called\");\n}", "title": "" }, { "docid": "b64c57ba4c1773402fd44f002eb491ff", "score": "0.55617595", "text": "_internalLog(/* msg, msgContext */) {\n if (process.env.WINSTER_SUPRESS_LOGGING !== \"true\") {\n console.log.apply(console, arguments);\n }\n }", "title": "" }, { "docid": "8d5df19d9864bb493e29f19fec97d63d", "score": "0.5561314", "text": "function methodLogger(request, response, next){ \r\n\t\t console.log(\"METHOD LOGGER\");\r\n\t\t console.log(\"================================\");\r\n\t\t console.log(\"METHOD: \" + request.method);\r\n\t\t console.log(\"URL:\" + request.url);\r\n\t\t next(); //Call next middleware registered\r\n}", "title": "" }, { "docid": "76229aca1dfc8cfec95dfd6ffe231273", "score": "0.55539644", "text": "function TraceAPI() {\n this._proxyTracerProvider = new ProxyTracerProvider();\n this.wrapSpanContext = wrapSpanContext;\n this.isSpanContextValid = isSpanContextValid;\n this.deleteSpan = deleteSpan;\n this.getSpan = getSpan;\n this.getActiveSpan = getActiveSpan;\n this.getSpanContext = getSpanContext;\n this.setSpan = setSpan;\n this.setSpanContext = setSpanContext;\n }", "title": "" }, { "docid": "fc36960292c1382b2d588d6770e4f221", "score": "0.5553522", "text": "function pr( stuff ) {\n\tconsole.log( util.inspect( stuff ) );\n}", "title": "" }, { "docid": "03c9fd1d930409f6c023297b29755e03", "score": "0.5547959", "text": "function logger() { }", "title": "" }, { "docid": "ca9e2ea8c85c4e58aa6dd92ff62741d1", "score": "0.5542459", "text": "function logGre(fn){ fn()}", "title": "" } ]
3698cce4072fbf743b90e268195344a1
Collects all paths and filenames for each schedule in the schedules directory.
[ { "docid": "3d1845a0e4264a61c914d7b614c48d82", "score": "0.7094096", "text": "function getRealSchedules(dirContents) {\n const realSchedules = [];\n dirContents.forEach(fileName => {\n if (/\\.(js|jsx)$/.test(fileName)) {\n realSchedules.push({\n fileName: fileName,\n filePath: path.resolve(__dirname, 'schedules', fileName)\n }); // put path on it\n }\n });\n return realSchedules;\n}", "title": "" } ]
[ { "docid": "fffab733b2f822e42fd6e325f6d18d19", "score": "0.6144377", "text": "function createAllProfSchedulesDir()\n\t\t{\n\t\t\t(async () => {\n\t\t\t const path = await makeDir('All_Prof_Schedules');\n\t\t\t console.log(path);\n\t\t\t})();\n\t\t}", "title": "" }, { "docid": "7e1114f755f1c61dce7d557da19e49e0", "score": "0.6123843", "text": "function createAllClassSchedulesDir()\n\t\t{\n\t\t\t(async () => {\n\t\t\t const path = await makeDir('All_Class_Schedules');\n\t\t\t console.log(path);\n\t\t\t})();\n\t\t}", "title": "" }, { "docid": "54507db65efa2fe44a5f3b497c9858e2", "score": "0.60337925", "text": "fetchAllFiles() {\n for (let distro of this.distros) {\n this.fetchAllFilesHelper(distro);\n }\n }", "title": "" }, { "docid": "16ac751e169a8648dcc04e4b689f1924", "score": "0.5743027", "text": "function iterate(){\n console.log(GITHUB_EVENT_PATH)\n // let arr = [];\n // fs.readdirSync(mainPath)\n // .map(dir => path.join(mainPath, dir))\n // .filter(path => fs.statSync(path).isDirectory())\n // .forEach(dir => arr.push(getFilesContent(dir.split('/')[3])))\n //\n // console.log(arr)\n // arr.forEach(payload => postTemplates(payload))\n}", "title": "" }, { "docid": "7ed18c9c8764d0549ca1d56ec0622055", "score": "0.56193423", "text": "async *searchRoutes() {\n //find files\n const files = await _filehound.default.create().paths('./' + (process.env.BUILD_FOLDER ?? 'dist')).match(this.routesFilesName).find(); //build a map of promises\n\n const results = files.map(async file => {\n //import file\n const fileContent = await Promise.resolve(`${process.cwd() + '/' + file}`).then(s => _interopRequireWildcard(require(s))); //build an object with file path and routes definitions\n\n return {\n path: file,\n routes: fileContent.default\n };\n }); //loop and yeld results\n\n for (let result of results) {\n yield result;\n }\n }", "title": "" }, { "docid": "9a9f7a98186d0ed8869a61f3658e40cd", "score": "0.5502726", "text": "async collectFiles(targetPath) {\n // readdir from the target directory\n const files = await fs.promises.readdir(targetPath);\n\n // loop through files\n for (let file of files) {\n // join path\n const filepath = path.join(targetPath, file);\n // stats gets file status (lstat is the function does this)\n const stats = await fs.promises.lstat(filepath);\n // stats is a file and includes 'test.js'\n if (stats.isFile() && file.includes(\"test.js\")) {\n // push file\n this.testFiles.push({ name: filepath });\n }\n // directory && is not in forbidden dirs\n else if (stats.isDirectory() && !this.forbiddenDirs.includes(file)) {\n \n const childFiles = await fs.promises.readdir(filepath);\n // push new files into 'files' array.\n files.push(...childFiles.map(f => path.join(file, f)));\n }\n }\n }", "title": "" }, { "docid": "610bd1733488f699e2ccd2099104ec24", "score": "0.54348", "text": "function findSchedules() {\n\t\tif(bSchedulesGenerated && !bCoursesModified) {\n\t\t\t// We've already generated schedules and we haven't changed the course list yet\n\t\t\twindow.location.href = \"schedules.html\";\n\t\t\treturn;\n\t\t}\n\t\t\n // Create an array of only course IDs to pass to the generator.\n var aCourseIDs = [];\n for(var i = 0; i < aCourses.length; i++) aCourseIDs.push(aCourses[i].sCourseID);\n\t\t\n\t\t// If the user hasn't added any courses, alert them\n\t\tif(aCourseIDs.length == 0) {\n\t\t\talert(\"Please add one or more courses first.\");\n\t\t\treturn;\n\t\t}\n \n\t\tupdateFindSchedulesStatus(0, 0);\n Generator.startGenerating(aCourseIDs, updateFindSchedulesStatus);\n \n $(\".ui-footer-start-generation\").css(\"visibility\", \"hidden\");\n }", "title": "" }, { "docid": "e91b4b188d6c6003ac9a8b426d3ad6b9", "score": "0.54146165", "text": "async function getAllPatterns() {\n await busroutes()\n\n const starttime = performance.now()\n const routeKeys = Object.keys(routes)\n await Promise.all(routeKeys.map(async route => { // 5100ms\n await getPatterns(route) \n }))\n\n console.log(`Fetches done in ${Math.floor(performance.now()-starttime)}ms. Saving routes.json`)\n fs.writeFile(\"routes.json\", JSON.stringify(routes), 'utf8', err => {\n if (err) {\n console.log(\"An error occured while writing the routes out\")\n console.dir(err)\n } else {\n console.log(\"routes have been saved.\")\n }\n }) \n}", "title": "" }, { "docid": "9b20ddd1e85a0ce4900818b88436d029", "score": "0.53890705", "text": "createSchedulesFromList() {\n _forEach(SpawnPatternCollection.spawnPatternModels, (spawnPatternModel) => {\n // set the #cycleStartTime for this `spawnPatternModel` with current game time\n spawnPatternModel.cycleStart(TimeKeeper.accumulatedDeltaTime);\n spawnPatternModel.scheduleId = this.createNextSchedule(spawnPatternModel);\n spawnPatternModel.createPreSpawnAircraft(this._aircraftController);\n });\n }", "title": "" }, { "docid": "32af3b30657deca111a0f33a22ef8173", "score": "0.53693444", "text": "lookup() {\n const { prevFiles } = this;\n const curFiles = inspectDirectory(this.dir, this.ignore);\n const [created, removed] = compareFiles(prevFiles, curFiles);\n this.prevFiles = curFiles;\n\n if (!prevFiles) return;\n\n removed.files.forEach(de => this.emit('remove', de));\n removed.directories.reverse().forEach(de => this.emit('remove', de));\n\n created.directories.forEach(de => this.emit('create', de));\n\n metasync.map(\n created.files,\n (de, cb) => fs.readFile(de.name, (err, data) => {\n if (err) cb(err);\n else cb(null, [de, data]);\n }),\n (err, files) => {\n if (err) {\n console.error(err);\n return;\n }\n files.forEach(([de, data]) => this.emit('create', de, data));\n }\n );\n }", "title": "" }, { "docid": "a543655c7cd014c45c17e0de0923d969", "score": "0.53667784", "text": "function directoryCollector(genPath) {\n console.log(genPath)\n var walkSync = function (dir, filelist) {\n var path = path || require('path');\n var fs = fs || require('fs'),\n files = fs.readdirSync(dir);\n filelist = filelist || [];\n files.forEach(function (file) {\n if (fs.statSync(path.join(dir, file)).isDirectory()) {\n filelist = walkSync(path.join(dir, file), filelist);\n }\n else {\n filelist.push(dir + '/' + file);\n }\n });\n return filelist;\n };\n return walkSync(genPath);\n}", "title": "" }, { "docid": "cddc160746492cbba8ee51a8586fdefa", "score": "0.5363825", "text": "async list() {\n const path = this.getPath();\n\n const content = await fs.promises.readdir(path);\n\n return Promise.all(content.map(async (fname) => {\n const fPath = this.getPath(fname);\n\n const stat = await fs.promises.lstat(fPath);\n\n if (stat.isFile()) {\n return {\n name: fname,\n size: stat.size,\n created_at: stat.ctime,\n updated_at: stat.mtime,\n };\n }\n\n return null;\n }));\n }", "title": "" }, { "docid": "9260fd3f3aa87091a581d2cec6542108", "score": "0.5320293", "text": "processEvents() {\n const folders = readdirSync(resolve(`${__dirname}/${this.evntDir}`));\n for (const folder of folders) {\n const files = readdirSync(resolve(`${__dirname}/${this.evntDir}/${folder}`)).filter(\n f =>\n f.endsWith('.js')\n );\n for (const file of files) {\n const event = require(resolve(`${__dirname}/${this.evntDir}/${folder}/${file}`));\n const name = event.name ? event.name : file.split('.')[0];\n this.on(name, event.run.bind(null, this));\n }\n }\n }", "title": "" }, { "docid": "307bcefddf8f931b2a55a0dfbe716f2d", "score": "0.5313188", "text": "function collectPackets() {\r\n return new Promise(async (resolve, reject) => {\r\n const packets = {in: {}, out: {}}\r\n const promises = []\r\n\r\n // This does not have to search the directory since what we do with the packets\r\n // is really just in the view model. We should just read from a manifest\r\n let packetFiles = await fsExt.readdirRecursive('../../', isPacketFile)\r\n })\r\n }", "title": "" }, { "docid": "e6cd1b39ed83d79b93252a5aedd58503", "score": "0.53036994", "text": "fetchAllFiles() {\n for (let distro of this.distros) {\n this.archs = this.archsByDistro[distro];\n //console.log(this.archs);\n super.fetchAllFilesHelper(distro);\n }\n }", "title": "" }, { "docid": "84c94777018b609096acaecf3a608675", "score": "0.53028977", "text": "async function addMoviesFromLocation(loc, existingMovies) {\n var m = []\n var moviesInLoc = fs.readdirSync(loc, { withFileTypes: true })\n for(var i=0;i<moviesInLoc.length;i++) {\n const movieName = moviesInLoc[i][\"name\"];\n const moviePath = loc + movieName\n\n logger.info(\"addMoviesFromLocation\", \"Add movie \"+moviePath+\" from \"+loc);\n\n // Check if subfolder exists.\n if(fs.statSync(moviePath).isDirectory()) {\n // Check if same folder has been stored already to database\n if(existingMovies.filter((element) => element[\"path\"] == moviePath).length > 0) {\n // Movie already exists. Check new folder\n continue;\n }\n\n var movieObj = {}\n movieObj[\"name\"] = movieName;\n movieObj[\"path\"] = moviePath;\n \n subs = [];\n\n // Read all files in subfolder.\n fs.readdirSync(moviePath).forEach(file => {\n // If contains a dir and its name is Subs, add existing files in Subs with extension .srt to available movie subs.\n if(fs.statSync(moviePath + \"/\" + file).isDirectory()) {\n if(file == \"Subs\") {\n fs.readdirSync(moviePath + \"/Subs\").forEach(subFile => {\n if(subFile.endsWith(\".srt\")) { \n subObj = {}\n subObj[\"filename\"] = subFile;\n subObj[\"path\"] = moviePath + \"/Subs/\" + subFile;\n subs.push(subObj)\n } \n });\n }\n }\n else {\n // Check files. If their extension is a supported movie extension, this is the movie file.\n if(file.endsWith(\".avi\") || file.endsWith(\".mp4\") || file.endsWith(\".mkv\")) {\n movieObj[\"file\"] = moviePath + \"/\" + file; \n }\n // If files have .srt extension, they are subs. Add them to available movie subs.\n else if(file.endsWith(\".srt\")) {\n subObj = {}\n subObj[\"filename\"] = file;\n subObj[\"path\"] = moviePath + \"/\" + file;\n subs.push(subObj)\n }\n }\n });\n\n movieObj[\"subs\"] = subs;\n m.push(new movieModel(movieObj));\n }\n }\n\n return m;\n}", "title": "" }, { "docid": "1ee0f3d0a1121a61d0a48445e3161048", "score": "0.5284802", "text": "getAll() {\n return readdir(this.copiedStores).then((files) => { \n return files.map((file) => \n path.basename(file, '.json')\n );\n })\n .then((family) => {\n return Promise.all(\n family.map((member) => {\n console.log('family member', member);\n return this.get(member);\n })\n );\n });\n }", "title": "" }, { "docid": "82f88ff16783d32aa7c701173dfc890a", "score": "0.52715355", "text": "function scanTests() {\n const directoryPath = 'public'\n const fileNames = fs.readdirSync(directoryPath)\n console.log('');\n return Promise.map(fileNames, file => scanTest('public/'+file), {concurrency:4}) //\n}", "title": "" }, { "docid": "8afb88a2a204421a1debeee4cf883004", "score": "0.52597547", "text": "function findFiles () {\n const files = {};\n\n function process(file, encoding, cb) {\n const directory = file.path;\n const buildDir = file.buildDir;\n\n glob(\n '**/*',\n { cwd: directory, nodir: true },\n function (err, matches) {\n _.each(matches, function (match) {\n const staticLocation = path.join(buildDir, match);\n files[staticLocation] = new Vinyl({\n path: path.join(directory, match),\n staticLocation,\n });\n });\n\n cb();\n }\n );\n }\n\n function finish (cb) {\n const filesList = _.values(files);\n\n _.each(filesList, function (file) {\n this.push(file);\n }.bind(this))\n\n cb();\n }\n\n return through.obj(process, finish);\n}", "title": "" }, { "docid": "31e304804424321a149863bfa6176714", "score": "0.5246849", "text": "function getECSfiles()\n\t{\n\t\tserver.emit('loadingECS');\n\t\tserver.once('ecsFiles', (directories) => //names of the files in the folders to load\n\t\t{\n\t\t\t//put all of the modules to load in one array\n\t\t\tlet ECSfileNames = [].concat.apply([], Object.values(directories));\n\t\t\t\n\t\t\t//load loadECS and all of the modules\n\t\t\trequire(['js/loadECS.js'].concat(ECSfileNames), function()\n\t\t\t{\n\t\t\t\t//arguments is a numerically indexed object!?! fix that\n\t\t\t\targuments = Object.values(arguments);\n\t\t\t\t//loadECS is the first argument\n\t\t\t\tlet loadECS = arguments.splice(0, 1)[0];\n\n\t\t\t\t//for each directory name\n\t\t\t\tObject.keys(directories).forEach(directoryName =>\n\t\t\t\t{\n\t\t\t\t\t//get the names of the files in that directory\n\t\t\t\t\tfileNames = directories[directoryName];\n\n\t\t\t\t\t//ovewrite the filenames with the loaded files\n\t\t\t\t\t//by grabbing the relevant section from the front of the array\n\t\t\t\t\tdirectories[directoryName] = arguments.splice(0, fileNames.length);\n\n\t\t\t\t\t//then once they've loaded, dynamically get the name\n\t\t\t\t\tdirectories[directoryName].forEach((fileObject, index) =>\n\t\t\t\t\t{\n\t\t\t\t\t\tif(typeof fileObject !== \"object\")\n\t\t\t\t\t\t\tthrow new Error(directoryName + \" file \" + fileNames[index] + \" did not return an object\");\n\n\t\t\t\t\t\t//get the filename from the filepath\n\t\t\t\t\t\tfileObject.name = fileNames[index].match(/[\\w-]+\\./)[0];\n\t\t\t\t\t\tfileObject.name = fileObject.name.substring(0, fileObject.name.length - 1);\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\t//now that we've grabbed what's inside those modules, load 'em up!\n\t\t\t\tloadECS(\n\t\t\t\t\tdirectories.systems,\n\t\t\t\t\tdirectories.components\n\t\t\t\t).then(afterECSLoad);\n\n\t\t\t\tserver.emit('loading');\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "ff96d5973ad0eb60c926edb18d157f7b", "score": "0.51882946", "text": "extractAllFiles() {\n return new Promise((resolve, reject) => {\n fs.readdir(this.dir, (err, files) => {\n if (err) {\n return reject(err);\n }\n\n const promises = this.getAllMetadata(files);\n // return when all files have been processed\n return Promise.all(promises)\n .then(data => {\n resolve(data);\n }, err => {\n reject(err);\n });\n });\n });\n }", "title": "" }, { "docid": "2eb19d27aceaf751291916a636a13e23", "score": "0.51663977", "text": "groupFolderPaths() {\n for (var i = 0; i < this.folders.length; i++) {\n var src = [];\n var uniqueCompare = compareStrings(this.folders[i]);\n\n for (var j = 0; j < this.pathsArray.length; j++) {\n\n if(uniqueCompare(this.pathsArray[j])) {\n // if the path is a folder\n if(isFolder(this.pathsArray[j])) {\n // add a glob to get all images\n src.push(this.pathsArray[j] + '/**/*')\n } else {\n // otherwise just push the path\n src.push(this.pathsArray[j]);\n }\n\n }\n\n }\n\n this.buildObjects(src, this.folders[i]);\n\n }\n }", "title": "" }, { "docid": "d339957462d79e054ce8c231a7087f04", "score": "0.51655567", "text": "function loadRoomsAndProcess(filenames, static_roomnames)\n{\n var temp_rooms = {},\n k;\n\n for (k in filenames)\n {\n if (filenames.hasOwnProperty(k)) {\n watchFile(filenames[k]);\n }\n }\n}", "title": "" }, { "docid": "bbf2a42478c142a63761190362fc69f5", "score": "0.51644605", "text": "get static_files() {\n return Object.values( this._collections ).reduce( ( ds, c ) => {\n if( c.outputable ) {\n ds = ds.concat( c.static_files );\n }\n return ds;\n }, []);\n }", "title": "" }, { "docid": "1333e0056fd6395c77b829216501b28d", "score": "0.5140402", "text": "function getAll(){\r\n\treturn heUtils.retrieveFilesFromPathSync(PATH);\r\n}", "title": "" }, { "docid": "202cf9c757461eb879510db2f2787f14", "score": "0.5126505", "text": "listItems()\n {\n let output = {};\n for (let file of fs.readdirSync(this.dirname))\n {\n if (file.match(/\\.json$/))\n {\n let stat = fs.statSync(path.join(this.dirname, file));\n if (stat.isFile())\n {\n output[file.substr(0, file.length - 5)] = stat.mtime;\n }\n }\n }\n return output;\n }", "title": "" }, { "docid": "140a20acd42f2b2054d1fb97de29e13e", "score": "0.51178753", "text": "createPaths () {\n return Promise.all(Object.keys(Viz.PATHS).map((key) => {\n return this.createPath(path.join(this.rootPath, Viz.PATHS[key]))\n }))\n }", "title": "" }, { "docid": "0f65cc72113c5df36acc6af6d4441ed6", "score": "0.5098957", "text": "function onschedule() {\n\tsnapshot(peeks).forEach(gopeek);\n\tsnapshot(pokes).forEach(gopoke);\n\tsnapshot(mutes).forEach(gomute);\n}", "title": "" }, { "docid": "883498b0893abba846988f2501231ab9", "score": "0.5096482", "text": "async function findFiles() {\n const files = await fsp.readdir(rootLoc);\n const ccfiles = [];\n for (let subdir of files) {\n const fullDir = path.join(rootLoc, subdir);\n const allFiles = await fsp.readdir(fullDir);\n if (allFiles.some((fn) => fn === ccname)) {\n ccfiles.push(path.join(fullDir, ccname));\n }\n }\n return ccfiles;\n}", "title": "" }, { "docid": "4cace0eead1d6d29c7673ad6a9fec17b", "score": "0.50814164", "text": "async process() {\n const allStats = await glob(this.sourcePatterns, {\n cwd: this.baseDir,\n dot: this.dotFiles,\n stats: true\n })\n\n /**\n * @typedef {{path: string, stats: fs.Stats, contents: Buffer}} File\n * @type {{[relativePath: string]: File}}\n */\n this.files = {}\n\n await Promise.all(\n allStats.map(stats => {\n const absolutePath = path.resolve(this.baseDir, stats.path)\n return fs.readFile(absolutePath).then(contents => {\n const file = { contents, stats, path: absolutePath }\n this.files[stats.path] = file\n })\n })\n )\n\n await new Wares().use(this.middlewares).run(this)\n\n return this\n }", "title": "" }, { "docid": "a97d28efb010600d5e558787da0e9d10", "score": "0.5079027", "text": "collectResources() {\n this.builtStructures.forEach(structure => structure.collect());\n }", "title": "" }, { "docid": "55b75bf0ee12a1424ba4f8cae1812c46", "score": "0.5057515", "text": "function compileDirsToBeWatched(project) {\n console.log('compile to_be_watched');\n return new Promise((resolve, reject) => {\n fs.readdir(project.root_path, function(err, dirs) {\n if(err) { reject(new Error('Failed to read project dir for to_be_watched')); }\n\n for (let i=0; i<dirs.length; i++) {\n // exclude hidden dirs\n if ( dirs[i][0] !== '.' ) {\n // add project dirs\n if( fs.lstatSync(path.join(project.root_path, dirs[i])).isDirectory() ) {\n to_be_watched.dirs.push(dirs[i]);\n } else {\n // check if file is an excluded file\n if( !project.excluded_file_paths.includes(dirs[i])) {\n // add file\n to_be_watched.files.push(dirs[i]);\n }\n }\n }\n }\n resolve();\n });\n });\n }", "title": "" }, { "docid": "541aaefe95fe49466d657ac16db76049", "score": "0.50416213", "text": "function fromFiles(fs, cwd, filePaths) {\n\tconst map = new Map();\n\n\treturn new Promise((resolve, reject) => {\n\t\tfor (let f = 0; f < filePaths.length; f += 1) {\n\t\t\tlet filePath = filePaths[f];\n // sends one path at a time to the worker pool\n\t\t\tworkers({cwd, filePath}, (err, output) => {\n\t\t\t\tif (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// if (typeof output.LastModified === 'string') {\n\t\t\t\t// \toutput.LastModified = new Date(output.LastModified);\n\t\t\t\t// }\n\t\t\t\tmap.set(filePath, output);\n\n // we can only tell we are finished by counting our results\n\t\t\t\tif (map.size >= filePaths.length) {\n // looks like we're done\n\t\t\t\t\tresolve(map);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "c40599d2e7c8cdeaf109d1a5221ce35d", "score": "0.5031106", "text": "async function getInputFileList() {\n // read directory content - get list of filenames\n // create absolute path to each filename\n}", "title": "" }, { "docid": "92443760ac289dd4ede2f9e3989fc8c9", "score": "0.5009183", "text": "async _getExistingFiles() {\n const files = await fs.readdir(this.fileObject.dir).catch(() => []);\n\n debug(`_getExistingFiles: files=${files}`);\n const existingFileDetails = files\n .map(n => this.fileNameParser(n))\n .filter(n => n);\n\n const getKey = n =>\n (n.timestamp ? n.timestamp : newNow().getTime()) - n.index;\n existingFileDetails.sort((a, b) => getKey(a) - getKey(b));\n\n return existingFileDetails;\n }", "title": "" }, { "docid": "58d296c1c842fcb6abc4b6194bfbd462", "score": "0.5008239", "text": "constructor() {\n this.schedules = [];\n this.scheduleSubsemesters = [];\n }", "title": "" }, { "docid": "7357e13bee10b070eb80b59b10beadd5", "score": "0.49853384", "text": "function scheduleScreenshots(dateStart, dateEnd, interval, x, y, r, b, fileName) {\n\tvar now = new Date()\n\tif(dateStart < now)\n\t\tconsole.log(\"Warning! The start date is in the past and this function will not run!\")\n\tvar screenshotJob = scheduleScreenshot(dateStart, x, y, r, b, fileName, function() {\n\t\tvar now = new Date()\n\t\tif(now < dateEnd) {\n\t\t\tvar nextScreenshotTime = new Date(now.getTime() + interval*1000)\n\t\t\t// console.log(\"Scheduling new screenshot for: \" + nextScreenshotTime);\n\t\t\tvar name = getFolderLabelFromDate(nextScreenshotTime) // We reuse getFolderLabel from date here but not for the folder label.\n\t\t\tconsole.log(name)\n\t\t\tscheduleScreenshots(nextScreenshotTime, dateEnd, interval, x, y, r, b, screenshotPath + name + \".png\")\n\t\t} else {\n\t\t\t// console.log(\"All screenshots taken!\");\n\t\t\tvar now = new Date()\n\t\t\tvar convertTime = new Date(now.getTime() + 10000)\n\t\t\tscheduleConvertAllFilesToJpg(convertTime, screenshotPath, 60)\n\t\t\treturn\n\t\t}\n\t})\n}", "title": "" }, { "docid": "3b21b08123657e2e94302c41cd3a09a9", "score": "0.49812803", "text": "*paths() {\n for (const [path] of this.entries()) {\n yield path;\n }\n }", "title": "" }, { "docid": "637120d81325aa7226b13e6fcfbc1d37", "score": "0.49699768", "text": "iterate() {\n this.prunePaths();\n this.buildTree();\n\n if (this.paths != undefined && this.paths instanceof Array && this.paths.length > 0 && !this.paused) {\n for (let path of this.paths) {\n path.iterate(this.tree);\n }\n }\n }", "title": "" }, { "docid": "7943d977cff87fdccd3d32f9cf60c900", "score": "0.49671593", "text": "async _listAll(config) {\n this.config = this.setConfig(config);\n const { loadExtensions, recursive } = this.config;\n const seeds = flatten(\n await Promise.all(\n this._absoluteConfigDirs().map((d) =>\n getFilepathsInFolder(d, recursive)\n )\n )\n );\n // if true, each dir are already sorted\n // (getFilepathsInFolderRecursively does this)\n // if false, we need to sort all the seeds\n if (this.config.sortDirsSeparately) {\n return seeds.filter(filterByLoadExtensions(loadExtensions));\n } else {\n return seeds.filter(filterByLoadExtensions(loadExtensions)).sort();\n }\n }", "title": "" }, { "docid": "c1205f622d0d538e9ed134d34d448131", "score": "0.49512964", "text": "load_all_paths() {\n this.load_paths(true, true);\n }", "title": "" }, { "docid": "4b0da31d8ce1a3e803973ab94a008c76", "score": "0.49477103", "text": "async scheduleFileMonitoringOnServerStart() {\n try {\n const activeLandingZoneFileMonitoring = await FileMonitoring.findAll({\n where: {\n monitoringActive: true,\n // monitoringAssetType: \"landingZoneFile\",\n },\n raw: true,\n });\n for (const monitoring of activeLandingZoneFileMonitoring) {\n await this.scheduleFileMonitoringBreeJob({\n filemonitoring_id: monitoring.id,\n name: monitoring.name,\n cron: monitoring.cron,\n monitoringAssetType: monitoring.monitoringAssetType,\n });\n }\n } catch (err) {\n logger.error(err);\n }\n }", "title": "" }, { "docid": "3f1f9d10fbc52df9d2236f91a5736574", "score": "0.49402237", "text": "function loadFiles() {\n\t\tlogger.trace(\"inside loadFiles()\");\n\t\tvar allfiles = findFiles(rootpath, includes);\n\t\tvar filepaths = _.filter(allfiles, function(filepath) {\n\t\t\treturn !/.+(package\\.json)/.test(filepath);\n\t\t});\n\t\t_.forEach(filepaths, function(filepath) {\n\t\t\tregistry.files.push(filepath);\n\t\t});\n\n\t\tvar packagepaths = _.filter(allfiles, function(filepath) {\n\t\t\treturn(/.+(package\\.json)/.test(filepath));\n\t\t});\n\t\t_.forEach(packagepaths, function(filepath) {\n\t\t\tvar content = fs.readFileSync(path.posix.join(rootpath, filepath), 'utf8');\n\t\t\tvar json = JSON.parse(content);\n\t\t\tif(json.main) {\n\t\t\t\tregistry.directories.push({\n\t\t\t\t\tid: path.posix.dirname(filepath),\n\t\t\t\t\tpath: path.posix.resolve(path.posix.join(path.posix.dirname(filepath), json.main))\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tvar indexpaths = _.filter(allfiles, function(filepath) {\n\t\t\treturn(/.+(index\\.js)/.test(filepath));\n\t\t});\n\n\t\t_.forEach(indexpaths, function(filepath) {\n\t\t\tvar existingdir = _.find(registry.directories, function(dir) {\n\t\t\t\treturn dir.id === path.posix.dirname(filepath);\n\t\t\t});\n\t\t\tif(!existingdir) {\n\t\t\t\tregistry.directories.push({\n\t\t\t\t\tid: path.posix.dirname(filepath),\n\t\t\t\t\tpath: filepath\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\treturn registry;\n\t}", "title": "" }, { "docid": "72bba46b045a0bef390a31159ece1b09", "score": "0.49247894", "text": "function scanMonitoredFolders() {\n for(var i = 0; i < monitoredFolders.length; i++) {\n folderMonitor(monitoredFolders[i]); \n }\n}", "title": "" }, { "docid": "54ce9223360ae549171a824330ddc09d", "score": "0.49151143", "text": "function getDates(files) {\n return Promise.all(\n files.map(async function (fileName) {\n var dateOfFile = await stat(directoryPath + '/' + fileName)\n return {fileDate: dateOfFile.mtime, fileName: fileName } \n })\n )\n}", "title": "" }, { "docid": "62649ab656504aba602892e9c2cbf3cc", "score": "0.49080765", "text": "function loadFolderStructure(){\n\tvar folders = [];\n\tvar basePath = \".\"\n\tvar files = fs.readdirSync(basePath);\n\tconsole.log(\"processing path: \"+basePath);\n\tfiles.forEach(function(file){\n\t\tvar filePath = path.join(basePath,file);\n\t\t\n\t\tif(fs.statSync(filePath).isDirectory()){\n\t\t\tconsole.log(\"processing folder:\"+filePath);\n\t\t\tvar dirname = file;\n\t\t\tvar folder = new Folder();\n\t\t\tfolder.name = dirname;\n\t\t\tfolder.path = filePath;\n\t\t\tfolders.push(folder);\n\t\t\tvar folderContents = fs.readdirSync(dirname);\n\t\t\tfolderContents.forEach(function(folderItem){\n\t\t\t\tvar itemPath = path.join(folder.path,folderItem);\n\t\t\t\tif(fs.statSync(itemPath).isFile()){\n\t\t\t\t\tvar folderFile = new FolderFile();\n\t\t\t\t\tconsole.log(\"processing file\",itemPath);\n\t\t\t\t\tfolderFile.name = folderItem;\n\t\t\t\t\tfolderFile.path = itemPath;\n\t\t\t\t\tfolder.files.push(folderFile);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t});\n\n\treturn folders;\n\t\n}", "title": "" }, { "docid": "91d9258c31d7bd7051ff34bdd9dbf9ff", "score": "0.48893186", "text": "function getDataFiles() {\n return __awaiter(this, void 0, Promise, function* () {\n return new Promise((resolve) => {\n fs.readdir(getDataPath(), function (err, data) {\n resolve(data);\n });\n });\n });\n}", "title": "" }, { "docid": "cff05ad97acdb574c5bfc476c1780d87", "score": "0.48796892", "text": "get runtimePaths() {\n return this.request(`${this.prefix}list_runtime_paths`);\n }", "title": "" }, { "docid": "126e8d322004b7b7631ba19a878f1770", "score": "0.4878654", "text": "function processSchedule(schedule) {\n // schedule: as returned by /api/user (each item in the 'schedules' array) - the main part is the 'course_sections' array\n\n schedule = angular.copy(schedule); // Make a copy - some modifications may be made\n var day, j, k, cs;\n var processed = {\n start: 1440,\n end: 0,\n days: ['su', 'm', 'tu', 'w', 'th', 'f', 'sa'],\n courses: 0,\n ruled_out: 0,\n su: [],\n m: [],\n tu: [],\n w: [],\n th: [],\n f: [],\n sa: []\n };\n\n // Create single-day events\n for (var i=0; i < schedule.course_sections.length; i++) {\n cs = schedule.course_sections[i];\n if (cs.user_status == 'no') {\n processed.ruled_out++;\n continue;\n }\n cs.color = colors[processed.courses % colors.length];\n processed.courses++;\n for (j=0; j < cs.times.length; j++) {\n var time = cs.times[j];\n if (time.start < processed.start) {\n processed.start = time.start;\n }\n if (time.end > processed.end) {\n processed.end = time.end;\n }\n for (k=0; k < time.days.length; k++) {\n day = time.days[k];\n processed[day].push({\n start: time.start,\n end: time.end,\n type: time.type,\n building: time.building,\n room: time.room,\n course_section: cs\n });\n }\n }\n }\n\n // Drop empty weekends\n if (processed.su.length === 0) {\n delete processed.su;\n processed.days.shift();\n }\n if (processed.sa.length === 0) {\n delete processed.sa;\n processed.days.pop();\n }\n\n // Round start and end to nearest 30 minutes\n processed.start = Math.floor(processed.start / 30) * 30;\n processed.end = Math.ceil(processed.end / 30) * 30;\n var times = [];\n for (i=processed.start; i < processed.end; i+=30) {\n times.push({time: i, half: i%60==30});\n }\n processed.times = times;\n // Break events into columns\n var cmp = function(a, b) {\n if (a.start == b.start) {\n return a.end - b.end;\n } else {\n return a.start - b.start;\n }\n };\n for (i=0; i < processed.days.length; i++) {\n day = processed.days[i];\n var items = processed[day];\n // Sort by starting time, ending time\n items.sort(cmp);\n // Break items into conflict groups\n var groups = [];\n for (j=0; j < items.length; j++) {\n cs = items[j];\n // Check if the item fits into the last created group\n var last_group = groups[groups.length - 1];\n if (last_group && cs.start < last_group.end && cs.end > last_group.start) {\n last_group.items.push(cs);\n if (cs.end > last_group.end) {\n last_group.end = cs.end;\n }\n } else {\n // Put it into a new group\n groups.push({\n start: cs.start,\n end: cs.end,\n items: [cs]\n });\n }\n }\n for (j=0; j < groups.length; j++) {\n var group = groups[j];\n // Create a set of non-conflicting columns for each group\n var columns = [];\n for (k=0; k < group.items.length; k++) {\n var cur_item = group.items[k], placed = false;\n // Check if an existing column can accomodate the current item\n for (var l=0; l < columns.length; l++) {\n var column = columns[l];\n if (column[column.length - 1].end <= cur_item.start) {\n column.push(cur_item);\n placed = true;\n break;\n }\n }\n // If not, make a new column\n if (!placed) {\n columns.push([cur_item]);\n }\n }\n // Tell each event about its position\n for (var colnum=0; colnum < columns.length; colnum++) {\n var col = columns[colnum];\n for (k=0; k < col.length; k++) {\n var cur_event = col[k];\n cur_event.column = colnum;\n cur_event.denominator = columns.length;\n }\n }\n }\n }\n return processed;\n }", "title": "" }, { "docid": "982303d9008099dd16af1e92b4d82f11", "score": "0.48757583", "text": "function getPaths(obj, items = []) {\n\tfor (let x in obj) {\n\t\tif (typeof obj[x] === \"object\") {\n\t\t\tgetPaths(obj[x], items);\n\t\t} else if (x === \"path\") {\n\t\t\tif (obj.path.includes(\".\") && !obj.path.startsWith(\".\")) {\n\t\t\t\titems.push(obj.path.replace(\"dist\", \"\").replace(/\\\\/g, \"/\"));\n\t\t\t}\n\t\t}\n\t}\n\treturn {data: items};\n}", "title": "" }, { "docid": "6354478f2ab30dd156872ed1631062cd", "score": "0.48555884", "text": "async function routing() {\n for (const file of pages) {\n //for (const file of await getFiles(routesDir)) {\n // let imp = await require.main.require(path.normalize(__dirname+`/routes/${file}`));\n let imp = await require.main.require(file);\n try {\n if (imp.route) {\n imp.route(router);\n }\n else {\n imp(router);\n }\n } catch (e) { console.log(\"Impossible de charger la route \" + file); }\n if (imp.socket) {\n sockets.push(imp.socket);\n }\n let path1 = router.stack[router.stack.length - 1].route.path;\n path1 = path1.substring(1).split(\"/:\", 1)[0].split(\"&:\")[0];\n if (imp.breadcrumb) {\n if (Array.isArray(imp.breadcrumb))\n for (m in imp.breadcrumb) {\n retrieveAriane(imp.breadcrumb[m], path1);\n }\n else\n retrieveAriane(imp.breadcrumb, path1);\n }\n else {\n generateAriane(file, path1);\n }\n }\n}", "title": "" }, { "docid": "80601cd00215cf37aa6ecc735f0a4123", "score": "0.48435715", "text": "run () {\n try {\n const taskFiles = fs.readdirSync(this.tasksPath);\n taskFiles.forEach(file => {\n if (path.extname(file) === '.js') {\n const filePath = path.join(this.tasksPath, file);\n try {\n const Task = require(filePath);\n // Get instance of task class\n const taskInstance = Ioc.make(Task);\n\n // Every task must expose a schedule\n if (!Task.schedule) {\n throw new Error(`No schedule found for task: ${filePath}`);\n }\n\n // Every task must expose a handle function\n if (!taskInstance.handle) {\n throw new Error(`No handler found for task: ${filePath}`);\n }\n\n // Track currently registered tasks in memory\n this.registeredTasks.push(Task);\n\n // Register task handler\n this.instance.scheduleJob(Task.schedule, co.wrap(taskInstance.handle.bind(taskInstance)));\n } catch (e) {\n // If this file is not a valid javascript class, print warning and return\n if (e instanceof ReferenceError) {\n this.logger.warn('Unable to import task class <%s>. Is it a valid javascript class?', file);\n return;\n } else {\n this.logger.error(e);\n throw e;\n }\n }\n }\n });\n this.logger.info('scheduler running %d tasks', this.registeredTasks.length);\n } catch (e) {\n // If the directory isn't found, log a message and exit gracefully\n if (e.code === 'ENOENT') {\n this.logger.info('The tasks directory <%s> does not exist. Exiting.', this.tasksPath);\n } else {\n // If it's some other error, bubble up exception\n this.logger.error(e);\n throw e;\n }\n }\n }", "title": "" }, { "docid": "e5cf016ebfc0415d812a4239a8071994", "score": "0.48401016", "text": "function loadPossibleSchedules() {\n\t\taPossibleSchedules = localStorage.getItem(\"aPossibleSchedules\") != null ? JSON.parse(localStorage.getItem(\"aPossibleSchedules\")) : [];\n\t\t\n\t\t$(\"#total\").text(aPossibleSchedules.length);\n\t\t\n\t\tfor(var i = 0; i < aPossibleSchedules.length; i++) {\n\t\t\tvar aPossibleSchedule = aPossibleSchedules[i];\n\t\t\t\n\t\t\tvar aCourseIDs = [];\n\t\t\tvar nSumStartTimes = 0;\n\t\t\tvar nSumEndTimes = 0;\n\t\t\tvar iMeetings = 0;\n\t\t\tvar nFirstTermHours = 0;\n\t\t\tvar nSecondTermHours = 0;\n\t\t\tvar aFirstTermCourses = [];\n\t\t\tvar aSecondTermCourses = [];\n\t\t\tvar sFirstTermCourses = \"\";\n\t\t\tvar sSecondTermCourses = \"\";\n\t\t\t\n\t\t\tcourses:\n\t\t\tfor(var j = 0; j < aPossibleSchedule.length; j++) {\n\t\t\t\tvar oCourseData = aPossibleSchedule[j];\n\t\t\t\tvar sSection = UBCCalendarAPI.getSection(oCourseData[0], oCourseData[1]);\n\t\t\t\tvar aMeetings = sSection.aMeetings;\n\t\t\t\t\n\t\t\t\t// Keep track of the sections in each term\n\t\t\t\tif(sSection.sTerm == \"1\" || sSection.sTerm == \"1-2\") {\n\t\t\t\t\tif(aFirstTermCourses[sSection.sCourseID] == null) aFirstTermCourses[sSection.sCourseID] = [sSection.sKey];\n\t\t\t\t\telse aFirstTermCourses[sSection.sCourseID].push(sSection.sKey);\n\t\t\t\t}\n\t\t\t\tif(sSection.sTerm == \"2\" || sSection.sTerm == \"1-2\") {\n\t\t\t\t\tif(aSecondTermCourses[sSection.sCourseID] == null) aSecondTermCourses[sSection.sCourseID] = [sSection.sKey];\n\t\t\t\t\telse aSecondTermCourses[sSection.sCourseID].push(sSection.sKey);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Keep track of the start/ending time averages\n\t\t\t\tiMeetings += aMeetings.length;\n\t\t\t\tfor(var k = 0; k < aMeetings.length; k++) {\n\t\t\t\t\tvar oMeeting = aMeetings[k];\n\t\t\t\t\t\n\t\t\t\t\tnSumStartTimes += parseFloat(oMeeting.nStartTime);\n\t\t\t\t\tnSumEndTimes += parseFloat(oMeeting.nEndTime);\n\t\t\t\t\t\n\t\t\t\t\tif(sSection.sTerm == \"1\" || sSection.sTerm == \"1-2\") nFirstTermHours += (parseFloat(oMeeting.nEndTime) - parseFloat(oMeeting.nStartTime));\n\t\t\t\t\tif(sSection.sTerm == \"2\" || sSection.sTerm == \"1-2\") nSecondTermHours += (parseFloat(oMeeting.nEndTime) - parseFloat(oMeeting.nStartTime));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Parse the course arrays into strings\n\t\t\tfor(var key in aFirstTermCourses) {\n\t\t\t\tsFirstTermCourses += key + \" (\";\n\t\t\t\tfor(var j = 0; j < aFirstTermCourses[key].length; j++) sFirstTermCourses += aFirstTermCourses[key][j] + \", \";\n\t\t\t\tsFirstTermCourses = sFirstTermCourses.substr(0, sFirstTermCourses.length - 2) + \"), \";\n\t\t\t}\n\t\t\t\n\t\t\tfor(var key in aSecondTermCourses) {\n\t\t\t\tsSecondTermCourses += key + \" (\";\n\t\t\t\tfor(var j = 0; j < aSecondTermCourses[key].length; j++) sSecondTermCourses += aSecondTermCourses[key][j] + \", \";\n\t\t\t\tsSecondTermCourses = sSecondTermCourses.substr(0, sSecondTermCourses.length - 2) + \"), \";\n\t\t\t}\n\t\t\t\n\t\t\t// Strip off the last \", \" and replace dashes with spaces\n\t\t\tsFirstTermCourses = sFirstTermCourses.substr(0, sFirstTermCourses.length - 2).replace(/-/g, ' ');\n\t\t\tsSecondTermCourses = sSecondTermCourses.substr(0, sSecondTermCourses.length - 2).replace(/-/g, \" \");\n\t\t\t\n\t\t\tvar sSchedule = new Schedule(i, nSumStartTimes / iMeetings, nSumEndTimes / iMeetings, sFirstTermCourses, sSecondTermCourses, nFirstTermHours, nSecondTermHours);\n\t\t\taSortedSchedules.push(sSchedule);\n\t\t}\n\t}", "title": "" }, { "docid": "e9dc9b995fa3fdbed686484083ee0672", "score": "0.48381758", "text": "function getInitFiles(folderName, callback){\n const files = fs.readdirSync(folderName, {withFileTypes: true});\n\n for (const file of files) {\n \n const absolutePath = path.resolve(__dirname, file.name);\n\n \n var stats = fs.stat(file.name).then(res=>{\n\n let fileObj = {\n isDirectory: file.isDirectory(),\n filename: file.name,\n fullPath: path.join(__dirname, file.name),\n createdDate: res.ctime,\n fileSize: res.size,\n fileType: getExtension(file.name, file.isDirectory())\n };\n\n\n fileArray.push(fileObj);\n \n // console.log(fileOjb)\n // console.log('isDir', file.isDirectory())\n // console.log('name', file.name)\n // console.log('fullPath', absolutePath)\n // console.log(convertBytes(res.size))\n // console.log(`File Data Last Modified: ${res.ctime}`);\n\n if(file.isDirectory()){\n \n const nested = fs.readdir(absolutePath, {withFileTypes: true}).then(res=>{\n\n // console.log(res)\n });\n\n }\n\n });\n // fs.stat(absolutePath, (err, fileStats) => {\n // if (err) {\n // console.log(err)\n // } else {\n // console.log(fileStats)\n // }\n // })\n // var stats = fs.statSync(file.name)\n // var fileSizeInBytes = stats.size;\n // var fileSizeInMegabytes = fileSizeInBytes / (1024*1024);\n // var fileSizeInMb = filesize(stats.size, {round: 0});\n\n \n }\n \n callback(fileArray)\n // let fileArray = [];\n \n }", "title": "" }, { "docid": "0a8b08224fe3eaea3faf01ab42932e09", "score": "0.4824846", "text": "function MapAMDownloads(AM) {\n for (const key of Object.keys(GENFORM_PATHS)) {\n AM.queueDownload(GENFORM_PATHS[key]);\n }\n for (const key of Object.keys(LEVEL_MAP_PATHS)) {\n AM.queueServerDownload(LEVEL_MAP_PATHS[key]);\n console.log(LEVEL_MAP_PATHS[key]);\n }\n AM.queueDownload(PLACEFORM_PATHS['green']);\n AM.queueDownload(PLACEFORM_PATHS['purple']);\n AM.queueDownload(PLACEFORM_PATHS['orange']);\n AM.queueDownload(PLACEFORM_PATHS['blue']);\n // AM.queueDownload(GENFORM_PATH);\n AM.queueDownload(BACKGROUND_PATH);\n AM.queueDownload(FLOOR_PATH);\n AM.queueDownload(FLOOR_FLASH_PATH);\n // AM.queueDownload(MUSIC_PATH);\n AM.queueDownload(PILLAR_PATH);\n AM.queueServerDownload(LEVEL0_MAP_FILE_NAME);\n AM.queueServerDownload(LEVEL1_MAP_FILE_NAME);\n AM.queueServerDownload(LEVEL2_MAP_FILE_NAME);\n AM.queueDownload(START_BUTTON);\n AM.queueDownload(GAMEOVER_PATH);\n AM.queueDownload(GAMEOVER_ICON);\n AM.queueDownload(COOKIE_PATH);\n AM.queueDownload(COOKIE_HUD_PATH);\n AM.queueDownload(START_PATH);\n AM.queueDownload(LEVEL1_PATH);\n AM.queueDownload(LEVEL1_FLOOR);\n AM.queueDownload(LEVEL1_FLOOR_FLASH);\n AM.queueDownload(LEVEL2_PATH);\n AM.queueDownload(LEVEL2_GENFORM);\n AM.queueDownload(LEVEL3_PATH);\n AM.queueDownload(LEVEL3_GENFORM);\n AM.queueDownload(LEVEL4_PATH);\n AM.queueDownload(LEVEL4_GENFORM);\n AM.queueDownload(KRIMTROK_SHEET);\n AM.queueDownload(EVIL_GLOOP_PATH);\n AM.queueDownload(BUBBLE_SHEET);\n AM.queueDownload(BUBBLE_SHEET_FLIP);\n AM.queueDownload(LOGO_ICON);\n AM.queueDownload(ARROW_ICON);\n AM.queueDownload(SCOREBOARD_PATH);\n}", "title": "" }, { "docid": "162a98cb9c7d2e4e38a24376fed28985", "score": "0.4824334", "text": "getRestartServerFilesGlob() {\n return this.application.rcFile.metaFiles\n .filter(({ reloadServer, pattern }) => {\n return reloadServer === true && ![paths_1.RCFILE_NAME, paths_1.ACE_FILE_NAME].includes(pattern);\n })\n .map(({ pattern }) => pattern);\n }", "title": "" }, { "docid": "e75553c50f480a28888bbbffb7012ab5", "score": "0.4823444", "text": "startScheduler() {\n // TODO: rename to createSchedulesWithTimer\n this.createSchedulesFromList();\n // TODO: create getter on collection to get all preSpawn including departures\n // TODO: create method `createPreSpawnDeparturesAndArrivals`\n this.createPreSpawnDepartures();\n }", "title": "" }, { "docid": "3d01fdbacadd2d51e108371dd3196c14", "score": "0.4816395", "text": "downloadSchedule(){\n\t new LecturerAPI().downloadSchedule( schedule =>\n\t\t\t\t\t this.scheduleService.generateSchedule(schedule, {start_date: this.state.minDate, end_date: this.state.maxDate }, e => {\n\t\t\t\t\t\tthis.setState({items: e});\n\t\t\t\t\t\tconsole.log(\"Schedule\", e);\n\t\t\t\t\t })\n\t\t\t\t\t );\n\n }", "title": "" }, { "docid": "352d42f648d443afc341bd027c9ac258", "score": "0.48095566", "text": "async function collectPending() {\n if (!fs.existsSync(changesPath)) {\n throw new Error(`No pending changes.`)\n }\n const files = await fs.readdirSync(changesPath)\n const allChanges = files.map(file => {\n return fs.readFileSync(join(changesPath, file), `utf8`)\n })\n\n return allChanges\n}", "title": "" }, { "docid": "0a9d4486740c24f0e063547a89f63916", "score": "0.48086795", "text": "async registerRoutes() {\n //loop files\n let routesNumber = 0;\n\n for await (const routesFile of this.searchRoutes()) {\n //loop routes\n _logger.logger.debug(`routes registered from file ${routesFile.path}`);\n\n for (const route of routesFile.routes) {\n //validate route\n if (this.validateRoute(route)) {\n _logger.logger.debug(route); //register route\n\n\n this.registerRoute(route); //increment routes number\n\n routesNumber++;\n } else {\n //invalid route\n _logger.logger.error(`invalid route in file ${routesFile.path}`, route);\n }\n }\n }\n\n if (routesNumber === 0) {\n _logger.logger.error('no routes registered');\n } else {\n _logger.logger.info(routesNumber, ' routes registered');\n }\n }", "title": "" }, { "docid": "86ffd41c56aed19a4582933a957b6f57", "score": "0.48016667", "text": "getChapterFilePaths() {\n const files = this.getChapterFiles()\n .map(item => this.buildChapterFilePath(item.name));\n return files;\n }", "title": "" }, { "docid": "2637e07dbf55d3892d1e51a1c3de859a", "score": "0.47995242", "text": "setupRoutes(directory, currentMap) {\n this.routes = [];\n // These are the files read from the directory. They might not be route files, yet they might all be JSON files.\n let jSONroutes = directory.getJsonObjects();\n let routeTmp;\n if (jSONroutes.length > 0) {\n for (let points of jSONroutes) {\n\n // Skip files with no route info\n if (points.features == undefined || points.features.length < 1) {\n continue;\n }\n // Instantiate objects\n routeTmp = new Route(points.features[0].properties.name);\n routeTmp.initiateRouteFromGeoJSON(points.features[0]);\n // add route to map\n currentMap.setupRoute(routeTmp);\n // store route\n this.routes.push(routeTmp);\n }\n if (this.routes.length > 0) {\n currentMap.recenter(this.routes[this.routes.length - 1].routePoints[0]);\n } else {\n alert(\"No route activated. Files do not contain routes in the right format. See route.js class documentation\")\n }\n } else {\n // The route points\n let points = [\n [40.10146, -88.23445],\n [40.10143, -88.23860],\n [40.10409, -88.23863],\n [40.10409, -88.23345],\n [40.10146, -88.233385]\n ];\n // initialize route\n routeTmp = new Route(\"Pilot_route\");\n routeTmp.initiateRoutePoints(points);\n // add route to map\n currentMap.setupRoute(routeTmp);\n // store route\n this.routes.push(routeTmp);\n }\n }", "title": "" }, { "docid": "d02678da23ab429054f067677f72a3ee", "score": "0.47994107", "text": "collect() {\n const promises = this.sources.map((src) => {\n return src.query();\n });\n\n return Promise.all(promises)\n .then((values) => {\n\n const dp = Object.assign.apply(this, values);\n dp.timestamp = new Date().getTime();\n\n return fse.readJson(this.dataFile)\n .then((obj) => {\n obj.push(dp)\n return fse.writeJson(this.dataFile, obj);\n })\n .catch((obj) => {\n return fse.writeJson(this.dataFile, [dp]);\n });\n });\n }", "title": "" }, { "docid": "d98d184362db991f78aedf04a3caeff1", "score": "0.4789398", "text": "function scanAll(cb) {\n var done = u.after(staticPaths.length, u.maybe(cb));\n u.each(staticPaths, function(sp) {\n scan(sp, function(err) {\n done();\n });\n });\n }", "title": "" }, { "docid": "af26e9de1e0e73e9277701550a7177d5", "score": "0.47809082", "text": "function getPaths(items) {\n var paths = {}, d, offset = .5 * y2(1) + 10, result = [];\n for (var i = 0; i < items.length; i++) {\n d = items[i];\n if (!paths[d.class]) paths[d.class] = '';\n paths[d.class] += ['M',x(d.start),(y2(d.lane) + offset),'H',x(d.start.addHours(5))].join(' ');\n }\n for (var className in paths) {\n result.push({class: className, path: paths[className]});\n }\n return result;\n }", "title": "" }, { "docid": "aced12e81e723334e37dc1d7fde4e9ad", "score": "0.47759214", "text": "static async getAllFiles() {\n try {\n return await database.File.findAll();\n } catch (error) {\n throw error;\n }\n }", "title": "" }, { "docid": "4aa42ecad8392bc752a7a9f444b89615", "score": "0.47752333", "text": "async loadScheduleItems() {\n Logger.log(\"Getting schedule items from Mongo\", 6);\n\n let items = await this.db.collection(process.env.DB_SCHEDULE_ITEMS).find().sort({time: 1}).toArray();\n\n Logger.log(items, 100);\n return items;\n }", "title": "" }, { "docid": "ba25bd295ce353cab72e79d86edb65da", "score": "0.47687396", "text": "_ensureFolder() {\n const dirs = this._absoluteConfigDirs();\n\n const promises = dirs.map(ensureDirectoryExists);\n\n return Promise.all(promises);\n }", "title": "" }, { "docid": "dea4a7f68591a4312ada433d575ff1e5", "score": "0.47665602", "text": "setupSchedule(){\n // setup the schedule\n SchedulerUtils.addInstructionsToSchedule(this);\n\n\n // added for feedback\n this.feedbacks = [];\n let n_loops = (this.practice) ? constants.PRACTICE_LEN : this.all_stims.length;\n for(let i= 0 ; i<n_loops ; i++)\n {\n this.add(this.loopHead);\n this.add(this.loopBodyEachFrame);\n this.add(this.loopEnd);\n\n if(this.practice){\n this.feedbacks.push(new Scheduler(this.psychojs));\n this.add(this.feedbacks[i]);\n }\n }\n this.add(this.saveData);\n }", "title": "" }, { "docid": "00889d3df9f4f8f8681cdcbb5a58ca0e", "score": "0.47638535", "text": "function displaySchedule() {\r\n for (i = 0; i < routeRadio.length; i++) {\r\n if (routeRadio[i].checked) {\r\n // A getSchedule function is called to get the txt file and display and it takes a value of radio button as an argument.\r\n getSchedule(routeRadio[i].value);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e6b8f2a06735da866012e679af56db33", "score": "0.47558138", "text": "_ensureFolder() {\n const dirs = this._absoluteConfigDirs();\n const promises = dirs.map(ensureDirectoryExists);\n return Promise.all(promises);\n }", "title": "" }, { "docid": "93dc22cc25c8dd32b11d0d8b9b4f4540", "score": "0.47526217", "text": "function printAllFiles(res, currentDirFiles){\n\tasync.map(currentDirFiles.relativePathList, fs.stat, function(err, results){\n\t if (err){\n\t res.write(err);\n\t res.end(html.HTMLFormatter.endDocument()); \n\t return;\n\t }\n\t \n // results is now an array of stats for each file\n res.write(html.HTMLFormatter.startList());\n for (var i in results){\n if (results[i]!== undefined && results[i].isDirectory()){\n res.write(html.HTMLFormatter.printDirectoryInList(currentDirFiles,i));\n }else{\n res.write(html.HTMLFormatter.printFileInList(currentDirFiles,i));\n }\n } \n res.write(html.HTMLFormatter.endList());\n res.end(html.HTMLFormatter.endDocument());\n }); \n}", "title": "" }, { "docid": "d2f28016bf5cf69655552c7c6a3c8c25", "score": "0.47474393", "text": "watch() {\n fs.readdir(this.watchDir, (err, files) => {\n if (err) throw err;\n for (var index in files) {\n this.emit(\"process\", files[index]);\n }\n });\n }", "title": "" }, { "docid": "d42e851a53c92f825c89c326d6fe7f75", "score": "0.4747204", "text": "function scheduleConvertAllFilesToJpg(date, filePath) {\n\tvar convertJob = schedule.scheduleJob(date, function() {\n\t\tconvertAllFilesToJpg(filePath)\n\t})\n}", "title": "" }, { "docid": "ff91c5f7e2281d3b6da60e6574e338de", "score": "0.4745062", "text": "function walkContentDir() {\n\tlet paths = [];\n\n\treturn new Promise((resolve, reject) => {\n\t\tklaw(DIR.content)\n\t\t\t.on(\"data\", i => paths.push(i.path))\n\t\t\t.on(\"error\", (err, i) => reject(err))\n\t\t\t.on(\"end\", () => resolve(paths));\n\t});\n}", "title": "" }, { "docid": "0e94a1f7471adcd93fc62f125ccb72ca", "score": "0.47421318", "text": "function loadPaths () {\n function loadRoom (room) {\n if (room.memory.paths) {\n room.memory.paths = PathFinder.CostMatrix.deserialize(room.memory.paths);\n }\n }\n _.each(Game.rooms, loadRoom);\n}", "title": "" }, { "docid": "3bde7f820fc404b53b92ddc42c1b6009", "score": "0.4733813", "text": "function schedule(){\n\n\t\t/*XMLHttpRequest to retrieve the data from RedLine Json API*/\n\t\tvar request = new XMLHttpRequest();\n\t\trequest.open(\"GET\", \"https://tranquil-plains-45391.herokuapp.com/redline.json\", true);\n\t\trequest.onreadystatechange = redline_schedule;\n\t\trequest.send(null);\n\n\t\tfunction redline_schedule(){\n\t\t\tif (request.readyState==4 && request.status ==200) {\n\t\t\t\t/*Parsing data into the obj*/\n\t\t\t\tdata = request.responseText;\n\t\t\t\tobj = JSON.parse(data);\n\n\t\t\t\t/*Parsing the data into the object schedule[]*/\n\t\t\t\tvar trips = obj[\"TripList\"][\"Trips\"];\n\n\t\t\t\tfor (var i=0;i<trips.length;i++){\n\n\t\t\t\t\tfor (var j=0; j<trips[i][\"Predictions\"].length; j++){\n\t\t\t\t\t\tschedules.push({\"Station\": trips[i][\"Predictions\"][j][\"Stop\"], \n\t\t\t\t\t\t\t\t\t\t\"Destination\": trips[i][\"Destination\"], \n\t\t\t\t\t\t\t\t\t\t\"Seconds\": trips[i][\"Predictions\"][j][\"Seconds\"]});\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tconvert_to_minutes();\n\t\t\t\tstations(); /*Calls station() that sets the markers for each statin*/\n\t\t\t}\n\t\t} \n\n\t}", "title": "" }, { "docid": "6a9cc2232aafbd824e1d1f3e3b219231", "score": "0.47230485", "text": "_walk(dir) {\r\n const exist = fs.existsSync(dir);\r\n if (!exist) {\r\n return;\r\n }\r\n\r\n const files = fs.readdirSync(dir);\r\n let list = [];\r\n\r\n for (let file of files) {\r\n if (fs.statSync(path.resolve(dir, file)).isDirectory()) {\r\n list = list.concat(this._walk(path.resolve(dir, file)));\r\n } else {\r\n list.push(path.resolve(dir, file));\r\n }\r\n }\r\n\r\n return list;\r\n }", "title": "" }, { "docid": "deb5650e7406c299a49ac05bd363df24", "score": "0.47224417", "text": "function baseSchedule() { //For testing, create a base schedule\n for (let i in userSchedule) {\n var arrayOfSchedule = [];\n for (let counter = 1; counter <= 7; counter++) {\n let startDateToAdd = new Date(2018, 05, 1 + counter);\n let endDateToAdd = new Date(2018, 05, 1 + counter);\n arrayOfSchedule.push(startDateToAdd);\n arrayOfSchedule.push(endDateToAdd);\n }\n userSchedule[i] = arrayOfSchedule;\n }\n}", "title": "" }, { "docid": "04d828bc476ba39770644a09747f9bfb", "score": "0.47071686", "text": "async function getAllPaths() {\n const client = await mongo.connect(mongoUrl, {\n useNewUrlParser: true,\n useUnifiedTopology: true\n }).catch(err => console.log(err));\n \n if (!client) {\n console.error(err)\n return\n }\n try {\n const db = client.db(DB_NAME);\n const collection = db.collection(TO_SCRAP);\n let result = await collection.find();\n const paths = [];\n await result.forEach( function(p) {\n paths.push( JSON.parse(JSON.stringify(p)) );\n });\n return paths;\n } catch (error) {\n console.log(error);\n } finally {\n client.close();\n }\n}", "title": "" }, { "docid": "f006bf52d350b653c0d895f7706df93b", "score": "0.46990833", "text": "function get_paths()\n{\n // Get the musebot conductor path\n // From the top patcher if running as a patcher\n if (!max.isruntime) {\n mfolder.set(this.patcher.parentpatcher.filepath);\n mfolder.up();\n }\n // ... or from the runtime if running as a standalone\n else {\n mfolder.set(max.apppath); }\n mc_path = mfolder.path;\n\n // Get the musebots path\n // Keep going back into the folder tree until a musebot subfolder is found\n musebots_path = \"\";\n while (!mfolder.is_root() && mfolder.path != \"\") {\n mfolder.up();\n if (mfolder.contains(mb_folder_name)) {\n musebots_path = mfolder.path + mb_folder_name + \"/\";\n break;\n }\n }\n\n // Get the ensembles path\n ensembles_path = \"\";\n if (mfolder.contains(\"Ensembles\")) {\n ensembles_path = mfolder.path + \"Ensembles/\";\n }\n\n // Output for debugging\n if (debug) { post(\"get_paths:\\n mc: \" + mc_path + \"\\n musebots: \" + musebots_path + \"\\n ensembles: \" + ensembles_path + \"\\n\"); }\n}", "title": "" }, { "docid": "164946378bb0583dc06f40355bd65aa8", "score": "0.4698731", "text": "getFilesFromEntry(entry) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_6__[\"__awaiter\"])(this, void 0, void 0, function* () {\n if (entry.isFile) {\n const file = yield this.readFile(entry);\n return [file];\n }\n else if (entry.isDirectory) {\n return yield this.readDirectory(entry);\n }\n });\n }", "title": "" }, { "docid": "fce92980d11909dfafce45d06f1c7b89", "score": "0.46895087", "text": "function scrapeCourses() {\n fs.readFile(path.join(__dirname, '../data', 'courseData.json'), 'utf8', async (err, data) => {\n globalData = JSON.parse(data);\n let promises = [];\n for (deptKey in globalData.departments) {\n const deptObj = globalData.departments[deptKey];\n for (courseKey in deptObj.courses) {\n console.log(deptKey, courseKey);\n const promise = await scrapeCourseSections(deptKey, courseKey);\n promises.push(promise);\n }\n }\n\n await Promise.all(promises).then( values => {\n let time = new Date();\n globalData[\"time\"] = time.getHours() + \":\" + time.getMinutes() + \":\" + time.getSeconds();\n console.log(time);\n \n fs.writeFile(path.join(__dirname, 'public', 'courseData.json'), JSON.stringify(globalData), err => {\n if (err) throw err;\n });\n \n console.timeEnd('Timed Run');\n });\n });\n}", "title": "" }, { "docid": "c1d762062f435a48108b8f7b32db190c", "score": "0.46822888", "text": "function monitorFiles (dirlist) {\n\n var currentTimer = 0;\n\n function debounce (cb) {\n clearTimeout(currentTimer);\n currentTimer = setTimeout(function () {\n cb();\n }, 200);\n }\n\n for (var i in dirlist) {\n\n var dir = dirlist[i];\n\n fs.watch(dir, function (event, filename) {\n if (filename) {\n if (/\\.(coffee|js)$/.test(filename) && event === 'change') {\n debounce(rebuild);\n }\n } else {\n debounce(rebuild);\n }\n });\n\n console.log('Monitoring ' + dir + \"...\");\n\n }\n}", "title": "" }, { "docid": "3043f98ba5e02bb2ebd067c732ee3957", "score": "0.46821108", "text": "function gethits(dirs) {\n // Keep track of async task and write file when loop is done\n var dirdone = _.after(dirs.length, loghits)\n async.eachOf(dirs, function (value, key, callback) {\n\n var curpath = path + '/' + value;\n\n fs.readdir(curpath, function (err, files) {\n if (err) throw err;\n // Keep track of async task and trigger when done\n var filesdone = _.after(files.length, dirdone)\n\n files.forEach(function (file, index) {\n var filepath = curpath + '/' + file\n if (!(fs.statSync(filepath).isDirectory())) {\n\n fs.readFile(filepath, 'utf8', (err, data) => {\n if (err) throw err;\n // SEARCH STRING HERE.\n if (data.indexOf('&lt;script') >= 0) {\n fs.appendFile('./hits.csv', filepath + '\\r\\n', (err) => {\n if (err) throw err;\n console.log(filepath + \" added to hits.\");\n });\n }\n // Tell lodash that this file has been read.\n filesdone();\n })\n }\n })\n })\n }, function (err) {\n if (err) throw err;\n })\n}", "title": "" }, { "docid": "2ea22e980c400f059869ad4ed0e0040d", "score": "0.468153", "text": "function fromFiles (\n fs /* : ?Object */,\n cwd /* : string */,\n filePaths /* : string[] */\n) /* : Promise<Map<string, Object>> */ {\n const map = new Map();\n\n const workers = workerFarm(require.resolve('./utils/fs-map-child'));\n\n return new Promise((resolve, reject) => {\n for (let f = 0; f < filePaths.length; f += 1) {\n let filePath = filePaths[f];\n // sends one path at a time to the worker pool\n workers({ cwd, filePath }, (err, output) => {\n if (err) {\n workerFarm.end(workers);\n reject(err);\n return;\n }\n if (typeof output.LastModified === 'string') {\n output.LastModified = new Date(output.LastModified);\n }\n map.set(filePath, output);\n\n // we can only tell we are finished by counting our results\n if (map.size >= filePaths.length) {\n // looks like we're done\n workerFarm.end(workers);\n resolve(map);\n }\n });\n }\n });\n}", "title": "" }, { "docid": "acc34c154a7a9416bd9794ae847e07ae", "score": "0.4679454", "text": "prepareBuildFiles() {\n let buildDir = this.config.dir\n this.debug(`Using build directory: ${buildDir}`)\n\n // copy preset type files\n for (let type of this.config.source.types) { // defaulted in BasePublish\n let typePreset = this.preset[type]\n\n this.log(`Copying ${typePreset.source.options.cwd}/${typePreset.source.all}...`)\n for (let name of glob.sync(typePreset.source.all, typePreset.source.options)) {\n let from = path.join(typePreset.source.options.cwd, name)\n let to = path.join(buildDir, from)\n this.log(`\\t...to ${to}`)\n fs.copySync(from, to)\n }\n }\n\n // copy any additional configured files\n for (let fileGlob of this.config.source.files) { // defaulted in BasePublish\n\n this.log(`Copying ${fileGlob}...`)\n for (let fromFullPath of glob.sync(fileGlob, {realpath: true})) {\n let from = path.relative(process.cwd(), fromFullPath)\n let to = path.join(buildDir, from)\n this.log(`\\t...to ${to}`)\n fs.copySync(from, to)\n }\n }\n }", "title": "" }, { "docid": "d02997a17716dfcbc3925fb01c0752a9", "score": "0.46766353", "text": "function get_folders(path){\r\n \r\n}", "title": "" }, { "docid": "0c404fbf53eb341af00745ceea75fca1", "score": "0.46765512", "text": "function processSchedule (aSchedule, getScheduleData, cb){\n\n finalCallBack = cb;\n schedule = aSchedule;\n var len = schedule.getSections.length;\n numProf = len;\n var path, unitPath;\n var courseID;\n\n\n for (let i = 0; i < len; i++) {\n let profName = schedule.getSections[i].getProfessor;\n\n courseID = schedule.getSections[i].getCourseID;\n path = \"professor/\" + profName.toString() + \"/\" + courseID.toString();\n unitPath = \"course/\" + courseID.toString();\n\n getScheduleData(unitPath, unitsCallback);\n\n if (profName !== \"Staff\"){ //Skip this section if taught by staff\n getScheduleData(path, callback);\n }\n else{\n numProf--;\n if (i === len - 1){\n finalCallBack();\n }\n continue;\n }\n }\n}", "title": "" }, { "docid": "659958c5ae15684c9ce1646d5155c3df", "score": "0.46639663", "text": "function aggregate(sourceFolder, outputFolder) {\n\n console.log(\"Running stat aggregation\");\n\n var inputs = fs.readdirSync(sourceFolder),\n json = [],\n index, length,\n counters, timers, gauges;\n\n for (index = 0, length = inputs.length; index < length; index++) {\n json.push(JSON.parse(fs.readFileSync(sourceFolder + inputs[index], \"utf-8\")));\n }\n\n //console.log(JSON.stringify(json));\n\n\n counters = processCounters(json);\n saveFileJson(outputFolder + \"counters\", counters);\n\n timers = processTimers(json);\n saveFileJson(outputFolder + \"timers\", timers);\n\n gauges = processGauges(json);\n saveFileJson(outputFolder + \"gauges\", gauges);\n\n}", "title": "" }, { "docid": "84dd03cf8c97e78cc8330b64ae2b2317", "score": "0.46610683", "text": "function initialize() {\n getAllPaths().then(function (res) {\n displayFile(currentPath);\n JSON.parse(res).forEach((file) => populateFile(file));\n });\n displayFolderContent(currentPath, true);\n }", "title": "" }, { "docid": "e4f770d7048b2a7ac8540d2a87bdac19", "score": "0.4647495", "text": "function getFilesInDirectory() {\n console.log(\"\\n Files present in directory\");\n let files = fs.readdirSync(__dirname);\n files.forEach(file => {\n console.log(file);\n });\n}", "title": "" }, { "docid": "ed4941698bc7620c33b042bf4b15cf77", "score": "0.46463627", "text": "files(source){\n if (!source) throw new Error('Expected a source path, but none was provided.');\n\n let paths = {};\n paths.includes = source + '/_includes';\n paths.posts = source + '/_posts';\n paths.site = source + '/_site';\n paths.layouts = source + '/_layouts';\n\n return paths;\n }", "title": "" }, { "docid": "35b57af88ff3e1939f9458cf0ccb2dee", "score": "0.4642038", "text": "function startWatchers () {\n\tUI_message('copy', 'Starting watchers');\n\n\tfor (let i = 0, l = paths.length; i < l; i++) {\n\t\tconst watcher = chokidar.watch(paths[i].from, {\n\t\t\tignoreInitial: true,\n\t\t\tignorePermissionErrors: true,\n\t\t});\n\n\t\twatcher.on('all', () => copy(paths[i]));\n\t}\n}", "title": "" }, { "docid": "fd6541f6dca16dd70081434a62cad283", "score": "0.46401566", "text": "function collectImages(r) {\n\n \tlet images = {};\n \tr.keys().map((item, index) => ( images[item.replace('./', '')] = r(item) ));\n \treturn images;\n\n }", "title": "" }, { "docid": "18cc6b5420d47114eb4f45e8cf778970", "score": "0.4633356", "text": "start() {\n readdir('./events', (error, files) => {\n if (error)\n this.client.logger.error(`Unable to load events:\\n${error.stack}`);\n\n this.client.logger.info(`Now loading ${files.length} events~...`);\n files.forEach(f => {\n const Event = require(`../../events/${f}`);\n const event = new Event(this.client);\n this.client.logger.info(`Loaded the ${event.event} event!`);\n this.processor.process(event);\n });\n });\n }", "title": "" }, { "docid": "e8fad81effa72893514b6e5a03080348", "score": "0.4633312", "text": "function processFiles(sourceDir, useGPS) {\n const processed = `${sourceDir}/Out`;\n const mediaPath = `${processed}/media`;\n const imagesPath = `${mediaPath}/images`;\n const videoPath = `${mediaPath}/video`;\n const audioPath = `${mediaPath}/audio`;\n const thumbPath = `${mediaPath}/thumbs`;\n const previewPath = `${mediaPath}/previews`;\n const posterPath = `${mediaPath}/posters`;\n const thumbWidth = 320;\n const previewWidth = 800;\n const largeWidth = 1600;\n const output = [];\n rimraf.sync(processed);\n mkdirp.sync(processed);\n mkdirp.sync(mediaPath);\n mkdirp.sync(imagesPath);\n mkdirp.sync(videoPath);\n mkdirp.sync(audioPath);\n mkdirp.sync(thumbPath);\n mkdirp.sync(previewPath);\n mkdirp.sync(posterPath);\n const files = glob.sync(`${sourceDir}/**/*.*`);\n return new Promise((resolve, reject) => {\n return Promise\n .all(files.map(file => exiftool_vendored_1.exiftool.read(file)))\n .then(results => {\n for (let i = 0; i < results.length; i++) {\n const file = files[i];\n const tags = results[i];\n // The filename (which has no extension here) we'll use for the Markdown file and\n // all derived media. It takes the form `YYYY-MM-DD-hh-mm-ss`.\n const filename = tagsToFilename(results[i]);\n // The type of submission (photo, video, sound), derived from the file path and MIME type.\n const type = fileToItemType(file);\n if (!filename) {\n console.error(`🤔 Couldn't derive a filename for ${file}. Skipping.`);\n continue;\n }\n if (!type) {\n console.error(`🤔 Couldn't derive a submission type for ${file}. Skipping.`);\n continue;\n }\n // The extension to use for the rendered item. For photos, this is always JPG;\n // for videos, we want to have ffmpeg render MP4s, and for audio, it's M4A.\n let extension;\n // The S3 folder to which the file will be uploaded.\n let s3Path;\n // Set the target extension and path based on the item type.\n if (type === \"photo\") {\n extension = \"jpg\";\n s3Path = \"images\";\n }\n else if (type === \"video\") {\n extension = \"mp4\";\n s3Path = \"video\";\n }\n else if (type === \"sound\") {\n extension = \"m4a\";\n s3Path = \"audio\";\n }\n else {\n console.error(`🤔 Unprocessable type for ${file} (It was ${type}). Skipping.`);\n continue;\n }\n // The file we'll be generating. This refers to the\n const mediaFilename = `${filename}.${extension}`;\n console.log(\"⏱ Processing...\");\n // Derive an ExifDate from the tags provided. Here, this is used to set the\n // item creation date as an actual JavaScript date, so it can ultimately be\n // rendered properly by the Hugo template.\n const date = tagsToCreated(tags);\n if (!date) {\n console.log(\"Tags:\", tags);\n reject(new Error(\"😢 No date detected. See above for the tags.\"));\n return;\n }\n const metadata = {\n type: type,\n title: tags.Title,\n caption: tags.Description,\n created: moment.tz(date.toDate(), \"America/Los_Angeles\").toDate(),\n filename,\n // This assumes the main/large asset will always have the same\n // extension as the original, which we may not want.\n url: `s3/${s3Path}/${mediaFilename}`,\n };\n if (type === \"photo\" || type === \"video\") {\n Object.assign(metadata, {\n preview: `s3/previews/${filename}.jpg`,\n thumb: `s3/thumbs/${filename}.jpg`,\n exif: {\n make: tags.Make,\n model: tags.Model,\n lens: tags.LensModel,\n iso: tags.ISO,\n aperture: tags.ApertureValue,\n shutter_speed: tags.ShutterSpeed,\n focal_length: tags.FocalLength,\n gps: useGPS ? tags.GPSPosition : undefined,\n },\n });\n }\n if (type === \"photo\") {\n // iPhone photos are weird. When they're vertically oriented, they aren't, like, _really_\n // vertically oriented; they're horizontally oriented, but their _metadata_ says they're vertical,\n // and some (but not all) browsers and image viewers attempt to honor this, which is just annoying.\n // Exiftran is a great little tool that simply rotates the photo losslessly and corrects the metadata\n // tag, making everyone happy, expecially me. https://linux.die.net/man/1/exiftran\n child_process_1.execSync(`exiftran -a -i ${file}`);\n // Make thumbs and things.\n makeResizedImage(file, path.join(imagesPath, mediaFilename), largeWidth);\n makeResizedImage(file, path.join(previewPath, mediaFilename), previewWidth);\n makeResizedImage(file, path.join(thumbPath, mediaFilename), thumbWidth);\n }\n if (type === \"video\") {\n const duration = getMediaDuration(file);\n // Scale and bracket the video with simple A/V transitions (fade in, fade out).\n child_process_1.execSync(`ffmpeg -i \"${file}\" -vf \"fade=in:0:30,fade=out:st=${duration - 1}:d=1,scale=${largeWidth}:-1\" -af \"afade=in:st=0:d=1,afade=out:st=${duration - 1}:d=1\" -vcodec h264 -acodec aac -strict -2 \"${videoPath}/${mediaFilename}\"`);\n // Make static imagery.\n makeVideoThumbnail(file, path.join(previewPath, filename), previewWidth);\n makeVideoThumbnail(file, path.join(thumbPath, filename), thumbWidth);\n makeVideoThumbnail(file, path.join(posterPath, filename), largeWidth);\n Object.assign(metadata, {\n duration,\n poster: `s3/posters/${filename}.jpg`,\n });\n }\n if (type === \"sound\") {\n const duration = getMediaDuration(file);\n // Fade sounds in and out as well. Note that we're still passing\n // mediaFilename here, which contains the extension of the\n // original, rather than the format we mean to convert to.\n makeSound(file, path.join(audioPath, mediaFilename), duration);\n Object.assign(metadata, {\n duration,\n });\n }\n output.push(metadata);\n }\n })\n .then(() => {\n console.log(\"\\n---------------------------------------------------------------------------------\\n\");\n // Write the output files.\n console.log(`📝 Writing ${processed}/out.json ...`);\n fs.writeFileSync(`${processed}/out.json`, JSON.stringify(output, null, 4));\n console.log(`📝 Writing ${processed}/out.yaml ...`);\n fs.writeFileSync(`${processed}/out.yaml`, toYAML(output));\n // Upload to S3.\n console.log(`⬆️ Uploading ${output.length} objects to S3...`);\n child_process_1.execSync(`aws s3 sync ${mediaPath} s3://${mediaBucket}`);\n // Report.\n console.log(`📸 ${output.length} objects processed.`);\n console.log(\"🍻 Done.\");\n resolve(output);\n })\n .catch(error => {\n console.error(\"💥 Processing error! \", error);\n reject(error);\n });\n });\n}", "title": "" }, { "docid": "fc1e83a408ece578e9415c54f7386198", "score": "0.46319538", "text": "function get_file_dict(paths) {\n\t\n\tvar dict = {};\n\n\tfor (var i = 0; i < paths.length; i++) {\n\n\t\t// Create a dict entry for this directory\n\t\toscpath = paths[i];\n\t\tdict[paths[i]] = {};\n\n\t\t// Get the full path to the directory\n\t\tvar assetpath = fullpath(paths[i]);\n\n\t\t// Assign a cue number to each file in the directory\n\t\tvar cue_num = 1;\n\t\tvar adir = new Folder(assetpath);\n\t\twhile (!adir.end) {\n\t\t\tif (adir.filetype != '') {\n\t\t\t\tdict[paths[i]][cue_num] = assetpath + '/' + adir.filename;\n\t\t\t\tcue_num++;\n\t\t\t}\n\t\t\tadir.next();\n\t\t}\n\t\tadir.close();\n\t}\n\n\t// Post cued files\n\tfor (var dname in dict) {\n\t\tif (dict.hasOwnProperty(dname)) {\n\t\t\tfor (var fname in dict[dname]) {\n\t\t\t\tif (dict[dname].hasOwnProperty(fname)) {\n\t\t\t\t\tpost(dname + ' ' + fname + '\\n');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn dict;\n}", "title": "" }, { "docid": "58ef380d47a9ddc317789be664ad8fc5", "score": "0.4630772", "text": "function _getProjectInfo () {\n let baseRoutes = [];\n let usernameRoutes = [];\n let partials = [];\n\n forEachDeep(tree, function (value, key, parent, context) {\n\n if (value.extension === \".hbs\") {\n let fileName = value.name.replace(value.extension, \"\"); // e.g. \"todos\"\n let templatePath = path.join(__dirname, \"../../\", value.path); // e.g. \"../../project-files/pages/todos.hbs\"\n let _templateString = fs.readFileSync(templatePath, \"utf8\"); \n\n // check if we're in the /pages directory\n if (templatePath.includes(\"/pages\")) {\n\n // find the current page's layout (either explicitly named or the \"default\" layout)\n let layoutNameMatch = _templateString.match(layoutNameRegex);\n let layoutName = layoutNameMatch ? layoutNameMatch[1] : \"default\";\n\n // remove the special \"layout\" command from the page template\n let templateStringCleaned = _templateString.replace(layoutNameRegex, \"\");\n\n // insert the page template into its layout\n let layoutTemplateString = fs.readFileSync(path.join(__dirname, `../../project-files/layouts/${layoutName}.hbs`), \"utf8\");\n let templateString = layoutTemplateString.replace(yieldCommandRegex, templateStringCleaned);\n\n // create the base route (these need to render BEFORE dynamic :username routes)\n let baseRoute = fileName === \"index\" ? \"/\" : `/${fileName}`; // e.g. /todos\n // create the dynamic username route\n let usernameRoute = fileName === \"index\" ? \"/:username\" : `/:username/${fileName}/:id?`; // e.g. /john/todos/123\n\n\n baseRoutes.push({\n route: baseRoute,\n templateString\n });\n\n usernameRoutes.push({\n route: usernameRoute,\n templateString\n });\n\n } else if (templatePath.includes(\"/partials\")) {\n\n let pathToBootstrapData = path.join(__dirname, `../../project-files/_bootstrap-data/partials/${fileName}.json`);\n\n let bootstrapData;\n try {\n bootstrapData = jsonfile.readFileSync(pathToBootstrapData);\n } catch (e) {\n bootstrapData = {};\n }\n\n partials.push({\n name: fileName,\n templateString: _templateString,\n bootstrapData: bootstrapData\n });\n\n } \n }\n });\n\n let routes = [...baseRoutes, ...usernameRoutes];\n\n return { routes, partials };\n\n}", "title": "" }, { "docid": "192388be3a07619d36c4777b4b87ea5b", "score": "0.4629574", "text": "for (let f of await this.expandFile(file, extensions, env, pkg)) {\n if (await this.isFile(f)) {\n return {path: f, pkg};\n }\n }", "title": "" } ]
9e5f4f2d6b6b1c81c156365188027f2e
bind labels with selected language
[ { "docid": "35b41a44a28b13f1c4d24ab9df1700dd", "score": "0.59527755", "text": "function bindLabels(data) {\n\n $scope.insuranceLabels = data.labels;\n\n\n }", "title": "" } ]
[ { "docid": "16fb76270a589346cb61412bc51785e0", "score": "0.70767677", "text": "function label(selection) {\n selection.append(\"text\")\n .layout({\n position: 'absolute',\n bottom: 0\n })\n .text(function(d) { return d.language; });\n selection.layout();\n}", "title": "" }, { "docid": "2dcf2b534e9710c856d6b5e93c995e92", "score": "0.70544946", "text": "function setLabel() {\n\tvar LangCode = Ti.App.Properties.getString('languageCode');\n\tTi.API.info('lang code is', LangCode);\n\tif (LangCode == \"\" || LangCode == null) {\n\t\tLangCode = \"en\";\n\t}\n\tvar obj = commonFunctions.getLanguage(LangCode);\n\t$.languageSlotLabel.text = obj.language;\n\t$.headerView.setTitle(commonFunctions.L('signInStudentPageTitle', LangCode));\n\t$.studyCode.hintText = commonFunctions.L('studyCode', LangCode);\n\t$.studyId.hintText = commonFunctions.L('studyId', LangCode);\n\t$.password.hintText = commonFunctions.L('createPassword', LangCode);\n\t$.confirmPassword.hintText = commonFunctions.L('confirmPassword', LangCode);\n\t$.langHeader.text = commonFunctions.L('languageSelect', LangCode);\n\t$.signInStudyButton.text = commonFunctions.L('signIn', LangCode);\n\t$.supportLabel.text = commonFunctions.L('copyrightLbl', LangCode);\n}", "title": "" }, { "docid": "9a3a3e041e79d26717a65e5a95ce0ac6", "score": "0.7004871", "text": "function translationLabels(){\n /** This help array shows the hints for this experiment */\n\t\t\t\thelpArray=[_(\"help1\"),_(\"help2\"),_(\"help3\"),_(\"Next\"),_(\"Close\")];\n scope.heading=_(\"Calorimetry: Water Equivalent Calorimetry\");\n\t\t\t\tscope.variables=_(\"Variables\"); \n\t\t\t\tscope.result=_(\"Result\"); \n\t\t\t\tscope.copyright=_(\"copyright\"); \n\t\t\t\tscope.sample_type_lbl=_(\"Select the sample:\"); \n\t\t\t\tscope.sample_options = [{type:_(\"Cold Water\"),index:0},{type:_(\"Hot Water\"),index:1},{type:_(\"Hot Water + Cold Water\"),index:2}]\n \t\t\tscope.disabld = [1,2];\n scope.cross_sec_lbl=_(\"Cross section\");\n scope.hide_graph_lbl=_(\"Hide graph\");\n scope.start_lbl=labels[0];\n scope.reset_lbl=_(\"Reset\");\n scope.sample_dsabld = false;\n scope.btn_dsabld = false;\n scope.$apply();\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "97b4fbd8cc31949a4c2e68a4ce14736b", "score": "0.6937203", "text": "function translationLabels(){\n /** This help array shows the hints for this experiment */\n\t\t\t\thelpArray=[_(\"help1\"),_(\"help2\"),_(\"help3\"),_(\"Next\"),_(\"Close\")];\n scope.heading=_(\"Fourier: Making Waves\");\n\t\t\t\tscope.variables=_(\"Variables\"); \n scope.harmonics_txt = _(\"Harmonics\");\n\t\t\t\tscope.result=_(\"Result\"); \n\t\t\t\tscope.copyright=_(\"copyright\");\n\t\t\t\tscope.reset_txt = _(\"Reset\");\n scope.$apply();\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "ab14f2524afdfe10c79ef93c255bc865", "score": "0.6702845", "text": "function translationLabels() {\n /** This help array shows the hints for this experiment */\n help_array = [_(\"help1\"), _(\"help2\"), _(\"help3\"), _(\"help4\"), _(\"help5\"), _(\"Next\"), _(\"Close\")];\n control_labels = [_(\"Choose Thermocouple Type:\"), _(\"Hot Temperature:\"), _(\"Reference Temperature:\")]\n scope.heading = _(\"Thermo Couple-Seebeck Effect\");\n scope.variables = _(\"Variables\");\n scope.result = _(\"Result\");\n scope.copyright = _(\"copyright\");\n scope.refernce_emf_label = _(\"Reference Emf\");\n scope.hot_emf_label = _(\"Hot Emf\");\n scope.thermo_couple_type_lbl = control_labels[0];\n scope.thermo_couple_label = [{\n type: _(\"Type R\"),\n indexVal: 0,\n thermoCoupleType: \"R\"\n }, {\n type: _(\"Type K\"),\n indexVal: 1,\n thermoCoupleType: \"K\"\n }, {\n type: _(\"Type E\"),\n indexVal: 2,\n thermoCoupleType: \"E\"\n }, {\n type: _(\"Type J\"),\n indexVal: 3,\n thermoCoupleType: \"J\"\n }, {\n type: _(\"Type T\"),\n indexVal: 4,\n thermoCoupleType: \"T\"\n }];\n scope.hot_temp_lbl = control_labels[1];\n scope.refer_temp_lbl = control_labels[2];\n scope.refernce_emf = scope.hot_emf = hot_emf_disp = 0 + \" V\";\n scope.$apply();\n }", "title": "" }, { "docid": "d2cd134f81709d9b80be4d2221b9d9ef", "score": "0.6698104", "text": "function translationLabels() {\n /** This help array shows the hints for this experiment */\n help_array = [_(\"help1\"), _(\"help2\"), _(\"help3\"), _(\"help4\"), _(\"help5\"), _(\"help6\"), _(\"help7\"), _(\"help8\"), _(\"Next\"), _(\"Close\")];\n /** Experiment name */\n scope.heading = _(\"Organic Synthesis: Estimation Of Glucose\");\n scope.variables = _(\"Variables\"); \n scope.titrant_label = _(\"Titrant\");\n scope.water_melon = _('Water Melon');\n scope.drop_speed = _(\"Speed of drops\");\n scope.titrate_label = _(\"Titrate\");\n scope.fehling_solution = _(\"Fehling's Solution\");\n scope.indicator_label = _(\"Indicator :\");\n scope.normality_label = _(\"Normality\");\n scope.normality_unit = (\"N\");\n scope.volume_label = _(\"Volume\");\n scope.volume_unit = _(\"ml\");\n scope.water_vol_label = _(\"Volume of Water\");\n /** Labels for buttons */\n scope.methylene_label = _(\"Methylene Blue\");\n scope.reset_label = _(\"Reset\");\n scope.result = _(\"Result\");\n scope.titrant_used_label = _(\"Titrant Used\");\n scope.titrant_unit = _(\"ml\");\n scope.copyright = _(\"copyright\");\n /** The titrant_array contains the values and indexes of the dropdown */\n scope.titrant_array = [{ \n solution: _('Water Melon'),\n type: 0\n }, {\n solution: _('Tender Coconut'),\n type: 1\n }, {\n solution: _('Soft Drink'),\n type: 2\n }];\n scope.$apply();\n }", "title": "" }, { "docid": "a3e5903ef943b73be6fe4458596ec622", "score": "0.6550438", "text": "function changeLanguage(lang) {\n // var langResources = getLanguageResources()[lang];\n // $(\"span[name='spn']\").each(function (i, elt) {\n // $(elt).html(langResources[$.trim($(elt).text())]);\n // });\n}", "title": "" }, { "docid": "64cebb60303ddb128ede0c9e071bc643", "score": "0.64886695", "text": "changeLanguageStrings () {\n\t\tthis.channelContextEntryMarkup = \tthis.channelContextEntryMarkup.replace(\"REPLACE_context_localchannelsettings_text\", this.labels.context_localchannelsettings_text);\n\n\t\tthis.channelContextSubMenuMarkup = \tthis.channelContextSubMenuMarkup.replace(\"REPLACE_submenu_channelsettings_text\", this.labels.submenu_channelsettings_text);\n\t\tthis.channelContextSubMenuMarkup = \tthis.channelContextSubMenuMarkup.replace(\"REPLACE_submenu_resetsettings_text\", this.labels.submenu_resetsettings_text);\n\n\t\tthis.channelSettingsModalMarkup = \tthis.channelSettingsModalMarkup.replace(\"REPLACE_modal_header_text\", this.labels.modal_header_text);\n\t\tthis.channelSettingsModalMarkup = \tthis.channelSettingsModalMarkup.replace(\"REPLACE_modal_channelname_text\", this.labels.modal_channelname_text);\n\t\tthis.channelSettingsModalMarkup = \tthis.channelSettingsModalMarkup.replace(\"REPLACE_modal_colorpicker1_text\", this.labels.modal_colorpicker1_text);\n\t\tthis.channelSettingsModalMarkup = \tthis.channelSettingsModalMarkup.replace(\"REPLACE_btn_save_text\", this.labels.btn_save_text);\n\t}", "title": "" }, { "docid": "1a94cceb4e4eb56a25f61ddf91dcd700", "score": "0.64698774", "text": "function translationLabels(){\n /** This help array shows the hints for this experiment */\n help_array=[_(\"help1\"),_(\"help2\"),_(\"help3\"),_(\"help4\"),_(\"help5\"),_(\"help6\"),_(\"Next\"),_(\"Close\")];\n scope.heading=_(\"Flame Photometry\");\n scope.variables=_(\"Variables\"); \n scope.select_test=_(\"Select the Test:\");\n scope.first_test=_(\"K+\");\n\t\t\t\tscope.select_sample=_(\"Standard solution\");\n scope.select_the_sample=_(\"Select the Sample:\"); \n scope.thickness_of_material=_(\"Thickness of material (cm):\"); \n scope.cold_water_temperature=_(\"Cold water temperature\");\n scope.show_cross_section=_(\"Show cross section\")\n scope.show_result=_(\"Show Result\");\n scope.aspirate_btn=_(\"Aspirate\");\n\t\t\t\tscope.start_test_btn=_(\"Start the test\")\n scope.reset_btn=_(\"Reset\");\n\t\t\t\tscope.copyright=_(\"copyright\"); \n /** The test_array contains the values and indexes of the dropdown */\n scope.test_array = [{test:_('K+'),type:0},{test:_('Na+'),type:1}]; \n\t\t\t\tscope.sample_array=[{sample:_('Standard solution'),type:0},{sample:_('Grapes'),type:1},{sample:_('Guava'),type:2},{sample:_('Lime'),type:3},{sample:_('Lemon'),type:4},{sample:_('Mango'),type:5},{sample:_('Orange'),type:6},{sample:_('papaya'),type:7},{sample:_('Tomato'),type:8},{sample:_('Apple'),type:9}]\n scope.$apply(); \n }", "title": "" }, { "docid": "c637d1db010f29ed27e1315e60a3e0fc", "score": "0.6465048", "text": "function setUILanguage(lang) {\n if (lang == 'fr') {\n $.labelEdit = \"Editer\";\n $.labelHelp = \"Aide\";\n $.labelPreEditTitle = \"Vérifier l'orthographe, la grammaire et le style\";\n $.labelClickOntextToEdit = \"Cliquez sur le texte à éditer:\";\n $.htmlDialogHelp = '<p>Cette fenêtre comporte deux volets: sur la gauche se trouve la traduction automatique ' +\n 'd\\'un texte, qui contient une ou plusieurs phrases. Chacune de ces phrases peut être améliorée grâce à vos modifications.</p>' +\n '<p>Sur la droite se trouve la zone \"Phrase en cours à éditer\" qui vous permet d\\' éditer une phrase traduite de façon automatique, en suivant les consignes disponibles en cliquant sur le bouton \"Consignes\". ' +\n 'Il y a deux boutons au-dessus de la zone d\\'édition: un bouton \"Annuler\" et un bouton \"Rétablir\".</p>' +\n '<p> Ces boutons affectent la phrase en cours d\\'édition. Pour chaque phrase, vous pouvez, si vous le souhaitez, ' +\n 'laisser des commentaires dans la zone \"Commentaires\". Et ne vous inquiétez pas pour l\\'enregistrement de vos changements ou commentaires, cela se fait automatiquement! ' +\n 'Vous pouvez passer d\\'une phrase à une autre de trois façons: soit en cliquant sur n\\'importe quelle phrase sur la gauche de la fenêtre, soit en utilisant les boutons \"Préc\" ou \"Suiv\" ou les racourcis TAB ou MAJ.+ TAB pour avancer phrase par phrase.</p>' +\n '<p>Si vous souhaitez faire une pause, cliquez sur \"Enregistrer pour plus tard\" afin de reprendre votre activité lorsque vous ré-ouvrerez la tâche. Une fois ' +\n\t\t\t\t'vos changements ou commentaires terminés, cliquez sur \"Terminer la tâche\". Si vous avez le moindre problème, contacter la personne en charge de ce projet.</p>';\n\n $.labelPrev = \"Préc (Shift+Tab)\";\n $.labelNext = \"Suiv (Tab)\";\n $.labelGuidelinesTitle = \"Consignes\";\n $.htmlBilingualGuidelines = '<h4>Consignes de post‐édition <span id=\"guideLinesTranslationType_\" >bilingue</span>:</h4>' +\n '<p>Essayez d\\'améliorer le texte cible en:</p>' +\n '<ul>' +\n '<li>Vérifiant que le sens de la phrase source est préservé</li>' +\n '<li>Vérifiant qu\\'aucun élément d\\'information n\\'ait été ajouté ou supprimé par accident</li>' +\n '<li>Vous appuyant le plus possible sur la suggestion de traduction</li>' +\n '<li>Appliquant les règles d\\'usage d\\'orthographe et de grammaire</li>' +\n '<li>Gardant en tête le fait que les corrections de nature stylistique sont superflues</li>' +\n '<li>Gardant en tête le fait que les modifications de structure de phrases liées à la lisibilité du texte sont également superflues</li>' +\n '</ul>';\n $.htmlGuidelinesMonolingual = '<h4> Consignes de post‐édition <span id=\"guideLinesTranslationType_\" >monolingue</span>:</h4>' +\n '<p> Essayez d\\'améliorer le texte cible en:</p>' +\n '<ul>' +\n '<li>Vérifiant que tout élément d\\'information est correct</li>' +\n '<li>Vous appuyant le plus possible sur la suggestion de traduction</li>' +\n '<li>Appliquant les règles d\\'usage d\\'orthographe et de grammaire</li>' +\n '<li>Gardant en tête le fait que les corrections de nature stylistique sont superflues</li>' +\n '<li>Gardant en tête le fait que les modifications de structure de phrases liées à la lisibilité du texte sont également superflues</li>' +\n '</ul>';\n $.labelQuickQuestionTitle = \"Question\";\n $.labelConfirmationNeeded = \"Confirmation requise\";\n $.labelConfirmationText = \"Cette action va mettre fin à votre édition, êtes-vous sûr?\";\n $.labelQuickAnswerDone = \"Terminer\";\n $.labelConfirmationYes = \"Oui\";\n $.labelConfirmationNo = \"Non\";\n $.labelCurrentSentenceToEdit = \"Phrase en cours à éditer:\";\n $.labelTargetTextTitle = \"Texte cible\";\n $.labelSourceTextTitle = \"Texte source\";\n $.labelComments = \"Commentaires?\";\n $.labelCommentsTitle = \"Commentaires\";\n labelCloseDialog = 'Enregistrer pour plus tard';\n labelGuideLines = 'Consignes';\n labelUserAllSelected = 'Terminer la tâche';\n $.labelOriginalSentence = \"Phrase source:\";\n $.labelShowSource = \"Afficher source\";\n $.labelHideSource = \"Cacher source\";\n $.messageDocBlock = \"Cela fait au moins @timespan@ que vous travaillez sur cette tâche, ce qui correspond au temps maximum imparti comme défini par l'administrateur de votre projet. Félicitations! <br /><br /> Un autre utilisateur travaille maintenant sur cette tâche. Si vous souhaitez toutefois y contribuer de nouveau, veuillez attendre que cet utilisateur ait fini avant de rouvrir cette tâche.\"\n $.messageDocBlockInitial = \"Un autre utilisateur est déjà en train de travailler sur cette tâche. Si vous souhaitez toutefois y contribuer, veuillez rouvrir cette tâche plus tard.\";\n $.labelHours = \"heures\";\n $.labelMinutes = \"minutes\";\n $.labelSeconds = \"secondes\";\n $.messageCommentsDeleted = 'Info: Modification du texte cible détecté. Commentaires remis à zéro.';\n labelInteractiveCheck = 'Lancer la vérification interactive';\n labelTranslationOptions = 'Utiliser les options de traductions';\n labelParaphrasingService = 'Utiliser le service de paraphrases';\n $.messageNoParaphrasingResults = \"Aucun résultat!\";\n $.messageLoadingParaphrasingResults = \"Chargement...\";\n $.messageParaprasingServiceFailed = \"Un problème est survenu.\";\n $.messageInteractiveCheckNotAvailable = \"La configuration de vérification interactive est erronée. Veuillez contacter votre administrateur de projet.\";\n $.messageInteractiveCheckNoResults = \"Pas de problème détecté.\";\n //adjust the line-height for the switch button.\n $(\"#switcherButton_\").css(\"line-height\", \"3\");\n //$(\"#switchParaphrasingButton_\").css(\"font-size\", \"0.6em\");\n $.dismissLabel = \"Rejeter\";\n\n } else\n if (lang == 'de') {\n $.labelEdit = \"Bearbeiten\";\n $.labelHelp = \"Hilfe\";\n $.labelPreEditTitle = \"Rechtschreibung, Grammatik und Stil prüfen\";\n $.labelClickOntextToEdit = \"Klicken Sie auf den Text um diesen zu bearbeiten:\";\n $.htmlDialogHelp = '<p>Dieses Fenster besteht aus zwei Teilen: Auf der linken Seite finden Sie den maschinell übersetzten Text, der mehrere Sätze beinhaltet. '\n\t\t\t\t\t+ 'Jeder dieser Sätze kann durch eine Bearbeitung von Ihnen verbessert werden.</p><p>Das Textfeld “aktueller Satz zum Bearbeiten” auf der rechten Seite ermöglicht es Ihnen einen maschinell übersetzten Satz zu bearbeiten, '\n\t\t\t\t\t+ 'indem Sie den Richtlinien folgen, die Sie über die “Richtlinien”-Schaltfläche erreichen können. Über dem Bearbeitungsfenster gibt es zwei Schaltflächen: eine „Rückgängig“-Schaltfläche und eine „Wiederholen“-Schaltfläche.'\n\t\t\t\t\t+ '</p> <p>Diese Schaltflächen werden den Satz beeinflussen, der aktuell bearbeitet wird. Sie können für jeden Satz Kommentare in dem “Kommentare”-Eingabefeld hinzufügen – ob Sie diese Funktion verwenden '\n\t\t\t\t\t+ 'möchten, ist Ihnen völlig freigestellt. Sie müssen sich nicht darum kümmern die Änderungen oder Ihre Kommentare zu speichern - das geschieht automatisch! Sie können auf zwei verschiedene '\n\t\t\t\t\t+ 'Arten zwischen den Sätzen navigieren: Sie können auf drei verschiedene Arten zwischen den Sätzen navigieren: Sie können entweder auf einen Satz auf der linken Seite klicken, die “Zurück” und “Weiter” Schaltflächen verwenden, '\n\t\t\t\t\t+ 'oder die „Umschalttaste + Tabulatortaste“ Kombination und die „Tabulatortaste“ verwenden, um sich um jeweils einen Satz zu bewegen.</p><p>Falls Sie eine Pause machen möchten, klicken Sie auf “für später speichern”, sodas Sie die '\n\t\t\t\t\t+ 'Aktivität wieder aufnehmen können, sobald Sie die Aufgabe das nächste Mal öffnen. Wenn Sie keine Bearbeitungen mehr vornehmen und keine Kommentare mehr schreiben wollen, klicken Sie auf “Aufgabe fertigstellen”. Sollte ein Problem auftreten, '\n\t\t\t\t\t+ 'kontaktieren Sie bitte ihren Projekt-Administrator. </p>';\n $.labelPrev = \"Zurück (Shift + Tab)\";\n $.labelNext = \"Weiter (Tab)\";\n $.labelGuidelinesTitle = \"Tipps\";\n labelGuideLines = 'Tipps';\n $.htmlBilingualGuidelines = '<h4>Richtlinien zur<span id=\"guideLinesTranslationType_\" >zweisprachig</span> Bearbeitung:</h4>' +\n '<p> - Achten Sie darauf, dass die Übersetzung semantisch korrekt ist.</p>' +\n '<p> - Stellen Sie sicher das keine Informationen versehentlich hinzugefügt oder gel öscht wurden.</p>' +\n '<p> - Falls W örter, Satzteile oder Zeichensetzung in dem Text völlig akzeptal sind, versuchen Sie diese unbearbeitet zu verwenden, anstatt sie mit etwas Neuem und Anderen zu ersetzen.</p>';\n $.labelQuickQuestionTitle = \"Kurze Frage\";\n $.labelConfirmationNeeded = \"Bestätigung erforderlich\";\n $.labelConfirmationText = \"Sind Sie sicher, dass Sie die Bearbeitung beenden möchten?\";\n $.labelQuickAnswerDone = \"Fertig\";\n $.labelConfirmationYes = \"Ja\";\n $.labelConfirmationNo = \"Nein\";\n $.labelCurrentSentenceToEdit = \"Aktueller Satz zum Bearbeiten:\";\n $.labelTargetTextTitle = \"Zieltext\";\n $.labelSourceTextTitle = \"Ausgangstext\";\n $.labelComments = \"Kommentare ?\";\n $.labelCommentsTitle = \"Kommentare\";\n $.htmlGuidelinesMonolingual = '<h4>Tipps zum <span id=\"guideLinesTranslationType_\" ></span>Nachbearbeiten:</h4>' +\n '<p> - Bearbeiten Sie den Text nach Ihrer Interpretation so, dass er flüssiger und klarer wird.</p>' +\n '<p> - Versuchen Sie z.B. die Wortfolge und Rechtschreibung zu korrigieren, wenn durch diese der Text schwer oder nicht zu verstehen ist.</p>' +\n '<p> - Verwenden Sie Wörter, Satzteile oder Zeichensetzung unbearbeitet, falls diese akzeptabel sind.</p>' +\n '<p> - Wenn Sie mit Referenz zum Originaltext arbeiten, achten Sie darauf, dass keine Informationen hinzugefügt oder gelöscht wurden.</p>';\n labelCloseDialog = 'für später speichern';\n labelUserAllSelected = 'Aufgabe fertigstellen';\n $.labelOriginalSentence = \"Ausgangssatz:\";\n $.labelShowSource = \"Original einblenden\";\n $.labelHideSource = \"Original ausblenden\";\n $.messageDocBlock = \"Sie haben insgesamt mindestens @timespan@ an dieser Aufgabe gearbeitet. Dies wurde vom Administrator des Projekts als maximale Zeit, für die ein Benutzer eine Aufgabe sperren kann, festgelegt. Gut gemacht. <br/><br/> Diese Aufgabe wird momentan von einem anderen Benutzer bearbeitet. Wenn Sie zu mehr zu dieser Aufgabe beitragen möchten, warten Sie bitte bis dieser Benutzer fertig ist, bevor sie die Aufgabe erneut öffnen.\"\n $.messageDocBlockInitial = \"Ein anderer Benutzer arbeitet bereits an dieser Aufgabe. Falls Sie weiterhin etwas zu dieser beitragen möchten, versuchen Sie es später erneut die Aufgabe zu öffnen.\";\n $.labelHours = \"stunden\";\n $.labelMinutes = \"protokoll\";\n $.labelSeconds = \"sekunden\";\n $.messageCommentsDeleted = \"Info: Zieltextänderung erkannt. Kommentare wurden zurückgesetzt.\";\n labelInteractiveCheck = 'Interaktiven Check ausführen';\n labelTranslationOptions = ' Übersetzungsoptionen aktivieren';\n labelParaphrasingService = 'Paraphrasierung aktivieren';\n $.messageNoParaphrasingResults = \"Keine Ergbenisse gefunden!\";\n $.messageLoadingParaphrasingResults = \"Ergebnisse werden geladen...\";\n $.messageParaprasingServiceFailed = \"Problem ist aufgetreten.\";\n $.messageInteractiveCheckNotAvailable = \"Die Konfigurierung für den interaktiven Check ist unzulässig. Bitte kontaktieren Sie Ihren Projektadministrator.\";\n $.messageInteractiveCheckNoResults = \"Es wurden keine Probleme gefunden.\";\n //$(\"#switchParaphrasingButton_\").css(\"font-size\", \"0.6em\");\n $.dismissLabel = \"ablehnen\";\n }\n else {\n //adjust the line-height for the switch button.\n $(\"#switcherButton_\").css(\"line-height\", \"3\")\n }\n //main dialog title.\n $(\"#ui-dialog-title-postEditDialog_\").attr(\"title\", $.labelEdit.toString());\n $(\"#ui-dialog-title-postEditDialog_\").text($.labelEdit.toString());\n //help title.\n $(\"#imgPostAcceptInfo_ \").attr(\"alt\", $.labelHelp.toString());\n $(\"#helpPostDialog_\").attr(\"title\", $.labelHelp.toString());\n //pre-edit title.\n $(\"#tdTarget_\").attr(\"title\", $.labelPreEditTitle.toString()); \n //click on text to edit.\n $(\"#labelClickOnTextToEdit_\").text($.labelClickOntextToEdit.toString());\n //help dialog.\n $(\"#helpPostDialog_\").html($.htmlDialogHelp.toString());\n //next and prev links.\n $(\"#postEditLinkPrev_\").text($.labelPrev.toString());\n $(\"#postEditLinkNext_\").text($.labelNext.toString());\n //guidelines title.\n $(\"#guideLinesDialog_\").attr(\"title\", $.labelGuidelinesTitle.toString()); \n //guidelines dialog body.\n if ($.configurationId == \"2\")\n $(\"#guideLinesDialog_\").html($.htmlGuidelinesMonolingual.toString());\n else\n if ($.configurationId == \"1\")\n $(\"#guideLinesDialog_\").html($.htmlBilingualGuidelines.toString());\n //question dialog title.\n $(\"#completeQuestionDialog_\").attr(\"title\", $.labelQuickQuestionTitle.toString());\n //complete dialog title.\n $(\"#closeDialog_\").attr(\"title\", $.labelConfirmationNeeded.toString());\n //complete dialog body.\n $(\"#closeDialog_\").text($.labelConfirmationText.toString());\n //quick question dialog - button done.\n $(\"#btn-done_\").val($.labelQuickAnswerDone.toString());\n //complete dialog - button yes.\n $(\"#btn-yes_\").val($.labelConfirmationYes.toString());\n //complete dialog - button no.\n $(\"#btn-no_\").val($.labelConfirmationNo.toString());\n //current sentence to edit.\n $(\"#currentSentenceToEditLabel_\").text($.labelCurrentSentenceToEdit.toString());\n //target text-area title.\n $(\"#targetTextArea_\").attr(\"title\", $.labelTargetTextTitle.toString());\n //source text-area title.\n $(\"#sourceTextArea_\").attr(\"title\", $.labelSourceTextTitle.toString());\n //label comments\n $(\"#labelComments_\").text($.labelComments.toString());\n //comments title\n $(\"#commentsTextArea_\").attr(\"title\", $.labelCommentsTitle.toString());\n //main dialog - save for later button.\n $(\"#btn-cancel-post-accept .ui-button-text\").text(labelCloseDialog.toString());\n //main dialog - complete task button.\n $(\"#btn-completeTask-accept .ui-button-text\").text(labelUserAllSelected.toString());\n //main dialog - guidelines button.\n $(\"#btn-guidelines-accept .ui-button-text\").text(labelGuideLines.toString());\n //source text-area text.\n $(\"#labelOriginalSentence_\").text($.labelOriginalSentence.toString());\n }", "title": "" }, { "docid": "1428ed8b998b3e17fc9bc73946a0a215", "score": "0.64521223", "text": "changeLanguageStrings () {\n\t\tthis.RANcontextMenuMarkup = \tthis.RANcontextMenuMarkup.replace(\"REPLACE_context_guilds_text\", this.labels.context_guilds_text);\n\t\tthis.RANcontextMenuMarkup = \tthis.RANcontextMenuMarkup.replace(\"REPLACE_context_mutedguilds_text\", this.labels.context_mutedguilds_text);\n\t\tthis.RANcontextMenuMarkup = \tthis.RANcontextMenuMarkup.replace(\"REPLACE_context_dms_text\", this.labels.context_dms_text);\n\t}", "title": "" }, { "docid": "26871edb6312185e4bab6600843a101c", "score": "0.6334508", "text": "function getLabels(cultureName) {\n var currentFileName = \"TeamList\";\n $http.get(\"3ilAppBase01/Languages/\" + currentFileName + \".\" + cultureName + \".json\").then(function (response) {\n\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "b5ddd4d8c377fea7892512702236cee4", "score": "0.63279235", "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": "cddac70cd1bc754805ce92f5f77de212", "score": "0.6308662", "text": "function getLabels(cultureName) {\n var currentFileName = \"AcademicYear\";\n $http.get(\"Academic/Languages/\" + currentFileName + \".\" + cultureName + \".json\").then(function(response) {\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "9ed76bb76e62d64aa21227ebe4d14f1d", "score": "0.6275684", "text": "function getLabels(cultureName) {\n $http.get('Person/Languages/PersonBank.' + cultureName + '.json').then(function (response) {\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "1376a8b1da47eeb876332f199fb76fd3", "score": "0.62742704", "text": "function getLabels(cultureName) {\n var currentFileName = \"ElectiveGroup\";\n $http.get(\"Academic/Languages/\" + currentFileName + \".\" + cultureName + \".json\").then(function (response) {\n bindLabels(response.data);\n });\n }", "title": "" }, { "docid": "b11e38f7743180ea00964afd5da4ce92", "score": "0.62672275", "text": "function changeLang(sel) {\n console.log(sel.value);\n recognition.lang = sel.value;\n}", "title": "" }, { "docid": "1ef0f0491081f4d74945d7a2d56a0e14", "score": "0.6266222", "text": "label(_label){\r\n this.bod.label = _label;\r\n }", "title": "" }, { "docid": "ead9eb798905c04b4808a80558ab6654", "score": "0.62589955", "text": "function getLabels(cultureName) {\n $scope.deptInfo = {};\n var currentFileName = \"Department\";\n $http.get(\"Organization/Languages/\" + currentFileName + \".\" + cultureName + \".json\").then(function (response) {\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "7f29a6304cf1ce34c7bfbfc8124e5ec2", "score": "0.62519515", "text": "function getLabels(cultureName) {\n $http.get('Person/Languages/PersonReligion.' + cultureName + '.json').then(function (response) {\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "17ebc5f1c1dd998c5f99b9dba33ad3d4", "score": "0.6244324", "text": "function getLabels(cultureName) {\n\n $http.get(\"Person/Languages/PersonSport.\" + cultureName + \".json\").then(function (response) {\n\n\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "1d4433a03e9d6603c70e2c5a1912f674", "score": "0.6235507", "text": "function setLanguage(){\r\n\tswitch (theLang) {\r\n\t\tcase \"org\":\r\n\t\tdefault:\taLang = [\"Reloader\",\"Attack Emailer\",\"Attack Alarm\",\"Espionage Alarm\",\"Message Alarm\"];\r\n\t\t\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "30846755a4e54d86636c7c95fedab5dc", "score": "0.62253726", "text": "function getLabels(cultureName) {\n var currentFileName = \"ApplyLeave\";\n $http.get(\"LeaveManagement/StaffLeaves/Languages/\" + currentFileName + \".\" + cultureName + \".json\").then(function(response) {\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "35ed61e863c5b0e8217db4fb2a4602a8", "score": "0.6201868", "text": "function bindLabels(data) {\n $scope.bankLabels = data.labels;\n }", "title": "" }, { "docid": "53eecad5c696027cbce864677b92a552", "score": "0.6196016", "text": "function getLabels(cultureName) {\n\n var currentFileName = \"Authentication\";\n $http.get(\"CalendarNotifications/Languages/\" + currentFileName + \".\" + cultureName + \".json\").then(function(response) {\n bindLabels(response.data);\n authendicate();\n });\n }", "title": "" }, { "docid": "b5dcce8390e8c85de26bc0947f9c2dfc", "score": "0.6169609", "text": "function getLabels(cultureName) {\n var currentFileName = \"SubordinateRequest\";\n $http.get(\"LeaveManagement/StaffLeaves/Languages/\" + currentFileName + \".\" + cultureName + \".json\").then(function(response) {\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "7dec6118ba981d9abf730f4541bbc56b", "score": "0.61376786", "text": "setLabelText(t){this.labelText=t}", "title": "" }, { "docid": "110936411b4ebc16181036e2c3d2ff6c", "score": "0.613766", "text": "function setLanguage(lang)\n{\n if(!language.setLanguage(lang))\n {\n log.warn(\"could not set language \"+lang);\n }\n const strings = language.getIdStrings();\n for(const id of Object.keys(strings))\n {\n const element = util.getElementById(id);\n if(!element)\n {\n log.warn(id+\" does not exist\");\n continue;\n }\n const s = strings[id];\n switch(element.tagName)\n {\n case \"A\":\n case \"BUTTON\":\n case \"SPAN\": element.textContent = s; break;\n }\n // element.textContent = strings[id];\n }\n // graph.cy.style(style); // does not display the style correctly and doesn't update the labels\n // graph.cy.forceRender(); // does not update the labels either\n // the nuclear option works\n const elements = graph.cy.elements();\n graph.cy.remove(elements);\n elements.restore();\n}", "title": "" }, { "docid": "7439b15b481a7194ae7996f4efcee6cf", "score": "0.6123856", "text": "function getLabels(cultureName) {\n\n $http.get(\"Person/Languages/PersonInsurance.\" + cultureName + \".json\").then(function(response) {\n bindLabels(response.data);\n\n });\n }", "title": "" }, { "docid": "6ad21734041c4342bfa2fbe010e0508e", "score": "0.60933626", "text": "function bindLabels(data) {\n\n $scope.labelsAcademicYear = data.labels;\n\n }", "title": "" }, { "docid": "5f652b2710f8d9eb47fd4faad061509f", "score": "0.6084171", "text": "function LabelOptions() {}", "title": "" }, { "docid": "2444ed384cc53cda5694a10ed470bb0b", "score": "0.6082486", "text": "function LabelOptions() { }", "title": "" }, { "docid": "950d79255409d1df1401fe3aeae631d0", "score": "0.60786307", "text": "function RenderTranslations(){\n // get translations for labels\n labels.forEach((label) => {\n GetTranslation(label);\n translationResults.push(translatedLabel);\n });\n\n \n }", "title": "" }, { "docid": "206e4b456e70d0dcc483d7df1eea4cc6", "score": "0.6075233", "text": "function bindLabels(data) {\n /*var labels = {\n\t\telectiveGroupTitle: data.labels.electiveGroupTitle,\n\t\tminimumSubjects: data.labels.minimumSubjects,\n\t\tmaximumSubjects: data.labels.maximumSubjects,\n\t\tsubmit: data.labels.submit,\n\t\telectiveGroupHeading: data.labels.electiveGroupHeading\n\t};*/\n $scope.labelsElectiveGroup = data.labels;\n }", "title": "" }, { "docid": "787a91e9810c7a9717d579267b5b2645", "score": "0.6063332", "text": "function onchangeLanguage()\n {\n vm.translate(vm.language);\n }", "title": "" }, { "docid": "560a1d68ddcc125feb99e610a8344f34", "score": "0.6055221", "text": "function getLabelLangs(subject, endpoint, onFail, onSuccess)\n\t{ getLangs(subject, 'rdfs:label', endpoint, onFail, onSuccess); }", "title": "" }, { "docid": "7659a508f789d54c4bc35ecdf111e413", "score": "0.6054199", "text": "function translateTo(language){\n for(var key in translation[language]){\n $('#'+key).html(translation[language][key]); \n }\n translatePlaceholder(language);\n}", "title": "" }, { "docid": "ad740fcb2b910de3ba7b97503f2867fd", "score": "0.60538244", "text": "set label(value) {\n this.setAttribute('label', value);\n }", "title": "" }, { "docid": "89b4aaf06d94f0beb7c1f79bc05e97ae", "score": "0.6053305", "text": "function getCaption(lang,data){\n if(!lang) lang=\"en\";\n return data[lang];\n}", "title": "" }, { "docid": "f4d0bca9425f1ca0abaac62558f4b39a", "score": "0.60424054", "text": "setLabel(_text) {\r\n this.label.value = _text;\r\n }", "title": "" }, { "docid": "949343656e43c3db1995472b20a553a4", "score": "0.6024705", "text": "function selectLanguage(lang) {\n const elem = document.getElementById('current-lang')\n elem.innerHTML=''\n const prevLang = usedLang\n usedLang = lang\n langs = langs.map((it) => it === lang ? prevLang : it)\n elem.insertAdjacentText('afterbegin', lang + ' ▼')\n toggleLanguage(true)\n setLangData()\n}", "title": "" }, { "docid": "61b459227f3be52210833265d7952d38", "score": "0.6017212", "text": "onLangMenu (lc) {\n this.langCode = lc // switch app language by watch\n if (lc) { // use selected language for model text metadata\n this.dispatchUiLang(lc)\n this.refreshTickle = !this.refreshTickle\n }\n }", "title": "" }, { "docid": "0762df56c644777f738b3338e5944658", "score": "0.60030115", "text": "function populateLabels() {\n _labels = arguments[0] || _labels;\n (! isNaN(_labels)) ? unmark.getData('labels', populateLabels) : $('ul.sidebar-label-list').prepend(unmark.label_list(_labels));\n\n unmark.marks_addLabel();\n }", "title": "" }, { "docid": "8d712f0ec46d1edc24c4b4fea1a3cd25", "score": "0.5999102", "text": "renderLabel(props) {\n const lang =\n localStorage.getItem('livingover.lang') !== null\n ? localStorage.getItem('livingover.lang')\n : 'es'; /* Default Language */\n\n if (props.FormattedLabelId) {\n let label = '...';\n if (props.FormattedLabelId) {\n label = labels[lang][props.FormattedLabelId];\n }\n return (\n <Row>\n <Col xs=\"12\">\n <Label htmlFor={props.id} className=\"lo_bold_label\">\n {label}\n </Label>\n </Col>\n </Row>\n );\n }\n }", "title": "" }, { "docid": "e827c70147c666d8e3f0418f7ddb80d3", "score": "0.5992989", "text": "set_lang (lang, el) {\n let keyAr = Object.keys(this.dict);\n let dtAr = $(el).find(\"[data-translate]\");\n for(let i=0;i<dtAr.length;i++){\n let item = dtAr[i];\n let key = $(item).attr(\"data-translate\").toLowerCase();\n if ($.inArray(key,keyAr)!==-1) {\n let val = this.dict[key][lang]?this.dict[key][lang]:this.dict[key]['en'];\n\n if(item.isEntity)\n item.setAttribute('text','value',urlencode.decode(val));\n if($(item).text())\n $(item).text(urlencode.decode(val));\n if($(item).val())\n $(item).val(urlencode.decode(val));\n if($(item).attr(\"title\"))\n $(item).attr(\"title\", urlencode.decode(val));\n if($(item).attr(\"placeholder\"))\n $(item).attr(\"placeholder\", urlencode.decode(val));\n if($(item).attr(\"value\"))\n $(item).attr(\"value\", urlencode.decode(val));\n\n }\n }\n }", "title": "" }, { "docid": "471d09712f48927a7a7df4c538937d7f", "score": "0.5967113", "text": "function setElementsTextTranslates(lang){\n\tfor(var v in props.msgs[lang||messagesLanguage])\n\t\tfor(var v2 in document.getElementsByClassName(\"$\"+v+\"$\"))\n\t\t\tdocument.getElementsByClassName(\"$\"+v+\"$\")[v2].innerText=props.msgs[lang||messagesLanguage][v]\n}", "title": "" }, { "docid": "5bfae4a34d1573b7f7d6def873d2d380", "score": "0.5960231", "text": "getLabel() {\n const data = this.getFormData();\n let labels = [];\n\n if (undefined !== data.labels) {\n labels = data.labels;\n }\n\n return i18n.getLabel(\n labels,\n UserContext.get('catalogLocale'),\n data.code\n );\n }", "title": "" }, { "docid": "e9f6d33b751da9703e99b2f7a8b9ae92", "score": "0.5941454", "text": "function translationLabels() {\n\t\t\t\t/** This help array shows the hints for this experiment */\n\t\t\t\thelp_array = [_(\"help1\"), _(\"help2\"), _(\"help3\"), _(\"help4\"),_(\"Next\"), _(\"Close\")];\n\t\t\t\tscope.heading = _(\"Polymerase Chain Reaction\");\n\t\t\t\tscope.variables = _(\"Variables\");\n\t\t\t\tscope.efct_effi_ampli_graph = _(\"Effect of Efficiency of amplification graph\");\n\t\t\t\tscope.amplification_efficiency = _(\"Amplification Efficiency\");\n\t\t\t\tscope.initial_copy_number = _(\"Initial Copy number\");\n\t\t\t\tscope.cycle_num_label = _(\"Cycle number\");\n\t\t\t\tscope.Reset = _(\"Reset\");\n\t\t\t\tscope.result = _(\"Result\");\n\t\t\t\tscope.copyright = _(\"copyright\");\n\t\t\t\tchain_reaction_stage.update();\n\t\t\t}", "title": "" }, { "docid": "0f11cdac20a0c3c01b35e18f0711d4cd", "score": "0.59351784", "text": "function changeLanguage() {\n\t\n\tif (SET_LANGUAGE === \"en\") {\n\t\ti18n.init({ lng: \"sv\" }, function() {\n\t\t\t$(\".controls\").i18n();\n\t\t});\n\t\tSET_LANGUAGE = \"sv\";\n\t} else if (SET_LANGUAGE === \"sv\") {\n\t\ti18n.init({ lng: \"en\" }, function() {\n\t\t\t$(\".controls\").i18n();\n\t\t});\n\t\tSET_LANGUAGE = \"en\";\n\t}\n}", "title": "" }, { "docid": "f1f0dc2ca6e4b20101353d4a6848f1ac", "score": "0.5929857", "text": "get language() { return this.displayedNamesManager.language; }", "title": "" }, { "docid": "2ce7be489721974dbb326973b21c67f0", "score": "0.59069675", "text": "function loadLabels()\n {\n // Get DZ Label\n //DZLabel = dymo.label.framework.openLabelXml(getDZLabelXml());\n\n // Get Address Label\n addressLabel = dymo.label.framework.openLabelXml(getAddressLabelXml());\n\n // Get Tap Label\n //tapeLabel = dymo.label.framework.openLabelXml(getTapeLabelXml());\n }", "title": "" }, { "docid": "8b645133b1356e4e01597a3cc7d22a07", "score": "0.5903722", "text": "function initLabel(){\n\t\t\tlabel = zoomContainer\n\t\t\t\t.append(\"g\")\n\t\t\t\t.attr(\"class\", \"lables\")\n\t\t\t\t.attr(\"width\",width)\n\t\t\t\t.attr(\"height\",height)\n\t\t\t\t.attr(\"transform\", \"translate(\"+that.translateX+\",\" +that.translateY+\")\")\n\t\t\t\t.selectAll(\".lables\")\n\t\t\t\t.data(universe);\n\t\t}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "761cd1f1f2953dda7ab261f139c6412c", "score": "0.5901951", "text": "set _label(value){Helper$2.UpdateInputAttribute(this,\"label\",value)}", "title": "" }, { "docid": "ffdac29a6101a332ecda6da6f918d494", "score": "0.5893161", "text": "function bindLabels(data) {\n var lables = {\n\n WelcomeNote: data.labels.WelcomeNote,\n Login: data.labels.Login,\n ForgotPassword: data.labels.ForgotPassword,\n Submit: data.labels.Submit,\n BackToLogin: data.labels.BackToLogin\n\n };\n\n $scope.loginLables = lables;\n // appLogger.log(\"\" + JSON.stringify($scope.loginLables));\n\n }", "title": "" }, { "docid": "3a102d237efa1820fb4f60d62e58f48e", "score": "0.58871686", "text": "function bindLabels(data) {\n $scope.religionLabels = data.religionLabels;\n\n\n }", "title": "" }, { "docid": "19d24fb947adb89dcf8fd48bf21e0dcc", "score": "0.5884649", "text": "function bindLabels(data) {\n\n $scope.sportLabels = data.labels;\n\n\n }", "title": "" }, { "docid": "28fddf8b20e8d48201b29691942c6c09", "score": "0.5870739", "text": "function bindLabels(data) {\n var lables = {\n DepartmentName: data.labels.DepartmentName,\n ParentDepartment: data.labels.ParentDepartment,\n ParentDepartmentName: data.labels.ParentDepartmentName,\n Submit: data.labels.Submit,\n Update: data.labels.Update,\n DepartmentBasicInfo: data.labels.DepartmentBasicInfo1,\n Edit: data.labels.Edit,\n Delete: data.labels.Delete,\n DepartmentList: data.labels.DepartmentList,\n };\n\n $scope.DepartmentLabels = lables;\n }", "title": "" }, { "docid": "beb659e4f25e9a836c98e7caff8be6f8", "score": "0.58610624", "text": "function LanguageCollection(label) {\n\t\tIWAPI.Collection.call(this,label);\t\n\t}", "title": "" }, { "docid": "c299bc34d48859cf7bcc1123507a5c11", "score": "0.5857113", "text": "function onLocaleLoaded () {\n document.body.querySelectorAll(\"lang[name]\").forEach(function (/** @type {HTMLElement} */ element) {\n element.innerHTML = __(element.getAttribute(\"name\"));\n });\n}", "title": "" }, { "docid": "50c407ca55dcf7e6bcd0b006127c862a", "score": "0.58478445", "text": "setLabels() {\n let year = document.querySelector('.il-current--date h1.il-year'),\n today = document.querySelector('.il-current--date h1.il-today'),\n labelData = document.getElementById('il-data'),\n labelEventDay = document.getElementById('event-day');\n labelData.innerText = this.getLabelData();\n labelEventDay.innerText = this.getCurrentEventDay();\n year.innerText = this.currentConfig.todayYear;\n today.innerText =\n this.currentConfig.todayDay +\n ' de ' +\n this.getMonthLabel(false, this.currentConfig.todayMonth);\n return;\n }", "title": "" }, { "docid": "73a262220fab7d4d35056aeef9efd233", "score": "0.58227956", "text": "function configGetZddxLang(langs, currLang) {\n var label = null;\n if (!langs) {\n return label;\n }\n if (angular.isArray(langs)) {\n for (var i = 0, len = langs.length; i < len; i++) {\n if ((\"__text\" in langs[i]) && (langs[i][\"_xml:lang\"] == currLang)) {\n label = langs[i].__text;\n return label;\n \n //continue;\n }else{\n if ((\"__text\" in langs[i]) && (langs[i][\"_xml:lang\"] == 'en')) {\n label = langs[i].__text;\n return label;\n }\n }\n }\n // DEPRECATED\n// angular.forEach(langs, function(lang, index) {\n// if ((\"__text\" in lang) && (lang[\"_xml:lang\"] == currLang)) {\n// label = lang.__text;\n// return false;\n// }\n// if ((\"__text\" in lang) && (lang[\"_xml:lang\"] == \"en\")) {\n// label = lang.__text;\n// }\n// });\n } else {\n if ((\"__text\" in langs)) {\n label = langs.__text;\n }\n }\n //console.log(label)\n return label;\n }", "title": "" }, { "docid": "32c534624dac41c8c04d4d1fd1a477a4", "score": "0.58168095", "text": "function bindLabels(data) {\n var labels = {\n teamTitle: data.labels.teamTitle,\n teamDescription: data.labels.teamDescription,\n edit: data.labels.edit,\n delete: data.labels.delete,\n teamList: data.labels.teamList,\n teamHeading: data.labels.teamHeading\n };\n\n $scope.labelsTeam = labels;\n\n }", "title": "" }, { "docid": "b15a869f241f0baa1b57b27b59f9517d", "score": "0.58147156", "text": "function translations() {\n\t var lang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';\n\t\n\t var text = {\n\t daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n\t limit: 'Limit reached ({{limit}} items max).',\n\t loading: 'Loading...',\n\t minLength: 'Min. Length',\n\t months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n\t notSelected: 'Nothing Selected',\n\t required: 'Required',\n\t search: 'Search',\n\t selected: '{{count}} selected'\n\t };\n\t return window.VueStrapLang ? window.VueStrapLang(lang) : text;\n\t}", "title": "" }, { "docid": "4c854c34bf7d9874d640c684eeddd966", "score": "0.580967", "text": "changeLanguage(lang) {\n\t\tlet finalLang;\n\t\tswitch (lang) {\n\t\t\tcase 'es':\n\t\t\t\tfinalLang = this._spanishChanges;\n\t\t\t\tbreak;\n\t\t\tcase 'en':\n\t\t\t\tfinalLang = this._englishChanges;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconsole.error(\"Sorry , we can't translate the page\");\n\t\t}\n\t\t/* Scroll through the elements to be translated, and it is replaced the previous text with the language the user want to translate it. */\n\t\tthis._elements.forEach((element) => {\n\t\t\tlet text = element.dataset.i18n.split('.').reduce((obj, i) => obj[i], finalLang);\n\t\t\tif (text) {\n\t\t\t\telement.innerHTML = text;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "e4a9fb2e14960c103edcc7da53022da4", "score": "0.5801826", "text": "function updateLangText() {\n // Load text based on current page\n switch(current_page) {\n case PAGE_HOME:\n $(\"span#lang-title\").text($.i18n.prop('title'));\n $(\"span#lang-footer\").text($.i18n.prop('footer'));\n\n // This put the default Choose Language text, then the alternateIntroText() will keep alternating it\n $(\"h1#lang-choose-lang\").text($.i18n.prop('choose_lang_en'));\n break;\n\n // Most initializations for components will go here in departments page\n // The reason is this is the starting point\n case PAGE_DEPARTMENTS:\n // Navigation (put under departments because that's where they're initialized\n $(\"a#lang-select-your-items\").text($.i18n.prop('select_your_items'));\n $(\"a#lang-search-items\").text($.i18n.prop('search_items'));\n $(\"a#lang-shopping-cart\").text($.i18n.prop('shopping_cart'));\n\n // Modals\n $(\"h3#lang-checkout-title\").text($.i18n.prop('checkout')); // Suffixed with title to prevent ID duplicate\n $(\"legend#lang-your-details\").text($.i18n.prop('your_details'));\n $(\"label#lang-phone-number\").text($.i18n.prop('phone_number'));\n $(\"div#checkout-phone-number-error\").text($.i18n.prop('invalid_phone_number_error')); // Exception because it already has an ID\n $(\"a#checkout-modal-cancel-button\").text($.i18n.prop('cancel')); // Exception because it already has an ID\n $(\"p#lang-cancel-order-confirmation\").text($.i18n.prop('cancel_order_confirmation'));\n $(\"h3#lang-cancel-order-title\").text($.i18n.prop('cancel_order'));\n $(\"span#lang-cancel-order-button\").text($.i18n.prop('cancel_order'));\n $(\"a#cancel-order-modal-no-button\").text($.i18n.prop('no')); // Exception because it already has an ID\n\n // Buttons\n $(\"span#lang-cancel-order\").text($.i18n.prop('cancel_order'));\n $(\"span#lang-checkout-button\").text($.i18n.prop('checkout'));\n\n $(\"i#lang-empty-department\").text($.i18n.prop('empty_department'));\n break;\n\n case PAGE_SEARCH:\n $(\"input#store-search-input\").attr(\"placeholder\", $.i18n.prop(\"search_input_placeholder\")); // Only exception because already has ID\n break;\n\n case PAGE_CART:\n\n $(\"i#lang-empty-cart\").text($.i18n.prop(\"empty_cart\"));\n break;\n\n case PAGE_CHECKOUT:\n $(\"p#lang-checkout-text\").text($.i18n.prop(\"checkout_text\"));\n $(\"button#close-checkout\").text($.i18n.prop(\"back_to_main_screen\")); // Exception because it already has an ID\n break;\n }\n\n // Shared properties for departments, search, and cart\n if(current_page == PAGE_DEPARTMENTS || current_page == PAGE_SEARCH || current_page == PAGE_CART) {\n // Table heads\n $(\"th#lang-product-name\").text($.i18n.prop('product_name'));\n $(\"th#lang-price\").text($.i18n.prop('price'));\n $(\"th#lang-quantity\").text($.i18n.prop('quantity'));\n }\n }", "title": "" }, { "docid": "82dfc10c3fa2d2377a478842a4d3124c", "score": "0.58013284", "text": "function setLanguageDropdownEvents() {\n\n // Portuguese\n $(\"#pt-lang\").on('click', function() {\n\n // Set language\n i18n.setLng('pt-PT', {fixLng: true}, function(translation){\n $('[data-i18n]').i18n();\n });\n\n // Update dropdown selected option\n $('#lang-dropdown').html(\"<img src='images/pt.png'> &nbsp; Portuguese &nbsp; <span class='caret'></span>\");\n });\n\n // English\n $(\"#en-lang\").on('click', function() {\n\n // Set language\n i18n.setLng('en-US', {fixLng: true}, function(translation){\n $('[data-i18n]').i18n();\n });\n\n // Update dropdown selected option\n $('#lang-dropdown').html(\"<img src='images/gb.png'> &nbsp; English &nbsp; <span class='caret'></span>\");\n });\n}", "title": "" }, { "docid": "27b8b0ed2e54a8135fe70030cf4ae182", "score": "0.57940817", "text": "switchLanguage(language) {\n this.setState({language: language})\n document.title = this.translation()[this.state.language].windowTitle\n }", "title": "" }, { "docid": "ab59772ba5944d8397640e149bd3cd44", "score": "0.5792894", "text": "[consts.SET_B_SHOW_CONTENT_LANG](state, val) {\n state.bShowContentLang = val;\n }", "title": "" }, { "docid": "efd7d9fbd13a97a1c7e50f96b90c6c96", "score": "0.5789066", "text": "function showLabels() {\n var labels\n , opt = map.options;\n\n labels = g.selectAll('.'+opt.classPrefix+'label')\n .data(countries)\n .enter()\n .append('text')\n .classed(opt.classPrefix + 'label', true)\n .attr('text-anchor','middle')\n .attr('dy', '.35em')\n .style('fill', '#777') // option: LabelTextColor\n .style('opacity', 0)\n .attr('transform', function(d) {\n if(!isNaN(path.centroid(d)[0])) {\n\n var latlng = path.centroid(d);\n\n // ad hoc position fix\n if (d.id === 'KNA') {\n latlng = [latlng[0],latlng[1] + 2];\n } else if (d.id === 'BRB') {\n latlng = [latlng[0],latlng[1] + 2];\n }\n else if (d.id === 'KIR') {\n return 'translate(' + [117.38496987005313, 694.1484886048762] + ')';\n }\n return 'translate(' + latlng + ')';\n }\n })\n .text(function(d,i) {\n\n // ad hoc just skip Saint Martin (French part)\n if (d.id === 'SXM' || d.id === 'MAF') {\n return '';\n }\n return (d.properties.name);\n })\n .transition().duration(350).style('opacity', 1) // TODO: Make this an optionsparameter (animateDraw ??!?)\n ;\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "6b208ea65fc31bebf3b349e930cd0e06", "score": "0.57789594", "text": "function loadLang(key, values) {\n values.abbr = key;\n if (!languages[key]) {\n languages[key] = new Language();\n }\n languages[key].set(values);\n return languages[key];\n }", "title": "" }, { "docid": "69564a9730405925f245a2ee6e81a2b6", "score": "0.5777261", "text": "function set_lang(convo_lang) {\n lang = convo_lang;\n translate.translations.list({\n auth: API_KEY,\n q: text,\n target: target,\n }, function (err, data) {\n console.log('Translated text: ' + (err ? err.message : data.data.translations[0].translatedText));\n\tresult = data.data.translations[0].translatedText;\n \twrite_note(result, convo_id);\n });\n}", "title": "" }, { "docid": "968fb9975741aa32285fd2995b3cdaec", "score": "0.57766324", "text": "function loadLang(key, values) {\r\n values.abbr = key;\r\n if (!languages[key]) {\r\n languages[key] = new Language();\r\n }\r\n languages[key].set(values);\r\n return languages[key];\r\n }", "title": "" }, { "docid": "f4ec2968b0160cc33f40cbbcaca35865", "score": "0.57708716", "text": "function updateNaturalLanguageTitles() {\n _.each(naturalLanguages, function (nl) {\n messageSource.get(userState.naturalLanguageCode(), 'naturalLanguage.' + nl.code).then(\n function (value) {\n nl.title = value;\n },\n function () {\n $log.error('unable to get the localized name for the natural language \\''+nl.code+'\\'');\n }\n );\n });\n }", "title": "" }, { "docid": "6e79fdb25903409857e07bff5f62cc54", "score": "0.5769781", "text": "function updateLabels() {\n label = label.data(data.bubble_topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, r(d.count) / 2) + \"px\"; })\n .style(\"width\", function(d) { return r(d.count) * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(2.5 * r(d.count), this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return d.count + (d.r > 60 ? \" menções\" : \"\"); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n }", "title": "" }, { "docid": "c8f144273c1442f5380ef60059766164", "score": "0.57654756", "text": "function updateLabel(data){\r\n\t\t\tlabel = data.Rows.map(function(item){\r\n\t\t\t\treturn item.Label;\r\n\t\t\t\tconsole.log(\"updateLabes: \" + labels);\r\n\t\t\t});\t\t\r\n\t\t}", "title": "" }, { "docid": "511d23889453bf818e0666f28c45ad1a", "score": "0.5762806", "text": "function updateLabelText() {\n self.$cstOptions.removeClass('is-selected');\n self.$cstOptions.filter(function(i, el){\n return $(el).attr(\"data-val\") === self.$select.find('option:selected').val()\n }).addClass('is-selected');\n self.$opener.find('span').text(this.find('option:selected').text());\n }", "title": "" }, { "docid": "2e9a85e0c65be9fbb59dc25a09ecddcc", "score": "0.57622975", "text": "function updateLang() {\n // Get the index pointer from the dropdown menu.\n localStorage['robopaint-lang'] = $('#lang').data('ddslick').selectedData.value;\n\n // Abort the subroutine if the language has not changed (or on first load)\n if (currentLang == localStorage['robopaint-lang']) {\n return;\n }\n\n currentLang = localStorage['robopaint-lang'];\n\n // Change the language on i18n, and reload the translation variable.\n i18n.setLng(\n localStorage['robopaint-lang'],\n function() {\n robopaint.t = i18n.t;\n i18n.translateObject($('body')[0]);\n setVersion();\n\n // Apply bolding to settings details text\n $('aside').each(function(){\n $(this).html($(this).text().replace(/\\*\\*(.*?)\\*\\*/g, '<b>$1</b>'));\n });\n\n // Report language switch to the console\n console.info(\"Language Switched to: \" + localStorage['robopaint-lang']);\n\n // Update dynamic slider labels (not the servo ones though as they set\n // pen height, which is not what we want to do).\n $('input[type=range]:not(#servowash,#servopaint,#servoup)').change();\n getColorsets(); // Reload and reparse colorsets\n\n // Translate the mode if we're not on home\n cncserver.pushToMode('langChange');\n }\n );\n}", "title": "" }, { "docid": "35a4962d67e0cab2ffc91e595b8a2773", "score": "0.5754235", "text": "function addLanguage (langID, text, sep)\n\t{\n\t\tvar menu = new MenuElement (\"command\", text, \"at the end of language\" + sep);\n\t\tmenu.langID = langID;\n\t\tmenu.onDisplay = function()\n\t\t{\n\t\t\tthis.checked = document ? (document.langID == this.langID) : false;\n\t\t}\n\t\tmenu.onSelect = function()\n\t\t{\n\t\t\tif( app.modalState ) return;\n\n\t\t\tif (document)\n\t\t\t\tdocument.setLanguage (this.langID);\n\t\t}\n\t}", "title": "" }, { "docid": "acbbd26c03990157be59935585d3f35d", "score": "0.5754179", "text": "set _label(value) {\n Helper.UpdateInputAttribute(this, \"label\", value);\n }", "title": "" } ]
41e407f54b836867480fa0a2cf3035d7
Array of vectors (flat or from THREE classes)
[ { "docid": "0ce72be929777d1c08549793839e229b", "score": "0.0", "text": "function setValueV2a( gl, v ) {\n\n\t\t\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n\t\t}", "title": "" } ]
[ { "docid": "c2d13e0bf0a293df0efff72ea4e89900", "score": "0.7073402", "text": "function vectorAsArray(vectorObj) {\n return [\n vectorObj.x,\n vectorObj.y,\n vectorObj.z\n ];\n}", "title": "" }, { "docid": "cbee6a7e7a4d1e8aa14c06b8df509342", "score": "0.68969816", "text": "function Vector(arg) {\n if (arg instanceof Vector) return arg.copy();\n var arr = [];\n if (arg && arg != []) for (var i=0; i<arg.length; i++) arr.push(arg[i]);\n arr.__proto__ = Vector.prototype;\n return arr;\n}", "title": "" }, { "docid": "c087194dbf86d2df952f9ad0e3100ee4", "score": "0.67665994", "text": "function sc_vector() {\n var a = new sc_Vector();\n for (var i = 0; i < arguments.length; i++)\n\ta.push(arguments[i]);\n return a;\n}", "title": "" }, { "docid": "c087194dbf86d2df952f9ad0e3100ee4", "score": "0.67665994", "text": "function sc_vector() {\n var a = new sc_Vector();\n for (var i = 0; i < arguments.length; i++)\n\ta.push(arguments[i]);\n return a;\n}", "title": "" }, { "docid": "3b243a3c7248880f57db62b2f7b1cf58", "score": "0.67584676", "text": "function toVector(arr) {\n return concat.apply([], arr);\n}", "title": "" }, { "docid": "3b243a3c7248880f57db62b2f7b1cf58", "score": "0.67584676", "text": "function toVector(arr) {\n return concat.apply([], arr);\n}", "title": "" }, { "docid": "3b243a3c7248880f57db62b2f7b1cf58", "score": "0.67584676", "text": "function toVector(arr) {\n return concat.apply([], arr);\n}", "title": "" }, { "docid": "284b2794e4064f32ea0a72386efb3ef3", "score": "0.65649414", "text": "toVectors() {\n return {\n center: this.center,\n vector0: this.matrix.columnX(),\n vector90: this.matrix.columnY(),\n sweep: this.sweep,\n };\n }", "title": "" }, { "docid": "0bcaa426077f682781f43fa49636fb13", "score": "0.64544445", "text": "function getVertices() {\n return V;\n }", "title": "" }, { "docid": "65313e1669a020c9b383db6981315351", "score": "0.63521254", "text": "function plainArrayToThreePointsArray(array){\r\n var threeArray = [];\r\n\r\n for (var p=0; p < array.length; p+=3){\r\n threeArray.push(new THREE.Vector3(array[p], array[p+1], array[p+2]));\r\n }\r\n\r\n return threeArray;\r\n}", "title": "" }, { "docid": "dec89bd48064b62e722698895df98497", "score": "0.62725323", "text": "convert() {\n //TODO: return an array of vectors when possible; maybe truncate and warn rather than throw hard error?\n if (this.matrix.length === 0 || this.matrix.length > 1 || this.matrix[0].length < 2 || this.matrix[0].length > 3) {\n throw err.notVector() ;\n } else {\n return createVector(this.matrix[0][0], this.matrix[0][1], this.matrix[0][2]) ;\n }\n }", "title": "" }, { "docid": "3b9bde7098ab3a735b412430677e3323", "score": "0.62555814", "text": "static createOriginAndVectorsArrays(origin, vectorU, vectorV, result) {\n return Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(origin[0], origin[1], origin[2], vectorU[0], vectorU[1], vectorU[2], vectorV[0], vectorV[1], vectorV[2], result);\n }", "title": "" }, { "docid": "cc4e332ab22f66bd451118c3dc247dd0", "score": "0.6214483", "text": "function vectorize(V) {\n\tvar arr = new Array();\n\tfor (var i = 0; i < V.length; i++) {\n\t\tarr.push(V[i][0]);\n\t}\n\treturn arr;\n}", "title": "" }, { "docid": "0fab64f664bea833a5903d960499ab3f", "score": "0.6201815", "text": "asArray() {\n return [this.x, this.y, this.z];\n }", "title": "" }, { "docid": "2b44b96406adfa72fde29d658fb98685", "score": "0.6198837", "text": "normals() {\n const normalsArray = [];\n for(let face of this.faces) {\n normalsArray.push(normal(face.map(vidx => this.vertices[vidx])));\n }\n return normalsArray;\n }", "title": "" }, { "docid": "45b3908bb6e2f605b4faffd680d58a1e", "score": "0.61878085", "text": "array() {\n return [this.x, this.y, this.z]\n }", "title": "" }, { "docid": "2415ebfbfd1e94cf248db401e87f91a6", "score": "0.61719906", "text": "function v(x,y,z){ \n\t return new THREE.Vector3(x,y,z); \n\t }", "title": "" }, { "docid": "879840918143c3a5c423de2f83d1039b", "score": "0.61658585", "text": "function getVertices(){\n\t\treturn [\n\t\t\t0.5, 0.5, -8.0,\n\t\t\t0.5, -0.5, -8.0,\n\t\t\t-0.5, 0.5, -8.0,\n\t\t\t-0.5, -0.5, -8.0\n\t\t];\n\t}", "title": "" }, { "docid": "902540f4e1bbaeeb79b492a9b3e5f015", "score": "0.61330557", "text": "function v(x,y,z){ \n return new THREE.Vector3(x,y,z); \n }", "title": "" }, { "docid": "e6293484803bc7c6ba6db6970c7401fd", "score": "0.60995466", "text": "function vector(x, y, z) {\n\n return new THREE.Vector3(x, y, z);\n\n }", "title": "" }, { "docid": "d1d018e6f9d05a8103d6b386d4ff58a5", "score": "0.60865796", "text": "function Vector(x, y, z) {\n\t\t\tthis.elements = [x, y, z];\n\t\t}", "title": "" }, { "docid": "f955ef6f9fdc397bf611d728cdacc9bc", "score": "0.60738724", "text": "function Vector(x, y, z) {\n switch (arguments.length) {\n case 1:\n if (!isArray(x) || x.length < 2)\n throw new Error('An component array with 2 or greater dimension is expected.');\n this.components = x;\n break;\n case 2:\n this.components = [x, y];\n break;\n case 3:\n this.components = [x, y, z];\n break;\n }\n}", "title": "" }, { "docid": "939551d8e58232a829dc9c1bf7060898", "score": "0.6052861", "text": "function v(x,y,z){ \n\t\treturn new THREE.Vector3(x,y,z); \n\t}", "title": "" }, { "docid": "b76a7cc4aeec9e9c5eda2f90c60702fb", "score": "0.6044213", "text": "function makeVertices(points) {\n var i;\n var pts = [];\n for( i = 0; i < points.length; i++) {\n var p = points[i]; \n pts.push(new THREE.Vector3( p[0], p[1], 0));\n }\n\n return pts;\n}", "title": "" }, { "docid": "1aaa8949cb9c787d3e47b47765a88414", "score": "0.6005597", "text": "function Vector(x, y, z) {\n this.data = [x || 0, y || 0, z || 0];\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n}", "title": "" }, { "docid": "7b1e9bc7e0f37010e4a3f45a13cabc96", "score": "0.60021436", "text": "function v(x, y, z) {\n return new THREE.Vector3(x, y, z);\n }", "title": "" }, { "docid": "a58d86116a8c5d18fa4ee4f5903284dc", "score": "0.5990678", "text": "function vec(x, y) {\n return new Vector(x, y);\n}", "title": "" }, { "docid": "87c4e004af176b25e0775ff6e45966d7", "score": "0.59557295", "text": "static vector(values) {\n return new Matrix(values.length, 1, values)\n }", "title": "" }, { "docid": "31b28fe4533d32a8eb61979428dbc3ff", "score": "0.5950561", "text": "function vec(x, y) {\n return new Vector(x, y);\n}", "title": "" }, { "docid": "0bc02f2236785e7460b8725d46454bd7", "score": "0.5944845", "text": "to3() { return Vec.of( this[0], this[1], this[2] ); }", "title": "" }, { "docid": "92d68b53b08d1a15405da0dc022ad732", "score": "0.59123105", "text": "function vec(x, y) {\r\n return new Vector(x, y);\r\n }", "title": "" }, { "docid": "f3e856504c060d5a297a32a0deb6738a", "score": "0.5899365", "text": "getVertices()\n {\n let vertices = new Set();\n\n for(let selected of this.list) {\n if(selected.__proto__.constructor == THREE.Vector3) {\n vertices.add(selected);\n } else if(selected.__proto__.constructor == THREE.Face3) {\n vertices.add(this.editor.model.vertices[selected.a]);\n vertices.add(this.editor.model.vertices[selected.b]);\n vertices.add(this.editor.model.vertices[selected.c]);\n }\n }\n\n return vertices;\n }", "title": "" }, { "docid": "e69a6bc7cb032b9e555579254f0fb3b5", "score": "0.5879365", "text": "static VerttoArray(mat) {\n let a = []\n if(mat.cols != 1) {\n return console.error(\"You can only use VerttoArray on matricies with only one column\")\n }\n for(let i = 0; i < mat.rows; i++) {\n a.push(mat.data[i][0])\n }\n return a\n }", "title": "" }, { "docid": "c4934118548149008dba1cafd508a2f5", "score": "0.58391523", "text": "toVector() {\r\n const A = this.start.elements;\r\n const B = this.end.elements;\r\n return Vector.create([B[0] - A[0], B[1] - A[1], B[2] - A[2]]);\r\n }", "title": "" }, { "docid": "42d95ac0881cefa5f2bf81d7b8675fde", "score": "0.582267", "text": "function cube() {\n let verts = [];\n verts = verts.concat(quad( 1, 0, 3, 2 ));\n verts = verts.concat(quad( 2, 3, 7, 6 ));\n verts = verts.concat(quad( 3, 0, 4, 7 ));\n verts = verts.concat(quad( 6, 5, 1, 2 ));\n verts = verts.concat(quad( 4, 5, 6, 7 ));\n verts = verts.concat(quad( 5, 4, 0, 1 ));\n return verts;\n}", "title": "" }, { "docid": "4c3039e06fc4c3943b99e9c237d1dc17", "score": "0.5821507", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;\n}", "title": "" }, { "docid": "1543cbec6bf3010ecfe1193b9ccaa158", "score": "0.58205205", "text": "static to_vec4( flat_ary ){\r\n\t\tlet vert_cnt\t= flat_ary.length / 3,\r\n\t\t\tout\t\t\t= new Float32Array( vert_cnt * 4 ),\r\n\t\t\tidx \t\t= 0,\r\n\t\t\ti \t\t\t= 0;\r\n\r\n\t\tfor( i; i < flat_ary.length; i+=3 ){\r\n\t\t\tout[ idx++ ] = flat_ary[ i ];\r\n\t\t\tout[ idx++ ] = flat_ary[ i+1 ];\r\n\t\t\tout[ idx++ ] = flat_ary[ i+2 ];\r\n\t\t\tout[ idx++ ] = 0;\r\n\t\t}\r\n\r\n\t\treturn out;\r\n\t}", "title": "" }, { "docid": "11a9285888c87ac5153f3d18f1ab0fc9", "score": "0.58088404", "text": "function createvec(dt) {\n var v;\n for(var i=0; i < 1000; i++) {\n\tv = new float3();\n\tv.x = 1.2;\n }\n print(v.x);\n}", "title": "" }, { "docid": "15075b908aaa15f79e4c5524c11e7a2b", "score": "0.57558084", "text": "function GLSLVec3(data) {\n var _this = this;\n if (data.length == 3) {\n _this = _super.call(this, data) || this;\n }\n else {\n throw 'Array must have 3 elements';\n }\n return _this;\n }", "title": "" }, { "docid": "e0bc469a3b9ac780757b193f40023f37", "score": "0.5741406", "text": "function verts2array(coords) {\n let flat = [];\n for (let k = 0; k < coords.length; k++) {\n flat.push(coords[k][0], coords[k][1]);\n }\n return flat;\n}", "title": "" }, { "docid": "3062f79eac73a0da387306a9155467de", "score": "0.57215863", "text": "function GLSLVec(data) {\n this.data = data;\n }", "title": "" }, { "docid": "ecbd2a3e6612e80ceb11b39a4623657f", "score": "0.5709429", "text": "static create_vec2D(r, c) {\n let v = new Array(r);\n for (let i = 0; i < r; i++) {\n v[i] = new Array(c).fill(0);\n }\n return v;\n }", "title": "" }, { "docid": "f197404865acae7a53e3911191c34928", "score": "0.5701753", "text": "function v(x,y,z){ \n return new THREE.Vertex(new THREE.Vector3(x,y,z)); \n }", "title": "" }, { "docid": "24a7c29f7cb9f69ae7319e3e96633d31", "score": "0.5690505", "text": "function vectorSafe() {\n let array = [];\n return {\n /**\n * @param {*} value \n * @returns {void}\n */\n append: (value) => array.push(value),\n /**\n * @param {Number} idx \n * @param {*} value \n * @returns {void}\n */\n store: (idx, value) => array[idx] = value,\n /**\n * @param {Number} idx \n * @returns {*}\n */\n get: (idx) => array[idx]\n }\n}", "title": "" }, { "docid": "616a225e2791b1d1c08e17da335106b1", "score": "0.56883746", "text": "toVector() {\r return new Vector(this.X, this.Y);\r }", "title": "" }, { "docid": "8025140aa84bba92712c6d3b467d5104", "score": "0.5684941", "text": "function v(x,y,z){ \n\t return new THREE.Vertex(new THREE.Vector3(x,y,z)); \n\t }", "title": "" }, { "docid": "e6aceb56e0ea735d300a2a17a16444f7", "score": "0.56576586", "text": "static VertfromArray(arr) {\n let a = new Matrix(arr.length, 1)\n for(let i = 0; i < a.rows; i++) {\n a.data[i][0] = arr[i]\n }\n return a\n }", "title": "" }, { "docid": "d9d140089ca691015fa68739af5da68d", "score": "0.5653517", "text": "function normalVector(dim) {\n var p = [];\n for (var j = 0; j < dim; j++) {\n p[j] = normal();\n }\n return p;\n}", "title": "" }, { "docid": "695d0bfdc2549b6afecfc7c4f8e97146", "score": "0.56362605", "text": "function verts2array(coords) {\n let flat = [];\n for (let k = 0; k < coords.length; k++) {\n flat.push(coords[k][0], coords[k][1]);\n }\n return flat;\n }", "title": "" }, { "docid": "fd505f248ecd9f8f570dc0fcfbe221ad", "score": "0.5583697", "text": "static toList(v) {\n return [v.x, v.y, v.z];\n }", "title": "" }, { "docid": "5abc77121e19d7a590028d49171cdce1", "score": "0.55808866", "text": "function xyListToVertices(values){\r\n var ret = {endpoint: null, vertices: [] };\r\n for (var i=0; i<values.length;) {\r\n ret.vertices.push(new THREE.Vector3(values[i++], values[i++],0));\r\n }\r\n ret.endpoint = ret.vertices[ret.vertices.length-1];\r\n return ret;\r\n}", "title": "" }, { "docid": "49b5e13493fa92e98482d8c1933cac45", "score": "0.55709934", "text": "initializeArrays()\n {\n this.vertices = [];\n this.colors = [];\n this.indices = [];\n this.normals = [];\n this.target = null;\n this.verticesBuffer = null;\n this.colorsBuffer = null;\n this.indicesBuffer = null;\n this.normalsBuffer = null;\n }", "title": "" }, { "docid": "50953b0a9ed53ca1cdf7b1b04d5aab54", "score": "0.5559311", "text": "clearVectors() {\n this.vectorData = [];\n }", "title": "" }, { "docid": "31638e18b9ceb77d43f9ea6671e6f969", "score": "0.55575633", "text": "function zerovec() {\r\n var vec = new Array(3);\r\n for (var ic = 0; ic < 3; ic++)\r\n vec[ic] = 0.0;\r\n return vec;\r\n}", "title": "" }, { "docid": "bedeed947e0e07f12ace686412e3a511", "score": "0.55527735", "text": "function read_vector(reader) {\n var lst = read_list(reader, '[', ']');\n return types._vector.apply(null, lst);\n}", "title": "" }, { "docid": "7eed5f5f0594613cc501bae93d517666", "score": "0.5552386", "text": "toFloat64Array() { return Float64Array.of(this.x, this.y, this.z); }", "title": "" }, { "docid": "7eed5f5f0594613cc501bae93d517666", "score": "0.5552386", "text": "toFloat64Array() { return Float64Array.of(this.x, this.y, this.z); }", "title": "" }, { "docid": "7abe9dc4736163caeae186e1ab258990", "score": "0.5548351", "text": "function sc_list2vector(l) {\n var a = new sc_Vector();\n while(l !== null) {\n\ta.push(l.car);\n\tl = l.cdr;\n }\n return a;\n}", "title": "" }, { "docid": "7abe9dc4736163caeae186e1ab258990", "score": "0.5548351", "text": "function sc_list2vector(l) {\n var a = new sc_Vector();\n while(l !== null) {\n\ta.push(l.car);\n\tl = l.cdr;\n }\n return a;\n}", "title": "" }, { "docid": "ae5cc5f876865099ca4630a6aa7e82a7", "score": "0.55440664", "text": "toVector() {\n if(this.rows != 1 && this.cols != 1)\n return;\n return new Vector(this.cols == 1 ? new Vector(this.col(0)) : new Vector(this.row(0)))\n }", "title": "" }, { "docid": "50596e4da9d334d718370307ee7cb326", "score": "0.5541645", "text": "values () {\n return this.vertexMap.toArray()\n }", "title": "" }, { "docid": "f8a714be1421bc3a48e9934a7e08fb67", "score": "0.55288523", "text": "function SIMDVector3(x,y,z) {\n\n this.simdData = SIMD.Float32x4(x,y,z,0);\n this.taData = new Float32Array([x,y,z]);\n this.l;\n}", "title": "" }, { "docid": "7ee175b7b3687a362da55eecdc41761f", "score": "0.55193126", "text": "function makeV3D(v){\n\treturn new Vector3d(scale*v[0],scale*v[1],scale*v[2]);\n}", "title": "" }, { "docid": "962aa867185dd7326ec536b3d2603324", "score": "0.5515279", "text": "_getFaceNormals() {\r\n // array of face normals\r\n var faceNormals = [];\r\n var faceNormal = [];\r\n\r\n // Following lines iterate over triangles\r\n for (var i = 0; i < this.numTriangles; i++) {\r\n // Following lines give you three vertices for each face of the triangle\r\n var p0 = vec3(this.vertices[this.indexList[3 * i]][0],\r\n this.vertices[this.indexList[3 * i]][1],\r\n this.vertices[this.indexList[3 * i]][2]);\r\n\r\n var p1 = vec3(this.vertices[this.indexList[3 * i + 1]][0],\r\n this.vertices[this.indexList[3 * i + 1]][1],\r\n this.vertices[this.indexList[3 * i + 1]][2]);\r\n\r\n var p2 = vec3(this.vertices[this.indexList[3 * i + 2]][0],\r\n this.vertices[this.indexList[3 * i + 2]][1],\r\n this.vertices[this.indexList[3 * i + 2]][2]);\r\n\r\n // Calculate vector from p0 to p1 ( use subtract function in MV.js, NEEDS CODE )\r\n var p01 = subtract(p1, p0); //p1-p0\r\n\r\n // Calculate vector from p0 to p2 ( use subtract function, NEEDS CODE )\r\n var p02 = subtract(p2, p0); //p2-p0\r\n\r\n // Calculate face normal as the cross product of the above two vectors\r\n // (use cross function in MV.js, NEEDS CODE )\r\n faceNormal = cross(p01, p02);\r\n\r\n // normalize face normal (use normalize function in MV.js, NEEDS CODE)\r\n faceNormal = normalize(faceNormal, 0);\r\n\r\n // Following line pushes the face normal into the array of face normals\r\n faceNormals.push(faceNormal);\r\n }\r\n\r\n // Following line returns the array of face normals\r\n return faceNormals;\r\n }", "title": "" }, { "docid": "63d208ce93502faf825eac6377b8abdb", "score": "0.5492584", "text": "values(){\n\t\tvar it = super.values();\n\t\tvar res = new BayrellRtl.Types.Vector();\n\t\tvar next = it.next();\n\t\twhile (!next.done){\n\t\t\tres.push( next.value );\n\t\t\tnext = it.next();\n\t\t}\n\t\treturn res;\n\t}", "title": "" }, { "docid": "bc8b280ef30d2e22c5b2537b9a01708b", "score": "0.5489228", "text": "function vec3(comp1, comp2, comp3) {\n return new expr_1.BasicVec3(...vecSourceList(...[comp1, comp2, comp3].map((c) => expr_1.wrapInValue(c))));\n}", "title": "" }, { "docid": "00de405ea8f2651763c6c7c1e975c29e", "score": "0.54811406", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n/*\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;*/\n}", "title": "" }, { "docid": "00de405ea8f2651763c6c7c1e975c29e", "score": "0.54811406", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n/*\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;*/\n}", "title": "" }, { "docid": "00de405ea8f2651763c6c7c1e975c29e", "score": "0.54811406", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n/*\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;*/\n}", "title": "" }, { "docid": "00de405ea8f2651763c6c7c1e975c29e", "score": "0.54811406", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n/*\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;*/\n}", "title": "" }, { "docid": "00de405ea8f2651763c6c7c1e975c29e", "score": "0.54811406", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n/*\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;*/\n}", "title": "" }, { "docid": "00de405ea8f2651763c6c7c1e975c29e", "score": "0.54811406", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n/*\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;*/\n}", "title": "" }, { "docid": "00de405ea8f2651763c6c7c1e975c29e", "score": "0.54811406", "text": "function parse_VtVector(blob, cb) {\n\t/* [MS-OLEPS] 2.14.2 VectorHeader */\n/*\tvar Length = blob.read_shift(4);\n\tvar o = [];\n\tfor(var i = 0; i != Length; ++i) {\n\t\to.push(cb(blob));\n\t}\n\treturn o;*/\n}", "title": "" }, { "docid": "99a811b54251d44274bdc7f4d773e830", "score": "0.54551965", "text": "static get ForwardVector(){\n return new CANNON.Vec3(0, 0, +1);\n }", "title": "" }, { "docid": "a89e5df2339862fb4a21946f60b76c11", "score": "0.54382175", "text": "function Vector (x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "title": "" }, { "docid": "97983329f9463f0a07e0667595b8b39b", "score": "0.54276484", "text": "function loadArrays(vertices) {\n\t\t// Always set the arrays to zero, in order to center properly\n\t\taVerts.length = 0;\n\t\taCounterVerts.length = 0;\n\t\tnVerts.length = 0;\n\t\tfor (var i in vertices.a_vertex) {\n\t\t\taVerts.push(p.createVector(vertices.a_vertex[i].x, vertices.a_vertex[i].y));\n\t\t\taVerts[i].x *= scaleFactor;\n\t\t\taVerts[i].x += glyphCenter.x;\n\t\t\taVerts[i].y *= scaleFactor;\n\t\t\taVerts[i].y += glyphCenter.y;\n\t\t}\n\t\tfor (var j in vertices.counter_vertex) {\n\t\t\taCounterVerts.push(p.createVector(vertices.counter_vertex[j].x, vertices.counter_vertex[j].y));\n\t\t\taCounterVerts[j].x *= scaleFactor;\n\t\t\taCounterVerts[j].x += glyphCenter.x;\n\t\t\taCounterVerts[j].y *= scaleFactor;\n\t\t\taCounterVerts[j].y += glyphCenter.y;\n\t\t}\n\t\tfor (var k in vertices.n_vertex) {\n\t\t\tnVerts.push(p.createVector(vertices.n_vertex[k].x, vertices.n_vertex[k].y));\n\t\t\tnVerts[k].x *= nScaleFactor;\n\t\t\tnVerts[k].x += nOffset.x;\n\t\t\tnVerts[k].x *= scaleFactor;\n\t\t\tnVerts[k].x += glyphCenter.x;\n\t\t\tnVerts[k].y *= nScaleFactor;\n\t\t\tnVerts[k].y += nOffset.y;\n\t\t\tnVerts[k].y *= scaleFactor;\n\t\t\tnVerts[k].y += glyphCenter.y;\n\t\t}\n\t}", "title": "" }, { "docid": "3ddbb75bee65c6a5d007055a7b572069", "score": "0.5407021", "text": "function pvec3(comp1, comp2, comp3) {\n return new expr_1.PrimitiveVec3([comp1, comp2, comp3]);\n}", "title": "" }, { "docid": "b6fa83ef7c7ce7907aefb5acf900816b", "score": "0.54042757", "text": "function setValueV2fArray(gl, v) {\r\n\r\n\tvar data = flatten(v, this.size, 2);\r\n\r\n\tgl.uniform2fv(this.addr, data);\r\n\r\n}", "title": "" }, { "docid": "83208d759404319f5787f812e4b22e8d", "score": "0.54008853", "text": "function vector_norm3D(v){\n var len = vector_length3D(v);\n v[0] = v[0] / len;\n v[1] = v[1] / len;\n v[2] = v[2] / len;\n return v;\n}", "title": "" }, { "docid": "50eb1e830b7053d16d31f37df0c36e26", "score": "0.5398978", "text": "toArrays () {\n return this.value.map( x => Array.from(x) )\n }", "title": "" }, { "docid": "ff0aa51b9174a6101e62667d03c527c0", "score": "0.5394636", "text": "constructor() {\n super(\"positions\", \"normals\");\n this.positions.push(\n ...Vec.cast([-1, -1, -1], [1, -1, -1], [-1, -1, 1], [1, -1, 1], [1, 1, -1], [-1, 1, -1], [1, 1, 1], [-1, 1, 1],\n [-1, -1, -1], [-1, -1, 1], [-1, 1, -1], [-1, 1, 1], [1, -1, 1], [1, -1, -1], [1, 1, 1], [1, 1, -1],\n [-1, -1, 1], [1, -1, 1], [-1, 1, 1], [1, 1, 1], [1, -1, -1], [-1, -1, -1], [1, 1, -1], [-1, 1, -1]));\n this.normals.push(\n ...Vec.cast([0, -1, 0], [0, -1, 0], [0, -1, 0], [0, -1, 0], [0, 1, 0], [0, 1, 0], [0, 1, 0], [0, 1, 0],\n [-1, 0, 0], [-1, 0, 0], [-1, 0, 0], [-1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0],\n [0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 0, -1], [0, 0, -1], [0, 0, -1], [0, 0, -1]));\n this.indices.push(0, 1, 2, 1, 3, 2, 4, 5, 6, 5, 7, 6, 8, 9, 10, 9, 11, 10, 12, 13,\n 14, 13, 15, 14, 16, 17, 18, 17, 19, 18, 20, 21, 22, 21, 23, 22);\n }", "title": "" }, { "docid": "0b717a493195d3156d55bf0b3ad447c1", "score": "0.5373619", "text": "translate(v)\n\t{\n\t\t// TODO\n\n\t\treturn new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, v.x, v.y, v.z, 1]);\n\n\t\tthis.needsUpdate = true;\n\t}", "title": "" }, { "docid": "67fa411c2bb17a9388357657a11816ab", "score": "0.53655016", "text": "function setValueV2fArray( gl, v ) {\n\n\tvar data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "67fa411c2bb17a9388357657a11816ab", "score": "0.53655016", "text": "function setValueV2fArray( gl, v ) {\n\n\tvar data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "bf5812f06f00a5cc80df6a9959151899", "score": "0.53634244", "text": "function Vec3f (x, y, z) {\n\tVec3Base.call(this, Float32Array, Vec3f, Vec2f );\n\tthis.type = CINDER.TYPES.VEC3F;\n\n\tif( arguments.length === 0 ) {\n\t\tthis.setToNull();\n\t}\n\telse if( arguments.length === 1 ) {\n\t\tthis.setFromVec3(x);\n\t}\n\telse if( arguments.length === 3 ) {\n\t\tthis.setFromElements(x, y, z);\n\t}\n\treturn this;\n}", "title": "" }, { "docid": "578232fb4e1978ed877286fe34693d31", "score": "0.53579336", "text": "function vertF(u, v, f) {\n if (u.length !== v.length) {\n console.log('err: vert lengths differ');\n }\n\n let ans = [];\n\n for (let i = 0; i < Math.min(u.length, v.length); i++) {\n ans.push(f(u[i], v[i]));\n }\n\n return ans;\n}", "title": "" }, { "docid": "600318301b6886b1ce6552bf52bfa70e", "score": "0.53356904", "text": "function sc_vector2list(a) {\n var res = null;\n for (var i = a.length-1; i >= 0; i--)\n\tres = sc_cons(a[i], res);\n return res;\n}", "title": "" }, { "docid": "600318301b6886b1ce6552bf52bfa70e", "score": "0.53356904", "text": "function sc_vector2list(a) {\n var res = null;\n for (var i = a.length-1; i >= 0; i--)\n\tres = sc_cons(a[i], res);\n return res;\n}", "title": "" }, { "docid": "19ecd7e1cffdcf4cdc02f18c7df65aba", "score": "0.5332231", "text": "castToVector() {\n if(this.getNoColumns() === 1) {\n return new Vector(this.getColumn(0));\n } else {\n console.log(\"Error: Trying to convert matrix to vector\"\n + \"but the matrix doesn't have 1 column\");\n }\n }", "title": "" }, { "docid": "e914df36ca1ec3f1926332ed7331d296", "score": "0.5329565", "text": "function Vector(x1, y1, x2, y2){\r\n\t\"use strict\";\r\n\tthis.x1 = x1;\r\n\tthis.y1 = y1;\r\n\tthis.x2 = x2;\r\n\tthis.y2 = y2;\r\n\tthis.val = [\r\n\t\tx2 - x1,\r\n\t\ty2 - y1\r\n\t];\r\n}", "title": "" }, { "docid": "6540351e31b0c5961370716a3eb15862", "score": "0.53281903", "text": "function addVectors(arr) {\n return arr.reduce(function (a, b) {\n return add(a, b);\n });\n}", "title": "" }, { "docid": "048ebc6d1dbeadf3cde02f78d04c893a", "score": "0.53261954", "text": "function vector(obj) {\n\t\tvar lat = Math.atan(0.993277*Math.tan(DEG2RAD*obj.Lat));\n\t\tvar lon = DEG2RAD*obj.Lon;\n\t\tobj.Z = Math.sin(lat);\n\t\tvar rxy = Math.cos(lat);\n\t\tobj.X = rxy*Math.cos(lon);\n\t\tobj.Y = rxy*Math.sin(lon);\n\t}", "title": "" }, { "docid": "6273e80d4005c965edf34b3911f0133e", "score": "0.531949", "text": "function setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "6273e80d4005c965edf34b3911f0133e", "score": "0.531949", "text": "function setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "6273e80d4005c965edf34b3911f0133e", "score": "0.531949", "text": "function setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "6273e80d4005c965edf34b3911f0133e", "score": "0.531949", "text": "function setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "6273e80d4005c965edf34b3911f0133e", "score": "0.531949", "text": "function setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "6273e80d4005c965edf34b3911f0133e", "score": "0.531949", "text": "function setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}", "title": "" }, { "docid": "67f51668d3af4ec536bb11cec776f079", "score": "0.5310443", "text": "function getCameraArrays(camera) {\n return [[camera.eye.x, camera.eye.y, camera.eye.z], [camera.center.x, camera.center.y, camera.center.z], [camera.up.x, camera.up.y, camera.up.z]];\n }", "title": "" }, { "docid": "248e9cf1fa9b7ae90f32557cf84d4340", "score": "0.5308271", "text": "function drawAllVectors(vectorQueue) {\n\n // first, clear existing vectors\n axes.remove(allObjects);\n allObjects = new THREE.Object3D;\n axes.add(allObjects);\n\n for (var i = 0; i < vectorQueue.length; i++) {\n \n var currentVectorObj = vectorQueue[i];\n createVector(currentVectorObj.xCoord.value, currentVectorObj.yCoord.value, currentVectorObj.zCoord.value);\n } \n }", "title": "" }, { "docid": "78283df915025a8868c7b06affd069cc", "score": "0.53049606", "text": "uvData(all = true,opaque = true){\n var uvData = [];\n this.entities.forEach(element => {\n if(all || (opaque && element.alpha == 1.0) || (!opaque && element.alpha < 1.0 && element.alpha > 0.0))\n uvData = uvData.concat(element.getUVCoords());\n })\n return uvData;\n }", "title": "" } ]
4fcc833c0182e9e5d40e544cc122de85
let id = '', title = '', author = '', price = '';
[ { "docid": "31a34d0e3bd7bb32d3b13ab11ec4e6e4", "score": "0.0", "text": "function deleteJSON(obj) {\n\n console.log(\"deleteJSON\" + obj);\n\n xmlFileToJs('Books.xml', function (err, result) {\n\n if (err) throw (err);\n\n id = result.books.section[obj.section].entree[obj.entree]['id'];\n title = result.books.section[obj.section].entree[obj.entree]['title'];\n author = result.books.section[obj.section].entree[obj.entree]['author'];\n price = result.books.section[obj.section].entree[obj.entree]['price'];\n\n delete result.books.section[obj.section].entree[obj.entree];\n console.log(JSON.stringify(result, null, \" \"));\n\n jsToXmlFile('Books.xml', result, function (err) {\n if (err) console.log(err);\n });\n });\n }", "title": "" } ]
[ { "docid": "29ec0b7921d693829d777cfd51601419", "score": "0.6956086", "text": "constructor(Author, title, price) {\n this.author = Author;\n this.title = title;\n this.price = price\n }", "title": "" }, { "docid": "e867fe281defd1c5a778da2096fe7ed2", "score": "0.6680927", "text": "constructor(id,title,ISBN,publishedDate,author){\n this.id=id;\n this.title=title;\n this.ISBN=ISBN;\n this.publishedDate=publishedDate;\n this.author=author;\n }", "title": "" }, { "docid": "68fe7e51624d1878c946a19713de5b11", "score": "0.6415292", "text": "function Book(title, author, price) {\n this.title = title;\n this.author = author;\n this.price = price;\n this.cover = null;\n this.id = null;\n this.added = null;\n this.isFavorite = false;\n\t\n return this;\n}", "title": "" }, { "docid": "f06be2e3efe20fd36b897ec58c811b94", "score": "0.64139354", "text": "constructor(id, idOrder, idProduct, quantity, price) {\n this.id = id;\n this.idOrder = idOrder;\n this.idProduct = idProduct;\n this.quantity = quantity;\n this.price = price;\n }", "title": "" }, { "docid": "12cd2a259619a18dab879e198015ce5b", "score": "0.6362529", "text": "constructor(id, name) {\n this.id = id;\n this.name = name;\n this.items = [];\n this.totalPrice = 0;\n }", "title": "" }, { "docid": "a9525bd3f011a727ca191924e838bdb1", "score": "0.6219843", "text": "getVariables() {\n return {\n book: {\n // id is NOT included because we are insert and as such, there is id\n title: this.props.title,\n category: this.props.category,\n price: this.props.price,\n authorId: this.props.authorId\n }\n };\n }", "title": "" }, { "docid": "a13cc3e4ce14e0b8be646fe1f81a8642", "score": "0.6201639", "text": "constructor(id, title) {\n this.id = id;\n this.title = title;\n }", "title": "" }, { "docid": "d399aa3b7654f34fdfc3a7bd37f5758b", "score": "0.61547494", "text": "get info() {\n return `\nId: ${this.Id}\nName: ${this.name}\nPrice: ${this.price}\nAuthor: ${this.author}\nPublish Date: ${this.publishDate}\n`;\n }", "title": "" }, { "docid": "86ef7b5d208f91ce03a4924928c1adae", "score": "0.61234623", "text": "function Product(id, name, prices, stock) {\n this.id = id;\n this.name = name;\n this.prices = prices;\n this.stock = stock\n}", "title": "" }, { "docid": "60414d344cd5a52377016a58d4d367c2", "score": "0.6095677", "text": "constructor(title, imagURL,price,description){\n this.title=title;\n this.imagURL=imagURL;\n this.price=price;\n this.description=description;\n }", "title": "" }, { "docid": "2fbcad208b0adce6542be075d2a08003", "score": "0.60834646", "text": "constructor(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n }", "title": "" }, { "docid": "7760674f586518e0d7a27e446af5264a", "score": "0.6080037", "text": "function Book(title, author, pages, read, id){\n this.title = title;\n this.author = author;\n this.pages = pages;\n this.read = read;\n this.id = id;\n this.info = () => `${this.title} by ${this.author}, ${this.pages} pages, ${this.read}`;\n}", "title": "" }, { "docid": "b62541659f20206d7d842602fac5645e", "score": "0.60673004", "text": "constructor(data) {\n this._id = data._id\n this.imgUrl = data.imgUrl\n this.price = data.price\n this.year = data.year\n this.levels = data.levels\n this.bedrooms = data.bedrooms\n this.bathrooms = data.bathrooms\n this.description = data.description\n }", "title": "" }, { "docid": "ff4798d03aede0aa2d46f00a20098300", "score": "0.6028474", "text": "function clickID() {\n const newBook = {\n id: props.id,\n title: props.title, \n authors: props.authors, \n desc: props.desc,\n pic: props.pic, \n link: props.link\n }\n console.log(newBook);\n API.save(newBook);\n }", "title": "" }, { "docid": "a7caa5c65cb5da1e4aea6fcfee033194", "score": "0.6006822", "text": "function showDetails({bookTitle, price}){\n console.log(`Name: ${bookTitle}, price: ${price} `)\n }", "title": "" }, { "docid": "00c6f4c99a2ec049352561e3716ba135", "score": "0.60002315", "text": "constructor(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n }", "title": "" }, { "docid": "0bd221c0bd1514602d8a088453a95ddf", "score": "0.5956333", "text": "constructor(title, imageUrl, price, description) {\n this.title = title;\n this.imageUrl = imageUrl;\n this.price = price;\n this.description = description;\n }", "title": "" }, { "docid": "742c2f97b7a8a595f1ae77611967899b", "score": "0.59406406", "text": "editPrice() { \r\n const url = `https://weather-to-wear-shahar-hadar.herokuapp.com/admin/edit`\r\n fetch(`${url}`,\r\n {method:'POST',\r\n body:`id=${this.state.id}&price=${this.state.price}`,\r\n headers: {\r\n \"Content-Type\": \"application/x-www-form-urlencoded\",\r\n }})\r\n .then(res => res.json())\r\n .then(item => this.add({id: item.id, price:item.price, image:item.image}))\r\n .catch(err => this.manageError())\r\n\r\n }", "title": "" }, { "docid": "3fbf63bdbc173001df021464d16ef9d5", "score": "0.5907069", "text": "constructor({\n id = \"\",\n name = \"\",\n description = \"\",\n creator = {},\n creatorEmail = \"\"\n } = {}) {\n this.id = id;\n this.name = name;\n this.description = description;\n this.creatorEmail = creatorEmail;\n this.creator = creator;\n }", "title": "" }, { "docid": "8fd120a423627986fecf238a66c77bba", "score": "0.5897451", "text": "save() {\n return db.execute('INSERT INTO products (title,price,imageUrl,description) VALUES(?,?,?,?)',\n [this.title,this.price,this.imageUrl,this.description]);\n }", "title": "" }, { "docid": "c728a8aa7454a25387e97176c5c07b41", "score": "0.58885247", "text": "function Book(id,title,cost){\n if (this.constructor.name !== \"Book\") \n return new Book(id,title,cost);\n var _id = id,\n _title = title,\n _cost = cost;\n this.id = function(){\n return _id;\n };\n this.title = function(val){\n if (typeof val === \"undefined\") return _title;\n if (val !== \"\") _title = val;\n };\n this.cost = function(val){\n if (typeof val === \"undefined\") return _cost;\n if (val > _cost) _cost = val;\n }\n}", "title": "" }, { "docid": "84dbfeb9e0bcd3910de7febd0370897b", "score": "0.58766", "text": "function Book(info) {\n this.image_url= info.imageLinks?info.imageLinks.thumbnail:'https://i.imgur.com/J5LVHEL.jpg';\n this.title = info.title || 'No title available';\n this.author=info.authors;\n this.description=info.description;\n this.isbn=info.industryIdentifiers ? info.industryIdentifiers[0].identifier: 'No isbn';\n}", "title": "" }, { "docid": "673de1a9812154b27f7576c7cc2e0c1f", "score": "0.5875255", "text": "get fields () {\n return {\n id: {\n type : 'int',\n primary: true,\n },\n\n title: {\n type: 'text'\n },\n\n album: {\n type: 'text'\n },\n\n preview_link: {\n type: 'text'\n },\n\n artwork: {\n type: 'text'\n },\n\n artist_id: {\n type: 'int'\n }\n }\n }", "title": "" }, { "docid": "88e62eb3fefc211715c11168698b751d", "score": "0.5866331", "text": "function bookTitle(id) {\n //log('display ' + key);\n return initDB('thr').then(function(db) {\n return readRecord(db, 'books', +id).then(function(book) {\n return { ID: book.ID, title: book.title };\n });\n });\n }", "title": "" }, { "docid": "e79200de91ce985f2877de7b0dfbf6b8", "score": "0.5866039", "text": "constructor(id){\n this.id = id\n this.products = []\n }", "title": "" }, { "docid": "bc4c94a891b14086e7a27e37e8bf6e42", "score": "0.58328086", "text": "function Item(title,\n price_per_kle,\n kle,\n unit_price,\n unit_volume,\n amount)\n{\n return {\n title: title,\n price_per_kle: price_per_kle,\n kle: kle,\n unit_price: unit_price,\n unit_volume: unit_volume,\n amount: amount\n };\n}", "title": "" }, { "docid": "e12f285dbef31f3933def789b66a9768", "score": "0.5808966", "text": "function addProduct(id) {\r\n var title = document.querySelector('#produit-' + id + ' h3').innerHTML;\r\n var price = Number(document.getElementById('prix-' + id).value);\r\n var product = {\r\n title: title,\r\n price: price\r\n }\r\n\r\n cart.addProduct(product);\r\n\r\n displayCart();\r\n }", "title": "" }, { "docid": "d737602c5fbc9514b9009fa1cf8e05a9", "score": "0.57577324", "text": "constructor(title, author, year){\n this.title = title,\n this.author = author,\n this.year = year \n }", "title": "" }, { "docid": "40c4355abccd1bb916b86ebc13802258", "score": "0.57367444", "text": "constructor(data) {\n const { name, desc, price, stock = 0, availability } = data;\n\n // Id Checks\n // if (!_id) {\n // throw new Error(`No id provided: Received ${_id}`);\n // }\n // if (typeof _id !== \"string\") {\n // throw new Error(`Id must be a string. Received ${_id}(${typeof _id})`);\n // }\n function uuidv4() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (\n c\n ) {\n var r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n this._id = uuidv4();\n\n // Name checks\n if (!name) {\n throw new Error(`No name provided: Received ${name}`);\n }\n if (typeof name !== 'string') {\n throw new Error(\n `Name must be a string. Received ${name}(${typeof name})`\n );\n }\n this.name = name;\n\n // Desc checks\n if (!desc) {\n throw new Error(`No description provided: Received ${desc}`);\n }\n if (typeof desc !== 'string') {\n throw new Error(\n `Description must be a string. Received ${desc}(${typeof desc})`\n );\n }\n this.desc = desc;\n\n // Price Checks\n if (!price) {\n throw new Error(`No price provided: Received ${price}`);\n }\n if (typeof price !== 'number') {\n throw new Error(\n `Price must be a number. Received ${price}(${typeof price})`\n );\n }\n this.price = price;\n\n // Stock checks\n if (!stock) {\n throw new Error(`No stock provided: Received ${stock}`);\n }\n if (typeof stock !== 'number') {\n throw new Error(\n `Stock must be a number. Received ${stock}(${typeof stock})`\n );\n }\n this.stock = stock;\n\n // Availability checks\n if (!availability) {\n throw new Error(`No availability provided: Received ${availability}`);\n }\n if (typeof availability !== 'boolean') {\n throw new Error(\n `Availability must be a boolean. Received ${availability}(${typeof availability})`\n );\n }\n this.availability = availability;\n }", "title": "" }, { "docid": "76a402c243da43af94684a71b9140f21", "score": "0.5724198", "text": "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xb6213cdf;\n this.SUBCLASS_OF_ID = 0xf4e94c78;\n\n this.id = args.id;\n this.title = args.title;\n this.prices = args.prices;\n }", "title": "" }, { "docid": "e0f5c6fd27d77a369316775f062573ae", "score": "0.5718793", "text": "constructor(name= 'no-name'){\n this.id= uuidV4();\n this.name= name;\n this.votes= 0;\n }", "title": "" }, { "docid": "e1d6496c8913589e9b69fa9c6feef3c9", "score": "0.5712202", "text": "constructor(title, author, isbn) {\n // whatever passes in as params will be assigned to title, author, isbn\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n }", "title": "" }, { "docid": "dd0cc3f799a4c0fdd9a69385b9bcf0a3", "score": "0.57115144", "text": "function Product(id, name, price, description, ctgid) {\n this.id = id;\n this.name = name;\n this.price = price;\n this.description = description;\n this.ctgid = ctgid;\n }", "title": "" }, { "docid": "b6b629315cca6b6fd938df907dccd805", "score": "0.5695626", "text": "function bookDetail(\n title,\n author,\n publishedDate,\n description,\n category,\n price,\n currencyCode,\n thumbnail\n) {\n this.title = title;\n this.author = author;\n this.publishedDate = publishedDate;\n this.description = description;\n this.category = category;\n this.price = price;\n this.currencyCode = currencyCode;\n this.thumbnail = thumbnail;\n}", "title": "" }, { "docid": "18ff7b4b9eb93252809b68d3fc2a09b9", "score": "0.56870776", "text": "constructor(isbn,image,title){\n this.isbn=isbn;\n this.image = image\n this.title=title\n \n}", "title": "" }, { "docid": "69acd95769b46cadcfab75aa152c6988", "score": "0.5678452", "text": "function Book(title,author,rating){\n this.title = title\n this.author = author\n this.rating = rating\n}", "title": "" }, { "docid": "0a5d75cf473879d2258314ef7af82551", "score": "0.56462836", "text": "function createAuthor(name, sname, date, books, id) {\n var author = {};\n\n//****************************** using method for each to sort out our array\n if (id) {\n $localStorage.authors.forEach(function (item) {\n if (item.id === id) {\n item.name = name;\n item.sname = sname;\n item.date = date;\n item.books = books || [];\n }\n });\n } else {\n author.name = name;\n author.sname = sname;\n author.date = date;\n author.books = books || [];\n author.id = createId();\n $localStorage.authors.push(author);\n }\n\n//***************************** creation an id for each author\n function createId() {\n var id = $localStorage.authorId;\n $localStorage.authorId = $localStorage.authorId + 1;\n return id;\n }\n\n }", "title": "" }, { "docid": "2cf4147e8be0c30d3dd7a543480a8e4a", "score": "0.56289357", "text": "getById(id) {\r\n const i = new Item(this);\r\n i.concat(`(${id})`);\r\n return i;\r\n }", "title": "" }, { "docid": "a45f4d1428d031ca272a1be24e7e727b", "score": "0.56280655", "text": "function Book(title,author,isbn){\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n}", "title": "" }, { "docid": "9006687ae36a714dd916072f05b7a9e7", "score": "0.56257594", "text": "function Song(id , title){\n this.id = id;\n this.title = title;\n }", "title": "" }, { "docid": "38f7582c419e7c0bfaa89d51986dce4f", "score": "0.56220907", "text": "constructor(data) {\n // data: Object\n let defaultData = {\n sid: null,\n author: \"\",\n bookname: \"\",\n category_sid: 0,\n book_id: \"\",\n publish_date: \"1970-01-01\",\n pages: 0,\n price: 0,\n isbn: \"\",\n on_sale: 1,\n introduction: \"\",\n };\n this.data = { ...defaultData, ...data };\n }", "title": "" }, { "docid": "f0664719fad4bfec17edba174e47481b", "score": "0.562012", "text": "function Book(author, title, condition, price, id, ISBN, t, sold, desc, i) {\n\tthis.author = author;\n\tthis.title = title;\n\tthis.condition = condition;\n\tthis.price = price;\n\tthis.id = id;\n\tthis.isbn = ISBN;\n\tthis.tid = t;\n\tthis.sold = sold;\n\tthis.descript = desc;\n\tthis.img = i;\n\t\n\tthis.getAuthor = function() {\n\t\treturn this.author;\n\t}\n\t\n\tthis.getTitle = function() {\n\t\treturn this.title;\n\t}\n\t\n\tthis.getCondition = function() {\n\t\treturn this.condition;\n\t}\n\t\n\tthis.getPrice = function() {\n\t\treturn this.price;\n\t}\n\t\n\tthis.getId = function() {\n\t\treturn this.id;\n\t}\n\t\n\tthis.getISBN = function() {\n\t\treturn this.isbn;\n\t}\n\t\n\tthis.getTid = function() {\n\t\treturn this.tid;\n\t}\n\t\n\tthis.getSold = function() {\n\t\treturn this.sold;\n\t}\n\t\n\tthis.getDescript = function() {\n\t\treturn this.descript;\n\t}\n\t\n\tthis.getImage = function() {\n\t\treturn this.img;\n\t}\n\t\n\tthis.setSold = function() {\n\t\tthis.sold = 1;\n\t}\n}", "title": "" }, { "docid": "849cd5ed9135ab67681fe308d1293c02", "score": "0.5617387", "text": "static claerFields() {\n document.querySelector('#title').value = '';\n document.querySelector('#author').value = '';\n document.querySelector('#isbn').value = '';\n }", "title": "" }, { "docid": "5061ee8d3591d9c2e66e921e8278b235", "score": "0.559672", "text": "static async update(id, quote, author)\n {\n const { rows } = await pool.query(\n `UPDATE quotes \n SET quote = $3, author= $2\n WHERE id = $1\n RETURNING *`,\n [id, quote, author]);\n\n return new Quote(rows[0]);\n }", "title": "" }, { "docid": "fd3819751fc56a5ad926937c8788aedf", "score": "0.55933", "text": "add({id = null, name = 'default name', price = 0, category = 'default', description = 'default', images = null}) {\n this.setState(prevState => ({\n specials: [\n ...prevState.specials, {\n id: id,\n name: name,\n category: category,\n description: description,\n price: price,\n images: images\n }\n ]\n }))\n }", "title": "" }, { "docid": "f742b75e2fd359fd65dd593d23eea222", "score": "0.55921465", "text": "function Book(title, author){\n this.title = title\n this.author = author\n}", "title": "" }, { "docid": "6a4b0098e978b8a5a2206603cdcce0ac", "score": "0.55811924", "text": "constructor(price, quantity, name)\n {\n this.price=price;\n this.quantity=quantity;\n this.name=name;\n }", "title": "" }, { "docid": "b41ad05788c6acaf5c18878bda0210e7", "score": "0.5574765", "text": "function Book (title, author, rating) {\n this.title = title;\n this.author = author;\n this.rating = rating;\n}", "title": "" }, { "docid": "25e97f3884aa3e32a36792afaf6fe552", "score": "0.55739826", "text": "constructor(id, title, author,isbn,location,picture,idUsers,description) {\n /**\n * Class Book\n * Creates an object Book\n * \n * @param id\n * @param title string is the title of the book\n * @param author string is the author of the book\n * @param isbn int is the isbn of a book\n * @param location string is the City or University location of the Book\n * @param picture string is the name of the picture\n * @returns book object\n */\n this.id = id;\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n this.location = location;\n this.picture = picture;\n this.idUsers = idUsers;\n this.description = description;\n }", "title": "" }, { "docid": "310e04ea58cc123b207bd7a23eb1b995", "score": "0.5572901", "text": "function fetchPasta(id, description, pastaName, price) {\n fetch(`https://www.themealdb.com/api/json/v1/1/lookup.php?i=${id}`)\n .then(resp => resp.json())\n .then(json => {\n const info = json.meals[0]\n const itemContainer = document.createElement('div')\n itemContainer.classList.add('pasta')\n itemContainer.innerHTML = description(info)\n document.getElementById('pasta').appendChild(itemContainer)\n const itemClass = new Item (`${pastaName}`, `${price}`, `${info.strMealThumb}`)\n document.getElementById(`${info.strMeal}`).addEventListener('click', () => addToOrder(itemClass))\n })\n}", "title": "" }, { "docid": "adee40e11e29cb999a581d1971e71cfc", "score": "0.5569501", "text": "function Book(title, author, rating){\n this.title = title;\n this.author = author;\n this.rating = rating;\n}", "title": "" }, { "docid": "ab92f3fee98d49819ab15ebeebcb47f7", "score": "0.5565975", "text": "function fetchQuote() {\n let random = Math.floor(Math.random() * quotes.length); \nconsole.log(random);\ndocument.getElementById(\"text\").innerHTML = quotes[random].text;\ndocument.getElementById(\"author\").innerHTML = quotes[random].author;\n}", "title": "" }, { "docid": "4e828a0bcd8c119ff12ca0147354c982", "score": "0.55570763", "text": "function Book(title, author, isbn) {\r\n this.title = title;\r\n this.author = author;\r\n this.isbn = isbn;\r\n}", "title": "" }, { "docid": "a9466bdbcef27aad359156fdd24bac92", "score": "0.5527559", "text": "function Book(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n}", "title": "" }, { "docid": "a9466bdbcef27aad359156fdd24bac92", "score": "0.5527559", "text": "function Book(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n}", "title": "" }, { "docid": "a9466bdbcef27aad359156fdd24bac92", "score": "0.5527559", "text": "function Book(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n}", "title": "" }, { "docid": "a9466bdbcef27aad359156fdd24bac92", "score": "0.5527559", "text": "function Book(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n}", "title": "" }, { "docid": "a9466bdbcef27aad359156fdd24bac92", "score": "0.5527559", "text": "function Book(title, author, isbn) {\n this.title = title;\n this.author = author;\n this.isbn = isbn;\n}", "title": "" }, { "docid": "be415be4d9e3eea658f53547b4290305", "score": "0.55193126", "text": "function Book(title, author, rating) {\n this.title = title;\n this.author = author;\n this.rating = rating;\n}", "title": "" }, { "docid": "6572d74dd390163bfa52b23558e2f8e1", "score": "0.55110824", "text": "constructor(id, author, title, pages, status) {\n this.id = id;\n this.autor = author;\n this.title = title;\n this.pages = pages;\n this.status = status;\n }", "title": "" }, { "docid": "0aee4902a71c29fcf8c21b1655c7ac12", "score": "0.55100477", "text": "function setElement(id, price, quantity){\n\n\tvar ITEMDetail = [];\n \n ITEMDetail.price = price;\n ITEMDetail.quantity = quantity;\n \n detailArray[id] = ITEMDetail;\n}", "title": "" }, { "docid": "38cc2ec1ea9ec653d8d4b3747583e38a", "score": "0.5508421", "text": "constructor(id, name, category, dateCreated, description) {\n this.id = id;\n this.name = name;\n this.category = category;\n this.dateCreated = dateCreated;\n this.description = description;\n }", "title": "" }, { "docid": "8cd37c620d6243e5594018d90430c415", "score": "0.550617", "text": "makeBlankQuote(req, res) {\n res.json({\n id: null,\n content: null,\n author: null,\n genre_type: null,\n });\n }", "title": "" }, { "docid": "8ccca6552d5a36f0f344541962994154", "score": "0.55033976", "text": "addAndFetchListing(store, data) {\n const item = store.state.cmcListings.filter((item) => {\n return(item.symbol === data.ticker);\n })[0];\n\n const id = (item) ? item.id : null;\n\n if (id) {\n store.commit('addOwnListing', {\n id,\n ...data\n });\n store.dispatch('fetchOwnListing', id);\n } else {\n console.warn('This coin id is not found!');\n }\n }", "title": "" }, { "docid": "a15e5133aadcad9fedd0cf45dc0cc48f", "score": "0.5502593", "text": "constructor(data) {\n this.title = data.title\n this.chore = data.chore || []\n }", "title": "" }, { "docid": "b5ea570a5da90ee6128758af50576944", "score": "0.547284", "text": "getInfo(){\n return {\n id : this.id,\n name : this.name,\n artist : this.artist\n };\n }", "title": "" }, { "docid": "7d3230a79b1efcacdecba69a84a157dd", "score": "0.5469245", "text": "async editSongById(id, {\n title,\n year,\n performer,\n genre,\n duration,\n }) {\n const updatedAt = new Date().toISOString;\n const query = {\n text: `UPDATE songs \n SET title = $1, year = $2, performer = $3, \n genre = $4, duration = $5, updated_at = $6 \n WHERE id = $7 \n RETURNING id`,\n values: [\n title,\n year,\n performer,\n genre,\n duration,\n updatedAt,\n id],\n };\n const result = await this._pool.query(query);\n if (!result.rowCount) {\n throw new NotFoundError('Gagal memperbarui lagu. Id tidak ditemukan');\n }\n }", "title": "" }, { "docid": "659307406123220f00d82a6b2e2e9f59", "score": "0.54671806", "text": "constructor(obj) {\r\n this.id = obj.id;\r\n this.lastModified = obj.lastModified;\r\n this.created = obj.created;\r\n this.favourite = obj.favourite;\r\n this.deleted = obj.deleted;\r\n this.title = obj.title;\r\n this.tags = obj.tags;\r\n this.template = obj.template;\r\n this.content = obj.content;\r\n }", "title": "" }, { "docid": "80f9b9267b13af99d33cfe2d1f0c3cdc", "score": "0.5460376", "text": "constructor() {\n this.author = null ;\n }", "title": "" }, { "docid": "973373e2aaafeb6df5b01c0e56c24585", "score": "0.5458988", "text": "constructor(id,nombres,documento,profesion) {\n if (id) {\n this.id = id; \n } \n this.nombres = nombres;\n this.documento = documento;\n this.profesion = profesion;\n }", "title": "" }, { "docid": "2fe011e803b9b5955b63709c61d9694a", "score": "0.5455313", "text": "constructor(name = 'Product', price = 0.00, category = 'uncategorized') { // Here is where we set up our class/object properties.\n this.name = name;\n this.price = Number(price);\n this.category = category;\n }", "title": "" }, { "docid": "648c07918d3905ce3bf344e261828e26", "score": "0.54512715", "text": "function leerDatosProducto(producto) {\r\n const infoProducto = {\r\n imagen: producto.querySelector(\"img\").src,\r\n titulo: producto.querySelector(\"h4\").textContent,\r\n precio: producto.querySelector(\".precio span\").textContent,\r\n id: producto.querySelector(\"h4\").textContent\r\n };\r\n console.log(infoProducto);\r\n insertarCarrito(infoProducto);\r\n}", "title": "" }, { "docid": "0c7d6913400ca81ce3837f15c7dc886f", "score": "0.54307973", "text": "function Book(title, author, rating){\n\tthis.title = title;\n\tthis.author = author;\n\tthis.rating = rating;\n}", "title": "" }, { "docid": "5f87a233e1ed6b18e259381fd7c65017", "score": "0.542975", "text": "function leerDatosCursos(curso){\n\nconst infoCurso = {\n imagen: curso.querySelector('img').src,\n titulo: curso.querySelector('h4').textContent,\n precio: curso.querySelector('.precio span').textContent,\n id: curso.querySelector('a').getAttribute('data-id'),\n\n}\n\ninsertarCarrito(infoCurso);\n \n}", "title": "" }, { "docid": "c99ec700788e70fcf15fd23839e9f532", "score": "0.5422376", "text": "function Orderinfo(user, price, item) {\n this.user = user;\n this.price = price;\n this.items = item;\n}", "title": "" }, { "docid": "4d79424cee705ef14f8468e8fa5dbd80", "score": "0.5421166", "text": "function getBookingTitle(id) {\n return bookings ? bookings.find(b => b.id === id).titre : \"\";\n }", "title": "" }, { "docid": "92e4afe748b160e1aa7102427e548c52", "score": "0.54070765", "text": "function createItem(item){\n const {truck_id, item_name, item_description, item_photo_url, item_price} = item\n return db('items')\n .insert({truck_id, item_name, item_description, item_photo_url, item_price})\n}", "title": "" }, { "docid": "3483bd787e710866ef94467554d2b19e", "score": "0.5403391", "text": "function getBooks(data,bookId){\n \n const row=document.createElement('tr');\n row.setAttribute('id',bookId);\n row.innerHTML=`<td>${data.title}</td>\n <td>${data.author}</td>\n <td><a class='delete'>X</a></td>\n `;\n\n table_body.appendChild(row);\n\n}", "title": "" }, { "docid": "066bc97489cbdf72808520e5585536ae", "score": "0.540022", "text": "constructor(desc){\n this.id = uudiv4();\n this.descripcion = desc;\n this.completadoEn = null;\n }", "title": "" }, { "docid": "11bae1bcfdb27cc01f746c90670544a0", "score": "0.53949034", "text": "constructor(id, data = ''){\n\t\tthis.id = id;\n this.data = data;\t\t\n\t}", "title": "" }, { "docid": "c3b1d4a2dc79d30e8037dddcd9797f36", "score": "0.53900254", "text": "addItem() {\n //const { foodName, price } = this.state\n let rid = restaurantInfo().rid\n\n const {foodName, price, description, mcid, tags } = this.state\n\n console.log(`${tags}`)\n\n }", "title": "" }, { "docid": "3bfbaceb0253b0c0318a6a01ff94c480", "score": "0.53862643", "text": "constructor() {\n /**\n *\n * @member {String} code\n */\n this.code = undefined\n /**\n *\n * @member {String} status\n */\n this.status = undefined\n /**\n *\n * @member {String} statusDisplay\n */\n this.statusDisplay = undefined\n /**\n *\n * @member {String} placed\n */\n this.placed = undefined\n /**\n *\n * @member {String} guid\n */\n this.guid = undefined\n /**\n * @member {module:models/Price} total\n */\n this.total = undefined\n }", "title": "" }, { "docid": "7cec45c8b7d728098f821281e3b2da1e", "score": "0.5385147", "text": "function Item( name, price ) {\n this.name = name;\n this.price = price;\n this.sold = false;\n}", "title": "" }, { "docid": "e60669b622ceb91c2f638810021dc397", "score": "0.5382935", "text": "constructor(data) {\n // here the data is passed grouped as an object, rather than indivually in order\n const { name, price, stock = 0, description = \"\", tags = [] } = data;\n // log(arguments);\n\n \n\n this._id = MenuItem.uuidv4();\n this.name = name;\n this.price = price;\n this.stock = stock;\n this.description = description;\n this.tags = tags;\n }", "title": "" }, { "docid": "eed9dfbf9e6138afc5b312bc252641cd", "score": "0.53805155", "text": "addProductAmount(id) {\n let product = shoppingCart.findById(id);\n product.amount++;\n document.getElementById('foodAmountCart-' + product.id).innerHTML = product.amount + 'x';\n document.getElementById('overall-shopping-cart-price-' + product.id).innerHTML = printPrice(product) + '€';\n }", "title": "" }, { "docid": "b3faea68d1b7975c8dd9cb7e3c64507b", "score": "0.5378028", "text": "function leerDatosProductos(producto){\n const infoProducto = {\n img: producto.querySelector('.imagen').src,\n titulo: producto.querySelector('#title-product').textContent,\n cantidad: producto.querySelector('#cantidad').value,\n precio: producto.querySelector('#precio').textContent,\n id: producto.querySelector('#agregar-carrito').getAttribute('data-id')\n };\n agregarAlCarrito(infoProducto); \n}", "title": "" }, { "docid": "16d9143ef8cd38d6f2d8e60025a5fc29", "score": "0.5374305", "text": "function createBook(name, style, pages, authorId, id) {\n var book = {};\n\n if (id) {\n $localStorage.books.forEach(function (item) {\n if (item.id === id) {\n item.name = name;\n item.style = style;\n item.pages = pages || 0;\n item.author = authorId;\n }\n });\n } else {\n book.name = name;\n book.style = style;\n book.pages = pages || 0;\n book.author = authorId;\n book.id = createId();\n }\n\n//***************************** creation an id for each book\n function createId() {\n var id = $localStorage.booksId;\n $localStorage.booksId = $localStorage.booksId + 1;\n return id;\n }\n\n $localStorage.books.push(book);\n\n }", "title": "" }, { "docid": "cf2d0ebc203d05cb048cfd66fb6d549f", "score": "0.53732026", "text": "function saveBook(id) {\n const bookToSave = results.filter(result => result.id === id);\n const [ bookObj ] = bookToSave;\n const [ authors ] = bookObj.volumeInfo.authors;\n \n API.saveBook({\n title: bookObj.volumeInfo.title,\n authors: authors,\n description: bookObj.volumeInfo.description,\n image: bookObj.volumeInfo.imageLinks.smallThumbnail,\n link: bookObj.volumeInfo.infoLink\n })\n .then(alert(\"The book has been saved!\"))\n .catch(err => console.log(err));\n }", "title": "" }, { "docid": "e49e41b0e28be0b93675db61886e3b50", "score": "0.53690284", "text": "static async update(id,data) {\n\n const { setCols, values } = sqlForPartialUpdate(\n data,\n {\n tite: \"title\",\n description: \"description\"\n }\n );\n const idVarIdx = \"$\" + (values.length + 1);\n\n const querySql = `UPDATE journals\n SET ${setCols}\n WHERE id = ${idVarIdx}\n RETURNING username,\n title,\n description,\n plant_id AS \"plantId\"`;\n const result = await db.query(querySql, [...values, id]);\n console.log(result);\n const journal = result.rows[0];\n\n return journal;\n\n }", "title": "" }, { "docid": "155a31ff22a34f6d472e97c89fe7f4c5", "score": "0.53618366", "text": "constructor(params) {\n this.id = 1;\n this.arrayProdutos = [];\n }", "title": "" }, { "docid": "85d1eab0182870a42c18e96a7c732eb2", "score": "0.535215", "text": "function _createBook(bookDetails, price) {\n var book = {\n id: makeId(),\n name: bookDetails.name,\n price: price || getRndInt(15, 121),\n imgUrl: bookDetails.imgUrl,\n rate: 0\n }\n return book;\n}", "title": "" }, { "docid": "ac60ab864eaa9e9ce179a097aae1adaf", "score": "0.53519046", "text": "constructor(data) {\n // data: Object\n let defaultData = {\n sid: null,\n author: '',\n bookname: '',\n category_sid: 0,\n book_id: '',\n publish_date: '1970-01-01',\n pages: 0,\n price: 0,\n isbn: '',\n on_sale: 1,\n introduction: '',\n images: '[]'\n };\n this.data = {...defaultData, ...data};\n }", "title": "" }, { "docid": "ab74ba076404a2a5549b263bfa89e25c", "score": "0.53498846", "text": "async function onClick() {\n const {\n id, title, author, imageUrl, publicationYear,\n } = book;\n\n const input = {\n bookId: id,\n title,\n author,\n imageUrl,\n publicationYear,\n userId: sessionUserId,\n available: true,\n };\n\n await createMutation({ variables: { input } });\n }", "title": "" }, { "docid": "6743374d321f36648257ebebd9c6d5fc", "score": "0.5343475", "text": "function fillFields(id){\n fetch(`../api/v1/products/${id}`)\n .then((resp) => resp.json()) // Transform the data into json\n .then(function(product) { // Here you get the data\n\n var nameProduct = document.getElementById('nameProduct');\n nameProduct.value = product.name;\n var image = document.getElementById('image');\n image.value = product.image;\n var description = document.getElementById('description');\n description.value = product.description;\n var price = document.getElementById('price');\n price.value = product.price;\n var amount = document.getElementById('amount');\n amount.value = product.amount;\n })\n .catch( error => console.error(error) );\n}", "title": "" }, { "docid": "f279eaa21cb6ade8ee4d5e63c259c417", "score": "0.5335032", "text": "function showAllProducts(){\n mysql_con.query(show_query, (err, results, fields)=>{\n if(err) throw err;\n console.log(\"-\".repeat(100));\n console.log(\"ID\"+\" \".repeat(14)+ \"Item Name\"+ \" \".repeat(45) + \"Price\" + \" \".repeat(25));\n console.log(\"-\".repeat(100));\n results.forEach(elem => {\n var id = elem.item_id + \" \".repeat(16 - elem.item_id.toString().length);\n var name = elem.product_name + \" \".repeat(54 - elem.product_name.length);\n var price = elem.price + \" \".repeat(30 - elem.price.toString().length);\n console.log(id + name + price)\n });\n console.log(\"-\".repeat(100) + \"\\n\\n\");\n\n // save the id of the last row in products table\n last_id = results[results.length - 1].item_id; \n // Ask what user wants to do next\n handleUser();\n }) \n}", "title": "" }, { "docid": "efd11d136b24d7b364d091876d94c35b", "score": "0.5334226", "text": "function Note(title, text, id) {\n this.title = title;\n this.text = text;\n this.id = id;\n}", "title": "" }, { "docid": "cfa5e2591f9513d8b8d30e95b1f7a02e", "score": "0.53297997", "text": "constructor( title, image, desc, price ) {\n this.title = title; // these fileds are called Property\n this.imageUrl = image;\n this.description = desc;\n this.price = price;\n }", "title": "" }, { "docid": "a27d87f89b7e29a737e71dbdca8342ed", "score": "0.5329504", "text": "function Note(id, title, time, author, body) {\r\n this.id = id;\r\n this.title = title;\r\n this.time = time;\r\n this.author = author;\r\n this.body = body;\r\n}", "title": "" }, { "docid": "c7ca953f13461a1c4c22ef0c3ee626de", "score": "0.5328323", "text": "static one(req, res){\n var id = req.params.id;\n Salas.findAll({\n where: {id: id}\n //attributes: ['id', ['description', 'descripcion']]\n }).then((data) => {\n res.status(200).json(data);\n });\n }", "title": "" }, { "docid": "f5615c84d54290cf8e0deba87890eb8d", "score": "0.532805", "text": "function getCourseInfo(course){\n\n const courseinfo={\n image:course.querySelector('img').src,\n title:course.querySelector('h4').textContent,\n price:course.querySelector('.price span').textContent,\n id:course.querySelector('a').getAttribute('data-id')\n };\n\n //add to the cart \n\n addToCart(courseinfo);\n\n}", "title": "" }, { "docid": "8cc32846253edcdc2713b7d7e5abe99c", "score": "0.5323027", "text": "function getShoeInfo(shoe) {\r\n //create an object with the shoe data\r\n const shoeInfo = {\r\n image: shoe.querySelector('img').src,\r\n title: shoe.querySelector('.title').textContent,\r\n price: shoe.querySelector('.price span').textContent,\r\n id: shoe.querySelector('button').getAttribute('data-id')\r\n }\r\n //Insert the card into the cart\r\n addIntoCart(shoeInfo);\r\n}", "title": "" } ]
2bafcf5041d4ef0062ce9dd40a056e2f
import data from JSON
[ { "docid": "6ca6ac3695eba771f0763cb7c20ae0e2", "score": "0.0", "text": "function importData(voxelmap) {\n let vm=[];\n let dataMap = voxelmap[\"voxels\"];\n for (let i = 0; i < dataMap.length; i+=1) {\n // Get each object in the array\n let vp = dataMap[i];\n\n // Get a position object\n let position = vp[\"position\"];\n // Get x,y from position\n let x = position[\"x\"];\n let y = position[\"y\"];\n\n // Get diameter and label\n let diameter = vp[\"diameter\"];\n let label = vp[\"label\"];\n\n // Put object in array\n vm.push(new Voxel(x, y, diameter, label)); \n }\n\n return vm;\n}", "title": "" } ]
[ { "docid": "8158232732c98709b70de613ced76682", "score": "0.7073793", "text": "function importFromJSON(jsonImport){\n localStorage.setItem(\"journal\", JSON.stringify(jsonImport.journal));\n localStorage.setItem(\"template\", jsonImport.template);\n init();\n}", "title": "" }, { "docid": "8ef76f3057a5cf96c8dc93697f27dd0c", "score": "0.698557", "text": "import (json, options = {}) {\n let opts = Object.assign({\n promise: false\n }, options);\n try {\n (Helpers.is(json, 'String') ? JSON.parse(json) : json).map((entry) => {\n this.set(fromType(entry[0], entry[2] || ''), fromType(entry[1], entry[3] || ''));\n });\n } catch (error) {\n if (opts.promise) {\n return Promise.reject(error);\n } else {\n throw error;\n }\n }\n return (opts.promise ? Promise.resolve(this) : this);\n }", "title": "" }, { "docid": "0f7593b36338ba73ae1c45c1128f57be", "score": "0.6614919", "text": "function loadJSON() {\n fetch(\"tasks.json\")\n .then(response => response.json())\n .then(myJson => {\n jsonData = myJson;\n createNewObject(myJson);\n });\n}", "title": "" }, { "docid": "13c0418d8a80048724382c5c7b241f36", "score": "0.659305", "text": "loadJsonData() {\n }", "title": "" }, { "docid": "ebef092cefe787a044246e13de6bdac3", "score": "0.65694714", "text": "function ct_importprofile() {\n fetch('https://hastebin.com/raw/mojohavode') // testing json\n .then(response => response.json())\n .then(data => console.log(data))\n}", "title": "" }, { "docid": "8b1dba5bb5e95e8e444acf5c49394516", "score": "0.65560263", "text": "function getTableDataFromJSON() {\n\n }", "title": "" }, { "docid": "4351a3dabe14adebb9cd42efc6c89cff", "score": "0.6530921", "text": "constructor (json) {\n\t\tthis.loadJSON(json);\n\t}", "title": "" }, { "docid": "f6f37a47d7279825b2e46fa706b31806", "score": "0.6480983", "text": "function loadJSON() {\n fetch(\"https://petlatkea.dk/2019/hogwarts/students.json\")\n .then(res => res.json())\n .then(myJSON => {\n studentJSON = myJSON;\n prepareObjects();\n });\n}", "title": "" }, { "docid": "6e83bf3f09ef007481968215ea09b1be", "score": "0.63754904", "text": "function loadData() {\n loadJson('am');\n loadJson('pm');\n}", "title": "" }, { "docid": "3558f91262d15052ec5a9f3b38332d74", "score": "0.6311062", "text": "function loadJSON(data, next) {\n var err, obj;\n\n try {\n\tobj = JSON.parse(data);\n } catch (x) {\n\terr = x;\n }\n next(err, obj);\n}", "title": "" }, { "docid": "e916446b40dba2dce53c55c75ec48858", "score": "0.6281885", "text": "loadJson() {\n return readFile(this.jsonPath, { encoding: 'utf8' }).then((jsonText) => {\n this.jsonText = jsonText;\n return (this.jsonData = JSON.parse(jsonText));\n });\n }", "title": "" }, { "docid": "9eb68b2bb643297fb7544527f0bb08ca", "score": "0.62111896", "text": "function loadData(){\n $.ajax({\n type: \"GET\",\n url: \"data/tuition.json\",\n dataType: \"json\",\n success: parseData\n });\n}", "title": "" }, { "docid": "533c38801f8d80935e130d9bc1fa36c9", "score": "0.61931896", "text": "function loadDataSourceExample() {\n var fileInput = document.getElementById(\"upload\");\n if (fileInput) {\n var file = fileInput.files[0];\n if (file.name.search(/.json/) !== -1) {\n var reader = new FileReader();\n reader.readAsText(file, \"UTF-8\");\n\n reader.onload = function (evt) {\n MappingManager.createMappingCanvasFromExample(file.name, JSON.parse(evt.target.result));\n };\n\n } else {\n alert(\"Not a json file\");\n }\n }\n }", "title": "" }, { "docid": "b48bfb8a36bf296d834557a23647e3e0", "score": "0.61784345", "text": "async function importJsons() {\n try {\n let projectResult = await fetch(\"https://pm-project-frontend.github.io/jsons/projects.json\");\n let issueResult = await fetch(\"https://pm-project-frontend.github.io/jsons/issues.json\");\n let userResult = await fetch(\"https://pm-project-frontend.github.io/jsons/users.json\");\n let fForLocalProjects = await projectResult.json();\n let fForLocalIssues = await issueResult.json();\n let fForLocalUsers = await userResult.json();\n localStorage.setItem(\"users\", JSON.stringify(fForLocalUsers));\n localStorage.setItem(\"projects\", JSON.stringify(fForLocalProjects));\n localStorage.setItem(\"issues\", JSON.stringify(fForLocalIssues));\n getResults();\n } catch (error) {\n throw new Error(\"There has been an error receiving the files. Please try again later.\")\n }\n}", "title": "" }, { "docid": "81d616f51a7d7fe04874f68e6f1e859f", "score": "0.6177274", "text": "function uploadJSON(){\n\t\t var x = document.getElementById(\"import\");\n\t\t\tvar txt = \"\";\n\t\t\tif ('files' in x) {\n\t\t\t\tif (x.files.length == 0) {\n\t\t\t\t\t//nessun file caricato\n\t\t\t\t\t//console.log(\"IMPORT JSON, NO FILE\");\n\t\t\t\t} else {\n\t\t\t\t\t//file caricati\n\t\t\t\t\t//console.log(\"IMPORT JSON, DONE\");\n\t\t\t\t\t//ogni volta che arriva un nuovo file lo applico al JSON EDITOR (overwrite)\n\t\t\t\t\tvar file = x.files[0];\n\t\t\t\t\tvar jsonFile = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif (file.type.match('\\.json$')) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//console.log(\"json file uploaded.\"); \n\t\t\t\t\t\t\n\t\t\t\t\t\t var reader = new FileReader();\n\n\t\t\t\t\t\t reader.onload = function(e) {\n\t\t\t\t\t\t\t jsonFile = reader.result;\n\t\t\t\t\t\t\t sessionStorage.setItem(\"jsonSink\", jsonFile);\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t reader.readAsText(file); \n\t\t\t\t\t\t location.reload();\n\t\t\t\t\t\t \n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\t alert(\"File not supported!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tif (x.value == \"\") {\n\t\t\t\t\t//nessun file caricato\n\t\t\t\t\tconsole.log(\"IMPORT JSON, NO FILE\");\n\t\t\t\t} else {\n\t\t\t\t\t//file non supportato dal browser \n\t\t\t\t\tconsole.log(\"IMPORT JSON, FILE NOT SUPPORTED\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "80308b8e4e30645b0eb2a24b8d088fbf", "score": "0.6173941", "text": "function importData() {\n d3.json(\"./Data/bubbleData.json\").then(function(data) {\n wordCloud(data);\n })\n}", "title": "" }, { "docid": "128ffc97959972cccfc05ed0b049d8a4", "score": "0.61430043", "text": "async function loadJSON(){\n await Promise.all([fetch(\"https://petlatkea.dk/2021/hogwarts/students.json\")\n .then((res) => res.json()), fetch(\"https://petlatkea.dk/2021/hogwarts/families.json\")\n .then((res) => res.json())])\n .then((jsonData) => {\n // When loaded, prepare data objects\n prepareObjects(jsonData[0], jsonData[1]); \n });\n // const respons = await fetch(\"https://petlatkea.dk/2021/hogwarts/students.json\");\n // const jsonData = await respons.json();\n\n}", "title": "" }, { "docid": "176d6b1e6e4879d75c3c536c28220729", "score": "0.61309415", "text": "async function loadJSON(path) {\n\tlet response = await fetch(path);\n\tlet df = await response.json();\n\treturn df;\n}", "title": "" }, { "docid": "dd9c203e53fefe91481a54548ad50727", "score": "0.61084276", "text": "function loadJSON(fileUrl) {\n // Declare our xhr object\n const xhr = new XMLHttpRequest();\n // Set up the callback for our successful request\n xhr.onload = function() {\n // Parse the JSON\n arry = JSON.parse(xhr.responseText);\n console.log(arry);\n renderAll(arry);\n };\n // Open the request\n xhr.open('GET', fileUrl, true);\n // Send the request\n xhr.send();\n}", "title": "" }, { "docid": "c48b25b542498882ac68352c3e67d39c", "score": "0.6107773", "text": "function loadJSON(file){\n let fs = require('fs');\n let obj = JSON.parse(fs.readFileSync(file + '.json', 'utf8'));\n return obj;\n }", "title": "" }, { "docid": "bc310cd48c18a4a7fb83cb4e20da6df3", "score": "0.6099129", "text": "function ClickImportar() {\n var input = Dom(\"json-personagem\");\n gEntradas = JSON.parse(input.value);\n CorrigePericias();\n AtualizaGeralSemLerEntradas();\n Mensagem(Traduz('Personagem') + ' \"' + gPersonagem.nome + '\" ' + Traduz('importado com sucesso') + '.');\n}", "title": "" }, { "docid": "e47b799bf158731a4a459bc95d0811d0", "score": "0.60918415", "text": "function loadJSON() {\r\n $.getJSON(/nodeshift/, function (data) {\r\n glob_data = data;\r\n });\r\n }", "title": "" }, { "docid": "4e97fa72a095d6bb3c086d2fe472279e", "score": "0.60790783", "text": "function IMPORTJSON(url,xpath){ \n try{\n // /rates/EUR\n var res = UrlFetchApp.fetch(url);\n var content = res.getContentText();\n var json = JSON.parse(content);\n \n var patharray = xpath.split(\"/\");\n //Logger.log(patharray);\n \n for(var i=0;i<patharray.length;i++){\n json = json[patharray[i]];\n }\n \n //Logger.log(typeof(json));\n \n if(typeof(json) === \"undefined\"){\n return \"Node Not Available\";\n } else if(typeof(json) === \"object\"){\n var tempArr = [];\n \n for(var obj in json){\n tempArr.push([obj,json[obj]]);\n }\n return tempArr;\n } else if(typeof(json) !== \"object\") {\n return json;\n }\n }\n catch(err){\n return \"Error getting data\"; \n }\n \n}", "title": "" }, { "docid": "21a330a1e83b19bd039bb8fd742a8cec", "score": "0.606575", "text": "loadJSON(json) {\n\t\tjson = json === undefined ? {} : json;\n\t}", "title": "" }, { "docid": "33af37e3fdece6970bd751a0dfd12c8e", "score": "0.606243", "text": "async function hentJsonTal() {\n\n let jsonObjekt = await fetch(\"http://kea.jonascisum.dk/kea/eksamen-02/lerja/wordpress/wp-json/wp/v2/infografik\");\n\n //Tag jsonObjekt og lav det til Json\n\n indholdTal = await jsonObjekt.json();\n\n console.log(indholdTal);\n\n //start funktion insertTal\n\n insertTal();\n }", "title": "" }, { "docid": "ceb8b3d5b8f1e6a4e6e607b167a18c11", "score": "0.60495555", "text": "function getDataFromJSON() {\n\tfetch('../../employees.json')\n\t\t.then((result) => result.json())\n\t\t.then((data) => {\n\t\t\tdata.forEach((employee) => {\n\t\t\t\temployees.push(employee);\n\t\t\t});\n\t\t\tdocument.getElementById('Bystasjonen').click();\n\t\t});\n}", "title": "" }, { "docid": "d7bd462dbf4553ec2bbf2af8c57f84b2", "score": "0.60409904", "text": "function load() {\n m_data.load(\"b4w/obj/moto.json\", load_cb);\n}", "title": "" }, { "docid": "b211576409701c082a7948873194ac0b", "score": "0.6037236", "text": "imports(json) {\n\t\tlet mongo = json.mongo;\n\t\tlet promises = [];\n\t\tpromises.push(new MongoScopes(this.mongo).add(mongo.scope));\n\t\tpromises.push(this.importAllFromType(new MongoLocations(this.mongo), mongo.location));\n\t\tpromises.push(this.importAllFromType(new MongoPeriods(this.mongo), mongo.year));\n\t\tpromises.push(this.importAllFromType(new MongoThemes(this.mongo), mongo.theme));\n\t\tpromises.push(this.importAllFromType(new MongoTopics(this.mongo), mongo.topic));\n\t\tpromises.push(this.importAllFromType(new MongoAttributeSets(this.mongo), mongo.attributeset));\n\t\tpromises.push(this.importAllFromType(new MongoAttributes(this.mongo), mongo.attribute));\n\t\tpromises.push(this.importAllFromType(new MongoLayerTemplates(this.mongo), mongo.areatemplate));\n\t\tpromises.push(this.importAllFromType(new MongoLayerReferences(this.mongo), mongo.layerref));\n\t\tpromises.push(this.importAllFromType(new MongoAnalysis(this.mongo), mongo.analysis));\n\t\tpromises.push(this.importAllFromType(new MongoPerformedAnalysis(this.mongo), mongo.performedanalysis));\n\n\t\tpromises.push(this.pool.pool().query(json.postgresql.sql));\n\t\t// TODO: Also create the data views on top of the data.\n\n\t\treturn Promise.all(promises);\n\n\t}", "title": "" }, { "docid": "273992f8106e3fcdf9718442e9f4db63", "score": "0.6021344", "text": "function importFile(keyWord){\n let URL= \"../acme/js/acme.json\";\n fetch (URL)\n .then(response => response.json())\n .then(function (data) {\n console.log('Json object from getCode function:');\n console.log(data);\n const acmeInfo ={}; //Create and empty object\n \n let x;\n for (x in data){\n acmeInfo[x+\"Name\"]= data[x].name;\n acmeInfo[x+\"Path\"]= data[x].path;\n acmeInfo[x+\"Description\"]= data[x].description;\n acmeInfo[x+\"Manufacturer\"]= data[x].manufacturer;\n acmeInfo[x+\"Price\"]= data[x].price;\n acmeInfo[x+\"Reviews\"]=data[x].reviews;\n }\n\n buildContent(acmeInfo, keyWord);\n console.log(acmeInfo);\n\n })\n .catch(error => console.log('There was a getCode error: ', error))\n}", "title": "" }, { "docid": "e65a0b23415d20dc31988885950156ff", "score": "0.6013324", "text": "function loadJson(url) {\n $.ajax({\n url: url,\n dataType: 'json',\n success: function(data) {\n setJsonData(data);\n },\n error: function(e) {\n console.log(e);\n }\n });\n }", "title": "" }, { "docid": "372ff1b735751d5fe4dcda6c73effcd1", "score": "0.599446", "text": "async function loadJSON(){\n try {\n let url = document.location.pathname.replace('index','items').replace('html','json')\n if(document.location.href.startsWith('file')){\n console.log('what');\n url = \"file://\"+url\n }\n \n itemsPortfolio = filterByQueryCategory(globalItems)\n console.log(itemsPortfolio);\n itemsPortfolio = filterByQuery(itemsPortfolio);\n currentPage = 0\n let itemsPaginated = paginatorItem(itemsPortfolio);\n buildItems(itemsPaginated)\n } catch (error) {\n console.error('errrr ',JSON.stringify(error), error.message)\n }\n}", "title": "" }, { "docid": "db412321b1cb232131187d06002141e8", "score": "0.59813356", "text": "function loadData() {\n var jsonRovereto = httpGet(\"https://os.smartcommunitylab.it/core.mobility/bikesharing/rovereto\");\n dataRovereto = JSON.parse(jsonRovereto);\n var jsonPergine = httpGet(\"https://os.smartcommunitylab.it/core.mobility/bikesharing/pergine_valsugana\");\n dataPergine = JSON.parse(jsonPergine);\n var jsonTrento = httpGet(\"https://os.smartcommunitylab.it/core.mobility/bikesharing/trento\");\n dataTrento = JSON.parse(jsonTrento);\n //console.log(dataTrento);\n}", "title": "" }, { "docid": "2c3143ef2ec8fbd625d8adc3e0cbf984", "score": "0.59766775", "text": "function loadJSON(fnJSON,callback) { \n\n var xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', fnJSON, true); // Replace 'my_data' with the path to your file\n xobj.onreadystatechange = function () {\n if (xobj.readyState == 4 && xobj.status == \"200\") {\n // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode\n callback( JSON.parse(xobj.responseText) );\n }\n };\n xobj.send(null);\n }", "title": "" }, { "docid": "2a841b0bcf8c9824d42c8ab97d55a55f", "score": "0.5972257", "text": "function loadJSONs( url, which ){\n var AJAX_req = new XMLHttpRequest();\n AJAX_req.overrideMimeType(\"application/json\");\n AJAX_req.open('GET',url,false);\n AJAX_req.onreadystatechange = function(){\n if(AJAX_req.readyState==4 && AJAX_req.status==\"200\"){\n if( which == 0){\n pre = JSON.parse( AJAX_req.responseText ); \n }\n else{\n post = JSON.parse( AJAX_req.responseText );\n }\n }\n };\n\n AJAX_req.send();\n}", "title": "" }, { "docid": "ca05e4f2471a2c7c3449aafa0e6d8323", "score": "0.5965795", "text": "loadJSON(path, success, error) {\n let xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function()\n {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n if (xhr.status === 200) {\n if (success)\n success(JSON.parse(xhr.responseText));\n } else {\n if (error)\n error(xhr);\n }\n }\n };\n xhr.open(\"GET\", path, true);\n xhr.send();\n }", "title": "" }, { "docid": "721649fbdd353c2a8bc5b0ef1f1ade93", "score": "0.59611493", "text": "function loadActivities(){\n var activitiesJSONified = JSON.parse(Activities); //read the JSON file\n for (var i=0; i<activitiesJSONified.length; i++){\n activityBucket.push(new Activity( //process contents through object constructor and push to array.\n activitiesJSONified[i].title,\n activitiesJSONified[i].image,\n activitiesJSONified[i].shortContent\n ));\n }\n}", "title": "" }, { "docid": "69572343990d130991e455cfbd8234f4", "score": "0.5949948", "text": "function getJson() {\n fetch(\"sources.json\")\n .then(response => response.json())\n .then(jsonDATA => {\n\n allTruths = jsonDATA;\n\n console.log(\"Non manipulation Json DATA: \",allTruths);\n \n createPrototype(allTruths);\n\n });\n}", "title": "" }, { "docid": "ebaac6d454f24264069217d99810c51b", "score": "0.5947147", "text": "function parseJSON () {\n var process = new Process (packagesfile);\n packages = process.parse ();\n packages = packages.packages;\n }", "title": "" }, { "docid": "6c78a4eed2ef89d33a528aafb47f0b24", "score": "0.59240985", "text": "function getJSON() {\n let xhr = new XMLHttpRequest();\n\n xhr.addEventListener('load', dataParser);\n xhr.open('GET', 'form.json', true);\n xhr.send();\n}", "title": "" }, { "docid": "4746cad6fa0b9580bed89fb95949d9a8", "score": "0.5912243", "text": "function loadJson() {\n let file_loader = new THREE.FileLoader();\n file_loader.load(jsonPath,\n function (data) {\n font_json = JSON.parse(data);\n loadImg();\n })\n }", "title": "" }, { "docid": "66825a97cdd9ed9094e8886e657cd93e", "score": "0.58947027", "text": "function initData(){\n fetch('./FishEyeData.json')\n .then(res => res.json())\n .then( function (datas) {\n for( data of datas.photographers){\n allPhotographers.push(data);\n }\n }) \n .catch(error => alert (\"Erreur : \" + error));\n}", "title": "" }, { "docid": "adc06df017be5fe77569e7c97e190e0d", "score": "0.5894195", "text": "function importJsonFile(filePath) {\n return file.read(filePath).then(textFileData => {\n return JSON.parse(textFileData);\n });\n}", "title": "" }, { "docid": "ba2c74265f24bdaa02d9eec7586c42ea", "score": "0.5890178", "text": "async function hentJson() {\n\tconsole.log(\"hentJson\");\n\n\t//\tHent json-data wordpress content\n\tlet jsonData = await fetch(\"http://imkennykennedy.com/kea/2_semester/tema_eksamen/wordpress/wp-json/wp/v2/pages/654\");\n\n\tlet side = await jsonData.json();\n\n\t//\ttest json-import\n\tconsole.log(side);\n\n\tlet dest = document.querySelector(\"[data-container]\");\n\n\t//\tindsæt i DOM\n\n\t//\tdest.querySelector(\"[data-overskrift]\").textContent = side.acf.overskrift;\n\n\thentJsonProdukter();\n}", "title": "" }, { "docid": "b372f5a6944514490763a66974027bc3", "score": "0.5873614", "text": "loadFromJson(data) {\n // TODO: Load this object from the data\n const parsedState = JSON.parse(data);\n parsedState.categories.forEach((category, index) => {\n this.setCategory(category, index);\n });\n parsedState.toDoList.forEach(todo => {\n if (todo.text) {\n this.pushTodo(new Note(todo.text, todo.completed));\n } else if (todo.title) {\n this.pushTodo(new Task(todo.title, todo.categoryIndex, todo.description, todo.completed));\n }\n });\n }", "title": "" }, { "docid": "75218c10d6300b702d7b43a6099dfff4", "score": "0.58548665", "text": "getJson() {\n\n // create the new XMLHttpRequest\n var xhr = new XMLHttpRequest();\n\n // setting up the request\n xhr.open('GET', JSON_PATH, false);\n\n // when the JSON loads, parse it into an object and pass into this.parseEvents()\n xhr.onload = () => {\n this.events = this.parseEvents(JSON.parse(xhr.responseText));\n };\n\n // send the request\n xhr.send();\n\n }", "title": "" }, { "docid": "1715aac3136bc2316a2a5d2e74e7f931", "score": "0.58461213", "text": "function getJSONData(){\n\t$.getJSON(\"json/infc-projects.json\", function(json1) {\n\n\tfor (i = 0; i < json1.length; i++) {\n\t\tmarkers1.push(json1[i]);\n\t\taddMarker(markers1[i]);\n\t}\n\n\t});\t\n}", "title": "" }, { "docid": "262feab8d349bdf72e6b3e7f909f6756", "score": "0.5845584", "text": "function autoFillData() {\n\t\t// Retrieve JSON OBJECT from json.js //\n\t\t// Store the JSON OBJECT to local storage //\n\t\tfor(var n in json) {\n\t\tvar id = Math.floor(Math.random()*10001);\n\t\tlocalStorage.setItem(id, JSON.stringify(json[n]));\n\t\t}\n\t}", "title": "" }, { "docid": "8e170c32d142894e615bec42f4a53b06", "score": "0.5838588", "text": "async function loadJSON(path) { \n const content = await getDataFromServer(path).catch(e => e);\n // demo: catch return null or error\n console.log('Loaded json ', content);\n\n if(content){\n content.items.forEach(x => console.log('x.Price ', x.Price));\n \n const li = '<li click=\"onLicClick()\">{{x.Names.ro}} <br/> {{formatPrice(x.Price)}}</li>'\n }\n}", "title": "" }, { "docid": "34fccc92a7a92d794494440606860804", "score": "0.58372986", "text": "function loadJSON(file) {\n var request = new XMLHttpRequest();\n request.open(\"GET\", file, false);\n request.send(null)\n return JSON.parse(request.responseText);\n}", "title": "" }, { "docid": "4669c03a1fe073fda89832847943a8d9", "score": "0.5833291", "text": "function jsonData() {\n getJSONP(jsonLink, function(data) {\n fillList(data);\n });\n}", "title": "" }, { "docid": "12feefbf00c078e38e6ec46a4036d993", "score": "0.5831238", "text": "function load() {\n m_data.load(APP_ASSETS_PATH + \"ded_moroz_06.json\", load_cb, preloader_cb);\n}", "title": "" }, { "docid": "51e8b1fc6201bb2c007b81287193b252", "score": "0.58295035", "text": "function preload() {\n //load json file\n data = loadJSON(\"./content.json\");\n}", "title": "" }, { "docid": "7f51d0a44ee29947c35122f4903e6724", "score": "0.58288515", "text": "function loadJSON(callback) {\n var xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', props.imgURL.replace(/.png|.jpg|.jpeg|.gif/, \".json\"), true); // Replace 'my_data' with the path to your file\n xobj.onreadystatechange = function () {\n if (xobj.readyState == 4 && xobj.status == \"200\") {\n // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode\n callback(xobj.responseText);\n }\n };\n xobj.send(null);\n }", "title": "" }, { "docid": "7b114581d8113a3d673206855b2de911", "score": "0.58286726", "text": "function loadJsonData() {\n $.ajax({\n url: 'results.json',\n type: 'POST',\n dataType : 'json',\n async: false,\n success: function(data){\n getDataJson = data;\n }\n });\n }", "title": "" }, { "docid": "726a4ed3c661b5199590c6880e0c2786", "score": "0.58168274", "text": "importJson(toImportJson) { \n if(!(\"investments\" in toImportJson))\n return false;\n\n // Look for the investments key, put it as investment objects\n var tempInvestments = {};\n var investmentsJson = toImportJson[\"investments\"];\n\n for(var i = 0; i < investmentsJson.length; i++) {\n try {\n var investment = Investment.jsonToObject(investmentsJson[i]);\n tempInvestments[investment.properties[\"projectId\"]] = investment;\n } catch(err) {\n console.log(err);\n return false;\n }\n }\n\n this.investments = tempInvestments;\n this.persist();\n return true;\n }", "title": "" }, { "docid": "7ef34d50a13bf83f9230f228db5f7934", "score": "0.5810259", "text": "function getJsonData() {\n //Store JSON Object into Local Storage.\n for (var n in json) {\n var id = Math.floor(Math.random()*10000001);\n localStorage.setItem(id, JSON.stringify(json[n]));\n }\n }", "title": "" }, { "docid": "045451e94b1dc481cdbff00bb60556c1", "score": "0.5809383", "text": "function Getdata() {\n $.ajax({\n type: \"GET\",\n url: \"https://raw.githubusercontent.com/jacky637006/jacky637006/master/HW/lol_js.json\",\n dataType: \"json\",\n success: function (response) {\n lolData = response;\n for (let i = 0; i < lolData.length; i++) {\n Importdata(i, lolData[i].icon, lolData[i].id, lolData[i].id, lolData[i].stats.hp,lolData[i].stats.attackdamage,lolData[i].stats.mp,lolData[i].stats.mpperlevel\n ,lolData[i].stats.movespeed,lolData[i].stats.attackrange);\n\n }\n }\n });\n}", "title": "" }, { "docid": "4942b243846bff506d3061127f125145", "score": "0.58086735", "text": "function loadJSON(callback) {\n let xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', filePath, true);\n xobj.onreadystatechange = function() {\n if (xobj.readyState == 4 && xobj.status == \"200\") {\n callback(xobj.responseText);\n }\n };\n xobj.send(null);\n}", "title": "" }, { "docid": "cbba69771e9ef3eb89218355410cefa0", "score": "0.5807736", "text": "function loadData(){ \n xhrMyData = new XMLHttpRequest(); \n xhrMyData.open(\"GET\",\"Scripts/paragraphs.json\",true); \n xhrMyData.send(null); \n xhrMyData.addEventListener(\"readystatechange\",readData); \n }", "title": "" }, { "docid": "6368a1683e42cbb7414c73ebf1c3046b", "score": "0.5781611", "text": "loadJSON(path, success, error) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function()\n {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n if (xhr.status === 200) {\n if (success)\n success(JSON.parse(xhr.responseText));\n } else {\n if (error)\n error(xhr);\n }\n }\n };\n xhr.open(\"GET\", path, true);\n xhr.send();\n }", "title": "" }, { "docid": "02fafbfebfe245ae565726397c53529a", "score": "0.5779038", "text": "extractData() {\n debug('Extracting data from JSON content ...');\n const { info } = this.data;\n\n if (!info) {\n throw new Error(\n 'Unable to find \"info\" field, is it conform to v2.1 postman export ?'\n );\n }\n\n this.name = info.name;\n this.description = info.description || '';\n\n if (!this.name) {\n throw new Error('Provided JSON miss a \"name\" property');\n }\n }", "title": "" }, { "docid": "729d0beff828fe097c908179fc9ebdb9", "score": "0.57789993", "text": "function loadNotesFromJSON(data) {\n\t\ttuneJSON = data;\n\t\tloadCanvas();\n\t}", "title": "" }, { "docid": "a536885fd3624b44f9fdfdbd3bc6d7d3", "score": "0.57763034", "text": "function load() {\n loadJSONfromServer()\n .then(function (result) {\n console.log('Laden erfolgreich!', result);\n myJSON = JSON.parse(result);\n for (let i = 0; i < myJSON.length; i++) {\n docsList[i] = myJSON[i];\n }\n displayDocsImages();\n Profiles();\n })\n .catch(function (error) {\n console.error('Fehler beim laden!', error);\n });\n}", "title": "" }, { "docid": "64aa4e3ec0e4c2f09d7c2c42b9b11faa", "score": "0.5775804", "text": "function getData(ID){\r\n var filename = \"./src/\"+ID+\".json\";\r\n var data = JSON.parse(fs.readFileSync(filename));\r\n return data;\r\n}", "title": "" }, { "docid": "3f9007927a097defca791bcba6021253", "score": "0.57710755", "text": "function loadJSON(callback) {\n\n let xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"../\");\n xobj.open('GET', 'goods.json', true);\n xobj.onreadystatechange = function () {\n if (xobj.readyState == 4 && xobj.status == \"200\") {\n // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode\n callback(xobj.responseText);\n }\n };\n xobj.send(null);\n}", "title": "" }, { "docid": "a608ab0211bb62a6f24a1608325fef1f", "score": "0.57708406", "text": "function getJSON(file){\n reader.onload = function (file) {\n var obj = JSON.parse(file.target.result);\n for(var i = 0; i < obj.Result.length; i++)\n appendToScreen(obj.Result[i].title, obj.Result[i].url, obj.Result[i].description);\n };\n reader.readAsText(file);\n}", "title": "" }, { "docid": "f3c218bd6c3388afbc16117d1a8419f5", "score": "0.5765581", "text": "static async read() {\n let json = (await IO.parseFileJSON(Paths.FILE_SONGS)).list;\n let l = json.length;\n this.list = new Array(l);\n let i, j, m, n, jsonHash, k, jsonList, jsonSong, id, list, song;\n for (i = 0; i < l; i++) {\n jsonHash = json[i];\n k = jsonHash.k;\n jsonList = jsonHash.v;\n // Get the max ID\n m = jsonList.length;\n n = 0;\n for (j = 0; j < m; j++) {\n jsonSong = jsonList[j];\n id = jsonSong.id;\n if (id > n) {\n n = id;\n }\n }\n // Fill the songs list\n list = new Array(n + 1);\n for (j = 0; j < n + 1; j++) {\n jsonSong = jsonList[j];\n if (jsonSong) {\n id = jsonSong.id;\n song = new System.Song(jsonSong, k);\n if (k !== SongKind.Sound) {\n song.load();\n }\n if (id === -1) {\n id = 0;\n }\n list[id] = song;\n }\n }\n this.list[k] = list;\n }\n }", "title": "" }, { "docid": "7e06f5e6c5a7500577ec4bd261a2dda2", "score": "0.57629716", "text": "function jsonTransform() {\n\tconsole.log(\"in json function\");\n\t$.getJSON(\"ajax/WagPregeo.json\",function(data) {\n\t\t$.each(data,function(key, val) {\t\n\t\t\taddressArray.push({id: val.id, name: val.name,addresseng: val.addresseng, addresscn: val.addresscn});\n\t\t});\n\t\tinitializeGeo();\t\n\t});\n}", "title": "" }, { "docid": "ef8e004e1f70128a4c5642e9ec66d8d8", "score": "0.57592505", "text": "function load(){\n //Lê o arquivo e transforma de volta em um objeto js\n const fileBuffer = fs.readFileSync(contentFilePath, 'utf-8')\n const contentJson = JSON.parse(fileBuffer)\n return contentJson\n}", "title": "" }, { "docid": "c1e2f773e7def3d566161bfed0f4690b", "score": "0.57580984", "text": "function dataLoad()\n{\n try{\n var writ = fs.readFileSync('note.json')\n var buff = writ.toString();\n return JSON.parse(buff);\n }\n catch(e)\n {\n return [];\n }\n}", "title": "" }, { "docid": "b1e07934c189e3648f89eed97e9c8a5b", "score": "0.57538116", "text": "function importContent(obj, opts) {\n var dataset, content, fileFmt, data;\n opts = opts || {};\n if (obj.json) {\n data = importJSON(obj.json, opts);\n fileFmt = data.format;\n dataset = data.dataset;\n cleanPathsAfterImport(dataset, opts);\n\n } else if (obj.text) {\n fileFmt = 'dsv';\n data = obj.text;\n dataset = importDelim2(data, opts);\n\n } else if (obj.shp) {\n fileFmt = 'shapefile';\n data = obj.shp;\n dataset = importShapefile(obj, opts);\n cleanPathsAfterImport(dataset, opts);\n\n } else if (obj.dbf) {\n fileFmt = 'dbf';\n data = obj.dbf;\n dataset = importDbf(obj, opts);\n\n } else if (obj.prj) {\n // added for -proj command source\n fileFmt = 'prj';\n data = obj.prj;\n dataset = {layers: [], info: {prj: data.content}};\n\n } else if (obj.kml) {\n fileFmt = 'kml';\n data = obj.kml;\n dataset = importKML(data.content, opts);\n }\n\n if (!dataset) {\n stop(\"Missing an expected input type\");\n }\n\n // Convert to topological format, if needed\n if (dataset.arcs && !opts.no_topology && fileFmt != 'topojson') {\n buildTopology(dataset);\n }\n\n // Use file basename for layer name, except TopoJSON, which uses object names\n if (fileFmt != 'topojson') {\n dataset.layers.forEach(function(lyr) {\n if (!lyr.name) {\n lyr.name = filenameToLayerName(data.filename || '');\n }\n });\n }\n\n // Add input filename and format to the dataset's 'info' object\n // (this is useful when exporting if format or name has not been specified.)\n if (data.filename) {\n dataset.info.input_files = [data.filename];\n }\n dataset.info.input_formats = [fileFmt];\n return dataset;\n }", "title": "" }, { "docid": "64c6e4d5b8b4aab2153b44822c772de8", "score": "0.5749146", "text": "preloadJson()\n {\n currentScene.load.json('dialogues', 'data/SingleDialogues.json');\n currentScene.load.json('notes', 'data/Notes.json');\n }", "title": "" }, { "docid": "a4f6ddd93d7e2017b08761cf169627aa", "score": "0.57424396", "text": "function loadJSON(json_file_url, callback) {\n //console.log(json_file_url);\n var xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', json_file_url, true); // Replace 'my_data' with the path to your file\n xobj.onreadystatechange = function() {\n if (xobj.readyState == 4 && xobj.status == \"200\") {\n // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode\n callback(xobj.responseText);\n\n main();\n }\n };\n xobj.send(null);\n}", "title": "" }, { "docid": "202984c2943cd9f4b186e1745df607b8", "score": "0.57373565", "text": "function loadData() {\n $.getJSON(\"../Mini-project-2-data.json\", function(json) {\n console.log(json); // this will show the info it in firebug console\n });\n}", "title": "" }, { "docid": "55212843655b4743d9cb7d72739bfe51", "score": "0.5725824", "text": "function getJSONfiles() {\n let urlStudents = \"https://petlatkea.dk/2021/hogwarts/students.json\";\n let urlFamilies = \"https://petlatkea.dk/2021/hogwarts/families.json\";\n\n function loadJSON() {\n fetch(urlStudents)\n .then((response) => response.json())\n .then((jsonData) => {\n prepareObjects(jsonData);\n });\n }\n fetch(urlFamilies)\n .then((response) => response.json())\n .then((jsonData) => {\n bloodInfo = jsonData;\n loadJSON();\n });\n}", "title": "" }, { "docid": "7001de40503ccde4a56707accc745800", "score": "0.5718676", "text": "getActualJSON(){\n return require(\"../database/items.json\");\n }", "title": "" }, { "docid": "a5ea1b137a9fe81cb3a8f3c4e5328c32", "score": "0.5707913", "text": "function loadJson(url) {\n return fetch(url).then(response => response.json());\n}", "title": "" }, { "docid": "e4a63fbcc48cd6dbb50b485c4f5c20d7", "score": "0.57042664", "text": "function loadJSON (path) {\n return new Promise((resolve, reject) => {\n let xhr = new XMLHttpRequest();\n xhr.overrideMimeType('application/json');\n xhr.open('GET', path, true);\n xhr.onload = function () {\n if (xhr.status == '200') {\n resolve(JSON.parse(xhr.responseText));\n } else {\n reject(xhr.statusText);\n }\n }\n xhr.onerror = () => reject(xhr.statusText);\n xhr.send();\n });\n}", "title": "" }, { "docid": "0be3908208ba7f62c72adbbd7c3d4eb5", "score": "0.57022977", "text": "function autoFillData() {\n //the actual JSON obj data required for this to work is coming for our json.js file which is loaded from out HTML\n //Store the JSON obj into local storage\n for(var n in json){\n var id = Math.floor(Math.random()*1000001);\n localStorage.setItem(id, JSON.stringify(json[n]));\n }\n }", "title": "" }, { "docid": "7291461cce386ade8c31d13a0b85eaf7", "score": "0.569754", "text": "function cargarJSON() {\n // FetchAPI usando Promises\n fetch( 'empleados.json' ) // Se conecta a los datos\n .then( response => response .json() ) // Recibe la respuesta\n .then( data => { // Coloca los datos obtenidos en el DOM\n let html = '<ul>'; // Crea un \"Template\"\n\n console .log( data );\n\n // Recorre el 'Array' de objetos empleado\n data .forEach( empleado => {\n // Agrega los datos al Template\n html += `\n <li>${ empleado .nombre } - <b> ${ empleado .puesto } </b></li>\n `;\n });\n\n html += '</ul>';\n document .getElementById( 'resultado' ) .innerHTML = html; // Coloca los datos obtenidos en el DOM\n\n }) .catch( error => console .log( 'ERROR', error ) ); // Captura los ERRORES\n}", "title": "" }, { "docid": "c4aa808ad2614cc77819a59425029a69", "score": "0.5693853", "text": "async function getjson() {\n let arr = await require('./foodOrginal.json').LivsmedelDataset.LivsmedelsLista[0].Livsmedel;\n return arr\n}", "title": "" }, { "docid": "39e9124471d05d8ccc0262c2339c12e1", "score": "0.56928563", "text": "function load_teams(){ //Load the Teams list to the teams object\n\tvar teams = require(\"./prof_walnut/teams.json\");\n}", "title": "" }, { "docid": "ad359e4214b6de9ecfa927ce79e1f63a", "score": "0.5688175", "text": "function ImportToDatabase() {\n/* connect to database*/ \nvar valuesAsList = parseJsonToPostgreValuePairs(booksAsJsonArray);\n\n\n}", "title": "" }, { "docid": "6be211d6b504707ebe018894a82756f2", "score": "0.56866205", "text": "function traerDatos(){\r\n\t\tconst xhttp = new XMLHttpRequest();\r\n\t\txhttp.open('GET','datos.json',true);\r\n\t\txhttp.send();\r\n\t\t xhttp.onreadystatechange = function(){ \t\r\n\t\t\tif(this.readyState == 4 && this.status ==200){\r\n\t\t\t\tdatos = JSON.parse(this.responseText);\r\n\t\t\t}\r\n\t\t }\r\n\t}", "title": "" }, { "docid": "2e65437852acffd1d35a9171ab1297a8", "score": "0.5686313", "text": "function autoFillData(){\n\t\t//The actual JSON object data required for this to work comes from our json.js file which is loaded from our html page.\n\t\t//Store the JSON object into Local Storage.\n\t\tfor(var n in json){\n\t\t\tvar id = Math.floor(Math.random()*100000001);\n\t\t\tlocalStorage.setItem(id, JSON.stringify(json[n]));\n\t\t}\n\t}", "title": "" }, { "docid": "82a98fc46de2e52d9c4931e9a0d89571", "score": "0.5684528", "text": "function parseJson(json){\r\n eval('var data =' + json);\r\n return data;\r\n}", "title": "" }, { "docid": "5c533265009cdb78c862512cf0c0a928", "score": "0.56836224", "text": "function loadJSON(file, callback) {\n var xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', 'https://www.mocky.io/v2/5da9b4023100000e004e0b21', true);\n xobj.onreadystatechange = function() {\n if (xobj.readyState == 4 && xobj.status == \"200\") {\n callback(xobj.responseText);\n }\n };\n xobj.send(null);\n }", "title": "" }, { "docid": "80d13b240528d5b4ec7606c8b01e5f02", "score": "0.56673807", "text": "function load() {\r\n\r\n\r\n fetch('zooland.json')\r\n .then(function(result){\r\n return result.json();\r\n })\r\n .then(function(data){\r\n createZooland(data);\r\n });\r\n}", "title": "" }, { "docid": "6556b74a6781caca5b505115413604a6", "score": "0.56620973", "text": "function loadJSON(callback) {\n const xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', './seats.json', true);\n xobj.onreadystatechange = function () {\n if (xobj.readyState === 4 && xobj.status === 200) {\n data = JSON.parse(xobj.responseText).data;\n new SeatLayout(document.getElementById('seat-layout'));\n }\n };\n xobj.send(null);\n}", "title": "" }, { "docid": "3f29fe1404a8a8e0ba76faec83e2d2c6", "score": "0.5661597", "text": "function autoFillData(){\n\t\t//The actual JSON OBJECT data required for this to work is coming from our json.js file, which is laoded from our HTML page\n\t\t//Store the JSON OBJECT into Local Storage.\n\t\tfor(var n in json){\n\t\t\tvar id = Math.floor(Math.random()*9999999);\n\t\t\tlocalStorage.setItem(id, JSON.stringify(json[n]));\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "c4a2ff3cc49f3c0d35b269a2773cdd87", "score": "0.5660415", "text": "function autoFillData(){\n\t\t//The actual JSON OBJECT data required for this to work is coming from our json.js file which is loaded from our HTML page.\n\t\t//Store JSON OBJECT into local storage.\n\t\tfor(var n in json){\n\t\t\tvar id = Math.floor(Math.random()*100000001);\n\t\t\tlocalStorage.setItem(id, JSON.stringify(json[n]));\n\t\t}\n\t}", "title": "" }, { "docid": "69b54bb57c4ab6e9deee3180fc683eea", "score": "0.5650672", "text": "function importFromJSON() {\n\n\tvar jsonString = document.getElementById('htmlSource').value;\n\toutputMethod = outputMethods.JSON;\n\n\ttry{\n\t\tvar json = JSON.parse(jsonString);\n\t\tthisMagicItem = new MagicItem(json.name, json.levelModifier, json.flavorText, json.levelBonusCostArray, json.propertiesArray, json.powerArray, json.source);\n\n\t\tdocument.getElementById('itemName').value = (thisMagicItem.name || '');\n\t\tdocument.getElementById('itemLevelModifier').value = (thisMagicItem.levelModifier || '');\n\t\tdocument.getElementById('itemFlavorText').value = (thisMagicItem.flavorText || '');\n\t\tdocument.getElementById('sourceInput').value = (thisMagicItem.source || '');\n\t\t\n\t\t// Level Bonus Cost\n\t\tif(numberOfLevelBonusCostRows != thisMagicItem.levelBonusCostArray.length){\n\t\t\tfor(; numberOfLevelBonusCostRows < thisMagicItem.levelBonusCostArray.length-1;){\n\t\t\t\taddAdditionalLevelBonusCostRow();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tnumberOfLevelBonusCostRows = thisMagicItem.levelBonusCostArray.length - 1;\n\t\tfor(var x = 0; x < numberOfLevelBonusCostRows+1; x++){\n\t\t\t// Update each row with values\n\t\t\tdocument.getElementById('level-' + x).value = (thisMagicItem.levelBonusCostArray[x].level || '');\n\t\t\tdocument.getElementById('bonus-' + x).value = (thisMagicItem.levelBonusCostArray[x].bonus || '');\n\t\t\tdocument.getElementById('cost-' + x).value = (thisMagicItem.levelBonusCostArray[x].cost || '');\n\t\t}\n\t\tthisLevelBonusCostArray = thisMagicItem.levelBonusCostArray;\n\n\t\t// Properties\n\t\tif(numberOfPropertyRows != thisMagicItem.propertiesArray.length){\n\t\t\tfor(; numberOfPropertyRows < thisMagicItem.propertiesArray.length-1;){\n\t\t\t\taddAdditionalPropertyRow();\n\t\t\t}\n\t\t}\n\t\tnumberOfPropertyRows = thisMagicItem.propertiesArray.length - 1;\n\t\tfor(var x = 0; x < numberOfPropertyRows+1; x++){\n\t\t\tdocument.getElementById('propertyLabel-' + x).value = (thisMagicItem.propertiesArray[x].label || '');\n\t\t\tdocument.getElementById('propertyValue-' + x).value = (thisMagicItem.propertiesArray[x].value || '');\n\t\t}\n\t\tthisPropertyArray = thisMagicItem.propertiesArray;\n\n\n\t\t// Powers\n\t\tif(numberOfPowerRows != thisMagicItem.powerArray.length){\n\t\t\tfor(; numberOfPowerRows < thisMagicItem.powerArray.length-1;){\n\t\t\t\taddAdditionalPowerRow();\n\t\t\t}\t\n\t\t}\n\t\tnumberOfPowerRows = thisMagicItem.powerArray.length - 1;\n\t\tfor(var x = 0; x < numberOfPowerRows+1; x++){\n\t\t\tdocument.getElementById('powerFrequency-' + x).value = (thisMagicItem.powerArray[x].frequency || '');\n\t\t\tdocument.getElementById('powerTypes-' + x).value = (thisMagicItem.powerArray[x].types || '');\n\t\t\tdocument.getElementById('powerDescription-' + x).innerHTML = (thisMagicItem.powerArray[x].description || '');\n\t\t}\n\t\tthisPowerArray = thisMagicItem.powerArray;\n\t\t\n\t\tupdate(thisMagicItem);\n\t} catch(error) {\n\t\t// TODO: Find a clean way to present this error? Maybe a toast? That's more JS, but seems easiest. \n\t\t// Could also maybe store the JSON value entered, change the value to to the error, then change\n\t\t// back on click in? Or add a temp div over top of the text area with the error with a dismiss\n\t\t// on click.\n\t\tconsole.log(error);\n\t}\n}", "title": "" }, { "docid": "73bc5bda9a854130b1570c32e8e51194", "score": "0.56504315", "text": "function loadFromJSON(json, CMIElement) {\n if (!_self.isNotInitialized()) {\n console.error(\"loadFromJSON can only be called before the call to Initialize.\");\n return;\n }\n\n CMIElement = CMIElement || \"cmi\";\n\n for (var key in json) {\n if (json.hasOwnProperty(key) && json[key]) {\n var currentCMIElement = CMIElement + \".\" + key;\n var value = json[key];\n\n if (value[\"childArray\"]) {\n for (var i = 0; i < value[\"childArray\"].length; i++) {\n _self.loadFromJSON(value[\"childArray\"][i], currentCMIElement + \".\" + i);\n }\n } else if (value.constructor === Object) {\n _self.loadFromJSON(value, currentCMIElement);\n } else {\n setCMIValue(currentCMIElement, value);\n }\n }\n }\n }", "title": "" }, { "docid": "2a79eabde7f58a20f813ae47ec8e5860", "score": "0.5645681", "text": "function injestJSONFile() {\n var file = fs.readFileSync(dbPath, \"utf-8\");\n return JSON.parse(file);\n}", "title": "" }, { "docid": "b54475bb1857547d59d6a06497491e0f", "score": "0.5645259", "text": "function loadEnrollmentLineData(){\n $.ajax({\n type: \"GET\",\n url: \"data/enrollment-data.json\",\n dataType: \"json\",\n success: parseEnrollmentLineData\n })\n}", "title": "" }, { "docid": "33c07b8aa0f8a858c77df5a08a8d3376", "score": "0.5644707", "text": "function loadJSON(path, success, error) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n if (xhr.status === 200) {\n if (success) success(JSON.parse(xhr.responseText));\n } else {\n if (error) error(xhr);\n }\n }\n };\n xhr.open(\"GET\", path, true);\n xhr.send();\n }", "title": "" }, { "docid": "3027e0514831ef8cfeb068fc974627c6", "score": "0.5640366", "text": "function setJsonData() {\n\tvar files = ['dayclub','nightclub','service'];\n\n\t$.each(files, function(index, value) {\n \t\tconsole.log( value );\n\n\t\t$.getJSON('data/'+ value +'.json', function(json) {\n\t\t\tlocalStorage.setItem(value+'-data', JSON.stringify(json));\n\t\t\tvar retrievedObject = localStorage.getItem(value+'-data');\n\t\t\tconsole.log('retrievedObject: '+ value, JSON.parse(retrievedObject));\n\t\t});\n\t});\n}", "title": "" }, { "docid": "3e2cff212fcc7567ff2badfa747a6230", "score": "0.56387866", "text": "function loadJSON(path, success, error) {\n const xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n success(JSON.parse(xhr.responseText));\n } else {\n error(xhr);\n }\n }\n };\n xhr.open(\"GET\", path, true);\n xhr.send();\n}", "title": "" }, { "docid": "9396b54a80a4c9c0d2b485efcfd7fbff", "score": "0.56353736", "text": "function loadJSON(filename, callback) { \n\n var xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n // Replace 'my_data' with the path to your file\n xobj.open('GET', filename, true); \n xobj.onreadystatechange = function () {\n if (xobj.readyState == 4 && xobj.status == \"200\") {\n // Required use of an anonymous callback as .open will NOT\n // return a value but simply returns undefined in asynchronous mode\n callback(xobj.responseText);\n }\n };\n xobj.send(null); \n }", "title": "" }, { "docid": "cae541bea4dd480dca338a5a9992ab44", "score": "0.5633988", "text": "static locationInfoFromJSON (inFilename) {\n let data = fs.readFileSync(inFilename, 'utf8')\n let tmpLocationInfo = JSON.parse(data)\n return tmpLocationInfo\n }", "title": "" }, { "docid": "dea5533699de2d03431b8f040c822d81", "score": "0.56282365", "text": "initializeFromJSON(dataObject) {\n\n console.log('dataObject', dataObject);\n\n if(!dataObject) { return; }\n\n for(const stringifiedData of dataObject) {\n const fields = stringifiedData.split('-');\n\n const proteinId = fields[0];\n const start = parseInt(fields[1]);\n const end = parseInt(fields[2]);\n const color = fields[3];\n\n this.addProteinColorAnnotation({\n proteinId:proteinId,\n start:start,\n end:end,\n color:color\n });\n }\n }", "title": "" } ]
c0dfd21d95de223e4a2f8c6b3e010f22
Create and send request to website and get datastring as JS object. Convert date from Unix TimeStamp to String:
[ { "docid": "8f20c8ad56df83024547d86d6f2ae2f2", "score": "0.0", "text": "function convertUnixFrom(timestamp){\n let dt = new Date(timestamp*1000);\n let year = dt.getFullYear();\n let month = \"0\" + (dt.getMonth()+1);\n let date = \"0\" + dt.getDate();\n let hr = \"0\" + dt.getHours();\n let m = \"0\" + dt.getMinutes();\n let s = \"0\" + dt.getSeconds();\n let dateAsString = year + \"-\" + month.substr(-2) + \"-\" + date.substr(-2) + \" \" + hr.substr(-2) + ':' + m.substr(-2) + ':' + s.substr(-2);\n return dateAsString; // Result is Local Time according to browser;\n }", "title": "" } ]
[ { "docid": "8733c5c71d5e11985983906257fcab9b", "score": "0.622179", "text": "GetTimestsampedData(call, callback) {\n //obtaining full blown explicit date time \n let today = new Date();\n let date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();\n let time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n let dateTime = date+' '+time;\n\n //obtaining implicit time stamp\n let timeStamp = new Date().getTime();\n\n // set response to be sent by the server\n let response = call.request.name + \" \" + timeStamp;\n\n //sending a response from the server\n callback(null, {\n response\n });\n }", "title": "" }, { "docid": "2727870fe0a0204ed746b280e03df529", "score": "0.60079163", "text": "function getDateInfo(){\n let dateElement = document.getElementById('date');\n let dateString = dateElement.value + \"T00:00:00\"\n let todayDate = new Date();\n let tripDate = new Date(dateString);\n tripDate.setHours(todayDate.getHours())\n tripDate.setMinutes(todayDate.getMinutes())\n tripDate.setMilliseconds(todayDate.getMilliseconds())\n let difference = Math.round((tripDate - todayDate)/86400000)\n postData('http://localhost:3000/addDate', {today: todayDate, trip: tripDate, countdown: difference})\n}", "title": "" }, { "docid": "d2c310039ebd5d10109dc81aac8eb275", "score": "0.5910129", "text": "function getDataFromServer() {\n fetch(\"http://localhost:8080\")\n .then(function(response) {\n return response.json();\n })\n .then(function(myJson) {\n var date = new Date(myJson);\n setFormatServer(date);\n });\n}", "title": "" }, { "docid": "c7dfb524398bf86656aaf469a7e34d7f", "score": "0.5897103", "text": "function getTimestamp(req, res) {\n const dateString = req.params.date_string;\n let date;\n if (/\\d{5,}/.test(dateString)) {\n date = new Date(parseInt(dateString));\n } else {\n date = new Date(dateString);\n if (date.toString() === \"Invalid Date\") {\n return res.json({ \"error\": \"Invalid Date\" });\n }\n }\n return res.json({\n \"unix\": date.getTime(),\n \"utc\": date.toUTCString()\n });\n}", "title": "" }, { "docid": "079eadc6fe460e172d1eb77dc9136e0d", "score": "0.58724755", "text": "function putdate(data){\n\tif(data == null){\n\t\tresp = \"\";\n\t}else{\n\t\tvar quebra_data = data.split(\"-\");\n\t\tdata = quebra_data[0]+\"/\"+quebra_data[1]+\"/\"+quebra_data[2];\n\t\treturn data;\t\n\t}\n}", "title": "" }, { "docid": "a0b226375f30ec357eb1f762e7d70618", "score": "0.5806646", "text": "async function getTimestamp(){\n\tconst response = await fetch(`http://localhost:9292/api/get/timestamp`);\n\treturn response.json();\n}", "title": "" }, { "docid": "c828f36da89afc64b39a092a7d0033eb", "score": "0.579448", "text": "function dtConvFromJSON(data) {\n if (data == null) return '1/1/1950';\n var r = /\\/Date\\(([0-9]+)\\)\\//gi\n var matches = data.match(r);\n if (matches == null) return '1/1/1950';\n var result = matches.toString().substring(6, 19);\n var epochMilliseconds = result.replace(\n /^\\/Date\\(([0-9]+)([+-][0-9]{4})?\\)\\/$/,\n '$1');\n var b = new Date(parseInt(epochMilliseconds));\n var c = new Date(b.toString());\n var curr_date = c.getDate();\n var curr_month = c.getMonth() + 1;\n var curr_year = c.getFullYear();\n var curr_h = c.getHours();\n var curr_m = addZero(c.getMinutes());\n var curr_s = c.getSeconds();\n var curr_offset = c.getTimezoneOffset() / 60\n var d = curr_date + '/' + curr_month.toString() + '/' + curr_year + \" \" + curr_h + ':' + curr_m + ':' + curr_s;\n return d;\n\n}", "title": "" }, { "docid": "27d7c9ff0cf5b02ae81b22416e321c26", "score": "0.57309884", "text": "function handleDate(request, response) {\n\tconsole.log('got a GET request');\n\t// send the response:\n var now = new Date();\n\tresponse.send(\"Date: \" + now + \"\\n\");\n\tresponse.end();\n}", "title": "" }, { "docid": "e7246280e09a130285b3d9a2ba0e9878", "score": "0.57121295", "text": "function unixTime(req, res) {\n const iso = url.parse(req.url, true).query.iso;\n const date = new Date(iso);\n const json = { 'unixtime': date.getTime() }\n res.writeHead(200, { 'Content-Type': 'application/json' });\n res.write(JSON.stringify(json));\n res.end();\n}", "title": "" }, { "docid": "23694f000ec5a43cc552c5bb902a3a67", "score": "0.56762666", "text": "function getTime() {\n var request = new XMLHttpRequest();\n request.open('GET', '/gettime', true);\n request.onload = function () {\n var getTimeResponseTextField = document.getElementById(\"gettimeresponse\");\n getTimeResponseTextField.innerHTML = this.response;\n };\n request.send();\n}", "title": "" }, { "docid": "1789de6701bf6feb29e977cf9f939639", "score": "0.567542", "text": "async function getStartTimeStamp() {\n try {\n const req = await fetch(`${url}/${pathParams}?limit=1&sort=1`)\n const response = await req.json()\n console.log(`Start timestamp: ${response[0][0]}`)\n return(JSON.stringify(response[0][0]))\n }\n catch (err) {\n console.log(err)\n }\n}", "title": "" }, { "docid": "9fd8aa0392f22e84c180166c5e4bcca8", "score": "0.56454164", "text": "function getDateTime(){\n const bookingDateTimeUrl = `http://localhost:8080/bookings/datetime/${in2.value},${in3.value + \":00\"}`;\n const bookingDateTimeRequestOption = {\n headers: {\n \"Content-type\": 'application/json'\n },\n method: 'GET',\n redirect: 'follow'\n };\n\n fetch(bookingDateTimeUrl, bookingDateTimeRequestOption)\n .then(response => response.json())\n .then(data => checkDateTime(data));\n}", "title": "" }, { "docid": "a015437e540d912de383cc931e087294", "score": "0.56294537", "text": "function sendDate() {\n const dateString = dateStringFromMilli(Date.parse(date));\n /*\n Date in String format as a JavaScript object; used to create a json that\n is stringified for querying\n */\n const data = { dateString };\n // Sets the options for the fetch\n const options = { \n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(data) // Converts date json to String for query\n }\n /*\n Fetches from the node server using the date at dateURL. The response is\n the new geoJson for the map at said date.\n */\n fetch(dateURL, options).then(response => { \n response.json().then(res => {\n try {\n console.log(\"Successfully converted to geojson.\");\n /*\n Updates global geoJson to the geoJson from the result of the\n query.\n */\n geoJson = res; \n changeMapLayers(res);\n if(current_state != 'USA') {\n /*\n Update the stats box with the same currently\n selected state, but with new stats for the new date.\n */\n setCurrentState(current_state); \n }\n else {\n /*\n Update the stats box still for USA, but with new stats\n for the new date.\n */\n setCurrentStateUsa();\n }\n }\n catch (error) {\n console.log(\"ERROR: failed to convert json\");\n }\n })\n });\n}", "title": "" }, { "docid": "c6392b4240786e00e7ea9d88f9635da7", "score": "0.55415267", "text": "function requestTime() {\n var request = new XMLHttpRequest();\n\n // Ask the server for another copy of ServerDate.js but specify a unique number on the URL querystring\n // so that we don't get the browser cached Javascript file\n // Use HEAD request instead of GET because we don't need file content\n request.open('HEAD', URL + '?noCache=' + Date.now());\n\n /*\n // At the earliest possible moment of the response, record the time at\n // which we received it.\n request.onreadystatechange = function() {\n // If we got the headers and everything's OK\n if ((this.readyState === this.HEADERS_RECEIVED) &&\n (this.status === 200)) {\n }\n };*/\n\n // Process the server's response.\n request.onload = function() {\n // If OK\n if (this.status === 200) {\n try {\n // Process the server's Date from the response header\n setServerDateTime(this.getResponseHeader('Date'));\n } catch (exception) {\n // Show Console log\n }\n }\n };\n\n // Send the request.\n request.send();\n }", "title": "" }, { "docid": "aa846ca347525bbff2f8ce736901235f", "score": "0.5541427", "text": "function getDateString () {\n var time = new Date();\n // 14400000 is (GMT-4 Montreal)\n // for your timezone just multiply +/-GMT by 3600000\n var datestr = new Date(time - 14400000).toISOString().replace(/T/, ' ').replace(/Z/, '');\n return datestr;\n}", "title": "" }, { "docid": "aa846ca347525bbff2f8ce736901235f", "score": "0.5541427", "text": "function getDateString () {\n var time = new Date();\n // 14400000 is (GMT-4 Montreal)\n // for your timezone just multiply +/-GMT by 3600000\n var datestr = new Date(time - 14400000).toISOString().replace(/T/, ' ').replace(/Z/, '');\n return datestr;\n}", "title": "" }, { "docid": "aa846ca347525bbff2f8ce736901235f", "score": "0.5541427", "text": "function getDateString () {\n var time = new Date();\n // 14400000 is (GMT-4 Montreal)\n // for your timezone just multiply +/-GMT by 3600000\n var datestr = new Date(time - 14400000).toISOString().replace(/T/, ' ').replace(/Z/, '');\n return datestr;\n}", "title": "" }, { "docid": "923c11823f0f122905e0dfed9a58da96", "score": "0.5539947", "text": "function requesting(dataSource, divID, date) {\n\tif(xhr) {\n\t\tvar obj = document.getElementById(divID);\n\t\tvar requestbody =\"date=\"+encodeURIComponent(date);\n \t\txhr.open(\"POST\", dataSource, true);\n\t\txhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\t// Response on ready state\n\t\txhr.onreadystatechange = function() {\n\t\t\tif (xhr.readyState == 4 && xhr.status == 200) { \n\t\t\t\tobj.innerHTML = \"<span style='color:black'>\" + xhr.responseText + \"</span>\";\n\t\t\t} // end if\n\t\t} // end anonymous call-back function\n \t\txhr.send(requestbody);\n\t} // end if\n}", "title": "" }, { "docid": "c563206b54811582f8369783ad0d6848", "score": "0.5538835", "text": "function get_release_date_by_id(release_date_id) {\n \n var datereturned = \"\";\n $.ajax({\n method: \"POST\",\n url: cors_url+\"/release_dates\",\n headers: {\n 'Accept': 'application/json',\n 'Client-ID': 'xdipluje1230tt0fh0nzs49w1slae3',\n 'Authorization': 'Bearer '+acces_twitch_app.access_token,\n },\n data: \"fields *; where id=\"+release_date_id+\";\",\n success:function( data_release_Date ) {\n datereturned = data_release_Date;\n }, \n async: false // <- this turns it into synchronous\n });\n return datereturned;\n}", "title": "" }, { "docid": "1ca473d3e5508e7e6d134c2315536ed1", "score": "0.55304784", "text": "function getDateTime() {\n const today = new Date();\n const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();\n const time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n const payload = date + ' ' + time;\n return payload;\n}", "title": "" }, { "docid": "c14f9f573c498f4d06bc5c5186006b0c", "score": "0.5524529", "text": "function converteData(data){\n\t\treturn new Date(data);\n\t}", "title": "" }, { "docid": "1a06d612cb4ba3af42b0215b8b53d96a", "score": "0.5512166", "text": "GetData(dates_list, GroupID, DataURL, OnData) {\n\n //WebApp.js will wrap this up for you...\n WebApp.xhr(\"GET\", DataURL, \"\", function (error, data) {\n if (error) {\n console.warn(error);\n } else {\n try {\n const xhrDATA = JSON.parse(data);\n for (let index = 0; index < xhrDATA.length; index++) {\n const dateRecord = xhrDATA[index];\n dates_list.push(WebTimeLine.Convert.DateCast(GroupID, dateRecord));\n }\n OnData(null, dates_list);\n } catch (errParseData) {\n\n OnData(errParseData, null);\n }\n\n }//End xhr valid request....\n });\n }", "title": "" }, { "docid": "bdaf68477bd50736addc3376b876e05b", "score": "0.5495753", "text": "function\nWebSocketIFSendTimeStamp\n(InDateString)\n{\n var request;\n\n request = {};\n request.packettype = \"request\";\n request.packetid = WebSocketIFGetNextID(); \n request.time = 0;\n request.type = \"settimestamp\";\n request.body = {};\n request.body.datetime = InDateString;\n \n WebSocketIFSendGeneralRequest(request);\n}", "title": "" }, { "docid": "774ec003503119bea7827bd65aead6ef", "score": "0.5482681", "text": "function make_post_request( data, timestamp ){\n\tconsole.log(timestamp);\n\treturn new Promise ( function(resolve, reject){\t\n\t\tlet req = http.request({\n\t\t\t\thostname: 'localhost',\n\t\t\t\tport: 3000,\n\t\t\t\tpath: '/' + SERVICE_NAME + '/' + timestamp.toJSON(), \n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t'Content-Length': data.length\n\t\t\t\t}\n\t\t\t}, \n\t\t\t(resp) => { \n\t\t\t\tresp.on('data', (d) => {\n\t\t\t\t\tresolve(d.toString());\n\t\t\t\t});\n\t\t\t});\n\t\treq.on('error', (error) => { \n\t\t\treject( error ); \n\t\t});\n\n\t\treq.write(data);\n\t\treq.end();\n\t});\n}", "title": "" }, { "docid": "aef7abb4f3adf63feeb26e8564d57c5d", "score": "0.54799837", "text": "function getDateString() {\n var time = new Date().getTime();\n // 32400000 is (GMT+9 Korea, GimHae)\n // for your timezone just multiply +/-GMT by 3600000\n var datestr = new Date(time +32400000).toISOString().replace(/T/, ' ').replace(/Z/, '');\n return datestr;\n}", "title": "" }, { "docid": "21caa31e8346fef2d8acadfada427180", "score": "0.54697776", "text": "getTheDate(dataObj) {\n var dateObj = new Date();\n var month = dateObj.getUTCMonth() + 1; //months from 1-12\n var day = dateObj.getUTCDate();\n var year = dateObj.getUTCFullYear();\n var hours = dateObj.getHours()\n\n return year + \"/\" + month + \"/\" + day + hours;\n }", "title": "" }, { "docid": "f061b0b87c3013710a8e786c29b1e46a", "score": "0.5455342", "text": "function getTime() {\n\tvar Calendar = require('dw/util/Calendar');\n\tvar StringUtils = require('dw/util/StringUtils');\n\n\ttry {\n var date = StringUtils.formatCalendar(new dw.util.Calendar(), 'en_US', Calendar.LONG_DATE_PATTERN);\n\t\treturn date;\n\t} catch (exception) {\n logger.error('Error in Secure acceptance create request data' + exception.message);\n return { error: true, errorMsg: exception.message };\n }\n}", "title": "" }, { "docid": "651896b855cef3baf31e829147415e92", "score": "0.543852", "text": "function getFeedPast() {\n\n var time = new Date();\n var m = moment(time);\n m.add('days', -10);\n time = m.format();\n time = time.replace(\"T\", \" \");\n var ind = time.lastIndexOf(\"-\");\n time = time.substr(0, ind);\n\n //alert(time);\n\n\n var dataVal = JSON.stringify({\n \"datetime\": \"'\" + time + \"'\"\n });\n\n $.ajax({\n type: \"POST\",\n url: \"Default.aspx/GetFeed\",\n data: dataVal,\n contentType: 'application/json; charset=utf-8',\n dataType: \"json\",\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n //alert(\"Request: \" + XMLHttpRequest.toString() + \"\\n\\nStatus: \" + textStatus + \"\\n\\nError: \" + errorThrown);\n returnValue = false;\n },\n success: function (data) {\n $(\"#output\").append(\"<p>\" + data.d + \"</p>\");\n }\n });\n\n return false;\n}", "title": "" }, { "docid": "e76fc78075df28cae3f7f19b50b5b14c", "score": "0.54359967", "text": "function getServerDatetime(){\n\tvar jsdate = new Date();\n\treturn jsDateToMySQLDate(jsdate);\n}", "title": "" }, { "docid": "b6ca789bb56e67595d191496f67d6bed", "score": "0.5405957", "text": "function makeURL(oA, oB) {\n var currentdate = new Date(); \n var currenttime = ('0' + currentdate.getDate()).slice(-2) + \"\" +\n ('0' + (currentdate.getMonth()+1)).slice(-2) + \"\" +\n currentdate.getFullYear() + \"\" +\n ('0' + currentdate.getHours()).slice(-2) + \"\" +\n ('0' + currentdate.getMinutes()).slice(-2) + \"\" +\n ('0' + currentdate.getSeconds()).slice(-2);\n //console.log(\"currenttime \" + currenttime);\n var URL = 'http://reisapi.ruter.no/Travel/GetTravels?fromPlace=' + \n oA + '&toPlace=' + oB +'&isafter=True&time='+currenttime;\n\n return URL;\n}", "title": "" }, { "docid": "debd2e34a2ce37c4f7178a891fbccf65", "score": "0.5394658", "text": "function content_api_date(date) {\n return date.getUTCFullYear() +\n '-' + pad(date.getUTCMonth() + 1) +\n '-' + pad(date.getUTCDate()) +\n 'T' + pad(date.getUTCHours()) +\n ':' + pad(date.getUTCMinutes()) +\n ':' + pad(date.getUTCSeconds()) +\n '+00:00';\n} // content_api_date", "title": "" }, { "docid": "7de24c647d352e3d15b5cdbbff97c3db", "score": "0.53943974", "text": "function getLatestValue() {\n\n console.log(\"UID temp\", uniqueidid);\n\n url = 'http://localhost:3000/track/';\n url = url.concat('?uid=');\n url = url.concat(uniqueidid);\n console.log(url);\n var ourRequest = new XMLHttpRequest();\n ourRequest.open('GET', url);\n ourRequest.onload = function(){\n var ourdata = JSON.parse(ourRequest.responseText);\n console.log(\"GET DATA : \", ourdata);\n ourdata_latest = ourdata[ourdata.length-1];\n console.log(\"GET DATA LATEST: \", ourdata_latest);\n console.log(ourdata_latest.temperature);\n temp_tmp = ourdata_latest.temperature;\n time_tmp = ourdata_latest.time;\n pressure_tmp = ourdata_latest.pressure;\n console.log(\"time_tmp : \", time_tmp);\n console.log(\"temp_tmp0 : \", temp_tmp);\n console.log(\"pressure_tmp : \", pressure_tmp);\n }\n ourRequest.send();\n\n\n}", "title": "" }, { "docid": "5cab268fa516f6b2a7c7d2351378abcf", "score": "0.5391667", "text": "javascriptDateObjectToISOString(date) {\n day = date.getDate().toString();\n day = ((day.length === 1) ? '0' + day : day); // add zero in front if necessary \n month = (date.getMonth() + 1).toString(); // +1 because .getMonth returns int 0-11\n month = ((month.length === 1) ? '0' + month : month); // add zero in front if necessary\n year = date.getFullYear().toString();\n ymd = [year, month, day].join(\"-\") // ymd = 'YYYY-MM-DD'\n time = date.toString().split(\" \")[4].substring(0, 5); // 'hh:mm'\n return [ymd, time].join(\"T\");\n }", "title": "" }, { "docid": "5bb8d3b25f2a87837a0c6b1bf4783de4", "score": "0.53845674", "text": "function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=int(match[9]+match[10]);tzMin=int(match[9]+match[11]);}dateSetter.call(date,int(match[1]),int(match[2])-1,int(match[3]));var h=int(match[4]||0)-tzHour;var m=int(match[5]||0)-tzMin;var s=int(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}return string;}", "title": "" }, { "docid": "5bb8d3b25f2a87837a0c6b1bf4783de4", "score": "0.53845674", "text": "function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=int(match[9]+match[10]);tzMin=int(match[9]+match[11]);}dateSetter.call(date,int(match[1]),int(match[2])-1,int(match[3]));var h=int(match[4]||0)-tzHour;var m=int(match[5]||0)-tzMin;var s=int(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}return string;}", "title": "" }, { "docid": "22ee6b4ae7255221c94898ea5d0aedb8", "score": "0.5384266", "text": "function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=toInt(match[9]+match[10]);tzMin=toInt(match[9]+match[11]);}dateSetter.call(date,toInt(match[1]),toInt(match[2])-1,toInt(match[3]));var h=toInt(match[4]||0)-tzHour;var m=toInt(match[5]||0)-tzMin;var s=toInt(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}return string;}", "title": "" }, { "docid": "22ee6b4ae7255221c94898ea5d0aedb8", "score": "0.5384266", "text": "function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=toInt(match[9]+match[10]);tzMin=toInt(match[9]+match[11]);}dateSetter.call(date,toInt(match[1]),toInt(match[2])-1,toInt(match[3]));var h=toInt(match[4]||0)-tzHour;var m=toInt(match[5]||0)-tzMin;var s=toInt(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}return string;}", "title": "" }, { "docid": "22ee6b4ae7255221c94898ea5d0aedb8", "score": "0.5384266", "text": "function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;if(match[9]){tzHour=toInt(match[9]+match[10]);tzMin=toInt(match[9]+match[11]);}dateSetter.call(date,toInt(match[1]),toInt(match[2])-1,toInt(match[3]));var h=toInt(match[4]||0)-tzHour;var m=toInt(match[5]||0)-tzMin;var s=toInt(match[6]||0);var ms=Math.round(parseFloat('0.'+(match[7]||0))*1000);timeSetter.call(date,h,m,s,ms);return date;}return string;}", "title": "" }, { "docid": "0072bd5a384a142282932ba5f83ada46", "score": "0.5370242", "text": "function performNetworkRequest(website) {\n var response = UrlFetchApp.fetch(website, requestOptions);\n var params = JSON.parse(response.getContentText());\n for (i=0;i<params.length;i++){\n var data = { \n \"responseCode\": response.getResponseCode(),\n// \"headers\": response.getAllHeaders(),\n \"diskData\": params,\n \"dateTime\": new Date()\n };\n return data;\n \n }\n\n}", "title": "" }, { "docid": "f9cbc194c629cad1de54a38642866c13", "score": "0.5367455", "text": "function dateNow(){\n var date=new Date();\n return dataTransform(date);\n}", "title": "" }, { "docid": "61fb1cb6f28d5c77d680940b27ee8513", "score": "0.534824", "text": "function SlackTs2JsDate(ts) {\n return ts*1000;\n}", "title": "" }, { "docid": "10ac592afe930b5dd66b71b7b48e867f", "score": "0.53236246", "text": "function sendRequest() {\n if (window.XMLHttpRequest) {\n req = new XMLHttpRequest();\n } else {\n req = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n req.onreadystatechange = handleResponse;\n req.open(\"GET\", \"/guru/get-dates\", true);\n req.send(); \n}", "title": "" }, { "docid": "d5e024a4d184b956a5eb3d5c98c23c4c", "score": "0.5275037", "text": "storeDate(id, dateNtime) {\n\t\tlet xhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\txhttp.open(\"POST\", \"_php/getRecord.php\", true);\n\t\txhttp.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n\t\txhttp.send(`id=${id}&dateNtime=${dateNtime}`);\n\t}", "title": "" }, { "docid": "51d2202a0fa64572b34eb130bebdc25d", "score": "0.5266971", "text": "function submitUrlRequest() {\n var serial = document.getElementById(\"slct1\").value;\n var location = document.getElementById(\"slct1\").options[document.getElementById(\"slct1\").selectedIndex].parentNode.label;\n var beginDate = document.getElementById('beginDate').value;\n var beginTime = document.getElementById('beginTime').value;\n var endDate = document.getElementById('endDate').value;\n var endTime = document.getElementById('endTime').value;\n\n beginDate = beginDate.replace(/\\//g, '-');\n endDate = endDate.replace(/\\//g, '-');\n\n var urlEx = \"/measurements/location/_location/serial/_serial/start/begindateTbegintime:00Z/end/enddateTendtime:00Z\";\n\n urlEx = urlEx.replace(\"_location\", location);\n urlEx = urlEx.replace(\"_serial\", serial);\n urlEx = urlEx.replace(\"begindate\", beginDate);\n urlEx = urlEx.replace(\"begintime\", beginTime);\n urlEx = urlEx.replace(\"enddate\", endDate);\n urlEx = urlEx.replace(\"endtime\", endTime);\n\n var requestUrl = urlEx;\n\n\t\t$.getJSON(requestUrl, function(data) {\n\t\t\tloadRegs(data);\n\t\t\tpopulateRegisters(regsMap);\n\t\t\tshowChartForKey(\"L1V\") //FOR DEMO REMOVE OR FIX\n\t\t});\n }", "title": "" }, { "docid": "b734c31a9a8b409a3659e172b2e1a8a1", "score": "0.52509034", "text": "function sendRequest(dataSource) {\n var customer_name = document.getElementById(\"customer_name\").value;\n var contact_phone = document.getElementById(\"contact_phone\").value;\n var unit_number = document.getElementById(\"pick_up_unit_number\").value;\n var street_number = document.getElementById(\"pick_up_street_number\").value;\n var street_name = document.getElementById(\"pick_up_street_name\").value;\n var suburb = document.getElementById(\"pick_up_suburb\").value;\n var destination_suburb = document.getElementById(\"destination_suburb\").value;\n var pick_up_time = document.getElementById(\"pick_up_time\").value;\n\n // The parameter 'value' is used to generate a unique number for each request body\n var requestBody = \"customer_name=\" + encodeURIComponent(customer_name) + \"&contact_phone=\" + encodeURIComponent(contact_phone) + \"&pick_up_unit_number=\" + encodeURIComponent(unit_number) + \"&pick_up_street_number=\" + encodeURIComponent(street_number) + \"&pick_up_street_name=\" + encodeURIComponent(street_name) + \"&pick_up_suburb=\" + encodeURIComponent(suburb) + \"&destination_suburb=\" + encodeURIComponent(destination_suburb) + \"&pick_up_time=\" + encodeURIComponent(pick_up_time) + \"&value=\" + Number(new Date);\n\n\tif(xhr) {\n\t\txhr.open(\"POST\", dataSource, true);\n\t\txhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n\t\txhr.onreadystatechange = getData;\n\t\txhr.send(requestBody);\n\t}\n}", "title": "" }, { "docid": "fc8bb0ae72ceff364b75be5b1e3ccca4", "score": "0.5248102", "text": "function timeNow()\n{\n var today = new Date();\n getJSON('http://worldtimeapi.org/api/timezone/Asia/Kolkata.json', function(error, response){\n if(error){\n today=today;\n }\n else{\n today = response.datetime;\n // console.log(response);\n }\n });\n return String(today).substring(0,24);\n}", "title": "" }, { "docid": "4d4d690755d95cf0f5eac0e6480b4cf4", "score": "0.52404684", "text": "function GetDateTime(callback) {\n asyncRequest({cmd :'sntp_time', multi_data : 1},callback,function (data) {\n //var dateStr = timeStr = \"\";\n if (!!data.sntp_time && data.sntp_time != '0-0-0T0:0:0Z') {\n /*var datetime = data.sntp_time.toUpperCase();\n if (datetime.indexOf(\"Z\") != -1) {\n datetime = datetime.substring(0, datetime.length - 1);\n }\n var dt = datetime.split(\"T\");\n var dateBits = dt[0].split('-');\n var timeBits = dt[1].split(':');\n dateStr = getTwoDigit(dateBits[0]) + \"-\" + getTwoDigit(dateBits[1]) + \"-\" + getTwoDigit(dateBits[2]);\n timeStr = getTwoDigit(timeBits[0]) + \":\" + getTwoDigit(timeBits[1]) + \":\" + getTwoDigit(timeBits[2]);\n var dateTimeStr = dateStr + \"T\" + timeStr + \"Z\";*/\n return [true, {dateTime : data.sntp_time}];\n } else {\n return [false, {dateTime : \"\"}];\n }\n });\n }", "title": "" }, { "docid": "45fd386bc783a83fec6b2af07fbb228d", "score": "0.52166975", "text": "function prepareHistoryRequest(historyData) {\n var indicators = historyData.body.chart.result[0].indicators.quote[0].close;\n\n var epoch = historyData.body.chart.result[0].timestamp[0];\n var date = new Date(epoch * 1000);\n\n var months = { Jan:'01', Feb:'02', Mar:'03', Apr:'04', May:'05', Jun:'06', Jul:'07', Aug:'08', Sep:'09', Oct:'10', Nov:'11', Dec:'12' }\n var split = date.toString().split(\" \");\n \n var year = split[3];\n var month = split[1];\n var day = split[2];\n var time = split[4];\n\n var goodDate = year + \"-\" + months[month] + \"-\" + day + \" \" + time;\n\n //NOTE: I should test the epoch multiplication thing. Seems a bit wonky.\n //I want: 2019-12-04 06:30:00\n // console.log(\"epoch: \" + epoch);\n // console.log(\"Updated date: \" + goodDate);\n \n var formattedData = {\"instances\": [{\"start\": goodDate, \"target\": indicators}]};\n //console.log(formattedData)\n \n return formattedData;\n}", "title": "" }, { "docid": "4981e74e6fe823b44f233577c5fe64b9", "score": "0.5210727", "text": "function sendData() {\n fetch('https://pogotron-646fd.firebaseio.com/parametre.json', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n body: JSON.stringify({\n id: new Date().toISOString(),\n min_temperature: from,\n max_temperature: to\n })\n })\n .then(function(res) {\n console.log('Sent data', res);\n })\n .catch(function(err){\n console.log(\"Failed to send data\",err);\n })\n}", "title": "" }, { "docid": "dd031268852e297c57e60cd1cca14f28", "score": "0.5202802", "text": "function getData(input) {\n this.today = function (input) {\n $.ajax({\n type: \"POST\",\n url: \"/main.py\",\n data: { param: this.input }\n });\n return jqXHR.responseText\n }\n}", "title": "" }, { "docid": "42751a67f9fcc24fdad6f9cea344098b", "score": "0.5198669", "text": "function getServerTime(request, response) {\n\tvar time = new Date();\n\t\n\tvar result = {success: true, time: time};\n\tresponse.json(result); \n}", "title": "" }, { "docid": "7f29570d7edab01a14e580248a1421a6", "score": "0.5189772", "text": "function getCurrentTimestamp(_req, res) {\n return res.json({\n \"unix\": new Date().valueOf(),\n \"utc\": new Date().toUTCString()\n });\n}", "title": "" }, { "docid": "771de04e1aad4b7ca2eec3f968e1caf7", "score": "0.5154068", "text": "function getMinTemp(){\n var minTemp = $.ajax({\n url: 'https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=GHCND&datatypeid=tmin&units=metric&startdate=2016-01-01&enddate=2016-12-31&locationid=CITY:US360019&stationid=GHCND:USW00094728&limit=365',\n headers:{'token':'eYjeNHMGBxpRMYhExpkXBivkbGiIDvFc'}})\n \n .done(function(){\n for(i=0;i<minTemp.responseJSON.results.length;i++){\n minTempArr.push([minTemp.responseJSON.results[i].value, minTemp.responseJSON.results[i].date.split(\"T\")[0]]);\n }\n })\n .fail(function(error){\n console.error(error);\n });\n}", "title": "" }, { "docid": "771de04e1aad4b7ca2eec3f968e1caf7", "score": "0.5154068", "text": "function getMinTemp(){\n var minTemp = $.ajax({\n url: 'https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=GHCND&datatypeid=tmin&units=metric&startdate=2016-01-01&enddate=2016-12-31&locationid=CITY:US360019&stationid=GHCND:USW00094728&limit=365',\n headers:{'token':'eYjeNHMGBxpRMYhExpkXBivkbGiIDvFc'}})\n \n .done(function(){\n for(i=0;i<minTemp.responseJSON.results.length;i++){\n minTempArr.push([minTemp.responseJSON.results[i].value, minTemp.responseJSON.results[i].date.split(\"T\")[0]]);\n }\n })\n .fail(function(error){\n console.error(error);\n });\n}", "title": "" }, { "docid": "88830e7d0566c1bebe9c848e1e205686", "score": "0.5152637", "text": "static getStamp() {\n const date = new Date();\n return date.toISOString().slice(0, 19).replace(/-/g, \"\").replace(/:/g, \"\").replace(/T/g, \"\");\n }", "title": "" }, { "docid": "371764debf45c5ecbc6645c6465e0cfe", "score": "0.5143147", "text": "function getResDates(ID) {\n fetch('http://localhost:5000/getDates', {\n headers: {\n 'Content-type': 'application/json'\n },\n method: 'POST',\n body: JSON.stringify({\n R_ID: ID,\n })\n })\n .then(response => response.json())\n .then(data => getResInfo(ID, data['data']));\n}", "title": "" }, { "docid": "6783862418a7ab7cb75d0881a6748448", "score": "0.51403064", "text": "exportGovernor() {\n let ask = new XMLHttpRequest();\n ask.open('POST', '../saveJSONerr.php', true);\n ask.onreadystatechange = function() {\n if (this.readyState===4 && this.status===200) {\n let text = \"\";\n try {\n text = JSON.parse(this.responseText);\n } catch(e) {\n text = this.responseText;\n }\n }\n };\n ask.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n let info = encodeURI('data='+JSON.stringify(this.compileSelf()));\n let bla = decodeURI(info).substr(5);\n //console.log(info);\n //this.authenticate(info);\n ask.send(info);\n }", "title": "" }, { "docid": "93d1b95540c8efc8b0ad4fe10aa812f9", "score": "0.51353276", "text": "exportGovernor() {\n let ask = new XMLHttpRequest();\n ask.open('POST', '../saveJSONerr.php', true);\n ask.onreadystatechange = function() {\n if (this.readyState===4 && this.status===200) {\n let text = \"\";\n try {\n text = JSON.parse(this.responseText);\n } catch(e) {\n text = this.responseText;\n }\n }\n };\n ask.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n let info = encodeURI('data='+JSON.stringify(this.compileSelf()));\n let bla = decodeURI(info).substr(5);\n //console.log(info);\n //this.authenticate(info);\n ask.send(info);\n }", "title": "" }, { "docid": "b49694d1a273fd5ef9c33b06dbe4d375", "score": "0.51154464", "text": "function dataToDate(buf) {\n //console.log('datebuf', buf);\n var date = {\n year: 2000+buf[0],\n month: buf[1],\n day: buf[2],\n hour: buf[3],\n minute: buf[4]\n };\n\n return date;\n}", "title": "" }, { "docid": "f375527688d2e42451d098ff08b87f52", "score": "0.51071125", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "caeb54742d86df5c617495077a7bf961", "score": "0.51004106", "text": "function _home_getStationDailyData(uid, serie, dt) {\r\n\tconsole.log(\"_home_getStationDailyData/\");\r\n\t\r\n\tvar param = { \"uid\": uid, \"serie\": serie, \"date\": dt }\r\n\t$.ajax({\r\n\t\ttype: \"GET\",\r\n\t\turl: \"/restq/station/serie/daily/\"+JSON.stringify(param),\r\n\t\tsuccess: function(data) {\r\n stationDailyData = JSON.parse(data);\r\n console.log(stationDailyData);\r\n console.log(\"/_home_getStationDailyData\");\r\n }\r\n\t});\r\n}", "title": "" }, { "docid": "9a5c09bce48c317a90407bde1acf19ef", "score": "0.5099195", "text": "function doFetch() {\n /* get the neocp identity and format a query */\n \n neocpid = document.getElementById(\"neocp\").value;\n query = \"https://minorplanetcenter.net/cgi-bin/cgipy/dblog?desig=\"+ neocpid;\n txta = document.getElementById(\"myText\");\n \n /* open a connection */\n xhr = new XMLHttpRequest();\n xhr.open(\"GET\", query);\n xhr.responseType = \"text\";\n \n /* specify what to do when response is received */\n xhr.onload = function () {\n neocpdata = this.response.toString();\n doConvert();\n };\n \n /* send the query */\n xhr.send();\n txta.value = \"Query sent to the MPC, please wait.\";\n \n}", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5082217", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5082217", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5082217", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5082217", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5082217", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5082217", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "9cccb4ff10e1830a2e32892401b47ceb", "score": "0.5082217", "text": "date() {\n const serverDate = Date.parse(this._resHeaders.date);\n if (isFinite(serverDate)) {\n return serverDate;\n }\n return this._responseTime;\n }", "title": "" }, { "docid": "943cd3182d3a3cc046b6f2e7e7fd07e2", "score": "0.5081248", "text": "getResponseForDate(dateString) {\n //TODO: If you want the survey to start auto filled out, a SurveyJS JSON response can be placed here.\n\n return {};\n }", "title": "" }, { "docid": "f813afc25e28665ab5aed9df204ceaa5", "score": "0.5081095", "text": "function getDataFromServerToText () {\r\n return new Promise(function (resolve) {\r\n xhr.onreadystatechange = function() {\r\n if (xhr.readyState == 4 && xhr.status == 200) {\r\n resolve(readBody(xhr));\r\n }\r\n }\r\n xhr.open('GET', getRequestAPI() , true);\r\n xhr.send(null);\r\n });\r\n }", "title": "" }, { "docid": "716ff4562bb69a96d33bbfe71960929e", "score": "0.50704706", "text": "function pullCryptoData(url){\n countdown = ref_freq;\n \n var reqq = new XMLHttpRequest();\n reqq.open(\"GET\", url, false);\n reqq.send(null);\n var r = JSON.parse(reqq.response);\n return r;\n}", "title": "" }, { "docid": "cf725915b6aa7b018f0584e4d86745ef", "score": "0.5063071", "text": "function getReportByTS(reportTS) {\n const request = new XMLHttpRequest();\n request.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n report = JSON.parse(request.response);\n // Gotten report. Now do something.\n // console.log(\"Fresh ReportID = \" + report[0][\"reportID\"]);\n playSound(report[0][\"tag\"]);\n }\n };\n request.open(\"POST\", \"https://cruzsafe.appspot.com/api/reports/reportTS\");\n request.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n request.send(JSON.stringify({ reportTS: reportTS }));\n}", "title": "" }, { "docid": "ccdb611a824132f2f2aa1cf02796064f", "score": "0.5050418", "text": "function ds() {return (new Date()).toISOString() + \" [server] \";}", "title": "" }, { "docid": "1e151ac65b11667bf91c0f3498b9a3cc", "score": "0.503497", "text": "getTime(url) {\n return fetch(url)\n .then(response => response.json())\n .then(jsondata => jsondata.rows[0].elements[0].duration.value);\n }", "title": "" }, { "docid": "128d77936d6f79f5ddc37e98ee50eb0b", "score": "0.50296026", "text": "async function fetchDateAsync() {\n\n let response = await fetch(`http://localhost:8080/date/get`)\n let data = await response.json()\n return data\n\n}", "title": "" }, { "docid": "50940e6dff1ee7754ba530f4b15c5615", "score": "0.5029366", "text": "function requesting(dataSource, divID, date) {\r\n\t//Check if xhr was sucessfully created. Else alert the user.\r\n\tif(xhr) {\r\n\t\t//Get the element where information will be displayed.\r\n\t\tvar obj = document.getElementById(divID);\r\n\t\t//Set PHP file to execute\r\n\t\tvar url = dataSource;\r\n\t\t// Set request body, using function argument, to be sent to the server.\r\n\t\tvar requestbody =\"date=\"+encodeURIComponent(date);\r\n\t\t\r\n\t\t/* Initialise a request using POST protocol and the function parameter, dataSource.\r\n\t\t Parameter async is set to true which means asynchronous access is requested. */\r\n\t\txhr.open(\"POST\", url, true);\r\n\t\t\r\n\t\t// Set the value of HTTP request header \"Content-Type\" as \"application/x-www-form-urlencoded\".\r\n\t\txhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\r\n\t\t/* Response on ready state. The onreadystatechange property specifies a function to be \r\n\t\t executed every time the status of the XMLHttpRequest object changes */\r\n\t\txhr.onreadystatechange = function() {\r\n\t\t\t// Check if the response is ready.\r\n\t\t\tif (xhr.readyState == 4 && xhr.status == 200) { \r\n\t\t\t\t// Set the content of the specified HTML element to the text received from the server.\r\n\t\t\t\tobj.innerHTML = \"<span style='color:black'>\" + xhr.responseText + \"</span>\";\r\n\t\t\t} // end if\r\n\t\t} // end anonymous call-back function\r\n\t\t\r\n\t\t// Open the network connection and send the request to the server taking the requestBody as parameter.\r\n\t\txhr.send(requestbody);\r\n\t} // End if.\r\n}", "title": "" }, { "docid": "fda18ecb806d74ee6088bfc083e67dbb", "score": "0.5024231", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "ecb90d67f9e06a1aad5feade00ac809c", "score": "0.5018135", "text": "function myFunction() {\n\tinstruments = [\"NSE:NIFTY 50\", \"NFO:NIFTY2190917250CE\", \"NFO:NIFTY2190917250PE\", \"NFO:NIFTY2190917300CE\", \"NFO:NIFTY2190917300PE\", \"NFO:BANKNIFTY2190936800CE\", \"NFO:BANKNIFTY2190936800PE\", \"NFO:BANKNIFTY2190936900CE\", \"NFO:BANKNIFTY2190936900PE\"];\nkc.getLTP(instruments).then(\n\tfunction (response) {\n\t\tvar d = new Date();\n\t\tvar n = d.getMinutes();\n\tvar myDoc = {\n\t\tInstruments: {\n\t\t\tNIFTY: response[\"NSE:NIFTY 50\"].last_price,\n\t\t\tNCE1: response[\"NFO:NIFTY2190917250CE\"].last_price,\n\t\t\tNPE1: response[\"NFO:NIFTY2190917250PE\"].last_price,\n\t\t\tNCE2: response[\"NFO:NIFTY2190917300CE\"].last_price,\n\t\t\tNPE2: response[\"NFO:NIFTY2190917300PE\"].last_price,\n\t\t\tBCE1: response[\"NFO:BANKNIFTY2190936800CE\"].last_price,\n\t\t\tBPE1: response[\"NFO:BANKNIFTY2190936800PE\"].last_price,\n\t\t\tBCE2: response[\"NFO:BANKNIFTY2190936900CE\"].last_price,\n\t\t\tBPE2: response[\"NFO:BANKNIFTY2190936900PE\"].last_price\n\t\t}\n\t};\n\t//res.json(myDoc);\n\tvar x = response[\"NSE:NIFTY 50\"].last_price;\n\tvar NCE1= response[\"NFO:NIFTY2190917250CE\"].last_price;\n\tvar NPE1= response[\"NFO:NIFTY2190917250PE\"].last_price;\n\tvar NCE2= response[\"NFO:NIFTY2190917300CE\"].last_price;\n\tvar NPE2= response[\"NFO:NIFTY2190917300PE\"].last_price;\n\tvar BCE1= response[\"NFO:BANKNIFTY2190936800CE\"].last_price;\n\tvar BPE1= response[\"NFO:BANKNIFTY2190936800PE\"].last_price;\n\tvar BCE2= response[\"NFO:BANKNIFTY2190936900CE\"].last_price;\n\tvar BPE2= response[\"NFO:BANKNIFTY2190936900PE\"].last_price;\n\n\tvar y = 50;\n\tvar z = x % y;\n\tconsole.log((d.getHours().toString() + d.getMinutes().toString() + d.getSeconds().toString()) , (((NCE1 * 77) + (NPE1 * 74) + (NCE2 * 100) + (NPE2 * 60))/348).toFixed(2).toString(),\n\t(((BCE1 * 69) + (BPE1 * 100) + (BCE2 * 79) + (BPE2 * 86))/1176).toFixed(2).toString(), ((((NCE1 * 77) + (NPE1 * 74) + (NCE2 * 100) + (NPE2 * 60))/348) - (((BCE1 * 69) + (BPE1 * 100) + (BCE2 * 79) + (BPE2 * 86))/1176)).toFixed(2) );\n\tconst quoteData = {\n\t\tquote: x,\n\t\tdate: d.getHours() + ':' + d.getMinutes() + '**'\n\t};\n\t\n\tvar sometime= (d.getHours().toString() + d.getMinutes().toString() + d.getSeconds().toString()) + ',' + (((NCE1 * 77) + (NPE1 * 74) + (NCE2 * 100) + (NPE2 * 60))/348).toFixed(2).toString() + ',' + (((BCE1 * 69) + (BPE1 * 100) + (BCE2 * 79) + (BPE2 * 86))/1176).toFixed(2).toString() ;\n\t//db.collection('sampleData').doc ('inspiration').set(quoteData);\n\n\tdb.collection('sampleData').doc ('03092021').update({\n\t\tValues: admin.firestore.FieldValue.arrayUnion( `${sometime}`)\n\t }, {merge:true});\n\t}).catch(function (err) {\n\tconsole.log(err);\n})\n}", "title": "" }, { "docid": "2896ea86aae67a3f8e8f29bd506d61e0", "score": "0.50161153", "text": "function makeDate(data) {\r\n var date = new TLDate(data);\r\n if (!isNaN(date.getTime())) {\r\n return date;\r\n }\r\n return new BigDate(data);\r\n}", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "772ca06c191dfca255546d235934e3c1", "score": "0.50097275", "text": "function jsonStringToDate(string) {\n var match;\n if ((match = string.match(R_ISO8601_STR))) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" }, { "docid": "258dc5b5e6abca4443f411e0d6fe96a2", "score": "0.5007141", "text": "createJSON(value,date) {\n\t/* The format of a post to the server */\n\tvar bpm_json = \n\t {\n\t\t\"header\":{\n\t\t \"id\":\"0\",\n\t\t \"creation_date_time\":\"SOME_TIMESTAMP\",\n\t\t \"acquisition_provenance\":{\n\t\t\t\"source_name\":\"arduino\",\n\t\t\t\"modality\":\"sensed\"\n\t\t },\n\t\t \"schema_id\":{\n\t\t\t\"namespace\":\"omh\",\n\t\t\t\"name\":\"heart-rate\",\n\t\t\t\"version\":\"1.0\"\n\t\t }\n\t\t},\n\t\t\"body\":{\n\t\t \"heart_rate\": {\n\t\t\t\"value\":0,\n\t\t\t\"unit\":\"beats/min\"\n\t\t },\n\t\t \"effective_time_frame\":{\n\t\t\t\"date_time\":\"SOME_TIMESTAMP\"\n\t\t }\n\t\t}\n\t };\n\n\tbpm_json.header.creation_date_time = date.toISOString();\n\t\n\t/* Oftentimes when posting multiple numbers will be assigned IDs within the same\n\t millisecond. Add a counter to the end to combat this. */\n\tbpm_json.header.id = new Date().getTime().toString() + \"-\" + this.appendIndex.toString();\n\tbpm_json.body.heart_rate.value = value;\n\tbpm_json.body.effective_time_frame.date_time = date.toISOString();\n\t\n\tthis.appendIndex++;\n\t\n\treturn bpm_json;\n }", "title": "" }, { "docid": "b46776d4a4789abc3df57f2098faa10e", "score": "0.5006378", "text": "function getNow () {\n var d = new Date();\n return JSON.parse(JSON.stringify(d).replace('Z', '000Z'));\n}", "title": "" }, { "docid": "3e4a84d7f927cd05ecb19a9ec116de36", "score": "0.5006081", "text": "function getScromObjectData(systemId) {\n\tvar options = {};\n\toptions.url = \"courseLaunch.srv\";\n\toptions.type = \"POST\";\n\toptions.dataType = \"xml\";\n\toptions.contentType = \"text/plain\";\n\toptions.callback = \"ProcessGetScromObjectData\";\n\toptions.async = false;\n\tvar params = [];\n\tparams = [localStorage.getItem('userId'), localStorage.getItem('siteCompanyName'), localStorage.getItem('siteID'), systemId]; \n\toptions.data = buildXMLrequest('getParamConsole', params);\n\tprintLog('options.data ....getScromObjectData.. ' + options.data);\n\tCallWebservice(options, \"getParamConsole\");\n}", "title": "" }, { "docid": "5495249de497b5524e6527e8097db298", "score": "0.50052655", "text": "function jsonStringToDate(string) {\r\n var match;\r\n if ((match = string.match(R_ISO8601_STR))) {\r\n var date = new Date(0),\r\n tzHour = 0,\r\n tzMin = 0,\r\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\r\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\r\n\r\n if (match[9]) {\r\n tzHour = toInt(match[9] + match[10]);\r\n tzMin = toInt(match[9] + match[11]);\r\n }\r\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\r\n var h = toInt(match[4] || 0) - tzHour;\r\n var m = toInt(match[5] || 0) - tzMin;\r\n var s = toInt(match[6] || 0);\r\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\r\n timeSetter.call(date, h, m, s, ms);\r\n return date;\r\n }\r\n return string;\r\n }", "title": "" }, { "docid": "8d2fc8e171622fc3649630be3bcc03d7", "score": "0.5005138", "text": "getOneDayPvUvDataFromCms(data){\nreturn this.post(Config.API_URL + Constant.TIMINGTASK_GETONEDAYPVUVDATAFROMCMS, data);\n}", "title": "" }, { "docid": "4f60755d8d762726a6e7a0fada27ebf0", "score": "0.500472", "text": "function sendJSON(){ \n let result = document.querySelector('.result');\n\n let user = document.querySelector('#user'); \n let content = document.querySelector('#content');\n let expiration = document.querySelector('#expiration');\n \n // Creating a XHR object \n let xhr = new XMLHttpRequest(); \n\n // open a connection \n xhr.open(\"POST\", url, true); \n\n // Set the request header i.e. which type of content you are sending \n xhr.setRequestHeader(\"Content-Type\", \"application/json\"); \n\n // Create a state change callback \n xhr.onreadystatechange = function () { \n if (xhr.readyState === 4 && xhr.status === 200) { \n\n // Print received data from server \n result.innerHTML = this.responseText; \n\n } \n };\n\n // Converting JSON data to string \n var data = JSON.stringify({ \n \"user\": user.value, \n \"content\": content.value, \n \"expiration\": expiration.value }); \n\n // Sending data with the request \n xhr.send(data); \n}", "title": "" }, { "docid": "745942c081f0a93ceb143e4d8cbfee58", "score": "0.5002852", "text": "function get_data(req_data) {\n send_request(req_data);\n console.log(received_json);\n document.getElementById(\"request_json\").innerHTML = received_json;\n //var jj = JSON.parse(received_json);\n //console.log(jj[0]['id']);\n}", "title": "" }, { "docid": "e3c1bb7b5c1e4f8314fc5ebd9622e5b6", "score": "0.5002312", "text": "function getData(){\n\tAirTemp.shift();\n\tSoilTemp.shift();\n\tHumidity.shift();\n\tMoisture.shift();\n\t$.ajax({\n\t\txhrFields: {\n\t\t\twithCredentials: true\n\t\t},\n\t\theaders: {\n\t\t\t'Authorization': 'Basic ' + btoa('GardenWAM:xxxxxx'),\n\t\t\t'plant': graphPlant\n\t\t},\n\t\turl: \"../../api/Data/read.php\",\n\t\tdataType: \"json\",\n\t\tasync: false,\n\t\tsuccess: function(data){\n\t\t\tMoisture.push([\n\t\t\t\tnew Date(data[\"TimeStamp\"]),\n\t\t\t\tparseFloat(data[\"Moisture\"])\n\t\t\t]);\n\t\t\tHumidity.push([\n\t\t\t\tnew Date(data[\"TimeStamp\"]),\n\t\t\t\tparseFloat(data[\"Humidity\"])\n\t\t\t]);\n\t\t\tSoilTemp.push([\n\t\t\t\tnew Date(data[\"TimeStamp\"]),\n\t\t\t\tparseFloat(data[\"SoilTemp\"])\n\t\t\t]);\n\t\t\tAirTemp.push([\n\t\t\t\tnew Date(data[\"TimeStamp\"]),\n\t\t\t\tparseFloat(data[\"AirTemp\"])\n\t\t\t]);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "f72797ae47d830ce7d920b606c8c5aa7", "score": "0.5002125", "text": "function preencheDiaDeHoje() {\n var data = document.querySelector(\"#data\");\n\n if (data != null)\n data.value = (new Date()).toISOString().substring(0, 10);\n}", "title": "" }, { "docid": "8e837985d4ac2ebd3cf448ac5040a4c5", "score": "0.49939796", "text": "function jsonStringToDate(string) {\r\n var match;\r\n if (match = string.match(R_ISO8601_STR)) {\r\n var date = new Date(0),\r\n tzHour = 0,\r\n tzMin = 0,\r\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\r\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\r\n\r\n if (match[9]) {\r\n tzHour = toInt(match[9] + match[10]);\r\n tzMin = toInt(match[9] + match[11]);\r\n }\r\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\r\n var h = toInt(match[4] || 0) - tzHour;\r\n var m = toInt(match[5] || 0) - tzMin;\r\n var s = toInt(match[6] || 0);\r\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\r\n timeSetter.call(date, h, m, s, ms);\r\n return date;\r\n }\r\n return string;\r\n }", "title": "" }, { "docid": "2e0c90c4ca0e106f7c44b9ce9ec4699b", "score": "0.49939018", "text": "function jsonStringToDate(string) {\n var match;\n if (match = string.match(R_ISO8601_STR)) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = toInt(match[9] + match[10]);\n tzMin = toInt(match[9] + match[11]);\n }\n dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));\n var h = toInt(match[4] || 0) - tzHour;\n var m = toInt(match[5] || 0) - tzMin;\n var s = toInt(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }", "title": "" } ]
d056a375a7105d9ec6222600ea11e745
Hook used with React Transition Group. Returns addEndListener and handleAnimationEnd callbacks addEndListener: pass to Transition component handleAnimationEnd: is passed to the animating elements onAnimationEnd
[ { "docid": "5482b10cabe7b56d27aa171b1b0a3729", "score": "0.7186878", "text": "function useAnimationEnd(animatingRef) {\n const endListener = useRef();\n\n const handleAnimationEnd = useCallback((e) => {\n // check animation is not from children\n if (e.target === animatingRef.current && endListener.current) {\n endListener.current();\n }\n });\n\n const addEndListener = useCallback((done) => {\n endListener.current = done;\n });\n\n return { handleAnimationEnd, addEndListener };\n}", "title": "" } ]
[ { "docid": "a9ac3eca56efb9795de016746bead58c", "score": "0.7007494", "text": "handleAnimationEnd(e) {\r\n\t\tthis.ended=true;\r\n\t\te.stopPropagation();\r\n\t\tif (this.props.onAnimateEnd) this.props.onAnimateEnd({\r\n\t\t\tcomponent:this,\r\n\t\t\tnativeEvent:e\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "8eeed960306ece1f96584dadd91e3f4e", "score": "0.67212075", "text": "_bindLayoutAnimationEndEvent(modifier, cb) {\n const sidenav = this.getSidenav()\n const duration = sidenav ? this._getAnimationDuration(sidenav) + 50 : 0\n\n if (!duration) {\n modifier.call(this)\n cb.call(this)\n return\n }\n\n this._transitionCallback = e => {\n if (e.target !== sidenav) return\n this._unbindLayoutAnimationEndEvent()\n cb.call(this)\n }\n\n TRANSITION_EVENTS.forEach(e => {\n sidenav.addEventListener(e, this._transitionCallback, false)\n })\n\n modifier.call(this)\n\n this._transitionCallbackTimeout = setTimeout(() => {\n this._transitionCallback.call(this, { target: sidenav })\n }, duration)\n }", "title": "" }, { "docid": "678890d692b25df29648e39de7c94501", "score": "0.6650223", "text": "onAnimationEnd() {\n\n }", "title": "" }, { "docid": "c417b06c2ffb3ff2c06148cbbe4cbd8e", "score": "0.6640832", "text": "function _onAnimationEnd () {\n clearTimeout(transitionEndTimeout);\n $target.off(events);\n animationEnded();\n deferred.resolve();\n }", "title": "" }, { "docid": "dcc704f71fe8b2b78cbb4071d6e40791", "score": "0.66204333", "text": "handleAnimationEnd() {\n clearTimeout(this.animEndLatchTimer_);\n this.animEndLatchTimer_ = setTimeout(() => {\n this.adapter_.removeClass(this.currentAnimationClass_);\n this.adapter_.deregisterAnimationEndHandler(this.animEndHandler_);\n }, numbers$1.ANIM_END_LATCH_MS);\n }", "title": "" }, { "docid": "0d85747b3e791e70be5f19ef101e6373", "score": "0.6578677", "text": "_onAnimationEnd() {\n // Clean up the old container. This is done after the animation to avoid garbage\n // collection during the animation and because the black box updates need it.\n if (this._oldContainer) {\n this._oldContainer.removeFromParent();\n this._oldContainer.destroy();\n this._oldContainer = null;\n }\n\n if (this._delContainer) {\n this._delContainer.removeFromParent();\n this._delContainer.destroy();\n this._delContainer = null;\n }\n\n // Fire ready event saying animation is finished.\n if (!this.AnimationStopped) this.RenderComplete();\n\n // Restore event listeners\n this.EventManager.addListeners(this);\n\n // Reset animation flags\n this.Animation = null;\n this.AnimationStopped = false;\n }", "title": "" }, { "docid": "5f2468deab938638e7b9a7e05a4ff10b", "score": "0.649222", "text": "function handleAnimationEnd(event) {\n event.stopPropagation();\n removeClasses(el, animation);\n\n if(animation === 'rollIn'){\n el.classList.add('rolling')\n\n el.addEventListener('click', () => {\n el.classList.add(`animate__animated`, `animate__rollOut`);\n })\n }\n\n checkAnimateLate(el)\n \n resolve('Animation ended');\n }", "title": "" }, { "docid": "da63a8aa4dba361b8d67730d880be8d9", "score": "0.6483379", "text": "_animationDoneListener(event) {\n this._animationEnd.next(event);\n }", "title": "" }, { "docid": "b3869cbeb137576d9781c1b2f75e24a6", "score": "0.6459196", "text": "function handleAnimationEnd(event) {\n event.stopPropagation();\n if(animationName !== event.animationName)\n {\n //ended other animation => ignore it callback now\n //console.error(animationName);\n //console.error(event);\n\n log('Animation end '+event.animationName+'; Expected: '+animationName );\n return;\n }\n\n node.classList.remove(animationName);\n\n log('Animation ended '+animationName );\n resolve('Animation ended '+animation);\n }", "title": "" }, { "docid": "8330d848fe13f75325d248c2c4f250da", "score": "0.63550085", "text": "function handleAnimationEnd() {\n node.classList.remove(`${prefix}animated`, animationName);\n node.removeEventListener('animationend', handleAnimationEnd);\n\n resolve('Animation ended');\n }", "title": "" }, { "docid": "c2c010a50cbb6405bd181517ec0da1bf", "score": "0.6321848", "text": "function handleAnimationEnd() {\r\n node.classList.remove(`${prefix}animated`, animationName);\r\n node.removeEventListener('animationend', handleAnimationEnd);\r\n\r\n resolve('Animation ended');\r\n }", "title": "" }, { "docid": "127447d3c6145e76d7ca24932a624de0", "score": "0.6284373", "text": "notifyAnimationEnd() {}", "title": "" }, { "docid": "79758ac8b92ef275d22ea5d6d8e0a438", "score": "0.62684536", "text": "function onEnd() {\n wrapper.classed( 'no-transition', true );\n wrapperNode.removeEventListener( 'transitionend', onEnd );\n }", "title": "" }, { "docid": "86345e46bfea9b20aa164b99f62e0e6e", "score": "0.62052464", "text": "function genAnimateChild(transitionSupport) {\n var AnimateChild = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(AnimateChild, _React$Component);\n\n function AnimateChild() {\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, AnimateChild);\n\n // [Legacy] Since old code addListener on the element.\n // To avoid break the behaviour that component not handle animation/transition\n // also can handle the animate, let keep the logic.\n var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this));\n\n _this.state = {\n child: null,\n\n eventQueue: [],\n eventActive: false\n };\n\n _this.onDomUpdated = function () {\n var eventActive = _this.state.eventActive;\n var _this$props = _this.props,\n transitionName = _this$props.transitionName,\n animation = _this$props.animation,\n onChildLeaved = _this$props.onChildLeaved,\n animateKey = _this$props.animateKey;\n\n\n var $ele = _this.getDomElement();\n\n // Skip if dom element not ready\n if (!$ele) return;\n\n // [Legacy] Add animation/transition event by dom level\n if (transitionSupport && _this.$prevEle !== $ele) {\n _this.cleanDomEvent();\n\n _this.$prevEle = $ele;\n _this.$prevEle.addEventListener(__WEBPACK_IMPORTED_MODULE_10__util__[\"a\" /* animationEndName */], _this.onMotionEnd);\n _this.$prevEle.addEventListener(__WEBPACK_IMPORTED_MODULE_10__util__[\"g\" /* transitionEndName */], _this.onMotionEnd);\n }\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) {\n // Additional process the leave event\n if (currentEvent.lastEventType === 'leave') {\n onChildLeaved(animateKey);\n }\n return;\n }\n\n var eventType = currentEvent.eventType,\n restQueue = currentEvent.restQueue;\n\n var nodeClasses = __WEBPACK_IMPORTED_MODULE_8_component_classes___default()($ele);\n\n // [Legacy] Since origin code use js to set `className`.\n // This caused that any component without support `className` can be forced set.\n // Let's keep the logic.\n function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }\n\n if (_this.currentEvent && _this.currentEvent.type === eventType) {\n legacyAppendClass();\n return;\n }\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n // Clean up last event environment\n if (_this.currentEvent && _this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // Clean up last transition class\n if (_this.currentEvent) {\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, '' + _this.currentEvent.type);\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, _this.currentEvent.type + '-active');\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // New event come\n _this.currentEvent = {\n type: eventType\n };\n\n var animationHandler = (animation || {})[eventType];\n // =============== Check if has customize animation ===============\n if (animationHandler) {\n _this.currentEvent.animateObj = animationHandler($ele, function () {\n _this.onMotionEnd({ target: $ele });\n });\n\n // Do next step if not animate object provided\n if (!_this.currentEvent.animateObj) {\n _this.nextEvent(restQueue);\n }\n\n // ==================== Use transition instead ====================\n } else if (transitionSupport) {\n legacyAppendClass();\n if (!eventActive) {\n // Trigger `eventActive` in next frame\n __WEBPACK_IMPORTED_MODULE_9_raf___default()(function () {\n if (_this.currentEvent && _this.currentEvent.type === eventType && !_this._destroy) {\n _this.setState({ eventActive: true }, function () {\n // [Legacy] Handle timeout if browser transition event not handle\n var transitionDelay = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"c\" /* getStyleValue */])($ele, 'transition-delay') || 0;\n var transitionDuration = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"c\" /* getStyleValue */])($ele, 'transition-duration') || 0;\n var animationDelay = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"c\" /* getStyleValue */])($ele, 'animation-delay') || 0;\n var animationDuration = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"c\" /* getStyleValue */])($ele, 'animation-duration') || 0;\n var totalTime = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);\n\n if (totalTime >= 0) {\n _this.timeout = setTimeout(function () {\n _this.onMotionEnd({ target: $ele });\n }, totalTime * 1000);\n }\n });\n }\n });\n }\n\n // ======================= Just next action =======================\n } else {\n _this.onMotionEnd({ target: $ele });\n }\n };\n\n _this.onMotionEnd = function (_ref) {\n var target = _ref.target;\n var _this$props2 = _this.props,\n transitionName = _this$props2.transitionName,\n onChildLeaved = _this$props2.onChildLeaved,\n animateKey = _this$props2.animateKey,\n onAppear = _this$props2.onAppear,\n onEnter = _this$props2.onEnter,\n onLeave = _this$props2.onLeave,\n onEnd = _this$props2.onEnd;\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) return;\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n var restQueue = currentEvent.restQueue;\n\n\n var $ele = _this.getDomElement();\n if (!_this.currentEvent || $ele !== target) return;\n\n if (_this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // [Legacy] Same as above, we need call js to remove the class\n if (transitionSupport && _this.currentEvent) {\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, _this.currentEvent.type);\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, _this.currentEvent.type + '-active');\n\n var nodeClasses = __WEBPACK_IMPORTED_MODULE_8_component_classes___default()($ele);\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // Additional process the leave event\n if (_this.currentEvent && _this.currentEvent.type === 'leave') {\n onChildLeaved(animateKey);\n }\n\n // [Legacy] Trigger on event when it's last event\n if (_this.currentEvent && !restQueue.length) {\n if (_this.currentEvent.type === 'appear' && onAppear) {\n onAppear(animateKey);\n } else if (_this.currentEvent.type === 'enter' && onEnter) {\n onEnter(animateKey);\n } else if (_this.currentEvent.type === 'leave' && onLeave) {\n onLeave(animateKey);\n }\n\n if (onEnd) {\n // OnEnd(key, isShow)\n onEnd(animateKey, _this.currentEvent.type !== 'leave');\n }\n }\n\n _this.currentEvent = null;\n\n // Next queue\n _this.nextEvent(restQueue);\n };\n\n _this.getDomElement = function () {\n if (_this._destroy) return null;\n return __WEBPACK_IMPORTED_MODULE_4_react_dom___default.a.findDOMNode(_this);\n };\n\n _this.getCurrentEvent = function () {\n var _this$state$eventQueu = _this.state.eventQueue,\n eventQueue = _this$state$eventQueu === undefined ? [] : _this$state$eventQueu;\n var _this$props3 = _this.props,\n animation = _this$props3.animation,\n exclusive = _this$props3.exclusive,\n transitionAppear = _this$props3.transitionAppear,\n transitionEnter = _this$props3.transitionEnter,\n transitionLeave = _this$props3.transitionLeave;\n\n\n function hasEventHandler(eventType) {\n return eventType === 'appear' && (transitionAppear || animation.appear) || eventType === 'enter' && (transitionEnter || animation.enter) || eventType === 'leave' && (transitionLeave || animation.leave);\n }\n\n var event = null;\n // If is exclusive, only check the last event\n if (exclusive) {\n var eventType = eventQueue[eventQueue.length - 1];\n if (hasEventHandler(eventType)) {\n event = {\n eventType: eventType,\n restQueue: []\n };\n }\n } else {\n // Loop check the queue until find match\n var cloneQueue = eventQueue.slice();\n while (cloneQueue.length) {\n var _cloneQueue = cloneQueue,\n _eventType = _cloneQueue[0],\n restQueue = _cloneQueue.slice(1);\n\n if (hasEventHandler(_eventType)) {\n event = {\n eventType: _eventType,\n restQueue: restQueue\n };\n break;\n }\n cloneQueue = restQueue;\n }\n }\n\n if (!event) {\n event = {\n empty: true,\n lastEventType: eventQueue[eventQueue.length - 1]\n };\n }\n\n return event;\n };\n\n _this.nextEvent = function (restQueue) {\n // Next queue\n if (!_this._destroy) {\n _this.setState({\n eventQueue: restQueue,\n eventActive: false\n });\n }\n };\n\n _this.cleanDomEvent = function () {\n if (_this.$prevEle && transitionSupport) {\n _this.$prevEle.removeEventListener(__WEBPACK_IMPORTED_MODULE_10__util__[\"a\" /* animationEndName */], _this.onMotionEnd);\n _this.$prevEle.removeEventListener(__WEBPACK_IMPORTED_MODULE_10__util__[\"g\" /* transitionEndName */], _this.onMotionEnd);\n }\n };\n\n _this.$prevEle = null;\n\n _this.currentEvent = null;\n _this.timeout = null;\n return _this;\n }\n\n AnimateChild.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var _prevState$prevProps = prevState.prevProps,\n prevProps = _prevState$prevProps === undefined ? {} : _prevState$prevProps;\n var appeared = nextProps.appeared;\n\n\n var newState = {\n prevProps: Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"b\" /* cloneProps */])(nextProps, clonePropList)\n };\n\n function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n if (updater) {\n updater(nextProps[propName]);\n }\n return true;\n }\n return false;\n }\n\n function pushEvent(eventType) {\n var eventQueue = newState.eventQueue || prevState.eventQueue.slice();\n var matchIndex = eventQueue.indexOf(eventType);\n\n // Clean the rest event if eventType match\n if (matchIndex !== -1) {\n eventQueue = eventQueue.slice(0, matchIndex);\n }\n\n eventQueue.push(eventType);\n newState.eventQueue = eventQueue;\n }\n\n // Child update. Only set child.\n processState('children', function (child) {\n newState.child = child;\n });\n\n processState('appeared', function (isAppeared) {\n if (isAppeared) {\n pushEvent('appear');\n }\n });\n\n // Show update\n processState('show', function (show) {\n if (!appeared) {\n if (show) {\n pushEvent('enter');\n } else {\n pushEvent('leave');\n }\n }\n });\n\n return newState;\n };\n\n AnimateChild.prototype.componentDidMount = function componentDidMount() {\n this.onDomUpdated();\n };\n\n AnimateChild.prototype.componentDidUpdate = function componentDidUpdate() {\n this.onDomUpdated();\n };\n\n AnimateChild.prototype.componentWillUnmount = function componentWillUnmount() {\n clearTimeout(this.timeout);\n this._destroy = true;\n this.cleanDomEvent();\n };\n\n AnimateChild.prototype.render = function render() {\n var _state = this.state,\n child = _state.child,\n eventActive = _state.eventActive;\n var _props = this.props,\n showProp = _props.showProp,\n transitionName = _props.transitionName;\n\n var _ref2 = child.props || {},\n className = _ref2.className;\n\n var currentEvent = this.getCurrentEvent();\n\n // Class name\n var connectClassName = transitionSupport && this.currentEvent ? __WEBPACK_IMPORTED_MODULE_7_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, this.currentEvent.type), eventActive && Object(__WEBPACK_IMPORTED_MODULE_10__util__[\"d\" /* getTransitionName */])(transitionName, this.currentEvent.type + '-active')) : className;\n\n var show = true;\n\n // Keep show when is in transition or has customize animate\n if (transitionSupport && (!currentEvent.empty || this.currentEvent && this.currentEvent.animateObj)) {\n show = true;\n } else {\n show = child.props[showProp];\n }\n\n // Clone child\n var newChildProps = {\n className: connectClassName\n };\n\n if (showProp) {\n newChildProps[showProp] = show;\n }\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.cloneElement(child, newChildProps);\n };\n\n return AnimateChild;\n }(__WEBPACK_IMPORTED_MODULE_3_react___default.a.Component);\n\n AnimateChild.propTypes = {\n transitionName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object]),\n transitionAppear: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,\n transitionEnter: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,\n transitionLeave: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,\n exclusive: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,\n appeared: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,\n showProp: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,\n\n animateKey: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any,\n animation: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,\n onChildLeaved: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,\n\n onEnd: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,\n onAppear: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,\n onEnter: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,\n onLeave: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func\n };\n\n\n Object(__WEBPACK_IMPORTED_MODULE_6_react_lifecycles_compat__[\"polyfill\"])(AnimateChild);\n\n return AnimateChild;\n}", "title": "" }, { "docid": "503e23ee64a57a5d954df70605ef49bd", "score": "0.6161193", "text": "function genAnimateChild(transitionSupport) {\n var AnimateChild = function (_React$Component) {\n __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(AnimateChild, _React$Component);\n\n function AnimateChild() {\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, AnimateChild);\n\n // [Legacy] Since old code addListener on the element.\n // To avoid break the behaviour that component not handle animation/transition\n // also can handle the animate, let keep the logic.\n var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).call(this));\n\n _this.state = {\n child: null,\n\n eventQueue: [],\n eventActive: false\n };\n\n _this.onDomUpdated = function () {\n var eventActive = _this.state.eventActive;\n var _this$props = _this.props,\n transitionName = _this$props.transitionName,\n animation = _this$props.animation,\n onChildLeaved = _this$props.onChildLeaved,\n animateKey = _this$props.animateKey;\n\n\n var $ele = _this.getDomElement();\n\n // Skip if dom element not ready\n if (!$ele) return;\n\n // [Legacy] Add animation/transition event by dom level\n if (transitionSupport && _this.$prevEle !== $ele) {\n _this.cleanDomEvent();\n\n _this.$prevEle = $ele;\n _this.$prevEle.addEventListener(__WEBPACK_IMPORTED_MODULE_12__util__[\"a\" /* animationEndName */], _this.onMotionEnd);\n _this.$prevEle.addEventListener(__WEBPACK_IMPORTED_MODULE_12__util__[\"g\" /* transitionEndName */], _this.onMotionEnd);\n }\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) {\n // Additional process the leave event\n if (currentEvent.lastEventType === 'leave') {\n onChildLeaved(animateKey);\n }\n return;\n }\n\n var eventType = currentEvent.eventType,\n restQueue = currentEvent.restQueue;\n\n var nodeClasses = __WEBPACK_IMPORTED_MODULE_10_component_classes___default()($ele);\n\n // [Legacy] Since origin code use js to set `className`.\n // This caused that any component without support `className` can be forced set.\n // Let's keep the logic.\n function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }\n\n if (_this.currentEvent && _this.currentEvent.type === eventType) {\n legacyAppendClass();\n return;\n }\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n // Clean up last event environment\n if (_this.currentEvent && _this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // Clean up last transition class\n if (_this.currentEvent) {\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, '' + _this.currentEvent.type);\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, _this.currentEvent.type + '-active');\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // New event come\n _this.currentEvent = {\n type: eventType\n };\n\n var animationHandler = (animation || {})[eventType];\n // =============== Check if has customize animation ===============\n if (animationHandler) {\n _this.currentEvent.animateObj = animationHandler($ele, function () {\n _this.onMotionEnd({ target: $ele });\n });\n\n // Do next step if not animate object provided\n if (!_this.currentEvent || !_this.currentEvent.animateObj) {\n _this.nextEvent(restQueue);\n }\n\n // ==================== Use transition instead ====================\n } else if (transitionSupport) {\n legacyAppendClass();\n if (!eventActive) {\n // Trigger `eventActive` in next frame\n __WEBPACK_IMPORTED_MODULE_11_raf___default()(function () {\n if (_this.currentEvent && _this.currentEvent.type === eventType && !_this._destroy) {\n _this.setState({ eventActive: true }, function () {\n // [Legacy] Handle timeout if browser transition event not handle\n var transitionDelay = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"c\" /* getStyleValue */])($ele, 'transition-delay') || 0;\n var transitionDuration = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"c\" /* getStyleValue */])($ele, 'transition-duration') || 0;\n var animationDelay = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"c\" /* getStyleValue */])($ele, 'animation-delay') || 0;\n var animationDuration = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"c\" /* getStyleValue */])($ele, 'animation-duration') || 0;\n var totalTime = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);\n\n if (totalTime >= 0) {\n _this.timeout = setTimeout(function () {\n _this.onMotionEnd({ target: $ele });\n }, totalTime * 1000);\n }\n });\n }\n });\n }\n\n // ======================= Just next action =======================\n } else {\n _this.onMotionEnd({ target: $ele });\n }\n };\n\n _this.onMotionEnd = function (_ref) {\n var target = _ref.target;\n var _this$props2 = _this.props,\n transitionName = _this$props2.transitionName,\n onChildLeaved = _this$props2.onChildLeaved,\n animateKey = _this$props2.animateKey,\n onAppear = _this$props2.onAppear,\n onEnter = _this$props2.onEnter,\n onLeave = _this$props2.onLeave,\n onEnd = _this$props2.onEnd;\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) return;\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n var restQueue = currentEvent.restQueue;\n\n\n var $ele = _this.getDomElement();\n if (!_this.currentEvent || $ele !== target) return;\n\n if (_this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // [Legacy] Same as above, we need call js to remove the class\n if (transitionSupport && _this.currentEvent) {\n var basicClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, _this.currentEvent.type);\n var activeClassName = Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, _this.currentEvent.type + '-active');\n\n var nodeClasses = __WEBPACK_IMPORTED_MODULE_10_component_classes___default()($ele);\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // Additional process the leave event\n if (_this.currentEvent && _this.currentEvent.type === 'leave') {\n onChildLeaved(animateKey);\n }\n\n // [Legacy] Trigger on event when it's last event\n if (_this.currentEvent && !restQueue.length) {\n if (_this.currentEvent.type === 'appear' && onAppear) {\n onAppear(animateKey);\n } else if (_this.currentEvent.type === 'enter' && onEnter) {\n onEnter(animateKey);\n } else if (_this.currentEvent.type === 'leave' && onLeave) {\n onLeave(animateKey);\n }\n\n if (onEnd) {\n // OnEnd(key, isShow)\n onEnd(animateKey, _this.currentEvent.type !== 'leave');\n }\n }\n\n _this.currentEvent = null;\n\n // Next queue\n _this.nextEvent(restQueue);\n };\n\n _this.getDomElement = function () {\n if (_this._destroy) return null;\n return __WEBPACK_IMPORTED_MODULE_6_react_dom___default.a.findDOMNode(_this);\n };\n\n _this.getCurrentEvent = function () {\n var _this$state$eventQueu = _this.state.eventQueue,\n eventQueue = _this$state$eventQueu === undefined ? [] : _this$state$eventQueu;\n var _this$props3 = _this.props,\n animation = _this$props3.animation,\n exclusive = _this$props3.exclusive,\n transitionAppear = _this$props3.transitionAppear,\n transitionEnter = _this$props3.transitionEnter,\n transitionLeave = _this$props3.transitionLeave;\n\n\n function hasEventHandler(eventType) {\n return eventType === 'appear' && (transitionAppear || animation.appear) || eventType === 'enter' && (transitionEnter || animation.enter) || eventType === 'leave' && (transitionLeave || animation.leave);\n }\n\n var event = null;\n // If is exclusive, only check the last event\n if (exclusive) {\n var eventType = eventQueue[eventQueue.length - 1];\n if (hasEventHandler(eventType)) {\n event = {\n eventType: eventType,\n restQueue: []\n };\n }\n } else {\n // Loop check the queue until find match\n var cloneQueue = eventQueue.slice();\n while (cloneQueue.length) {\n var _cloneQueue = cloneQueue,\n _cloneQueue2 = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_toArray___default()(_cloneQueue),\n _eventType = _cloneQueue2[0],\n restQueue = _cloneQueue2.slice(1);\n\n if (hasEventHandler(_eventType)) {\n event = {\n eventType: _eventType,\n restQueue: restQueue\n };\n break;\n }\n cloneQueue = restQueue;\n }\n }\n\n if (!event) {\n event = {\n empty: true,\n lastEventType: eventQueue[eventQueue.length - 1]\n };\n }\n\n return event;\n };\n\n _this.nextEvent = function (restQueue) {\n // Next queue\n if (!_this._destroy) {\n _this.setState({\n eventQueue: restQueue,\n eventActive: false\n });\n }\n };\n\n _this.cleanDomEvent = function () {\n if (_this.$prevEle && transitionSupport) {\n _this.$prevEle.removeEventListener(__WEBPACK_IMPORTED_MODULE_12__util__[\"a\" /* animationEndName */], _this.onMotionEnd);\n _this.$prevEle.removeEventListener(__WEBPACK_IMPORTED_MODULE_12__util__[\"g\" /* transitionEndName */], _this.onMotionEnd);\n }\n };\n\n _this.$prevEle = null;\n\n _this.currentEvent = null;\n _this.timeout = null;\n return _this;\n }\n\n __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(AnimateChild, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.onDomUpdated();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.onDomUpdated();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearTimeout(this.timeout);\n this._destroy = true;\n this.cleanDomEvent();\n }\n }, {\n key: 'render',\n value: function render() {\n var _state = this.state,\n child = _state.child,\n eventActive = _state.eventActive;\n var _props = this.props,\n showProp = _props.showProp,\n transitionName = _props.transitionName;\n\n var _ref2 = child.props || {},\n className = _ref2.className;\n\n var currentEvent = this.getCurrentEvent();\n\n // Class name\n var connectClassName = transitionSupport && this.currentEvent ? __WEBPACK_IMPORTED_MODULE_9_classnames___default()(className, Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, this.currentEvent.type), eventActive && Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"d\" /* getTransitionName */])(transitionName, this.currentEvent.type + '-active')) : className;\n\n var show = true;\n\n // Keep show when is in transition or has customize animate\n if (transitionSupport && (!currentEvent.empty || this.currentEvent && this.currentEvent.animateObj)) {\n show = true;\n } else {\n show = child.props[showProp];\n }\n\n // Clone child\n var newChildProps = {\n className: connectClassName\n };\n\n if (showProp) {\n newChildProps[showProp] = show;\n }\n\n return __WEBPACK_IMPORTED_MODULE_5_react___default.a.cloneElement(child, newChildProps);\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n var _prevState$prevProps = prevState.prevProps,\n prevProps = _prevState$prevProps === undefined ? {} : _prevState$prevProps;\n var appeared = nextProps.appeared;\n\n\n var newState = {\n prevProps: Object(__WEBPACK_IMPORTED_MODULE_12__util__[\"b\" /* cloneProps */])(nextProps, clonePropList)\n };\n\n function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n if (updater) {\n updater(nextProps[propName]);\n }\n return true;\n }\n return false;\n }\n\n function pushEvent(eventType) {\n var eventQueue = newState.eventQueue || prevState.eventQueue.slice();\n var matchIndex = eventQueue.indexOf(eventType);\n\n // Clean the rest event if eventType match\n if (matchIndex !== -1) {\n eventQueue = eventQueue.slice(0, matchIndex);\n }\n\n eventQueue.push(eventType);\n newState.eventQueue = eventQueue;\n }\n\n // Child update. Only set child.\n processState('children', function (child) {\n newState.child = child;\n });\n\n processState('appeared', function (isAppeared) {\n if (isAppeared) {\n pushEvent('appear');\n }\n });\n\n // Show update\n processState('show', function (show) {\n if (!appeared) {\n if (show) {\n pushEvent('enter');\n } else {\n pushEvent('leave');\n }\n }\n });\n\n return newState;\n }\n }]);\n\n return AnimateChild;\n }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);\n\n AnimateChild.propTypes = {\n transitionName: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object]),\n transitionAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n transitionEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n transitionLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n exclusive: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n appeared: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,\n showProp: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,\n\n animateKey: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,\n animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,\n onChildLeaved: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n\n onEnd: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n onAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,\n onLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func\n };\n\n\n Object(__WEBPACK_IMPORTED_MODULE_8_react_lifecycles_compat__[\"polyfill\"])(AnimateChild);\n\n return AnimateChild;\n}", "title": "" }, { "docid": "114e9628c86e096bfe7dc6e9646fc367", "score": "0.61437374", "text": "function onAnimationEnd(e) {\n if ($element.hasClass('mos-hiding')) {\n // If it's a TransitionEvent and there is a timer, cancel it (otherwise the events will be fired twice)\n if (e && hideTimer) $timeout.cancel(hideTimer);\n\n $element.addClass('mos-hidden');\n $element.removeClass('mos-hiding');\n dispatch('onFinish');\n }\n }", "title": "" }, { "docid": "fca0eeab0c4fd887012ef5e26634b687", "score": "0.6105495", "text": "_onEnd() {\n this._duringDisplayAnim = false;\n // - need to re render at the end of the display animation\n this._setAnimParams();\n }", "title": "" }, { "docid": "81b055408bc4104cb3030ec607d9b5a3", "score": "0.60900843", "text": "function genAnimateChild(transitionSupport) {\n var AnimateChild = function (_React$Component) {\n babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(AnimateChild, _React$Component);\n\n function AnimateChild() {\n babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, AnimateChild);\n\n // [Legacy] Since old code addListener on the element.\n // To avoid break the behaviour that component not handle animation/transition\n // also can handle the animate, let keep the logic.\n var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).call(this));\n\n _this.state = {\n child: null,\n\n eventQueue: [],\n eventActive: false\n };\n\n _this.onDomUpdated = function () {\n var eventActive = _this.state.eventActive;\n var _this$props = _this.props,\n transitionName = _this$props.transitionName,\n animation = _this$props.animation,\n onChildLeaved = _this$props.onChildLeaved,\n animateKey = _this$props.animateKey;\n\n\n var $ele = _this.getDomElement();\n\n // Skip if dom element not ready\n if (!$ele) return;\n\n // [Legacy] Add animation/transition event by dom level\n if (transitionSupport && _this.$prevEle !== $ele) {\n _this.cleanDomEvent();\n\n _this.$prevEle = $ele;\n _this.$prevEle.addEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"animationEndName\"], _this.onMotionEnd);\n _this.$prevEle.addEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"transitionEndName\"], _this.onMotionEnd);\n }\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) {\n // Additional process the leave event\n if (currentEvent.lastEventType === 'leave') {\n onChildLeaved(animateKey);\n }\n return;\n }\n\n var eventType = currentEvent.eventType,\n restQueue = currentEvent.restQueue;\n\n var nodeClasses = component_classes__WEBPACK_IMPORTED_MODULE_10___default()($ele);\n\n // [Legacy] Since origin code use js to set `className`.\n // This caused that any component without support `className` can be forced set.\n // Let's keep the logic.\n function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }\n\n if (_this.currentEvent && _this.currentEvent.type === eventType) {\n legacyAppendClass();\n return;\n }\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n // Clean up last event environment\n if (_this.currentEvent && _this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // Clean up last transition class\n if (_this.currentEvent) {\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, '' + _this.currentEvent.type);\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, _this.currentEvent.type + '-active');\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // New event come\n _this.currentEvent = {\n type: eventType\n };\n\n var animationHandler = (animation || {})[eventType];\n // =============== Check if has customize animation ===============\n if (animationHandler) {\n _this.currentEvent.animateObj = animationHandler($ele, function () {\n _this.onMotionEnd({ target: $ele });\n });\n\n // Do next step if not animate object provided\n if (!_this.currentEvent || !_this.currentEvent.animateObj) {\n _this.nextEvent(restQueue);\n }\n\n // ==================== Use transition instead ====================\n } else if (transitionSupport) {\n legacyAppendClass();\n if (!eventActive) {\n // Trigger `eventActive` in next frame\n raf__WEBPACK_IMPORTED_MODULE_11___default()(function () {\n if (_this.currentEvent && _this.currentEvent.type === eventType && !_this._destroy) {\n _this.setState({ eventActive: true }, function () {\n // [Legacy] Handle timeout if browser transition event not handle\n var transitionDelay = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'transition-delay') || 0;\n var transitionDuration = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'transition-duration') || 0;\n var animationDelay = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'animation-delay') || 0;\n var animationDuration = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'animation-duration') || 0;\n var totalTime = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);\n\n if (totalTime >= 0) {\n _this.timeout = setTimeout(function () {\n _this.onMotionEnd({ target: $ele });\n }, totalTime * 1000);\n }\n });\n }\n });\n }\n\n // ======================= Just next action =======================\n } else {\n _this.onMotionEnd({ target: $ele });\n }\n };\n\n _this.onMotionEnd = function (_ref) {\n var target = _ref.target;\n var _this$props2 = _this.props,\n transitionName = _this$props2.transitionName,\n onChildLeaved = _this$props2.onChildLeaved,\n animateKey = _this$props2.animateKey,\n onAppear = _this$props2.onAppear,\n onEnter = _this$props2.onEnter,\n onLeave = _this$props2.onLeave,\n onEnd = _this$props2.onEnd;\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) return;\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n var restQueue = currentEvent.restQueue;\n\n\n var $ele = _this.getDomElement();\n if (!_this.currentEvent || $ele !== target) return;\n\n if (_this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // [Legacy] Same as above, we need call js to remove the class\n if (transitionSupport && _this.currentEvent) {\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, _this.currentEvent.type);\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, _this.currentEvent.type + '-active');\n\n var nodeClasses = component_classes__WEBPACK_IMPORTED_MODULE_10___default()($ele);\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // Additional process the leave event\n if (_this.currentEvent && _this.currentEvent.type === 'leave') {\n onChildLeaved(animateKey);\n }\n\n // [Legacy] Trigger on event when it's last event\n if (_this.currentEvent && !restQueue.length) {\n if (_this.currentEvent.type === 'appear' && onAppear) {\n onAppear(animateKey);\n } else if (_this.currentEvent.type === 'enter' && onEnter) {\n onEnter(animateKey);\n } else if (_this.currentEvent.type === 'leave' && onLeave) {\n onLeave(animateKey);\n }\n\n if (onEnd) {\n // OnEnd(key, isShow)\n onEnd(animateKey, _this.currentEvent.type !== 'leave');\n }\n }\n\n _this.currentEvent = null;\n\n // Next queue\n _this.nextEvent(restQueue);\n };\n\n _this.getDomElement = function () {\n if (_this._destroy) return null;\n return react_dom__WEBPACK_IMPORTED_MODULE_6___default.a.findDOMNode(_this);\n };\n\n _this.getCurrentEvent = function () {\n var _this$state$eventQueu = _this.state.eventQueue,\n eventQueue = _this$state$eventQueu === undefined ? [] : _this$state$eventQueu;\n var _this$props3 = _this.props,\n animation = _this$props3.animation,\n exclusive = _this$props3.exclusive,\n transitionAppear = _this$props3.transitionAppear,\n transitionEnter = _this$props3.transitionEnter,\n transitionLeave = _this$props3.transitionLeave;\n\n\n function hasEventHandler(eventType) {\n return eventType === 'appear' && (transitionAppear || animation.appear) || eventType === 'enter' && (transitionEnter || animation.enter) || eventType === 'leave' && (transitionLeave || animation.leave);\n }\n\n var event = null;\n // If is exclusive, only check the last event\n if (exclusive) {\n var eventType = eventQueue[eventQueue.length - 1];\n if (hasEventHandler(eventType)) {\n event = {\n eventType: eventType,\n restQueue: []\n };\n }\n } else {\n // Loop check the queue until find match\n var cloneQueue = eventQueue.slice();\n while (cloneQueue.length) {\n var _cloneQueue = cloneQueue,\n _cloneQueue2 = babel_runtime_helpers_toArray__WEBPACK_IMPORTED_MODULE_0___default()(_cloneQueue),\n _eventType = _cloneQueue2[0],\n restQueue = _cloneQueue2.slice(1);\n\n if (hasEventHandler(_eventType)) {\n event = {\n eventType: _eventType,\n restQueue: restQueue\n };\n break;\n }\n cloneQueue = restQueue;\n }\n }\n\n if (!event) {\n event = {\n empty: true,\n lastEventType: eventQueue[eventQueue.length - 1]\n };\n }\n\n return event;\n };\n\n _this.nextEvent = function (restQueue) {\n // Next queue\n if (!_this._destroy) {\n _this.setState({\n eventQueue: restQueue,\n eventActive: false\n });\n }\n };\n\n _this.cleanDomEvent = function () {\n if (_this.$prevEle && transitionSupport) {\n _this.$prevEle.removeEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"animationEndName\"], _this.onMotionEnd);\n _this.$prevEle.removeEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"transitionEndName\"], _this.onMotionEnd);\n }\n };\n\n _this.$prevEle = null;\n\n _this.currentEvent = null;\n _this.timeout = null;\n return _this;\n }\n\n babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(AnimateChild, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.onDomUpdated();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.onDomUpdated();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearTimeout(this.timeout);\n this._destroy = true;\n this.cleanDomEvent();\n }\n }, {\n key: 'render',\n value: function render() {\n var _state = this.state,\n child = _state.child,\n eventActive = _state.eventActive;\n var _props = this.props,\n showProp = _props.showProp,\n transitionName = _props.transitionName;\n\n var _ref2 = child.props || {},\n className = _ref2.className;\n\n var currentEvent = this.getCurrentEvent();\n\n // Class name\n var connectClassName = transitionSupport && this.currentEvent ? classnames__WEBPACK_IMPORTED_MODULE_9___default()(className, Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, this.currentEvent.type), eventActive && Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, this.currentEvent.type + '-active')) : className;\n\n var show = true;\n\n // Keep show when is in transition or has customize animate\n if (transitionSupport && (!currentEvent.empty || this.currentEvent && this.currentEvent.animateObj)) {\n show = true;\n } else {\n show = child.props[showProp];\n }\n\n // Clone child\n var newChildProps = {\n className: connectClassName\n };\n\n if (showProp) {\n newChildProps[showProp] = show;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_5___default.a.cloneElement(child, newChildProps);\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n var _prevState$prevProps = prevState.prevProps,\n prevProps = _prevState$prevProps === undefined ? {} : _prevState$prevProps;\n var appeared = nextProps.appeared;\n\n\n var newState = {\n prevProps: Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"cloneProps\"])(nextProps, clonePropList)\n };\n\n function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n if (updater) {\n updater(nextProps[propName]);\n }\n return true;\n }\n return false;\n }\n\n function pushEvent(eventType) {\n var eventQueue = newState.eventQueue || prevState.eventQueue.slice();\n var matchIndex = eventQueue.indexOf(eventType);\n\n // Clean the rest event if eventType match\n if (matchIndex !== -1) {\n eventQueue = eventQueue.slice(0, matchIndex);\n }\n\n eventQueue.push(eventType);\n newState.eventQueue = eventQueue;\n }\n\n // Child update. Only set child.\n processState('children', function (child) {\n newState.child = child;\n });\n\n processState('appeared', function (isAppeared) {\n if (isAppeared) {\n pushEvent('appear');\n }\n });\n\n // Show update\n processState('show', function (show) {\n if (!appeared) {\n if (show) {\n pushEvent('enter');\n } else {\n pushEvent('leave');\n }\n }\n });\n\n return newState;\n }\n }]);\n\n return AnimateChild;\n }(react__WEBPACK_IMPORTED_MODULE_5___default.a.Component);\n\n AnimateChild.propTypes = {\n transitionName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object]),\n transitionAppear: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n transitionEnter: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n transitionLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n exclusive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n appeared: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n showProp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,\n\n animateKey: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.any,\n animation: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object,\n onChildLeaved: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n onEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n onAppear: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n onLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func\n };\n\n\n Object(react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_8__[\"polyfill\"])(AnimateChild);\n\n return AnimateChild;\n}", "title": "" }, { "docid": "81b055408bc4104cb3030ec607d9b5a3", "score": "0.60900843", "text": "function genAnimateChild(transitionSupport) {\n var AnimateChild = function (_React$Component) {\n babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(AnimateChild, _React$Component);\n\n function AnimateChild() {\n babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, AnimateChild);\n\n // [Legacy] Since old code addListener on the element.\n // To avoid break the behaviour that component not handle animation/transition\n // also can handle the animate, let keep the logic.\n var _this = babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).call(this));\n\n _this.state = {\n child: null,\n\n eventQueue: [],\n eventActive: false\n };\n\n _this.onDomUpdated = function () {\n var eventActive = _this.state.eventActive;\n var _this$props = _this.props,\n transitionName = _this$props.transitionName,\n animation = _this$props.animation,\n onChildLeaved = _this$props.onChildLeaved,\n animateKey = _this$props.animateKey;\n\n\n var $ele = _this.getDomElement();\n\n // Skip if dom element not ready\n if (!$ele) return;\n\n // [Legacy] Add animation/transition event by dom level\n if (transitionSupport && _this.$prevEle !== $ele) {\n _this.cleanDomEvent();\n\n _this.$prevEle = $ele;\n _this.$prevEle.addEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"animationEndName\"], _this.onMotionEnd);\n _this.$prevEle.addEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"transitionEndName\"], _this.onMotionEnd);\n }\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) {\n // Additional process the leave event\n if (currentEvent.lastEventType === 'leave') {\n onChildLeaved(animateKey);\n }\n return;\n }\n\n var eventType = currentEvent.eventType,\n restQueue = currentEvent.restQueue;\n\n var nodeClasses = component_classes__WEBPACK_IMPORTED_MODULE_10___default()($ele);\n\n // [Legacy] Since origin code use js to set `className`.\n // This caused that any component without support `className` can be forced set.\n // Let's keep the logic.\n function legacyAppendClass() {\n if (!transitionSupport) return;\n\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, '' + eventType);\n if (basicClassName) nodeClasses.add(basicClassName);\n\n if (eventActive) {\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, eventType + '-active');\n if (activeClassName) nodeClasses.add(activeClassName);\n }\n }\n\n if (_this.currentEvent && _this.currentEvent.type === eventType) {\n legacyAppendClass();\n return;\n }\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n // Clean up last event environment\n if (_this.currentEvent && _this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // Clean up last transition class\n if (_this.currentEvent) {\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, '' + _this.currentEvent.type);\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, _this.currentEvent.type + '-active');\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // New event come\n _this.currentEvent = {\n type: eventType\n };\n\n var animationHandler = (animation || {})[eventType];\n // =============== Check if has customize animation ===============\n if (animationHandler) {\n _this.currentEvent.animateObj = animationHandler($ele, function () {\n _this.onMotionEnd({ target: $ele });\n });\n\n // Do next step if not animate object provided\n if (!_this.currentEvent || !_this.currentEvent.animateObj) {\n _this.nextEvent(restQueue);\n }\n\n // ==================== Use transition instead ====================\n } else if (transitionSupport) {\n legacyAppendClass();\n if (!eventActive) {\n // Trigger `eventActive` in next frame\n raf__WEBPACK_IMPORTED_MODULE_11___default()(function () {\n if (_this.currentEvent && _this.currentEvent.type === eventType && !_this._destroy) {\n _this.setState({ eventActive: true }, function () {\n // [Legacy] Handle timeout if browser transition event not handle\n var transitionDelay = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'transition-delay') || 0;\n var transitionDuration = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'transition-duration') || 0;\n var animationDelay = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'animation-delay') || 0;\n var animationDuration = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getStyleValue\"])($ele, 'animation-duration') || 0;\n var totalTime = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);\n\n if (totalTime >= 0) {\n _this.timeout = setTimeout(function () {\n _this.onMotionEnd({ target: $ele });\n }, totalTime * 1000);\n }\n });\n }\n });\n }\n\n // ======================= Just next action =======================\n } else {\n _this.onMotionEnd({ target: $ele });\n }\n };\n\n _this.onMotionEnd = function (_ref) {\n var target = _ref.target;\n var _this$props2 = _this.props,\n transitionName = _this$props2.transitionName,\n onChildLeaved = _this$props2.onChildLeaved,\n animateKey = _this$props2.animateKey,\n onAppear = _this$props2.onAppear,\n onEnter = _this$props2.onEnter,\n onLeave = _this$props2.onLeave,\n onEnd = _this$props2.onEnd;\n\n var currentEvent = _this.getCurrentEvent();\n if (currentEvent.empty) return;\n\n // Clear timeout for legacy check\n clearTimeout(_this.timeout);\n\n var restQueue = currentEvent.restQueue;\n\n\n var $ele = _this.getDomElement();\n if (!_this.currentEvent || $ele !== target) return;\n\n if (_this.currentEvent.animateObj && _this.currentEvent.animateObj.stop) {\n _this.currentEvent.animateObj.stop();\n }\n\n // [Legacy] Same as above, we need call js to remove the class\n if (transitionSupport && _this.currentEvent) {\n var basicClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, _this.currentEvent.type);\n var activeClassName = Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, _this.currentEvent.type + '-active');\n\n var nodeClasses = component_classes__WEBPACK_IMPORTED_MODULE_10___default()($ele);\n if (basicClassName) nodeClasses.remove(basicClassName);\n if (activeClassName) nodeClasses.remove(activeClassName);\n }\n\n // Additional process the leave event\n if (_this.currentEvent && _this.currentEvent.type === 'leave') {\n onChildLeaved(animateKey);\n }\n\n // [Legacy] Trigger on event when it's last event\n if (_this.currentEvent && !restQueue.length) {\n if (_this.currentEvent.type === 'appear' && onAppear) {\n onAppear(animateKey);\n } else if (_this.currentEvent.type === 'enter' && onEnter) {\n onEnter(animateKey);\n } else if (_this.currentEvent.type === 'leave' && onLeave) {\n onLeave(animateKey);\n }\n\n if (onEnd) {\n // OnEnd(key, isShow)\n onEnd(animateKey, _this.currentEvent.type !== 'leave');\n }\n }\n\n _this.currentEvent = null;\n\n // Next queue\n _this.nextEvent(restQueue);\n };\n\n _this.getDomElement = function () {\n if (_this._destroy) return null;\n return react_dom__WEBPACK_IMPORTED_MODULE_6___default.a.findDOMNode(_this);\n };\n\n _this.getCurrentEvent = function () {\n var _this$state$eventQueu = _this.state.eventQueue,\n eventQueue = _this$state$eventQueu === undefined ? [] : _this$state$eventQueu;\n var _this$props3 = _this.props,\n animation = _this$props3.animation,\n exclusive = _this$props3.exclusive,\n transitionAppear = _this$props3.transitionAppear,\n transitionEnter = _this$props3.transitionEnter,\n transitionLeave = _this$props3.transitionLeave;\n\n\n function hasEventHandler(eventType) {\n return eventType === 'appear' && (transitionAppear || animation.appear) || eventType === 'enter' && (transitionEnter || animation.enter) || eventType === 'leave' && (transitionLeave || animation.leave);\n }\n\n var event = null;\n // If is exclusive, only check the last event\n if (exclusive) {\n var eventType = eventQueue[eventQueue.length - 1];\n if (hasEventHandler(eventType)) {\n event = {\n eventType: eventType,\n restQueue: []\n };\n }\n } else {\n // Loop check the queue until find match\n var cloneQueue = eventQueue.slice();\n while (cloneQueue.length) {\n var _cloneQueue = cloneQueue,\n _cloneQueue2 = babel_runtime_helpers_toArray__WEBPACK_IMPORTED_MODULE_0___default()(_cloneQueue),\n _eventType = _cloneQueue2[0],\n restQueue = _cloneQueue2.slice(1);\n\n if (hasEventHandler(_eventType)) {\n event = {\n eventType: _eventType,\n restQueue: restQueue\n };\n break;\n }\n cloneQueue = restQueue;\n }\n }\n\n if (!event) {\n event = {\n empty: true,\n lastEventType: eventQueue[eventQueue.length - 1]\n };\n }\n\n return event;\n };\n\n _this.nextEvent = function (restQueue) {\n // Next queue\n if (!_this._destroy) {\n _this.setState({\n eventQueue: restQueue,\n eventActive: false\n });\n }\n };\n\n _this.cleanDomEvent = function () {\n if (_this.$prevEle && transitionSupport) {\n _this.$prevEle.removeEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"animationEndName\"], _this.onMotionEnd);\n _this.$prevEle.removeEventListener(_util__WEBPACK_IMPORTED_MODULE_12__[\"transitionEndName\"], _this.onMotionEnd);\n }\n };\n\n _this.$prevEle = null;\n\n _this.currentEvent = null;\n _this.timeout = null;\n return _this;\n }\n\n babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(AnimateChild, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.onDomUpdated();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.onDomUpdated();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearTimeout(this.timeout);\n this._destroy = true;\n this.cleanDomEvent();\n }\n }, {\n key: 'render',\n value: function render() {\n var _state = this.state,\n child = _state.child,\n eventActive = _state.eventActive;\n var _props = this.props,\n showProp = _props.showProp,\n transitionName = _props.transitionName;\n\n var _ref2 = child.props || {},\n className = _ref2.className;\n\n var currentEvent = this.getCurrentEvent();\n\n // Class name\n var connectClassName = transitionSupport && this.currentEvent ? classnames__WEBPACK_IMPORTED_MODULE_9___default()(className, Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, this.currentEvent.type), eventActive && Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionName\"])(transitionName, this.currentEvent.type + '-active')) : className;\n\n var show = true;\n\n // Keep show when is in transition or has customize animate\n if (transitionSupport && (!currentEvent.empty || this.currentEvent && this.currentEvent.animateObj)) {\n show = true;\n } else {\n show = child.props[showProp];\n }\n\n // Clone child\n var newChildProps = {\n className: connectClassName\n };\n\n if (showProp) {\n newChildProps[showProp] = show;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_5___default.a.cloneElement(child, newChildProps);\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, prevState) {\n var _prevState$prevProps = prevState.prevProps,\n prevProps = _prevState$prevProps === undefined ? {} : _prevState$prevProps;\n var appeared = nextProps.appeared;\n\n\n var newState = {\n prevProps: Object(_util__WEBPACK_IMPORTED_MODULE_12__[\"cloneProps\"])(nextProps, clonePropList)\n };\n\n function processState(propName, updater) {\n if (prevProps[propName] !== nextProps[propName]) {\n if (updater) {\n updater(nextProps[propName]);\n }\n return true;\n }\n return false;\n }\n\n function pushEvent(eventType) {\n var eventQueue = newState.eventQueue || prevState.eventQueue.slice();\n var matchIndex = eventQueue.indexOf(eventType);\n\n // Clean the rest event if eventType match\n if (matchIndex !== -1) {\n eventQueue = eventQueue.slice(0, matchIndex);\n }\n\n eventQueue.push(eventType);\n newState.eventQueue = eventQueue;\n }\n\n // Child update. Only set child.\n processState('children', function (child) {\n newState.child = child;\n });\n\n processState('appeared', function (isAppeared) {\n if (isAppeared) {\n pushEvent('appear');\n }\n });\n\n // Show update\n processState('show', function (show) {\n if (!appeared) {\n if (show) {\n pushEvent('enter');\n } else {\n pushEvent('leave');\n }\n }\n });\n\n return newState;\n }\n }]);\n\n return AnimateChild;\n }(react__WEBPACK_IMPORTED_MODULE_5___default.a.Component);\n\n AnimateChild.propTypes = {\n transitionName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object]),\n transitionAppear: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n transitionEnter: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n transitionLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n exclusive: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n appeared: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n showProp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,\n\n animateKey: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.any,\n animation: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object,\n onChildLeaved: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n onEnd: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n onAppear: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n onLeave: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func\n };\n\n\n Object(react_lifecycles_compat__WEBPACK_IMPORTED_MODULE_8__[\"polyfill\"])(AnimateChild);\n\n return AnimateChild;\n}", "title": "" }, { "docid": "992cb9ad910d8803f22d345b2fbb774e", "score": "0.6067571", "text": "handleAnimationEnd() {\n this.setState({ triggerEnabled: false });\n }", "title": "" }, { "docid": "13243669a2ae6d2a6b31432f873dcd42", "score": "0.5950615", "text": "function onTransitionEnd(event){// check running on gallery mode\n// make sure trantionend/animationend events run only once\nif(carousel||running){events.emit('transitionEnd',info(event));if(!carousel&&slideItemsOut.length>0){for(var i=0;i<slideItemsOut.length;i++){var item=slideItemsOut[i];// set item positions\nitem.style.left='';if(ANIMATIONDELAY&&TRANSITIONDELAY){item.style[ANIMATIONDELAY]='';item.style[TRANSITIONDELAY]='';}removeClass(item,animateOut);addClass(item,animateNormal);}}/* update slides, nav, controls after checking ...\n * => legacy browsers who don't support 'event' \n * have to check event first, otherwise event.target will cause an error \n * => or 'gallery' mode: \n * + event target is slide item\n * => or 'carousel' mode: \n * + event target is container, \n * + event.property is the same with transform attribute\n */if(!event||!carousel&&event.target.parentNode===container||event.target===container&&strTrans(event.propertyName)===strTrans(transformAttr)){if(!updateIndexBeforeTransform){var indexTem=index;updateIndex();if(index!==indexTem){events.emit('indexChanged',info());doContainerTransformSilent();}}if(autoHeight){runAutoHeight();}if(nested==='inner'){events.emit('innerLoaded',info());}running=false;navCurrentIndexCached=navCurrentIndex;indexCached=index;}}}// # ACTIONS", "title": "" }, { "docid": "abf218d8e7bd581435cb1cc10082a2dc", "score": "0.5943917", "text": "function handleAnimationEnd(event) {\n event.stopPropagation();\n node.classList.remove(`${prefix}animated`, animationName);\n resolve('Animation ended');\n }", "title": "" }, { "docid": "90a1fddeb3ac7660540718fb789f5149", "score": "0.58697045", "text": "onAnimationEnd_() {\n if (this.isOpen_()) {\n // On open sidebar\n const children = this.getRealChildren();\n this.scheduleLayout(children);\n this.scheduleResume(children);\n tryFocus(this.element);\n } else {\n // On close sidebar\n this.vsync_.mutate(() => {\n toggle(this.element, /* display */false);\n this.schedulePause(this.getRealChildren());\n });\n }\n }", "title": "" }, { "docid": "a0b7062f7b4877519907f7457961cfc9", "score": "0.5867272", "text": "onTransitionEnd() {\n this.isInAnimation = false;\n // if any method in queue, then invoke it\n if (this.visualEffectQueue.length) {\n let action = this.visualEffectQueue.shift(); // remove method from queue and invoke it\n this.isInAnimation = action.isAnimated;\n action.action();\n }\n }", "title": "" }, { "docid": "666bcb4b3bd1785fbd0aa09db8ffe6cc", "score": "0.58645904", "text": "function handleAnimationEnd(event) {\n event.stopPropagation();\n node.classList.remove(`${prefix}animated`, animationName);\n resolve('Animation ended');\n }", "title": "" }, { "docid": "dccb1fcba261e4bd3416c7fd7ac98444", "score": "0.58627564", "text": "onAnimationEnd(event) {\n const { fromState, toState } = event;\n if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {\n this._completeExit();\n }\n if (toState === 'visible') {\n // Note: we shouldn't use `this` inside the zone callback,\n // because it can cause a memory leak.\n const onEnter = this._onEnter;\n this._ngZone.run(() => {\n onEnter.next();\n onEnter.complete();\n });\n }\n }", "title": "" }, { "docid": "dccb1fcba261e4bd3416c7fd7ac98444", "score": "0.58627564", "text": "onAnimationEnd(event) {\n const { fromState, toState } = event;\n if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {\n this._completeExit();\n }\n if (toState === 'visible') {\n // Note: we shouldn't use `this` inside the zone callback,\n // because it can cause a memory leak.\n const onEnter = this._onEnter;\n this._ngZone.run(() => {\n onEnter.next();\n onEnter.complete();\n });\n }\n }", "title": "" }, { "docid": "12e339bd71761b0d13936bdd7fe0568e", "score": "0.58611923", "text": "function onTransitionEnd(duration, callback) {\n var tooltip = instance.popperChildren.tooltip;\n /**\n * Listener added as the `transitionend` handler\n */\n\n function listener(event) {\n if (event.target === tooltip) {\n updateTransitionEndListener(tooltip, 'remove', listener);\n callback();\n }\n } // Make callback synchronous if duration is 0\n // `transitionend` won't fire otherwise\n\n\n if (duration === 0) {\n return callback();\n }\n\n updateTransitionEndListener(tooltip, 'remove', currentTransitionEndListener);\n updateTransitionEndListener(tooltip, 'add', listener);\n currentTransitionEndListener = listener;\n }", "title": "" }, { "docid": "59de4697e5b57e98ac9c44e7757f1269", "score": "0.58573383", "text": "handleAnimationEnd() {\n this.isAnimating = false;\n this.index = (this.index + 1) % this.greetings.length;\n\n setTimeout(() => this.updateGreeting(), 500);\n }", "title": "" }, { "docid": "a6a41d5926a46cbb5cb9bbfb4baa18f8", "score": "0.58548385", "text": "OnAnimationEnd() {\n // Remove the container containing the delete animations\n if (this._deleteContainer) {\n this.removeChild(this._deleteContainer);\n this._deleteContainer = null;\n }\n\n // Clean up the old container used by black box updates\n if (this._oldContainer) {\n this.removeChild(this._oldContainer);\n this._oldContainer = null;\n }\n\n // Restore event listeners\n this.EventManager.addListeners(this);\n\n // Restore visual effects on node with keyboard focus\n this._processInitialFocus(true);\n\n // Process the highlightedCategories\n this._processInitialHighlighting();\n\n if (!this.AnimationStopped) this.RenderComplete();\n\n // Reset animation flags\n this.Animation = null;\n this.AnimationStopped = false;\n }", "title": "" }, { "docid": "08485216f9d08283b906106ea30d39e4", "score": "0.58479244", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'oTransitionEnd otransitionend',\n 'transition': 'transitionend'\n }\n\n for(var name in transEndEventNames) {\n if(el.style[name] !== undefined) {\n return {\n end: transEndEventNames[name]\n }\n }\n }\n }", "title": "" }, { "docid": "f92f4ade210ffa8095f3aaf0d974916b", "score": "0.584216", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'oTransitionEnd otransitionend',\n 'transition': 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {\n end: transEndEventNames[name]\n }\n }\n }\n }", "title": "" }, { "docid": "f92f4ade210ffa8095f3aaf0d974916b", "score": "0.584216", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'oTransitionEnd otransitionend',\n 'transition': 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {\n end: transEndEventNames[name]\n }\n }\n }\n }", "title": "" }, { "docid": "1ff9d71f72c930957d69a1945a2ac9cb", "score": "0.58404964", "text": "function handleAnimationEnd(event) {\n\t\tevent.stopPropagation();\n\t\tnode.classList.remove(`${prefix}animated`, animationName);\n\t\tresolve('Animation ended');\n\t}", "title": "" }, { "docid": "7ca0f697ce30e056a2374ba90996b33e", "score": "0.582781", "text": "function handleAnimationEnd(event) {\n event.stopPropagation();\n node.classList.remove(`${prefix}animated`, animationName);\n resolve('Animation ended');\n }", "title": "" }, { "docid": "160bc44525496fc16ba0deefe3d39bc9", "score": "0.5807711", "text": "function handleAnimationEnd(event) {\n event.stopPropagation();\n node.classList.remove(`${prefix}animated`, animationName);\n node.classList.remove(`animate__faster`);\n resolve('Animation ended');\n }", "title": "" }, { "docid": "c5d50d4280835233bf26152ec0d667f4", "score": "0.5805693", "text": "function onTransitionEnd (event) {\n // check running on gallery mode\n // make sure trantionend/animationend events run only once\n if (carousel || running) {\n events.emit('transitionEnd', info(event));\n\n if (!carousel && slideItemsOut.length > 0) {\n for (var i = 0; i < slideItemsOut.length; i++) {\n var item = slideItemsOut[i];\n // set item positions\n item.style.left = '';\n\n if (ANIMATIONDELAY && TRANSITIONDELAY) {\n item.style[ANIMATIONDELAY] = '';\n item.style[TRANSITIONDELAY] = '';\n }\n removeClass(item, animateOut);\n addClass(item, animateNormal);\n }\n }\n\n /* update slides, nav, controls after checking ...\n * => legacy browsers who don't support 'event'\n * have to check event first, otherwise event.target will cause an error\n * => or 'gallery' mode:\n * + event target is slide item\n * => or 'carousel' mode:\n * + event target is container,\n * + event.property is the same with transform attribute\n */\n if (!event ||\n !carousel && event.target.parentNode === container ||\n event.target === container && strTrans(event.propertyName) === strTrans(transformAttr)) {\n\n if (!updateIndexBeforeTransform) {\n var indexTem = index;\n updateIndex();\n if (index !== indexTem) {\n events.emit('indexChanged', info());\n\n doContainerTransformSilent();\n }\n }\n\n if (nested === 'inner') { events.emit('innerLoaded', info()); }\n running = false;\n indexCached = index;\n }\n }\n\n }", "title": "" }, { "docid": "81e7b3d85242d710f3099d9200b84c94", "score": "0.5770144", "text": "_unbindLayoutAnimationEndEvent() {\n const sidenav = this.getSidenav()\n\n if (this._transitionCallbackTimeout) {\n clearTimeout(this._transitionCallbackTimeout)\n this._transitionCallbackTimeout = null\n }\n\n if (sidenav && this._transitionCallback) {\n TRANSITION_EVENTS.forEach(e => {\n sidenav.removeEventListener(e, this._transitionCallback, false)\n })\n }\n\n if (this._transitionCallback) {\n this._transitionCallback = null\n }\n }", "title": "" }, { "docid": "f609b5e766dfa898264c88ed757e12e3", "score": "0.57660353", "text": "transitionCompleted() {\n // implement if needed\n }", "title": "" }, { "docid": "15e37a950a78c90ecfb07200b245b382", "score": "0.57598567", "text": "OnAnimationEnd() {\n // If the animation is complete (and not stopped), then rerender to restore any flourishes hidden during animation.\n if (!this.AnimationStopped) {\n this._container.removeChildren();\n\n // Finally, re-layout and render the component\n var availSpace = new Rectangle(0, 0, this.Width, this.Height);\n this.Layout(availSpace);\n this.Render(this._container, availSpace);\n\n // Reselect the nodes using the selection handler's state\n var selectedNodes = this._selectionHandler ? this._selectionHandler.getSelection() : [];\n for (var i = 0; i < selectedNodes.length; i++) selectedNodes[i].setSelected(true);\n }\n\n // : Force full angle extent in case the display animation didn't complete\n if (this._angleExtent < 2 * Math.PI) this._animateAngleExtent(2 * Math.PI);\n\n // Delegate to the superclass to clear common things\n super.OnAnimationEnd();\n }", "title": "" }, { "docid": "944de6e91b75765f2e6ff902db3da332", "score": "0.5750306", "text": "function onTransitionEnd(duration, callback) {\n var tooltip = instance.popperChildren.tooltip;\n /**\n * Listener added as the `transitionend` handler\n */\n\n function listener(event) {\n if (event.target === tooltip) {\n updateTransitionEndListener(tooltip, 'remove', listener);\n callback();\n }\n } // Make callback synchronous if duration is 0\n // `transitionend` won't fire otherwise\n\n\n if (duration === 0) {\n return callback();\n }\n\n updateTransitionEndListener(tooltip, 'remove', currentTransitionEndListener);\n updateTransitionEndListener(tooltip, 'add', listener);\n currentTransitionEndListener = listener;\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "93123a79b72e5ab2089773de9032ea3f", "score": "0.5687183", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition' : 'webkitTransitionEnd'\n , 'MozTransition' : 'transitionend'\n , 'OTransition' : 'oTransitionEnd otransitionend'\n , 'transition' : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n }", "title": "" }, { "docid": "06859d8d9166c3ceec6aa87813a6bea4", "score": "0.56814855", "text": "function applyTransitionClass (el, stage, changeState, hasAnimation) {\n\n if (!endEvents.trans) {\n changeState()\n return codes.CSS_SKIP\n }\n\n // if the browser supports transition,\n // it must have classList...\n var onEnd,\n classList = el.classList,\n existingCallback = el.vue_trans_cb,\n enterClass = config.enterClass,\n leaveClass = config.leaveClass,\n endEvent = hasAnimation ? endEvents.anim : endEvents.trans\n\n // cancel unfinished callbacks and jobs\n if (existingCallback) {\n el.removeEventListener(endEvent, existingCallback)\n classList.remove(enterClass)\n classList.remove(leaveClass)\n el.vue_trans_cb = null\n }\n\n if (stage > 0) { // enter\n\n // set to enter state before appending\n classList.add(enterClass)\n // append\n changeState()\n // trigger transition\n if (!hasAnimation) {\n batcher.push({\n execute: function () {\n classList.remove(enterClass)\n }\n })\n } else {\n onEnd = function (e) {\n if (e.target === el) {\n el.removeEventListener(endEvent, onEnd)\n el.vue_trans_cb = null\n classList.remove(enterClass)\n }\n }\n el.addEventListener(endEvent, onEnd)\n el.vue_trans_cb = onEnd\n }\n return codes.CSS_E\n\n } else { // leave\n\n if (el.offsetWidth || el.offsetHeight) {\n // trigger hide transition\n classList.add(leaveClass)\n onEnd = function (e) {\n if (e.target === el) {\n el.removeEventListener(endEvent, onEnd)\n el.vue_trans_cb = null\n // actually remove node here\n changeState()\n classList.remove(leaveClass)\n }\n }\n // attach transition end listener\n el.addEventListener(endEvent, onEnd)\n el.vue_trans_cb = onEnd\n } else {\n // directly remove invisible elements\n changeState()\n }\n return codes.CSS_L\n \n }\n\n}", "title": "" }, { "docid": "46d7797096a2174965c61354441213a1", "score": "0.5643557", "text": "_onAnimationDone(event) {\n this._animationDone.next(event);\n this._isAnimating = false;\n }", "title": "" }, { "docid": "b03ee023f94550aef179dcf57c6e5180", "score": "0.56412756", "text": "function sniffEndEvents () {\n var el = document.createElement('vue'),\n defaultEvent = 'transitionend',\n events = {\n 'webkitTransition' : 'webkitTransitionEnd',\n 'transition' : defaultEvent,\n 'mozTransition' : defaultEvent\n },\n ret = {}\n for (var name in events) {\n if (el.style[name] !== undefined) {\n ret.trans = events[name]\n break\n }\n }\n ret.anim = el.style.animation === ''\n ? 'animationend'\n : 'webkitAnimationEnd'\n return ret\n}", "title": "" }, { "docid": "1fa0c83484285c1c7f61c33d6f4709e4", "score": "0.5637322", "text": "onAnimationEnd(event) {\n if (event.animationName === 'b-ripple-expand') {\n this.hide();\n }\n }", "title": "" }, { "docid": "648002e8710f1b707cd0ec8293a10a57", "score": "0.56224066", "text": "endAll() {\n this.animations.forEach((anim) => anim.onEnd());\n this.animations = [];\n }", "title": "" }, { "docid": "4209ea3a93303b9b01db62ca16421ef3", "score": "0.5601433", "text": "onAnimationEnd(event) {\n if (event.animationName === 'b-ripple-expand') {\n this.hide();\n }\n }", "title": "" }, { "docid": "d863e5d68ab3aaae26849505d41c8d7c", "score": "0.5559098", "text": "onAnimationEnd(event) {\n if (event.animationName === 'b-ripple-expand') {\n this.hide();\n }\n }", "title": "" }, { "docid": "54f491d96550f6575a109ec6bc2e6b5c", "score": "0.55486596", "text": "function transitionEnd() {\n var el = document.createElement( 'bootstrap' )\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n for ( var name in transEndEventNames ) {\n if ( el.style[ name ] !== undefined ) {\n return {\n end: transEndEventNames[ name ]\n }\n }\n }\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "d475749ed191678bb97507270824844e", "score": "0.55444145", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {end: transEndEventNames[name]}\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "d475749ed191678bb97507270824844e", "score": "0.55444145", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {end: transEndEventNames[name]}\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "d475749ed191678bb97507270824844e", "score": "0.55444145", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {end: transEndEventNames[name]}\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "7be9be82cea2ae902106d0ce7239e11d", "score": "0.55377", "text": "_onAnimationDone({ toState, totalTime }) {\n if (toState === 'enter') {\n this._openAnimationDone(totalTime);\n }\n else if (toState === 'exit') {\n this._animationStateChanged.next({ state: 'closed', totalTime });\n }\n }", "title": "" }, { "docid": "7be9be82cea2ae902106d0ce7239e11d", "score": "0.55377", "text": "_onAnimationDone({ toState, totalTime }) {\n if (toState === 'enter') {\n this._openAnimationDone(totalTime);\n }\n else if (toState === 'exit') {\n this._animationStateChanged.next({ state: 'closed', totalTime });\n }\n }", "title": "" }, { "docid": "2eb6b37fe29aafad79888fbce2445e5c", "score": "0.5530811", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "a686d4b3b98f777e9d84f4f0991dcd35", "score": "0.5525271", "text": "function AnimateGroup( props ) {\n\n const {\n // Convenience property for setting animationIn and animationOut\n // at once; e.g. setting animation=\"slide\" is equivalent to\n // animationIn=\"slideIn\" animationOut=\"slideOut\"\n animation,\n // Name of animation used when adding a new component.\n // See theme/index.js for animation names.\n animationIn = animation+'In',\n // Name of animation used when removing an existing component.\n animationOut = animation+'Out',\n // The CSS class name to apply to the group container.\n className,\n // Transition out duration.\n durationOut,\n // The group children.\n children\n } = props\n\n const transition = `transition: opacity ${durationOut}ms ease-out`\n const animationInCSS = animations[animationIn] || animationIn\n const animationOutCSS = animations[animationOut] || animationOut\n\n const childState = {\n entering: node => node.style = 'display: none',\n entered: node => node.style = `${transition}; opacity: 1; ${css('animation',animationInCSS)}`,\n exiting: node => node.style = `${transition}; opacity: 0; ${css('animation',animationOutCSS)}`,\n exited: node => node.style = `${transition}; opacity: 0; ${css('animation',animationOutCSS)}`\n }\n\n const groupChildren = React.Children.toArray(children).map(child => {\n const { key } = child\n return (<Transition\n key={key}\n timeout={500}\n onEntering={childState.entering}\n onEntered={childState.entered}\n onExiting={childState.exiting}\n onExited={childState.exited}\n >\n {child}\n </Transition>)\n })\n\n return (<TransitionGroup className={className}>\n {groupChildren}\n </TransitionGroup>)\n}", "title": "" }, { "docid": "44e030938152b3f18dd0d4c9e227f876", "score": "0.5510765", "text": "function onEnd() {\n element.off(css3AnimationEvents, onAnimationProgress);\n $$jqLite.removeClass(element, activeClassName);\n $$jqLite.removeClass(element, pendingClassName);\n if (staggerTimeout) {\n $timeout.cancel(staggerTimeout);\n }\n animateClose(element, className);\n var node = extractElementNode(element);\n for (var i in appliedStyles) {\n node.style.removeProperty(appliedStyles[i]);\n }\n }", "title": "" }, { "docid": "44e030938152b3f18dd0d4c9e227f876", "score": "0.5510765", "text": "function onEnd() {\n element.off(css3AnimationEvents, onAnimationProgress);\n $$jqLite.removeClass(element, activeClassName);\n $$jqLite.removeClass(element, pendingClassName);\n if (staggerTimeout) {\n $timeout.cancel(staggerTimeout);\n }\n animateClose(element, className);\n var node = extractElementNode(element);\n for (var i in appliedStyles) {\n node.style.removeProperty(appliedStyles[i]);\n }\n }", "title": "" }, { "docid": "44e030938152b3f18dd0d4c9e227f876", "score": "0.5510765", "text": "function onEnd() {\n element.off(css3AnimationEvents, onAnimationProgress);\n $$jqLite.removeClass(element, activeClassName);\n $$jqLite.removeClass(element, pendingClassName);\n if (staggerTimeout) {\n $timeout.cancel(staggerTimeout);\n }\n animateClose(element, className);\n var node = extractElementNode(element);\n for (var i in appliedStyles) {\n node.style.removeProperty(appliedStyles[i]);\n }\n }", "title": "" }, { "docid": "68784595f907b22fc0b7d70063095092", "score": "0.55076486", "text": "_onScrollEnd() {\n\n // Enable the animation class\n this._enableAnimation();\n\n // Stop after one frame so that animation is fully reenabled\n window.setTimeout(function() {\n this.stop({\n type: 'scroll'\n });\n }.bind(this), 1);\n }", "title": "" }, { "docid": "bb9dfd20de17a99ac21781fb716077b4", "score": "0.54996294", "text": "supportsTransitionEnd() {\n return Boolean(TRANSITION_END);\n }", "title": "" }, { "docid": "6c71a9212dd7e3bcc6cf137f51acfad2", "score": "0.5494564", "text": "function transitionEnd() {\n var el = document.createElement(\"bootstrap\");\n var transEndEventNames = {\n WebkitTransition: \"webkitTransitionEnd\",\n MozTransition: \"transitionend\",\n OTransition: \"oTransitionEnd otransitionend\",\n transition: \"transitionend\"\n };\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {\n end: transEndEventNames[name]\n };\n }\n }\n\n return false; // explicit for ie8 ( ._.)\n} // http://blog.alexmaccaw.com/css-transitions", "title": "" }, { "docid": "f6a2ed7ffdfb8c8c619b4ffd45338f62", "score": "0.5486733", "text": "endTransitionHandler(e) {\n if (this.active === true) {\n this.changeToDeactive();\n } else if (this.active === false) {\n this.transitionEndListenerOff();\n }\n }", "title": "" }, { "docid": "0c28f26339f8eb45b3d6752664c56c58", "score": "0.5480748", "text": "handleAnimationEnded ( result ) {\n \n if( result ) {\n this.props.handleOnChangeSurvey(this.state);\n }\n }", "title": "" }, { "docid": "2025b363fa033dc1ca7754bc9a4ed74a", "score": "0.54670954", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {\n end: transEndEventNames[name]\n }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "031ec28cb52d09b83b0b427a56a982d3", "score": "0.5464958", "text": "function onEnd() {\n element.off(css3AnimationEvents, onAnimationProgress);\n $$jqLite.removeClass(element, activeClassName);\n $$jqLite.removeClass(element, pendingClassName);\n if (staggerTimeout) {\n $timeout.cancel(staggerTimeout);\n }\n animateClose(element, className);\n var node = extractElementNode(element);\n for (var i in appliedStyles) {\n node.style.removeProperty(appliedStyles[i]);\n }\n }", "title": "" }, { "docid": "08e240b686d37e505e8f564d90b849ca", "score": "0.54635227", "text": "function animationCompleted()\n{\n // Remove the tick event listener.\n TweenMax.ticker.removeEventListener(\"tick\");\n\n // Reenable the test button.\n animationTest.disabled = false;\n}", "title": "" }, { "docid": "aef945e382b6f439479a0c6160ebf08b", "score": "0.54472584", "text": "function onEnd() {\n\t\t\t\t\t\t\telement.off(css3AnimationEvents, onAnimationProgress);\n\t\t\t\t\t\t\t$$jqLite.removeClass(element, activeClassName);\n\t\t\t\t\t\t\t$$jqLite.removeClass(element, pendingClassName);\n\t\t\t\t\t\t\tif (staggerTimeout) {\n\t\t\t\t\t\t\t\t$timeout.cancel(staggerTimeout);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tanimateClose(element, className);\n\t\t\t\t\t\t\tvar node = extractElementNode(element);\n\t\t\t\t\t\t\tfor (var i in appliedStyles) {\n\t\t\t\t\t\t\t\tnode.style.removeProperty(appliedStyles[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "title": "" }, { "docid": "87159c52f1499bed3bd9eb48fd3d35fe", "score": "0.54423213", "text": "function useAnimationGroupSubscription(animation, controls) {\r\n var unsubscribe = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useMemo\"])(function () { return animation.subscribe(controls); }, [\r\n animation,\r\n ]);\r\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(function () { return function () {\r\n unsubscribe && unsubscribe();\r\n }; }, [unsubscribe]);\r\n}", "title": "" }, { "docid": "4dfaafd8606065f0f67da096269bb37d", "score": "0.5440165", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n 'WebkitTransition': 'webkitTransitionEnd',\n 'MozTransition': 'transitionend',\n 'OTransition': 'oTransitionEnd otransitionend',\n 'transition': 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {\n end: transEndEventNames[name]\n }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "751c798da5eae3c08878f1be34635c31", "score": "0.54366076", "text": "function setEndAnimation() {\r\n\t\t\tinAnimation = false;\r\n\t\t}", "title": "" }, { "docid": "0d6fcd9bb4d35d9768b111028de2a499", "score": "0.54357016", "text": "function transEventEnd(){\n var tr;\n var elem = document.createElement('tempElement');\n var transListener = {\n 'transition':'transitionend',\n 'OTransition':'oTransitionEnd',\n 'MozTransition':'transitionend',\n 'WebkitTransition':'webkitTransitionEnd' \n }\n for (tr in transListener){\n if (elem.style[tr] !== undefined){\n return transListener[tr];\n }\n }\n}", "title": "" }, { "docid": "9ce007e9c0776f611fdbaa3fdd71094f", "score": "0.54311293", "text": "function transitionEnd() {\n var el = document.createElement(\"bootstrap\");\n\n var transEndEventNames = {\n WebkitTransition: \"webkitTransitionEnd\",\n MozTransition: \"transitionend\",\n OTransition: \"oTransitionEnd otransitionend\",\n transition: \"transitionend\",\n };\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {\n end: transEndEventNames[name],\n };\n }\n }\n\n return false; // explicit for ie8 ( ._.)\n}", "title": "" }, { "docid": "33b3f129f762dd87064d01a7dc148e39", "score": "0.54233927", "text": "function finished(ev){if(ev&&ev.target!==element[0])return;if(ev)$timeout.cancel(timer);element.off($mdConstant.CSS.TRANSITIONEND,finished);// Never reject since ngAnimate may cause timeouts due missed transitionEnd events\n\tresolve();}", "title": "" }, { "docid": "da8c660a692f28df7127a5d3f9bac5fc", "score": "0.5403902", "text": "function createAnimListeners() {\n let toAnimate = document.querySelectorAll(\".toAnimate\");\n\n // go over all animated divs and add scroll-point\n // and listeners for enter and exit screen\n for (let i = 0; i < toAnimate.length; i++) {\n const element = toAnimate[i];\n element.classList.add(\"scroll-point\");\n element.classList.remove(\"toAnimate\");\n element.addEventListener(\"viewenter\", animate);\n element.addEventListener(\"viewout\", resetAnimation);\n }\n\n let imgDiv = document.querySelectorAll(\".switch-img\");\n // go over all switching images divs and add enter screen listener\n for (let i = 0; i < imgDiv.length; i++) {\n const element = imgDiv[i];\n element.classList.add(\"scroll-point\");\n element.addEventListener(\"viewenter\", switchImgTimer);\n }\n}", "title": "" }, { "docid": "3be202ebf6954e7fb0444071074300e1", "score": "0.5394982", "text": "function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "61ca300fb1989fdc05a1e8b28f518f55", "score": "0.53939486", "text": "function finishAnimations() {\n if (transition == null)\n throw new Error('Transition was already finished or never started.');\n\n for (const anim of document.getAnimations())\n anim.finish();\n}", "title": "" }, { "docid": "0c0b1dbd14890ffb589852eb25993780", "score": "0.53925335", "text": "_onFinishedEvent() {\n this._finished += 1;\n\n if (this._finished === this._babylonNumAnimations) {\n this._looped = 0;\n this._finished = 0;\n\n // Pause the animations\n this._babylonAnimatables.forEach(animatable => {\n animatable.speedRatio = 0;\n });\n\n this._promises.play.resolve();\n\n // Stop evaluating interpolators if they have already completed\n if (!this.weightPending && !this.timeScalePending) {\n this._paused = true;\n }\n }\n }", "title": "" }, { "docid": "66e9ffcda498fce0855d4d36b92f0bc3", "score": "0.5384054", "text": "transitionListeners() {\n\t\tlet body = this.content;\n\n\t\tbody.style['transitionProperty'] = \"font, font-size, font-size-adjust, font-stretch, font-variation-settings, font-weight, width, height\";\n\t\tbody.style['transitionDuration'] = \"0.001ms\";\n\t\tbody.style['transitionTimingFunction'] = \"linear\";\n\t\tbody.style['transitionDelay'] = \"0\";\n\n\t\tthis._resizeCheck = this.resizeCheck.bind(this);\n\t\tthis.document.addEventListener('transitionend', this._resizeCheck);\n\t}", "title": "" }, { "docid": "da34cc3bdd34ab33c33579e118e33515", "score": "0.5381306", "text": "_transitionendHandlerExpand() {\n let menu, container;\n\n if (arguments.length === 1) {\n if (arguments[0].propertyName === 'visibility') {\n return;\n }\n\n container = this;\n menu = container.menuItemsGroup.menu;\n }\n else {\n menu = arguments[0];\n container = arguments[1];\n }\n\n container.removeEventListener('transitionend', menu._transitionendHandlerExpand);\n container.style.height = null;\n menu._checkOverflow(menu.$.mainContainer, false, [menu.$.scrollButtonNear, menu.$.scrollButtonFar]);\n\n if (menu._minimized) {\n menu._browserBoundsDetection(menu.$.mainContainer);\n }\n\n if (menu._ensureVisibleOnTransitionend) {\n menu._ensureVisible(menu._ensureVisibleOnTransitionend);\n delete menu._ensureVisibleOnTransitionend;\n }\n\n delete menu._treeAnimationInProgress;\n }", "title": "" }, { "docid": "89cecab3d15aa539b28c6241ac9cdc6a", "score": "0.53808486", "text": "function transitionEnd() {\n var el = document.createElement('smartbanner')\n\n var transEndEventNames = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return {end: transEndEventNames[name]}\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }", "title": "" }, { "docid": "7dd81bebc4dcb005aa3b750728505fe4", "score": "0.5366784", "text": "bindEvents() {\n this.$node.on(transitionEndEvt, () => {\n // On transitionEnd determine if the item is filtered out or not,\n // in case it is add the .filteredOut class for easy targeting by\n // the user and set the z-index to -1000 to prevent mouse events\n // from being intercepted.\n const { filteredOut } = this.props;\n this.$node.toggleClass('filteredOut', filteredOut);\n this.$node.css('z-index', filteredOut ? -1000 : '');\n });\n }", "title": "" }, { "docid": "f17842925f62f43dcf2ae7565efb9e7d", "score": "0.53562295", "text": "_transitionendHandlerCollapse() {\n let menu, container;\n\n if (arguments.length === 1) {\n if (arguments[0].propertyName === 'visibility') {\n return;\n }\n\n container = this;\n menu = container.menuItemsGroup.menu;\n }\n else {\n menu = arguments[0];\n container = arguments[1];\n }\n\n container.menuItemsGroup.$.removeClass('jqx-' + menu._element + '-items-group-expanded');\n container.removeEventListener('transitionend', menu._transitionendHandlerCollapse);\n container.style.height = null;\n container.$.addClass('jqx-visibility-hidden');\n menu._checkOverflow(menu.$.mainContainer, false, [menu.$.scrollButtonNear, menu.$.scrollButtonFar]);\n\n if (menu._minimized) {\n menu._browserBoundsDetection(menu.$.mainContainer);\n }\n\n delete menu._treeAnimationInProgress;\n }", "title": "" } ]
7f0fce4c08c4eb3eeab3769a9d21a75d
Copyright 2020 Oriol Brufau Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
[ { "docid": "799edd6d586d504373da94169606460e", "score": "0.0", "text": "async function check(s) {\n function checkGet(arg, expected) {\n return expect(s.get(arg)).resolves.toStrictEqual(expected);\n }\n\n // Empty storage\n await checkGet(undefined, {});\n await checkGet(\"a\", {});\n await checkGet([\"a\"], {});\n await checkGet([\"a\", \"b\"], {});\n await checkGet({a: undefined}, {});\n await checkGet({a: 1}, {a: 1});\n await checkGet({a: 1, b: undefined}, {a: 1});\n await checkGet({a: 1, b: 2}, {a: 1, b: 2});\n\n // Store an item\n await expect(s.set({a: 10})).resolves.toBe(undefined);\n await checkGet(undefined, {a: 10});\n await checkGet(\"a\", {a: 10});\n await checkGet([\"a\"], {a: 10});\n await checkGet(\"b\", {});\n await checkGet([\"b\"], {});\n await checkGet([\"a\", \"b\"], {a: 10});\n await checkGet({a: undefined}, {a: 10});\n await checkGet({b: undefined}, {});\n await checkGet({a: 1}, {a: 10});\n await checkGet({b: 1}, {b: 1});\n await checkGet({a: undefined, b: undefined}, {a: 10});\n await checkGet({a: 1, b: undefined}, {a: 10});\n await checkGet({a: undefined, b: 2}, {a: 10, b: 2});\n await checkGet({a: 1, b: 2}, {a: 10, b: 2});\n\n // Update the previous item and store a new one\n await expect(s.set({a: 11, b: 22})).resolves.toBe(undefined);\n await checkGet(undefined, {a: 11, b: 22});\n await checkGet(\"a\", {a: 11});\n await checkGet([\"a\"], {a: 11});\n await checkGet(\"b\", {b: 22});\n await checkGet([\"b\"], {b: 22});\n await checkGet(\"c\", {});\n await checkGet([\"c\"], {});\n await checkGet([\"a\", \"b\"], {a: 11, b: 22});\n await checkGet([\"a\", \"c\"], {a: 11});\n await checkGet([\"b\", \"c\"], {b: 22});\n await checkGet([\"a\", \"b\", \"c\"], {a: 11, b: 22});\n await checkGet({a: undefined}, {a: 11});\n await checkGet({b: undefined}, {b: 22});\n await checkGet({c: undefined}, {});\n await checkGet({a: 1}, {a: 11});\n await checkGet({b: 2}, {b: 22});\n await checkGet({c: 3}, {c: 3});\n await checkGet({a: undefined, b: undefined}, {a: 11, b: 22});\n await checkGet({a: 1, b: undefined}, {a: 11, b: 22});\n await checkGet({a: undefined, b: 2}, {a: 11, b: 22});\n await checkGet({a: 1, b: 2}, {a: 11, b: 22});\n await checkGet({a: undefined, c: undefined}, {a: 11});\n await checkGet({a: 1, c: undefined}, {a: 11});\n await checkGet({a: undefined, c: 3}, {a: 11, c: 3});\n await checkGet({a: 1, c: 3}, {a: 11, c: 3});\n await checkGet({b: undefined, c: undefined}, {b: 22});\n await checkGet({b: 2, c: undefined}, {b: 22});\n await checkGet({b: undefined, c: 3}, {b: 22, c: 3});\n await checkGet({b: 2, c: 3}, {b: 22, c: 3});\n await checkGet({a: undefined, b: undefined, c: undefined}, {a: 11, b: 22});\n await checkGet({a: 1, b: undefined, c: undefined}, {a: 11, b: 22});\n await checkGet({a: undefined, b: 2, c: undefined}, {a: 11, b: 22});\n await checkGet({a: 1, b: 2, c: undefined}, {a: 11, b: 22});\n await checkGet({a: undefined, b: undefined, c: 3}, {a: 11, b: 22, c: 3});\n await checkGet({a: 1, b: undefined, c: 3}, {a: 11, b: 22, c: 3});\n await checkGet({a: undefined, b: 2, c: 3}, {a: 11, b: 22, c: 3});\n await checkGet({a: 1, b: 2, c: 3}, {a: 11, b: 22, c: 3});\n\n // Set an item to undefined\n await expect(s.set({b: undefined})).resolves.toBe(undefined);\n await checkGet(undefined, {a: 11, b: undefined});\n await checkGet(\"a\", {a: 11});\n await checkGet([\"a\"], {a: 11});\n await checkGet(\"b\", {});\n await checkGet([\"b\"], {});\n await checkGet(\"c\", {});\n await checkGet([\"c\"], {});\n await checkGet([\"a\", \"b\"], {a: 11});\n await checkGet([\"a\", \"c\"], {a: 11});\n await checkGet([\"b\", \"c\"], {});\n await checkGet([\"a\", \"b\", \"c\"], {a: 11});\n await checkGet({a: undefined}, {a: 11});\n await checkGet({b: undefined}, {});\n await checkGet({c: undefined}, {});\n await checkGet({a: 1}, {a: 11});\n await checkGet({b: 2}, {b: 2});\n await checkGet({c: 3}, {c: 3});\n await checkGet({a: undefined, b: undefined}, {a: 11});\n await checkGet({a: 1, b: undefined}, {a: 11});\n await checkGet({a: undefined, b: 2}, {a: 11, b: 2});\n await checkGet({a: 1, b: 2}, {a: 11, b: 2});\n await checkGet({a: undefined, c: undefined}, {a: 11});\n await checkGet({a: 1, c: undefined}, {a: 11});\n await checkGet({a: undefined, c: 3}, {a: 11, c: 3});\n await checkGet({a: 1, c: 3}, {a: 11, c: 3});\n await checkGet({b: undefined, c: undefined}, {});\n await checkGet({b: 2, c: undefined}, {b: 2});\n await checkGet({b: undefined, c: 3}, {c: 3});\n await checkGet({b: 2, c: 3}, {b: 2, c: 3});\n await checkGet({a: undefined, b: undefined, c: undefined}, {a: 11});\n await checkGet({a: 1, b: undefined, c: undefined}, {a: 11});\n await checkGet({a: undefined, b: 2, c: undefined}, {a: 11, b: 2});\n await checkGet({a: 1, b: 2, c: undefined}, {a: 11, b: 2});\n await checkGet({a: undefined, b: undefined, c: 3}, {a: 11, c: 3});\n await checkGet({a: 1, b: undefined, c: 3}, {a: 11, c: 3});\n await checkGet({a: undefined, b: 2, c: 3}, {a: 11, b: 2, c: 3});\n await checkGet({a: 1, b: 2, c: 3}, {a: 11, b: 2, c: 3});\n}", "title": "" } ]
[ { "docid": "f6c4bcf3779a3df1abe6d86a335563a7", "score": "0.5922187", "text": "static supported () {\n return false\n }", "title": "" }, { "docid": "5579feadfa6921ed4cd413533705d439", "score": "0.54597193", "text": "constructor() {\n // Not yet implemented\n }", "title": "" }, { "docid": "6b1058340f927cec4da531568795c919", "score": "0.54322463", "text": "supportsPlatform() {\n return true;\n }", "title": "" }, { "docid": "008297ed96407676c226cc4ceee5d4e6", "score": "0.53512377", "text": "static get version() {\n return \"0.2.0\";\n }", "title": "" }, { "docid": "ab21067e9b117a38ebafed906f651599", "score": "0.53385854", "text": "function t(e,t,a,i){var s,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,i);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n<3?s(r):n>3?s(t,a,r):s(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */}", "title": "" }, { "docid": "55abf935a4811b79deb4da35099e5c61", "score": "0.52655196", "text": "function t(e,t,i,s){var a,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */}", "title": "" }, { "docid": "d0cca65553cf2fb6a61f6410b3e202b7", "score": "0.5203479", "text": "function a(e,a,t,i){var s,n=arguments.length,r=n<3?a:null===i?i=Object.getOwnPropertyDescriptor(a,t):i;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)r=Reflect.decorate(e,a,t,i);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(n<3?s(r):n>3?s(a,t,r):s(a,t))||r);return n>3&&r&&Object.defineProperty(a,t,r),r\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */}", "title": "" }, { "docid": "2bf48d841958aa212f601f5a685fc598", "score": "0.51835495", "text": "static attributes() { return {} }", "title": "" }, { "docid": "937a6dbd73c7b37a5e85badd6baf7ed9", "score": "0.51681185", "text": "supports() {}", "title": "" }, { "docid": "4540d71adab18ca1f54167347e771b66", "score": "0.5158363", "text": "static async version() {\n // not implemented\n return -1\n }", "title": "" }, { "docid": "a6507de220f93eb9f18abbc1f353d91b", "score": "0.5125052", "text": "export () {\n\n }", "title": "" }, { "docid": "95b8836e5dc342b7bfab5a9b25c1b249", "score": "0.5105307", "text": "static get USERDEFINED() { return 3; }", "title": "" }, { "docid": "76b018937a48f9f0c459c03e5389419d", "score": "0.50717044", "text": "function t(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "title": "" }, { "docid": "c229922befc0b8f2d068d2dc06fd9551", "score": "0.5069869", "text": "getPack() {\n throw new Error('getPack() is not implemented');\n }", "title": "" }, { "docid": "1914240086e0b5758da8ad4ddd13cf2f", "score": "0.5057879", "text": "function t(e,t,a,i){var s,n=arguments.length,o=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,a):i;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,a,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(n<3?s(o):n>3?s(t,a,o):s(t,a))||o);return n>3&&o&&Object.defineProperty(t,a,o),o\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "title": "" }, { "docid": "4846cf63c70f947018bf9f567ced4ea8", "score": "0.5053202", "text": "static get HEADERS() {\n return 1;\n }", "title": "" }, { "docid": "6330a87c658a25cadeeeb862478516cb", "score": "0.5023784", "text": "function t(e,t,i,s){var a,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(n<3?a(o):n>3?a(t,i,o):a(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "title": "" }, { "docid": "6330a87c658a25cadeeeb862478516cb", "score": "0.5023784", "text": "function t(e,t,i,s){var a,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(n<3?a(o):n>3?a(t,i,o):a(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "title": "" }, { "docid": "3f506a59bed880ab693661525f2aaa0d", "score": "0.5011737", "text": "supportedVersions() {\n return [\n \"001\",\n \"002\",\n \"003\"\n ];\n }", "title": "" }, { "docid": "8e267666f358f3dcdc55ba494e7d725e", "score": "0.5002803", "text": "get VERSION() {\n return \"0.4.1\";\n }", "title": "" }, { "docid": "745153ed0fd0866be0dff28986c2b653", "score": "0.5000933", "text": "function t(e,t,r,i){var a,s=arguments.length,n=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,i);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s<3?a(n):s>3?a(t,r,n):a(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "title": "" }, { "docid": "3a73585d638e7aba5df0099026a2a0ec", "score": "0.498358", "text": "function getVersion() {\n return '3.41.1';\n}", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.4978819", "text": "constructor() {\n \n }", "title": "" }, { "docid": "43ae366d1f3a3f9b5e3faa962cbf54e1", "score": "0.4978129", "text": "detect() {\n return false;\n }", "title": "" }, { "docid": "bafbf9145256341c85e9c82e38d5b1d7", "score": "0.49631843", "text": "exists() {\n throw new Error('Not implemented yet')\n }", "title": "" }, { "docid": "e96775cc7d0d41c002a1c6a0af9643cb", "score": "0.49560574", "text": "get VERSION() {\n\n return \"0.4.1\";\n\n }", "title": "" }, { "docid": "ce1bebc4a6edf642619a97d39235d769", "score": "0.4954197", "text": "getOptions() /*: ?{} */ {\n return null;\n }", "title": "" }, { "docid": "4bfd470444a2eabc8cd5fd147c0a2cd7", "score": "0.48997822", "text": "supportsDirect() {\n return true;\n }", "title": "" }, { "docid": "97f25759ff2312b34f735a2a774e7cd5", "score": "0.48804426", "text": "function util() {\n\n}", "title": "" }, { "docid": "6cb07a12c6ca7cece25ba905393d59a2", "score": "0.487176", "text": "function g(){return(\"undefined\"==typeof navigator||\"ReactNative\"!==navigator.product)&&(\"undefined\"!=typeof window&&\"undefined\"!=typeof document)}", "title": "" }, { "docid": "6bd24a201f9d90ed65c9b388c3148500", "score": "0.4869051", "text": "function s(t,e,i,n){var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s\n/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */}", "title": "" }, { "docid": "2ecb5786f966322680b38b70b4712221", "score": "0.4866394", "text": "create() {\n throw new Error('Not implemented yet')\n }", "title": "" }, { "docid": "465474742efc3e7a59d441b84041361d", "score": "0.48419353", "text": "target() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "370b0a32f82d819d48de24c61f752553", "score": "0.48378918", "text": "require() {\n return null;\n }", "title": "" }, { "docid": "b2429722fc6ac27c991787e89d06624f", "score": "0.48357108", "text": "static get description () {\n return 'Find duplication in the package tree'\n }", "title": "" }, { "docid": "58e671dc369be6417370db60a6fab168", "score": "0.4834721", "text": "constructor () { }", "title": "" }, { "docid": "79650aebf5993fb4ac924a4590fdd9be", "score": "0.48188987", "text": "supportsMarketplace() {\n return true;\n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.48149323", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "e380d6f7af27de6c9180cada8d6367c6", "score": "0.4801837", "text": "static get isSupported() {}", "title": "" }, { "docid": "db6182ffb17bc076ae7019c32a79c269", "score": "0.47864532", "text": "function issueUtils()\n{\n}", "title": "" }, { "docid": "a7ac9135ed89cb6b594b965ae9c1df8e", "score": "0.47700334", "text": "function DependencyReadable() {\n\n}", "title": "" }, { "docid": "fb74a22c99265b178ecc30de8739b17e", "score": "0.4757028", "text": "async function $(s,o){const i=q(Object(_core_devEnvironmentUtils_js__WEBPACK_IMPORTED_MODULE_0__[\"adjustStaticAGOUrl\"])(s));if(\"wosr\"===i.fileType){const e=await(o.cache?o.cache.loadWOSR(i.url,o):Object(_wosrLoader_js__WEBPACK_IMPORTED_MODULE_16__[\"load\"])(i.url,o)),t=Object(_wosrLoader_js__WEBPACK_IMPORTED_MODULE_16__[\"processLoadResult\"])(e,o);return{lods:[t],referenceBoundingBox:t.boundingBox,isEsriSymbolResource:!1,isWosr:!0,remove:e.remove}}const a=await(o.cache?o.cache.loadGLTF(i.url,o,o.usePBR):Object(_glTF_loader_js__WEBPACK_IMPORTED_MODULE_14__[\"load\"])(new _glTF_DefaultLoadingContext_js__WEBPACK_IMPORTED_MODULE_13__[\"DefaultLoadingContext\"](o.streamDataRequester),i.url,o,o.usePBR)),u=Object(_core_maybe_js__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(a.model.meta,\"ESRI_proxyEllipsoid\");a.meta.isEsriSymbolResource&&Object(_core_maybe_js__WEBPACK_IMPORTED_MODULE_1__[\"isSome\"])(u)&&-1!==a.meta.uri.indexOf(\"/RealisticTrees/\")&&J(a,u);const n=a.meta.isEsriSymbolResource?{usePBR:o.usePBR,isSchematic:!1,treeRendering:a.customMeta.esriTreeRendering,mrrFactors:[0,1,.2]}:{usePBR:o.usePBR,isSchematic:!1,mrrFactors:[0,1,.5]},l={...o.materialParamsMixin,treeRendering:a.customMeta.esriTreeRendering};if(null!=i.specifiedLodIndex){const e=K(a,n,l,i.specifiedLodIndex);let t=e[0].boundingBox;if(0!==i.specifiedLodIndex){t=K(a,n,l,0)[0].boundingBox}return{lods:e,referenceBoundingBox:t,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1,remove:a.remove}}const c=K(a,n,l);return{lods:c,referenceBoundingBox:c[0].boundingBox,isEsriSymbolResource:a.meta.isEsriSymbolResource,isWosr:!1,remove:a.remove}}", "title": "" }, { "docid": "e20d36a8b26e163da19fe04ae884c878", "score": "0.47546354", "text": "constructor() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "e1fd6370f9dceb24ecc3cd7ebbb8a8e8", "score": "0.4752612", "text": "function SigV4Utils() { }", "title": "" }, { "docid": "9049381b05377f037fbb3dbd18beab12", "score": "0.47519103", "text": "getConfig() {\n return null\n }", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.47454166", "text": "constructor() {\n\t}", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.47454166", "text": "constructor() {\n\t}", "title": "" }, { "docid": "8f1ea5922c1f2cca37960f60e1325d4d", "score": "0.47449943", "text": "isGMOnly() {\n return false\n }", "title": "" }, { "docid": "392d29b64a71ff1455fd29e265a63926", "score": "0.4742946", "text": "browser() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "9c77af5fd86875e31980755b7860b3e6", "score": "0.4738073", "text": "function S(){null===_featureset_support_cache_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].applicationCache&&(_featureset_support_cache_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].applicationCache=new _featureset_support_cache_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"])}", "title": "" }, { "docid": "5bd59ac83c8a97408f44dffb3f046eca", "score": "0.4737214", "text": "version() { }", "title": "" }, { "docid": "b858437845d186774356a01ce26a78ab", "score": "0.47083423", "text": "static get snapshot () { return true }", "title": "" }, { "docid": "73ebd854ae5e549b5b9d93955063dc8e", "score": "0.4688727", "text": "function Utils() {\n\t\n }", "title": "" }, { "docid": "e709e71d522b9f57d7abefd8724cffc8", "score": "0.46831474", "text": "constructor() {\r\n\t}", "title": "" }, { "docid": "3f852e29ed83284122c670ef2c3e334d", "score": "0.4675833", "text": "constructor() {\n\t\t}", "title": "" }, { "docid": "db8b7c911eedeca4e957640e9ba0dcb2", "score": "0.4668274", "text": "constructor() {\n\t\t\n\t}", "title": "" }, { "docid": "d81ed1d004d12d20a92ad54149900ef2", "score": "0.46609366", "text": "static get dependencies() {\n return [];\n }", "title": "" } ]
0a15baefdb9a53e71bd689f6256f7157
The node over which the dock wheel is being displayed on
[ { "docid": "7fa17d549907c2919f7926b6b00b9385", "score": "0.53598785", "text": "get activeNode() {\n return this._activeNode;\n }", "title": "" } ]
[ { "docid": "a2b4733dc5111eaef8bd229e78b6a275", "score": "0.64071023", "text": "dockOn () {\r\n return this.dock || 'right'\r\n }", "title": "" }, { "docid": "fef5f5743f2e870797445fb0808b1775", "score": "0.6250272", "text": "get openMenuNodeRect() {\n return this.openMenuNode.getBoundingClientRect();\n }", "title": "" }, { "docid": "2e7ebd0caba7e308f3594b24e7909695", "score": "0.6238547", "text": "nodeAt(idx) {\n\t\tlet nodes = this.content.getElementsByTagName(\"dock-node\");\n\t\tif(idx >= 0 && idx < nodes.length) {\n\t\t\treturn nodes.item(idx);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "832ca82387fd8eda61c7e4f906a40f9c", "score": "0.6075445", "text": "getSelectedDock() {\n\t\tif (this.tabsDialog.isShown())\n\t\t\treturn this.tabsDialog.getSelectedDock();\n\t\telse\n\t\t\treturn atom.workspace.getActivePaneContainer().getLocation();\n\t}", "title": "" }, { "docid": "a579a9cca5ef6154193ac749d197fe5e", "score": "0.6017652", "text": "get originNodeRect() {\n return this.originNode.getBoundingClientRect();\n }", "title": "" }, { "docid": "f043ee5e1f6b36ba266e909c9c758eac", "score": "0.58697945", "text": "function getAlignTarget() {\n if (point) {\n return point;\n }\n\n return getRootDomNode;\n }", "title": "" }, { "docid": "f043ee5e1f6b36ba266e909c9c758eac", "score": "0.58697945", "text": "function getAlignTarget() {\n if (point) {\n return point;\n }\n\n return getRootDomNode;\n }", "title": "" }, { "docid": "f043ee5e1f6b36ba266e909c9c758eac", "score": "0.58697945", "text": "function getAlignTarget() {\n if (point) {\n return point;\n }\n\n return getRootDomNode;\n }", "title": "" }, { "docid": "f043ee5e1f6b36ba266e909c9c758eac", "score": "0.58697945", "text": "function getAlignTarget() {\n if (point) {\n return point;\n }\n\n return getRootDomNode;\n }", "title": "" }, { "docid": "f043ee5e1f6b36ba266e909c9c758eac", "score": "0.58697945", "text": "function getAlignTarget() {\n if (point) {\n return point;\n }\n\n return getRootDomNode;\n }", "title": "" }, { "docid": "c6916076331fb1bb02918630cfa59b20", "score": "0.58417445", "text": "function getNode() {\n var range = this._document.selection.createRange();\n return jQuery(range.parentElement());\n }", "title": "" }, { "docid": "7868808ade143b1ac6921472a58208ff", "score": "0.5818026", "text": "get originNode() {\n return this.trigger;\n }", "title": "" }, { "docid": "a35a8404086024822d35b5a881f552a5", "score": "0.57488495", "text": "function getInteractNode() {\n\t\treturn interactNode;\n\t}", "title": "" }, { "docid": "a74b33c1ccef066f0d80e7ea8ac9500d", "score": "0.5728358", "text": "get drawer() {\n return dom(this.$.drawerSlot).getDistributedNodes()[0];\n }", "title": "" }, { "docid": "09931a245acb1dcef822ce4d074b71e6", "score": "0.5719259", "text": "getHostNode() {\n return this.hostEl;\n }", "title": "" }, { "docid": "ba29c6dc3283b2ff4b05a5fa8e0b7c0e", "score": "0.57122064", "text": "get drawer() {\n return Polymer.dom(this.$.drawerContent).getDistributedNodes()[0];\n }", "title": "" }, { "docid": "abe2caf454d5677c63a2a17f686800cb", "score": "0.5668199", "text": "get node() {\n return this._node;\n }", "title": "" }, { "docid": "9dda148e7e35155a95d62840bfb8ffc9", "score": "0.5656998", "text": "get node() {\n return this._node;\n }", "title": "" }, { "docid": "096c80a63be2808631a21f7b10ed5c26", "score": "0.56400114", "text": "getX() { return this.node.layout.x * this.opts.ratio }", "title": "" }, { "docid": "303ab0b4d64bf9c0a2c76b0ee845c5c9", "score": "0.56397265", "text": "function showPotentialNode(){\n\tif (withinBounds(mouseX, mouseY, screen_bounds)){\n\t\tif (sandbox.type == 0 || sandbox.type == 1)\n\t\t\tnodes[nodes.length - 1].setPosition(closestGridPoint(mouseX, mouseY, sandbox.coords));\n\t\telse\n\t\t\tnodes[nodes.length - 1].setPosition([mouseX, mouseY]);\n\t}\n\n\tif (edges.length > 0)\n\t\tedges[edges.length - 1].setEnd(nodes[nodes.length - 1].pos.x, nodes[nodes.length - 1].pos.y);\n}", "title": "" }, { "docid": "b6406cbf93c889340a97e0d79e809a31", "score": "0.56325805", "text": "getActiveNode() {\n return this.activeNode;\n }", "title": "" }, { "docid": "6da86300c7c9d1606988c440d5c8bcb7", "score": "0.55961514", "text": "function getPositionForSelectionRectNodeType(){\n //console.log(\"getPositionForSelectionRectNodeType\");\n return getPositionForSelectionRectGeneral(selectedNodeType.model);\n }", "title": "" }, { "docid": "2d2adba7b7c6b7dbdd329e5a849fb5c0", "score": "0.55734265", "text": "function nw (nodeId) {\n return nodeId + '-wrapper'\n}", "title": "" }, { "docid": "38ac338c9637109875d46af78b0aceed", "score": "0.55672604", "text": "get topNode() {\n return this.nodeSet.types[this.top[1]];\n }", "title": "" }, { "docid": "3a555e24e8d698d9a11c6bc586d17d7c", "score": "0.5552484", "text": "function getOffset() {\r\n const tip = d3.select(\".d3-tip\").node();\r\n const w = tip.clientWidth;\r\n const h = tip.clientHeight;\r\n const left = tip.offsetLeft;\r\n const top = tip.offsetTop;\r\n let topOffset = -120;\r\n let leftOffset = 0;\r\n\r\n if (top < EDGE_PADDING) {\r\n topOffset = topOffset - top + EDGE_PADDING;\r\n }\r\n\r\n if (left < EDGE_PADDING) {\r\n leftOffset = -left + EDGE_PADDING;\r\n } else if (left + w + EDGE_PADDING > window.innerWidth) {\r\n leftOffset = window.innerWidth - left - w - EDGE_PADDING;\r\n }\r\n\r\n return [topOffset, leftOffset];\r\n }", "title": "" }, { "docid": "3a555e24e8d698d9a11c6bc586d17d7c", "score": "0.5552484", "text": "function getOffset() {\r\n const tip = d3.select(\".d3-tip\").node();\r\n const w = tip.clientWidth;\r\n const h = tip.clientHeight;\r\n const left = tip.offsetLeft;\r\n const top = tip.offsetTop;\r\n let topOffset = -120;\r\n let leftOffset = 0;\r\n\r\n if (top < EDGE_PADDING) {\r\n topOffset = topOffset - top + EDGE_PADDING;\r\n }\r\n\r\n if (left < EDGE_PADDING) {\r\n leftOffset = -left + EDGE_PADDING;\r\n } else if (left + w + EDGE_PADDING > window.innerWidth) {\r\n leftOffset = window.innerWidth - left - w - EDGE_PADDING;\r\n }\r\n\r\n return [topOffset, leftOffset];\r\n }", "title": "" }, { "docid": "d61bc3bb8f57d37bd27cc188df64d770", "score": "0.5522937", "text": "get boundryNodeRect() {\n return this.boundryNode.getBoundingClientRect();\n }", "title": "" }, { "docid": "82a1a3d2b8a4a4470d273133e36a0529", "score": "0.55158716", "text": "getNativeNode() { }", "title": "" }, { "docid": "c46bfb687b1582ccb5eec59caa1fd549", "score": "0.5493794", "text": "function computeCXPositionOfNodeShape(renderInfo) {\n if (renderInfo.expanded) {\n return renderInfo.x;\n }\n var dx = renderInfo.inAnnotations.list.length ? renderInfo.inboxWidth : 0;\n return renderInfo.x - renderInfo.width / 2 + dx +\n renderInfo.coreBox.width / 2;\n }", "title": "" }, { "docid": "7e070e46678f17ef1e1cdad35ee4e4e4", "score": "0.54643327", "text": "get topNode() { return this.nodeSet.types[this.top[1]]; }", "title": "" }, { "docid": "7e070e46678f17ef1e1cdad35ee4e4e4", "score": "0.54643327", "text": "get topNode() { return this.nodeSet.types[this.top[1]]; }", "title": "" }, { "docid": "7e070e46678f17ef1e1cdad35ee4e4e4", "score": "0.54643327", "text": "get topNode() { return this.nodeSet.types[this.top[1]]; }", "title": "" }, { "docid": "b3b64c76b9c525cf87279001cb70e6fb", "score": "0.5440044", "text": "static get nodeIndex() {}", "title": "" }, { "docid": "18cc560e9357ba0e0a4c40bdd9e4c665", "score": "0.5435666", "text": "function portGlobalX(port) {\n return port.x + port.parentNode.x;\n}", "title": "" }, { "docid": "565089a1c172b6bb5dede84e6d3e2c56", "score": "0.5433997", "text": "function calculate_cur_prox_node() {\n\tcur_prox_dis = compute_distance( cur_node.x, sink_node.x, cur_node.y, sink_node.y );\n}", "title": "" }, { "docid": "4c238a5ce6cb853ce8026d56ad9218ab", "score": "0.54116136", "text": "get PARENTAL_CONTROLS() {\n return 450;\n }", "title": "" }, { "docid": "c0ac7dc99540f39fb19229a358bb37d1", "score": "0.5408191", "text": "get ticksPosition() {\n\t\treturn this.nativeElement ? this.nativeElement.ticksPosition : undefined;\n\t}", "title": "" }, { "docid": "05dbdce44b5934eda0846db463ae4da5", "score": "0.5407392", "text": "function nodePos()\n {\n var depth = findDepth();\n radius = (((1 / 2) * (2 - .005)) / (2 ^ (depth - 1)));\n var xPos = 0\n var yPos = 1 - (radius + .0025);\n yOffset = 2*radius;\n nodePosR(nodes[0], xPos, yPos);\n\n }", "title": "" }, { "docid": "8ea62d3570d38627760b77a842b1da34", "score": "0.54021335", "text": "_getTogglePosition() {\n return this.panel.togglePosition;\n }", "title": "" }, { "docid": "8ea62d3570d38627760b77a842b1da34", "score": "0.54021335", "text": "_getTogglePosition() {\n return this.panel.togglePosition;\n }", "title": "" }, { "docid": "0034a83e66613cff5d58af355273e146", "score": "0.540084", "text": "_getDimensions() {\n this.cfg.width = parseInt(this.selection.node().offsetWidth);\n this.cfg.height = parseInt(this.selection.node().offsetHeight);\n this.element.parentElement.parentElement.style.zIndex = '999';\n }", "title": "" }, { "docid": "6be3bd341b5375e9f20374881313af46", "score": "0.53994924", "text": "maxContainerX() {\n // set default to end of the single box\n let maxx = this.coords.x + this.props.width;\n if (this.children.length > 1) {\n let mostRightDescendant = this.lastChild();\n while (mostRightDescendant.children.length) {\n mostRightDescendant = mostRightDescendant.lastChild();\n }\n maxx = mostRightDescendant.coords.x + this.props.width;\n }\n return maxx + this.props.space.sibling;\n }", "title": "" }, { "docid": "f547f03eec9d52bea4452a09d568c5e7", "score": "0.5397399", "text": "nodeAt(pos) {\n if (pos.x+'_'+pos.y in this.nodeGrid) {\n return this.nodeGrid[pos.x+'_'+pos.y];\n }\n else return null;\n }", "title": "" }, { "docid": "7b5e30017a959d3a91b6c8e5f9599d47", "score": "0.5394877", "text": "getNodeAtMousePos(d3Event) {\n\t\tconst nodeGrpElement = this.getElementWithClassAtMousePos(d3Event, \"d3-node-group\");\n\t\treturn this.getNodeForElement(nodeGrpElement);\n\t}", "title": "" }, { "docid": "199fb875b621d42cd199bbc4a1dd8da1", "score": "0.5387548", "text": "_getDomCanvasPosition() {\n return $(this.canvas.upperCanvasEl).offset();\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "39f312111705a5ffce432e340a9bf928", "score": "0.53849643", "text": "_getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }", "title": "" }, { "docid": "739068b45ec893572c7cc8fce18ab99a", "score": "0.5383205", "text": "get alignTarget() {\n let alignTarget;\n\n if (this.positionMode.top === 'target' || this.positionMode.left === 'target' || this.positionMode.left === 'target-right') {\n alignTarget = firstVisibleChild(this.openMenuNode);\n if (alignTarget) {\n // TODO: Allow centering on an arbitrary node, for now center on first menu-item's child\n alignTarget = alignTarget.firstElementChild || alignTarget;\n alignTarget = alignTarget.querySelector('md-icon') || alignTarget.querySelector('.md-menu-align-target') || alignTarget;\n }\n }\n\n return alignTarget;\n }", "title": "" }, { "docid": "2db9c65088352dd77bd1bb70b7b146b6", "score": "0.53828055", "text": "get rootWidget() { return this.rootNode; }", "title": "" }, { "docid": "3db7da6a0c5b5bf2c7d9a6f49506de3c", "score": "0.5380011", "text": "ot() {\n return this.root.ot();\n }", "title": "" }, { "docid": "0bcb425591655e165fe2c13466d9f879", "score": "0.5376529", "text": "async centerOperator() {\n let operatorId = this.get('currentOperator.id');\n let node = this.get('graph')._nodes[operatorId];\n if (isPresent(node)) {\n this.zoomToNode(node);\n this.highlightActiveNode(this.get('currentOperator.guid'));\n }\n }", "title": "" }, { "docid": "959ea6707be0f82f871d14be6f663005", "score": "0.53740895", "text": "__getNodeShape(node, rot = this.rotation(), relative) {\r\n var rect = node.getClientRect({\r\n skipTransform: true,\r\n skipShadow: true,\r\n skipStroke: this.ignoreStroke(),\r\n });\r\n var absScale = node.getAbsoluteScale(relative);\r\n var absPos = node.getAbsolutePosition(relative);\r\n var dx = rect.x * absScale.x - node.offsetX() * absScale.x;\r\n var dy = rect.y * absScale.y - node.offsetY() * absScale.y;\r\n const rotation = (Konva$2.getAngle(node.getAbsoluteRotation()) + Math.PI * 2) %\r\n (Math.PI * 2);\r\n const box = {\r\n x: absPos.x + dx * Math.cos(rotation) + dy * Math.sin(-rotation),\r\n y: absPos.y + dy * Math.cos(rotation) + dx * Math.sin(rotation),\r\n width: rect.width * absScale.x,\r\n height: rect.height * absScale.y,\r\n rotation: rotation,\r\n };\r\n return rotateAroundPoint(box, -Konva$2.getAngle(rot), {\r\n x: 0,\r\n y: 0,\r\n });\r\n }", "title": "" }, { "docid": "b234882b558ef21e1682c42d8a0344cb", "score": "0.5366914", "text": "getFocusNode() {\n return this.focusNode;\n }", "title": "" }, { "docid": "0bd0dc1d8f41263fb83bce9a8a17384e", "score": "0.53607124", "text": "getCurrentColorNode () {\n return this.parentBlock._meshes[0].material.color;\n }", "title": "" }, { "docid": "045b45faa52e352bb1f3c03033c009d2", "score": "0.5356865", "text": "function getClosestComponentAncestor(node) {\n while (node.tNode.type === 2 /* View */) {\n node = node.view[HOST_NODE];\n }\n return node;\n}", "title": "" }, { "docid": "045b45faa52e352bb1f3c03033c009d2", "score": "0.5356865", "text": "function getClosestComponentAncestor(node) {\n while (node.tNode.type === 2 /* View */) {\n node = node.view[HOST_NODE];\n }\n return node;\n}", "title": "" }, { "docid": "7149ecf9a04f4427f2e3efc653892bff", "score": "0.5356116", "text": "function getDockRightPosition() {\n var right = $('#mapmenu').width();\n if( $('#dock').css('display') != 'none' && !lizMap.checkMobile() )\n right+= $('#dock').width() + 11;\n return right;\n }", "title": "" }, { "docid": "af16349acd3613ffd3d230239e6008af", "score": "0.5354196", "text": "function prevNode() {\n var id = activeMarkerId;\n var prev = nodes[0];\n for (i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (node.markerId == id) {\n break;\n }\n prev = nodes[i];\n }\n setActiveMarker(prev.markerId);\n changeFormFocus(prev.markerId);\n panMap(prev.position);\n if (prev.markerId == id) {\n return 0;\n }\n else return 1;\n}", "title": "" }, { "docid": "b6dc6f91e23bb2dfb2695739b0901da1", "score": "0.53515023", "text": "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "title": "" }, { "docid": "c06f71d4cb8d826a9a3c9fd756a37c9a", "score": "0.5341923", "text": "getControl() {\n return this.core.graphics.control;\n }", "title": "" }, { "docid": "e22444d11e29c1f0959b2f737544090c", "score": "0.53378433", "text": "getElementOffset(){\n const rect = this.boardRef.getBoundingClientRect();\n const doc = document.documentElement;\n return{\n x: (rect.left + window.pageXOffset) - doc.clientLeft,\n y: (rect.top + window.pageYOffset) - doc.clientTop,\n };\n }", "title": "" }, { "docid": "7f6db9f1c1ec7d96b23e9fc301000e32", "score": "0.5332329", "text": "function currentBounds(){var cntr=element?element.parent():null;var parent=cntr?cntr.parent():null;return parent?self.clientRect(parent):null;}", "title": "" }, { "docid": "3fdda832a954a36fa88ee103e3ebb821", "score": "0.53294456", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "3fdda832a954a36fa88ee103e3ebb821", "score": "0.53294456", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "3fdda832a954a36fa88ee103e3ebb821", "score": "0.53294456", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "3fdda832a954a36fa88ee103e3ebb821", "score": "0.53294456", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "3fdda832a954a36fa88ee103e3ebb821", "score": "0.53294456", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "3fdda832a954a36fa88ee103e3ebb821", "score": "0.53294456", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "3fdda832a954a36fa88ee103e3ebb821", "score": "0.53294456", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "7bafa7995ddc18d08820313a5d01b593", "score": "0.53197914", "text": "_getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n }", "title": "" }, { "docid": "3756b730479741afaf897b15cb44e77d", "score": "0.53155446", "text": "update() {\n if (!$$1.isConnected(this._node) || !$$1.isVisible(this._node)) {\n return;\n }\n\n // reset position\n const resetStyle = {};\n\n if (this._options.useGpu) {\n resetStyle.transform = '';\n } else {\n resetStyle.marginLeft = 0;\n resetStyle.marginTop = 0;\n }\n\n $$1.setStyle(this._node, resetStyle);\n\n if (this._options.beforeUpdate) {\n this._options.beforeUpdate(this._node, this._options.reference);\n }\n\n // calculate boxes\n const nodeBox = $$1.rect(this._node, { offset: true });\n const referenceBox = $$1.rect(this._options.reference, { offset: true });\n const windowBox = getScrollContainer(window$1, document$1);\n\n const scrollParent = $$1.closest(\n this._node,\n (parent) =>\n $$1.css(parent, 'position') === 'relative' &&\n ['overflow', 'overflowX', 'overflowY'].some((overflow) =>\n ['auto', 'scroll'].includes(\n $$1.css(parent, overflow),\n ),\n ),\n document$1.body,\n ).shift();\n\n const scrollBox = scrollParent ?\n getScrollContainer(scrollParent, scrollParent) :\n null;\n\n const containerBox = this._options.container ?\n $$1.rect(this._options.container, { offset: true }) :\n null;\n\n const minimumBox = {\n ...windowBox,\n };\n\n if (scrollBox) {\n minimumBox.top = Math.max(minimumBox.top, scrollBox.top);\n minimumBox.right = Math.min(minimumBox.right, scrollBox.right);\n minimumBox.bottom = Math.min(minimumBox.bottom, scrollBox.bottom);\n minimumBox.left = Math.max(minimumBox.left, scrollBox.left);\n }\n\n if (containerBox) {\n minimumBox.top = Math.max(minimumBox.top, containerBox.top);\n minimumBox.right = Math.min(minimumBox.right, containerBox.right);\n minimumBox.bottom = Math.min(minimumBox.bottom, containerBox.bottom);\n minimumBox.left = Math.max(minimumBox.left, containerBox.left);\n }\n\n if (scrollBox || containerBox) {\n minimumBox.x = minimumBox.left;\n minimumBox.y = minimumBox.top;\n minimumBox.width = minimumBox.right - minimumBox.left;\n minimumBox.height = minimumBox.bottom - minimumBox.top;\n }\n\n // get optimal placement\n const placement = this._options.fixed && this._options.placement !== 'auto' ?\n this._options.placement :\n getPopperPlacement(\n nodeBox,\n referenceBox,\n minimumBox,\n this._options.placement,\n this._options.spacing + 2,\n );\n\n if (!this._options.noAttributes) {\n $$1.setDataset(this._options.reference, { uiPlacement: placement });\n }\n\n $$1.setDataset(this._node, { uiPlacement: placement });\n\n // get auto position\n const position = this._options.position;\n\n // calculate actual offset\n const offset = {\n x: Math.round(referenceBox.x),\n y: Math.round(referenceBox.y),\n };\n\n // offset for relative parent\n const relativeParent = $$1.closest(\n this._node,\n (parent) =>\n $$1.css(parent, 'position') === 'relative',\n document$1.body,\n ).shift();\n const relativeBox = relativeParent ?\n $$1.rect(relativeParent, { offset: true }) :\n null;\n\n if (relativeBox) {\n offset.x -= Math.round(relativeBox.x);\n offset.y -= Math.round(relativeBox.y);\n }\n\n // offset for placement\n if (placement === 'top') {\n offset.y -= Math.round(nodeBox.height) + this._options.spacing;\n } else if (placement === 'right') {\n offset.x += Math.round(referenceBox.width) + this._options.spacing;\n } else if (placement === 'bottom') {\n offset.y += Math.round(referenceBox.height) + this._options.spacing;\n } else if (placement === 'left') {\n offset.x -= Math.round(nodeBox.width) + this._options.spacing;\n }\n\n // offset for position\n if (['top', 'bottom'].includes(placement)) {\n const deltaX = Math.round(nodeBox.width) - Math.round(referenceBox.width);\n\n if (position === 'center') {\n offset.x -= Math.round(deltaX / 2);\n } else if (position === 'end') {\n offset.x -= deltaX;\n }\n } else {\n const deltaY = Math.round(nodeBox.height) - Math.round(referenceBox.height);\n\n if (position === 'center') {\n offset.y -= Math.round(deltaY / 2);\n } else if (position === 'end') {\n offset.y -= deltaY;\n }\n }\n\n // compensate for margins\n offset.x -= parseInt($$1.css(this._node, 'marginLeft'));\n offset.y -= parseInt($$1.css(this._node, 'marginTop'));\n\n // corrective positioning\n if (['left', 'right'].includes(placement)) {\n let offsetY = offset.y;\n let refTop = referenceBox.top;\n\n if (relativeBox) {\n offsetY += relativeBox.top;\n refTop -= relativeBox.top;\n }\n\n const minSize = this._options.minContact !== null ?\n this._options.minContact :\n Math.min(referenceBox.height, nodeBox.height);\n\n if (offsetY + nodeBox.height > minimumBox.bottom) {\n // bottom of offset node is below the container\n const diff = offsetY + nodeBox.height - minimumBox.bottom;\n offset.y = Math.max(\n refTop - nodeBox.height + minSize,\n offset.y - diff,\n );\n }\n\n if (offsetY < minimumBox.top) {\n // top of offset node is above the container\n const diff = offsetY - minimumBox.top;\n offset.y = Math.min(\n refTop + referenceBox.height - minSize,\n offset.y - diff,\n );\n }\n } else {\n let offsetX = offset.x;\n let refLeft = referenceBox.left;\n\n if (relativeBox) {\n offsetX += relativeBox.left;\n refLeft -= relativeBox.left;\n }\n\n const minSize = this._options.minContact !== null ?\n this._options.minContact :\n Math.min(referenceBox.width, nodeBox.width);\n\n if (offsetX + nodeBox.width > minimumBox.right) {\n // right of offset node is to the right of the container\n const diff = offsetX + nodeBox.width - minimumBox.right;\n offset.x = Math.max(\n refLeft - nodeBox.width + minSize,\n offset.x - diff,\n );\n }\n\n if (offsetX < minimumBox.left) {\n // left of offset node is to the left of the container\n const diff = offsetX - minimumBox.left;\n offset.x = Math.min(\n refLeft + referenceBox.width - minSize,\n offset.x - diff,\n );\n }\n }\n\n offset.x = Math.round(offset.x);\n offset.y = Math.round(offset.y);\n\n // compensate for scroll parent\n if (scrollParent) {\n offset.x += $$1.getScrollX(scrollParent);\n offset.y += $$1.getScrollY(scrollParent);\n }\n\n // update position\n const style = {};\n if (this._options.useGpu) {\n style.transform = `translate3d(${offset.x}px , ${offset.y}px , 0)`;\n } else {\n style.marginLeft = `${offset.x}px`;\n style.marginTop = `${offset.y}px`;\n }\n\n $$1.setStyle(this._node, style);\n\n // update arrow\n if (this._options.arrow) {\n this._updateArrow(placement, position);\n }\n\n if (this._options.afterUpdate) {\n this._options.afterUpdate(this._node, this._options.reference, placement, position);\n }\n }", "title": "" }, { "docid": "f9c98d4ce20e6c9a05a1c5cc0c2b5520", "score": "0.5315051", "text": "get drawNeedle() {\n\t\treturn this.nativeElement ? this.nativeElement.drawNeedle : undefined;\n\t}", "title": "" }, { "docid": "bd285b016001ef3a9c742116fd3bf122", "score": "0.5306403", "text": "wt() {\n return this.root.wt();\n }", "title": "" }, { "docid": "f9f4fc864e1af155ced6a947ad819ef5", "score": "0.53052074", "text": "renderNode() {\n\t\tif(this.props.node.isSelected() && this.NodeSelectedSVG) {\n\t\t\treturn <this.NodeSelectedSVG height={this.props.node.Height}/>\n\t\t}\n\t\telse\n\t\t\treturn <this.NodeSVG height={this.props.node.Height}/>\n\t}", "title": "" }, { "docid": "bf06acf14579b3d0d0f8f97103199851", "score": "0.5296078", "text": "getOffset () {\n const root = this.$el\n return root ? Math.ceil(root.scrollTop) : 0\n }", "title": "" }, { "docid": "9e9e1f53508c3a0dec6e0e683f2ceae1", "score": "0.5295827", "text": "get domNode() {\n return this._domNode || this.getNode();\n }", "title": "" }, { "docid": "e62f0b64c6ffc683b457344db1d63df5", "score": "0.52878857", "text": "getParent() {\n if (this.id == 'root')\n return null;\n\n var parentNode = this.parentNode;\n\n while (parentNode) {\n if (parentNode instanceof ShadowRoot) {\n let host = parentNode.host;\n if (host && host.tagName == 'PAPER-TREE-NODE')\n return parentNode.host;\n else\n return null;\n }\n\n parentNode = parentNode.parentNode;\n }\n\n return null;\n }", "title": "" }, { "docid": "8a373da0e0bd6f7fe31e93117fccae55", "score": "0.528707", "text": "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "title": "" }, { "docid": "8a373da0e0bd6f7fe31e93117fccae55", "score": "0.528707", "text": "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "title": "" }, { "docid": "8a373da0e0bd6f7fe31e93117fccae55", "score": "0.528707", "text": "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "title": "" }, { "docid": "8a373da0e0bd6f7fe31e93117fccae55", "score": "0.528707", "text": "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "title": "" }, { "docid": "8a373da0e0bd6f7fe31e93117fccae55", "score": "0.528707", "text": "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "title": "" }, { "docid": "8a373da0e0bd6f7fe31e93117fccae55", "score": "0.528707", "text": "function getClosestInstanceFromNode(node){if(node[internalInstanceKey]){return node[internalInstanceKey];}while(!node[internalInstanceKey]){if(node.parentNode){node=node.parentNode;}else{// Top of the tree. This node must not be part of a React tree (or is\n// unmounted, potentially).\nreturn null;}}var inst=node[internalInstanceKey];if(inst.tag===HostComponent||inst.tag===HostText){// In Fiber, this will always be the deepest root.\nreturn inst;}return null;}", "title": "" }, { "docid": "ede4d09579e88c46f8c4effab2ba9886", "score": "0.528553", "text": "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "title": "" }, { "docid": "ede4d09579e88c46f8c4effab2ba9886", "score": "0.528553", "text": "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "title": "" }, { "docid": "ede4d09579e88c46f8c4effab2ba9886", "score": "0.528553", "text": "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "title": "" }, { "docid": "ede4d09579e88c46f8c4effab2ba9886", "score": "0.528553", "text": "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "title": "" }, { "docid": "ede4d09579e88c46f8c4effab2ba9886", "score": "0.528553", "text": "function currentBounds() {\n var cntr = element ? element.parent() : null;\n var parent = cntr ? cntr.parent() : null;\n\n return parent ? self.clientRect(parent) : null;\n }", "title": "" }, { "docid": "ccae140add2997a9d39bbf8295e240ac", "score": "0.5281395", "text": "get digitalDisplayPosition() {\n\t\treturn this.nativeElement ? this.nativeElement.digitalDisplayPosition : undefined;\n\t}", "title": "" }, { "docid": "24fadab5d90925ba64ba3c5b5fa45a39", "score": "0.5277493", "text": "function currentBounds() {\n\t var cntr = element ? element.parent() : null;\n\t var parent = cntr ? cntr.parent() : null;\n\t\n\t return parent ? self.clientRect(parent) : null;\n\t }", "title": "" }, { "docid": "9fc04c5205b81ab96245eb2b1e2ce751", "score": "0.5270899", "text": "get topNode() {\n return new TreeNode(this, 0, 0, null);\n }", "title": "" }, { "docid": "9fc04c5205b81ab96245eb2b1e2ce751", "score": "0.5270899", "text": "get topNode() {\n return new TreeNode(this, 0, 0, null);\n }", "title": "" }, { "docid": "7307073bcd0521031f63382acf5aa2ac", "score": "0.526978", "text": "__getNodeRect() {\r\n var node = this.getNode();\r\n if (!node) {\r\n return {\r\n x: -MAX_SAFE_INTEGER,\r\n y: -MAX_SAFE_INTEGER,\r\n width: 0,\r\n height: 0,\r\n rotation: 0,\r\n };\r\n }\r\n const totalPoints = [];\r\n this.nodes().map((node) => {\r\n const box = node.getClientRect({\r\n skipTransform: true,\r\n skipShadow: true,\r\n skipStroke: this.ignoreStroke(),\r\n });\r\n var points = [\r\n { x: box.x, y: box.y },\r\n { x: box.x + box.width, y: box.y },\r\n { x: box.x + box.width, y: box.y + box.height },\r\n { x: box.x, y: box.y + box.height },\r\n ];\r\n var trans = node.getAbsoluteTransform();\r\n points.forEach(function (point) {\r\n var transformed = trans.point(point);\r\n totalPoints.push(transformed);\r\n });\r\n });\r\n const tr = new Transform();\r\n tr.rotate(-Konva$2.getAngle(this.rotation()));\r\n var minX, minY, maxX, maxY;\r\n totalPoints.forEach(function (point) {\r\n var transformed = tr.point(point);\r\n if (minX === undefined) {\r\n minX = maxX = transformed.x;\r\n minY = maxY = transformed.y;\r\n }\r\n minX = Math.min(minX, transformed.x);\r\n minY = Math.min(minY, transformed.y);\r\n maxX = Math.max(maxX, transformed.x);\r\n maxY = Math.max(maxY, transformed.y);\r\n });\r\n tr.invert();\r\n const p = tr.point({ x: minX, y: minY });\r\n return {\r\n x: p.x,\r\n y: p.y,\r\n width: maxX - minX,\r\n height: maxY - minY,\r\n rotation: Konva$2.getAngle(this.rotation()),\r\n };\r\n // const shapes = this.nodes().map(node => {\r\n // return this.__getNodeShape(node);\r\n // });\r\n // const box = getShapesRect(shapes);\r\n // return rotateAroundPoint(box, Konva.getAngle(this.rotation()), {\r\n // x: 0,\r\n // y: 0\r\n // });\r\n }", "title": "" }, { "docid": "f466f132b08f05ac026d73fa01461358", "score": "0.5269273", "text": "getTop() {\n return this.ctrl.getTop();\n }", "title": "" } ]
6bfaecc1dd5bd2d952f2104373970ecf
setStyles given the state "isActive", this method handle the style attribute of the component if "isActive" true, we set everything needed to fix the component
[ { "docid": "e4fb7e001e810fb6e48386830867a599", "score": "0.6193765", "text": "setStyles(){\n let style ; \n let fxDur = this.props.fxDuration+\"s\"\n\n if(this.state.isActive){\n style = {\n position: 'fixed',\n width: '100%',\n zIndex: '9999',\n animationDuration: fxDur,\n animationFillMode: 'both',\n left: '0'\n }\n // According to props \"position\", we add style.top or style.bottom\n this.props.position === 'top' ? style.top = '0' : style.bottom = '0'\n\n\n }\n return style;\n }", "title": "" } ]
[ { "docid": "d18888fd3f212966174cb935c174910c", "score": "0.6733057", "text": "setActiveStyles() {\n if (!this._active) {\n this._active = true;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "d18888fd3f212966174cb935c174910c", "score": "0.6733057", "text": "setActiveStyles() {\n if (!this._active) {\n this._active = true;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "d18888fd3f212966174cb935c174910c", "score": "0.6733057", "text": "setActiveStyles() {\n if (!this._active) {\n this._active = true;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "d18888fd3f212966174cb935c174910c", "score": "0.6733057", "text": "setActiveStyles() {\n if (!this._active) {\n this._active = true;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "3179d2ebb38c4472fbd0d97c8a365e25", "score": "0.63665396", "text": "setInactiveStyles() {\n if (this._active) {\n this._active = false;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "3179d2ebb38c4472fbd0d97c8a365e25", "score": "0.63665396", "text": "setInactiveStyles() {\n if (this._active) {\n this._active = false;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "3179d2ebb38c4472fbd0d97c8a365e25", "score": "0.63665396", "text": "setInactiveStyles() {\n if (this._active) {\n this._active = false;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "3179d2ebb38c4472fbd0d97c8a365e25", "score": "0.63665396", "text": "setInactiveStyles() {\n if (this._active) {\n this._active = false;\n this._changeDetectorRef.markForCheck();\n }\n }", "title": "" }, { "docid": "e890f64fa5a7ad7a641213f41e0c73f3", "score": "0.5939528", "text": "updateStyle() {\n this._styling(this._elRef, this);\n }", "title": "" }, { "docid": "42edb9e47ce22c6eb79c40f96ad1f328", "score": "0.57677746", "text": "function setListStyle(isListActive, shouldRenderMissions = true) {\n localStorage.setItem('ListStyleActiveConfig', isListActive);\n \n if (isListActive) {\n $('#config-style-list').addClass('active');\n } else {\n $('#config-style-list').removeClass('active');\n }\n \n if (shouldRenderMissions) {\n renderMissions();\n }\n}", "title": "" }, { "docid": "91a90f79aa0196c0fb1deb7670d3a24f", "score": "0.5626835", "text": "function StylingState(){}", "title": "" }, { "docid": "43a7b22435b7ceac61aea231bc8be56a", "score": "0.56027967", "text": "setCssClasses(){\n let cssClasses = ''\n if(this.props.className != null){\n cssClasses += this.props.className+' '\n }\n if(this.state.isActive){\n if(this.props.activateFx){\n // Given the props \"fxName\" and \"position\" we switch css fx classNames\n let fxClass ;\n switch(this.props.fxName ){\n case 'fade' :\n fxClass = 'fadeIn'\n break;\n case 'fadeIn' :\n fxClass = this.props.position === 'top' ? 'fadeInDown' : 'fadeInUp'\n break ;\n case 'slideIn' :\n fxClass = this.props.position === 'top' ? 'slideInDown' : 'slideInUp'\n break ; \n case 'bounceIn' :\n fxClass = this.props.position === 'top' ? 'bounceInDown' : 'bounceInUp'\n break ; \n case 'zoomIn' : \n fxClass = this.props.position === 'top' ? 'zoomInDown' : 'zoomInUp'\n break; \n default : \n fxClass = this.props.position === 'top' ? 'slideInDown' : 'slideInUp' \n }\n\n cssClasses += fxClass\n } \n cssClasses += ' '+ this.props.activeClassName\n }\n \n return cssClasses\n }", "title": "" }, { "docid": "39083a5d0e249f5e29b6f17040f7ab5b", "score": "0.54958534", "text": "function StylingState() {}", "title": "" }, { "docid": "6e7f5a9a5ee7ffbec06b088cd2ef254b", "score": "0.5490445", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "title": "" }, { "docid": "6e7f5a9a5ee7ffbec06b088cd2ef254b", "score": "0.5490445", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "title": "" }, { "docid": "48ad7aa9e8d3dbfb583366de56128e90", "score": "0.54893583", "text": "function StylingState() { }", "title": "" }, { "docid": "1a4e488545d7c2c439c57c58c9448492", "score": "0.5470793", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "1a4e488545d7c2c439c57c58c9448492", "score": "0.5470793", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "1a4e488545d7c2c439c57c58c9448492", "score": "0.5470793", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "7e16e6ac6d890fe685d86d85efaf9eaa", "score": "0.5441898", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "title": "" }, { "docid": "30d102fb5469eb7ac19257be9c4e6537", "score": "0.54418916", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "30d102fb5469eb7ac19257be9c4e6537", "score": "0.54418916", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "30d102fb5469eb7ac19257be9c4e6537", "score": "0.54418916", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.54312843", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.54312843", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "419e3ddde188eabfc007b0b3278b04fa", "score": "0.542794", "text": "function configureStyles(){\n\t var _ = nvd3Utils.deepExtend(defaultStyles(), scope.options['styles'] || {});\n\n\t if (scope._config.extended) scope.options['styles'] = _;\n\n\t angular.forEach(_.classes, function(value, key){\n\t value ? element.addClass(key) : element.removeClass(key);\n\t });\n\n\t element.removeAttr('style').css(_.css);\n\t }", "title": "" }, { "docid": "89e4bd1a94b19733149bf2da2ca9dbd0", "score": "0.5413894", "text": "function configureStyles(){\n var _ = nvd3Utils.deepExtend(defaultStyles(), scope.options['styles'] || {});\n\n if (scope._config.extended) scope.options['styles'] = _;\n\n angular.forEach(_.classes, function(value, key){\n value ? element.addClass(key) : element.removeClass(key);\n });\n\n element.removeAttr('style').css(_.css);\n }", "title": "" }, { "docid": "89e4bd1a94b19733149bf2da2ca9dbd0", "score": "0.5413894", "text": "function configureStyles(){\n var _ = nvd3Utils.deepExtend(defaultStyles(), scope.options['styles'] || {});\n\n if (scope._config.extended) scope.options['styles'] = _;\n\n angular.forEach(_.classes, function(value, key){\n value ? element.addClass(key) : element.removeClass(key);\n });\n\n element.removeAttr('style').css(_.css);\n }", "title": "" }, { "docid": "ab7ca0d10508dd4481625e4acf69a36b", "score": "0.5392998", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "0f87e6d3499632f94b8c29fa7fcd7a5e", "score": "0.5359148", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.5344736", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.5344736", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.5344736", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.5344736", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "6207a992b7a54e68984c4d16bf5213d2", "score": "0.5327231", "text": "setStyles(_id, _styles, _noCache) {\n const _this = this;\n if (this.isObject(_styles)) {\n _styles = Object.entries(_styles);\n }\n if (this.isArray(_styles)) {\n _styles.forEach(([_key, _value]) => {\n _this.setStyle(_id, _key, _value, _noCache);\n });\n }\n else {\n console.error('ERROR calling ELEM.setStyles; _styles is not an object nor Array:', typeof _styles);\n }\n }", "title": "" }, { "docid": "6207a992b7a54e68984c4d16bf5213d2", "score": "0.5327231", "text": "setStyles(_id, _styles, _noCache) {\n const _this = this;\n if (this.isObject(_styles)) {\n _styles = Object.entries(_styles);\n }\n if (this.isArray(_styles)) {\n _styles.forEach(([_key, _value]) => {\n _this.setStyle(_id, _key, _value, _noCache);\n });\n }\n else {\n console.error('ERROR calling ELEM.setStyles; _styles is not an object nor Array:', typeof _styles);\n }\n }", "title": "" }, { "docid": "69f3a1a2c2cecc4714a95b1a0e1116e0", "score": "0.5323559", "text": "set setActive(value) {\n let that = this;\n if (this.active !== value) {\n this.active = value;\n this.layoutBtn.classList.remove('active');\n this.componentBtn.classList.remove('active');\n\n if (this.active === 'layout') {\n this.layoutBtn.classList.add('active');\n this.listComponentBlock.classList.add('hide');\n this.listLayoutBlock.classList.remove('hide');\n } else if (this.active === 'component') {\n this.componentBtn.classList.add('active');\n this.listLayoutBlock.classList.add('hide');\n this.listComponentBlock.classList.remove('hide');\n }\n }\n }", "title": "" }, { "docid": "33d5af9937c7ec610a01c83bd398cc81", "score": "0.5321245", "text": "componentWillUpdate() {\n hotButtonStyle = notSelectedClass;\n newButtonStyle = notSelectedClass;\n risingButtonStyle = notSelectedClass;\n topButtonStyle = notSelectedClass;\n }", "title": "" }, { "docid": "3aaa5eccc077257cf51f0205b9107995", "score": "0.53187525", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function(name1) {\n var style = state.styles[name1] || {\n };\n var attributes = state.attributes[name1] || {\n };\n var element = state.elements[name1]; // arrow is optional + virtual elements\n if (!_instanceOfJs.isHTMLElement(element) || !_getNodeNameJsDefault.default(element)) return;\n // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function(name) {\n var value = attributes[name];\n if (value === false) element.removeAttribute(name);\n else element.setAttribute(name, value === true ? '' : value);\n });\n });\n}", "title": "" }, { "docid": "c6355097e5f0c171da7b366e8169cabd", "score": "0.53034014", "text": "function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach(function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];// arrow is optional + virtual elements\nif(!isHTMLElement(element)||!getNodeName(element)){return;}// Flow doesn't support to extend this property, but it's the most\n// effective way to apply styles to an HTMLElement\n// $FlowFixMe[cannot-write]\nObject.assign(element.style,style);Object.keys(attributes).forEach(function(name){var value=attributes[name];if(value===false){element.removeAttribute(name);}else {element.setAttribute(name,value===true?'':value);}});});}", "title": "" }, { "docid": "c6355097e5f0c171da7b366e8169cabd", "score": "0.53034014", "text": "function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach(function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];// arrow is optional + virtual elements\nif(!isHTMLElement(element)||!getNodeName(element)){return;}// Flow doesn't support to extend this property, but it's the most\n// effective way to apply styles to an HTMLElement\n// $FlowFixMe[cannot-write]\nObject.assign(element.style,style);Object.keys(attributes).forEach(function(name){var value=attributes[name];if(value===false){element.removeAttribute(name);}else {element.setAttribute(name,value===true?'':value);}});});}", "title": "" }, { "docid": "f25699d17e3c1c409df6d9379d12a046", "score": "0.5279912", "text": "function $D2nT$var$applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!$wsKO$export$isHTMLElement(element) || !$B1zX$export$default(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "b3a9bb82d3a380550a8aeaea2ca8bf7b", "score": "0.5264869", "text": "_updateStyles() {\n if (this.$element) {\n const cssText = createCssText(createDOMStyles(this.state, this.attributes));\n if (cssText !== this._lastCssText) {\n this.$element.style.cssText = cssText;\n this._lastCssText = cssText;\n }\n }\n }", "title": "" }, { "docid": "88a73bc4cec448c9ccf9ab39a9ba7ee9", "score": "0.5260964", "text": "onChangeStyle(backgroundColor, footerColor) {\n\t this.setState({backgroundColor: backgroundColor, footerColor: footerColor})\n\t}", "title": "" }, { "docid": "c32c1b3047673ab83851e351be638b42", "score": "0.52094877", "text": "setScrollState(status){\n\n if(status === 'on'){\n this.setState({isActive : true});\n this.setBodyPaddings() \n }else{\n this.setState({isActive : false}); \n this.resetBodyPaddings() \n }\n\n }", "title": "" }, { "docid": "8032ce6ce129aaa402b081d732632875", "score": "0.5205497", "text": "setActiveItem(index) {\n if (this.activeItem) {\n this.activeItem.setInactiveStyles();\n }\n super.setActiveItem(index);\n if (this.activeItem) {\n this.activeItem.setActiveStyles();\n }\n }", "title": "" }, { "docid": "9a2dfbcbdacfc38b824687bf3ff9ad8d", "score": "0.51987725", "text": "function addStyle(Component){for(var _len2=arguments.length,styleVariant=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){styleVariant[_key2-1]=arguments[_key2];}bsStyles(styleVariant,Component);}", "title": "" }, { "docid": "38c2224cad119707778737df9758cd73", "score": "0.5190137", "text": "function setProps(props, context, options, changedActiveType) {\n if (context === void 0) { context = {}; }\n /**\n * Keep track of the most recent props and contexts. setActive can pass these\n * straight through rather than requiring external callers to have access to these.\n */\n currentProps = props;\n currentContext = context;\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n var animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n var removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n var encounteredKeys = {};\n // TODO Reconcile with other update config\n if (props.variants) {\n visualElement.updateConfig(__assign(__assign({}, visualElement.config), { variants: props.variants }));\n }\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n var removedVariantIndex = Infinity;\n var _loop_1 = function (i) {\n var type = reversePriorityOrder[i];\n var typeState = state[type];\n var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];\n var propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n var activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n */\n var isInherited = prop === context[type] && propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Resume from previous snapshot if it's the first render\n */\n if (isInitialRender &&\n type === AnimationType.Animate &&\n visualElement.prevSnapshot) {\n isInitialRender = false;\n typeState.prevResolvedValues = visualElement.prevSnapshot;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = __assign({}, encounteredKeys);\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n prop instanceof AnimationControls ||\n typeof prop === \"boolean\") {\n return \"continue\";\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n var shouldAnimateType = variantsHaveChanged(typeState.prevProp, prop) ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n var definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * setProps calls to determine whether a value has changed.\n */\n var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n var _a = typeState.prevResolvedValues, prevResolvedValues = _a === void 0 ? {} : _a;\n var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues);\n for (var key in allKeys) {\n var next = resolvedValues[key];\n var prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n if (next !== prev) {\n if (next !== undefined) {\n // If next is defined and doesn't equal prev, it needs animating\n shouldAnimateType = true;\n removedKeys.delete(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n shouldAnimateType = true;\n removedKeys.delete(key);\n }\n else {\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time setProps is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues);\n }\n /**\n * If this is an inherited prop we want to hard-block animations\n * TODO: Test as this should probably still handle animations triggered\n * by removed values?\n */\n if (shouldAnimateType && !isInherited) {\n animations.push.apply(animations, __spread(definitionList.map(function (animation) { return ({\n animation: animation,\n options: __assign({ type: type }, options),\n }); })));\n }\n };\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (var i = 0; i < numAnimationTypes; i++) {\n _loop_1(i);\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n var fallbackAnimation_1 = {};\n removedKeys.forEach(function (key) {\n var fallbackTarget = visualElement.getBaseValue(key, props);\n if (fallbackTarget !== undefined) {\n fallbackAnimation_1[key] = fallbackTarget;\n }\n });\n animations.push({ animation: fallbackAnimation_1 });\n }\n var shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n props.initial === false &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }", "title": "" }, { "docid": "ab3f6276e7179c995ffff8968a2fb171", "score": "0.5179094", "text": "componentWillMount() {\n newButtonStyle = notSelectedClass;\n risingButtonStyle = notSelectedClass;\n topButtonStyle = notSelectedClass;\n }", "title": "" }, { "docid": "cbb53961a5123725733f0906c176f19d", "score": "0.5162462", "text": "applyComponentStyles(sectionIndex, gridSectionIndex, componentStateIndex) {\n const component = this.state.pages[this.state.globalContextObj.editing].sections[sectionIndex].gridSections[gridSectionIndex].componentStates[componentStateIndex]\n\n try {\n const styleString = component.styleInput\n if (styleString === \"\") {\n this.updateComponentState({\n style: {},\n }, sectionIndex, gridSectionIndex, componentStateIndex)\n return\n }\n const styleObject = JSON.parse(styleString)\n const componentUpdate = {\n style: styleObject\n }\n this.updateComponentState(componentUpdate, sectionIndex, gridSectionIndex, componentStateIndex)\n \n } catch (error) {\n console.log(\"Invalid styles, not able to parse as JSON. Error: \", error)\n }\n }", "title": "" }, { "docid": "461d51fafd6b303f5229d6299de0e32a", "score": "0.5125428", "text": "function cleanupStyles(item) {\n var prop;\n var reactProps;\n if (item.props.style) {\n reactProps = {};\n for(prop in item.props.style) {\n reactProps[prop] = item._node.style[prop];\n }\n }\n item._node.removeAttribute('style');\n if (reactProps) {\n for(prop in reactProps) {\n item._node.style[prop] = reactProps[prop];\n }\n }\n if (item._prevStyles) {\n for(prop in item._prevStyles) {\n item._node.style[prop] = item._prevStyles[prop];\n }\n }\n}", "title": "" }, { "docid": "598df1bf5d0edd4870b320cfa57baa11", "score": "0.5124261", "text": "updateCssStyles (mailbox) {\n this.cssElement.innerHTML = `\n .mailbox-list .list-item[data-id=\"${mailbox.id}\"] .mailbox.active {\n border-color: ${mailbox.color};\n }\n .mailbox-list .list-item[data-id=\"${mailbox.id}\"] .mailbox:hover {\n border-color: ${mailbox.color};\n }\n .mailbox-list .list-item[data-id=\"${mailbox.id}\"] .mailbox.active:before {\n background-color: ${mailbox.color};\n }\n `\n }", "title": "" }, { "docid": "ad7dd3171cf0c680c37153d0abe026fe", "score": "0.5106717", "text": "setThemeStyle(themeStyles) {\n this._themeStyles = themeStyles;\n }", "title": "" }, { "docid": "52e11a8ddd6eccf1d4b074e45ebe43b0", "score": "0.5086132", "text": "function applyStyles (el, styles){\r\n if(styles){\r\n var i = 0,\r\n len,\r\n style; \r\n \r\n el = Ext.fly(el); \r\n if(Ext.isFunction(styles)) {\r\n styles = styles.call();\r\n }\r\n if (typeof styles == \"string\") {\r\n styles = styles.split(/:|;/g);\r\n for (len = styles.length; i < len;) {\r\n el.setStyle(styles[i++], styles[i++]); \r\n }\r\n } else if (Ext.isObject(styles)) {\r\n el.setStyle(styles);\r\n } \r\n } \r\n }", "title": "" }, { "docid": "1d7472edec721343af95b31c0fd85ce6", "score": "0.5082585", "text": "function _stylingMap(value, isClassBased) {\n activeStylingMapFeature();\n var index = getSelectedIndex();\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX]++;\n if (value !== NO_CHANGE) {\n var tNode = getTNode(index, lView);\n var defer = getActiveDirectiveSuperClassHeight() > 0;\n var oldValue = lView[bindingIndex];\n var valueHasChanged = hasValueChanged$1(oldValue, value);\n var lStylingMap = normalizeIntoStylingMap(oldValue, value);\n if (isClassBased) {\n updateClassBinding(getClassesContext(tNode), lView, null, bindingIndex, lStylingMap, defer, valueHasChanged);\n }\n else {\n var sanitizer = getCurrentOrLViewSanitizer(lView);\n updateStyleBinding(getStylesContext(tNode), lView, null, bindingIndex, lStylingMap, sanitizer, defer, valueHasChanged);\n }\n }\n}", "title": "" }, { "docid": "a3b74bf6b2317794a7a0fc3925e406a2", "score": "0.5063423", "text": "setStyle(property, value) {\n if (!this._props.style) this._props.style = {};\n this._props.style[property] = value;\n }", "title": "" }, { "docid": "1dfc4a216a82ef0d1396daa0d21843eb", "score": "0.50585467", "text": "_onStyleChange() {\n this.dirty = true;\n }", "title": "" }, { "docid": "7da64c91e2efe0b3984b51fb3d78235d", "score": "0.5050221", "text": "_isActive() {\n this._reset();\n \n this._button.classList.add( TabButton.CLASS.BUTTON_ACTIVE );\n this._content.classList.add( TabButton.CLASS.CONTENT_ACTIVE );\n }", "title": "" }, { "docid": "5e37143b32aa947b9b9c8cfea56b70ff", "score": "0.50494415", "text": "componentDidMount(){\n axios.get(`/getSheetById/${this.props.match.params.id}`).then( response =>{\n console.log(response.data[0], 'the response in Sheets')\n this.setState({title:response.data[0].title, editors: response.data[0].editors})\n if(response.data['0'].body && response.data['0'].styles){\n this.setState({ table: JSON.parse(response.data['0'].body), styles: JSON.parse(response.data[\"0\"].styles) })\n \n }\n console.log(this.state.title, 'this is the new title')\n // this.setState({ table: JSON.parse(response.data['0'].body), styles: JSON.parse(response.data[\"0\"].styles) })\n })\n\n let tempTable = [];\n for (let i=0;i<this.state.rows;i++){\n let row = [];\n for (let j=0;j<this.state.columns;j++){\n row.push('')\n }\n tempTable.push(row);\n }\n \n if (this.state.fillData){\n let fillData=this.state.fillData\n for (let k=0;k<fillData.length;k++){\n for (let l=0;l<fillData[k].length;l++){\n tempTable[k].splice(l,1,fillData[k][l])\n }\n \n }\n }\n this.setState({table:tempTable});\n\n let tempStyles = [];\n for (let i=0;i<this.state.rows;i++){\n let row = [];\n for (let j=0;j<this.state.columns;j++){\n row.push({bg:this.state.latestBg,color:this.state.latestColor,font:this.state.latestFont, fs: this.state.latestFs, bold:this.state.latestBold, italic:this.state.latestItalic, strike:this.state.latestSrike})\n }\n tempStyles.push(row);\n }\n \n if (this.state.fillStyles){\n let fillStyles=this.state.fillStyles\n for (let k=0;k<fillStyles.length;k++){\n for (let l=0;l<fillStyles[k].length;l++){\n tempStyles[k].splice(l,1,fillStyles[k][l])\n }\n \n }\n }\n this.setState({styles:tempStyles})\n socket = io('');\n\n\n socket.emit('room', { id: this.props.match.params.id})\n socket.on('dataIn', data=>{\n this.setState({table:data.table, styles:data.styles});\n })\n }", "title": "" }, { "docid": "8182ac671dc0b0901c06e4caaf18deac", "score": "0.50361687", "text": "function setStyle(val){\n var params = {\n 'STYLES': val\n };\n pipeline.getSource().updateParams(params);\n}", "title": "" }, { "docid": "f202c6462d99396e5260279c71a7f6f1", "score": "0.5031478", "text": "function setActive(type, isActive, options) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildrenOrder) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n return setProps(currentProps, currentContext, options, type);\n }", "title": "" }, { "docid": "5b883e67f93d831bf8c8e7b1b93b4419", "score": "0.5029522", "text": "function setStyle(attribute, newValue) {\n var newStyles = this.getStyles();\n newStyles[attribute].value = newValue;\n $.cache(this.id + \"_styles\", JSON.stringify(newStyles));\n }", "title": "" }, { "docid": "0e0cac215a6df0ee254f00f683f884b5", "score": "0.50252503", "text": "changeBorderBottomStyleHandler(border){\n if(this.state.clickedTemplate){\n let styledClickedTemplate = {...this.state.clickedTemplate};\n styledClickedTemplate.borderBottomStyle = border;\n let templatesChanged = this.state.templates.map((templ)=>{\n if(templ.id === this.state.clickedTemplate.id){\n return {...templ, borderBottomStyle: border}\n }else{\n return templ;\n }\n })\n this.setState({\n clickedTemplate: styledClickedTemplate,\n templates: templatesChanged\n })\n window.templatesToImport = [...templatesChanged]\n }\n }", "title": "" }, { "docid": "4379a2a86c217cdcf8f69eba458afeb9", "score": "0.5015168", "text": "updateShadyStyles() {\r\n window.ShadyCSS && window.ShadyCSS.styleElement(this);\r\n }", "title": "" }, { "docid": "42c8f919393289e6acdfcccf6d26a8b5", "score": "0.5000287", "text": "function applyStyles$2(_ref){var state=_ref.state;Object.keys(state.elements).forEach(function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];// arrow is optional + virtual elements\nif(!isHTMLElement$1(element)||!getNodeName$1(element)){return;}// Flow doesn't support to extend this property, but it's the most\n// effective way to apply styles to an HTMLElement\n// $FlowFixMe[cannot-write]\nObject.assign(element.style,style);Object.keys(attributes).forEach(function(name){var value=attributes[name];if(value===false){element.removeAttribute(name);}else {element.setAttribute(name,value===true?'':value);}});});}", "title": "" }, { "docid": "d50e0642c2e9e53b38ce94363ba69cae", "score": "0.49993595", "text": "removeActiveStyling() {\n const { editorState, isSidebarOpen } = this.state;\n // eslint-disable-next-line\n const blockButtonsStyle = { ...this.state.blockButtonsStyle };\n blockButtonsStyle.transform = 'scale(0)';\n\n // eslint-disable-next-line\n const sidebarHolderStyle = { ...this.state.sidebarHolderStyle };\n if (editorState.getCurrentContent().hasText()) {\n if (!isSidebarOpen) {\n sidebarHolderStyle.transform = 'scale(0)';\n }\n } else {\n sidebarHolderStyle.top = 14;\n }\n\n const styledBlock = document.querySelector('.block-active');\n const selectionState = editorState.getSelection();\n if (selectionState.getHasFocus()) {\n // if the text indicator is in the editor, make sure that the\n // block with the text indicator is styled as active\n let anchorKey = selectionState.getAnchorKey();\n const block = getBlockForKey(editorState.getCurrentContent(), anchorKey);\n if (isBlockAList(block)) {\n const blockNode = getBlockNode(editorState.getCurrentContent(), block);\n if (!blockParentNode.is(blockNode.parentNode)) {\n anchorKey = blockNode.parentNode.getAttribute('data-offset-key');\n }\n }\n if (styledBlock && !areKeysSame(anchorKey, styledBlock.getAttribute('data-offset-key'))) {\n styledBlock.classList.remove('block-active');\n getBlockNode(editorState.getCurrentContent(), anchorKey).classList.add('block-active');\n }\n } else if (styledBlock) {\n // if the text indicator is not in the editor, remove any active block styling\n styledBlock.classList.remove('block-active');\n }\n\n this.setState(() => ({\n blockButtonsStyle,\n isHoverInsertMode: false,\n sidebarHolderStyle,\n }));\n }", "title": "" }, { "docid": "a165a00a71bb7a85ab0d3b7acc5567de", "score": "0.49861047", "text": "function styleButton(theme, isActive) {\n const styleBase = {\n padding: \"2px 8px\",\n border: 0,\n color: isActive ? colors.gray.dfblack : colors.gray,\n outline: \"none\",\n };\n\n return { ...styleBase, ...themeButton(theme, isActive) };\n}", "title": "" }, { "docid": "d1fa0c8fdef78976bd9ad958d0ddb609", "score": "0.49830523", "text": "function createStateStyles(element, stateDef, DataConnector) {\n var existingClass;\n var name = stateDef.defaultStyleDefinition;\n\n if (typeof name === 'object') {\n var styleDef = name;\n name = name.displayString;\n if (!name) {\n if (!styleDef._customCSSName) {\n styleDef._customCSSName = 'custom-styles-' + Date.now() + '-' + styleCount++;\n }\n name = styleDef._customCSSName;\n }\n if (!STYLE_CACHE[name]) {\n STYLE_CACHE[name] = new Promise(function(resolve, reject) {\n _addStateStyles(name, styleDef, resolve, reject, element);\n });\n } else {\n _addImageClass(styleDef, element);\n element[0].dispatchEvent(new CustomEvent('styleReady'));\n }\n }\n else if (!name) {\n //No new style found, remove old styles\n existingClass = element.data('stateFormatClass');\n if (existingClass) {\n element.removeClass(existingClass);\n }\n return;\n }\n else if (typeof name === 'string') {\n if (!STYLE_CACHE[name]) {\n STYLE_CACHE[name] = new Promise(function(resolve, reject) {\n DataConnector.executeService('ThingworxConnector', {\n entityType: 'StyleDefinitions',\n entity: name,\n method: 'GET',\n requestType: 'json'\n })\n .then(function successCallback(data) {\n _addStateStyles(name, data.content, resolve, reject, element);\n element[0].dispatchEvent(new CustomEvent('styleReady'));\n }, function errorCallback(response) {\n reject();\n console.error(\"could not get the styles\", response);\n });\n });\n }\n else {\n STYLE_CACHE[name].then(function(styles) {\n _addImageClass(styles, element);\n element[0].dispatchEvent(new CustomEvent('styleReady'));\n });\n }\n }\n // ADD class name immediately\n var classname = cleanClassName(name);\n var stateDefName = '';\n if (stateDef.name) {\n stateDefName = cleanClassName(stateDef.name);\n }\n existingClass = element.data('stateFormatClass');\n if (existingClass) {\n element.removeClass(existingClass);\n element.removeClass('hasImage');\n }\n var newClasses = 'has-statedef-styles ' + classname + ' ' + stateDefName;\n element.addClass(newClasses);\n element.data('stateFormatClass', newClasses);\n element[0].dispatchEvent(new CustomEvent('styleReady'));\n\n return STYLE_CACHE[name];\n }", "title": "" }, { "docid": "ea9736ef0da2c0c5de421335426a14b5", "score": "0.49773428", "text": "function setActiveStyleSheet(title) {\n\t\tvar i, a, main;\n\t\t// mengambil setiap elemen link\n\t\tfor(i=0; (a = document.getElementsByTagName(\"link\")[i]); i++) {\n\t\t\t// jika terdapat atribut rel dari elemen yang berisi string style\n\t\t\t// dan punya atribut title maka \n\t\t\tif(a.getAttribute(\"rel\").indexOf(\"style\") != -1 && a.getAttribute(\"title\")) {\n\t\t\t\ta.disabled = true; // elemen akan disable\n\t\t\t\t//jika atribut elemen link sama dengan title css maka disable untuk \n\t\t\t\t// stylesheet tersebut adalah false\n\t\t\t\tif(a.getAttribute(\"title\") == title) a.disabled = false;\n\t \t}\n\t\t}\n\t}", "title": "" }, { "docid": "6bdd6da70e6c73d321ce08f7a2abc758", "score": "0.49708354", "text": "set style(value) {\n if (this.slider) {\n this.slider.getElement().setAttribute('style', value);\n }\n else {\n this.initialStyle = value;\n }\n }", "title": "" }, { "docid": "b39757f7d28e4b22a5bff6dde56d1c0a", "score": "0.49601918", "text": "if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {\n this.state.globalStyle.removeStyles(this.styleSheet);\n }", "title": "" }, { "docid": "2e21f16b39e61a056b3ba7a6283fd386", "score": "0.49492478", "text": "addThemeStyle(themeStyles) {\n this._themeStyles = Object.assign(Object.assign({}, this._themeStyles), themeStyles);\n }", "title": "" }, { "docid": "f5009fe32e49e56cb1cc115599c1c617", "score": "0.49456635", "text": "function setThemeControlsState() {\n\t\t// set color switcher\n\t\t$colorOptionsColorBtns.each(function() {\n\t\t\tif($(this).data('theme') === themeSettings.themeName) {\n\t\t\t\t$(this).addClass('active');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$(this).removeClass('active');\n\t\t\t}\n\t\t}); \n\t}", "title": "" }, { "docid": "188c82852da0bf6d3c4159234b9e8b53", "score": "0.49434492", "text": "function addStyle () {\n // Wrapper style.\n createStyle(wrapper, {\n width: '50px',\n height: '50px',\n borderRadius: '50%',\n fontSize: '18px',\n fontFamily: '\"Trebuchet MS\", Helvetica, sans-serif',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '#fff',\n backgroundColor: '#333',\n position: 'fixed',\n zIndex: '999',\n bottom: '100px',\n right: '50px',\n cursor: 'pointer',\n outline: 'none',\n });\n\n // Inner wrapper style\n createStyle(innerWrapper, {\n width: '200px',\n height: '50px',\n color: '#fff',\n display: 'none',\n position: 'absolute',\n top: '-120px',\n left: '-210px'\n });\n\n createStyle(relativeContainer, {\n position: 'relative',\n width: '0',\n height: '0'\n });\n\n createStyle(callUs, {\n backgroundColor: '#333',\n padding: '8px',\n borderRadius: '20px',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n });\n\n createStyle(callUsText, {\n color: '#fff',\n fontSize: '20px',\n textAlign: 'center',\n margin: '4px 0'\n });\n\n\n createStyle(callButton, {\n backgroundColor: '#555',\n color: '#75fe75',\n fontSize: '16px',\n fontWeight: '500',\n padding: '6px 12px',\n borderRadius: '20px',\n margin: '8px 0',\n borderColor: 'transparent',\n outline: 'none'\n })\n }", "title": "" }, { "docid": "52813bae99bf0dd91da6ea2f0a5f5264", "score": "0.49387774", "text": "setInactive() {\n this.setPlaceholderProps();\n this.target.classList.remove('fixit--active');\n this.target.classList.remove('fixit--bottom');\n this.target.classList.remove('fixit--docked');\n this.target.classList.remove('fixit--frozen');\n\n if (this.options.useOffsetOnTarget) {\n this.setTargetPos(true);\n }\n\n if (this.options.respondToParent) {\n this.target.style.width = '';\n }\n\n if (typeof this.options.onInactiveCallback === 'function') {\n this.options.onInactiveCallback(this.target, this);\n }\n }", "title": "" }, { "docid": "0a00c862e70dfdec380531202ef24760", "score": "0.49234435", "text": "function setActiveState(elems, elem) {\n elems.removeClass('active');\n $(elem).addClass('active');\n }", "title": "" }, { "docid": "fd6c0d6479ebee85b6757c3eafeca42b", "score": "0.49154335", "text": "_styleChangedHandler() {\n const that = this;\n\n if (!that._isVisible()) {\n that._renderingSuspended = true;\n return;\n }\n else if (that._renderingSuspended) {\n that._createElement();\n return;\n }\n\n if (that._renderingSuspended) {\n return;\n }\n\n that._setTicksAndInterval();\n that._moveThumbBasedOnValue(that._drawValue);\n }", "title": "" }, { "docid": "b52f2a617413b0bf7e3cd01a51e3d0c6", "score": "0.49126673", "text": "function changeStylesTuT() {\n document.querySelector(\".classNames\").classList.remove(\"hidden\");\n\n // document.querySelector(\".classname\").style.color = \"black\";\n // document.querySelector(\".classname\").style.backgroundColor = \"yellow\";\n // change multipöe in one line:\n // document.querySelector(\".classname\").style.cssText = \"background-color: orange; color: dark blue;\";\n document.querySelector(\".classname\").setAttribute(\"style\",\"background-color: black; color: white;\");\n \n }", "title": "" }, { "docid": "4549c9256b7b3b6bca4e942e1c7dfbce", "score": "0.4899238", "text": "changeFontStyleHandler(style){\n if(this.state.clickedTemplate){\n let styledClickedTemplate = {...this.state.clickedTemplate};\n styledClickedTemplate.blockFontStyle = style;\n let templatesChanged = this.state.templates.map((templ)=>{\n if(templ.id === this.state.clickedTemplate.id){\n return {...templ, blockFontStyle: style}\n }else{\n return templ;\n }\n })\n this.setState({\n clickedTemplate: styledClickedTemplate,\n templates: templatesChanged\n })\n window.templatesToImport = [...templatesChanged]\n }\n }", "title": "" }, { "docid": "0123b0b466c900c8d6272249ca138fb1", "score": "0.48981094", "text": "function changeStyle(object, styleName, newStyle) {\n \n if(object.isEditing) {\n\n var style = { };\n style[styleName] = newStyle;\n object.setSelectionStyles(style);\n }\n \n else {\n $(object).prop(styleName, newStyle); \n }\n }", "title": "" }, { "docid": "8d1a63f8097dec42a454249753f167ce", "score": "0.48945227", "text": "active() {\n\t\tfor (const css of this.activeValues) {\n\t\t\tthis.element.classList.add(css);\n\t\t}\n\t\tfor (const css of this.inactiveValues) {\n\t\t\tthis.element.classList.remove(css);\n\t\t}\n\t}", "title": "" }, { "docid": "cc1d3fd05ee0ebd4aec59dc187754feb", "score": "0.48941597", "text": "function setActiveStyleSheet(link, title) {\n var i, a, main;\n for(i=0; (a = document.getElementsByTagName(\"link\")[i]); i++) {\n if(a.getAttribute(\"rel\").indexOf(\"style\") != -1 && a.getAttribute(\"title\")) {\n a.disabled = true;\n if(a.getAttribute(\"title\") == title) a.disabled = false;\n }\n }\n if (oldLink) oldLink.style.fontWeight = 'normal';\n oldLink = link;\n link.style.fontWeight = 'bold';\n return false;\n}", "title": "" }, { "docid": "818263794b2d2b0becbeefe0d86a242c", "score": "0.48873964", "text": "render() {\n //There are three styles of setting styles. One is inline with double curly braces and another is putting\n //the style in a variable with curly braces and then using the the variable in style = {varName}\n //The last one is that with the function which can have different style for different conditions\n\n //To create custom functions for event, if you're using the normal function you'll need to bind the this to \n //the function because since the function is not part of the component class it can't access the this\n\n const { title, id } = this.props.todo;\n\n return (\n <div style={this.getStyle()} > \n <p>\n <input type=\"checkbox\" onChange={ this.props.markComplete.bind(this, id) }/> {' '}\n { title }\n <button onClick={ this.props.delTodo.bind(this, id) } style ={btnStyle}>x</button>\n </p>\n </div>\n );\n }", "title": "" }, { "docid": "06a2f0df598548f3a3aaf1b25933c6c6", "score": "0.48767087", "text": "refreshStyle() {\n this.card.getElement().className = \"\";\n this.card.getElement().classList.add(...this.style.getStyle(\"card\"));\n this.cardTitle.classList.add(...this.style.getStyle(this.cardTitle.id));\n this.cardBody.classList.add(...this.style.getStyle(this.cardBody.id));\n this.cardFooter.classList.add(...this.style.getStyle(this.cardFooter.id));\n\n this.descriptionLabel.classList.add(\n ...this.style.getStyle(this.descriptionLabel.id)\n );\n this.descriptionInput.classList.add(\n ...this.style.getStyle(this.descriptionInput.id)\n );\n this.expireDateLabel.classList.add(\n ...this.style.getStyle(this.expireDateLabel.id)\n );\n this.buttonContainer.classList.add(\n ...this.style.getStyle(this.buttonContainer.id)\n );\n this.delete.classList.add(...this.style.getStyle(this.delete.id));\n this.dateInput.classList.add(...this.style.getStyle(this.dateInput.id));\n this.save.classList.add(...this.style.getStyle(this.save.id));\n this.alertBox.classList.add(...this.style.getStyle(this.alertBox.id));\n this.closeAlert.classList.add(...this.style.getStyle(this.closeAlert.id));\n this.newPill.classList.add(...this.style.getStyle(this.newPill.id));\n this.cancel.classList.add(...this.style.getStyle(this.cancel.id));\n this.markAsDone.classList.add(...this.style.getStyle(this.markAsDone.id));\n this.edit.classList.add(...this.style.getStyle(this.edit.id));\n this.creationDate.classList.add(\n ...this.style.getStyle(this.creationDate.id)\n );\n this.creationDateLabel.classList.add(\n ...this.style.getStyle(this.creationDateLabel.id)\n );\n }", "title": "" }, { "docid": "6be3b734036736f19fbba12ba0ca8773", "score": "0.48738974", "text": "set isActive(value) {\n if (this._mdcComponent) {\n this._mdcComponent.isActive = value;\n }\n }", "title": "" }, { "docid": "eedc7c942ba50334d5167d626ee76408", "score": "0.48616078", "text": "function addActiveStyle(divID) {\n // Remove active class from whatever was there before\n let prevActive = document.querySelectorAll('div.gui-button-div-active, button.gui-button-div-active');\n for (var i = 0; i < prevActive.length; i++) {\n prevActive[i].classList.remove('gui-button-div-active');\n }\n\n // Once all active classes are remove, re-add the active class to the divID\n document.getElementById(divID).classList.add('gui-button-div-active');\n document.getElementById(divID + \"Button\").classList.add('gui-button-div-active');\n // if (document.getElementById(divID + \"Button\")) {\n \n // }\n}", "title": "" }, { "docid": "1d9e28c9ac15606e6329b0e7cef1dadb", "score": "0.48587748", "text": "removeCurrentActiveStyles() {\r\n this.percentageBtns.forEach(b => b.classList.remove(\"active\"));\r\n }", "title": "" }, { "docid": "3210275a1b88bf494044af95ba9c158e", "score": "0.48550412", "text": "refreshStyles() {\n\t\tthis.styleElement.replaceChildren( document.createTextNode( this.getStyles() ) );\n\t}", "title": "" }, { "docid": "82469b83d5a5179304d2a5b527ec16c0", "score": "0.4854296", "text": "function setStyles() {\n\t\t_.each(_.keys(site.styles), function(classKey) {\n\t\t\tvar cssClass = site.styles[classKey];\n\t\t\t_.each(_.keys(cssClass), function(styleKey) {\n\t\t\t\tsetStyle(classKey, styleKey, cssClass[styleKey]);\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "daf0bfc308de61d6decee6fec287f447", "score": "0.48527637", "text": "applyTheme() {\n if (this.disabled) return this.clearCss();\n this.css = this.generatedStyles;\n }", "title": "" }, { "docid": "daf0bfc308de61d6decee6fec287f447", "score": "0.48527637", "text": "applyTheme() {\n if (this.disabled) return this.clearCss();\n this.css = this.generatedStyles;\n }", "title": "" }, { "docid": "daf0bfc308de61d6decee6fec287f447", "score": "0.48527637", "text": "applyTheme() {\n if (this.disabled) return this.clearCss();\n this.css = this.generatedStyles;\n }", "title": "" }, { "docid": "daf0bfc308de61d6decee6fec287f447", "score": "0.48527637", "text": "applyTheme() {\n if (this.disabled) return this.clearCss();\n this.css = this.generatedStyles;\n }", "title": "" }, { "docid": "daf0bfc308de61d6decee6fec287f447", "score": "0.48527637", "text": "applyTheme() {\n if (this.disabled) return this.clearCss();\n this.css = this.generatedStyles;\n }", "title": "" }, { "docid": "3a0f86d9a178bdfb447fc236641ce2e1", "score": "0.48519385", "text": "function handleAlignmentActiveClass(alignment) {\n if(alignment == \"left\") {\n alignButton.children[1].classList.remove(\"active\");\n alignButton.children[2].classList.remove(\"active\");\n\n // setting active class on left alignment\n alignButton.children[0].classList.add(\"active\");\n } else if(alignment == \"center\") {\n alignButton.children[0].classList.remove(\"active\");\n alignButton.children[2].classList.remove(\"active\");\n\n // setting active class on center alignment\n alignButton.children[1].classList.add(\"active\");\n } else if(alignment == \"right\") {\n alignButton.children[0].classList.remove(\"active\");\n alignButton.children[1].classList.remove(\"active\");\n\n // setting active class on right alignment\n alignButton.children[2].classList.add(\"active\");\n } else if(alignment == \"none\") {\n for(let i = 0; i < alignButton.children.length; i++) {\n alignButton.children[i].classList.remove(\"active\");\n }\n }\n}", "title": "" }, { "docid": "4351b446368307f9406abb99324eca30", "score": "0.4836348", "text": "setStyles() {\n\n // determine the display type of the element as we can't support inline\n if (this.$element.css('display') === 'inline') {\n this.$element.css('display', 'inline-block');\n }\n\n // apply the style to keep it on one line and show ellipsis\n this.$element.css({ overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' });\n }", "title": "" }, { "docid": "a4311739eb7c3c814eccc5f637b63bdc", "score": "0.48342207", "text": "function setActiveStyleSheet(link, title) {\r\n var i, a, main;\r\n for(i=0; (a = document.getElementsByTagName(\"link\")[i]); i++) {\r\n if(a.getAttribute(\"rel\").indexOf(\"style\") != -1 && a.getAttribute(\"title\")) {\r\n a.disabled = true;\r\n if(a.getAttribute(\"title\") == title) a.disabled = false;\r\n }\r\n }\r\n if (oldLink) oldLink.style.fontWeight = 'normal';\r\n oldLink = link;\r\n link.style.fontWeight = 'bold';\r\n return false;\r\n}", "title": "" }, { "docid": "664777c2765ce559659bc996d5e0133f", "score": "0.48139265", "text": "moveStyle() {}", "title": "" }, { "docid": "d7ef77823bf6f5d11be8e0143172d7c4", "score": "0.48091197", "text": "setStyle() {\n // Default style\n this.style = this.getStyle(this.styleKey)\n\n // Override Style\n if (this.styleKey === 'style_zone_urbaines') {\n this.style = { ...this.style, ...this.getStyle(`style_zone_urbaines__${this.feature.properties.typezone.toLowerCase()}`) }\n }\n else if (['style_ocsge_couverture', 'style_ocsge_usage'].includes(this.styleKey)) {\n let leaf\n\n if (this.styleKey === 'style_ocsge_couverture')\n leaf = this.couv_leafs.find(el => el.code_couverture == this.feature.properties.code_couverture.replaceAll('.', '_'))\n\n if (this.styleKey === 'style_ocsge_usage')\n leaf = this.usa_leafs.find(el => el.code_usage == this.feature.properties.code_usage.replaceAll('.', '_'))\n \n this.style = { ...this.style, ...{ fillColor: leaf?.map_color, color: leaf?.map_color } }\n }\n else if (this.styleKey === 'style_ocsge_diff') {\n if (this.feature.properties.is_new_artif)\n this.style = { ...this.style, ...this.getStyle('style_ocsge_diff__new_artif') }\n \n if (this.feature.properties.is_new_natural)\n this.style = { ...this.style, ...this.getStyle('style_ocsge_diff__new_natural') }\n }\n\n return this.style\n }", "title": "" }, { "docid": "dd9da1f25cbc8d3baf94ac68b460eb6d", "score": "0.48082584", "text": "function resolveInteractiveStyles(style, component) {\n var _a = component.props, disabled = _a.disabled, interactiveStyles = _a.interactiveStyles;\n if (!interactiveStyles) {\n return style;\n }\n return tslib_1.__assign({}, style, (component.state.hover && !disabled && interactiveStyles.hover), (component.state.focus && !disabled && interactiveStyles.focus), (component.state.active && !disabled && interactiveStyles.active), (disabled && interactiveStyles.disabled));\n}", "title": "" } ]
a16ca9c5ed5a08a9322fdbc2a1112b2e
to override if needed
[ { "docid": "08b2319711f366f07e8ad1e53048fe12", "score": "0.0", "text": "renderCustomSecondaryFilter(){\n return null;\n }", "title": "" } ]
[ { "docid": "e65f4f41723b115d727f56ddb1d09488", "score": "0.5658566", "text": "preExecute() {\n\t\t// Overwrite this...\n\t}", "title": "" }, { "docid": "a73ed9f76d16d5533192777d7070f623", "score": "0.5609181", "text": "_onRender() {}", "title": "" }, { "docid": "6927536d1e5e6ea9e09687840fcf8cd8", "score": "0.5599545", "text": "init() {\n\t\t\n\t}", "title": "" }, { "docid": "595b0ec0e12e03e3803735abc4d9c721", "score": "0.5594242", "text": "init()\n\t{\n\n\t}", "title": "" }, { "docid": "4f1b399154edaf560218b25a2834fdc3", "score": "0.55851805", "text": "function __b_aPxD_aAgzT_aoP7hbI6qzoA(){}", "title": "" }, { "docid": "10c1ade25d2a14f191c2d80bd9f68776", "score": "0.55590963", "text": "constructor() {\n\t\t\t\tsuper();\n }", "title": "" }, { "docid": "04f4314f66c4d4d46c1ec493b4a82950", "score": "0.55410814", "text": "init() {\n super.init();\n }", "title": "" }, { "docid": "76a5f244e652d428875f6341e8f25215", "score": "0.5492569", "text": "constructor() {\n super();\n }", "title": "" }, { "docid": "3c5b7f7ea4a355a3b318db8a030022d7", "score": "0.5465778", "text": "init() {\n\t\t// Could be implemented\n\t}", "title": "" }, { "docid": "bec3105e921c1357afd382adb060faaa", "score": "0.54412997", "text": "init() {\n super.init();\n }", "title": "" }, { "docid": "34a9081de66aa50c2c66c8c1f5403377", "score": "0.54300255", "text": "didRender() {\n // to be overridden by subclasses\n }", "title": "" }, { "docid": "f5a059be67b8edea3624ca83ab40c4eb", "score": "0.54203165", "text": "run() {\n super.run();\n }", "title": "" }, { "docid": "14e171dec3b81d98fffed636dab7fc9a", "score": "0.5406463", "text": "init() {\n }", "title": "" }, { "docid": "c16cda55c89b87c4ec7720269486eb07", "score": "0.5396529", "text": "constructor() {\n\n\t}", "title": "" }, { "docid": "c16cda55c89b87c4ec7720269486eb07", "score": "0.5396529", "text": "constructor() {\n\n\t}", "title": "" }, { "docid": "e4fde00acd17096d7d9b3891dde3c6f9", "score": "0.53724396", "text": "render() { return super.render(); }", "title": "" }, { "docid": "4232d26f154dc5b26772e436dbdcdf02", "score": "0.53515935", "text": "constructor() {\n super();\n }", "title": "" }, { "docid": "23e71342fc3fd06f8eb8cf88e5a0e5a7", "score": "0.5345363", "text": "render() {return null}", "title": "" }, { "docid": "1af8f26d0989b9b97e4ed94e8daf5ca2", "score": "0.5337992", "text": "beforeHandling() {\n\t\t//\n\t}", "title": "" }, { "docid": "66716aeeeede61a6e881f1866a96521a", "score": "0.53324723", "text": "getSubuh(){\n throw new Error('Should be implemented');\n }", "title": "" }, { "docid": "1e29808d0dc44409a18bbede8c5ddcfb", "score": "0.5317561", "text": "function yst_overrideElemFunction() {\n\treturn;\n}", "title": "" }, { "docid": "35dc35c3d0cc30416e297013b49409b1", "score": "0.53148365", "text": "initalizing() {}", "title": "" }, { "docid": "28bc12c1c60fa6d37b67c8e763e65a08", "score": "0.5304468", "text": "createdCallback() {\n super.createdCallback();\n }", "title": "" }, { "docid": "cc5536afed8986d32e23063a609a6f8b", "score": "0.5300147", "text": "init() {\n return super.init()\n }", "title": "" }, { "docid": "103252230b532399ecac4738394b2b64", "score": "0.52999306", "text": "_update() {\n throw new Error(`${this.constructor.name} does not properly override the _update method`);\n }", "title": "" }, { "docid": "3a208b874ce6fdfa3609c3f775da1dfc", "score": "0.52934366", "text": "$output( /* ... */ ) {\n\t\t// to be overridden\n\t\tthrow new Error('pragmatics.$output should be implemented in subclasses');\n\t}", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "306a6831588985655a0f9fa260ba672f", "score": "0.5293362", "text": "constructor() {\n \n }", "title": "" }, { "docid": "d83c528b75a374af4cc974ab94f0390f", "score": "0.5262276", "text": "constructor () {\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "78dc4d7acfbc7b81b7ca903afba98639", "score": "0.5258903", "text": "constructor() {\n \n\n \n \n\n \n\n \n }", "title": "" }, { "docid": "ace10e8541b6a668f1b92a8a771437c4", "score": "0.5253169", "text": "constructor() {\r\n super();\r\n }", "title": "" }, { "docid": "ace10e8541b6a668f1b92a8a771437c4", "score": "0.5253169", "text": "constructor() {\r\n super();\r\n }", "title": "" }, { "docid": "ace10e8541b6a668f1b92a8a771437c4", "score": "0.5253169", "text": "constructor() {\r\n super();\r\n }", "title": "" }, { "docid": "ace10e8541b6a668f1b92a8a771437c4", "score": "0.5253169", "text": "constructor() {\r\n super();\r\n }", "title": "" }, { "docid": "ace10e8541b6a668f1b92a8a771437c4", "score": "0.5253169", "text": "constructor() {\r\n super();\r\n }", "title": "" }, { "docid": "ace10e8541b6a668f1b92a8a771437c4", "score": "0.5253169", "text": "constructor() {\r\n super();\r\n }", "title": "" }, { "docid": "e6395800e3be797cf23a8c4e9ac473de", "score": "0.52478755", "text": "getMaghrib(){\n throw new Error('Should be implemented');\n }", "title": "" }, { "docid": "4fbfa8dfeed591a1ffba9e298ff891ed", "score": "0.5247493", "text": "constructor() {\n super(\"Not implemented Exception\")\n }", "title": "" }, { "docid": "614d4fece84af22ab7312804515caf79", "score": "0.5247179", "text": "constructor(){\n\t\tsuper();\t\n\t}", "title": "" }, { "docid": "4aa0b97e43092636a5fe38cff5704aad", "score": "0.52341104", "text": "initialize() {\n return;\n }", "title": "" }, { "docid": "e871bf5a0a609ff7097393eb8627b6aa", "score": "0.5234041", "text": "reset()\n {\n // Override for implementation\n }", "title": "" }, { "docid": "368167e370df6b0836bc47c4a1cf7a9c", "score": "0.52324605", "text": "beforeApply() {}", "title": "" }, { "docid": "4458799ff0103eea0c528dac17b1a7aa", "score": "0.5227827", "text": "initialize() {\r\n return null;\r\n }", "title": "" }, { "docid": "02192d0557a7db3761a735b0907fccd5", "score": "0.522533", "text": "_overriddenMenuHandler() { }", "title": "" }, { "docid": "4f0353230bbfb7ef873664c04730863c", "score": "0.5219888", "text": "function init() {\n \n }", "title": "" }, { "docid": "d0b54cade4582bbc0106e7ba12399c58", "score": "0.52057403", "text": "_firstRendered() { }", "title": "" }, { "docid": "d0b54cade4582bbc0106e7ba12399c58", "score": "0.52057403", "text": "_firstRendered() { }", "title": "" }, { "docid": "c8b5ab86038bdb6473d08707aa85ab20", "score": "0.52018803", "text": "constructor() {\n\t}", "title": "" }, { "docid": "2f83124dd1e6ffd476e099b77d8f2081", "score": "0.5183186", "text": "function SuperclassBare() {}", "title": "" }, { "docid": "3ce43d32acc7ae6545d739091e4dee84", "score": "0.51599735", "text": "constructor()\n\t{\n\t\n\t}", "title": "" }, { "docid": "a308107e35a1a704218cf445d9014b38", "score": "0.5153235", "text": "init() {\n\t}", "title": "" } ]
9fd8c2c7b95269dc60e0c417d331781b
This method sets new email for state.modifyParticipant
[ { "docid": "beb207c4c4ec8a8dd334387a65fa2d9a", "score": "0.6602858", "text": "setModifyEmail (email){\n let copy = this.state.modifyParticipant;\n this.setState({\n modifyParticipant: {id:copy.id, name:copy.name, email:email, phone:copy.phone},\n showErrors: false \n });\n }", "title": "" } ]
[ { "docid": "4166695f84135f32e2ba882d0a772ee5", "score": "0.66143984", "text": "setEmail(state, email) {\n state.email = email;\n }", "title": "" }, { "docid": "868800a60ce057df41239167c1dce9e2", "score": "0.64714736", "text": "function setCurrentEmail(email/*:ModerationEmail*/)/*:void*/ {\n var oldEmail/*:ModerationEmail*/ = this.currentEmail$_zu5;\n this.currentEmail$_zu5 = email;\n this.fireEvent(\"currentEmail\", oldEmail, email);\n }", "title": "" }, { "docid": "ef909f7e8d9e3b3ad05a29eb889e5160", "score": "0.6363239", "text": "async function updateParticipantEmail({patientId, email, token}){\n const query = {\n patientId,\n email\n }\n return await fetch(`/api/v1/user/update-participant-email?${queryString.stringify(query)}`,{\n method: 'POST',\n headers: {\n 'Content-Type': 'text/plain',\n 'access-control-allow-origin': '*'\n }\n })\n .then(handleResponse)\n .catch(handleErrorMsg('Unable to save changes.'))\n}", "title": "" }, { "docid": "75eafffbb5db33c56232489cde6a728e", "score": "0.6307717", "text": "setEMail(aEMail){\n this.email = aEMail;\n}", "title": "" }, { "docid": "7f3278e48c37c5fa5ab9709f94f634a4", "score": "0.6287884", "text": "set email(value) {\n this._email = value;\n }", "title": "" }, { "docid": "a0f458c9489be2e57263fb2e6de1577d", "score": "0.62720764", "text": "setEmail(value) {\n\t\tthis.email = value;\n\t}", "title": "" }, { "docid": "802e15b2ce5ba06f9b5bba16a56e90c1", "score": "0.6265788", "text": "set email(value) {\n\t\tthis._email = value;\n\t}", "title": "" }, { "docid": "972f8ec282e14f2d40cb51552e353a85", "score": "0.6184793", "text": "changeEmail(email){\n this.email = email;\n }", "title": "" }, { "docid": "f2de138eb912b3d7c34e4288c7b29c61", "score": "0.61627996", "text": "function addTeamEmail( t, m ){ // t: element to garner contact address\n\tvar eLoc = t.attr( \"data-eLoc\" );\n\n\tm.find( \".contact-team\" ).attr( \"value\", eLoc + \"@tkhllp.com\" );\n}", "title": "" }, { "docid": "7d1de3a6e6c5d8142fb9cdae2afd8a19", "score": "0.61139584", "text": "function updateEmail(e){\n\n\tvar app = UiApp.getActiveApplication();\n\tvar rec = e.parameter.recTB;\n\tvar sub = e.parameter.subTB;\n\tvar msg = e.parameter.msgTA;\n\n\tsetProperty('EMAIL_ADDRESS',rec);\n\tsetProperty('EMAIL_SUBJECT',sub);\n\tsetProperty('EMAIL_MESSAGE',msg);\n\tapp.close();\n\treturn app;\n}", "title": "" }, { "docid": "e915253fbc2b3809c8105f6bc2f90254", "score": "0.60639393", "text": "set contactEmail(value) {\n this._contactEmail = value;\n \n }", "title": "" }, { "docid": "57ead450748caa95f94c0fb8e3a1917d", "score": "0.60088885", "text": "async changeEmail({ commit, dispatch, state }, payload) {\r\n if (!payload) return;\r\n dispatch('shared/clearError', false, { root: true });\r\n\r\n const currentUser = state.currentUser;\r\n currentUser.email = payload;\r\n\r\n try {\r\n await firebase.auth().currentUser.updateEmail(payload);\r\n\r\n await firebase\r\n .database()\r\n .ref(`/users/${state.currentUser.id}/personal/email`)\r\n .set(payload);\r\n\r\n commit('SET_CURRENT_USER', currentUser);\r\n } catch (error) {\r\n dispatch('shared/setError', error.message, { root: true });\r\n throw error;\r\n }\r\n }", "title": "" }, { "docid": "1f9ad2c54e215c63d24478774ee6bb1f", "score": "0.59642917", "text": "function setEmail(email) {\n console.info(\"Setting the Current Email: \", email);\n $('#edit_email').val(email);\n }", "title": "" }, { "docid": "5534218dff4256f418fcabcb3afdf2f8", "score": "0.5932436", "text": "_changeEmail(evt) {\n console.log(\"inside RegisterForm >>> changeemail >>> email \"+evt.target.value)\n var newState = this._mergeWithCurrentState({\n email: evt.target.value\n });\n\n this._emitChange(newState);\n }", "title": "" }, { "docid": "ee8bf9a5040c40f21a973b8b26dd9152", "score": "0.5869112", "text": "function initEmailTo() {\n if( reviewViewModel.emailToAddress() == \"\" ) {\n var primaryWOContact = JSONData.getWorkOrderPrimaryEmailForCustomer( ManageWorkOrder.getCustomer() );\n if( !_.isNull( primaryWOContact )) {\n debug && console.log( \"ManageWorkOrderReview.initEmailTo: Assigning Work Order Primary Contact \" +\n primaryWOContact );\n reviewViewModel.emailToAddress( primaryWOContact );\n currentEmailToAddress = reviewViewModel.emailToAddress();\n emailToAddressPrevious = reviewViewModel.emailToAddress();\n\n saveEmailAddressUpdate();\n }\n }\n }", "title": "" }, { "docid": "88c8cacd2e653033a3313653edc3aa1a", "score": "0.5846852", "text": "[types.UPDATE_ASSIGNEE](_state, payload) {\n const [chat] = _state.allConversations.filter(c => c.id === payload.id);\n Vue.set(chat.meta, 'assignee', payload.assignee);\n }", "title": "" }, { "docid": "5dea6d348dc630c77666f7f08c0094e6", "score": "0.57852995", "text": "async cartSetEmail(email) {\r\n\t if (this.isCartInit) {\r\n\t this.cart.id = this.cartId;\r\n\t this.cart.email = this.user.email;\r\n\t return this.client.cart.update(this.cart);\r\n\t }\r\n\t }", "title": "" }, { "docid": "fcd59b7f0fbc65eb668d5f1d11d9d383", "score": "0.5757549", "text": "updateEmail(email) {\n return axios.put(BASE_URL + \"/mobile/email\", {\n email\n }, this.header);\n }", "title": "" }, { "docid": "cf4726396e6808c5b7162ea3e12950f6", "score": "0.5752245", "text": "function setEmailInfo(){\n\n\tvar ui = FormApp.getUi();\n\tvar app = UiApp.createApplication().setWidth(\"500\").setHeight(\"500\");\n\tvar panel = app.createVerticalPanel();\n\tvar recLB = app.createLabel(\" Please enter emails seperated by a comma (email1,email2,email3).\");\n\tvar recTB = app.createTextBox().setId('recTB').setName('recTB').setWidth(\"500\");\n\tvar subLB = app.createLabel(\"Please enter subject.\");\n\tvar subTB = app.createTextBox().setId('subTB').setName('subTB').setWidth(\"500\");\n\tvar msgLB = app.createLabel(\"Please enter message.\");\n\tvar msgTA = app.createTextBox().setId('msgTA').setName('msgTA').setWidth(\"500\").setHeight(\"150\");\n\tvar submit = app.createButton('Submit');\n\n\tpanel.add(recLB).add(recTB).add(subLB).add(subTB).add(msgLB).add(msgTA).add(submit);\n\tapp.add(panel);\n\n\tvar handler = app.createServerHandler('updateEmail');\n\thandler.addCallbackElement(panel);\n\tsubmit.addClickHandler(handler);\n\tui.showModalDialog(app, 'Email Settings');\n}", "title": "" }, { "docid": "909de4d491b98791bfc60d7fe17c4bfa", "score": "0.5672187", "text": "function editRemoteParticipant() {\n // Get the first remote participant\n var part = m_SessionModel.getRemoteParticipants()[0];\n $(\"#nameInput\").val(part.getName());\n $(\"#emailInput\").val(part.getEmail());\n $(\".remotePartEditForm\").show();\n }", "title": "" }, { "docid": "e545ee7cf204eb16d5ce53285d87d3da", "score": "0.5658226", "text": "setEmail(userID, newEmail) {\n let doesUserExist = this.users.find(user => newEmail === user.email)\n if(doesUserExist) {\n return;\n }\n this.users.find(user => user._id === userID).email = newEmail\n }", "title": "" }, { "docid": "9fd488388f59a00b4c834ec67f706317", "score": "0.5594906", "text": "set email(email) {\n const emailRegex = RegExp(\"^[a-z0-9]+(([\\\\._+-][a-z0-9]+)?)\\\\@[a-z0-9]+\\\\.(([a-z]{2,4})(\\\\.[a-z]{2,4})?)$\");\n if (emailRegex.test(email)) {\n this._email = email;\n }\n else {\n throw \"Email : \" + email + \" is Invalid!\";\n }\n }", "title": "" }, { "docid": "23be6fb44a19af6a9bf1a6fd58686d21", "score": "0.5571193", "text": "function onEmailChange(e) {\n const email = e.target.value;\n setUserState(oldUserState => {\n const newUserState = { ...oldUserState, email: email };\n return newUserState;\n });\n }", "title": "" }, { "docid": "31a5e8b31198b40803158981bdc4457f", "score": "0.55338967", "text": "get updateEmail() {\n if (this.isAnonymous) return () => Promise.reject(new Error('Can not update email on an anonymous user.'));\n return this._auth.updateEmail;\n }", "title": "" }, { "docid": "5aa50a465e2ae5b8a244733d20225d44", "score": "0.5528781", "text": "function onChangeEmail(event) {\n\t\tconst { name, value } = event.target;\n\t\tlocalStorage.setItem('Email', value);\n\t}", "title": "" }, { "docid": "85250cf67de1aec07c4e467d9c13472c", "score": "0.55276966", "text": "function reloadSessionEmail(){\n LightningChat.loadSessionEmail(function(email){\n if(!email){\n LightningChat.dom.removeClass(LightningChat.dom.id(\"lightning-chat-email-form\"), \"lightning-chat-hidden\");\n LightningChat.dom.addClass(LightningChat.dom.id(\"lightning-chat-email-status\"), \"lightning-chat-hidden\");\n } else {\n LightningChat.dom.addClass(LightningChat.dom.id(\"lightning-chat-email-form\"), \"lightning-chat-hidden\");\n LightningChat.dom.removeClass(LightningChat.dom.id(\"lightning-chat-email-status\"), \"lightning-chat-hidden\");\n LightningChat.dom.id(\"lightning-chat-email-status-label\").innerHTML = \"Hi! \" + email;\n }\n });\n }", "title": "" }, { "docid": "bdaf50d5964a94da41bcab821ac7d637", "score": "0.5503414", "text": "function handleEmailChange(e) {\n setEmail(e.target.value);\n }", "title": "" }, { "docid": "c156eeed3871b6caa83725319d95ebef", "score": "0.5442099", "text": "setUserEmail(email) {\n this.loggerData.email = email;\n }", "title": "" }, { "docid": "f772d0634a7494360d974b52d4ad9fcf", "score": "0.54323435", "text": "function setupMail(){\r\n if(ScriptProperties.getProperty('email') == \"\" || ScriptProperties.getProperty('email') == null ){\r\n var quest = Browser.inputBox(\"Entrez votre email, le programme ne vérifie pas le contenu de cette boite.\", Browser.Buttons.OK_CANCEL);\r\n if(quest == \"cancel\"){\r\n Browser.msgBox(\"Ajout email annulé.\");\r\n return false;\r\n }else{\r\n ScriptProperties.setProperty('email', quest);\r\n Browser.msgBox(\"Email \" + ScriptProperties.getProperty('email') + \" ajouté\");\r\n }\r\n }else{\r\n var quest = Browser.inputBox(\"Entrez un email pour modifier l'email : \" + ScriptProperties.getProperty('email') , Browser.Buttons.OK_CANCEL);\r\n if(quest == \"cancel\"){\r\n Browser.msgBox(\"Modification email annulé.\");\r\n return false;\r\n }else{\r\n ScriptProperties.setProperty('email', quest);\r\n Browser.msgBox(\"Email \" + ScriptProperties.getProperty('email') + \" ajouté\");\r\n }\r\n }\r\n}", "title": "" }, { "docid": "455a92ea142f24a824e79af233776a4b", "score": "0.54052716", "text": "function handleEmailChange({target: {value}}) {\n setEmail(value);\n }", "title": "" }, { "docid": "7b98b5a91e5cb355a22a1ba398756d92", "score": "0.540269", "text": "function act_email() {\n\t\tvar email = inp_email.val();\n\n\t\t// First create a new subscriber.\n\t\t_dcq.push([\n\t\t\t\"identify\",\n\t\t\t{ email: email }\n\t\t]);\n\n\t\t// Then trigger the specified rule.\n\t\t_dcq.push([\n\t\t\t\"track\",\n\t\t\t\"Free plugin email course\",\n\t\t\t{\"Plugin\": drip_plugin}\n\t\t]);\n\t}", "title": "" }, { "docid": "1ba4956b66a0498e65a2ec50d8321fbb", "score": "0.540176", "text": "function setRecipients (newRecipients) {\n container.recipients = newRecipients;\n }", "title": "" }, { "docid": "839c7e3f8f1645c193407cf0435085a9", "score": "0.53742176", "text": "async function setEmailInput (input, stateName, stateValid) {\n let validStr = /^\\w+([.-]?\\w+)*@\\w+([.-]?\\w+)*(\\.\\w{2,3})+$/.test(input) ? 'valid' : 'invalid' ;\n setState({ ...state, [stateName]: input, [stateValid]: validStr })\n }", "title": "" }, { "docid": "fe99cd2f9fe42663bb300a8be87ababa", "score": "0.5357781", "text": "async ethModifiable() {\n const email = this.getEmail();\n let modifiable = await this.service.users.query(['ethAddressModifiable'], email);\n modifiable = modifiable[0] && modifiable[0].ethaddressmodifiable || false;\n this.response(200, { modifiable });\n }", "title": "" }, { "docid": "4d7d64522373e919a629d46cbe8b79c0", "score": "0.5355874", "text": "function stateEmailMailto_M(stateMachine, char) {\n if (char.toLowerCase() === 'a') {\n stateMachine.state = 16 /* EmailMailto_A */;\n }\n else {\n stateEmailLocalPart(stateMachine, char);\n }\n }", "title": "" }, { "docid": "f676d6863d41dfdf36f443440fc3ac4c", "score": "0.53455186", "text": "function mEditEmail() {\n post = {}\n sendXpost(gl_xhr,\"/cgi-bin/ehcGetEmailConfig.py\",post,updateEmailResponse);\n}", "title": "" }, { "docid": "7e63a40be16c4378a7eebd4590cd7796", "score": "0.5341672", "text": "function setMailTo() {\n\t//Get Email address\n\tvar emailId = document.getElementById(\"email\").value;\n\tvar message = document.getElementById(\"message\").value + \" My provided email is: \" + emailId;\n\n\t//Check email to be valid and that the text field is not blank\n\tif(checkEmail(emailId) && blankTextField(message) ){\n\t\t\n\t\tdocument.getElementById(\"mail\").href = \"mailto:[email protected]?subject=Concerning DealGatorData&body=\" + message;\n\t}\n}", "title": "" }, { "docid": "8757d71bdf5a2f974fb8911081cd45df", "score": "0.5333592", "text": "CLEAR_EMAIL (_state) {\n _state.email = ''\n }", "title": "" }, { "docid": "b871654193e9f4bf01519e270ca65cb1", "score": "0.53153676", "text": "set(target,prop,val){\n if(prop=== \"email\"){\n throw new Error('EMail property cannot be Written');\n }else {\n target[prop] = val;\n return true; // return the updated value\n }\n }", "title": "" }, { "docid": "5df67d32f141d5d550f52d35dfc647ea", "score": "0.53033274", "text": "function WorkFlow_Action_Email(obj_type)\r\n{\r\n\tthis.g_antObject = new CAntObject(obj_type);\r\n\tthis.defaultFrom = \"\";\r\n}", "title": "" }, { "docid": "64b5a2cf2bf57a82a19ce3961909035f", "score": "0.5300807", "text": "async sendChangeCode() {\n this.setState({\n visible: true,\n });\n const { user } = this.props;\n const res = await sendPWEmail(user.email);\n setTimeout(() => {\n localStorage.setItem(\"originalCode\", res.data.originalCode);\n }, 500);\n }", "title": "" }, { "docid": "4778ba0961d3053622f4f18ffeb7e028", "score": "0.52974546", "text": "updateOrg() {\n if (emailRegEx.test(this.org_email)) {\n organizationService\n .updateOrganization(organizationService.currentOrganization.org_id, this.org_name, this.org_phone, this.org_email)\n .then(() => {\n this.isDisabled = true;\n this.border = \"none\";\n this.backgroundColor = \"white\";\n this.inEdit = false;\n this.isAdmin = true;\n })\n .catch((error: Error) => console.log(error.message));\n } else {\n Alert.danger(\"Ikke gyldig email.\");\n }\n }", "title": "" }, { "docid": "20d7c892b4a9a1d16f8db5da740fd0e6", "score": "0.52972215", "text": "changeEmailMessage(payload, thenCallback, catchCallback) {\n const backendInstance = generateApiInstance();\n backendInstance\n .put(backendUrl + `/api/message`, payload)\n .then(thenCallback)\n .catch(catchCallback);\n }", "title": "" }, { "docid": "da37019c8ad4787f816c95ba3b0e7082", "score": "0.5290905", "text": "updateEmail(value) {\n this.setState({\n email: value,\n });\n }", "title": "" }, { "docid": "f380e894a1ab03e06b28d7585f9f805f", "score": "0.52873194", "text": "callbackInviteMember(projectNo, memberEmail, memberName) {\n this.props.callbackProjectSetting.inviteMember(projectNo, memberEmail, memberName);\n this.setState({\n inviteMemberEmail: \"\",\n inviteMemberName: \"\",\n userListOpen: true,\n inviteMemberButton: false,\n isMemberEmailValid: false\n })\n }", "title": "" }, { "docid": "e239c127f2c49733136f908132e7adde", "score": "0.5279292", "text": "function changeParticipantName(value) {\r\n if (!value) return;\r\n\r\n value.text = value.fullName || value.orgName;\r\n\r\n return value;\r\n }", "title": "" }, { "docid": "dcdff7e431c7c9a7de0d881d9884c255", "score": "0.5277076", "text": "set googleEmail(value) {\n credentials['email'] = value;\n }", "title": "" }, { "docid": "b4a6fbea9c9ef132ae9444c2c311d3b8", "score": "0.52692795", "text": "async editStudentData(email, phone, from){\n return this.contract.setStudent(email, phone, { from });\n }", "title": "" }, { "docid": "ca4f7231a06ebd1c3d6e106ba61c6214", "score": "0.52339107", "text": "function recipient(){\n if(vm.message.messageType == 'ToAll'){\n vm.toProfile = false;\n vm.toSpecificPerson = false;\n } else if(vm.message.messageType == 'To'){\n vm.toProfile = false;\n vm.toSpecificPerson = true;\n } else if(vm.message.messageType == 'Profile'){\n vm.toProfile = true;\n vm.toSpecificPerson = false;}\n } // end of recipient function", "title": "" }, { "docid": "8db940ea4340f0dae557a7748f0d8a74", "score": "0.52335966", "text": "function saveEmailAddressUpdate( pageLoad ) {\n Dialog.closeDialog( false );\n\n if( pageLoad == undefined ) {\n pageLoad = false;\n }\n\n var validEmailEntries = validateEmailEntries();\n\n // Validate the email entries\n if( reviewViewModel.pageId() == ManageWorkOrder.CUSTOMER_REVIEW_PAGE && validEmailEntries != \"\"&& pageLoad ) {\n Dialog.showAlert( Localization.getText( \"invalidEmailFormat\" ), validEmailEntries, function() {\n Dialog.closeDialog();\n displayEmailAddressUpdateDialog();\n }, \"450px\" );\n\n return;\n } else {\n // trim the email values for leading spaces\n reviewViewModel.emailToAddress( reviewViewModel.emailToAddress().replace(new RegExp(\"^[\\\\s]+\", \"g\"), \"\" ));\n reviewViewModel.emailCCAddress( reviewViewModel.emailCCAddress().replace(new RegExp(\"^[\\\\s]+\", \"g\"), \"\" ));\n }\n\n // Send a contact update message if either e-mail address changes\n if ( reviewViewModel.emailToAddress() != emailToAddressPrevious ||\n reviewViewModel.emailCCAddress() != emailCCAddressPrevious ) {\n\n debug && console.log( \"ManageWorkOrderReview.saveEmailAddressUpdate: Creating customer contact update message with new e-mail addresses\" );\n var message = JSONData.createNewMessage();\n message.dateSent = message.dateUpdate;\n message.type = JSONData.MESSAGE_TYPE_CUSTOMER_CONTACT_UPDATE;\n message.entityType = \"Customer\";\n message.entityId = reviewViewModel.manageWO.customer.webId();\n message.value = Localization.getText( \"emailAddressUpdate\" ) + \"\\n\" +\n Localization.getText( \"toLabel\" ) + \": \" + reviewViewModel.emailToAddress() + \"\\n\" +\n Localization.getText( \"ccLabel\" ) + \": \" + reviewViewModel.emailCCAddress();\n // JSONData.saveJSON( \"messages\", message, true );\n\n // Initialize the sendTo and sendCC fields of the workOrder\n var workOrder = ManageWorkOrder.getWorkOrder();\n workOrder.workOrderSegments[0].emailTo = reviewViewModel.emailToAddress();\n workOrder.workOrderSegments[0].emailCC = reviewViewModel.emailCCAddress();\n\n // Update the emailPrevious varaibles\n emailToAddressPrevious = reviewViewModel.emailToAddress();\n emailCCAddressPrevious = reviewViewModel.emailCCAddress();\n\n // Save the work order changes locally\n JSONData.saveJSON( \"workOrders\", workOrder, true );\n debug && console.log( \"ManageWorkOrderReview.saveEmailAddressUpdate: Customer contact update message saved\" );\n } else {\n Dialog.closeDialog( false );\n debug && console.log( \"ManageWorkOrderReview.saveEmailAddressUpdate: No e-mail changes detected, customer contact update message not sent\" );\n }\n }", "title": "" }, { "docid": "eb7115453f3045041dc37806ae506b6e", "score": "0.52253926", "text": "sendEmail(emailParameter){\n console.log(`${this.name} is now emailing ${emailParameter}`);\n }", "title": "" }, { "docid": "60b7acb242b96b6bc971de48f41919fa", "score": "0.5224536", "text": "async setResetPasswordVerificationCode(i) {\n const targetUser = i instanceof this.user\n ? i\n : super.findOne(i)\n if (!targetUser)\n abort(httpCodes.notFound)\n\n try {\n // generate verification_code\n targetUser.verification_code = verificationCodeGenerator()\n targetUser.verification_code_expires = moment().add(Config.get('user.verificationCode.expires'), 'second').format('YYYY-MM-DD HH:mm:ss')\n console.log(targetUser.verification_code_expires)\n const result = await targetUser.save()\n // await super.update(targetUser, verificationCode, true)\n //console.log(result);\n const data = Object.assign(\n {user: targetUser},\n )\n Mail.send('emails.verification-code-for-user', data, message => {\n message\n .to(targetUser.email, targetUser.fullname)\n .from(Config.get('email.sender.email'), Config.get('email.sender.name'))\n .subject('Vefification code for reset password in My TODO app')\n })\n return result\n } catch (e) {\n console.log(e)\n abort(httpCodes.internalError)\n }\n }", "title": "" }, { "docid": "7873b1e01cdb6e1e74ebdc246fec326c", "score": "0.5222783", "text": "_updateEmailAddressNode(emailNode, address) {\n emailNode.setAttribute(\n \"label\",\n address.fullAddress || address.displayName || \"\"\n );\n emailNode.removeAttribute(\"tooltiptext\");\n emailNode.setAttribute(\"emailAddress\", address.emailAddress || \"\");\n emailNode.setAttribute(\"fullAddress\", address.fullAddress || \"\");\n emailNode.setAttribute(\"displayName\", address.displayName || \"\");\n\n if (\"UpdateEmailNodeDetails\" in top && address.emailAddress) {\n UpdateEmailNodeDetails(address.emailAddress, emailNode);\n }\n }", "title": "" }, { "docid": "799b7984385eebd86ec08d9ba5bef8ad", "score": "0.5222178", "text": "function SetUserEmail(){\nvar user = firebase.auth().currentUser;user.updateEmail(\"[email protected]\").then(function() {\n // Update successful.\n}).catch(function(error) {\n // An error happened.\n});\n}", "title": "" }, { "docid": "64066d3f8589adeaf81cc69e3edda85b", "score": "0.5217789", "text": "async modifyUserInfo() {\n\n const email = this.getEmail();\n const user = this.ctx.reuqest.body;\n \n // when user's ethAddress included change ethAddress to lowercase\n if (user.ethAddress) {\n user.ethAddress = user.ethAddress.toLowerCase();\n }\n\n if (!await this.service.users.update(user, { email })) {\n this.response(403, `update user's info failed`);\n return;\n }\n\n this.response(203, `update user's info successed`);\n }", "title": "" }, { "docid": "ec4865c4982f57cf03c99b52f294a8d6", "score": "0.52127355", "text": "onEmailChange(email) {\n // \"this\" isn't available here unless\n // we bind it to the function (see constructor)\n this.setState({ email });\n }", "title": "" }, { "docid": "a217146a2db04dc8fa130c3b0f391e9a", "score": "0.5206328", "text": "function triggerOnEdit(e) // function that gets trigger when status is changed to Ready to ship\n {\n sendEmailOnApproval(e);\n }", "title": "" }, { "docid": "36f8b46e3010bd576b5dd89661295120", "score": "0.5187141", "text": "onEmailChange(text) {\n//we have access to this prop from the action creator that is connected via the connect helper\n this.props.emailChanged(text);\n }", "title": "" }, { "docid": "df5058efc8457a2abaaab23d30f0dae8", "score": "0.5177355", "text": "function userEventAfter(type){\n\tvar email = '';\n\ttry{\n\t\tnlapiLogExecution('ERROR','record type',nlapiGetRecordType());\n\t\t\n\t\tif(nlapiGetRecordType() == 'invoice')\n\t\t{\n\t\t\tif((nlapiGetFieldValue('createdfrom') != null)&&(nlapiGetFieldValue('createdfrom') != ''))\n\t\t\t{\n\t\t\t\tnlapiLogExecution('ERROR','createdfrom',nlapiGetFieldValue('createdfrom'));\n\t\t\t\tvar filters = new Array();\n\t\t\t\tvar columns = new Array();\n\t\t\t\tfilters[0] = new nlobjSearchFilter('role',null,'is',3);\n\t\t\t\tfilters[1] = new nlobjSearchFilter('company',null,'is',nlapiGetFieldValue('entity'));\n\t\t\t\tcolumns[0] = new nlobjSearchColumn('email');\n\t\t\t\tvar result = nlapiSearchRecord('contact',null,filters,columns);\n\t\t\t\tif(result != null)\n\t\t\t\t{\n\t\t\t\t\tnlapiLogExecution('ERROR','result',result);\n\t\t\t\t\tif(result.length > 0)\t\n\t\t\t\t\t{\n\t\t\t\t\t\tif (email == '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\temail = result[0].getValue('email');\n\t\t\t\t\t\t\tnlapiLogExecution('ERROR','email',email);\n\t\t\t\t\t\t\tnlapiSubmitField('invoice', nlapiGetRecordId(), 'custbody2', email, 'T');//setting AP email\n\t\t\t\t\t\t\tnlapiSubmitField('invoice', nlapiGetRecordId(), 'custbody1', 'T', 'T');//Setting Emailed to AP contact checkbox\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\tvar customer = nlapiGetFieldValue('entity');\n\t\t\tnlapiLogExecution('ERROR','customerID',customer);\n\t\t\tif(customer){\n\t\t\t\tvar specialinvoice=nlapiLookupField('customer', customer ,'custentity_specialinvoice_customer');\n\t\t\t\tnlapiLogExecution('ERROR','specialinvoice',specialinvoice);\n\t\t\t\tif(specialinvoice)\n\t\t\t\t{\n\t\t\t\t\tnlapiSubmitField('invoice', nlapiGetRecordId(), 'custbody_special_invoice', specialinvoice, 'T');//Setting the Special/Electronic Invoice Checkbox\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnlapiSubmitField('invoice', nlapiGetRecordId(), 'custbody_special_invoice', specialinvoice, 'F');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*Start: ENHC0050609: Setting \"AP EMAIL\" ,\"TO BE E-MAILED TO AP CONTACT\" field value on Credit Memo: Jitendra 19th Aug 2015*/\n\t\tif(nlapiGetRecordType() == 'creditmemo')\n\t\t{\n\t\t\tif((nlapiGetFieldValue('createdfrom') != null)&&(nlapiGetFieldValue('createdfrom') != ''))\n\t\t\t{\n\t\t\t\tnlapiLogExecution('ERROR','createdfrom',nlapiGetFieldValue('createdfrom'));\n\t\t\t\tvar filters = new Array();\n\t\t\t\tvar columns = new Array();\n\t\t\t\tfilters[0] = new nlobjSearchFilter('role',null,'is',3);\n\t\t\t\tfilters[1] = new nlobjSearchFilter('company',null,'is',nlapiGetFieldValue('entity'));\n\t\t\t\tcolumns[0] = new nlobjSearchColumn('email');\n\t\t\t\tvar result = nlapiSearchRecord('contact',null,filters,columns);\n\t\t\t\tif(result != null)\n\t\t\t\t{\n\t\t\t\t\tnlapiLogExecution('ERROR','result',result);\n\t\t\t\t\tif(result.length > 0)\t\n\t\t\t\t\t{\n\t\t\t\t\t\tif (email == '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\temail = result[0].getValue('email');\n\t\t\t\t\t\t\tnlapiLogExecution('ERROR','email',email);\n\t\t\t\t\t\t\tnlapiSubmitField('creditmemo', nlapiGetRecordId(), 'custbody2', email, 'T');//setting AP email\n\t\t\t\t\t\t\tnlapiSubmitField('creditmemo', nlapiGetRecordId(), 'custbody1', 'T', 'T');//Setting Emailed to AP contact checkbox\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/*End: ENHC0050609*/\n\t}\n\tcatch (e) \n\t{\n\t\tnlapiLogExecution('DEBUG', e.name || e.getCode(), e.message || e.getDetails());\n\t}\n}", "title": "" }, { "docid": "2423e75c75731989fa8780fe40428835", "score": "0.51760226", "text": "function handleEmailChange(e) {\n setEmail(e.target.value);\n // console.log(e.target.value)\n }", "title": "" }, { "docid": "59f14ea62de6262c2b80356d3b454a7b", "score": "0.5173929", "text": "function verifyEmailCompleted(e) {\n var detail = e.detail;\n user.currentActivity = null;\n if (detail == null) {\n user.activities = [];\n user.firstTimeInHere = true;\n } else if(typeof detail == 'object') {\n user.activities = detail;\n if (user.activities.length) {\n // expand via JSONH\n user.activities.forEach(unpackPlaces);\n user.currentActivity = user.activities[0].id;\n }\n } else {\n // user in but not authenticated\n // or never confirmed the email\n // inform the user and\n // ask if a new email should be sent\n // silently failing in the backend\n // if already sent in last 24 hours\n alert(jslang.pleaseConfirmFirst);\n return (location.href = 'http://equolo.org/');\n }\n this.trigger('step-3', user);\n }", "title": "" }, { "docid": "c03cc39c3879322721648156a4886ef0", "score": "0.5169252", "text": "function updateMailTo() {\n\tvar sName = document.getElementById('submitter-name').value;\n\tvar sEmail = document.getElementById('submitter-email').value;\n\tvar sMessage = document.getElementById('submitter-message').value;\n\n\tvar eMessage = \"mailto:[email protected]?Subject=I%20have%20a%20question%20for%20you%20Jon%20White&body=\";\n\teMessage += \"Name%3A%20\" + sName.replace(/\\s/g, \"%20\") + \"%0D\";\n\teMessage += \"Email%3A%20\" + sEmail.replace(/\\./g, \"%2E\").replace(/\\@/g, \"%40\") + \"%0D\";\n\teMessage += \"Message%3A%20\";\n\teMessage += sMessage.replace(/\\s/g, \"%20\");\n\n\tconsole.log(eMessage);\n\tdocument.getElementById('send-btn').href = eMessage;\n}", "title": "" }, { "docid": "f513716ca5c068b168034dc0d168b5d0", "score": "0.5163117", "text": "async updateParticipant (_key, participant) {\n const newval = await collection.update(_key, participant, { keepNull: false, mergeObjects: true, returnNew: true })\n applogger.trace(participant, 'Updating participant \"' + _key + '\"')\n return newval\n }", "title": "" }, { "docid": "99e0d7c6cc3c048dcddabf33f097fc97", "score": "0.5159267", "text": "requestReset(email) {\n\n\t}", "title": "" }, { "docid": "a50600998ad49ef2c5d1863e29f39e94", "score": "0.51528263", "text": "updateEmail(event){\n this.props.sendData.email = event.target.value;\n this.setState({email: this.validateFormField('email', event.target.value)});\n }", "title": "" }, { "docid": "78edda446d90a70ab3dc1c6e2b634ae4", "score": "0.51384985", "text": "localResetPassword() {\r\n resetPassword(this.state.email);\r\n }", "title": "" }, { "docid": "c958e8b8201e5e4beb659dc59888a39c", "score": "0.5137312", "text": "function addMyEmail (list_id, object) {\n\tvar hashed_email = crypto.createHash('md5').update(object.email_address.toLowerCase()).digest('hex');\n\taxios({\n\t\tmethod: 'put',\n\t\turl: url + '/lists/' + list_id + '/members/' + hashed_email,\n\t\theaders: {\n\t\t\t'Cache-Control': 'no-cache',\n\t\t\tAuthorization: 'Bearer ' + accessToken,\n\t\t\t'Content-Type': 'application/json'\n\t\t},\n\t\tdata: object\n\t})\n\t\t.then(function (response) {\n\t\t\tconsole.log('Successfully added your email to the list.');\n\t\t\tpromptFewEmail(list_id);\n\t\t})\n\t\t.catch(function (error) {\n\t\t\tconsole.log(error);\n\t\t});\n}", "title": "" }, { "docid": "569cddd0df1c6e1493c618b0aaf095d0", "score": "0.5136476", "text": "artistUserNotification(recipient: string, artistName: string, username: string, password: string, organizer: string) {\n let mailOption = {\n from: `Harmoni <[email protected]>`,\n to: [recipient],\n subject: `${organizer} har opprettet en bruker for deg på Harmoni`,\n html: `<h3 style=\"font-size: 21px\">Hei, ${artistName}` +\n ` <div style=\"font-size: 17px\">` +\n ` <br>${organizer} har knyttet deg til sitt arrangement og har opprettet en bruker på vegne av deg!` +\n ` <br>Du kan nå logge inn på ${url} og se detaljer angående arrangementet ved å bruke følgende innlogging:` +\n ` <br><br><b>Brukernavn: </b>${username}` +\n ` <br><b>Passord: </b>${password}</div>` +\n ` <div>Med vennlig hilsen,` +\n ` <br>Harmoni Team 3</div>` +\n ` <br><p style=\"text-align: center\">&copy; 2020 Team 3</div>` +\n ` </div>`\n\n };\n\n transporter.sendMail(mailOption, (err, res) => {\n if (err) {\n console.log(\"Error occured: \" + err);\n } else {\n console.log(\"Email sent: \" + res.response);\n }\n });\n }", "title": "" }, { "docid": "3a7947fdef5a9bd9e275e38b837db9a6", "score": "0.5130541", "text": "function handleEmailInputChange(event){\n setEmail({\n [event.target.name]: event.target.value\n });\n console.log(\"Logging Email: \" + emailState.email + \" Password: \" + passwordState.password)\n }", "title": "" }, { "docid": "8ca50422cb18f13b975f6fa8a3dc75cf", "score": "0.5130072", "text": "onnoEmail() {\n this.emailValidationState = 'has-error';\n this.helpBlock = 'Please enter an email.';\n }", "title": "" }, { "docid": "e19727094ccc92fc4c4ec2629c77d21a", "score": "0.51153404", "text": "async function changeMail(userID, newMail) {\n var error, mailCheck = await db.readDataPromise('user', { email: newMail })\n\n if (mailCheck.length == 0) {\n await db.updateDataPromise('user', { id: userID }, { $set: { email: newMail } });\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "0864402bf50544eab011063ee7ccaaeb", "score": "0.5114016", "text": "function updateLastMessageTimeByEmail(email) {\n usersTimer.set(email, Date.now());\n}", "title": "" }, { "docid": "dec77bb2312d90f1a6291e2933b63d0e", "score": "0.5112259", "text": "function resumeUser(userEmail){\n var user = getByEmail(userEmail);\n user.suspended = false;\n try{\n AdminDirectory.Users.update(user, userEmail);\n }catch(e){\n Logger.log(e);\n } \n}", "title": "" }, { "docid": "369af7e4cb00677730b060d790e79804", "score": "0.5107844", "text": "function peopleChanged(eventObj) {\n Actions.updateParticipants(eventObj.participants);\n}", "title": "" }, { "docid": "82b764b137d12cd5df255c7c1fb6d3f1", "score": "0.50989467", "text": "updateParticipantGoing(id) {\n this.state.participants.map(participant => {\n if (participant._id === id) {\n participant.attending\n ? (participant.attending = false)\n : (participant.attending = true);\n return this.setState({\n participants: this.state.participants\n });\n }\n });\n }", "title": "" }, { "docid": "f3fc035af5ea62664ef2551e94ef1f94", "score": "0.5085876", "text": "function changeUserEmail(email, newEmail)\n\t{\n\t\tvar db = app.database.read();\n\t\tfor (var i = 0; i < db.length; i++)\n\t\t{\n\t\t\t// found user with specified email\n\t\t\tif (db[i].hasOwnProperty(\"email\") && db[i].email.toLowerCase().indexOf(email.toLowerCase()) != -1)\n\t\t\t{\n\t\t\t\tdb[i].email = newEmail;\n\t\t\t\t// change the seller of all books posted by the user to reflect the new email\n\t\t\t\tfor (var j = 0; j < db.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif (db[j].hasOwnProperty(\"seller\") && db[j].seller.toLowerCase().indexOf(email.toLowerCase()) != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tdb[j].seller = newEmail;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tapp.database.write(db);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2d94e8ca7c612c9709a596121ca9b26f", "score": "0.508407", "text": "function add_email()\n{\n\tif ( isIE )\n\t{\n\t\t//-------------------------------\n\t\t// Get current selected range\n\t\t//-------------------------------\n\t\t\n\t\tvar selection = rtewindow.document.selection; \n\t\t\n\t\tif (selection != null)\n\t\t{\n\t\t\trng = selection.createRange();\n\t\t}\n\t}\n\telse\n\t{\n\t\t//-------------------------------\n\t\t// Get currently selected range\n\t\t//-------------------------------\n\t\t\n\t\tvar selection = rtewindow.getSelection();\n\t\trng = selection.getRangeAt(selection.rangeCount - 1).cloneRange();\n\t}\n\t\n\temailaddress = prompt( text_enter_email, '');\t\n\t\n\tif ((emailaddress != null) && (emailaddress != \"\"))\n\t{\n\t\trtewindow.focus();\n\t\t_gecko_kill_css();\n\t\trtewindow.document.execCommand('createlink', false, 'mailto:' + emailaddress);\n\t\trtewindow.focus();\n\t}\n}", "title": "" }, { "docid": "2eb4475b8a9f32f97b5ddd3765a7450e", "score": "0.5078431", "text": "function setMailId(usedID, userName, userEmail) { \n \n var closeWin=true;\n var frmopener; \n frmopener = window.opener.document.frmEmailAction;\n var oldvalue = frmopener.sendToEmail.value;\n \n if (oldvalue!=null && oldvalue.length > 0)\n frmopener.sendToEmail.value = oldvalue +\",\"+ userEmail;\n else \n frmopener.sendToEmail.value = userEmail;\n var contains = 'to';\n var emailSet = false;\n\n if(closeWin){\n window.close();\n }\n return false;\n}", "title": "" }, { "docid": "96cce0df5660197f4037369372337151", "score": "0.5073356", "text": "handleChangeMail(event) {\n\t\tthis.setState({\n\t\t\temail: event.target.value,\n\t\t});\n\t}", "title": "" }, { "docid": "5fe775c7737109c9098af19333e99e3c", "score": "0.5052984", "text": "function handleChangeOfEmail(e) {\n setEMAIL(e.target.value)\n if(e.target.value!==\"\" && e.target.value.match(mailformat)){\n setCorrectEMAIL(true)\n }\n else{\n setCorrectEMAIL(false)\n }\n }", "title": "" }, { "docid": "bc1b6c06a07eccb0cac87718bd0c8623", "score": "0.50368565", "text": "save() {\n let component = this;\n const changeset = get(component, 'changeset');\n changeset.validate().then(() => {\n if (get(changeset, 'isInvalid') === true) {\n return;\n }\n set(component, 'isSubmitted', true);\n changeset.save().then(() => {\n component.logout();\n }).finally(() => {\n get(component, 'toast').success('A reset password email has been sent if your account was found.');\n set(component, 'isSubmitted', false);\n });\n });\n }", "title": "" }, { "docid": "4802f3a1001a33431a7cd0f86b074f66", "score": "0.5034825", "text": "function emailUpdate(assistant){\nvar req = request.body.result.parameters.acctNum;\n\tvar lastSSN = request.body.result.parameters.ssn;\n\tvar newVal = request.body.result.parameters.email;\n\tvar testSSN;\n\tref.on(\"child_added\",function(snapshot) {\n\tfor(var x = 0; x < maxPeoplePerAccount;x++)\n\t{\n\t\ttestSSN = snapshot.child(req).child(\"people\").child(x).child(\"customerSSN\").val()\n\t\tif(testSSN === null)\n\t\t\tbreak;\n\ttestSSN = testSSN.substring(testSSN.length-4,testSSN.length);\n\t\t//console.log('testSSN '+testSSN+', lastSSN '+ lastSSN);\n\t\tif(testSSN === lastSSN.toString())\n\t\t{\n\tdb.ref(\"transamerica-dummy-data/accounts/\"+req+\"/people/\"+x).update({email: newVal});\n\t\t\ttestSSN = 'End';\n\t\t\tbreak;\n\t\t}\n\n\t}\n\tif(testSSN !== \"End\")\n\tassistant.ask('Sorry, I could not find anyone with that information');\n\telse\n\tassistant.ask('Done!');\n\t});\n}", "title": "" }, { "docid": "7b9360f15f52352a10555951a7999037", "score": "0.50319153", "text": "emailChanged(e) {\n this.setState({ email: e.target.value });\n }", "title": "" }, { "docid": "68cd143b6ba1b2be29c3450514805cbb", "score": "0.50216603", "text": "async editInstituteData(phone, email, web_page, from){\n return this.contract.setOrganization(phone, email, web_page, { from });\n }", "title": "" }, { "docid": "5852f5c2f149b06f520f20c5d91fc211", "score": "0.50159055", "text": "resetPassword(e) {\n e.preventDefault();\n var auth = fire.auth();\n var emailAddress = this.state.email;\n \n auth.sendPasswordResetEmail(emailAddress).then(function() {\n toaster.notify(<div>E-posten er sent, gå til inboksen for å endre passordet ditt</div>, {\n duration: 15000,\n // Email sent.\n })\n }).catch(function(error) {\n // An error happened.\n });\n}", "title": "" }, { "docid": "44f8f59103a5f865777a5f966aea9fc4", "score": "0.50134146", "text": "function setEmail(username, email) {\n email = email.replace(/\\./g, ',');\n return emailsRef.child(email).set(username);\n}", "title": "" }, { "docid": "7b77277f964262c9f55fe1439bb61b97", "score": "0.5003201", "text": "function editRemoteParticipantSubmit() {\n var nameInputValue = $(\"#nameInput\").val();\n var emailInputValue = $(\"#emailInput\").val();\n\n // Get the first remote participant\n var part = m_SessionModel.getRemoteParticipants()[0];\n if (nameInputValue != part.getName() || emailInputValue != part.getEmail()) {\n\n // Update the participant information with the participantModel\n part.updateParticipantInfo({ \"name\": nameInputValue, \"email\": emailInputValue })\n .done(function () {\n $(\"#nameDisplay\").text(\"Name: \" + part.getName());\n $(\"#emailDisplay\").text(\"Email: \" + part.getEmail());\n $(\".remotePartEditForm\").hide();\n }).fail(function (err) {\n log(\"(error) updateParticipantInfo: \" + err);\n });\n }\n else {\n $(\".remotePartEditForm\").hide();\n }\n\n return false;\n }", "title": "" }, { "docid": "f2bd48c771c4439e3fd9db90746b9310", "score": "0.4997895", "text": "function setEmailText() {\n const emailText = \"Congratulations \" + currentCandidate.name + \", <br> You have been selected to recieve the \" +\n currentScholarship.data().name + \". Please log onto your U of S Scholarships account within the next two weeks to \" +\n \" accept your scholarship offer! <br> Sincerely, <br> University of Saskatchewan, <br> Office of the Registrar\";\n\n return emailText;\n}", "title": "" }, { "docid": "e83c976023dd15f49942b714143af50b", "score": "0.4993227", "text": "function saveEmail(email) {\n var newEmailRef = emailRef.push();\n newEmailRef.set({\n email:email,\n });\n }", "title": "" }, { "docid": "77749d6de74a4d1c1909115f72f5676f", "score": "0.49912763", "text": "to(to){\n console.log(to);\n this.mail_to = to;\n return this;\n }", "title": "" }, { "docid": "7f07d62ee4a39854c0c45b624a4991ec", "score": "0.49892431", "text": "function cancelEmailAddressUpdate() {\n \tdebug && console.log( \"ManageWorkOrderReview.cancelEmailAddressUpdate: Un-doing update to email fields\" );\n \treviewViewModel.emailToAddress( emailToAddressPrevious );\n reviewViewModel.emailCCAddress( emailCCAddressPrevious );\n Dialog.closeDialog( false );\n }", "title": "" }, { "docid": "bc56ded9fa17c34db30d586529b9636c", "score": "0.49846083", "text": "function storeEmail(mail) {\n return new Promise((resolve, reject) => {\n Email.updateAndGetOldAndUpdated(mail)\n .spread((emailOld, boxOld, emailUpdated, boxUpdated) => {\n // TODO new box numbers do not work properly\n console.log('inside storeEmail...');\n Socket.pushEmailUpdateToClient(emailOld, boxOld, emailUpdated, boxUpdated);\n resolve(emailUpdated);\n })\n .catch(err => {\n reject(err);\n });\n });\n}", "title": "" }, { "docid": "f633f82112d5e6701f0b131bb86ba742", "score": "0.4978763", "text": "function participant_modal_detail(id_participant){\n $.ajax({\n url : \"/api/participants/\"+id_participant,\n type : \"GET\",\n success : function(json) {\n $('#participant_modal_detail_mailto').attr('href', 'mailto:'+json.email)\n $('#participant_modal_detail_confirm_delete').attr('onclick', 'participant_detail_delete('+id_participant+')')\n $('#participant_modal_detail_field_email').html(json.email); \n \n $(\"#participant_modal_detail_field_email\").on('hidden', function(e, reason) {\n $('#participant_modal_detail_edit').show();\n });\n\n $(\"#participant_modal_detail_field_email\").on('shown', function(e, reason) {\n $('#participant_modal_detail_edit').hide();\n });\n\n $(\"#participant_modal_detail_field_email\").editable({\n url: \"/api/participants/\"+id_participant,\n ajaxOptions: {dataType:\"json\", type:\"PUT\"},\n params: function(params){var data = {}; data[\"email\"]=params.value; return data;},\n send: \"always\",\n name: \"participant_modal_detail_field_email\",\n type: \"text\",\n tpl: \"<input type='text' style='width:250px;'>\",\n validate: function(value) {\n var regex = /^([a-zA-Z0-9_.+-])+\\@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n if($.trim(value) == \"\"){\n return gettext(\"participant-modal-detail-edit-required\");\n }\n if(regex.test($.trim(value)) == false) return gettext(\"participant-modal-detail-edit-valid\");\n },\n success: function(response, email){\n var form = $('#participant_modal_detail_form');\n var messageHandler = $('.messageHandler', form);\n var errorHandler = $('.errorHandler', form);\n if (response && response.email) {\n $(this).removeClass(\"editable-unsaved\");\n messageHandler.html(\"<i class='fa fa-info-circle fa-lg'></i>\" + gettext(\"participant-modal-detail-complete\"));\n errorHandler.hide();\n messageHandler.show();\n }else if (response && response.errors){\n config.error.call(this, response.errors);\n }\n },\n error : function(errors) {\n var form = $('#participant_modal_detail_form');\n var messageHandler = $('.messageHandler', form);\n var errorHandler = $('.errorHandler', form);\n if(errors && errors.responseText){\n messageHandler.hide();\n errorHandler.show();\n var jsonResponse = JSON.parse(errors.responseText);\n errorHandler.html(\"<i class='fa fa-exclamation-circle fa-lg'></i> \" + gettext(jsonResponse.name)); \n console.log(errors.status + \": \" + errors.responseText);\n }\n }\n });\n\n $(document).on('click','#participant_modal_detail_edit',function(e){\n e.stopPropagation();\n $('#participant_modal_detail_field_email').editable('show');\n });\n },\n error : function(xhr,errmsg,err) {\n console.log(xhr.status + \": \" + xhr.responseText);\n }\n });\n participant_get_member_list(id_participant);\n}", "title": "" }, { "docid": "23eb793a960dad76dd395e604fbd8350", "score": "0.49773705", "text": "function setSubject() {\n Office.cast.item.toItemCompose(item).subject.setAsync(\"Hello world!\");\n }", "title": "" }, { "docid": "080112c07efbfd2f5fa6580e35bbacc4", "score": "0.49771553", "text": "async btcModifiable() {\n const email = this.getEmail();\n let modifiable = await this.service.users.query(['btcAddressModifiable'], email);\n modifiable = modifiable[0] && modifiable[0].btcaddressmodifiable || false;\n this.response(200, { modifiable });\n }", "title": "" }, { "docid": "6a3bf8b055b4dddfba80128c219e061d", "score": "0.49697602", "text": "function sendEmail(e) {\n e.preventDefault();\n\n //type=\"email\"\n\n // user_5PifaWCGrPQuL7ghKo7R5\n\n emailjs.sendForm('service_u2qbro4', 'template_14mdvws', e.target, 'user_5PifaWCGrPQuL7ghKo7R5')\n .then((result) => {\n setEmailResponse({\n ok: true,\n visible: true,\n message: result.text\n })\n }, (e) => {\n setEmailResponse({\n ok: false,\n visible: true,\n message: e.text\n })\n // calling a function whether its successful or not\n }).finally(() => {\n setTimeout(() => {\n setEmailResponse({\n ...emailResponse,visible:false\n\n })\n },\n 3000)\n });\n }", "title": "" }, { "docid": "d641613a1e074012bd163444bbd41691", "score": "0.49644572", "text": "function updateEmail(event) {\n\n var email_parser_id = event.id == null ? 911 : event.id;\n var email_mailbox_id = event.mail_box_id == null ? 911 : event.mail_box_id;\n var email_date = event.date == null ? 911 : event.date;\n var email_subject = event.mail_subject == null ? 911 : event.mail_subject.replace(/\\\"/g, \"'\");\n var email_from = event.forwarded_from_address == null ? 911 : event.forwarded_from_address;\n var email_to = event.forwarded_to_address == null ? 911 : event.forwarded_to_address;\n var email_body = event.body_of_email == null ? 911 : event.body_of_email.replace(/\\\"/g, \"'\");\n var queryEmailSummary = \"insert into `email` VALUES (\\\"\" + email_parser_id + \"\\\", \\\"\" + email_mailbox_id + \"\\\", \\\"\" + email_date + \"\\\", \\\"\" + email_subject + \"\\\", \\\"\" + email_from + \"\\\", \\\"\" + email_to + \"\\\", \\\"\" + email_body + \"\\\");\";\n\n console.info(\"Email Parser ID = \" + email_parser_id);\n console.info(\"Email MailBox ID = \" + email_mailbox_id);\n\n return queryEmailSummary;\n}", "title": "" }, { "docid": "c2fecc024424664f02f00a16b978d965", "score": "0.495778", "text": "changeEmail(event){\n this.setState({\n email:event.target.value\n })\n }", "title": "" }, { "docid": "8ab3dfe31380fb5a4dd309d18eb820ce", "score": "0.49556834", "text": "function updateEmailProperties(email_id, updateValue) { \n\n // Send put request to update read status\n fetch(`/emails/${email_id}`, {\n method: 'PUT',\n body: JSON.stringify(updateValue)\n })\n}", "title": "" }, { "docid": "1bdf7d754ff4e154cdb302e97e5bf2f6", "score": "0.49518323", "text": "function stateEmailLocalPart(stateMachine, char) {\n if (char === '.') {\n stateMachine.state = 23 /* EmailLocalPartDot */;\n }\n else if (char === '@') {\n stateMachine.state = 24 /* EmailAtSign */;\n }\n else if ((0, email_utils_1.isEmailLocalPartChar)(char)) {\n // stay in the \"local part\" of the email address\n // Note: because stateEmailLocalPart() is called from the\n // 'mailto' states (when the 'mailto' prefix itself has been\n // broken), make sure to set the state to EmailLocalPart\n stateMachine.state = 22 /* EmailLocalPart */;\n }\n else {\n // not an email address character\n (0, utils_1.remove)(stateMachines, stateMachine);\n }\n }", "title": "" } ]
ae1fbe7e3c793c6152a7f9e3292e24fd
Registers a QueryList, associated with a content query, for later refresh (part of a view refresh).
[ { "docid": "0fbe2518be1d0e3e8dee36ccdefe4df0", "score": "0.76664716", "text": "function registerContentQuery(queryList, currentDirectiveIndex) {\n var viewData = getLView();\n var tView = viewData[TVIEW];\n var savedContentQueriesLength = (viewData[CONTENT_QUERIES] || (viewData[CONTENT_QUERIES] = [])).push(queryList);\n if (getFirstTemplatePass()) {\n var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n var lastSavedDirectiveIndex = tView.contentQueries.length ? tView.contentQueries[tView.contentQueries.length - 2] : -1;\n if (currentDirectiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(currentDirectiveIndex, savedContentQueriesLength - 1);\n }\n }\n}", "title": "" } ]
[ { "docid": "99ff01af980b7e1840dfc1565f9b5848", "score": "0.7846615", "text": "function registerContentQuery(queryList) {\n var savedContentQueriesLength = (viewData[CONTENT_QUERIES] || (viewData[CONTENT_QUERIES] = [])).push(queryList);\n if (firstTemplatePass) {\n var currentDirectiveIndex = viewData.length - 1;\n var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n var lastSavedDirectiveIndex = tView.contentQueries.length ? tView.contentQueries[tView.contentQueries.length - 2] : -1;\n if (currentDirectiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(currentDirectiveIndex, savedContentQueriesLength - 1);\n }\n }\n}", "title": "" }, { "docid": "d6b928fd2f42a69ab499e308c646ba03", "score": "0.7697557", "text": "function registerContentQuery(queryList,currentDirectiveIndex){var viewData=getLView();var tView=viewData[TVIEW];var savedContentQueriesLength=(viewData[CONTENT_QUERIES]||(viewData[CONTENT_QUERIES]=[])).push(queryList);if(getFirstTemplatePass()){var tViewContentQueries=tView.contentQueries||(tView.contentQueries=[]);var lastSavedDirectiveIndex=tView.contentQueries.length?tView.contentQueries[tView.contentQueries.length-2]:-1;if(currentDirectiveIndex!==lastSavedDirectiveIndex){tViewContentQueries.push(currentDirectiveIndex,savedContentQueriesLength-1);}}}", "title": "" }, { "docid": "d2fe1fa564e9be412e8cdbde3d5e3cc6", "score": "0.61341745", "text": "function refreshContentQueries(tView, lView) {\n if (tView.contentQueries != null) {\n setCurrentQueryIndex(0);\n for (var i = 0; i < tView.contentQueries.length; i++) {\n var directiveDefIdx = tView.contentQueries[i];\n var directiveDef = tView.data[directiveDefIdx];\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n}", "title": "" }, { "docid": "f12ebaa9eadb6691b3cb6c14eb50a23e", "score": "0.6099026", "text": "function ɵɵqueryRefresh(queryList) {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f12ebaa9eadb6691b3cb6c14eb50a23e", "score": "0.6099026", "text": "function ɵɵqueryRefresh(queryList) {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f12ebaa9eadb6691b3cb6c14eb50a23e", "score": "0.6099026", "text": "function ɵɵqueryRefresh(queryList) {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f12ebaa9eadb6691b3cb6c14eb50a23e", "score": "0.6099026", "text": "function ɵɵqueryRefresh(queryList) {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f12ebaa9eadb6691b3cb6c14eb50a23e", "score": "0.6099026", "text": "function ɵɵqueryRefresh(queryList) {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty &&\n (isCreationMode(lView) ===\n ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "a0271665cd96986a07095732077de7d0", "score": "0.6089611", "text": "setListIdForQuery(listQueryId) {\n this.listQueryId = listQueryId;\n }", "title": "" }, { "docid": "2e3b260379fef6eb73d45d5a6e74427d", "score": "0.6067797", "text": "function ɵɵqueryRefresh(queryList) {\n var lView = getLView();\n var tView = getTView();\n var queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n var tQuery = getTQuery(tView, queryIndex);\n\n if (queryList.dirty && isCreationMode(lView) === ((tQuery.metadata.flags & 2\n /* isStatic */\n ) === 2\n /* isStatic */\n )) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n } else {\n var result = tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result, unwrapElementRef);\n queryList.notifyOnChanges();\n }\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d934b987305a9c3e93a7f89d21699653", "score": "0.60356843", "text": "function refreshContentQueries(tView, lView) {\n var contentQueries = tView.contentQueries;\n\n if (contentQueries !== null) {\n for (var i = 0; i < contentQueries.length; i += 2) {\n var queryStartIdx = contentQueries[i];\n var directiveDefIdx = contentQueries[i + 1];\n\n if (directiveDefIdx !== -1) {\n var _directiveDef2 = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(_directiveDef2, 'DirectiveDef not found.');\n ngDevMode && assertDefined(_directiveDef2.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n\n _directiveDef2.contentQueries(2\n /* Update */\n , lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n }", "title": "" }, { "docid": "7f4486bc35d557c57f5e37cdba8d59c6", "score": "0.5993349", "text": "function ɵɵqueryRefresh(queryList) {\n const lView = getLView();\n const tView = getTView();\n const queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n const tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty && (isCreationMode(lView) === tQuery.metadata.isStatic)) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n const result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result);\n queryList.notifyOnChanges();\n }\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "c8d4ff594ae7e5c7eb35f1e0628eb867", "score": "0.5975652", "text": "function refreshContentQueries(tView, lView) {\n var contentQueries = tView.contentQueries;\n\n if (contentQueries !== null) {\n for (var i = 0; i < contentQueries.length; i += 2) {\n var queryStartIdx = contentQueries[i];\n var directiveDefIdx = contentQueries[i + 1];\n\n if (directiveDefIdx !== -1) {\n var _directiveDef2 = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(_directiveDef2, 'DirectiveDef not found.');\n ngDevMode && assertDefined(_directiveDef2.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n\n _directiveDef2.contentQueries(2\n /* Update */\n , lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}", "title": "" }, { "docid": "35b443395d10d5965dd51c6738f6c81c", "score": "0.5923806", "text": "function ɵɵqueryRefresh(queryList) {\n var lView = getLView();\n var tView = getTView();\n var queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n var tQuery = getTQuery(tView, queryIndex);\n\n if (queryList.dirty && isCreationMode(lView) === tQuery.metadata.isStatic) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n } else {\n var result = tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result);\n queryList.notifyOnChanges();\n }\n\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "30d7ed2d23195168facd7fc60c508074", "score": "0.5858665", "text": "function refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}", "title": "" }, { "docid": "30d7ed2d23195168facd7fc60c508074", "score": "0.5858665", "text": "function refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}", "title": "" }, { "docid": "30d7ed2d23195168facd7fc60c508074", "score": "0.5858665", "text": "function refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}", "title": "" }, { "docid": "30d7ed2d23195168facd7fc60c508074", "score": "0.5858665", "text": "function refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}", "title": "" }, { "docid": "30d7ed2d23195168facd7fc60c508074", "score": "0.5858665", "text": "function refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}", "title": "" }, { "docid": "30d7ed2d23195168facd7fc60c508074", "score": "0.5858665", "text": "function refreshContentQueries(tView, lView) {\n const contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (let i = 0; i < contentQueries.length; i += 2) {\n const queryStartIdx = contentQueries[i];\n const directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n const directiveDef = tView.data[directiveDefIdx];\n ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}", "title": "" }, { "docid": "c0b8db7630195b39983d8d08523215e4", "score": "0.57936656", "text": "function addQueryListToXML(queryList) {\n var queryListXMLContent = \"<queries>\\n\";\n if (queryList.length > 0) {\n queryList.map(function (query) {\n queryListXMLContent += addQueryToXML(query);\n });\n }\n queryListXMLContent += \"</queries>\\n\";\n return queryListXMLContent;\n}", "title": "" }, { "docid": "ab1904ec2bee178b43ed898bbd2a4156", "score": "0.57885474", "text": "_registerQuery(query) {\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return this._queries.get(query);\n }\n const mql = this._mediaMatcher.matchMedia(query);\n // Create callback for match changes and add it is as a listener.\n const queryObservable = new rxjs__WEBPACK_IMPORTED_MODULE_2__[\"Observable\"]((observer) => {\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n const handler = (e) => this._zone.run(() => observer.next(e));\n mql.addListener(handler);\n return () => {\n mql.removeListener(handler);\n };\n }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"startWith\"])(mql), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(({ matches }) => ({ query, matches })), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"takeUntil\"])(this._destroySubject));\n // Add the MediaQueryList to the set of queries.\n const output = { observable: queryObservable, mql };\n this._queries.set(query, output);\n return output;\n }", "title": "" }, { "docid": "a6bbbfdba1b23a0cd6c9a37e133624f5", "score": "0.5744396", "text": "function queryRefresh(queryList){var queryListImpl=queryList;if(queryList.dirty){queryList.reset(queryListImpl._valuesTree);queryList.notifyOnChanges();return true;}return false;}", "title": "" }, { "docid": "6742a1731314f52a5acbc980b9cf7ae7", "score": "0.57357323", "text": "function loadQueryListUpdate(){\n\treturn $.ajax({\n\t\turl: 'index.php',\n\t\ttype: 'post',\n\t\tdataType: \"json\",\n\t\tdata: {'site' : VAR_SITE, 'ajaxCont' : 'LCQueries' },\n\t});\n}", "title": "" }, { "docid": "76de38829f167ece705d3556c246ae2d", "score": "0.5707219", "text": "addQueryToDo(queryToDo) {\n this.queriesToDo.push(queryToDo);\n }", "title": "" }, { "docid": "7f8ef141e67f59eb707001022e0125a4", "score": "0.5630963", "text": "function refreshContentQueries(tView){if(tView.contentQueries!=null){for(var i=0;i<tView.contentQueries.length;i+=2){var directiveDefIdx=tView.contentQueries[i];var directiveDef=tView.data[directiveDefIdx];directiveDef.contentQueriesRefresh(directiveDefIdx-HEADER_OFFSET,tView.contentQueries[i+1]);}}}", "title": "" }, { "docid": "1f54d182d6d89dbd5b797826cfd4bc0e", "score": "0.5623956", "text": "_addQuery(query) {\n this._queries[buildTypeKey(query.types)] = query;\n for (const entity of this._world.entityManager.entities) {\n query.addEntity(entity);\n }\n }", "title": "" }, { "docid": "c79841e0895d0b92a033ec4543dc39ad", "score": "0.5523589", "text": "function refreshContentQueries(tView) {\n if (tView.contentQueries != null) {\n for (var i = 0; i < tView.contentQueries.length; i += 2) {\n var directiveDefIdx = tView.contentQueries[i];\n var directiveDef = tView.data[directiveDefIdx];\n directiveDef.contentQueriesRefresh(directiveDefIdx - HEADER_OFFSET, tView.contentQueries[i + 1]);\n }\n }\n}", "title": "" }, { "docid": "c79841e0895d0b92a033ec4543dc39ad", "score": "0.5523589", "text": "function refreshContentQueries(tView) {\n if (tView.contentQueries != null) {\n for (var i = 0; i < tView.contentQueries.length; i += 2) {\n var directiveDefIdx = tView.contentQueries[i];\n var directiveDef = tView.data[directiveDefIdx];\n directiveDef.contentQueriesRefresh(directiveDefIdx - HEADER_OFFSET, tView.contentQueries[i + 1]);\n }\n }\n}", "title": "" }, { "docid": "c79841e0895d0b92a033ec4543dc39ad", "score": "0.5523589", "text": "function refreshContentQueries(tView) {\n if (tView.contentQueries != null) {\n for (var i = 0; i < tView.contentQueries.length; i += 2) {\n var directiveDefIdx = tView.contentQueries[i];\n var directiveDef = tView.data[directiveDefIdx];\n directiveDef.contentQueriesRefresh(directiveDefIdx - HEADER_OFFSET, tView.contentQueries[i + 1]);\n }\n }\n}", "title": "" }, { "docid": "d7d5b52de1c243a9d76f2d2846b85c28", "score": "0.5452894", "text": "function addTContainerToQueries(lView, tContainerNode) {\n var queries = lView[QUERIES];\n if (queries) {\n var lContainer = lView[tContainerNode.index];\n if (lContainer[QUERIES]) {\n // Query container should only exist if it was created through a dynamic view\n // in a directive constructor. In this case, we must splice the template\n // matches in before the view matches to ensure query results in embedded views\n // don't clobber query results on the template node itself.\n queries.insertNodeBeforeViews(tContainerNode);\n }\n else {\n queries.addNode(tContainerNode);\n lContainer[QUERIES] = queries.container();\n }\n }\n}", "title": "" }, { "docid": "2ac9760d9c9c8fb0363c09ae42bfcb2a", "score": "0.54514617", "text": "function mediaQueryListDispatcher() {\n\t\tthis.mqls = [];\n\t}", "title": "" }, { "docid": "aeff6948de4f6b2a4714a2ab5e9a2689", "score": "0.54142237", "text": "function ɵɵqueryRefresh(queryList) {\n var queryListImpl = queryList;\n var creationMode = isCreationMode();\n // if creation mode and static or update mode and not static\n if (queryList.dirty && creationMode === queryListImpl._static) {\n queryList.reset(queryListImpl._valuesTree || []);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "b84fd5bd83088971275e65c2a48425e2", "score": "0.5321506", "text": "function getOrCreateCurrentQueries(QueryType){var lView=getLView();var currentQueries=lView[QUERIES];// if this is the first content query on a node, any existing LQueries needs to be cloned\n// in subsequent template passes, the cloning occurs before directive instantiation.\nif(previousOrParentTNode&&previousOrParentTNode!==lView[HOST_NODE]&&!isContentQueryHost(previousOrParentTNode)){currentQueries&&(currentQueries=lView[QUERIES]=currentQueries.clone());previousOrParentTNode.flags|=4/* hasContentQuery */;}return currentQueries||(lView[QUERIES]=new QueryType(null,null,null));}", "title": "" }, { "docid": "55d92e4132c787167cec3d0531d3c97b", "score": "0.5312858", "text": "addQuery(text) {}", "title": "" }, { "docid": "4d83aefa2fe8dae361826b58b3f2f202", "score": "0.5292472", "text": "function addQuery(query){\n databaseAccess(dbAdd, {'query': query, 'when': new Date()}, function(results){});\n}", "title": "" }, { "docid": "edb629a49189e28a97e942d04d97ec64", "score": "0.52510446", "text": "function mediaQueryList(mediaQuery) {\n\t\tthis.mediaQuery = mediaQuery;\n\t\tthis.test = parseMediaQuery(mediaQuery);\n\n\t\tthis.matches = testAgainstState(this.test);\n\t}", "title": "" }, { "docid": "08bc5dfdd9ea2422c4b2d47cc73cc293", "score": "0.5247734", "text": "function queryRefresh(queryList) {\n var queryListImpl = queryList;\n if (queryList.dirty) {\n queryList.reset(queryListImpl._valuesTree);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "08bc5dfdd9ea2422c4b2d47cc73cc293", "score": "0.5247734", "text": "function queryRefresh(queryList) {\n var queryListImpl = queryList;\n if (queryList.dirty) {\n queryList.reset(queryListImpl._valuesTree);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "08bc5dfdd9ea2422c4b2d47cc73cc293", "score": "0.5247734", "text": "function queryRefresh(queryList) {\n var queryListImpl = queryList;\n if (queryList.dirty) {\n queryList.reset(queryListImpl._valuesTree);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "d764d623ba2c093a5dfd502468af1615", "score": "0.5236704", "text": "function addSearchQuery(cx, query) {\n return {\n type: \"ADD_QUERY\",\n cx,\n query\n };\n}", "title": "" }, { "docid": "c78b357d2d7630c313c3bdcda714b52e", "score": "0.52303433", "text": "function createQueryListInLView(\n// TODO: \"read\" should be an AbstractType (FW-486)\nlView, predicate, descend, read, isStatic, nodeIndex) {\n ngDevMode && assertPreviousIsParent(getIsParent());\n var queryList = new QueryList();\n var queries = lView[QUERIES] || (lView[QUERIES] = new LQueries_(null, null, null, nodeIndex));\n queryList._valuesTree = [];\n queryList._static = isStatic;\n queries.track(queryList, predicate, descend, read);\n storeCleanupWithContext(lView, queryList, queryList.destroy);\n return queryList;\n}", "title": "" }, { "docid": "eae17340f60ecbd99054053e0192c623", "score": "0.5222088", "text": "function ContentList(options) {\n var instance = (options.instance !== null && options.instance !== undefined) ? options.instance : this;\n var extender = new InstanceExtender();\n \n if (options.instance === null || options.instance === undefined) {\n instance = extender.extendNewInstance({ 'instance': instance, 'options': options});\n }\n \n //extend from object view\n var extOptions = Object.create(options);\n extOptions.instance = instance;\n extOptions.events = false;\n instance = ObjectView(extOptions);\n \n /// <summary>Gets type of view.</summary>\n instance.getType = function () {\n return 'ContentList';\n };\n \n /// <summary>Clears (resets) observer records list and view.</summary>\n instance.clearRecords = function () {\n\n if (instance.getObserverInterface() !== null && instance.getObserverInterface() !== undefined) {\n \n if (instance.getObserverInterface().getType() === 'ListObserver' \n || instance.getObserverInterface().getType() === 'ListKNObserver') {\n \n instance.getObserverInterface().clearList();\n instance.getObserverInterface().displayProcessing(false);\n \n }\n }\n };\n\n /// <summary>\n /// Find records based on provided keyword (via observer keyword property) and page number.\n /// if observer is not available then finds records based on options.keyword, options.size, options.page and options.fill.\n /// </summary>\n instance.find = function (options) {\n \n if (instance.getObserverInterface() !== null && instance.getObserverInterface() !== undefined) {\n \n instance.getObserverInterface().displayProcessingActivity();\n instance.getCRUDProcessor().find({\n 'uri': instance.URI,\n 'contentType': options.contentType,\n 'keyword': (options.keyword !== null && options.keyword !== undefined) ? options.keyword : instance.getObserverInterface().getKeyword(),\n 'size': (options.size !== null && options.size !== undefined) ? options.size : (instance.getObserverInterface().getListSize() !== null && instance.getObserverInterface().getListSize() !== undefined) ? instance.getObserverInterface().getListSize() : 10,\n 'page': options.page,\n 'fill': options.fill\n });\n \n } else {\n \n instance.getCRUDProcessor().find({\n 'uri': instance.URI,\n 'contentType': options.contentType,\n 'keyword': options.keyword,\n 'size': options.size,\n 'page': options.page,\n 'fill': options.fill\n });\n }\n };\n \n /// <summary>Get component from record.</summary>\n instance.getRecordComponent = function (record) {\n \n var component;\n var recordOptions = Object.create(instance.newOptions());\n recordOptions.objectkey = record.getKey();\n\n if (instance.newOptions().subjectf !== null\n && instance.newOptions().subjectf !== undefined) {\n\n recordOptions.subject = Util().extractFieldValue(record[instance.newOptions().subjectf], \"\");\n }\n\n if (instance.newOptions().descriptionf !== null\n && instance.newOptions().descriptionf !== undefined) {\n\n recordOptions.description = Util().extractFieldValue(record[instance.newOptions().descriptionf], \"\");\n }\n\n if (instance.newOptions().urlf !== null\n && instance.newOptions().urlf !== undefined) {\n\n recordOptions.url = Util().extractFieldValue(record[instance.newOptions().urlf], \"\");\n }\n\n if (instance.newOptions().urltitlef !== null\n && instance.newOptions().urltitlef !== undefined) {\n\n recordOptions.urltitle = Util().extractFieldValue(record[instance.newOptions().urltitlef], \"\");\n }\n\n if (instance.newOptions().textviewhtmlf !== null\n && instance.newOptions().textviewhtmlf !== undefined) {\n\n recordOptions.html = Util().extractFieldValue(record[instance.newOptions().textviewhtmlf], \"\");\n }\n\n if (instance.newOptions().textviewcssf !== null\n && instance.newOptions().textviewcssf !== undefined) {\n\n recordOptions.css = Util().extractFieldValue(record[instance.newOptions().textviewcssf], \"\");\n }\n\n if (instance.newOptions().imagenamef !== null\n && instance.newOptions().imagenamef !== undefined) {\n\n recordOptions.imagename = Util().extractFieldValue(record[instance.newOptions().imagenamef], \"\");\n }\n\n if (instance.newOptions().imagepathf !== null\n && instance.newOptions().imagepathf !== undefined) {\n\n recordOptions.imagepath = Util().extractFieldValue(record[instance.newOptions().imagepathf], \"\");\n }\n\n if (instance.newOptions().imagetitlef !== null\n && instance.newOptions().imagetitlef !== undefined) {\n\n recordOptions.imagetitle = Util().extractFieldValue(record[instance.newOptions().imagetitlef], \"\");\n }\n \n if (instance.newOptions().imagewidthf !== null\n && instance.newOptions().imagewidthf !== undefined) {\n\n recordOptions.imagewidth = Util().extractFieldValue(record[instance.newOptions().imagewidthf], \"\");\n }\n\n if (instance.newOptions().imageheightf !== null\n && instance.newOptions().imageheightf !== undefined) {\n\n recordOptions.imageheight = Util().extractFieldValue(record[instance.newOptions().imageheightf], \"\");\n }\n\n if (instance.newOptions().imageviewhtmlf !== null\n && instance.newOptions().imageviewhtmlf !== undefined) {\n\n recordOptions.html = Util().extractFieldValue(record[instance.newOptions().imageviewhtmlf], \"\");\n }\n\n if (instance.newOptions().imageviewcssf !== null\n && instance.newOptions().imageviewcssf !== undefined) {\n\n recordOptions.css = Util().extractFieldValue(record[instance.newOptions().imageviewcssf], \"\");\n }\n\n if (instance.newOptions().videosrcf !== null\n && instance.newOptions().videosrcf !== undefined) {\n\n recordOptions.videosrc = Util().extractFieldValue(record[instance.newOptions().videosrcf], \"\");\n }\n\n if (instance.newOptions().crossoriginf !== null\n && instance.newOptions().crossoriginf !== undefined) {\n\n recordOptions.crossorigin = Util().extractFieldValue(record[instance.newOptions().crossoriginf], \"\");\n }\n\n if (instance.newOptions().posterf !== null\n && instance.newOptions().posterf !== undefined) {\n\n recordOptions.poster = Util().extractFieldValue(record[instance.newOptions().posterf], \"\");\n }\n\n if (instance.newOptions().preloadf !== null\n && instance.newOptions().preloadf !== undefined) {\n\n recordOptions.preload = Util().extractFieldValue(record[instance.newOptions().preloadf], \"\");\n }\n\n if (instance.newOptions().autoplayf !== null\n && instance.newOptions().autoplayf !== undefined) {\n\n recordOptions.autoplay = Util().extractFieldValue(record[instance.newOptions().autoplayf], \"\");\n }\n\n if (instance.newOptions().mediagroupf !== null\n && instance.newOptions().mediagroupf !== undefined) {\n\n recordOptions.mediagroup = Util().extractFieldValue(record[instance.newOptions().mediagroupf], \"\");\n }\n\n if (instance.newOptions().loopf !== null\n && instance.newOptions().loopf !== undefined) {\n\n recordOptions.loop = Util().extractFieldValue(record[instance.newOptions().loopf], \"\");\n }\n\n if (instance.newOptions().mutedf !== null\n && instance.newOptions().mutedf !== undefined) {\n\n recordOptions.muted = Util().extractFieldValue(record[instance.newOptions().mutedf], \"\");\n }\n\n if (instance.newOptions().controlsf !== null\n && instance.newOptions().controlsf !== undefined) {\n\n recordOptions.controls = Util().extractFieldValue(record[instance.newOptions().controlsf], instance.newOptions().controls);\n } else {\n\n if (instance.newOptions().controls !== null\n && instance.newOptions().controls !== undefined) {\n\n recordOptions.controls = instance.newOptions().controls;\n }\n }\n\n if (instance.newOptions().videowidthf !== null\n && instance.newOptions().videowidthf !== undefined) {\n\n recordOptions.videowidth = Util().extractFieldValue(record[instance.newOptions().videowidthf], \"\");\n }\n\n if (instance.newOptions().videoheightf !== null\n && instance.newOptions().videoheightf !== undefined) {\n\n recordOptions.videoheight = Util().extractFieldValue(record[instance.newOptions().videoheightf], \"\");\n }\n\n if (instance.newOptions().avviewhtmlf !== null\n && instance.newOptions().avviewhtmlf !== undefined) {\n\n recordOptions.html = Util().extractFieldValue(record[instance.newOptions().avviewhtmlf], \"\");\n }\n\n if (instance.newOptions().avviewcssf !== null\n && instance.newOptions().avviewcssf !== undefined) {\n\n recordOptions.css = Util().extractFieldValue(record[instance.newOptions().avviewcssf], \"\");\n }\n\n if (recordOptions.subject.length > 0) {\n //viewType = \"TextView\";\n component = new TextView(recordOptions);\n }\n\n if (recordOptions.imagepath.length > 0) {\n //viewType = \"ImageView\";\n recordOptions.imagepath = (instance.newOptions().contextpath !== null && instance.newOptions().contextpath !== undefined) ? instance.newOptions().contextpath + recordOptions.imagepath : recordOptions.imagepath;\n component = new ImageView(recordOptions);\n }\n\n if (recordOptions.videosrc.length > 0) {\n //viewType = \"AVView\";\n recordOptions.videosrc = (instance.newOptions().contextpath !== null && instance.newOptions().contextpath !== undefined) ? instance.newOptions().contextpath + recordOptions.videosrc : recordOptions.videosrc;\n component = new AVView(recordOptions);\n }\n \n return component;\n };\n \n /// <summary>Present view with input values and html format.</summary>\n instance.presentView = function (options) {\n var htmlOutput = \"\";\n var records = [];\n\n if (options !== null && options !== undefined) {\n\n if (options.records !== null && options.records !== undefined) {\n\n records = options.records;\n\n } else {\n\n records = instance.getCRUDProcessor().getRecords();\n }\n } else {\n\n records = instance.getCRUDProcessor().getRecords();\n }\n\n for (var i = 0; i < records.length; i++) {\n \n htmlOutput += instance.getRecordComponent(records[i]).presentView();\n }\n \n return htmlOutput;\n };\n \n if (instance.getObserverInterface() !== null &&\n instance.getObserverInterface() !== undefined) {\n \n /** \n * Observer clearRecords function definition.\n * \n * @returns {undefined}\n */\n instance.getObserverInterface().clearRecords = function () {\n instance.clearRecords();\n };\n \n /** \n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverInterface().find = function (options) {\n instance.find(options);\n };\n \n /** \n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverInterface().presentView = function (options) {\n instance.presentView(options);\n };\n }\n \n if (instance.getObserverObject() !== null &&\n instance.getObserverObject() !== undefined) {\n \n /** \n * Observer clearRecords function definition.\n * \n * @returns {undefined}\n */\n instance.getObserverObject().clearRecords = function () {\n instance.clearRecords();\n };\n \n /**\n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverObject().find = function (options) {\n instance.find(options);\n };\n \n /** \n * Observer find function definition.\n * \n * @param {type} options\n * @returns {undefined}\n */\n instance.getObserverObject().presentView = function (options) {\n instance.presentView(options);\n };\n }\n \n /// <summary>Error processing and presenting event subscription.</summary>\n instance.presentErrors = function (event, eventData) {\n\n if (eventData.data.callback !== null &&\n eventData.data.callback !== undefined) {\n\n eventData.data.callback(eventData.result);\n } else {\n\n var htmlErrorOutput = \"An error has occured.\";\n if (instance.getMessageRepository() !== null && instance.getMessageRepository() !== undefined) {\n htmlErrorOutput = instance.getMessageRepository().get(\"standard.err.text\");\n }\n\n if ((instance.ErrorNode !== null && instance.ErrorNode !== undefined)\n || (instance.contenNode !== null && instance.contenNode !== undefined)) {\n\n htmlErrorOutput = \"\";\n for (var i = 0; i < instance.getErrors().length; i++) {\n\n htmlErrorOutput += (instance.getErrors()[i] + \". \");\n\n }\n }\n\n if (instance.ErrorNode !== null && instance.ErrorNode !== undefined) {\n\n instance.ErrorNode.innerHTML = htmlErrorOutput;\n\n } else if (instance.ContentNode !== null && instance.ContentNode !== undefined) {\n\n instance.ContentNode.innerHtml = htmlErrorOutput;\n\n } else {\n\n if (instance.getObserverInterface() !== null\n && instance.getObserverInterface() !== undefined) {\n\n instance.getObserverInterface().displayClearActivity();\n instance.getObserverInterface().setErrors(instance.getErrors());\n }\n }\n }\n };\n\n /// <summary>Multiple records processing and presenting event subscription.</summary>\n instance.presentRecords = function (event, eventData) {\n\n if (eventData.data.callback !== null &&\n eventData.data.callback !== undefined) {\n\n eventData.data.callback(eventData.result);\n } else {\n\n if (instance.ContentNode !== null && instance.ContentNode !== undefined) {\n\n instance.ContentNode.innerHTML = instance.presentView();\n\n } else {\n\n if (instance.getObserverInterface() !== null\n && instance.getObserverInterface() !== undefined) {\n\n var records;\n\n if (instance.getObserverInterface().getType() === \"ListObserver\" ||\n instance.getObserverInterface().getType() === \"ListKNObserver\") {\n\n if (instance.getObserverInterface().getListObject().getContentTypeObjectPrototype() !== null\n && instance.getObserverInterface().getListObject().getContentTypeObjectPrototype() !== undefined) {\n\n records = instance.getContentTypeObjects({'simpleObjects': eventData.result, 'contentPrototype': instance.getObserverInterface().getListObject().getContentTypeObjectPrototype()});\n }\n\n } else {\n\n records = (instance.getObserverInterface().getContentTypeObject() !== null && instance.getObserverInterface().getContentTypeObject() !== undefined) ? instance.getContentTypeObjects({'simpleObjects': eventData.result}) : eventData.result;\n }\n\n instance.getObserverInterface().clearList();\n\n for (var i = 0; i < records.length; i++) {\n //var viewType = \"TextView\";\n instance.getObserverInterface().newItem({'object': instance.getRecordComponent(records[i]) });\n }\n \n instance.getObserverInterface().displaySuccessActivity();\n }\n }\n }\n\n $(window).trigger('view-direction-change');\n };\n \n /// <summary>Presents request failure.</summary>\n instance.presentFailRequest = function (event, eventData) {\n \n if (eventData.data.callback !== null &&\n eventData.data.callback !== undefined) {\n\n eventData.data.callback(eventData.result);\n } else {\n \n var htmlErrorOutput = \"An error has occured.\";\n if (instance.getMessageRepository() !== null && instance.getMessageRepository() !== undefined) {\n htmlErrorOutput = instance.getMessageRepository().get(\"standard.err.text\");\n }\n \n if (instance.ErrorNode !== null && instance.ErrorNode !== undefined) {\n \n instance.ErrorNode.innerHTML = htmlErrorOutput;\n \n } else if (instance.ContentNode !== null && instance.ContentNode !== undefined) {\n\n instance.ContentNode.innerHtml = htmlErrorOutput;\n \n } else {\n \n if (instance.getObserverInterface() !== null\n && instance.getObserverInterface() !== undefined) {\n \n instance.getObserverInterface().displayFailureActivity();\n }\n }\n }\n };\n\n /// <summary>Subscribe CRUDProcessor events.</summary>\n instance.subscribeEvents = function (eventsInstance) {\n eventsInstance = (eventsInstance !== null && eventsInstance !== undefined) ? eventsInstance : instance;\n \n $(instance.getCRUDProcessor()).on('errors.processor.CRUD.WindnTrees', eventsInstance.presentErrors);\n $(instance.getCRUDProcessor()).on('records.processor.CRUD.WindnTrees', eventsInstance.presentRecords);\n $(instance.getCRUDProcessor()).on('fail.processor.CRUD.WindnTrees', eventsInstance.presentFailRequest);\n };\n \n /// <summary>Subscribe CRUDProcessor events.</summary>\n instance.unSubscribeEvents = function (eventsInstance) {\n \n eventsInstance = (eventsInstance !== null && eventsInstance !== undefined) ? eventsInstance : instance;\n \n $(instance.getCRUDProcessor()).off('errors.processor.CRUD.WindnTrees', eventsInstance.presentErrors);\n $(instance.getCRUDProcessor()).off('records.processor.CRUD.WindnTrees', eventsInstance.presentRecords);\n $(instance.getCRUDProcessor()).off('fail.processor.CRUD.WindnTrees', eventsInstance.presentFailRequest);\n };\n \n if (options.events !== null && options.events !== undefined) {\n if (options.events) {\n instance.subscribeEvents();\n }\n } else {\n instance.subscribeEvents();\n }\n \n if (options.contextpath !== null && options.contextpath !== undefined) {\n if (options.contextpath === 'load') {\n instance.loadContextPath();\n }\n }\n \n if (options.instance !== null && options.instance !== undefined) {\n return Object.create(instance);\n }\n \n return instance;\n}", "title": "" }, { "docid": "cddf83d6fcd842084195afc4ee27c368", "score": "0.51929206", "text": "function generateQueryList(){\n\t$.when(loadQueryList()).then(function(result){\n\t\t$(QUERYLIST_TBL+' tr').remove();\n\t\tresult.reverse(); \n\t\t$.each(result, function(index, data){\n\t\t\tqtableAddElement(false,QUERYLIST_TBL, data);\n\t\t});\n\t\tinitializeTooltip();\n\t}).fail(function(result){\n\t\tconsole.log(result.responseText);\n\t});\n}", "title": "" }, { "docid": "599da97cd876ad87f78f0805bc3717d8", "score": "0.5191369", "text": "function saveSearch(ssql) {\n var queries = JSON.parse(sessionStorage.getItem(\"queries\"));\n if (queries === null) {\n queries = []; // create new list\n }\n queries.push(ssql);\n sessionStorage.queries = JSON.stringify(queries);\n}", "title": "" }, { "docid": "349960682b385659bc1c733750920db0", "score": "0.5175604", "text": "function getOrCreateCurrentQueries(QueryType) {\n var lView = getLView();\n var currentQueries = lView[QUERIES];\n // if this is the first content query on a node, any existing LQueries needs to be cloned\n // in subsequent template passes, the cloning occurs before directive instantiation.\n if (previousOrParentTNode && previousOrParentTNode !== lView[HOST_NODE] &&\n !isContentQueryHost(previousOrParentTNode)) {\n currentQueries && (currentQueries = lView[QUERIES] = currentQueries.clone());\n previousOrParentTNode.flags |= 4 /* hasContentQuery */;\n }\n return currentQueries || (lView[QUERIES] = new QueryType(null, null, null));\n}", "title": "" }, { "docid": "349960682b385659bc1c733750920db0", "score": "0.5175604", "text": "function getOrCreateCurrentQueries(QueryType) {\n var lView = getLView();\n var currentQueries = lView[QUERIES];\n // if this is the first content query on a node, any existing LQueries needs to be cloned\n // in subsequent template passes, the cloning occurs before directive instantiation.\n if (previousOrParentTNode && previousOrParentTNode !== lView[HOST_NODE] &&\n !isContentQueryHost(previousOrParentTNode)) {\n currentQueries && (currentQueries = lView[QUERIES] = currentQueries.clone());\n previousOrParentTNode.flags |= 4 /* hasContentQuery */;\n }\n return currentQueries || (lView[QUERIES] = new QueryType(null, null, null));\n}", "title": "" }, { "docid": "9bb8313291181745efc40c2d989c8e5e", "score": "0.51676404", "text": "refreshItems() {\n var self = this;\n self.lastQuery = null;\n\n if (self.isSetup) {\n self.addItems(self.items);\n }\n\n self.updateOriginalInput();\n self.refreshState();\n }", "title": "" }, { "docid": "49834de712a9bbf6cd2655a6307c7f6e", "score": "0.5163962", "text": "onAddQuery() {\n var queryInput = document.getElementById(\"addQueryInput\");\n if (queryInput.value !== \"\") {\n this.addQuery(queryInput.value);\n queryInput.value = \"\";\n }\n }", "title": "" }, { "docid": "4e93c6a9091e14ec7fd2057598cabe2b", "score": "0.5130152", "text": "listing_post(query) {\n return this._post('listing', query);\n }", "title": "" }, { "docid": "c8a46144cba3122a8985c5ac998bcc77", "score": "0.5119226", "text": "function addQueryToHistory(query) {\n\n}", "title": "" }, { "docid": "0b85a4849e2d23fdb5a0031e867fd4a6", "score": "0.5097025", "text": "function setCurrentQuery(query) {\r\n currentQuery = query;\r\n }", "title": "" }, { "docid": "bf5dc8f81e4b2181ed6efffe99c8d249", "score": "0.50861096", "text": "function createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (const query of queries) {\n const queryInstruction = query.static ? Identifiers$1.staticContentQuery : Identifiers$1.contentQuery;\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n createStatements.push(importExpr(queryInstruction)\n .callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])\n .toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadContentQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers$1.loadContentQuery).callFn([]);\n const refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n return fn([\n new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null)\n ], [\n renderFlagCheckIfStmt(1 /* Create */, createStatements),\n renderFlagCheckIfStmt(2 /* Update */, updateStatements)\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}", "title": "" }, { "docid": "354f8d82765aa92db572981a51721014", "score": "0.5082722", "text": "function registerFetchQuery(queryURL, token) {\n\t //build the fetch function used for updates query\n\t fetchQuery = (0, _remote.buildFetchQuery)(queryURL, token);\n\t //build the fetch function used for select queries and register it with\n\t //`setFetchResource`\n\t setFetchResource((0, _remote.buildFetchQuerySmart)(queryURL, token));\n\t}", "title": "" }, { "docid": "97ed0070332f0f7af7b4c085d1a6c227", "score": "0.50750744", "text": "function LQueries() {}", "title": "" }, { "docid": "97ed0070332f0f7af7b4c085d1a6c227", "score": "0.50750744", "text": "function LQueries() {}", "title": "" }, { "docid": "97ed0070332f0f7af7b4c085d1a6c227", "score": "0.50750744", "text": "function LQueries() {}", "title": "" }, { "docid": "d6848be5d03bdcb0c03e7c0622fdd714", "score": "0.5072911", "text": "function createContentQueriesFunction(queries, constantPool, name) {\n var e_3, _a;\n var createStatements = [];\n var updateStatements = [];\n var tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n try {\n for (var queries_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(queries), queries_1_1 = queries_1.next(); !queries_1_1.done; queries_1_1 = queries_1.next()) {\n var query = queries_1_1.value;\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n var args = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])([variable('dirIndex')], prepareQueryParams(query, constantPool));\n var queryInstruction = query.static ? Identifiers$1.staticContentQuery : Identifiers$1.contentQuery;\n createStatements.push(importExpr(queryInstruction).callFn(args).toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadContentQuery()) && (ctx.someDir = tmp));\n var temporary = tempAllocator();\n var getQueryList = importExpr(Identifiers$1.loadContentQuery).callFn([]);\n var refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);\n var updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (queries_1_1 && !queries_1_1.done && (_a = queries_1.return)) _a.call(queries_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n var contentQueriesFnName = name ? name + \"_ContentQueries\" : null;\n return fn([\n new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null)\n ], [\n renderFlagCheckIfStmt(1 /* Create */, createStatements),\n renderFlagCheckIfStmt(2 /* Update */, updateStatements)\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}", "title": "" }, { "docid": "9ea49fb2441b1b603480c696ce0c8d82", "score": "0.50646895", "text": "function syncPointAddEventRegistration(syncPoint, query, eventRegistration, writesCache, serverCache, serverCacheComplete) {\n var view = syncPointGetView(syncPoint, query, writesCache, serverCache, serverCacheComplete);\n if (!syncPoint.views.has(query._queryIdentifier)) {\n syncPoint.views.set(query._queryIdentifier, view);\n }\n // This is guaranteed to exist now, we just created anything that was missing\n viewAddEventRegistration(view, eventRegistration);\n return viewGetInitialEvents(view, eventRegistration);\n}", "title": "" }, { "docid": "f35fb36367d02db31bd0131e676fdd86", "score": "0.5061589", "text": "function LQueries(){}", "title": "" }, { "docid": "26b576270b19214bacc683255eb4e6e0", "score": "0.50540745", "text": "function createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n const args = [variable('dirIndex'), ...prepareQueryParams(query, constantPool)];\n const queryInstruction = query.static ? Identifiers$1.staticContentQuery : Identifiers$1.contentQuery;\n createStatements.push(importExpr(queryInstruction).callFn(args).toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadContentQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers$1.loadContentQuery).callFn([]);\n const refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n return fn([\n new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null)\n ], [\n renderFlagCheckIfStmt(1 /* Create */, createStatements),\n renderFlagCheckIfStmt(2 /* Update */, updateStatements)\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}", "title": "" }, { "docid": "4814dd3e5d70152924d5291e64314a92", "score": "0.50479734", "text": "function LQueries() { }", "title": "" }, { "docid": "4814dd3e5d70152924d5291e64314a92", "score": "0.50479734", "text": "function LQueries() { }", "title": "" }, { "docid": "3fa67b6f0cdb00fd8e93d866ea049030", "score": "0.50423473", "text": "function createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n createStatements.push(importExpr(Identifiers$1.contentQuery)\n .callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])\n .toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers$1.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n return fn([\n new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null)\n ], [\n renderFlagCheckIfStmt(1 /* Create */, createStatements),\n renderFlagCheckIfStmt(2 /* Update */, updateStatements)\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}", "title": "" }, { "docid": "3fa67b6f0cdb00fd8e93d866ea049030", "score": "0.50423473", "text": "function createContentQueriesFunction(queries, constantPool, name) {\n const createStatements = [];\n const updateStatements = [];\n const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (const query of queries) {\n // creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);\n createStatements.push(importExpr(Identifiers$1.contentQuery)\n .callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])\n .toStmt());\n // update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));\n const temporary = tempAllocator();\n const getQueryList = importExpr(Identifiers$1.loadQuery).callFn([]);\n const refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);\n const updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n const contentQueriesFnName = name ? `${name}_ContentQueries` : null;\n return fn([\n new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null),\n new FnParam('dirIndex', null)\n ], [\n renderFlagCheckIfStmt(1 /* Create */, createStatements),\n renderFlagCheckIfStmt(2 /* Update */, updateStatements)\n ], INFERRED_TYPE, null, contentQueriesFnName);\n}", "title": "" }, { "docid": "29795e1d49744288600a2a2850c84c3c", "score": "0.5037294", "text": "function getOrCreateCurrentQueries(QueryType) {\n // if this is the first content query on a node, any existing LQueries needs to be cloned\n // in subsequent template passes, the cloning occurs before directive instantiation.\n if (previousOrParentTNode && previousOrParentTNode !== viewData[HOST_NODE] &&\n !isContentQueryHost(previousOrParentTNode)) {\n currentQueries && (currentQueries = currentQueries.clone());\n previousOrParentTNode.flags |= 16384 /* hasContentQuery */;\n }\n return currentQueries || (currentQueries = new QueryType(null, null, null));\n}", "title": "" }, { "docid": "b2715768294e5886853c1aa031dc3dc8", "score": "0.50250846", "text": "function registerQuery(id) {\n /**\n * Obsluga guzika przywoływania filtra\n */\n $(\"#add_query_batn_\" + id).click(function () {\n\n\n if (lastUsedFilterId != null) {\n postLastFilter(lastUsedFilterId);\n\n }\n\n lockQueryInputs(id);\n getFilters(\"search_query_\" + id);\n\n lastUsedFilterId = null;\n\n });\n /**\n * ustawiamy ostatnio urzywany filtr na ten w ktorym ostatnio pisalismy\n */\n $(\"#search_query_\" + id).keyup(function () {\n lastUsedFilterId = id;\n });\n}", "title": "" }, { "docid": "35931af7507e5d1703a7feeb5106bd14", "score": "0.50244445", "text": "function onEditQuery(newQuery) {\n parameters.query = newQuery;\n updateURL();\n}", "title": "" }, { "docid": "532b09cd0bc87eaba0e61ea54ca8db60", "score": "0.50087297", "text": "function updateList() {\n $('#bookmarks').empty();\n\n var records = bookmarkTable.query();\n\n // Sort by creation time.\n records.sort(function (bookmarkA, bookmarkB) {\n if (bookmarkA.get('created') < bookmarkB.get('created')) return -1;\n if (bookmarkA.get('created') > bookmarkB.get('created')) return 1;\n return 0;\n });\n\n // Add an item to the list for each bookmark.\n for (var i = 0; i < records.length; i++) {\n var record = records[i];\n $('#bookmarks').append(\n renderBookmark(record.getId(),\n record.get('url'),\n record.get('bookmarkname')));\n }\n\n addListeners();\n $('#newBookmark').focus();\n }", "title": "" }, { "docid": "8ac64de33fd8cfc03c5d7cb13b40ffa3", "score": "0.5006304", "text": "queryLists() {\n fetch(\"https://deco3801-oblong.uqcloud.net/wanderlist/get_bucketlist_belonging_to_user/\" + this.state.userData.id)\n .then(response => response.json())\n .then(obj => this.loadLists(obj));\n }", "title": "" }, { "docid": "f53b4a39db1f4121a9a7f291c9c3ee03", "score": "0.49911582", "text": "function refreshQuery(bwQueryName,bwClearQueryMarkup) {\n var curQuery = bwMainEventList.getQuery();\n if(curQuery == \"\") {\n $(\"#bwQueryContainer\").empty();\n } else {\n $(\"#bwQueryContainer\").html('<div id=\"bwQuery\" class=\"eventFilterInfo\"><span class=\"bwQueryText\"><span class=\"bwQueryTitle\">' + bwQueryName + \"</span> <strong class=\\\"bwQueryQuery\\\">\\\"\" + curQuery + \"\\\"</strong></span> \" + bwClearQueryMarkup + '</div>');\n }\n}", "title": "" }, { "docid": "d963f552c164bd72609cfb6eca9f9eb3", "score": "0.49762866", "text": "function addQuery(url, type, quality, from, to, split) {\n\treturn $.ajax({\n\t\turl: 'index.php',\n\t\ttype: 'post',\n\t\tdataType: \"json\",\n\t\tdata: {\n\t\t\t'site' : VAR_SITE,\n\t\t\t'ajaxCont' : 'addquery',\n\t\t\t'url' : url,\n\t\t\t'quality' : quality,\n\t\t\t'type' : type,\n\t\t\t'from' : from,\n\t\t\t'to' : to,\n\t\t\t'split' : split,\n\t\t},\n\t}).done(function(data){\n\t\tconsole.debug(\"added query\");\n\t\tqtableAddElement(true,QUERYLIST_TBL,data);\n\t}).fail(function(data){\n\t\tconsole.log(data);\n\t});\n}", "title": "" }, { "docid": "e26e2fcb12ac008e28279e1be0a55618", "score": "0.49747697", "text": "init() {\n this._queries = [];\n this._currentQueryInd = 0;\n }", "title": "" }, { "docid": "19851b5de6bf52ad43dc86b54edb8ff3", "score": "0.49420294", "text": "function onEditQuery(newQuery) {\n parameters.query = newQuery;\n updateURL();\n }", "title": "" }, { "docid": "f8d20c9a3449d3d1c4b6f4eb762795ef", "score": "0.4918914", "text": "refreshList(){\n var url = '';\n var method = 'get';\n var formData = {};\n if(this.$route.query.advancedSearch == 1){\n // when a advanced search list is being refreshed\n method = 'post';\n let fields = this.getAdvancedSearchFieldsFromURL;\n formData.fields = fields;\n formData.page = 1;\n url = this.advancedSearchPostUrl;\n\n // if order (order column) query param is set\n if(this.$route.query.order !== undefined){\n formData.orderBy = this.$route.query.order;\n }\n\n // if type (order type) query param is set\n if(this.$route.query.type !== undefined){\n formData.orderType = this.$route.query.type;\n }\n\n }else if(this.$route.params.term !== undefined){\n // when a search list is being refreshed\n url = this.dataSearchUrl+this.$route.params.term;\n }else{\n // when the default list is being refreshed\n url = this.listUrl;\n }\n url += this.getQueryParamsAsString;\n\n this.$store.commit('setSpinner', true);\n this.firstTime = true;\n // make ajax request\n this.$http[method](url, formData)\n .then((resp) => {\n this.$store.dispatch('setList', resp.body);\n this.$store.commit('setSpinner', false);\n this.$store.dispatch('closeLoading');\n }, response => {\n // if a error happens\n this.$store.commit('setSpinner', false);\n this.$store.dispatch('closeLoading');\n new Noty({\n type: \"error\",\n layout: 'bottomLeft',\n text: response.statusText\n }).show();\n });\n }", "title": "" }, { "docid": "7941ca7bbddb5086263eab46d37f553b", "score": "0.4853442", "text": "function addQuery(query) {\n try {\n if(!g_query) {\n g_query = query;\n }\n else {\n g_query = `${g_query}, ${query}`;\n }\n }\n catch(err) {\n logException('addQuery', err.message);\n }\n}", "title": "" }, { "docid": "3d9731aeafa1fa0dece17153408dbb5e", "score": "0.48496", "text": "function updateList() {\n var list = document.getElementById('gistlist');\n\n clearNode(list);\n\n GistList.filter(listFilter).forEach(function(gist) {\n list.appendChild(GistListItem(gist));\n });\n\n}", "title": "" }, { "docid": "31f155a035c8acdc9dcd24b973892b22", "score": "0.48482868", "text": "function TQueries() {}", "title": "" }, { "docid": "31f155a035c8acdc9dcd24b973892b22", "score": "0.48482868", "text": "function TQueries() {}", "title": "" }, { "docid": "31f155a035c8acdc9dcd24b973892b22", "score": "0.48482868", "text": "function TQueries() {}", "title": "" }, { "docid": "1c745a52f8d5b39d3ccffb693c66391f", "score": "0.4844006", "text": "function createContentQueriesRefreshFunction(meta) {\n if (meta.queries.length > 0) {\n var statements_1 = [];\n var typeName = meta.name;\n var parameters = [\n new FnParam('dirIndex', NUMBER_TYPE),\n new FnParam('queryStartIndex', NUMBER_TYPE),\n ];\n var directiveInstanceVar_1 = variable('instance');\n // var $tmp$: any;\n var temporary_1 = temporaryAllocator(statements_1, TEMPORARY_NAME);\n // const $instance$ = $r3$.ɵload(dirIndex);\n statements_1.push(directiveInstanceVar_1.set(importExpr(Identifiers$1.load).callFn([variable('dirIndex')]))\n .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n meta.queries.forEach(function (query, idx) {\n var loadQLArg = variable('queryStartIndex');\n var getQueryList = importExpr(Identifiers$1.loadQueryList).callFn([\n idx > 0 ? loadQLArg.plus(literal(idx)) : loadQLArg\n ]);\n var assignToTemporary = temporary_1().set(getQueryList);\n var callQueryRefresh = importExpr(Identifiers$1.queryRefresh).callFn([assignToTemporary]);\n var updateDirective = directiveInstanceVar_1.prop(query.propertyName)\n .set(query.first ? temporary_1().prop('first') : temporary_1());\n var refreshQueryAndUpdateDirective = callQueryRefresh.and(updateDirective);\n statements_1.push(refreshQueryAndUpdateDirective.toStmt());\n });\n return fn(parameters, statements_1, INFERRED_TYPE, null, typeName ? typeName + \"_ContentQueriesRefresh\" : null);\n }\n return null;\n}", "title": "" }, { "docid": "1c745a52f8d5b39d3ccffb693c66391f", "score": "0.4844006", "text": "function createContentQueriesRefreshFunction(meta) {\n if (meta.queries.length > 0) {\n var statements_1 = [];\n var typeName = meta.name;\n var parameters = [\n new FnParam('dirIndex', NUMBER_TYPE),\n new FnParam('queryStartIndex', NUMBER_TYPE),\n ];\n var directiveInstanceVar_1 = variable('instance');\n // var $tmp$: any;\n var temporary_1 = temporaryAllocator(statements_1, TEMPORARY_NAME);\n // const $instance$ = $r3$.ɵload(dirIndex);\n statements_1.push(directiveInstanceVar_1.set(importExpr(Identifiers$1.load).callFn([variable('dirIndex')]))\n .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n meta.queries.forEach(function (query, idx) {\n var loadQLArg = variable('queryStartIndex');\n var getQueryList = importExpr(Identifiers$1.loadQueryList).callFn([\n idx > 0 ? loadQLArg.plus(literal(idx)) : loadQLArg\n ]);\n var assignToTemporary = temporary_1().set(getQueryList);\n var callQueryRefresh = importExpr(Identifiers$1.queryRefresh).callFn([assignToTemporary]);\n var updateDirective = directiveInstanceVar_1.prop(query.propertyName)\n .set(query.first ? temporary_1().prop('first') : temporary_1());\n var refreshQueryAndUpdateDirective = callQueryRefresh.and(updateDirective);\n statements_1.push(refreshQueryAndUpdateDirective.toStmt());\n });\n return fn(parameters, statements_1, INFERRED_TYPE, null, typeName ? typeName + \"_ContentQueriesRefresh\" : null);\n }\n return null;\n}", "title": "" }, { "docid": "82cbb2ac26bfabb18b443930e5df4ce3", "score": "0.48064288", "text": "function updateQueryList(array){\n\tvar changed_filelist = false;\n\tvar elem_id_temp = -1;\n\t$.each(array, function( index, data ) {\n\t\tif($('#qe'+data[C_QID]).length){\n\t\t\t\n\t\t\tif(data[C_Code] == CODE_FINISHED || data[C_Code] == CODE_FINISHED_WARNING ){\n\t\t\t\tchanged_filelist = true;\n\t\t\t\telem_id_temp = $.inArray(data[C_QID], ownQueries);\n\t\t\t\tif(elem_id_temp != -1){\n\t\t\t\t\townQueries.splice(elem_id_temp, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tqtableUpdateElement(data);\n\t\t}else{\n\t\t\tqtableAddElement(true,QUERYLIST_TBL,data);\n\t\t}\n\t});\n\tif(changed_filelist){\n\t\tgenerateFileList();\n\t}\n\t\n\t//dynamic idle setter\n\tif(ownQueries.length == 0){\n\t\tif(current_mode == 1){\n\t\t\tsetUpdateTimer(default_timer);\n\t\t\tcurrent_mode = 0;\n\t\t}\n\t}\n\tidle_counter = 0;\n}", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.4803584", "text": "function TQueries() { }", "title": "" }, { "docid": "438896e625d2d6e1fdaf48928cc49b58", "score": "0.4803584", "text": "function TQueries() { }", "title": "" }, { "docid": "e2ae55a69183a6ac8e4164a8979a6709", "score": "0.48021242", "text": "function querySuccess(tx, results) {\r\n var len = results.rows.length;\r\n for (var i=0; i<len; i++){\r\n var beer = results.rows.item(i);\r\n $('#beers_abc_ul').append('<li><a href=\"./beer.html\" rel=\"external\">' + beer.name + '</a></li>');\r\n }\r\n $('#beers_abc_ul').append().trigger('create');\r\n\t$('#beers_abc_ul').listview('refresh');\r\n}", "title": "" }, { "docid": "52b18b1f7335d90883382297732b1ec6", "score": "0.48010293", "text": "function addSearchItemToList(searchQuery, $searchContainer, itemVal, isSiteUrl) { \r\n isSiteUrl = false;\r\n var searchGoogleImgUrl = extensionGetUrl(\"pages/newtab/img/common/search.png\");\r\n var searchSiteImgUrl = extensionGetUrl(\"pages/newtab/css/img/buttons/tiles/site.png\");\r\n\r\n var $searchBarItem = $(\"<div></div>\").addClass(searchItemClass);\r\n var $searchBacItemImg = $(\"<img>\").addClass(\"search-suggestion-img\");\r\n var imgUrl = isSiteUrl ? searchSiteImgUrl : searchGoogleImgUrl;\r\n $searchBacItemImg.attr(\"src\", imgUrl);\r\n\r\n var $searchBarItemText = $(\"<div></div>\").addClass(\"search-suggestion-text\");\r\n $searchBarItemText.text(itemVal);\r\n $searchBarItem.attr(\"data-search-text\", itemVal);\r\n $searchBarItem.attr(\"data-search-url\", isSiteUrl ? addDataUrlHttp(itemVal) : getRedirectSearchUrl(itemVal, mySearchProvider));\r\n $searchBarItem.attr(\"data-use-google-search\", !isSiteUrl);\r\n $searchBarItemText.html(function(_, html) {\r\n return html.replace(new RegExp(searchQuery,\"g\"), '<b>$&</b>');\r\n });\r\n $searchBarItem.append($searchBacItemImg).append($searchBarItemText);\r\n $searchContainer.append($searchBarItem);\r\n }", "title": "" }, { "docid": "ace7f3392fe7602da3e8373277270f2e", "score": "0.48008898", "text": "function setQuery() {\n getSearch(search.value);\n}", "title": "" }, { "docid": "f48cc7309a2fa4af0364f77154d063ac", "score": "0.48000762", "text": "async setQueryForTest(queryType, contents) {\n await this.getLanguage();\n this.queryCache.delete(queryType);\n this[queryType] = contents;\n return await this.getQuery(queryType);\n }", "title": "" }, { "docid": "1a009bcc6cfadb503ab2781e2ef4ce89", "score": "0.47839943", "text": "function search(q, d, nopush, all) {\n keywords = q\n current_retention = d // we use this later in the pagebuilder\n current_query = q // ditto\n var arr = xlist.split('@', 2)\n var listname = arr[0]\n var olist = listname\n var domain = arr[1]\n \n // are we checking *@foo.tld ?\n if (document.getElementById('checkall')) {\n all = document.getElementById('checkall').checked\n }\n // If checking multiple lists, the globa_deep will tell the pagebuilder to also\n // include the mailing list name in each result\n global_deep = false\n if (all == true) {\n listname = \"*\"\n global_deep = true\n }\n \n // we just made a new search, clear the selected month in the calendar to the left if that makes sense\n clearCalendarHover()\n \n // As usual, push new history state\n if (!nopush) {\n window.history.pushState({}, \"\", \"list.html?\" + listname + \"@\" + domain + \":\" + d + \":\" + encodeURIComponent(q));\n }\n \n // get the data from backend, push to page builder func\n GetAsync(\"/api/stats.lua?list=\" + listname + \"&domain=\" + domain + \"&q=\" + encodeURIComponent(q) + \"&d=\" + d, null, buildPage)\n \n // for the list title, prepare the date range\n // TODO: improve this much like we have with trends.html\n var arr = datePickerDouble(d)\n var howlong = datePickerValue(d)\n // howlong may begin with a month which should not be lower-cased.\n // or it may be 'Less than 1 month ago'\n // Avoid checking by starting a new sentence\n document.getElementById('listtitle').innerHTML = listname + \"@\" + domain + \" (Quick Search. \" + howlong + \") <a class='btn btn-warning' href='javascript:void(0);' onclick='getListInfo(xlist)'>Clear filters</a>\"\n xlist = olist + \"@\" + domain\n return false;\n}", "title": "" }, { "docid": "0fbf534bab4b98f15dcf6b67a8c4bbac", "score": "0.47829375", "text": "_setupQueries(queries = {}) {\n this.queries = new FunctionsDict(queries);\n }", "title": "" }, { "docid": "96ce224af22e2fdb487d38609ad3f6b0", "score": "0.4774145", "text": "function insertQueries() {\n\n }", "title": "" }, { "docid": "9ebba7b99933fd0e3fc5caf76222681d", "score": "0.4757141", "text": "function refreshMyList(result) {\n\t\tresetSelect();\n\t\trenderResults(result);\n\t}", "title": "" }, { "docid": "553e60149cc70373226378c3cf918e77", "score": "0.4750376", "text": "function addToList(reference) {\n\tif (reference != null && !isNaN(reference)) {\n\t\t$('#searchForm').ajaxSubmit({\n\t\t\turl: '/lightboxes/my_property_list_add.php?reference=' + reference,\n\t\t\tdataType: 'json',\n\t\t\ttype: 'get',\n\t\t\tsuccess: function(json) {\n\t\t\t\tvar jsonData = eval(json); // IE6 and Safari compatibility\n\t\t\t\tif (jsonData['error'] != 'false' && jsonData['message'] != '' && (jsonData['duplicate'] == 'false')) growl(jsonData['message']);\n\t\t\t\tif (jsonData['success'] == 'true' || jsonData['success'] == true) {\n\t\t\t\t\t$('#addMyList' + reference).html('View my list');\n\t\t\t\t\t$('#addMyList' + reference).click(function() {\n\t\t\t\t\t\tshowMyPropertyList();\n\t\t\t\t\t});\n\t\t\t\t\tshowMyPropertyList();\n\t\t\t\t\t// Google Analytics code\n\t\t\t\t\tif (typeof(pageTracker) != 'undefined') {\n\t\t\t\t\t\tpageTracker._trackEvent('My property List', 'Add to List', 'My property list addition: '+reference);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n} //end addToList", "title": "" }, { "docid": "477d0afabf716dbecd60475df3b5e2cb", "score": "0.47496885", "text": "function TQueries(){}", "title": "" }, { "docid": "2e68844424d343fe79002e0b3be5c2db", "score": "0.47236526", "text": "function searchForQuery(query) {\r\n toggleMainContainer(false);\r\n togglePreloader(true);\r\n showLoadMoreButtons();\r\n clearLists();\r\n search(query, false, 1);\r\n search(query, true, 1); \r\n setCurrentQuery(query);\r\n }", "title": "" }, { "docid": "3e3c961edfa051566ffe40d607201599", "score": "0.47059557", "text": "function AddListItems() {\n\tcontext = new SP.ClientContext.get_current();\n\tlist = context.get_web().get_lists().getByTitle('Projects');\n\n\tvar listItemCreateInfo = new SP.ListItemCreationInformation();\n\tthis.oListItem = list.addItem(listItemCreateInfo);\n\tgetInputFormValues();\n\n\toListItem.set_item('Title', \"Test\");\n\toListItem.set_item('Project_x0020_Name', projectname);\n\toListItem.set_item('Project_x0020_Type', projecttype);\n\toListItem.set_item('Actual_x0020_Start_x0020_Date', actstartdate);\n\toListItem.set_item('Actual_x0020_End_x0020_Date', actenddate);\n\toListItem.set_item('Estimated_x0020_Start_x0020_Date', eststartdate);\n\toListItem.set_item('Estimated_x0020_End_x0020_Date', estenddate);\n\toListItem.set_item('Description', description);\n\toListItem.set_item('Status', statusO);\n\toListItem.update();\n\tcontext.load(oListItem);\n\n\tcontext.executeQueryAsync(Function.createDelegate(this, this.OnSuccesseeded), Function.createDelegate(this, this.onFail));\n\n}", "title": "" }, { "docid": "c933a8b3a6af4f8ea9248f99ead2f3d2", "score": "0.47044933", "text": "function QueryManager() {\n _classCallCheck(this, QueryManager);\n\n this.pendingQueries = new Set();\n this.invalidQueryType = null;\n this.invalidErrorMessage = '';\n this.checkInvalid = function () {\n return false;\n };\n }", "title": "" }, { "docid": "6934db5f4a8b4f599f1dabc87d3bcf74", "score": "0.4704199", "text": "getItemsByCAMLQuery(query, ...expands) {\r\n const q = this.clone(List, \"getitems\");\r\n return q.expand.apply(q, expands).postCore({\r\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) }),\r\n });\r\n }", "title": "" } ]
3c83955f3ce663d5c9ac50a632ee8e64
initPositions input: gl and two programs tag: 0 to use cylinderProgram, 1 to use lineProgram output: none use: initialize a_Position
[ { "docid": "005537e3db8ead430aa4c0267671cee9", "score": "0.8082788", "text": "function initPositions(gl, cylinderProgram, lineProgram, tag) {\n if (tag == 0) {\n gl.useProgram(cylinderProgram);\n var vertices = new Float32Array(points);\n // Create a buffer object\n var positionbuffer = gl.createBuffer();\n if (!positionbuffer) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n // Write the vertex coordinates and color to the buffer object\n gl.bindBuffer(gl.ARRAY_BUFFER, positionbuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\n gl.vertexAttribPointer(cylinderProgram.a_Position, 3, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(cylinderProgram.a_Position);\n }\n else {\n gl.useProgram(lineProgram);\n var normals = new Float32Array(shown);\n // Create a buffer object\n var normalbuffer = gl.createBuffer();\n if (!normalbuffer) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n // Write the vertex coordinates and color to the buffer object\n gl.bindBuffer(gl.ARRAY_BUFFER, normalbuffer);\n gl.bufferData(gl.ARRAY_BUFFER, normals, gl.STATIC_DRAW);\n gl.vertexAttribPointer(lineProgram.a_Position, 3, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(lineProgram.a_Position);\n }\n}", "title": "" } ]
[ { "docid": "4851088878111f201c80cf7f6ea01c84", "score": "0.7353148", "text": "function initPos(){\n //todo: get location, create buffer stays; bind-enable could leave?\n //get location of attribute variable\n a_Position = gl.getAttribLocation(gl.program, 'a_Position');\n if (a_Position < 0 ){\n console.log('Failed to get storage location for a_position');\n return;\n }\n //initialize vertex buffer object\n g_vertexBuffer = gl.createBuffer();\n if(!g_vertexBuffer){\n console.log('failed to create vertexbuffer');\n return;\n }\n\n}", "title": "" }, { "docid": "361de49b61178a6a87f2aa51720bde5d", "score": "0.64123094", "text": "function initVertexBuffers(ev, gl, canvas, a_Position, n) {\n n = g_lines.length / 2; //Number of (x,y) pairs\n\n if (end === true) {\n n = g_points.length; //(x,y) point pairs\n }\n\n //Create buffer object\n var vertexBuffer = gl.createBuffer();\n if (!vertexBuffer) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n\n //Bind buffer to target and write data into buffer object\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(g_lines), gl.STATIC_DRAW);\n\n //Initialize a_Position for shader\n var a_Position = gl.getAttribLocation(gl.program, 'a_Position');\n if (a_Position < 0) {\n console.log('Failed to get the storage location of a_Position');\n return -1;\n }\n\n gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_Position);\n return n;\n}", "title": "" }, { "docid": "69434ede492a0890522658d10589276a", "score": "0.6263721", "text": "function initLine(s){\n VertexPositionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, VertexPositionBuffer);\n vertices = [\n 0.0, 0.0, 0.0,\n 0.0, s, 0.0\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n VertexPositionBuffer.itemSize = 3;\n VertexPositionBuffer.numItems = 2;\n gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, VertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(0);\n\n}", "title": "" }, { "docid": "91d9dcd759b72448557db3a469682cfc", "score": "0.6183396", "text": "function initMatrix(gl, cylinderProgram, lineProgram, tag1, tag2) {\n if (tag1 == 0) { // Currently cylinderProgram in use\n gl.useProgram(cylinderProgram);\n if (tag2 == 0) { // Draw from top view\n var viewMatrix = new Matrix4();\n viewMatrix.setLookAt(0, 0, 1, 0, 0, 0, 0, 1, 0);\n // Set the view matrix\n gl.uniformMatrix4fv(cylinderProgram.u_ViewMatrix, false, viewMatrix.elements);\n // Create the matrix to set the eye point, and the line of sight\n var projMatrix = new Matrix4();\n projMatrix.setOrtho(-1, 1, -1, 1, -2, 2);\n // Pass the projection matrix to u_ProjMatrix\n gl.uniformMatrix4fv(cylinderProgram.u_ProjMatrix, false, projMatrix.elements);\n }\n else { // Draw from side view\n var viewMatrix = new Matrix4();\n viewMatrix.setLookAt(0, -1, 0.75, 0, 0, 0, 0, 1, 0);\n // Set the view matrix\n gl.uniformMatrix4fv(cylinderProgram.u_ViewMatrix, false, viewMatrix.elements);\n // Create the matrix to set the eye point, and the line of sight\n var projMatrix = new Matrix4();\n projMatrix.setOrtho(-1, 1, -1, 1, -2, 2);\n // Pass the projection matrix to u_ProjMatrix\n gl.uniformMatrix4fv(cylinderProgram.u_ProjMatrix, false, projMatrix.elements);\n }\n }\n else {\n gl.useProgram(lineProgram);\n if (tag2 == 0) {\n var viewMatrix = new Matrix4();\n viewMatrix.setLookAt(0, 0, 1, 0, 0, 0, 0, 1, 0);\n // Set the view matrix\n gl.uniformMatrix4fv(lineProgram.u_ViewMatrix, false, viewMatrix.elements);\n // Create the matrix to set the eye point, and the line of sight\n var projMatrix = new Matrix4();\n projMatrix.setOrtho(-1, 1, -1, 1, -2, 2);\n // Pass the projection matrix to u_ProjMatrix\n gl.uniformMatrix4fv(lineProgram.u_ProjMatrix, false, projMatrix.elements);\n }\n else {\n var viewMatrix = new Matrix4();\n viewMatrix.setLookAt(0, -1, 0.75, 0, 0, 0, 0, 1, 0);\n // Set the view matrix\n gl.uniformMatrix4fv(lineProgram.u_ViewMatrix, false, viewMatrix.elements);\n // Create the matrix to set the eye point, and the line of sight\n var projMatrix = new Matrix4();\n projMatrix.setOrtho(-1, 1, -1, 1, -2, 2);\n // Pass the projection matrix to u_ProjMatrix\n gl.uniformMatrix4fv(lineProgram.u_ProjMatrix, false, projMatrix.elements);\n }\n }\n}", "title": "" }, { "docid": "d8438b58f590fc3e8b407d72958e1446", "score": "0.6160505", "text": "_initPositions() {\n // set its matrices\n this._initMatrices();\n\n // apply our css positions\n this._setWorldSizes();\n this._applyWorldPositions();\n }", "title": "" }, { "docid": "e43de3acda0ffbcc4cc7101a58b7203c", "score": "0.61344403", "text": "function initProgram() {\n const vertexShader = getShader('vertex-shader');\n const fragmentShader = getShader('fragment-shader');\n\n // Create a program\n program = gl.createProgram();\n // Attach the shaders to this program\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n gl.linkProgram(program);\n\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n console.error('Could not initialize shaders');\n }\n\n // Use this program instance\n gl.useProgram(program);\n // We attach the location of these shader values to the program instance\n // for easy access later in the code\n program.aVertexPosition = gl.getAttribLocation(program, 'aVertexPosition');\n program.aBary = gl.getAttribLocation(program, 'bary');\n program.uModelT = gl.getUniformLocation (program, 'modelT');\n program.uViewT = gl.getUniformLocation (program, 'viewT');\n program.uProjT = gl.getUniformLocation (program, 'projT');\n }", "title": "" }, { "docid": "49f359e80d078c792c77ed9a553d204d", "score": "0.6088869", "text": "function initVertexBuffers(ev,gl,canvas,a_Position,n){ \n var n = xy_points.length/2; //Number of coordinate pairs\n \n if(right_clicked == true){\n n= g_points.length/2;\n }\n //Create buffer object\n var vertexBuffer = gl.createBuffer();\n if (!vertexBuffer){\n console.log('Failed to create the buffer object');\n return -1;\n }\n \n //Bind buffer to target and write data into buffer object\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, xy_points, gl.STATIC_DRAW);\n \n //Initialize a_Position for shader\n var a_Position = gl.getAttribLocation(gl.program, 'a_Position');\n if (a_Position < 0){\n console.log('Failed to get the storage location of a_Position');\n return -1;\n }\n\n gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_Position);\n return n; \n}", "title": "" }, { "docid": "a5aa098d9905709e7799a32e669e2b00", "score": "0.60540146", "text": "function ky__initB(position,normal){\n //create the buffer for the positions\n var positBuffer=ky__gl.createBuffer();\n //bind the buffer to the top webGL buffer editing interface\n ky__gl.bindBuffer(ky__gl.ARRAY_BUFFER,positBuffer);\n //set the vertices \n //add the positions array data to the positions buffer.\n ky__gl.bufferData(ky__gl.ARRAY_BUFFER,new Float32Array(position),ky__gl.STATIC_DRAW);\n \n return positBuffer;\n}", "title": "" }, { "docid": "029539fddc26b1bc45c70f932f886fab", "score": "0.6048126", "text": "function initQuad() {\n VertexPositionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, VertexPositionBuffer);\n vertices = [\n 1.0, 1.0, 0.0,\n -1.0, 1.0, 0.0,\n 1.0, -1.0, 0.0,\n -1.0, -1.0, 0.0\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n VertexPositionBuffer.itemSize = 3;\n VertexPositionBuffer.numItems = 4;\n gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, VertexPositionBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\tgl.enableVertexAttribArray(0);\n}", "title": "" }, { "docid": "be13858448a66e5ad34a5107ebf0ec23", "score": "0.60216385", "text": "function initProgram() {\n // Compile shaders\n // Vertex Shader: simplest possible\n let vertShader = compileShader(gl, gl.VERTEX_SHADER,\n `#version 300 es\n precision mediump float;\n in vec4 aPosition;\n in vec4 aColor;\n out vec4 vColor;\n \n void main() {\n gl_Position = aPosition;\n gl_PointSize = 5.0; // make points visible\n vColor = aColor;\n }`\n );\n // Fragment Shader: simplest possible, chosen color is red for each point\n let fragShader = compileShader(gl, gl.FRAGMENT_SHADER,\n `#version 300 es\n precision mediump float;\n in vec4 vColor;\n out vec4 fragColor;\n void main() {\n fragColor = vColor;\n }`\n );\n\n // Link the shaders into a program and use them with the WebGL context\n let program = linkProgram(gl, vertShader, fragShader);\n gl.useProgram(program);\n \n // Get and save the position and color attribute indices\n program.aPosition = gl.getAttribLocation(program, 'aPosition'); // get the vertex shader attribute \"aPosition\"\n program.aColor = gl.getAttribLocation(program, 'aColor'); // get the vertex shader attribute \"aColor\"\n \n return program;\n}", "title": "" }, { "docid": "6095b791f6adb088b1bfffeed9f84bb5", "score": "0.5971614", "text": "init(context, sceneMatrix) {\n if(!this.isInit) {\n this.isInit = true;\n this.posBuffer = gl.createBuffer();\n this.colorBuffer = gl.createBuffer();\n this.sizeBuffer = gl.createBuffer();\n\n /*set the attributes uniforms*/\n this.a_position = gl.getAttribLocation(context.shader, 'a_position');\n this.a_color = gl.getAttribLocation(context.shader, 'a_color');\n this.a_size = gl.getAttribLocation(context.shader, 'a_size');\n this.u_modelView = gl.getUniformLocation(context.shader, 'u_modelView');\n this.u_projection = gl.getUniformLocation(context.shader, 'u_projection');\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.colorBuffer);\n gl.enableVertexAttribArray(this.a_color);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.posBuffer);\n gl.enableVertexAttribArray(this.a_position);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.sizeBuffer);\n gl.enableVertexAttribArray(this.a_size);\n\n this.wind = vec3.fromValues(0,0,0);\n\n this.moveVec = vec3.create();\n this.oldPos = this.getPosition(sceneMatrix);\n }\n }", "title": "" }, { "docid": "7e383025c50819eb56487239c6efa1cd", "score": "0.5950438", "text": "function initBuffers(gl, posions) {\n\n // Create a buffer for the square's positions.\n\n const positionBuffer = gl.createBuffer();\n\n // Select the positionBuffer as the one to apply buffer\n // operations to from here out.\n //绑定\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\n // Now create an array of positions for the square.\n\n // Now pass the list of positions into WebGL to build the\n // shape. We do this by creating a Float32Array from the\n // JavaScript array, then use it to fill the current buffer.\n //写入\n gl.bufferData(gl.ARRAY_BUFFER,\n posions,\n gl.STATIC_DRAW);\n\n return positionBuffer;\n}", "title": "" }, { "docid": "c60924446d82df1c8895c15e0a1b1334", "score": "0.58828485", "text": "constructor() {\n this.standardProgram = null; // Draw static point in the middle\n this.globalDrawingProgram = null; // Draw point defined by global parameters\n this.vertexColorProgram = null; // Draw static point in the middle\n }", "title": "" }, { "docid": "d09af967179927b1fe1fd2ac9c3cddb8", "score": "0.58740366", "text": "function bufferInit(gl, programInfo, CylinderData, lowerRectangleData, upperRectangleData) {\n resize(gl.canvas);\n gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);\n //gl.useProgram(programInfo.program);\n\n var allPoints = (CylinderData.points).concat(lowerRectangleData.points);\n allPoints = allPoints.concat(upperRectangleData.points);\n var allColors = (CylinderData.colors).concat(lowerRectangleData.colors);\n allColors = allColors.concat(upperRectangleData.colors);\n var allNormals = (CylinderData.normals).concat(lowerRectangleData.normals);\n allNormals = allNormals.concat(upperRectangleData.normals);\n\n // Point buffer\n var pointsBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointsBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(allPoints), gl.STATIC_DRAW);\n\n // Tell the attribute how to get data out of positionBuffer (ARRAY_BUFFER)\n var psize = 3; // 3 components per iteration (xyz), w defaults to 1 in shader\n var ptype = gl.FLOAT; // the data is 32bit floats\n var pnormalize = false; // don't normalize the data\n var pstride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position\n var poffset = 0; // start at the beginning of the buffer\n gl.vertexAttribPointer(programInfo.attributes.position, psize, ptype, pnormalize, pstride, poffset);\n gl.enableVertexAttribArray(programInfo.attributes.position);\n \n // Color buffer\n var colorsBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, colorsBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array(allColors), gl.STATIC_DRAW);\n \n // Tell the attribute how to get data out of colorBuffer (ARRAY_BUFFER)\n var csize = 3; // 3 components per iteration (rgb), a defaults to 1 in shader\n var ctype = gl.UNSIGNED_BYTE; // the data is 8bit unsigned values\n var cnormalize = true; // normalize the data (convert from 0-255 to 0-1)\n var cstride = 0;\n var coffset = 0;\n gl.vertexAttribPointer(programInfo.attributes.color, csize, ctype, cnormalize, cstride, coffset);\n gl.enableVertexAttribArray(programInfo.attributes.color);\n \n // Normal buffer\n var normalsBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, normalsBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(allNormals), gl.STATIC_DRAW);\n \n // Tell the attribute how to get data out of normalBuffer (ARRAY_BUFFER)\n var nsize = 3;\n var ntype = gl.FLOAT;\n var nnormalize = false;\n var nstride = 0;\n var noffset = 0;\n gl.vertexAttribPointer(programInfo.attributes.normal, nsize, ntype, nnormalize, nstride, noffset);\n gl.enableVertexAttribArray(programInfo.attributes.normal);\n \n}", "title": "" }, { "docid": "a4cfca86fcb177778b04dd490d7e9ee4", "score": "0.58178973", "text": "initialize() {\n // TODO: Add your initialization logic here\n var gl = this.graphics.GraphicsDevice.Adapter.DefaultAdapter;\n this.positionBuffer = gl.createBuffer();\n \n super.initialize(); //This is the function we override in the parent.\n }", "title": "" }, { "docid": "55f6437983bba555d1340db8c274b29b", "score": "0.57902855", "text": "function drawInit(normals) {\r\n\tvar pBuffer = gl.createBuffer();\r\n\tgl.bindBuffer(gl.ARRAY_BUFFER, pBuffer);\r\n\tgl.bufferData(gl.ARRAY_BUFFER, flatten(pointsArray), gl.STATIC_DRAW);\r\n\r\n\tvar vPosition = gl.getAttribLocation(program, \"vPosition\");\r\n\tgl.vertexAttribPointer(vPosition, 4, gl.FLOAT, false, 0, 0);\r\n\tgl.enableVertexAttribArray(vPosition);\r\n\r\n\tvar nBuffer = gl.createBuffer();\r\n\tgl.bindBuffer(gl.ARRAY_BUFFER, nBuffer);\r\n\tgl.bufferData(gl.ARRAY_BUFFER, flatten(normals), gl.STATIC_DRAW ); // TODO change this back\r\n\r\n\tvar vNormal = gl.getAttribLocation( program, \"vNormal\" );\r\n\tgl.vertexAttribPointer(vNormal, 4, gl.FLOAT, false, 0, 0 );\r\n\tgl.enableVertexAttribArray(vNormal);\r\n}", "title": "" }, { "docid": "97c79a53fb97fff309d8786415e8f055", "score": "0.57768506", "text": "function initNormals(gl, cylinderProgram) {\n gl.useProgram(cylinderProgram);\n var normals = new Float32Array(n);\n // Create a buffer to put normals in\n var normalBuffer = gl.createBuffer();\n if (!normalBuffer) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n // Bind it to ARRAY_BUFFER (think of it as ARRAY_BUFFER = normalBuffer)\n gl.bindBuffer(gl.ARRAY_BUFFER, normalBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, normals, gl.STATIC_DRAW);\n //var normalLocation = gl.getAttribLocation(gl.program, \"a_Normal\");\n gl.vertexAttribPointer(cylinderProgram.a_Normal, 3, gl.FLOAT, false, 0, 0);\n // Turn on the normal attribute\n gl.enableVertexAttribArray(cylinderProgram.a_Normal);\n}", "title": "" }, { "docid": "93c98ebf7cf8916ce06e902e8ace7545", "score": "0.576419", "text": "function initGL() {\r\n var prog = createProgram(gl,\"vshader-source\",\"fshader-source\");\r\n gl.useProgram(prog);\r\n a_coords_loc = gl.getAttribLocation(prog, \"a_coords\");\r\n a_normal_loc = gl.getAttribLocation(prog, \"a_normal\");\r\n u_modelview = gl.getUniformLocation(prog, \"modelview\");\r\n u_projection = gl.getUniformLocation(prog, \"projection\");\r\n u_normalMatrix = gl.getUniformLocation(prog, \"normalMatrix\");\r\n u_lightPosition= gl.getUniformLocation(prog, \"lightPosition\");\r\n u_lightPositionA= gl.getUniformLocation(prog, \"lightPositionA\");\r\n u_lightPositionB= gl.getUniformLocation(prog, \"lightPositionB\");\r\n u_diffuseColor = gl.getUniformLocation(prog, \"diffuseColor\");\r\n u_specularColor = gl.getUniformLocation(prog, \"specularColor\");\r\n u_specularExponent = gl.getUniformLocation(prog, \"specularExponent\");\r\n u_color = gl.getUniformLocation(prog, \"color\");\r\n u_spotLightDir = gl.getUniformLocation(prog, \"spotLightDir\");\r\n u_day = gl.getUniformLocation(prog, \"day\");\r\n a_coords_buffer = gl.createBuffer();\r\n a_normal_buffer = gl.createBuffer();\r\n index_buffer = gl.createBuffer();\r\n gl.enable(gl.DEPTH_TEST);\r\n gl.uniform3f(u_specularColor, 0.5, 0.5, 0.5);\r\n gl.uniform4f(u_diffuseColor, 1, 1, 1, 1);\r\n gl.uniform1f(u_specularExponent, 10); \r\n gl.uniform4f(u_lightPosition, lightPositions[0][0], lightPositions[0][1], lightPositions[0][2], lightPositions[0][3]); \r\n gl.uniform4f(u_lightPositionA, lightPositions[1][0], lightPositions[1][1], lightPositions[1][2], lightPositions[1][3]);\r\n gl.uniform4f(u_lightPositionB, lightPositions[2][0], lightPositions[2][1], lightPositions[2][2], lightPositions[2][3]);\r\n}", "title": "" }, { "docid": "70bb94c83ade20c259b197a9c739de2e", "score": "0.5740804", "text": "function initBuffer(gl) {\n // Create a buffer for the square's positions.\n const positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n \n // Now create an array of positions for the square.\n const positions = [\n 1.0, 1.0,\n -1.0, 1.0,\n 1.0, -1.0,\n -1.0, -1.0,\n ];\n \n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array(positions),\n gl.STATIC_DRAW);\n \n return positionBuffer;\n}", "title": "" }, { "docid": "976ed22f73b2192f97d03739ccd4370a", "score": "0.5737205", "text": "function initVertexBuffers(gl, a_position, arrayV, arrayI, arrayFC, arraySC) {\r\n var vertices = new Float32Array(arrayV); //pass array of shape points\r\n var indices = new Uint16Array(arrayI); //pass order of SOR points\r\n var n = indices.length; //number of indices\r\n var Fcolors = new Float32Array(arrayFC); //pass array of flat colors\r\n var Scolors = new Float32Array(arraySC); //pass array of smooth colors\r\n \r\n if(!initArrayBuffer(gl, vertices, 3, gl.FLOAT, 'a_position')) return -1;\r\n \r\n if(!initArrayBuffer(gl, Fcolors, 3, gl.FLOAT, 'a_flatColor')) return -1;\r\n \r\n if(!initArrayBuffer(gl, Scolors, 3, gl.FLOAT, 'a_smoothColor')) return -1;\r\n \r\n //create buffer for indices\r\n var indexBuffer = gl.createBuffer();\r\n if (!indexBuffer) {\r\n console.log('Failed to create the buffer object');\r\n return -1;\r\n }\r\n \r\n //write indices to the buffer object\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);\r\n\r\n return n;\r\n}", "title": "" }, { "docid": "82f61aa099e04fadaec14da6e7c24521", "score": "0.5714759", "text": "function initShaders (){\n\tvar vertexShader = createShaderFromScriptElement(gl, \"vertex-shader\");\n\tvar fragmentShader = createShaderFromScriptElement(gl, \"fragment-shader\");\n\tprogram = createProgram(gl, [vertexShader, fragmentShader]);\n\tgl.useProgram(program);\n\n\tvertexPositionAttribute = gl.getAttribLocation(program, \"aVertexPosition\");\n\tgl.enableVertexAttribArray(vertexPositionAttribute);\n\t\n\tvertexColorAttribute = gl.getAttribLocation(program, \"aVertexColor\");\n\tgl.enableVertexAttribArray(vertexColorAttribute);\n}", "title": "" }, { "docid": "6d15b44412bc5d2f2f944e801b075bb9", "score": "0.57136786", "text": "function setTopView(gl, cylinderProgram, lineProgram) {\n var len1 = points.length / 3;\n var len2 = shown.length / 3;\n if (toggle2 == 0 && toggle3 == 0) { // Draw a top view, flat shading cylinder without displaying normals\n initPositions(gl, cylinderProgram, lineProgram, 0); // The last parameter '0' is to choose cylinderProgram\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 0); // The last but one parameter is to choose cylinderProgram.\n // The last parameter is to choose a top view.\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.TRIANGLES, 0, len1);\n }\n else if (toggle2 == 1 && toggle3 == 0) {\n initPositions(gl, cylinderProgram, lineProgram, 0);\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 0);\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.LINE_STRIP, 0, len1);\n }\n else {\n if (toggle2 == 0) {\n initPositions(gl, cylinderProgram, lineProgram, 0);\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 0);\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.TRIANGLES, 0, len1);\n\n initPositions(gl, cylinderProgram, lineProgram, 1);\n initMatrix(gl, cylinderProgram, lineProgram, 1, 0);\n\n gl.drawArrays(gl.LINES, 0, len2);\n }\n else {\n initPositions(gl, cylinderProgram, lineProgram, 0);\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 0);\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.LINE_STRIP, 0, len1);\n\n initPositions(gl, cylinderProgram, lineProgram, 1);\n initMatrix(gl, cylinderProgram, lineProgram, 1, 0);\n\n gl.drawArrays(gl.LINES, 0, len2);\n }\n }\n}", "title": "" }, { "docid": "70ea6d2231d118cbed84d948b40f3c37", "score": "0.571013", "text": "function initBuffers() {\n // 3 stk 3D vertekser:\n let trianglePositions = new Float32Array([ //NB! ClockWise!!\n -10, -10, 0, //0\n 0, -5, 0,\n 10, -8, 0,\n -1, -8, 0,\n 3, 4, 0,\n 7, -6, 0,\n -15, -10, 0,\n 0, 5, 0,\n 10, -7, -5,\n 2, 5, 0,\n 5, -7, -5, //10\n\n -25, 9, 0, //11 triangle\n -25, -15, 0,\n -10, 8, -2,\n\n -26, 11, 0, //14 line\n -29, -16, 0,\n\n -30, -25, 0, //16 line\n 6, -20, 0,\n\n -15, -25, 0, //18 LINE_STRIP\n 6, -10, 0,\n 8, -15, 0,\n -15, -25, 0,\n\n -8, -25, 0, //22 TRIANGLE_STRIP\n -6, -10, 0,\n -9, -15, 0,\n\n -15, -20, 0,\n -12, -22, 0,\n\n -9, -30, 0,\n -15, -29, 0,\n\n -12, -18, 0,\n -12, -17, 0, //30\n\n\n ]);\n\n // Verteksbuffer:\n positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, trianglePositions, gl.STATIC_DRAW);\n\n positionBuffer.itemSize = 3; // NB!!\n positionBuffer.numberOfItems = 3; // NB!!\n\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n}", "title": "" }, { "docid": "01945d99b28e5bbff4ff2567e144fc8a", "score": "0.57073796", "text": "function prepareScene(gl, program, uniforms) {\n // Clear screen\n gl.clearColor(0.0, 0.0, 0.0, 1.0);\n gl.clearDepth(1.0);\n\n // Setup vertex position attribute as vec2\n gl.vertexAttribPointer(program.vertices, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(program.vertices);\n \n // Set shader program\n gl.useProgram(program.program);\n}", "title": "" }, { "docid": "6ff903df162f3e705cc900f31232f764", "score": "0.5707008", "text": "function setPositionsPointer(size,dtype)\r\n{\r\n gl.vertexAttribPointer(shaderProgram.aVertexPosition,size,dtype,false,0,0);\r\n}", "title": "" }, { "docid": "af9af57b67947f7b5e4877c1cf0e5330", "score": "0.5687178", "text": "async function initBuffers(gl) {\n\tconsole.log(\"loading texture\");\n\tconst texture = await loadTexture(gl, 'textures/cubetexture.png');\n\n\tconsole.log(\"creating positions\");\n\tconst positions = new Float32Array([\n\t\t// Front face\n\t\t-1.0, -1.0, 1.0,\n\t\t1.0, -1.0, 1.0,\n\t\t1.0, 1.0, 1.0,\n\t\t-1.0, 1.0, 1.0,\n\n\t\t// Back face\n\t\t-1.0, -1.0, -1.0,\n\t\t-1.0, 1.0, -1.0,\n\t\t1.0, 1.0, -1.0,\n\t\t1.0, -1.0, -1.0,\n\n\t\t// Top face\n\t\t-1.0, 1.0, -1.0,\n\t\t-1.0, 1.0, 1.0,\n\t\t1.0, 1.0, 1.0,\n\t\t1.0, 1.0, -1.0,\n\n\t\t// Bottom face\n\t\t-1.0, -1.0, -1.0,\n\t\t1.0, -1.0, -1.0,\n\t\t1.0, -1.0, 1.0,\n\t\t-1.0, -1.0, 1.0,\n\n\t\t// Right face\n\t\t1.0, -1.0, -1.0,\n\t\t1.0, 1.0, -1.0,\n\t\t1.0, 1.0, 1.0,\n\t\t1.0, -1.0, 1.0,\n\n\t\t// Left face\n\t\t-1.0, -1.0, -1.0,\n\t\t-1.0, -1.0, 1.0,\n\t\t-1.0, 1.0, 1.0,\n\t\t-1.0, 1.0, -1.0,\n\t]);\n\tconst positionBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);\n\n\tconsole.log(\"creating indices\");\n\tconst indexBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n\tconst indices = [\n\t\t0, 1, 2, 0, 2, 3, // front\n\t\t4, 5, 6, 4, 6, 7, // back\n\t\t8, 9, 10, 8, 10, 11, // top\n\t\t12, 13, 14, 12, 14, 15, // bottom\n\t\t16, 17, 18, 16, 18, 19, // right\n\t\t20, 21, 22, 20, 22, 23, // left\n\t];\n\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);\n\n\tconsole.log(\"creating texture coordinates\");\n\tconst textureCoordBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, textureCoordBuffer);\n\tconst textureCoordinates = [\n\t\t// Front\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Back\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Top\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Bottom\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Right\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t\t// Left\n\t\t0.0, 0.0,\n\t\t1.0, 0.0,\n\t\t1.0, 1.0,\n\t\t0.0, 1.0,\n\t];\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(textureCoordinates), gl.STATIC_DRAW);\n\n\treturn {\n\t\ttexture: texture,\n\t\tposition: positionBuffer,\n\t\tindices: indexBuffer,\n\t\ttextureCoord: textureCoordBuffer,\n\t};\n}", "title": "" }, { "docid": "c9a9373bb898c5a8829ecdb70e98f59c", "score": "0.567981", "text": "function initBuffers(gl, programInfo, gearData) {\r\n const vertices = gearData[0];\r\n const colors = gearData[1];\r\n const normals = gearData[2];\r\n\r\n // Create buffers for the object's vertex positions\r\n const vertexBuffer = gl.createBuffer();\r\n\r\n // Select the positionBuffer as the one to apply buffer\r\n // operations to from here out.\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n // Now pass the list of vertices to the GPU to build the\r\n // shape. We do this by creating a Float32Array from the\r\n // JavaScript array, then use it to fill the current buffer.\r\n gl.bufferData(gl.ARRAY_BUFFER,\r\n new Float32Array(vertices),\r\n gl.STATIC_DRAW);\r\n\r\n\r\n // do likewise for colors\r\n const colorBuffer = gl.createBuffer();\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);\r\n\r\n gl.bufferData(gl.ARRAY_BUFFER,\r\n new Float32Array(colors),\r\n gl.STATIC_DRAW);\r\n\r\n\r\n const normalBuffer = gl.createBuffer();\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, normalBuffer);\r\n\r\n gl.bufferData(gl.ARRAY_BUFFER,\r\n new Float32Array(normals),\r\n gl.STATIC_DRAW);\r\n\r\n return {\r\n // each vertex in buffer has 3 floats\r\n num_vertices: vertices.length / 3,\r\n vertex: vertexBuffer,\r\n color: colorBuffer,\r\n normal: normalBuffer\r\n };\r\n\r\n}", "title": "" }, { "docid": "e36c41850910f841cf87e6f7cc90953c", "score": "0.567831", "text": "function makePointsProgram(gl, data) {\n let vertexProgram = vertexProgramCache.get(gl)\n if (!vertexProgram) {\n let vertexShader = gl_utils.compile(gl, gl.VERTEX_SHADER, vertexShaderSrc);\n let fragmentShader = gl_utils.compile(gl, gl.FRAGMENT_SHADER, fragmentShaderSrc);\n vertexProgram = gl_utils.link(gl, vertexShader, fragmentShader);\n vertexProgramCache.set(gl, vertexProgram);\n }\n\n let locations = gl_utils.getLocations(gl, vertexProgram);\n\n var buffer = gl.createBuffer();\n if (!buffer) throw new Error('failed to create a nodesBuffer');\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, data.byteLength, gl.DYNAMIC_DRAW);\n\n var pointTexture = createCircleTexture(gl);\n\n var api = {\n draw,\n updateData,\n dispose\n };\n return api;\n\n function updateData(newData) {\n data = newData;\n }\n\n function dispose() {\n // For some reason disposing the buffer results in unbindable\n // buffer for the lines program (that is created after this scene is disposed).\n // gl.deleteBuffer(buffer);\n gl.deleteProgram(vertexProgram);\n gl.deleteTexture(pointTexture);\n vertexProgramCache.delete(gl);\n }\n\n function draw(transform, screen, count) {\n gl.useProgram(vertexProgram);\n\n var bpe = data.BYTES_PER_ELEMENT;\n\n if (transform) {\n gl.uniformMatrix4fv(locations.uniforms.uTransform, false, transform.getArray());\n }\n gl.uniform2f(locations.uniforms.uScreenSize, screen.width, screen.height);\n gl.bindTexture(gl.TEXTURE_2D, pointTexture);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);\n\n gl.vertexAttribPointer(locations.attributes.aPosition, 2, gl.FLOAT, false, bpe * 6, 0)\n gl.enableVertexAttribArray(locations.attributes.aPosition)\n\n gl.vertexAttribPointer(locations.attributes.aPointSize, 1, gl.FLOAT, false, bpe * 6, 2 * bpe)\n gl.enableVertexAttribArray(locations.attributes.aPointSize)\n\n gl.vertexAttribPointer(locations.attributes.aColor, 3, gl.FLOAT, false, bpe * 6, 3 * bpe)\n gl.enableVertexAttribArray(locations.attributes.aColor);\n gl.drawArrays(gl.POINTS, 0, count);\n }\n}", "title": "" }, { "docid": "e8f5d0efa143f330ae17a15f8f194600", "score": "0.56672066", "text": "function initializeShaders(){\n //Load shaders and initialize attribute buffers\n program = initShaders(gl, \"shader-vs\", \"shader-fs\");\n gl.useProgram(program);\n\n //Associate attributes to vertex shader\n _Pmatrix = gl.getUniformLocation(program, \"Pmatrix\");\n _Vmatrix = gl.getUniformLocation(program, \"Vmatrix\");\n _Mmatrix = gl.getUniformLocation(program, \"Mmatrix\");\n _Nmatrix = gl.getUniformLocation(program, \"normalMatrix\");\n\n //Bind vertex buffer with position attribute \n gl.bindBuffer(gl.ARRAY_BUFFER, vertex_buffer);\n var _position = gl.getAttribLocation(program, \"position\");\n gl.vertexAttribPointer(_position, 3, gl.FLOAT, false,0,0);\n gl.enableVertexAttribArray(_position); \n\n //Attributes\n textureCoordAttribute = gl.getAttribLocation(program, \"aTextureCoord\");\n gl.enableVertexAttribArray(textureCoordAttribute);\n\n normalAttribute = gl.getAttribLocation(program, \"normal\");\n gl.enableVertexAttribArray(normalAttribute);\n}", "title": "" }, { "docid": "fc5331df71117c6d774cdd234ccea87b", "score": "0.56407315", "text": "function initVertexBuffers_flower(gl, x, y, size, a_Position, shape) {\r\n var theta = Math.PI/6.5;\r\n var count = 0; // add to array\r\n var n = 0; // The number of vertices\r\n var vertices = new Float32Array(96);\r\n\r\n for(var circle = 0; circle <= (2*Math.PI); circle += theta){\r\n vertices[count] = (x+(1/(2*size))*Math.cos(n*theta));\r\n count++;\r\n vertices[count] = (y+(1/(2*size))*Math.sin(n*theta));\r\n count++;\r\n n++;\r\n }\r\n n--;\r\n\r\n // Create a buffer object\r\n var vertexBuffer = gl.createBuffer();\r\n if (!vertexBuffer) {\r\n console.log('Failed to create the buffer object');\r\n return -1;\r\n }\r\n\r\n // Bind the buffer object to target\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n // Write date into the buffer object\r\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\r\n\r\n // Assign the buffer object to a_Position variable\r\n gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);\r\n\r\n // Enable the assignment to a_Position variable\r\n gl.enableVertexAttribArray(a_Position);\r\n\r\n if (n < 0) {\r\n console.log('Failed to set the positions of the vertices');\r\n return;\r\n }\r\n if (shape == 0){\r\n gl.drawArrays(gl.LINE_LOOP, 0, n);\r\n } else if (shape == 1) {\r\n gl.drawArrays(gl.TRIANGLE_FAN, 0, n);\r\n }\r\n}", "title": "" }, { "docid": "341e4658d01c04ac83f54c06b1d9126f", "score": "0.56330585", "text": "function init() {\r\n\r\n\t// init cam variables;\r\n\tspherical2Cartesian();\r\n\r\n\t// set the viewport to be the whole canvas\r\n\tgl.viewport(0, 0, gl.desiredWidth, gl.desiredHeight);\r\n\r\n\t// projection matrix.\r\n\tmat4.perspective(45, gl.desiredWidth / gl.desiredHeight, 0.1, 1000,\r\n\t\t\tMatrices.proj);\r\n\r\n\t// Set the background clear color to gray.\r\n\tgl.clearColor(0.8, 0.8, 0.8, 1.0);\r\n\t// general gl settings\r\n\tgl.enable(gl.CULL_FACE);\r\n\tgl.enable(gl.DEPTH_TEST);\r\n\r\n\t// create the shader programs\r\n\tphongProgram = createProgram(\"phong_vs\", \"phong_fs\", [ \"aVec4Position\",\r\n\t\t\t\"aVec3Normal\" ],\r\n\t\t\t[ \"uMat4PVM\", \"uMat3Normal\", \"uMat4ViewModel\", \"uVec3LightDir\",\r\n\t\t\t\t\t\"uVec4Diffuse\", \"uVec4Specular\", \"uFloatShininess\" ]);\r\n\r\n\tcolorProgram = createProgram(\"color_vs\", \"color_fs\", [ \"aVec4Position\" ], [\r\n\t\t\t\"uMat4PVM\", \"uVec4Diffuse\" ]);\r\n\r\n\tphongTexProgram = createProgram(\"phong_texture_vs\", \"phong_texture_fs\", [\r\n\t\t\t\"aVec4Position\", \"aVec3Normal\", \"aVec2TexCoord\" ], [ \"uMat4PVM\",\r\n\t\t\t\"uMat3Normal\", \"uMat4ViewModel\", \"uSamp2DTexID\", \"uVec3LightDir\",\r\n\t\t\t\"uVec4Diffuse\", \"uVec4Specular\", \"uFloatShininess\" ]);\r\n\r\n\t// init the matrices\r\n\tMatrices.init();\r\n\r\n\t// init the models for rendering\r\n\tvar myGridMat = new Material();\r\n\tmyGridMat.diffuse = new Float32Array([ 1.0, 1.0, 1.0, 1.0 ]);\r\n\tmyGrid = createGrid(1, 3, 12);\r\n\tmyGrid.setMaterial(myGridMat);\r\n\tmyAxis = createAxis(3);\r\n\t// just in case\r\n\tcheckError();\r\n}", "title": "" }, { "docid": "1ba08afcb99607be7c6b11bd2d3807c3", "score": "0.56279784", "text": "function setSideView(gl, cylinderProgram, lineProgram) {\n var len1 = points.length / 3;\n var len2 = shown.length / 3;\n if (toggle2 == 0 && toggle3 == 0) {\n initPositions(gl, cylinderProgram, lineProgram, 0);\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 1);\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.TRIANGLES, 0, len1);\n }\n else if (toggle2 == 1 && toggle3 == 0) {\n initPositions(gl, cylinderProgram, lineProgram, 0);\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 1);\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.LINE_STRIP, 0, len1);\n }\n else {\n if (toggle2 == 0) {\n initPositions(gl, cylinderProgram, lineProgram, 0);\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 1);\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.TRIANGLES, 0, len1);\n\n initPositions(gl, cylinderProgram, lineProgram, 1);\n initMatrix(gl, cylinderProgram, lineProgram, 1, 1);\n\n gl.drawArrays(gl.LINES, 0, len2);\n }\n else {\n initPositions(gl, cylinderProgram, lineProgram, 0);\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 1);\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.drawArrays(gl.LINE_STRIP, 0, len1);\n\n initPositions(gl, cylinderProgram, lineProgram, 1);\n initMatrix(gl, cylinderProgram, lineProgram, 1, 1);\n\n gl.drawArrays(gl.LINES, 0, len2);\n }\n }\n}", "title": "" }, { "docid": "36befb7f65946745cbca68d350c9382b", "score": "0.56094754", "text": "function setPositionAttribute(gl, position, programInfo) {\n const numComponents = 3; // pull out 2 values per iteration\n const type = gl.FLOAT; // the data in the buffer is 32bit floats\n const normalize = false; // don't normalize\n const stride = 0; // how many bytes to get from one set of values to the next\n // 0 = use type and numComponents above\n const offset = 0; // how many bytes inside the buffer to start from\n gl.bindBuffer(gl.ARRAY_BUFFER, position);\n gl.vertexAttribPointer(\n programInfo.attributes.vertexPosition,\n numComponents,\n type,\n normalize,\n stride,\n offset\n );\n gl.enableVertexAttribArray(programInfo.attributes.vertexPosition);\n}", "title": "" }, { "docid": "8f59249560ae113c7f6d80ec63f2cf4e", "score": "0.560055", "text": "function gl_init(gl, vertexShader, fragmentShader) {\n\n // Create and link the gl program, using the application's vertex and fragment shaders.\n\n var program = gl.createProgram();\n addshader(gl, program, gl.VERTEX_SHADER , vertexShader );\n addshader(gl, program, gl.FRAGMENT_SHADER, fragmentShader);\n gl.linkProgram(program);\n if (! gl.getProgramParameter(program, gl.LINK_STATUS))\n console.log(\"Could not link the shader program!\");\n gl.useProgram(program);\n\n // Create a square as a strip of two triangles.\n\n gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ -1,1,0, 1,1,0, -1,-1,0, 1,-1,0 ]), gl.STATIC_DRAW);\n\n // Assign attribute aPosition to each of the square's vertices.\n\n gl.aPosition = gl.getAttribLocation(program, \"aPosition\");\n gl.enableVertexAttribArray(gl.aPosition);\n gl.vertexAttribPointer(gl.aPosition, 3, gl.FLOAT, false, 0, 0);\n\n // Remember the address within the fragment shader of each of my uniform variables.\n\n gl.uTime = gl.getUniformLocation(program, \"uTime\" );\n gl.uCursor = gl.getUniformLocation(program, \"uCursor\");\n}", "title": "" }, { "docid": "9d237bcc78ee6767f1fafa62ba363165", "score": "0.5589156", "text": "function init() {\n // Set the clear color to fully transparent black\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n \n gl.enable(gl.DEPTH_TEST);\n gl.depthMask(true);\n gl.disable(gl.BLEND);\n \n // Create the model-view matrix and projection matrix\n mvmat = mat4.create();\n projmat = mat4.create();\n nmat = mat3.create();\n \n // Create all buffer objects and reset their lengths\n vbo = gl.createBuffer();\n lineIndices = gl.createBuffer();\n triIndices = gl.createBuffer();\n vbo.length = 0;\n lineIndices.length = 0;\n \n // Initialize the shaders\n initShaders();\n \n // Reshape the canvas, and setup the viewport and projection\n reshape();\n}", "title": "" }, { "docid": "dee706a1e1b6ea5453eaedd25fb50b01", "score": "0.55856436", "text": "function initVertexBuffer() {\n models[SPHERE] = new Sphere();\n models[HELICOPTERBODY] = new HelicopterBody();\n models[BRICK] = new Brick();\n models[CYLINDER] = new Cylinder();\n models[TORUS] = new Torus();\n models[GROUNDGRID] = new GroundGrid();\n\n var vSiz = Object.keys(models).reduce((result, key) => result + models[key].getVertices().length, 0);\n\n console.log('Number of vertices is', vSiz / floatsPerVertex, ', point per vertex is', floatsPerVertex);\n\n verticesArrayBuffer = new ArrayBufferFloat32Array(vSiz);\n Object.keys(models).map(key => verticesArrayBuffer.appendObject(key, models[key].getVertices()));\n\n var nSiz = vSiz;\n normalVectorsArrayBuffer = new ArrayBufferFloat32Array(nSiz);\n Object.keys(models).map(key => normalVectorsArrayBuffer.appendObject(key, models[key].getNormalVectors()));\n\n var modelIndices = [models[SPHERE], models[HELICOPTERBODY], models[BRICK]]\n .reduce((array, m) => {\n array.push(m.getVerticesIndices());\n return array;\n }, []);\n var iSiz = modelIndices.reduce((result, mi) => result + mi.length, 0);\n console.log('iSiz is', iSiz);\n\n indiceArrayBuffer = new ArrayBufferUint8Array(iSiz);\n var hlcIndexIncr = verticesArrayBuffer.getObjectStartPosition(HELICOPTERBODY) / floatsPerVertex;\n var brkIndexIncr = verticesArrayBuffer.getObjectStartPosition(BRICK) / floatsPerVertex;\n indiceArrayBuffer.appendObject(SPHERE, modelIndices[0]);\n indiceArrayBuffer.appendObject(HELICOPTERBODY,\n modelIndices[1].map(idx => idx + hlcIndexIncr));\n indiceArrayBuffer.appendObject(BRICK,\n modelIndices[2].map(idx => idx + brkIndexIncr));\n\n // We create two separate buffers so that you can modify normals if you wish.\n if (!initGLArrayBuffer('a_Position', verticesArrayBuffer.getArray(), gl.FLOAT, floatsPerVertex)) return -1;\n if (!initGLArrayBuffer('a_Normal', normalVectorsArrayBuffer.getArray(), gl.FLOAT, floatsPerVertex)) return -1;\n\n // Unbind the buffer object\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n\n // Write the indices to the buffer object\n var indexBuffer = gl.createBuffer();\n if (!indexBuffer) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indiceArrayBuffer.getArray(), gl.STATIC_DRAW);\n\n return indiceArrayBuffer.getArray().length;\n }", "title": "" }, { "docid": "b509d16ece2dddd5581f833b7fb37063", "score": "0.5574001", "text": "init()\n\t{\n\t\tinitVerticesNormalsTexturesIndexes();\n\n //Converts the values to buffers\n\t\tthis.vertexBuffer = getVertexBufferWithVertices(this.vertices);\n\t\tthis.colorBuffer = getVertexBufferWithVertices(this.colors);\n\t\tthis.indexBuffer = getIndexBufferWithIndices(this.indices);\n\n\t\t//Defines the position matrix of the object\n\t\tmat4.identity(this.mvMatrix);\n\t\tmat4.translate(this.mvMatrix, this.mvMatrix, vec3.fromValues(this.x, this.y, 0.0));\n\t}", "title": "" }, { "docid": "a4d4a69e4cfb0afce1c955655d6c62c2", "score": "0.55674654", "text": "function initShaders() {\n\n var fragmentShader = getShader(\"shader-frag\", gl.FRAGMENT_SHADER);\n var vertexShader = getShader(\"shader-vert\", gl.VERTEX_SHADER);\n\n scene.shader = {};\n\n var program = gl.createProgram();\n scene.shader['default'] = program;\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n gl.linkProgram(program);\n\n program.vertexPositionAttribute = gl.getAttribLocation(program, \"aVertPosition\");\n\n program.texturePositionAttribute = gl.getAttribLocation(program, \"aTexPosition\");\n\n program.transformUniform = gl.getUniformLocation(program, \"uTransform\");\n program.samplerUniform = gl.getUniformLocation(program, \"sampler\");\n\n // it's the only one for now so we can use it immediately\n gl.useProgram(program);\n gl.enableVertexAttribArray(program.vertexPositionAttribute);\n gl.enableVertexAttribArray(program.texturePositionAttribute);\n}", "title": "" }, { "docid": "f6a2492430387c464052a1f1865f146b", "score": "0.5557708", "text": "function initVertexBuffers_triangle(gl, x, y, a_Position, size) {\r\n var n = 3; // The number of vertices\r\n // creating the vertices for square\r\n var vertices = new Float32Array([\r\n x, y+(1/size)*0.5,\r\n x-(1/size)*0.5, y-(1/size)*0.5,\r\n x+(1/size)*0.5, y-(1/size)*0.5]);\r\n\r\n // Create a buffer object\r\n var vertexBuffer = gl.createBuffer();\r\n if (!vertexBuffer) {\r\n console.log('Failed to create the buffer object');\r\n return -1;\r\n }\r\n // Bind the buffer object to target\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n // Write date into the buffer object\r\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\r\n // Assign the buffer object to a_Position variable\r\n gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);\r\n // Enable the assignment to a_Position variable\r\n gl.enableVertexAttribArray(a_Position);\r\n return n;\r\n}", "title": "" }, { "docid": "bc389c2b17fdb4c1365688abd22b5f53", "score": "0.55570257", "text": "function initVertexBuffers(gl, program) {\n var o = new Object(); // Utilize Object object to return multiple buffer objects\n o.vertexBuffer = createEmptyArrayBuffer(gl, program.a_Position, 3, gl.FLOAT);\n o.normalBuffer = createEmptyArrayBuffer(gl, program.a_Normal, 3, gl.FLOAT);\n o.colorBuffer = createEmptyArrayBuffer(gl, program.a_Color, 4, gl.FLOAT);\n o.indexBuffer = gl.createBuffer();\n if (!o.vertexBuffer || !o.normalBuffer || !o.colorBuffer || !o.indexBuffer) { return null; }\n\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n\n return o;\n}", "title": "" }, { "docid": "5accbf2e17ccc0f1e4c1ee412fb90608", "score": "0.55429006", "text": "function initShaders() {\n\tvar fragmentShader = getShader(gl, \"shader-fs\");\n\tvar vertexShader = getShader(gl, \"shader-vs\");\n\n\tvar shaderProgram = gl.createProgram();\n\tgl.attachShader(shaderProgram, vertexShader);\n\tgl.attachShader(shaderProgram, fragmentShader);\n\tgl.linkProgram(shaderProgram);\n\n\tif (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\n\t\talert(\"Could not initialise shaders\");\n\t}\n\tgl.useProgram(shaderProgram);\n\n\tconst attrs = {\n\t\taVertexPosition: OBJ.Layout.POSITION.key,\n\t\taVertexNormal: OBJ.Layout.NORMAL.key,\n\t\taTextureCoord: OBJ.Layout.UV.key,\n\t\taDiffuse: OBJ.Layout.DIFFUSE.key,\n\t\taSpecular: OBJ.Layout.SPECULAR.key,\n\t\taSpecularExponent: OBJ.Layout.SPECULAR_EXPONENT.key\n\t};\n\n\tshaderProgram.attrIndices = {};\n\tfor (const attrName in attrs) {\n\t\tif (!attrs.hasOwnProperty(attrName)) {\n\t\t\tcontinue;\n\t\t}\n\t\tshaderProgram.attrIndices[attrName] = gl.getAttribLocation(shaderProgram, attrName);\n\t\tif (shaderProgram.attrIndices[attrName] != -1) {\n\t\t\tgl.enableVertexAttribArray(shaderProgram.attrIndices[attrName]);\n\t\t} else {\n\t\t\tconsole.warn(\n\t\t\t\t'Shader attribute \"' +\n\t\t\t\tattrName +\n\t\t\t\t'\" not found in shader. Is it undeclared or unused in the shader code?'\n\t\t\t);\n\t\t}\n\t}\n\n\tshaderProgram.pMatrixUniform = gl.getUniformLocation(shaderProgram, \"uPMatrix\");\n\tshaderProgram.mvMatrixUniform = gl.getUniformLocation(shaderProgram, \"uMVMatrix\");\n\tshaderProgram.nMatrixUniform = gl.getUniformLocation(shaderProgram, \"uNMatrix\");\n\n\tshaderProgram.applyAttributePointers = function(model) {\n\t\tconst layout = model.mesh.vertexBuffer.layout;\n\t\tfor (const attrName in attrs) {\n\t\t\tif (!attrs.hasOwnProperty(attrName) || shaderProgram.attrIndices[attrName] == -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst layoutKey = attrs[attrName];\n\t\t\tif (shaderProgram.attrIndices[attrName] != -1) {\n\t\t\t\tconst attr = layout[layoutKey];\n\t\t\t\tgl.vertexAttribPointer(\n\t\t\t\t\tshaderProgram.attrIndices[attrName],\n\t\t\t\t\tattr.size,\n\t\t\t\t\tgl[attr.type],\n\t\t\t\t\tattr.normalized,\n\t\t\t\t\tattr.stride,\n\t\t\t\t\tattr.offset\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n\treturn shaderProgram;\n}", "title": "" }, { "docid": "a89a18d719173dcdfe9ec5507c15402f", "score": "0.5540333", "text": "useProgram() {\n\t\tif (this.glProgram) {\n\t\t\tthis._gl.useProgram(this.glProgram);\n\t\t}\n\t}", "title": "" }, { "docid": "4bbf3b599cf2483d37a171fbaa79105f", "score": "0.55384654", "text": "function Sphere(gl, position = [0, 0, 0]) {\n\n\t// Shader program\n\tif (Sphere.shaderProgram === undefined) {\n\t\tSphere.shaderProgram = initShaderProgram(gl, \"vertex-shader\", \"fragment-shader\");\n\t\tif (Sphere.shaderProgram === null) {\n\t\t\tthrow new Error('Creating the shader program failed.');\n\t\t}\n\t\tSphere.locations = {\n\t\t\tattribute: {\n\t\t\t\tvertPosition: gl.getAttribLocation(Sphere.shaderProgram, \"vertPosition\"),\n\t\t\t\tvertColor: gl.getAttribLocation(Sphere.shaderProgram, \"vertColor\"),\n\t\t\t\taNormal: gl.getAttribLocation(Sphere.shaderProgram, \"aNormal\"),\n\t\t\t},\n\t\t\tuniform: {\n\t\t\t\tmMatrix: gl.getUniformLocation(Sphere.shaderProgram, \"mMatrix\"),\n\t\t\t\twMatrix: gl.getUniformLocation(Sphere.shaderProgram, \"wMatrix\"),\n\t\t\t\tvMatrix: gl.getUniformLocation(Sphere.shaderProgram, \"vMatrix\"),\n\t\t\t\tmMatrixInv: gl.getUniformLocation(Sphere.shaderProgram, \"mMatrixInv\"),\n\t\t\t\tpMatrix: gl.getUniformLocation(Sphere.shaderProgram, \"pMatrix\"),\n\t\t\t\tpLight: gl.getUniformLocation(Sphere.shaderProgram, \"pLight\"),\n\t\t\t\tcamera: gl.getUniformLocation(Sphere.shaderProgram, \"camera\"),\n\t\t\t\tspecularEnabled: gl.getUniformLocation(Sphere.shaderProgram, \"specularEnabled\"),\n\t\t\t\tphong: gl.getUniformLocation(Sphere.shaderProgram, \"phong\")\n\t\t\t}\n\t\t};\n\t\tgl.enableVertexAttribArray(Sphere.locations.attribute.vertPosition);\n\t\tgl.enableVertexAttribArray(Sphere.locations.attribute.vertColor);\n\t\tgl.enableVertexAttribArray(Sphere.locations.attribute.aNormal);\n\t}\n\n\t// Buffers\n\tif (Sphere.buffers === undefined) {\n\t\t// Create a buffer with the vertex positions\n\t\t// 3 coordinates per vertex, 3 vertices per triangle\n\t\t// 2 triangles make up the ground plane, 4 triangles make up the sides\n\t\tconst pBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, pBuffer);\n\n\n\t\t// Position vertices\n\t\tlet limit = 33;\n\t\tlet i, hi, si, ci;\n\t\tlet j, hj, sj, cj;\n\t\tlet p1, p2;\n\n\t\tlet vertices = [];\n\t\tlet normals = [];\n\t\tfor (let j = 0; j <= limit; j++) {\n\t\t\thj = j * Math.PI / limit;\n\t\t\tsj = Math.sin(hj);\n\t\t\tcj = Math.cos(hj);\n\t\t\tfor (let i = 0; i <= limit; i++) {\n\t\t\t\thi = i * 2 * Math.PI / limit;\n\t\t\t\tsi = Math.sin(hi);\n\t\t\t\tci = Math.cos(hi);\n\n\t\t\t\t// 0.77 to minimize the sphere\n\t\t\t\tvertices.push(ci * sj * 0.77); // X\n\t\t\t\tvertices.push(cj * 0.77); // Y\n\t\t\t\tvertices.push(si * sj * 0.77); // Z\n\n\t\t\t\tnormals.push(ci*sj);\n\t\t\t\tnormals.push(cj);\n\t\t\t\tnormals.push(si*sj);\n\t\t\t}\n\t\t}\n\n\t\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n\t\tpBuffer.itemSize = 3;\n\t\tpBuffer.numItems = vertices.length;\n\n\n\t\t// Indices\n\t\tlet indices = []\n\t\tlet iBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, iBuffer);\n\t\tfor (j = 0; j < limit; j++) {\n\t\t\tfor (i = 0; i < limit; i++) {\n\t\t\t\tp1 = j * (limit + 1) + i;\n\t\t\t\tp2 = p1 + (limit + 1);\n\n\t\t\t\tindices.push(p1);\n\t\t\t\tindices.push(p2);\n\t\t\t\tindices.push(p1 + 1);\n\n\t\t\t\tindices.push(p1 + 1);\n\t\t\t\tindices.push(p2);\n\t\t\t\tindices.push(p2 + 1);\n\t\t\t}\n\t\t}\n\n\t\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);\n\t\tiBuffer.itemSize = 3;\n\t\tiBuffer.numItems = indices.length;\n\n\n\t\t// Color\n\t\tlet cBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, cBuffer);\n\t\tlet colors = [];\n\n\t\tfor (let i = 0; i <= limit; i++) {\n\t\t\tfor (let j = 0; j <= limit; j++) {\n\t\t\t\tcolors.push(0);\n\t\t\t\tcolors.push(0);\n\t\t\t\tcolors.push(0.99);\n\t\t\t}\n\t\t}\n\t\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(colors), gl.STATIC_DRAW);\n\t\tcBuffer.itemSize = 3;\n\t\tcBuffer.numitems = colors.length;\n\n\n\t\t// Lines\n\t\tconst lBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, lBuffer);\n\n\t\tlet lineVertices = [\n\t\t\t0.0, 1.1, 0.0,\n\t\t\t0.0, -1.1, 0.0,\n\n\t\t\t1.1, 0.0, 0.0,\n\t\t\t-1.1, 0.0, 0.0,\n\n\t\t\t0.0, 0.0, 1.1,\n\t\t\t0.0, 0.0, -1.1\n\t\t];\n\t\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(lineVertices), gl.STATIC_DRAW);\n\t\tlBuffer.itemSize = 3;\n\t\tlBuffer.numItems = 6;\n\n\n\t\tconst liBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, liBuffer);\n\n\t\tlet lineIndices = [\n\t\t\t0, 1,\n\t\t\t2, 3,\n\t\t\t4, 5\n\t\t];\n\t\tgl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(lineIndices), gl.STATIC_DRAW);\n\t\tliBuffer.itemSize = 1;\n\t\tliBuffer.numItems = 6;\n\n\t\tconst lcBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, lcBuffer);\n\n\t\tlet lineColors = [\n\t\t\t0.0, 1.0, 0.0, 1.0,\n\t\t\t0.0, 1.0, 0.0, 1.0,\n\n\t\t\t1.0, 0.0, 0.0, 1.0,\n\t\t\t1.0, 0.0, 0.0, 1.0,\n\n\t\t\t0.0, 0.0, 1.0, 1.0,\n\t\t\t0.0, 0.0, 1.0, 1.0\n\t\t];\n\t\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(lineColors), gl.STATIC_DRAW);\n\t\tlcBuffer.itemSize = 4;\n\t\tlcBuffer.numItems = 6;\n\n\n\t\t//Create a buffer with the normals\n\t\tconst nBuffer = gl.createBuffer();\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, nBuffer);\n\t\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(normals), gl.STATIC_DRAW);\n\n\n\t\tSphere.buffers = {\n\t\t\tpBuffer: pBuffer,\n\t\t\tcBuffer: cBuffer,\n\t\t\tnBuffer: nBuffer,\n\t\t\tlBuffer: lBuffer,\n\t\t\tiBuffer: iBuffer,\n\t\t\tliBuffer: liBuffer,\n\t\t\tlcBuffer: lcBuffer,\n\t\t\tpComponents: 3,\n\t\t\tcComponents: 3,\n\t\t\tnComponents: 3,\n\t\t};\n\t}\n\n\t// Object Variables\n\tthis.lcPosition = position;\n\tthis.scale = [1, 1, 1];\n\n\tthis.mMatrix = mat4.create();\n\tthis.lcMatrix = mat4.create();\n\tthis.mMatrixInv = mat3.create();\n\tthis.selected = false;\n\tthis.global = false;\n\n\t// Object draw function\n\tthis.draw = function (gl, pMatrix, vMatrix) {\n\t\tgl.useProgram(Sphere.shaderProgram);\n\t\tgl.uniformMatrix4fv(Sphere.locations.uniform.pMatrix, false, pMatrix);\n\t\tgl.uniformMatrix4fv(Sphere.locations.uniform.mMatrix, false, this.mMatrix);\n\t\tgl.uniformMatrix4fv(Sphere.locations.uniform.wMatrix, false, wMatrix);\n\t\tgl.uniformMatrix4fv(Sphere.locations.uniform.vMatrix, false, vMatrix);\n\t\tgl.uniformMatrix3fv(Sphere.locations.uniform.mMatrixInv, false, this.mMatrixInv);\n\t\tgl.uniform3fv(Sphere.locations.uniform.pLight, lightPosition);\n\t\tgl.uniform3fv(Sphere.locations.uniform.camera, [0, -10, 0]);\n\t\tgl.uniform1f(Sphere.locations.uniform.specularEnabled, specularEnabled);\n\t\tgl.uniform1f(Sphere.locations.uniform.phong, phong);\n\t\tgl.uniform4fv(Sphere.locations.uniform.uColor, [1.0, 0.0, 0.0, 1.0]);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, Sphere.buffers.pBuffer);\n\t\tgl.vertexAttribPointer(Sphere.locations.attribute.vertPosition, Sphere.buffers.pComponents, gl.FLOAT, false, 0, 0);\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, Sphere.buffers.cBuffer);\n\t\tgl.vertexAttribPointer(Sphere.locations.attribute.vertColor, Sphere.buffers.cComponents, gl.FLOAT, false, 0, 0);\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, Sphere.buffers.nBuffer);\n\t\tgl.vertexAttribPointer(Sphere.locations.attribute.aNormal, Sphere.buffers.nComponents, gl.FLOAT, false, 0, 0);\n\n\t\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, Sphere.buffers.iBuffer);\n\t\tgl.drawElements(gl.TRIANGLES, Sphere.buffers.iBuffer.numItems, gl.UNSIGNED_SHORT, 0);\n\n\t\tgl.drawArrays(gl.TRIANGLES, 0, 18);\n\t};\n\n\n\t// Object drawLines function which are displayed as local coordinates in colors R for x, G for y and B for z axis\n\tthis.drawLines = function (gl, pMatrix) {\n\t\tgl.useProgram(Sphere.shaderProgram);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, Sphere.buffers.lBuffer);\n\t\tgl.vertexAttribPointer(Sphere.locations.attribute.vertPosition, Sphere.buffers.lBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, Sphere.buffers.lcBuffer);\n\t\tgl.vertexAttribPointer(Sphere.locations.attribute.vertColor, Sphere.buffers.lcBuffer.itemSize, gl.FLOAT, false, 0, 0);\n\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, Sphere.buffers.nBuffer);\n\t\tgl.vertexAttribPointer(Sphere.locations.attribute.aNormal, Sphere.buffers.nComponents, gl.FLOAT, false, 0, 0);\n\n\n\t\tgl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, Sphere.buffers.liBuffer);\n\t\tgl.uniformMatrix4fv(Sphere.locations.uniform.pMatrix, false, pMatrix);\n\t\tgl.uniformMatrix4fv(Sphere.locations.uniform.mMatrix, false, this.lcMatrix);\n\n\t\tgl.drawElements(gl.LINES, Sphere.buffers.liBuffer.numItems, gl.UNSIGNED_SHORT, 0);\n\t};\n\n\tthis.start = function () {\n\t\tmat4.translate(this.mMatrix, this.mMatrix, this.lcPosition);\n\t\tmat4.translate(this.lcMatrix, this.lcMatrix, this.lcPosition);\n\t};\n\n\tthis.update = function (x, y, z, position = [0, 0, 0], scale = [1, 1, 1]) {\n\t\t// Global transformations\n\t\tif (this.global) {\n\t\t\t// Move the Object to the center\n\t\t\tmat4.identity(this.mMatrix);\n\t\t\t// Transform the object\n\t\t\tmat4.scale(this.mMatrix, this.mMatrix, scale);\n\t\t\tmat4.rotateX(this.mMatrix, this.mMatrix, x);\n\t\t\tmat4.rotateY(this.mMatrix, this.mMatrix, y);\n\t\t\tmat4.rotateZ(this.mMatrix, this.mMatrix, z);\n\t\t\tmat4.translate(this.mMatrix, this.mMatrix, position);\n\n\t\t\t// Multiply with Local Coordinates to get to the right position\n\t\t\tmat4.multiply(this.mMatrix, this.mMatrix, this.lcMatrix);\n\n\t\t\t// Move Local Coordinates where the object is\n\t\t\tmat4.identity(this.lcMatrix);\n\t\t\tmat4.multiply(this.lcMatrix, this.lcMatrix, this.mMatrix);\n\t\t}\n\t\t// Local transformations\n\t\telse {\n\t\t\t// Transform Object\n\t\t\tmat4.translate(this.mMatrix, this.mMatrix, position);\n\t\t\tmat4.rotateX(this.mMatrix, this.mMatrix, x);\n\t\t\tmat4.rotateZ(this.mMatrix, this.mMatrix, z);\n\t\t\tmat4.rotateY(this.mMatrix, this.mMatrix, y);\n\t\t\tmat4.scale(this.mMatrix, this.mMatrix, scale);\n\n\t\t\t// Transform Local Coordinates\n\t\t\tmat4.translate(this.lcMatrix, this.lcMatrix, position);\n\t\t\tmat4.rotateX(this.lcMatrix, this.lcMatrix, x);\n\t\t\tmat4.rotateZ(this.lcMatrix, this.lcMatrix, z);\n\t\t\tmat4.rotateY(this.lcMatrix, this.lcMatrix, y);\n\t\t\tmat4.scale(this.lcMatrix, this.lcMatrix, scale);\n\t\t}\n\t\tmat3.normalFromMat4(this.mMatrixInv, this.mMatrix);\n\t};\n}", "title": "" }, { "docid": "b13bd8826cec94f0382710ecfbb542eb", "score": "0.55173296", "text": "function initBuffers(gl) {\n // create buffer to store objects' position\n const positionBuffer = gl.createBuffer();\n // select it to perform operations\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n // create array of positions\n const positions = [\n // front face\n -1.0, -1.0, 1.0,\n 1.0, -1.0, 1.0,\n 1.0, 1.0, 1.0,\n -1.0, 1.0, 1.0,\n // back face\n -1.0, -1.0, -1.0,\n -1.0, 1.0, -1.0,\n 1.0, 1.0, -1.0,\n 1.0, -1.0, -1.0,\n // top face\n -1.0, 1.0, -1.0,\n -1.0, 1.0, 1.0,\n 1.0, 1.0, 1.0,\n 1.0, 1.0, -1.0,\n // bottom face\n -1.0, -1.0, -1.0,\n 1.0, -1.0, -1.0,\n 1.0, -1.0, 1.0,\n -1.0, -1.0, 1.0,\n // right face\n 1.0, -1.0, -1.0,\n 1.0, 1.0, -1.0,\n 1.0, 1.0, 1.0,\n 1.0, -1.0, 1.0,\n // left face\n -1.0, -1.0, -1.0,\n -1.0, -1.0, 1.0,\n -1.0, 1.0, 1.0,\n -1.0, 1.0, -1.0,\n ];\n // pass array of positions to WebGL as a Float32Array and fill the current buffer\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(positions), gl.STATIC_DRAW);\n\n // set up normals for vertices to compute lighting\n const normalBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, normalBuffer);\n\n const vertexNormal = [\n // front\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n // back\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n // top\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n // bottom\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n // right\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n // left\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertexNormal), gl.STATIC_DRAW);\n\n // set up texture coordinates for each face\n const textureCoordBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, textureCoordBuffer);\n\n const textureCoordinates = [\n // front\n 0.0, 0.0,\n 1.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0,\n // back\n 0.0, 0.0,\n 1.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0,\n // top\n 0.0, 0.0,\n 1.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0,\n // bottom\n 0.0, 0.0,\n 1.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0,\n // right\n 0.0, 0.0,\n 1.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0,\n // left\n 0.0, 0.0,\n 1.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0,\n ];\n\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(textureCoordinates), gl.STATIC_DRAW);\n\n // build element array buffer\n const indexBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n // define each face as two triangles\n const indices = [\n 0, 1, 2, 0, 2, 3, // front\n 4, 5, 6, 4, 6, 7, // back\n 8, 9, 10, 8, 10, 11, // top\n 12, 13, 14, 12, 14, 15, // bottom\n 16, 17, 18, 16, 18, 19, // right\n 20, 21, 22, 20, 22, 23, // left\n ];\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);\n\n return {\n position: positionBuffer,\n normal: normalBuffer,\n textureCoord: textureCoordBuffer,\n indices: indexBuffer,\n };\n}", "title": "" }, { "docid": "d1687d799acfbec8aae1e7009cf58f89", "score": "0.55085975", "text": "function initVertexBuffers(gl, program) {\n var o = new Object();\n o.vertexBuffer = createEmptyArrayBuffer(gl, program.a_Position, 3, gl.FLOAT);\n o.normalBuffer = createEmptyArrayBuffer(gl, program.a_Normal, 3, gl.FLOAT);\n o.colorBuffer = createEmptyArrayBuffer(gl, program.a_Color, 4, gl.FLOAT);\n o.indexBuffer = gl.createBuffer();\n return o;\n}", "title": "" }, { "docid": "d1687d799acfbec8aae1e7009cf58f89", "score": "0.55085975", "text": "function initVertexBuffers(gl, program) {\n var o = new Object();\n o.vertexBuffer = createEmptyArrayBuffer(gl, program.a_Position, 3, gl.FLOAT);\n o.normalBuffer = createEmptyArrayBuffer(gl, program.a_Normal, 3, gl.FLOAT);\n o.colorBuffer = createEmptyArrayBuffer(gl, program.a_Color, 4, gl.FLOAT);\n o.indexBuffer = gl.createBuffer();\n return o;\n}", "title": "" }, { "docid": "3428878e481a1d03d6b20166cc39e41d", "score": "0.5501682", "text": "function init_latitude(gl) {\n let vertices = [];\n let color = [1, 0, 1];\n for (var i = 0; i <= 360; i += 10) {\n let j = (i * Math.PI) / 180;\n let vert = [0, R * Math.cos(j), R * Math.sin(j)]; // drawing a circle on the YZ plane\n vertices.push(vert[0], vert[1], vert[2]);\n vertices.push(color[0], color[1], color[2]);\n }\n\n let vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n let vbo = gl.createBuffer();\n\n gl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n\n // stride is 6, 3 for positions and 3 for the color\n gl.vertexAttribPointer(loc_aPosition, 3, gl.FLOAT, false, 4 * 6, 0); \n gl.enableVertexAttribArray(loc_aPosition);\n\n // stride is 6, offset in this case is 3 color elements are located after 3 position elements..\n gl.vertexAttribPointer(loc_aColor, 3, gl.FLOAT, false, 4 * 6, 4 * 3); \n gl.enableVertexAttribArray(loc_aColor);\n\n gl.bindVertexArray(null);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n\n return { vao, n: vertices.length / 6 }; // since it has three coordinates and colors so devide by 6\n}", "title": "" }, { "docid": "c2fe3499b261e19d6e8774e7bffd892a", "score": "0.55007255", "text": "function initShader(gl)\n{\n // load and compile the fragment and vertex shader\n let fragmentShader = createShader(gl, fragmentShaderSource, \"fragment\");\n let vertexShader = createShader(gl, vertexShaderSource, \"vertex\");\n\n // link them together into a new program\n shaderProgram = gl.createProgram();\n gl.attachShader(shaderProgram, vertexShader);\n gl.attachShader(shaderProgram, fragmentShader);\n gl.linkProgram(shaderProgram);\n\n // get pointers to the shader params\n shaderVertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"vertexPos\");\n gl.enableVertexAttribArray(shaderVertexPositionAttribute);\n\n shaderVertexColorAttribute = gl.getAttribLocation(shaderProgram, \"vertexColor\");\n gl.enableVertexAttribArray(shaderVertexColorAttribute);\n \n shaderProjectionMatrixUniform = gl.getUniformLocation(shaderProgram, \"projectionMatrix\");\n shaderModelViewMatrixUniform = gl.getUniformLocation(shaderProgram, \"modelViewMatrix\");\n\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\n alert(\"Could not initialise shaders\");\n }\n}", "title": "" }, { "docid": "a63af26c3f3c4f78d444d2ce0ded56be", "score": "0.5500555", "text": "function runBeforeInit() {\n Device_1.default.Instance.init();\n DrawEngine_1.G_DrawEngine.init(Device_1.default.Instance.gl);\n ShaderFactory_1.G_ShaderFactory.init(Device_1.default.Instance.gl);\n BufferManager_1.G_BufferManager.init(Device_1.default.Instance.gl);\n ShaderCenter_1.G_ShaderCenter.init();\n LightCenter_1.G_LightCenter.init();\n LightModel_1.G_LightModel.init();\n UiSetting_1.G_UISetting.setUI();\n}", "title": "" }, { "docid": "99b18aa1aae89c17a36cc90298c26574", "score": "0.54834694", "text": "function initVertexBuffers(gl, program) {\n var o = new Object();\n o.vertexBuffer = createEmptyArrayBuffer(gl, program.vPosition, 3, gl.FLOAT);\n o.normalBuffer = createEmptyArrayBuffer(gl, program.vNormal , 3, gl.FLOAT);\n o.colorBuffer = createEmptyArrayBuffer(gl, program.vColor, 4, gl.FLOAT);\n o.indexBuffer = gl.createBuffer();\n\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n\n return o;\n}", "title": "" }, { "docid": "a68d74770ef401ca76ac6e244fa8a4d1", "score": "0.54787326", "text": "function initShaders() {\r\n var fragmentShader = getShader(gl, \"shader-fs\");\r\n var vertexShader = getShader(gl, \"shader-vs\");\r\n\r\n // Create the shader program\r\n shaderProgram = gl.createProgram();\r\n gl.attachShader(shaderProgram, vertexShader);\r\n gl.attachShader(shaderProgram, fragmentShader);\r\n gl.linkProgram(shaderProgram);\r\n\r\n // If creating the shader program failed, alert\r\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\r\n alert(\"Unable to initialize the shader program.\");\r\n }\r\n\r\n // start using shading program for rendering\r\n gl.useProgram(shaderProgram);\r\n\r\n // store location of aVertexPosition variable defined in shader\r\n shaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"aVertexPosition\");\r\n\r\n // turn on vertex position attribute at specified position\r\n gl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);\r\n\r\n // store location of aVertexNormal variable defined in shader\r\n shaderProgram.textureCoordAttribute = gl.getAttribLocation(shaderProgram, \"aTextureCoord\");\r\n\r\n // store location of aTextureCoord variable defined in shader\r\n gl.enableVertexAttribArray(shaderProgram.textureCoordAttribute);\r\n\r\n // store location of uPMatrix variable defined in shader - projection matrix\r\n shaderProgram.pMatrixUniform = gl.getUniformLocation(shaderProgram, \"uPMatrix\");\r\n // store location of uMVMatrix variable defined in shader - model-view matrix\r\n shaderProgram.mvMatrixUniform = gl.getUniformLocation(shaderProgram, \"uMVMatrix\");\r\n // store location of uSampler variable defined in shader\r\n shaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\");\r\n}", "title": "" }, { "docid": "f2fb910c6f6f9706d2aea7d044be6d16", "score": "0.5471234", "text": "function initBuffers() {\n\n\t// Vertex Coordinates\n\n\ttriangleVertexPositionBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexPositionBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n\ttriangleVertexPositionBuffer.itemSize = 3;\n\ttriangleVertexPositionBuffer.numItems = vertices.length / 3;\n\n\t// Associating to the vertex shader\n\n\tgl.vertexAttribPointer(shaderProgram.vertexPositionAttribute,\n\t\ttriangleVertexPositionBuffer.itemSize,\n\t\tgl.FLOAT, false, 0, 0);\n\n\t// Vertex Normal Vectors\n\n\ttriangleVertexNormalBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexNormalBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(normals), gl.STATIC_DRAW);\n\ttriangleVertexNormalBuffer.itemSize = 3;\n\ttriangleVertexNormalBuffer.numItems = normals.length / 3;\n\n\t// Associating to the vertex shader\n\n\tgl.vertexAttribPointer(shaderProgram.vertexNormalAttribute,\n\t\ttriangleVertexNormalBuffer.itemSize,\n\t\tgl.FLOAT, false, 0, 0);\n}", "title": "" }, { "docid": "0c0e5271bc1586cefe770d0390c34c8b", "score": "0.54575163", "text": "function setupDraw() {\n // Stop the 3D view from rendering\n continueRender = 0;\n //Check to see if Draw setup has already been run\n if(startupDraw == 1)\n {\n // Check if View mode has been run, if it has then we remove View Mode's listeners\n if(startupView == 0)\n {\n\n }\n canvas.onmousemove = null;\n canvas.onmousedown = null;\n window.onmouseup = null;\n\n //setup click and drag listeners\n canvas.addEventListener(\"mousedown\", checkPoint, false);\n canvas.addEventListener(\"mousemove\", movePoint, false);\n canvas.addEventListener(\"mouseup\", endMove, false);\n\n document.getElementById(\"demo\").innerHTML = \"Draw Mode\";\n\n // This will enable the correct menu for draw mode\n document.getElementById(\"drawMenu\").style.display = \"block\";\n document.getElementById(\"viewMenu\").style.display = \"none\";\n gl.enable(gl.DEPTH_TEST);\n \n // Load shaders\n programId = initShaders(gl, \"2d-vertex-shader\", \"2d-fragment-shader\");\n \n // ######Create vertex buffer objects --- ADD CODE HERE #######\n var positionAttributeLocation = gl.getAttribLocation(programId, \"a_position\");\n var resolutionUniformLocation = gl.getUniformLocation(programId, \"u_resolution\");\n colorLocation = gl.getUniformLocation(programId, \"u_color\");\n \n //setup buffer for control points line and bezier curve\n var positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\n //tell atribute how to get data out of it, first turn the attribute on\n gl.enableVertexAttribArray(positionAttributeLocation);\n //specify how to pull the data out\n var size = 2; // 2 components per iteration\n var type = gl.FLOAT; // the data is 32bit floats\n var normalize = false; // don't normalize the data\n var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position\n var offset = 0; // start at the beginning of the buffer\n gl.vertexAttribPointer(\n positionAttributeLocation, size, type, normalize, stride, offset)\n\n\n gl.useProgram(programId);\n // set the resolution so we use pixels instead of default 0 to 1\n gl.uniform2f(resolutionUniformLocation, gl.canvas.width, gl.canvas.height);\n\n // Ensure OpenGL viewport is resized to match canvas dimensions\n gl.viewportWidth = canvas.width;\n gl.viewportHeight = canvas.height;\n gl.lineWidth(1);\n\n // Set screen clear color to R, G, B, alpha; where 0.0 is 0% and 1.0 is 100%\n gl.clearColor(0.8, 0.8, 0.8, 1.0);\n \n // Enable color; required for clearing the screen\n gl.clear(gl.COLOR_BUFFER_BIT);\n startupDraw = 0;\n drawMethod();\n }\n else {\n drawMethod();\n }\n} // End of setupDraw()", "title": "" }, { "docid": "f7f695d6624dc99e748a7b91150a1f61", "score": "0.54548436", "text": "function initShaders() {\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vertexShader, VERTEX_SHADER_SOURCE);\n gl.compileShader(vertexShader);\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fragmentShader, FRAGMENT_SHADER_SOURCE);\n gl.compileShader(fragmentShader);\n\n // Create the shader program\n shaderProgram = gl.createProgram();\n gl.attachShader(shaderProgram, vertexShader);\n gl.attachShader(shaderProgram, fragmentShader);\n gl.linkProgram(shaderProgram);\n\n // If creating the shader program failed, alert\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\n throw new Error('Unable to initialize the shader program!');\n }\n\n gl.useProgram(shaderProgram);\n\n vertexPositionAttribute = gl.getAttribLocation(shaderProgram, 'aVertexPosition');\n gl.enableVertexAttribArray(vertexPositionAttribute);\n\n textureCoordAttribute = gl.getAttribLocation(shaderProgram, 'aTextureCoord');\n gl.enableVertexAttribArray(textureCoordAttribute);\n}", "title": "" }, { "docid": "7e40f69c95a1fea93f6d57c4837a2961", "score": "0.54341626", "text": "function init() \n{\n resize();\n var shaderProgram = createMapShaders();\n getGeoLocation(function(position) \n {\n OsmMaps.data.getPointsWithPosition(shaderProgram, position, function(shaderProgram, position, data) \n {\n drawMap(shaderProgram, position, data);\n });\n });\n}", "title": "" }, { "docid": "e0e861dba7dff18cf42a0cfe7f3213f4", "score": "0.5434027", "text": "function initBuffers(gl) {\n\n // Create a buffer for the square's positions.\n\n const positionBuffer = gl.createBuffer();\n\n // Select the positionBuffer as the one to apply buffer\n // operations to from here out.\n\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\n // Now create an array of positions for the square.\n\n const positions = [\n ];\n\n const I = scope.N;\n const J = scope.N;\n\tconst {sin, cos} = Math;\n\n for (let i = 0; i < I; i++)\n for (let j = 0; j < J; j++)\n {\n\tconst phi = x => x / I * Math.PI * 2;\n\tconst theta = x => x / J * Math.PI - Math.PI/2;\n//\tconst X = (p, t) => cos(phi(p)) * cos(theta(t));\n//\tconst Y = (p, t) => sin(phi(p)) * cos(theta(t));\n//\tconst Z = (p, t) => sin(theta(t));\n\tconst pushPoint = (p, t) => {\n\t\t//positions.push(X(p, t), Y(p, t), Z(p, t));\n\t\tpositions.push(phi(p), theta(t));\n\t};\n\n\tpushPoint(i, j);\n\tpushPoint(i+1, j+1);\n\tpushPoint(i+1, j);\n\tpushPoint(i, j);\n\tpushPoint(i, j+1);\n\tpushPoint(i+1, j+1);\n }\n\n // Now pass the list of positions into WebGL to build the\n // shape. We do this by creating a Float32Array from the\n // JavaScript array, then use it to fill the current buffer.\n\n gl.bufferData(gl.ARRAY_BUFFER,\n new Float32Array(positions),\n gl.STATIC_DRAW);\n\n return {\n position: positionBuffer,\n };\n}", "title": "" }, { "docid": "29a5d078d2e19847275648751db9f6af", "score": "0.54295707", "text": "function initShaders() {\n var fragmentShader = getShader(gl, \"shader-fs\");\n var vertexShader = getShader(gl, \"shader-vs\");\n \n // Create the shader program\n shaderProgram = gl.createProgram();\n gl.attachShader(shaderProgram, vertexShader);\n gl.attachShader(shaderProgram, fragmentShader);\n gl.linkProgram(shaderProgram);\n \n // If creating the shader program failed, alert\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\n alert(\"Unable to initialize the shader program.\");\n }\n \n // start using shading program for rendering\n gl.useProgram(shaderProgram);\n \n // store location of aVertexPosition variable defined in shader\n shaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"aVertexPosition\");\n \n // turn on vertex position attribute at specified position\n gl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);\n\n // store location of aTextureCoord variable defined in shader\n shaderProgram.textureCoordAttribute = gl.getAttribLocation(shaderProgram, \"aTextureCoord\");\n\n // turn on vertex texture coordinates attribute at specified position\n gl.enableVertexAttribArray(shaderProgram.textureCoordAttribute);\n\n // store location of uPMatrix variable defined in shader - projection matrix \n shaderProgram.pMatrixUniform = gl.getUniformLocation(shaderProgram, \"uPMatrix\");\n // store location of uMVMatrix variable defined in shader - model-view matrix \n shaderProgram.mvMatrixUniform = gl.getUniformLocation(shaderProgram, \"uMVMatrix\");\n\n // store location of uSampler variable defined in shader\n shaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\");\n}", "title": "" }, { "docid": "51444886d6408775ced5473835b81f4b", "score": "0.542604", "text": "initBuffer() {\n\t\tlet data = this.model.mesh.concat(this.model.normals).concat(this.model.texCoord)\n\n\t\tgl.useProgram(program)\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, this.vbo)\n\t\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW)\n\t}", "title": "" }, { "docid": "77fc985f5e0ffbdc77e42db5ac24d327", "score": "0.53943443", "text": "function initShaders( )\n{\n\n var fragmentShader = getShader( gl, \"shader-fs\" );\n var vertexShader = getShader( gl, \"shader-vs\" );\n\n shaderProgram = gl.createProgram( );\n gl.attachShader( shaderProgram, vertexShader );\n gl.attachShader( shaderProgram, fragmentShader );\n gl.linkProgram( shaderProgram );\n\n if ( !gl.getProgramParameter( shaderProgram, gl.LINK_STATUS ) )\n {\n\n console.error( \"Could not initialize shaders.\" );\n\n }\n\n gl.useProgram( shaderProgram );\n\n // Acquire handles to shader program variables in order to pass data to the shaders.\n\n shaderProgram.vertexPositionAttribute = gl.getAttribLocation( shaderProgram, \"aVertexPosition\" );\n gl.enableVertexAttribArray( shaderProgram.vertexPositionAttribute );\n\n shaderProgram.vertexColorAttribute = gl.getAttribLocation( shaderProgram, \"aVertexColor\" );\n gl.enableVertexAttribArray( shaderProgram.vertexColorAttribute );\n\n shaderProgram.vertexNormalAttribute = gl.getAttribLocation( shaderProgram, \"aVertexNormal\" );\n gl.enableVertexAttribArray( shaderProgram.vertexNormalAttribute );\n\n shaderProgram.pMatrixUniform = gl.getUniformLocation( shaderProgram, \"uPMatrix\" );\n shaderProgram.mvMatrixUniform = gl.getUniformLocation( shaderProgram, \"uMVMatrix\" );\n shaderProgram.nMatrixUniform = gl.getUniformLocation( shaderProgram, \"uNMatrix\" );\n\n shaderProgram.ambientColorUniform = gl.getUniformLocation( shaderProgram, \"uAmbientColor\" );\n shaderProgram.pointLightLocationUniform = gl.getUniformLocation( shaderProgram, \"uPointLightLocation\" );\n shaderProgram.pointLightColorUniform = gl.getUniformLocation( shaderProgram, \"uPointLightColor\" );\n shaderProgram.screenSizeUniform = gl.getUniformLocation( shaderProgram, \"uSreenSize\" );\n\n}", "title": "" }, { "docid": "6023e3859debdc59632fa56ba236c65a", "score": "0.5376424", "text": "constructor() {\n\n this.buffered = false;\n this.program = null;\n this.buffer = null;\n this.vertices = null;\n\n this.color = [0, 0, 0, 1];\n\n this.loc = {\n x: 0,\n y: 0,\n z: 0\n };\n\n this.size = {\n width: 1,\n height: 1\n };\n\n this.rotation = {\n x: 0,\n y: 0,\n z: 0\n };\n\n\n }", "title": "" }, { "docid": "828b21d30f7b78d34e295fbb6d0515a5", "score": "0.5367307", "text": "function initProgram(id) {\n var programShader = gl.createProgram();\n var vert = compileShader(id + \"-vs\");\n var frag = compileShader(id + \"-fs\");\n gl.attachShader(programShader, vert);\n gl.attachShader(programShader, frag);\n gl.linkProgram(programShader);\n if (!gl.getProgramParameter(programShader, gl.LINK_STATUS)) {\n alert(gl.getProgramInfoLog(programShader));\n return null;\n }\n return programShader;\n}", "title": "" }, { "docid": "bf576cf10b914f9ff7622cbb4f7cac90", "score": "0.536703", "text": "function start(gl) {\r\n // retrieve <canvas> element\r\n var canvas = document.getElementById('webgl');\r\n // initialize shaders\r\n if (!initShaders(gl, VSHADER_SOURCE, FSHADER_SOURCE)) {\r\n console.log('Failed to intialize shaders.');\r\n return;\r\n }\r\n // Get the storage location of a_Position\r\n var a_Position = gl.getAttribLocation(gl.program, 'a_Position');\r\n if (a_Position < 0) {\r\n console.log('Failed to get the storage location of a_Position');\r\n return;\r\n }\r\n const rotateAlongY = document.getElementById('rotateAlongY') \r\n const shiftX = document.getElementById('shiftX')\r\n const shiftY = document.getElementById('shiftY')\r\n const newview = document.getElementById('newview')\r\n const nearplane = document.getElementById('nearplane')\r\n const orthomd = document.getElementById('orthomd')\r\n canvas.onmousedown = function(ev){ leftclick(ev, gl, canvas, a_Position); };\r\n canvas.onmousemove = function(ev){ move(ev, gl, canvas, a_Position); };\r\n canvas.oncontextmenu = function(ev){ rightclick(ev, gl, canvas, a_Position); };\r\n\r\n shiftX.onclick = function(ev){ shift(ev, gl, canvas, a_Position); };\r\n shiftY.onclick = function(ev){ shiftdown(ev, gl, canvas, a_Position); };\r\n rotateAlongY.onclick = function(ev){ rotateY(ev, gl, canvas, a_Position); };\r\n newview.onclick = function(ev){ rotateCam(ev, gl, canvas, a_Position); };\r\n nearplane.oninput = function(ev){ adjustNear(ev, gl, canvas, a_Position,nearplane); };\r\n orthomd.onclick = function(ev){ toggleortho(ev, gl, canvas, a_Position); };\r\n\r\n // specify the color for clearing <canvas>\r\n gl.clearColor(0, 0, 0, 1);\r\n // clear <canvas>\r\n // Clear color and depth buffer\r\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\r\n // generalized cylinder 1 \r\n let init = []\r\n init.push(1)\r\n init.push(0)\r\n init.push(0)\r\n init.push(0)\r\n init.push(0)\r\n init.push(-1)\r\n init.push(1)\r\n init.push(-1)\r\n init.push(0.4)\r\n init.push(-0.5)\r\n oldlines.push(init)\r\n\r\n //generalized cylinder 2\r\n let init2 = []\r\n init2.push (-0.5)\r\n init2.push (-0.2)\r\n init2.push (-0.9)\r\n init2.push (-0.2)\r\n init2.push (-0.9)\r\n init2.push (-0.7)\r\n init2.push (-0.5)\r\n init2.push (-0.7)\r\n oldlines.push(init2)\r\n\r\n //generalized cylinder 3\r\n let init3 = []\r\n init3.push (-0.9)\r\n init3.push (0.5)\r\n init3.push (-0.9)\r\n init3.push (0.9)\r\n init3.push (-0.1)\r\n init3.push (0.9)\r\n oldlines.push(init3)\r\n\r\n\r\n //generalized cylinder 4\r\n let init4 = []\r\n init4.push (-0.4)\r\n init4.push (0.0)\r\n init4.push (-0.4)\r\n init4.push (0.2)\r\n oldlines.push(init4)\r\n\r\n for (var i =0 ; i < oldlines.length; i++){\r\n highlighted.push(0)\r\n thinking.push(0)\r\n }\r\n // draw all finished cylinder \r\n drawAllCylinders(gl,canvas,a_Position)\r\n}", "title": "" }, { "docid": "692426eece7bd38ec6f41c045af12112", "score": "0.5353291", "text": "function initColors(gl, cylinderProgram) {\n gl.useProgram(cylinderProgram);\n var vertexcolors = new Float32Array(colors);\n // Create a buffer object\n var colorbuffer = gl.createBuffer();\n if (!colorbuffer) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n // Write the vertex coordinates and color to the buffer object\n gl.bindBuffer(gl.ARRAY_BUFFER, colorbuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vertexcolors, gl.STATIC_DRAW);\n gl.vertexAttribPointer(cylinderProgram.a_Color, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(cylinderProgram.a_Color);\n}", "title": "" }, { "docid": "773f1a7d93da8d9e319a5d09023d85fc", "score": "0.53420854", "text": "function declarePositions() {\n positions = [\n new Position(\"u_a1\", \"A1\", [t1]),\n new Position(\"u_a2\", \"A2\", [t1]),\n new Position(\"u_b\", \"B\", [t2]),\n new Position(\"u_c\", \"C\", [t1, t2]),\n new Position(\"u_d\", \"D\", [t1, t4]),\n new Position(\"u_e\", \"E\", [t4]),\n new Position(\"u_f1\", \"F1\", [t5]),\n new Position(\"u_f2\", \"F2\", [t5]),\n new Position(\"u_g\", \"G\", [t2, t5]),\n new Position(\"u_h\", \"H\", [t1, t2, t3]),\n new Position(\"u_i\", \"I\", [t1, t3, t4]),\n new Position(\"u_j\", \"J\", [t4, t9]),\n new Position(\"u_k1\", \"K1\", [t9]),\n new Position(\"u_k2\", \"K2\", [t9]),\n new Position(\"u_l\", \"L\", [t2, t5, t6]),\n new Position(\"u_m\", \"M\", [t2, t3, t6]),\n new Position(\"u_n\", \"N\", [t3, t4, t8]),\n new Position(\"u_o\", \"O\", [t4, t8, t9]),\n new Position(\"u_p\", \"P\", [t5, t10]),\n new Position(\"u_q\", \"Q\", [t5, t6, t10]),\n new Position(\"u_r\", \"R\", [t3, t6, t7]),\n new Position(\"u_s\", \"S\", [t3, t7, t8]),\n new Position(\"u_t\", \"T\", [t8, t9, t14]),\n new Position(\"u_u\", \"U\", [t9, t14]),\n new Position(\"u_v\", \"V\", [t10]),\n new Position(\"u_w\", \"W\", [t6, t10, t11]),\n new Position(\"u_x\", \"X\", [t6, t7, t11]),\n new Position(\"u_y\", \"Y\", [t7, t8, t13]),\n new Position(\"u_z\", \"Z\", [t8, t13, t14]),\n new Position(\"l_a\", \"a\", [t14]),\n new Position(\"l_b\", \"b\", [t10, t15]),\n new Position(\"l_c\", \"c\", [t10, t11, t15]),\n new Position(\"l_d\", \"d\", [t7, t11, t12]),\n new Position(\"l_e\", \"e\", [t7, t12, t13]),\n new Position(\"l_f\", \"f\", [t13, t14, t19]),\n new Position(\"l_g\", \"g\", [t14, t19]),\n new Position(\"l_h1\", \"h1\", [t15]),\n new Position(\"l_h2\", \"h2\", [t15]),\n new Position(\"l_i\", \"i\", [t11, t15, t16]),\n new Position(\"l_j\", \"j\", [t11, t12, t16]),\n new Position(\"l_k\", \"k\", [t12, t13, t18]),\n new Position(\"l_l\", \"l\", [t13, t18, t19]),\n new Position(\"l_m1\", \"m1\", [t19]),\n new Position(\"l_m2\", \"m2\", [t19]),\n new Position(\"l_n\", \"n\", [t15, t16]),\n new Position(\"l_o\", \"o\", [t12, t16, t17]),\n new Position(\"l_p\", \"p\", [t12, t17, t18]),\n new Position(\"l_q\", \"q\", [t18, t19]),\n new Position(\"l_r\", \"r\", [t16]),\n new Position(\"l_s\", \"s\", [t16, t17]),\n new Position(\"l_t\", \"t\", [t17, t18]),\n new Position(\"l_u\", \"u\", [t18]),\n new Position(\"l_v1\", \"v1\", [t17]),\n new Position(\"l_v2\", \"v2\", [t17])]\n}", "title": "" }, { "docid": "e3c326479c766ddfa0642e6ebd290ed3", "score": "0.5338659", "text": "setModeNumber( newModeNumber )\n\t{\n\t\tlogger( \"----->PARTCLE MODE: \", newModeNumber );\n\t\tthis.p.modeNumber = newModeNumber;\n\t\tswitch( newModeNumber )\n\t\t{\n\t\t\tcase 0: // DISABLE\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\tthis.p.maxParticles = 0;\n\t\t\t\tthis.p.disable();\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\tbreak;\n\n\t\t\tcase 3: // ORIGINAL GOLD FLOATING OBJECTS\n\t\t\t\tthis.p.maxParticles = 55;\n\t\t\t\tthis.p.launchPositionX = -1.0; // <--------\n\t\t\t\t//this.p.launchPositionX = 0.0; // DEBUG!\n\t\t\t\tthis.p.launchPositionY = 0.0;\n\t\t\t\tthis.p.launchVarianceX = 0.0;\n\t\t\t\tthis.p.launchVarianceY = 0.5;\n\t\t\t\tthis.p.minimumLaunchDistance = 1.35;\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\tthis.p.spawnDelayMSec = 300.0;\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = 0.0002;\n\t\t\t\tthis.p.ySpeed = 0.0;\n\t\t\t\tthis.p.r1Value = 0.04;\n\t\t\t\tthis.p.t1Speed = 0.524;\n \t\tthis.p.t1StartPosition = 0.0;\n\t\t\t\tthis.p.r2Value = 0.0;\n\t\t\t\tthis.p.t2Speed = 0.0;\n \t\tthis.p.t2StartPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\tthis.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\tthis.p.materialNumber = 0;\n\t\t\t\tthis.p.currentSize = 1.0;\n\t\t\t\tthis.p.targetSizeRate = 0.001;\n\t\t\t\tthis.p.targetSize = 1.0;\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\tthis.p.wind.setDirection( 0.5, 0.0, 0.2, 0.7 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 15000 );\n\t\t\t\tbreak;\n\n\t\t\tcase 2: // ROTATING OBJECTS\n\t\t\t\tthis.p.maxParticles = 40;\n\t\t\t\tthis.p.launchPositionX = -0.8;\n\t\t\t\tthis.p.launchPositionY = 0.0;\n\t\t\t\tthis.p.launchVarianceX = 0.0;\n\t\t\t\tthis.p.launchVarianceY = 0.0;\n\t\t\t\tthis.p.minimumLaunchDistance = 0.0;\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\tthis.p.spawnDelayMSec = 200.0;\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = 0.0007;\n\t\t\t\tthis.p.ySpeed = 0.0;\n\t\t\t\tthis.p.r1Value = 1.8;\n\t\t\t\tthis.p.t1Speed = 0.04;\n \t\tthis.p.t1StartPosition = 2.1;\n\t\t\t\tthis.p.r2Value = 0.0;\n\t\t\t\tthis.p.t2Speed = 0.0;\n \t\tthis.p.t2StartPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\tthis.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\tthis.p.materialNumber = 4;\n\t\t\t\tthis.p.currentSize = 0.3;\n\t\t\t\tthis.p.targetSize = 0.3;\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\tthis.p.wind.setDirection( 0.0, 0.0, 0.4, 0.4 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 5000 );\n\t\t\t\tbreak;\n\n\t\t\tcase 1: // TINY BUBBLES\n\t\t\t\tthis.p.maxParticles = 200;\n\t\t\t\tthis.p.launchPositionX = 0.0;\n\t\t\t\tthis.p.launchPositionY = -0.5;\n\t\t\t\tthis.p.launchVarianceX = 1.0;\n\t\t\t\tthis.p.launchVarianceY = 0.0;\n\t\t\t\tthis.p.minimumLaunchDistance = 0.1;\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\t//this.p.spawnDelayMSec = 20.0; // <---- ORIGINAL\n\t\t\t\tthis.p.spawnDelayMSec = 40.0;\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = 0.0000;\n\t\t\t\tthis.p.ySpeed = 0.0015;\n\t\t\t\tthis.p.r1Value = 0.5;\n\t\t\t\tthis.p.t1Speed = 0.04;\n \t\tthis.p.t1StartPosition = 0.0;\n\t\t\t\tthis.p.r2Value = 0.0;\n\t\t\t\tthis.p.t2Speed = 0.0;\n \t\tthis.p.t2StartPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\tthis.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\tthis.p.materialNumber = 1;\n\t\t\t\tthis.p.targetSizeRate = 0.000001;\n\t\t\t\tthis.p.targetSize = 0.09;\n\t\t\t\t//this.p.targetSize = 0.09; // <--- ORIGINAL\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\tthis.p.wind.setDirection( 0.0, -1.0, 1.0, 0.0 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 10000 );\n\t\t\t\tbreak;\n\n\t\t\tcase 4: // SPHERE BLOB WITH CUBE CAMERA\n\t\t\t\tthis.p.maxParticles = 8;\n\t\t\t\tthis.p.launchPositionX = 0.0;\n\t\t\t\tthis.p.launchPositionY = 0.0;\n\t\t\t\tthis.p.launchVarianceX = 0.0;\n\t\t\t\tthis.p.launchVarianceY = 0.0;\n\t\t\t\tthis.p.minimumLaunchDistance = 1.0;\n\t\t\t\tthis.p.cubeCameraEnabled = true;\n\t\t\t\tthis.p.spawnDelayMSec = 400.0;\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = 0.0;\n\t\t\t\tthis.p.ySpeed = 0.0;\n\t\t\t\tthis.p.r1Value = 1.7;\n\t\t\t\tthis.p.t1Speed = 0.02;\n\t \t\tthis.p.t1StartPosition = 0.0;\n\t\t\t\tthis.p.r2Value = 0.0;\n\t\t\t\tthis.p.t2Speed = 0.0;\n \t\tthis.p.t2StartPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\t//this.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\tthis.p.meshMode = MeshMode.SPHERES;\n\t\t\t\tthis.p.materialNumber = 3;\n\t\t\t\tthis.p.currentSize = 0.0;\n\t\t\t\tthis.p.targetSizeRate = 0.00005;\n\t\t\t\tthis.p.targetSize = 1.70;\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\tthis.p.wind.setDirection( 0.0, 0.0, 0.5, 0.5 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 10000 );\n\t\t\t\tbreak;\n\n\t\t\tcase 5: // LIGHTS\n\t\t\t\tthis.p.maxParticles = 50;\n\t\t\t\tthis.p.launchPositionX = 0.7;\n\t\t\t\tthis.p.launchPositionY = 0.0;\n\t\t\t\tthis.p.launchVarianceX = 0.0;\n\t\t\t\tthis.p.launchVarianceY = 0.8;\n\t\t\t\tthis.p.minimumLaunchDistance = 1.0;\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\tthis.p.spawnDelayMSec = 300.0;\n\t\t\t\t//this.p.spawnDelayMSec = 1500.0;\n\t\t\t\t//this.p.spawnDelayMSec = 2300.0; // <-------------\n\t\t\t\t//this.p.spawnDelayMSec = 4300.0;\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = -0.002;\n\t\t\t\tthis.p.ySpeed = 0.0000;\n\t\t\t\tthis.p.r1Value = 0.5;\n\t\t\t\tthis.p.t1Speed = 0.05; //<------------\n\t\t\t\t//this.p.t1Speed = 0.06;\n\t \t\tthis.p.t1StartPosition = 3.14/4;\n\t\t\t\tthis.p.r2Value = 0.3;\n\t\t\t\tthis.p.t2Speed = 0.1;\n \t\tthis.p.t2StartPosition = 3.14/4;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = true;\n\t\t\t\t//this.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\tthis.p.meshMode = MeshMode.SPHERES;\n\t\t\t\tthis.p.materialNumber = 5;\n\t\t\t\tthis.p.currentSize = 0.10;\n\t\t\t\tthis.p.targetSizeRate = 0.0001;\n\t\t\t\tthis.p.targetSize = 0.10;\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\tthis.p.wind.setDirection( 0.0, 0.0, 0.3, 0.3 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 10000 );\n\t\t\t\tbreak;\n\n\t\t\tcase 6: // WHILRING OBJECTS\n\t\t\t\tthis.p.maxParticles = 200;\n\t\t\t\tthis.p.launchPositionX = 0.0;\n\t\t\t\tthis.p.launchPositionY = 0.0;\n\t\t\t\tthis.p.launchVarianceX = 0.0;\n\t\t\t\tthis.p.launchVarianceY = 0.0;\n\t\t\t\tthis.p.minimumLaunchDistance = 0.5;\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\tthis.p.spawnDelayMSec = 100.0;\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = 0.0;\n\t\t\t\tthis.p.ySpeed = 0.0;\n\t\t\t\tthis.p.r1Value = 1.7;\n\t\t\t\tthis.p.t1Speed = 0.007;\n\t \t\tthis.p.t1StartPosition = 0.0;\n\t\t\t\tthis.p.r2Value = 0.6;\n\t\t\t\tthis.p.t2Speed = 0.09;\n \t\tthis.p.t2StartPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\tthis.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\t//this.p.meshMode = MeshMode.TORRUS_KNOT;\n\t\t\t\t//this.p.meshMode = MeshMode.SPHERES;\n\t\t\t\tthis.p.materialNumber = 0;\n\t\t\t\tthis.p.currentSize = 0.01;\n\t\t\t\tthis.p.targetSizeRate = 0.00002;\n\t\t\t\tthis.p.targetSize = 0.19;\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\t//this.p.wind.disable(); // DEBUG!!!!!!!!\n\t\t\t\tthis.p.wind.setDirection( 0.0, 0.06, 0.7, 0.7 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 1000 );\n\t\t\t\tbreak;\n\n\t\t\tcase 7: // BLACK SHAPES\n\t\t\t\tthis.p.maxParticles = 55;\n\t\t\t\tthis.p.launchPositionX = 0.0; // <--------\n\t\t\t\t//this.p.launchPositionX = 0.0; // DEBUG!\n\t\t\t\tthis.p.launchPositionY = -1.0;\n\t\t\t\tthis.p.launchVarianceX = 0.5;\n\t\t\t\tthis.p.launchVarianceY = 0.0;\n\t\t\t\tthis.p.minimumLaunchDistance = 2.35;\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\tthis.p.spawnDelayMSec = 1300.0;\n\t\t\t\tthis.p.zPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = 0.0;\n\t\t\t\tthis.p.ySpeed = 0.0002;\n\t\t\t\tthis.p.r1Value = 0.02;\n\t\t\t\tthis.p.t1Speed = 0.0524;\n \t\tthis.p.t1StartPosition = 0.0;\n\t\t\t\tthis.p.r2Value = 0.0;\n\t\t\t\tthis.p.t2Speed = 0.0;\n \t\tthis.p.t2StartPosition = 0.0;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\tthis.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\tthis.p.materialNumber = 2;\n\t\t\t\tthis.p.currentSize = 2.0;\n\t\t\t\tthis.p.targetSizeRate = 0.001;\n\t\t\t\tthis.p.targetSize = 2.0;\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\tthis.p.wind.setDirection( 0.0, 0.0, 0.5, 0.5 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 15000 );\n\t\t\t\tbreak;\n\n\t\t\tcase 8: // WHITE POOL BALLS\n\t\t\t\tthis.p.maxParticles = 55;\n\t\t\t\tthis.p.launchPositionX = 0.9; // <--------\n\t\t\t\t//this.p.launchPositionX = 0.0; // DEBUG!\n\t\t\t\tthis.p.launchPositionY = 0.0;\n\t\t\t\tthis.p.launchVarianceX = 0.0;\n\t\t\t\tthis.p.launchVarianceY = 0.5;\n\t\t\t\tthis.p.minimumLaunchDistance = 1.35;\n\t\t\t\tthis.p.cubeCameraEnabled = false;\n\t\t\t\tthis.p.spawnDelayMSec = 300.0;\n\t\t\t\tthis.p.zPosition = 0.5;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.xSpeed = -0.0005;\n\t\t\t\tthis.p.ySpeed = 0.0;\n\t\t\t\tthis.p.r1Value = 0.04;\n\t\t\t\tthis.p.t1Speed = 0.09;\n \t\tthis.p.t1StartPosition = 3.14/4;\n\t\t\t\tthis.p.r2Value = 0.05;\n\t\t\t\tthis.p.t2Speed = 0.10;\n \t\tthis.p.t2StartPosition = 3.14/4;\n\t\t\t\t// ~ - ~ - ~ - ~ -\n\t\t\t\tthis.p.lightSourceEnabled = false;\n\t\t\t\tthis.p.meshMode = MeshMode.SPHERES;\n\t\t\t\t//this.p.meshMode = MeshMode.CONES_CUBES_SPHERES;\n\t\t\t\tthis.p.materialNumber = 7;\n\t\t\t\tthis.p.currentSize = 0.8;\n\t\t\t\tthis.p.targetSizeRate = 0.001;\n\t\t\t\tthis.p.targetSize = 0.8;\n\t\t\t\tthis.p.wind.enable();\n\t\t\t\tthis.p.wind.setDirection( 0.5, 0.0, 0.2, 0.7 );\n\t\t\t\tthis.p.wind.setIntervalMSec( 15000 );\n\t\t\t\tbreak;\n\n\t\t}\n\t}", "title": "" }, { "docid": "2abb601c4ffec36c003608c154fc7089", "score": "0.5327654", "text": "function init_equator(gl) {\n let vertices = [];\n let color = [1, 0, 1];\n // push 36 vertices to make a circle\n for (var i = 0; i <= 360; i += 10) {\n // Degree to radian\n let j = (i * Math.PI) / 180;\n let vert = [R * Math.cos(j), 0, R * Math.sin(j)]; // drawing a circle at the XZ plane since it has to be an equator for the cube...\n vertices.push(vert[0], vert[1], vert[2]); // push the vertices\n vertices.push(color[0], color[1], color[2]); // set the color\n }\n\n // VAO first\n let vao = gl.createVertexArray();\n // Bind VAO\n gl.bindVertexArray(vao);\n // Make VBO for the vertices and colors\n let vbo = gl.createBuffer();\n\n // Bind and upload the data.\n gl.bindBuffer(gl.ARRAY_BUFFER, vbo);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n\n\n // takes 3 elements and the whole data set is sizeof(float) * the size of vertices array(6)\n // stride is 6, 3 for positions and 3 for the color\n // pass data to the shader program.\n gl.vertexAttribPointer(loc_aPosition, 3, gl.FLOAT, false, 4 * 6, 0); \n gl.enableVertexAttribArray(loc_aPosition);\n \n // takes 3 elements and the whole data set is sizeof(float) * the size of vertices array(6)\n // stride is 6, offset is 3 this is because 3 color elements are located after 3 position elements..\n gl.vertexAttribPointer(loc_aColor, 3, gl.FLOAT, false, 4 * 6, 4 * 3); \n gl.enableVertexAttribArray(loc_aColor);\n\n // Unbind VAO\n gl.bindVertexArray(null);\n // Unbind VBO\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n\n return { vao, n: vertices.length / 6 }; // since it has three coordinates and three color values so devide by 6\n}", "title": "" }, { "docid": "a6b9efaf074650a9a3b742555725afd4", "score": "0.5326198", "text": "function initBuffers() {\n\n var vertices,\n textureCoords,\n vertexIndices,\n _w = t.tex.image.width / inst.parent.w,\n _h = t.tex.image.height / inst.parent.h;\n\n vertexPositionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexPositionBuffer);\n vertices = [\n _w, _h, 0.0, -_w, _h, 0.0,\n _w, -_h, 0.0, -_w, -_h, 0.0\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n vertexPositionBuffer.itemSize = 3;\n vertexPositionBuffer.numItems = 4;\n\n vertexTextureCoordBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexTextureCoordBuffer);\n textureCoords = [\n // Front face\n 1.0, 0.0,\n 0.0, 0.0,\n 1.0, 1.0,\n 0.0, 1.0\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(textureCoords), gl.STATIC_DRAW);\n vertexTextureCoordBuffer.itemSize = 2;\n vertexTextureCoordBuffer.numItems = 6;\n\n vertexIndexBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, vertexIndexBuffer);\n vertexIndices = [\n 0, 1, 2, 0, 2, 3, // Front face\n ];\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(vertexIndices), gl.STATIC_DRAW);\n vertexIndexBuffer.itemSize = 1;\n vertexIndexBuffer.numItems = 6;\n }", "title": "" }, { "docid": "71af139f34007b08dbf75ac492c460d3", "score": "0.5311849", "text": "function initBuffers(gl) {\n\n // Create a buffer for the square's positions.\n\n const positionBuffer = gl.createBuffer();\n\n // Select the positionBuffer as the one to apply buffer\n // operations to from here out.\n\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\n // Now create an array of positions for the square.\n\n // Now pass the list of positions into WebGL to build the\n // shape. We do this by creating a Float32Array from the\n // JavaScript array, then use it to fill the current buffer.\n\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(positions), gl.STATIC_DRAW);\n\n const colorBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(colors), gl.STATIC_DRAW);\n\n return {\n position: positionBuffer,\n color: colorBuffer,\n };\n}", "title": "" }, { "docid": "0e978579e4c3efad142afbe525ce2351", "score": "0.52984923", "text": "function programInfoInit(gl, shaderProgram) {\n \n gl.useProgram(shaderProgram);\n\n programInfo = {\n program: shaderProgram,\n attributes: {\n position: gl.getAttribLocation(shaderProgram, 'a_position'),\n color: gl.getAttribLocation(shaderProgram, 'a_color'),\n normal: gl.getAttribLocation(shaderProgram, 'a_normal'),\n } ,\n uniforms: {\n resolution: gl.getUniformLocation(shaderProgram, \"u_resolution\"),\n shininess: gl.getUniformLocation(shaderProgram, 'u_shininess'),\n\n world: gl.getUniformLocation(shaderProgram, 'u_world'),\n worldViewProjection: gl.getUniformLocation(shaderProgram, 'u_worldViewProjection'),\n worldInverseTranspose: gl.getUniformLocation(shaderProgram, 'u_worldInverseTranspose'),\n\n lightWorldPosition: gl.getUniformLocation(shaderProgram, 'u_lightWorldPosition'),\n viewWorldPosition: gl.getUniformLocation(shaderProgram, 'u_viewWorldPosition'),\n\n lowerMatrix: gl.getUniformLocation(shaderProgram, 'u_lowerMatrix'),\n upperMatrix: gl.getUniformLocation(shaderProgram, 'u_upperMatrix'),\n \n //reverseLightDirection: gl.getUniformLocation(shaderProgram, 'u_reverseLightDirection'),\n },\n };\n\n // set the light direction\n gl.uniform2f(programInfo.uniforms.resolution, gl.canvas.width, gl.canvas.height);\n //gl.uniform3fv(programInfo.uniforms.reverseLightDirection, m4.normalize(lightVector));\n gl.uniform3fv(programInfo.uniforms.lightWorldPosition, pointLightPosition);\n gl.uniform1f(programInfo.uniforms.shininess, shininess);\n\n return programInfo;\n}", "title": "" }, { "docid": "35c8962b00af406bb6e9929ae83307aa", "score": "0.52976286", "text": "function initGL() {\n var prog = createProgram(gl,\"vshader-source\",\"fshader-source\");\n gl.useProgram(prog);\n a_coords_loc = gl.getAttribLocation(prog, \"a_coords\");\n a_normal_loc = gl.getAttribLocation(prog, \"a_normal\");\n a_texcoords_loc = gl.getAttribLocation(prog, \"a_texcoords\");\n\n u_modelview = gl.getUniformLocation(prog, \"modelview\");\n u_projection = gl.getUniformLocation(prog, \"projection\");\n u_normalMatrix = gl.getUniformLocation(prog, \"normalMatrix\");\n u_lightPosition= gl.getUniformLocation(prog, \"lightPosition\");\n u_diffuseColor = gl.getUniformLocation(prog, \"diffuseColor\");\n u_specularColor = gl.getUniformLocation(prog, \"specularColor\");\n u_specularExponent = gl.getUniformLocation(prog, \"specularExponent\");\n u_lightPositions = gl.getUniformLocation(prog, \"lightPositions\");\n u_attenuation = gl.getUniformLocation(prog, \"attenuation\");\n u_lightDir = gl.getUniformLocation(prog, \"lightDir\");\n u_drawMode = gl.getUniformLocation(prog, \"drawMode\");\n u_lightAngleLimit = gl.getUniformLocation(prog, \"lightAngleLimit\");\n u_lightEnable = gl.getUniformLocation(prog, \"enable\");\n u_texture = gl.getUniformLocation(prog, \"texture\");\n\n gl.clearColor(0.0,0.0,0.0,1.0);\n gl.enable(gl.DEPTH_TEST);\n\n gl.uniform3f(u_specularColor, 0.5, 0.5, 0.5); \n gl.uniform1f(u_specularExponent, 10);\n texture0 = gl.createTexture();\n\n}", "title": "" }, { "docid": "e642762e4abb09a35d1cf45ed4b72eb0", "score": "0.52967733", "text": "function setUpShaders() {\n //\n var vertexShader = scene.assetManager.loadShader (\n ShaderType.VERTEX_SHADER,\n PositionColor.VERTEX_SHADER_SOURCE\n );\n\n var fragmentShader = scene.assetManager.loadShader (\n ShaderType.FRAGMENT_SHADER,\n PositionColor.FRAGMENT_SHADER_SOURCE\n );\n\n shaderProgram =\n shaderHelper.setUpShaderProgram(vertexShader, fragmentShader);\n\n vertexPositionAttributeLocation =\n scene.graphicsManager.getAttributeLocation(shaderProgram, 'vertexPosition');\n\n transformUniformLocation =\n scene.graphicsManager.getUniformLocation(shaderProgram, 'transform');\n }", "title": "" }, { "docid": "88a0155f2b3b55858a4cc2f34f7754eb", "score": "0.52965784", "text": "constructor()\n\t{\n\t\t// Compile the shader program\n\t\tthis.prog = InitShaderProgram( modelVS, modelFS );\n\t\t// Get the ids of the uniform variables in the shaders\n\t\tthis.mvp = gl.getUniformLocation( this.prog, 'mvp' );\n\n\t\t// Get the ids of the vertex attributes in the shaders\n\t\tthis.vertPos = gl.getAttribLocation( this.prog, 'pos' );\n\n\t\tthis.txc = gl.getAttribLocation(this.prog,'txc');\n\n\n\n\t\tthis.mv_ = gl.getUniformLocation( this.prog, 'mv_' );\n\t\tthis.mv = gl.getAttribLocation( this.prog, 'mv' );\n\n\t\tthis.norm = gl.getUniformLocation( this.prog, 'norm' );\n\t\tthis.normals = gl.getAttribLocation( this.prog, 'normals' );\n\n\n\n\t\tthis.sampler = gl.getUniformLocation(this.prog,'tex');\n\n\t\tthis.swap = gl.getUniformLocation(this.prog,'swap');\n\n\t\tthis.toShow = gl.getUniformLocation(this.prog,'toShow');\n\n\n\t\tthis.x = gl.getUniformLocation(this.prog,'x');\n\t\tthis.y = gl.getUniformLocation(this.prog,'y');\n\t\tthis.z = gl.getUniformLocation(this.prog,'z');\n\t\tthis.shiny = gl.getUniformLocation(this.prog,'shiny');\n\n\t\tthis.vertbuffer = gl.createBuffer();\n\t\tthis.textureBuffer = gl.createBuffer();\n\t\tthis.normalBuffer = gl.createBuffer();\n\n\t}", "title": "" }, { "docid": "a9c3133bc966c51976b6ef1bcc94e82f", "score": "0.5295233", "text": "function initShaders()\n{\n\tvar fragmentShader = getShader(gl, \"shader-fs\");\n\tvar vertexShader = getShader(gl, \"shader-vs\");\n\n\t//create and link shader program\n\tshaderProgram = gl.createProgram();\n\tgl.attachShader(shaderProgram, vertexShader);\n\tgl.attachShader(shaderProgram, fragmentShader);\n\tgl.linkProgram(shaderProgram);\n\n\tif(!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS))\n\t{\n\t\tconsole.log(\"Could not link shaders\");\n\t\treturn;\n\t}\n\n\t//register shader\n\tgl.useProgram(shaderProgram);\n\n\tshaderProgram.vertexPositionAttribute = gl.getAttribLocation(shaderProgram, \"aVertexPosition\");\n\tgl.enableVertexAttribArray(shaderProgram.vertexPositionAttribute);\n\n\tshaderProgram.textureCoordAttribute = gl.getAttribLocation(shaderProgram, \"aTextureCoordinate\");\n\tgl.enableVertexAttribArray(shaderProgram.textureCoordAttribute);\n\n\tshaderProgram.pMatrixUniform = gl.getUniformLocation(shaderProgram, \"uPMatrix\");\n\tshaderProgram.mvMatrixUniform = gl.getUniformLocation(shaderProgram, \"uMVMatrix\");\n\tshaderProgram.samplerUniform = gl.getUniformLocation(shaderProgram, \"uSampler\");\n\n\tconsole.log(\"Initialized shaders\");\n}", "title": "" }, { "docid": "ae6832690dd4c1df8b49a8a80922f0e1", "score": "0.5294284", "text": "function initBuffers() {\n //3 stk 3D vertekser:\n let positions = new Float32Array([\n 0.0, 0.5, 0,\n -0.5, -0.5, 0,\n 0.5, -0.5, 0]);\n\n //Farge til verteksene:\n let colors = new Float32Array([\n 1.0, 0.0, 0.0, 1.0,\t\t//Rød (RgbA)\n 0.0, 1.0, 0.0, 1.0,\t\t//Grønn (rGbA)\n 0.0, 0.0, 1.0, 1.0]);\t//Blå \t(rgBA)\n\n //POSISJONSBUFRET: oppretter, binder og skriver data til bufret:\n positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);\n //Setter antall floats per verteks og antall vertekser i dette bufret:\n positionBuffer.itemSize = 3;\n positionBuffer.numberOfItems = positions.length / 3;\n\n //COLORBUFRET: oppretter, binder og skriver data til bufret:\n colorBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, colors, gl.STATIC_DRAW);\n //Setter antall floats per verteks og antall vertekser i dette bufret:\n colorBuffer.itemSize = 4; // NB!!\n colorBuffer.numberOfItems = colors.length / 4; // NB!!\n\n // Kople fra.\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n}", "title": "" }, { "docid": "d6a47e5c09a23f2f54038900022f9f52", "score": "0.528521", "text": "function initPrismVertexBuffers(gl) {\r\n // Create a prism\r\n // Size: 1 by 1 by 1\r\n // v4 \r\n // v1 / \\\r\n // / \\/ \\\r\n // / /\\ \\\r\n // / v3-\\-----v5 \r\n // v0-------v2\r\n var vertices = new Float32Array([\r\n // Coordinates\r\n -0.5, -0.5, 0.5, 0.0, 0.5, 0.5, 0.5, -0.5, 0.5, // v0-v1-v2 front\r\n 0.0, 0.5, 0.5, 0.0, 0.5, -0.5, 0.5, -0.5, -0.5, 0.5, -0.5, 0.5, // v1-v4-v5-v2 right\r\n -0.5, -0.5, 0.5, -0.5, -0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.5, 0.5, // v0-v3-v4-v1 left\r\n 0.5, -0.5, 0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, // v2-v5-v3-v0 bottom\r\n -0.5, -0.5, -0.5, 0.0, 0.5, -0.5, 0.5, -0.5, -0.5 // v3-v4-v5 back\r\n ]);\r\n\r\n var normals = new Float32Array([\r\n // Normal\r\n 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, // v0-v1-v2 front\r\n 1.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0, 0.0, // v1-v4-v5-v2 right\r\n -1.0, 1.0, 0.0, -1.0, 1.0, 0.0, -1.0, 1.0, 0.0, -1.0, 1.0, 0.0, // v0-v3-v4-v1 left\r\n 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, // v2-v5-v3-v0 bottom\r\n 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, // v3-v4-v5 back\r\n ]);\r\n\r\n\r\n var indices = new Uint8Array([\r\n // Indices\r\n 0, 1, 2, // front\r\n 3, 4, 5, 3, 5, 6, // right\r\n 7, 8, 9, 7, 9, 10, // left\r\n 11, 12, 13, 11, 13, 14, // bottom\r\n 15, 16, 17 // back\r\n ]);\r\n\r\n\r\n // Write the vertex property to buffers (coordinates, colors and normals)\r\n if (!initArrayBuffer(gl, 'a_Position', vertices, 3, gl.FLOAT)) return -1;\r\n if (!initArrayBuffer(gl, 'a_Normal', normals, 3, gl.FLOAT)) return -1;\r\n\r\n // Write the indices to the buffer object\r\n var indexBuffer = gl.createBuffer();\r\n if (!indexBuffer) {\r\n console.log('Failed to create the buffer object');\r\n return false;\r\n }\r\n\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);\r\n\r\n return indices.length;\r\n}", "title": "" }, { "docid": "8799ac320fb17c116d737e8675adf735", "score": "0.5284773", "text": "initBuffer () {\n gl.useProgram(program);\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesVBO);\n\n // TODO: Übergebe hier sowohl das Mesh, als auch die Normalen an das VBO\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(this.mesh.concat(this.normals).concat(this.textureCoordinates)), gl.STATIC_DRAW);\n gl.uniformMatrix4fv(modelMatrixLoc, false, new Float32Array(this.modelMatrix));\n gl.uniformMatrix4fv(normalMatrixLoc, false, new Float32Array(this.normalMatrix));\n }", "title": "" }, { "docid": "8f8fa8b63d3f64ecc5fc63b66aad0992", "score": "0.5279532", "text": "function setup(gl) {\n\t// Precalculate stuff\n\tcalculateCircleVertices();\n\tcalculateMarksVertices();\n\n\t// WebGL setup\n\tgl.enable(gl.CULL_FACE);\n\tgl.enable(gl.DEPTH_TEST);\n\tgl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);\n\tgl.enable(gl.BLEND);\n\n\t// Create programs\n\tcircleProgram = webgl.createProgram(gl, circleVertexShader, circleFragmentShader);\n\tmarksProgram = webgl.createProgram(gl, marksVertexShader, marksFragmentShader);\n\tpointerProgram = webgl.createProgram(gl, pointerVertexShader, pointerFragmentShader);\n\t\n\t// Attributes and uniforms\n\tcircleProgram.a_position = gl.getAttribLocation(circleProgram, \"a_position\");\n\t\n\tmarksProgram.a_position = gl.getAttribLocation(marksProgram, \"a_position\");\n\tmarksProgram.u_rotationY = gl.getUniformLocation(marksProgram, \"u_rotationY\");\n\tmarksProgram.u_rotationX = gl.getUniformLocation(marksProgram, \"u_rotationX\");\n\tmarksProgram.u_projection = gl.getUniformLocation(marksProgram, \"u_projection\");\n\tmarksProgram.u_translation = gl.getUniformLocation(marksProgram, \"u_translation\");\n\tmarksProgram.u_back = gl.getUniformLocation(marksProgram, \"u_back\");\n\t\n\tpointerProgram.a_position = gl.getAttribLocation(pointerProgram, \"a_position\");\n\tpointerProgram.u_rotationY = gl.getUniformLocation(pointerProgram, \"u_rotationY\");\n\tpointerProgram.u_rotationX = gl.getUniformLocation(pointerProgram, \"u_rotationX\");\n\tpointerProgram.u_projection = gl.getUniformLocation(pointerProgram, \"u_projection\");\n\tpointerProgram.u_translation = gl.getUniformLocation(pointerProgram, \"u_translation\");\n\n\t// Buffers\n\tcirclePositionBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, circlePositionBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(circleVertices), gl.STATIC_DRAW);\n\n\tmarksPositionBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, marksPositionBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(marksVertices), gl.STATIC_DRAW);\n\t\n\tpointerPositionBuffer = gl.createBuffer();\n\tgl.bindBuffer(gl.ARRAY_BUFFER, pointerPositionBuffer);\n\tgl.bufferData(gl.ARRAY_BUFFER, new Float32Array(pointerVertices), gl.STATIC_DRAW);\n\t\n\t// Set up viewport\n\tgl.viewport(0, 0, gl.canvas.width, gl.canvas.height);\n\t\n\t// Render\n\trender(gl, [0, 0]);\n}", "title": "" }, { "docid": "e9010a3492cd17d30fbb5332fa96fb6f", "score": "0.5277245", "text": "function initBuffers() {\n // Create and bind VAO\n gl.vectorsVAO = gl.createVertexArray();\n gl.bindVertexArray(gl.vectorsVAO);\n\n // Load the vertex coordinate data onto the GPU and associate with attribute\n gl.posBuffer = gl.createBuffer(); // create position buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, gl.posBuffer); // bind the position buffer\n gl.bufferData(gl.ARRAY_BUFFER, 100000*2*Float32Array.BYTES_PER_ELEMENT, gl.DYNAMIC_DRAW); // load the data into the position buffer\n gl.vertexAttribPointer(gl.program.aPosition, 2, gl.FLOAT, false, 0, 0); // associate the buffer with \"aPosition\" as length-2 vectors of floats\n gl.enableVertexAttribArray(gl.program.aPosition); // enable this set of data\n\n // Load the vertex color data onto the GPU and associate with attribute\n gl.colorBuffer = gl.createBuffer(); \n gl.bindBuffer(gl.ARRAY_BUFFER, gl.colorBuffer); \n gl.bufferData(gl.ARRAY_BUFFER, 100000*3*Float32Array.BYTES_PER_ELEMENT, gl.DYNAMIC_DRAW);\n gl.vertexAttribPointer(gl.program.aColor, 3, gl.FLOAT, false, 0, 0); // associate the buffer with \"aColor\" as length-3 vectors of floats\n gl.enableVertexAttribArray(gl.program.aColor);\n \n // Cleanup\n gl.bindVertexArray(null);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n}", "title": "" }, { "docid": "cf52069264c2e76dfb5f0baefc0085da", "score": "0.5276321", "text": "function prepareGlVariables() {\n context.aVertexPositionId = gl.getAttribLocation(context.shaderProgram, \"aVertexPosition\");\n context.aVertexColorId = gl.getAttribLocation(context.shaderProgram, \"aVertexColor\");\n context.aVertexTextureCoordId = gl.getAttribLocation(context.shaderProgram, \"aVertexTextureCoord\");\n\n context.uProjectionMatId = gl.getUniformLocation(context.shaderProgram, \"uProjectionMat\");\n context.uModelMatId = gl.getUniformLocation(context.shaderProgram, \"uModelMat\");\n context.uIsTextureDrawingId = gl.getUniformLocation(context.shaderProgram, \"uIsTextureDrawing\");\n context.uSamplerId = gl.getUniformLocation(context.shaderProgram, \"uSampler\");\n}", "title": "" }, { "docid": "da4a3fdf5058bfb26c92e904a48ff6b8", "score": "0.52755123", "text": "initPosition(){\n if(this.number == 1){\n this.x = 1;\n this.y = 1;\n }\n if(this.number == 2){\n this.x = 13;\n this.y = 1;\n }\n if(this.number == 3){\n this.x = 1;\n this.y = 13;\n }\n if(this.number == 4){\n this.x = 13;\n this.y = 13;\n }\n }", "title": "" }, { "docid": "1fd1e7875b9df61e06b341269c594081", "score": "0.52712065", "text": "update_positions() {\n let positions = this.vertex_positions;\n for (var i = 0; i < this.vertices.length; i++) {\n positions[i * 3] = this.vertices[i].x;\n positions[i * 3 + 1] = this.vertices[i].y;\n positions[i * 3 + 2] = this.vertices[i].z;\n }\n this.attributes.position.needsUpdate = true;\n }", "title": "" }, { "docid": "d6e07d930b5b6a6db4c03e83c7ce2c76", "score": "0.52673626", "text": "initGLSLBuffers() {\n var attributeBuffer = this.gl.createBuffer();\n var indexBuffer = this.gl.createBuffer();\n\n if (!attributeBuffer || !indexBuffer) {\n console.log(\"Failed to create buffers!\");\n return;\n }\n\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, attributeBuffer);\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\n }", "title": "" }, { "docid": "abbe7a1e8c106ee4285bafbd65d3c196", "score": "0.525575", "text": "function setUpAttributesAndUniforms(){\n \"use strict\";\n // finds the index of the variable in the program || überschreibt ctx.aVertexPositionId\n ctx.aVertexPositionId = gl.getAttribLocation(ctx.shaderProgram, \"aVertexPosition\");\n ctx.aVertexTexCoordId = gl.getAttribLocation(ctx.shaderProgram, \"aVertexTexCoord\");\n ctx.uSampler2DId = gl.getUniformLocation(ctx.shaderProgram, \"uSampler\");\n}", "title": "" }, { "docid": "11ea6cf1b13f9315d4f9c50695f20498", "score": "0.5255032", "text": "function makePosInit(){\n \"use strict\";\n posInit.plyr = owarePos.opposite( posInit.plyr );\n return posInit.clone();\n}", "title": "" }, { "docid": "36df5394a1ae53384172810ccee4daba", "score": "0.5248339", "text": "update_positions() {\n let positions = this.vertex_positions;\n for (var i = 0; i < this.vertices.length; i++) {\n positions[i * 3] = this.vertices[i].x;\n positions[i * 3 + 1] = this.vertices[i].y;\n positions[i * 3 + 2] = this.vertices[i].z;\n }\n this.geometry.attributes.position.needsUpdate = true;\n }", "title": "" }, { "docid": "18c8f260149132e1f1eb7206bfb588a9", "score": "0.52482533", "text": "function initBuffers() {\n buffer = gl.createBuffer();\n bufferColor = gl.createBuffer();\n \n pos = gl.getAttribLocation(program, \"position\");\n color = gl.getAttribLocation(program, \"color\");\n\n perspective = gl.getUniformLocation(program, \"perspective\");\n translation = gl.getUniformLocation(program, \"translation\");\n rotation = gl.getUniformLocation(program, \"rotation\");\n scale = gl.getUniformLocation(program, \"scale\");\n size = 3;\n\n gl.enableVertexAttribArray(pos);\n gl.enableVertexAttribArray(color);\n mat4.translate(perscaleMatrix, perscaleMatrix, [0, 0, -2]);\n\n refreshBuffers()\n}", "title": "" }, { "docid": "8e52f82e1f1d9dcdfe61758042915970", "score": "0.52455944", "text": "function initBuffers(gl) {\n\n // Create a buffer for the square's positions.\n\n const positionBuffer = gl.createBuffer();\n\n // Select the positionBuffer as the one to apply buffer\n // operations to from here out.\n\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\n // Now create an array of positions for the square.\n\n const positions = [\n 3.0, 3.0,\n -3.0, 3.0,\n 3.0, -3.0,\n -3.0, -3.0,\n ];\n\n // Now pass the list of positions into WebGL to build the\n // shape. We do this by creating a Float32Array from the\n // JavaScript array, then use it to fill the current buffer.\n\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(positions), gl.STATIC_DRAW);\n\n // Now set up the colors for the vertices\n\n var colors = [\n 1.0, 1.0, 1.0, 1.0, // white\n 1.0, 0.0, 0.0, 1.0, // red\n 0.0, 1.0, 0.0, 1.0, // green\n 0.0, 0.0, 1.0, 1.0, // blue\n ];\n\n const colorBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(colors), gl.STATIC_DRAW);\n\n return {\n position: positionBuffer,\n color: colorBuffer,\n };\n}", "title": "" }, { "docid": "b078e51c133a7fd0b26bb39e10f376ff", "score": "0.52434725", "text": "setData(positions, colors) {\n if (positions.length != colors.length) {\n console.log(\"Positions and colors not the same length\");\n }\n\n gl.bindBuffer( gl.ARRAY_BUFFER, this.cBuffer );\n gl.bufferData( gl.ARRAY_BUFFER, flatten(colors), gl.STATIC_DRAW );\n\n gl.bindBuffer( gl.ARRAY_BUFFER, this.vBuffer );\n gl.bufferData( gl.ARRAY_BUFFER, flatten(points), gl.STATIC_DRAW );\n\n this.numVertices = positions.length;\n\n colors = [];\n points = [];\n \n }", "title": "" }, { "docid": "1f3c601f067e94388672b3f63938edf9", "score": "0.5237684", "text": "function setGeometry(gl) {\n var positions = new Float32Array([\n // left column front\n 0, 0, 0,\n 0, 150, 0,\n 30, 0, 0,\n 0, 150, 0,\n 30, 150, 0,\n 30, 0, 0,\n\n // top rung front\n 30, 0, 0,\n 30, 30, 0,\n 100, 0, 0,\n 30, 30, 0,\n 100, 30, 0,\n 100, 0, 0,\n\n // middle rung front\n 30, 60, 0,\n 30, 90, 0,\n 67, 60, 0,\n 30, 90, 0,\n 67, 90, 0,\n 67, 60, 0,\n\n // left column back\n 0, 0, 30,\n 30, 0, 30,\n 0, 150, 30,\n 0, 150, 30,\n 30, 0, 30,\n 30, 150, 30,\n\n // top rung back\n 30, 0, 30,\n 100, 0, 30,\n 30, 30, 30,\n 30, 30, 30,\n 100, 0, 30,\n 100, 30, 30,\n\n // middle rung back\n 30, 60, 30,\n 67, 60, 30,\n 30, 90, 30,\n 30, 90, 30,\n 67, 60, 30,\n 67, 90, 30,\n\n // top\n 0, 0, 0,\n 100, 0, 0,\n 100, 0, 30,\n 0, 0, 0,\n 100, 0, 30,\n 0, 0, 30,\n\n // top rung right\n 100, 0, 0,\n 100, 30, 0,\n 100, 30, 30,\n 100, 0, 0,\n 100, 30, 30,\n 100, 0, 30,\n\n // under top rung\n 30, 30, 0,\n 30, 30, 30,\n 100, 30, 30,\n 30, 30, 0,\n 100, 30, 30,\n 100, 30, 0,\n\n // between top rung and middle\n 30, 30, 0,\n 30, 60, 30,\n 30, 30, 30,\n 30, 30, 0,\n 30, 60, 0,\n 30, 60, 30,\n\n // top of middle rung\n 30, 60, 0,\n 67, 60, 30,\n 30, 60, 30,\n 30, 60, 0,\n 67, 60, 0,\n 67, 60, 30,\n\n // right of middle rung\n 67, 60, 0,\n 67, 90, 30,\n 67, 60, 30,\n 67, 60, 0,\n 67, 90, 0,\n 67, 90, 30,\n\n // bottom of middle rung.\n 30, 90, 0,\n 30, 90, 30,\n 67, 90, 30,\n 30, 90, 0,\n 67, 90, 30,\n 67, 90, 0,\n\n // right of bottom\n 30, 90, 0,\n 30, 150, 30,\n 30, 90, 30,\n 30, 90, 0,\n 30, 150, 0,\n 30, 150, 30,\n\n // bottom\n 0, 150, 0,\n 0, 150, 30,\n 30, 150, 30,\n 0, 150, 0,\n 30, 150, 30,\n 30, 150, 0,\n\n // left side\n 0, 0, 0,\n 0, 0, 30,\n 0, 150, 30,\n 0, 0, 0,\n 0, 150, 30,\n 0, 150, 0]);\n\n // Center the F around the origin and Flip it around. We do this because\n // we're in 3D now with and +Y is up where as before when we started with 2D\n // we had +Y as down.\n\n // We could do by changing all the values above but I'm lazy.\n // We could also do it with a matrix at draw time but you should\n // never do stuff at draw time if you can do it at init time.\n var matrix = m4.xRotation(Math.PI);\n matrix = m4.translate(matrix, -50, -75, -15);\n\n for (var ii = 0; ii < positions.length; ii += 3) {\n var vector = m4.transformPoint(matrix, [positions[ii + 0], positions[ii + 1], positions[ii + 2], 1]);\n positions[ii + 0] = vector[0];\n positions[ii + 1] = vector[1];\n positions[ii + 2] = vector[2];\n }\n\n gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);\n}", "title": "" }, { "docid": "0e1ad1717d28f029ae2e448d97098fcb", "score": "0.5233372", "text": "function initVertexBuffers_square(gl, x, y, a_Position, size) {\r\n var n = 4; // The number of vertices\r\n // creating the vertices for square\r\n var vertices = new Float32Array([\r\n x-(1/size)*0.5, y-(1/size)*0.5,\r\n x+(1/size)*0.5, y-(1/size)*0.5,\r\n x-(1/size)*0.5, y+(1/size)*0.5,\r\n x+(1/size)*0.5, y+(1/size)*0.5]);\r\n\r\n // Create a buffer object\r\n var vertexBuffer = gl.createBuffer();\r\n if (!vertexBuffer) {\r\n console.log('Failed to create the buffer object');\r\n return -1;\r\n }\r\n // Bind the buffer object to target\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n // Write date into the buffer object\r\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\r\n // Assign the buffer object to a_Position variable\r\n gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);\r\n // Enable the assignment to a_Position variable\r\n gl.enableVertexAttribArray(a_Position);\r\n return n;\r\n}", "title": "" }, { "docid": "60b5e8f1d31adb15abdcece043127d21", "score": "0.523302", "text": "function initShaderProgram(gl, vsSource, fsSource) {\n // NOTE: Load any WebGL extensions before calling this\n\n const vertexShader = loadShader(gl, gl.VERTEX_SHADER, vsSource);\n const fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fsSource);\n\n const shaderProgram = gl.createProgram();\n gl.attachShader(shaderProgram, vertexShader);\n gl.attachShader(shaderProgram, fragmentShader);\n gl.linkProgram(shaderProgram);\n\n if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) {\n alert( 'Unable to initialize the shader program: \\n' +\n gl.getProgramInfoLog(shaderProgram) );\n // This is not very good error handling... should be returning the error\n return null;\n }\n\n return {\n program: shaderProgram,\n attributeSetters: createAttributeSetters(gl, shaderProgram),\n uniformSetters: createUniformSetters(gl,shaderProgram),\n };\n}", "title": "" }, { "docid": "400d95c4262c7f2907bb29fd2e72fa9c", "score": "0.52235305", "text": "function initBuffers1(gl, program) {\n var o = new Object();\n\n o.vertexBuffer = gl.createBuffer();\n o.vertexBuffer.num = 3;\n o.vertexBuffer.type = gl.FLOAT;\n\n o.normalBuffer = gl.createBuffer();\n o.normalBuffer.num = 3;\n o.normalBuffer.type = gl.FLOAT;\n\n o.colorBuffer = gl.createBuffer();\n o.colorBuffer.num = 4;\n o.colorBuffer.type = gl.FLOAT;\n\n o.indexBuffer = gl.createBuffer();\n \n return o;\n}", "title": "" }, { "docid": "2a63c6f6e2d63ef64c1319fe4997482a", "score": "0.52140933", "text": "setPosition(gl, x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n\n let translatedPositions = [];\n gl.bindBuffer(gl.ARRAY_BUFFER, this.buffers.position);\n translatedPositions = this.sourcePositions.slice();\n let i = 0;\n for (i = 0; i < 12 * this.treeLOD; i++) {\n translatedPositions[i * 3] += this.x;\n translatedPositions[i * 3 + 1] += this.y;\n translatedPositions[i * 3 + 2] += this.z;\n }\n\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(translatedPositions), gl.STATIC_DRAW);\n \n }", "title": "" }, { "docid": "1b34986b9c7ae6b1a97fd3ad0d17181a", "score": "0.52006924", "text": "constructor() {\n super(\"position\", \"normal\", \"texture_coord\");\n // Specify the 4 square corner locations, and match those up with normal vectors:\n this.arrays.position = Vec.cast(\n [-1, -1, 0],\n [1, -1, 0],\n [-1, 1, 0],\n [1, 1, 0]\n );\n this.arrays.normal = Vec.cast([0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 0, 1]);\n // Arrange the vertices into a square shape in texture space too:\n this.arrays.texture_coord = Vec.cast([0, 0], [1, 0], [0, 1], [1, 1]);\n // Use two triangles this time, indexing into four distinct vertices:\n this.indices.push(0, 1, 2, 1, 3, 2);\n }", "title": "" }, { "docid": "93182278791f6f47fa4bb01d491ba99e", "score": "0.5188227", "text": "function initShaders() {\n console.log('init shader');\n var vertexShaderSource = loadText(\"vertex.glsl\");\n var vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vertexShader, vertexShaderSource);\n\n gl.compileShader(vertexShader);\n\n var fragmentShaderSource = loadText(\"fragment.glsl\");\n var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fragmentShader, fragmentShaderSource);\n\n gl.compileShader(fragmentShader);\n program = gl.createProgram();\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n gl.linkProgram(program);\n\n gl.useProgram(program)\n}", "title": "" }, { "docid": "54bc2f0a0d83cdd4d65689e302efa781", "score": "0.5182869", "text": "function initVertexBuffers(gl) {\n // Map texture coordinates to the WebGL coordinates\n var verticesTexCoords = new Float32Array([\n // Vertex coordinates, texture coordinate\n -1, 1, 0.0, 4.0, // Top Left\n -1, -1, 0.0, 0.0, // Bottom Left\n 1, 1, 4.0, 4.0, // Top Right\n 1, -1, 4.0, 0.0, // Bottom Right\n ]);\n var n = 4; // The number of vertices\n\n // Create a buffer object to hold the vertex coordinates\n var vertexTexCoordBuffer = gl.createBuffer();\n // Failsafe\n if (!vertexTexCoordBuffer) {\n console.log('Failed to create the buffer object');\n return -1;\n }\n\n // Bind the buffer object to its target\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexTexCoordBuffer);\n // Write the data from the texture coordinates into the buffer object\n gl.bufferData(gl.ARRAY_BUFFER, verticesTexCoords, gl.STATIC_DRAW);\n\n // Size of each element in the vertex coordinate array\n var FSIZE = verticesTexCoords.BYTES_PER_ELEMENT;\n // Get the storage location of the 'a_position' variable in the vertex shader\n var a_Position = gl.getAttribLocation(gl.program, 'a_Position');\n // Failsafe\n if (a_Position < 0) {\n console.log('Failed to get the storage location of a_Position');\n return -1;\n }\n // Write data from the buffer object to the 'a_position' variable in the vertex shader\n // The second parameter indicates the number of elements to use\n // The two final parameters indicate the distance between elements and the starting point in the array\n gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, FSIZE * 4, 0);\n // Enable the assignment of the buffer object\n gl.enableVertexAttribArray(a_Position);\n\n // Get the storage location of the 'a_TexCoord' variable in the vertex shader\n var a_TexCoord = gl.getAttribLocation(gl.program, 'a_TexCoord');\n // Failsafe\n if (a_TexCoord < 0) {\n console.log('Failed to get the storage location of a_TexCoord');\n return -1;\n }\n // Write data from the buffer object to the 'a_TexCoord' variable in the vertex shader\n // The second parameter indicates the number of elements to use\n // The two final parameters indicate the distance between elements and the starting point in the array\n gl.vertexAttribPointer(a_TexCoord, 2, gl.FLOAT, false, FSIZE * 4, FSIZE * 2);\n // Enable the assignment of the buffer object\n gl.enableVertexAttribArray(a_TexCoord);\n\n return n;\n}", "title": "" }, { "docid": "2afe511cd46665a4f14b303a785b4abe", "score": "0.5181523", "text": "constructor() \n { super( \"position\", \"color\" );\n this.arrays.position = [ Vec.of(0,0,0), Vec.of(1,0,0), Vec.of(0,1,0), Vec.of(0,1,0), Vec.of(1,0,0), Vec.of(1,1,0) ]; // Describe the where the points of a triangle are in space.\n this.arrays.color = [ Color.of(1,0,0,1), Color.of(0,1,0,1), Color.of(0,0,1,1), Color.of(0,0,1,1), Color.of(0,1,0,1), Color.of(1,1,0,1) ]; // Besides a position, vertices also have a color. \n }", "title": "" }, { "docid": "ed0ab08f271f9792f4838f1f8d469109", "score": "0.5176974", "text": "function main() {\n // Retrieve <canvas> element\n var canvas = document.getElementById('webgl');\n // Prevent the default setting for left/right click in the window\n canvas.oncontextmenu = function (ev) {\n ev.preventDefault();\n }\n // Get the rendering context for WebGL\n var gl = getWebGLContext(canvas);\n if (!gl) {\n console.log('Failed to get the rendering context for WebGL');\n return;\n }\n\n // Initialize two programs for respectively drawing cylinder and normals\n var cylinderProgram = createProgram(gl, VSHADER_SOURCE, FSHADER_SOURCE);\n var lineProgram = createProgram(gl, vshader, fshader);\n if (!cylinderProgram || !lineProgram) {\n console.log('Failed to create program');\n return -1;\n }\n\n // Get locations of all the variables for drawing a cylinder\n cylinderProgram.a_Position = gl.getAttribLocation(cylinderProgram, 'a_Position');\n cylinderProgram.a_Color = gl.getAttribLocation(cylinderProgram, 'a_Color');\n cylinderProgram.a_Normal = gl.getAttribLocation(cylinderProgram, 'a_Normal');\n cylinderProgram.u_ViewMatrix = gl.getUniformLocation(cylinderProgram, 'u_ViewMatrix');\n cylinderProgram.u_ProjMatrix = gl.getUniformLocation(cylinderProgram, 'u_ProjMatrix');\n cylinderProgram.u_LightColor = gl.getUniformLocation(cylinderProgram, 'u_LightColor');\n cylinderProgram.u_LightDirection = gl.getUniformLocation(cylinderProgram, 'u_LightDirection');\n if (cylinderProgram.a_Position < 0 || cylinderProgram.a_Color < 0 || cylinderProgram.a_Normal < 0 ||\n cylinderProgram.u_ViewMatrix < 0 || cylinderProgram.u_ProjMatrix < 0 || cylinderProgram.u_LightColor < 0 ||\n cylinderProgram.u_LightDirection < 0) {\n console.log('Failed to locate variables for cylinder');\n return -1;\n }\n\n // Get location of all the variables for drawing normals\n lineProgram.a_Position = gl.getAttribLocation(lineProgram, 'a_Position');\n lineProgram.u_ViewMatrix = gl.getUniformLocation(lineProgram, 'u_ViewMatrix');\n lineProgram.u_ProjMatrix = gl.getUniformLocation(lineProgram, 'u_ProjMatrix');\n if (lineProgram.a_Position < 0 || lineProgram.u_ViewMatrix < 0 || lineProgram.u_ProjMatrix < 0) {\n console.log('Failed to locate variables for lines');\n return -1;\n }\n\n generate_tc(); // Initialize the array 'points' defined at line 46\n setColors(); // Initialize the array 'colors' at line 47\n setNormals(); // Initialize the array 'n' at line 48\n setViewNormals(); // Initialize the array 'shown' at line 49\n\n // From the names of the functions below,\n // you can easily known what they are doing.\n initPositions(gl, cylinderProgram, lineProgram, 0); // The last parameter '0' is to choose between two programs\n initColors(gl, cylinderProgram);\n initNormals(gl, cylinderProgram);\n initLightColor(gl, cylinderProgram);\n initLightDirection(gl, cylinderProgram);\n initMatrix(gl, cylinderProgram, lineProgram, 0, 0); // The last two parameters are to choose between programs and top/side view\n\n // Specify the color for clearing <canvas>\n gl.clearColor(1.0, 1.0, 1.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n // Clear color and depth buffer\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n // Display a default view\n var len = points.length / 3;\n gl.drawArrays(gl.TRIANGLES, 0, len);\n\n // Listen to toggle1, which is responsible for changing view\n var checkbox1 = document.getElementById('toggle1');\n checkbox1.addEventListener('change', function () {\n if (checkbox1.checked) {\n toggle1 = 1;\n setSideView(gl, cylinderProgram, lineProgram);\n } else {\n toggle1 = 0;\n setTopView(gl, cylinderProgram, lineProgram);\n }\n });\n\n // Toggle2, responsible for switching between flat shading and wireframe\n var checkbox2 = document.getElementById('toggle2');\n checkbox2.addEventListener('change', function () {\n if (checkbox2.checked) {\n toggle2 = 1;\n if (toggle1 == 0) {\n setTopView(gl, cylinderProgram, lineProgram);\n }\n else {\n setSideView(gl, cylinderProgram, lineProgram);\n }\n } else {\n toggle2 = 0;\n if (toggle1 == 0) {\n setTopView(gl, cylinderProgram, lineProgram);\n }\n else {\n setSideView(gl, cylinderProgram, lineProgram);\n }\n }\n });\n\n // Toggle3, for displaying normals\n var checkbox3 = document.getElementById('toggle3');\n checkbox3.addEventListener('change', function () {\n if (checkbox3.checked) {\n toggle3 = 1;\n if (toggle1 == 0) {\n setTopView(gl, cylinderProgram, lineProgram);\n }\n else {\n setSideView(gl, cylinderProgram, lineProgram);\n }\n } else {\n toggle3 = 0;\n if (toggle1 == 0) {\n setTopView(gl, cylinderProgram, lineProgram);\n }\n else {\n setSideView(gl, cylinderProgram, lineProgram);\n }\n }\n });\n}", "title": "" }, { "docid": "38743a1759e112c3b79849bc999b61d2", "score": "0.51768214", "text": "function setUpAttributesAndUniforms(){\n\n \"use strict\";\n\n // Finds index of the variable in the program\n ctx.aVertexPositionId = gl.getAttribLocation(ctx.shaderProgram, \"aVertexPosition\");\n //ctx.uColorId = gl.getUniformLocation(ctx.shaderProgram, \"uColor\");\n ctx.texture2DId = gl.getUniformLocation(ctx.shaderProgram, \"texture2D\");\n\n}", "title": "" }, { "docid": "cf9f23fe65352795e6e5a4d05dd1d21c", "score": "0.5173521", "text": "constructor(_shader) {\n this.shader = _shader;\n // Creating vertex buffers.\n let vertices = new Float32Array([\n 1.0, 1.0, 0.0, // top right\n -1.0, 1.0, 0.0, // top left\n -1.0,-1.0, 0.0, // bottom left\n 1.0,-1.0, 0.0, // bottom right\n ]);\n let uvs = new Float32Array([\n 1.0, 0.0, \n 0.0, 0.0,\n 0.0, 1.0, \n 1.0, 1.0,\n ]);\n let indices = new Int8Array([\n 0,1,2,\n 0,2,3,\n ]);\n\n this.vertexBuffer = gl.createBuffer();\n this.uvBuffer = gl.createBuffer();\n this.indexBuffer = gl.createBuffer();\n\n // Create and bind new VAO\n this.vao = gl.createVertexArray();\n gl.bindVertexArray(this.vao);\n\n // Load indice data\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW, 0);\n\n // Load vertice data\n gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW, 0);\n let posLoc = this.shader.attribSpecs[\"a_Pos\"].location;\n gl.vertexAttribPointer(posLoc, 3, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(posLoc);\n\n // Load UV data\n gl.bindBuffer(gl.ARRAY_BUFFER, this.uvBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, uvs, gl.STATIC_DRAW, 0);\n let uvLoc = this.shader.attribSpecs[\"a_Texcoord\"].location;\n gl.vertexAttribPointer(uvLoc, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(uvLoc);\n\n gl.bindVertexArray(null);\n }", "title": "" } ]
d779a77af5197b1743da770b1f8a5e92
like getEventSourcesByMatch, but accepts multple match criteria (like multiple IDs)
[ { "docid": "600c9e96f88c51fa7cb7273cf070215e", "score": "0.68067515", "text": "function getEventSourcesByMatchArray(matchInputs) {\n\n\t\t// coerce into an array\n\t\tif (!matchInputs) {\n\t\t\tmatchInputs = [];\n\t\t}\n\t\telse if (!$.isArray(matchInputs)) {\n\t\t\tmatchInputs = [ matchInputs ];\n\t\t}\n\n\t\tvar matchingSources = [];\n\t\tvar i;\n\n\t\t// resolve raw inputs to real event source objects\n\t\tfor (i = 0; i < matchInputs.length; i++) {\n\t\t\tmatchingSources.push.apply( // append\n\t\t\t\tmatchingSources,\n\t\t\t\tgetEventSourcesByMatch(matchInputs[i])\n\t\t\t);\n\t\t}\n\n\t\treturn matchingSources;\n\t}", "title": "" } ]
[ { "docid": "eb9fb9e57706366cdbaa14f1036806de", "score": "0.7423601", "text": "function getEventSourcesByMatch(matchInput) {\n\t\tvar i, source;\n\n\t\t// given an proper event source object\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\tsource = sources[i];\n\t\t\tif (source === matchInput) {\n\t\t\t\treturn [ source ];\n\t\t\t}\n\t\t}\n\n\t\t// an ID match\n\t\tsource = getEventSourceById(matchInput);\n\t\tif (source) {\n\t\t\treturn [ source ];\n\t\t}\n\n\t\treturn $.grep(sources, function(source) {\n\t\t\treturn isSourcesEquivalent(matchInput, source);\n\t\t});\n\t}", "title": "" }, { "docid": "eb9fb9e57706366cdbaa14f1036806de", "score": "0.7423601", "text": "function getEventSourcesByMatch(matchInput) {\n\t\tvar i, source;\n\n\t\t// given an proper event source object\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\tsource = sources[i];\n\t\t\tif (source === matchInput) {\n\t\t\t\treturn [ source ];\n\t\t\t}\n\t\t}\n\n\t\t// an ID match\n\t\tsource = getEventSourceById(matchInput);\n\t\tif (source) {\n\t\t\treturn [ source ];\n\t\t}\n\n\t\treturn $.grep(sources, function(source) {\n\t\t\treturn isSourcesEquivalent(matchInput, source);\n\t\t});\n\t}", "title": "" }, { "docid": "eb9fb9e57706366cdbaa14f1036806de", "score": "0.7423601", "text": "function getEventSourcesByMatch(matchInput) {\n\t\tvar i, source;\n\n\t\t// given an proper event source object\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\tsource = sources[i];\n\t\t\tif (source === matchInput) {\n\t\t\t\treturn [ source ];\n\t\t\t}\n\t\t}\n\n\t\t// an ID match\n\t\tsource = getEventSourceById(matchInput);\n\t\tif (source) {\n\t\t\treturn [ source ];\n\t\t}\n\n\t\treturn $.grep(sources, function(source) {\n\t\t\treturn isSourcesEquivalent(matchInput, source);\n\t\t});\n\t}", "title": "" }, { "docid": "eb9fb9e57706366cdbaa14f1036806de", "score": "0.7423601", "text": "function getEventSourcesByMatch(matchInput) {\n\t\tvar i, source;\n\n\t\t// given an proper event source object\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\tsource = sources[i];\n\t\t\tif (source === matchInput) {\n\t\t\t\treturn [ source ];\n\t\t\t}\n\t\t}\n\n\t\t// an ID match\n\t\tsource = getEventSourceById(matchInput);\n\t\tif (source) {\n\t\t\treturn [ source ];\n\t\t}\n\n\t\treturn $.grep(sources, function(source) {\n\t\t\treturn isSourcesEquivalent(matchInput, source);\n\t\t});\n\t}", "title": "" }, { "docid": "eb9fb9e57706366cdbaa14f1036806de", "score": "0.7423601", "text": "function getEventSourcesByMatch(matchInput) {\n\t\tvar i, source;\n\n\t\t// given an proper event source object\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\tsource = sources[i];\n\t\t\tif (source === matchInput) {\n\t\t\t\treturn [ source ];\n\t\t\t}\n\t\t}\n\n\t\t// an ID match\n\t\tsource = getEventSourceById(matchInput);\n\t\tif (source) {\n\t\t\treturn [ source ];\n\t\t}\n\n\t\treturn $.grep(sources, function(source) {\n\t\t\treturn isSourcesEquivalent(matchInput, source);\n\t\t});\n\t}", "title": "" }, { "docid": "eb9fb9e57706366cdbaa14f1036806de", "score": "0.7423601", "text": "function getEventSourcesByMatch(matchInput) {\n\t\tvar i, source;\n\n\t\t// given an proper event source object\n\t\tfor (i = 0; i < sources.length; i++) {\n\t\t\tsource = sources[i];\n\t\t\tif (source === matchInput) {\n\t\t\t\treturn [ source ];\n\t\t\t}\n\t\t}\n\n\t\t// an ID match\n\t\tsource = getEventSourceById(matchInput);\n\t\tif (source) {\n\t\t\treturn [ source ];\n\t\t}\n\n\t\treturn $.grep(sources, function(source) {\n\t\t\treturn isSourcesEquivalent(matchInput, source);\n\t\t});\n\t}", "title": "" }, { "docid": "f22f3f7e765e69fb8f77305d007ce2bb", "score": "0.5557523", "text": "function refetchEventSources(matchInputs) {\n\t\treturn fetchEventSources(getEventSourcesByMatchArray(matchInputs));\n\t}", "title": "" }, { "docid": "f22f3f7e765e69fb8f77305d007ce2bb", "score": "0.5557523", "text": "function refetchEventSources(matchInputs) {\n\t\treturn fetchEventSources(getEventSourcesByMatchArray(matchInputs));\n\t}", "title": "" }, { "docid": "f22f3f7e765e69fb8f77305d007ce2bb", "score": "0.5557523", "text": "function refetchEventSources(matchInputs) {\n\t\treturn fetchEventSources(getEventSourcesByMatchArray(matchInputs));\n\t}", "title": "" }, { "docid": "5674a9a3ac5ee19885d482212735bd0e", "score": "0.5427703", "text": "async function getEvents(match_id) {\n let events = await DButils.execQuery(\n `SELECT * FROM dbo.eventbook WHERE match_id='${match_id}'`\n );\n let res = [];\n events.map((eventDet) =>\n res.push({\n date: eventDet.date,\n time: eventDet.time,\n gamemin: eventDet.gamemin,\n event: eventDet.event,\n })\n );\n return res;\n}", "title": "" }, { "docid": "43383cc07ee8332abc1e148af27adc9d", "score": "0.5395895", "text": "function matchCriteria(startDate, endDate, frequency, key, type)\n{\n var increment = 0;\n var matchCondition = [];\n\n for(var i = startDate; i<=endDate; i=i+increment)\n {\n var matchField = new Date(0); // The 0 there is the key, which sets the date to the epoch\n matchField.setUTCSeconds(i);\n\n //Derive Day and Month\n var dd = matchField.getDate();\n var mm = matchField.getMonth()+1; //January is 0!\n var yyyy = matchField.getFullYear();\n if(dd<10) { dd='0'+dd};\n if(mm<10) { mm='0'+mm};\n\n //Derive Week\n var weekDate = new Date(matchField);\n var weekBegin = matchField.getDate() - matchField.getDay();\n var weekEnd = weekBegin + 6; // last day is the first day + 6\n var weekDay = new Date(weekDate.setDate(weekEnd));\n\n var weekdd = weekDay.getDate();\n var weekmm = weekDay.getMonth()+1; //January is 0!\n var weekyyyy = weekDay.getFullYear();\n if(weekdd<10) { weekdd='0'+weekdd};\n if(weekmm<10) { weekmm='0'+weekmm};\n\n //Derive Hour and Minutes\n var hh = matchField.getHours();\n if (hh<10) { hh='0'+hh};\n\n var hourKey = '' + yyyy + mm + dd + hh;\n var dayKey = '' + yyyy + mm + dd;\n var weekKey = '' + weekyyyy + weekmm + weekdd;\n var monthKey = '' + yyyy + mm;\n\n if (frequency == 'Hour') {\n increment = (60*60);\n matchCondition.push(hourKey);}\n else if (frequency == 'Day') {\n increment = (60*60*24);\n matchCondition.push(dayKey);}\n else if (frequency == 'Week') {\n increment = (60*60*24*7);\n matchCondition.push(weekKey);}\n else if (frequency == 'Month') {\n increment = (60*60*24*28);\n matchCondition.push(monthKey);}\n\n } //End of 'for' loop\n\n key['_id.key'] = {$in : matchCondition};\n type['_id.type'] = {$in : [frequency]};\n\n} //end of function matchCriteria", "title": "" }, { "docid": "f19d0fb4fb694a9fc323444a401cf163", "score": "0.53557456", "text": "function matchImageswithEvents(images, id) {\n for (i = 0; i < images.length; i++) {\n if (id === images[i].id) {\n artistImage = images[i].url;\n return artistImage;\n }\n }\n}", "title": "" }, { "docid": "c5e77ecc1e496c0a7959aa8555f11a09", "score": "0.5297018", "text": "function getMatches(listeners, changes, matches) {\n\tvar matches = matches || [];\n\n\tfor (prop in listeners) {\n\t\tif (prop !== LKEY && changes && prop in changes) {\n\t\t\tif (LKEY in listeners[prop]) {\n\t\t\t\tmatches = matches.concat(listeners[prop][LKEY]);\n\t\t\t}\n\t\t\tif (typeof changes[prop] == 'object') {\n\t\t\t\tmatches = matches.concat(getMatches(listeners[prop], changes[prop], matches));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matches;\n}", "title": "" }, { "docid": "5cd23df2a329ffb4ed45d7d741472e87", "score": "0.5285337", "text": "function refetchEventSources(matchInputs) {\n\t\tfetchEventSources(t.getEventSourcesByMatchArray(matchInputs));\n\t}", "title": "" }, { "docid": "5cd23df2a329ffb4ed45d7d741472e87", "score": "0.5285337", "text": "function refetchEventSources(matchInputs) {\n\t\tfetchEventSources(t.getEventSourcesByMatchArray(matchInputs));\n\t}", "title": "" }, { "docid": "5cd23df2a329ffb4ed45d7d741472e87", "score": "0.5285337", "text": "function refetchEventSources(matchInputs) {\n\t\tfetchEventSources(t.getEventSourcesByMatchArray(matchInputs));\n\t}", "title": "" }, { "docid": "1037693d89dbd1c90ce3f388480f910f", "score": "0.52839816", "text": "function getFilteredMatches(matches) {\n const filteredMatches = matches;\n\n // if a speaker is specified, filter out non-matches\n // if (speakerInput.value) {\n // filteredMatches = matches.filter((match) => {\n // return match.speaker &&\n // match.speaker.toLowerCase().includes(speakerInput.value.toLowerCase());\n // });\n // }\n\n // if a title is specified, filter out non-matches\n // if (titleInput.value) {\n // filteredMatches = filteredMatches.filter((match) => {\n // ...\n // });\n // }\n\n // const message = `Found ${filteredMatches.length} match(es)`;\n // displayInfo(message);\n return filteredMatches;\n}", "title": "" }, { "docid": "fcf6aae7348d333e9f734fb98d5c5c63", "score": "0.5232408", "text": "function matchByAvailability(volunteers, seniors) {\n // Given 2 arrays, one of volunteers, and one of seniors, it returns array of objects of all possible matches\n // Addresses time\n\n function getSeniorsbyDayAvailability(roleName) {\n // Pass the Volunteer's name as an argument\n // Return names of seniors that matches volunteer's day as an array, daySeniorNameList.\n /* Example output below:\n [\n [ 0, 'Nancy', 'Philomena' ],\n [ 5, 'Walter' ],\n [ 6, 'Nancy', 'Walter' ]\n ]\n */\n\n function getRoleDays(role, roleName) {\n // Return the role's available days as an array\n var roleTimes = getTimeByName(role, roleName);\n var roleDays = [];\n for (let i = 0; i < roleTimes.length; i++) {\n roleDays.push(roleTimes[i][0]);\n }\n return roleDays;\n }\n\n volunteerDays = getRoleDays(volunteers, roleName);\n\n daySeniorNameList = []\n for (let i = 0; i < volunteerDays.length; i++) {\n daySeniorNameList.push([]);\n }\n\n for (let i = 0; i < volunteerDays.length; i++) {\n for (let j = 0; j < seniors.length; j++) {\n seniorDays = getRoleDays(seniors, seniors[j].name);\n for (let x = 0; x < seniorDays.length; x++) {\n if (volunteerDays[i] == seniorDays[x]) {\n if (daySeniorNameList[i].includes(volunteerDays[i]) == false) {\n daySeniorNameList[i].push(volunteerDays[i]);\n }\n daySeniorNameList[i].push(seniors[j].name);\n }\n }\n\n }\n }\n return daySeniorNameList;\n }\n\n function getSeniorsbyTimeAvailability(seniors, volunteers, seniorsNameDayed, volunteerName) {\n // Return names of seniors that matches volunteer's times as an array\n // seniorsNameDayed are all the seniors that are available on the same day as the volunteer as an array\n\n function mainTimeMatcher(times1, times2) {\n function getHours(time) {\n return time.slice(0, time.indexOf(\":\"));\n }\n\n function getMinutes(time) {\n return time.slice(time.indexOf(\":\") + 1, time.length - 1);\n }\n\n function calculateSlotTime(time1, time2) {\n var hours = getHours(time2) - getHours(time1);\n var minutes = 0;\n if (getMinutes(time1) > getMinutes(time2)) {\n hours -= 1;\n minutes = getMinutes(time2) + 60 - getMinutes(time1);\n } else {\n minutes = getMinutes(time2) - getMinutes(time1);\n }\n return hours * 60 + minutes;\n }\n\n function getStartTime(time) {\n return time[0];\n }\n\n function getEndTime(time) {\n return time[1];\n }\n /*\n times1: [\t\t\t\t\t\t\ttrue\n ['9:00', '10:00'],\n ['13:45', '15:00'],\n ['17:50', '20:50']\n ]\n times2: [\t\t\t\t\t\t\tfalse\n ['10:00', '12:00'],\n ['13:30', '16:45'],\n ['18:00', '19:00']\n ]\n */\n var timesToget = [];\n var sessionLength = 10; // In minutes\n\n var index1 = 0;\n var index2 = 0;\n var main = true;\n while (index1 < times1.length && index2 < times2.length) {\n // Check which start time of the first time comes first\n if (getHours(times1[index1][0]) < getHours(times2[index2][0])) {\n main = false;\n } else if (getHours(times1[index1][0]) === getHours(times2[index2][0])) {\n if (getMinutes(times1[index1][0]) < getMinutes(times2[index2][0])) {\n main = false;\n }\n }\n\n if (!main) {\n // Times 2 slot in fully inside Times 1 slot\n if (calculateSlotTime(getStartTime(times2[index2]), getEndTime(times2[index2])) >= sessionLength && getStartTime(times1[index1]) <= getStartTime(times2[index2]) && getEndTime(times1[index1]) >= getEndTime(times2[index2])) {\n timesToget.push([getStartTime(times2[index2]), getEndTime(times2[index2])]);\n } else if (calculateSlotTime(getStartTime(times2[index2]), getEndTime(times1[index1])) >= sessionLength) {\n timesToget.push([getStartTime(times2[index2]), getEndTime(times1[index1])]);\n } else if (index1 < times1.length - 2) {\n if (calculateSlotTime(getStartTime(times1[index1 + 1]), getEndTime(times2[index2])) >= sessionLength) {\n timesToget.push([getStartTime(times1[index1 + 1]), getEndTime(times2[index2])]);\n }\n }\n\n } else {\n if (calculateSlotTime(getStartTime(times1[index1]), getEndTime(times1[index1])) >= sessionLength && getStartTime(times2[index2]) <= getStartTime(times1[index1]) && getEndTime(times2[index2]) >= getEndTime(times1[index1])) {\n timesToget.push([getStartTime(times1[index1]), getEndTime(times1[index1])]);\n } else if (calculateSlotTime(getStartTime(times1[index1]), getEndTime(times2[index2])) >= sessionLength) {\n timesToget.push([getStartTime(times1[index1]), getEndTime(times2[index2])]);\n } else if (index2 < times2.length - 2) {\n if (calculateSlotTime(getStartTime(times2[index2 + 1]), getEndTime(times1[index1])) >= sessionLength) {\n timesToget.push([getStartTime(times2[index2 + 1]), getEndTime(times1[index1])]);\n }\n }\n }\n index1 += 1;\n index2 += 1;\n }\n return timesToget;\n /* \n [['13:30','16:45'],['10:00','12:00']]\n */\n }\n // END OF MainTimeMatcher\n\n var allTimes = [];\n /* Example \n allTimes = [\n {name: \"Nancy\", times: [[0, '13:30','16:45'],[4, '10:00','12:00']]}\n {name: \"Walter\", times: [[5, '13:00','14:00'],[6, '15:00','19:00']]}\n ]\n */\n for (var i = 0; i < seniorsNameDayed.length; i++) {\n for (var j = 1; j < seniorsNameDayed[i].length; j++) {\n var weekday = seniorsNameDayed[i][0];\n var seniorsName = seniorsNameDayed[i][j];\n var volunteerTime = getTimeOnWeekDay(volunteers, volunteerName, weekday);\n var seniorTime = getTimeOnWeekDay(seniors, seniorsName, weekday);\n if (volunteerTime != [[]] && seniorTime != [[]]) {\n var x = mainTimeMatcher(volunteerTime, seniorTime);\n if (x.length != 0) {\n // x = [['13:30','16:45'],['10:00','12:00']]\n // Iterate through the time slots\n var p = [];\n for (var z = 0; z < x.length; z++) {\n var y = [weekday];\n y.push(x[z][0]);\n y.push(x[z][1]);\n p.push(y);\n }\n allTimes.push({ name: seniorsName, times: p});\n }\n }\n }\n }\n return allTimes;\n }\n\n var finals = [];\n\n for (var i = 0; i < volunteers.length; i++) {\n var volunteerName = volunteers[i].name;\n var seniorsNameDayed = getSeniorsbyDayAvailability(volunteerName);\n var x = getSeniorsbyTimeAvailability(seniors, volunteers, seniorsNameDayed, volunteerName);\n finals.push({ name: volunteerName, matches: x });\n }\n\n return finals;\n}", "title": "" }, { "docid": "010fe764b8c18c450dd8ec53dc3bf704", "score": "0.5220865", "text": "function fetchEventMatches(props, event_key) {\n var app_id = props.getProperty(\"tba_app_id\");\n var headers = {\"X-TBA-App-Id\": app_id};\n\n var result = UrlFetchApp.fetch(\"https://www.thebluealliance.com/api/v2/event/\"+event_key+\"/matches\", {\"headers\" : headers});\n return JSON.parse(result.getContentText());\n}", "title": "" }, { "docid": "f689de25a3f62d276257630b8dd3c473", "score": "0.5125712", "text": "getMatchesByID(ids, callback, opts = {}) {\n let query = { $or: [] };\n for (let i in ids) {\n query.$or.push({ _id: ids[i] });\n }\n\n this.getMatches(query, callback, opts);\n }", "title": "" }, { "docid": "1ee4364c279460daa07f6c89be1b6b05", "score": "0.51015615", "text": "function matchKeyValue2(collection, source) {\n\t//Return an array of keys from source Object\n\tvar sourceKeys = Object.keys(source);\n\tconsole.log(sourceKeys);\n\n\treturn collection.filter((object) => {\n return sourceKeys.every((key) => {\n return object.hasOwnProperty(key) && object[key] === source[key];\n });\n\t});\n\t\n}", "title": "" }, { "docid": "3238bcdaddbe409eeccd40cc30e12567", "score": "0.5073527", "text": "filterEvents(events, searchValue) {\n let filteredEvents = events.slice();\n filteredEvents = filteredEvents.filter((event) => {\n let eventKeys = Object.keys(event);\n let i = 0;\n let foundLogo = false;\n // Do not filter by logo address\n while(!foundLogo&&i<eventKeys.length) {\n if(eventKeys[i]===\"logo\") {\n foundLogo=true;\n eventKeys.splice(i,1);\n }\n i++;\n }\n let eventValues = eventKeys.map((eventKey) => {\n return event[eventKey];\n });\n // If some of the values contain the search input, return true\n return eventValues.some((eventValue) => {\n return eventValue.toString().toLocaleLowerCase().includes(searchValue.toLocaleLowerCase());\n });\n });\n return filteredEvents;\n }", "title": "" }, { "docid": "d97d311e6717f2769ee453b446a2a0ee", "score": "0.5065688", "text": "function filterByNameAndIsForAdults(name, isForAdults) {\n var fiterByIsForAdults = [];\n var filterByName = [];\n\n for (let ev of eventCollection) {\n\n if (ev.name.indexOf(name) > -1) {\n filterByName.push(ev);\n }\n }\n\n for (let ev of filterByName) {\n\n if (ev.isForAdults == isForAdults) {\n fiterByIsForAdults.push(ev);\n }\n }\n\n for (let ev of fiterByIsForAdults) {\n console.log(\"Your filtered events are: \" + ev.name)\n }\n}", "title": "" }, { "docid": "e13ffac874a7cc07fb0ef1e69c27289d", "score": "0.50417536", "text": "function filter_activeMeds( matches, asOfDate ){\n var now = asOfDate || new Date(),\n toReturn = new hQuery.CodedEntryList();\n\n for( var i = 0, L = matches.length; i < L; i++ ){\n var drug = matches[ i ],\n start = drug.indicateMedicationStart().getTime(),\n pad =( drug.indicateMedicationStop().getTime() - start )* 1.2,\n end = start + pad;\n\n if( start <= now && now <= end )\n toReturn.push( drug );\n }\n return toReturn;\n}", "title": "" }, { "docid": "7491ef45fa153d850006fef577881f1a", "score": "0.49985394", "text": "static getMatches (email, callback) {\n const query = [];\n this.findReal(\"Conversations\", {email1: email}, undefined, (matches1) => {\n for (let i = 0; i < matches1.length; i++) {\n query.push({email: matches1[i].email2});\n }\n\n this.findReal(\"Conversations\", {email2: email}, undefined, (matches2) => {\n for (let i = 0; i < matches2.length; i++) {\n query.push({email: matches2[i].email1});\n }\n\n if (query.length === 0) {\n callback([]);\n return;\n }\n\n this.findReal(\"Users\", {$or: query}, undefined, (u) => {\n callback(u)\n });\n });\n });\n }", "title": "" }, { "docid": "f48f0d5b2bd67b5fb228c8637c631a7a", "score": "0.49964008", "text": "function getAllCLientsByEvent(event, filterBy) {\n\n for (let client of event.clientCollection) {\n if (filterBy && isMale == filterBy) {\n console.log(client);\n }\n }\n}", "title": "" }, { "docid": "49009dbd3ec08a70efc554a2a27cf940", "score": "0.49958482", "text": "function removeEventSources(matchInputs) {\n\t\tif (matchInputs == null) {\n\t\t\tremoveSpecificEventSources(sources, true); // isAll=true\n\t\t}\n\t\telse {\n\t\t\tremoveSpecificEventSources(\n\t\t\t\tgetEventSourcesByMatchArray(matchInputs)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "49009dbd3ec08a70efc554a2a27cf940", "score": "0.49958482", "text": "function removeEventSources(matchInputs) {\n\t\tif (matchInputs == null) {\n\t\t\tremoveSpecificEventSources(sources, true); // isAll=true\n\t\t}\n\t\telse {\n\t\t\tremoveSpecificEventSources(\n\t\t\t\tgetEventSourcesByMatchArray(matchInputs)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "49009dbd3ec08a70efc554a2a27cf940", "score": "0.49958482", "text": "function removeEventSources(matchInputs) {\n\t\tif (matchInputs == null) {\n\t\t\tremoveSpecificEventSources(sources, true); // isAll=true\n\t\t}\n\t\telse {\n\t\t\tremoveSpecificEventSources(\n\t\t\t\tgetEventSourcesByMatchArray(matchInputs)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "49009dbd3ec08a70efc554a2a27cf940", "score": "0.49958482", "text": "function removeEventSources(matchInputs) {\n\t\tif (matchInputs == null) {\n\t\t\tremoveSpecificEventSources(sources, true); // isAll=true\n\t\t}\n\t\telse {\n\t\t\tremoveSpecificEventSources(\n\t\t\t\tgetEventSourcesByMatchArray(matchInputs)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "49009dbd3ec08a70efc554a2a27cf940", "score": "0.49958482", "text": "function removeEventSources(matchInputs) {\n\t\tif (matchInputs == null) {\n\t\t\tremoveSpecificEventSources(sources, true); // isAll=true\n\t\t}\n\t\telse {\n\t\t\tremoveSpecificEventSources(\n\t\t\t\tgetEventSourcesByMatchArray(matchInputs)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "49009dbd3ec08a70efc554a2a27cf940", "score": "0.49958482", "text": "function removeEventSources(matchInputs) {\n\t\tif (matchInputs == null) {\n\t\t\tremoveSpecificEventSources(sources, true); // isAll=true\n\t\t}\n\t\telse {\n\t\t\tremoveSpecificEventSources(\n\t\t\t\tgetEventSourcesByMatchArray(matchInputs)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "076f6cd2b6225fdafa85a89d8d6a829a", "score": "0.49041507", "text": "if (match.participants.find(p => p.user === baseUserId)) {\n // But accumulate a list of the OTHER user (not userA) in said matches\n const matchedParticipant = match.participants.find(p => p.user !== baseUserId)\n if (matchedParticipant) {\n // Look up the user via the id we just retrieved\n\n // Server will not populate participants.user so all we can expect there is an ObjectId string\n // This is to avoid sending all the users twice, once as just users and once under matches.participants.user\n // flow-disable-next-line\n if (Object.prototype.hasOwnProperty.call(userMap, matchedParticipant.user)) {\n acc.push(matchedParticipant.user)\n } else if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n console.log(`Match participant ${matchedParticipant.user} could not be found in users`)\n }\n }\n return acc\n }", "title": "" }, { "docid": "6071199572a0a51f50f946efaf533b09", "score": "0.48854733", "text": "function searchEvent(query){\n \n var eventResults = [];\n\n for (var i=0; i<events.length; i++){\n if (events[i].name == query.toString())\n eventResults.push(events[i]);\n }\n if(eventResults.length == 0){\n return null;\n }\n\n return eventResults;\n}", "title": "" }, { "docid": "15a41be8571480061b8ba8bdb33bce20", "score": "0.48604017", "text": "function getSources(fn) {\n\n\t// Request all media streaming sources\n\tMediaStreamTrack.getSources(sources => {\n\t\t// Call the callback with the filtered list\n\t\tfn(\n\t\t\t// Filter video source only\n\t\t\tsources.reduce(\n\t\t\t\t// Return video sources\n\t\t\t\t(s, source) => source.kind === 'video' ? s.concat(source) : s, \n\t\t\t[])\n\t\t)\n\t})\n}", "title": "" }, { "docid": "6c525fdacf2f358241b56b0773cba137", "score": "0.48452115", "text": "function getMatchingCases() {\r\n\t//set activating status filter here\r\n\tvar flt = new Array();\r\n\tlog('DEBUG','Status to check',objConfig.status);\r\n\tflt[0]=new nlobjSearchFilter(CASE_STATUS_ID,null,'anyof',objConfig.status);\r\n\tif (lastProcessed) {\r\n\t\tflt[1] = new nlobjSearchFilter(INTERNAL_ID_NUM,null,'lessthan',parseInt(lastProcessed));\r\n\t}\r\n\t\r\n\treturn nlapiSearchRecord(CASE_INTERNALID,CASE_SEARCH_ID,flt,null);\r\n}", "title": "" }, { "docid": "0256fb1e77afacdf8128b29c4d82592c", "score": "0.48142236", "text": "function getExistingEventsFilter(incidentId) {\n return { status : \"ACTIVE\", properties : { 'incident_number#en' : incidentId } } \n}", "title": "" }, { "docid": "938d225f176313147823e8cb658731f7", "score": "0.48085117", "text": "function getEnergySources(res, mysql, context, searched, filters_name, filters_arr, complete){\n if (searched === 0){\n var default_search =\"\";\n name_query = default_search.replace(\";\",\"\");\n var inserts = ['renewable','alternative','hydrocarbon', 0, Math.pow(2,127)];\n }\n else{\n name_query = filters_name.replace(\";\",\"\");//protect against stopping query\n var inserts;\n inserts = filters_arr;\n if (filters_arr[0] === \"-\"){\n var inserts = ['renewable','alternative','hydrocarbon', inserts[3], inserts[4]];\n }\n }\n var sql = \"SELECT energy_source_id, energy_source_name, renewable, energy_cost FROM energy_source WHERE energy_source_name LIKE '%\"+name_query+\"%' AND renewable IN (?, ?, ?) AND (energy_cost>=? AND energy_cost<=?)\";\n\n mysql.pool.query(sql, inserts, function(error, results, fields){\n if(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n context.energy_sources = results;\n complete();\n });\n }", "title": "" }, { "docid": "9edc4760eb50bc14b3cd02bc5a923969", "score": "0.47717077", "text": "searchResults(searchText, type) {\n const regex = new RegExp(searchText, \"gi\");\n const matches = this.state.matches;\n const searchMatch = matches.filter(match => {\n if (type === \"searchFilter\") {\n // for search by word\n return match.team1.match(regex);\n } else {\n // for filter by seson\n return match.season.match(regex);\n }\n });\n\n this.setState({\n searchData: searchMatch\n });\n }", "title": "" }, { "docid": "9389aebc002bfedc43240d2b2e46b5bb", "score": "0.47512814", "text": "search(){\n\t\tvar teams = [];\n\t\tvar seasons = [];\n\t\t\n\t\tfor (var i = 0; i < this.state.teams.length; i++){\n\t\t\tif (this.state.teamSelected[i])\n\t\t\t\tteams.push(this.state.teams[i]);\n\t\t}\n\t\t\n\t\tfor (i = 0; i < this.state.seasons.length; i++){\n\t\t\tif (this.state.seasonSelected[i])\n\t\t\t\tseasons.push(this.state.seasons[i]);\n\t\t}\n\t\t\n\t\tvar url = this.createMatchesQuery(this.state.between, this.state.goal_difference, this.state.gd_over, this.state.playoff, this.state.homeMatches, this.state.end_in_overtime, teams, seasons, this.state.startDate, this.state.endDate);\n\t\tthis.getMatches(url);\n\t}", "title": "" }, { "docid": "54bcd4b49b7883f0e9b242ff824cf7d6", "score": "0.47445333", "text": "getEntityMatches(slotName) {\n return this.getEntityResolutions(slotName).filter((authorityResolution) => {\n return authorityResolution.status.code === 'ER_SUCCESS_MATCH';\n });\n }", "title": "" }, { "docid": "7b876a2502ffeaff63b51299691eec3a", "score": "0.4742309", "text": "async function stdEmit (event) {\n const declaration = await reflect();\n const matches = await Promise.all(declaration.subscribers\n .map(async subscriber => [await match({\n //matchers mutate the event! This is unsafe to do in parallel!\n //todo: pick a solution:\n // 1) deep copy the event for each matcher\n // 2) change the API to not have matchers mutate the event\n // 3) expect matchers to deep copy if they return a new event\n event: event,\n pattern: subscriber.pattern\n }), subscriber.reference]));\n const matchAndReferenceTuples = matches\n .filter(resultTuple => resultTuple[0].matched)\n .map(resultTuple => [resultTuple[0].event, resultTuple[1]]);\n\n\n if (matchAndReferenceTuples.length > 1) {\n throw new Error(`Too many matches for ${declaration.name} event\n${JSON.stringify(event, null, 2)}\nMatched with\n ${matchAndReferenceTuples.map(t => t[1]).join(',\\n ')}`);\n }\n if (matchAndReferenceTuples.length === 0) {\n throw new Error(`No match for ${declaration.name} event\n${JSON.stringify(event, null, 2)}`);\n }\n return matchAndReferenceTuples[0];\n\n}", "title": "" }, { "docid": "673c7b7da538623ec21db1627198ac5d", "score": "0.4735422", "text": "function getEventsByEventIds(systemId, eventIds, callback) {\n var results = [];\n async.eachSeries(eventIds, get, function(err) {\n return callback(err, results);\n });\n\n function get(eventId, cb) {\n var params = {\n KeyConditions: {\n SystemId: {\n ComparisonOperator: 'EQ',\n AttributeValueList: [{\n S: systemId\n }]\n },\n EventId: {\n ComparisonOperator: 'EQ',\n AttributeValueList: [{\n S: eventId\n }]\n }\n },\n TableName: tableName,\n IndexName: 'EventIdIndex',\n Select: 'ALL_PROJECTED_ATTRIBUTES'\n };\n db.query(params, function(err, data) {\n if (err) {\n console.log(\"ERROR (getEventsByEventIds)\", err, err.stack);\n return callback(err);\n }\n\n var result;\n if (data && data.Count >= 1) {\n results.push(convertDatabaseItemToEventOccurrence(data.Items[0]).Event);\n }\n\n return cb(undefined);\n });\n }\n}", "title": "" }, { "docid": "f6e9b172ed3faf3345e607e91d65c840", "score": "0.47325715", "text": "function test_1_streamselect() {\n //Filter streams (that do not film the ROI)\n let filteredStreams = filterStreams();\n\n //Cinematic (history only)\n let last_scene = scenes[scenes.length - 1];\n let passed_streams = [];\n for (let i = 0; i < filteredStreams.length; i++) {\n let s_i = filteredStreams[i];\n //check if previously selected\n if (last_scene && (last_scene.currentStreamId == s_i.id || last_scene.previousStreamId == s_i.id)) {\n continue;\n }\n passed_streams.push(s_i);\n }\n\n //remove static streams\n passed_streams = removeStatic(passed_streams);\n\n return passed_streams;\n}", "title": "" }, { "docid": "49695eff1207f32ff8ce91b24a170fc4", "score": "0.47318986", "text": "function getAllMatches(request, response) {\r\n\tvar edges = matchGraph.outEdges(request.session.uid);\r\n\tvar object = {};\r\n\tvar key = \"UIDs\";\r\n\tobject[key] = [];\r\n\tfor (var i = 0; i < edges.length; i++) {\r\n\t\tif (edges[i].name === \"matched\") {\r\n\t\t\tvar data = {uid: edges[i].w};\r\n\t\t\tobject[key].push(data);\r\n\t\t}\r\n\t}\r\n\treturn response.status(200).send(JSON.stringify(object));\r\n}", "title": "" }, { "docid": "8af5c0e552beea3f7d806f2d2aad9b8f", "score": "0.47116607", "text": "getTeamData(teamID, filter, callback) {\n DB.getTeam(teamID, function (err, team) {\n // get the match data\n let query = Object.assign({}, filter);\n\n let players = team.players;\n\n if (!('$or' in query)) {\n query.$or = [];\n }\n\n let t0queries = [];\n let t1queries = [];\n if (team.players.length <= 5) {\n // all players need to be in a team somewhere\n for (const i in players) {\n t0queries.push({ 'teams.0.ids': players[i] });\n t1queries.push({ 'teams.1.ids': players[i] });\n }\n } else {\n // basically we need a match 5 of the players and then we're ok\n for (let i = 0; i < 5; i++) {\n const t0key = 'teams.0.ids.' + i;\n const t1key = 'teams.1.ids.' + i;\n\n let t0arg = {};\n t0arg[t0key] = { $in: players };\n let t1arg = {};\n t1arg[t1key] = { $in: players };\n\n t0queries.push(t0arg);\n t1queries.push(t1arg);\n }\n }\n\n query.$or.push({ $and: t0queries });\n query.$or.push({ $and: t1queries });\n\n // execute\n DB.getMatches(query, function (err, matches) {\n // then get the hero data\n let matchIDs = [];\n for (let i in matches) {\n matchIDs.push(matches[i]._id);\n }\n\n // only want specific users\n let query2 = {\n $and: [\n { ToonHandle: { $in: team.players } },\n { 'with.ids.0': { $in: team.players } },\n { 'with.ids.1': { $in: team.players } },\n { 'with.ids.2': { $in: team.players } },\n { 'with.ids.3': { $in: team.players } },\n { 'with.ids.4': { $in: team.players } },\n ],\n };\n\n DB.getHeroDataForMatches(matchIDs, query2, function (err, heroData) {\n // and now finally load the team data\n callback(team, matches, heroData);\n });\n });\n });\n }", "title": "" }, { "docid": "199fee50e93f6b2d1407fdbb74b47590", "score": "0.4710136", "text": "function findMatchesById(user_id) {\n const id = user_id;\n\n return db.raw(`SELECT * FROM user_match JOIN users ON (users.user_id = user_match.requestee OR users.user_id = user_match.requester) AND NOT users.user_id = ${id} WHERE (user_match.requestee = ${id} OR user_match.requester = ${id}) AND user_match.matched = 1`);\n\n}", "title": "" }, { "docid": "8806992d121dfe9d287f83e7af1c8834", "score": "0.47077772", "text": "match(str, options) {\n let arr = [];\n for(let i = 0; i < this.sentences.length; i++) {\n arr = arr.concat(this.sentences[i].match(str, options));\n }\n return arr;\n }", "title": "" }, { "docid": "ce271841f4d31ba08cfbc02d96c2e6b4", "score": "0.47058725", "text": "function findMatches(arreys, ...arguments) {\n const matches = []; // Don't change this line\n for (argument of arguments) {\n if (arreys.includes(argument))\n matches.push(argument)\n }\n \n // Change code above this line\n return matches;\n}", "title": "" }, { "docid": "68352259b3fc13dc0e64348dc93fc91a", "score": "0.47011784", "text": "function filterEvents(orgFilterValue, tagsFilterValue, timeFilterValue, allEvents, setFilteredEvents) {\n if (allEvents == null || allEvents.length === 0) {\n return;\n }\n var filteredEvents = allEvents\n if (orgFilterValue != null) {\n filteredEvents = filteredEvents.filter(event => event.extendedProps.org.includes(orgFilterValue.uId))\n }\n if (tagsFilterValue.length > 0) {\n filteredEvents = filteredEvents.filter(event => {\n if (event.extendedProps.tags == null)\n return false\n else\n return tagsFilterValue.some(tag => event.extendedProps.tags.includes(tag.name))\n })\n }\n if (timeFilterValue[0] > 0) {\n filteredEvents = filteredEvents.filter(event => {\n if (event.allDay != null && event.allDay) {\n return true;\n }\n const startTime = new Date(new Date(event.start).toLocaleString())\n const startTimeMinutes = startTime.getHours() * 60 + startTime.getMinutes()\n return timeFilterValue[0] <= startTimeMinutes;\n })\n }\n if (timeFilterValue[1] < 1440) {\n filteredEvents = filteredEvents.filter(event => {\n if (event.allDay != null && event.allDay) {\n return true;\n }\n const endTime = new Date(new Date(event.end).toLocaleString())\n const endTimeMinutes = endTime.getHours() * 60 + endTime.getMinutes()\n return timeFilterValue[1] >= endTimeMinutes;\n })\n }\n return filteredEvents;\n}", "title": "" }, { "docid": "89cb9c2164b18d82f332d6e3daa28438", "score": "0.4699474", "text": "static setMatchesResults() {\r\n const matches = this.session.getMatches()\r\n const results = this.getResultsAsMap()\r\n\r\n for (const match of matches) {\r\n if (match.timeP1 !== Match.getSatValue()) {\r\n match.timeP2 = results[match.cabeceiro.name][match.peseiro.name] //\r\n }\r\n }\r\n }", "title": "" }, { "docid": "97950833d6891f9dda2973b7d5e613ba", "score": "0.46924347", "text": "function match (stream, selector, options = {}) {\n const scopes = []\n const properties = []\n const emitter = walk(stream, options)\n const matches = new Hoopy(options.bufferLength || DEFAULT_BUFFER_LENGTH)\n let streamOptions\n const { highWaterMark } = options\n if (highWaterMark) {\n streamOptions = { highWaterMark }\n }\n const results = new DataStream(read, streamOptions)\n\n let selectorFunction, selectorString, resume\n let coerceNumbers = false\n let awaitPush = true\n let isEnded = false\n let length = 0\n let index = 0\n\n if (check.function(selector)) {\n selectorFunction = selector\n selector = null\n } else {\n coerceNumbers = !! options.numbers\n\n if (check.string(selector)) {\n check.assert.nonEmptyString(selector)\n selectorString = selector\n selector = null\n } else {\n check.assert.instanceStrict(selector, RegExp)\n }\n }\n\n emitter.on(events.array, array)\n emitter.on(events.object, object)\n emitter.on(events.property, property)\n emitter.on(events.endArray, endScope)\n emitter.on(events.endObject, endScope)\n emitter.on(events.string, value)\n emitter.on(events.number, value)\n emitter.on(events.literal, value)\n emitter.on(events.end, end)\n emitter.on(events.error, error)\n emitter.on(events.dataError, dataError)\n\n return results\n\n function read () {\n if (awaitPush) {\n awaitPush = false\n\n if (isEnded) {\n if (length > 0) {\n after()\n }\n\n return endResults()\n }\n }\n\n if (resume) {\n const resumeCopy = resume\n resume = null\n resumeCopy()\n after()\n }\n }\n\n function after () {\n if (awaitPush || resume) {\n return\n }\n\n let i\n\n for (i = 0; i < length && ! resume; ++i) {\n if (! results.push(matches[i + index])) {\n pause()\n }\n }\n\n if (i === length) {\n index = length = 0\n } else {\n length -= i\n index += i\n }\n }\n\n function pause () {\n resume = emitter.pause()\n }\n\n function endResults () {\n if (! awaitPush) {\n results.push(null)\n }\n }\n\n function array () {\n scopes.push([])\n }\n\n function object () {\n scopes.push({})\n }\n\n function property (name) {\n properties.push(name)\n }\n\n function endScope () {\n value(scopes.pop())\n }\n\n function value (v) {\n let key\n\n if (scopes.length > 0) {\n const scope = scopes[scopes.length - 1]\n\n if (Array.isArray(scope)) {\n key = scope.length\n } else {\n key = properties.pop()\n }\n\n scope[key] = v\n }\n\n if (v === null) {\n return\n }\n\n if (selectorFunction) {\n if (selectorFunction(key, v, scopes.length)) {\n push(v)\n }\n } else {\n if (coerceNumbers && typeof key === 'number') {\n key = key.toString()\n }\n\n if ((selectorString && selectorString === key) || (selector && selector.test(key))) {\n push(v)\n }\n }\n }\n\n function push (v) {\n if (length + 1 === matches.length) {\n pause()\n }\n\n matches[index + length++] = v\n\n after()\n }\n\n function end () {\n isEnded = true\n endResults()\n }\n\n function error (e) {\n results.emit('error', e)\n }\n\n function dataError (e) {\n results.emit('dataError', e)\n }\n}", "title": "" }, { "docid": "059f236613640b1450b560fbc290713d", "score": "0.4684292", "text": "searchByLogGroupName(logName){\n let key = this.props.location.state.search_keyword\n let range = this.props.location.state.range;\n let keySplit = key.split(\" \");\n let arrayKeyWords = [];\n keySplit.forEach(element => {\n arrayKeyWords.push(\"?\" + element) //adds the OR sign to word\n arrayKeyWords.push(\"?\" + element.toUpperCase()) //adds uppercase word\n arrayKeyWords.push(\"?\" + element.toLowerCase()) //adds lowercase word\n arrayKeyWords.push(\"?\" + element.charAt(0).toUpperCase() + element.slice(1).toLowerCase()) //adds uppercase to first letter word\n });\n\n //build filter pattern\n let search_pattern = \"\"\n arrayKeyWords.forEach((element, i) => {\n if(i < arrayKeyWords.length - 1){\n search_pattern += element + \" \"\n }else{\n search_pattern += element \n }\n \n });\n\n if(range !== \"all\"){\n let start = this.props.location.state.startTime\n let end = this.props.location.state.endTime\n if(Math.sign(end) === -1){\n start = this.state.startDate\n end = this.state.endDate.getTime() - Math.abs(end)\n\n }\n var params = {\n logGroupName: logName, /* required */\n endTime: start,\n filterPattern: search_pattern, /*keyword passed by the user */\n startTime: end\n // limit: 1000, \n };\n }else{\n var params = {\n logGroupName: logName, /* required */\n filterPattern: search_pattern /*keyword passed by the user */\n };\n }\n cloudwatchlogs.filterLogEvents(params, function(err, data) {\n if(err){\n console.log(err, err.stack); // an error occurred\n }else{ \n if(data.events.length > 0){\n let resultData = {\n logGroupName: \"\",\n events: []\n }\n\n var new_data = Object.create(resultData); \n new_data.logGroupName = logName;\n new_data.events = data.events\n this.setState(prevState => ({\n results : [...prevState.results, new_data]\n }));\n }\n if(this.state.results.length > 0){\n this.setState({ loading: false})\n } \n } \n setTimeout(() => \n {\n this.setState({ loading: false})\n }, 5000); \n }.bind(this));\n }", "title": "" }, { "docid": "2a25f61cc25f567e3ba41059217cc868", "score": "0.46811917", "text": "async match(...args) {\n return (await this.matchAll(...args))[0]\n }", "title": "" }, { "docid": "4b71f1743c4610ebc6dbab39b592d8a1", "score": "0.46768692", "text": "function eventValuesForField(events, searchProp) {\n var result = [];\n for(var eid in events) {\n for (var evProp in events[eid]) {\n if (evProp === searchProp) {\n result.push(events[eid][evProp]);\n }\n }\n }\n return result;\n }", "title": "" }, { "docid": "67d98b7d6539910cbf2410191e7b7ec9", "score": "0.46604338", "text": "function rangeSearch(dateOne, dateTwo) {\n client.search({\n index: 'myindex',\n body: {\n \"query\" : {\n \"match_all\" : {}\n },\n filter : {\n range : {\n date_started : {\n gte: dateOne,\n lte: dateTwo\n }\n }\n }\n }\n }, function (error, response) {\n //console.log(response.hits.hits);\n });\n}", "title": "" }, { "docid": "07d04bf6f71f05cf7e15c1dc18194aee", "score": "0.4660264", "text": "getStaticEntityMatches(slotName) {\n return this.getEntityResolutions(slotName).filter((authorityResolution) => {\n return (authorityResolution.status.code === 'ER_SUCCESS_MATCH' &&\n authorityResolution.authority.startsWith('amzn1.er-authority.echo-sdk.amzn1'));\n });\n }", "title": "" }, { "docid": "fcc710b1dcae10917260589e964771a3", "score": "0.46437517", "text": "function getEvents(deviceid, cb) {\n eventLog.filter({device: {id:deviceid}}).then(function(res) {\n cb(null, res);\n }).error(function(err) {\n cb({error: \"Not found.\", message: err});\n });\n}", "title": "" }, { "docid": "35701ccad371e2da2c129c011b25a3ad", "score": "0.4633698", "text": "function SearchMatches(query, log) {\n if (log instanceof ActLogModel) {\n return query.test(log.Location()) || query.test(log.Description());\n }\n else {\n var values = [log.Description(), log.Employer(), log.Contact(),\n log.Address(), log.City(), log.State()];\n for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {\n var val = values_1[_i];\n if (query.test(val) === true) {\n return true;\n }\n }\n return false;\n }\n}", "title": "" }, { "docid": "a1018c049d9a82237b22a19518e28bf1", "score": "0.46302098", "text": "function getEventSources() {\n\t\t\t\t\tvar eventSources = [];\n\n\t\t\t\t\t// arrayEventSources\n\t\t\t\t\tif ($scope.model.arrayEventSources && $scope.model.arrayEventSources.length) {\n\t\t\t\t\t\teventSources = eventSources.concat($scope.model.arrayEventSources);\n\t\t\t\t\t}\n\n\t\t\t\t\t// functionEventSources\n\t\t\t\t\tfor (var i = 0; $scope.model.functionEventSources && i < $scope.model.functionEventSources.length; i++) {\n\t\t\t\t\t\teventSources.push(transformFunctionEventSource($scope.model.functionEventSources[i]))\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// GoogleFeedEventSources\n\t\t\t\t\tif ($scope.model.gcalEventSources && $scope.model.gcalEventSources.length) {\n\t\t\t\t\t\teventSources = eventSources.concat($scope.model.gcalEventSources);\n\t\t\t\t\t}\n\n\t\t\t\t\t// TODO add other resources if available\n\t\t\t\t\treturn eventSources;\n\t\t\t\t}", "title": "" }, { "docid": "affee2943a7ebc4b57e40878b77f48f8", "score": "0.46202424", "text": "function filterBySeries(list) {\n //the events are ordered by start date in the events query\n //the first event mapped will be the soonest to start.\n const seriesIDs = [];\n const fliteredList = [];\n list.map((event) => {\n if (!event.SeriesUID) {\n fliteredList.push(event);\n }\n if (seriesIDs.indexOf(event.SeriesUID) == -1) {\n seriesIDs.push(event.SeriesUID);\n fliteredList.push(event);\n }\n });\n return fliteredList;\n}", "title": "" }, { "docid": "1f01303e21e39fec3ebcee1cdd1266e7", "score": "0.46192068", "text": "getByExpertIdForMatching(expertId, cb)\n {\n Booking.getManyByQuery({ expertId }, { select: select.expertMatching }, cb)\n }", "title": "" }, { "docid": "c02e0485bdc42d34f5875f4bf6a75ed2", "score": "0.46161327", "text": "function search_results(matched_q_id){\n\tvar results=[];\n\tfor (var i=0;i<matched_q_id.length;i++){\n\t\tvar single_result = [];\n\t\tconnection.query('SELECT short_description,update_date,preview_path,video_link FROM Question WHERE q_id=?',[matched_q_id[i]],function(err,results){\n\t\t\tif(err) throw err;\n\t\t\tsingle_result.push(results[0]['short_description'],results[0]['update_date'],results[0]['preview_path'],results[0]['video_link']);\n\t\t});\n\t results.push(single_result);\n\t}\n\treturn (results);\n}", "title": "" }, { "docid": "012df7e269c9bdbb995354ca3b7ddfcc", "score": "0.46149495", "text": "async getMatchByTs(order, limit){\n console.log(`* Getting ${limit} Match(es) in order: ${order}`);\n let _collection = this._collections.game;\n let _result = await this._dbApi.orderBy(_collection.name, {}, 'matchCreatedTime', order, limit);\n console.log(`* Total Match Get: ${_result.length}`);\n return _result;\n }", "title": "" }, { "docid": "68acb0d80e2d6ec39f78f3606e1eb05f", "score": "0.4607199", "text": "function search2(object){\n let searchMatches = [];\n if (object === undefined || Object.keys(object).length === 0) {\n return collection;\n }\n for (let album of collection){\n if (album.artist === object.artist && album.year === object.year){\n searchMatches.push(album);\n }\n }\n return searchMatches;\n}", "title": "" }, { "docid": "96388c277fe756e5971dbacc7906f75a", "score": "0.45910344", "text": "function matchInfo(mid) {\n var url = \"http://osu.ppy.sh/community/matches/\" + mid.toString();\n var result = UrlFetchApp.fetch(url);\n if (result.getResponseCode() == 200) {\n var text = result.getContentText();\n var json_start = '<script id=\"json-events\" type=\"application/json\">';\n var json_end = \"</script>\";\n\n var start_idx = indexOf(text, json_start, 0);\n var end_idx = indexOf(text, json_end, start_idx);\n\n if (start_idx == end_idx) return null;\n\n var json_data = text.substring(start_idx, end_idx - json_end.length);\n var data = JSON.parse(json_data);\n\n // NB(daw): for now, we only care about actual map-played events\n // not about host-changed events or w/e\n // this reduces the size of the data returned\n // we can change this if we're eventually interested in non-map events\n\n var events = data[\"events\"];\n var res = [];\n for (var i = 0; i < events.length; i++) {\n if (\"game\" in events[i]) {\n res.push(events[i][\"game\"]);\n }\n }\n\n return res;\n }\n}", "title": "" }, { "docid": "b5c5ed980ae84f33b0325d613a57a7a4", "score": "0.45903042", "text": "lookupFunktionsByRange(start, end) {\n let results = [];\n this.idToScript.forEach(script => {\n script.forEach(funktion => {\n if (funktion.startPostion == start && funktion.endPosition == end) {\n results.push(funktion);\n }\n });\n });\n return results;\n }", "title": "" }, { "docid": "cbbcf07efb0bd705c87540567a783e6c", "score": "0.4587354", "text": "function getMatches() {\n return Match.findAll();\n}", "title": "" }, { "docid": "f6e0c87e1af8c4aa5354ff0fde4120b9", "score": "0.45796245", "text": "function getTeams(matches) {\n\t\t\t\t//you have the setting Id\n\t\t\t\t$http.get('api/teams/' + $stateParams.id)\n\t\t\t\t\t.then(function onSuccess(response) {\n\t\t\t\t\t\tvar theUsers = []\n\t\t\t\t\t\tresponse.data.users.forEach(function(user) {\n\t\t\t\t\t\t\t//match the user's email to the mathcing progress email\n\t\t\t\t\t\t\tmatches.forEach(function(prog) {\n\t\t\t\t\t\t\t\tif (prog.users.map(x => x.email).includes(user.email)) {\n\t\t\t\t\t\t\t\t\ttheUsers.push(prog.users)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t})\n\t\t\t\t\t\tvar usersQuery = theUsers.reduce((x,y) => {x.concat(y)})\n\t\t\t\t\t})\n\t\t\t\t\t.catch(function onError(response){\n\t\t\t\t\t\tconsole.log(response.data)\n\t\t\t\t\t})\n\t\t\t}", "title": "" }, { "docid": "3ca54b09bf9dc1d9807da847c2667a6e", "score": "0.45679486", "text": "function filterByStudent (inputSID) {\n var idMatch = [];\n for(var i=0; i<testData.length; i++) { \n if (testData[i].studentId==inputSID) {\n idMatch.push(testData[i]);\n }\n};\nreturn idMatch;\n}", "title": "" }, { "docid": "564f9d6f879e72ccce6d20b648243df3", "score": "0.45649996", "text": "function findMatches(store, crit, strategy) {\n for (var data = store.get(), i = 0; i < data.length && (isLimit ? (matches.length < limit) : true); i++) {\n findMatchesInObject(data[i], crit, strategy);\n }\n return matches;\n }", "title": "" }, { "docid": "bf7bf7f0ad5389ccea7d57222de26f01", "score": "0.4563562", "text": "function dateMatches(d, matches) {\n if (!matches) {\n return;\n }\n matches = (matches.length === undefined) ? [matches] : matches;\n var foundMatch = false;\n matches.forEach(function(match) {\n if (match.length === 2) {\n if (dateInRange(match[0], match[1], d)) {\n foundMatch = true;\n }\n } else {\n if (iso(match) === iso(d)) {\n foundMatch = true;\n }\n }\n });\n return foundMatch;\n }", "title": "" }, { "docid": "431ca0ee27c3e08a8bfb4bc3f745ff9b", "score": "0.45580977", "text": "getDocumentsMatchingQuery(t, e, n, s) {\n // Queries that match all documents don't benefit from using\n // key-based lookups. It is more efficient to scan all documents in a\n // collection, rather than to perform individual lookups.\n return function(t) {\n return 0 === t.filters.length && null === t.limit && null == t.startAt && null == t.endAt && (0 === t.explicitOrderBy.length || 1 === t.explicitOrderBy.length && t.explicitOrderBy[0].field.isKeyField());\n }(e) || n.isEqual(it.min()) ? this.Fn(t, e) : this.On.Pn(t, s).next((i => {\n const r = this.Mn(e, i);\n return (we(e) || _e(e)) && this.Ln(e.limitType, r, s, n) ? this.Fn(t, e) : (N() <= LogLevel.DEBUG && k(\"QueryEngine\", \"Re-using previous result from %s to execute query: %s\", n.toString(), Re(e)), \n this.On.getDocumentsMatchingQuery(t, e, n).next((t => (\n // We merge `previousResults` into `updateResults`, since\n // `updateResults` is already a DocumentMap. If a document is\n // contained in both lists, then its contents are the same.\n r.forEach((e => {\n t = t.insert(e.key, e);\n })), t))));\n }));\n // Queries that have never seen a snapshot without limbo free documents\n // should also be run as a full collection scan.\n }", "title": "" }, { "docid": "04a6d66a2581d537ae24fedf85ae2df4", "score": "0.45535418", "text": "function searchInRosters(list, searchStart, searchEnd) {\n let rosters = list.filter(r => {\n let startDate = new Date(r.fldOpRStartDate)\n let startTime = new Date(r.fldOpRStartTime)\n let endDate = new Date(r.fldOpREndDate)\n let endTime = new Date(r.fldOpREndTime)\n\n let startMatch = searchStart.getYear() === startDate.getYear() &&\n searchStart.getMonth() === startDate.getMonth() &&\n searchStart.getDate() === startDate.getDate() && \n searchStart.getHours() === startTime.getHours() &&\n searchStart.getMinutes() === startTime.getMinutes() &&\n searchStart.getSeconds() === startTime.getSeconds()\n if (!startMatch) return false\n\n let endMatch = searchEnd.getYear() === endDate.getYear() &&\n searchEnd.getMonth() === endDate.getMonth() &&\n searchEnd.getDate() === endDate.getDate() &&\n searchEnd.getHours() === endTime.getHours() &&\n searchEnd.getMinutes() === endTime.getMinutes() &&\n searchEnd.getSeconds() === endTime.getSeconds()\n if (!endMatch) return false\n return true\n })\n return rosters\n}", "title": "" }, { "docid": "7786211a8caef27568c0ef3167302935", "score": "0.45398867", "text": "filterNewsIn(filterStr) {\n let result = [];\n this.allNews.forEach((item) => {\n if (item.description.includes(String(filterStr))\n || item.description.toLowerCase()\n .includes(String(filterStr))) {\n result.push(item);\n }\n });\n\n this.emit('filterNews', result);\n }", "title": "" }, { "docid": "2a5115d55e1dee235af3c5f01366921e", "score": "0.4539124", "text": "filterSourceElementsByKey(key, options = {}) {\n const filteredElements = new AggregateSourceElements();\n this.forEach((aseMap) => {\n if (options.fuzzy) {\n const [fuzzyMdType, mdName = ''] = key.split('__');\n aseMap.forEach((ase, aseKey) => {\n let [type, name] = aseKey.split('__');\n name = mdName === '' ? '' : name;\n // This ASE matches if:\n // 1. The metadata type fuzzy matches *AND*\n // 2. The metadata type is \"CustomLabel\" and belongs to this ASE *OR*\n // 3. The metadata names are the same\n if (type.includes(fuzzyMdType)) {\n if (fuzzyMdType === 'CustomLabel' && name !== '') {\n // Special handling for an individual CustomLabel.\n // Must find it within the labels source file to match.\n const sourcePath = ase.getMetadataFilePath();\n if (nonDecomposedElementsIndex_1.NonDecomposedElementsIndex.belongsTo(sourcePath, `CustomLabels__${mdName}`)) {\n filteredElements.setIn(ase.getPackageName(), aseKey, ase);\n }\n }\n else if (name === mdName) {\n filteredElements.setIn(ase.getPackageName(), aseKey, ase);\n }\n }\n });\n }\n else {\n if (aseMap.has(key)) {\n const ase = aseMap.get(key);\n filteredElements.setIn(ase.getPackageName(), ase.getKey(), ase);\n }\n }\n });\n return filteredElements;\n }", "title": "" }, { "docid": "ebe9196ce0f0df57865bc8d4f021d362", "score": "0.45297623", "text": "mapMatchesInGroup(group) {\n const matchesInGroup = this.props.groups[group].matches.map(\n match => match);\n return matchesInGroup;\n }", "title": "" }, { "docid": "8bea748919d42322b3e202dc13f5c362", "score": "0.4528519", "text": "function getFilteredEvents(e) {\n var singleDay = isSameDay(new Date(e.data.startTime),new Date(e.data.endTime))\n\n if (singleDay) {\n return isSameDay(new Date(e.data.startTime), new Date(currSelected))\n }\n return isWithinInterval(new Date(currSelected), { start: new Date(e.data.startTime), end: new Date(e.data.endTime)})\n }", "title": "" }, { "docid": "26ee782c9c406153c0ad390e5963a881", "score": "0.45277122", "text": "function lookUpTeam(team, callback) {\n\n var id = team.teamId, userTeamName = team.teamName;\n let opponentTeamIdsToFetch = [];\n var fetchedSubflight = false;\n let totalUnplayedMatches = 0;\n async.series([\n //Load user to get `userId` first\n function(callback2) {\n Api.get(`<API_ENDPOINT>?iTeamID=${encodeURIComponent(id)}`).then(resp => {\n let doc = parser.parseFromString(Parser.decodeXml(resp), 'text/xml');\n\n let teamName = doc.getElementsByTagName('teamname')[0].childNodes[0].nodeValue;\n let matches = doc.getElementsByTagName('match');\n //let matchArr = [];\n for(let i=0; i<matches.length; ++i) {\n //determine if match exists\n let opponentTeam = matches[i].getElementsByTagName('opponentteam')[0];\n let opponentTeamId = opponentTeam.getElementsByTagName('teamid')[0].childNodes[0].nodeValue;\n\n if(opponentTeamId !== \"0\") {\n\n let opponentTeamName = opponentTeam.getElementsByTagName('teamname')[0].childNodes[0].nodeValue;\n\n let matchId = matches[i].getElementsByTagName('matchid')[0].childNodes[0].nodeValue;\n\n let matchDate = matches[i].getElementsByTagName('matchdate')[0].childNodes[0].nodeValue;\n let matchDate2 = matchDate.slice(0, matchDate.indexOf(\" \"));\n let months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n let date = new Date(matchDate2);\n let year = date.getFullYear();\n let month = months[date.getMonth()];\n let dateInMonth = date.getDate();\n let days = [\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"];\n let day = days[date.getDay()];\n\n let time = matchDate.slice(matchDate.indexOf(\" \")+1);\n let firstColon = time.indexOf(\":\"), secondColon = time.lastIndexOf(\":\");\n let suffix = time.slice(time.indexOf(\" \")+1);\n let timeSplitter = time.slice(firstColon+1, firstColon+3) === \"00\" ? firstColon : secondColon;\n let time2 = time.slice(0, timeSplitter);\n time = `${time2} ${suffix}`;\n\n //If facilityname is null default to teamname\n let facilityName = null;\n if(matches[i].getElementsByTagName('facilityname')[0].childNodes[0] != null) {\n facilityName = matches[i].getElementsByTagName('facilityname')[0].childNodes[0].nodeValue;\n }\n\n let facilityAddress = null;\n if(matches[i].getElementsByTagName('facilityaddress')[0].childNodes[0] != null) {\n facilityAddress = matches[i].getElementsByTagName('facilityaddress')[0].childNodes[0].nodeValue;\n }\n\n let totalHomeWin = matches[i].getElementsByTagName('totalhomewin')[0].childNodes[0].nodeValue;\n let totalHomeLost = matches[i].getElementsByTagName('totalhomelost')[0].childNodes[0].nodeValue;\n let isHome = matches[i].getElementsByTagName('homeind')[0].childNodes[0].nodeValue;\n let isCompleted = matches[i].getElementsByTagName('iscompleted')[0].childNodes[0].nodeValue;\n let homeTeamDidWin = matches[i].getElementsByTagName('HomeTeamMatchWon')[0].childNodes[0].nodeValue;\n\n //used to get price if exists\n let price = \"\", moneyIndex;\n if(isHome === \"True\") {\n moneyIndex = userTeamName.indexOf(\"$\");\n price = moneyIndex === -1 ? 0 : userTeamName.slice(moneyIndex, moneyIndex+3);\n\n //preload all facility names to display on results tab\n //some teams may play each other mulitple times\n teamMap[id] = {facilityName: facilityName || teamName};\n opponentTeamIdsToFetch.push(opponentTeamId)\n\n } else {\n let opponentTeamName = opponentTeam.getElementsByTagName('teamname')[0].childNodes[0].nodeValue;\n moneyIndex = opponentTeamName.indexOf(\"$\");\n\n price = moneyIndex === -1 ? 0 : opponentTeamName.slice(moneyIndex, moneyIndex+3);\n\n //some teams have no facilityName\n teamMap[opponentTeamId] = {facilityName: facilityName || opponentTeamName};\n\n }\n ////console.log(\"after fetch\")\n\n let data = {\n userTeamId: id,\n teamName,\n opponentTeamName,\n matchId,\n //used for sorting\n date,\n year,\n day,\n month,\n dateInMonth,\n time,\n dateString: matchDate,\n facilityName,\n facilityAddress,\n totalHomeWin,\n totalHomeLost,\n isHome,\n isCompleted,\n opponentTeamId,\n price,\n homeTeamDidWin\n };\n if(isCompleted === \"True\") {\n\n resultsArr.push(data);\n } else {\n totalUnplayedMatches++;\n scheduleArr.push(data);\n //scheduleMap[matchId] = data;\n }\n }\n\n }\n output.userTeams[id].unplayedMatches = totalUnplayedMatches;\n if(totalUnplayedMatches > 0) {\n output.userData.teamsInProgress++;\n }\n callback2();\n\n }).catch( (ex) => {\n console.log(id, ex);\n callback2(ex);\n });\n },\n //get facility names that were not picked up at away matches\n function(callback3) {\n\n if(opponentTeamIdsToFetch.length > 0) {\n\n async.forEach(opponentTeamIdsToFetch, function(opponentTeamId, callback2) {\n\n if(teamMap[opponentTeamId] === undefined) {\n\n\n Tennislink.getTeamInfo(opponentTeamId).then(resp => {\n\n teamMap[opponentTeamId] = {facilityName: resp.facilityname}\n\n for(let i=0; i<teamsForStandingsArr.length && !fetchedSubflight; ++i) {\n if(teamsForStandingsArr[i].teamId === id) {\n\n teamsForStandingsArr[i].subflightId = resp.subflightid;\n output.userTeams[id].subflightId = resp.subflightid;\n teamsForStandingsArr[i].subflightName = resp.subflightname;\n fetchedSubflight = true;\n }\n }\n callback2();\n }).catch( (ex) => {\n\n //console.log(ex, teamId);\n return callback2(ex);\n })\n } else {\n callback2();\n\n }\n\n }, function(err) {\n if (err) {\n //console.log(err);\n }\n callback3();\n\n });\n } else {\n //if for some reason team has zero home matches\n Tennislink.getTeamInfo(id).then(resp => {\n\n teamMap[id] = {facilityName: resp.facilityname}\n\n for(let i=0; i<teamsForStandingsArr.length && !fetchedSubflight; ++i) {\n if(teamsForStandingsArr[i].teamId === id) {\n teamsForStandingsArr[i].subflightId = resp.subflightid;\n output.userTeams[id].subflightId = resp.subflightid;\n teamsForStandingsArr[i].subflightName = resp.subflightname;\n fetchedSubflight = true;\n }\n }\n callback3();\n }).catch( (ex) => {\n\n //console.log(ex, teamId);\n return callback3(ex);\n })\n\n }\n\n },\n function(callback2) {\n //if subflight was not picked up in opponent team\n\n if(!fetchedSubflight || (isCaptain && (totalUnplayedMatches > 0))) {\n Tennislink.getTeamInfo(id).then(resp => {\n\n for(let i=0; i<teamsForStandingsArr.length && !fetchedSubflight; ++i) {\n if(teamsForStandingsArr[i].teamId === id) {\n\n teamsForStandingsArr[i].subflightId = resp.subflightid;\n output.userTeams[id].subflightId = resp.subflightid;\n teamsForStandingsArr[i].subflightName = resp.subflightname;\n\n fetchedSubflight = true;\n }\n }\n console.log(id, resp.captainustanumber)\n //might want to put captain part on teammager to decrease load time\n output.userTeams[id].isCaptain = ustaNum === resp.captainustanumber || ustaNum === resp.cocaptainustanumber;\n\n if(output.userTeams[id].isCaptain && totalUnplayedMatches > 0) captainMap[id] = false;\n\n callback2();\n }).catch( (ex) => {\n\n //console.log(ex, teamId);\n callback2(ex);\n })\n } else callback2();\n }\n ], function(err) { //This function gets called after the two tasks have called their \"task callbacks\"\n if (err) {\n //console.log(err)\n }\n\n callback();\n\n });\n\n\n }", "title": "" }, { "docid": "6f11ffee16e22e6248cb837321479586", "score": "0.45235476", "text": "function getMatchGroup(search_key){\n var groupList = [];\n var keys = search_key.toLowerCase().split(\" \");\n for(var i = 1; i <= readDocument('dataBase', 2).List.length; i++){\n var group = readDocument('groups', i);\n var groupNameArr = group.groupName.toLowerCase().split(\" \");\n var index,index1;\n for(index in groupNameArr){\n for(index1 in keys){\n if(groupNameArr[index].indexOf(keys[index1]) != -1){\n groupList.push(group);\n break;\n }\n }\n }\n }\n var value = {contents : groupList};\n return value;\n }", "title": "" }, { "docid": "f70fb90995e0b96df382ee91c44ad246", "score": "0.45195797", "text": "function subjectOverlap(subject, users){\n var matchedUsers = [];\n for each (var user in users){\n if(user.studying = subject){\n matchedUsers.push(user);\n }\n }\n return matchedUsers;\n}", "title": "" }, { "docid": "08d17135bf166635137167461c01196f", "score": "0.45181045", "text": "function groupById(events){\n if (events === undefined || events.length <= 0) return [];\n else if( events.length === 1) return [events[0]];\n\n let array = [];\n let arrays = [];\n let prevId = events[0].activity.id;\n events.forEach(event => {\n let id = event.activity.type === \"Like\" ? event.activity.id : event.activity.object.id;\n\n if( prevId !== id) {\n arrays.push(array);\n array = [];\n prevId = id;\n }\n\n array.push(event);\n });\n\n arrays.push(array);\n\n return arrays;\n\n}", "title": "" }, { "docid": "68d658123a72ab0de53f4836879b21a0", "score": "0.45165247", "text": "async function getLiveMatches(req, res) {\n const SOCCER_API_KEY = process.env.SOCCER_API_KEY;\n const todayDate = getTodayDate();\n const liveURL = `https://apiv2.apifootball.com/?action=get_events&from=${todayDate}&to=${todayDate}&APIkey=${SOCCER_API_KEY}`;\n await superagent\n .get(liveURL)\n .then((data) => {\n let liveMatchesArray = data.body\n .filter((item) => {\n //item.match_status !== 'Finished'\n // if (item.match_live === '1') {\n return item;\n // }\n })\n .map((match) => {\n return new liveMatches(match);\n });\n res.render('pages/live', { matchArray: liveMatchesArray });\n })\n .catch((err) => {\n res.status(500).json({\n error: 'Somthing went bad',\n });\n });\n}", "title": "" }, { "docid": "28a5d1c09f8345105faa7df83a74cbc1", "score": "0.44932356", "text": "applyFilters() {\n let filtered = Object.assign({}, this.state.data)\n\n if (this.state.filters.prediction) {\n filtered.events = filtered.events.filter(event => {\n return event.predictions.some(prediction => {\n return prediction.scores.some(score => {\n let label = score.label.toLowerCase()\n let filter = this.state.filters.prediction.toLowerCase()\n let labelMatch = label.includes(filter)\n\n let scoreMatch = true\n let scoreFilter = this.state.filters.score\n if (scoreFilter) {\n scoreMatch = score.score >= scoreFilter[0] && score.score <= scoreFilter[1]\n }\n\n return labelMatch && scoreMatch\n })\n })\n })\n }\n\n if (this.state.filters.video) {\n filtered.events = filtered.events.filter(event => {\n return event.videoStream.toLowerCase().includes(this.state.filters.video.toLowerCase())\n })\n }\n\n if (this.state.filters.startDate) {\n filtered.events = filtered.events.filter(event => {\n return moment.unix(event.timestamp).isAfter(moment(this.state.filters.startDate))\n })\n }\n\n if (this.state.filters.endDate) {\n filtered.events = filtered.events.filter(event => {\n return moment.unix(event.timestamp).isBefore(moment(this.state.filters.endDate))\n })\n }\n\n this.setState({ filteredData: filtered })\n }", "title": "" }, { "docid": "9c97dc61439573c2bf542f2af90d45dd", "score": "0.44921958", "text": "function getAllMatches(link){\n request(link , cb);\n}", "title": "" }, { "docid": "bb42f48b100244a5fb57decc3b171397", "score": "0.44912535", "text": "function searchVideos(idArray, type) {\n idArray.splice(5) // Limit results to only 5\n // Loops through the video IDs returned\n idArray.forEach((item) => {\n item.providers = [] // Adds a providers array to each Video obj\n // Get Video Info for each search result\n item = type === 'movie' ? getMovies(item, type) : getTvShows(item, type)\n })\n\n // Filer out shows that are not on one of the providers\n let streamableVideos = idArray.filter((item) => {\n return item.providers.length > 0\n })\n\n return streamableVideos\n}", "title": "" }, { "docid": "8c11c39ccb9328b8191de96f62597bd8", "score": "0.4483845", "text": "getDocumentsMatchingQuery(t, e, n) {\n /**\n * Returns whether the query matches a single document by path (rather than a\n * collection).\n */\n return function(t) {\n return bt.isDocumentKey(t.path) && null === t.collectionGroup && 0 === t.filters.length;\n }(e) ? this.Vn(t, e.path) : ye(e) ? this.Sn(t, e, n) : this.Dn(t, e, n);\n }", "title": "" }, { "docid": "46cb18c3bec7919421fafa7dba881d35", "score": "0.44823962", "text": "function constructMatchPhrase(param, startDate, endDate) {\n if (startDate === undefined) {\n startDate = param[\"from\"];\n endDate = param[\"until\"];\n }\n\n let match_phrases = JSON.stringify({\n \"query_string\": {\n \"query\": \"NOT _exists_:likes NOT _exists_:retweets NOT _exists_:replies\",\n \"analyze_wildcard\": true,\n \"time_zone\": \"Europe/Paris\"\n }\n },\n {\n \"match_all\": {}\n });\n\n // SESSID MATCH\n /* match_phrases += \",{\" +\n '\"match_phrase\": {' +\n '\"essid\": {' +\n '\"query\":\"' + param[\"session\"] + '\"' +\n '}' +\n '}' +\n '}';*/\n\n // KEYWORDS ARGS MATCH\n param.keywordList.forEach(arg => {\n if (arg[0] === '#') {\n match_phrases += ',{' +\n '\"match_phrase\": {' +\n '\"hashtags\": {' +\n '\"query\":\"' + arg + '\"' +\n '}' +\n '}' +\n '}'\n } else {\n match_phrases += ',{' +\n '\"match_phrase\": {' +\n '\"tweet\": {' +\n '\"query\":\"' + arg + '\"' +\n '}' +\n '}' +\n '}';\n }\n });\n\n // USERNAME MATCH\n if (param[\"userList\"] !== undefined) {\n param[\"userList\"].forEach(user => {\n if (user !== \"\") {\n match_phrases += ',{' +\n '\"match_phrase\": {' +\n '\"username\": {' +\n '\"query\":\"' + user + '\"' +\n '}' +\n '}' +\n '}';\n }\n })\n }\n // RANGE SETUP\n match_phrases += \",\" + JSON.stringify({\n \"range\": {\n \"date\": {\n \"format\": \"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis\",\n \"gte\": startDate,\n \"lte\": endDate\n }\n }\n });\n\n\n // FILTERS MATCH\n if (param.media === \"image\") {\n match_phrases += ',' + JSON.stringify({\n \"exists\": {\n \"field\": \"photos\"\n }\n })\n }\n\n // VERIFIED ACCOUNT ?\n\n\n // LANGUAGE MATCH\n\n return [match_phrases]\n}", "title": "" }, { "docid": "d5ae6a40a4386df494e4d51bbeed51fc", "score": "0.44787145", "text": "all_star_ids_from (id) {\n let ids = []\n\n this.log.forEach(\n igm => {\n let from_id = igm.from.starId\n\n if (from_id !== id) {\n if (ids.indexOf(from_id) === -1) {\n ids.push(from_id)\n }\n }\n }\n )\n\n return ids\n }", "title": "" }, { "docid": "d9cb49d4d8d8416c2487468daadd5251", "score": "0.44785255", "text": "function findEventByIdAndCalendar(event, events) {\r\n\tfor (var a=0; a<events.length; a++) {\r\n\t\tif (events[a].id == event.id && events[a].calendarId == event.calendarId) {\r\n\t\t\treturn events[a];\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "a1c60ea187efdab3ae5772b4c06756cc", "score": "0.4476979", "text": "function liveSearch(params)\n{\n switch (params.type)\n {\n case \"documents\":\n return getDocResults(params);\n break;\n case \"sites\":\n return getSiteResults(params);\n break;\n case \"people\":\n return getPeopleResults(params);\n break;\n }\n}", "title": "" }, { "docid": "adfd566fcb2139f3260b8bc4322614ac", "score": "0.44769222", "text": "function arrayFindObjects(sourceArray, searchId, searchValue) {\n var results = [];\n for (var i = 0; i < sourceArray.length; i++) {\n if (sourceArray[i][searchId] === searchValue) {\n results.push(sourceArray[i]);\n }\n }\n return results;\n }", "title": "" }, { "docid": "92b1ef809f2e5e6bff5fc8d611cf4745", "score": "0.4472792", "text": "function findEmailDuplicated(vtable, vsysid) {\n var vmessage = [],\n listofsysids = [],\n vurl = gs.getProperty(\"glide.servlet.uri\");\n\n // validate and find the target\n if (vtable && vsysid) {\n var b = new GlideRecord(vtable);\n b.get(vsysid)\n } else vmessage.push(\"ERROR: Provide targetable and targesysid\");\n\n if (b.isValid()) {\n\n vmessage.push('Searching for duplicates on ' + vtable +\n \"\\n\\n* \" + b.getDisplayValue() + \"- created \" + b.sys_created_on + \" by \" + b.sys_created_by +\n \"\\n-- \" + vurl + vtable + \".do?sys_id=\" + b.sys_id);\n\n\n // Find emails duplicated\n var duplicates_found = getDuplicates(\"sys_email\", \"subject,recipients\", \"type=sent^target_table=\" + vtable + \"^instance=\" + vsysid + \"^sys_created_onONLast 3 months@javascript:gs.beginningOfLast3Months()@javascript:gs.endOfLast3Months()\");\n\n // gs.print(duplicates_found.join('\\n'));\n\n // Find notification, conditions + event\n var gr2 = new GlideRecord('sys_email_log');\n gr2.addEncodedQuery(\"sys_created_onONLast 90 days@javascript:gs.beginningOfLast90Days()@javascript:gs.endOfLast90Days()^emailIN\" + duplicates_found[1].join(','));\n gr2.setLimit(100);\n for (q = 1, gr2.query(); gr2.next(); q++) {\n vmessage.push(\n \"\\n\\n* Email #\" + q + \" \" + gr2.email.getDisplayValue() + \" created \" + gr2.email.sys_created_on + \" by \" + gr2.email.sys_created_by +\n \"\\n-- \" + vurl + \"sys_email.do?sys_id=\" + gr2.email +\n\n \"\\n\\n* Trigger Event #\" + q + \" \" + gr2.event.getDisplayValue() + \" created \" + gr2.event.sys_created_on + \" by \" + gr2.event.sys_created_by +\n \"\\n-- \" + vurl + \"sysevent.do?sys_id=\" + gr2.event +\n\n \"\\n\\n* Email notification #\" + q + \" \" + gr2.notification.getDisplayValue() + \"' \" + (parseBool(gr2.notification.action_insert) ? \"on Insert\" : \"\") + (parseBool(gr2.notification.action_update) ? \"on Update\" : \"\") + \", on \" + gr2.notification.collection + \", updated \" + gr2.notification.sys_updated_on + \" by \" + gr2.notification.sys_updated_by +\n \"\\n-- \" + vurl + \"sysevent_email_action.do?sys_id=\" + gr2.notification +\n \"\\n\\nIt reads \\n\" + gr2.notification.generation_type.getDisplayValue() + \" - event name: \" + gr2.notification.event_name +\n \"\\nCondition:\" + gr2.notification.condition + \" - Advanced condition: \" + gr2.notification.advanced_condition +\n \"\\n\")\n\n\n }\n } else vmessage.push(\"ERROR: Provide valid targetable and targesysid\");\n return vmessage;\n // Find conditions \n\n function parseBool(a) {\n return \"boolean\" == typeof a ? a : /^(active|ok|true|1|yes|on)$/i.test(a)\n }\n}", "title": "" }, { "docid": "a205db5e1207c09ab424915d31db3c2f", "score": "0.44718567", "text": "function getExchangedEvents(one,another){\n console.log(\"Extracting the events exchanged between '\"+one+\"' and '\"+another+\"' from a total of \"+loggedEvents.length+\" events...\");\n let exchangedEvents=loggedEvents.filter(\n (loggedEvent)=>{\n return(loggedEvent[2]===one&&loggedEvent[3]===another)||(loggedEvent[2]===another&&loggedEvent[3]===one);\n });\n console.log(\"\\tNumber of exchanged events: \"+exchangedEvents.length+\".\");\n return exchangedEvents;\n }", "title": "" }, { "docid": "d85976c6061c1454935db25e83b87340", "score": "0.44694406", "text": "function findMatchesInObject(obj, crit, strategy) {\n if (strategy.matches(obj['all'], crit)) {\n matches.push(obj);\n }\n }", "title": "" } ]
3e99952ad9dde005c6f6bceb5386a024
Color adjustment from hex, by a percentage.
[ { "docid": "6b6e9126d8864adf23a7d1e8dcd7637c", "score": "0.69946295", "text": "function shadeColor(color, percent) {\n const num = parseInt(color.substr(1), 16);\n const val = Math.round(2.55 * percent);\n const R = (num >> 16) + val;\n const G = (num >> 8 & 0x00FF) + val;\n const B = (num & 0x0000FF) + val;\n return '#' + (0x1000000 + (R < 255 ? R < 1 ? 0 : R : 255) * 0x10000 + (G < 255 ? G < 1 ? 0 : G : 255) * 0x100 + (B < 255 ? B < 1 ? 0 : B : 255)).toString(16).slice(1); \n}", "title": "" } ]
[ { "docid": "3a325746868c8ed6fc61bdb9c9dec81d", "score": "0.6954173", "text": "function luminance(hex, percent) {\n // validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n percent = percent || 0;\n\n // convert to decimal and change luminosity\n var new_hex = \"#\", c, i;\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i*2,2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * percent)), 255)).toString(16);\n new_hex += (\"00\"+c).substr(c.length);\n }\n\n return new_hex;\n}", "title": "" }, { "docid": "4d0c922305a5210a53b44049dd5995e2", "score": "0.6909668", "text": "function _changeColorIntensity(hex, lum) {\n\n // validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n lum = lum || 0;\n\n // convert to decimal and change luminosity\n var rgb = \"#\", c, i;\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i*2,2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n rgb += (\"00\"+c).substr(c.length);\n }\n\n return rgb;\n\n }", "title": "" }, { "docid": "414ee8991c017407e10a2af94238362a", "score": "0.6844607", "text": "function shadeColor(color, percent) {\n\n var R = parseInt(color.substring(1,3),16);\n var G = parseInt(color.substring(3,5),16);\n var B = parseInt(color.substring(5,7),16);\n\n R = parseInt(R * (100 + percent) / 100);\n G = parseInt(G * (100 + percent) / 100);\n B = parseInt(B * (100 + percent) / 100);\n\n R = (R<255)?R:255; \n G = (G<255)?G:255; \n B = (B<255)?B:255; \n\n var RR = ((R.toString(16).length==1)?\"0\"+R.toString(16):R.toString(16));\n var GG = ((G.toString(16).length==1)?\"0\"+G.toString(16):G.toString(16));\n var BB = ((B.toString(16).length==1)?\"0\"+B.toString(16):B.toString(16));\n\n return \"#\"+RR+GG+BB;\n}", "title": "" }, { "docid": "46de953d4b7502835bb04fab31b23155", "score": "0.6833716", "text": "function perc2color(perc) {\n if(perc > 100){\n\tperc = 100;\n }\n var r, g, b = 0;\n // HACK: this value is customized for the tree scenario and showing things at the fall PI meeting\n var lowerLimit = 15;\n if(perc < lowerLimit) {\n\tvar multiplier = 255 / lowerLimit;\n\tg = 255;\n\tr = Math.round(multiplier * perc);\n }\n else {\n\tvar remainingRange = 100 - lowerLimit;\n\tvar modPerc = perc - lowerLimit;\n\tvar multiplier = 255 / remainingRange;\n\tr = 255;\n\tg = Math.round(multiplier * modPerc);\n }\n var h = r * 0x10000 + g * 0x100 + b * 0x1;\n return '#' + ('000000' + h.toString(16)).slice(-6);\n}", "title": "" }, { "docid": "cebaa8daf65ff3d0f8b1f46fccdfc1bf", "score": "0.6829695", "text": "function converter(hexPartial) {\n const partialArr = hexPartial.split('');\n for (let i in partialArr) {\n if (isNaN(partialArr[i])) {\n partialArr[i] = values[partialArr[i].toUpperCase()];\n }\n }\n let rgbPartial = partialArr[0]*16;\n rgbPartial += parseInt(partialArr[1] || partialArr[0]);\n return rgbPartial;\n}", "title": "" }, { "docid": "344155e2b3e18f064c024da363e20290", "score": "0.6769022", "text": "function ColorConv(colhex, lum, hlt)\r\n{\r\n\tif (colhex.match(/#[0-9A-Fa-f]/))\r\n\t{\r\n\t\tvar c = new Array(3);\r\n\t\tlum = (lum) ? 1 : .66;\r\n\t\thlt = (hlt == 1) ? 192 : ((hlt == 2) ? 128 : 0);\r\n\t\t\r\n\t\tfor (var i = 0; i < 3; i++)\r\n\t\t{\r\n\t\t\tc[i] = colhex.substr((i * 2 + 1), 2);\r\n\t\t\tc[i] = (c[i]) ? c[i] : 0;\r\n\t\t\tc[i] = parseInt(c[i], 16) + hlt;\r\n\t\t\tc[i] = parseInt(((parseInt(c[i] / 255)) ? 255 : c[i]) * lum);\r\n\t\t}\r\n\t\t\r\n\t\tcolhex = 'rgb(' + c[0] + ', ' + c[1] + ', ' + c[2] + ')';\r\n\t}\r\n\telse\r\n\t{\r\n\t\tcolhex = 0;\r\n\t}\r\n\t\r\n\treturn colhex;\r\n}", "title": "" }, { "docid": "10fd8c3b7ff9f902fc4d7204dd2612dd", "score": "0.67023844", "text": "function getColorFromPercentage (percentage) {\n if (typeof percentage !== 'number' ||\n percentage < 0 ||\n percentage > 100\n ) {\n throw new TypeError(`1st argument \"percentage\" must be a {Number} between [0, 100] (both included) but \"percentage\" is {${getInstance(percentage)}} ${toString(percentage)}`)\n }\n\n let R = Math.round((255 * percentage) / 100)\n let G = Math.round((255 * (100 - percentage)) / 100)\n\n R = R.toString(16)\n G = G.toString(16)\n\n R = R.length === 1 ? `0${R}` : R\n G = G.length === 1 ? `0${G}` : G\n\n return `#${R}${G}00`\n}", "title": "" }, { "docid": "1c25bcee1df8784f738ffa3cef1c6fba", "score": "0.66704375", "text": "function getColorBrightness(hex) {\n const value = hex.replace('#', '');\n const r = hexdec(value.substr(0, 2));\n const g = hexdec(value.substr(2, 2));\n const b = hexdec(value.substr(4, 2));\n\n // Simple weighted avarage.\n // This might be overly simplistic as different colors are perceived\n // differently. That is a green of 128 might be brighter than a red of 128.\n // But as long as it's just about picking a white or black text color...\n return (r + g + b) / 3;\n}", "title": "" }, { "docid": "a2c904f10e7aa497e3bcc8cb938595ed", "score": "0.6668623", "text": "function shadeColor(color, percent) {\n\tlet f = parseInt(color.slice(1), 16),\n\t\tt = percent < 0 ? 0 : 255,\n\t\tp = percent < 0 ? percent * -1 : percent,\n\t\tR = f >> 16,\n\t\tG = f >> 8 & 0x00FF,\n\t\tB = f & 0x0000FF;\n\treturn \"#\" + (0x1000000 + (Math.round((t - R) * p) + R) * 0x10000 + (Math.round(\n\t\t(t - G) * p) + G) * 0x100 + (Math.round((t - B) * p) + B)).toString(16).slice(\n\t\t1);\n}", "title": "" }, { "docid": "09ec329197d40cc4735cb44c02b0ae74", "score": "0.66613996", "text": "function calculateColor(percentage, min, spread)\n{\n\t//calculate the color\n\tvar red = 255;\n\tvar blue = 255 - ((percentage-min)*(1/spread)*255);\n\tvar green = 255 - ((percentage-min)*(1/spread)*255);\n\tvar color = \"#\"+decimalToHex(red,2)+decimalToHex(green,2)+decimalToHex(blue,2);\n\t\n\treturn color;\n}", "title": "" }, { "docid": "e90142aa7f94ce939a2f7ce75e39b45c", "score": "0.66316086", "text": "function colorPicher() {\n hexString = colorwheel.value;\n const r = Number.parseInt(hexString.slice(1, 3), [16]);\n const g = Number.parseInt(hexString.slice(3, 5), [16]);\n const b = Number.parseInt(hexString.slice(5, 7), [16]);\n\n setBase();\n convertToHLS(r, g, b);\n\n return hexString;\n}", "title": "" }, { "docid": "b2f858c9e8e3c31b4aac601f9e4a6376", "score": "0.6532249", "text": "function convertColorValue(num){\n return (num / 255) * 100;\n}", "title": "" }, { "docid": "1e6a1b221f1c96697266168a4313e825", "score": "0.64902765", "text": "function change_color(col, amt) {\n\n var usePound = false;\n\n if (col[0] === \"#\") {\n col = col.slice(1);\n usePound = true;\n }\n\n var num = parseInt(col,16);\n\n var r = (num >> 16) + amt;\n\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n var b = ((num >> 8) & 0x00FF) + amt;\n\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n var g = (num & 0x0000FF) + amt;\n\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound?\"#\":\"\") + (g | (b << 8) | (r << 16)).toString(16);\n\n}", "title": "" }, { "docid": "ef78682cf08bfa1585e3b9d90b2b6e41", "score": "0.6471636", "text": "function getColor(end, start, percent) {\n function hex2dec(hex) { return (parseInt(hex, 16)); }\n function dec2hex(dec) { return (dec < 16 ? \"0\" : \"\") + dec.toString(16); }\n\n var r1 = hex2dec(start.slice(0, 2));\n var g1 = hex2dec(start.slice(2, 4));\n var b1 = hex2dec(start.slice(4, 6));\n\n var r2 = hex2dec(end.slice(0, 2));\n var g2 = hex2dec(end.slice(2, 4));\n var b2 = hex2dec(end.slice(4, 6));\n\n var pc = percent / 100;\n\n var r = Math.floor(r1 + (pc * (r2 - r1)) + .5);\n var g = Math.floor(g1 + (pc * (g2 - g1)) + .5);\n var b = Math.floor(b1 + (pc * (b2 - b1)) + .5);\n\n return (\"#\" + dec2hex(r) + dec2hex(g) + dec2hex(b));\n}", "title": "" }, { "docid": "9f308c0af72cd3b3dc17e6561c4265cd", "score": "0.6469738", "text": "function color(percent) {\n var color = '#F44336';\n\n if (percent > 50) {\n color = '#8bc34a'; //green\n } else {\n color = '#F44336'; //red\n }\n return color;\n }", "title": "" }, { "docid": "e34314c295a81c5e03930a489f63b49d", "score": "0.6434305", "text": "function changeNum(number){\n // var unicodeVal = \"\\u278\" + (number - 1).toString();\n unicodeVal = [\"\\u2780\", \"\\u2781\", \"\\u2782\", \"\\u2783\", \"\\u2784\", \"\\u2785\", \"\\u2786\", \"\\u2787\", \"\\u2788\", \"\\u2789\"] ;\n // print (unicodeVal);\n $(\".step\").text(unicodeVal[number - 1]);\n var n = number * 10.0;\n var r = (255 * n) / 100\n var g = (255 * (100 - n)) / 100 \n var b = 0\n var percentage = number / 10;\n var hue0 = -10\n var hue1 = 100;\n var hue = (percentage * (hue1 - hue0)) + hue0;\n\n\n var col = \"rgb(\" + r.toString() + \",\" + g.toString() + \",\" + b.toString() + \")\";\n col = 'hsl(' + hue + ', 90%, 40%)'\n $(\".step\").css({'color': col});\n\n}", "title": "" }, { "docid": "ab78070fbaf5bf84db5963bd13ac6b62", "score": "0.6375187", "text": "function calcContrast(hex) {\n\t\tconst r = parseInt(hex.substr(0, 2), 16),\n\t\t\tg = parseInt(hex.substr(2, 2), 16),\n\t\t\tb = parseInt(hex.substr(4, 2), 16),\n\t\t\tyiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;\n\t\treturn yiq >= 128 ? \"black\" : \"white\";\n\t}", "title": "" }, { "docid": "ddff9f8dcf9dc92e4c77c28a3284755d", "score": "0.6314523", "text": "function shadeColor(hex, lum) {\r\n\t\t\t\t\t\r\n\t\t\t\t// Validate hex string\r\n\t\t\t\thex = String(hex).replace(/[^0-9a-f]/gi, '');\r\n\t\t\t\tif (hex.length < 6) {\r\n\t\t\t\t\thex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\r\n\t\t\t\t}\r\n\t\t\t\tlum = lum || 0;\r\n\t\t\t\t\r\n\t\t\t\t// Convert to decimal and change luminosity\r\n\t\t\t\tvar rgb = \"#\",\r\n\t\t\t\tc, i;\r\n\t\t\t\tfor (i = 0; i < 3; i++) {\r\n\t\t\t\t\tc = parseInt(hex.substr(i * 2, 2), 16);\r\n\t\t\t\t\tc = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\r\n\t\t\t\t\trgb += (\"00\" + c).substr(c.length);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn rgb;\r\n\t\t}", "title": "" }, { "docid": "90e4b9c7cf93c374e71ef73279ac5a97", "score": "0.62952656", "text": "function scale_color(hexstr, scalefactor) {\n /* declared variables first, in order;\n afterwards, undeclared local variables */\n var r = scalefactor;\n var a, i;\n if (r < 0 || typeof(hexstr) != 'string') {\n return hexstr;\n }\n hexstr = hexstr.replace(/[^0-9a-f]+/ig, '');\n if (hexstr.length == 3) {\n a = hexstr.split('');\n } else if (hexstr.length == 6) {\n a = hexstr.match(/(\\w{2})/g);\n } else {\n return hexstr;\n }\n for (i=0; i<a.length; i++) {\n if (a[i].length == 2)\n a[i] = parseInt(a[i], 16);\n else {\n a[i] = parseInt(a[i], 16);\n a[i] = a[i]*16 + a[i];\n }\n }\n\n var maxColor = parseInt('ff', 16);\n\n function relsize(a) {\n if (a == maxColor)\n return Infinity;\n return a/(maxColor-a);\n }\n\n function relsizeinv(y) {\n if (y == Infinity)\n return maxColor;\n return maxColor*y/(1+y);\n }\n\n for (i=0; i<a.length; i++) {\n a[i] = relsizeinv(relsize(a[i])*r);\n a[i] = Math.floor(a[i]).toString(16);\n if (a[i].length == 1)\n a[i] = '0' + a[i];\n }\n return '#' + a.join('');\n}", "title": "" }, { "docid": "0a302f89fe70c5943d56075bbf7fd75f", "score": "0.6276246", "text": "function getColorNum(hex, sortType) {\n // An array of color property values\n // [hue, saturation, lightness]\n var HSL = Y.Color.toArray(Y.Color.toHSL(hex)),\n hNum, // hue\n sNum, // saturation\n // get the computed brightness from the hex value\n bNum = Y.Color.getBrightness(hex).toString();\n\n // isolate hue part from HSL. converted to 2 digits\n // hNum = Math.floor((HSL[0] * 10) / 36.01).toString();\n hNum = Math.floor(HSL[0]).toString();\n // hNum = (hNum.length < 2) ? ('0' + hNum) : hNum;\n hNum = (hNum.length < 2) ? ('0' + hNum) : hNum;\n hNum = (hNum.length < 3) ? ('0' + hNum) : hNum;\n\n // isolate sat part from HSL. converted to 2 digits\n // sNum = Math.floor((HSL[1] * 10) / 10.01).toString();\n sNum = Math.floor(HSL[1]).toString();\n sNum = (sNum.length < 2) ? ('0' + sNum) : sNum;\n\n // assure brightness is 2 digits\n bNum = (bNum.length < 2) ? ('0' + bNum) : bNum;\n bNum = (bNum === \"100\") ? \"99\" : bNum;\n\n if (sortType === \"hbs\") {\n return hNum + '.' + bNum + '.' + sNum; // hue.bright.sat\n } else if (sortType === \"bhs\") {\n return bNum + '.' + hNum + '.' + sNum; // bright.hue.sat\n }\n }", "title": "" }, { "docid": "3dadd87ff40f1f83a77209d72bd72710", "score": "0.6269841", "text": "function formatColor(hexColor) {\n if(/#[0-9A-Fa-f]{6}/.test(hexColor)) {\n return hexColor.toUpperCase();\n }\n if(/#[0-9A-Fa-f]{3}/.test(hexColor)) {\n hexColor = '#' + hexColor[1] + hexColor[1] + hexColor[2] + hexColor[2] + hexColor[3] + hexColor[3];\n return hexColor.toUpperCase();\n }\n if(/rgb\\(\\d+\\,\\d+\\,\\d+\\)/i.test(hexColor.replace(/\\s*/g, ''))) {\n var rgb = hexColor.replace(/rgb\\(/i, '').replace(/\\)/, '').split(',');\n hexColor = '#' + numberToHex(rgb[0]) + numberToHex(rgb[1]) + numberToHex(rgb[2]);\n return hexColor.toUpperCase();\n }\n if(/rgb\\(\\d+%\\,\\d+%\\,\\d+%\\)/i.test(hexColor.replace(/\\s*/g, ''))) {\n var rgbPercent = hexColor.replace(/rgb\\(/i, '').replace(/\\)/, '').replace(/%/g, '').split(',');\n hexColor = '#' + precentToHex(rgbPercent[0]) + precentToHex(rgbPercent[1]) + precentToHex(rgbPercent[2]);\n return hexColor.toUpperCase();\n }\n if(/^(#|rgb)/i.test(hexColor) === false) {\n return svgColorKeywordsToHex(hexColor).toUpperCase();\n }\n return '#000000';\n}", "title": "" }, { "docid": "76b4e555be1db9ee75b8dfd7da5fce74", "score": "0.6257898", "text": "function LightenDarkenColor(color, percent) {\n var usePound = false;\n if (color[0] == \"#\") {\n color = color.slice(1);\n usePound = true;\n }\n var Hexcode = parseInt(color, 16);\n var red = (Hexcode >> 16) + percent;\n\n if (red > 255) {\n red = 255;\n } else if (red < 0) {\n red = 0;\n }\n\n var blue = ((Hexcode >> 8) & 0x00FF) + percent;\n\n if (blue > 255) {\n blue = 255;\n } else if (blue < 0) {\n blue = 0;\n }\n\n var green = (Hexcode & 0x0000FF) + percent;\n\n if (green > 255) {\n green = 255;\n } else if (green < 0) {\n green = 0;\n }\n\n return (usePound ? \"#\" : \"\") + (green | (blue << 8) | (red << 16)).toString(16);\n }", "title": "" }, { "docid": "c191d51ac63e77a022b560fa7e23c5bb", "score": "0.6257156", "text": "function normalizeColor(hexCode) {\n return [(hexCode >> 16 & 255) / 255, (hexCode >> 8 & 255) / 255, (255 & hexCode) / 255]\n}", "title": "" }, { "docid": "73cc3b68e45ab4497cbdb046b2f72bad", "score": "0.6251865", "text": "function adjustedTextColor(hex) {\r\n var c = hex.substring(1); // strip #\r\n var rgb = parseInt(c, 16); // convert rrggbb to decimal\r\n var r = (rgb >> 16) & 0xff; // extract red\r\n var g = (rgb >> 8) & 0xff; // extract green\r\n var b = (rgb >> 0) & 0xff; // extract blue\r\n\r\n var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b; // per ITU-R BT.709\r\n\r\n // result in 0(dark) - 255(light)\r\n if (luma < 64) {\r\n // dark color so text should be light\r\n return \"#F9F9F9\";\r\n } else {\r\n // light color so text should be dark\r\n return \"#282828\";\r\n }\r\n}", "title": "" }, { "docid": "04a7af56ae0b2e03fd056c6dc38659ae", "score": "0.62306947", "text": "function updateFromHexadecimal(){\n\n // obtain the value for the hexadecimal input box\n var value = hexadecimalInputBox.value;\n\n // check that the value is in the appropriate format\n if (value.match(/^#[0-9a-f]{6}$/i)){\n\n // set the colour based on the value in the hexadecimal input box\n colour = new RGBColour(\n parseInt(value.substring(1,3), 16),\n parseInt(value.substring(3,5), 16),\n parseInt(value.substring(5,7), 16));\n\n // update the colour\n updateColour();\n\n }\n\n }", "title": "" }, { "docid": "a5e614676962189cb93585f1f3768805", "score": "0.6207717", "text": "function lighten (color, percent) {\n if (typeof color !== 'string') {\n throw new TypeError('Expected a string as color')\n }\n if (typeof percent !== 'number') {\n throw new TypeError('Expected a numeric percent')\n }\n\n const rgb = textToRgb(color),\n t = percent < 0 ? 0 : 255,\n p = Math.abs(percent) / 100,\n R = rgb.r,\n G = rgb.g,\n B = rgb.b\n\n return '#' + (\n 0x1000000 + (Math.round((t - R) * p) + R) * 0x10000 +\n (Math.round((t - G) * p) + G) * 0x100 +\n (Math.round((t - B) * p) + B)\n ).toString(16).slice(1)\n}", "title": "" }, { "docid": "82a7b0e0b67d211429d9e7a555d3f1be", "score": "0.61971223", "text": "function shadeRGBColor(color, percent) {\n var f = color.split(\",\"),\n t = percent < 0 ? 0 : 255,\n p = percent < 0 ? percent * -1 : percent,\n R = parseInt(f[0].slice(4)),\n G = parseInt(f[1]),\n B = parseInt(f[2]);\n return \"rgb(\" + (Math.round((t - R) * p) + R) + \",\" + (Math.round((t - G) * p) + G) + \",\" + (Math.round((t - B) * p) + B) + \")\";\n }", "title": "" }, { "docid": "22b90a292696d1e2611a0fa32b167f6c", "score": "0.6164753", "text": "function lighten(color, percent) {\n if (typeof color !== 'string') {\n throw new TypeError('Expected a string as color');\n }\n\n if (typeof percent !== 'number') {\n throw new TypeError('Expected a numeric percent');\n }\n\n const rgb = textToRgb(color),\n t = percent < 0 ? 0 : 255,\n p = Math.abs(percent) / 100,\n R = rgb.r,\n G = rgb.g,\n B = rgb.b;\n return '#' + (0x1000000 + (Math.round((t - R) * p) + R) * 0x10000 + (Math.round((t - G) * p) + G) * 0x100 + (Math.round((t - B) * p) + B)).toString(16).slice(1);\n}", "title": "" }, { "docid": "bca9ca7a456699b59b81825f1fb370c1", "score": "0.6147345", "text": "function modColor(hex){\n\n rgb = hex.substring(4, hex.length-1)\n .replace(/ /g, '')\n .split(',');\n\n var r = parseInt(rgb[0]);\n var g = parseInt(rgb[1]);\n var b = parseInt(rgb[2]);\n\n r += (getRandomInt(21)-11);\n g += (getRandomInt(21)-11);\n b += (getRandomInt(21)-11);\n return(rgbToHex(r, g, b));\n}", "title": "" }, { "docid": "c88347bbbaea549e61941a48390b08e3", "score": "0.6141212", "text": "function Colors_lighten(rgb, percent) {\n if (rgb) {\n return {\n r: Math.max(0, Math.min(255, rgb.r + getLightnessStep(rgb.r, percent))),\n g: Math.max(0, Math.min(255, rgb.g + getLightnessStep(rgb.g, percent))),\n b: Math.max(0, Math.min(255, rgb.b + getLightnessStep(rgb.b, percent))),\n a: rgb.a\n };\n }\n else {\n // TODO is this correct ?\n return rgb;\n }\n}", "title": "" }, { "docid": "46e8886fbb030a67ea5651d287df195e", "score": "0.61211187", "text": "function colorCode(hash) {\n const code = parseInt(hash.slice(60), 16);\n const h = code % 361;\n const s = code % 101;\n let l = code % 101;\n // yeah this is biased but it's good enough\n if (l < 30) {\n l += 30;\n }\n return `hsl(${h}, ${s}%, ${l}%)`;\n}", "title": "" }, { "docid": "47e6bf268726efd0db1d5a30a656fef4", "score": "0.61033636", "text": "function changeColor(color, ratio, darker)\n{\n var arguments = color.match(/^#?([a-z0-9][a-z0-9])([a-z0-9][a-z0-9])([a-z0-9][a-z0-9])$/i);\n var decimal = [parseInt(arguments[1], 16), parseInt(arguments[2], 16), parseInt(arguments[3], 16)];\n\n\treturn darker ?\n\t\tpad(Math.floor(ratio * decimal[0]).toString(16), 2) + pad(Math.floor(ratio * decimal[1]).toString(16), 2) + pad(Math.floor(ratio * decimal[2]).toString(16), 2) :\n\t\tpad(Math.min(decimal[0] + Math.floor(ratio * (255 - decimal[0])), 255).toString(16), 2) + pad(Math.min(decimal[1] + Math.floor(ratio * (255 - decimal[1])), 255).toString(16), 2) + pad(Math.min(decimal[2] + Math.floor(ratio * (255 - decimal[2])), 255).toString(16), 2);\n}", "title": "" }, { "docid": "7bac7723f1bac5ad489cda120f582eaf", "score": "0.6093744", "text": "function shadeRGBColor(color, percent) {\n var f=color.split(\",\"),t=percent<0?0:255,p=percent<0?percent*-1:percent,R=parseInt(f[0].slice(4)),G=parseInt(f[1]),B=parseInt(f[2]);\n return \"rgb(\"+(Math.round((t-R)*p)+R)+\",\"+(Math.round((t-G)*p)+G)+\",\"+(Math.round((t-B)*p)+B)+\")\";\n }", "title": "" }, { "docid": "d654b4cccfc4ec24fc7adb5be85d8a7f", "score": "0.60369277", "text": "function lightenUp(element) {\n var hex = element.dataset.color;\n var red = parseInt((hex[1] + hex[2]), 16);\n var blue = parseInt((hex[3] + hex[4]), 16);\n var green = parseInt((hex[5] + hex[6]), 16);\n\n var all = [red, blue, green];\n for (var i = 0; i < 3; i ++) {\n all[i] += 30;\n if (all[i] > 255) all[i] = 255;\n all[i] = all[i].toString(16);\n }\n\n element.style.backgroundColor = \"#\" + all[0] + all[1] + all[2];\n}", "title": "" }, { "docid": "2b7912e5d218dfa0bdf262a9d9c17d08", "score": "0.6030859", "text": "_delta(percent, other)\n {\n if (!(other instanceof HSL))\n {\n throw new ColorizeException(\"Cannot mix an HSL color with non-HSL color.\");\n }\n\n return new HSL(\n Math.max(0, Math.min(359, Math.floor((percent * (this.hue - other.hue)) + other.hue))),\n Math.max(0, Math.min(1, (percent * (this.saturation - other.saturation)) + other.saturation)),\n Math.max(0, Math.min(1, (percent * (this.lightness - other.lightness)) + other.lightness)),\n );\n }", "title": "" }, { "docid": "bf822ca64426d8672fba3d2a4176ae9e", "score": "0.6020669", "text": "function hexToHSL (hex, saturation) {\n // Convert hex to RGB first\n let r = 0\n let g = 0\n let b = 0\n if (hex.length === 4) {\n r = '0x' + hex[1] + hex[1]\n g = '0x' + hex[2] + hex[2]\n b = '0x' + hex[3] + hex[3]\n } else if (hex.length === 7) {\n r = '0x' + hex[1] + hex[2]\n g = '0x' + hex[3] + hex[4]\n b = '0x' + hex[5] + hex[6]\n }\n // Then to HSL\n r /= 255\n g /= 255\n b /= 255\n const cmin = Math.min(r, g, b)\n const cmax = Math.max(r, g, b)\n const delta = cmax - cmin\n let h = 0\n let s = 0\n let l = 0\n\n if (delta === 0) {\n h = 0\n } else if (cmax === r) {\n h = ((g - b) / delta) % 6\n } else if (cmax === g) {\n h = (b - r) / delta + 2\n } else {\n h = (r - g) / delta + 4\n }\n\n h = Math.round(h * 60)\n\n if (h < 0) { h += 360 }\n l = (cmax + cmin) / 2\n s = delta === 0 ? 0 : delta / (1 - Math.abs(2 * l - 1))\n s = saturation || +(s * 200).toFixed(1)\n l = +(l * 100).toFixed(1)\n return 'hsl(' + h + ',' + s + '%,' + l + '%)'\n}", "title": "" }, { "docid": "0a746ea5535e0da7d200fd589dfe142a", "score": "0.59970415", "text": "function colorscale(hexstr, scalefactor) {\n/* declared variables first, in order;\n afterwards, undeclared local variables */\n var r = scalefactor;\n var a, i;\n if (r < 0 || typeof(hexstr) != 'string')\n return hexstr;\n hexstr = hexstr.replace(/[^0-9a-f]+/ig, '');\n if (hexstr.length == 3) {\n a = hexstr.split('');\n } else if (hexstr.length == 6) {\n a = hexstr.match(/(\\w{2})/g);\n } else\n return hexstr;\n for (i=0; i < a.length; i++) {\n if (a[i].length == 2)\n a[i] = parseInt(a[i], 16);\n else {\n a[i] = parseInt(a[i], 16);\n a[i] = a[i]*16 + a[i];\n }\n}\n\nvar maxColor = parseInt('ff', 16);\n\nfunction relsize(a) {\n if (a == maxColor)\n return Infinity;\n return a/(maxColor-a);\n}\n\nfunction relsizeinv(y) {\n if (y == Infinity)\n return maxColor;\n return maxColor*y/(1+y);\n}\n\nfor (i=0; i < a.length; i++) {\n a[i] = relsizeinv(relsize(a[i])*r);\n a[i] = Math.floor(a[i]).toString(16);\n if (a[i].length == 1)\n a[i] = '0' + a[i];\n}\nreturn a.join('');\n}", "title": "" }, { "docid": "526470d133b7a72384dd55f79b2e796e", "score": "0.5995097", "text": "function colorIntensity(col, amt) { \n\tvar useHash= false;\n \n if (col[0] == \"#\") {\n col= col.slice(1);\n useHash= true;\n }\n \n var num= parseInt(col, 16);\n \n var r= (num >> 16) + amt;\n if (r > 255) r= 255;\n\t\telse if (r < 0) r= 0;\n \n var g= (num & 0x0000FF) + amt;\n if (g > 255) g= 255;\n\t\telse if (g < 0) g= 0;\n\n\tvar b= ((num >> 8) & 0x00FF) + amt;\n if (b > 255) b= 255;\n\t\telse if (b < 0) b= 0;\n return (useHash ? \"#\" : \"\") + (g | (b << 8) | (r << 16)).toString(16); \n}", "title": "" }, { "docid": "429750e220406024bee6ab5c6a18feff", "score": "0.5969848", "text": "function normalizeColor(hexCode) {\n return [\n ((hexCode >> 16) & 255) / 255,\n ((hexCode >> 8) & 255) / 255,\n (255 & hexCode) / 255,\n ]\n}", "title": "" }, { "docid": "caee0e713d609a51b622398b8fb64419", "score": "0.5958453", "text": "lightenRgbColors(c, n) {\n let d;\n for (let i = 3; i--; c[i] = d < 0 ? 0 : d > 255 ? 255 : d | 0) {\n d = c[i] + n;\n }\n return c\n }", "title": "" }, { "docid": "fedc8bee3b7471710d3f0176e22bd605", "score": "0.5953536", "text": "setColor(input, hex) {\n input.colorValue = hex;\n input.value = hex;\n input.style.backgroundColor = hex;\n input.style.color = this.getLabelColor(hex);\n }", "title": "" }, { "docid": "355e64e0f78fcc9f664c44353f982e62", "score": "0.5941449", "text": "function determinePercent(percentage) {\n\n let color = \"\";\n\n if(percentage >= 0) {\n color = \"green\";\n }\n else {\n color =\"red\";\n }\n\n return color;\n}", "title": "" }, { "docid": "f22230c66bc848609bec1f2e72005797", "score": "0.5941407", "text": "function changeFinalColor(color)\r\n{\r\nvar reg1=new RegExp(\"[rgb(]\",\"g\");\r\nif (color.match(reg1))\r\n{\r\ncolor=color.substring(4,color.length-1);\r\nvar ta=color.split(\",\")\r\ncolor='#'+dechex(ta[0])+dechex(ta[1])+dechex(ta[2]);\r\n}\r\ndocument.getElementById(\"result_color\").style.background=color;\r\nr=parseInt(color.substr(1,2),16);\r\ng=parseInt(color.substr(3,2),16);\r\nb=parseInt(color.substr(5,2),16);\r\n}", "title": "" }, { "docid": "e41cb0f5ce1bdd9a43b29ad09a0f39fc", "score": "0.59351814", "text": "function colorLuminance(hex, lum) { \r\n // validate hex string \r\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\r\n if (hex.length < 6) { \r\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; \r\n } \r\n lum = lum || 0; \r\n // convert to decimal and change luminosity \r\n var rgb = \"#\", c, i; \r\n for (i = 0; i < 3; i++) {\r\n c = parseInt(hex.substr(i*2,2), 16); \r\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); \r\n rgb += (\"00\"+c).substr(c.length); \r\n } \r\n return rgb; \r\n }", "title": "" }, { "docid": "32e96ccb57c2ef799ec8d88340863f02", "score": "0.5933106", "text": "function colorLuminance(hex, lum) {\n // Validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n lum = lum || 0;\n\n // Convert to decimal and change luminosity\n var rgb = \"#\", c, i;\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i*2,2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n rgb += (\"00\"+c).substr(c.length);\n }\n\n return rgb;\n }", "title": "" }, { "docid": "32e96ccb57c2ef799ec8d88340863f02", "score": "0.5933106", "text": "function colorLuminance(hex, lum) {\n // Validate hex string\n hex = String(hex).replace(/[^0-9a-f]/gi, '');\n if (hex.length < 6) {\n hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n }\n lum = lum || 0;\n\n // Convert to decimal and change luminosity\n var rgb = \"#\", c, i;\n for (i = 0; i < 3; i++) {\n c = parseInt(hex.substr(i*2,2), 16);\n c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n rgb += (\"00\"+c).substr(c.length);\n }\n\n return rgb;\n }", "title": "" }, { "docid": "37ebe859eb8741399cf66fe9b19b0416", "score": "0.5915515", "text": "function brightness(hex){\r\n // Determining the RGB values of the colour\r\n let bigint = parseInt(hex, 16);\r\n let r = (bigint >> 16) & 255;\r\n let g = (bigint >> 8) & 255;\r\n let b = bigint & 255;\r\n \r\n // Calculating brightness from the r, b and g values\r\n let brightness = Math.sqrt(0.299*Math.pow(r,2) + 0.587*Math.pow(g,2) + 0.114*Math.pow(b,2));\r\n \r\n if (brightness < 128){ \r\n return \"white\"; // If the brightness is less than 128, \"white\" is required\r\n }\r\n else {\r\n return \"black\"; // If the brightness is more than or equal to 128, \"black\" is returned\r\n }\r\n}", "title": "" }, { "docid": "e0e32225a8d26da4106a7a76950804b5", "score": "0.59013087", "text": "function gradientHue() {\n brushHue += 17;\n if (brushHue >= 360) {\n brushHue %= 360;\n }\n}", "title": "" }, { "docid": "a4fd2632a31b4efeadab8b00d1b657fd", "score": "0.58942974", "text": "RGBLum(hex) {\n let c = parseInt(hex.slice(1), 16);\n\n let r = (c >> 16) & 0xff;\n let g = (c >> 8) & 0xff;\n let b = (c >> 0) & 0xff;\n\n return 0.299 * r + 0.587 * g + 0.114 * b;\n }", "title": "" }, { "docid": "97cb485c0a4cb0c41c9f1f7f33953ad4", "score": "0.5891939", "text": "function hex2hsl(hex) {\n return rgb2hsl(hex2rgb(hex));\n }", "title": "" }, { "docid": "ddf4b0cf7633ae6dd117ab155c1c0048", "score": "0.5890347", "text": "function convertHex(hex,opacity){\r\n hex = hex.replace('#','');\r\n var r = parseInt(hex.substring(0,2), 16);\r\n var g = parseInt(hex.substring(2,4), 16);\r\n var b = parseInt(hex.substring(4,6), 16);\r\n\r\n return 'rgba('+r+','+g+','+b+','+opacity/100+')';\r\n}", "title": "" }, { "docid": "2ee86b45b1a8014f6a3fcffbe97da793", "score": "0.58868134", "text": "function hexToNormalisedRGB(hex){\n hex = hex.substring(1, hex.length);\n var bigint = parseInt(hex, 16);\n var r = (bigint >> 16) & 255;\n var g = (bigint >> 8) & 255;\n var b = bigint & 255;\n return [r/255, g/255, b/255];\n}", "title": "" }, { "docid": "dbb2a91adc5b35a9e00a44712486e7f3", "score": "0.5860162", "text": "function darker(hex) {\r\n\t\thex = hex.replace(/^#/, ''); // Raute entfernen\r\n\t\t\r\n\t\t// Kurzform erweitern\r\n\t\tif(hex.length == 3) {\r\n\t\t\thex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\r\n\t\t}\r\n\t\t\r\n\t\t// Gibt eine Nummber im Hex-Format zurück, immer zweistellig\r\n\t\tfunction toHex(index) {\r\n\t\t\tvar val = parseInt(hex.substr(index * 2, 2), 16), // Aus Zeichenkette auslesen und zu einer Zahl umrechnen\r\n\t\t\t str = M.round(val * val / 470).toString(16); // Wert verringern (je größer ein Wert ist, desto weniger wird er verringert) und in einen String umrechnen (Basis: 16)\r\n\t\t\tif(str.length == 1) { // Nur eine Stelle?\r\n\t\t\t\tstr = '0' + str; // Führende 0 hinzufügen\r\n\t\t\t}\r\n\t\t\treturn str;\r\n\t\t}\r\n\t\t\r\n\t\t// Hex-String bauen und zurückgeben\r\n\t\treturn '#' + toHex(0) + toHex(1) + toHex(2);\r\n\t}", "title": "" }, { "docid": "006add09150d789900aae8122c1c0868", "score": "0.5841859", "text": "function Colors_brighten(rgb, percent) {\n if (rgb) {\n var base = Math.min(Math.max(rgb.r, rgb.g, rgb.b), 230);\n //let base = Math.max(rgb.r, rgb.g, rgb.b);\n var step = getLightnessStep(base, percent);\n return {\n r: Math.max(0, Math.min(255, Math.round(rgb.r + step))),\n g: Math.max(0, Math.min(255, Math.round(rgb.g + step))),\n b: Math.max(0, Math.min(255, Math.round(rgb.b + step))),\n a: rgb.a\n };\n }\n else {\n // TODO is this correct ?\n return rgb;\n }\n}", "title": "" }, { "docid": "4b2489049bc250fd5e97310196f3d041", "score": "0.5839894", "text": "function ColorLuminance(hex, lum) {\n\n\t// validate hex string\n\thex = String(hex).replace(/[^0-9a-f]/gi, '');\n\tif (hex.length < 6) {\n\t\thex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n\t}\n\tlum = lum || 0;\n\n\t// convert to decimal and change luminosity\n\tvar rgb = \"#\", c, i;\n\tfor (i = 0; i < 3; i++) {\n\t\tc = parseInt(hex.substr(i*2,2), 16);\n\t\tc = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n\t\trgb += (\"00\"+c).substr(c.length);\n\t}\n\n\treturn rgb;\n}", "title": "" }, { "docid": "ff0806b471a2f23bf94bff7683bb93e5", "score": "0.58378965", "text": "function get_color(val){\n //value from 0 to 1\n value_floored = Math.floor(val*1.0/10);\n val = value_floored/10\n var hue = ((val) * 120).toString(10);\n var lightness = '50';\n return [\"hsl(\", hue, \",100%,\",lightness,\"%)\"].join(\"\");\n }", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "67d6e4d464b05d78a4213d07a5cf5551", "score": "0.58348906", "text": "function rgb_tint(hex, tint) {\n\tif(tint === 0) return hex;\n\tvar hsl = rgb2HSL(hex2RGB(hex));\n\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\treturn rgb2Hex(hsl2RGB(hsl));\n}", "title": "" }, { "docid": "4a8f04cdf639b6acf931320bbc9cc922", "score": "0.5827622", "text": "toRGB(red, green, blue) {\n let update = {};\n let flags = 0;\n let input;\n\n if (typeof red !== \"undefined\") {\n // 0b100\n flags |= 1 << 2;\n }\n\n if (typeof green !== \"undefined\") {\n // 0b010\n flags |= 1 << 1;\n }\n\n if (typeof blue !== \"undefined\") {\n // 0b001\n flags |= 1 << 0;\n }\n\n if ((flags | 0x04) === 0x04) {\n input = red;\n\n if (input == null) {\n throw new Error(\"Invalid color (\" + input + \")\");\n }\n\n /* istanbul ignore else */\n if (Array.isArray(input)) {\n // color([Byte, Byte, Byte])\n update = {\n red: input[0],\n green: input[1],\n blue: input[2]\n };\n } else if (typeof input === \"object\") {\n // color({\n // red: Byte,\n // green: Byte,\n // blue: Byte\n // });\n update = {\n red: input.red,\n green: input.green,\n blue: input.blue\n };\n } else if (typeof input === \"string\") {\n\n // color(\"#ffffff\") or color(\"ffffff\")\n let re = new RegExp(\"^#?[0-9A-Fa-f]{6}$\");\n if (re.test(input)) {\n\n // remove the leading # if there is one\n if (input.length === 7 && input[0] === \"#\") {\n input = input.slice(1);\n }\n\n update = {\n red: parseInt(input.slice(0, 2), 16) / 255,\n green: parseInt(input.slice(2, 4), 16) / 255,\n blue: parseInt(input.slice(4, 6), 16) / 255\n };\n } else {\n // color(\"rgba(r, g, b, a)\") or color(\"rgb(r, g, b)\")\n // color(\"rgba(r g b a)\") or color(\"rgb(r g b)\")\n if (/^rgb/.test(input)) {\n const args = input.match(/^rgba?\\(([^)]+)\\)$/)[1].split(/[\\s,]+/);\n\n // If the values were %...\n if (this.isPercentString(args[0])) {\n args[0] = Math.round((parseInt(value, 10) / 100));\n args[1] = Math.round((parseInt(value, 10) / 100));\n args[2] = Math.round((parseInt(value, 10) / 100));\n }\n\n update = {\n red: parseInt(args[0], 10),\n green: parseInt(args[1], 10),\n blue: parseInt(args[2], 10)\n };\n\n // If rgba(...)\n if (args.length > 3) {\n if (this.isPercentString(args[3])) {\n args[3] = parseInt(args[3], 10) / 100;\n }\n update = this.toScaledRGB(100 * parseFloat(args[3]), update);\n }\n } else {\n // color name\n return this.toRGB(converter.keyword.rgb(input.toLowerCase()));\n }\n }\n }\n } else {\n // color(red, green, blue)\n update = {\n red: red,\n green: green,\n blue: blue\n };\n }\n\n return update;\n }", "title": "" }, { "docid": "b5e2d620d40480f75aad38e861adce01", "score": "0.5819407", "text": "hslToHexColor(hue, saturation, lightness) {\n // based on algorithm from http://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB\n if (hue == undefined) {\n return [0, 0, 0];\n }\n\n let chroma = (1 - Math.abs((2 * lightness) - 1)) * saturation;\n let huePrime = hue / 60;\n let secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1));\n\n huePrime = Math.floor(huePrime);\n let red;\n let green;\n let blue;\n\n if (huePrime === 0) {\n red = chroma;\n green = secondComponent;\n blue = 0;\n } else if (huePrime === 1) {\n red = secondComponent;\n green = chroma;\n blue = 0;\n } else if (huePrime === 2) {\n red = 0;\n green = chroma;\n blue = secondComponent;\n } else if (huePrime === 3) {\n red = 0;\n green = secondComponent;\n blue = chroma;\n } else if (huePrime === 4) {\n red = secondComponent;\n green = 0;\n blue = chroma;\n } else if (huePrime === 5) {\n red = chroma;\n green = 0;\n blue = secondComponent;\n }\n\n let lightnessAdjustment = lightness - (chroma / 2);\n red += lightnessAdjustment;\n green += lightnessAdjustment;\n blue += lightnessAdjustment;\n\n return `${rgbToHex(red, green, blue)}`;\n\n }", "title": "" }, { "docid": "df078a4ccd288f66a079c9ee356ed5cf", "score": "0.5815051", "text": "function fadeColor (col, amt) {\n const min = Math.min, max = Math.max;\n const num = parseInt(col.replace(/#/g, ''), 16);\n const r = min(255, max((num >> 16) + amt, 0));\n const g = min(255, max((num & 0x0000FF) + amt, 0));\n const b = min(255, max(((num >> 8) & 0x00FF) + amt, 0));\n return '#' + (g | (b << 8) | (r << 16)).toString(16).padStart(6, 0);\n}", "title": "" }, { "docid": "7f5a2781f676e8b83a65ce3bd7a04f35", "score": "0.5790332", "text": "function fadeColor(col, amt) {\n const min = Math.min, max = Math.max;\n const num = parseInt(col.replace(/#/g, ''), 16);\n const r = min(255, max((num >> 16) + amt, 0));\n const g = min(255, max((num & 0x0000FF) + amt, 0));\n const b = min(255, max(((num >> 8) & 0x00FF) + amt, 0));\n return '#' + (g | (b << 8) | (r << 16)).toString(16).padStart(6, 0);\n}", "title": "" }, { "docid": "91db3ab515c0a57bf89736cc990faeb3", "score": "0.57876337", "text": "function hue2rgb(p,q,h){h = (h + 1) % 1;if(h * 6 < 1){return p + (q - p) * h * 6;}if(h * 2 < 1){return q;}if(h * 3 < 2){return p + (q - p) * (2 / 3 - h) * 6;}return p;}", "title": "" }, { "docid": "a53ed58d57aee621d1f54c82bab07203", "score": "0.57868683", "text": "function parseHex(hex) {\n if (!hex) {\n // Invalid color\n return null;\n }\n var length = hex.length;\n if (length === 0) {\n // Invalid color\n return null;\n }\n if (hex.charCodeAt(0) !== 35 /* Hash */) {\n // Does not begin with a #\n return null;\n }\n if (length === 7) {\n // #RRGGBB format\n var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n return new Color(new RGBA(r, g, b, 1));\n }\n if (length === 9) {\n // #RRGGBBAA format\n var r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2));\n var g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4));\n var b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6));\n var a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8));\n return new Color(new RGBA(r, g, b, a / 255));\n }\n if (length === 4) {\n // #RGB format\n var r = _parseHexDigit(hex.charCodeAt(1));\n var g = _parseHexDigit(hex.charCodeAt(2));\n var b = _parseHexDigit(hex.charCodeAt(3));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b));\n }\n if (length === 5) {\n // #RGBA format\n var r = _parseHexDigit(hex.charCodeAt(1));\n var g = _parseHexDigit(hex.charCodeAt(2));\n var b = _parseHexDigit(hex.charCodeAt(3));\n var a = _parseHexDigit(hex.charCodeAt(4));\n return new Color(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255));\n }\n // Invalid color\n return null;\n }", "title": "" }, { "docid": "669b4e377650921e48c89e5e0d854e23", "score": "0.57809156", "text": "function contrast(hex) {\n let [red, green, blue] = hexToRgb(hex);\n let value = Math.sqrt(red * red * .241 + green * green * .691 + blue * blue * .068);\n\n return (value < 130) ? 'light' : 'dark';\n }", "title": "" }, { "docid": "e06d91f6b7075899cadff51a2089f344", "score": "0.5777091", "text": "function changeRed() {\n if (hue >= 255) {\n direction = -1;\n } else if (hue <= 0) {\n direction = 1;\n }\n\n const floor = Math.floor(hue + (500*dt * direction));\n\n // Prevent rgb color from becoming >255 or <0\n if (floor > 255) {\n return 255;\n } else if (floor < 0) {\n return 0;\n } else {\n return floor;\n }\n }", "title": "" }, { "docid": "1ab0aa706571f77ad067732e0df73e04", "score": "0.57671756", "text": "function of_update_color(id,hex) {\n $('#section-' + id + ' .of-color').css({backgroundColor:hex});\n $('#section-' + id + ' .colorSelector').ColorPickerSetColor(hex);\n $('#section-' + id + ' .colorSelector').children('div').css('backgroundColor', hex);\n $('#section-' + id + ' .of-color').val(hex);\n $('#section-' + id + ' .of-color').animate({backgroundColor:'#ffffff'}, 600);\n }", "title": "" }, { "docid": "b559329c8229eafa993520b828cf4e26", "score": "0.576586", "text": "function getColor(value){\n //value from 0 to 1\n var hue=((1-value)*120).toString(10);\n return [\"hsl(\",hue,\",100%,50%)\"].join(\"\");\n }", "title": "" }, { "docid": "5fb9a51c2d80819efe7eb1513d886f3d", "score": "0.57656527", "text": "_percentchangeHandler({ percentage }) {\n this.percentage = percentage;\n this._updateUI(this._values.hexString());\n }", "title": "" }, { "docid": "10b26264ab2ffbfb0a4abdef777f5ca4", "score": "0.5759228", "text": "function ColorLuminance(hex, lum) {\n\n\t\t\t// validate hex string\n\t\t\thex = String(hex).replace(/[^0-9a-f]/gi, '');\n\t\t\tif (hex.length < 6) {\n\t\t\t\thex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2];\n\t\t\t}\n\t\t\tlum = lum || 0;\n\t\t\t\n\t\t\t// convert to decimal and change luminosity\n\t\t\tvar rgb = \"#\", c, i;\n\t\t\tfor (i = 0; i < 3; i++) {\n\t\t\t\tc = parseInt(hex.substr(i*2,2), 16);\n\t\t\t\tc = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16);\n\t\t\t\trgb += (\"00\"+c).substr(c.length);\n\t\t\t}\n\n\t\t\treturn rgb;\n\t\t}", "title": "" }, { "docid": "c02b9cd3745357b35cc3ee75b4e34745", "score": "0.57583123", "text": "function convert(tempColor) {\n let color;\n if (tempColor < 0) {\n tempColor += 1;\n }\n else if (tempColor > 1) {\n tempColor -= 1;\n }\n if (6 * tempColor < 1) {\n color = tempVar2 + (tempVar1 - tempVar2) * 6 * tempColor;\n }\n else if (2 * tempColor < 1) {\n color = tempVar1;\n }\n else if (3 * tempColor < 2) {\n color = tempVar2 + (tempVar1 - tempVar2) * (2/3 - tempColor) * 6;\n }\n else { color = tempVar2 }\n // console.log(\"color:\", color.toFixed(2));\n return Math.round(color * 255);\n }", "title": "" }, { "docid": "5d59f836d7c0e32f5d6d9062ff589b0b", "score": "0.5750389", "text": "function unconvertColorValue(num){\n return (num / 100) * 255;\n}", "title": "" }, { "docid": "894c13d7f187e09e0b7260ab1517fade", "score": "0.5742302", "text": "function colorForIndex(n, s, l)\n{\n\tvar val = n * 282;\n\tval = mod(val, 360);\n\treturn {'color':'hsl(' + val.toString() + ', 100%, 65%)'};\n}", "title": "" }, { "docid": "5b0468d6ff8fe6d1445434bbf3c6faff", "score": "0.5737947", "text": "function hexColor(str){return '#' + str.replace('#', '')}", "title": "" }, { "docid": "96147d1e5468d41457fcdfd23cb68786", "score": "0.57275504", "text": "function convertHex(hex,opacity){\r\n hex = hex.replace('#','');\r\n r = parseInt(hex.substring(0,2), 16);\r\n g = parseInt(hex.substring(2,4), 16);\r\n b = parseInt(hex.substring(4,6), 16);\r\n\r\n result = 'rgba('+r+','+g+','+b+','+opacity/100+')';\r\n return result;\r\n}", "title": "" }, { "docid": "c1ccf7728eb2cb153a67a2a07b8fa867", "score": "0.57257575", "text": "function rgb_tint(hex, tint) {\n\t\tif(tint === 0) return hex;\n\t\tvar hsl = rgb2HSL(hex2RGB(hex));\n\t\tif (tint < 0) hsl[2] = hsl[2] * (1 + tint);\n\t\telse hsl[2] = 1 - (1 - hsl[2]) * (1 - tint);\n\t\treturn rgb2Hex(hsl2RGB(hsl));\n\t}", "title": "" }, { "docid": "d1316ae97b28fa723978fda10a71cc40", "score": "0.57171845", "text": "function adjust(color, alpha) {\n\t// scale to a range of [0, 2]\n\talpha /= 50;\n\n\t// where to get color(s)?\n\tvar orig_color = hex_rgb_hsl(color);\n\tvar new_color = [orig_color[0], orig_color[1] * alpha, orig_color[2] * alpha];\n\tvar new_hex = hsl_rgb_hex(new_color[0], new_color[1], new_color[2])\n\n\treturn new_hex;\n}", "title": "" }, { "docid": "d49913b04efbe8df75b1f2603f75cfe8", "score": "0.57019496", "text": "function getPercent (v, a) {\n const lastSeven = a.slice(a.length - 9, a.length-2)\n const average = lastSeven.reduce((x,y) => x + y)/7\n const percentChange = ((v - average)/v)*100\n var color = \"\"\n if (Math.abs(percentChange) == percentChange) {\n color = \"#DB5461\"\n } else {\n color = \"#0E5A30\"\n }\n\n return [percentChange, color]\n}", "title": "" }, { "docid": "0b736f04e360ec68ec323dea10d2ad1a", "score": "0.5701708", "text": "function normalizeColorRange(charCodeAt) {\n // 1. reset a to 0 (minus 97), as charCodeAt(97) = a\n // 2. charCodeRange is now from 0 - 25 (26 alphabets)\n // 3. color range is from 0 - 255, so multiply by 10 (consistent results)\n const charCodeRange = charCodeAt - 97;\n return charCodeRange * 10;\n }", "title": "" }, { "docid": "edd07f533ed6b5694dc70b660f4a61e8", "score": "0.5682915", "text": "function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6;}if(h*2<1){return q;}if(h*3<2){return p+(q-p)*(2/3-h)*6;}return p;}", "title": "" }, { "docid": "d9b8fb80465ed2094bed6ce764e04867", "score": "0.5681513", "text": "function convertToRGB(hex) {\n var color = [];\n color[0] = parseInt ((trim(hex)).substring (0, 2), 16);\n color[1] = parseInt ((trim(hex)).substring (2, 4), 16);\n color[2] = parseInt ((trim(hex)).substring (4, 6), 16);\n var colorRGB = 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + 1 + ')';\n gradient.push(colorRGB);\n return color;\n}", "title": "" }, { "docid": "20c7cbffccd08d96460d1970d420e3ba", "score": "0.5677204", "text": "function convertHex(hex,opacity){\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 = 'rgba('+r+','+g+','+b+','+opacity/100+')';\n return result;\n}", "title": "" }, { "docid": "20c7cbffccd08d96460d1970d420e3ba", "score": "0.5677204", "text": "function convertHex(hex,opacity){\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 = 'rgba('+r+','+g+','+b+','+opacity/100+')';\n return result;\n}", "title": "" }, { "docid": "20c7cbffccd08d96460d1970d420e3ba", "score": "0.5677204", "text": "function convertHex(hex,opacity){\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 = 'rgba('+r+','+g+','+b+','+opacity/100+')';\n return result;\n}", "title": "" }, { "docid": "331cdb0e88898ac7ce77715b8583d876", "score": "0.5667633", "text": "function convertHex(hex,opacity) {\n hex = hex.replace('#','');\n var r = parseInt(hex.substring(0,2), 16);\n var g = parseInt(hex.substring(2,4), 16);\n var b = parseInt(hex.substring(4,6), 16);\n\n var result = 'rgba('+r+','+g+','+b+','+opacity/100+')';\n return result;\n}", "title": "" }, { "docid": "514b25d8b1dc7f79bda94acd09a53565", "score": "0.5658007", "text": "function color(hue, sat, light, alpha) {\r\n return 'hsla(' + hue + ', ' + sat + '%, ' + light + '%, ' + alpha + ')';\r\n}", "title": "" }, { "docid": "f33555b949ba736c22636fb06a36cfc1", "score": "0.5644966", "text": "function changeColor(color,amount){\n\tres=new Array();\n\tfor(var i=0;i<3;i++){\n\t\tres[i]=Math.max(0,Math.min(255,color[i]+amount));\n\t}\n\treturn res;\n}", "title": "" }, { "docid": "5af8af3a035bc934051a36cd911f133e", "score": "0.56352895", "text": "function colorFormatChanger (...input) {\n if(input.length === 3) {\n function rgb2hex(rgb) {\n let tempHex = Number(rgb).toString(16);\n if (tempHex.length === 1) {\n tempHex = tempHex.padStart(2, '0')\n }\n return tempHex;\n }\n let hexRed = rgb2hex(input[0]);\n let hexGreen = rgb2hex(input[1]);\n let hexBlue = rgb2hex(input[2]);\n return `#${hexRed}${hexGreen}${hexBlue}`;\n } else {\n console.log(input[0])\n let hexPart = input[0].replace('#', '');\n let red = parseInt(hexPart.substring(0, 2), 16);\n let green = parseInt(hexPart.substring(2, 4), 16);\n let blue = parseInt(hexPart.substring(4, 6), 16);\n return `rgb(${red}, ${green}, ${blue})`;\n }\n}", "title": "" }, { "docid": "ccc23c3e7794a36424736136cc1632e4", "score": "0.56346625", "text": "function linearRGBBlending(color1, color2, percentage) {\n var retval = [0, 0, 0]\n for (var i = 0; i < 3; i++) {\n retval[i] = color1[i] * percentage + color2[i] * (1 - percentage);\n }\n return retval;\n}", "title": "" }, { "docid": "cbce20a918e87da59ed021a5465b700b", "score": "0.5629375", "text": "function convertHex(hex, opacity) {\n hex = hex.replace('#', '');\n let r = parseInt(hex.substring(0, 2), 16);\n let g = parseInt(hex.substring(2, 4), 16);\n let b = parseInt(hex.substring(4, 6), 16);\n\n let result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';\n return result;\n}", "title": "" }, { "docid": "39afb559868eafafcf737f4234a71c1e", "score": "0.562783", "text": "function transitionColour(from, to, width, x) {\n \n var m = x / width;\n var r, g, b;\n \n r = Math.ceil(from[0] * m + to[0] * (1 - m));\n g = Math.ceil(from[1] * m + to[1] * (1 - m));\n b = Math.ceil(from[2] * m + to[2] * (1 - m));\n \n return rgb2hex('rgb(' + r + ', ' + g + ', ' + b + ')');\n \n }", "title": "" } ]
74b3b79b8269b0299ca035a71ff356c4
Generate week header row
[ { "docid": "b15e6de2a8b54ef168826e62be4f5950", "score": "0.8655365", "text": "function generateWeekHeaderRow() {\n var weekTitle = $(\"<div/>\");\n weekTitle.addClass(\"cl-weekTitle\");\n var i = 0;\n var loopLength = clType == \"month\" ? 7 : (clType == \"week\" ? 8 : 2);\n var cellWidth = clType == \"week\" ? getWeekCellWidth(7) : (clContainerWidth - 90);\n if (clType == \"month\") {\n cellWidth = getCellWidth(7);\n }\n var cellHeight = getCellHeight();\n var weekStartDate;\n var currentDate = new Date();\n for (i = 0; i < loopLength; i++) {\n var weekCell = $(\"<div/>\");\n weekCell.addClass(\"week-cell week-head\");\n weekCell.css({width:cellWidth,height:cellHeight,'line-height':cellHeight + \"px\"});\n var weekString = \"\";\n if (i > 0) {\n var interval = i - 1;\n weekStartDate = getWeekStartDate(currWeekDate, interval);\n if (clType == \"day\") {\n weekStartDate = currDate;\n }\n weekString = defaults.weekDayName[i - 1] + \" \" + printWeekHeader(weekStartDate);\n } else if (clType != \"month\" && i < loopLength) {\n weekCell.addClass(\"cl-inActiveCol\");\n }\n weekCell.text(clType == \"month\" ? defaults.weekDayName[i] : weekString);\n if (clType != \"month\" && weekStartDate && weekStartDate.getDate() == currentDate.getDate() && weekStartDate.getMonth() == currentDate.getMonth() && weekStartDate.getFullYear() == currentDate.getFullYear()) {\n weekCell.addClass(\"cl-active\");\n }\n if (clType == \"month\" && i == 6) {\n weekCell.addClass(\"bor\");\n }\n weekTitle.append(weekCell);\n }\n return weekTitle;\n }", "title": "" } ]
[ { "docid": "078f8473fd8e2a93bb4f5f48557e21f3", "score": "0.71036255", "text": "function makeWeekdayHeader() {\n const weekday_header = document.getElementById(\"weekday-header\");\n for (i = 0; i < 7; i++) {\n let day = document.createElement(\"div\");\n day.innerText = days[(i + first_day_of_week) % 7];\n day.id = \"weekday-text\";\n weekday_header.appendChild(day);\n }\n}", "title": "" }, { "docid": "ea8f61c7aebcd6b3d635664dfeee49b8", "score": "0.7074537", "text": "getCalendarWeekNode(firstDay) {\n let date = new Date(firstDay);\n let calendarWeekNode = document.createElement(\"tr\");\n calendarWeekNode.classList.add(styles[\"calendar-widget__week\"]);\n // console.log(date.toString());\n // use the first 7 days of the calendar to render the header\n for (let i = 0; i < 7; i++) {\n calendarWeekNode.appendChild(this.getCalendarDayNode(date));\n date.setDate(date.getDate() + 1);\n }\n\n return calendarWeekNode;\n }", "title": "" }, { "docid": "110509622c7e569792673dcc69e9af59", "score": "0.69970274", "text": "tableHead() {\n return node(\n 'thead',\n node(\n 'tr',\n group({\n node: 'th',\n min: 0,\n max: 6,\n item: counter => weekdays[counter],\n }),\n ),\n );\n }", "title": "" }, { "docid": "c52ce44a64d3eb645fe6487987edaf02", "score": "0.6985327", "text": "function renderHeaderRow(){\n var rowElement = document.createElement('tr');\n var rowData = document.createElement('td');\n rowElement.appendChild(rowData);\n for(var i = 0; i < hours.length; i++){\n rowData = document.createElement('td');\n rowData.textContent = hours[i];\n rowElement.appendChild(rowData);\n }\n rowData = document.createElement('td');\n rowData.textContent = 'Daily Location Total';\n rowElement.appendChild(rowData);\n tableElement.appendChild(rowElement);\n}", "title": "" }, { "docid": "15132cfa5dc8d11229a89160fa3bb716", "score": "0.69742364", "text": "function generateTableHeader() {\n var tHCount = 17; //there are 16 <th></th> elements to be created after the blank\n var tableHeaderEl = document.createElement('thead'); //<thead></thead>\n var rowEl = document.createElement('tr'); //<tr></tr>\n for (var i = 0; i <= tHCount; i++) {\n if (i === 0) {\n var thEl = document.createElement('th'); //<th></th> stays blank\n rowEl.appendChild(thEl);\n } else if (i > 0 && i < tHCount) {\n var thEl = document.createElement('th'); //<th></th>\n if (i < 7) {\n thEl.textContent = 5 + i + ':00am';\n rowEl.appendChild(thEl);\n } else if (i === 7) {\n thEl.textContent = 5 + i + ':00pm';\n rowEl.appendChild(thEl);\n } else {\n thEl.textContent = i - 7 + ':00pm';\n rowEl.appendChild(thEl);\n }\n } else {\n thEl.textContent = 'Daily Location Total';\n rowEl.appendChild(thEl);\n }\n } //end of loop at i <= 17 because final thEl is appended within the loop\n tableHeaderEl.appendChild(rowEl);\n kalEl.appendChild(tableHeaderEl);\n}", "title": "" }, { "docid": "b0ed04bd677ae03a3fa876c0a484bc8c", "score": "0.68992513", "text": "static weekHeader(firstDay,days=7,size=-1){\n // DON'T FORGET! We still need to find the first day of the week!\n \n let weekHeadDiv = document.createElement(\"div\");\n let dotwDiv = document.createElement(\"div\");\n dotwDiv.classList.add(\"dotw\");\n\n if(days > 1){\n let weekdays = Array.from({length: days}, (wday,i) => {\n let wdayDiv = dotwDiv.cloneNode(true); // deep clone!\n let d = (firstDay + i) % 7;\n let wdayText = (size === -1 ) ? dotw[d] : (size === 0) ? i : dotw[d].slice(0,size);\n if(size !== -1){\n let wdayAbbr = document.createElement(\"abbr\");\n wdayAbbr.setAttribute(\"title\",dotw[d]);\n wdayAbbr.innerText = wdayText;\n wdayDiv.append(wdayAbbr);\n }else{\n wdayDiv.innerText = wdayText;\n }\n weekHeadDiv.append(wdayDiv);\n });\n } else {\n // Get it for this day\n let d = firstDay % 7; //.getDay();\n let dotwText = (size === -1 ) ? dotw[d] : (size === 0) ? i : dotw[d].slice(0,size);\n if(size !== -1){\n let dotwAbbr = document.createElement(\"abbr\");\n dotwAbbr.setAttribute(\"title\",dotw[i]);\n dotwAbbr.innerText = dotwText;\n dotwDiv.append(dotwAbbr);\n }else{\n dotwDiv.innerText = dotwText;\n }\n weekHeadDiv.append(dotwDiv);\n }\n return weekHeadDiv;\n }", "title": "" }, { "docid": "b152b6ebfe26562767c03b19997c9eea", "score": "0.68361664", "text": "function generateTableHeader() {\r\n var tableRowLocation = document.getElementById(\"tableHeader\");\r\n var blankHeader = document.createElement(\"th\");\r\n tableRowLocation.appendChild(blankHeader);\r\n for (var i = 0; i < hours.length; i++) {\r\n var hoursElement = document.createElement(\"th\");\r\n hoursElement.textContent = hours[i];\r\n tableRowLocation.appendChild(hoursElement);\r\n }\r\n var totalHeader = document.createElement(\"th\");\r\n totalHeader.textContent = \"Daily Total\";\r\n tableRowLocation.appendChild(totalHeader);\r\n}", "title": "" }, { "docid": "a6fcbfe06c39efb346bb80e3c36cb8fb", "score": "0.6835437", "text": "function build_Header() {\r\n var header_tr = document.createElement('tr');\r\n var blankSpace = document.createElement('th');\r\n blankSpace.textContent = 'location'; //optional\r\n header_tr.appendChild(blankSpace);\r\n\r\n for(var l = 0; l < hours.length; l++){\r\n var nextHeader_td = document.createElement('th');\r\n nextHeader_td.textContent = hours[l];\r\n header_tr.appendChild(nextHeader_td);\r\n }\r\n var total_td = document.createElement('th');\r\n total_td.textContent = 'Daily Location Total';\r\n header_tr.appendChild(total_td);\r\n tableEl.appendChild(header_tr);\r\n}", "title": "" }, { "docid": "8dba3dd83bd660d10b51e33aaf69a7f9", "score": "0.6790241", "text": "function renderTableHeader() { // to create the first row and append the table with it.\n\n var rowHeader = document.createElement('tr');//create a row element\n\n for (var i = 0; i < hours.length + 2; i++) { //loop over columns (16) '14 for hours, 1 for first empty cell, 1 for daily location total\n\n if (i === 0) { // check for first cell (empty)\n var colData = document.createElement('th');\n rowHeader.appendChild(colData);\n }\n\n else if (i === hours.length + 1) { // check for last cell (Daily Location Total)\n colData = document.createElement('th');\n rowHeader.appendChild(colData);\n colData.textContent = 'Daily Location Total';\n }\n else { // add hours to cells\n colData = document.createElement('th');\n rowHeader.appendChild(colData);\n colData.textContent = hours[i - 1]; // because will start print hours from second cell..\n }\n\n }\n table.appendChild(rowHeader); //append the table with this header row\n\n}//end of renderTableHeader.", "title": "" }, { "docid": "b3d0d2ca25483e5b553297f17e77afe0", "score": "0.6789813", "text": "function createHeaderRow() {\n var headerRow = addElement('tr', grabContainer);\n addElement('th', headerRow);\n for (var i = 0; i < hours.length; i++) {\n addElement('th', headerRow, hours[i]);\n }\n}", "title": "" }, { "docid": "8d23eab5a13d9c115d2d44286dea9d84", "score": "0.67879474", "text": "function header(){\n let headerRow = document.createElement('tr');\n table.appendChild(headerRow);\n let firstTh = document.createElement('th');\n headerRow.appendChild(firstTh);\n firstTh.textContent = 'Shop';\n \n // to print hours in web\n for (let i = 0; i < hours.length; i++) {\n let thElement = document.createElement('th');\n headerRow.appendChild(thElement);\n // hours[0] ===> 6 AM\n thElement.textContent = hours[i];\n }\n let lastTh = document.createElement('th');\n headerRow.appendChild(lastTh);\n lastTh.textContent = 'Dialy Location Total';\n}", "title": "" }, { "docid": "78add68e3e119be634056c179bda4a98", "score": "0.67216986", "text": "function getWeekDayHead(sunday){\n var wdOutput =\"\";\n wdOutput += \"<table id = 'week-day-heading'>\";\n wdOutput += \"<tr>\";\n wdOutput += \"<td class='redips-mark'>MEAL</td>\";\n wdOutput += \"<td class='redips-mark'>Sun \" + sunday.getDate() + \"</td>\";\n sunday.setDate(sunday.getDate() + 1); \n wdOutput += \"<td class='redips-mark'>Mon \" + sunday.getDate() + \"</td>\";\n sunday.setDate(sunday.getDate() + 1); \n wdOutput += \"<td class='redips-mark'>Tue \" + sunday.getDate() + \"</td>\";\n sunday.setDate(sunday.getDate() + 1); \n wdOutput += \"<td class='redips-mark'>Wed \" + sunday.getDate() + \"</td>\";\n sunday.setDate(sunday.getDate() + 1); \n wdOutput += \"<td class='redips-mark'>Thu \" + sunday.getDate() + \"</td>\";\n sunday.setDate(sunday.getDate() + 1); \n wdOutput += \"<td class='redips-mark'>Fri \" + sunday.getDate() + \"</td>\";\n sunday.setDate(sunday.getDate() + 1); \n wdOutput += \"<td class='redips-mark'>Sat \" + sunday.getDate() + \"</td>\";\n wdOutput += \"</tr>\";\n wdOutput += \"</table>\";\n\n return wdOutput;\n}", "title": "" }, { "docid": "10be75f58a3273e52c4e9668d74f06c2", "score": "0.6718091", "text": "function makeHeaderRow() {\n var trEl = document.createElement(\"tr\");\n var thEl = document.createElement('th');\n thEl.textContent = ' ';\n trEl.appendChild(thEl);\n \n for (var i=0; i< hours.length; i++){\n //create, content, append\n thEl = document.createElement('th');\n thEl.textContent = hours[i];\n trEl.appendChild(thEl);\n };\n var thEl = document.createElement('th');\n thEl.textContent = 'Daily Location totals';\n trEl.appendChild(thEl);\n salesTable.appendChild(trEl);\n}", "title": "" }, { "docid": "32da78e21b39a2b582aa67fd375969cf", "score": "0.6690688", "text": "function makeHeaderRow () {\n var salesDataTable = document.getElementById('salesDataTable');\n\n var salesDataRow = document.createElement('tr');\n var salesDataEmptyHeader = document.createElement('th');\n salesDataEmptyHeader.textContent = '';\n salesDataRow.appendChild(salesDataEmptyHeader);\n\n for (var i = 0; i < openHours.length; i++) {\n var salesDataHeader = document.createElement('th');\n salesDataHeader.textContent = openHours[i];\n salesDataRow.appendChild(salesDataHeader);\n }\n salesDataEmptyHeader = document.createElement('th');\n salesDataEmptyHeader.textContent = 'Daily Total';\n salesDataRow.appendChild(salesDataEmptyHeader);\n\n salesDataTable.appendChild(salesDataRow);\n}", "title": "" }, { "docid": "e1dcb0f919f45719d83337a9e7ef215a", "score": "0.66758764", "text": "function renderHeader()\n{var headerEl=document.createElement('tr');\ntableEl.appendChild(headerEl);\nvar th1El=document.createElement('th');\nheaderEl.appendChild(th1El);\n//th1El.textContent=\" \";\nfor (let i=6;i<12;i++)\n{var thEl=document.createElement('th');\nheaderEl.appendChild(thEl);\nthEl.textContent=`${i}a.m`};\nfor (let i=12;i<13;i++)\n{var thEl=document.createElement('th');\nheaderEl.appendChild(thEl);\nthEl.textContent=`${i}p.m`};\nfor (let i=1;i<8;i++)\n{var thEl=document.createElement('th');\nheaderEl.appendChild(thEl);\nthEl.textContent=`${i}p.m`};\nvar thEl=document.createElement('th');\nheaderEl.appendChild(thEl);\nthEl.textContent=`Daily location total`;\n}", "title": "" }, { "docid": "c369cc6bc7bf6b99520cf9a830ab1c8b", "score": "0.66655046", "text": "function setupcalendarheader() {\n \n // for each day in the datearray...\n for (let j=0; j<datearray.length; j++) {\n // create a column header\n let headerday = document.createElement('div')\n headerday.className = \"calendaritem\"\n headerday.innerHTML = `<p>${datearray[j].toDateString()}</p>`\n calendarheaderright.append(headerday)\n }\n}", "title": "" }, { "docid": "5daabc50f1dab5d21533cd724fa754f9", "score": "0.66488785", "text": "function makeHeaderRow() {\n //create an empty row\n var row = document.createElement('tr');\n\n var emptyCell = document.createElement('th'); //create an empty cell\n row.appendChild(emptyCell); //append cell to row\n\n var dailyLocation = document.createElement('th');//create daily location total cell\n dailyLocation.textContent = 'Total'; //give text content to daily location cell\n row.appendChild(dailyLocation);//append cell to row\n\n for (i = 0; i < hours.length; i++){\n var cell = document.createElement('th'); //create empty cell\n cell.textContent = hours[i];//give cell content from hours[i]\n row.appendChild(cell);//append cell to the row\n }\n\n beansTable.appendChild(row);//append row to table\n}", "title": "" }, { "docid": "e34f7195bae861f93185d397ffebe3f8", "score": "0.66401905", "text": "function headerRender(){\n var trEl =document.createElement('tr');\n tableEl.appendChild(trEl);\n var thEl = document.createElement('th');\n trEl.appendChild(thEl); \n thEl.textContent = ' ' ;\n\n for(var i=0; i<hours.length ; i++){\n var thEl = document.createElement('th');\n trEl.appendChild(thEl);\n thEl.textContent = hours[i];\n\n\n }\n}", "title": "" }, { "docid": "90d756e47f7f08a2a2b9de5386d768ec", "score": "0.6597288", "text": "_createWeekCells() {\n const daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);\n const dateNames = this._dateAdapter.getDateNames();\n this._weeks = [[]];\n for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {\n if (cell == DAYS_PER_WEEK) {\n this._weeks.push([]);\n cell = 0;\n }\n const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), i + 1);\n const enabled = this._shouldEnableDate(date);\n const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);\n const cellClasses = this.dateClass ? this.dateClass(date) : undefined;\n this._weeks[this._weeks.length - 1].push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses, this._getCellCompareValue(date), date));\n }\n }", "title": "" }, { "docid": "91c06af0d7a7fe56eb30dc2b7e7eb9f1", "score": "0.6567883", "text": "function createHeaderRow() {\n //This will create one blank item in the header row\n var headerRow = document.createElement('tr');\n var blank = document.createElement('th');\n blank.innerText = 'Locations';\n headerRow.appendChild(blank);\n\n //This for loop will create the hour column headings\n for (var i = 0; i < hours.length; i++) {\n var header = document.createElement('th');\n header.innerText = hours[i];\n headerRow.appendChild(header);\n }\n\n //This will create the daily total label\n var lastDescription = document.createElement('th');\n lastDescription.innerText = 'Daily Location Total';\n headerRow.appendChild(lastDescription);\n\n //This will append the header row to the table\n table.appendChild(headerRow);\n\n}", "title": "" }, { "docid": "af84f0086a5cd882ecb1ab4e6cad2b95", "score": "0.65588", "text": "function headerRow (){\n \n let tr = document.createElement('tr');\n table.appendChild(tr);\n\n let th1 = document.createElement('th');\n tr.appendChild(th1);\n\n let th =null;\n for(let i =0; i<hours.length; i++){\n th = document.createElement('th');\n tr.appendChild(th);\n th.textContent = hours[i];\n }\n\n let th3 = document.createElement('th');\n tr.appendChild(th3);\n th3.textContent = \"Daily Location Total\";\n\n}", "title": "" }, { "docid": "9b397cf9e26254c94c28613a582b17cb", "score": "0.6549461", "text": "function Head() {\n var _a = useDayPicker(), locale = _a.locale, classNames = _a.classNames, styles = _a.styles, labels = _a.labels, showWeekNumber = _a.showWeekNumber, formatWeekdayName = _a.formatters.formatWeekdayName;\n var weekdays = getWeekdays(locale);\n return (external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(\"thead\", { style: styles === null || styles === void 0 ? void 0 : styles[UIElement.Head], className: classNames[UIElement.Head] },\n external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(\"tr\", { style: styles === null || styles === void 0 ? void 0 : styles[UIElement.HeadRow], className: classNames[UIElement.HeadRow] },\n showWeekNumber && (external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(\"th\", { style: styles === null || styles === void 0 ? void 0 : styles[UIElement.HeadCell], className: classNames[UIElement.HeadCell] })),\n weekdays.map(function (weekday, i) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(\"th\", { key: i, scope: \"col\", className: classNames[UIElement.HeadCell], style: styles === null || styles === void 0 ? void 0 : styles[UIElement.HeadCell], \"aria-label\": labels.weekdayLabel(weekday, { locale: locale }) }, formatWeekdayName(weekday, { locale: locale }))); }))));\n}", "title": "" }, { "docid": "3d22c5e906529817a4c187c92abb3da7", "score": "0.65205467", "text": "function renderHeader() {\n var thead = document.createElement('thead');\n var trEl = document.createElement('tr');\n createElement('th', 'Locations\\\\Hours', trEl);\n for (var i = 0; i < hours.length; i++) {\n createElement('th', hours[i], trEl);\n }\n createElement('th', 'Totals', trEl);\n thead.appendChild(trEl);\n table.appendChild(thead);\n}", "title": "" }, { "docid": "3f966db71e4e86b5930e5d726dca3d31", "score": "0.65201706", "text": "function renderHeader() {\n var trElement = document.createElement('tr');\n var thElement = document.createElement('th');\n thElement.textContent = 'Locations';\n trElement.appendChild(thElement);\n\n for (var i = 0; i < hours.length; i++) {\n var tdElement = document.createElement('td');\n tdElement.textContent = hours[i];\n trElement.appendChild(tdElement);\n }\n thElement = document.createElement('th');\n thElement.textContent = 'Total';\n trElement.appendChild(thElement);\n storeTable.appendChild(trElement);\n}", "title": "" }, { "docid": "d0e10bdecdb821ab74af082d18975b29", "score": "0.6517721", "text": "function renderTimeHeader(){\n var trEl = document.createElement('tr');\n var thEl = document.createElement('th');\n thEl.textContent = 'Locations';\n trEl.appendChild(thEl);\n for (var i=0; i<hours.length; i++){\n thEl = document.createElement('th');\n thEl.textContent = hours[i];\n trEl.appendChild(thEl);\n }\n storeTable.appendChild(trEl);\n}", "title": "" }, { "docid": "9d1b98f42e7faea91b60dc2a90da0f80", "score": "0.6516518", "text": "function addRow(week) {\n let tr = document.createElement(\"TR\");\n let weekRow = week.map(x => tr.appendChild(x));\n return tr;\n}", "title": "" }, { "docid": "4f67b2313e4f1238141754fe3898dbae", "score": "0.6516234", "text": "function calWeekdayRow() {\r\n // Array of the weekday abbreviations\r\n let dayName = [\"SUN\", \"MON\", \"TUE\", \"WED\", \"THU\", \"FRI\", \"SAT\"];\r\n let rowHTML = \"<tr>\";\r\n\r\n //Loop through the dayName array building <th> elements for the row\r\n for(let i=0; i < dayName.length; i++) {\r\n rowHTML += \"<th class='calendar_weekdays'>\" + dayName[i]+\"</th>\";\r\n } //end of for loop\r\n\r\n rowHTML += \"</tr>\";\r\n return rowHTML;\r\n}", "title": "" }, { "docid": "a94b5f5d6644560d2d709b4afb384bac", "score": "0.65132797", "text": "generateWeekRowDayCellText(day){\n\n let calendarDate = new Date()\n , currentMonthDay = calendarDate.getDate()\n , currentMonthDayTime = calendarDate.getTime()\n , dayOffset = (currentMonthDay - day)\n\n calendarDate.setDate(currentMonthDay - dayOffset)\n\n let dayOfMonth = calendarDate.getDate()\n , dayTextTime = calendarDate.getTime()\n , dayTextWithStyle = this.applyHighlightStyle(dayOfMonth, dayTextTime, currentMonthDayTime)\n\n /***OUTPUT TO TABLECELL***/\n return dayTextWithStyle\n\n }", "title": "" }, { "docid": "0b2feba17680f1295f77e5b5131eb634", "score": "0.6485829", "text": "function addHeaders(dow) {\n\tvar headers = [{\n\t\tclass: \"startTime\",\n\t\ttext: \"Start\"\n\t}, {\n\t\tclass: \"stopTime\",\n\t\ttext: \"Stop\"\n\t}, {\n\t\tclass: \"gate\",\n\t\ttext: \"Gate\"\n\t}, {\n\t\tclass: \"clubhouse\",\n\t\ttext: \"Clubhouse\"\n\t}, {\n\t\tclass: \"turret\",\n\t\ttext: \"Turret\"\n\t}, {\n\t\tclass: \"simoni\",\n\t\ttext: \"Simoni\"\n\t}, {\n\t\tclass: \"mcgregor\",\n\t\ttext: \"McGregor\"\n\t}, {\n\t\tclass: \"breuning\",\n\t\ttext: \"Breuning\"\n\t}, {\n\t\tclass: \"demo\",\n\t\ttext: \"Grind Demo\"\n\t}, {\n\t\tclass: \"sales\",\n\t\ttext: \"T-Shirts\"\n\t}, {\n\t\tclass: \"raffle\",\n\t\ttext: \"Raffle\"\n\t}, {\n\t\tclass: \"icecream\",\n\t\ttext: \"Ice-Cream\"\n\t}];\n\n\tvar box = document.getElementById(dow);\n\tvar containerDiv = document.createElement('div');\n\tcontainerDiv.setAttribute('class', 'container-fluid');\n\tcontainerDiv.setAttribute('id', dow + 'Cont');\n\tbox.appendChild(containerDiv);\n\tvar rowDiv = document.createElement('div');\n\trowDiv.setAttribute('class', 'row display-flex hdr');\n\trowDiv.setAttribute('id', dow + 'Hdr');\n\tcontainerDiv.appendChild(rowDiv);\n\n\tvar rowBox = document.getElementById(dow + \"Hdr\");\n\n\tfor (var i = 0; i < headers.length; i++) {\n\t\tvar hdrBox = document.createElement('div');\n\t\tif (i < 1) {\n\t\t\thdrBox.setAttribute('class', 'col-xs-1 col-xs-1-offset headers');\n\t\t} else {\n\t\t\thdrBox.setAttribute('class', 'col-xs-1 headers');\n\t\t}\n\t\thdrBox.innerText = headers[i].text;\n\t\trowBox.appendChild(hdrBox);\n\t}\n\n}", "title": "" }, { "docid": "65da4d3afae50cd330ff87b4849fe80a", "score": "0.6466251", "text": "function headerRow() {\n salmonTable.textContent = '';\n var trEl = document.createElement('tr');\n var thEl = document.createElement('th');\n thEl.textContent = 'Hours:';\n trEl.appendChild(thEl);\n // create, content, append for\n for (var i = 0; i < hours.length; i++){\n thEl = document.createElement('th');\n thEl.textContent = hours[i];\n trEl.appendChild(thEl);\n }\n thEl = document.createElement('th');\n thEl.textContent = 'Daily Totals';\n trEl.appendChild(thEl);\n salmonTable.appendChild(trEl);\n}", "title": "" }, { "docid": "34ed7f725cb64d0f8d9707198dc20567", "score": "0.6457931", "text": "function createRowHeader() {\n var firstRow = document.getElementById('firstRow');\n for(var i = 0; i < storeHoursArray.length; i++){\n var th = document.createElement('th');\n th.textContent = storeHoursArray[i];\n firstRow.appendChild(th);\n }\n}", "title": "" }, { "docid": "52159ebc74834d4503b976b54f548d19", "score": "0.6451364", "text": "function makeheader() {\n let headerRow = document.createElement('tr')\n\n table.appendChild(headerRow)\n // first element in the first row\n let firsthead = document.createElement('th')\n headerRow.appendChild(firsthead)\n firsthead.textContent = \"our shop\"\n\n // for loop to make the hour in the first row\n for (i = 0; i < workinghour.length; i++) {\n let tabhead = document.createElement('th')\n headerRow.appendChild(tabhead)\n tabhead.textContent = workinghour[i]\n }\n // last element in the first row\n let lastheding = document.createElement('th')\n headerRow.appendChild(lastheding)\n lastheding.textContent = \"daily location total\"\n\n\n}", "title": "" }, { "docid": "85e0507a4c9351fb0491a5d0ab63d67b", "score": "0.64509475", "text": "generateDays(){\n var thead = document.createElement(\"thead\");\n var tr = document.createElement(\"tr\");\n for(var i = 0; i < this.days.length; i++){\n var th = document.createElement(\"th\");\n th.style.backgroundColor = \"white\";\n th.innerText = this.days[i];\n tr.appendChild(th);\n }\n thead.appendChild(tr);\n document.getElementById(\"calendar\").appendChild(thead);\n }", "title": "" }, { "docid": "a67862a757e8ed1bbecce81cf40ffe08", "score": "0.6445521", "text": "function tableHeader() {\n //creat first TableRow tr Element\n let headingRow = document.createElement(\"tr\");\n //append the tr element to the table\n tableElement.appendChild(headingRow);\n\n let firstThElement = document.createElement(\"th\");\n headingRow.appendChild(firstThElement);\n firstThElement.textContent = \"#\";\n\n for (let i = 0; i < hours.length; i++) {\n let hoursThElement = document.createElement(\"th\");\n headingRow.appendChild(hoursThElement);\n hoursThElement.textContent = hours[i];\n }\n let lastThElement = document.createElement(\"th\");\n headingRow.appendChild(lastThElement);\n lastThElement.textContent = \"GrandTotal\";\n}", "title": "" }, { "docid": "637b25abbb60d3fc0b0cdc99fbe32515", "score": "0.64430344", "text": "function renderTimeHeaderCust(){\n var trEl = document.createElement('tr');\n var thEl = document.createElement('th');\n thEl.textContent = 'Locations';\n trEl.appendChild(thEl);\n for (var i=0; i<hours.length; i++){\n thEl = document.createElement('th');\n thEl.textContent = hours[i];\n trEl.appendChild(thEl);\n }\n custTable.appendChild(trEl);\n}", "title": "" }, { "docid": "885f4806b89caffc4b627a22d26a9aed", "score": "0.64292604", "text": "function formatWeek(aOH, dFrom, nDays, bVisible) {\n var ret = [];\n\n var idxDay = new Date(dFrom);\n var formatedDayFrom = getFormatedDate(idxDay);\n var formatedDayTo = getFormatedDate(shiftDay(dFrom, nDays + 1));\n\n var idx = \"#\" + formatedDayFrom;\n\n var clVisible = \"\";\n if (!bVisible)\n clVisible = 'class=\"oh-extended\" style=\"display:none\"';\n\n while (formatedDayFrom != formatedDayTo) {\n ret.push('<tr ' + clVisible + '>');\n\n if (idx in aOH) {\n ret.push('<td><b>' + getDayName(idxDay) + '</b>: </td><td class=\"oh-times\">' + aOH[idx].join(', ') + '</td></tr>');\n } else\n ret.push(\"<td><b>\" + getDayName(idxDay) + '</b>: </td><td class=\"oh-times\">' + \"zavřeno\" + \"</td></tr>\");\n\n idxDay = shiftDay(idxDay, 1);\n formatedDayFrom = getFormatedDate(idxDay);\n idx = \"#\" + formatedDayFrom;\n }\n return ret;\n }", "title": "" }, { "docid": "110248df267677ec43387240ee3ce23c", "score": "0.64216757", "text": "function createCalendar(){\n const table = document.createElement('TABLE');\n table.border = '1';\n table.style.textAlign = 'center';\n\n const tableBody = document.createElement('TBODY');\n table.appendChild(tableBody);\n\n const headlineRow = document.createElement('TR');\n headlineRow.setAttribute('id', 'headlineRow');\n\n const monday = createDayElements('monday', 'Mandag');\n const tuesday = createDayElements('tuesday', 'Tirsdag');\n const wednesday = createDayElements('wednesday', 'Onsdag');\n const thursday = createDayElements('thursday', 'Torsdag');\n const friday = createDayElements('friday', 'Fredag');\n const saturday = createDayElements('saturday', 'Lørdag');\n const sunday = createDayElements('sunday', 'Søndag');\n\n\n function createDayElements(idDay, innerTextDay){\n const dayElement = document.createElement('TH');\n dayElement.setAttribute('id', idDay);\n dayElement.innerText = innerTextDay;\n dayElement.style.backgroundColor = '#a0a09d';\n dayElement.style.width = \"150px\";\n dayElement.style.textAlign = 'center';\n\n return dayElement;\n }\n\n headlineRow.appendChild(monday);\n headlineRow.appendChild(tuesday);\n headlineRow.appendChild(wednesday);\n headlineRow.appendChild(thursday);\n headlineRow.appendChild(friday);\n headlineRow.appendChild(saturday);\n headlineRow.appendChild(sunday);\n tableBody.appendChild(headlineRow)\n\n\n /*\n <table border=\"1\">\n <tbody>\n\n <td>\n <tr>\n <td colspan=\"2\">hrj</td>\n </tr>\n <tr>\n <td>123</td>\n <td>123</td>\n </tr>\n <tr>\n <td>123</td>\n <td>123</td>\n </tr>\n <tr>\n <td>123</td>\n <td>123</td>\n </tr>\n\n </td>\n </tbody>\n </table>\n */\n\n for(let i = 1; i <=6; i++){\n const week = document.createElement('TR');\n week.setAttribute('id', 'week' + i);\n\n tableBody.appendChild(week);\n\n for(let j = 1; j <= 7; j++){\n const day = document.createElement('TD');\n day.setAttribute('id', 'week' + i + 'day' + j);\n\n const date = document.createElement('TR');\n // week1day6date\n date.setAttribute('id', 'week' + i + 'day' + j + 'date');\n date.setAttribute('colspan', '2');\n date.width = '100%'\n date.style.fontWeight = 'bold';\n date.style.fontSize = '15px';\n\n day.appendChild(date);\n\n for(let k = 1; k <= 3; k++){\n const row = document.createElement('TR');\n row.setAttribute('id', 'week' + i + 'day' + j + 'row' + k);\n\n\n day.appendChild(row);\n\n for(let l = 1; l <= 2; l++){\n const bio = document.createElement('TD');\n bio.setAttribute('id', 'week' + i + 'day' + j + 'row' + k + 'bio' + l);\n\n\n row.appendChild(bio)\n }\n }\n week.appendChild(day);\n }\n }\n divCalendar.appendChild(table);\n divCalendar.appendChild(document.createElement('br'));\n\n}", "title": "" }, { "docid": "40546327c456a58db7d60d787a469395", "score": "0.6407312", "text": "function getFormattedWeek(date) {\n return printWeekHeader(getWeekStartDate(date), true, \" \") + \" - \" + printWeekHeader(getWeekStartDate(date, 6), true, \" \") + \", \" + date.getFullYear();\n }", "title": "" }, { "docid": "32be13cf6a6b7cafd9f37e5f572e755d", "score": "0.6397927", "text": "weekView() {\n this.view = \"week\";\n this.startIndex = 0;\n this.createCalendar();\n }", "title": "" }, { "docid": "7c8b5ae01799ec7a103e7b7a7106e3c8", "score": "0.6390318", "text": "function headerRender() {\n var trEl = document.createElement('tr');\n var thEl = document.createElement('th');\n thEl.textContent = 'Locations';\n trEl.appendChild(thEl);\n for (var i = 0; i < hoursLong.length; i++) {\n thEl = document.createElement('th');\n thEl.textContent = hoursLong[i];\n trEl.appendChild(thEl);\n } thEl = document.createElement('th');\n thEl.textContent = 'Total Daily Cookies';\n trEl.appendChild(thEl);\n storeTable.appendChild(trEl);\n}", "title": "" }, { "docid": "a76eabb3c76a83353aead9557d1ba107", "score": "0.63786066", "text": "function tableHeader() {\n thEl = document.createElement('th');\n trEl = document.createElement('tr');\n thEl.textContent = '';\n trEl.appendChild(thEl);\n table.appendChild(thEl);\n\n for(var i = 0; i < hoursArray.length; i++) {\n var thEl = document.createElement('th');\n thEl.textContent = hoursArray[i];\n table.appendChild(thEl);\n }\n}", "title": "" }, { "docid": "b8a2d8019335b27b2a37f116aaccc73b", "score": "0.6371182", "text": "function createWeeksWonByWeek(weeksWonByWeek){\n\n\t//Steps to do:\n\t//\t1. Make the header (and add the year in if we have it).\n\t//\t2. Add in a row for each week and a list for each player who won\n\t//\t that week.\n\t//\t3. That's it.\n\t\n\tvar yearSelected = isSpecificYearSelected();\n\t\n\tvar yearHeader = '';\n\tif (!yearSelected){\n\t\tyearHeader = '<th class=\"standings-table-header\">Year</th>';\n\t}\n\t\n\tvar weeksWonByWeekHeaderHtml = '<thead class=\"standings-table-head\">' +\n\t\t\t\t\t\t\t\t \t\t'<tr>' + \n\t\t\t\t\t\t\t\t \t\t\tyearHeader + \n\t\t\t\t\t\t\t\t \t\t\t'<th class=\"standings-table-header\">Week</th>' +\n\t\t\t\t\t\t\t\t \t\t\t'<th class=\"standings-table-header\">Record</th>' +\n\t\t\t\t\t\t\t\t \t\t\t'<th class=\"standings-table-header\">Winner</th>' +\n\t\t\t\t\t\t\t\t \t\t'</tr>' +\n\t\t\t\t\t\t\t\t \t'</thead>';\n\t\n\tvar weeksWonByWeekBodyHtml = '<tbody class=\"standings-table-body\">';\n\t\n\tif (isEmpty(weeksWonByWeek)){\n\t\tweeksWonByWeekBodyHtml = weeksWonByWeekBodyHtml + '<tr><td colspan=\"4\" style=\"text-align: center;\">No results</td></tr>';\n\t}\n\t\n\tfor (var index = 0; index < weeksWonByWeek.length; index++){\n\t\tvar weekRecord = weeksWonByWeek[index];\n\t\n\t\tvar yearCell = '';\n\t\tif (!yearSelected){\n\t\t\tyearCell = '<td class=\"standings-table-cell\">' + weekRecord.season.year + '</td>';\n\t\t}\n\t\t\n\t\tvar recordHtml = weekRecord.record.wins + ' - ' + weekRecord.record.losses;\n\t\t\n\t\tif (weekRecord.record.ties > 0){\n\t\t\trecordHtml = recordHtml + ' - ' + weekRecord.record.ties;\n\t\t}\n\t\t\n\t\t//We want to show the players in a consistent order, so sort them by name.\n\t\tsortPlayersByName(weekRecord.players);\n\t\t\n\t\tvar playerHtml = '<ul class=\"standings-table-cell-list\">';\n\t\tfor (var playerIndex = 0; playerIndex < weekRecord.players.length; playerIndex++){\n\t\t\tvar player = weekRecord.players[playerIndex];\n\t\t\t\n\t\t\tvar playerPicksLink = createPicksLink(player.name, weekRecord.season.year, weekRecord.week.weekKey, null, player.name);\n\t\t\t\n\t\t\tvar plHtml = '<li>' + playerPicksLink + '</li>';\n\t\t\tplayerHtml = playerHtml + plHtml;\n\t\t}\n\t\t\n\t\tplayerHtml = playerHtml + '</ul>';\n\n\t\tvar weeksWonByWeekRow = '<tr class=\"standings-table-row\">' +\n\t\t\t\t\t\t\t\t\tyearCell +\n\t\t\t\t\t\t\t\t\t'<td class=\"standings-table-cell\">' + shortenWeekLabel(weekRecord.week.label) + '</td>' +\n\t\t\t\t\t\t\t\t '<td class=\"standings-table-cell\">' + recordHtml + '</td>' +\n\t\t\t\t\t\t\t\t '<td class=\"standings-table-cell\">' + playerHtml + '</td>' +\n\t\t\t\t\t\t\t\t'</tr>';\n\t\t\n\t\tweeksWonByWeekBodyHtml = weeksWonByWeekBodyHtml + weeksWonByWeekRow;\n\t}\n\t\n\tweeksWonByWeekBodyHtml = weeksWonByWeekBodyHtml + '</tbody>';\n\t\n\tvar weeksWonByWeekHtml = '<table class=\"standings-table\">' + weeksWonByWeekHeaderHtml + weeksWonByWeekBodyHtml + '</table>';\n\t\n\treturn weeksWonByWeekHtml;\n}", "title": "" }, { "docid": "3638961ea639dc8b25009cc5d74a2f60", "score": "0.6352834", "text": "function Swe(t,e){var n=tt(Tc),r=n.t,a=n.globalConfig,o=A(function(){return t.week||r(a.value.week).split(\",\")});function i(u){var s=o.value;return ft(s)&&s[u-1]?s[u-1]:gwe(u)}var l=A(function(){for(var u=[],s=1,c=7,f=e.realFirstDayOfWeek;f<=c;f++)u.push({num:f,display:i(f)});if(e.realFirstDayOfWeek>s)for(var d=s;d<e.realFirstDayOfWeek;d++)u.push({num:d,display:i(d)});return u});return{cellColHeaders:l}}", "title": "" }, { "docid": "3b08c351a4ea9b8e79fddfc620364211", "score": "0.63448733", "text": "function appendDayOfTheWeek(row, day)\n{\n\tvar th = document.createElement(\"TH\");\n\tth.innerHTML = day;\n\trow.appendChild(th);\n}", "title": "" }, { "docid": "f16d841f536502375b2ee13a049dfa43", "score": "0.63293195", "text": "function renderHeaderRow() {\n var storeTable = document.getElementById('store_table');\n var tableRow = document.createElement('tr');\n var blankTableHeader = document.createElement('th');\n var totalTableHeader = document.createElement('th');\n blankTableHeader.innerHTML = '<th>Store Name \\&dArr; || Store Hours \\&rArr;</th>';\n // var nameTableHeader = document.createElement('th');\n // var totalTableData = document.createElement('td');\n var hourlyTableHeader;\n\n tableRow.appendChild(blankTableHeader);\n\n for (var i = 0; i < hours.length; i++) {\n hourlyTableHeader = document.createElement('th');\n hourlyTableHeader.textContent = hours[i];\n tableRow.appendChild(hourlyTableHeader);\n }\n\n totalTableHeader.textContent = 'Total';\n tableRow.appendChild(totalTableHeader);\n storeTable.appendChild(tableRow);\n\n//end of renderHeaderRow\n}", "title": "" }, { "docid": "8f0349226b5aa97085839fdcf7a43cb3", "score": "0.63278913", "text": "function generateTableHeaders() {\n\n\n\n var headerRowTag = $(\"<tr>\");\n headerRowTag.addClass(\"schedule-headers\")\n var a = \"<th>N-Number</th>\";\n var b = \"<th>Craft Type</th>\";\n var c = \"<th>Cert Exp Date</th>\";\n var d = \"<th>Reg Type</th>\";\n \n headerRowTag.append(a);\n headerRowTag.append(b);\n headerRowTag.append(c);\n headerRowTag.append(d);\n \n $(\"table\").append(headerRowTag);\n }", "title": "" }, { "docid": "80e2efa2e1eaa0cdecebe8b0b7405882", "score": "0.63252753", "text": "function getHeaderRow(){\n let fistRow=document.createElement('tr')\n tableEl.appendChild(fistRow)\n \n let thEl=document.createElement('th')\n fistRow.appendChild(thEl)\n thEl.textContent='location'\n \n for(let i=0;i<hour.length;i++){\n let thEl=document.createElement('th')\n fistRow.appendChild(thEl)\n thEl.textContent=hour[i]\n }\n \n let thLast=document.createElement('th')\n fistRow.appendChild(thLast)\n thLast.textContent='Daily Location Total'\n}", "title": "" }, { "docid": "f285061152bccc63c90169e5091e3f36", "score": "0.6270926", "text": "function renderHeaders() {\r\n var trEl = document.createElement('tr');\r\n var thEl = document.createElement('th');\r\n thEl.textContent = 'Location';\r\n trEl.appendChild(thEl);\r\n for (var i = 0; i < hours.length; i++) {\r\n thEl = document.createElement('th');\r\n thEl.textContent = hours[i];\r\n trEl.appendChild(thEl);\r\n };\r\n thEl = document.createElement('th');\r\n thEl.textContent = 'Total';\r\n trEl.appendChild(thEl);\r\n locationTable.appendChild(trEl);\r\n}", "title": "" }, { "docid": "72502239fe233ac733aca393f787269b", "score": "0.6246034", "text": "function tableHeader(){\n //create FIRST table row\n var headTrEl = document.createElement('tr');\n //create Top Left Corner (empty cell)\n var emptyHeadCell = document.createElement('td');\n emptyHeadCell.textContent = '';\n headTrEl.appendChild(emptyHeadCell);\n\n emptyHeadCell.style.borderWidth = 0; //style the empty cell on table header\n\n //create Table Head\n for(var i = 0; i < hours.length; i ++){\n var thEl = document.createElement('th');\n thEl.textContent = hours[i];\n headTrEl.appendChild(thEl);\n thEl.style.color = '#D9BD7E'; //style head row\n }\n\n //create 'Total' in table head\n var totalThEl = document.createElement('th');\n totalThEl.textContent = 'Store Total';\n headTrEl.appendChild(totalThEl);\n salesTable.appendChild(headTrEl);\n totalThEl.style.backgroundColor = '#D9BD7E';\n totalThEl.style.color = '#353328'; //style the Total table head\n}", "title": "" }, { "docid": "4ab1c03483fa2381c3e5aa943b18c03f", "score": "0.6220737", "text": "function createHeader(doc, title, filteredData) {\n log += 'Creating header: ' + title + '\\n';\n var header = doc.addHeader().setAttributes(HEADER_STYLE);\n var headerTable = header.appendTable().setBorderWidth(0);\n var headerTableRow = headerTable.appendTableRow();\n //titleCell has the title of the notebook and the tick icon\n var titleCell = headerTableRow.appendTableCell(title);\n titleCell.setWidth(290).setVerticalAlignment(DocumentApp.VerticalAlignment.BOTTOM).setPaddingLeft(0).setPaddingBottom(0);\n var titleParagraph = titleCell.getChild(0).asParagraph().setAlignment(DocumentApp.HorizontalAlignment.LEFT);\n if (HEADER_ICON) titleParagraph.insertInlineImage(0, HEADER_ICON).setWidth(ICON_SIZE).setHeight(ICON_SIZE);\n const START_TIME = minTime(filteredData);\n const END_TIME = maxTime(filteredData);\n var dateCell = headerTableRow.appendTableCell(FORM_DATE + ' ' + START_TIME + ' - ' + END_TIME); //dateCell has the date of the meeting\n dateCell.setWidth(180).setVerticalAlignment(DocumentApp.VerticalAlignment.BOTTOM).setPaddingLeft(0).setPaddingBottom(0);\n dateCell.getChild(0).asParagraph().setAlignment(DocumentApp.HorizontalAlignment.RIGHT).setAttributes(REGULAR_STYLE);\n header.insertHorizontalRule(header.getNumChildren() - 1); //to separate the header from the body when it is printed\n header.getChild(header.getNumChildren() - 1).setAttributes(SMALLEST_SIZE); //minimize the size of extra paragraph element to shrink header\n }", "title": "" }, { "docid": "e9c791e8cc28b81b52c38191d5496ae1", "score": "0.62125653", "text": "function makeHeaderRow() {\n var tableHead = document.createElement('thead');\n var headerTrElement = document.createElement('tr');\n var thElement = document.createElement('th');\n\n thElement.textContent = 'Store Location'; \n headerTrElement.appendChild(thElement); \n\n for(var i = 0; i < storeHours.length; i++) {\n thElement = document.createElement('th');\n thElement.textContent = storeHours[i];\n headerTrElement.appendChild(thElement); \n tableHead.appendChild(headerTrElement);\n }\n\n cookieSalesTable.appendChild(headerTrElement); \n }", "title": "" }, { "docid": "e0c8c465bf57f7b7c9782c16c6b48417", "score": "0.6212199", "text": "function makeHeaderRow() {\n const tableRow = document.createElement('tr');\n let tableHeaderElement = document.createElement('th');\n tableHeaderElement.textContent = 'Location';\n tableRow.appendChild(tableHeaderElement);\n\n for(let i = 0; i < hours.length; i++){\n let tableHeaderElement = document.createElement('th');\n tableHeaderElement.textContent = hours[i];\n tableRow.appendChild(tableHeaderElement);\n }\n tableHeaderElement = document.createElement('th');\n tableHeaderElement.textContent = 'Location Totals';\n tableRow.appendChild(tableHeaderElement);\n tableElement.appendChild(tableRow);\n\n}", "title": "" }, { "docid": "08508a7c265cfb98ced29b3020f29906", "score": "0.62115103", "text": "function getWeekHeadTmp() {\n let weekHeadStr = '',\n weeks = [\n {name: '日', cls: 'weekDay sunday'},\n {name: '一', cls: 'weekDay'},\n {name: '二', cls: 'weekDay'},\n {name: '三', cls: 'weekDay'},\n {name: '四', cls: 'weekDay'},\n {name: '五', cls: 'weekDay'},\n {name: '六', cls: 'weekDay saturday'}\n ];\n\n for (let i = 0; i < 7; i++) {\n weekHeadStr += substitute(TMP.weekHeadTmp, {\n week_name: weeks[i].name,\n week_cls: weeks[i].cls\n })\n }\n return weekHeadStr;\n}", "title": "" }, { "docid": "f17bd8dadd5a8187dc5bfd4a9b5e1e58", "score": "0.6210838", "text": "function setUpCalTable() {\n let table = document.getElementById(\"calTable\");\n let headerRow = table.insertRow();\n let emptyHeaderCell = headerRow.insertCell();\n emptyHeaderCell.innerHTML = \"\";\n\n for (let i = 0; i < DAYS_OPEN; i++) {\n let dayHeaderCell = headerRow.insertCell();\n dayHeaderCell.innerHTML = \"<span class='cal-header'>\" + days_of_week[i] + \"</span>\";\n }\n for (let j = 0; j < hours_of_day.length; j++) {\n let row = table.insertRow();\n let timeHeaderCell = row.insertCell();\n timeHeaderCell.innerHTML = \"<span class='cal-header'>\" + hours_of_day[j] + \"</span>\";\n for (let k = 0; k < DAYS_OPEN; k++) {\n let timeCell = row.insertCell();\n timeCell.innerHTML = \"<span class='cal-avail'> &nbsp; </span>\";\n }\n }\n}", "title": "" }, { "docid": "3fd395e27834abd1b204ec53eb5509ef", "score": "0.6194773", "text": "function getHeaderData(textArray) {\n\n let weekObject = {};\n\n for(let i = 0;i<textArray.length;i++){\n if(textArray[i].colspan){\n weekObject = regexReplace(textArray[i].text);\n return weekObject;\n }\n }\n\n //private regex function\n function regexReplace(s){\n\n let dateRange = \"\";\n let weekNumber = \"\";\n\n //parse out 31.8.2015...4.9.2015\n s.replace(Pattern.dateRange, (subs)=>{\n dateRange = subs;\n return \"\";\n });\n //parse out 36:\n s.replace(Pattern.weekNumber, (subs)=>{\n weekNumber = subs;\n return \"\";\n });\n\n //Remove characters\n weekNumber = weekNumber.replace(/\\D/ig, \"\");\n\n return {\n \"dateRange\" :dateRange,\n \"weekNumber\" :weekNumber\n }\n }\n return weekObject;\n }", "title": "" }, { "docid": "d1cbccf6722073be8b098e2807e9969a", "score": "0.619296", "text": "function Row(props) {\n var weekNumber = props.weekNumber, dates = props.dates;\n var _a = useDayPicker(), styles = _a.styles, classNames = _a.classNames, showWeekNumber = _a.showWeekNumber, Day = _a.components.Day;\n var weekNumberCell;\n if (showWeekNumber) {\n weekNumberCell = (external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(\"th\", { className: classNames[UIElement.RowHead], style: styles === null || styles === void 0 ? void 0 : styles[UIElement.RowHead] },\n external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(WeekNumber, { number: weekNumber, dates: dates })));\n }\n return (external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(\"tr\", { className: classNames[UIElement.Row], style: styles === null || styles === void 0 ? void 0 : styles[UIElement.Row] },\n weekNumberCell,\n dates.map(function (date) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(\"td\", { className: classNames[UIElement.Cell], style: styles === null || styles === void 0 ? void 0 : styles[UIElement.Cell], key: (0,external_root_DateFns_commonjs2_date_fns_commonjs_date_fns_amd_date_fns_.getUnixTime)(date) },\n external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement(Day, { displayMonth: props.displayMonth, date: date }))); })));\n}", "title": "" }, { "docid": "46c42073e2088118295e3f7e6b957340", "score": "0.6184102", "text": "createHeader(rows) {\n let header = [];\n for (let j = 0; j < 9; j++) {\n header.push(<TableCell align=\"center\">{rows[j]}</TableCell>)\n }\n return header;\n }", "title": "" }, { "docid": "7330cf5b77e84f320406baf3b454d738", "score": "0.6147766", "text": "buildHeader() {\r\n if (this.chartType === \"hour\") {\r\n let headerDivs = `<div class=\"gonrin-gantt-header-spacer\"></div>`;\r\n if (this.divisionCount > 1) {\r\n for (let i = 0; i < this.divisionCount; i++) {\r\n let date = new Date(this.minTime.getTime() + ((60 * 60 * 1000) * i)),\r\n hour = date.getHours() > 12 ? date.getHours() - 12 : date.getHours(),\r\n amPm = date.getHours() > 12 ? 'PM' : 'AM',\r\n minutes = date.getMinutes().toString().length === 1 ? '0' + date.getMinutes() : date.getMinutes();\r\n headerDivs += `<div class=\"gonrin-gantt-header\">${hour}:${minutes} ${amPm}</div>`;\r\n }\r\n }\r\n return `<div class=\"gonrin-gantt-headers\" style=\"grid-template-columns: ${this.templateColumnWidth} \r\n repeat(${this.divisionCount}, 1fr)\">${headerDivs}</div>`;\r\n } else if (this.chartType === \"month\") {\r\n let headerDivs = `<div class=\"gonrin-gantt-header-spacer\"></div>`;\r\n if (this.divisionCount > 1) {\r\n // let the_max_time_month = this.maxTime.getMonth();\r\n let the_min_time_month = this.minTime.getMonth() + 1;\r\n let the_year = this.minTime.getFullYear();\r\n let change_year = false;\r\n for (let i = 0; i < this.divisionCount; i++) {\r\n let month_text = the_min_time_month + i;\r\n // let month_text = the_max_time_month - (this.divisionCount % 12) + 1 + i;\r\n month_text = (month_text + 12) % 12;\r\n if (change_year) {\r\n change_year = false;\r\n the_year = the_year + 1;\r\n }\r\n if (month_text === 0 || month_text === \"0\") {\r\n month_text = 12;\r\n change_year = true;\r\n }\r\n if (this.maxTime.getFullYear() !== this.minTime.getFullYear()) {\r\n let year = the_year % 100;\r\n month_text = month_text + \"/\" + year;\r\n }\r\n headerDivs += `<div class=\"gonrin-gantt-header\">${this.translateLang.month} ${month_text}</div>`;\r\n }\r\n } else {\r\n let month = this.minTime.getMonth();\r\n headerDivs += `<div class=\"gonrin-gantt-header\">${this.translateLang.month} ${month}</div>`;\r\n }\r\n return `<div class=\"gonrin-gantt-headers\" style=\"grid-template-columns: ${this.templateColumnWidth} \r\n repeat(${this.divisionCount}, 1fr); min-width: ${this.min_width_cont}px;\">${headerDivs}</div>`;\r\n } else if (this.chartType === \"quarter\") {\r\n let headerDivs = `<div class=\"gonrin-gantt-header-spacer\"></div>`;\r\n if (this.divisionCount > 1) {\r\n let the_min_time_month = this.minTime.getMonth() + 1;\r\n let the_min_time_quarter = Math.ceil(the_min_time_month / 3);\r\n let the_year = this.minTime.getFullYear();\r\n let change_year = false;\r\n for (let i = 0; i < this.divisionCount; i++) {\r\n let quarter_text = the_min_time_quarter + i;\r\n quarter_text = (quarter_text + 4) % 4;\r\n if (change_year) {\r\n change_year = false;\r\n the_year = the_year + 1;\r\n }\r\n if (quarter_text === 0 || quarter_text === \"0\") {\r\n quarter_text = 4;\r\n change_year = true;\r\n }\r\n if (this.maxTime.getFullYear() !== this.minTime.getFullYear()) {\r\n let year = the_year % 100;\r\n quarter_text = quarter_text + \"/\" + year;\r\n }\r\n headerDivs += `<div class=\"gonrin-gantt-header\">${this.translateLang.quarter} ${quarter_text}</div>`;\r\n }\r\n } else {\r\n let quarter_text = Math.ceil(this.minTime.getMonth() / 3);\r\n headerDivs += `<div class=\"gonrin-gantt-header\">${this.translateLang.quarter} ${quarter_text}</div>`;\r\n }\r\n return `<div class=\"gonrin-gantt-headers\" style=\"grid-template-columns: ${this.templateColumnWidth} \r\n repeat(${this.divisionCount}, 1fr); min-width: ${this.min_width_cont}px;\">${headerDivs}</div>`;\r\n } else if (this.chartType === \"year\") {\r\n let headerDivs = `<div class=\"gonrin-gantt-header-spacer\"></div>`;\r\n if (this.divisionCount > 1) {\r\n let the_year = this.minTime.getFullYear();\r\n for (let i = 0; i < this.divisionCount; i++) {\r\n let year_text = the_year + i;\r\n headerDivs += `<div class=\"gonrin-gantt-header\">${this.translateLang.year} ${year_text}</div>`;\r\n }\r\n } else {\r\n let year_text = this.maxTime.getFullYear() - this.divisionCount + 1;\r\n headerDivs += `<div class=\"gonrin-gantt-header\">${this.translateLang.year} ${year_text}</div>`;\r\n }\r\n return `<div class=\"gonrin-gantt-headers\" style=\"grid-template-columns: ${this.templateColumnWidth} \r\n repeat(${this.divisionCount}, 1fr); min-width: ${this.min_width_cont}px;\">${headerDivs}</div>`;\r\n }\r\n }", "title": "" }, { "docid": "d508cfe492d33fbfa0cf428f0c577fbf", "score": "0.6140849", "text": "function totalHeader() {\n thEl = document.createElement('th');\n trEl = document.createElement('tr');\n thEl.textContent = 'Daily Location Total';\n trEl.appendChild(thEl);\n table.appendChild(thEl);\n}", "title": "" }, { "docid": "9d20d1b4834b7fa253e601d20912f246", "score": "0.61390316", "text": "createHeaderColoumn() {\n let rounds = Math.log(this.props.players.length) / Math.log(2) + 1; // number of rounds required plus 1 for winner\n let headerRow = [];\n\n for (let i = 1; i < rounds; i++) {\n headerRow.push(<th key={i}>Round {i}</th>);\n }\n headerRow.push(<th key=\"700\">Winner</th>);\n return (\n <thead>\n <tr>{headerRow}</tr>\n </thead>\n );\n }", "title": "" }, { "docid": "3e8ab35b7a272182f22e34509b47bd3d", "score": "0.6135242", "text": "function generateMonth(){\r\n let monthsArr = ['January','Febuary','March','April','May','June','July','August','September','October','November','December'];\r\n var weeks = currentMonth.getWeeks();\r\n document.getElementById('monthAndYear').innerHTML = monthsArr[currentMonth.month]+' '+currentMonth.year;\r\n document.getElementById('calendarTable').innerHTML=\"<thead><tr><th>Sunday</th><th>Monday</th><th>Tuesday</th><th>Wednseday</th><th>Thursday</th><th>Friday</th><th>Saturday</th></tr></thead>\";\r\n let i = 1;\r\n for(var w in weeks){\r\n var days = weeks[w].getDates();\r\n let tableRow = document.createElement(\"tr\");\r\n tableRow.setAttribute('id','row'+i);\r\n i+=1;\r\n let week = document.getElementById('calendarTable').appendChild(tableRow);\r\n let nextMonthDays = document.createElement(\"th\");\r\n for(var d in days){\r\n if(currentMonth.month == days[d].getMonth()){\r\n dayId = days[d].getDate()+'';\r\n day = week.innerHTML+='<th class=\"day\" id=\"'+dayId+'\">'+ days[d].getDate()+'</th>';\r\n } \r\n else{\r\n day = week.innerHTML+='<th class=\"otherDay\">'+ monthsArr[days[d].getMonth()]+' '+days[d].getDate()+'</th>';\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "a0cd3682a158b7822656fa73b9816206", "score": "0.61336964", "text": "function makeHeader() {\n\n let thead = document.createElement(\"thead\");\n cookieTable.appendChild(thead);\n\n let tr = document.createElement(\"tr\");\n thead.appendChild(tr);\n\n let th = document.createElement(\"th\");\n th.textContent = \" \";\n tr.appendChild(th);\n\n for (let i = 0; i < hours.length; i++) {\n let th = document.createElement(\"th\");\n th.textContent = hours[i];\n tr.appendChild(th);\n }\n\n th = document.createElement(\"th\");\n th.textContent = \"Daily Location Total\";\n tr.appendChild(th);\n}", "title": "" }, { "docid": "acdc9647d7e8130bde4671b7c31a7ae9", "score": "0.61178905", "text": "function tableHeaderRender() {\n let rowHeader=document.createElement('tr');\n table.appendChild(rowHeader);\n for (let i=0;i<tableHeaderArray.length;i++){\n let thX=document.createElement('th');\n rowHeader.appendChild(thX);\n thX.textContent=tableHeaderArray[i];\n } \n}", "title": "" }, { "docid": "aa79181097d68ec848603659966ff4aa", "score": "0.6107642", "text": "function createHeader () {\n\n let headerStarter = ['Index','Year-month','Town','Flat Type','Block','Street Name','Storey','Floor area','Flat Model','Remaining Lease','Resale Price','Show on Map' ]\n \n for (i=0;i<12;i++) {\n\n if (i==11) {\n /******************************************PENDING TROUBLESHOOTING***************************************** */\n let headElement = document.createElement('th')\n headElement.innerHTML = ` <div> ${headerStarter[i]} </div>\n <div>&nbsp; (plot all) </div> `\n document.getElementById('tr-header').appendChild(headElement)\n \n let checkbox = document.createElement('input')\n checkbox.type='checkbox'\n checkbox.addEventListener('change' , plotAll) //eventlistener for selecting all 50 checkboxes\n document.getElementById('tr-header').lastElementChild.lastElementChild.appendChild(checkbox)\n /******************************************PENDING TROUBLESHOOTING***************************************** */\n } else {\n let headElement = document.createElement('th')\n headElement.innerHTML =`<p>${headerStarter[i]}</p>`\n document.getElementById('tr-header').appendChild(headElement)\n }\n\n \n\n }\n\n \n \n}", "title": "" }, { "docid": "d648ce0391a8a2fdd49bf3bd9c7116e1", "score": "0.6101388", "text": "function makingHeader(){\n for(let i = 0; i < header.length; i++){\n let tHead = document.createElement('th');\n tHeadRow.appendChild(tHead);\n tHead.textContent = `${header[i]}`\n }\n}", "title": "" }, { "docid": "cf9857c48b4c902349e80a1eb657f109", "score": "0.6086268", "text": "renderHeader() {\n let me = this,\n theadRender = $(\"<thead class='custom-header'></thead>\"),\n rowRender = $(\"<tr class='custom-color'></tr>\");\n // append column stt and checkbox\n let stt = `<th><input type=\"checkbox\" id=\"checkall\" class=\"custom-input\" name=\"checkall\" value=\"checkall\" onchange=\"setCheckedAll()\"></th><th>STT</th>`;\n rowRender.append(stt);\n // foreach row for build header\n me.grid.find(\".col\").each(function() {\n //get text header\n let textHeader = $(this).text(),\n dataType = $(this).attr(\"DataType\"),\n className = me.getClassFormat(dataType),\n th = $(\"<th></th>\");\n\n //set text header for tag th\n th.text(textHeader);\n th.addClass(className);\n rowRender.append(th);\n });\n\n //append for theader\n theadRender.append(rowRender);\n\n return theadRender;\n }", "title": "" }, { "docid": "e8c1c7be66d4bfb5523d86bfdb126137", "score": "0.604104", "text": "generateWeekRowDayCell(week){\n\n let dayList = []\n , dayCell = 0\n , day = 0\n\n for(day; day <= 6; day++){\n\n dayCell = day + ((week) * 7)\n\n dayList.push(\n <td key={`dayCell${dayCell}`} id={`dayCell${dayCell}`} className='dayCell'>{this.generateWeekRowDayCellText(dayCell)}</td>\n )\n }\n\n return dayList\n\n }", "title": "" }, { "docid": "d437e39f0afc46b3c224ed32a3d233a2", "score": "0.60400295", "text": "function createTableHeader() {\r\n // variables created in the function\r\n var tblEl = document.getElementById('sales-table');\r\n var theadEl = document.createElement('thead');\r\n var trEl = document.createElement('tr');\r\n var emptyTh = document.createElement('th');\r\n\r\n // Please explain\r\n trEl.appendChild(emptyTh);\r\n\r\n // for loop; we are starting at 0. We are going through the entire length while i is less than the length. We are adding one to it.\r\n for (var i = 0; i < hoursOfOps.length; i++) {\r\n var thEl = document.createElement('th');\r\n // We are calling the hours of operation from our constuctor object and passing the loop through it to use th content in it to text it to the thEl.\r\n thEl.textContent = hoursOfOps[i];\r\n // Please explain...\r\n trEl.appendChild(thEl);\r\n }\r\n\r\n var totalEl = document.createElement('th');\r\n totalEl.textContent = 'Total';\r\n\r\n trEl.appendChild(totalEl);\r\n theadEl.appendChild(trEl);\r\n tblEl.appendChild(theadEl);\r\n}", "title": "" }, { "docid": "6afb983c495c8e60f32b40076b1e9214", "score": "0.6039336", "text": "function create_other_rows(number_of_rows, starting_day, days_in_month) {\n starting_day = starting_day + 1;\n ending_day = starting_day + 7;\n row = '';\n for (i = 0; i < number_of_rows; i++) {\n // for each row do:\n row += '<div class=\"cal-week\">';\n // add days in each week\n for (j = starting_day; j < ending_day; j++) {\n if (j > days_in_month) {\n d = j;\n d = d - days_in_month;\n row += '<div class=\"day next-month\">' + d + '</div>';\n } else {\n if (j == current_day && global_calendar_counter === 0) {\n row += '<div class=\"day today\">' + j + '</div>';\n } else {\n row += '<div class=\"day\">' + j + '</div>';\n }\n\n }\n }\n row += '</div>';\n\n starting_day += 7;\n ending_day = starting_day + 7;\n }\n return row;\n}", "title": "" }, { "docid": "072215cb6447920c360809d381ad7733", "score": "0.6034218", "text": "function renderTableHeaderRow(allLocationsHoursOpen) {\n //create a pointer at sales-data element\n var salesDataEl = document.getElementById('sales-data');\n\n //create the table element and append it to sales-data element\n var tableEl = document.createElement('table');\n tableEl.setAttribute('id', 'sales-data-table');\n salesDataEl.appendChild(tableEl);\n\n //create the thead element and append it to the table\n var tableHeadEl = document.createElement('thead');\n tableEl.appendChild(tableHeadEl);\n\n //create the table row element and append it to the table element\n var tableRowEl = document.createElement('tr');\n tableRowEl.setAttribute('id', 'hours-open-tr');\n tableHeadEl.appendChild(tableRowEl);\n\n //create a blank table header element and append it to the table row\n var blankTableHeader = document.createElement('th');\n blankTableHeader.setAttribute('id', 'blank-table-header');\n tableRowEl.appendChild(blankTableHeader);\n\n //create the th elements for each element in allLocationsHoursOpen.hoursOpenArray and append it to the table row\n for (var i = 0; i < allLocationsHoursOpen.hoursOpenArray.length; i++)\n {\n var oneOpenHourEl = document.createElement('th');\n oneOpenHourEl.setAttribute('scope', 'col');\n oneOpenHourEl.innerText = convert24To12HrTime(allLocationsHoursOpen.hoursOpenArray[i]);\n tableRowEl.appendChild(oneOpenHourEl);\n }\n\n //create a final th element for the Daily Location Totals column and append it the table row\n var totalCookieSalesEl = document.createElement('th');\n totalCookieSalesEl.setAttribute('id', 'total-sales');\n totalCookieSalesEl.innerText = 'Daily Location Total';\n tableRowEl.appendChild(totalCookieSalesEl);\n}", "title": "" }, { "docid": "ef11fc4af4bd0bbbb3327e57f2335c5c", "score": "0.60271084", "text": "createCellHeader() {\n return new headerfooter_1.CellHeader();\n }", "title": "" }, { "docid": "f1a5e8f3543ac4951c253c232db03fba", "score": "0.60268784", "text": "function header() {\n var trElement = document.createElement('tr');\n cookieTable.appendChild(trElement);\n for (var i = 0; i < storeHours.length; i++) {\n var tdElement = document.createElement('td');\n tdElement.textContent = storeHours[i];\n trElement.appendChild(tdElement);\n }\n}", "title": "" }, { "docid": "77610e0aa2759c3f4ad08704d21801e8", "score": "0.60138893", "text": "function renderHeaderRow([colStart, colEnd]) {\n const headerRow = [];\n for (let i = colStart; i <= colEnd; i++) {\n headerRow.push(<HeaderTile key={`X${i}`} headerId={`X${i}`} headerName={i} />);\n }\n return headerRow;\n }", "title": "" }, { "docid": "f50f81f192a04c8bbd2ac0a1c1713d60", "score": "0.59862465", "text": "function createWeekStandingsHtml(playerWeekRecords){\n\n\t//Steps to do:\n\t//\t1. Make the header (add in the year and week if they aren't selected and\n\t//\t a header for ties if they are).\n\t//\t2. Go through and add a row for each record with a link to the picks\n\t//\t for the week.\n\t//\t3. That's pretty much it.\n\t\n\tvar standingsHtml = '';\n\t\n\tvar isYearSelected = isSpecificYearSelected();\n\tvar yearHeader = '';\n\tif (!isYearSelected){\n\t\tyearHeader = '<th class=\"standings-table-header\">Year</th>';\n\t}\n\t\n\tvar isWeekSelected = isASingleWeekSelected();\n\tvar weekHeader = '';\n\tif (!isWeekSelected){\n\t\tisWeekSelected = false;\n\t\tweekHeader = '<th class=\"standings-table-header\">Week</th>';\n\t}\n\t\n\tvar areThereAnyTies = false;\n\tfor (var index = 0; index < playerWeekRecords.length; index++){\n\t\tvar playerWeekRecord = playerWeekRecords[index];\n\t\t\n\t\tif (playerWeekRecord.record.ties > 0){\n\t\t\tareThereAnyTies = true;\n\t\t}\n\t}\n\t\n\tvar tiesHeader = '';\n\tif (areThereAnyTies){\n\t\ttiesHeader = '<th class=\"standings-table-header-small\">T</th>';\n\t}\n\t\n\tvar standingsHeaderHtml = '<thead class=\"standings-table-head\">' +\n\t\t\t\t\t\t \t'<th class=\"standings-table-player-header\"></th>' +\n\t\t\t\t\t\t \tyearHeader + \n\t\t\t\t\t\t \tweekHeader +\n\t\t\t\t\t\t \t'<th class=\"standings-table-header-small\">W</th>' + \n\t\t\t\t\t\t \t'<th class=\"standings-table-header-small\">L</th>' +\n\t\t\t\t\t\t \ttiesHeader + \n\t\t\t\t\t\t \t'<th class=\"standings-table-header-small\">%</th>';\n\t\n\t\n\tstandingsHeaderHtml = standingsHeaderHtml + '</thead>';\n\t\n\tvar rowsHtml = '';\n\t\n\tif (isEmpty(playerWeekRecords)){\n\t\trowsHtml = '<tr><td colspan=\"5\" style=\"text-align: center;\">No results</td></tr>';\n\t}\n\t\n\t//Going to keep this \"old school\" since doing it \"new school\" would mean O(n^2) for \n\t//getting a record's rank ... and we could have hundreds of records (since there might be a\n\t//lot of players, with 17 * number of years worth of weeks for each player.\n\n\t//The steps for calculating the rank:\n\t//\t1. Have three variables: rank, nextRank, and tieIndependentRank.\n\t//\t2. rank holds the rank of the current record we're on. \n\t//\t3. nextRank holds what the rank should be the next time we go through\n\t//\t the loop.\n\t//\t4. tieIndependentRank holds the rank independent of ties. Basically what it would be if\n\t//\t there were no ties (the position of the record in the array, starting at 1).\n\t//\t5. Start the nextRank at 1 because that's what the rank of the next record we see will be.\n\t//\t6. Start going through the records.\n\t//\t7. Assign the nextRank that we calculated to the rank so that we use it for this record.\n\t//\t8. Calculate the nextRank:\n\t//\t\t1. If there's a next record and it has the same number of wins and losses as this one, then\n\t//\t\t the nextRank will be same as the current rank because there's a tie.\n\t//\t\t2. Otherwise, it'll be whatever \"tieIndepdentedRank\" we have. That's because we'll\n\t//\t\t want to basically pick up where we left off before the ties started.\n\t\n\tvar rank = null;\n\tvar nextRank = 1;\n\tvar nextRecord = null;\n\tvar previousRank = null;\n\t\n\tfor (var index = 0; index < playerWeekRecords.length; index++){\n\t\tvar playerWeekRecord = playerWeekRecords[index];\n\t\t\n\t\t//This is the position of the record independent of whether there are ties. Just the \"raw\" position if we\n\t\t//started counting at 1. It will be the same as the rank if there aren't any ties.\n\t\tvar tieIndependentRank = index + 1;\n\t\t//Set the rank to what we calculated it should be the previous time through the loop.\n\t\trank = nextRank;\n\t\t\n\t\t//Now, need to calculate what it will be the next time.\n\t\t//If the next record has the same number of wins and losses, then it'll be the same as now because they're\n\t\t//tied.\n\t\t//Otherwise, if the next record doesn't, the next rank will be whatever this one's would have\n\t\t//been without ties + 1. If there weren't any ties, then this record's rank would be the \"tieIndependentRank\".\n\t\t//So, that means the next rank would be that + 1.\n\t\tnextRecord = null;\n\t\tif (index + 1 < playerWeekRecords.length){\n\t\t\tnextRecord = playerWeekRecords[index + 1];\n\t\t\t\n\t\t\tif (playerWeekRecord.record.wins == nextRecord.record.wins && playerWeekRecord.record.losses == nextRecord.record.losses){\n\t\t\t\t//rank stays the same.\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//current rank would be index + 1. We want to be one beyond that.\n\t\t\t\tnextRank = tieIndependentRank + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Now, we have the rank and next rank so we need to figure out if we need to put a little 't' to indicate\n\t\t//there was a tie.\n\t\t//There's a tie if:\n\t\t//\t1. It's the same as the next rank and we're not at the end.\n\t\t//\t2. The rank is the same as the previous rank.\n\t\t//\n\t\t//Number 1 should be pretty straight forward. If this rank is the same as the next one, it's in a tie.\n\t\t//Number 2 is there for the last tie in a series of ties. The last tie will have a \"nextRank\" that's different from\n\t\t//what it is, but we'll still want to show a tie for it. So, in that case, we can just look to see if it's the same\n\t\t//as the previous rank and, if it is, we know there's a tie.\n\t\tvar rankText = rank + '';\n\t\tif ((nextRank == rank && index + 1 < playerWeekRecords.length) || (rank == previousRank)){\n\t\t\trankText = rankText + 't';\n\t\t}\n\t\t\n\t\t//Add in the year and week if they weren't selected.\n\t\tvar yearCell = '';\n\t\tif (!isYearSelected){\n\t\t\tyearCell = '<td class=\"standings-table-cell\">' + playerWeekRecord.season.year + '</td>';\n\t\t}\n\t\t\n\t\tvar weekCell = '';\n\t\tif (!isWeekSelected){\n\t\t\tvar labelToUse = shortenWeekLabel(playerWeekRecord.week.label);\n\t\t\t//function createPicksLink(linkText, year, week, team, player){\n\t\t\tvar picksLink = createPicksLink(labelToUse, playerWeekRecord.season.year, playerWeekRecord.week.weekKey, null, playerWeekRecord.player.name);\n\t\t\tweekCell = '<td class=\"standings-table-cell\">' + picksLink + '</td>';\n\t\t}\n\t\t\n\t\tvar tiesCell = '';\n\t\tif (areThereAnyTies){\n\t\t\ttiesCell = '<td class=\"standings-table-cell-small\">' + playerWeekRecord.record.ties + '</td>';\n\t\t}\n\t\t\n\t\tvar percentageString = getWinningPercentage(playerWeekRecord.record.wins, playerWeekRecord.record.losses);\n\t\t\n\t\trowsHtml = rowsHtml + \n\t\t\t\t\t '<tr class=\"standings-table-row\">' +\n\t\t\t\t\t\t'<td class=\"standings-table-player-cell\">' + rankText + '. ' + playerWeekRecord.player.name + '</td>' +\n\t\t\t\t\t\tyearCell +\n\t\t\t\t\t\tweekCell +\n\t\t\t\t\t\t'<td class=\"standings-table-cell-small\">' + playerWeekRecord.record.wins + '</td>' +\n\t\t\t\t\t\t'<td class=\"standings-table-cell-small\">' + playerWeekRecord.record.losses + '</td>' +\n\t\t\t\t\t\ttiesCell + \n\t\t\t\t\t\t'<td class=\"standings-table-cell-small\">' + percentageString + '</td>';\n\t\t\n\t\trowsHtml = rowsHtml + '</tr>';\n\t\t\n\t\t//Keep the current rank as the previous for the next time through.\n\t\tpreviousRank = rank;\n\t\t\n\t}\n\t\n\tvar standingsBodyHtml = '<tbody class=\"standings-table-body\">' + rowsHtml + '</tbody>';\n\t\n\tstandingsHtml = '<table class=\"standings-table\">' + standingsHeaderHtml + standingsBodyHtml + '</table>';\n\t\n\treturn standingsHtml;\n}", "title": "" }, { "docid": "4ee59d70e2f27323d3335cc97477d4e6", "score": "0.5963803", "text": "function makeTableHeaderPP(){\n\t\n\tvar row=\"\";\n\t row =\n\t\t\t`<thead class=\"thead-light\" bgcolor=\"white\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Datum</th>\n\t\t\t\t\t\t<th>Vreme</th>\n\t\t\t\t\t\t<th>Trajanje</th>\n\t\t\t\t\t\t<th>Sala</th>\n\t\t\t\t\t\t<th>Tip</th>\n\t\t\t\t\t\t<th>Ocena klinike</th>\n\t\t\t\t\t\t<th>Ocena lekara</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>`;\n\t\t\n\t\treturn row;\n}", "title": "" }, { "docid": "4deeb251a7d82eec2be8a74dc0314462", "score": "0.5962036", "text": "function drawHeader(contents) {\n let level = parseLevel(contents['Level']);\n\n document.getElementById(\"filterResults\").innerHTML = '<table class=\"tg\" style=\"width:100%\">\\n' +\n ' <colgroup>\\n' +\n ' <col style=\"width:15%\">\\n' +\n ' <col style=\"width:15%\">\\n' +\n ' <col style=\"width:30%\">\\n' +\n ' <col style=\"width:10%\">\\n' +\n ' </colgroup>\\n' +\n ' <tr>\\n' +\n ' <th class=\"tg-h\">Level</th>\\n' +\n ' <th class=\"tg-h\">Date</th>\\n' +\n ' <th class=\"tg-h\">Source</th>\\n' +\n ' <th class=\"tg-h\">EventID</th>\\n' +\n ' </tr>\\n' +\n ' <tr>\\n' +\n ' <td class=\"tg-1\">' + level + '</td>\\n' +\n ' <td class=\"tg-1\">' + contents['TimeCreated'] + '</td>\\n' +\n ' <td class=\"tg-1\">' + contents['ProviderName'] + '</td>\\n' +\n ' <td class=\"tg-1\">' + contents['Id'] + '</td>\\n' +\n ' </tr>\\n' +\n ' <tr>\\n' +\n ' <td class=\"tg-2\" colspan=\"4\"><pre>' + contents['FormatDescription'] + '</pre></td>\\n' +\n ' </tr>\\n' +\n '</table>\\n' +\n '<br>\\n';\n}", "title": "" }, { "docid": "988bbb9172dad87ebeadea3f51b5699e", "score": "0.59319204", "text": "function generateWeekNode() {\n var week_node = document.createElement('div');\n week_node.className = WEEK_CLASS;\n return week_node;\n }", "title": "" }, { "docid": "310d8cb5fd790ffc8ff215599871f76b", "score": "0.5926082", "text": "generateHeaders (){\n var cols = this.state.cols; // [{key, label}]\n\n //Generate header cell components in state's 'cols', and replace all underscores with spaces\n var headersAndStyle = cols.map(function(colData) {\n return colData.label.replace(/_/g,\" \");\n });\n //Add the interactive header cell components not in state's 'cols'.\n headersAndStyle.push('New Update');\n headersAndStyle.push('');\n //alert(JSON.stringify(headersAndStyle)+\"//////\"+(typeof headersAndStyle));\n return headersAndStyle;\n }", "title": "" }, { "docid": "a0791bbe192a27459e1e064a19190b19", "score": "0.592142", "text": "function renderHeader() {\n var tr = '<tr>';\n for (var prop in scope.datasource[0]) {\n var val = getColumnName(prop);\n if (val) {\n // Track visible properties to make it fast to check them later\n visibleProps.push(prop);\n tr += '<th>' + val + '</th>';\n }\n }\n tr += '</tr>';\n return tr;\n }", "title": "" }, { "docid": "cca03325f4bb673dc5a74561425773c4", "score": "0.5920675", "text": "function addHeader(month, year) {\n var headerElement = document.createElement(\"div\");\n headerElement.className = \"header\";\n \n var backCellElement = document.createElement(\"div\");\n backCellElement.className = \"header-cell back-cell\";\n var backElement = document.createElement(\"div\");\n backElement.className = \"back\";\n backElement.addEventListener(\"click\",function() {\n _month--;\n if (_month<0) {\n _month = 11;\n _year--;\n }\n showMonth(_month,_year);\n });\n backCellElement.appendChild(backElement);\n headerElement.appendChild(backCellElement);\n \n var titleCellElement = document.createElement(\"div\");\n titleCellElement.className = \"header-cell title-cell\";\n \n var titleElement = document.createElement(\"div\");\n titleElement.className = \"title\";\n titleElement.appendChild(document.createTextNode(_months[month]+', '+year)); \n titleCellElement.appendChild(titleElement);\n headerElement.appendChild(titleCellElement);\n \n var nextCellElement = document.createElement(\"div\");\n nextCellElement.className = \"header-cell next-cell\";\n \n var nextElement = document.createElement(\"div\");\n nextElement.className = \"next\";\n nextElement.addEventListener(\"click\",function() {\n _month++;\n if (_month>11) {\n _month = 0;\n _year++;\n }\n showMonth(_month,_year);\n });\n \n nextCellElement.appendChild(nextElement);\n headerElement.appendChild(nextCellElement);\n \n _calendar.appendChild(headerElement);\n }", "title": "" }, { "docid": "de1d3dfec148d794cfdad6a58f8e6dbb", "score": "0.59149224", "text": "function headercalendario(monthname) {\n\n for ( let i = 1; i<3; i++ ){\n let trheader = document.createElement('tr');\n trheader.id = `tr`+ i\n\n tabelaheadnobody[0].appendChild(trheader)\n }\n \n const trheader1 = document.getElementById('tr1')\n const trheader2 = document.getElementById('tr2')\n console.log(trheader1)\n\n var thnameheader = document.createElement('th')\n var anameheader = document.createElement('a')\n var textothnameheader = document.createTextNode(monthname)\n\n thnameheader.setAttribute(\"colspan\",\"7\")\n anameheader.colspan = '7'\n\n anameheader.appendChild(textothnameheader)\n thnameheader.appendChild(anameheader)\n trheader1.appendChild(thnameheader)\n trheader1.className = 'bg-primary text-white'\n\n for ( var i = 0; i<weekdays.length; i++){\n\n var thdiassemana = document.createElement('th')\n var textothdiassemana = document.createTextNode(weekdays[i])\n\n thdiassemana.appendChild(textothdiassemana)\n\n trheader2.appendChild(thdiassemana)\n trheader2.className = 'table-bordered text-primary'\n }\n\n}", "title": "" }, { "docid": "087beeefbd2d4338306a29d0d9430a78", "score": "0.59125847", "text": "next() {\n\n if(this.displayingMonthCalendar == true){\n this.currentYear = (this.currentMonth === 11) ? this.currentYear + 1 : this.currentYear;\n this.currentMonth = (this.currentMonth + 1) % 12;\n this.removeTable(\"calendar\");\n this.createMonthCalendar(this.currentMonth, this.currentYear);\n }\n if(this.displayingWeekCalendar == true){\n var tempcounter = 0;\n let newWeek = [];\n \n\n let tempDay = this.theCurrentWeek[6].split(\"/\");\n let nextMonth = tempDay[0];\n let nextDay = tempDay[1];\n let nextYear = tempDay[2];\n\n let tempMonthFixed = 0;\n\n let tempYear = this.currentYear;\n let tempMonth = this.currentMonth;\n\n if(tempMonth == 11){\n tempMonthFixed = 1;\n }else{\n tempMonthFixed = tempMonth;\n tempMonthFixed++;\n }\n\n for(let i = 0; i < this.theCurrentWeek.length; i++){\n nextDay++;\n if(nextDay > new Date(nextYear, nextMonth, 0).getDate()){\n if(nextMonth == 12){\n nextYear++;\n nextDay = 1;\n nextMonth = 1;\n }else{ \n nextMonth++;\n nextDay = 1;\n } \n }\n\n newWeek[tempcounter] = nextMonth + \"/\" + nextDay + \"/\" + nextYear;\n\n tempcounter = tempcounter + 1;\n }\n\n for(var j = 0; j < newWeek.length; j++){\n this.theCurrentWeek[j] = newWeek[j];\n }\n\n \n\n while(this.weeklyTable.firstChild){\n this.weeklyTable.removeChild(this.weeklyTable.firstChild);\n }\n\n\n //creates the thead and tr elements as well as the empty header box for the header\n var thead = document.createElement(\"thead\");\n var theadRow = document.createElement(\"tr\");\n var emptyCornerBox = document.createElement(\"th\");\n\n //Here I add some stle and inner html to help make the empty header box the way it is, then I append it\n emptyCornerBox.style.width = \"10%\";\n emptyCornerBox.innerHTML = \"&nbsp;\";\n theadRow.appendChild(emptyCornerBox);\n\n //This loop runs through the week display the day of the week and the date\n for(var i = 0; i < this.theWeek.length; i++){\n //creates the th element and gives it its style. It fills the innertext with the day of the week\n var th = document.createElement(\"th\");\n th.style.width = \"10%\";\n th.innerText = this.theWeek[i];\n\n //Creates a break element and appends it to the th tag\n var tempBreak = document.createElement(\"br\");\n th.appendChild(tempBreak);\n\n //Creates the span element and puts the date in the innerText of the HTML tag\n var tempSpan = document.createElement(\"span\");\n tempSpan.innerText = this.theCurrentWeek[i];\n\n //This checks if any of the days are the current day, if so it adds a red color style to the tag\n var checkForDay = this.theCurrentWeek[i].split(\"/\");\n\n if(checkForDay[1] == this.currentDay && checkForDay[0] == tempMonthFixed && checkForDay[2] == this.currentYear){\n th.style.color = \"red\";\n }\n\n th.appendChild(tempSpan);\n\n theadRow.appendChild(th);\n }\n\n thead.appendChild(theadRow);\n\n this.weeklyTable.appendChild(thead);\n\n\n //========================End of Header creation=========================\n\n this.createWeeklyTableBody();\n\t\t\t\n\t\t\n }\n if(this.displayingDayCalendar == true){\n\t\t\tif(this.daysInMonth(this.currentMonth,this.currentYear) == this.currentDay){\n\t\t\t\tif(this.currentMonth === 11){\n\t\t\t\t\tthis.currentYear = this.currentYear + 1;\n\t\t\t\t\tthis.currentMonth = 0;\n\t\t\t\t\tthis.currentDay = 1;\n\t\t\t\t\tthis.removeTable(\"dayCalendar\");\n\t\t\t\t\tthis.createDayCalendar(this.currentDay);\n\t\t\t\t}else{\n\t\t\t\t\tthis.currentMonth = this.currentMonth + 1;\n\t\t\t\t\tthis.currentDay = 1;\n\t\t\t\t\tthis.removeTable(\"dayCalendar\");\n\t\t\t\t\tthis.createDayCalendar(this.currentDay);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.currentDay = this.currentDay + 1;\n\t\t\t\tthis.removeTable(\"dayCalendar\");\n\t\t\t\tthis.createDayCalendar(this.currentDay);\n\t\t\t}\n }\n\n\n \n \n }", "title": "" }, { "docid": "30dcabba941f926794858e4c99f00e6d", "score": "0.5903796", "text": "function makeWeekStart(){\n\tvar d = new Date();\n\td.setDate(d.getDate() - (d.getDay()));\n\treturn bpDateOutput(d);\n}", "title": "" }, { "docid": "cc275fceef55358a8164687c0da3d7e9", "score": "0.5895891", "text": "function addHeader(month, year) {\n var headerElement = document.createElement(\"div\");\n headerElement.className = \"header\";\n \n var backCellElement = document.createElement(\"div\");\n backCellElement.className = \"headerCell backCell\";\n var backElement = document.createElement(\"div\");\n backElement.className = \"back\";\n backElement.addEventListener(\"click\",function() {\n _month--;\n if (_month<0) {\n _month = 11;\n _year--;\n }\n showMonth(_month,_year);\n });\n backCellElement.appendChild(backElement);\n headerElement.appendChild(backCellElement);\n \n var titleCellElement = document.createElement(\"div\");\n titleCellElement.className = \"headerCell titleCell\";\n \n var titleElement = document.createElement(\"div\");\n titleElement.className = \"title\";\n titleElement.appendChild(document.createTextNode(_months[month]+', '+year)); \n titleCellElement.appendChild(titleElement);\n headerElement.appendChild(titleCellElement);\n \n var nextCellElement = document.createElement(\"div\");\n nextCellElement.className = \"headerCell nextCell\";\n \n var nextElement = document.createElement(\"div\");\n nextElement.className = \"next\";\n nextElement.addEventListener(\"click\",function() {\n _month++;\n if (_month>11) {\n _month = 0;\n _year++;\n }\n showMonth(_month,_year);\n });\n \n nextCellElement.appendChild(nextElement);\n headerElement.appendChild(nextCellElement);\n \n _calendar.appendChild(headerElement);\n }", "title": "" }, { "docid": "f855e71682c756b665eac5310d4c2352", "score": "0.58827114", "text": "previous() {\n\n if(this.displayingMonthCalendar == true){\n this.currentYear = (this.currentMonth === 0) ? this.currentYear - 1 : this.currentYear;\n this.currentMonth = (this.currentMonth === 0) ? 11 : this.currentMonth - 1;\n\n this.removeTable(\"calendar\");\n this.createMonthCalendar(this.currentMonth, this.currentYear);\n }\n if(this.displayingWeekCalendar == true){\n let tempYear = this.currentYear;\n let tempMonth = this.currentMonth;\n\n var tempcounter = 6;\n let newWeek = [];\n\n let tempMonthFixed = 0;\n if(tempMonth == 11){\n tempMonthFixed = 1;\n }else{\n tempMonthFixed = tempMonth;\n tempMonthFixed++;\n }\n\n let tempDay = this.theCurrentWeek[0].split(\"/\");\n let previousMonth = tempDay[0];\n let previousDay = tempDay[1];\n let previousYear = tempDay[2];\n\n for(let i = 0; i < this.theCurrentWeek.length; i++){\n \n previousDay = previousDay - 1;\n if(previousDay == 0){\n if(previousMonth == 1){\n previousYear = previousYear - 1\n previousDay = new Date(previousYear, 12, 0).getDate();\n previousMonth = 12;\n }else{\n \n previousMonth = previousMonth - 1;\n previousDay = new Date(previousYear, previousMonth, 0).getDate();\n\n } \n }\n\n newWeek[tempcounter] = previousMonth + \"/\" + previousDay + \"/\" + previousYear;\n\n tempcounter = tempcounter - 1;\n }\n \n \n\n for(var j = 0; j < newWeek.length; j++){\n this.theCurrentWeek[j] = newWeek[j];\n }\n\n \n\n\n while(this.weeklyTable.firstChild){\n this.weeklyTable.removeChild(this.weeklyTable.firstChild);\n }\n\n\n //creates the thead and tr elements as well as the empty header box for the header\n var thead = document.createElement(\"thead\");\n var theadRow = document.createElement(\"tr\");\n var emptyCornerBox = document.createElement(\"th\");\n\n //Here I add some stle and inner html to help make the empty header box the way it is, then I append it\n emptyCornerBox.style.width = \"10%\";\n emptyCornerBox.innerHTML = \"&nbsp;\";\n theadRow.appendChild(emptyCornerBox);\n\n //This loop runs through the week display the day of the week and the date\n for(var i = 0; i < this.theWeek.length; i++){\n //creates the th element and gives it its style. It fills the innertext with the day of the week\n var th = document.createElement(\"th\");\n th.style.width = \"10%\";\n th.innerText = this.theWeek[i];\n\n //Creates a break element and appends it to the th tag\n var tempBreak = document.createElement(\"br\");\n th.appendChild(tempBreak);\n\n //Creates the span element and puts the date in the innerText of the HTML tag\n var tempSpan = document.createElement(\"span\");\n tempSpan.innerText = this.theCurrentWeek[i];\n\n //This checks if any of the days are the current day, if so it adds a red color style to the tag\n var checkForDay = this.theCurrentWeek[i].split(\"/\");\n\n //increase current day by 1 to get accurate month\n if(checkForDay[1] == this.currentDay && checkForDay[0] == tempMonthFixed && checkForDay[2] == this.currentYear){\n th.style.color = \"red\";\n }\n\n th.appendChild(tempSpan);\n\n theadRow.appendChild(th);\n }\n\n thead.appendChild(theadRow);\n\n this.weeklyTable.appendChild(thead);\n\n this.createWeeklyTableBody()\n\n\n\n\n }\n if(this.displayingDayCalendar == true){\n\t\t\tif(this.currentDay === 1){\n\t\t\t\tif(this.currentMonth === 0){\n\t\t\t\t\tthis.currentYear = this.currentYear - 1;\n\t\t\t\t\tthis.currentMonth = 11;\n\t\t\t\t\tthis.currentDay = this.daysInMonth(this.currentMonth, this.currentYear);\n\t\t\t\t\tthis.removeTable(\"dayCalendar\");\n\t\t\t\t\tthis.createDayCalendar(this.currentDay);\n\t\t\t\t}else{\n\t\t\t\t\tthis.currentMonth = this.currentMonth - 1;\n\t\t\t\t\tthis.currentDay = this.daysInMonth(this.currentMonth, this.currentYear);\n\t\t\t\t\tthis.removeTable(\"dayCalendar\");\n\t\t\t\t\tthis.createDayCalendar(this.currentDay);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthis.currentDay = this.currentDay - 1;\n\t\t\t\tthis.removeTable(\"dayCalendar\");\n\t\t\t\tthis.createDayCalendar(this.currentDay);\n\t\t\t}\n } \n }", "title": "" }, { "docid": "675b1a61468d087a97e4ef3d221695c5", "score": "0.5874349", "text": "function createMatrixHeader() {\n // createTHead() returns the existing <thead> element\n var header = matrixTable.createTHead();\n var headerRow = header.insertRow();\n headerRow.id = \"matrixHeader\";\n headerRow.insertCell(0); // the first cell is empty\n\n for (var i = 0; i < numbOfVariables; i++) {\n var cell = headerRow.insertCell();\n cell.innerHTML = \"Maschine \" + (i + 1);\n }\n }", "title": "" }, { "docid": "7e628ca69ada728d44b75ae8a5b2c536", "score": "0.5869725", "text": "function createWeeklyTotalDisplayColumnNumber(timeInMilliseconds) {\n var col = document.createElement(\"div\");\n col.className = \"w3-col s1 w3-left\";\n\n if (typeof timeInMilliseconds != \"number\" || timeInMilliseconds == null) {\n timeInMilliseconds = 356400000; // 99 hours should be noticeable as being incorrect\n }\n var node = document.createTextNode(epochToHours(timeInMilliseconds).toFixed(2));\n col.appendChild(node);\n\n return col;\n}", "title": "" }, { "docid": "81d53313849508e60ffe98074e648aae", "score": "0.586959", "text": "function makeHead(){\n for (var gg = 0; gg < 1; gg++){\n var hRow = document.createElement(\"tr\");\n\n\n for (var hh = 0; hh < time.length; hh++){\n var head = document.createElement(\"th\");\n head.innerHTML += time[hh];\n hRow.appendChild(head);\n\n }\n tableHead.appendChild(hRow);\n }\ntbl.setAttribute(\"border\", \"4\");\n}", "title": "" }, { "docid": "f63164de6dc3a37b1c0ae5bd8c42e917", "score": "0.5866886", "text": "function makeTableHeaderPO(){\n\t\n\tvar row=\"\";\n\t row =\n\t\t\t`<thead class=\"thead-light\" bgcolor=\"white\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Datum</th>\n\t\t\t\t\t\t<th>Vreme</th>\n\t\t\t\t\t\t<th>Trajanje</th>\n\t\t\t\t\t\t<th>Dodatne info</th>\n\t\t\t\t\t\t<th>Sala</th>\n\t\t\t\t\t\t<th>Ocena klinike</th>\n\t\t\t\t\t\t<th>Ocena lekara</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>`;\n\t\t\n\t\treturn row;\n}", "title": "" }, { "docid": "ccef31277c4a1f566820b757ee1d292c", "score": "0.585329", "text": "static getThisWeek() { \r\n const todayString = this.getToday()\r\n\r\n // converting today to an object with date data\r\n const today = { \r\n weekday: todayString.split(', ')[0],\r\n year: parseInt(todayString.split(', ')[1].split('-')[0]), \r\n month: parseInt((todayString.split(', ')[1].split('-')[1] - 1) < 0 ? 11 : todayString.split(', ')[1].split('-')[1] - 1), \r\n date: parseInt(todayString.split(', ')[1].split('-')[2]) \r\n }\r\n\r\n const week = []\r\n\r\n const weekPartOne = toSunday(today, []).reverse()\r\n const weekPartTwo = toSaturday(today, [])\r\n\r\n // adding first part of the week to the week array\r\n weekPartOne.forEach(day => { \r\n week.push(day)\r\n })\r\n\r\n // adding second part of the week to the week array \r\n weekPartTwo.forEach(day => { \r\n if (day !== week[week.length - 1]) { \r\n week.push(day)\r\n }\r\n })\r\n\r\n const weekHTML = getWeekHTML(week)\r\n\r\n return weekHTML\r\n\r\n function getWeekHTML(week) { \r\n const weekHTML = [] \r\n\r\n week.forEach(day => { \r\n weekHTML.push(weekToHTML(day))\r\n })\r\n\r\n return weekHTML\r\n\r\n function weekToHTML(day) { \r\n const dateString = new Date(day.year.toString(), day.month.toString(), day.date.toString()).toLocaleDateString('en-CA', { year: 'numeric', month: 'long', day: 'numeric' })\r\n const dateKey = new Date(day.year.toString(), day.month.toString(), day.date.toString()).toLocaleDateString('en-CA', { year: 'numeric', month: 'numeric', day: 'numeric' })\r\n\r\n return (\r\n <div key={ dateKey } className='thisweek-day-base'>\r\n <div className='thisweek-day-base__thisweek-day-header-container'>\r\n <div className='thisweek-day-header-container__weekday-container'> \r\n <div className='weekday-container__weekday'>\r\n { day.weekday }\r\n </div>\r\n </div>\r\n <div className='thisweek-day-header-container__date-container'> \r\n <div className='date-container__date'>\r\n { dateString }\r\n </div>\r\n </div>\r\n <div className='thisweek-day-header-container__add-event-button'>\r\n <i data-full-date={ dateKey } class=\"fas fa-plus-circle add-event-button__svg\"></i>\r\n </div>\r\n </div>\r\n <div className='thisweek-day-base__thisweek-day-events-container'>\r\n <div className='thisweek-day-events-container__events-root'>\r\n {\r\n // EVENTS HERE USING ANOTHER FUNCTION TO RETRIEVE THEM FROM LOCAL STORAGE\r\n }\r\n </div>\r\n </div>\r\n <div className='thisweek-day-base__pseudo-element'></div>\r\n </div>\r\n )\r\n }\r\n }\r\n\r\n function toSunday(today, weekPartOne) { \r\n if (today.weekday !== 'Sunday') { \r\n weekPartOne.push(today)\r\n\r\n /*\r\n // get first day of the month\r\n const firstDayString = new Date(today.year.toString(), today.month.toString(), (-1).toString()).toLocaleDateString('en-CA', { weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric' })\r\n const firstDay = { \r\n weekday: firstDayString.split(', ')[0], \r\n year: parseInt(firstDayString.split(', ')[1].split('-')[0]),\r\n month: parseInt((firstDayString.split(', ')[1].split('-')[1] - 1) < 0 ? 11 : firstDayString.split(', ')[1].split('-')[1] - 1),\r\n day: parseInt(firstDayString.split(', ')[1].split('-')[2])\r\n }\r\n\r\n console.log(firstDayString)\r\n console.log(firstDay)\r\n */\r\n\r\n const nextDayString = new Date(today.year.toString(), today.month.toString(), (today.date - 1).toString()).toLocaleDateString('en-CA', { weekday: 'long', day: 'numeric', month: 'numeric', year: 'numeric'})\r\n\r\n // if statements to control when the next days are on a different month\r\n\r\n const nextDay = { \r\n weekday: nextDayString.split(', ')[0], \r\n year: parseInt(nextDayString.split(', ')[1].split('-')[0]), \r\n month: parseInt((nextDayString.split(', ')[1].split('-')[1] - 1) < 0 ? 11 : nextDayString.split(', ')[1].split('-')[1] - 1), \r\n date: parseInt(nextDayString.split(', ')[1].split('-')[2]) \r\n }\r\n \r\n return toSunday(nextDay, weekPartOne) \r\n }\r\n else { \r\n weekPartOne.push(today)\r\n \r\n return weekPartOne\r\n }\r\n }\r\n\r\n function toSaturday(today, weekPartTwo) { \r\n if (today.weekday !== 'Saturday') { \r\n weekPartTwo.push(today)\r\n\r\n const nextDayString = new Date(today.year.toString(), today.month.toString(), (today.date + 1).toString()).toLocaleDateString('en-CA', { weekday: 'long', day: 'numeric', month: 'numeric', year: 'numeric'})\r\n \r\n const nextDay = { \r\n weekday: nextDayString.split(', ')[0], \r\n year: parseInt(nextDayString.split(', ')[1].split('-')[0]), \r\n month: parseInt((nextDayString.split(', ')[1].split('-')[1] - 1) < 0 ? 11 : nextDayString.split(', ')[1].split('-')[1] - 1), \r\n date: parseInt(nextDayString.split(', ')[1].split('-')[2])\r\n }\r\n\r\n return toSaturday(nextDay, weekPartTwo)\r\n }\r\n else { \r\n weekPartTwo.push(today)\r\n\r\n return weekPartTwo\r\n }\r\n }\r\n }", "title": "" }, { "docid": "86dc4b2189a2826be0ec3e4908ae5664", "score": "0.5850045", "text": "function myFunction() {\n setTableHeading();\n var firstWeekStartDay = new Date(2020, 1, 13); // 1962-07-07 (7th of July 1962)\n var secondWeekStartDay = new Date(2020, 1, 20); // 1962-07-07 (7th of July 1962)\n setDays(new Date('01/13/2020'),new Date('01/26/2020')); // season interval\n insertWeekResultsRow(9,new Date('01/13/2020'),new Date('01/19/2020')); //week 1\n insertWeekResultsRow(17,new Date('01/20/2020'),new Date('01/26/2020')); //week 2\n setTotalWorkHoursColumn(2,new Date('01/13/2020'),new Date('01/19/2020')); //week 1\n setTotalWorkHoursColumn(10,new Date('01/20/2020'),new Date('01/26/2020')); //week 2\n}", "title": "" }, { "docid": "a2c8520bb479b958f657513cfc421e11", "score": "0.5849258", "text": "function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return { weekday: 'short' }; // \"Sat\"\n }\n else if (dayCnt > 1) {\n return { weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }; // \"Sat 11/12\"\n }\n else {\n return { weekday: 'long' }; // \"Saturday\"\n }\n}", "title": "" }, { "docid": "a2c8520bb479b958f657513cfc421e11", "score": "0.5849258", "text": "function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return { weekday: 'short' }; // \"Sat\"\n }\n else if (dayCnt > 1) {\n return { weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }; // \"Sat 11/12\"\n }\n else {\n return { weekday: 'long' }; // \"Saturday\"\n }\n}", "title": "" }, { "docid": "948790800f199be0bc47bfa1c8538c92", "score": "0.58457583", "text": "function appendDayTitleRow(table) {\n\tvar row = table.insertRow();\n\tvar days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];\n\tvar daysLen = days.length;\n\tvar tmp;\n\n\tfor (var i=0; i<daysLen; i++) {\n\t\ttmp = row.insertCell(i);\n\t\ttmp.innerHTML = days[i];\n\t}\n\n\trow = addDOMClassName(row, 'dp__row--border-bottom');\n}", "title": "" }, { "docid": "22e47d57f7b9437fbaa389baa749400a", "score": "0.5842323", "text": "createHeaderRow() {\n let headerRow = document.createElement(\"tr\");\n let nameHeader = document.createElement(\"th\");\n nameHeader.innerHTML = \"Product\";\n headerRow.appendChild(nameHeader);\n let quantityHeader = document.createElement(\"th\");\n quantityHeader.innerHTML = \"Quantity\";\n headerRow.appendChild(quantityHeader);\n let subTotalHeader = document.createElement(\"th\");\n subTotalHeader.innerHTML = \"Sub-Total\";\n headerRow.appendChild(subTotalHeader);\n return headerRow;\n }", "title": "" }, { "docid": "3dc94ae4e35c99e4fff701c8298413db", "score": "0.5838017", "text": "function createSeasonProgressionHtml(weekRecords){\n\t\n\t//Steps to do:\n\t//\t1. Make the header (add in one for ties and a year if they haven't picked one).\n\t//\t2. Go through the records and, when we've hit a \"batch\" for a week...\n\t//\t3. Add those weeks to the \"accumulated records\" we've processed so far.\n\t//\t4. Output the accumulated records up to that point.\n\t//\t5. Keep going through the records, stopping to add them to the accumulated records\n\t//\t when we hit the end of a week.\n\n\t//Only show the years and weeks if a specific one isn't selected.\n\tvar yearHeader = '';\n\tvar aYearIsSelected = isSpecificYearSelected();\n\tif (!aYearIsSelected){\n\t\tyearHeader = '<th class=\"common-table-header\">Year</th>';\n\t}\n\t\n\tvar weekHeader = '';\n\tvar aWeekIsSelected = isASingleWeekSelected();\n\tif (!aWeekIsSelected){\n\t\tweekHeader = '<th class=\"common-table-header\">Week</th>';\n\t}\n\t\n\tvar tableHead = '<thead class=\"standings-table-head\">' + \n\t\t\t\t\t\t'<tr class=\"standings-table-row\">' + \n\t\t\t\t\t\t\tyearHeader +\n\t\t\t\t\t\t\tweekHeader +\n\t\t\t\t\t\t\t'<th class=\"common-table-header\">Player</th>' +\n\t\t\t\t\t\t\t'<th class=\"common-table-header\">Winner</th>' + \n\t\t\t\t\t\t'</tr>' +\n\t\t\t\t\t'</thead>';\n\t\n\tvar tableBody = '<tbody class=\"standings-table-body\">';\n\t\n\tif (isEmpty(weekRecords)){\n\t\ttableBody = tableBody + '<tr><td colspan=\"7\" style=\"text-align: center;\">No results</td></tr>';\n\t}\n\n\t//All the records should be sorted by year, week, and record. They're all in one giant list\n\t//so we'll have to kind of \"detect\" the change from one year and week to the next.\n\t//These variables will let us do that.\n\t//Whenever the record we just got has a different year or week from what we just processed,\n\t//that means the year or week changed, so we should output a row using the records we've been\n\t//\"collecting\" for the (now previous) week.\n\tvar previousWeekRecord = null;\n\t//These are the records for the current week. We're \"collecting\" from the big list into this one\n\t//and, once we hit a new week, we'll use this array to output the row for the records we collected.\n\tvar currentRecords = [];\n\t\n\t//These are the records for all the weeks so far. When we hit the \"end\" of the records for a week,\n\t//we'll take the records for that week and add them to the records here (so that this has the total\n\t//for a player's record up to that point).\n\tvar accumulatedRecords = [];\n\t\n\tfor (var index = 0; index < weekRecords.length; index++){\n\t\tvar weekRecord = weekRecords[index];\n\n\t\t//The first time through, we don't have a previous record yet so we should just set it now.\n\t\tif (previousWeekRecord == null){\n\t\t\tpreviousWeekRecord = weekRecord;\n\t\t}\n\t\t\n\t\t//We should output a row if:\n\t\t//\t1. The year changed between the previous record and this one.\n\t\t//\t2. The week changed between the previous record and this one.\n\t\t//\t3. We're at the end of the list.\n\t\tif (previousWeekRecord.season.year != weekRecord.season.year || \n\t\t\t\tpreviousWeekRecord.week.label != weekRecord.week.label ||\n\t\t\t\tindex + 1 == weekRecords.length){\n\t\t\t\n\t\t\t//If this is the last record in the list, add it to the current records.\n\t\t\tif (index + 1 == weekRecords.length){\n\t\t\t\tcurrentRecords.push(weekRecord);\n\t\t\t}\n\t\t\t\n\t\t\t//Add the year if we have it.\n\t\t\tvar yearCell = '';\n\t\t\tif (!aYearIsSelected){\n\t\t\t\tyearCell = '<td class=\"common-table-cell\">' + previousWeekRecord.season.year + '</td>';\n\t\t\t}\n\t\t\t\n\t\t\tvar weekCell = '';\n\t\t\tif (!aWeekIsSelected){\n\t\t\t\t//We'll want a link to the picks grid for the week.\n\t\t\t\tvar weekLabelToUse = shortenWeekLabel(previousWeekRecord.week.label);\n\t\t\t\tvar picksLink = createPicksLink(weekLabelToUse, previousWeekRecord.season.year, previousWeekRecord.week.weekKey, null, null);\n\t\t\t\tweekCell = '<td class=\"common-table-cell\">' + picksLink + '</td>'; \n\t\t\t}\n\n\t\t\t//And we have the first part of the row.\n\t\t\tvar row = '<tr class=\"standings-table-row\">' +\n\t\t\t\t\t\tyearCell +\n\t\t\t\t\t\tweekCell;\n\t\t\t\n\t\t\t//Now we just have to add a column for the records for the players for the week.\n\t\t\t//And then another that shows the result (who won and by how much).\n\t\t\tvar playersCell = '<td class=\"common-table-cell\"><ul style=\"list-style: none; padding: 0px;\">';\n\t\t\t\n\t\t\t//The record with the largest number of wins for the week. Keeping this so we can calculate the difference\n\t\t\t//between it and the one that was second.\n\t\t\tvar topWins = 0;\n\t\t\tvar previousWins = 0;\n\t\t\tvar winDifference = 0;\n\n\t\t\t//The names of the players who won the week. There could be more than one.\n\t\t\tvar winningPlayerNames = [];\n\t\t\t\n\t\t\t//Since we're through a week, it's time to add what we have for this week to what we've \"accumulated\" so far.\n\t\t\tfor (var currentRecordIndex = 0; currentRecordIndex < currentRecords.length; currentRecordIndex++){\n\t\t\t\tvar currentRecord = currentRecords[currentRecordIndex];\n\t\t\t\n\t\t\t\t//For each record, get the \"accumulated\" record for that player.\n\t\t\t\tvar accumulatedRecord = getAccumulatedRecord(currentRecord.player.id, accumulatedRecords);\n\n\t\t\t\t//If we find a record, then we just have to add the current record's wins and losses to it.\n\t\t\t\tif (accumulatedRecord != null){\n\t\t\t\t\taccumulatedRecord.record.wins = accumulatedRecord.record.wins + currentRecord.record.wins;\n\t\t\t\t\taccumulatedRecord.record.losses = accumulatedRecord.record.losses + currentRecord.record.losses;\n\t\t\t\t\tif (isDefined(currentRecord.record.ties) && currentRecord.record.ties != 0){\n\t\t\t\t\t\taccumulatedRecord.record.ties = accumulatedRecord.record.ties + currentRecord.record.ties;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Otherwise, if we don't find a record, the this is the first time through, so the record to this point\n\t\t\t\t//is just the current record's record. So, just copy everything to it.\n\t\t\t\telse {\n\t\t\t\t\taccumulatedRecord = {};\n\t\t\t\t\taccumulatedRecord.player = currentRecord.player;\n\t\t\t\t\taccumulatedRecord.record = currentRecord.record;\n\t\t\t\t\t//Don't really need the season and week, but I'm copying them anyway.\n\t\t\t\t\taccumulatedRecord.season = currentRecord.season;\n\t\t\t\t\taccumulatedRecord.week = currentRecord.week;\n\t\t\t\t\taccumulatedRecords.push(accumulatedRecord);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Now that we have all the current records added in, we have to \"resort\" the accumulated records because\n\t\t\t//the \"ranking\" might have changed.\n\t\t\tsortAccumulatedRecords(accumulatedRecords);\n\t\t\t\n\t\t\t//Now that they're sorted, we just have to output them in the order they're in, just like we do with the\n\t\t\t//week comparison html.\n\t\t\tfor (var accumulatedRecordIndex = 0; accumulatedRecordIndex < accumulatedRecords.length; accumulatedRecordIndex++){\n\t\t\t\tvar accumulatedRecord = accumulatedRecords[accumulatedRecordIndex];\n\t\t\t\t\n\t\t\t\t//Add the record for the player to the list.\n\t\t\t\tvar recordLabelToUse = '';\n\t\t\t\tif (isDefined(accumulatedRecord.record.ties) && accumulatedRecord.record.ties != 0){\n\t\t\t\t\trecordLabelToUse = '(' + accumulatedRecord.record.wins + ' - ' + accumulatedRecord.record.losses + ' - ' + accumulatedRecord.record.ties + ')';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trecordLabelToUse = '(' + accumulatedRecord.record.wins + ' - ' + accumulatedRecord.record.losses + ')';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayersCell = playersCell + '<li>' + accumulatedRecord.player.name + ' ' + recordLabelToUse + '</li>';\n\t\t\t\t\n\t\t\t\t//If this record has as many or more wins than the current top wins, add them to the list.\n\t\t\t\t//Since all the records are sorted by the number of wins, we should only go into this the first\n\t\t\t\t//time we see a record or when a record ties the one we saw the first time.\n\t\t\t\tif (accumulatedRecord.record.wins >= topWins){\n\t\t\t\t\twinningPlayerNames.push(accumulatedRecord.player.name);\n\t\t\t\t\ttopWins = accumulatedRecord.record.wins;\n\t\t\t\t}\n\t\t\t\t//Otherwise, the record didn't win during the week. If we haven't calculated a difference\n\t\t\t\t//for the week yet, that means it came in second or worse. In that case, we'll want to calculate the \n\t\t\t\t//difference between it and the \"top wins\" so we can show how much the top person won by.\n\t\t\t\telse {\n\t\t\t\t\tif (winDifference == 0){\n\t\t\t\t\t\twinDifference = topWins - accumulatedRecord.record.wins;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpreviousWins = accumulatedRecord.record.wins;\n\t\t\t}\n\t\t\t\n\t\t\t//And now we have the players all in a list so we can add them to the table.\n\t\t\tplayersCell = playersCell + '</ul></td>';\n\t\t\t\n\t\t\t//For the result cell, we just want to list the names of the winners and, for the first winner,\n\t\t\t//how much all the winners beat 2nd place by.\n\t\t\tvar resultCell = '<td class=\"common-table-cell\"><ul class=\"standings-table-cell-list\">';\n\t\t\tfor (var winningNameIndex = 0; winningNameIndex < winningPlayerNames.length; winningNameIndex++){\n\t\t\t\tvar playerName = winningPlayerNames[winningNameIndex];\n\t\t\t\t\n\t\t\t\t//Add how much the player won by if we're on the first player.\n\t\t\t\tif (winningNameIndex == 0){\n\t\t\t\t\tif (winDifference == 0){\n\t\t\t\t\t\tplayerName = playerName + ' (tie)';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tplayerName = playerName + ' (+' + winDifference + ')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresultCell = resultCell + '<li>' + playerName + '</li>';\n\t\t\t}\n\t\t\t\n\t\t\t//And we're done with the result table.\n\t\t\tresultCell = resultCell + '</ul></td>';\n\t\t\t\n\t\t\trow = row + playersCell + resultCell + '</tr>';\n\t\t\t\n\t\t\ttableBody = tableBody + row;\n\t\t\t\n\t\t\tcurrentRecords = [];\n\t\t}\n\t\t\n\t\tcurrentRecords.push(weekRecord);\n\t\tpreviousWeekRecord = weekRecord;\n\t}\n\t\n\ttableBody = tableBody + '</tbody>';\n\n\tvar weekRecordsByPlayerHtml = '<table class=\"standings-table\">' + tableHead + tableBody + '</table>';\n\t\n\treturn weekRecordsByPlayerHtml;\n}", "title": "" }, { "docid": "13478a7e46fb4ad610db9701a2f164fb", "score": "0.58203524", "text": "render(){\n var self = this;\n var html = \"\";\n var htmlHead = \"\";\n\n/*---------- Week row ----------*/\n htmlHead += '<tr class=\"week\"><td class=\"firstCol\"></td>';\n for (i = 0; i < this.nbWeekPerScreen; i++){\n htmlHead += '<td class=\"leftSep W' + ( i + 1 ) + '\" colspan=\"' + this.dayPerWeek + '\">W' + (i + this.week) + '</td>';\n }\n htmlHead += \"</tr>\";\n\n/*---------- Realeases row ----------*/\n htmlHead += '<tr class=\"day colDay\"><td></td>';\n for (var i = 0; i < this.nbdays; i++){\n var index = i % this.dayPerWeek;\n var indexW = Math.ceil((i+1) / self.dayPerWeek);\n var day = moment(this.dates[i],'YYYY-MM-DD');\n var css = ( index==0 ) ? ' leftSep' : '';\n if(moment().isSame(day,'d')){\n css += \" today\"\n }\n htmlHead += '<td class=\"W' + indexW + '' + css + '\">'\n htmlHead += '<ul class=\"releaseSlot\" di = \"' + i + '\">' + this.renderReleases(this.dates[i]) + '</ul>'\n htmlHead += '</td>'\n }\n htmlHead += \"</tr>\";\n\n/*---------- Days row ----------*/\n htmlHead += '<tr class=\"day colDay\"><td></td>';\n for (var i = 0; i < this.nbdays; i++){\n var index = i % this.dayPerWeek;\n var indexW = Math.ceil((i+1) / self.dayPerWeek);\n var day = moment(this.dates[i],'YYYY-MM-DD').format('DD-MM-YYYY');\n var css = ( index==0 ) ? ' leftSep' : '';\n if(moment().isSame(day,'d')){\n css += \" today\"\n }\n \n htmlHead += '<td class=\"W' + indexW + ' dayHeader' + css + '\" ><span class=\"letter\">' + this.days[index] + '</span><span class=\"number\">' + day + '</span></td>';\n }\n htmlHead += \"</tr>\";\n\n/*---------- Rows tasks ----------*/\n var lines = \"\";\n var firstLine = \"\";\n $.each( this.users, function( key, user ) {\n if(user && user.display){\n var empltyLine = true\n var line = \"<tr class='colDay'>\";\n line += '<td class=\"firstCol\" >' + user.getAvatar(32) + user.getStatus() + '</br>' + user.getFirstName() + '</td>';\n for (i = 0; i < self.nbdays; i++){\n var index = i % self.dayPerWeek;\n var indexW = Math.ceil((i+1) / self.dayPerWeek);\n var day = moment(self.dates[i],'YYYY-MM-DD');\n var css = ( index==0 ) ? 'leftSep' : '';\n if(moment().isSame(day,'d')){\n css += \" today\"\n }\n line += '<td class=\"W' + indexW + ' ' + css + '\"><ul class=\"connectedSortable\" di = \"' + i + '\" uid =\"'+ user.id +'\">';\n\n var tasks = self.taskList.getTasks(user.id,self.dates[i])\n if( tasks.length > 0 ){\n empltyLine = false\n line += self.taskList.render(tasks,false);\n }\n line += '</div></td>';\n }\n line += \"</tr>\";\n if(self.searchValue == \"\" || !empltyLine){\n if(user.id == self.connectUserId){\n firstLine = line;\n }else{\n lines += line;\n }\n }\n }\n });\n html += firstLine;\n if(this.connectUser.level!=0){\n html += lines;\n }\n $(\"#tasksManagerHead\").html('<table class=\"table\" width=\"100%\" cellspacing=\"0\">' + htmlHead + '</table>');\n $(\"#tasksManager\").html('<table class=\"table\" width=\"100%\" cellspacing=\"0\">' + html + '</table>');\n var htmlBox = \"\"\n var htmlBox = this.boxList.render(this.selectedProject)\n if(this.searchValue!=\"\"){\n var b = new box({id:5,name:\"ARCHIVE\"})\n htmlBox += b.render()\n\n var b2 = new box({name:\"PAST\"})\n b2.tasks = this.taskList.getPastTasks()\n htmlBox += b2.render()\n\n\n\n }\n $(\"#box\").html(htmlBox);\n $(\"#accountable\").html(this.renderAccountable());\n }", "title": "" }, { "docid": "2959e45860a4b43a72ed52978a3bfee5", "score": "0.5815365", "text": "function populateCalendar(date) {\n\n\tvar weekOneRow = document.getElementById(\"week1\")\n\tvar weekTwoRow = document.getElementById(\"week2\")\n\tvar weekThreeRow = document.getElementById(\"week3\")\n\tvar weekFourRow = document.getElementById(\"week4\")\n\tvar weekFiveRow = document.getElementById(\"week5\")\n\tvar weekSizeRow = document.getElementById(\"week6\")\n\n\tvar adjustedIndex = 0\n\n\t// Loop through the days\n\tfor (var i = 0; i < daysInMonth((date.getMonth() + 1), date.getFullYear()); i++) {\n\n\t\t// Work out what day the date is\n\t\tvar dateForDay = new Date(date.getFullYear(), date.getMonth(), (i + 1))\n\n\t\tvar day = dateForDay.getDay()\n\t\tvar dateNumber = dateForDay.getDate()\n\n\t\t//Get the indent for the first day of the week in that month, so we know which row to put the number in\n\t\tif (i == 0) {\n\t\t\tadjustedIndex = day\n\t\t} else {\n\t\t\tadjustedIndex++\n\t\t}\n\n\t\t// update the UI\n\t\tswitch (true) {\n\t\t case adjustedIndex <= 6:\n\t\t weekOneRow.children[adjustedIndex].innerHTML = dateNumber\n\t\t break;\n\t\t case adjustedIndex >= 7 && adjustedIndex <= 13:\n\t\t weekTwoRow.children[day].innerHTML = dateNumber\n\t\t break;\n\t\t case adjustedIndex >= 14 && adjustedIndex <= 20:\n\t\t weekThreeRow.children[day].innerHTML = dateNumber\n\t\t break;\n\t\t case adjustedIndex >= 21 && adjustedIndex <= 27:\n\t\t \tweekFourRow.children[day].innerHTML = dateNumber\n\t\t break;\n\t\t case adjustedIndex >= 28 && adjustedIndex <= 34:\n\t\t \tweekFiveRow.children[day].innerHTML = dateNumber\n\t\t \tbreak;\n\t\t case adjustedIndex >= 35:\n\t\t \tweekSizeRow.children[day].innerHTML = dateNumber\n\t\t \tbreak;\n\t\t default:\n\t\t break;\n\t\t}\n\n\t}\n\n\t//Keep track of what month/year currently being shown\n\tcurrentYear = date.getFullYear()\n\tcurrentMonth = date.getMonth()\n\thighlightCurrentDate()\n\t\n}", "title": "" }, { "docid": "742c78f190c403dcdb66f43b7855a10c", "score": "0.5813743", "text": "function makeTableHeaderZR(){\n\t\n\tvar row=\"\";\n\t row =\n\t\t\t`<thead class=\"thead-light\" bgcolor=\"white\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Ime</th>\n\t\t\t\t\t\t<th>Prezime</th>\n\t\t\t\t\t\t<th>Email</th>\n\t\t\t\t\t\t<th>Broj telefona</th>\n\t\t\t\t\t\t<th></th>\n\t\t\t\t\t\t<th></th>\n\t\t\t\t </tr>\n\t\t\t\t</thead>`;\n\t\t\n\t\treturn row;\n}", "title": "" }, { "docid": "a1b430a2b71faebb58156a747303d685", "score": "0.5800474", "text": "function cookieStandHours(){\n\n var thElement = document.createElement('th');\n thElement.textContent = 'Locations';\n cookieTable.appendChild(thElement);\n\n //use for loop to push hours array to table header\n for (var i = 0; i < hoursOpen.length; i++) {\n thElement = document.createElement('th');\n //create th content\n thElement.textContent = hoursOpen[i];\n //append th to table in DOM\n cookieTable.appendChild(thElement);\n }\n //create daily totals column\n thElement = document.createElement('th');\n thElement.textContent = 'Daily Totals';\n cookieTable.appendChild(thElement);\n}", "title": "" } ]
2c5d193cf5c2ae0abe45a9c8d5b5effc
Set beenFocused true on input focus
[ { "docid": "c8a7e80a4ff7de68c4bb4e1febff911c", "score": "0.7107992", "text": "focusOut () {\n this.set('beenFocused', true);\n }", "title": "" } ]
[ { "docid": "5f09e0fea31d1b563114253037ee32f1", "score": "0.80985165", "text": "function onFocusCb() {\n \t\tstate.isFocused = true;\n \t}", "title": "" }, { "docid": "83cefc938280b2bf462b652377dac5a0", "score": "0.8011442", "text": "onFocusIn() {\n this.updateFocused(true);\n }", "title": "" }, { "docid": "50883699b1f4a286b234f73b0259a170", "score": "0.7975132", "text": "setFocusedTrue () {\n this._isFocused = true\n }", "title": "" }, { "docid": "9414e27a3565b9a0dc808d10951e1738", "score": "0.7892438", "text": "focusIn() {\n if (!this.get('disabled') && !this.get('focusOnlyOnKey') || !this.get('pressed')) {\n this.set('focused', true);\n }\n }", "title": "" }, { "docid": "9414e27a3565b9a0dc808d10951e1738", "score": "0.7892438", "text": "focusIn() {\n if (!this.get('disabled') && !this.get('focusOnlyOnKey') || !this.get('pressed')) {\n this.set('focused', true);\n }\n }", "title": "" }, { "docid": "93516f4acb4ed205da9e2e0862c24d1d", "score": "0.78728664", "text": "focused (input) {\n this.focusedInput = input;\n }", "title": "" }, { "docid": "3dd50fbb0c391fa2838fc8cf436160dc", "score": "0.78443295", "text": "_focusChanged(isFocused) {\n if (isFocused !== this.focused) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "23efe0fff64f26405b8f2ffb627e114c", "score": "0.7786846", "text": "_focusChanged(isFocused) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "23efe0fff64f26405b8f2ffb627e114c", "score": "0.7786846", "text": "_focusChanged(isFocused) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "23efe0fff64f26405b8f2ffb627e114c", "score": "0.7786846", "text": "_focusChanged(isFocused) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "23efe0fff64f26405b8f2ffb627e114c", "score": "0.7786846", "text": "_focusChanged(isFocused) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "23efe0fff64f26405b8f2ffb627e114c", "score": "0.7786846", "text": "_focusChanged(isFocused) {\n if (isFocused !== this.focused && (!this.readonly || !isFocused)) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "1cb31dd956310e923f002d7bbdff1539", "score": "0.76587754", "text": "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "title": "" }, { "docid": "1cb31dd956310e923f002d7bbdff1539", "score": "0.76587754", "text": "function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }", "title": "" }, { "docid": "ce3ad50df182deb6b93bb764b207a60b", "score": "0.7554398", "text": "updateFocus () {\n if (!this.prevMouseDown) {\n if (ct.pointer.collides(this.parent)) {\n this.isFocused = true\n } else if (ct.pointer.buttons & 1) {\n this.isFocused = false\n }\n }\n this.prevMouseDown = ct.pointer.buttons & 1\n }", "title": "" }, { "docid": "83813ef028df8117035074cad138e779", "score": "0.748588", "text": "function setFocus() {\n ctrl.inputFocused = true;\n\n if (angular.isFunction(ctrl.itemFocusCallback)) {\n ctrl.itemFocusCallback({inputName: ctrl.inputName});\n }\n }", "title": "" }, { "docid": "5868f52fefe1a3ebbec0b534c565dab4", "score": "0.7476606", "text": "onFocus() {\n this.setState({\n isFocus: true,\n })\n }", "title": "" }, { "docid": "4c5572567514c7fc393a89b03b17c805", "score": "0.7363084", "text": "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n if (this.bottomLine_) {\n this.bottomLine_.activate();\n }\n if (this.outline_) {\n this.updateOutline();\n }\n if (this.label_) {\n this.label_.styleShake(this.isValid(), this.isFocused_);\n this.label_.styleFloat(\n this.getValue(), this.isFocused_, this.isBadInput_());\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "title": "" }, { "docid": "4c5572567514c7fc393a89b03b17c805", "score": "0.7363084", "text": "activateFocus() {\n this.isFocused_ = true;\n this.styleFocused_(this.isFocused_);\n if (this.bottomLine_) {\n this.bottomLine_.activate();\n }\n if (this.outline_) {\n this.updateOutline();\n }\n if (this.label_) {\n this.label_.styleShake(this.isValid(), this.isFocused_);\n this.label_.styleFloat(\n this.getValue(), this.isFocused_, this.isBadInput_());\n }\n if (this.helperText_) {\n this.helperText_.showToScreenReader();\n }\n }", "title": "" }, { "docid": "177ccc4e35d3ab473d4a066c7736eb96", "score": "0.7314834", "text": "_handleFocus() {\n if (!this.state.isFocused) {\n this.setState({isFocused: true});\n requestAnimationFrame(() => {\n this._textInput.focus();\n });\n }\n }", "title": "" }, { "docid": "177ccc4e35d3ab473d4a066c7736eb96", "score": "0.7314834", "text": "_handleFocus() {\n if (!this.state.isFocused) {\n this.setState({isFocused: true});\n requestAnimationFrame(() => {\n this._textInput.focus();\n });\n }\n }", "title": "" }, { "docid": "2430309bb27c8e13b8e9db64fd704570", "score": "0.7294715", "text": "function onFocus()\r\n\t{\r\n\t\tisFocused = true;\r\n\t\tbox2d.pauseResume( false );\r\n\t}", "title": "" }, { "docid": "34bb99e363480f1553f162e45f1aed09", "score": "0.72234434", "text": "focus() {\n if (!this.focusElement || this.disabled) {\n return;\n }\n\n this.focusElement.focus();\n this._setFocused(true);\n }", "title": "" }, { "docid": "a9ca3c23c8f04ebf95319ae6efec9fa7", "score": "0.72220534", "text": "focus() {\n if (!this.focusElement || this.disabled) {\n return;\n }\n\n this.focusElement.focus();\n\n this._setFocused(true);\n }", "title": "" }, { "docid": "46cf56dce532f348c4329e2d7942eb38", "score": "0.7184853", "text": "_IsFocused() {\n\t\treturn (Input._input === document.activeElement);\n\t}", "title": "" }, { "docid": "f83b41e47bcfbff3ca1265711bf095b3", "score": "0.7161343", "text": "onFocusChange({ focused }) {\n this.setState({ focused });\n }", "title": "" }, { "docid": "5b8cfe0bd7d2e6149aa86d60cf4cbef9", "score": "0.71590084", "text": "setFocused(isFocused) {\n this.state.setFocused(isFocused);\n }", "title": "" }, { "docid": "bb3b9aab3bd8acfe8a0380e842c9dd52", "score": "0.7124427", "text": "@api\n focus() {\n if (this.input) this.input.focus();\n }", "title": "" }, { "docid": "44901f8e24ed627143c8252bdca8e803", "score": "0.7107723", "text": "get isFocused() {\n return this.i.ai;\n }", "title": "" }, { "docid": "e5d9a0579de592088635ac30e4b0b830", "score": "0.7097122", "text": "get focusChanged() {\n return (this.flags & 1) > 0;\n }", "title": "" }, { "docid": "a5e7e43fa67162b73142cca3388bad95", "score": "0.7096079", "text": "get focusChanged() {\n return (this.flags & 1 /* UpdateFlag.Focus */) > 0;\n }", "title": "" }, { "docid": "24fbf56d615ca0e71becb6ae3920f3c6", "score": "0.709266", "text": "_handleInputFocus(e) {\n this.setState({isFocused: true});\n this.refs.input.focus();\n }", "title": "" }, { "docid": "baa794c4586f68b817d02e8bbb7b3984", "score": "0.7079892", "text": "focus () {\n this._input.focus()\n }", "title": "" }, { "docid": "2d74bf8eb0713496023a82164a2008e1", "score": "0.7061221", "text": "handleFocus() {\n this.isFocused = true\n\n this.elem.addClass('focused')\n\n // Reset custom error\n this.setError(null)\n\n // If suggestions are enabled, scroll to top\n if (this.suggestions) {\n this.scrollbar.scrollToTop(false)\n }\n }", "title": "" }, { "docid": "788a39024ae4a061f7726c431e00f49a", "score": "0.70439976", "text": "handleFocus(){\n // toggle the cursor blinking based on this state\n this.state.isFocused = true\n console.log(this.state)\n }", "title": "" }, { "docid": "ab45094a2ec0595b1dc73870b0725af1", "score": "0.7037765", "text": "get focusChanged() {\n return (this.flags & 1 /* UpdateFlag.Focus */) > 0;\n }", "title": "" }, { "docid": "6ce93a4be8df855d7f10aeb5c71c894b", "score": "0.70318854", "text": "_updateFocus(origin) {\n this.focused = origin !== null;\n this.stateChanges.next();\n }", "title": "" }, { "docid": "6ed709e6632cf3fbbe996894420dbf99", "score": "0.7025088", "text": "function setInputFocused() {\n\t\t$input.each(function () {\n\t\t\tif ($(this).val() === ''){\n\t\t\t\t$(this).parent('.form-field').removeClass('form-field--focused');\n\t\t\t} else {\n\t\t\t\t$(this).parent('.form-field').addClass('form-field--focused');\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "9ad7fd74c51eed77cc1a7bcf4794abab", "score": "0.7014263", "text": "focus() {\n this.input.current.focus();\n this._handleFocus();\n }", "title": "" }, { "docid": "7ab4d7d42fed32ab7850af0f6654ad8c", "score": "0.70013016", "text": "_setFocus(f) {\n this.setState({\n focused: f\n });\n }", "title": "" }, { "docid": "4e5b39525617e3f05a398e687fbb5cc0", "score": "0.6995329", "text": "function clickToFocusCallback() {\n readyToClick = true\n }", "title": "" }, { "docid": "e398785f9251bfcdc2cc6de1a9f718cc", "score": "0.6991062", "text": "focus(isFocused) {\n const focusedCssClass = 'videoContainerFocused';\n const isFocusClassEnabled = this.$container.hasClass(focusedCssClass);\n\n if (!isFocused && isFocusClassEnabled) {\n this.$container.removeClass(focusedCssClass);\n } else if (isFocused && !isFocusClassEnabled) {\n this.$container.addClass(focusedCssClass);\n }\n }", "title": "" }, { "docid": "57b30c1e74019013d0cbda1cce9cc736", "score": "0.6974873", "text": "onFocusedInputChange(focusedInput) {\n this.setState({ focusedInput })\n }", "title": "" }, { "docid": "b4f44251544f64a637e0f198c109a232", "score": "0.6974358", "text": "toggleFocus () {\n this.input = this.shadowRoot.querySelector('input')\n if (!this.input.classList.contains('is-focus')) {\n this.input.classList.add('is-focus')\n }\n }", "title": "" }, { "docid": "db7db396b69d7b21ac853edf888f6fee", "score": "0.6972969", "text": "get focused() {\n // todo: implement this.\n return false;\n }", "title": "" }, { "docid": "9140ede44b3f6db88db701c3305fb9e3", "score": "0.6955058", "text": "function focusHandler(){\n isWindowFocused = true;\n }", "title": "" }, { "docid": "e33bd2cf4b9849ef1951097e5f522595", "score": "0.68993586", "text": "function setFocusedElement()\n{\n if (!running)\n {\n return false;\n }\n\n let hoveredElement = getInnermostHovered();\n if (hoveredElement !== undefined)\n {\n focusElement(hoveredElement);\n }\n}", "title": "" }, { "docid": "b41b4861c06468325e5ebdc512abff0b", "score": "0.68984777", "text": "isFocused() {\n return this._textAreaInput.isFocused();\n }", "title": "" }, { "docid": "265c9dc4a5102172aef99fa3bdfdba56", "score": "0.68855053", "text": "_Focus() {\n\t\tInput._input.focus();\n\t}", "title": "" }, { "docid": "2449338b2e7995015876bcd842be7506", "score": "0.68777925", "text": "set focused(focused) {\n // If besides side effects, you also need the value for rendering you can set\n // the property under a different name.\n this._focused = focused;\n\n if (focused) {\n this.shadowRoot.getElementById('amountInput').focus();\n }\n }", "title": "" }, { "docid": "042fe964b0305829c3878970aabb56d6", "score": "0.6876631", "text": "function focus() {\n vm.inSearch = true;\n vm.onFocus();\n }", "title": "" }, { "docid": "e60e8daf03155b615bdf0e9b04443dc5", "score": "0.6846519", "text": "function setFocus() { // 13292\n if (!element.hasClass('md-focused')) { element.addClass('md-focused'); } // 13293\n } // 13294", "title": "" }, { "docid": "7c63a63f64eb314644655396eddb8b3a", "score": "0.6843462", "text": "focus() {\n const allComposers = this.env.models['mail.composer'].all();\n for (const otherComposer of allComposers) {\n if (otherComposer !== this && otherComposer.hasFocus) {\n otherComposer.update({ hasFocus: false });\n }\n }\n this.update({ hasFocus: true });\n }", "title": "" }, { "docid": "5c86394d03f256c93ee82e601e93612d", "score": "0.6839403", "text": "focus () {\n this._inputElement.focus()\n }", "title": "" }, { "docid": "9fc43de2cd2f750b177816735df6c1a3", "score": "0.6833862", "text": "onFocusOut() {\n this.updateFocused(false);\n }", "title": "" }, { "docid": "bac91d8864378f05446834a3f77c36e6", "score": "0.68319696", "text": "inputFocused (refName) {\n\t\tsetTimeout(() => {\n\t\t\tlet scrollResponder = this.refs.scrollView.getScrollResponder();\n\t\t\tscrollResponder.scrollResponderScrollNativeHandleToKeyboard(\n\t\t\t\t\tReact.findNodeHandle(this.refs[refName]),\n\t\t\t\t\t110, //additionalOffset\n\t\t\t\t\ttrue\n\t\t\t);\n\t\t}, 50);\n\t}", "title": "" }, { "docid": "045ba867442b9b05cffd79932c98ff73", "score": "0.683041", "text": "focus () {\n this.trigger('focus:pre')\n\n this.performFocus()\n\n this.trigger('focus:post')\n }", "title": "" }, { "docid": "3d24d799001ffd0c7c62669e58601835", "score": "0.68272454", "text": "function _focusInput() {\n _fixInputWidth();\n\n if (!container.classList.contains(settings.containerFocusClass)) {\n container.classList.add(settings.containerFocusClass);\n }\n\n if (placeholder) {\n placeholder.style.opacity = 0;\n }\n }", "title": "" }, { "docid": "a20eceb20d9beee231b9f9d0f25fbe7b", "score": "0.6810828", "text": "focus() {\n this.getInputElement().focus();\n }", "title": "" }, { "docid": "3adef480c10f8701ec5ad29bd7b6e6c0", "score": "0.68085575", "text": "focus() {\n this.setFocus(0, 1);\n }", "title": "" }, { "docid": "4426198aa12c025e256239fc97551358", "score": "0.6808479", "text": "_onFocus() {\n if (this.qs('#filter').focused) {\n this.focused = true; // this.requestUpdate()\n }\n }", "title": "" }, { "docid": "ba644100b8c5c249ffc348d1b8989653", "score": "0.6802835", "text": "setFocusedFalse () {\n this._isFocused = false\n }", "title": "" }, { "docid": "fd0d4549d1d0e03899ca0fdf7ad141e7", "score": "0.679853", "text": "doFocus() {\n this.$.input.doFocus();\n }", "title": "" }, { "docid": "fd0d4549d1d0e03899ca0fdf7ad141e7", "score": "0.679853", "text": "doFocus() {\n this.$.input.doFocus();\n }", "title": "" }, { "docid": "9458bfff8032ab0cbc230743629da29f", "score": "0.67764056", "text": "function focus(d) {\n //if (focused === d) return reset();\n g.selectAll(\".focused\").classed(\"focused\", false);\n d3.select(this).classed(\"focused\", focused = d);\n }", "title": "" }, { "docid": "0c6c47366a689963cfeb03ab9dd91f11", "score": "0.67743576", "text": "get isFocused() {\r\n return this.open && this.contains(activeElement());\r\n }", "title": "" }, { "docid": "a73f6c58adb00980c55ad353af071751", "score": "0.67726344", "text": "_setInputVisible(){\r\n this.filterString = this.currentText;\r\n this.inputIsVisible = true;\r\n this.$nextTick(() => {\r\n this.getRef('input').focus();\r\n })\r\n }", "title": "" }, { "docid": "710bb9bdbacb41857256c80f01600fd5", "score": "0.67677855", "text": "connectedCallback () {\n this._input.focus() // Sets the text input to have focus from the start\n }", "title": "" }, { "docid": "b288a966d7687eaf8a34f82aef0aa4bc", "score": "0.67644924", "text": "focusInput() {\n this.clickInput();\n this.waitUntilOpen();\n this.clickInput();\n }", "title": "" }, { "docid": "b098c5c3483345bb95f3ed841dc241f9", "score": "0.6761359", "text": "_onSetFocusTagInput() {\n this._isInspectorTagInputFocusOnMount = true;\n }", "title": "" }, { "docid": "7ab6182297e1f30cd7e17c5fa88b65cd", "score": "0.67569476", "text": "updateFocus() {\n this.cursorPosition = this.eventKeyup.target.value.length;\n this.element.focus();\n }", "title": "" }, { "docid": "2eb9669d9170576cfa064cd71570994a", "score": "0.673139", "text": "focus() {\n if (!this.selectable) {\n return;\n }\n if (!this.hasFocus) {\n this.elementRef.nativeElement.focus();\n this.onFocus.next({ tag: this });\n Promise.resolve().then(() => {\n this.hasFocus = true;\n this.changeDetectorRef.markForCheck();\n });\n }\n }", "title": "" }, { "docid": "1d39b4cf2222c2496a9ede258a91fb10", "score": "0.67267835", "text": "focus(isDidMount) {\n if (this.inputRef.current) {\n if (isDidMount) {\n setTimeout(() => {\n this.inputRef.current.focus();\n }, 0);\n } else {\n // set it into else, Avoid scrolling when focus\n this.inputRef.current.focus();\n }\n }\n }", "title": "" }, { "docid": "47586fa174a2056cc6ea3e845f4850e6", "score": "0.6718024", "text": "get isFocused() {\n return this.state.isFocused;\n }", "title": "" }, { "docid": "12082346d15ca691000feb24e87e4e9c", "score": "0.67156565", "text": "inputFocused (refName) {\n\t setTimeout(() => {\n\t let scrollResponder = this.refs.scrollView.getScrollResponder();\n\t scrollResponder.scrollResponderScrollNativeHandleToKeyboard(\n\t ReactNative.findNodeHandle(this.refs[refName]),\n\t 140, //additionalOffset\n\t true\n\t );\n\t }, 50);\n\t}", "title": "" }, { "docid": "780c1bf98545bca695eb9e744c9c610e", "score": "0.67142373", "text": "focus() {\n this._inputElement.focus();\n }", "title": "" }, { "docid": "576ff0a8e9221a8ac7ca1ff9d5b9697a", "score": "0.67085636", "text": "function onFocus() {\n console.log(\"focus\");\n\t\n}", "title": "" }, { "docid": "75725c8b7b38ba9bae6c9ca703f2e977", "score": "0.6706673", "text": "updateFocused(value) {\n debounce(() => {\n if (this.focused !== value) {\n this._focused = value;\n this.render();\n }\n }, 0, this.debounceId);\n }", "title": "" }, { "docid": "6b1839147113f30d6cd93a211b75d2d9", "score": "0.6678103", "text": "focus() {\n if (!this._hasFocus) {\n this._elementRef.nativeElement.focus();\n this._onFocus.next({ chip: this });\n }\n this._hasFocus = true;\n }", "title": "" }, { "docid": "6b1839147113f30d6cd93a211b75d2d9", "score": "0.6678103", "text": "focus() {\n if (!this._hasFocus) {\n this._elementRef.nativeElement.focus();\n this._onFocus.next({ chip: this });\n }\n this._hasFocus = true;\n }", "title": "" }, { "docid": "6b1839147113f30d6cd93a211b75d2d9", "score": "0.6678103", "text": "focus() {\n if (!this._hasFocus) {\n this._elementRef.nativeElement.focus();\n this._onFocus.next({ chip: this });\n }\n this._hasFocus = true;\n }", "title": "" }, { "docid": "6b1839147113f30d6cd93a211b75d2d9", "score": "0.6678103", "text": "focus() {\n if (!this._hasFocus) {\n this._elementRef.nativeElement.focus();\n this._onFocus.next({ chip: this });\n }\n this._hasFocus = true;\n }", "title": "" }, { "docid": "fea9b9e000888c05d74dfddc591b0a03", "score": "0.66699904", "text": "focus() {\n if (this.isFocusable) {\n DomHelper.focusWithoutScrolling(this.focusElement);\n }\n }", "title": "" }, { "docid": "9fb08786f937cac938ced02f2f0e9512", "score": "0.66693944", "text": "_isCurInputFocused() {\n var _a;\n const ace = (_a = this.tree\n .getActiveColElem()) === null || _a === void 0 ? void 0 : _a.querySelector(\"input:focus,select:focus\");\n return !!ace;\n }", "title": "" }, { "docid": "d44454321ee8559792f85b3ed888e935", "score": "0.6668112", "text": "handleFocus() {\n // Re-init colors in case the value changed externally since the UI was last visible.\n this.initColorValues();\n this.open = true;\n }", "title": "" }, { "docid": "8cb8da4b43572bfb0d0b0ce248d7c239", "score": "0.6666054", "text": "focusInput() {\n if (this.tagInput) {\n this.tagInput.focus();\n }\n }", "title": "" }, { "docid": "fc6985b0df7547c807c081b048a59897", "score": "0.66542655", "text": "handleFocus() {\n this.setState({\n focus: true\n })\n }", "title": "" }, { "docid": "8baf7a21d5b95ea5d2dda8dbf272276b", "score": "0.6634575", "text": "_evtFocus(event) {\n if (this._needsRefresh) {\n this.refresh();\n }\n this.host.classList.add('jp-mod-focused');\n // Update the selections on editor gaining focus because\n // the onCursorActivity function filters usual cursor events\n // based on the editor's focus.\n this._onCursorActivity();\n }", "title": "" }, { "docid": "8baf7a21d5b95ea5d2dda8dbf272276b", "score": "0.6634575", "text": "_evtFocus(event) {\n if (this._needsRefresh) {\n this.refresh();\n }\n this.host.classList.add('jp-mod-focused');\n // Update the selections on editor gaining focus because\n // the onCursorActivity function filters usual cursor events\n // based on the editor's focus.\n this._onCursorActivity();\n }", "title": "" }, { "docid": "32138d0c5171f8c11c6781016f8ed212", "score": "0.6632264", "text": "onFocus(field) {\n this.setState({ fieldInFocus: field });\n }", "title": "" }, { "docid": "d7bfa73270187d5c0b2535c0bcfd145a", "score": "0.6627141", "text": "get focused() {\n return this._focused;\n }", "title": "" }, { "docid": "c9ee0c31d67d0ee0825e69ec2a16ac7d", "score": "0.6624961", "text": "isFocused() {\n const {\n props\n } = this;\n return props !== undefined && (!!props.focused && this.isEnabled());\n }", "title": "" }, { "docid": "18756a99df59368c42c57c23c2d41042", "score": "0.6616841", "text": "function isInputFocused() {\n return (document.getElementById(\"inputbox\").focused == true);\n}", "title": "" }, { "docid": "8d225cb0e95c2f096348ce9824d2a69b", "score": "0.66136366", "text": "focus() {\n this.getFocusElement().focus();\n }", "title": "" }, { "docid": "9b4a4f2936efc6013afcdf0bec3e158d", "score": "0.6603865", "text": "focus() {\n // On key press\n this._terminal.on('key', this._onKeyEvent);\n }", "title": "" }, { "docid": "39a853ea535d42668efe022d22f90d75", "score": "0.65942305", "text": "focus() {\n this.focusOnButton();\n }", "title": "" }, { "docid": "102e0ca8186beb0c6a332b0e7282b58d", "score": "0.65938884", "text": "function focusInputElement() {\n elements.input.focus();\n }", "title": "" }, { "docid": "3aca3400deb279be51e647852d6fc1eb", "score": "0.658946", "text": "function focusInputElement(){elements.input.focus();}", "title": "" }, { "docid": "3e19e29bb69f139bb4cf5dc546fb0a2d", "score": "0.65885144", "text": "function focusInputElement () {\n\t elements.input.focus();\n\t }", "title": "" }, { "docid": "e29a95b400b153ea3b9beedf30c7f3a1", "score": "0.65758216", "text": "function focus () {\n hasFocus = true;\n //-- if searchText is null, let's force it to be a string\n if (!angular.isString($scope.searchText)) $scope.searchText = '';\n ctrl.hidden = shouldHide();\n if (!ctrl.hidden) handleQuery();\n }", "title": "" } ]
673132ce4f41f1508466d40fe89b1607
A dropdown menu can contain a header.
[ { "docid": "13b0f752ac02973434696bb487830bb6", "score": "0.64535874", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"q\" /* getUnhandledProps */])(DropdownHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"p\" /* getElementType */])(DropdownHeader, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_4__lib__[\"c\" /* childrenUtils */].isNil(children)) {\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), children);\n }\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), __WEBPACK_IMPORTED_MODULE_5__elements_Icon__[\"a\" /* default */].create(icon, {\n autoGenerateKey: false\n }), content);\n}", "title": "" } ]
[ { "docid": "ba267ef04440b50f63bf1ebf2b4de294", "score": "0.725777", "text": "_renderHeader($$) {\n const dropdownheader = $$(DropDownHeadline, {\n icon: 'fa-sort',\n items: this.manager.getContentPartTypes(),\n node: this.props.node,\n isolatedNodeComponent: this.parent,\n change: this.selectInlineText.bind(this)\n }).ref('dropdownHeadline')\n\n return $$('div', {class: 'header'}, [\n $$(FontAwesomeIcon, {icon: 'fa-bullhorn'}),\n dropdownheader\n ])\n }", "title": "" }, { "docid": "44bc46da52ddca82dcb531b3f4ad0358", "score": "0.6664149", "text": "function displayHeaderDropDownMenu(){\n if(delayInProgress=true){\n clearTimeout(delayTimeOut);\n }\n arrowElement.style.display = \"block\";\n headerDropDownMenu[0].style.display = \"Flex\";\n\n // Hide drop down menu nav when clicking outside div\n document.addEventListener('mouseup', function(e) {\n if (!headerDropDownMenu[0].contains(e.target)) {\n hideHeaderDropDownMenuNow();\n }\n });\n}", "title": "" }, { "docid": "f65b741550e3a709b05017dfb55e9aae", "score": "0.6613285", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"s\" /* getUnhandledProps */])(DropdownHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* getElementType */])(DropdownHeader, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__elements_Icon__[\"a\" /* default */].create(icon),\n content\n );\n}", "title": "" }, { "docid": "a2af495f46a55e9c0154ba7058a16d97", "score": "0.66079843", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"p\" /* getUnhandledProps */])(DropdownHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"o\" /* getElementType */])(DropdownHeader, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__elements_Icon__[\"a\" /* default */].create(icon),\n content\n );\n}", "title": "" }, { "docid": "2f97a5f08bdd94aab8079246e642ef0e", "score": "0.6601619", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"q\" /* getUnhandledProps */])(DropdownHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"p\" /* getElementType */])(DropdownHeader, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__elements_Icon__[\"a\" /* default */].create(icon),\n content\n );\n}", "title": "" }, { "docid": "519d4563d74d0aadd121c8a4650682e5", "score": "0.65988606", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* getUnhandledProps */])(DropdownHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"q\" /* getElementType */])(DropdownHeader, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n children\n );\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_5__elements_Icon__[\"a\" /* default */].create(icon),\n content\n );\n}", "title": "" }, { "docid": "5501fe2559016ed104fa0f187d8703f0", "score": "0.65589523", "text": "renderSubHeader(){\n const options = [\n {key: 'length', value: 'length', text: 'Distance'},\n {key: 'stars', value: 'stars', text: 'Rating'},\n // {key: 'difficulty', value: 'difficulty', text: 'Difficulty'},\n {key: 'name', value: 'name', text: 'Name'}\n ]\n\n const onDropdownChange = (val) => {\n this.props.sortBy(val)\n this.props.refreshMap(true)\n }\n\n return(\n <>\n <div className='ui divider' style={{marginTop:'-1rem'}}></div>\n <Grid>\n <Grid.Column width={6}>\n <Dropdown placeholder='Sort by' selection options={options} onChange={(e, data)=>onDropdownChange(data.value)}/>\n </Grid.Column>\n <Grid.Column width={10}>\n <div style={{display:'flex', justifyContent:'space-between', alignItems:'flex-start'}}>\n <h2 style={{textAlign:'center', textTransform:'capitalize'}}>{this.props.headerContent}</h2>\n {this.props.addDropdown ? this.renderDropdown() : <></>}\n </div>\n </Grid.Column> \n </Grid>\n </>\n\n\n // <div className='ui secondary menu' style={{alignItems:'center'}}>\n // <div style={{position:'absolute'}}>\n // <Dropdown placeholder='Sort by' selection options={options} onChange={(e, data)=>this.props.sortBy(data.value)}/>\n // </div>\n // <h2 style={{margin:'12px auto 20px auto'}}>{this.props.headerContent}</h2>\n // </div>\n )\n }", "title": "" }, { "docid": "eec21b65db174ac4aaa4bbaa584245f5", "score": "0.6511742", "text": "function showHeader(){\n $('.menu-buttons').slideDown('normal');\n $('#header').slideDown('normal');\n}", "title": "" }, { "docid": "6eb15b354c39c3f7b655a9b9b5edbdf2", "score": "0.6502059", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"s\" /* getUnhandledProps */])(DropdownHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* getElementType */])(DropdownHeader, props);\n if (!__WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children)) return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), children);\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), __WEBPACK_IMPORTED_MODULE_5__elements_Icon__[\"a\" /* default */].create(icon), content);\n}", "title": "" }, { "docid": "795f127ae818655885a858c4ba413afb", "score": "0.64949626", "text": "function navBarHeaderOn(e) {\n\n var bar;\n var x, y;\n\n bar = navBars[this.index];\n\n // Position drop down menu.\n\n if (this.menuLayer != null) {\n x = bar.x + bar.hdrsOffsetX + this.offsetX;\n y = bar.y + this.offsetY;\n if (bar.inverted)\n y = bar.y - this.menuLayer.height + bar.border;\n moveLayerTo(this.menuLayer, x, y);\n\n // Save drop down menu position and show it.\n\n this.menuLayer.left = getPageLeft(this.menuLayer);\n this.menuLayer.top = getPageTop(this.menuLayer);\n this.menuLayer.right = this.menuLayer.left + this.menuLayer.width + 1;\n this.menuLayer.bottom = this.menuLayer.top + this.menuLayer.height + 1;\n }\n\n // Hide any currently active header and drop down.\n\n if (isMinIE4) {\n if (bar.activeHeader != null && bar.activeHeader != this) {\n hideLayer(bar.activeHeader.highLayer);\n if (bar.activeHeader.menuLayer != null)\n hideLayer(bar.activeHeader.menuLayer);\n }\n bar.activeHeader = this;\n }\n\n // Display the header highlight layer and drop down menu.\n\n showLayer(this.highLayer);\n if (this.menuLayer != null)\n showLayer(this.menuLayer);\n}", "title": "" }, { "docid": "0d1d8132cf536d023107be3682a6348f", "score": "0.6476907", "text": "render (){\n return (\n <div id= 'header'>\n\n <img src = {\"https://www.visitdevonport.com.au/wp-content/uploads/2019/07/Target.png\"} id = 'headPic' alt = 'logo'></img>\n\n <Dropdown>\n <Dropdown.Toggle variant=\"success\" id=\"header-button\">\n Categories\n </Dropdown.Toggle>\n\n <Dropdown.Menu>\n \n <Dropdown.Item eventKey=\"1\">Main Menu</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Grocery</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Household Essentials</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Halloween</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Woman</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Men</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Young Adult</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Kids</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Baby</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Shoes</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Home</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Furniture</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Kitchen & Dining</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Patio & Garden</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Toys</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Electronics</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Video Games</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Movies, Music & Books</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Sports & Outdoors</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Beauty</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Personal Care</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Health</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Pets</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Luggage</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">School & Office Supplies</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Party Supplies</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Christmas</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Gift Cards</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Gift Ideas</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Clearance</Dropdown.Item>\n <Dropdown.Divider />\n </Dropdown.Menu>\n </Dropdown>\n <Dropdown>\n\n <Dropdown.Toggle variant=\"success\" id=\"header-button\">\n Deals\n </Dropdown.Toggle>\n\n <Dropdown.Menu>\n <Dropdown.Item href=\"#/action-1\">Clearance</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-2\">Weekly Ad</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-3\">Top Deals</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-4\">RedCard Exclusives</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Target Circle Offers</Dropdown.Item>\n <Dropdown.Divider />\n </Dropdown.Menu>\n </Dropdown>\n <Dropdown>\n \n\n <Dropdown.Toggle variant=\"success\" id=\"header-button\">\n Whats New\n </Dropdown.Toggle>\n\n <Dropdown.Menu>\n <Dropdown.Item href=\"#/action-1\">#Target Style</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-2\">New in Beauty</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-3\">New in Woman's</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-4\">Home New Arrivals</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Kids' New Arrivals</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Home Fall Trends & Inspo</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Collector's Spot</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Target Finds</Dropdown.Item>\n <Dropdown.Divider />\n\n </Dropdown.Menu>\n </Dropdown>\n <Dropdown>\n\n <Dropdown.Toggle variant=\"success\" id=\"header-button\">\n Pickup & Delivery\n </Dropdown.Toggle>\n\n <Dropdown.Menu>\n <Dropdown.Item href=\"#/action-1\">Order Pickup</Dropdown.Item>\n <Dropdown.Item href=\"#/action-2\">Same Day Delivery</Dropdown.Item>\n <Dropdown.Item href=\"#/action-3\">Drive Up</Dropdown.Item>\n </Dropdown.Menu>\n </Dropdown>\n <input id='searchbar' type = 'text' className = 'searchbar' placeholder = 'Search' onChange = {(e) => { this.inputValue(e) }}></input>\n <button id = 'button' onClick = {(e) => {this.enter(e.target.value)}}>Click</button>\n <Dropdown>\n <Dropdown.Toggle variant=\"success\" id=\"header-button\">\n Sign in\n </Dropdown.Toggle>\n\n <Dropdown.Menu>\n <Dropdown.Item href=\"#/action-1\">Sign in</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-2\">Create account</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-3\">Orders</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-1\">O Circle</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-1\">Gift Cards</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-4\">RedCard</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">Buy it Again</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item href=\"#/action-5\">My Store</Dropdown.Item>\n <Dropdown.Divider />\n </Dropdown.Menu>\n </Dropdown>\n </div>\n )\n }", "title": "" }, { "docid": "1797cdaa494a8fba30c107c4295ecd5b", "score": "0.6473163", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n\n var classes = (0, _classnames2.default)('header', className);\n var rest = (0, _lib.getUnhandledProps)(DropdownHeader, props);\n var ElementType = (0, _lib.getElementType)(DropdownHeader, props);\n\n if (!_lib.childrenUtils.isNil(children)) return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), children);\n\n return _react2.default.createElement(ElementType, (0, _extends3.default)({}, rest, { className: classes }), _Icon2.default.create(icon), content);\n}", "title": "" }, { "docid": "bd508aebb63ccb78ba58368d5e0474c3", "score": "0.6413075", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n var classes = (0, _classnames[\"default\"])('header', className);\n var rest = (0, _lib.getUnhandledProps)(DropdownHeader, props);\n var ElementType = (0, _lib.getElementType)(DropdownHeader, props);\n\n if (!_lib.childrenUtils.isNil(children)) {\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), children);\n }\n\n return _react[\"default\"].createElement(ElementType, (0, _extends2[\"default\"])({}, rest, {\n className: classes\n }), _Icon[\"default\"].create(icon, {\n autoGenerateKey: false\n }), content);\n}", "title": "" }, { "docid": "e7e7d3385d14a7defbed292285a58b0e", "score": "0.6377193", "text": "function DropdownHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content,\n icon = props.icon;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()('header', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getUnhandledProps\"])(DropdownHeader, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getElementType\"])(DropdownHeader, props);\n\n if (!_lib__WEBPACK_IMPORTED_MODULE_4__[\"childrenUtils\"].isNil(children)) {\n return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), children);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _elements_Icon__WEBPACK_IMPORTED_MODULE_5__[\"default\"].create(icon, {\n autoGenerateKey: false\n }), content);\n}", "title": "" }, { "docid": "10d43dbc17e0ab2e6435fcdadbc5ca9b", "score": "0.6352217", "text": "function headerMenuMouseoverEvent(event) {\r\n var target = event.target;\r\n\r\n function showDropdown(arg) {\r\n arg.nextElementSibling.classList.remove('hide');\r\n arg.nextElementSibling.classList.add('show');\r\n }\r\n\r\n function headerMenuMouseoutEvent(arg) {\r\n arg.nextElementSibling.classList.add('hide');\r\n arg.nextElementSibling.classList.remove('show');\r\n }\r\n\r\n if (target.getAttribute('data-dropdown') === 'hover') {\r\n showDropdown(target);\r\n target.parentElement.addEventListener('mouseleave', function() {\r\n headerMenuMouseoutEvent(target);\r\n });\r\n }\r\n\r\n if (target.parentElement.getAttribute('data-dropdown') === 'hover') {\r\n showDropdown(target.parentElement);\r\n target.parentElement.parentElement.addEventListener('mouseleave', function() {\r\n headerMenuMouseoutEvent(target.parentElement);\r\n });\r\n }\r\n\r\n }", "title": "" }, { "docid": "b2e3c37e15cfe3576684481da0eb9f7f", "score": "0.6347708", "text": "function dropMenuDown(){\n\t\tmoveElementsToTop(allElementsOfClass(\"dropDown\"));\n\t\tif (lastButtonClicked == this.classList[0]){\n\t\t\tlastButtonClicked = \"\";\n\t\t}\n\t\telse{\n\t\t\tlastButtonClicked = this.classList[0];\n\t\t\tvar menu = document.getElementsByClassName(lastButtonClicked)[1];\n\t\t\tvar header = document.getElementsByClassName(\"header_title\")[0];\n\t\t\tmenu.style.top = windowTopToBottomOf(header) + \"px\";\n\t\t};\t\n\t}", "title": "" }, { "docid": "05bb7ae5f190ac2db833e1e07cd29bb9", "score": "0.63471687", "text": "function bindHeaderDropdown2() {\n $(\".jira-ajax-menu\").each(function () {\n var $ddtrigger = $(this);\n var $dd = $(\"#\" + $ddtrigger.attr(\"aria-owns\"));\n var $ajaxkey = $dd.data(\"aui-dropdown2-ajax-key\");\n\n if ($ajaxkey) {\n $dd.bind(\"aui-dropdown2-show\", function (event, options) {\n Events.trigger('aui-dropdown2-show-before', event.target.id);\n $dd.empty();\n $dd.addClass(\"aui-dropdown2-loading\");\n SmartAjax.makeRequest({\n url: contextPath + \"/rest/api/1.0/menus/\" + $ajaxkey,\n data: {\n inAdminMode: AJS.Meta.getBoolean(\"in-admin-mode\")\n },\n dataType: \"json\",\n cache: false,\n success: function (data) {\n $dd.removeClass(\"aui-dropdown2-loading\");\n $dd.html(JIRA.Templates.Menu.Dropdowns.dropdown2Fragment(data));\n\n if (options && options.selectFirst) {\n $dd.find(\"a:not(.disabled)\").filter(\":first\").addClass(\"active\")\n }\n Events.trigger('aui-dropdown2-show-after', event.target.id);\n }\n });\n });\n }\n });\n }", "title": "" }, { "docid": "17559442715cb2a100c7ab6e626120d9", "score": "0.6136267", "text": "function selectHeader()\n{\n $ND('selectHeader').send();\n}", "title": "" }, { "docid": "93b35b70ede3d14422b9069013d3c8de", "score": "0.61072516", "text": "function defineNoUl() {\n var length = ul.find('li.dropdown-header').length;\n if(!length) {\n scope.dropdown.noUl = true;\n }\n }", "title": "" }, { "docid": "3e7a10d489b360343bea51b7ca45be73", "score": "0.60745585", "text": "get videoHubDropdown_MainMenu() {return browser.element(\"~Dropdown menu Video Hub\");}", "title": "" }, { "docid": "37845c422582e615415ac46f75f9d3f7", "score": "0.605052", "text": "renderHeader(data) {\n const content = this.formatHeader(data);\n return h.li({\n className: classes('lm-CommandPalette-header', 'jp-icon-hoverShow', \n /* <DEPRECATED> */\n 'p-CommandPalette-header'\n /* </DEPRECATED> */\n )\n }, content, h.span(searchHeaderIcon));\n }", "title": "" }, { "docid": "3a59bccfb53d5291ce01cff14434e8b1", "score": "0.6025648", "text": "function Header() {\n return (\n <header>\n <Selection />\n </header>\n );\n}", "title": "" }, { "docid": "d2215f763f15407564fe4c148961ed70", "score": "0.60121703", "text": "_dropDownHeaderClickHandler(event) {\n const that = this;\n\n if (event.target === that.$.selectDate) {\n if (that.$selectDate.hasClass('jqx-selected')) {\n return;\n }\n\n that.$selectDate.addClass('jqx-selected');\n that.$selectTime.removeClass('jqx-selected');\n that.$.timePickerDropDown.$.addClass('jqx-hidden');\n that.$calendarDropDown.removeClass('jqx-hidden');\n }\n else {\n if (that.$selectTime.hasClass('jqx-selected')) {\n return;\n }\n\n that.$selectDate.removeClass('jqx-selected');\n that.$selectTime.addClass('jqx-selected');\n that.$calendarDropDown.addClass('jqx-hidden');\n\n if (that._timePickerInitialized) {\n that.$.timePickerDropDown.$.removeClass('jqx-hidden');\n }\n else {\n that._initializeTimePicker();\n }\n }\n }", "title": "" }, { "docid": "312d5c7184a1b0d179a4e80a7d3981f3", "score": "0.60105574", "text": "function hideHeaderDropDownMenuNow(){\n headerDropDownMenu[0].style.display = \"none\";\n arrowElement.style.display = \"none\";\n}", "title": "" }, { "docid": "3d6f5b9cd42d7402bd1b5e5af77bd214", "score": "0.59699935", "text": "function mkdInitDividedHeaderMenu(){\n if(mkd.body.hasClass('mkd-header-divided')){\n //get left side menu width\n var menuArea = $('.mkd-menu-area'),\n menuAreaWidth = menuArea.width(),\n menuAreaItem = $('.mkd-main-menu > ul > li > a'),\n menuItemPadding = 0,\n logoArea = menuArea.find('.mkd-logo-wrapper .mkd-normal-logo'),\n logoAreaWidth = 0;\n\n if(menuArea.children('.mkd-grid').length) {\n menuAreaWidth = menuArea.children('.mkd-grid').outerWidth();\n }\n\n if(menuAreaItem.length) {\n menuItemPadding = parseInt(menuAreaItem.css('padding-left'));\n }\n\n if(logoArea.length) {\n logoAreaWidth = logoArea.width() / 2;\n }\n\n var menuAreaLeftRightSideWidth = Math.round(menuAreaWidth/2 - menuItemPadding - logoAreaWidth);\n\n $('.mkd-menu-area .mkd-position-left').width(menuAreaLeftRightSideWidth);\n $('.mkd-menu-area .mkd-position-right').width(menuAreaLeftRightSideWidth);\n\n menuArea.css('opacity',1);\n\n mkdDropDownMenu();\n mkdSetDropDownMenuPosition();\n\n }\n }", "title": "" }, { "docid": "6a0b894f3a9720deb52643e044567dc6", "score": "0.58688945", "text": "function mkdInitTabbedHeaderMenu(){\n if(mkd.body.hasClass('mkd-header-tabbed')){\n\n var centerHeaderArea = $('.mkd-position-center'),\n leftHeaderAreaWidth = $('.mkd-position-left').width(),\n rightHeaderAreaWidth = $('.mkd-position-right').width(),\n headerAreaPadding = 40; //20px on both side of header\n\n centerHeaderArea.width(mkd.windowWidth - leftHeaderAreaWidth - rightHeaderAreaWidth - headerAreaPadding);\n centerHeaderArea.css('opacity',1);\n }\n }", "title": "" }, { "docid": "5bea48e9d76c8bba6d54e427e7575a85", "score": "0.5862597", "text": "function dropDownMenuHandler(e) {\n // Hide the menu icon\n $('#navigation_bar_menu').hide();\n // Show the drop down menu\n $('#drop_down_menu').show();\n }", "title": "" }, { "docid": "48e1aa9b578142e65469475355ebcfed", "score": "0.5858522", "text": "render() {\n return (\n <nav>\n <div className=\"navbar\">\n <span className=\"header-logo\" onClick={this.headerClick}>\n WARC-Portal\n </span>\n <div className=\"search-form\">\n <form onSubmit={this.onClick}>\n <FormGroup>\n <InputGroup>\n <FormControl type=\"text\" placeholder=\"Search\" bsStyle=\"search-header-field\"/>\n <InputGroup.Button>\n <Button type=\"submit\" bsStyle=\"primary\" onClick={this.onClick}><Glyphicon glyph=\"search\" /></Button>\n </InputGroup.Button>\n </InputGroup>\n </FormGroup>\n </form>\n </div>\n <div className=\"header-links\">\n <ButtonToolbar className=\"analytics-button\">\n <Dropdown id=\"dropdown-custom-1\" onSelect={this.onVisSelect}>\n <Dropdown.Toggle bsStyle=\"default\" title=\"primary\" noCaret id=\"dropdown-no-caret\">\n <i className=\"fa fa-bar-chart\" aria-hidden=\"true\"></i> Visualizations\n </Dropdown.Toggle>\n <Dropdown.Menu className=\"\">\n <MenuItem eventKey=\"tfidf\">tf-idf</MenuItem>\n <MenuItem eventKey=\"wordcloud\">Word Cloud</MenuItem>\n </Dropdown.Menu>\n </Dropdown>\n </ButtonToolbar>\n <div className=\"profile-button\">\n <ButtonToolbar id=\"profile-button\">\n <Dropdown id=\"dropdown-custom-1\" onSelect={this.onProSelect}>\n <Dropdown.Toggle bsStyle=\"default\" title=\"primary\" noCaret id=\"dropdown-no-caret\">\n <i className=\"fa fa-user\" aria-hidden=\"true\"></i>\n </Dropdown.Toggle>\n {this.getProfileSelect()}\n </Dropdown>\n </ButtonToolbar> \n </div>\n </div>\n </div>\n </nav>\n )\n }", "title": "" }, { "docid": "18ca1cca2fbdae2a5d2938c2d5896c77", "score": "0.5820772", "text": "createMenu(header) {\n header.appendChild(menuTemplate.content);\n this.mobileInteractivity(\n DOMHelper.getEle('menu-mobile'),\n DOMHelper.getEle('menu-mobile__icon')\n );\n }", "title": "" }, { "docid": "8655de71f76424e470f01ee7f06db4d6", "score": "0.58142334", "text": "function hideHeader(){\n $('.menu-buttons').hide();\n $('#header').hide();\n}", "title": "" }, { "docid": "70922c8c7093e5cda0a863032725135e", "score": "0.58095217", "text": "_renderPopover() {\n const headerComponents = [\n <span key=\"header\">I&#39;d like to:</span>,\n ];\n const items = [\n MEETING_REQUEST,\n PROPOSAL,\n ];\n const idFn = (item) => item\n return (\n <Menu\n className=\"scheduler-picker\"\n items={items}\n itemKey={idFn}\n itemContent={idFn}\n headerComponents={headerComponents}\n defaultSelectedIndex={-1}\n onSelect={this._onSelectItem}\n />\n )\n }", "title": "" }, { "docid": "803f02a58f08a5bf47f60e78ba050f53", "score": "0.58043826", "text": "function makeHeader($parent, titleHtml, hasAccountSelect, accSelectCallback, hasViewMoreOnSelect) {\n\thdr = document.createElement(\"header\");\n\t$(hdr).addClass(\"drag-handle\").addClass(\"payment-widget-label\");\n\t$(hdr).html(titleHtml);\n\tvar myCurrentAccountOptions = '<option>My Current Account ($824.00)</option><option>My Euro Account (€586.31)</option><option>My Savings Account ($5,987.00)</option><option>My Euro Savings (€2,082.00)</option>';\n\t\n\tif( hasAccountSelect ) {\n\t\t$(hdr).append('<a class=\"curracc\" href=\"JavaScript:\" onclick=\"showAccSelectTopContent(this)\"><span class=\"widget-header-payment-account\"><div class=\"widget-header-payment-block\"><select class=\"widget-header-payment-account-span\">' + myCurrentAccountOptions + '</select></div></span></a>');\n\t\t$($parent).append(\n\t\t\t'<div class=\"quckpt_top_cntnt header\">'+\n\t\t\t'\t<div>'+\n\t\t\t'\t\t\t<strong>Select another</strong>source account:'+\n\t\t\t'\t</div>'+\n\t\t\t'\t<ul class=\"pay_list\">'+\n\t\t\t'\t\t\t<li onclick=\"selectDefaultAccount(this, '+accSelectCallback+')\" data-account_name=\"My Current Account\" data-account_number=\"***55221\" data-account_balance=\"1,234.99 EUR\" class=\"active\">My Current Account (***55221) 1,234.99 EUR</li>'+\n\t\t\t'\t\t\t<li onclick=\"selectDefaultAccount(this, '+accSelectCallback+')\" data-account_name=\"My Current Loan\" data-account_number=\"***55341\" data-account_balance=\"234.99 EUR\">My Current Loan (***55341) 234.99 EUR</li>'+\n\t\t\t'\t\t\t<li onclick=\"selectDefaultAccount(this, '+accSelectCallback+')\" data-account_name=\"My Saving Account\" data-account_number=\"***44221\" data-account_balance=\"5,634.99 EUR\">My Savings Account (***44221) 5,634.99 EUR</li>'+\n\t\t\t'</ul>'+\n\t\t\t'<div class=\"text-center\">'+\n\t\t\t'\t\t<button type=\"button\" class=\"btn btn-transparent\" onclick=\"hideAccSelectTopContent(this)\">Select</button>'+\n\t\t\t'</div>'+\n\t\t\t'</div>');\n\t}\n\t\n\tif( hasViewMoreOnSelect ) {\n\t\t\n\t\t$($parent).closest(\".bb-bookblock\").append( //-bb-bookblock lehet jobb\n\t\t'<div class=\"quckpt_bottom_cntnt nicescroll quick_payment pt10\">'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/no_image.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/nbc.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/star.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/payment_person.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/no_image.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/no_image.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/nbc.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/star.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/payment_person.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/no_image.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/no_image.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/nbc.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/star.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/payment_person.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<a href=\"JavaScript:\" onclick=\"'+hasViewMoreOnSelect+'\">'+\n\t\t'\t\t\t<img class=\"img-responsive\" src=\"img/no_image.png\" />'+\n\t\t'\t</a>'+\n\t\t'\t<div class=\"clearfix\"></div>'+\n\t\t'\t<div class=\"text-center\">'+\n\t\t'\t\t\t<button type=\"button\" class=\"btn btn-transparent\" onclick=\"toggleSelectUserBottom(this)\">Select</button>'+\n\t\t'\t</div>'+\n\t\t'</div>');\n\t\t\n\t}\n\n\tif ($parent.firstChild) {\n\t $parent.insertBefore(hdr, $parent.firstChild);\n\t} else {\n\t $parent.appendChild(hdr);\n\t}\n}", "title": "" }, { "docid": "cc23492de3d7c476fb4554ec20d2db69", "score": "0.5787569", "text": "function loadHeaderBtn()\n{\n if ($(\".header .container\")) {\n $(\".header .container\").append(\"<a class='btn-menu' href='#'><i class='ti-menu'></i></a>\");\n }else {\n $(\".header\").append(\"<a class='btn-menu' href='#'><i class='ti-menu'></i></a>\");\n }\n}", "title": "" }, { "docid": "7ad0b81232022758d3076e761918bdb8", "score": "0.57744414", "text": "function renderHeader() {\r\n\t\theader.setToolbarOptions(computeHeaderOptions());\r\n\t\theader.render();\r\n\t\tif (header.el) {\r\n\t\t\telement.prepend(header.el);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "17e326a21ee68892269e945575ebef81", "score": "0.5771143", "text": "get dropdownTitle() {\n return this._title;\n }", "title": "" }, { "docid": "281a1754184febbb071ff750deedc546", "score": "0.57686025", "text": "function ELEMENT_HEADER$static_(){FilterPanelBase.ELEMENT_HEADER=( FilterPanelBase.BLOCK.createElement(\"header\"));}", "title": "" }, { "docid": "772d2d2248a8aea1f92660cd5fa7be7b", "score": "0.5741572", "text": "function CollapseHeader(options = {}) {\n const {\n cls = '',\n icon = '#ic_chevron_right_24px',\n style: styleSettings,\n title = 'Title'\n } = options;\n\n const style = (0,_dom_dom__WEBPACK_IMPORTED_MODULE_2__.createStyle)(styleSettings);\n const collapseEvent = 'collapse:toggle';\n\n const headerButton = (0,_button__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n cls: 'icon-small compact round',\n icon,\n iconCls: 'rotate grey',\n style: {\n 'align-self': 'flex-end'\n }\n });\n\n const titleCmp = (0,_component__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n render() {\n return `<span id=\"${this.getId()}\" class=\"grow\">${title}</span>`;\n }\n });\n\n return (0,_component__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n onInit() {\n this.addComponents([headerButton, titleCmp]);\n },\n onRender() {\n this.dispatch('render');\n const el = document.getElementById(this.getId());\n el.addEventListener('click', () => {\n const customEvt = new CustomEvent(collapseEvent, {\n bubbles: true\n });\n el.blur();\n el.dispatchEvent(customEvt);\n });\n },\n render: function render() {\n return `<div id=\"${this.getId()}\" class=\"${cls} flex row align-center pointer collapse-header\" id=\"${this.getId()}\" style=\"${style} width: 100%;\">\n ${titleCmp.render()}\n ${headerButton.render()}\n </div>`;\n }\n });\n}", "title": "" }, { "docid": "d713a12939d76848c1b8fa7f551765a8", "score": "0.57409066", "text": "function renderHeader() {\n\t\theader.setToolbarOptions(computeHeaderOptions());\n\t\theader.render();\n\t\tif (header.el) {\n\t\t\telement.prepend(header.el);\n\t\t}\n\t}", "title": "" }, { "docid": "9ffe3f413f11985bfb6027e066130f7d", "score": "0.5715862", "text": "render() {\n const { showBody } = this.state;\n const {\n label, value, body, children, header,\n } = this.props;\n const headerDom = label === '' ? header : getMenuConfig(label, value);\n\n return (\n <FilterMenuStyled>\n <div className=\"filter-item\" onClick={e => this.handleHeaderClick(e)}>\n <div className={showBody ? 'filter-background' : ''}>\n {headerDom}\n </div>\n </div>\n {\n showBody\n && (\n <div className=\"filter-dropdown-card\" ref={node => this.setWrapperRef(node)}>\n {body}\n {children}\n </div>)\n }\n </FilterMenuStyled>\n );\n }", "title": "" }, { "docid": "d6e51dc8951483ad52909ebc83fcba21", "score": "0.5713638", "text": "_closeDropDown () {\n this._mainDropDownActive = false\n this._containerHeader.querySelector('.dropdown-content').style.display = 'none'\n }", "title": "" }, { "docid": "087e1c3c3268cb56ae1b60f25bc0dcc5", "score": "0.5691469", "text": "function onDropdownClick() {\n setUserMenuOpen((prev) => !prev);\n }", "title": "" }, { "docid": "413b1f93c1bdf9ecc2340b31f4fc22c9", "score": "0.5691273", "text": "function Home() {\r\n return (\r\n <div>\r\n <h2>Select an option from the dropdown list above</h2>\r\n </div>\r\n );\r\n}", "title": "" }, { "docid": "5167b9aa4528cb85e53d2d016651a3cf", "score": "0.56859183", "text": "function Header({ isMenuOpen, setIsMenuOpen }) {\n return (\n\n <div className='header'>\n <div className='header__logo'>\n <Link to='/'>\n <img\n className='header__logoImg'\n src={logo}\n alt='HOME'\n />\n </Link>\n </div>\n <div className='header__links'>\n <Link to='/fresa'> Профильные фрезы </Link>\n <Link to='/hydrohead'>Гидроголовы</Link>\n <Link to='/castor'>Castor</Link>\n </div>\n\n\n <div className='header__right'>\n\n <Link to='/login' className={isMenuOpen && 'header__link--hidden'}>\n Whatsup\n </Link>\n <div\n className='header__menu'\n onClick={() => setIsMenuOpen(!isMenuOpen)}\n >\n {isMenuOpen ? <CloseIcon /> : <MenuIcon />}\n </div>\n </div>\n </div>\n\n )\n}", "title": "" }, { "docid": "8c0f861494adb2084795b676d3c4bd98", "score": "0.5682721", "text": "selectionHeader(noOfSelection) {\r\n let selectedTitle = 'Selected ' + noOfSelection + ' items';\r\n this.props.navigation.setOptions({\r\n headerTitle: () => {\r\n return (\r\n <View style={styles.selectionHeader}>\r\n <Text style={styles.heading}>{selectedTitle}</Text>\r\n <TouchableOpacity onPress={() => this.getTables()} >\r\n <MaterialCommunityIcons size={25} style={{ color: '#fff' }} name={'close'} />\r\n </TouchableOpacity>\r\n </View>)\r\n },\r\n headerRight: () => (\r\n <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>\r\n <Menu\r\n ref={this.setMenuRef}\r\n button={\r\n <TouchableOpacity style={styles.moreButton} onPress={this.showMenu} >\r\n <MaterialCommunityIcons size={30} style={{ color: '#fff' }} name={'dots-vertical'} />\r\n </TouchableOpacity>\r\n }\r\n >\r\n {this.state.selectedIds.length === 1 ?\r\n <>\r\n <MenuItem onPress={this.selectAll}>Select All</MenuItem>\r\n <MenuItem onPress={this.deleteItems}>Delete</MenuItem>\r\n <MenuItem onPress={this.shareList}>Share</MenuItem>\r\n <MenuItem onPress={() => {\r\n this.hideMenu();\r\n let tablesList = this.state.tablesList;\r\n let listName;\r\n tablesList.map((item) => {\r\n if (item.index_no === this.state.selectedIds[0]) {\r\n listName = item.tableName;\r\n }\r\n });\r\n this.setState({\r\n dialogMode: 'Export_Name',\r\n dialogBoxTitle: 'Export AS',\r\n nameValue: listName\r\n });\r\n this.setNameDialogVisible(true);\r\n }}\r\n >Export</MenuItem>\r\n <MenuItem onPress={() => {\r\n this.hideMenu();\r\n let tablesList = this.state.tablesList;\r\n let oldListName;\r\n tablesList.map((item) => {\r\n if (item.index_no === this.state.selectedIds[0]) {\r\n oldListName = item.tableName;\r\n }\r\n });\r\n this.setState({\r\n dialogMode: 'Rename',\r\n dialogBoxTitle: 'Enter New Name',\r\n nameValue: oldListName\r\n });\r\n this.setNameDialogVisible(true);\r\n }}\r\n >Rename</MenuItem>\r\n </>\r\n :\r\n <>\r\n <MenuItem onPress={this.selectAll}>Select All</MenuItem>\r\n <MenuItem onPress={this.deleteItems}>Delete</MenuItem>\r\n <MenuItem onPress={this.shareList}>Share</MenuItem>\r\n </>\r\n }\r\n </Menu>\r\n </View>\r\n )\r\n });\r\n }", "title": "" }, { "docid": "d3541c3577c57dfa8407ea26bfcac62d", "score": "0.5668835", "text": "function createDropdownMenu(title, pos, menuItems, selectedItemIdx) {\n var labelId = guid();\n var menuId = guid();\n var listId = guid();\n var html = [\n '<div id =\"' + menuId + '\" class=\"dropdown chart-dropdown\">',\n '<button class=\"btn btn-default dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">',\n '<label id=\"' + labelId + '\" style=\"font: normal 14px Times New Roman\">' + title + '</label>',\n '<span class=\"caret\"></span>',\n '</button>',\n '<ul id=\"' + listId + '\"class=\"dropdown-menu scrollable-menu\" >',\n '</ul>',\n '</div>'].join('\\n');\n\n $(viewer.container).append(html);\n $('#' + menuId).css({\n 'top': pos.top + 'px',\n 'left': pos.left + 'px'\n });\n $('#' + labelId).text(title + ': ' + menuItems[selectedItemIdx || 0].label);\n menuItems.forEach(function (menuItem) {\n var itemId = guid();\n var itemHtml = '<li id=\"' + itemId + '\"><a href=\"\">' + menuItem.label + '</a></li>';\n $('#' + listId).append(itemHtml);\n $('#' + itemId).click(function (event) {\n event.preventDefault();\n menuItem.handler();\n $('#' + labelId).text(title + ': ' + menuItem.label);\n });\n });\n return menuId;\n }", "title": "" }, { "docid": "46b2da8035d679085898cddfaeef409c", "score": "0.5668249", "text": "function _createHeaderBlock(){\n var modifier = new Modifier({\n size: [window.innerWidth, this.options.boxSize],\n origin: [0.5, 0.1],\n align: [ 0, 0]\n });\n\n var surface = new Surface({\n content: 'Level Selection',\n properties: {\n textAlign: 'center',\n verticalAlign: 'middle',\n fontFamily: 'HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif',\n fontSize: this.options.headerFontSize\n }\n });\n\n this.node.add(modifier).add(surface);\n }", "title": "" }, { "docid": "bee16a87fb7748bc654079a477e9fa9d", "score": "0.56653714", "text": "function RuyaMenuDropdown() {\n\t\tvar hasChildren = $('.mo-header-v2 .mo-menu-list > ul > li.menu-item-has-children, .mo-header-v5 .mo-menu-list > ul > li.menu-item-has-children, .mo-header-v7 .mo-menu-list > ul > li.menu-item-has-children');\n\t\thasChildren.each(function () {\n\t\t\tvar $btnToggle = $('<span class=\"l-dropdown-icon\"></span>');\n\t\t\t$(this).append($btnToggle);\n\t\t});\n\t}", "title": "" }, { "docid": "a340fdf9938a3a32a6172bde78a776bb", "score": "0.5665261", "text": "function buildDropdownMenu() {\n var $select = pub.$select,\n $dropdownMenu = pub.$dropdownMenu;\n\n $select.find('option').each(function () {\n var $option = $(this),\n $list = $('<li><a></a></li>'),\n label, name, value = $option.attr('value');\n\n if (value === '') {\n label = 'None';\n } else {\n label = $option.html();\n }\n name = $option.html();\n\n $list.data({'value': value, 'name': name, 'label': label})\n .find('a').html(label);\n\n $dropdownMenu.append($list);\n });\n\n }", "title": "" }, { "docid": "c6f803c91652973a055b8993140ee836", "score": "0.56633836", "text": "renderHeaderContent() {\n if (this.isLoadingState) {\n return lit_element__WEBPACK_IMPORTED_MODULE_0__[\"html\"] `\n <div class=\"header__loading\"></div>\n `;\n }\n const lists = this._lists || [];\n const currentList = this._currentList;\n const targetId = this.targetId;\n let listSelect;\n if (targetId && lists.length) {\n const list = lists.find(l => l.id === targetId);\n if (list) {\n listSelect = lit_element__WEBPACK_IMPORTED_MODULE_0__[\"html\"] `\n <span class=\"PlanTitle\">\n ${list.displayName}\n </span>\n `;\n }\n }\n else if (currentList) {\n const listOptions = {};\n for (const l of lists) {\n listOptions[l.displayName] = () => this.loadTaskList(l);\n }\n listSelect = lit_element__WEBPACK_IMPORTED_MODULE_0__[\"html\"] `\n <mgt-arrow-options .value=\"${currentList.displayName}\" .options=\"${listOptions}\"></mgt-arrow-options>\n `;\n }\n return lit_element__WEBPACK_IMPORTED_MODULE_0__[\"html\"] `\n <span class=\"TitleCont\">\n ${listSelect}\n </span>\n `;\n }", "title": "" }, { "docid": "c0c74bf66215347921c556266897a31e", "score": "0.56397855", "text": "function addDropdownClickEvent(dropdown) {\n dropdown.on('click', function (e) {\n e.stopPropagation();\n $(this).removeClass('forgot');\n var dropdownName = $(this).attr(\"name\");\n var dropdownElement = $('.dropdown[name=' + dropdownName + ']');\n var dropdownOptions = dropdownElement.children('section.select-options');\n if ($(dropdownOptions).css('display') == 'none') {\n\n //Make sure all other select options and titles are hidden\n $('.select-options').css('display', 'none');\n $('.select-title').removeClass('select-title-active');\n\n //Unhide only the children of this dropdown\n $(dropdownOptions).addClass('select-title-active');\n $(dropdownOptions).css('display', 'block');\n } else {\n $(dropdownOptions).removeClass('select-title-active');\n $(dropdownOptions).css('display', 'none');\n }\n });\n}", "title": "" }, { "docid": "92c93ba23e529445d221d6c05f145d68", "score": "0.56379646", "text": "function toggleDropDown() {\n $(this).find('ul.dropdown-menu').slideToggle(100);\n }", "title": "" }, { "docid": "1ca21cd4aa0c8449d7c2a241d433e639", "score": "0.56359863", "text": "function initDropDownMenu(){\n\t$(\"#mainNav > ul > li > .menu\").click(function (e){\n\t\tif ($(this).parent().hasClass('selected')){\n\t\t\t$(\"#mainNav ul .selected div div\").slideUp(100);\n\t\t\t$(\"#mainNav ul .selected\").removeClass(\"selected\");\n\t\t\thandleLogoDisplay($(window));\n\t\t} else {\n\t\t\t$(\"#mainNav ul .selected div div\").slideUp(100);\n\t\t\t$(\"#mainNav ul .selected\").removeClass(\"selected\");\n\t\t\t\n\t\t\tif($(this).next(\".subs\").length){\n\t\t\t\t$(this).parent().addClass(\"selected\");\n\t\t\t\t$(this).next(\".subs\").children().slideDown(200);\n\t\t\t\t$('#logo').addClass('retract');\n\t\t\t\t$('#logoCBC').addClass('retract');\n\t\t\t\t//$(\"#logo\").slideUp();\n\t\t\t}\n\t\t}\n\t\te.stopPropagation();\n\t});\n\t\n\t$(\"body\").click(function() {\n\t\t$(\"#mainNav ul .selected div div\").slideUp(100);\n\t\t$(\"#mainNav ul .selected\").removeClass(\"selected\");\n\t\thandleLogoDisplay($(window));\n\t});\n}", "title": "" }, { "docid": "b544cc1f470f5a25cd23e0e1526b4939", "score": "0.5633182", "text": "function resetHeader() {\n if (typeof scope.selectNone !== 'undefined') {\n if (scope.obj.items[FIRST]) {\n scope.obj.items[FIRST].checked = true;\n }\n scope.header = $i18next(scope.selectNone);\n } else {\n scope.header = selectLabel;\n }\n scope.selectedItem = undefined;\n }", "title": "" }, { "docid": "3b741143b6f6757564ee56b476efa672", "score": "0.5628625", "text": "function bindHeaderDropdown2Analytics() {\n $(\"nav.aui-header a.aui-dropdown2-trigger\").each(function() {\n var $ddtrigger = $(this);\n var id = $ddtrigger.attr(\"id\");\n if (id) {\n var $dd = $(\"#\" + $ddtrigger.attr(\"aria-owns\"));\n $dd.on(\"aui-dropdown2-show\", function() {\n AJS.trigger(\"analytics\", {\n name: \"jira.header.menu.opened\",\n data: {\n id: id\n }\n });\n });\n $dd.on(\"aui-dropdown2-hide\", function() {\n AJS.trigger(\"analytics\", {\n name: \"jira.header.menu.closed\",\n data: {\n id: id\n }\n });\n });\n $dd.on(\"click\", \"a\", function() {\n AJS.trigger(\"analytics\", {\n name: \"jira.header.menu.item.clicked\",\n data: {\n id: this.id,\n menu_id: id\n }\n });\n });\n }\n });\n }", "title": "" }, { "docid": "954d63911d70ae3cd9fc9ece29c297d3", "score": "0.56212884", "text": "function menuToggle( el ) {\n\tdocument.querySelector('header .btn').classList.toggle('open');\n\tdocument.querySelector('header ul.nav').classList.toggle('open');\n}", "title": "" }, { "docid": "4ccf9274051b1119d70e1b49206e0b9e", "score": "0.56211984", "text": "function HEADER_MENUBAR$static_(){MenuSkin.HEADER_MENUBAR=( new MenuSkin(\"header-menubar\"));}", "title": "" }, { "docid": "81244c6405549538ff08e2f2143391b8", "score": "0.5608589", "text": "function clickOutHeaderMenu() {\n $(document).click(function (event) {\n if (!$(event.target).closest('#options-fa-bell').length) {\n $('#drop-down-options-notification').fadeOut(fadeDuration);\n }\n if (!$('#options-fa-more, #options-fa-more-mobile').is(event.target)) {\n $('#drop-down-options-more').fadeOut(fadeDuration);\n }\n if (!$(event.target).closest(\"#search-prompt-menu\").length && !$(event.target).closest('.searchBar').length) {\n $(\"#search-prompt\").hide();\n }\n });\n}", "title": "" }, { "docid": "013266e5acd50bd6bac7ae9008b31919", "score": "0.56004304", "text": "function showDropDown(scope,element,opts){if(opts.parent!==element.parent()){element.parent().attr('aria-owns',element.attr('id'));}element.parent().find('md-select-value').attr('aria-hidden','true');opts.parent.append(element);return $q(function(resolve,reject){try{$animateCss(element,{removeClass:'md-leave',duration:0}).start().then(positionAndFocusMenu).then(resolve);}catch(e){reject(e);}});}", "title": "" }, { "docid": "633ac487ff7e6e0c8b95d722525d50e1", "score": "0.5594197", "text": "constructor (options) {\n\t\tthis.header = options.header;\n\t\tthis.items = options.items ? options.items : [];\n\t\tthis.displayFn = options.displayFn;\n\t\tthis.selFn = options.selFn;\n\t\tthis.deselFn = options.deselFn;\n\t\tthis.attrName = options.attrName;\n\t\tthis.minimalUI = options.minimalUI;\n\t}", "title": "" }, { "docid": "2bf43e5822f24be275d043b5de36dcb9", "score": "0.55827653", "text": "function getHeaderMenu(){ \n try{\n console.log(\"making header menu\")\n // Obtaining the relevant doi to look up.\n let url = \"https://www.artsdatabanken.no/api/Content/224883\";\n fetch(url)\n .then((response) => {\n return response.json()\n })\n .then((data) => { \n try{\n //console.log(\"received data\")\n let apimenus = data.Records; \n for (let i in apimenus){\n let item = apimenus[i];\n let id = item.Values.toString().replace(\" \",\"\");\n\n //console.log(\"stage 1\")\n // Using createelement to enable attachment of eventlistener\n let buttonname = item.Values;\n if(buttonname == \"English\"){\n // Currently hiding it due to lack of uu in homepage. \n // Add to page\n let spacer = document.createElement('div');\n spacer.className = \"englishspacer\"; \n appendData('headermenu',spacer);\n return null; \n }\n\n //console.log(\"stage 2\")\n let menubutton = document.createElement('button');\n menubutton.className = \"menuitems\"; \n let dropicon = \" <span class='dropicon material-icons'>arrow_drop_down</span>\";\n \n // Generate the dropdowncontent \n let newdropdown =\"<ul class='dropdown' id='\"+id+\"' style='display:none'>\"; \n let subitems = item.References; \n //console.log(\"stage 3\") \n for(let j in subitems){\n subitem = subitems[j]; \n let infotext = \"\";\n let link = null;\n for(let k in subitem.Records){\n let subsub = subitem.Records[k];\n if( subsub.Label == \"MenuInfoText\"){\n infotext = subsub.Values.toString();\n infotext = \"<span>\"+infotext+\"</span>\";\n }else{\n link = subsub.Values.toString();\n } \n }\n let name = subitem.Heading;\n let external = \"\"; \n let url = \"https://artsdatabanken.no\"+subitem.Url;\n if(!subitem.Heading){\n name= subitem.Header.Content; \n if(link[0] == \"/\"){\n link = \"https:\" + link;\n }\n external = \" <b class='material-icons'>open_in_new</b>\";\n url = link;\n }\n newdropdown += \"<li><a href='\"+url+\"'>\"+name+external+infotext+\"</a></li>\";\n } \n newdropdown +=\"</ul>\";\n \n //console.log(\"stage 4\")\n // ADD ALL BUTTONCNTENT\n menubutton.innerHTML = buttonname+dropicon+ newdropdown; // attach it\n\n // Toggle the relevant dropdownmenu\n menubutton.addEventListener('click',function(e){\n let target = e.target;\n if(target.className ==\"dropicon material-icons\"){\n target = target.parentElement;\n }\n target = target.querySelector('.dropdown');\n let siblings = $(\".dropdown\");\n let show = false;\n if(target && target.style.display == \"none\"){\n show = true;\n }\n for(let i in siblings){\n // hide all the siblings before dealing with the current\n let sibling = siblings[i];\n if(sibling.style){\n sibling.style.display = \"none\";\n } \n }\n if(show){\n target.style.display = \"block\";\n }\n });\n // Add to page\n //console.log(\"stage 5\")\n appendData('headermenu',menubutton);\n }\n }catch(err){\n console.error(\"failed at headermenu\")\n } \n })\n .catch((err) => {\n console.error(\"failed obtaining headermenu\")\n })\n }catch{\n console.log(\"error in headermenu\")\n }\n}", "title": "" }, { "docid": "cc52fbc2d0b2163df61ee2eb01a856bd", "score": "0.5572117", "text": "set tablist_header(header = '') {\n $.bindings.tablist_header(this.uuid, `${header}`)\n }", "title": "" }, { "docid": "07a89bbacc00e5291e1cc3d5dccc27d5", "score": "0.5570047", "text": "render() {\n return(\n <div className=\"DashboardMenu\">\n <Dropdown method={this.props.method} text=\"Time span\" menuItems={this.list}/>\n </div>\n );\n }", "title": "" }, { "docid": "3d55c1cc3719b9b53e4c9cc2a05d0a28", "score": "0.5563601", "text": "render() {\n return (\n <div className=\"list\">\n <ButtonToolbar className=\"dropdown-hide\">\n <DropdownButton title=\"Information\" id=\"dropdown-basic-button-4\" size=\"lg\" className=\"dropdown4\">\n <Dropdown.Item eventKey=\"Show-Information\" onSelect={this.onSelectShow}>\n Show Information\n </Dropdown.Item>\n <Dropdown.Item eventKey=\"Hide-Information\" onSelect={this.onSelectHide}>\n Hide Information\n </Dropdown.Item>\n </DropdownButton>\n </ButtonToolbar>\n <div className=\"gods\">\n <ul class=\"list\">\n {this.renderList()}\n </ul>\n </div>\n </div>\n );\n }", "title": "" }, { "docid": "93ffe0cb7dbad6103907b1296e15714d", "score": "0.5562725", "text": "function documentsMenuSection(){\n headerMenu1.config.widgets.push(\n { \n name: \"alfresco/menus/AlfMenuGroup\",\n config: {\n label: \"header.menu.documents.labelSubTitle\", // \n widgets: [\n {\n name: \"alfresco/menus/AlfMenuBarItem\",\n config: {\n id: \"HEADER_ARCHIVE_DOCUMENT\",\n label: \"header.menu.document.label\", //label: \"Архивирај документ\",\n targetUrl: \"hdp/ws/archive-doc\"\n }\n },\n {\n name: \"alfresco/menus/AlfMenuBarItem\",\n config: {\n id: \"HEADER_ARCHIVE_DOCUMENT\",\n label: \"header.menu.editDocument.label\", //label: \"Uredi dokument\",\n targetUrl: \"hdp/ws/edit-archive-doc\"\n }\n }\n ]\n }\n }\n );\n }", "title": "" }, { "docid": "dee3241e5ac7c989db2923d922487aeb", "score": "0.5556986", "text": "function testOpen(){\n var test=document.getElementById(\"dropdown-menu\");\n test.style.display=\"block\";\n}", "title": "" }, { "docid": "49da1333bbf02d7a51c9450839c99bbf", "score": "0.5556778", "text": "function buildDropdown() {\n // validate data\n $commonselect.$dropdown = $('<span class=\"commonselect-dropdown\"></span>');\n $commonselect.$dropdownContent = $('<div class=\"commonselect-dropdown-content\"></div>');\n\n // build item\n var firstLevelData = getDataByParent($commonselect.settings.rootId);\n var html = buildLevel(1, firstLevelData);\n\n $commonselect.$dropdownContent.append(html);\n // final\n $commonselect.$dropdown.append($commonselect.$dropdownContent);\n $commonselect.append($commonselect.$dropdown);\n }", "title": "" }, { "docid": "923d814f7ccf34e79d9a007859f3694f", "score": "0.55322987", "text": "function menuFunction()\n {\n document.getElementById(\"dropdownItems\").classList.toggle(\"show\");\n }", "title": "" }, { "docid": "b6e6401cbf6e2ab0c31ae9191c204586", "score": "0.55279756", "text": "selectMenu() {\n if (jQuery('.nav__list').css('display') === 'none') {\n this.showNav(true);\n } else {\n this.showNav(false);\n }\n }", "title": "" }, { "docid": "b7859f6fe28c35eccb02226a5bfe0332", "score": "0.5526214", "text": "function colHeaderEvent(e) {\n $(\"#divColHeaderModal\").modal('show');\n //$(\"#divColHeader\").toggleClass(\"open\");\n //$(\"div#divColHeader span\").attr(\"aria-expanded\",\"true\");\n e.stopPropagation();\n}", "title": "" }, { "docid": "6cafed2a34099d4dc8f88efd35d87d8a", "score": "0.5521529", "text": "function toggleDropdownMenu() {\n\tdropdownContent = document.getElementsByClassName(\"dropdown-content\")[0];\n\tif (dropdownContent.style.display == \"none\")\n\t\tdropdownContent.style.display = \"block\";\n\telse\n\t\tdropdownContent.style.display = \"none\";\n}", "title": "" }, { "docid": "9226504c60102cbbd0785895bb9a71b9", "score": "0.5519441", "text": "onDropdownToggle(open) {\n //This adds white space at the bottom when the row menu is open to avoid clipping row menu pop up.\n //It will remove the white space if the menu is close. The class is added in reportContent.js\n this.setState({dropdownOpen: open});\n\n if (this.props.onDropdownToggle) {\n this.props.onDropdownToggle(open);\n }\n }", "title": "" }, { "docid": "202b56545f9e313c455ffb7fc2ff6f63", "score": "0.5515378", "text": "function toggleDropdown() {\n setDropdownOpen(!dropdownOpen)\n }", "title": "" }, { "docid": "ce898099d4537c82195dd3626cce4d30", "score": "0.5498793", "text": "function dropdown() {\n var directive = {\n restrict : 'A',\n link : link\n };\n\n return directive;\n\n function link( scope, element, attrs ) {\n var elem = $( element ),\n trigger = elem.find('.fn-dropdownTrigger'),\n dropdown = elem.find('.c-menu--dropdown'),\n dropdowns = $('.c-menu--dropdown');\n\n trigger.bind( 'click', clickHandler );\n\n function clickHandler( event ) {\n event.preventDefault();\n event.stopPropagation();\n\n if ( !dropdown.hasClass( 'is-visible' ) ) {\n dropdowns.removeClass( 'is-visible' );\n dropdown.addClass( 'is-visible' );\n } else {\n dropdown.removeClass('is-visible');\n }\n\n document.addEventListener('click', dropdownDismiss);\n\n function dropdownDismiss( event ) {\n if ( !dropdown.get(0).contains( event.target ) ){\n document.removeEventListener( 'click', dropdownDismiss );\n dropdown.removeClass('is-visible');\n }\n }\n }\n }\n }", "title": "" }, { "docid": "fac543c75b9473be7093ef99226648af", "score": "0.5481112", "text": "function SortMenu(props) {\n return (\n <DropdownButton id=\"dropdown-basic-button\" title=\"Sort by\">\n <Dropdown.Item onClick={props.handleSortBtn}>Name</Dropdown.Item>\n <Dropdown.Item onClick={props.handleSortBtn}>Location</Dropdown.Item>\n <Dropdown.Item onClick={props.handleSortBtn}>Role</Dropdown.Item>\n </DropdownButton>\n );\n}", "title": "" }, { "docid": "9cc021ce9e880c024fca5d66bcecf284", "score": "0.5477931", "text": "function mkdInitStickyDividedHeaderMenu(){\n if(mkd.body.hasClass('mkd-header-divided')){\n //get left side menu width\n var menuArea = $('.mkd-sticky-header'),\n menuAreaWidth = menuArea.width(),\n\t menuAreaItem = $('.mkd-main-menu > ul > li > a'),\n\t menuItemPadding = 0,\n\t logoArea = menuArea.find('.mkd-logo-wrapper .mkd-normal-logo'),\n\t logoAreaWidth = 0;\n\n if(menuArea.children('.mkd-grid').length) {\n menuAreaWidth = menuArea.children('.mkd-grid').outerWidth();\n }\n\n\t if(menuAreaItem.length) {\n\t\t menuItemPadding = parseInt(menuAreaItem.css('padding-left'));\n\t }\n\n\t if(logoArea.length) {\n\t\t logoAreaWidth = logoArea.width() / 2;\n\t }\n\n var menuAreaLeftRightSideWidth = Math.round(menuAreaWidth/2 - menuItemPadding - logoAreaWidth);\n\n $('.mkd-sticky-header .mkd-position-left').width(menuAreaLeftRightSideWidth);\n\t\t\t$('.mkd-sticky-header .mkd-position-right').width(menuAreaLeftRightSideWidth);\n\n menuArea.css('opacity',1);\n\n mkdDropDownMenu();\n mkdSetDropDownMenuPosition();\n\n }\n }", "title": "" }, { "docid": "c5dc872098c7bc0d4427685228d9b96a", "score": "0.5476909", "text": "function dropdown3() {\n companySub.classList.add('show-menu');\n}", "title": "" }, { "docid": "39da0c8ab39a9e670a1abc82e26d6513", "score": "0.5473701", "text": "function dropdown (menu) {\n\t\tif (document.getElementById(menu).style.display == '' || document.getElementById(menu).style.display == 'none') {\n\t\t\tdocument.getElementById(menu).style.display = 'block';\n\t\t} else {\n\t\t\tdocument.getElementById(menu).style.display = 'none';\n\t\t}\n\t}", "title": "" }, { "docid": "a7cb1cc308d38b1da867782f4c22978c", "score": "0.54688555", "text": "function h_open_menu(){\n\t$('.header').addClass('header-color');\n\t$('.header-home .header').removeClass('header-color').addClass('home-color-desplegable');\n\t$('.header-desplegable').addClass('active');\n\t$('.header-overlay').addClass('active');\n\t$('.h1-openDesplegable').addClass('active');\n\t$('.h1-closeDesplegable').addClass('active');\n}", "title": "" }, { "docid": "a36291134d9a4533395b21c3a9fd8226", "score": "0.54669833", "text": "function makeHeader() {\n\n var toAdd = {_page: vm.pageId, type: \"HEADING\", size: 1, text: \"\", order: 0};\n\n navigate(toAdd);\n\n }", "title": "" }, { "docid": "47657f2d2742e26dcf82e20b2cf0c4ff", "score": "0.5465149", "text": "function DropdownComponent(_headerService, _router, _navService) {\r\n this._headerService = _headerService;\r\n this._router = _router;\r\n this._navService = _navService;\r\n /** Broadcast the visibility status of dropdown component after user logout */\r\n this.dropDownStatus = new __WEBPACK_IMPORTED_MODULE_0__angular_core__[\"F\" /* EventEmitter */]();\r\n this.loginService = _headerService;\r\n this.router = _router;\r\n this.config = new __WEBPACK_IMPORTED_MODULE_2__app_config__[\"a\" /* AppConfig */]();\r\n this.navService = _navService;\r\n this.getUserCashAtIntervals();\r\n }", "title": "" }, { "docid": "183bba239842de0d046c28fd85fb3ea0", "score": "0.5454709", "text": "function onMenuIconClick() {\n if (menuClosed) {\n expandHeader();\n } else {\n collapseHeader();\n }\n}", "title": "" }, { "docid": "086de4a864c69b3883abb56c54e349e9", "score": "0.5447074", "text": "select(event) {\n this.setState({\n dropdownOpen: !this.state.dropdownOpen,\n airlinename: event.target.innerText\n });\n }", "title": "" }, { "docid": "d181f01b7859d33d725dac53c0eac50e", "score": "0.5444582", "text": "function MenuHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n\n var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('header', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"b\" /* getUnhandledProps */])(MenuHeader, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__lib__[\"c\" /* getElementType */])(MenuHeader, props);\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_1_lodash_isNil___default()(children) ? content : children\n );\n}", "title": "" }, { "docid": "4bf558f7fe82351eb9e3e474555a58bd", "score": "0.5422582", "text": "function createBasicHeaderMenu() {\r\n\tvar newMenuDiv = document.createElement('div');\r\n\tnewMenuDiv.className = 'headerMenu';\r\n\tvar newAreaDiv = document.createElement('div');\r\n\tnewAreaDiv.id = 'headerArea';\r\n\t\r\n\t$('div#contents').append(newAreaDiv);\r\n\t$('div#headerArea').append(newMenuDiv);\r\n}", "title": "" }, { "docid": "c3b2d681d5fde7d7279647ef0099acff", "score": "0.54194057", "text": "function MenuHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"q\" /* getUnhandledProps */])(MenuHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"p\" /* getElementType */])(MenuHeader, props);\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), __WEBPACK_IMPORTED_MODULE_4__lib__[\"c\" /* childrenUtils */].isNil(children) ? content : children);\n}", "title": "" }, { "docid": "1daeada581b86544e325abdd359c3a81", "score": "0.5417716", "text": "function dropDownMenu() {\n var dropdown = d3.select(\"#selDataset\");\n\n d3.json(\"../data/samples.json\").then((data) => {\n\n data.names.forEach((name) => {\n dropdown.append(\"option\").text(name).property(\"value\");\n });\n \n generatePlots(data.names[0]);\n generateInfo(data.names[0]);\n });\n}", "title": "" }, { "docid": "9cdb11ba8ecae416801d304161f6eb33", "score": "0.54140866", "text": "showHeader () {\r\n return this.title || this.$slots.header\r\n }", "title": "" }, { "docid": "557cbd44acf55d21ead6af491b5262b9", "score": "0.54134256", "text": "function createMenuHeader(id, className, parent, text) {\n let newEle = document.createElement(\"h5\");\n newEle.id = id;\n newEle.className = className;\n parent.appendChild(newEle);\n newEle.innerHTML = text;\n }", "title": "" }, { "docid": "cfac04fee15b85043bb18a38612b058d", "score": "0.5407277", "text": "set dropdownTitle(value) {\n this._title = value;\n }", "title": "" }, { "docid": "87395c277d1d597d2d9471335c7fa231", "score": "0.5404342", "text": "function MenuHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"s\" /* getUnhandledProps */])(MenuHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* getElementType */])(MenuHeader, props);\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(ElementType, __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_extends___default()({}, rest, {\n className: classes\n }), __WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children);\n}", "title": "" }, { "docid": "1c15f89fa2950cefa13b257ae59a6e4d", "score": "0.5403116", "text": "get headersContextMenu() {\n if (this.menupopup) {\n return this.menupopup.id;\n }\n return null;\n }", "title": "" }, { "docid": "931ca86062f58a23aa85776baf692a61", "score": "0.5399473", "text": "function PropertyPanelHeader({\n id, title, onClick, menuData,\n}) {\n const uId = useId(id);\n return (\n <Bar\n id={uId}\n padding=\"2x\"\n contentAlign=\"center\"\n left={{\n content: <Icon icon=\"directions\" size=\"lg\" onClick={onClick} />,\n width: \"min-content\",\n }}\n center={{\n content: <Title size=\"lg\" text={title} />,\n align: \"left\",\n }}\n right={{\n content: <Menu id={`${uId}-Menu`} data={menuData} position=\"bottomLeft\" />,\n width: \"min-content\",\n }}\n />\n );\n}", "title": "" }, { "docid": "f05d186d3e46c3f03a94297aaa8a6e9e", "score": "0.5396982", "text": "function buildMenu(select, dropdown) {\n select.children().each(function() {\n var option = $(this);\n if (option.attr('selected') === true) {\n dropdown.append('<li class=\"selected\"><a href=\"\">' + option.text() + '</a></li>');\n } else {\n dropdown.append('<li><a href=\"\">' + option.text() + '</a></li>');\n }\n });\n }", "title": "" }, { "docid": "7890b63ae83fb7c23e938398ed789dde", "score": "0.539693", "text": "function MenuHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"q\" /* getUnhandledProps */])(MenuHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"p\" /* getElementType */])(MenuHeader, props);\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "title": "" }, { "docid": "bd67138c7c07a048b2160f3d41c7adc2", "score": "0.5394809", "text": "function initMenuDropdowns()\n{\n var isNotConfluence = AJS.$(\"#com-atlassian-confluence\").length == 0;\n if (AJS.dropDown.Standard && isNotConfluence) {\n AJS.dropDown.Standard({\n selector:\".ajs-menu-item\",\n dropDown:\".ajs-drop-down\",\n trigger:\".trigger\",\n hideHandler: function() {\n AJS.$(\"#studio-header\").find(\".nav-dropdowns ajs-menu-item.active\").removeClass('active');\n },\n selectionHandler: function (e, selected) {\n selected.focus();\n }\n });\n AJS.$(\".ajs-drop-down\").mousedown(function (e) {\n e.stopPropagation();\n });\n AJS.$(\".trigger\").mousedown(function (e) {\n var $this = AJS.$(this);\n $this.parent(\".ajs-menu-item\").addClass(\"active\");\n if ($this.parent(\".ajs-menu-item.active\").size() > 0) {\n e.stopPropagation();\n }\n\n\n });\n } else {\n\n // Remove the active class for conlfuence dropdown\n AJS.$(document).bind(\"hideLayer\", function(event, type, target) {\n if (type === \"dropdown\" && target) {\n target.$.parent(\".ajs-menu-item\").removeClass(\"active\")\n }\n });\n var func = function () {\n var dropDownElement = AJS.$(\".ajs-drop-down\", this);\n dropDownElement[0].hidden = false;\n var dd = AJS.dropDown(dropDownElement)[0];\n // The studio doc theme adds a menu item that does not include a drop-down. Thus, we need to check that the\n // target drop-down element exists before trying to use it.\n if(dd) {\n dd.hide();\n\n //this will force all other triggers of menus on the page\n //to hide _this_ menu when clicked. Needed because conf dropdowns doesn't seem to fire the showLayer event\n AJS.$(\".trigger\").click(function() {\n if (AJS.dropDown.current == dd) {\n dd.hide();\n }\n });\n\n AJS.$(\".trigger\", this).click(function (e) {\n if (AJS.dropDown.current == dd) {\n dd.hide();\n } else {\n //close other ajs-drop-down menus that may be open before showing this one\n AJS.$(\".ajs-drop-down\").each(function() {\n var other = this;\n //a little more defensive in case somebody decides to (mis)use the same class\n other.isMenuBarOpened && other.isMenuBarOpened()\n && other.hide && other.hide();\n });\n dd.show();\n //Add the active class for conlfuence dropdown\n AJS.$(dd.$).parent(\".ajs-menu-item\").addClass(\"active\");\n }\n return false;\n });\n }\n };\n AJS.$(\".studio-header .nav-dropdowns .ajs-menu-item\").each(func);\n }\n}", "title": "" }, { "docid": "e38c3f4a7b82dff28af7e10a8d3e2312", "score": "0.53838795", "text": "function MenuHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n\n var classes = __WEBPACK_IMPORTED_MODULE_1_classnames___default()('header', className);\n var rest = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"r\" /* getUnhandledProps */])(MenuHeader, props);\n var ElementType = Object(__WEBPACK_IMPORTED_MODULE_4__lib__[\"q\" /* getElementType */])(MenuHeader, props);\n\n return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { className: classes }),\n __WEBPACK_IMPORTED_MODULE_4__lib__[\"d\" /* childrenUtils */].isNil(children) ? content : children\n );\n}", "title": "" }, { "docid": "e42180c290812b66fcf825ff12639abd", "score": "0.53808963", "text": "showDropdownUp() {\n const listItemRect = this.element.nativeElement.getBoundingClientRect();\n const dropdownTop = listItemRect.top;\n const dropdownHeightWithToggle = (1 + this.itemActions.length) * this.ACTION_ITEM_HEIGHT;\n const availableHeight = window.innerHeight;\n const dropdownDownFits = dropdownTop + dropdownHeightWithToggle <= availableHeight;\n this.dropdownUp = !dropdownDownFits;\n }", "title": "" }, { "docid": "9ac3c59fd4e8dc6530005519a484031e", "score": "0.53804874", "text": "function MenuHeader(props) {\n var children = props.children,\n className = props.className,\n content = props.content;\n var classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()('header', className);\n var rest = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getUnhandledProps\"])(MenuHeader, props);\n var ElementType = Object(_lib__WEBPACK_IMPORTED_MODULE_4__[\"getElementType\"])(MenuHeader, props);\n return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(ElementType, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, rest, {\n className: classes\n }), _lib__WEBPACK_IMPORTED_MODULE_4__[\"childrenUtils\"].isNil(children) ? content : children);\n}", "title": "" }, { "docid": "3bb5ef9cc8ec060d71f2f96891b4fdb8", "score": "0.53803664", "text": "function expandHeader() {\n menuClosed = false;\n $('.header .container').removeClass(HIDDEN_CLASS);\n}", "title": "" }, { "docid": "eb6fba8fb57f91dc2931b52089f90f2b", "score": "0.5379185", "text": "renderSearchHeader() {\n const { search, searchHeader } = this.props;\n if (search && searchHeader) {\n return (<Select.Components.Header key=\"searchHeader\">{searchHeader}</Select.Components.Header>);\n } else {\n return null;\n }\n }", "title": "" } ]
96f455e0399a0f69e6684732ac5ce8ab
Made for function restart button & Activating Buttons.
[ { "docid": "858fec0ad93aa6dd297e8604a48b553a", "score": "0.0", "text": "function reload(){\r\n // Clearing all fields.\r\n document.getElementById(\"ClientName\").innerHTML = \"\";\r\n document.getElementById(\"date1\").innerHTML = \"\";\r\n document.getElementById(\"modem\").innerHTML = \"\";\r\n document.getElementById(\"intprob\").innerHTML = \"\";\r\n document.getElementById(\"nunl\").innerHTML = \"\";\r\n document.getElementById(\"f5\").innerHTML = \"\";\r\n document.getElementById(\"dl1\").innerHTML = \"\";\r\n document.getElementById(\"dl2\").innerHTML = \"\";\r\n document.getElementById(\"ib\").innerHTML = \"\";\r\n document.getElementById(\"kto\").innerHTML = \"\";\r\n document.getElementById(\"brk\").innerHTML = \"\";\r\n document.getElementById(\"brk2\").innerHTML = \"\";\r\n document.getElementById(\"dl3\").innerHTML = \"\";\r\n document.getElementById(\"dl4\").innerHTML = \"\";\r\n document.getElementById(\"dl5\").innerHTML = \"\";\r\n document.getElementById(\"ibt\").innerHTML = \"\";\r\n document.getElementById(\"tvts\").innerHTML = \"\";\r\n document.getElementById(\"split\").innerHTML = \"\";\r\n document.getElementById(\"sbx\").innerHTML = \"\";\r\n document.getElementById(\"znd\").innerHTML = \"\";\r\n document.getElementById(\"dl6\").innerHTML = \"\";\r\n document.getElementById(\"dl7\").innerHTML = \"\";\r\n document.getElementById(\"dl8\").innerHTML = \"\";\r\n // These button.Onclicks do NOT require a () at the end.\r\n // With a () at the end the script will infinite restart.\r\n document.getElementById(\"lg0\").onclick = intro;\r\n document.getElementById(\"lg1\").onclick = nunl;\r\n document.getElementById(\"lg2\").onclick = kiestoon;\r\n document.getElementById(\"lg3\").onclick = tvts;\r\n document.getElementById(\"printbut\").onclick = print;\r\n document.getElementById(\"button1\").onclick = start;\r\n }", "title": "" } ]
[ { "docid": "65617608355d323c399c85d34e7f4b77", "score": "0.7471157", "text": "function prepareRestart() {\n var restartBtn = $(\"<button>\");\n\n // creates restart button\n restartBtn.attr(\"id\",\"restart-btn\");\n restartBtn.addClass(\"trivia-button col-xs-12 offset-sm-2 col-sm-4 offset-md-4 col-md-4\");\n restartBtn.html(\"<h2>Restart</h2>\");\n $(\"#restart-section\").append(restartBtn);\n\n restartBtn.on(\"click\", restartGame);\n }", "title": "" }, { "docid": "bef97db56e39b7b164b88cd5e919187f", "score": "0.7385907", "text": "function restartGameButton() {\n\t\tsetShowScore(false);\n\t\tsetScore(0);\n\t\tsetCurrentQuestion(0);\n\t}", "title": "" }, { "docid": "a14f898bd895fe1a1cac4312667e6fea", "score": "0.7043012", "text": "function handleRestartClick() {\n setBlackJack(false)\n setPlayerPoints(0)\n setDealerPoints(0)\n setIsInitialDraw(true)\n setDealerTurn(false)\n setCurrentBet(0)\n setDealerHand([])\n setPlayerHand([])\n setGameOver(false)\n setBetting(true)\n }", "title": "" }, { "docid": "6ee61fdcfb170b8882c2fd663e318bcc", "score": "0.70318174", "text": "function restartGame() {\n $(\"#restartBtn\").on(\"click\", function () {\n $(this).hide();\n startNew();\n })\n}", "title": "" }, { "docid": "79cbb4e17450f1676085d240e6454a57", "score": "0.703176", "text": "function activateRestart() {\n // Deactivate further play\n $(\"td\").off(\"click\");\n // Display restart button\n $(\"#restart\").removeClass(\"d-none\");\n}", "title": "" }, { "docid": "c022e22f2fe7874c1aac1a5a986414de", "score": "0.7017736", "text": "function restartButton() {\n $(\".restartButton\").click(event => {\n event.preventDefault();\n renderedGame = false;\n resetForms();\n resetScreen();\n $(\".endGame\").addClass(\"hidden\");\n })\n}", "title": "" }, { "docid": "0fd10e8319aa39380065b4e456f8826f", "score": "0.70107216", "text": "function restartButtonAction() {\n clearTimeout(firstThird);\n clearTimeout(secondThird);\n timerInstance.reset();\n startGame();\n restartButton.removeEventListener('click', restartButtonAction);\n }", "title": "" }, { "docid": "3f5a33a27fdafaefd341271437e751fd", "score": "0.69698685", "text": "function attachListenerOnRestartButton() {\n\t\tconst findRestartButton = document.querySelector(\"#restart\")\n\t\tfindRestartButton.addEventListener(\"click\", (e) => {\n\t\t\te.preventDefault()\n\t\t\tdocument.getElementById(\"second-view\").classList.add(\"hide\")\n\t\t\tdocument.getElementById(\"second-view\").classList.remove(\"show\")\n\t\t\tdocument.getElementById(\"first-view\").classList.remove(\"hide\")\n\t\t\tdocument.getElementById(\"first-view\").classList.add(\"show\")\n\t\t\tdocument.querySelector(\"html\").style.backgroundImage =\n\t\t\t\t\"url(BG_bananas2_main.png)\"\n\t\t\tinitializeJokes()\n\t\t})\n\t}", "title": "" }, { "docid": "66cd84a449effc9c746b68f0d0aad765", "score": "0.69670326", "text": "function restart(){\n $('.btsBox').on('click', '.restartButton', function (event) {\n event.preventDefault();\n resetStats();\n $('.altBox').hide();\n $('.quiz').show();\n });\n}", "title": "" }, { "docid": "66c4054c20385b97fdb5e0d66adc31d4", "score": "0.69650376", "text": "function restartBtn() {\n restartButton.onclick = function () {\n character.health = defaultHealth.character;\n monsterSmall.health = defaultHealth.monsterSmall;\n monsterBig.health = defaultHealth.monsterBig;\n //printHealth();\n strikeBtn.disabled = false;\n //restartButton.hidden = true;\n //message.innerText = \"\";\n //charInitiativeVal = strikeOrInit(1, 6);\n //monsInitiativeVal = strikeOrInit(1, 6);\n //checkInitiative();\n fightingHide();\n game();\n };\n}", "title": "" }, { "docid": "cca3a92baf6dc2f1ae953c26f2a8723f", "score": "0.6961981", "text": "initButtons(onlyRestart = false) {\n this.restartBtn.classList.add(\"clickable\");\n this.restartBtn.addEventListener(\"click\", this.initGameFunc);\n\n if (!onlyRestart) {\n this.solveBtn.classList.add(\"clickable\");\n this.solveBtn.addEventListener(\"click\", this.handleSolveFunc);\n }\n }", "title": "" }, { "docid": "14a4e47541ae7ee52965b02c8bb6bd0e", "score": "0.69437265", "text": "function onRestart() {\n // reset player values //\n playerArray[0].Bust = false;\n playerArray[1].Bust = false;\n playerArray[0].Stand = false;\n playerArray[1].Stand = false;\n // will clear everything on the gameboard //\n players.innerHTML = '';\n endRoundDiv.innerHTML = '';\n // reset i back to 0 for drawCards function //\n i = 0;\n // makes sure the buttons are displayed in case the round ended previously and buttons were hidden //\n displayBtns();\n // sets the restart btn text back to restart in case the round ended previously and the value said to play another round //\n restartBtn.value = \"restart\";\n // redraws cards for all players in session //\n drawCards();\n}", "title": "" }, { "docid": "b5b0380b74294f69e20853fcc0f4e377", "score": "0.6924001", "text": "_restart () {\n\t\tthis.targetColor = randCol();\n\t\tthis.$startBtn.style.display = \"none\";\n\t\tdocument.documentElement.style.setProperty(`--target-color`, `rgb(${Math.round(this.targetColor[0])}, ${Math.round(this.targetColor[1])}, ${Math.round(this.targetColor[2])})`);\n\t\tthis._startTimer();\n\t}", "title": "" }, { "docid": "879c1db615ee789373d5d4c3e659c0ed", "score": "0.69036704", "text": "function restart(){\n ChosenMode(mode);\n}", "title": "" }, { "docid": "08d4df1f55a72fc782316f4484c980d7", "score": "0.68794", "text": "function restart() {\n numeroPaso = 0;\n restartTimer(); //reinicia el timer\n gifCreado.remove();\n video.remove();\n texto1.className = \"textCrearSw\";\n p2.className = \"numInactive\";\n startBtn.click();\n}", "title": "" }, { "docid": "be8c0b1971c555306115fb444340acf5", "score": "0.68659705", "text": "function restart() {\n menus.start.active = true;\n menus.end.active = false;\n}", "title": "" }, { "docid": "cd3eeee5cefc6f1cc6c3a72ba85c33e0", "score": "0.68586415", "text": "function restartButton(event) {\n var restartID = event.target.id;\n var trueButtonPtr = document.getElementById('trueButton');\n var falseButtonPtr = document.getElementById('falseButton');\n\n //console.log('in Reset button');\n selectedQuest = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; //Reset variables to default\n totalQuest = questArr.length;;\n currentQuest = 0;\n p1Score = 0;\n p2Score = 0;\n playerTurn = 1;\n\n questionGen();\n displayQuestion();\n displayAnswer('Answer True or False');\n displayScore();\n trueButtonPtr.style.display = 'inline-block';\n falseButtonPtr.style.display = 'inline-block';\n\n initButton();\n}", "title": "" }, { "docid": "63eb1ffb3d52d520e25554fa7a00e412", "score": "0.68369", "text": "function restart() {\r\n initialize();\r\n display();\r\n}", "title": "" }, { "docid": "06c99f7a7b64f8e7506b6f7674b67526", "score": "0.68233097", "text": "function startAgain(){\n yes.addEventListener('click', () => {\n restart = true;\n if(restart){\n document.location.reload();\n }\n });\n // If restart = false : bye message\n no.addEventListener('click', () => {\n restart = false;\n decide.style.display = \"none\";\n reset.innerHTML = \"Bonne journée !\";\n });\n \n $(\"#containerRestart\").fadeIn()\n player1.style.display = \"none\";\n player2.style.display = \"none\";\n}", "title": "" }, { "docid": "5c9387c3a4555f6f24a0ee43a4d059f3", "score": "0.6818784", "text": "function Restart() {\n webgazer.clearData();\n ClearCalibration();\n PopUpInstruction();\n}", "title": "" }, { "docid": "270926d08f1b86bc826251dce3832054", "score": "0.67922384", "text": "function restart() {\n $(\".js-restart-btn\").on(\"click\", function(event) {\n $(\".final\").hide();\n $(\".quiz-part\").show();\n showQuiz();\n })\n}", "title": "" }, { "docid": "e26ac34023fc8125a5df9149ec906ade", "score": "0.6788466", "text": "function restart() {\n state = 'title';\n}", "title": "" }, { "docid": "932eaf64bdccbe0598a3ed9376e91dec", "score": "0.67818904", "text": "function relaunchQuiz() {\n $('main').on('click', '.restartButton', function (event) {\n location.reload();\n });\n }", "title": "" }, { "docid": "551abcc12c2213136d264173406f16b6", "score": "0.6765925", "text": "function restart() {\n clickData = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n clicks = 0;\n turn = 0;\n grid.innerHTML = \"\";\n button.textContent = \"\";\n createGrid();\n\n}", "title": "" }, { "docid": "c30f5854ea5c9bf7fc06d7bf6b82e656", "score": "0.6757545", "text": "function restart() {\n restartId.className = \"\";\n restartId.onclick = function () {\n character.health = defaultHealth.character;\n monsterSmall.health = defaultHealth.monsterSmall;\n monsterBig.health = defaultHealth.monsterBig;\n strikeBtn.disabled = false;\n hideAll();\n game();\n };\n}", "title": "" }, { "docid": "a8a9b4bcd27786a7d3881ec6405bbc73", "score": "0.6757536", "text": "function restartHandler() {\n\t$('.btn-restart').click( function( event ) {\n\t\tconsole.log('Calling restart handler');\n\t\treset( true );\n\t\t$('.card-result').slideUp();\n\t\t$('.search-quizzes').val('');\n\t\tdisplayQuizList();\n\t\t$('.card-search').slideDown();\n\t\tupdateScore();\n\t\t$('.question-number').text('_ / _');\n\t\t$('head').find('title').text( 'What Is... Trivia?' );\n\t\t$('header').find('h1').text( 'What Is... Trivia?' );\n\t\t$('head').find('link[class=\"quiz-theme\"]').remove();\n\t});\n}", "title": "" }, { "docid": "35aa10a25410ce3e44a5df2ea70d143f", "score": "0.6735064", "text": "function restartGame() {\n initVariables();\n updateUI();\n startGame();\n }", "title": "" }, { "docid": "0b12439c808ac34192b36791b9d2f01a", "score": "0.6728159", "text": "function restart() {\r\n\t\tcurrentQuestionPos = 0;\r\n\t\tcurrentQuestion = questions[0];\r\n\r\n\t\tcorrectAnswerNum = 0;\r\n\t\tnoAnswerNum = 0;\r\n\t\tincorrectAnswerNum = 0;\r\n\r\n $('#timer').empty();\r\n $('#timer').hide();\r\n\t\t$('#gameContainer').empty();\r\n\t\t$('#gameContainer').html(`<button id=\"start\"> Start Game </button>`);\r\n\t\t$('#start').off('click');\r\n $('#start').click(startGame);\r\n \r\n }", "title": "" }, { "docid": "ba86ac59f26ff88b253de7f53f5b0711", "score": "0.67215306", "text": "function restartGame(){\n started = false;\n gamePattern = [];\n userClickedPattern = [];\n $(\".start-button\").removeClass(\"hide\");\n}", "title": "" }, { "docid": "84ff06f00f9867546cb90427c301c50c", "score": "0.6716751", "text": "function restartQuiz () {\r\n $('main').on('click', '.restartButton', function (event) {\r\n location.reload();\r\n });\r\n }", "title": "" }, { "docid": "a2525b6f2c61a6149d56a4efbf0ba107", "score": "0.67133373", "text": "restart() {\n\t\tthis.setupBoard();\n\t}", "title": "" }, { "docid": "02a63e3a05b12f913ef6984d3f537e96", "score": "0.6700852", "text": "function restart() {\r\n stop();\r\n start();\r\n}", "title": "" }, { "docid": "fe205d4b79dc08a44dbb57ba94947c57", "score": "0.6691017", "text": "function RestartEngine_Click() \n {\t\n\t\tSetEngineControlState('Pending'); \n \n\t\tif(!IsEngineThreadLocked()){\n\t\t\t//go ahead and restart\n\t\t\tEnableEngineThreadLock();\n\t\t\tdocument.getElementById('HiddenEngineTask').value = \"Restart\";\t\t\t\n\t\t\tStopEngine(RestartEngine_Callback);\n }\n else{\n\t\t\t//another process is running, que up a restart task\n\t\t\tdocument.getElementById('HiddenEngineTask').value = \"BeginRestart\";\n }\n }", "title": "" }, { "docid": "db0e88b397e9e7fa0c9507a0d9cc49ea", "score": "0.6666722", "text": "function restart(){\n\tif(over == true) {\n\t\tinit();\n\t}\n}", "title": "" }, { "docid": "88027b539576f2205207bb1fb15341a0", "score": "0.66655713", "text": "function restart() {\n\tdocument.getElementById(\"on_or_off\").innerHTML = \"Pause\";\n\tclearTimeout(animationHandle);\n\trunning = false;\n\tinit();\n}", "title": "" }, { "docid": "c39aa8cee321df0ee89a8ab204ce78e3", "score": "0.6656777", "text": "function begin(){\n rematchButton.addClass('disabled');\n rematchButton.prop('disabled', true);\n noClickGuess();\n newButton.removeClass('disabled');\n}", "title": "" }, { "docid": "a60df8736884566fd2f2be637bae618e", "score": "0.66479963", "text": "createRestartButton(){\n\t\tlet existed = document.getElementById(\"restartButton\")\n\t\tif(existed != undefined){\n\t\t\texisted.style.visibility = \"visible\"\n\t\t\texisted.style.zIndex = 5\n\t\t\treturn existed\n\t\t}\n\n\t\tlet restartButton = document.createElement(\"div\")\n\t\trestartButton.setAttribute(\"class\",\"button\")\n\t\trestartButton.setAttribute(\"id\", \"restartButton\")\n\t\trestartButton.appendChild(document.createElement('p'))\n\t\trestartButton.style.zIndex = 5\n\n\t\tconst referenceNode = document.querySelector('#buttonsContainer');\n\t\treferenceNode.appendChild(restartButton)\n\n\t\trestartButton.onclick = () => {\n\t\t\tconsole.log(\"restart button click\")\n\t\t\tdocument.getElementsByTagName(\"canvas\")[0].classList.remove(\"blur\")\n\t\t\tthis.physics.pause(false)\n\t\t\tthis.gameOver = false\n\t\t\tthis.gameOverText.setVisible(false)\n\t\t\tthis.scene.restart();\n\t\t\tdocument.getElementById(\"overlay\").classList.add(\"display_none\")\n\t\t\tdocument.getElementById(\"gameOverImg\").classList.add(\"display_none\")\n\t\t}\n\n\t\treturn restartButton\n\t}", "title": "" }, { "docid": "2fc47b85dd19c75682da2bdde27031d8", "score": "0.66476643", "text": "restartGame() {\n this.robot.respawn();\n this.ui.changeTriggerButtonMode( \"start\" );\n }", "title": "" }, { "docid": "0e9f259a9ef05a1f52b80cdff17a11e1", "score": "0.6643447", "text": "function restart() {\n app_status = 2;\n user_performance = null;\n current_schedule = 0;\n}", "title": "" }, { "docid": "d15148e6575f63fd605d95018ecbbfce", "score": "0.6634946", "text": "function restartGame() {\n $(\"#restart-section, #score-board\").empty();\n $(\".trivia-choice-button\").remove();\n\n initGameRoutine();\n }", "title": "" }, { "docid": "2d2764ee2a3a884010fa6a84cabc05bf", "score": "0.66304624", "text": "function restartButton(){\n for(let card of cards){\n card.className= 'card';\n card.style.pointerEvents= \"auto\";\n createDeckOfCards();\n }\n\n for(let star of starsHTML){\n star.classList.remove('hide');\n }\n movesCount=0;\n movesHTML.innerHTML= '0';\n resetStopWatch();\n }", "title": "" }, { "docid": "940ba5ccfaab1562906f8e20928e0516", "score": "0.66264737", "text": "function restart() {\n $('#restartButton').click(function() {\n $('#game3').hide();\n $('#game1').delay(1000).fadeIn(100);\n thisQuestion;\n count = 30;\n right = 0;\n wrong = 0;\n clearInterval(counter);\n questionNumber = 0;\n num = 0;\n counter = setInterval(counting, 1000);\n keepPlaying = true;\n });\n }", "title": "" }, { "docid": "b089299a37bce52bfb8229f1d30e0a29", "score": "0.66179615", "text": "function restart() {\n N = 0;\n fixedCount = 0;\n bondCount = 0;\n changeN();\n dtSlider.value = 0.02;\n changedt();\n //reset();\t// redundant because it's called by changeN, right?\n resetStepsPerSec();\n if (!running) startButton.innerHTML = \"Start\";\n}", "title": "" }, { "docid": "59fa6f2cb92a58cb2ed7c9ec2d8676f7", "score": "0.65912586", "text": "function restartButton(){\n var ul=document.getElementById('itemList'), stuff=document.getElementById('stuff');\n while( ul.hasChildNodes() ){\n ul.removeChild(ul.lastChild);\n }\n while( stuff.hasChildNodes() ){\n stuff.removeChild(stuff.lastChild);\n }\n clicks=0;onOff=true;\n document.getElementById('timerDisplay').innerHTML=\"00:00\";\n document.getElementById(\"winDialogue\").style.display=\"none\";\n $('body').css('pointer-events', 'auto');\n $('.hint').css({\"filter\":\"none\",\"pointer-events\": \"auto\"});\n clearInterval(watch);\n timer(0,0);\n init();\n}", "title": "" }, { "docid": "3117de8b8b6cee65b539ebdffb7438c6", "score": "0.65889734", "text": "function handleRestart() {\n $(\"main\").on('click', '#restartQuiz', function (event) {\n event.preventDefault();\n store.quizStarted = false;\n store.questionNumber = 0;\n store.right = 0;\n store.wrong = 0\n renderQuizApp('startPage');\n });\n}", "title": "" }, { "docid": "f8eafb83224a024410c06da6a746bf72", "score": "0.6585315", "text": "function handleRestartButton() {\r\n $('.results').on('click', '.js-restart', function(event) {\r\n userScore = 0;\r\n questionNum = 0;\r\n $('.quiz-start').removeClass('hidden');\r\n $('.results').addClass('hidden');\r\n })\r\n}", "title": "" }, { "docid": "c442c9016d2cde3deb95e3dc8bd043be", "score": "0.6580511", "text": "restart() {\n this.state.song.stop(true);\n this.rekorder.stop();\n this.status = 'ready';\n // this.viz.color = '#eee'; // todo restart if replacing with preview during review\n this.time = 0;\n this.record_toggle();\n }", "title": "" }, { "docid": "2aa5e1d8aad952d98c0437a019ae153a", "score": "0.6577076", "text": "function initButton() {\n var restartButPtr = document.getElementById('restartButton'); //get ID for various buttons\n var trueButtonPtr = document.getElementById('trueButton');\n var falseButtonPtr = document.getElementById('falseButton');\n var nextButtonPtr = document.getElementById('nextButton');\n trueButtonPtr.addEventListener('click', getInput);\n falseButtonPtr.addEventListener('click', getInput);\n restartButPtr.addEventListener('click', restartButton);\n nextButtonPtr.addEventListener('click', nextQuest); // Fetch Next Question\n nextButtonPtr.style.display = 'none'; // Hide \"Next\" button\n}", "title": "" }, { "docid": "0df9805ce9a191f32ae69337e8d6f90e", "score": "0.6570171", "text": "function restart() {\n USERdestination = \"\";\n USERadjectives = [];\n USERitinerary = [];\n\n somethingChanged = true;\n\n loadHome();\n}", "title": "" }, { "docid": "5deaa74873934be16805306f7075bb55", "score": "0.65570927", "text": "restart() {\n\t\tthis.props.actions.stopSlides();\n\t\tthis.renderCachedAttacks();\n\t}", "title": "" }, { "docid": "757d47eefdbfea89acb2b347190ea2ee", "score": "0.6554073", "text": "processStartButton() {\n\t\tclearTimeout(this.timer);\n\t\tthis.timer = null;\n\t\tthis.game.switchScreens('play');\n\t}", "title": "" }, { "docid": "37d7e7fa309d327c97ddccb09c4fc04a", "score": "0.6547966", "text": "function restart() {\n sequenceInPlay = [];\n playerSequence = [];\n level = 1;\n\n $('.timer-countdown').hide();\n $('.instructions').show();\n $('.btn-new-game').show();\n $('.created-by').show();\n $('.btn').hide();\n $('.bonus').show();\n $('img').attr('src', 'images/project1-26.jpg');\n }", "title": "" }, { "docid": "9f1ec807ab9a7c4f12fdae6523539b4e", "score": "0.65425193", "text": "function restartQuiz() {\n $('main').on('click', '.restartButton', function (event) {\n location.reload();\n });\n}", "title": "" }, { "docid": "ee9c5074fefa18a91e7ab01dd0a0b82c", "score": "0.6515826", "text": "restart() {\n\t\tthis.setState({\n\t\t\tboard: Array(9).fill(null),\n\t\t\thistory: [],\n\t\t\tturn: \"X\"\n\t\t});\n\t}", "title": "" }, { "docid": "ffea81c5065fb134f11d5877537d803f", "score": "0.6509564", "text": "function restartTheGameButton() { \n\tcontrol.restartGame();\n\n\tmesg(\"STAY THERE AND RELAX \\n\\nTHE GAME WILL RESTART NOW!\");\n}", "title": "" }, { "docid": "13376a297c1313d8a8cd4bffc73dd365", "score": "0.6505249", "text": "function restartQuiz() {\n $('body').on('click','#restart', (event) => {\n renderAQuestion();\n });\n }", "title": "" }, { "docid": "a0ec6153ac37b84266fe6947c5b60d6a", "score": "0.65034586", "text": "function restartButton() {\n const restartGame = document.querySelector('.restart');\n restartGame.onclick = function() {\n document.location.reload();\n };\n}", "title": "" }, { "docid": "fe7f516f91ba536469f37f16f5b69b6d", "score": "0.6500016", "text": "function ReloadEngine_Click() \n {\n\t\tSetEngineControlState('Pending'); \n \n\t\tif(!IsEngineThreadLocked()){\n\t\t\t//go ahead and restart\n\t\t\tEnableEngineThreadLock();\n\t\t\tdocument.getElementById('HiddenEngineTask').value = \"Reload\";\t\n\n\t\t\tReloadEngine(ReloadEngine_Callback);\n }\n else{\n\t\t\t//another process is running, que up a restart task\n\t\t\tdocument.getElementById('HiddenEngineTask').value = \"BeginReload\";\n }\n }", "title": "" }, { "docid": "479a4828a137c43af9356df5d6147bbc", "score": "0.6489855", "text": "function restart () {\n\t$('.restart').on('click', function reload (){\n\t\tnumber = 0; \n\t\tnewGrid();\n\t\t$('.moves').html(`<span>${number.valueOf()}</span>`);\n\t\tmatch = [];\n\t})\n}", "title": "" }, { "docid": "9aa295271d228ebad64d293682750293", "score": "0.6485616", "text": "function restart() {\n\n _.each($scope.activityData.questions, function (question, key, value) {\n $scope.activityData.questions[key].userAnswer = \"\";\n $scope.activityData.questions[key].userAnswerLabel = \"\";\n $scope.questionText[key].text = userChoice;\n $scope.answerText[key].visible = true;\n $scope.questionText[key].color = \"blue\";\n $scope.questionTextWrong[key].text = \"\";\n $scope.questionTextWrong[key].visible = false;\n $scope.questionText[key].x = $scope.underlinedText[key].getTransformedBounds().x + $scope.underlinedText[key].getTransformedBounds().width / 2 - $scope.questionText[key].getTransformedBounds().width / 2;\n });\n\n $scope.stage.removeAllEventListeners();\n $scope.stage.removeAllChildren();\n $scope.stage.addChild($scope.background);\n\n init();\n\n $scope.nextButton.gotoAndPlay(\"normal\");\n $scope.checkButton.alpha = 1;\n $scope.checkButton.gotoAndPlay(\"normal\");\n $scope.activityData.score = 0;\n $scope.resultsButton.visible = false;\n $scope.scoreText.text = \"Score: \" + \"0\" + \" / \" + $scope.activityData.questions.length;\n $scope.activityData.newGame = true;\n\n window.localStorage.setItem(activityNameInLocalStorage, JSON.stringify($scope.activityData));\n }", "title": "" }, { "docid": "6152d07aef0690b5b6bbe3b927f86b54", "score": "0.64835423", "text": "function restartFunc() {\n\tfinishGame();\n\tgenerateShuffle();\n\tfor (var i = 0; i < 12; i++) {\n\t\tturnCardFuncBuilder(i);\n\t}\n\t\n\tfor (var i = 0; i < 12; i++) {\n\t\tturnAndCheckFuncBuilder(i);\n\t}\n\tlistenClicks();\n}", "title": "" }, { "docid": "02dc76e3b484f456fe674f27cac8b8a5", "score": "0.648206", "text": "function restart() {\n result.innerHTML = 'Rather than just the usual paragraph where I tell you a little about me, how about we play a game? I promise it\\'ll be fun!';\n startButton.style.display = 'block';\n playAgain.style.display = 'none';\n userAnswers = [];\n document.getElementById('topTen').classList.add('hideTen');\n document.getElementById('previousCompanies').classList.add('hideTen');\n}", "title": "" }, { "docid": "92d8dbc547d0a223a0f2f07db5d5d28a", "score": "0.64761454", "text": "function restart() {\n\n // Initialize contents and visibility of HTML-Elements\n log_elt.innerHTML = \"\";\n btn_connect_elt.disabled = false;\n btn_disconnect_elt.disabled = true;\n\n // Initialize global variables\n mediaStream = null;\n peerConnection = null;\n connectionState = { state : \"disconnected\" };\n sourceIceCandidates = [];\n}", "title": "" }, { "docid": "10ed8b2f5aab59f2b51931332f086422", "score": "0.646678", "text": "function restartQuiz() {\n $('main').on('click', '.restartButton', function (event) {\n location.reload();\n });\n}", "title": "" }, { "docid": "b10bc715d8b6c645450cef90371373fb", "score": "0.64644605", "text": "function reStart() {\n\n\t\t// Reset the Qnum back to the beginning\n\t\tQnum = -1;\n\t\t// Start the quiz off just as we did at the start calling the nextQuestion() function\n\t\tnextQuestion();\n\t\t// We need to see the answers again\n\t\tanswers.show();\n\t\t// We don't want to see a reset button here\n\t\trestart.hide();\n\t\t// We do want to see the question number here\n\t\tquestionNumber.show();\n\t\t//Show the lifeline buttons\n\t\tlifeLine.show();\n\t\t// Show the button\n\t\tfiftyFifty.show();\n\t\t// Show the button\n\t\tfreePass.show();\n\n\t}", "title": "" }, { "docid": "40db8bfc42fa1824da576ad887fb22d8", "score": "0.6463985", "text": "function Restart()\n\t{\n\t\t//Fade the screen\n\t\tStartCoroutine(FadeScreen(0.4f, 1.0f));\n\t\t//If the restart is called from the pause menu\n\t\tif (showPause)\n\t\t{\n\t\t\t//Hide the pause menu\n\t\t\tshowPause = false;\n\t\t\tStartCoroutine(MoveMenu(pauseElements[1].transform, 0, 59, 0.45f, false));\n\t\t\tStartCoroutine(MoveMenu(pauseElements[2].transform, 0, -60, 0.45f, false));\n\t\t}\n\t\t//Else, it is called from the finish menu\n\t\telse\n\t\t{\n\t\t\t//Hide the finish menu\n\t\t\tStartCoroutine(MoveMenu(finishMenu.transform, 0, -60, 0.55f, false));\n\t\t}\n\t\t\n\t\t//Wait for the caller menu to disappear, and fade the screen\n\t\tyield WaitForSeconds(0.5f);\n\t\tStartCoroutine(FadeScreen(0.4f, 0.0f));\n\t\t\n\t\t//Disable the logo in the hanger, and restart the game\n\t\tEnableDisable(mainMenuElements[0], false);\n\t\tLevelManagerJS.Instance().Restart();\n\t}", "title": "" }, { "docid": "09a61d0a5ad6161acbb44ee23179c9ab", "score": "0.64623153", "text": "function restartWin() {\n\tmodalRestartBtn.addEventListener('click', function() {\n\t\tmodalWinContainer.style.display = 'none';\n\t\trestartModal();\n\t});\n}", "title": "" }, { "docid": "9241fe9de934501d2eb51ecc0cd731e9", "score": "0.64487976", "text": "function startButtonPressed() {\n resetGame();\n }", "title": "" }, { "docid": "a8b19979d9a6e2eb4916458dc0cb2b77", "score": "0.64418393", "text": "function restart() {\n game.state.start('default');\n }", "title": "" }, { "docid": "c56ac5d184a7db0ac199d068e1868fd8", "score": "0.6429396", "text": "function quitPrg(){\n $('#btnRepeat').removeClass(\"btn btn-info disabled\").addClass(\"btn btn-info \");\n $('#btnRepeatOne').removeClass(\"btn btn-info\").addClass(\"btn btn-info disabled\");\n $('#btnQuit').removeClass(\"btn btn-info\").addClass(\"btn btn-info disabled\");\n }", "title": "" }, { "docid": "3ef3d0d52e080872fe7e998d95d793a3", "score": "0.6429253", "text": "function handleRestart() {\n gameActive = true;\n statusDisplay.style.color=\"black\";\n currentPlayer = 'X';\n gameState = [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"];\n statusDisplay.innerHTML = playerturnmessage();\n cells.forEach(cell => {\n return cell.innerHTML = \"\"\n });\n cells.forEach(cell => {\n return cell.style.backgroundColor=\"transparent\";\n \n });\n \n \n}", "title": "" }, { "docid": "0ce34c704c52606e417f0031262bd96d", "score": "0.64254504", "text": "function restartQuiz() {\n $('body').on('click','#restart', (event) => {\n startQuiz();\n });\n}", "title": "" }, { "docid": "577475526f23d6bd654168172fddd82c", "score": "0.64210486", "text": "function Restart() {\n Abort.call(this);\n this.action = \"restart\";\n}", "title": "" }, { "docid": "526cfd10d8a1add3af40012de88e75ad", "score": "0.641454", "text": "function restart (g) {\n g.rstBtn.addEventListener('click', function () {\n g.num.innerHTML = 0;\n for (let i = 0; i < g.num.length; i++) {\n g.num = 0;\n }\n\n for (let i = 0; i < g.s.length; i++) {\n g.s[i].style.color = 'black';\n }\n for (let k = 0; k < li.length; k++) {\n li[k].className = 'card';\n }\n\n g.arr = [];\n g.arr2 = [];\n g.update = [];\n g.arrCrds = [];\n g.pairs = [];\n cards(game);\n });\n}", "title": "" }, { "docid": "2de6ba98578ca2b7b4c13ef8fb264cbf", "score": "0.6413512", "text": "function resetBtnTrigger(){\n const resetBtn = document.querySelector(\".restart\");\n resetBtn.addEventListener(\"click\", resetGame);\n}", "title": "" }, { "docid": "59e16daad0197961235953cf9e0ea387", "score": "0.64074165", "text": "function reStartPage(){\n\t\t\t//Empty divs\n\n\t\t\t$(\"#timer, #imageCheck, #correctAnswer\").empty();\n\t\t\t// Display the correct answer for the very last question\n\t\t\t$(\"#reStartCorrect\").html(\"Correct Answer: \" + questionSet[count -1].answers[questionSet[count -1].correctAnswerNdx].answer);\n\t\t\t\n\t\t\t// Empty the question and answer choices\n\t\t\t$(\"#question, .ansChoice\").empty();\n\n\t\t\t// Display Total Score\n\t\t\t$(\"#totalScore\").html(\"Total Score\");\n\n\t\t\t\n\t\t\t//Display the correct score\n\t\t\t$(\"#correctScore\").html(\"<h2>Correct : \" + correct + \"</h2>\");\n\t\t\t\n\t\t\t//Display the wrong score\n\t\t\t$(\"#wrongScore\").html(\"<h2>Wrong : \" + wrong + \"</h2>\");\n\n\t\t\t// creat vairable for the restart button\n\t\t\tvar reStartButton = $(\"<button>\");\n\t\t\treStartButton.html(\"START OVER\");\n\t\t\t// target restear div and display the button\n\t\t\t$(\"#reStart\").append(reStartButton);\n\t\t\t// when the button is click, call the reset function\n\t\t\treStartButton.on(\"click\", reset);\n\n\t} // reStartPage function", "title": "" }, { "docid": "22f76752c4ff14a79b3105d580e52e3a", "score": "0.6394569", "text": "function restartGame() {\n cardsWrapper.innerHTML = '';\n selectedCardsWrapper.innerHTML = '';\n cardsWrapper.classList.remove('hidden');\n\n const btnLetsStart = document.createElement('button');\n btnLetsStart.innerHTML = 'Let\\'s get started';\n btnLetsStart.addEventListener('click', startGame); /* eslint-disable-line */\n btnLetsStart.classList.add('btn', 'btn-lg', 'btn-secondary', 'mx-2');\n\n btnWrapper.innerHTML = '';\n btnWrapper.append(btnLetsStart);\n}", "title": "" }, { "docid": "556dae67db90c22de1c9d5ad2af22af1", "score": "0.6390188", "text": "function restartQuiz(e) {\r\n if(e.target.matches('button')) {\r\n //reset array index and choice\r\n currentQuestion = 0;\r\n choice = [];\r\n //Reload quiz to the start\r\n location.reload();\r\n }\r\n\r\n}", "title": "" }, { "docid": "0188db12ada6a6549a1fb9dd980fb1d0", "score": "0.6388569", "text": "function onRestart(event){\n inGame = true\n state = state = [\n [\"\", \"\", \"\"],\n [\"\", \"\", \"\"],\n [\"\", \"\", \"\"],\n ]\n moveHistory = []\n previous.style.visibility = \"hidden\"\n next.style.visibility = \"hidden\"\n turnDiv.classList.remove('hide')\n changeTurn()\n cells.forEach(cell => {\n cell.innerHTML = \"\"\n cell.style.cursor = 'pointer'\n cell.style.animation = 'none'\n })\n}", "title": "" }, { "docid": "153cbecf7ea1d017df22f3bc691f531a", "score": "0.63860196", "text": "function restartGame() {\n let restartGame = document.getElementsByTagName('button');\n for (let i = 0; i < restartGame.length; i++) {\n restartGame[i].addEventListener(\"click\", function() {\n location.reload(false);\n });\n }\n}", "title": "" }, { "docid": "787ce385c3c1fe0b014efee7d39d3494", "score": "0.6379591", "text": "function restart(){\n\tdocument.getElementById(\"startGraphic\").style.visibility = \"initial\";\n\tbat.style.visibility = \"initial\";\n\tendCard.style.visibility = \"hidden\";\n\tdocument.onclick = start;\n}", "title": "" }, { "docid": "287559b238eb794857009816716d92e1", "score": "0.6370206", "text": "function restart() {\n currentCount = 0;\n $(\"#currentCt\").text(currentCount);\n targetValue.getNewVal();\n targetValue.appendVal();\n ruby.getNewVal();\n sapphire.getNewVal();\n emerald.getNewVal();\n opal.getNewVal();\n}", "title": "" }, { "docid": "7fbf84c7058132e90d5e7eeb3b0b45dc", "score": "0.63677484", "text": "function w3_restart_cb()\n{\n\tw3_show_block('id-restart');\n}", "title": "" }, { "docid": "d3ad8a7af8f8f1b6326182ecb8b33eba", "score": "0.63675874", "text": "function onGUI_RestartGame() {\n // GUI\n $(\".dorota-gui-zone\").attr('hidden', 'true');\n $(\".dorota-button-restart\").attr('src', 'imgs/dorota-button-ready-normal.png');\n //----------------------------------------------------------\n // GAME\n countTime = 0; // Contador de tiempo\n $(\"#dorota-count-time-game\").text(countTime);\n playerLife = true; // Indica si el Player esta vivo o muerto\n playerPosition = 40; // Indica la posicion en porcentaje del Player en lo alto (TOP) (Movimiento Vertical)\n playerDirectionMov = 0; // Indica la direccion hacia donde se mueve el Player (1 = Abajo, -1 = Arriba)\n $(\".dorota-player\").css({ top: playerPosition + '%' }); // Actualizar la posicion del Player en porcentaje\n $(\".dorota-player-shadow\").css({ top: playerPosition + '%' }); // Actualizar la posicion de la Sombra del Player en porcentaje\n\n\n obstaclesPositionArray = [ // Posicion en Porcentaje de los obstaculos (Movimiento Horizontal)\n 100, 100, 100, 100, 100, 100, 100, 100, 100, 100\n ];\n obstaclesGoAutorizeArray = [ // Autorizacion para Mover el Obstaculo\n false, false, false, false, false, false, false, false, false, false\n ];\n for (var i = 0; i < obstaclesArray.length; i++) {\n // Actualizar posicion del Obstaculo\n $(\"#\" + obstaclesArray[i].id).css({ left: obstaclesPositionArray[i] + '%' });\n }\n numberNameSprite = 1; // Numero de Sprite\n $(\"img.dorota-player\").removeAttr('hidden'); // Mostrar Player\n $(\"img.dorota-player\").attr('src', 'imgs/dorota-player.png');\n $(\"img.dorota-player-shadow\").removeAttr('hidden'); // Mostrar Sobra del Player\n}", "title": "" }, { "docid": "05e4a4609e7ece9eaf53f101f694edec", "score": "0.6365692", "text": "function Restart(){\n document.getElementById(\"Accuracy\").innerHTML = \"<a>Not yet Calibrated</a>\";\n ClearCalibration();\n PopUpInstruction();\n}", "title": "" }, { "docid": "21d2056e8e1d9b829bf300e7c91f7efc", "score": "0.6359803", "text": "function restartQuiz() {\n $('.restart-button').click(function(event){\n $('.final-page').addClass(\"hidden\");\n $('.start-page').removeClass('hidden');\n questNum = 0;\n numRight = 0;\n $('.questions-done').text(\"Question 0/10\");\n $('.current-score').text(\"Score: 0\")\n })\n}", "title": "" }, { "docid": "a2ce888dad59ae8999ab9928b03402ca", "score": "0.6358117", "text": "restart(){\n\t\tthis.setState(this.createInitialGameState());\n\t\tclearInterval(this.timeInterval);\t\t\n\t\tclearInterval(this.gameInterval);\n\t\tthis.startIntervals();\n\t}", "title": "" }, { "docid": "a7467fe8dd63b5e543a2739b045432a6", "score": "0.6345579", "text": "function restartQuiz() {\n $('.innerBox').on('click', '.restartButton', function (event) {\n event.preventDefault();\n resetStats();\n $('.altBox').hide();\n $('.startQuiz').show();\n });\n}", "title": "" }, { "docid": "17caf5842286fa342c9e50da2a9d0eac", "score": "0.63374233", "text": "restart() {\n const btn = document.getElementById('btn');\n btn.innerText = 'Reiniciar';\n btn.addEventListener('click', () => {\n this.board.fill('');\n this.draw()\n this.gameOver = false;\n const p2 = document.querySelector('#msg2');\n const text = document.querySelector('#text');\n setTimeout(() => {\n p2.innerHTML = '';\n text.innerHTML = '';\n }, 50);\n\n });\n\n }", "title": "" }, { "docid": "83f0c92ead07e71e647ff38acb3141c1", "score": "0.63258964", "text": "function restart()\n{\n\treset();\n\t$('.btn-xl').hide();\n\t$('.btn-primary').show();\n\t$('.results').empty();\n\t\n\tconsole.log(correct,incorrect,unanswered)\n}", "title": "" }, { "docid": "84530c2b2a868894df91046857dd2b1a", "score": "0.632012", "text": "function restartG() {\n let rebutton =document.querySelector('.btn');\n rebutton.addEventListener('click', function(e) {\n /*let reSquares = document.querySelectorAll('.square');\n reSquares.forEach(function(e){\n \n e.classList.remove('square.X');\n e.classList.remove('square.O');\n e.classList.remove('hover.O');\n e.innerText=null;\n //check\n document.getElementById('status').classList.remove('status.you-won');\n\n });*/\n location.reload();\n });}", "title": "" }, { "docid": "582f22b80f17dcfc990c5b0e34837de1", "score": "0.6318884", "text": "function Restart(){\n document.getElementById(\"Accuracy\").innerHTML = \"<a>Not yet Calibrated</a>\";\n webgazer.clearData();\n ClearCalibration();\n PopUpInstruction();\n}", "title": "" }, { "docid": "58d1e24c6b1d7c60f7657b7c9a905850", "score": "0.6318739", "text": "reset() {\n this._listenHotKey();\n\n if (this.options.startButton) {\n this._attachStartButton();\n }\n }", "title": "" }, { "docid": "fd847007cb85415d1b9ab81c51fd6405", "score": "0.6305562", "text": "restart() {\n this.begin$();\n this.app.setCursor(this.cursor);\n }", "title": "" }, { "docid": "c046711074127d3ad8884d547014d1a8", "score": "0.6305343", "text": "function restartBrew() {\n // Cannot restart if a timer is already running\n if (vm.timerRunning) {\n return;\n }\n\n // Hide stars, \"Add Note\", brew note form, and \"Restart Brew\"\n vm.showStars = false;\n $(\"a[href].add-brew-note\").addClass(\"hidden\");\n $(\".brew-form\").addClass(\"hidden\");\n $(\".brew-step--restart\").addClass(\"hidden\");\n\n // Hide the timeline (hidden during countdown)\n $(`.time-${vm.countdownVal}`).removeClass(\"timeline\");\n\n // Show the \"RESET\" button\n $(\"a[href].reset-brew\").removeClass(\"hidden\");\n\n // Reset all steps to be inactive\n $(\".brew-step\").addClass(\"brew-step--inactive\");\n\n // Show the countdown step and its timer\n $(\".brew-step--countdown\").removeClass(\"brew-step--inactive\");\n $(\".brew-step--countdown\").removeClass(\"hidden\");\n $(\"timer.delay\").removeClass(\"hidden\");\n\n // Start the countdown timer\n $scope.$broadcast('startTimer', 'countdown');\n }", "title": "" }, { "docid": "0c1e883a5b1e523a6cb589b446aacca0", "score": "0.6300643", "text": "function transition_buttons(cache_name) {\n\n // FETCH & INSTANTIATE BUTTONS MODULE\n var Buttons = require('./buttons.js');\n var buttons = new Buttons(cache_name);\n\n // TURN OPACITY TO ZERO\n $('#left').css('opacity', '0');\n $('#right').css('opacity', '0');\n\n // SLEEP FOR 1.8s\n sleep(180).then(() => {\n\n // RECALIBRATE BUTTONS\n buttons.recalibrate();\n\n // TURN OPACITY TO MAX AGAIN\n $('#left').css('opacity', '1');\n $('#right').css('opacity', '1');\n });\n}", "title": "" }, { "docid": "5fa291ecd31fd728be4e825a38671a63", "score": "0.62998533", "text": "function restart() {\n clearTimeout(playbackTimerId);\n clearTimeout(btntiempo);\n moveNum = 0;\n movimientos = [];\n inputTimeout = 2000;\n duracion = 1000;\n $('.b').removeClass('selected');\n $('.game-over').hide();\n $('.Puntaje').text('Record: ' + localStorage.simonRecord);\n\n volver = true;\n addMove();\n}", "title": "" }, { "docid": "18a099fcffba08bb3cd6ece35dd5dc61", "score": "0.6295959", "text": "function Restart() {\n // show dialog\n var dialog = document.getElementById(\"help\");\n dialog.style.display = 'none';\n document.getElementById(\"Accuracy\").innerHTML = \"<a>Not yet Calibrated</a>\";\n webgazer.clearData();\n ClearCalibration();\n document.getElementById(webgazer.params.videoElementId).style.display = '';\n document.getElementById(webgazer.params.faceOverlayId).style.display = '';\n document.getElementById(webgazer.params.faceFeedbackBoxId).style.display = '';\n PopUpInstruction();\n}", "title": "" }, { "docid": "9a7656c599ed584548aa27fb1afc2089", "score": "0.6291152", "text": "function btnincre() {}", "title": "" }, { "docid": "fdf6b431bf46ae3e9b61e96c95b1c568", "score": "0.6282351", "text": "function initNewGame() {\n // updateButtons(1);\n window.location.reload()\n}", "title": "" }, { "docid": "383df2a8dbf26e1b100da96115e80de3", "score": "0.62805843", "text": "function buildRestartButton() {\n var restratButton = $(\"<button>\");\n restratButton.text(\"Restart\");\n restratButton.addClass(\"restart\") \n $(\"#restart\").append(restratButton);\n}", "title": "" } ]
727601f59cad870d60ce7e4ed905c38f
helper function to apply thousandSeparator
[ { "docid": "1ac217fb90ba0a2d5744ccd6071bfd68", "score": "0.6210714", "text": "function formatNumber(str, thousandsSeparator, form) {\n if (isNaN(parseFloat(str))) {\n return \"-\";\n }\n var format = d3.format(form);\n if (thousandsSeparator === \".\") {\n // German convention\n if (+str % 1 !== 0) {\n return format(str).split(\".\").join(\",\");\n } else {\n var newStr = format(str).split(\",\").join(\".\");\n return newStr;\n }\n } else {\n // US convention\n if (+str % 1 !== 0) {\n return format(str);\n } else {\n return format(str);\n }\n }\n }", "title": "" } ]
[ { "docid": "8dc81378c03650e637055c4937a35923", "score": "0.83683413", "text": "function thousandSeparator(x) {\n if (x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n }\n}", "title": "" }, { "docid": "c38dae7bee0409b7088f95c32bf32947", "score": "0.82219857", "text": "function addThousandSeparator(num) {\n var num = num.toString();\n var result = '';\n while(num.length > 3) {\n result = \",\" + num.slice(-3) + result;\n num = num.slice(0, num.length-3);\n }\n if(num) {\n result = num + result;\n }\n return result;\n }", "title": "" }, { "docid": "799f3d17a741e066edcd3d4572a1bfdb", "score": "0.81962687", "text": "function thousandSeparator (num) {\n if (!num || typeof num !== 'number') return\n\n let numpad = num.toString().split('.')\n numpad[0] = numpad[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")\n\n return numpad.join('.')\n}", "title": "" }, { "docid": "14477f1c03ce1e7053ae43ff490024d5", "score": "0.8186201", "text": "function thousands_separators (number) {\n if (number < 1000) {\n return number;\n } else {\n return number.toLocaleString('en');\n }\n }", "title": "" }, { "docid": "67a84fe6b856f7dc47b938d2a26d11fb", "score": "0.7790141", "text": "function thousands_separators(num) {\n num=Number(num);\n num = num.toFixed(2); //toFixed() convert num to str\n //num = num.toString();\n var re = /\\B(?=(\\d{3})+(?!\\d))/g;\n num = num.replace(re, \",\");\n return num;\n }", "title": "" }, { "docid": "52f6053ef90999d6ec75f2508394c8bd", "score": "0.73613125", "text": "function getSepThousands(number) {\n if (number === undefined) {\n return;\n }\n\n var decimal = number.toString().split('.')[1];\n decimal = decimal ? decimal : '00';\n decimal = decimal.charAt(1) ? decimal : decimal + '0';\n decimal = decimal.split(\"\").reverse().join(\"\");\n number = number.toString().split('.')[0];\n var string = number.toString().split(\"\").reverse().join(\"\");\n var new_string = \"\";\n for (var i = 0; i < string.length; i++) {\n new_string += (i + 1) % 3 === 0 && i < string.length - 1 ? string[i] + '.' : string[i];\n }\n new_string = decimal + ',' + new_string;\n return new_string.split(\"\").reverse().join(\"\");\n }", "title": "" }, { "docid": "842ff0a545e13adca6f251a94c4c5fbf", "score": "0.73395395", "text": "function addThousandsSeparators(params) {\n const test = /[0-9]{3}/g;\n const test1 = /^[0-9]{1}/g;\n params = params + '';\n const tempResult = params.match(test1);\n params = params.slice(1);\n const tempSecondResult = params.match(test);\n const result = tempResult.concat(tempSecondResult).join(',');\n return result;\n}", "title": "" }, { "docid": "9b512acd994469edf8d3459b3cbd14a3", "score": "0.7213535", "text": "function add_thousands_separators(s) {\r\n let num_parts = s.toString().split(\".\");\r\n num_parts[0] = num_parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n return num_parts.join(\".\");\r\n}", "title": "" }, { "docid": "50a42ac83a2000f680d4f2a0092f6b67", "score": "0.7186731", "text": "function format_thousands(n, sep)\n {\n if(n < 0)\n {\n return \"-\" + format_thousands(-n, sep);\n }\n\n if(isNaN(n) || !isFinite(n) || n >= 1e21)\n {\n return n + \"\";\n }\n\n function format(str)\n {\n if(str.length < 3)\n {\n return str;\n }\n else\n {\n return format(str.slice(0, -3)) + sep + str.slice(-3);\n }\n }\n\n return format(n + \"\");\n }", "title": "" }, { "docid": "1296f7c39897542e5a24c90e297f5108", "score": "0.6918424", "text": "function number_format(number, decPoint, thousandsSep) {\n if(!isNaN(parseFloat(number))) {\n decPoint = (typeof decPoint !== 'undefined') ? decPoint : '.';\n thousandsSep = (typeof thousandsSep !== 'undefined') ? thousandsSep : '';\n\n // Convert decimal point\n var original_num = number;\n number = number.toString().replace('.', decPoint);\n var formatedNumber = '';\n var integer = Math.floor(original_num).toString();\n\n // Loop through each letters\n for(var i = 0; i < number.length; i++) {\n\n // Stop after hitting a comma\n if(number.charAt(i) == decPoint) {\n // Add the rest of the string\n formatedNumber += number.slice(i);\n break;\n }\n\n // Add thousand separator\n if(i != 0 && (i - (integer.length%3)) % 3 == 0) {\n formatedNumber += thousandsSep;\n }\n\n // Add the digit\n formatedNumber += number.charAt(i);\n }\n\n\n return formatedNumber;\n } else {\n console.warn('QCECO : You cannot set the number format of a ' + typeof number);\n return number;\n }\n }", "title": "" }, { "docid": "7d36c844f3337001137079decbdd8b4c", "score": "0.6912345", "text": "function toThousands (num) {\n var num = (num || 0).toString(), result = '';\n while (num.length > 3) {\n result = ',' + num.slice(-3) + result;\n num = num.slice(0, num.length - 3);\n }\n if (num) {\n result = num + result;\n }\n return result;\n }", "title": "" }, { "docid": "d5a782465b5beda071124e0f1c7e9a63", "score": "0.68691385", "text": "function addNumericalSeparator(val) {\n let res = '';\n let i = val.length;\n const start = val[0] === '-' ? 1 : 0;\n for (; i >= start + 4; i -= 3)\n res = `_${val.slice(i - 3, i)}${res}`;\n return `${val.slice(0, i)}${res}`;\n}", "title": "" }, { "docid": "7acbce421024c93890a5e1e8993ca358", "score": "0.68511385", "text": "function convertToThousand(num) {\n switch(num) {\n case 1: return \"M\";\n case 2: return \"MM\";\n case 3: return \"MMM\";\n default: return \"\"; \n }\n}", "title": "" }, { "docid": "4e58729f6b1ed9b02d05169d3f4bdc28", "score": "0.67989147", "text": "function number_format( number, decimals, dec_point, thousands_sep ) {\n var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;\n var d = dec_point == undefined ? \",\" : dec_point;\n var t = thousands_sep == undefined ? \".\" : thousands_sep, s = n < 0 ? \"-\" : \"\";\n var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + \"\", j = (j = i.length) > 3 ? j % 3 : 0;\n return s + (j ? i.substr(0, j) + t : \"\") + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : \"\");\n}", "title": "" }, { "docid": "7e72f3288983c647c48e10c59b6d38c6", "score": "0.6780093", "text": "function thousand(number){\n\t\t\t\tif(number.length==4){\n\t\t\t\t\tsubnum=number[1]+number[2]+number[3];\n\t\t\t\t\tif(number[0]<1){\n\t\t\t\t\t\tunit[1]=\"\";\n\t\t\t\t\t}\n\t\t\t\t\tword= first[number[0]]+\" \"+unit[1]+\" \"+hundred(subnum);\n\t\t\t\t\treturn word;\n\t\t\t\t}\n\t\t\t\telse if(number.length==5){\n\t\t\t\t\tsubnum=number[2]+number[3]+number[4];\n\t\t\t\t\tif (number[0]!='0') {\n\t\t\t\t\t\tword= first2degred(number[0]+number[1])+\" \"+unit[1]+\" \"+hundred(subnum);\n\t\t\t\t\t}\n\t\t\t\t\telse if(number[1]!='0'){\n\t\t\t\t\t\tword=first2degred(number[1])+\" \"+unit[1]+hundred(subnum);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tword=hundred(subnum);\n\t\t\t\t\t}\n\t\t\t\t\treturn word;\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "4a7bf49fabeaf90bc4c15a8ec2af0e8d", "score": "0.67767227", "text": "function NumberFormat(num, numDec, decSep, thousandSep) {\n var arg;\n var Dec;\n Dec = Math.pow(10, numDec);\n if (typeof(num) == 'undefined') return;\n if (typeof(decSep) == 'undefined') decSep = ',';\n if (typeof(thousandSep) == 'undefined') thousandSep = '.';\n if (thousandSep == '.')\n arg = /./g;\n else\n if (thousandSep == ',') arg = /,/g;\n if (typeof(arg) != 'undefined') num = num.toString().replace(arg, '');\n num = num.toString().replace(/,/g, '.');\n if (isNaN(num)) num = \"0\";\n sign = (num == (num = Math.abs(num)));\n num = Math.floor(num * Dec + 0.50000000001);\n cents = num % Dec;\n num = Math.floor(num / Dec).toString();\n if (cents < (Dec / 10)) cents = \"0\" + cents;\n for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)\n num = num.substring(0, num.length - (4 * i + 3)) + thousandSep + num.substring(num.length - (4 * i + 3));\n if (Dec == 1)\n return (((sign) ? '' : '-') + num);\n else\n return (((sign) ? '' : '-') + num + decSep + cents);\n}", "title": "" }, { "docid": "3ff8771c2ad9eaaddc634a3a604918e1", "score": "0.67618084", "text": "function kFormatter(num) \r\n{\r\n return num > 9999 ? (num/1000).toFixed(1) + 'k' : num\r\n}", "title": "" }, { "docid": "8aeb18947eb1f77075fb57064a3587d7", "score": "0.67471397", "text": "function number_format( number, decimals, dec_point, thousands_sep ) {\n // http://kevin.vanzonneveld.net\n // + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + bugfix by: Michael White (http://crestidg.com)\n // + bugfix by: Benjamin Lupton\n // + bugfix by: Allan Jensen (http://www.winternet.no)\n // + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // * example 1: number_format(1234.5678, 2, '.', '');\n // * returns 1: 1234.57\n\t/*\n\t * Se agrega ajuste para que salgan todos los decimales que vengan en el número.\n\t */\n\tif (isNaN(decimals = Math.abs(decimals))) {\n\t\tc = 0;\n\t} else {\n\t\tvar newValue = new String(number);\n\t\tvar separatorPosition = newValue.search(/\\D/gi);\n\t\tif (separatorPosition < 0) {\n\t\t\tc = 0;\n\t\t} else {\n\t\t\tc = newValue.length - separatorPosition - 1;\n\t\t\tif(c>2){\n\t\t\t\tc=2;\n\t\t\t}\n\t\t}\n\t}\n \n //var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;\n var n = number;\n var d = dec_point == undefined ? \",\" : dec_point;\n var t = thousands_sep == undefined ? \".\" : thousands_sep, s = n < 0 ? \"-\" : \"\";\n var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + \"\", j = (j = i.length) > 3 ? j % 3 : 0;\n \n var value = s + (j ? i.substr(0, j) + t : \"\") + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : \"\"); \n \n if(currency!=\"\"){\n \tvalue = orderCurrency.replace(/%v/, value);\n \tvalue = value.replace(/%c/, currency); \t\n }\n return value;\n}", "title": "" }, { "docid": "29ba30d56a45f656a15373d5503aec38", "score": "0.67089933", "text": "function number_format(number, decimals, dec_point, thousands_sep) {\n // http://kevin.vanzonneveld.net\n // + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + bugfix by: Michael White (http://getsprink.com)\n // + bugfix by: Benjamin Lupton\n // + bugfix by: Allan Jensen (http://www.winternet.no)\n // + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // + bugfix by: Howard Yeend\n // + revised by: Luke Smith (http://lucassmith.name)\n // + bugfix by: Diogo Resende\n // + bugfix by: Rival\n // + input by: Kheang Hok Chin (http://www.distantia.ca/)\n // + improved by: davook\n // + improved by: Brett Zamir (http://brett-zamir.me)\n // + input by: Jay Klehr\n // + improved by: Brett Zamir (http://brett-zamir.me)\n // + input by: Amir Habibi (http://www.residence-mixte.com/)\n // + bugfix by: Brett Zamir (http://brett-zamir.me)\n // + improved by: Theriault\n // + improved by: Drew Noakes\n // * example 1: number_format(1234.56);\n // * returns 1: '1,235'\n // * example 2: number_format(1234.56, 2, ',', ' ');\n // * returns 2: '1 234,56'\n // * example 3: number_format(1234.5678, 2, '.', '');\n // * returns 3: '1234.57'\n // * example 4: number_format(67, 2, ',', '.');\n // * returns 4: '67,00'\n // * example 5: number_format(1000);\n // * returns 5: '1,000'\n // * example 6: number_format(67.311, 2);\n // * returns 6: '67.31'\n // * example 7: number_format(1000.55, 1);\n // * returns 7: '1,000.6'\n // * example 8: number_format(67000, 5, ',', '.');\n // * returns 8: '67.000,00000'\n // * example 9: number_format(0.9, 0);\n // * returns 9: '1'\n // * example 10: number_format('1.20', 2);\n // * returns 10: '1.20'\n // * example 11: number_format('1.20', 4);\n // * returns 11: '1.2000'\n // * example 12: number_format('1.2000', 3);\n // * returns 12: '1.200'\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n toFixedFix = function (n, prec) {\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n var k = Math.pow(10, prec);\n return Math.round(n * k) / k;\n },\n s = (prec ? toFixedFix(n, prec) : Math.round(n)).toString().split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "title": "" }, { "docid": "e7eea2adcc3b7a336060be5d8daffe93", "score": "0.67051625", "text": "function kFormatter(num) {\n return num > 999 ? (num/1000).toFixed(1) + 'k' : num\n }", "title": "" }, { "docid": "f71a032ae4c21c4dc87536a1aeb55f65", "score": "0.66689485", "text": "function number_format (number, decimals, dec_point, thousands_sep) { \nnumber = (number + '').replace(',', '').replace(' ', ''); \nvar n = !isFinite(+number) ? 0 : +number, \nprec = !isFinite(+decimals) ? 0 : Math.abs(decimals), \nsep = (typeof thousands_sep === 'undefined') ? '.' : thousands_sep, dec = (typeof dec_point === 'undefined') ? ',' : dec_point, \ns = '', \ntoFixedFix = function (n, prec) { \nvar k = Math.pow(10, prec); \nreturn '' + Math.round(n * k) / k; }; \n// Fix for IE parseFloat(0.55).toFixed(0) = 0; \ns = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); \nif (s[0].length > 3) { \ns[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep); } \nif ((s[1] || '').length < prec) { \ns[1] = s[1] || ''; \ns[1] += new Array(prec - s[1].length + 1).join('0'); \n} \nreturn s.join(dec); \n}", "title": "" }, { "docid": "3ffbb9a0060519da40c95d1accb4edbd", "score": "0.6663857", "text": "function kFormatter(num) {\n\t\treturn num > 999 ? (num/1000).toFixed(1) + 'k' : num\n\t}", "title": "" }, { "docid": "de970646f737448ab755a41548d4e1b6", "score": "0.6659624", "text": "function kFormatter(num) {\n\treturn num > 999 ? (num/1000).toFixed(1) + 'k' : num\n}", "title": "" }, { "docid": "63cd5d472d0cc879409a841c08a8de53", "score": "0.66551334", "text": "function number_format( number, decimals, dec_point, thousands_sep ) {\n // http://kevin.vanzonneveld.net\n // + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + bugfix by: Michael White (http://crestidg.com)\n // + bugfix by: Benjamin Lupton\n // + bugfix by: Allan Jensen (http://www.winternet.no)\n // + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)\n // * example 1: number_format(1234.5678, 2, '.', '');\n // * returns 1: 1234.57\n\n var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;\n var d = dec_point == undefined ? \",\" : dec_point;\n var t = thousands_sep == undefined ? \".\" : thousands_sep, s = n < 0 ? \"-\" : \"\";\n var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + \"\", j = (j = i.length) > 3 ? j % 3 : 0;\n\n return s + (j ? i.substr(0, j) + t : \"\") + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : \"\");\n}", "title": "" }, { "docid": "970eb10ae436cc439da7d1a19acdd763", "score": "0.6649335", "text": "function kFormatter(num) {\n return num > 999 ? (num/1000).toFixed(1) + 'k' : num\n}", "title": "" }, { "docid": "fd930d159700666fc41d6a3fca3de3a4", "score": "0.6634649", "text": "function kFormatter(num) {\n return num > 999 ? (num/1000).toFixed(1) + 'k' : num\n}", "title": "" }, { "docid": "3fc68eb3fbf30a919ebe10d3e00f0116", "score": "0.66076684", "text": "formatMoney(number, thousandSeperator, currencyIndicator, decimalPlaces) {\n logger.log(\"*****Number Formating*****\");\n number= typeof number === \"string\" ? number.replace(\",\",\"\") : number;\n number= typeof number === \"string\" ? number.replace(\"$\",\"\") : number;\n decimalPlaces = isNaN(decimalPlaces = Math.abs(decimalPlaces)) ? \"2\" : decimalPlaces;\n var currencySign = currencyIndicator === true ? \"$\" : \"\";\n var thouSep = thousandSeperator === true ? \",\" : \"\";\n var sign = number < 0 ? \"-\" : \"\";\n var i = String(parseInt(number = Math.abs(Number(number) || 0).toFixed(decimalPlaces)));\n var j = (j = i.length) > 3 ? j % 3 : 0;\n \n return sign + currencySign +\n (j ? i.substr(0, j) + thouSep : \"\") +\n i.substr(j).replace(/(\\decSep{3})(?=\\decSep)/g, \"$1\" + thouSep) +\n (decimalPlaces ? \".\" + Math.abs(number - i).toFixed(decimalPlaces).slice(2) : \"\");\n }", "title": "" }, { "docid": "2a5c229eb2963c021f73b446ad5da1c4", "score": "0.66046005", "text": "function splitNumber(num){\n\treturn (+num).toLocaleString();\t \n}", "title": "" }, { "docid": "85c3b7eefb43f3f72a1b60dafc7e90e3", "score": "0.66042674", "text": "function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) {\n val = toNumber_1(val);\n nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits;\n decimalSeparator = decimalSeparator == null? '.' : decimalSeparator;\n thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator;\n\n //can't use enforce precision since it returns a number and we are\n //doing a RegExp over the string\n var fixed = val.toFixed(nDecimalDigits),\n //separate begin [$1], middle [$2] and decimal digits [$4]\n parts = new RegExp('^(-?\\\\d{1,3})((?:\\\\d{3})+)(\\\\.(\\\\d{'+ nDecimalDigits +'}))?$').exec( fixed );\n\n if(parts){ //val >= 1000 || val <= -1000\n return parts[1] + parts[2].replace(/\\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : '');\n }else{\n return fixed.replace('.', decimalSeparator);\n }\n }", "title": "" }, { "docid": "01cec578a37c165ad752dad87a7adbe1", "score": "0.65713096", "text": "function formatMoney(number, currencySymbol, decPlaces, thouSeparator, decSeparator) {\n var n = number;\n var formattedDecPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces;\n var formattedDecSeparator = decSeparator === undefined ? \".\" : decSeparator;\n var formattedThouSeparator = thouSeparator === undefined ? \",\" : thouSeparator;\n var sign = n < 0 ? \"-\" : \"\";\n var i = parseInt(n = Math.abs(+n || 0).toFixed(formattedDecPlaces)) + \"\";\n var j = (j = i.length) > 3 ? j % 3 : 0;\n\n return sign + currencySymbol + (j ? i.substr(0, j) + formattedThouSeparator : \"\") + \n i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + formattedThouSeparator) + \n (formattedDecPlaces ? formattedDecSeparator + Math.abs(n - i).toFixed(formattedDecPlaces).slice(2) : \"\");\n }", "title": "" }, { "docid": "d7d1f313c64fea56a3bfc7893e218e47", "score": "0.65401", "text": "function numberFormat(number, decimals, decPoint, thousandsSep) {\n\tvar lang = {\n\t\t\tloading: 'Loading...',\n\t\t\tmonths: ['January', 'February', 'March', 'April', 'May', 'June', 'July',\n\t\t\t\t\t'August', 'September', 'October', 'November', 'December'],\n\t\t\tshortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n\t\t\tweekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n\t\t\tdecimalPoint: '.',\n\t\t\tnumericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'], // SI prefixes used in axis labels\n\t\t\tresetZoom: 'Reset zoom',\n\t\t\tresetZoomTitle: 'Reset zoom level 1:1',\n\t\t\tthousandsSep: ','\n\t\t},\n\t\t// http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_number_format/\n\t\tn = +number || 0,\n\t\tc = decimals === -1 ?\n\t\t\t(n.toString().split('.')[1] || '').length : // preserve decimals\n\t\t\t(isNaN(decimals = mathAbs(decimals)) ? 2 : decimals),\n\t\td = decPoint === undefined ? lang.decimalPoint : decPoint,\n\t\tt = thousandsSep === undefined ? lang.thousandsSep : thousandsSep,\n\t\ts = n < 0 ? \"-\" : \"\",\n\t\ti = String(pInt(n = mathAbs(n).toFixed(c))),\n\t\tj = i.length > 3 ? i.length % 3 : 0;\n\n\treturn s + (j ? i.substr(0, j) + t : \"\") + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + t) +\n\t\t(c ? d + mathAbs(n - i).toFixed(c).slice(2) : \"\");\n}", "title": "" }, { "docid": "0fa001f7e231efb9fd35c8768456f0bb", "score": "0.6498161", "text": "function addDecimalSeparators(x, separator) {\n x += '';\n if (!separator) return x;\n var rgx = /(\\d{3})(\\d+)/;\n while (rgx.test(x)) {\n x = x.replace(rgx, '$1' + separator + '$2');\n }\n return x;\n}", "title": "" }, { "docid": "0fa001f7e231efb9fd35c8768456f0bb", "score": "0.6498161", "text": "function addDecimalSeparators(x, separator) {\n x += '';\n if (!separator) return x;\n var rgx = /(\\d{3})(\\d+)/;\n while (rgx.test(x)) {\n x = x.replace(rgx, '$1' + separator + '$2');\n }\n return x;\n}", "title": "" }, { "docid": "969b04bfe88fe6262b7feb7b4f4dd10f", "score": "0.6493394", "text": "function number_format(number, decimals, dec_point, thousands_sep) {\n var exponent = \"\";\n var numberstr = number.toString();\n var eindex = numberstr.indexOf(\"e\");\n var i, z;\n if (eindex > -1) {\n exponent = numberstr.substring(eindex);\n number = parseFloat(numberstr.substring(0, eindex));\n }\n\n if (decimals != null) {\n var temp = Math.pow(10, decimals);\n number = Math.round(number * temp) / temp;\n }\n var sign = number < 0 ? \"-\" : \"\";\n var integer = (number > 0\n ? Math.floor(number)\n : Math.abs(Math.ceil(number))\n ).toString();\n\n var fractional = number.toString().substring(integer.length + sign.length);\n dec_point = dec_point != null ? dec_point : \".\";\n fractional =\n (decimals != null && decimals > 0) || fractional.length > 1\n ? dec_point + fractional.substring(1)\n : \"\";\n if (decimals != null && decimals > 0) {\n for (i = fractional.length - 1, z = decimals; i < z; ++i) fractional += \"0\";\n }\n\n thousands_sep =\n thousands_sep != dec_point || fractional.length == 0 ? thousands_sep : null;\n if (thousands_sep != null && thousands_sep != \"\") {\n for (i = integer.length - 3; i > 0; i -= 3)\n integer = integer.substring(0, i) + thousands_sep + integer.substring(i);\n }\n return sign + integer + fractional + exponent;\n}", "title": "" }, { "docid": "0dbac13dd239d4ec30e381e6a902943f", "score": "0.6477344", "text": "function number_format(number, decimals, dec_point, thousands_sep) {\n number = (number + '').replace(',', '').replace(' ', '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? '.' : thousands_sep, dec = (typeof dec_point === 'undefined') ? ',' : dec_point,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n// Fix for IE parseFloat(0.55).toFixed(0) = 0; \n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n }", "title": "" }, { "docid": "d935abc3cf46b968de57b672b7ca2467", "score": "0.6476684", "text": "function detectNumberSeparators() {\n\tvar n = 1000.50;\n\tvar l = n.toLocaleString();\n\tvar s = n.toString();\n\tvar o = {\n\t\tdecimal: l.substring(5, 6),\n\t\tthousands: l.substring(1, 2)\n\t};\n\n\tif (l.substring(5, 6) == s.substring(5, 6)) {\n\t\to.decimal = \".\";\n\t}\n\tif (l.substring(1, 2) == s.substring(1, 2)) {\n\t\to.thousands = \",\";\n\t}\n\n\treturn o;\n}", "title": "" }, { "docid": "2b8cde9bac36d33df2e2a1e4f3eac62f", "score": "0.64457774", "text": "function getDecSep()\n{\n var n = 1.1;\n return n.toLocaleString().substring(1, 2);\n}", "title": "" }, { "docid": "a02eca2b51dfedaefe236f733c04b93e", "score": "0.64103407", "text": "function formatNumberWithCommas(x){\n\t\t\treturn x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\t\t}", "title": "" }, { "docid": "da4182fd4474961ab5b0db8d10a028fa", "score": "0.6387924", "text": "function number_format(number, decimals, dec_point, thousands_sep) {\n number = (number + '').replace(',', '').replace(' ', '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? '.' : thousands_sep, dec = (typeof dec_point === 'undefined') ? ',' : dec_point,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n// Fix for IE parseFloat(0.55).toFixed(0) = 0; \n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "title": "" }, { "docid": "34565fae7cb740f3b82dfa64f980a927", "score": "0.6384913", "text": "function formatMoney(number, decPlaces, decSep, thouSep) {\n decPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces,\n decSep = typeof decSep === \"undefined\" ? \".\" : decSep;\n thouSep = typeof thouSep === \"undefined\" ? \",\" : thouSep;\n var sign = number < 0 ? \"-\" : \"\";\n var i = String(parseInt(number = Math.abs(Number(number) || 0).toFixed(decPlaces)));\n var j = (j = i.length) > 3 ? j % 3 : 0;\n\n return sign +\n (j ? i.substr(0, j) + thouSep : \"\") +\n i.substr(j).replace(/(\\decSep{3})(?=\\decSep)/g, \"$1\" + thouSep) +\n (decPlaces ? decSep + Math.abs(number - i).toFixed(decPlaces).slice(2) : \"\");\n}", "title": "" }, { "docid": "396f5f6a5698ab8246120e55a0084f06", "score": "0.63742775", "text": "function currencyFormat(\n val,\n nDecimalDigits,\n decimalSeparator,\n thousandsSeparator\n ) {\n val = toNumber(val);\n nDecimalDigits = nDecimalDigits == null ? 2 : nDecimalDigits;\n decimalSeparator = decimalSeparator == null ? \".\" : decimalSeparator;\n thousandsSeparator =\n thousandsSeparator == null ? \",\" : thousandsSeparator;\n\n //can't use enforce precision since it returns a number and we are\n //doing a RegExp over the string\n let fixed = val.toFixed(nDecimalDigits),\n //separate begin [$1], middle [$2] and decimal digits [$4]\n parts = new RegExp(\n \"^(-?\\\\d{1,3})((?:\\\\d{3})+)(\\\\.(\\\\d{\" + nDecimalDigits + \"}))?$\"\n ).exec(fixed);\n\n if (parts) {\n //val >= 1000 || val <= -1000\n return (\n parts[1] +\n parts[2].replace(/\\d{3}/g, thousandsSeparator + \"$&\") +\n (parts[4] ? decimalSeparator + parts[4] : \"\")\n );\n } else {\n return fixed.replace(\".\", decimalSeparator);\n }\n }", "title": "" }, { "docid": "03bad3f862e5dfd1e1e384aac2506128", "score": "0.63645124", "text": "function nFormatter(num, digits) {\n\tlet si = [\n\t\t{ value: 1E6, symbol: \" million\" },\n\t\t{ value: 1E3, symbol: \" thousand\" }\n\t], rx = /\\.0+$|(\\.[0-9]*[1-9])0+$/, i;\n\n\tfor(i = 0; i < si.length; i++) {\n\t\tif(num >= si[i].value) {\n\t\t return (num / si[i].value).toFixed(digits).replace(rx, \"$1\") + si[i].symbol;\n\t\t}\n\t}\n\n\treturn num.toFixed(digits).replace(rx, \"$1\");\n}", "title": "" }, { "docid": "1928500e2c66958744750aec381a20a9", "score": "0.6310634", "text": "function number_format (number, decimals, dec_point, thousands_sep) {\n \n // number = (number + '').replace(/[^0-9+-Ee.]/g, '');\n \n number = (number + '').replace(/[^0-9+\\-Ee.]/g, '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "title": "" }, { "docid": "555a5adcf20bbad1e1738725b1e05aff", "score": "0.63024026", "text": "function formatNumber(num, dec, thou, pnt, curr1, curr2, n1, n2)\n{\n var x = Math.round(num * Math.pow(10, dec));\n if (x >= 0) n1 = n2 = '';\n\n var y = ('' + Math.abs(x)).split('');\n var z = y.length - dec;\n\n if (z < 0) z--;\n\n for (var i = z; i < 0; i++)\n y.unshift('0');\n\n y.splice(z, 0, pnt);\n if (y[0] == pnt) y.unshift('0');\n\n while (z > 3)\n {\n z -= 3;\n y.splice(z, 0, thou);\n }\n\n var r = curr1 + n1 + y.join('') + n2 + curr2;\n return r;\n}", "title": "" }, { "docid": "132311eef493c4a8a4f357a9f25ea1b5", "score": "0.6294576", "text": "function separate_thousands(str) {\n let pattern = /(\\S*)(\\.\\S*)/;\n let front = \"\";\n let back = \"\";\n let exec = pattern.exec(str);\n if (exec != null) {\n front = exec[1];\n back = exec[2];\n } else {\n front = str.toString();\n //...\n }\n //I dont understand that...\n //front = front.replace(/\\d{1,3}(?=(\\d{3})+$)/g, '$&,');\n //return front + back;\n front = reverse(front);\n let regExpMatchArray = front.match(/\\d{1,3}/g);\n return reverse_join(regExpMatchArray.reverse(), \",\") + back;\n}", "title": "" }, { "docid": "d586e778860bcb67cf3c47850191b20f", "score": "0.6256889", "text": "function nbFormat3 (number)\n{\n\n\treturn number_format(number, 5, \".\",\",\");\n}", "title": "" }, { "docid": "c3f14a4113ef9de3f948747ba4a94f7f", "score": "0.62418056", "text": "function addCommas(intNum) {\nreturn (intNum + '').replace(/(\\d)(?=(\\d{3})+$)/g, '$1,');\n}", "title": "" }, { "docid": "941f15474d618c6e0708edaaac2ea109", "score": "0.6240565", "text": "function roundToWithThousands(config, num, place) {\n\tvar newval = 1 * unFormat(config, num);\n\tif (typeof(newval) == \"number\" && place != \"none\") {\n\t\tvar roundVal;\n\t\tif (place <= 0) {\n\t\t\troundVal = -place;\n\t\t\tnewval = +(Math.round(newval + \"e+\" + roundVal) + \"e-\" + roundVal);\n\t\t} else {\n\t\t\troundVal = place;\n\t\t\tvar divval = \"1e+\" + roundVal;\n\t\t\tnewval = +(Math.round(newval / divval)) * divval;\n\t\t}\n\t}\n\tnewval = fmtChartJS(config, newval, \"none\");\n\treturn (newval);\n}", "title": "" }, { "docid": "8971e59b6dfa9531546e328b02559a29", "score": "0.62291336", "text": "function nFormatter(num, digits) {\n\t\tvar si = [\n\t\t\t{ value: 1E18, symbol: \"E\" },\n\t\t\t{ value: 1E15, symbol: \"P\" },\n\t\t\t{ value: 1E12, symbol: \"T\" },\n\t\t\t{ value: 1E9, symbol: \"G\" },\n\t\t\t{ value: 1E6, symbol: \"M\" },\n\t\t\t{ value: 1E3, symbol: \"k\" }\n\t\t\t], rx = /\\.0+$|(\\.[0-9]*[1-9])0+$/, i;\n\t\tfor (i = 0; i < si.length; i++) {\n\t\t\tif (num >= si[i].value) {\n\t\t\t\treturn (num / si[i].value).toFixed(digits).replace(rx, \"$1\") + si[i].symbol;\n\t\t\t}\n\t\t}\n\t\treturn num.toFixed(digits).replace(rx, \"$1\");\n\t}", "title": "" }, { "docid": "9f11cc94883efa832fd79eafff74257c", "score": "0.6228451", "text": "function nbFormat2 (number)\n{\n\treturn number_format(number, 2, \".\",\",\");\n}", "title": "" }, { "docid": "76b95c630c6a535c4d5955a38ecc75fa", "score": "0.62273806", "text": "function formatGroup(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}", "title": "" }, { "docid": "9f276e0cf41a8df1efb73506c19d21f2", "score": "0.62226444", "text": "moneyFormatter(x){\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: this.props.data.currency,\n minimumFractionDigits: 2\n }).format(x);\n }", "title": "" }, { "docid": "694663cca6c0797a4bc8f3c8707697d9", "score": "0.62100357", "text": "function nFormatter(num) {\n\tif (num >= 1000000000) {\n\t\treturn formatter((num / 1000000000).toFixed(1).replace(/\\.0$/, '')) + 'B';\n\t}\n\tif (num >= 1000000) {\n\t\treturn formatter((num / 1000000).toFixed(1).replace(/\\.0$/, '')) + 'M';\n\t}\n\tif (num >= 1000) {\n\t\treturn formatter((num / 1000).toFixed(1).replace(/\\.0$/, '')) + 'K';\n\t}\n\treturn formatter(num.toFixed(1).replace(/\\.0$/, ''));\n}", "title": "" }, { "docid": "756cb0b0b55679d459e07cbf09cd963c", "score": "0.62055326", "text": "function number_format(number, decimals, dec_point, thousands_point) {\n\n if (number == null || !isFinite(number)) {\n throw new TypeError(\"number is not valid\");\n }\n\n if (!decimals) {\n var len = number.toString().split('.').length;\n decimals = len > 1 ? len : 0;\n }\n\n if (!dec_point) {\n dec_point = '.';\n }\n\n if (!thousands_point) {\n thousands_point = ',';\n }\n\n number = parseFloat(number).toFixed(decimals);\n\n number = number.replace(\".\", dec_point);\n\n var splitNum = number.split(dec_point);\n splitNum[0] = splitNum[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands_point);\n number = splitNum.join(dec_point);\n\n return number;\n}", "title": "" }, { "docid": "f9bae3589ee9cd54368233cc1743aea2", "score": "0.6182937", "text": "function formatNumber(num) {\n return num.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1.') + ` din.`\n }", "title": "" }, { "docid": "7498edaa8623620be978866d5fa24362", "score": "0.61796576", "text": "function separatedNumber() {\n\n return function (input, precision) {\n if (typeof input !== 'number') {\n return '';\n }\n\n // Let's pretend all numbers are positive for now\n var negative = input < 0,\n input = (1 - 2*negative) * input,\n\n numString = precision ?\n input.toPrecision(precision) : Math.round(input).toFixed(0),\n\n decimalPosition = precision ?\n numString.indexOf('.') : numString.length,\n\n spaces, i, insertPosition;\n\n // Calculate number of spaces\n spaces = Math.floor((decimalPosition - 1)/3);\n\n // Add the calculated number of spaces\n for (i = 1; i <= spaces; i++) {\n insertPosition = decimalPosition - i*3;\n\n numString = numString.substring(0, insertPosition) +\n String.fromCharCode(160) +\n numString.substring(insertPosition);\n\n }\n\n // Handle negative numbers and return\n return (negative ? '-' : '') + numString;\n\n };\n}", "title": "" }, { "docid": "3a6431a61c1e421515e4b673badee138", "score": "0.61785656", "text": "numberWithCommas(x) {\r\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n }", "title": "" }, { "docid": "2f3cce64b5e1091c1551ea0f2b01ae7e", "score": "0.61690235", "text": "function numberSuffix(number){\n\t\t\n\t\tvar suffix = \"th\";\n\t\t\n\t\t//Lets deal with small numbers\n\t\tvar smallNumber = number % 100; \n\t\t\n\t if(smallNumber < 11 || smallNumber > 13){\n\t switch(smallNumber % 10){\n\t case 1: suffix = 'st'; break;\n\t case 2: suffix = 'nd'; break;\n\t case 3: suffix = 'rd'; break;\n\t }\n\t }\n \treturn number + suffix;\n\t}", "title": "" }, { "docid": "db94cb02e04b10cf063147e2636d8a74", "score": "0.61599004", "text": "function nbFormat (number)\n{\n\n\n var test3 = number_format(1234567.5678, 2, '.', ',');\n\n \n\t\n\treturn number_format(number, 0, \".\",\",\");\n}", "title": "" }, { "docid": "38161bd55b686dd1f1b3b40fca56d603", "score": "0.61588085", "text": "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \".\");\n }", "title": "" }, { "docid": "68f91010f074fb0993c69d95297a0cae", "score": "0.61438024", "text": "function localiseDisplayNumberStr(numberStr) {\n // je kan hier niet toLocaleString gebruiken omdat je dan trailing zero's e.d. kan kwijt raken\n var parts = numberStr.split('.'); // find decimal separator, note that numberStr is not localised\n var integerPart = parts[0];\n var fractionPart = parts.length > 1 ? decimalSeparatorChar + parts[1] : '';\n var rgx = /(\\d+)(\\d{3})/;\n while (rgx.test(integerPart)) {\n integerPart = integerPart.replace(rgx, '$1' + thousandsSeparatorChar + '$2');\n }\n return integerPart + fractionPart;\n}", "title": "" }, { "docid": "c26d47db555e148d6501294b43e5e4f5", "score": "0.61436266", "text": "function formatWithCommas(value) {\n const pattern = /(-?\\d+)(\\d{3})/;\n while (pattern.test(value)) {\n value = value.replace(pattern, '$1,$2');\n }\n return value;\n}", "title": "" }, { "docid": "d0d92abde9caed876195410249574494", "score": "0.6139823", "text": "function numberFormat(numero){\r\n // Variable que contendra el resultado final\r\n var resultado = \"\";\r\n\r\n // Si el numero empieza por el valor \"-\" (numero negativo)\r\n if(numero[0]==\"-\")\r\n {\r\n // Cogemos el numero eliminando los posibles puntos que tenga, y sin\r\n // el signo negativo\r\n nuevoNumero=numero.replace(/\\,/g,'').substring(1);\r\n }else{\r\n // Cogemos el numero eliminando los posibles puntos que tenga\r\n nuevoNumero=numero.replace(/\\,/g,'');\r\n }\r\n\r\n // Si tiene decimales, se los quitamos al numero\r\n if(numero.indexOf(\".\")>=0)\r\n nuevoNumero=nuevoNumero.substring(0,nuevoNumero.indexOf(\".\"));\r\n\r\n // Ponemos un punto cada 3 caracteres\r\n for (var j, i = nuevoNumero.length - 1, j = 0; i >= 0; i--, j++)\r\n resultado = nuevoNumero.charAt(i) + ((j > 0) && (j % 3 == 0)? \",\": \"\") + resultado;\r\n\r\n // Si tiene decimales, se lo añadimos al numero una vez forateado con \r\n // los separadores de miles\r\n if(numero.indexOf(\".\")>=0)\r\n resultado+=numero.substring(numero.indexOf(\".\"));\r\n\r\n if(numero[0]==\"-\")\r\n {\r\n // Devolvemos el valor añadiendo al inicio el signo negativo\r\n return \"-\"+resultado;\r\n }else{\r\n return resultado;\r\n }\r\n}", "title": "" }, { "docid": "1147e5b309b387b9182caf8ee7c2bf5a", "score": "0.61382526", "text": "function mFormatter(value) {\r\n var newValue = value;\r\n if (value >= 1000) {\r\n var suffixes = [\"\", \"K\", \"M\", \"B\",\"T\"];\r\n var suffixNum = Math.floor( (\"\"+value).length/3 );\r\n var shortValue = '';\r\n for (var precision = 2; precision >= 1; precision--) {\r\n shortValue = parseFloat( (suffixNum != 0 ? (value / Math.pow(1000,suffixNum) ) : value).toPrecision(precision));\r\n var dotLessShortValue = (shortValue + '').replace(/[^a-zA-Z 0-9]+/g,'');\r\n if (dotLessShortValue.length <= 2) { break; }\r\n }\r\n if (shortValue % 1 != 0) shortNum = shortValue.toFixed(1);\r\n newValue = shortValue+suffixes[suffixNum];\r\n }\r\n return newValue;\r\n}", "title": "" }, { "docid": "d8d2f4c49fff9ad8b565cf40b9bee0d9", "score": "0.6138025", "text": "function addCommas(num) \n{\n var number = parseFloat(num).toFixed(2)+'';\n rgx = /(\\d+)(\\d{3}[\\d,]*\\.\\d{2})/;\n while (rgx.test(number)) {\n number = number.replace(rgx, '$1' + ',' + '$2');\n }\n return number;\n}", "title": "" }, { "docid": "829ab756cc86ef76354882c7255c9e00", "score": "0.6135278", "text": "function toStringDigitGroupings(num, \n/** default comma */\nseparatorChar = \",\", \n/** if true, decimals will have digits grouped with a space. default=false */\ngroupDecimalsWithSpace = false) {\n if (isNaN(num)) {\n return \"NaN\";\n }\n let str = num.toString().split('.');\n if (str[0].length >= 5) {\n str[0] = str[0].replace(/(\\d)(?=(\\d{3})+$)/g, '$1' + separatorChar);\n }\n if (groupDecimalsWithSpace === true) {\n if (str[1] != null && str[1].length >= 5) {\n str[1] = str[1].replace(/(\\d{3})/g, '$1 ');\n }\n }\n return str.join('.');\n}", "title": "" }, { "docid": "829ab756cc86ef76354882c7255c9e00", "score": "0.6135278", "text": "function toStringDigitGroupings(num, \n/** default comma */\nseparatorChar = \",\", \n/** if true, decimals will have digits grouped with a space. default=false */\ngroupDecimalsWithSpace = false) {\n if (isNaN(num)) {\n return \"NaN\";\n }\n let str = num.toString().split('.');\n if (str[0].length >= 5) {\n str[0] = str[0].replace(/(\\d)(?=(\\d{3})+$)/g, '$1' + separatorChar);\n }\n if (groupDecimalsWithSpace === true) {\n if (str[1] != null && str[1].length >= 5) {\n str[1] = str[1].replace(/(\\d{3})/g, '$1 ');\n }\n }\n return str.join('.');\n}", "title": "" }, { "docid": "c4e832d498155e1111a9229b8e494743", "score": "0.61340374", "text": "function _to_show_format(num)\n\t\t\t\t{\n\t\t\t\tif (num==0)return '0';\n\t\t\t\tif (num>=100000)\n\t\t\t\t\treturn (num/1000).toFixed(1);\n\t\t\t\telse if (num>=1000)\n\t\t\t\t\treturn (num/1000).toFixed(2);\n\t\t\t\telse\n\t\t\t\t\treturn (num/1000).toFixed(3);\n\t\t\t\t}", "title": "" }, { "docid": "f46ab5f2cd9486ca4fcb7d1382be1f82", "score": "0.6130084", "text": "function numberWithCommas(x) {return x.toString().replace(/\\B(?<!\\.\\d*)(?=(\\d{3})+(?!\\d))/g, \",\"); }", "title": "" }, { "docid": "e341c7473f3db20fc7155de43257e102", "score": "0.61272174", "text": "function setNumeroFormato(num, dec, sep_mil, sep_dec) {\r\n\tvar oNum = new oNumero(num);\r\n\tvar num_formateado = oNum.formato(dec, true);\r\n\tvar numero = num_formateado.toString();\r\n\t\r\n\tnumero = numero.replace(/[.]/gi, \";\");\r\n\tnumero = numero.replace(/[,]/gi, sep_mil); \r\n\tnumero = numero.replace(/[;]/gi, sep_dec);\r\n\t\r\n\treturn numero;\r\n}", "title": "" }, { "docid": "e341c7473f3db20fc7155de43257e102", "score": "0.61272174", "text": "function setNumeroFormato(num, dec, sep_mil, sep_dec) {\r\n\tvar oNum = new oNumero(num);\r\n\tvar num_formateado = oNum.formato(dec, true);\r\n\tvar numero = num_formateado.toString();\r\n\t\r\n\tnumero = numero.replace(/[.]/gi, \";\");\r\n\tnumero = numero.replace(/[,]/gi, sep_mil); \r\n\tnumero = numero.replace(/[;]/gi, sep_dec);\r\n\t\r\n\treturn numero;\r\n}", "title": "" }, { "docid": "e341c7473f3db20fc7155de43257e102", "score": "0.61272174", "text": "function setNumeroFormato(num, dec, sep_mil, sep_dec) {\r\n\tvar oNum = new oNumero(num);\r\n\tvar num_formateado = oNum.formato(dec, true);\r\n\tvar numero = num_formateado.toString();\r\n\t\r\n\tnumero = numero.replace(/[.]/gi, \";\");\r\n\tnumero = numero.replace(/[,]/gi, sep_mil); \r\n\tnumero = numero.replace(/[;]/gi, sep_dec);\r\n\t\r\n\treturn numero;\r\n}", "title": "" }, { "docid": "d0f0a9102a6609627b3fcabf4f80d054", "score": "0.6125403", "text": "function formatNumber(n) {\n // format number 1000000 to 1,234,567\n return n.replace(/\\D/g, \"\").replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\")\n }", "title": "" }, { "docid": "062517b36b8aff63ad5ae653c32ae368", "score": "0.6124253", "text": "function mkstr_peso( amount )\n{\n\tvar str = String(amount);\n\tif( str.length>6 || (str.length>5 && amount>0) ) {\n\t\tvar thousand = str.substring(0,str.length-5);\n\t\tstr = thousand + ',' + str.substring(str.length-5);\n\t}\n\tif( str.length>3 || (str.length>2 && amount>0) ) {\n\t\tvar n = str.substring(0,str.length-2);\n\t\tstr = n + '.' + str.substring(str.length-2);\n\t} else {\n\t\tif( amount<0 ) {\n\t\t\tvar dec = str.substring(1);\n\t\t\tif( dec.length==0 ) dec = '00';\n\t\t\telse if( dec.length==1 ) dec += '0';\n\t\t\tstr = '-0.' + dec;\n\t\t} else {\n\t\t\tif( str.length==0 ) str = '00';\n\t\t\telse if( str.length==1 ) str += '0';\n\t\t\tstr = '0.' + str;\n\t\t}\n\t}\n\treturn str;\n}", "title": "" }, { "docid": "3a9846eefc6c4f881f3cdfccee8010a6", "score": "0.61154014", "text": "function numberWithCommas(x) {\n x = x.toString();\n var pattern = /(-?\\d+)(\\d{3})/;\n while (pattern.test(x))\n x = x.replace(pattern, \"$1,$2\");\n return x;\n }", "title": "" }, { "docid": "64c13644831aa153a3c3edf209c7c818", "score": "0.61150175", "text": "formatValue(value) {\n return value > 999 ? (value / 1000).toFixed(1) + \"k\" : value;\n }", "title": "" }, { "docid": "788fc061e976c5f434ff979c7205e132", "score": "0.61122173", "text": "function numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \" \");\n}", "title": "" }, { "docid": "73210b18b56cb1331be77258ce548a70", "score": "0.6111844", "text": "function fncSetNumericFormat(field_value, precision, separator, delimiter, is_include_delimiter, is_error_include_blank) {\n if(delimiter != \"\"){field_value = field_value.toString().replace(new RegExp(\"\\\\\" + delimiter, \"g\"),\"\");}\n if(separator != \"\"){field_value = field_value.toString().replace(new RegExp(\"\\\\\" + separator, \"g\"),\".\");}\n\n field_value = field_value.trim();\n\n if(is_error_include_blank) {\n if((field_value == \"\") || (isNaN(field_value))) return \"\";\n }\n else {\n if(isNaN(field_value)) field_value = \"0\";\n }\n\n var sign = (field_value == (field_value = Math.abs(field_value)));\n var expPrecision = Math.pow(10,precision);\n var rounded = Math.round(field_value * expPrecision);\n var sNumber = Math.floor(rounded / expPrecision).toString();\n var sDecimal = (rounded % expPrecision).toString();\n\n //set decimal rang\n while(sDecimal.length < precision){sDecimal = \"0\" + sDecimal;}\n if(precision == 0){sDecimal = \"\";} else {sDecimal = \".\" + sDecimal;}\n\n //set delimiter for show\n if(is_include_delimiter){\n for(i = 0; i < Math.floor((sNumber.length-(1+i))/3); i++){\n sNumber = sNumber.substring(0,sNumber.length-(4*i+3)) + delimiter + sNumber.substring(sNumber.length-(4*i+3));\n }\n }\n return (((sign)? '' : '-') + sNumber + sDecimal);\n}", "title": "" }, { "docid": "5e730f2028cae921739437f0b423691d", "score": "0.6110791", "text": "numberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "title": "" }, { "docid": "e6783fab86db6c6b24e3594085e00212", "score": "0.61059964", "text": "NumberWithCommas(x) {\n return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "title": "" }, { "docid": "58f06bc37f6ce8ce44e8d4c76588193b", "score": "0.61051726", "text": "function php_number_format(number, decimals, decPoint, thousandsSep) {\n // eslint-disable-line camelcase\n number = (number + '').replace(/[^0-9+\\-Ee.]/g, '');\n var n = !isFinite(+number) ? 0 : +number;\n var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);\n var sep = typeof thousandsSep === 'undefined' ? ',' : thousandsSep;\n var dec = typeof decPoint === 'undefined' ? '.' : decPoint;\n var s = '';\n\n var toFixedFix = function toFixedFix(n, prec) {\n var k = Math.pow(10, prec);\n return '' + (Math.round(n * k) / k).toFixed(prec);\n }; // @todo: for IE parseFloat(0.55).toFixed(0) = 0;\n\n\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n\n return s.join(dec);\n}", "title": "" }, { "docid": "a5bfacd6ff00ecaf8a20ed1a44a659df", "score": "0.61047995", "text": "function addIntegerSeparators(x, separator) {\n x += '';\n if (!separator) return x;\n var rgx = /(\\d+)(\\d{3})/;\n while (rgx.test(x)) {\n x = x.replace(rgx, '$1' + separator + '$2');\n }\n return x;\n}", "title": "" }, { "docid": "a5bfacd6ff00ecaf8a20ed1a44a659df", "score": "0.61047995", "text": "function addIntegerSeparators(x, separator) {\n x += '';\n if (!separator) return x;\n var rgx = /(\\d+)(\\d{3})/;\n while (rgx.test(x)) {\n x = x.replace(rgx, '$1' + separator + '$2');\n }\n return x;\n}", "title": "" }, { "docid": "4e1e370bcbb51e6c4e3af13da34df015", "score": "0.6100279", "text": "function insertGroupingSeparator(value)\n{\n\tvar strReturned = value;\n\tif(value != null && value != \"\"){\n\t\t//three digits as one group???\n\t\tvar objRegExp = new RegExp('(-?[0-9]+)([0-9]{3})');\n\t\t//location of decimal separator in value\n\t\tvar iPos = value.indexOf(strDecimalSeparator);\n\t\tvar str_temp1 = value;\n\t\tvar str_temp2 = \"\";\n\t\tif(iPos > 0){\n\t\t\tstr_temp1 = value.substring(0, iPos);\n\t\t\tstr_temp2 = value.substring(iPos, value.length);\n\t\t}\n\t\twhile(objRegExp.test(str_temp1)){\n\t\t\tstr_temp1 = str_temp1.replace(objRegExp, '$1'+strGroupingSeparator+'$2');\n\t\t}\n\t\tstrReturned = str_temp1 + str_temp2;\n\t}\n\treturn strReturned;\n}", "title": "" }, { "docid": "b39fcb82d5fa761c7e5534c8fc63aaaa", "score": "0.60914457", "text": "function formatted(num = 0) {\n // Numbers less than 1,000 are just what they are.\n if (num < 1000) {\n return `${num}`;\n }\n // Numbers between 1,000 and 1,000,000 are formatted with 3 digit precision and a 'K'.\n if (num < 1000000) {\n return `${(num / 1000).toPrecision(3)}K`;\n }\n // Numbers more than 1M are formatted with an M.\n return `${(num / 1000000).toPrecision(3)}M`;\n}", "title": "" }, { "docid": "9d5388c98c5a6e453b812663d26669db", "score": "0.6089847", "text": "function formatNumber(number, decimals, dec_point, thousands_sep) {\n number = (number + '').replace(/[^0-9+\\-Ee.]/g, '');\n var n = !isFinite(+number) ? 0 : +number,\n prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),\n sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,\n dec = (typeof dec_point === 'undefined') ? '.' : dec_point,\n s = '',\n toFixedFix = function (n, prec) {\n var k = Math.pow(10, prec);\n return '' + Math.round(n * k) / k;\n };\n // Fix for IE parseFloat(0.55).toFixed(0) = 0;\n s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');\n if (s[0].length > 3) {\n s[0] = s[0].replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, sep);\n }\n if ((s[1] || '').length < prec) {\n s[1] = s[1] || '';\n s[1] += new Array(prec - s[1].length + 1).join('0');\n }\n return s.join(dec);\n}", "title": "" }, { "docid": "5b8768f97cc72467cb2b122163c79964", "score": "0.6081132", "text": "function addCommas(number) {\n\treturn (number + \"\").replace(/\\B(?=(?:\\d{3})+(?!\\d))/g, \",\");\n}", "title": "" }, { "docid": "04b2f49acd20316d70cf0ad0f538347a", "score": "0.60789984", "text": "function formatNumber(val, decimals) {\r\n return val.toLocaleString(undefined, {\r\n minimumFractionDigits: decimals,\r\n maximumFractionDigits: decimals\r\n });\r\n}", "title": "" }, { "docid": "b98492deb9809bb22893de30d88f2dd8", "score": "0.60662615", "text": "function addCommas(n){\n var rx= /(\\d+)(\\d{3})/;\n return String(n).replace(/^\\d+/, function(w){\n while(rx.test(w)){\n w= w.replace(rx, '$1,$2');\n }\n return w;\n });\n}", "title": "" }, { "docid": "403ac4f9840fcf1bde7a34f8874667fe", "score": "0.60648435", "text": "function setNumeroFormato(num, dec, sep_mil, sep_dec) {\n\tvar oNum = new oNumero(num);\n\tvar num_formateado = oNum.formato(dec, true);\n\tvar numero = num_formateado.toString();\n\t\n\tnumero = numero.replace(/[.]/gi, \";\");\n\tnumero = numero.replace(/[,]/gi, sep_mil); \n\tnumero = numero.replace(/[;]/gi, sep_dec);\n\t\n\treturn numero;\n}", "title": "" }, { "docid": "e8d0c32802f4fc4de8812d31ac22e9dc", "score": "0.60582167", "text": "function stringThousands(nStr)\r\n{\r\n nStr += '';\r\n\tx = nStr.split('.');\r\n\tx1 = x[0];\r\n\tx2 = x.length > 1 ? '.' + x[1] : '';\r\n\tvar rgx = /(\\d+)(\\d{3})/;\r\n\twhile (rgx.test(x1)) {\r\n\t\tx1 = x1.replace(rgx, '$1' + ',' + '$2');\r\n\t}\r\n\treturn x1 + x2;\r\n}", "title": "" }, { "docid": "ad88d9e87d70aab2742d4e21f7b710dc", "score": "0.60562485", "text": "function formatMoney(number, places, symbol, thousand, decimal, currency) {\n places = !isNaN(places = Math.abs(places)) ? places : 2;\n symbol = symbol !== undefined ? symbol : \"$\";\n thousand = thousand || \",\";\n decimal = decimal || \".\";\n currency = currency != undefined ? currency : \"MXN\";\n var negative = number < 0 ? \"-\" : \"\",\n i = parseInt(number = Math.abs(+number || 0).toFixed(places), 10) + \"\",\n j = (j = i.length) > 3 ? j % 3 : 0;\n return symbol + negative + (j ? i.substr(0, j) + thousand : \"\") + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + thousand) + (places ? decimal + Math.abs(number - i).toFixed(places).slice(2) : \"\")+\" \"+currency;\n }", "title": "" }, { "docid": "a0b3905a9660287f7914987ec4b3e843", "score": "0.60338", "text": "function numberFormatter(row,cell,value,col,data) {\n var rawValue = data.get(col.field);\n\n if (!rawValue || rawValue === \"\") {\n if (col.allowNull) return null;\n rawValue = 0;\n }\n\n var numberValue;\n if (col.precision) {\n numberValue = (typeof rawValue === 'number') ?\n rawValue : parseFloat(rawValue);\n numberValue = numberValue.toFixed(col.precision);\n }\n else {\n numberValue = (typeof rawValue === 'number') ?\n rawValue.toFixed(0) : parseFloat(rawValue).toFixed(0);\n }\n\n if (col.separated) {\n var separator = getSeparator(col);\n return thousandsSeparated(numberValue,separator);\n }\n else {\n return String(numberValue);\n }\n }", "title": "" }, { "docid": "2c94603fcd365a5549f1521520273a4c", "score": "0.6024363", "text": "function formatPPP (d) {\n var ppp;\n\n // Check if value is a multiple of thousand\n if(!d[columnNames[3]].includes('.')) {\n ppp = parseInt(d[columnNames[3]].replace('$', ''));\n } else {\n ppp = parseInt(d[columnNames[3]].replace('$', '').replace('.', ''));\n }\n return ppp;\n}", "title": "" }, { "docid": "2baeb7b99901691b3b33cba4744475c3", "score": "0.6022553", "text": "addCommas(number) {\n return number.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n }", "title": "" }, { "docid": "44ce8a3aa18cbf085ee8b17b0186c59f", "score": "0.60185844", "text": "function lakh(number){\n\t\t\t\tif(number.length==6){\n\t\t\t\t\tsubnum=number[1]+number[2]+number[3]+number[4]+number[5];\n\t\t\t\t\tif(number[0]<1){\n\t\t\t\t\t\tunit[2]=\"\";\n\t\t\t\t\t}\n\t\t\t\t\tword= first[number[0]]+\" \"+unit[2]+\" \"+thousand(subnum);\n\t\t\t\t\treturn word;\n\t\t\t\t}\n\t\t\t\telse if(number.length==7){\n\t\t\t\t\tsubnum=number[2]+number[3]+number[4]+number[5]+number[6];\n\t\t\t\t\tif (number[0]!='0') {\n\t\t\t\t\t\tword= first2degred(number[0]+number[1])+\" \"+unit[2]+\" \"+thousand(subnum);\n\t\t\t\t\t}\n\t\t\t\t\telse if(number[1]!='0'){\n\t\t\t\t\t\tword= first2degred(number[1])+\" \"+unit[2]+\" \"+thousand(subnum);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tword=thousand(subnum);\n\t\t\t\t\t}\n\t\t\t\t\treturn word;\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "2ee0f2be92a129230adba2d6e46d04d8", "score": "0.60180545", "text": "function numberWithCommas(x) {\n\t return x.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\t}", "title": "" }, { "docid": "3ef89d97e4ae5b6e17c0fb3c01add451", "score": "0.6012884", "text": "function formatNumber(num) {\n return num.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}", "title": "" }, { "docid": "690eb428c8106def88d73362d6ae7381", "score": "0.6011613", "text": "function formatMoney(number, places, symbol, thousand, decimal) {\n\t\tnumber = number || 0;\n\t\tplaces = !isNaN(places = Math.abs(places)) ? places : 2;\n\t\tsymbol = symbol !== undefined ? symbol : \"$\";\n\t\tthousand = thousand || \",\";\n\t\tdecimal = decimal || \".\";\n\t\tvar negative = number < 0 ? \"-\" : \"\",\n\t\t\ti = parseInt(number = Math.abs(+number || 0).toFixed(places), 10) + \"\",\n\t\t\tj = (j = i.length) > 3 ? j % 3 : 0;\n\t\treturn symbol + negative + (j ? i.substr(0, j) + thousand : \"\") + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + thousand) + (places ? decimal + Math.abs(number - i).toFixed(places).slice(2) : \"\");\n\t}", "title": "" } ]
f41d073c5eb5fe450032657936e0d07a
pass in the name of the api get api names from
[ { "docid": "6a43524de1293bd7445e719ac8d7caf6", "score": "0.6559682", "text": "getApi(api_name) {\n const self = this;\n return new self.KnetikCloud[api_name]();\n }", "title": "" } ]
[ { "docid": "6dc1e6cd89f2db944d0900372ec05559", "score": "0.72226644", "text": "api_name() {\n\n }", "title": "" }, { "docid": "ea0c32141cc68785c521679b2f7a5f74", "score": "0.63897973", "text": "function chosenAPI(value) {\n switch (value) {\n case \"spotify-this-song\":\n searchSpotify();\n break;\n case \"concert-this\":\n findConcert();\n break;\n case \"movie-this\":\n getMovieInfo();\n break;\n case \"do-what-it-says\":\n doWhatItSays();\n logData();\n break;\n }\n}", "title": "" }, { "docid": "a373806b4b0f94ca660115ae4ebd4df5", "score": "0.63327897", "text": "registerAPI (apiObj) {\n for (let name of Object.keys(apiObj)) {\n if (apiObj.hasOwnProperty(name))\n this.register(name, apiObj[name]);\n }\n }", "title": "" }, { "docid": "45dbc387c0ccc5d154e296b7b17b0721", "score": "0.62834686", "text": "getList() { return this.api(); }", "title": "" }, { "docid": "15858c2dcc7efc6ba2c1ba8f77cbe995", "score": "0.62809455", "text": "function useapi(url, methodname) {\n $.ajax({\n url: url,\n type: \"GET\",\n dataType: \"json\",\n success: methodname,\n error: function (xhr, status) {\n console.log(\"Api request error.\");\n }\n });\n}", "title": "" }, { "docid": "476d02ec4c87ec4723f216d9e0070973", "score": "0.62587327", "text": "async discoverAllAPIs(discoveryUrl) {\n const headers = this.options.includePrivate\n ? {}\n : { 'X-User-Ip': '0.0.0.0' };\n const res = await this.transporter.request({\n url: discoveryUrl,\n headers,\n });\n const items = res.data.items;\n const apis = await Promise.all(items.map(async (api) => {\n const endpointCreator = await this.discoverAPI(api.discoveryRestUrl);\n return { api, endpointCreator };\n }));\n const versionIndex = {};\n // tslint:disable-next-line no-any\n const apisIndex = {};\n for (const set of apis) {\n if (!apisIndex[set.api.name]) {\n versionIndex[set.api.name] = {};\n apisIndex[set.api.name] = (options) => {\n const type = typeof options;\n let version;\n if (type === 'string') {\n version = options;\n options = {};\n }\n else if (type === 'object') {\n version = options.version;\n delete options.version;\n }\n else {\n throw new Error('Argument error: Accepts only string or object');\n }\n try {\n const ep = \n // tslint:disable-next-line: no-any\n set.endpointCreator(options, this);\n return Object.freeze(ep); // create new & freeze\n }\n catch (e) {\n throw new Error(util.format('Unable to load endpoint %s(\"%s\"): %s', set.api.name, version, e.message));\n }\n };\n }\n versionIndex[set.api.name][set.api.version] = set.endpointCreator;\n }\n return apisIndex;\n }", "title": "" }, { "docid": "cf5c44c264df3d1609879403060c5e01", "score": "0.62558305", "text": "function API(){}", "title": "" }, { "docid": "cf5c44c264df3d1609879403060c5e01", "score": "0.62558305", "text": "function API(){}", "title": "" }, { "docid": "ec3a821e8a4ee8e25a43e285e96b77ed", "score": "0.6216011", "text": "registerApi(api) {\n Object.entries(api.services).forEach(([service, serviceValue]) => {\n Object.entries(serviceValue.methods).forEach(([method, methodValue]) => {\n this.register({\n id : `${service}.${method}`,\n method,\n service,\n type: methodValue.type || serviceValue.type || api.type || 'ajax',\n url : methodValue.url || serviceValue.url || api.url\n })\n })\n })\n }", "title": "" }, { "docid": "0164d17c869024de76be98c11666525e", "score": "0.613561", "text": "generateApiList() {\n return _globby(this.destinationPath('templates/'), {\n onlyDirectories: true,\n deep: false\n }).then((dirList) => {\n this._apiList = dirList.map((dir) => _path.basename(dir));\n if(this._apiList.length <= 0) {\n this.env.error('This project does not have any APIs to assign hooks to');\n }\n });\n }", "title": "" }, { "docid": "ad95e8d247cf92cf16af108cacd996b2", "score": "0.6113224", "text": "getSupportedAPIs() {\n const apiMap = {};\n Object.keys(apis.APIS).forEach(a => {\n apiMap[a] = Object.keys(apis.APIS[a]);\n });\n return apiMap;\n }", "title": "" }, { "docid": "9bc32f16e91b8a782338ec46b1e1bce0", "score": "0.6012074", "text": "async function fetchApiList () {\n let response = await fetch(\"https://api.apis.guru/v2/list.json\");\n\n if (!response.ok) {\n throw new Error(\"Unable to downlaod real-world APIs from apis.guru\");\n }\n\n let apiMap = await response.json();\n\n deleteProblematicAPIs(apiMap);\n let apiArray = flatten(apiMap);\n\n return apiArray;\n}", "title": "" }, { "docid": "1be4b3f83d62c5afdd9a3ce53ff934cf", "score": "0.5996189", "text": "loadApis(data) {\n for (var key in data.links) {\n if (data.links[key].rel !== 'self') {\n this.apis.push(data.links[key]);\n }\n }\n this.$log.debug('ApisService', 'available apis', this.apis);\n }", "title": "" }, { "docid": "b7ef1f0f2f9333ba72393811dd9d7ceb", "score": "0.59921014", "text": "function getGlobDataAPI(){\n\n}", "title": "" }, { "docid": "bcda00c3c3ebbf88b04fc7295f37357c", "score": "0.5923646", "text": "get name() {\n return this.apiObject.name;\n }", "title": "" }, { "docid": "ec34e95ffba7717dd29d0521a0e700a2", "score": "0.5921505", "text": "function demo001_1() {\n const request = new XMLHttpRequest()\n request.open('GET', apiName)\n request.onload = () => printNames(request.response)\n request.send()\n \n var printNames = response => {\n var users = JSON.parse(response);\n var user = users[\"user\" + 1] \n console.log(user.name);\n }\n}", "title": "" }, { "docid": "cb71944cea0114c88076da05a4eeab59", "score": "0.5908775", "text": "function getApiName() {\n var apiName = localStorage.getItem(\"apiName\");\n return apiName;\n}", "title": "" }, { "docid": "d9391df63ba704b4eaf39ba1d51896ff", "score": "0.59057397", "text": "function apis (req, res, next) {\n const headers = [\n {'header': 'X-Api-Key', 'value': app.settings.apiKey},\n {'header': 'X-Admin-Auth-Token', 'value': app.settings.adminWebToken},\n ];\n\n return app.helpers.ajax({\n url: `${app.settings.baseApi}/apis`,\n headers: headers\n })\n .then((e) => {\n res.setHeader('Content-Type', 'application/json');\n res.commit(e.responseText)\n })\n .catch((e) => {res.error(e)});\n }", "title": "" }, { "docid": "392f401bc5de0a348397083f76fdaa1c", "score": "0.59047204", "text": "function ApiServiceRegistry() {\n\t }", "title": "" }, { "docid": "5bb0b8383a935efa24f345a58166dbfb", "score": "0.5894138", "text": "function loadAPIs(){\n\t\t\n\t\t//load youtube api\n\t\tif(g_temp.isYoutubePresent)\n\t\t\tg_ugYoutubeAPI.loadAPI();\n\t\t\n\t\tif(g_temp.isVimeoPresent)\n\t\t\tg_ugVimeoAPI.loadAPI();\n\t\t\n\t\tif(g_temp.isHtml5VideoPresent)\n\t\t\tg_ugHtml5MediaAPI.loadAPI();\n\t\t\n\t\tif(g_temp.isSoundCloudPresent)\n\t\t\tg_ugSoundCloudAPI.loadAPI();\n\t\t\n\t\tif(g_temp.isWistiaPresent)\n\t\t\tg_ugWistiaAPI.loadAPI();\n\t\t\n\t}", "title": "" }, { "docid": "7d116f90099146df3796cd221243945c", "score": "0.58663654", "text": "function getAlgoList(getAlgoListUrl){\n apiServiceCustom.makeGenericGetAPICall(getAlgoListUrl)\n .then(function(response){\n $scope.algoNames = response.data;\n }, function(err){\n console.log(err);\n });\n }", "title": "" }, { "docid": "b8170e9a81db71ff6c0764a8069458ea", "score": "0.58654606", "text": "function apiCalls(){\n\tswitch (switcher) {\n\t\tcase \"my-tweets\":\n\t\tconsole.log(\"you are in tweets switch\");\n\t\tmy_tweets();\n\t\tbreak;\n\n\t\tcase \"spotify-this-song\":\n\t\tconsole.log(\"you're in spotify the input val is \" + userinput);\n\t\tspotify_this_song();\n\t\tbreak;\n\n\t\tcase \"movie-this\":\n\t\tconsole.log(\"you're in movie the input val is \" + userinput);\n\t\tmovie_this();\n\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "d67b50138ff1bb26f4c982111e524c4a", "score": "0.5840377", "text": "getApiKey() {\n return `get${this.apiKey}List`\n }", "title": "" }, { "docid": "29abeb876e6eb76f8474bb87176f7bab", "score": "0.58091617", "text": "function getAPI() {\n\treturn \"http://\" + apiUrl + \":\" + apiPort + \"/\" + apiResource;\n}", "title": "" }, { "docid": "b6f39ab42f8312244558669714f656e8", "score": "0.57673997", "text": "loadAPI(api) {\n if (api !== '') {\n let files = [];\n let overrides = new Map();\n\n for (let param of api.slice(1).split('&')) {\n let [key, value] = param.split('=');\n\n if (value !== undefined) {\n // Test also overrides.\n files.push(value);\n\n if (key.startsWith('override')) {\n // Discord changes \\ to / in urls, ignoring escaping, so escape manually.\n overrides.set(key.slice(9, -1).replace(/\\//g, '\\\\'), value);\n }\n }\n }\n\n if (files.length) {\n let pathSolver = (src, params) => {\n let override = overrides.get(basename(src).toLowerCase());\n\n if (override) {\n return override;\n } else {\n return localOrHive(src, params);\n }\n };\n\n let render = true;\n\n for (let file of files) {\n fetch(file)\n .then(async (response) => {\n let buffer;\n\n if (file.endsWith('.mdl')) {\n buffer = await response.text();\n } else {\n buffer = await response.arrayBuffer();\n }\n\n this.test(file, buffer, render, pathSolver);\n\n render = false;\n });\n }\n }\n }\n }", "title": "" }, { "docid": "5426b8a3ed446a7359fc80bbd5033ead", "score": "0.5755007", "text": "function applicationsTests({ apiGET, apiPOST }) {}", "title": "" }, { "docid": "9a1c84680673b9d31d0feeae962e91e1", "score": "0.57366794", "text": "function PresetApis() {\n\n return [\n _base__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n _plugins_oas3__WEBPACK_IMPORTED_MODULE_1__[\"default\"]];\n\n}", "title": "" }, { "docid": "820e2bbbcfd4ace35741008e30e16396", "score": "0.57366496", "text": "function extendAPI(namespace, publicAPIName , arrOperations){\n var nme = namespace.name + '.' + publicAPIName;\n\n extend(namespace, nme);\n\n var operations = arrOperations;\n var conc = [];\n\n for(var k = 0; k < arrOperations.length; k++){\n conc.push(nme + '.' + arrOperations[k]);\n extend(namespace, conc[k]);\n }\n }", "title": "" }, { "docid": "a075002a57bb8bf5ca170d2fe1a33b17", "score": "0.5707025", "text": "constructor (api) { this.api = api }", "title": "" }, { "docid": "a075002a57bb8bf5ca170d2fe1a33b17", "score": "0.5707025", "text": "constructor (api) { this.api = api }", "title": "" }, { "docid": "a075002a57bb8bf5ca170d2fe1a33b17", "score": "0.5707025", "text": "constructor (api) { this.api = api }", "title": "" }, { "docid": "892e53edce5800b8d678f50544d9a3c5", "score": "0.56814873", "text": "function getAPI(username, service, callback){\n //var serviceName = \"APIs.\"+service;\n basic.findData(database,'Users',{\n \"user.username\" : username\n },function(err,result){\n if (err){\n callback(err);\n }else{\n if (result.length===0){\n callback(\"User not found\");\n }else{\n if (typeof(service)==='function'){\n callback(undefined,results[0].APIs);\n }else{\n //console.log(result[0].exists.length);\n if (result[0].exists.length===0){\n callback(\"It looks like you haven't authenticated any services. To do so, go to your Profile.\");\n }else{\n var data = getAPIhelper(result[0].APIs,service);\n if (!data) callback(\"Service undefined or not supported\");\n callback(undefined,data);\n }\n }\n }\n }\n });\n}", "title": "" }, { "docid": "2401b15580f3ab43b71d57c08c715c9b", "score": "0.5677539", "text": "_warnPrivateAPIAccess(apiName){if(this._warnPrivateAPIAccessAsyncEnabled){console.warn(`Accessing private API (${apiName})!`)}}", "title": "" }, { "docid": "d0b46256ac9c6a06d2eed8cf25313573", "score": "0.5676768", "text": "constructor(apiName = null) {\n if (apiName != null) this.apiName = apiName;\n this.endpoints = [];\n }", "title": "" }, { "docid": "bddcf90805adef18446fc1b29b648729", "score": "0.5669002", "text": "function callbackGetGenericApi(req, res) {\n var apiConfig=\n (req.method==\"GET\")?getConfig\n :(req.method==\"POST\")?postConfig:[];\n /* check first if services is not loaded */\n if (apiConfig.length==0)\n return res.json({statusCode: 404, message: \"Missing API configuration\", Data: []});\n\n ///api/:type/:path?\n /* decouple request api */\n var request = {\n type:req.params.type,\n t_type:req.params.type+\".\"+req.method,\n header:req.headers||{},\n body:req.body,\n path:req.params.path||\"\",\n query:req.query||{}\n };\n\n requestApi(apiConfig,request,function(d) {\n return res.json(d);\n })\n }", "title": "" }, { "docid": "c8d8c7bcf90e0dccfce6ba4b8c82c53a", "score": "0.56256765", "text": "function searchAPIs() {\n if (action === \"concert-this\") {\n band.findBand(argumentInput);\n } else if (action === \"spotify-this-song\") {\n spotifySearch.findMusic(argumentInput);\n } else if (action === \"movie-this\") {\n movieSearch.findMovie(argumentInput);\n } else if (action === \"do-what-it-says\") {\n fs.readFile(\"random.txt\", \"utf8\", function (error, data) {\n if (error) {\n return console.log(error);\n } else {\n var dataParse = data.split(\",\");\n if (dataParse[0] === \"concert-this\") {\n band.findBand(dataParse[1]);\n } else if (dataParse[0] === \"spotify-this-song\") {\n spotifySearch.findMusic(dataParse[1]);\n } else if (dataParse[0] === \"movie-this\") {\n movieSearch.findMovie(dataParse[1]);\n }\n }\n });\n }\n}", "title": "" }, { "docid": "43421c204e395cbe0418e266c7a3c220", "score": "0.56197107", "text": "function loadAPI() {\n // wait for all classes to be loaded\n // on attend que les classes soient chargées\n if (checkApiLoading('loadAPI();',['OpenLayers','Geoportal','Geoportal.Viewer','Geoportal.Viewer.Standard'])===false) {\n return;\n }\n\n // load API keys configuration, then load the interface\n // on charge la configuration de la clef API, puis on charge l'application\n Geoportal.GeoRMHandler.getConfig(['123454565444344'], null,null, {\n onContractsComplete: initMap\n });\n}", "title": "" }, { "docid": "fced6e63c737ea0dfa3e656aedf5a8d7", "score": "0.5618472", "text": "httpGetAllUsers () {\n return makeApiRequest(`users`);\n }", "title": "" }, { "docid": "63f243f4a9a8eaaaaf2c2d1e7e62cf4d", "score": "0.5609933", "text": "function loadAPI() {\n // wait for all classes to be loaded\n // on attend que les classes soient chargées\n if (checkApiLoading('loadAPI();',['OpenLayers','Geoportal','Geoportal.Viewer','Geoportal.Viewer.Simple'])===false) {\n return;\n }\n\n // load API keys configuration, then load the interface\n // on charge la configuration de la clef API, puis on charge l'application\n Geoportal.GeoRMHandler.getConfig(['nhf8wztv3m9wglcda6n6cbuf'], null,null, {\n onContractsComplete: initMap\n });\n}", "title": "" }, { "docid": "66bab72499870d2b396d0122b2ba5ed2", "score": "0.560607", "text": "function convertLiveDocs(apiInfo){\n rename(apiInfo,'title','name');\n rename(apiInfo,'prefix','publicPath');\n rename(apiInfo,'server','basePath');\n apiInfo.resources = {};\n for (var e in apiInfo.endpoints) {\n var ep = apiInfo.endpoints[e];\n var eName = ep.name ? ep.name : 'Default';\n\n if (!apiInfo.resources[eName]) apiInfo.resources[eName] = {};\n apiInfo.resources[eName].description = ep.description;\n\n for (var m in ep.methods) {\n var lMethod = ep.methods[m];\n if (!apiInfo.resources[eName].methods) apiInfo.resources[eName].methods = {};\n var mName = lMethod.MethodName ? lMethod.MethodName : 'Default';\n if (mName.endsWith('.')) mName = mName.substr(0,mName.length-1);\n mName = mName.split(' ').join('_');\n rename(lMethod,'HTTPMethod','httpMethod');\n rename(lMethod,'URI','path');\n rename(lMethod,'Synopsis','description');\n rename(lMethod,'MethodName','name');\n\n lMethod.path = fixPathParameters(lMethod.path);\n\n var params = {};\n for (var p in lMethod.parameters) {\n var lParam = lMethod.parameters[p];\n if (!lParam.type) lParam.type = 'string';\n if (lParam.type == 'json') lParam.type = 'string';\n if (!lParam.location) {\n if (lMethod.path.indexOf(':'+lParam.name)>=0) {\n lParam.location = 'path';\n }\n else {\n lParam.location = 'query';\n }\n }\n if (lParam.location == 'boddy') lParam.location = 'body'; // ;)\n params[lParam.name] = lParam;\n delete lParam.name;\n delete lParam.input; // TODO checkbox to boolean?\n delete lParam.label;\n rename(lParam,'options','enum');\n }\n lMethod.parameters = params;\n if (Object.keys(params).length==0) delete lMethod.parameters;\n\n apiInfo.resources[eName].methods[mName] = lMethod;\n }\n\n }\n delete apiInfo.endpoints; // to keep size down\n return apiInfo;\n}", "title": "" }, { "docid": "5505b8f56095c6833cdb6e14cc97b17c", "score": "0.56008184", "text": "function loadAPI() {\n // wait for all classes to be loaded\n // on attend que les classes soient chargées\n if (checkApiLoading('loadAPI();',['OpenLayers','Geoportal','Geoportal.Viewer','Geoportal.Viewer.Default'])===false) {\n return;\n }\n\n // load API keys configuration, then load the interface\n // on charge la configuration de la clef API, puis on charge l'application\n Geoportal.GeoRMHandler.getConfig(['nhf8wztv3m9wglcda6n6cbuf'], null,null, {\n onContractsComplete: initMap\n });\n}", "title": "" }, { "docid": "541c03cdc0d65f67dbbc57ef9f5604a7", "score": "0.5600147", "text": "function getPublicApi() {\n return {\n\n };\n }", "title": "" }, { "docid": "50db886f3924b600878d15aca6c17ef4", "score": "0.5599609", "text": "function getUPCFromAPI (name){\n const upcUrl=`https://api.upcitemdb.com/prod/trial/search?s=${name}&match_mode=0&type=product`\n\n $.getJSON(upcUrl, name, SearchUPC);\n}", "title": "" }, { "docid": "66825c11084b5227bf27a74c8dc47964", "score": "0.5598284", "text": "function getStringsFromApi() {\n return axios.get('/api/strings');\n}", "title": "" }, { "docid": "acd4d9ef6301fcb014f91bece3320fc0", "score": "0.5594769", "text": "getAPI(request, response) {\n let message = {};\n message.name = 'implementation pending';\n message.version = 'implementation pending';\n return response.jsonp(message);\n }", "title": "" }, { "docid": "4f534f30e73933e0e2d473dfe39ad009", "score": "0.55419135", "text": "function allResources(api) {\n var resources = [];\n var visitor = function (res) {\n resources.push(res);\n res.resources().forEach(function (x) { return visitor(x); });\n };\n api.resources().forEach(function (x) { return visitor(x); });\n return resources;\n}", "title": "" }, { "docid": "9134cf4e74172c4300a1d8074c54742b", "score": "0.5536348", "text": "function plugLocalAPIs() {\r\n\t\t\tif (app.is(\"IUsingLocalAPI\")) {\r\n\t\t\t\tvar lapiclient = new LocalAPIClient(app.getLocalAPIImportDefinition(),apiHubs);\r\n\t\t\t\tapp.setLocalAPIClient(lapiclient);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "b5bfd433d53b7ef666ed34ce5a372aaf", "score": "0.55243874", "text": "function getAPIEndPoints(key) {\n const API_URL = \"https://5dc588200bbd050014fb8ae1.mockapi.io\";\n\n const API_ENDPONTS = {\n GETUSERS: \"/assessment\"\n };\n return API_URL + API_ENDPONTS[key];\n}", "title": "" }, { "docid": "25cd0a1890946f7c0d909bda852ce49a", "score": "0.5523524", "text": "async function geonamesApi(destname) {\n const response = await fetch('http://api.geonames.org/searchJSON?q=' + destname + '&maxRows=10&username=yabski');\n try {\n return await response.json();\n } catch (e) {\n console.log('error', e);\n }\n}", "title": "" }, { "docid": "fb6ac21b33896d52f649e53f959e52fa", "score": "0.5522372", "text": "getAll() {\n let urlFull = this.controler;\n return BaseAPIConfig.get(urlFull);\n }", "title": "" }, { "docid": "c2e2fa19f8cec035d4e94e0c1a59257c", "score": "0.55167854", "text": "name() {\n return ['extract', 'extractVendors'];\n }", "title": "" }, { "docid": "c2e2fa19f8cec035d4e94e0c1a59257c", "score": "0.55167854", "text": "name() {\n return ['extract', 'extractVendors'];\n }", "title": "" }, { "docid": "31c519b53660befca6464ee0db7d79a9", "score": "0.5494135", "text": "function showStreams(name) {\n return(\"\" + api + name + \"\");\n}", "title": "" }, { "docid": "60295f1ec75f760e1a911840b6827714", "score": "0.54917824", "text": "function getapi(){\n\tif (window.location.protocol != \"https:\"){\n\t\treturn \"http://wev.se/etc/api\";\n\t} else{\n\t\treturn \"https://wev.se/etc/api\";\n\t}\n}", "title": "" }, { "docid": "d235b7ea06918aac91ca64132fdabd86", "score": "0.5483218", "text": "getAllApiServers() {\n return stores_SettingsStore__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getState().defaults.apiServer.filter(item => {\n // Remove all but the whitelisted ones\n let filteredApiServers = stores_SettingsStore__WEBPACK_IMPORTED_MODULE_7__[\"default\"].getState().settings.get(\"filteredApiServers\", []);\n\n if (filteredApiServers.length > 0) {\n // list may contain urls or regions\n if (filteredApiServers.indexOf(item.url) !== -1) return true;\n if (!!item.region && filteredApiServers.indexOf(item.region) !== -1) return true;\n return false;\n } else {\n return true;\n }\n });\n }", "title": "" }, { "docid": "5198de1011e3c7c58b197956560e76ed", "score": "0.5474308", "text": "function show_api(api) {\n $('.errors-grid .grid-row:not(.header)').hide();\n if (api === 'all') {\n $('.grid-row').show();\n } else {\n $('.errors-grid').find('div.' + api).each(function() {\n $(this).show();\n });\n }\n }", "title": "" }, { "docid": "ab6785b0b6e428f94e118a5ee6d3fe94", "score": "0.54725283", "text": "get EXTERNAL_API() {\n return ['setUsageMode',\n 'setBackupMode',\n 'setLocationMode',\n 'setUsageOptinHidden',\n ];\n }", "title": "" }, { "docid": "d6b538ba1b4e43f3819856dd5e49f552", "score": "0.5469586", "text": "function setApi() {\n api = 'http://api.openweathermap.org/data/2.5/weather?lat=' + lat + '&lon=' + lon + '&units=imperial&APPID=' + apiId;\n}", "title": "" }, { "docid": "b056150f139bd85bcb1237ed9d785d4c", "score": "0.54682934", "text": "getReleavantApis(category, qty = 3) {\n axios\n .get(`${apiBaseUrl}/entries?category=${category}`)\n .then((res) => {\n this.releavantApis = res.data.entries.slice(0, qty);\n this.show = true;\n })\n .catch(error =>\n console.error(\"Can't get the APIs\", error)\n );\n }", "title": "" }, { "docid": "8a1b43791b448765001ec8f36a1e8ac8", "score": "0.54420084", "text": "function makeAPICalls(command,search_param) {\n\tswitch (command) {\n\n\t\tcase 'my-tweets':\n\t\t\tvar twitterKeys = require('./keys.js').twitter;\n\t\t\tvar client = new Twitter(twitterKeys);\n\t\t\t// make GET request to Twitter API to get created date and tweets list\n\t\t\tclient.get('statuses/user_timeline',{count:20},function(error,data) {\n\t\t\t\tif (error) throw error;\n\t\t\t\tdata.forEach(function(tweet) {\n\t\t\t\t\tconsole.log(tweet.created_at);\n\t\t\t\t\tconsole.log(tweet.text);\n\t\t\t\t\tconsole.log('-------');\n\t\t\t\t})\n\t\t\t})\n\t\t\t// Note: Fewer than 20 tweets will be returned if the user has < 20 tweets total\n\t\t\tbreak;\n\n\t\tcase 'spotify-this-song':\n\t\t\tvar spotifyKeys = require('./keys.js').spotify;\n\t\t\tvar client = new Spotify(spotifyKeys);\n\t\t\t// if user did not input a song, ask user to enter a song and quit the program\n\t\t\tif (!search_param) {\n\t\t\t\tconsole.log('Please enter a song to search for!');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// make request to Spotify Search API to get artist, album, song name, and preview info\n\t\t\tclient.search({type:'track', limit:1, query:search_param},function(error,data) {\n\t\t\t\tif (error) throw error;\n\t\t\t\tconsole.log(\"Artist: \",data.tracks.items[0].album.artists[0].name);\n\t\t\t\tconsole.log(\"Album: \",data.tracks.items[0].album.name)\n\t\t\t\tconsole.log(\"Song Name: \",data.tracks.items[0].name);\n\t\t\t\tconsole.log(\"Preview Link: \",data.tracks.items[0].preview_url);\n\t\t\t})\n\t\t\tbreak;\n\n\t\tcase 'movie-this':\n\t\t\tvar APIkey = '5f6f94c9';\n\t\t\tvar movie_title;\n\t\t\t// if user did not input a movie, default to searching for Mr. Nobody\n\t\t\tif (!search_param) {\n\t\t\t\tsearch_param = 'Mr. Nobody';\n\t\t\t}\n\t\t\t// make GET request to OMDB API for movie info\n\t\t\tvar queryURL = 'http://www.omdbapi.com/?apikey=' + APIkey +\n\t\t\t\t'&t=' + search_param;\n\t\t\trequest.get(queryURL,function(error,response,body) {\n\t\t\t\tif (error) throw error;\n\t\t\t\tvar data = JSON.parse(body);\n\t\t\t\tconsole.log(\"Title: \",data.Title);\n\t\t\t\tconsole.log(\"Year Released: \",data.Year);\n\t\t\t\tconsole.log(\"IMDB Rating: \",data.Ratings[0].Value);\n\t\t\t\tconsole.log(\"Rotten Tomatoes Rating: \",data.Ratings[1].Value);\n\t\t\t\tconsole.log(\"Produced in: \",data.Country);\n\t\t\t\tconsole.log(\"Language: \",data.Language);\n\t\t\t\tconsole.log(\"Plot: \",data.Plot);\n\t\t\t\tconsole.log(\"Actors: \",data.Actors);\n\t\t\t});\n\t\t\tbreak;\n\n\t\tcase 'do-what-it-says':\n\t\t\t// read contents of random.text\n\t\t\tfs.readFile('random.txt','utf8',(err,data) => {\n\t\t\t\tif (err) throw err;\n\t\t\t\t// store the command and search parameter contained in random.txt\n\t\t\t\tvar command = data.split(',')[0];\n\t\t\t\tvar param = data.split(',')[1];\n\t\t\t\t// make recursive call\n\t\t\t\tmakeAPICalls(command,param);\n\t\t\t})\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tconsole.log('Please enter valid inputs!');\n\t}\n}", "title": "" }, { "docid": "0bcb462eb72e9538d2866be7d4765b7c", "score": "0.5441443", "text": "async function getApiImages(name) {\n const url = `https://api.unsplash.com/photos/random/?query=${name}`;\n const images = axios\n .get(url, {\n headers: {\n \"Accept-Version\": \"v1\",\n Authorization: `Client-ID ${process.env.unSplashKey}`,\n },\n })\n .then((res) => {\n cache.name = res.data;\n cache.name.default = false;\n return cache.name;\n })\n .catch((error) => {\n const defaultResponse = {\n image: \"assets/images/brian-mcgowan-weY3ecoNSZw-unsplash.jpg\",\n default: true,\n };\n return defaultResponse;\n });\n return images;\n}", "title": "" }, { "docid": "004b5bebd09485bf393b8b758b11224d", "score": "0.5440869", "text": "function urlMaker(nameArray) {\n var urls = new Array();\n for (var i = 0; i < userArray.length; i++) {\n var name = nameArray[i];\n //API Query to return JSON status information\n urls[i] = \"https://wind-bow.gomix.me/twitch-api/streams/\" + name + \"?callback=?\";\n }\n return urls;\n }", "title": "" }, { "docid": "e89bf8fb7bdf7725842c37387c9accbc", "score": "0.5433256", "text": "async loadApi(api){\n if(!gapi.client) throw \"Must call load first\";\n\n const doc = this.getDiscoveryDoc(api);\n return gapi.client.load(doc);\n }", "title": "" }, { "docid": "7af98733c0df9e28717694fcc87874e7", "score": "0.54316604", "text": "function getAccountsByPlatformName(req, res, next){\n var params = req.params;\n console.log('getAccountsByPlatformName', params.name)\n Account\n .find( {platform : params.name})\n \n .exec((err, accounts) => {\n if (err) return next(err);\n if (!accounts) return next({\n message: 'game not found.',\n status: 404\n });\n \n utils.sendJSONresponse(res, 200, accounts);\n });\n }", "title": "" }, { "docid": "ad4cb946840d06ac3d15f7fdba20d4df", "score": "0.5427997", "text": "function extractApiPathParts(pathname) {\n var api = apify(pathname.relativePath, '', pathname.extension);\n // return deduplicated array\n return _.uniq(api.split('.'));\n}", "title": "" }, { "docid": "de16b8a12a1262f4f0f2741a0ed196c9", "score": "0.5421427", "text": "async api_all({response}){\n\t\t// const leaderboard = await Leaderboards.all()\n\t\tconst leaderboard = await Database.from('leaderboards').orderBy('combo', 'desc')\n\n\t\treturn response.json(leaderboard)\t\n\t}", "title": "" }, { "docid": "6cda9ad683a765505660def473c684e7", "score": "0.54171747", "text": "get api() {\n\t\treturn this.tool.twitchapi\n\t}", "title": "" }, { "docid": "5b70f9a4dc8a115bad564f44e6f61dae", "score": "0.54114497", "text": "getApi(value) {\n\t\treturn fetch(`https://api.radio4000.com/v1/channels?title.icontains=${value}`)\n\t\t\t.then(res => res.json())\n\t\t\t.then( propositions => {\n\t\t\t\tthis.setState({propositions});\n\t\t\t});\n\t}", "title": "" }, { "docid": "ebec8fbcea69aabe3f8ea92f54b61a62", "score": "0.53983015", "text": "function handleApiSource(source) {\n setApiSource(allApi[source])\n }", "title": "" }, { "docid": "55de9c959660fad8ebab8294c86212c3", "score": "0.5380831", "text": "function breedAPICall() {\n\t$.ajax({\n\t\turl: dogAPIURL,\n\t\tmethod: \"GET\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/vnd.api+json\",\n\t\t\t\"Authorization\": rgKey,\n\t\t},\n\t}).then(function(response) {\n\t\tbreedPop(response);\n\t});\n}", "title": "" }, { "docid": "aa0b525caf4c1f56d857f9343017ee8f", "score": "0.53792435", "text": "function ApiClient() {\n\n}", "title": "" }, { "docid": "23dc817d7ef263307b9e8bc90e5a5516", "score": "0.5375175", "text": "function getHostnames() {\n api.send({\n \"Method\": \"SendHostname\"\n });\n}", "title": "" }, { "docid": "79454872d6734eb70d2942a62da1de30", "score": "0.5371187", "text": "async function copyAPI() {\n for (const pkg of packages) {\n const packageDir = glob.sync(path.resolve(root, `packages/**/${pkg}`))[0];\n\n await safeCopy(\n path.resolve(packageDir, `dist/${pkg}.api.json`),\n `./src/docs/api/${pkg}.api.json`\n );\n }\n}", "title": "" }, { "docid": "31f871a5b3752053c6ba502a75354dd4", "score": "0.53692305", "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": "a2fa881c3ad9f14dd707b0ee58f97bf0", "score": "0.5367223", "text": "function apiURL(service) { //Función para formar la ruta completa a la API \n return BaseApiUrl + service;\n}", "title": "" }, { "docid": "86de959f216b81aa362c7f5de38ecde9", "score": "0.53620625", "text": "function getLocalApi() {\n var api = [\n/* 'sin',\n 'cos',\n 'abs',\n 'sqrt', */\n 'color',\n 'size',\n 'colorMode',\n 'background',\n 'smooth',\n 'random',\n 'radians',\n 'stroke',\n 'point',\n 'noStroke',\n 'fill',\n 'beginShape',\n 'vertex',\n 'endShape'\n ];\n \n var tmpl = 'var ${method} = function() { return ${ctx}.${method}.apply(${ctx}, arguments); }';\n\n var cmds = [];\n for (var i = 0; i < api.length; i++) {\n var cmd = tmpl.replace(/\\${method}/g, api[i])\n .replace(/\\${ctx}/g, 'processing');\n cmds.push(cmd);\n }\n var localApi = cmds.join(';');\n // alert(localFns);\n return localApi;\n}", "title": "" }, { "docid": "05dae0f02a9575469840bbf943f42687", "score": "0.53568643", "text": "function Api(){\n}", "title": "" }, { "docid": "048ce934e3ea5269e5b4ee8fc8530d4d", "score": "0.5353472", "text": "requestApi(url) {\n return axios_1.default.get(url)\n .then(res => { return res.data; })\n .catch(err => { return err; });\n }", "title": "" }, { "docid": "85d02731e2428bc8cf7605e230ff74f8", "score": "0.5352276", "text": "getAll() {\n return axios.get(BuildUrl(this.apiPath)).pipe(ErrorOnBadStatus);\n }", "title": "" }, { "docid": "e5d2bfbd2a5e1779b8cc23301e0298ea", "score": "0.5343835", "text": "function compareNameWithApi(name, showsData) {\n\t\tlet newName;\n\t\tshowsData.forEach(({Title}) => {\n\t\t\tlet nameSplit = name.split(\" \");\n\t\t\tlet matches = 0;\n\t\t\tnameSplit.forEach(item => new RegExp(item, \"gi\").test(Title) ? matches += 1 : \"\");\n\t\t\tif(matches !== nameSplit.length) return;\n\t\t\tnewName = Title;\n\t\t});\n\t\treturn newName;\n\t}", "title": "" }, { "docid": "cc7ae0da0351a6b679a1352b85e37d11", "score": "0.53290194", "text": "function getMovies() {\n console.log(\"fetching api\");\n fetch(\"https://imdb8.p.rapidapi.com/title/get-most-popular-movies?purchaseCountry=US&homeCountry=US&currentCountry=US\", {\n\t \"method\": \"GET\",\n\t \"headers\": {\n\t\t \"x-rapidapi-host\": \"imdb8.p.rapidapi.com\",\n\t\t \"x-rapidapi-key\": RAPID_API_KEY\n }\n })\n .then((resp) => resp.json())\n .then(resp => resp.slice(0,5))\n .then(resp => {\n setTimeout(displayMovies(resp), 1) // wait 1 sec before calling the other api because the api only supports 5 calls in 1 second.\n })\n}", "title": "" }, { "docid": "d5d5238cfeda838ff03980c104eaa2d7", "score": "0.5321228", "text": "get EXTERNAL_API() {\n return ['updateA11ySettingsButtonVisibility',\n 'updateA11yNavigationButtonToggle'];\n }", "title": "" }, { "docid": "8f9b0b7ee0293711a8cdd6470c6c2cbb", "score": "0.53163576", "text": "fetchSuppliers(){\r\n return Api().get('/suppliers')\r\n }", "title": "" }, { "docid": "13e7f1351580b4b7aa2b7d3fd4c1a9c2", "score": "0.53073186", "text": "function startAPIRequests()\t{\n // Get app configuration.\n loadConfig().then(() => {\n // -> Get save data.\n afterConfigLoaded();\n loadVideoInformation().then(() => {\n // -> start requesting subs.\n requestSubs();\n });\n });\n}", "title": "" }, { "docid": "d2218767dd1b76a4d2bdee0b8643d6e7", "score": "0.5305062", "text": "function resourceListing(request, response) {\n var r = {\"apiVersion\" : apiVersion, \"swaggerVersion\": swaggerVersion, \"basePath\": basePath, \"apis\": []};\n\n for (var key in resources) {\n r.apis.push({\"path\": \"/\" + key, \"description\": \"none\"}); \n }\n\n response.header('Access-Control-Allow-Origin', \"*\");\n response.header(\"Access-Control-Allow-Methods\", \"GET, POST, DELETE, PUT\");\n response.header(\"Access-Control-Allow-Headers\", \"Content-Type\");\n response.header(\"Content-Type\", \"application/json; charset=utf-8\");\n\n response.write(JSON.stringify(r));\n response.end();\n}", "title": "" }, { "docid": "931b972a7e50abcfa1b34ec4a866e875", "score": "0.53046966", "text": "async function getApiJson() {\n let getApi = await fetch(url);\n\n if(getApi == undefined) {\n console.log('error');\n }\n\n let getJson = await getApi.json();\n\n if(getJson == undefined) {\n console.log('error');\n }\n\n findNames(getJson);\n\n}", "title": "" }, { "docid": "8f5460ba80df95a3a859f5771c9920eb", "score": "0.52994347", "text": "getall(){\nreturn this.get(Config.API_URL + Constant.AGENT_GETALL);\n}", "title": "" }, { "docid": "d980c7592d055c758a0d3d62a25390ad", "score": "0.5290344", "text": "function setApiUrl(entity, action) {\n switch(entity) {\n case \"track\":\n switch(action){\n case \"getAll\":\n return \"../api/track/getAll.php\";\n case 'getById':\n return \"../api/track/getById.php\";\n case 'search':\n return \"../api/track/search.php\";\n }\n break;\n case \"album\":\n switch(action){\n case \"getAll\":\n return \"../api/album/getAll.php\";\n case 'getById':\n return \"../api/album/getById.php\";\n case 'search':\n return \"../api/album/search.php\";\n }\n break;\n case \"artist\":\n switch(action){\n case \"getAll\":\n return \"../api/artist/getAll.php\";\n case 'getById':\n return \"../api/artist/getById.php\";\n case 'search':\n return \"../api/artist/search.php\";\n }\n break;\n case \"profile\":\n switch(action){\n case \"getProfile\":\n return \"../api/profile/get-profile.php\";\n case \"editProfile\":\n return \"../api/profile/edit-profile.php\";\n case \"changePassword\":\n return \"../api/profile/edit-password.php\";\n }\n break;\n case \"purchase\":\n switch(action){\n case \"createInvoice\":\n return \"../api/purchase/create-invoice.php\";\n }\n break;\n case \"user\":\n switch(action){\n case \"create\":\n return \"../api/user/create.php\";\n case \"validate\":\n return \"../api/user/validate.php\";\n case \"sign-out\":\n return \"../api/user/sign-out.php\";\n }\n break;\n }\n}", "title": "" }, { "docid": "a289399c6d41225555637e44baf224ff", "score": "0.5289325", "text": "get apiUrl() {\n return `http://${this.host}:${this.tempApiPort}/api`; // setups up the url that the api is located at and used as a shortcut for our fetch api scripts to retrieve data\n }", "title": "" }, { "docid": "6d9e345a7efc95134cf5e4fa26a70e7f", "score": "0.5284631", "text": "fetchServicesFromApi()\n {\n //all paths are configurable in 'config.js'\n const serviceCatalogAPI = bcConfig.urlBase + bcConfig.urlPathToREDCap + bcConfig.serviceCatalogApi;\n\n fetch(serviceCatalogAPI)\n .then(response => response.json())\n .then(jsondata => {\n this._jsondata = jsondata;//need this for searches\n this.parseJsonListOfServices(jsondata);\n if (this.fullServiceList) \n {\n this.setStateData(this.fullServiceList);\n }\n else\n {\n this.setStateData([]);\n }\n }).catch(err => this.setStateData([]));\n }", "title": "" }, { "docid": "9f677ebddd5c45aa9005c7dd19a9abc9", "score": "0.5283992", "text": "function genereateList() {\n channels.forEach(function(channel) {\n twitchAPI(channel);\n });\n}", "title": "" }, { "docid": "714f8b213f806d46633b9eb092ed4524", "score": "0.5281316", "text": "getWebApi() {\n if (!this.active) {\n return;\n }\n this.library.set(\n this.library.getNode('webApiSync'),\n true,\n {'force': true}\n );\n this.library.set(\n this.library.getNode('webApiLast'),\n new Date().toISOString().substring(0, 19) + '+00:00'\n );\n\n // get nukis\n this.adapter.log.silly('getWebApi(): Retrieving from Nuki Web API..');\n this.api.getSmartlocks()\n .then(this.processSmartLocksResponse.bind(this))\n .catch(err => {\n this.adapter.log.warn('getWebApi(): Error retrieving smartlocks: ' + err.message);\n });\n\n // get notifications\n this.api.getNotification().then(notifications => {\n this.library.readData('notifications', notifications, 'info');\n }).catch(err => {\n this.adapter.log.warn('getWebApi(): Error retrieving notifications: ' + err.message);\n });\n }", "title": "" }, { "docid": "93b4ecd6bdaa6f1a95f8adff9b6543e3", "score": "0.52780783", "text": "static apiRoute() {\n return 'api'\n }", "title": "" }, { "docid": "cae3db8f8b48f678f5b31bf5cc79ebdf", "score": "0.5274946", "text": "function GetApiPath() {\n return '/api/data/v9.0/';\n }", "title": "" }, { "docid": "63734e4e25fe6d45256958e40bef4fa0", "score": "0.52669895", "text": "async function requestUrls() {\n const apiUrl = \"https://cfw-takehome.developers.workers.dev/api/variants\";\n const res = await fetch(apiUrl);\n const json = await res.json();\n return [...json.variants];\n}", "title": "" }, { "docid": "dfcd7269b4d53f214103678baa86aa22", "score": "0.5259824", "text": "get api() {\n return this.fapp.api;\n }", "title": "" }, { "docid": "fc4fdea951ba077775ce58ec696e67cf", "score": "0.52529854", "text": "get api() {\n return getEnv(self).api;\n }", "title": "" }, { "docid": "61cb135c8b8b8307c59ff651760d90be", "score": "0.5250148", "text": "get APIBase() {\n return this[sApiBase];\n }", "title": "" }, { "docid": "eb904d346038a7338cc168fa46c42fae", "score": "0.52471054", "text": "getApis(count = 10) {\n axios.get(`${apiBaseUrl}/entries`)\n .then(res => {\n this.values = res.data.entries.slice(0, count);\n this.show = true;\n })\n .catch(error =>\n console.error(\"Can't get the APIs\", error)\n );\n\n }", "title": "" }, { "docid": "b5ea55722240334af2c1f16ef77bf4ca", "score": "0.5246338", "text": "function prepareAPIHubs() {\r\n\t\t\tvar i,arr = null;\r\n\t\t\t// client hubs\r\n\t\t\tif (BaseObject.is(options.PriorityLocalAPI, \"LocalAPI\")) {\r\n\t\t\t\tarr = [options.PriorityLocalAPI];\r\n\t\t\t} else if (BaseObject.is(options.PriorityLocalAPI, \"Array\")) {\r\n\t\t\t\tarr = options.PriorityLocalAPI;\r\n\t\t\t}\r\n\t\t\tif (arr != null && arr.length > 0) {\r\n\t\t\t\tfor (i = 0;i< arr.length;i++) {\r\n\t\t\t\t\tif (BaseObject.is(arr[i],\"LocalAPI\")) {\r\n\t\t\t\t\t\tapiHubs.unshift(arr[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarr = null;\r\n\t\t\tif (BaseObject.is(options.AdditionalLocalAPI, \"LocalAPI\")) {\r\n\t\t\t\tarr = [options.AdditionalLocalAPI];\r\n\t\t\t} else if (BaseObject.is(options.AdditionalLocalAPI, \"Array\")) {\r\n\t\t\t\tarr = options.AdditionalLocalAPI;\r\n\t\t\t}\r\n\t\t\tif (arr != null && arr.length > 0) {\r\n\t\t\t\tfor (i = 0;i< arr.length;i++) {\r\n\t\t\t\t\tif (BaseObject.is(arr[i],\"LocalAPI\")) {\r\n\t\t\t\t\t\tapiHubs.push(arr[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// server hubs\r\n\t\t\tif (BaseObject.is(options.RegisterInLocalAPIHub, \"LocalAPI\")) {\r\n\t\t\t\tapiHubsServe = [options.RegisterInLocalAPIHub];\r\n\t\t\t}\r\n\t\t}", "title": "" } ]
0d835e86093d0d739e9e0b3bac7ad606
pushes new mover object into the movers array
[ { "docid": "1d1110ba7be06daabb165bfd333b05fe", "score": "0.679803", "text": "function newMover(_mass, _x, _y, _velX, _velY) { \t\n mover = new Mover(_mass, _x, _y, _velX, _velY);\n movers.push(mover);\n}", "title": "" } ]
[ { "docid": "d16f42784a475b14ecc244f0cbb17e78", "score": "0.6771733", "text": "function reset() {\n for (var i = 0; i < 1; i++) {\n movers[i] = new Mover(1, 20, 20, 1, 0); \n }\n}", "title": "" }, { "docid": "24e1afe14b41d1d764b2aeac878b0a7c", "score": "0.655124", "text": "function mover() {\n current[\"board\"][desiredPeg].push(current[\"board\"][originPeg].pop());\n\n current.moves += 1;\n\n console.log(\"Your move #\" + current.moves + \" was successful. Board is now: \");\n\n printBoard();\n\n if (checkWinner()) {\n promptPlayAgain();\n };\n }", "title": "" }, { "docid": "3a5b70b27c7eb3c63b69245156154d3d", "score": "0.6164401", "text": "function reset() {\n for (let i = 0; i < 9; i++) {\n movers[i] = new Mover(40 + i * 70, 0, random(0.5, 3));\n }\n}", "title": "" }, { "docid": "173dd385b323f63ab8a88ad5888799e3", "score": "0.6110005", "text": "function Mover() {\n Item.call(this);\n}", "title": "" }, { "docid": "173dd385b323f63ab8a88ad5888799e3", "score": "0.6110005", "text": "function Mover() {\n Item.call(this);\n}", "title": "" }, { "docid": "36df78fc6ed9b767c9c024761aa56657", "score": "0.6097283", "text": "function reset() {\r\n for (var i = 0; i < count; i++) {\r\n movers[i] = new Mover(random(0.5, 15), w/2,-random(400))//random(h), random(w))//40+i*70, 0);\r\n }\r\n}", "title": "" }, { "docid": "32005ed32131e04c60cc6c10a5b85845", "score": "0.5925167", "text": "function AddRandomMover(id) {\n var mass = random(options.MIN_MASS, options.MAX_MASS);\n\n var max_distance = parseFloat(1000 / options.DENSITY);\n var max_speed = parseFloat(options.START_SPEED);\n\n var vel = new THREE.Vector3(\n random(-max_speed, max_speed),\n random(-max_speed, max_speed),\n random(-max_speed, max_speed));\n\n var loc = new THREE.Vector3(\n random(-max_distance, max_distance),\n random(-max_distance, max_distance),\n random(-max_distance, max_distance));\n\n //movers.push(new Mover(mass, vel, loc, id));\n //addClickButtonEvent(id);\n\n var newMover = new Mover(mass, vel, loc, id);\n newMover.addToMovers();\n}", "title": "" }, { "docid": "a8bc0594e8e445a6542051c56f52294c", "score": "0.5894201", "text": "function mover() {\n\t\tmoveIt(this);\n\t}", "title": "" }, { "docid": "873187a66b643608b04f161a70c41250", "score": "0.58698046", "text": "function Mover(opt_options) {\n Item.call(this);\n}", "title": "" }, { "docid": "1ecc1de5328943397b04f1ee7abbf92f", "score": "0.56384057", "text": "function mover() {\n ctx.fillStyle = 'rgba(0,0,0,0.30)';\n ctx.fillRect(0,0,width,height);\n //sacamos todas las bolas del array\n for(var i = 0; i < bolas.length; i++) {\n bolas[i].dibujar();\n bolas[i].modificar();\n }\n\n window.requestAnimationFrame(mover);\n}", "title": "" }, { "docid": "dcae781daf545fea4556ac01fb18482c", "score": "0.55773145", "text": "function makeOne() {\r\n pacMen.push(makePac()); \r\n}", "title": "" }, { "docid": "260d7bbfdebbc1c26c6c8301e33eb33a", "score": "0.5536395", "text": "function addMines() {\n var i;\n var mine;\n mines = [];\n\n // Create an array of mine objects\n for (i = 0; i < options.gameSize; i++) {\n mine = new Mine();\n mines.push(mine);\n }\n\n // Clear any leftover mines from the board\n element.squares.removeClass('mines');\n\n // Place the new mines on the board\n for (i = 0; i < mines.length; i++) {\n element.game.find(\"[data-x=\" + mines[i].x + \"]\" + \"[data-y=\" + mines[i].y + \"]\").addClass('mine');\n }\n }", "title": "" }, { "docid": "d67f2b7efd81f4514dc24b792e2d4e1b", "score": "0.5519396", "text": "addToOverlapper(name, objects)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(objects.constructor === Array){\n\t\t\t\t\t\n\t\t\t\t\tfor(var i = 0; i < objects.length; i++){\n\t\t\t\t\t\tthis.overlappers[name].otherDynamic.push(objects[i]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tthis.overlappers[name].otherDynamic.push(objects);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}", "title": "" }, { "docid": "fb26bc114283245577f3f49d79b065d3", "score": "0.5493634", "text": "addMove(p, to, prom, castle, ep, v) {\n if ((p < 0) || (p >= 64) || (to < 0) || (to >= 64)) {\n return;\n }\n if (v.length >= C.MAX_LENGTH_MOVELIST) {\n //\n // Woah! This should never happen (according to the good people\n // at chessbase ;-)\n //\n\t alert(\"Too many moves for list\");\n\t return;\n }\n\tvar mv = new Move(p, to);\n\tmv.setPromotedTo(prom);\n\tmv.setCastling(castle);\n\tmv.setEP(ep);\n v.push(mv);\n }", "title": "" }, { "docid": "7d69330338123fd972fbca7e892d9013", "score": "0.54738015", "text": "addMines() {\n var mineLocations = []\n while (mineLocations.length < this.mines) {\n var randomLocation = _.random(this.spots.length - 1)\n if (mineLocations.indexOf(randomLocation) === -1) {\n mineLocations.push(randomLocation)\n }\n }\n\n // add the mines to the board\n for (var i = 0; i < mineLocations.length; i++) {\n this.spots[mineLocations[i]].mine = true\n }\n }", "title": "" }, { "docid": "b6e8b3aee99184b55322c4150de0a9f4", "score": "0.5424054", "text": "add(pokemon){\n this.pokemon.push(pokemon)\n }", "title": "" }, { "docid": "d6119c9626856eee4cfcb210d03116e6", "score": "0.5416633", "text": "push(object) {\n let x = [];\n x[0] = object;\n for (let i = 0; i < this.source.length; i++) {\n x.push(this.source[i]);\n }\n this.source = x;\n }", "title": "" }, { "docid": "3c55a4283ae5916cd57a85f7e091972e", "score": "0.53972447", "text": "function mouseDragged() {\n population.push(new Vehicle(mouseX, mouseY));\n}", "title": "" }, { "docid": "c08fc21dd30fbfb6cbd15c99ef5650de", "score": "0.53832483", "text": "function newEnemies() {\n var enemy = new Enemy();\n allEnemies.push(enemy);\n}", "title": "" }, { "docid": "dba6cfaba69654893b33ae94a82f908b", "score": "0.5379213", "text": "add(){\n\t\teffects.push(this);\n\t}", "title": "" }, { "docid": "ad8c9a5c23fdaa70edef384468693d33", "score": "0.53581953", "text": "addProperty(newLocation, flood){\n newLocation.flood = flood;\n\n this.addCrime(newLocation);\n\n const oldState = this.state\n oldState.locations.push(newLocation)\n this.setState(oldState, () => {\n });\n // reset propertyValues of state\n this.addPropertyValues(newLocation);\n // reset population of state\n this.addPopulation(newLocation);\n }", "title": "" }, { "docid": "37ae6181bb951272d74971bea4fd1624", "score": "0.53188", "text": "function mouseUpEvtListener( evt ){\n if(moverId){\n var curX = parseInt(document.getElementById( moverId )\n .getAttribute( \"x\" )),\n curY = parseInt(document.getElementById( moverId )\n .getAttribute( \"y\" )),\n hit = checkHit( curX, curY );\n\n if( hit ){\n var moverEle = document.getElementById( moverId );\n moverEle.setAttribute( \"width\", \"75\" );\n moverEle.setAttribute( \"height\", \"75\" );\n moverEle.setAttribute( \"x\", \"500\" );\n moverEle.setAttribute( \"y\", \"250\" );\n throwCard( moverId );\n moverId = undefined;\n } else{\n // if not on a pile\n var moverEle = document.getElementById( moverId );\n moverEle.setAttribute( \"width\", \"75\" );\n moverEle.setAttribute( \"height\", \"75\" );\n moverEle.setAttribute( \"x\", myX );\n moverEle.setAttribute( \"y\", myY );\n moverId = undefined;\n }\n }\n}", "title": "" }, { "docid": "525e33f04ee81523318245779b31f372", "score": "0.5315421", "text": "popMonster() {\n // Récupère le premier monstre du tableau d'apparition\n const monster = this._monstersToPop.pop();\n // S'il reste des monstres de la vague à lancer sur la carte\n if (monster) {\n C.LOG_WAVE && console.log(`%cVague ${this.waveNumber} Apparition du monstre`, LogStyles.alert);\n monster.initialPosition();\n // Le monstre est à présent sur la carte\n this._monstersInMap.push(monster);\n }\n }", "title": "" }, { "docid": "d1d52a6a16c8d8d9f676d8a214e390b3", "score": "0.5290417", "text": "function pushLaser() {\n\tif (firedArr.length < 4) {\n\tfiredArr.push(new PlayerShoot());\n\t}\n}", "title": "" }, { "docid": "db91a4b22bc305c7cffa11da0e0f504b", "score": "0.5263528", "text": "push(item) {\n this.#stack.push(item);\n\n\n }", "title": "" }, { "docid": "07c031ba666d81a01284bfe3348565df", "score": "0.5232693", "text": "set lastest(mov) {\n this.movements.push(mov);\n }", "title": "" }, { "docid": "2d2273eb716d8196f1ddaa701696e5f0", "score": "0.52320474", "text": "new_top_layer (inter) {\r\n this.layers.push(inter);\r\n }", "title": "" }, { "docid": "53960f11861c02ce0c13752c3a731d8f", "score": "0.5210774", "text": "function mousePressed() {\n objects.push(new Objects(mouseX,mouseY));\n}", "title": "" }, { "docid": "d501ee4b12372caa57c271b9134f205b", "score": "0.5201626", "text": "onMove(callback) {\r\n this.moveArray.push(callback);\r\n }", "title": "" }, { "docid": "429e7ef475cf411dce812a6574384fce", "score": "0.51975423", "text": "function newBall2() {\n var ball = new Ball(100, 0, 10);\n balls.push(ball);\n}", "title": "" }, { "docid": "3d8d12b93eef78c36ac98dea16200d4c", "score": "0.51769304", "text": "function newLevel() {\n balloonStore = [];\n loadBalloons();\n numOfCollisions = 0;\n p1Cord = spawnPlayer();\n person1 = new Person(p1Cord.x, p1Cord.y, p1Cord.flipped, \"WALK\");\n person2 = new Person(200,200,1,\"STAND\");\n people = [person1, person2];\n}", "title": "" }, { "docid": "3e4b7add4e95cf3961d74df1cf8a9d2b", "score": "0.5157828", "text": "animate(t) {\n\n let new_moves = [];\n\n for (let i = 0; i < this.moves.length; i++) {\n if (this.moves[i].animate(t))\n new_moves.push(this.moves[i])\n }\n\n this.moves = new_moves;\n }", "title": "" }, { "docid": "47a204a1c41c93165f645b2f6fc3d4a6", "score": "0.5157819", "text": "addElement(objClass) {\n var elementSpots = GAME_WIDTH / ITEM_WIDTH;\n var objectList = listMap[objClass.name];\n\n var elementSpot;\n // Keep looping until we find a free enemy spot at random\n while (elementSpot == undefined || objectList[elementSpot]) {\n elementSpot = Math.floor(Math.random() * elementSpots);\n }\n\n objectList[elementSpot] = new objClass(elementSpot * ITEM_WIDTH);\n }", "title": "" }, { "docid": "9fa6c81080bfd2755815ccc5ee71ff4b", "score": "0.5155129", "text": "addToy(toy) {\n this.toys.push(toy)\n return this.toys\n}", "title": "" }, { "docid": "efb7d42cc503a04882323167f5914e3f", "score": "0.5147745", "text": "put(piece){\n\t\tthis.pieces.push(piece);\n\t\tthis.turn++;\n\t}", "title": "" }, { "docid": "5de5c4e310d741f1bf01ab8c2c78da00", "score": "0.5146368", "text": "function newGearObjects(){\n // bottom gears\n var gear0size = 250*divwidth/divheight;\n var gear1size = 250*divwidth/divheight;\n // left gears\n var gear2size = 200*divwidth/divheight;\n var gear3size = 200*divwidth/divheight;\n // right gears\n var gear4size = 250*divwidth/divheight;\n var gear5size = 200*divwidth/divheight;\n\n var gear0xpos = divwidth/2 - 0.15*divwidth;\n var gear1xpos = divwidth/2 + 0.15*divwidth;\n var gear2xpos = divwidth/2 - 0.15*divwidth;\n var gear3xpos = divwidth/2 - 0.4*divwidth;\n var gear4xpos = divwidth/2 + 0.13*divwidth;\n var gear5xpos = divwidth/2 + 0.41*divwidth;\n\n var gear0ypos = divheight/2 + 0.21*divheight;\n var gear1ypos = divheight/2 + 0.235*divheight;\n var gear2ypos = divheight/2 - 0.30*divheight;\n var gear3ypos = divheight/2 - 0.15 *divheight;\n var gear4ypos = divheight/2 - 0.21*divheight;\n var gear5ypos = divheight/2 - 0.105*divheight;\n\n gearObject0 = new Gear(gear0xpos, gear0ypos, 5, gear0size, gear0size);\n gearObject1 = new Gear(gear1xpos, gear1ypos, 4, gear1size, gear1size);\n gearObject2 = new Gear(gear2xpos, gear2ypos, 2, gear2size, gear2size);\n gearObject3 = new Gear(gear3xpos, gear3ypos, 3, gear3size, gear3size);\n gearObject4 = new Gear(gear4xpos, gear4ypos, 0, gear4size, gear4size);\n gearObject5 = new Gear(gear5xpos, gear5ypos, 1, gear5size, gear5size);\n}", "title": "" }, { "docid": "cb58868859266bcb6c119ecc6ae19905", "score": "0.51391834", "text": "function newBall3() {\n var ball = new Ball(500, 0, 10);\n balls.push(ball);\n}", "title": "" }, { "docid": "e63dcc4b5f4328bc2876091bfb1bf804", "score": "0.51263", "text": "push(element){\n this.items[this.topIndex]=element;\n this.topIndex++;\n }", "title": "" }, { "docid": "63ea918e723afa9502e0820d479c7913", "score": "0.5121708", "text": "function addNewEnemyShip(enemyShip){\n\tGame.enemyShips.push(enemyShip);\n}", "title": "" }, { "docid": "299f4f1e4ce16dc97acb97a9afd828b1", "score": "0.5119189", "text": "_pushOverlay() {\n OverlayManager.push(this);\n }", "title": "" }, { "docid": "5daec6932857f9fa1b6fe38cef817a0f", "score": "0.5118054", "text": "shoot(ammo) {\n this.ammos.push(ammo);\n }", "title": "" }, { "docid": "a731704c8aba7cff616bc4a42b9848e9", "score": "0.5104829", "text": "function setEnemies() {\n for(var i=0; i<enemiesQty; i++) {\n allEnemies.push(new Enemy());\n }\n}", "title": "" }, { "docid": "5d6086a0fe78edda1f1fc0902e9faa07", "score": "0.5087933", "text": "function trackingRover(rover){\n let newPosition = {x: rover.x, y: rover.y};\n rover.travelLog.push(newPosition);\n}", "title": "" }, { "docid": "87f919bad2c87330d3b6278553cec5a1", "score": "0.50878555", "text": "function removeMover() {\n\tmovers.splice(0,1);\n}", "title": "" }, { "docid": "7807f7088a4f6fe738df71e5d1d9b53b", "score": "0.50829136", "text": "function updateEnemyVue(newPos){\n missileVueEnemy.push(new missileToEnemy(newPos.posX,newPos.word,false));\n}", "title": "" }, { "docid": "2fa9ff50677c18de2bcf7c1e5b65953c", "score": "0.50788504", "text": "addRecentState(state) {\n this.stateArray.push(state)\n }", "title": "" }, { "docid": "198c67e2a462de9ca39db3aa900b7ca5", "score": "0.50781244", "text": "function newBall() {\n var ball = new Ball(300, 0, 10);\n balls.push(ball);\n}", "title": "" }, { "docid": "e1e248ed8c52acc3559536891d071477", "score": "0.50703084", "text": "function Mover (canvas,color,m,x,y,velX,velY){\n\t\tthis.location = new Vector2d(\n\t\t\tx,\n\t\t\ty\n\t\t\t);\n\t\tthis.velocity = new Vector2d(\n\t\t\tvelX,\n\t\t\tvelY\n\t\t\t);\n\t\tthis.acceleration = new Vector2d(\n\t\t\t0,\n\t\t\t0\n\t\t\t);\n\t\tthis.topSpeed = 10;\n\t\tthis.mass = m;\n\t\tthis.color = color;\n\t}", "title": "" }, { "docid": "8e37eccb14cd269bbb7cdd131d724a28", "score": "0.5062523", "text": "function mouseMoveEvtListener( evt ){\n if( moverId ){\n var moverEle = document.getElementById( moverId );\n\n //actually move the piece\n moverEle.setAttribute( \"width\", \"100\" );\n moverEle.setAttribute( \"height\", \"100\" );\n moverEle.setAttribute( \"x\", evt.clientX );\n moverEle.setAttribute( \"y\", evt.clientY );\n }\n}", "title": "" }, { "docid": "ec728371c6496dd1106c570d9d0347d3", "score": "0.5059479", "text": "playerPlacement() {\n const previewState = this.state.preview;\n if (previewState.isPreviewValid && this.state.shipsPositioned !== 5) {\n let ship = this.createShip(this.state.shipsPositioned);\n ship.coordinates = previewState.previewArray;\n let humanStateClone = Object.assign({}, this.state.human);\n humanStateClone.playerBoard.fleet.push(ship);\n this.setState({ human: humanStateClone });\n this.setState((state) => {\n return { shipsPositioned: state.shipsPositioned + 1 };\n });\n }\n }", "title": "" }, { "docid": "e524c645c314537dc695edf8604bfe9e", "score": "0.5052292", "text": "function pushMonToDOM() {\n if (questionCounter >= questionMax) {\n gameContainer.classList.add(\"d-none\");\n endResult.classList.remove(\"d-none\");\n gameOver();\n }\n\n currentMon = [];\n currentMon.push(...pokeData.slice(0, 4));\n\n questionCounter++;\n questionData.innerText = `${questionCounter}/${questionMax}`;\n scoreData.innerText = `${scoreCounter}`;\n\n generateNewPokemon();\n}", "title": "" }, { "docid": "7af5b1683d427729eeb18d434ad7dff3", "score": "0.5045378", "text": "function setup() {\n createCanvas(window.innerWidth, window.innerHeight)\n colorMode(HSB);\n\n for (let i = 0; i < 1000; i++) {\n movers.push(new Mover({\n location: createVector(random(0, width), random(0, height)),\n velocity: createVector(0, 0),\n acceleration: createVector(-0.001, 0.001)\n }))\n }\n}", "title": "" }, { "docid": "9950345a7d2d916c1fff1c5ad4e82bd7", "score": "0.5040227", "text": "function addNewEnemy() {\n\n allEnemies.push(new Enemy(enemyStartPos[getRandomInt(0,2)], enemyRows[getRandomInt(0,2)], speeds[getRandomInt(0,4)]));\n}", "title": "" }, { "docid": "f9bda2bb7a938ef547a231fa547da2c5", "score": "0.5038995", "text": "push(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "f9bda2bb7a938ef547a231fa547da2c5", "score": "0.5038995", "text": "push(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "b7c1029aa1ee25e5417d01734d21e614", "score": "0.50374174", "text": "push(item) {\n // push item into the items\n this.items.push(item);\n }", "title": "" }, { "docid": "cf0e2a57db869c210bd3b148c3eb0b09", "score": "0.50292885", "text": "addHistory(piece) {\n this.history.push({ row : piece.row, col : piece.col});\n }", "title": "" }, { "docid": "cc10afc3f56ad401b265c1de38472fa9", "score": "0.502912", "text": "function movetoRoundInfo() {\n\ttry{\n\t\tvar\tparams=$('#edit_round_player_p').data('params');\n\t\tvar\trd=params['item'];\n\t\t\n\t\tvar\tpl=$('#edit_round_player_p').data('player_list');\n\t\tvar\tplb=pl.getbody();\n\t\tvar\tmax=pl.cnt();\n\t\tif (max > 4) {\n\t\t\tmax = 4;\n\t\t}\n\t\trd.max_players=max;\n\t\t\n\t\tvar\tc = rd.pars.length;\n\n\t\trd.scores=new Array();\n\t\t\n\t\tfor(var i in plb) {\n\t\t\tvar\tp = plb[i];\n\t\t\t\n\t\t\tvar\tscoredata = new Score();\n\t\t\tscoredata.player = p;\n\t\t\tscoredata.holescores = new Array();\n\t\t\t\n\t\t\tfor(var i=0; i < c; i ++){\n\t\t\t\tvar\thscore = new HoleScore();\n\t\t\t\thscore.holenum = i + 1;\n\t\t\t\tscoredata.holescores.push(hscore);\n\t\t\t}\n\t\t\t\n\t\t\trd.scores.push(scoredata);\n\t\t\t\n\t\t\tmax --;\n\t\t}\n\t}catch(e){l(e);}\n\t\n\tvar\tevent = {data:{page:'#edit_round_info_p', params:{item:rd}}};\n\tmoveto(event);\n}", "title": "" }, { "docid": "6883048ed56d7f57ebb784b79fe26112", "score": "0.50288314", "text": "function updatePlayerNewPos(newPos){\n allPlayers[username].push(new missile(newPos.posX,newPos.word,true));\n}", "title": "" }, { "docid": "6320b8e0a139bc94c818ba52abde62c4", "score": "0.50257736", "text": "addObject (x,y) {\r\n this.deselectAll()\r\n this.state.objects.push({ name: \"Change this\" , topic: \"\" , x: x, y:y , objType : this.state.mode, selected : 0, connectedConnections : []})\r\n this.forceUpdate()\r\n }", "title": "" }, { "docid": "2282c6c1d7a38efe4b3c46a53b5bebb3", "score": "0.5012561", "text": "function moverFactory(line, column) {\n const mover = {\n line,\n column,\n el: null,\n ground: blockSettings.grass,\n map: mapFactory(),\n\n /**\n * Moves the mover block.\n *\n * @param {Number} linePos Destination line position.\n * @param {Number} columnPos Destination column position.\n */\n move(linePos, columnPos) {\n const groundBlock = this.map.getBlock(linePos, columnPos);\n if (groundBlock && groundBlock.canMoveOver()) {\n groundBlock.moveOverBefore(this);\n animate(this);\n groundBlock.moveOverAfter(this);\n }\n }\n };\n\n /**\n * Animate the mover block.\n *\n * @param {Object} block Mover block.\n */\n function animate(block) {\n block.el.style.left = `${block.column * themeSettings.width}px`;\n block.el.style.top = `${block.line * themeSettings.width}px`;\n }\n\n return mover;\n}", "title": "" }, { "docid": "1a34e8b4afddd1ae2778b73ba1d70e8f", "score": "0.5012205", "text": "function moveMissiles() { \n for (let i = 0; i < missiles.length; i++) {\n missiles[i].top = missiles[i].top - 10;\n }\n}", "title": "" }, { "docid": "bb19c978f1582a9dd33298797e57f6fe", "score": "0.50098103", "text": "mover(dirX,dirY) {\n for (let i in gusano.piezas) {\n if (i == 0) {\n\n let cabeza = gusano.piezas[0];\n let cabezaX = cabeza.getPosicionX();\n let cabezaY = cabeza.getPosicionY();\n\n //guardamos su posicion antes de mover\n cabeza.anteriorPosicionX = cabezaX;\n cabeza.anteriorPosicionY = cabezaY;\n\n //movemos\n cabeza.setPosicionX(cabezaX + dirX);\n cabeza.setPosicionY(cabezaY + dirY);\n\n } else {\n let actual = gusano.piezas[i];//la pieza del gusano sobre la que actuamos\n let piezanterior = gusano.piezas[i - 1];//la pieza que se mueve antes que la actual\n\n let anteriorX = piezanterior.getAnteriorX();//la posicionX que tenia la pieza anterior antes de moverse\n let anteriorY = piezanterior.getAnteriorY();//la posicionY que tenia la pieza anterior antes de moverse\n\n actual.setAnteriorX(actual.getPosicionX());//guardamos la posicionX de la pieza actual antes de moverlo para que el que le sigue sepa donde ponerse\n actual.setAnteriorY(actual.getPosicionY());//guardamos la posicionY de la pieza actal antes de moverlo para que el que le sigue sepa donde ponerse\n\n actual.setPosicionX(anteriorX);//le cambiamos la posicion por la que tenia su anterior antes de moverse\n actual.setPosicionY(anteriorY);//le cambiamos la posicion por la que tenia su anterior antes de moverse\n }\n }\n }", "title": "" }, { "docid": "5941e8f2e370ceafd23389ea1a03223b", "score": "0.50096065", "text": "crossover(partner) {\n let child = new Monkey(this.target);\n // This is the number of genes this monkey will pass to the child, \n // the rest of the genes will be passed from the other parent\n let midpoint = Math.floor(Math.random() * (this.target.length - 1));\n for (let i = 0; i < this.target.length; i++) {\n if (i > midpoint) {\n child.genes[i] = this.genes[i];\n } else {\n child.genes[i] = partner.genes[i];\n }\n }\n return child;\n }", "title": "" }, { "docid": "1ecef0ecd5dbdd70787e6a831c180562", "score": "0.50015587", "text": "spawnPlane(xLoc, yLoc) {\n this.array.push(new EnemyPlane(xLoc,yLoc));\n }", "title": "" }, { "docid": "c4e2c1345bd60772ff5cf252e6463987", "score": "0.5001261", "text": "function addEnemy() {\n let enemy = new Enemy(enemyPosX, enemyPosY(), enemySprite, enemySpeed(), player);\n allEnemies.push(enemy);\n}", "title": "" }, { "docid": "0cc7ad8b928e5269fd179b32b9e87e95", "score": "0.49986887", "text": "addToRed(){\n redTeam.push(this);\n }", "title": "" }, { "docid": "f2811f1e7e628c28c262b6448a812a0c", "score": "0.49896166", "text": "pushPos() {\n this._posStack.push({\n pos: Object.assign({}, this._pos),\n angle: this._dirAngle\n });\n }", "title": "" }, { "docid": "66c103727590ae77b6558f6f5bb4549d", "score": "0.49834326", "text": "function addToStack(object) {\r\n stack.push(object);\r\n }", "title": "" }, { "docid": "7d865f3bc318a3ef5c0b090979ebf408", "score": "0.49702847", "text": "push(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "bbf524d7708a4e34084f81b664bdb993", "score": "0.49689144", "text": "push(item) {\n this.stack.push(item);\n if (this.maxesStack.peek() === null || item >= this.maxesStack.peek()) {\n this.maxesStack.push(item);\n }\n }", "title": "" }, { "docid": "60cd46c97395e1952dae87b043bcd980", "score": "0.49672028", "text": "increaseMoves() {\n for(var i = 0; i < increaseMovesBy; i++) {\n this.directions.push(this.getRandomDirection());\n }\n }", "title": "" }, { "docid": "fd787c3bb993d286854ff6754d874328", "score": "0.49653563", "text": "push(item) {\n this.items.push(item);\n }", "title": "" }, { "docid": "0a71fc527057b637bdc07ac1ef1fea69", "score": "0.4965153", "text": "reproduce(matingPool) \n {\n //Set the new array for the new offspring\n let newPopulation = new Array(this.popSize);\n\n //Using the crossover function cross matingPool A and matingPool B\n for(let i = 0; i < this.popSize; i++) \n {\n let a = int(random(this.popSize));\n let b = int(random(this.popSize));\n\n newPopulation[i] = this.crossover(matingPool[a], matingPool[b]);\n }\n\n return newPopulation;\n }", "title": "" }, { "docid": "7581de4a924ff276452cb9da0cfa1a12", "score": "0.49648488", "text": "push(element) {\n this.data[this.top] = element;\n this.top = this.top + 1;\n }", "title": "" }, { "docid": "6ee4687ea3b3d1e41b139a71626c0187", "score": "0.49637446", "text": "updateMoves(move) {\n this.savedMoves.push(move);\n if (this.savedMoves.length > 30) {\n this.savedMoves.shift()\n }\n }", "title": "" }, { "docid": "0752004f0dd8d95117e3042cfe016990", "score": "0.49525908", "text": "function mousePressed(){\n if(newBall != null){\n balls.push(newBall);\n newBall = null;\n }\n}", "title": "" }, { "docid": "a5c29200064cce5d2f365c4bef3be3cf", "score": "0.49436897", "text": "constructor(){\n this.score = 0;\n this.lives = 3;\n this.isStarted = false;\n this.n_moles = 5;\n this.moles_arr = [];\n for(let i=0; i<this.n_moles; i++){\n var mole = new Mole(i, maxTimer, multFactor);\n this.moles_arr.push(mole);\n }\n }", "title": "" }, { "docid": "e586136caedde6eae5fd859810022f03", "score": "0.4942861", "text": "equip(item) {\n this.playerInventory.push(item);\n }", "title": "" }, { "docid": "0911f800c6979d45f6a02b90773f491d", "score": "0.4941599", "text": "addDragoverAction(callback) {\n this.dragOverActions.push(callback);\n }", "title": "" }, { "docid": "f16efa7edddaabced8d08bbcf1410105", "score": "0.4940233", "text": "add(obj) {\n this.objs.push(obj);\n this.arrowHelper.visible = true;\n }", "title": "" }, { "docid": "86247e21cffb595555cb32bd780c6f94", "score": "0.49321356", "text": "function newOverworld(side=\"\"){\n\tlet mset = makeOverworld(side,[4,10]);\n\tmap = map2Box(mset['map']);\n\tworld_doors = mset['doors'];\n\tmap_obj = [];\n\n\t//place kyle at center\n\tkyle.x = Math.floor(map[0].length/2);\n\tkyle.y = Math.floor(map.length/2);\n\n\tfreezeCamera = false;\n\tpanCamera();\n\n\t//add monsters\n\tlet nofloor = [kyle.x+\"-\"+kyle.y];\n\tcurMonsters = monsterWorld(map,nofloor);\n\n\tcurTxt = \"Welcome to the ROGUELIKE Template!\";\n\n\tkyle.stats['int'] = 10;\n\n\tsavedOverWorld['map'] = copy2d(map);\n\tsavedOverWorld['doors'] = copy2d(world_doors);\n}", "title": "" }, { "docid": "3478abbece7d893f2685bfa9341ee9c0", "score": "0.49315235", "text": "function AddSpecialMoverFromMesh2(mass, mesh, name, options) {\n\t\n\tvar options = options || {};\n var colorHex = options.colorHex || null;\n\tvar vel = options.vel || new THREE.Vector3(0, 0, 0);\n\tconsole.log(options);\n\t\n\tif(!mass)\n\t\tmass = options.SPECIFIC_MASS;\n \n\tif(!mesh)\n\t\tloc = new THREE.Vector3(0, 0, 0);\n\telse loc = mesh.position;\n\t\n\tif(!name)\n\t\tname = 's';\n\n //name = movers.length + 'Big'\n big = new Mover(mass, vel, loc, movers.length, name, mesh, null, colorHex);\n //big.mesh.material.transparent = true;\n //big.mesh.material.opacity = 0.9\n\tbig.selected = false; \n\n big.addToMovers();\n\t\n\treturn big; \n}", "title": "" }, { "docid": "b144b6d328a8a6867f90f798fbc09a1c", "score": "0.49253365", "text": "addObj(obj) {\n // should do some type checking here\n this.gameobjs.push(obj);\n }", "title": "" }, { "docid": "738f8993d0289e885e58c567900d2b62", "score": "0.49250844", "text": "addMoves() {\n this.moves++\n return this.moves\n }", "title": "" }, { "docid": "6316c96265646e2b79dfafa084a18f8a", "score": "0.4920239", "text": "push(card) {\n this.cards.push(card) // push adds an element to the end of the array\n }", "title": "" }, { "docid": "57e4868c16d8e51cd56adf22bea0f039", "score": "0.491782", "text": "function onNewEnemyPlayer(data) {\n\t//enemy object\n\tconsole.log(data);\n\tvar new_enemy = new enemy_player(data.id, data.x, data.y, data.direction_x, data.direction_y);\n\tenemies.push(new_enemy);\n}", "title": "" }, { "docid": "fb25b0dcabff59182ad6116176e5c1ad", "score": "0.49162754", "text": "throwStones () {\n for (let i = 0; i < 5; i++) {\n this.stones.push(new Stone(0, i, 'images/Rock.png')); //lane 0\n this.stones.push(new Stone(4, i, 'images/Rock.png')); //lane 4\n }\n }", "title": "" }, { "docid": "533172072370eed680b9dc6f81c31693", "score": "0.49156186", "text": "addGame(oppName, teamPoints, oppTeamPoints){\n let newGame = {\n opponent: oppName,\n teamPoints: teamPoints,\n opponentPoints: oppTeamPoints,\n };\n this._games.push(newGame);\n }", "title": "" }, { "docid": "ad6a0d90669edec8ffabb9b2d573be4e", "score": "0.49148405", "text": "push(element) \n { \n this.items.push(element); \n }", "title": "" }, { "docid": "ffcc51851a2a8c6435ded1df983cee4e", "score": "0.49116024", "text": "onTop(i) {\n var x = this.persons[i];\n this.persons.splice(i,1);\n this.persons.push(x);\n }", "title": "" }, { "docid": "4f839a0fb5c29ff63406a80186d83b65", "score": "0.49105677", "text": "addToBlue(){\n blueTeam.push(this);\n }", "title": "" }, { "docid": "db2a0922a2c79c7fee19a59dba3e7596", "score": "0.49094123", "text": "function addHoverMotion(element) {\n Array.from(element).map(item => {\n item.addEventListener('mouseenter', function(e){\n TweenMax.to(item, 1, {x:1, y:1});\n });\n item.addEventListener('mouseleave', function(e){\n TweenMax.to(item, 1, {x:-1, y:1});\n });\n })\n}", "title": "" }, { "docid": "9a89ad517286d67747d914d3b2f51984", "score": "0.49074584", "text": "function add(pokemon) {\n pokemons.push(pokemon);\n }", "title": "" }, { "docid": "f788a6e886f3b2c8e4ca40a68c53f106", "score": "0.49039033", "text": "pushMove(y, x)\n {\n this._lastMove = {\"y\":y, \"x\":x};\n }", "title": "" }, { "docid": "089a8057945f3f4c5b4d1139d987fd33", "score": "0.48847282", "text": "add(o) {\n o.id = this.objects.length + 100;\n o.element.refId = o.id;\n this.objects.push(o);\n }", "title": "" }, { "docid": "78b82d135aec4aa1b4e2acdb6c7ed60a", "score": "0.4883847", "text": "onMoveAdd()\r\n {\r\n\r\n }", "title": "" }, { "docid": "f2f6d50702c3827645ad55d17a87fefd", "score": "0.48831803", "text": "addBall(data) {\n this.balls.push(data);\n }", "title": "" }, { "docid": "bda97efc438b8ae5a43d682e8419c29b", "score": "0.48718217", "text": "addPawnMoves([x1, y1], [x2, y2], moves, promotions) {\n let finalPieces = [V.PAWN];\n const color = this.getColor(x1, y1);\n const lastRank = (color == \"w\" ? 0 : V.size.x - 1);\n if (x2 == lastRank) finalPieces = V.PawnSpecs.promotions;\n let tr = null;\n for (let piece of finalPieces) {\n tr = (piece != V.PAWN ? { c: color, p: piece } : null);\n moves.push(this.getBasicMove([x1, y1], [x2, y2], tr));\n }\n }", "title": "" }, { "docid": "61f4de57bf9b2a68206ee5f2131211cc", "score": "0.48703086", "text": "addAgent() {\n let emptySpots = [];\n for (let x = 0; x < COLS; x++) {\n for (let y = 0; y < ROWS; y++) {\n if (this.agents[x][y] === null) emptySpots.push(createVector(x, y));\n }\n }\n let spot = random(emptySpots);\n this.agents[spot.x][spot.y] = new Agent();\n }", "title": "" } ]
a009944231cff41d29eda80659a4c204
Whether the specified |value| is an unsigned 32 bit number expressed as a number or string.
[ { "docid": "34c923a3ce1b070cd9163e92b41e1c0d", "score": "0.6131331", "text": "function isIndex(value) {\n // js/src/vm/String.cpp JSFlatString::isIndexSlow\n // http://dxr.mozilla.org/mozilla-central/source/js/src/vm/String.cpp#474\n var index = 0;\n if (typeof value === 'number') {\n index = (value | 0);\n if (value === index && index >= 0) {\n return true;\n }\n return value >>> 0 === value;\n }\n if (typeof value !== 'string') {\n return false;\n }\n var length = value.length;\n if (length === 0) {\n return false;\n }\n if (value === '0') {\n return true;\n }\n // Is there any way this will fit?\n if (length > UINT32_CHAR_BUFFER_LENGTH) {\n return false;\n }\n var i = 0;\n index = value.charCodeAt(i++) - 48 /* _0 */;\n if (index < 1 || index > 9) {\n return false;\n }\n var oldIndex = 0;\n var c = 0;\n while (i < length) {\n c = value.charCodeAt(i++) - 48 /* _0 */;\n if (c < 0 || c > 9) {\n return false;\n }\n oldIndex = index;\n index = 10 * index + c;\n }\n /*\n * Look out for \"4294967296\" and larger-number strings that fit in UINT32_CHAR_BUFFER_LENGTH.\n * Only unsigned 32-bit integers shall pass.\n */\n if ((oldIndex < UINT32_MAX_DIV_10) || (oldIndex === UINT32_MAX_DIV_10 && c <= UINT32_MAX_MOD_10)) {\n return true;\n }\n return false;\n}", "title": "" } ]
[ { "docid": "9e02596217e08790dd55e4b5aac617ae", "score": "0.6468047", "text": "function number(value) {\r\n return typeof value === 'number' && !isNaN(value);\r\n}", "title": "" }, { "docid": "336924f70684b288304e51c7582cee46", "score": "0.62867737", "text": "function isNumber (value) {\n return Object.prototype.toString.call(value) == '[object Number]';\n}", "title": "" }, { "docid": "ed3eadd2f5cdab4a5befb948d28f455d", "score": "0.6255738", "text": "function isUint32(num) {\n return num >>> 0 === num;\n}", "title": "" }, { "docid": "e1b8095d8765d4eb23f1278e8e0aa3d4", "score": "0.62266505", "text": "function isIndex(value) {\n // js/src/vm/String.cpp JSFlatString::isIndexSlow\n // http://dxr.mozilla.org/mozilla-central/source/js/src/vm/String.cpp#474\n var index = 0;\n if (typeof value === 'number') {\n index = value | 0;\n if (value === index && index >= 0) {\n return true;\n }\n return value >>> 0 === value;\n }\n if (typeof value !== 'string') {\n return false;\n }\n var length = value.length;\n if (length === 0) {\n return false;\n }\n if (value === '0') {\n return true;\n }\n // Is there any way this will fit?\n if (length > Shumway.UINT32_CHAR_BUFFER_LENGTH) {\n return false;\n }\n var i = 0;\n index = value.charCodeAt(i++) - 48 /* _0 */;\n if (index < 1 || index > 9) {\n return false;\n }\n var oldIndex = 0;\n var c = 0;\n while (i < length) {\n c = value.charCodeAt(i++) - 48 /* _0 */;\n if (c < 0 || c > 9) {\n return false;\n }\n oldIndex = index;\n index = 10 * index + c;\n }\n /*\n * Look out for \"4294967296\" and larger-number strings that fit in UINT32_CHAR_BUFFER_LENGTH.\n * Only unsigned 32-bit integers shall pass.\n */\n if (oldIndex < Shumway.UINT32_MAX_DIV_10 || oldIndex === Shumway.UINT32_MAX_DIV_10 && c <= Shumway.UINT32_MAX_MOD_10) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "48e7ac496a3aae25bb9db7a22da125b9", "score": "0.61906093", "text": "function canFormat(value) {\n var result = typeof (value) === \"number\";\n return result;\n }", "title": "" }, { "docid": "48e7ac496a3aae25bb9db7a22da125b9", "score": "0.61906093", "text": "function canFormat(value) {\n var result = typeof (value) === \"number\";\n return result;\n }", "title": "" }, { "docid": "48e7ac496a3aae25bb9db7a22da125b9", "score": "0.61906093", "text": "function canFormat(value) {\n var result = typeof (value) === \"number\";\n return result;\n }", "title": "" }, { "docid": "04450888d0a06b815a927cd63730fbaf", "score": "0.61227995", "text": "function _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n }", "title": "" }, { "docid": "1c1c1434f36f7b802be2e7949240141f", "score": "0.6089147", "text": "function isNumber(value) {\r\n return typeof value === \"number\" && Number(value) == value;\r\n}", "title": "" }, { "docid": "d977e6e1257a3a6ae4399827cdf9869f", "score": "0.6044814", "text": "function isNumber(value) {\n return typeof value === \"number\" && Number(value) == value;\n}", "title": "" }, { "docid": "c02b26ef8717787cf2c869e0c16408fe", "score": "0.60307866", "text": "function isNumber(value) {\n return value instanceof Number || typeof value === \"number\";\n}", "title": "" }, { "docid": "50121e90d5fa00d015c479d2515594af", "score": "0.6025939", "text": "function _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}", "title": "" }, { "docid": "64fb7b7751bd6be67ecefd4c8a9bb9a1", "score": "0.6025821", "text": "function canFormat(value) {\r\n return typeof (value) === \"number\";\r\n }", "title": "" }, { "docid": "35a15560f28cfe5f691f92544a3f9132", "score": "0.6023732", "text": "function hasNumber(value) {\n var len = value.length;\n for (var i = 0; i < len; i++) {\n var code = value.charCodeAt(i);\n if (code >= 48 && code <= 57) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "c83d5382cfddba7164cf90ff5b2463d5", "score": "0.60178936", "text": "function _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}", "title": "" }, { "docid": "c83d5382cfddba7164cf90ff5b2463d5", "score": "0.60178936", "text": "function _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}", "title": "" }, { "docid": "c83d5382cfddba7164cf90ff5b2463d5", "score": "0.60178936", "text": "function _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}", "title": "" }, { "docid": "c83d5382cfddba7164cf90ff5b2463d5", "score": "0.60178936", "text": "function _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}", "title": "" }, { "docid": "06b2d9fcbf70f784316c362575dfc081", "score": "0.6001423", "text": "function checkIfNumber(value) {\r\n\treturn !isNaN(parseInt(value))\r\n}", "title": "" }, { "docid": "ba479476ded1782844c6d8966da63b5e", "score": "0.599939", "text": "function isSafeNumber(value) {\n return typeof value === 'number' && Math.abs(value) <= MAX_SAFE_INTEGER;\n}", "title": "" }, { "docid": "39fa4b182649da4796862dfa9fbb647d", "score": "0.5983683", "text": "isNumber (value) {\n return typeof value === 'number' && isFinite(value);\n }", "title": "" }, { "docid": "3a3a3b75bf6da104d24622a1f9703d8a", "score": "0.5979304", "text": "function isNumber(value) {\n return typeof(value) === 'number';\n}", "title": "" }, { "docid": "0a7f7dd471b38d23784a98c9daa30f3d", "score": "0.59557664", "text": "static containsNumber(value) {\n return /[0-9]/.test(value);\n }", "title": "" }, { "docid": "c23311e585a8b8794d81b0f40597fa11", "score": "0.5943605", "text": "function isValue(value) {\n\tif (\n\t\t(value !== null &&\n\t\t\tvalue !== undefined &&\n\t\t\tvalue.length !== 0 &&\n\t\t\t!isNaN(value) &&\n\t\t\tvalue !== 'NaN' &&\n\t\t\tvalue !== 'undefined') ||\n\t\t$.trim(value) !== ''\n\t) {\n\t\tif (typeof value == 'number') {\n\t\t\treturn true;\n\t\t}\n\t\tvar valueWithoutPTags = value.replace(/<p>/g, '');\n\t\tvalueWithoutPTags = valueWithoutPTags.replace(/<\\/p>/g, '');\n\t\tvalueWithoutPTags = $.trim(valueWithoutPTags);\n\t\treturn valueWithoutPTags.length >= 1;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "728b4bc95159c511faf147f8cae85f7c", "score": "0.59327", "text": "function isInteger ( value ) {\n return ( value == parseInt( value ) );\n}", "title": "" }, { "docid": "0148c0acab4684c158baf8a8a34c7154", "score": "0.5904974", "text": "function isNumber(value) {\r\n return typeof value === 'number';\r\n}", "title": "" }, { "docid": "0e8e61be8e4efc0f1721d3339e318859", "score": "0.59018016", "text": "function is_int(value){\n var numerics = [\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"];\n var reply = true;\n for(var i = 0;i < value.length; i++){\n if(numerics.indexOf(value[i]) == -1){\n reply = false;\n }\n }\n return reply;\n }", "title": "" }, { "docid": "4360a51f1ae6f3fa682cdfd2d34acde0", "score": "0.58858734", "text": "verifyNumber(value) {\n var numberRex = new RegExp(\"^[0-9]+$\");\n if (numberRex.test(value)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "9292ef46a66bdc1b1fde4c69315895ca", "score": "0.5844292", "text": "function isNumber(value) {\n return typeof value === \"number\" && value === value;\n}", "title": "" }, { "docid": "23fd4572b941c3ee42c7db2d34f2f79d", "score": "0.58373", "text": "function isId(value) {\n return typeof value === \"string\" || typeof value === \"number\";\n}", "title": "" }, { "docid": "493c23d88afa1de9458c339313f24581", "score": "0.58309436", "text": "function isPrimitiveType(value) {\n return (\n value === null || (typeof value !== \"object\" && typeof value !== \"function\")\n )\n}", "title": "" }, { "docid": "0e46d976532a7fd65dd19e7a5b0137ac", "score": "0.582575", "text": "function IsANumber(value) { \n if (!(isNaN(value))) \n return true; \n else \n return false; \n }", "title": "" }, { "docid": "7f37504f1758c578d006f7e0dde66890", "score": "0.58165586", "text": "function isId(value) {\n return typeof value === \"string\" || typeof value === \"number\";\n }", "title": "" }, { "docid": "c6ee278267f920ddbdbff1e96a49d23a", "score": "0.5777831", "text": "function isInteger(value) {\n return !isNaN(parseInt(value));\n}", "title": "" }, { "docid": "ee5f79f550be7da269447fdab882f95d", "score": "0.5751254", "text": "function _isValidUANum(_stringVal){\n\t_stringVal = _stringVal.toLowerCase();\n var _regEx = /^ua\\-([0-9]+)\\-[0-9]+$/;\n var match = _stringVal.match(_regEx);\n if (match != null && match.length > 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "b58f67e76c95147f4e6fad6ed9e8888e", "score": "0.5746316", "text": "function isNumber(value) {\n return typeof value === 'number' && !isNaN(value);\n}", "title": "" }, { "docid": "948a29d913300c3c137a448ed4c625a4", "score": "0.5730208", "text": "function isInteger(value) {\n return Number.isInteger(Number.parseFloat(value));\n}", "title": "" }, { "docid": "2cb4ef1256c6cd76fa4182e9299da3c8", "score": "0.57238483", "text": "function isNumber(value) {\n return typeof value === 'number' && !Number.isNaN(value);\n}", "title": "" }, { "docid": "16ed553f31af9bf5e7a7f21397df316c", "score": "0.5721527", "text": "function isInteger(value) {\n // see http://stackoverflow.com/questions/14636536/\n // how-to-check-if-a-variable-is-an-integer-in-javascript\n if (isNaN(value)) {\n return false;\n }\n var x = parseFloat(value);\n return (x | 0) === x;\n}", "title": "" }, { "docid": "48d22abd1ab4fce7449c42ee64e607bf", "score": "0.57201314", "text": "function isScalarValue(value) {\n return ['StringValue', 'BooleanValue', 'EnumValue'].indexOf(value.kind) > -1;\n}", "title": "" }, { "docid": "48d22abd1ab4fce7449c42ee64e607bf", "score": "0.57201314", "text": "function isScalarValue(value) {\n return ['StringValue', 'BooleanValue', 'EnumValue'].indexOf(value.kind) > -1;\n}", "title": "" }, { "docid": "68a1ce3e50d09e80b0e09f58d148f971", "score": "0.57094604", "text": "function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "1b408feb9d55439218a27414a0b0135c", "score": "0.57089037", "text": "function isPrimitive (value) {\n return typeof value === 'string' || typeof value === 'number'\n}", "title": "" }, { "docid": "7f9eab05c03ffafb9dfd6cfe1a5aacdc", "score": "0.56985754", "text": "function isNumber(value) {\n return typeof value === \"number\" && !isNaN(value);\n}", "title": "" }, { "docid": "7f9eab05c03ffafb9dfd6cfe1a5aacdc", "score": "0.56985754", "text": "function isNumber(value) {\n return typeof value === \"number\" && !isNaN(value);\n}", "title": "" }, { "docid": "7f9eab05c03ffafb9dfd6cfe1a5aacdc", "score": "0.56985754", "text": "function isNumber(value) {\n return typeof value === \"number\" && !isNaN(value);\n}", "title": "" }, { "docid": "5147c23c0845f27324c5cf5286e47a83", "score": "0.569294", "text": "function isPrimitive(value) {\n\t return typeof value === 'string' || typeof value === 'number';\n\t}", "title": "" }, { "docid": "a0ec828e3dc073a6e5ca07c6befcd374", "score": "0.5691958", "text": "function isNotANumber(value) {\n if (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'object' || typeof value === 'undefined') {\n return false;\n }\n else if (value <= Infinity || value >= -Infinity) {\n return false;\n }\n else return true;\n}", "title": "" }, { "docid": "581f3fe12ff188c4e1d0d6b42ee44721", "score": "0.56722534", "text": "function isPrimitive (value) {\n\t return typeof value === 'string' || typeof value === 'number'\n\t}", "title": "" }, { "docid": "581f3fe12ff188c4e1d0d6b42ee44721", "score": "0.56722534", "text": "function isPrimitive (value) {\n\t return typeof value === 'string' || typeof value === 'number'\n\t}", "title": "" }, { "docid": "581f3fe12ff188c4e1d0d6b42ee44721", "score": "0.56722534", "text": "function isPrimitive (value) {\n\t return typeof value === 'string' || typeof value === 'number'\n\t}", "title": "" }, { "docid": "581f3fe12ff188c4e1d0d6b42ee44721", "score": "0.56722534", "text": "function isPrimitive (value) {\n\t return typeof value === 'string' || typeof value === 'number'\n\t}", "title": "" }, { "docid": "581f3fe12ff188c4e1d0d6b42ee44721", "score": "0.56722534", "text": "function isPrimitive (value) {\n\t return typeof value === 'string' || typeof value === 'number'\n\t}", "title": "" }, { "docid": "3affd732fecfcbc99db4d8d22ed803cf", "score": "0.5660482", "text": "function isNumberString( value ) {\n\tconst parsedValue = parseFloat( value );\n\n\treturn !Number.isNaN( parsedValue ) && value === String( parsedValue );\n}", "title": "" }, { "docid": "f711e7a95714d367abac0914e62a894b", "score": "0.5657828", "text": "static isPrimitiveValue(value){\n\t\tif (rtl.isScalarValue(value)){\n\t\t\treturn true;\n\t\t}\n\t\tif (value instanceof Vector){\n\t\t\treturn true;\n\t\t}\n\t\tif (value instanceof Map){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bcf7afbde7b3c7a25e8649a592f3236b", "score": "0.5648147", "text": "function isPrimitive(value) {\n return typeof value === 'string' || typeof value === 'number';\n}", "title": "" }, { "docid": "03c3b077f1d921d2c6e707bb9faaadea", "score": "0.5647529", "text": "function isValueNumeric(value) {\r\n // checking if a string is numeric in Typescript is a big pain, because\r\n // we can't simply toss a string parameter to isFinite. below is the\r\n // essential approach that jQuery uses, which involves subtracting a\r\n // parsed numeric value from the string representation of the value. we\r\n // need to cast the value to the `any` type to allow this operation\r\n // between dissimilar types.\r\n return value != null && value - parseFloat(value) + 1 >= 0;\r\n}", "title": "" }, { "docid": "58f6c5e7bb105dd1677b695946108648", "score": "0.5646215", "text": "function valueIsNumber(number){\n if(number === null || number === undefined) {\n return false;\n }\n else if(convertToNumber(number) === false){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "577f5a4679c57c3e2fdc5ae040082e92", "score": "0.56392163", "text": "function isNumber (value) {\n return typeof value === 'number' && isFinite(value);\n }", "title": "" }, { "docid": "655c4f0eff84836e0b0ebe56b95d7b70", "score": "0.5627575", "text": "function is_numeric(value){\n var numerics = [\".\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"];\n var reply = true;\n for(var i = 0;i < value.length; i++){\n if(numerics.indexOf(value[i]) == -1){\n reply = false;\n }\n }\n return reply;\n }", "title": "" }, { "docid": "f77aeca4c7919ca446b95a06f39be56e", "score": "0.56273484", "text": "function hasNumValue(value) {\r\n\t\t\t\"use strict\";\r\n\t\t\tif (value != undefined && value != null) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "20d5d038c045c0252f77bd522c50bb66", "score": "0.5624832", "text": "function isSafeInteger(value) {\n return isInteger(value) && Math.abs(value) <= MAX_SAFE_INTEGER;\n}", "title": "" }, { "docid": "20d5d038c045c0252f77bd522c50bb66", "score": "0.5624832", "text": "function isSafeInteger(value) {\n return isInteger(value) && Math.abs(value) <= MAX_SAFE_INTEGER;\n}", "title": "" }, { "docid": "20d5d038c045c0252f77bd522c50bb66", "score": "0.5624832", "text": "function isSafeInteger(value) {\n return isInteger(value) && Math.abs(value) <= MAX_SAFE_INTEGER;\n}", "title": "" }, { "docid": "060a5547edee78358a66970c5243923f", "score": "0.56138176", "text": "function isNumber(value) {\n return typeof value === 'number' && isFinite(value);\n}", "title": "" }, { "docid": "d5eff310b2cd611aae63083c10d0783e", "score": "0.5599962", "text": "function isNumber(value) {\n return typeof value === 'number' && isFinite(value);\n}", "title": "" }, { "docid": "cb7d6334ead204234d700c277f68d3dc", "score": "0.55920506", "text": "function isNumber(val) {\n return typeof val == \"number\";\n}", "title": "" }, { "docid": "a3e49aa6e8628055e1dd903ce64b5b16", "score": "0.55908793", "text": "function likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n\n if (code === plus$1 || code === minus) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n var nextNextCode = value.charCodeAt(2);\n\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code >= 48 && code <= 57) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "5ce5f32b500cad1d8f71b4908107b31c", "score": "0.55865014", "text": "function typeFunc(value){\n\tif(typeof value === \"string\"){\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n }", "title": "" }, { "docid": "478b563ac160dd785005d1494e062b59", "score": "0.5570038", "text": "function isInt(value) {\n var er = /^-?[0-9]+$/;\n return er.test(value);\n }", "title": "" }, { "docid": "07256231dca97665e0e9c7da4fdd24d3", "score": "0.55667365", "text": "function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\n }", "title": "" }, { "docid": "09bc81a384dd7e39ce8053a64b7e453f", "score": "0.5566405", "text": "function likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n\n if (code === plus || code === minus) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n var nextNextCode = value.charCodeAt(2);\n\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code >= 48 && code <= 57) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "09bc81a384dd7e39ce8053a64b7e453f", "score": "0.5566405", "text": "function likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n\n if (code === plus || code === minus) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n var nextNextCode = value.charCodeAt(2);\n\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code >= 48 && code <= 57) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "09bc81a384dd7e39ce8053a64b7e453f", "score": "0.5566405", "text": "function likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n\n if (code === plus || code === minus) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n var nextNextCode = value.charCodeAt(2);\n\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code >= 48 && code <= 57) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "780bc3dea32b7d372f8e488379009207", "score": "0.5561398", "text": "function AnU32(value) { prot.CSynonym.call(this, value); }", "title": "" }, { "docid": "dd2377812e9e8536b0103743e5f44ee7", "score": "0.5559404", "text": "function isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n return _isInteger(value);\n}", "title": "" }, { "docid": "dd2377812e9e8536b0103743e5f44ee7", "score": "0.5559404", "text": "function isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n return _isInteger(value);\n}", "title": "" }, { "docid": "6327fa88a811d0a11c644f6a7c83bd67", "score": "0.555658", "text": "function isNumeric(value) {\n\tvar numericReg = /[0-9]+/g;\n\tif (value.search(numericReg) != -1) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "3ef45a0a16a4747f2d41fcf4f7d68b9c", "score": "0.55505866", "text": "function isNumber(val) {\n return typeof val === \"number\";\n}", "title": "" }, { "docid": "906ca0eebd7714d685ead26b14666740", "score": "0.55504924", "text": "function NumberValidator(value) {\n var NumberPattern = /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/;\n return (new RegExp(NumberPattern)).test(value) ? true : false;\n}", "title": "" }, { "docid": "906ca0eebd7714d685ead26b14666740", "score": "0.55504924", "text": "function NumberValidator(value) {\n var NumberPattern = /^(?:-?\\d+|-?\\d{1,3}(?:,\\d{3})+)?(?:\\.\\d+)?$/;\n return (new RegExp(NumberPattern)).test(value) ? true : false;\n}", "title": "" }, { "docid": "98c2f04ff56a5a577e41bc86b1127ee7", "score": "0.5549408", "text": "function isJsonRpcErrorCode(value) {\n if (isNil(value))\n return false;\n return typeof value === 'number' && Object.values(types_1.RPCErrorCode).includes(value);\n}", "title": "" } ]
57cb96e10a90b07126faa97e0580a8fa
allow user to input a term and locate the term
[ { "docid": "199c4949917c11018530d5224edb8d9f", "score": "0.71505433", "text": "function openTermLocator() {\n\tvar name = prompt(\"Enter term name: \", \"\");\n\tif (name) {\n\t\tsetTerm(name.trim());\n\t}\n}", "title": "" } ]
[ { "docid": "f3303041425e020245d030b7be267442", "score": "0.6604711", "text": "function searchTermify(string) {\n\n}", "title": "" }, { "docid": "2afd3a2f2d8a3f06fe4e745320dfb834", "score": "0.657506", "text": "function searchTerm(word) {\n $('#sb-search .ui-input-search').addClass('invisible');\n word = $.trim(word);\n if (word != '') {\n if (isNaN(Number(word))) {\n WMTSidebar.show('search');\n $('#search-title-term').removeClass('invisible');\n $('#searchterm').html(word);\n searchForWord(word);\n } else {\n document.location.href = Osgende.MapConfig.basemapurl + 'relation/' + word;\n }\n }\n \n return false;\n}", "title": "" }, { "docid": "ee5be311470759a3f17c7007acf19213", "score": "0.6563931", "text": "function openTermLocator() {\n\tvar name = prompt(\"Term name: \", \"\");\n\tif (name) {\n\t\tsetTerm(name);\n\t}\n}", "title": "" }, { "docid": "792ff87a7da21306fdfeb72bf9f3254a", "score": "0.64982605", "text": "function find()\n{\n //reading the i/p from console\n read.question(\"Enter the searched word: \",function(str){\n if(isNaN(str)) //validation\n {\n utility.find(str);\n }\n else\n {\n console.log(\"Invalid input plz try with String\");\n find();\n }\n });\n}", "title": "" }, { "docid": "66cf79f2d254c260487983f6f9b0dd6b", "score": "0.6491519", "text": "async searchByText(term) {\n await this.searchBox.fill(term);\n }", "title": "" }, { "docid": "5cfdbc4fc345fb2d5c2153509c8284e7", "score": "0.64437467", "text": "function defineInput() {\n\t//Space separated words as our note input\n\tvar words = userInput.split(\" \"); \n\twords.forEach(function(element) {\n\t\t//Lowercase and trimmed word\n\t\tvar term = element.replace(/[.,'\"!?\\s]/gi, '').toLowerCase();\n\t\t//If found in the map, we do not define the input.\n\t\t//OR if the rarity value is too high (common word)\n\t\tvar condition = isFrequentlyUsed(term, frequencyDatabase);\n\t\tvar mydiv = document.getElementById(\"paragraph\"); \n\t\tmydiv.innerHTML = \"\"; //Reset input. For debugging.\n\t\tvar newcontent = document.createElement('div');\n\t\tnewcontent.innerHTML = element + \" \"; //Default if common element. Not defined.\n\t\tif (!condition) {\n\t\t\t//If the element is rarely found, then add an onmouseover\n\t\t\t//that displays its definition in the corresponding text box.\n\t\t\t//Highlight text with class=\"highlight\".\n\t\t\tvar startStr = \"<div class=\\\"highlight\\\" onmouseover=\\\"showDef(\\'\";\n\t\t\tvar midStr = \"\\')\\\" onmouseout=\\\"default()\\\">\";\n\t\t\tvar endStr = \" </div>\"; //Included space after element to restore format post-splitting\n\t\t\tnewcontent.innerHTML = startStr + term + midStr + term + endStr;\n\t\t\tlet data = Lan.oxfordLookup(term);\n\t\t\tdata.then(function(result){\n\t\t\t\t\tcardSet.push(term + \", \" + result;\t\t\t\n\t\t\t});\t\n\t\t} \n\t\tif (newcontent.firstChild) {\n\t\t\tmydiv.appendChild(newcontent.firstChild);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "d3b3d70237af44ab896ef51bcc57ee99", "score": "0.6437102", "text": "function search(term) {\n term = term || document.getElementById('searchBox').value;\n if (term)\n window.location.href = \"stock/\" + term;\n}", "title": "" }, { "docid": "93f13aaab37405a0b187e46c00a258bd", "score": "0.6406678", "text": "promptAddTerm() {\n var term = prompt(\"Add a search term:\");\n\n //only accept if not undefined/null/empty\n if (term && term.trim()) {\n this.props.addFilterTerm(term);\n }\n }", "title": "" }, { "docid": "ab2aa792c9ead197e04285ac296e07b7", "score": "0.6379642", "text": "function parseInputTerm(term)\n{\n var term_split = term.split('\"');\n var exactOf = \"\";\n var anyOf = \"\";\n var allOf = \"\";\n var noneOf = \"\";\n var termWithoutExact = term;\n if(term_split.length>2)\n {\n exactOf = term_split[1];\n term_split.splice(1,1);\n termWithoutExact = term_split.join('');\n }\n \n var term_split_2 = termWithoutExact.split(\" \");\n for(let i=0;i<term_split_2.length;i++)\n {\n if(term_split_2[i].length && '+'===term_split_2[i].charAt(0) && term_split_2[i].substring(1).trim().length > 0)\n {\n anyOf+= ' ' + term_split_2[i].substring(1).trim();\n } else if(term_split_2[i].length && '-'===term_split_2[i].charAt(0) && term_split_2[i].substring(1).trim().length > 0)\n {\n noneOf+= ' ' + term_split_2[i].substring(1).trim();\n }else if(term_split_2[i].length)\n {\n allOf+= ' ' + term_split_2[i].trim();\n }\n }\n \n return {\n 'exactOf':exactOf.trim(),\n 'anyOf':anyOf.trim(),\n 'allOf':allOf.trim(),\n 'noneOf':noneOf.trim(),\n 'term':term\n };\n}", "title": "" }, { "docid": "b85befd88c37a64b1b54ecfde9ce45d8", "score": "0.62891906", "text": "function select_term(line){\n element_id = $(line).attr(\"id\");\n block_id = element_id.substring(element_id.lastIndexOf('-') + 1);\n\n query_input = $('#input-' + block_id);\n selected_key= $('#select-' + block_id).find(':selected').val(); \n query_input.val('\"' + selected_key + '\"');\n\n}", "title": "" }, { "docid": "c88c2390fcf3c10982be158426796625", "score": "0.61680114", "text": "function search(word) {\n searchInput.value = word;\n fetchApi(word);\n}", "title": "" }, { "docid": "a20eede0f404826cd1bd634fe7afe53a", "score": "0.61063164", "text": "search(term) {\n this.searchTerms.next(term);\n }", "title": "" }, { "docid": "351cfcb300642008e41d339eafaa2a0c", "score": "0.60867167", "text": "autocomplete(event) {\n const { term } = this.highlightedResult()\n if (term && term !== this.props.term) {\n this.props.actions.updateItem(term)\n // fix mainInput placeholder\n const { results, selected } = this.props\n this.mainInputRef.current.onInput(event, results[selected].term)\n event.preventDefault()\n }\n }", "title": "" }, { "docid": "208f0560c22caecefd194d7ee51270d0", "score": "0.60802424", "text": "function populateSearchTerm(){\r\n\tif(searchTermInSimple!=undefined && searchTermInSimple!='' && searchTermInSimple!='<!--$ searchTermInSimple-->'){\r\n\t\t$(\"#q\").val(searchTermInSimple);\r\n\t}\r\n}", "title": "" }, { "docid": "3e2d32c943c630a36054ea126b3416de", "score": "0.60521185", "text": "autocomplete(event) {\n const { term } = this.highlightedResult()\n if (term && term !== this.props.term) {\n this.props.actions.updateTerm(term)\n event.preventDefault()\n }\n }", "title": "" }, { "docid": "a30632277af24d5897f49be8f9bce48a", "score": "0.6043736", "text": "function searchLocation() {\n\t//get user input\n\tvar searchTerm = document.getElementById(\"location_input\").value;\n\t//call function to locate the town\n\tfindLocation(searchTerm);\n}", "title": "" }, { "docid": "7605cc90769126b87b323a5072913aeb", "score": "0.60309726", "text": "function TermSuggestion ({\n term,\n answer,\n totalResults,\n translate,\n className,\n q,\n updateQueryTerm,\n spellCheckSource,\n skipSpellcheck,\n executeSearch,\n log,\n logPayload\n}) {\n if (!term) return null\n if (\n (answer &&\n (answer.data ||\n answer.callback ||\n (answer.suggestions && answer.suggestions.length))) ||\n totalResults === 0 ||\n !totalResults\n ) {\n return null\n }\n return (\n <div className='ola-term-suggestion' {...className}>\n <span className='ola-term-suggestion-showing'>\n {translate(\n 'suggestions_showing_results_for',\n {\n term,\n no_results_message:\n spellCheckSource === SPELLCHECK_SOURCE_CONTENT\n ? translate('suggestions_no_results', { q })\n : null\n },\n true\n )}\n </span>\n {spellCheckSource === SPELLCHECK_SOURCE_UNIVERSAL ? (\n <span className='ola-term-suggestion-instead'>\n {translate('suggestions_search_instead')}\n <button\n className='ola-btn ola-btn-term-suggestion'\n type='button'\n onClick={() => {\n /**\n * Log the click event\n */\n log({\n eventType: 'C',\n eventCategory: 'SpellSearchInstead',\n eventAction: 'click',\n eventLabel: q,\n payload: logPayload\n })\n /* Change the query term */\n updateQueryTerm(q)\n /* Skip both intent engine and solr spellchecker */\n skipSpellcheck(true)\n /* Search */\n executeSearch()\n }}\n >\n {q}\n </button>\n </span>\n ) : null}\n </div>\n )\n}", "title": "" }, { "docid": "cf395aefa73e1f34e9caab4d7f978741", "score": "0.60286", "text": "getTerm (term) {\n return Tablemodify.languages[this.currentLanguage].get(term)\n }", "title": "" }, { "docid": "c697a125b4643aa2f29fcc30883d24be", "score": "0.5986685", "text": "function search() {}", "title": "" }, { "docid": "8ceffff1edf94b02fbaf74c769d60ee3", "score": "0.5985602", "text": "getSuggestion() {}", "title": "" }, { "docid": "0c6053ee0923909bf0afa2eb59596a0e", "score": "0.59770656", "text": "function extractTerm(val) {\r\n\r\n\t\t// Get caret position\r\n\t\tvar caretPos = txt.getSelection().start;\r\n\r\n\t\tvar term = extractWord(val, caretPos);\r\n\t\tif (term.charAt(0) == '#' && (availableTags.length != 0)) {\r\n\t\t\tChatManager.IntellisenseActive = true;\r\n\t\t\treturn term.substr(1);\r\n\t\t}\r\n\t\ttxt.autocomplete(\"close\");\r\n\t\tChatManager.IntellisenseActive = false;\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "73b18b8532c414895ee56406b6d878ec", "score": "0.5953929", "text": "function goWiki(term){\n // let term = userInput.value();\n counter = counter +1;\n let url = searchUrl + term;\n loadJSON(url,gotSearch,'jsonp');\n }", "title": "" }, { "docid": "62f827d1b1b6a9b41f727253d6f9e24b", "score": "0.59224945", "text": "autocompleteValue() {\n const selected = this.highlightedResult()\n let term = ''\n if (selected && selected.term) {\n const regexp = new RegExp(`^${escapeStringRegexp(this.props.term)}`, 'i')\n if (selected.term.match(regexp)) {\n term = selected.term.replace(regexp, this.props.term)\n this.focusMainInput()\n }\n }\n return term\n }", "title": "" }, { "docid": "9840914d26e368d02fea6220ba481171", "score": "0.5900045", "text": "function term(a) {\r\n\r\n\tif(a == 0) {\r\n\t\tenglishTerm = \"term\";\r\n\t\tspanishTerm = \"término\";\r\n\t\tenglishDef = \"a number, a variable, or a product of one or more numbers and variables in an expression\";\r\n\t\tspanishDef = \"un número, una variable, o un producto de uno o más números y variables en una expresión\";\r\n\t\tshowTermDefinition();\r\n\t}\r\n\t//timer_1 = setTimeout(\"term_extd(\" + a + \")\", 1600)\r\n}", "title": "" }, { "docid": "ba00a6853dbc2e286f4ed074f5b45ae7", "score": "0.5892307", "text": "function highlightTerms(term) {\n console.log('highlighting: ', term);\n var src_str = $(\"#pre-show-source\").html();\n\n term = term.replace(/(\\s+)/,\"(<[^>]+>)*$1(<[^>]+>)*\");\n var pattern = new RegExp(\"(\"+term+\")\", \"gi\");\n\n src_str = src_str.replace(pattern, \"<mark>$1</mark>\");\n src_str = src_str.replace(/(<mark>[^<>]*)((<[^>]+>)+)([^<>]*<\\/mark>)/,\"$1</mark>$2<mark>$4\");\n\n $(\"#pre-show-source\").html(src_str);\n }", "title": "" }, { "docid": "c0eea985fba2f7872de1f4fdb0e51964", "score": "0.58909285", "text": "function selectTerm(term) {\n if (term == \"Winter 2021\") {\n console.log(\"Winter :(\");\n } else if(term == \"Fall 2021\") {\n window.location.href = \"/pages/studentInformation/studentDetailSchedule.html\";\n } else if(term == \"Summer 2021\") {\n console.log(\"Summer :D\");\n } else {\n console.log(\"Spring :|\");\n }\n}", "title": "" }, { "docid": "95b9f67227ea465e6a60cda0b348f30f", "score": "0.5886108", "text": "function search(input) {\r\n\t\t\tlet results = searchPersonByName(input);\r\n\t\t\tif (results.length == 1) {\r\n\t\t\t\tjumpTo(results[0].person.REC);\r\n\t\t\t} else if (results.length > 1) {\r\n\t\t\t\tdrawSearchResults(results);\r\n\t\t\t} else {\r\n\t\t\t\tdocument.getElementById(\"search\").value = \"No Results Found!\";\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "2b056488a285dd0176180b4eeeb4debb", "score": "0.5858397", "text": "function search(a) {\n // console.log('search',$(\"#text1\").val());\n var p = $(\"#text1\").val();\n analyseEntry(p);\n\n }", "title": "" }, { "docid": "29f8ded179d0a5969dcf6a4a75655835", "score": "0.5857274", "text": "function do_patriotact_search_by_name()\n{\n // set COMPANY_NAME param if not already set\n var f = document.SEARCH;\n //alert('0:'+f.LAST_NAME.value+'|'+f.FIRST_NAME.value+'|'+f.MI.value+'|'+f.COMPANY_NAME.value+'|');\n if (f.LAST_NAME.value != '') {\n\tf.COMPANY_NAME.value = f.FIRST_NAME.value + ' ' + f.MI.value + ' ' + f.LAST_NAME.value;\n\t// trim concatenated value\n\tf.COMPANY_NAME.value = f.COMPANY_NAME.value.replace(/\\s+/, ' ').replace(/^\\s+/, '').replace(/\\s+$/,'');\n\t//alert('1:'+f.LAST_NAME.value+'|'+f.FIRST_NAME.value+'|'+f.MI.value+'|'+f.COMPANY_NAME.value+'|');\n }\n\n srchDecisionEvt('SEARCH/SEARCH_PATRIOTACT');\n}", "title": "" }, { "docid": "00e50c4114601b937b79fbc75b584aa3", "score": "0.5850361", "text": "function fetchInput(){\nvar searchTerm = document.getElementById(\"textInput\").value;\n if (searchTerm.length == 0){\n alert('Please enter a valid search term!')\n } else {\n // alert(searchTerm);\n getWikipedia(searchTerm);\n }\n\n}", "title": "" }, { "docid": "ac81508edaead54c757a876e5a8e56c5", "score": "0.5837913", "text": "function searchByName( searchText ){\n\t\tfor (var i = 0; i < terminalDetailArray.length; i++) {\n\t\t\tvar currentTerminal = terminalDetailArray[i];\n\t\t\tif( currentTerminal.name.toLowerCase() == searchText.toLowerCase() ){\n\t\t\t\tif(currentTerminal.latitude == 0 && currentTerminal.longitude ==0 ){\n\t\t\t\t\talert(\"The terminal exists but doesn't have lat, long information.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tzoomAndShowInfo(currentTerminal);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\talert(\"The terminal doesn't exists.\");\n\t}", "title": "" }, { "docid": "e05ee3b5dd2beb0878fa3cacb4359ced", "score": "0.5833114", "text": "search(term) {\n // Send action if it is passed.\n if (!this.get('search')) {\n console.log(\"c-form-field-select-external-search: search action is not defined!\");\n return;\n }\n return this.get('search')(term);\n }", "title": "" }, { "docid": "a8e9be1719a1d096a532e5c64febd21c", "score": "0.58253044", "text": "function surch1() { //get *more* elements by id\n var inp = document.getElementById(\"dicsearch\").value;\n let searchtype = document.getElementById(\"searchtype1\").value;\n if (searchtype == \"linear1\") { //call linear search if that is what the selection says\n var found = linearsearch(dictionary, inp);\n } else { //if not, call binary\n var found = binarysearch(dictionary, inp);\n } //log where it's found\n if (found >= 0) {\n console.log(\"found at index: \" + found);\n } else {\n console.log(\"not found\")\n }\n \n}", "title": "" }, { "docid": "4da3ad06bcf266696625b5e27a9f3948", "score": "0.58245397", "text": "function setSearchTerm(input_json) {\n \n if ( input_json.term && input_json.term.length )\n {\n return input_json.term;\n }\n else\n {\n return \"\";\n }\n}", "title": "" }, { "docid": "7067cc08c18bdfc71ee16f09f062e57a", "score": "0.5813016", "text": "function searchNode(nodes, term){\n\tfor(var i in nodes){\t\t\n\t\t\tconsole.log(nodes[i].label + \" ====== \" + term);\n\t\t\t\n\t\t\tif(nodes[i].label === term){\n\t\t\t\t\n\t\t\t\treturn nodes[i];\n\t\t\t}\n\t\t}\n\treturn null;\n }", "title": "" }, { "docid": "495d61d65fae000ca50fa59f9ef0288d", "score": "0.5811189", "text": "onInputChange(term) {\n this.props.onTermChange(term);\n }", "title": "" }, { "docid": "e9fe967d2d45cfaf1494a62756734f30", "score": "0.5798214", "text": "search(term) {\n this._attachListeners('search');\n this._queryParams.q = term;\n this._followRelService('list', 'List');\n }", "title": "" }, { "docid": "ec981f846d32fc6b6ada4f7b94c56867", "score": "0.57825065", "text": "handleTermChange(e) {\n this.setState({term: e.target.value});\n }", "title": "" }, { "docid": "26510e0dac5e9f695a1efad57000baeb", "score": "0.5778784", "text": "function _selectTerm(activeCtx,iri,value,containers,typeOrLanguage,typeOrLanguageValue){if(typeOrLanguageValue===null){typeOrLanguageValue='@null';}// preferences for the value of @type or @language\nvar prefs=[];// determine prefs for @id based on whether or not value compacts to a term\nif((typeOrLanguageValue==='@id'||typeOrLanguageValue==='@reverse')&&_isSubjectReference(value)){// prefer @reverse first\nif(typeOrLanguageValue==='@reverse'){prefs.push('@reverse');}// try to compact value to a term\nvar term=_compactIri(activeCtx,value['@id'],null,{vocab:true});if(term in activeCtx.mappings&&activeCtx.mappings[term]&&activeCtx.mappings[term]['@id']===value['@id']){// prefer @vocab\nprefs.push.apply(prefs,['@vocab','@id']);}else{// prefer @id\nprefs.push.apply(prefs,['@id','@vocab']);}}else{prefs.push(typeOrLanguageValue);}prefs.push('@none');var containerMap=activeCtx.inverse[iri];for(var ci=0;ci<containers.length;++ci){// if container not available in the map, continue\nvar container=containers[ci];if(!(container in containerMap)){continue;}var typeOrLanguageValueMap=containerMap[container][typeOrLanguage];for(var pi=0;pi<prefs.length;++pi){// if type/language option not available in the map, continue\nvar pref=prefs[pi];if(!(pref in typeOrLanguageValueMap)){continue;}// select term\nreturn typeOrLanguageValueMap[pref];}}return null;}", "title": "" }, { "docid": "337bdd4cfade99deb67f434fe9cc059e", "score": "0.57669574", "text": "function searches (sea, ter) {\n\n console.log(ter);\n \n if (sea === \"concert-this\") {\n concertThis(ter);\n} else if (sea === \"spotify-this-song\") {\n spotifyThis(ter);\n} else if (sea === \"movie-this\") {\n movieThis(ter);\n} else if(sea === \"do-what-it-says\") {\n IwantThis();\n} else {\n console.log(\"Please use a correct search term.\")\n};\n}", "title": "" }, { "docid": "eaf81dce4e49139d233f1b4105f0393b", "score": "0.575667", "text": "function addTerms(term) { //adds a word to the search\n\tvar add = true;\n\tvar tempTerm = [];\n\tif (deletedTerm == event.target) {\n\n\t} else if (term != \"\" && term != undefined && event.target.parentElement != document.getElementById(\"queryTerms\") && term != 'undefined') {\n\n\t\tfor (i = 0; i < totSearch.length; i++) totSearch[i].parentElement.removeChild(totSearch[i]);\n\n\t\ttotSearch = []; //removes the previous search items\n\t\t//\tif (typeof term != typeof \"\") term = event.target.firstElementChild.innerHTML.split(' ');\n\n\n\t\tfor (j = 0; j < wholeQuery.length; j++) //checks to see if the clicked item is already a part of the search\n\t\t\tif (term == wholeQuery[j].toString() || term == deletedTerm) {\n\n\t\t\t\tadd = false;\n\t\t\t};\n\n\n\t\tif (add == true) {\n\t\t\tif (event.target.parentElement != document.getElementById(\"queryTerms\") && event.target.parentElement.parentElement != document.getElementById('sBar') && event.target.isSameNode(document.createElement('button')))\n\t\t\t\tevent.target.parentElement.removeChild(event.target);\n\t\t\tsplitTerms(stringQuery + ',' + term);\n\t\t} else searchTerms();\n\n\t}\n\tupdateSearch();\n\n}", "title": "" }, { "docid": "bff2d51aea19a9bcf6dfda8abd21a9d9", "score": "0.573881", "text": "handleTerm(e) {\n this.setState({\n filterByTerm: e.target.value\n })\n }", "title": "" }, { "docid": "2e143a4b3e10f2158c1b40880dc0f848", "score": "0.5736133", "text": "function setup() {\r\n\r\n // START WITH USER INPUT \r\n userInput = document.getElementById('userinput');\r\n //userInput = select(\"#userinput\");\r\n termTosearch = userInput.value;\r\n console.log(userInput.value);\r\n startSearch(termTosearch);\r\n}", "title": "" }, { "docid": "6e15ff0d2518d11722ae4ec30f623bb0", "score": "0.57164913", "text": "function lookup(inputString) {\r\n\t\tif(inputString.length == 0) {\r\n\t\t\t// Hide the suggestion box.\r\n\t\t\t$('#suggestions').hide();\r\n\t\t} else {\r\n\t\t\t//$.post(\"../clases/auto/comboauto2.php\", {queryString: \"\"+inputString+\"\"}, function(data){\r\n\t\t\t$.post(\"../clases/auto/comboauto.php\", {queryString: \"\"+inputString+\"\"}, function(data){\r\n\t\t\t\tif(data.length >0) {\r\n\t\t\t\t\t$('#suggestions').show();\r\n\t\t\t\t\t$('#autoSuggestionsList').html(data);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t} // lookup\t", "title": "" }, { "docid": "0741cc433a6400449d45a407f6dd41b4", "score": "0.57033604", "text": "function filterByTerm(event) {\n setFilterTerm(event.target.value.toLowerCase());\n }", "title": "" }, { "docid": "d4f408f17ea507098615b9425c49c053", "score": "0.5690015", "text": "function highlightTerms(terms) {\n var highlight = [];\n $.each(terms, function (i, term) {\n highlight.push(term.name);\n if (term.acronym){\n highlight.push(term.acronym);\n }\n });\n\n $('.main-content').highlight(highlight, {className: 'go-glossary'});\n $('.go-glossary').on('click', function() {\n $search.val($(this).text());\n compileTemplate(filterTerms(terms));\n $glossary.toggleClass('active');\n }).attr('role', 'button');\n }", "title": "" }, { "docid": "3dd75356389a18352e6141c68ace20ea", "score": "0.56844693", "text": "handleTermChange(event) {\n this.setState({term: event.target.value});\n }", "title": "" }, { "docid": "1c48c17a14dbdf8544cc84d12fd98c35", "score": "0.56828225", "text": "function addTag() {\n\t\n\tif (searchInput.value.indexOf(\",\") != -1 || searchInput.value.indexOf(\" \") != -1) {\n\t\t\n\t\tdetermineSearchQuery();\n\t\tsearchQuery = searchQuery.slice(0, -1); // Laatste karakter van de term verwijderen, spatie of komma ,\n\t\taddTagNoCheck();\n\t\t\n \t}\n}", "title": "" }, { "docid": "0730260cfaf4036d2521eb0baefc15c1", "score": "0.567907", "text": "function composeSearch(title) {\n title = title.toLowerCase();\n for (let i = 0; i < title.length; i++) {\n if (title[i] === '(') {\n //remove all things after (\n title = title.substr(0, title.indexOf('('));\n } else if (title[i] === '[') {\n //remove all things after [\n title = title.substr(0, title.indexOf('['));\n } else if (title[i] === '&') {\n title = title.replace(/&/g, 'and');\n // well sometimes you gotta do dumb stuff to make it work\n } else if (title.includes('superfly')) {\n title = title.replace(/superfly/g, 'super fly');\n } else if (title[i] === '|') {\n title = title.substr(0, title.indexOf('|'));\n }\n }\n\n //solving characters and multiple spaces\n searchTerm = editInput(title);\n\n console.log(searchTerm);\n getLyrics(searchTerm);\n}", "title": "" }, { "docid": "d495e435543befb73709a7cffa054940", "score": "0.56780344", "text": "function getInput() {\n //Get input and set to lower case\n userInput = input.value;\n userInput = userInput.toLowerCase();\n\n //Check for known actions\n for (var i = 0; i < wordsIKnow.length; i++) {\n if (userInput.indexOf(wordsIKnow[i]) !== -1) {\n //If action is found, set action\n action = wordsIKnow[i];\n break;\n }\n }\n\n //Check for known items\n for (var i = 0; i < itemsIKnow.length; i++) {\n if (userInput.indexOf(itemsIKnow[i]) !== -1) {\n //If item is found, set item\n item = itemsIKnow[i];\n break;\n }\n }\n}", "title": "" }, { "docid": "ce3a89be81574e6a4897599ff8cee62c", "score": "0.5676305", "text": "function matchStart (term, text) {\n if (text.toUpperCase().indexOf(term.toUpperCase()) === 0) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "2f39cc465b4397d98c0aaac91553b3b1", "score": "0.567387", "text": "function isMovieFound (movie){\n //get the user input\n var userInput = searchInput.value;\n\n // Make the input lowercase \n var lowercaseUserInput = userInput.toLowerCase();\n\n // make the movie title lowercase\n var lowercaseTitle = movie.title.toLowerCase();\n\n if (lowercaseTitle.indexOf(lowercaseUserInput) >= 0){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "df0dbccd5819d126ee17f8d8c6dbd8b5", "score": "0.5672403", "text": "function searchType(userInput) {\n if (userInput === \"concert-this\") {\n concertSearch(searchItem);\n } else if (userInput === \"spotify-this-song\") {\n spotifySearch(searchItem);\n } else if (userInput === \"movie-this\") {\n movieSearch(searchItem);\n } else if (userInput === \"do-what-it-says\") {\n textSearch(searchItem);\n } else {\n return console.log(\"Invalid input\");\n }\n}", "title": "" }, { "docid": "7a37c67455d7faf8e59ae6c3118c7b1d", "score": "0.56646603", "text": "function markTitleSearch(text, term) {\n return text.replace(new RegExp(term, \"ig\"), \"<span class='insideSpan'>$&</span>\");\n}", "title": "" }, { "docid": "31c87fcaef9e34e3dc819c76970d9b97", "score": "0.5653693", "text": "function val_input_terms() {\n val_checkchecked(val_getid('input-terms'),'err-terms-blank');\n val_setformok();\n}", "title": "" }, { "docid": "5a88adc02d9cb1012ca1da0a1fd02535", "score": "0.56452686", "text": "function search_tool($search_tool,_cb){\n\t// Value entered/choosed by the user\n\tvar tool_name = $search_tool.val();\n\tif (tool_name) location.href = page_tool + \"?tool=\" + tool_name;\n}", "title": "" }, { "docid": "b228834fc3ee997b8e512c5f1fbe081f", "score": "0.5630493", "text": "function getInfoOn(term,category,emuBackend)\n{\n\tvar emuwebPath = \"../intranet/pages/\"+ emuBackend + \"/\" ;\n\n\tvar url = emuwebPath + \"ResultsList.php?\";\n\turl += \"Where=\" + escape(\"SummaryData CONTAINS '\"+ term +\"'\");\n\turl += \"&QueryPage=\" + escape(\"../../../\" + emuwebPath + \"Query.php\");\n\turl += \"&LimitPerPage=100\";\n\n\tvar form = document.getElementById('form');\n\tform.setAttribute('action',url);\n\tform.submit();\n\treturn;\n}", "title": "" }, { "docid": "34eed5bb294550c723508681fd3dd642", "score": "0.56247866", "text": "handleChange(e) {\n this.term = e.target.value;\n }", "title": "" }, { "docid": "3348cb9ef72465e32f298155c4e9f861", "score": "0.56145334", "text": "function searchTerm(e) {\r\n var eventList = document.querySelectorAll('.empty_div');\r\n let input = e.target.value.toLowerCase();\r\n eventList.forEach(eventItem => {\r\n let toSearch = eventItem.childNodes[0].children[0].childNodes[0].innerText;\r\n if (toSearch.toLowerCase().indexOf(input) != -1) {\r\n eventItem.style.display = 'block';\r\n }\r\n else {\r\n eventItem.style.display = 'none';\r\n }\r\n });\r\n}", "title": "" }, { "docid": "9beda14b139971625404a0cb1ad08b17", "score": "0.5605939", "text": "function search(term) {\n self.searching(true);\n $.ajax(\"/search?query=\" + encodeURIComponent(term)).done(function(data, status, xhr) {\n handleSignatories(data, xhr);\n var newTerm = self.searchField();\n if (newTerm !== term && newTerm.length >= 2) {\n // If the search field has been updated since we issued the search request, search again.\n search(newTerm);\n } else if (newTerm === \"\") {\n self.refreshSignatories(30);\n } else {\n self.searching(null);\n }\n });\n\n }", "title": "" }, { "docid": "ecdd7439d8f68cdff031da524aeb7b78", "score": "0.56006634", "text": "function lookup(inputString) {\r\n\t\t\t\tif(inputString.length == 0) {\r\n\t\t\t\t\t$('#suggestionDivTom').hide();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$.post(\"include_php/resultList.php\", {queryString: \"\"+inputString+\"\"}, function(data){\r\n\t\t\t\t\t\tif(data.length >0) {\r\n\t\t\t\t\t\t\t$('#suggestionDivTom').show();\r\n\t\t\t\t\t\t\t$('#autoSuggestionsListTom').html(data);\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}", "title": "" }, { "docid": "42d1e936fe375aa7eb1a42b520cb9ebb", "score": "0.5598846", "text": "function humanFindWordToUse() {\n\n var humanFoundWord = $(\"#human-word-input\").val();\n console.log(\"Checking human word of:\" + humanFoundWord);\n\n if (isThisAWord(humanFoundWord)) {\n if (haveLettersForWord(humanFoundWord)) {\n successfullyAddedWord(humanFoundWord);\n } else {\n alert(humanFoundWord + \" - Do not have the letters for this word\");\n }\n } else {\n alert(humanFoundWord + \" is not a valid word.\");\n }\n}", "title": "" }, { "docid": "447fb2e07dd5b652939b3cd3e420fd73", "score": "0.55903965", "text": "function addTerm(aTerm) {\n if (aTerm)\n terms.push(aTerm);\n }", "title": "" }, { "docid": "398f6c71c41e765d8a61c23b76964e46", "score": "0.5579125", "text": "search(term){\n Spotify.search();\n }", "title": "" }, { "docid": "359f98e4e2da96585836e5b4bda9e83b", "score": "0.55662227", "text": "function tagTerm(text, searchTerms){\n var searchText = text.toUpperCase();\n\tfunction mapToUpper(item){\n\t\t return item.toUpperCase(); \n\t};\n\tvar compareTerms = _.map(searchTerms, mapToUpper);\n\t//var tag = _.intersection(compareWords, searchCompare);\n\tvar tag = compareTerms.filter( function (s) { return searchText.indexOf(s) > -1; });\n\treturn tag;\n}", "title": "" }, { "docid": "ea60bfedef2685d7abbb501860f9bcec", "score": "0.5560317", "text": "function search() {\n // Declare variables\n let input = document.getElementById('input-term');\n term = input.value.toLowerCase().replace(\" \", \"+\");\n\n let list = document.getElementById(\"result-list\");\n\n if (term.length < 3) {\n return;\n }\n\n list.innerHTML = '';\n\n page = 1;\n showResultsOfCurrentPage();\n\n}", "title": "" }, { "docid": "7fcff9cdfde61646114666170333634b", "score": "0.5557968", "text": "function EDAMTerm (term, uri){\n this.term = term;\n this.uri = uri;\n}", "title": "" }, { "docid": "0ed6cabab1d8d1c0fb3540f90822dc12", "score": "0.5556474", "text": "function UserInputs(searchRequest, input) {\n switch (searchRequest) {\n case 'concert-this':\n concertSearch(input, searchLimit);\n break;\n case 'spotify-this-song':\n spotifySearch(input, searchLimit);\n break;\n case 'movie-this':\n omdbSearch(input, searchLimit);\n break;\n case 'do-what-it-says':\n txtShowSearch();\n break;\n default:\n console.log(\"Invalid Search, please type any of the following command options: \\nconcert-this \\nspotify-this-song \\nmovie-this \\ndo-what-it-says.\")\n }\n}", "title": "" }, { "docid": "8e2ee59bcb85598ac52dda55df58af24", "score": "0.5545127", "text": "function findplaces(input){\n var request = {\n location: nyc,\n radius: '500',\n // type: 'tea',\n query: input\n };\n\n service = new google.maps.places.PlacesService(map);\n service.textSearch(request, callback);\n \n\n function callback(results, status) {\n if (status == google.maps.places.PlacesServiceStatus.OK) {\n for (var i = 0; i < results.length; i++) {\n var place = results[i];\n createMarker(results[i]);\n }\n }\n }\n }", "title": "" }, { "docid": "7f89214a3de01a9c15b70679ab3a16d0", "score": "0.55305874", "text": "function autoSuggestSearch (searchbox){ \n showSuggestSearchList(searchbox); \n}", "title": "" }, { "docid": "1582910a1bdb6b939526d669bc2dba2e", "score": "0.5522143", "text": "function checkTerms(editableObj) {\n var savedSel;\n // store current sel\n if (rangy.hasOwnProperty('saveSelection'))\n savedSel = rangy.saveSelection();\n \n highlightTerms(editableObj);\n\n // Restore the original selection\n if (rangy.hasOwnProperty('restoreSelection'))\n rangy.restoreSelection(savedSel);\n}", "title": "" }, { "docid": "0e4bc6c13fb455f5ade66d76f00c5500", "score": "0.5521627", "text": "function getIntersectTerm() {\n\t \t\tvar rawParams = $scope.aSearch;\n\t \t\tvar intersectTermResult;\n\t \t\tvar hasInput = false;\n\n \t\t\tif (rawParams && rawParams.intersect) {\n \t\t\t\thasInput = true;\n \t\t\t\tvar words = rawParams.intersect.split(\" \");\n \t\t\t\tif (words.length === 1) {\n \t\t\t\t\tintersectTermResult = words[0];\n \t\t\t\t} else {\n \t\t\t\t\tintersectTermResult = words[0] + \" OR \" + words[1];\n \t\t\t\t}\n \t\t\t}\n\n \t\t\tif (rawParams && rawParams.accountIntersect) {\n \t\t\t\thasInput = true;\n \t\t\t\tintersectTermResult = \"from:\" + rawParams.accountIntersect.split(\" \")[0];\n \t\t\t}\n\n\n\t \t\tif (hasInput) {\n\t \t\t\treturn intersectTermResult;\t\n\t \t\t} else {\n\t \t\t\treturn \"\";\n\t \t\t} \t\t\n\t \t}", "title": "" }, { "docid": "963c63eeef2e01574d075c88edd8d926", "score": "0.55033976", "text": "handleKeyPress(event, term){\n const keyName = event.key;\n if(keyName === 'Enter'){\n this.props.onSearch(this.state.term);\n }\n }", "title": "" }, { "docid": "25de5d02b511f156a81df26a62ea6f3d", "score": "0.5499671", "text": "function checkStringInElement(term, element) {\n // I use regular expression for term matching and arrComparableProps definition to seek in element props\n var termRegExp = new RegExp(term.toLowerCase());\n for (var i = 0; i < arrComparableProps.length; i++) {\n var prop = arrComparableProps[i];\n if (termRegExp.test(element[prop].toLowerCase())) return true;\n }\n return false;\n }", "title": "" }, { "docid": "572f233683b1c173b96cd8018d39f161", "score": "0.5499259", "text": "function doWhatItSays(searchTerm){\n\n fs.readFile(\"random.txt\", \"utf8\", function(error, data) {\n if (error) {\n return console.log(error);\n }\n let dataArr = data.split(\", \");\n if (dataArr[0] === \"spotifyThis\"){\n spotifyThis(dataArr[1])\n }\n else if (dataArr[0] === \"movieThis\"){\n movieThis(dataArr[1])\n }\n else if (dataArr[0] === \"concertThis\"){\n concertThis(dataArr[1])\n }\n else {\n console.log('Hmm, something seems to be wrong...');\n }\n\n }); \n}", "title": "" }, { "docid": "25a73d18d2cc8aa73f66b4f51d4d15be", "score": "0.5494987", "text": "function setTerm(options) {\n if (!options.where) return null;\n const match = options.where.match(/.+\\s*=\\s*'(.+)'/);\n return match ? match[1] : null;\n}", "title": "" }, { "docid": "f8655c3f049efc938128776487f93f73", "score": "0.5493214", "text": "termChanged({ currentTarget: t}) { this.setState({term: t.value })}", "title": "" }, { "docid": "513162bcfacf6414c056878a3e568c7b", "score": "0.5492984", "text": "function produceSearchTerm (input) {\n // Remove special charaters\n var temp = input.replace(/[^A-z0-9]/gi, '');\n \n // Remove whitespace\n temp = temp.replace(/[ ]/gi, '');\n\n // Lowercase\n temp = temp.toLowerCase();\n\n // Return string\n return temp;\n}", "title": "" }, { "docid": "848d40f40d7aecfcc2a61780dd829e38", "score": "0.54918385", "text": "search(keyword) {\n if (this.dictionary[keyword.toLowerCase()]) return 'correctly';\n return 'incorrectly';\n }", "title": "" }, { "docid": "39c5d9db2a942dd864dbc9cbd3658f54", "score": "0.5488842", "text": "function getHint(currentWord){\n if(currentWord === \"Rainier\"){\n rainierHint();\n }else if(currentWord === \"Saint Helens\"){\n stHelenHint();\n }else if(currentWord === \"Adams\"){\n adamsHint();\n }else if(currentWord === \"Glacier\"){\n glacierHint();\n }else if(currentWord === \"Baker\"){\n bakerHint();\n }else if(currentWord === \"Hood\"){\n hoodHint();\n }else if(currentWord === \"Three Sisters\"){\n tsHint();\n }else if(currentWord === \"Denali\"){\n denaliHint();\n }else if(currentWord === \"Everest\"){\n everestHint();\n }else if(currentWord === \"Lhotse\"){\n lhotseHint();\n }\n}", "title": "" }, { "docid": "8b92bf812cdb74966f681bd7524b032d", "score": "0.5485876", "text": "function searchTermChange() {\r\n\t\tvar curtext=String($(\"#searchTerm\").val());\r\n\t\t// console.log(\"searchTermChange - \"+curtext);\r\n\t\tcurFilter=curtext.trim().toLowerCase();\r\n\t\tupdateList();\r\n\t}", "title": "" }, { "docid": "ab46c2ce5dc66b147901e0d735470136", "score": "0.5481347", "text": "function getValidTermFromAlias(searchTerm, source, returnArray) {\n if (debug) sf.log(\"getValidTermFromAlias with term: \" + searchTerm);\n if (typeof source == 'string') {\n if (debug) sf.log(\"source is \" + source);\n if (source == 'weight')\n source = aliasLists.weightAliases;\n else if (source == 'slot')\n source = aliasLists.slotAliases;\n else if (source == 'ascended')\n source = aliasLists.ascendedPrefixes;\n\n else {\n sf.log(\"Invalid source for getValidTermFromAlias: \" + source);\n source = [];\n }\n } else {\n if (debug) sf.log(\"Search term is an object with \" + Object.keys(source).length + \" keys\");\n }\n var searchTermsList = [];\n for (var validName in source) {\n for (var j in source[validName])\n if (sf.removePunctuationAndToLower(source[validName][j]).replace(/\\s+/g, '').includes(searchTerm)) {\n if (debug) sf.log(\"Found vaild search term: \" + validName);\n searchTermsList.push(validName);\n }\n }\n if (returnArray || !searchTermsList) return searchTermsList;\n else return searchTermsList[0];\n}", "title": "" }, { "docid": "54271ed4453f29d305bf5822506333a6", "score": "0.5481112", "text": "function executeSearch(term) {\n let results = fuse.search(term); // the actual query being run using fuse.js\n console.log(results);\n let searchitems = ''; // our results bucket\n\n if (results.length === 0) { // no results based on what was typed into the input box\n resultsAvailable = false;\n searchitems = '';\n } else { // build our html \n \n for (var i in results.slice(0,5)){\n\n for(var j in results[i].item.quotes){\n var htmlstripped = strip(results[i].item.quotes[j].text);\n var searchresult = `\n <li>\n <a href='/options.html#${results[i].item.url}'><img src='https://s2.googleusercontent.com/s2/favicons?domain_url=${extractHostname(results[i].item.url)}'/>${results[i].item.title}\n <div>\n <div class=\"search-url\">${extractHostname(results[i].item.url)}</div>\n </div>\n <span class=\"search-content\">${htmlstripped.substring(0,120)}...</span>\n </a>\n </li>`;\n\n searchitems = searchitems + searchresult;\n \n }\n \n }\n \n resultsAvailable = true;\n }\n\n document.getElementById(\"searchResults\").innerHTML = searchitems;\n if (results.length > 0) {\n document.getElementById(\"searchResults\").style.display = \"inline-block\";\n first = list.firstElementChild.firstElementChild; // first result container — used for checking against keyboard up/down location\n last = list.lastElementChild.firstElementChild; // last result container — used for checking against keyboard up/down location\n }\n\n}", "title": "" }, { "docid": "c792beeea7eba8e21b2716bfdad9ffd1", "score": "0.5477982", "text": "function doSelectTerm() {\n var e = document.getElementById(\"inp1\");\n var selIndex = e.options[e.selectedIndex].value;\n Selected(selIndex, 'inp1');\n e = document.getElementById(\"inp6\");\n selIndex = e.options[e.selectedIndex].value;\n Selected(selIndex, 'inp6');\n return 1;\n}", "title": "" }, { "docid": "c1839e20ada4c1f5b083d8a3a98d69f3", "score": "0.5470847", "text": "afterSearch( searchText, result ) {\n }", "title": "" }, { "docid": "5d577f4afd25088f6ce593943ae68029", "score": "0.54566276", "text": "function markTermReviewed(termName) {\n\tif (reviewedTerms.indexOf(\" \" + termName + \";\") == -1) {\n\t\treviewedTerms += \" \" + termName + \";\"; // add space before term to\n\t\t// prevent situation like\n\t\t// 'duplicate' and 'plicate'\n\t\t// alert(reviewedTerms);\n\t}\n}", "title": "" }, { "docid": "5d577f4afd25088f6ce593943ae68029", "score": "0.54566276", "text": "function markTermReviewed(termName) {\n\tif (reviewedTerms.indexOf(\" \" + termName + \";\") == -1) {\n\t\treviewedTerms += \" \" + termName + \";\"; // add space before term to\n\t\t// prevent situation like\n\t\t// 'duplicate' and 'plicate'\n\t\t// alert(reviewedTerms);\n\t}\n}", "title": "" }, { "docid": "54c7ba1502265c501dd9d6e61ec188fe", "score": "0.5455151", "text": "function searchName() {\n $(\"#species-search\").on('input', function() { \n var input = document.getElementById(\"species-search\");\n var filter = input.value.toUpperCase();\n\n // if we search for a shorter term, reapply all filters and THEN search by term\n if (filter.length <= inputLength) {\n applyAllFilters();\n }\n\n inputLength = filter.length;\n filterByName();\n });\n}", "title": "" }, { "docid": "aa37f884a56126c5f7c06477d7b798d7", "score": "0.54516315", "text": "function getInputText(){\n console.log('user typed in the from :' , document.getElementById(\"inputSearch\").value)\n return document.getElementById(\"inputSearch\").value;\n}", "title": "" }, { "docid": "02b4833fe8980301c01afaad8a11cb2f", "score": "0.54400164", "text": "function selectSearch(event) {\n if (search.value.length > 2) {\n foundRecipes = []\n wSearch = toUpperName(search.value)\n tSearch = search.value.split(\" \")\n wString = wSearch.split(\" \")\n l = wString.length\n for (let i = 0; i < l; i++) {\n console.log(tSearch[i])\n if (tSearch[i].length > 2) {\n if (l > 1 && i < l - 1) {\n tSearch[i] += \" \"\n wString[i] += \" \"\n }\n if (i == l - 1 && tSearch[i].length > 2) {\n if (event.key == 'Space' || event.key == \"click\") {\n tSearch[i] += \" \"\n wString[i] += \" \"\n }\n }\n if (tSearch[i].length > 2) {\n let sArray = foundRecipes\n let wArray1 = nativeSearch(tSearch[i], wString[i])\n let wArray2 = foundRecipes\n foundRecipes = [...new Set((wArray1).concat(wArray2))]\n if (wArray1.length > 0 && foundRecipes != sArray) {\n if (i == l - 1) {\n genTag(wArray1,tSearch[i], wString[i], i)\n }\n displayRecipes()\n } else {\n alert(\"Aucune recette ne correspond à ce critère de recherche\")\n }\n }\n }\n }\n }\n}", "title": "" }, { "docid": "b8a2faf7ae5c4d5c722d2f9b44d35519", "score": "0.5431201", "text": "enterSearchDetails(jobTypeText, locationText) {\n CommonKeywords.EnterText(this.jobTypeInputBoxElement, jobTypeText)\n CommonKeywords.EnterText(this.locationInputBoxElement, locationText)\n }", "title": "" }, { "docid": "0f4b2777cb4e8d56da4550f0090fa409", "score": "0.5430101", "text": "function searchList(input) {\n searchTerm = input.toLowerCase();\n console.log(searchTerm);\n $students = $('h3:contains(' +searchTerm+')').closest('li');\n $students.add($('span:contains('+searchTerm+')').closest('li'));\n if ($students.length === 0) {\n showNoResults();\n };\n appendPageLinks($students);\n currentPage = 1;\n}", "title": "" }, { "docid": "f240df602dc6550df6d0cb1a1dd90029", "score": "0.5429659", "text": "function search(e){\n e.preventDefault()\n window.location.href=\"/find\"+word\n }", "title": "" }, { "docid": "3ea34704fab22943c81c4f3dcd30c184", "score": "0.5427354", "text": "function highlightTerm( passage, start) {\n var id = $(passage).parents('.eventextraction')[0].typeId;\n if(!$(start).parents('#selection').length && id != -1) { // if no selection is made and maximum matches is not reached\n \n $(passage).children('#selection').contents().unwrap();\n start.wrapAll(\"<span class='term event\" + id + \"term' id='selection' />\");\n \n $(passage).find('span:not(#selection)').bind('mouseover', function(e) {\n //highlightMultiple(start, $(e.target), passage, id);\n });\n \n } else { // remove when click on selection\n $(passage).children('#selection').replaceWith(function() {\n return $(this).contents();\n });\n }\n }", "title": "" }, { "docid": "28fc5085d1c8bb3f2c27e796af0f1f72", "score": "0.5421313", "text": "function movieSearch() {\n inquirer.prompt({\n type: \"input\",\n message: \"What movie would you like to search for? (Ex. 'The Matrix')\",\n name: \"movie\",\n }).then(answers => {\n search = answers.movie;\n searchImdb(search);\n });\n}", "title": "" }, { "docid": "0882af27add78ea3faa46d180b1bdedb", "score": "0.54175925", "text": "getword(stringSearched){\n let searchStr = stringSearched.toLowerCase();\n const getdataMap = new getData();\n // get prediction for entered input\n getdataMap.predictns(searchStr);\n if(searchWord.value === ''){\n this.vis.style.visibility = 'hidden';\n }\n \n }", "title": "" }, { "docid": "cff59f2eb253431a9b1c97afd75cd998", "score": "0.5416486", "text": "onInputChange(event) {\n // set state when text is entered into search bar\n this.setState({ term: event.target.value });\n }", "title": "" }, { "docid": "24c36086371494046092c9b943180ade", "score": "0.54141736", "text": "function triggerSearchByCategory(inputTerm) {\n $('.git-div, .youtube-div').css('display', 'none');\n $('.pub-api-div').css('display', 'block');\n getDataFromApiByCategory(inputTerm, displayResults);\n}", "title": "" }, { "docid": "ac2484775c921b81a48c9bbc04d9686e", "score": "0.5413365", "text": "function check_make(keyword) {\n for (var i=0;i<hearst_response.content.make.length;i++) {\n if (keyword.text.toLowerCase().indexOf(hearst_response.content.make[i].name.toLowerCase())>-1) {\n keyword.text = hearst_response.content.make[i].name;\n return keyword;\n }\n }\n return null;\n }", "title": "" }, { "docid": "a5c566211654d8369b37cbdeb41b377b", "score": "0.5398681", "text": "function checkIsTerm(e)\n{\n if (Array.isArray(e) && e.length >= 0 && typeof(e[0]) === 'string') {\n\t// no problem\n }\n else {\n\tthrow new Error(\"Not a term: \" + JSON.stringify(e, undefined,2));\n }\n}", "title": "" } ]
9b790e834af82d8fb39ca98f0c208ff6
Create a button that has a LED in it.
[ { "docid": "784e5ecaf54ceec3b202fa7ccb036436", "score": "0.6560322", "text": "function createToggleLedButton(key) {\n var upImagePath = path.resolve(IMAGE_FOLDER + key.upImage);\n var downImagePath = path.resolve(IMAGE_FOLDER + key.downImage);\n\n if (!key.currentImage) {\n key.currentImage = upImagePath;\n }\n\n // Draw the key immediately so that we can see it.\n draw(key);\n\n // Draw the new image when the LED state changes.\n api.on(key.led, (value) => {\n key.currentImage = value ? downImagePath : upImagePath;\n draw(key);\n });\n}", "title": "" } ]
[ { "docid": "dd88830ca93dab856b4488da2e1c4a8a", "score": "0.7390106", "text": "function createButton(button) {\n const press = () => button.press();\n const update = lightClass => wire(button)`\n <button\n class=${'light-button ' + lightClass}\n onclick=${press}\n >\n ${button.symbol}\n </button>`;\n button.on('lighton', () => update('on'));\n button.on('lightoff', () => update('off'));\n return update('off');\n }", "title": "" }, { "docid": "d04310947c0adb742b289ed11cdabc11", "score": "0.69881546", "text": "createButton() {}", "title": "" }, { "docid": "38d0f0276970f6ec7d9f889e0683684e", "score": "0.69072443", "text": "createButton() {\n return new WindowsButton();\n }", "title": "" }, { "docid": "76da2be19e1b9d337e62c7c707b6dc3d", "score": "0.6828236", "text": "function createOnOffButton() {\n let onOff = document.createElement('button');\n onOff.innerText = \"click [here] or on my [eyes]\";\n onOff.addEventListener('click', function() {\n let catchEyes = document.querySelector('.chead');\n catchEyes.classList.toggle(\"magic\");\n });\n page.appendChild(onOff);\n}", "title": "" }, { "docid": "74e393f567d37eab8db6d29c3217fa6d", "score": "0.6750544", "text": "function makePortButton() {\n // create and position a port chooser button:\n portButton = createButton(\"choose port\");\n portButton.position(10, 10);\n // give the port button a mousepressed handler:\n portButton.mousePressed(choosePort);\n}", "title": "" }, { "docid": "4b46fe9ad4e9ad988ae9ffdbc7bafb29", "score": "0.66910404", "text": "createButtonElement() {\n const btn = document.createElement('button')\n btn.setAttribute('width', '80px')\n btn.setAttribute('height', '20px')\n return btn\n }", "title": "" }, { "docid": "4320ab3bce650f129273eda1be451722", "score": "0.6552487", "text": "function createButton(index, id, value, color) {\n\n var button = document.createElement('button')\n button.classList.add(\"btn\")\n button.classList.add(\"btn-default\")\n button.classList.add(color)\n button.classList.add(id)\n button.setAttribute(\"id\", id + index)\n button.innerText = value\n return button\n}", "title": "" }, { "docid": "e935faf2812fbaff256dc522fe085549", "score": "0.65411246", "text": "_createButton() {\n this._button = new Sprite.from(\"replayButton\");\n this._button.name = \"replayButton\";\n this._button.anchor.set(0.5);\n this._button.interactive = true;\n this._button.buttonMode = true;\n this._button.on(\"click\", () => {\n this.emit(Win.events.REPLAY);\n });\n this._button.y = 330;\n this.addChild(this._button);\n }", "title": "" }, { "docid": "32dc18e621d339920c96aacc86792789", "score": "0.6497296", "text": "createButton(text) {\n const button = document.createElement('button');\n button.textContent = text;\n button.classList.add('btn');\n return button;\n }", "title": "" }, { "docid": "77068ab3a0c9dcdf0366ec1922ee7831", "score": "0.6478881", "text": "function createPvButton() {\n var div = document.createElement('DIV');\n div.id = 'pv-switch-wrapper';\n div.innerHTML = '<button id=\"pv-switch\">Prime only</button>';\n document.querySelector('#navbar').appendChild(div);\n document.querySelector('#pv-switch').addEventListener('click', togglePvOnly);\n }", "title": "" }, { "docid": "1e813d6dd53d4aee0fd2b80df7702c6d", "score": "0.64519334", "text": "function createButton() {\r\n let btn = document.createElement(\"button\");\r\n btn.innerHTML = \"Click Me!\";\r\n document.body.appendChild(btn);\r\n btn.setAttribute('id', 'btn');\r\n btn.style.color = \"rgb(53, 50, 50)\";\r\n btn.style.position = \"fixed\";\r\n btn.style.zIndex = \"999999\";\r\n btn.style.left = \"40%\";\r\n btn.style.bottom = \"5%\";\r\n btn.style.fontSize = \"1.25em\";\r\n btn.style.backgroundColor = \"rgba(255, 255, 255, 0.3)\";\r\n btn.style.fontFamily = \"fantasy\";\r\n btn.style.borderRadius = \"5px\";\r\n\r\n btn.onclick = function () {\r\n createElement();\r\n setTimeout(function () {\r\n update();\r\n }, 100);\r\n };\r\n }", "title": "" }, { "docid": "5b37eee2005cb55a1996330615042c35", "score": "0.6424084", "text": "function createToggleButton(target, id) {\n var div = document.getElementById(target.id.slice(1));\n var button = document.createElement(\"button\");\n var text = document.createTextNode(\"\\u2713\");\n button.classList.add(\"roundButton\");\n button.id = \"togglebtn\" + id;\n button.appendChild(text);\n button.addEventListener(\"click\", function () {\n clickButton(button, target);\n });\n if (document.body != null) {\n div.append(button);\n }\n // button.style.left = target.offsetLeft;\n // button.style.top = target.offsetTop + 100;\n}", "title": "" }, { "docid": "71f732b7375d24b5d31b2fd325ecc2db", "score": "0.6418724", "text": "function createButton(text)\n\t{\n\t\tvar button = document.createElement(\"Button\");\n\t\tbutton.innerHTML = text;\n button.style.border = \"0px\";\n\t\tbutton.style.background = \"white\";\n\t\tbutton.style.color = \"blue\";\n\t\tbutton.style.fontWeight = \"bolder\";\n\t\tbutton.style.paddingLeft = \"3px\";\n\t\tbutton.onmouseout= function()\n\t\t{\n\t\t\tthis.style.background = 'white'\t\n\t\t}\n\t\tbutton.onmouseover= function()\n\t\t{\n\t\t\tthis.style.background = '#33FFCC'\t\n\t\t}\n\t\treturn button;\n\t}", "title": "" }, { "docid": "75ad76ff78403c981b01dde5ac2a27ef", "score": "0.6406682", "text": "function createSwitchButton(book) {\n const switchToggle = doc.createElement(\"div\");\n switchToggle.innerHTML = `\n <label class=\"switch\">\n <input type=\"checkbox\" ${book != null ? (book.read ? \"checked\" : \"\") : \"\"}>\n <span class=\"slider round\"></span>\n </label>`;\n return switchToggle;\n}", "title": "" }, { "docid": "eec6891b5c3d7dc2f9a5085880d12dad", "score": "0.6402537", "text": "function buildButton() {\n let buttonElement = document.createElement(\"button\");\n const anchorElement = document.createElement(\"A\");\n anchorElement.setAttribute(\"href\", \"#\");\n anchorElement.textContent = \"UP\";\n buttonElement.appendChild(anchorElement);\n return buttonElement;\n}", "title": "" }, { "docid": "819d39cbe557cd1fb7dc8f8fd1aa139a", "score": "0.63765204", "text": "function createBt(upgrade, hbox)\n{\n upgrade.bt = document.createElement(\"input\");\n upgrade.bt.type = \"button\";\n upgrade.bt.className = \"bt\";\n upgrade.bt.value = upgrade.name;\n hbox.appendChild(upgrade.bt);\n}", "title": "" }, { "docid": "30701a302c16df4f87e427d74f80a4bf", "score": "0.63463134", "text": "function newButton(value) {\n let btn = $(\"<button>\");\n btn.attr(\"class\", \"col btn btn-light w-100 mx-auto py-2 slide-up\");\n btn.attr(\"value\", value);\n btn.html(\"<h3>\" + value + \"</h3>\");\n return btn;\n }", "title": "" }, { "docid": "b0d4210b4216781648e57a8ca5bbec8b", "score": "0.6340855", "text": "function light(err, state) {\n\n // check the state of the button\n // 1 == pressed, 0 == not pressed\n if(state == 1) {\n // turn LED on\n led.writeSync(1);\n } else {\n // turn LED off\n led.writeSync(0);\n }\n\n}", "title": "" }, { "docid": "cd1ed4080a3638147c5099932f1fedf2", "score": "0.62924534", "text": "function createButton(){\n var timeButton = document.createElement(\"button\")\n timeButton.setAttribute(\"class\", 'b btn btn-success btn-block')\n timeButton.setAttribute(\"data-value\", 'unlocked')\n timeButton.setAttribute(\"type\", 'button')\n timeBlockColButton.append(timeButton)\n}", "title": "" }, { "docid": "3812e286f40b5e2a7548bf20cf01d0db", "score": "0.62866515", "text": "function bleConnect(buttonID) {\r\n var thisButton = document.getElementById(buttonID);\r\n thisButton.setAttribute(\"fill-opacity\",0.9);\r\n led.connect()\r\n .then(() => console.log('connected'))\r\n .catch(error => { console.log('connect error!'); });\r\n\r\n}", "title": "" }, { "docid": "f2e6032bf48ab7a6dea9fd2184d8e279", "score": "0.6266515", "text": "function CustomButton(){}", "title": "" }, { "docid": "4706ff50c1cacf9f51fe757d2122428a", "score": "0.62659425", "text": "function createButton() {\n var inputButton = document.createElement('button');\n inputButton.name = \"todo-button\";\n inputButton.id = \"todo-btn\";\n inputButton.textContent = \"Add Animals\"\n\n return (inputButton);\n}", "title": "" }, { "docid": "282e05c72022754c0ff21e00e678d503", "score": "0.62521785", "text": "function CreatePushButton( name, text ) \r\n{\r\n var domButton;\r\n domButton = document.createElement('button');\r\n domButton.type = 'button';\r\n domButton.name = name;\r\n domButton.innerHTML = text;\r\n domButton.addEventListener(\"click\", ClickPushButton, true);\r\n return domButton;\r\n}", "title": "" }, { "docid": "dd161c925e425e0acb0f5d254b1b1254", "score": "0.62116593", "text": "function createButton(id, color, colorbg, title) {\n return `<a id=\"${id}\" class=\" font-size-9 bold padding-btn effect ${color} ${colorbg} plus\">${title}</a>`;\n}", "title": "" }, { "docid": "effcdeb1ffb6372d6555ed46396593f3", "score": "0.6204902", "text": "function tweakSwitchButton(){\n if(tkSwitchButton){\n var button = document.createElement('button');\n button.innerHTML = \"Switch Team\";\n button.onclick=switchTeams;\n button.style.opacity=switchOpacity;\n button.onmouseover= function(){button.style.cursor=\"pointer\";button.style.opacity=1;};\n button.onmouseleave= function(){button.style.opacity=switchOpacity;};\n document.getElementById(\"sound\").appendChild(button);\n if(moveSwitch){\n button.style.position = \"absolute\";\n button.style.right = \"0px\";\n button.style.bottom = \"-100px\";\n }\n }\n}", "title": "" }, { "docid": "980f86d68e4fa8beb5effcc93a69c130", "score": "0.61839527", "text": "function spLightButton(bNum, bColor) {\n//console.log(bNum,spFindButtonId(bNum).toString(16),bColor);\n let bufOff = [];\n let bufOn = [];\n let button = spFindButtonId(bNum);\n\n // explicitly turn off button, to get the right color\n bufOff[0] = 0x80;\n bufOff[1] = button;\n bufOff[2] = bColor;\n spSendPkt(bufOff);\n\n // if we are lighting the button, do it here\n if (bColor != 0) {\n bufOn[0] = 0x90;\n bufOn[1] = button;\n bufOn[2] = bColor;\n spSendPkt(bufOn);\n }\n}", "title": "" }, { "docid": "c040ddec9718e68072624503b1795144", "score": "0.61805636", "text": "createButton () {\n let icon = document.createElement('i')\n icon.className = 'fa fa-copy w-clickable'\n\n this.button = document.createElement('button')\n this.button.className = 'e97'\n this.button.title = I18n.t(NAME).title\n this.button.append(icon)\n this.button.onclick = () => this.copyAddress()\n }", "title": "" }, { "docid": "8614097aeb580398a4c38440cd928f40", "score": "0.61803913", "text": "function generateButtons() {\n var startNote = 261.6;\n for (var i = 0; i < numBtns; i++) {\n //Calculate which octave this is in (every 7 notes)\n var octave = Math.floor(i / Key.length);\n //Calculate what the new base note is (doubled for every octave)\n var note = startNote * Math.pow(2, octave);\n //Multiply to the frequency of the note in the key\n note *= 1 + Key[i % Key.length] / 12;\n\n var btn = new Button(\n note,\n //Map hue evenly around the circle\n \"hsl(\" + (i * 360 / numBtns) + \", 30%, 60%)\",\n \"hsl(\" + (i * 360 / numBtns) + \", 100%, 60%)\",\n i\n );\n btns.push(btn);\n }\n}", "title": "" }, { "docid": "031c4e2c2e1bafc9f59afae7d6aeebaf", "score": "0.6179617", "text": "makeStartButton() {\n const startBtn = document.createElement(\"button\");\n startBtn.setAttribute(\"id\", \"start-button\");\n startBtn.innerText = \"Click to start game\";\n startBtn.style.marginBottom = \"7px\";\n const body = document.querySelector(\"body\");\n body.prepend(startBtn);\n startBtn.addEventListener(\"click\", this.handleStartClick.bind(this));\n }", "title": "" }, { "docid": "f034919a5b34d908396c0f344ec14944", "score": "0.6175985", "text": "function crearBoton(){\n\t\n\tvar buttonnode = document.createElement('input');\n\tbuttonnode.type = \"button\";\n\tbuttonnode.value = \"parar\";\n\tbuttonnode.onclick = pararVentana;\n\tventana.document.body.appendChild(buttonnode);\n\t\n}", "title": "" }, { "docid": "d10c444099113b1e46ad0e0fcff906e7", "score": "0.6174384", "text": "function bleConnect(buttonID) {\r\n var thisButton = document.getElementById(buttonID);\r\n // thisButton.setAttribute(\"fill-opacity\",0.9);\r\n blelectriclight.connect()\r\n .then(() => console.log('connected'))\r\n .catch(error => { console.log('connect error!'); });\r\n\r\n}", "title": "" }, { "docid": "5e498bae374a05c4271e71d38d029aeb", "score": "0.6161946", "text": "function createButton(label, container) {\n var btn = L.DomUtil.create('button', '', container);\n btn.setAttribute('type', 'button');\n btn.innerHTML = label;\n return btn;\n}", "title": "" }, { "docid": "3cb619d3586a09ebddfe5f6548738008", "score": "0.61492485", "text": "function createButton(value, id) {\n const newButton = document.createElement('input');\n newButton.setAttribute('type', 'button');\n newButton.setAttribute('value', value);\n newButton.setAttribute('id', `button${id}`);\n return newButton;\n}", "title": "" }, { "docid": "5dc8a8c60426c3af3b7c43d951bf6f03", "score": "0.61390835", "text": "function createButton(id, text) {\n const button = document.createElement('button');\n button.setAttribute('id', id);\n button.classList.add('btn');\n button.textContent = text;\n return button;\n}", "title": "" }, { "docid": "c92defa4f5617d29a971c61193763912", "score": "0.6135044", "text": "function init_launch_button() {\n //create launch button\n stage.removeChild(launch_button);\n launch_button = buttonGenerator(275, 40, 220, 60, 0xCC0000, 5, 0.3, 'images/launch.png', launch_activate);\n stage.addChild(launch_button);\n }", "title": "" }, { "docid": "263167ff4475c27a79ea8a13f9ed5056", "score": "0.61341035", "text": "add_button(x, y, width, height, title, callback, win) {\n let button = new Button(title, width, height, callback, win.main_frame);\n button.set_position(x, y);\n win.add_child(button);\n win.draw(this.last_creation_offset, this.last_creation_offset);\n return button;\n }", "title": "" }, { "docid": "b376d3aa13740c1fcbf034fd428d5d8e", "score": "0.61276484", "text": "createButton () {\n\n this.button = document.createElement('button')\n\n this.button.title = 'Manage extensions'\n\n this.button.className = 'extension-manager btn'\n\n this.button.onclick = () => {\n this.showPanel(!this.panelActive)\n }\n\n const span = document.createElement('span')\n span.className = 'fa fa-cogs'\n this.button.appendChild(span)\n\n this.viewer.container.appendChild(this.button)\n }", "title": "" }, { "docid": "46f8515148784cbf19ef7c45fc280c85", "score": "0.61241394", "text": "function _make_btn(inst, parent, name, title, cb_obj, toggle, target, value, button_width )\n{\n // create buttons as needed...\n var btn = document.createElement('button');\n\n\t//\tcreate,set an id...\n\t//var name = 'btn_' + title;\n\tbtn.setAttribute('id', name);\n\n\t//\tclick event...\t\n\tif ( target==null )\n\t{\n\t btn.onclick = function(){ _onclick(btn, inst, name, cb_obj, title, toggle, value, button_width) };\n\t}\n\telse\n\t{\n\t btn.onclick = function(){ _on_pageclick(btn, inst, name, cb_obj, target, value, button_width) };\n\t}\n\n\t//\tcreate,set main style...\n\tvar width_string = \"\";\n\tif (button_width != null) {\n\t width_string = \"width:\" + button_width + \";\";\n\t}\n\tvar btn_style = \"border: 1px black solid; background-color: white; color: black;\" + width_string;\n\tbtn.setAttribute('style', btn_style);\n\n\t//\tevents attributes...\n\tbtn.setAttribute('onMouseOver','_on_over(this,\"'+toggle+'\");');\n\tbtn.setAttribute('onMouseOut','_on_out(this,\"'+toggle+'\");');\n\n\t//\tset button title...\n\tbtn.innerHTML = title;\n\n\t//\tadd to parent...\n parent.appendChild(btn);\n\n}", "title": "" }, { "docid": "456b4eb51bf0355a0c6cca928de4de22", "score": "0.6123656", "text": "function button() {\n var btn = document.createElement('button');\n btn.className = 'mapboxgl-ctrl-icon mapboxgl-ctrl-markers';\n btn.type = 'button';\n btn['aria-label'] = 'Inspect';\n return btn;\n}", "title": "" }, { "docid": "b2b6de24b9de8ac73c43b53f7f9fde6c", "score": "0.6120041", "text": "function init() {\r\n\r\n // Draw bottom border of tv.\r\n graphics.fillStyle = \"gray\";\r\n graphics.fillRect(0, height - height / 10, width, height / 10);\r\n\r\n // Create power button and place at bottom of tv.\r\n let btnY = (height - height / 10) + (height / 20);\r\n let btnX = width / 2;\r\n let btnW = width / 18;\r\n let btnH = height / 10;\r\n let btn = new PowerOn(btnX, btnY, btnW, btnH, \r\n function() { \r\n if (btn.isOff == true) {\r\n startUp();\r\n btn.paint();\r\n btn.isOff = false;\r\n } else {\r\n shutDown();\r\n btn.paint();\r\n btn.isOff = true;\r\n }\r\n });\r\n\r\n // Paint the button.\r\n btn.paint();\r\n}", "title": "" }, { "docid": "19abf5dabdd8c9fe72c5994c797d905c", "score": "0.61186963", "text": "function makeButton(settingsName, onText, offText) {\n let buttonClass = \"option\" + (settings[settingsName] ? \"\" : \" off\");\n let buttonId = 'CYOLbutton' + settingsName;\n let onclick = \"CYOL.UI.toggleSettings('\" + buttonId + \"', '\" +\n settingsName + \"', '\" + onText + \"', '\" + offText + \"');\" +\n 'PlaySound(\\'snd/tick.mp3\\');';\n return '<a class=\"' + buttonClass + '\"' +\n ' id=\"' + buttonId + '\"' +\n ' onclick=\"' + onclick + '\">' +\n (settings[settingsName] ? onText : offText) +\n '</a>';\n }", "title": "" }, { "docid": "6102469887ccd83a29a5c1496e3cc9e8", "score": "0.61163735", "text": "function NewButtonElement(text, dataValue) {\n const btn = document.createElement('button');\n btn.classList.add('button');\n btn.classList.add('center');\n btn.setAttribute('data-button', dataValue);\n btn.innerHTML = text;\n\n return btn;\n}", "title": "" }, { "docid": "7b1d3d1701893bd3cc342a73d3cc3c3e", "score": "0.61132395", "text": "function insertBtnDown() {\n let btn = createBtn();\n insertPropertyInElement({\n element: btn, \n textHTML: 'down &darr;', \n classe: 'mover-baixo', \n identify: 'mover-baixo',\n });\n btn.addEventListener('click', function (event) {\n downTodo(event);\n });\n return btn;\n}", "title": "" }, { "docid": "627e4f6495c2b4f1ca4ab567a8de908d", "score": "0.6105726", "text": "function UiButton({oncontrollerdown, oncontrollerhold, oncontrollerup, color=UI_COLORS.btnColor, text, textcolor=UI_COLORS.btnLabelColor, materials, size=[1,1]}={}) {\n let plane = UiEntity({type:\"a-plane\", color:color, materials:materials}); //TODO I don't know how to deal with the maxSize thing\n let s = [...size];\n plane.getSize = function(maxSize) {\n return s; //TODO\n };\n plane.setAttribute('width', size[0]-0.1);\n plane.setAttribute('height', size[1]-0.1);\n if (text) {\n let label = UiEntity({type: \"a-text\"});\n label.setAttribute(\"value\", text);\n label.setAttribute(\"align\", \"center\");\n label.setAttribute('position', '0 0 0.01');\n label.setAttribute('color', textcolor);\n //TODO Size, color\n plane.appendChild(label);\n }\n //plane.setAttribute('position', '0 0 0');\n plane.oncontrollerdown = oncontrollerdown;\n // Note that oncontrollerhold is NOT called the first time - it's down, THEN hold (many times), THEN up.\n plane.oncontrollerhold = oncontrollerhold;\n plane.oncontrollerup = oncontrollerup;\n //buttons.appendChild(plane);\n //TODO Material?\n return plane;\n }", "title": "" }, { "docid": "58a979da0d20ba1c62ef28595626e055", "score": "0.6079004", "text": "function Button(xL, xR, yT, yB) {\n \n this.xLeft = xL;\n this.xRight = xR;\n this.yTop = yT;\n this.yBottom = yB;\n \n}", "title": "" }, { "docid": "ad6f995e5971c148cfc4f547a0ca35c3", "score": "0.606656", "text": "function createButton(buttonText){\n var b = document.createElement(\"BUTTON\");\n var t = document.createTextNode(buttonText);\n b.appendChild(t);\n document.body.appendChild(b);\n\n return b;\n}", "title": "" }, { "docid": "63bd2cc9fdadc6ffdfc5af402fe5f941", "score": "0.6056795", "text": "function createBtns() {\n let r2Button = document.createElement('button');\n let c3poButton = document.createElement('button');\n r2Button.id = \"droid-3-btn\";\n c3poButton.id = \"droid-2-btn\";\n r2Button.innerText = \"Get R2D2's Home Planet\";\n c3poButton.innerText = \"Get C3PO's Home Planet\";\n c3poInfoArea.appendChild(c3poButton);\n r2d2InfoArea.appendChild(r2Button);\n}", "title": "" }, { "docid": "9a7656c599ed584548aa27fb1afc2089", "score": "0.60511494", "text": "function btnincre() {}", "title": "" }, { "docid": "cb7a6ca023a2080e0183bf5c1623ed57", "score": "0.60442525", "text": "function addButton(){\r\n\tvar btn = document.createElement(\"BUTTON\"); //Creates a button element.\r\n\tvar text = document.createTextNode(\"I JUST GOT ADDED!!\");//Creates a Text Node.\r\n\tbtn.appendChild(text);\r\n\tdocument.body.appendChild(btn);\r\n}", "title": "" }, { "docid": "810185c330e87b130e518b44ff7f16e0", "score": "0.60416627", "text": "function createButton(value) {\n\n var $newButtonDiv = $('<div class=\"col-md-2 spellButtonDivs\">');\n var $newButton = $('<button type=\"button\" class=\"btn btn-warning gifButton\">');\n $newButton.attr('id', value);\n\n $newButton.text(value);\n\n $newButtonDiv.append($newButton);\n $('#preparedSpells').append($newButtonDiv);\n}", "title": "" }, { "docid": "a08d0424d5d01990903f48aa622f042f", "score": "0.6040613", "text": "function createButton(name, clickHandler, id = '', className = '') {\n var button = document.createElement('button');\n button.innerHTML = name;\n button.onclick = clickHandler;\n button.type = \"button\";\n button.id = id;\n button.className = className;\n return button;\n}", "title": "" }, { "docid": "8a1bebae07173b5385671c74ab58bde0", "score": "0.6030732", "text": "function Button(xL, xR, yT, yB){\n\tthis.xLeft = xL;\n\tthis.xRight = xR;\n\tthis.yTop = yT;\n\tthis.yBottom = yB;\n}", "title": "" }, { "docid": "6e931bd956468e382badfb80ba65bfa9", "score": "0.6026933", "text": "function startButton() {\n var start = $('<button class = \"btn btn-default bg-dark text-white text-center\">Click Here to begin</button>').click(function () {\n beginRound();\n // Noise.play();\n });\n $(\"#startButton\").append('<div></div>').attr(\"class\", \"text-center\").append(start);\n\n}", "title": "" }, { "docid": "4f21483d5fd1c3f18590905498384276", "score": "0.6020671", "text": "function Button(parent, topX, topY, text) {\n this.BUTTON_WIDTH = 60;\n this.BUTTON_HEIGHT = 25;\n this.TEXT_OFFSET_X = 30;\n this.TEXT_OFFSET_Y = 17;\n this.topX = topX;\n this.topY = topY;\n this.parent = parent;\n this.text = text;\n this.highLighted = false;\n }", "title": "" }, { "docid": "4b9be9a41a005067a8cf941deae01735", "score": "0.60187924", "text": "function Button() {\r\n var xz = document.createElement(\"button\")\r\n $attr(xz,{tabindex:(\"\"+(++GlobalTabIndex))})\r\n $add(xz,arguments)\r\n xz.setAttribute(\"value\",\"false\")\r\n xz.setAttribute(\"onkeydown\",\"EventKeyDownButton(this,event)\")\r\n xz.setAttribute(\"onkeyup\",\"EventKeyUpButton(this,event)\")\r\n xz.setAttribute(\"onmousedown\",\"EventMouseDownButton(this,event)\")\r\n xz.setAttribute(\"onmouseup\",\"EventMouseUpButton(this,event)\")\r\n xz.setAttribute(\"onclick\",\"EventClickButton(this,event)\")\r\n return xz\r\n}", "title": "" }, { "docid": "f68ed61d3268f3916eac437a7ab66eed", "score": "0.60185724", "text": "function Button() {\r\n this.size = 140;\r\n this.width = this.size;\r\n this.height = this.size;\r\n this.image = images.button;\r\n this.imageActive = images.buttonActive;\r\n }", "title": "" }, { "docid": "b1e2c79d48789d55f9f2c9d23ee188e6", "score": "0.60130894", "text": "function createBtn(value, innerText, id, classes, parent) {\n // Create the DOM element\n let button = document.createElement('button')\n\n // Set the button value if not null\n if (value !== null) button.value = `${value}`\n\n // Set the button text if not null\n if (innerText !== null) button.innerText = `${innerText}`\n\n // Set button id if not null\n if (id !== null) button.setAttribute('id', id)\n\n // Add classes to button if not null\n if (classes !== null) button.setAttribute('class', classes)\n\n // Append the button to a parent DOM element\n parent.appendChild(button)\n }", "title": "" }, { "docid": "c996b5a9546507f4a9f27ea72ea5d01b", "score": "0.6003121", "text": "function createButton(id, label) {\n const button = document.createElement('button');\n button.className = 'btn';\n button.setAttribute('id', id);\n button.textContent = label;\n\n return button;\n}", "title": "" }, { "docid": "ce7022c8df364fd9e9b77089b15500c0", "score": "0.6001497", "text": "function createButton(str) {\n var newButton = $(\"<button>\").attr(\"id\", str.toLowerCase() + \"Button\");\n newButton.text(str);\n newButton.attr(\"class\", \"btn btn-info btn-lg btn-block text-dark shadow font-weight-bold\");\n newButton.css(\"margin-top\", \"30px\");\n console.log(newButton);\n $(\"#questions\").append(newButton);\n }", "title": "" }, { "docid": "77de5448ca942502ec8ba9b9479ca0b3", "score": "0.5998798", "text": "function createTdbutton(id, text, style, functionClick)\r\n{\r\n var td = document.createElement('td');\r\n var btn = document.createElement('button');\r\n btn.classList.add('btn'); \r\n btn.classList.add(style);\r\n \r\n btn.setAttribute('id', id);\r\n var txt = document.createTextNode(text);\r\n btn.appendChild(txt);\r\n \r\n btn.addEventListener(\"click\", functionClick);\r\n td.appendChild(btn);\r\n\r\n return td;\r\n}", "title": "" }, { "docid": "1d034d36a89118e9d0537bbb4689d5bc", "score": "0.59841174", "text": "function mxShapeMockupiOnOffButton(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n}", "title": "" }, { "docid": "155f3641cbcdf2806a37cb720ff80544", "score": "0.5977495", "text": "textButton(name, callback, params) {\n let button = new BABYLON.GUI.Button.CreateImageButton(name.toLowerCase(), name, VRSPACEUI.contentBase+\"/content/icons/play.png\");\n button.widthInPixels = this.heightInPixels/2*name.length+10;\n this.setupButton(button, callback, params);\n return button;\n }", "title": "" }, { "docid": "b04c182a95e610d68de3aab35d489c39", "score": "0.5973607", "text": "function LED(x1,y1) {\n this.x = x1;\n this.y = y1;\n \n this.nodes = [ new InputNode(x1+25, y1+20 ) ] ; \n drawConnectors(this.nodes, \"white\");\n\n // Draw LED\n var c = new fabric.Circle({left: x1+boxWidth-25, top: y1+20, radius: 5, \n fill: 'darkred', selectable: false, evented: false,\n stroke: 'black', strokeWidth: 2 });\n c.setGradient('stroke', gradientButtonDw );\n canvas.add(c);\n c.sendToBack();\n\n drawElementBox(x1,y1,boxWidth,boxHeightSmall,'LED');\n\n var lastResult = 0.0;\n // Control LED behaviour\n this.output = function() {\n var result = this.nodes[0].eval();\n if( isHigh(result) && !isHigh(lastResult) ) {\n c.set({fill : 'red'});\n renderNeeded = true;\n } else if( !isHigh(result) && isHigh(lastResult) ) {\n c.set({fill : 'darkred'}); \n renderNeeded = true;\n }\n lastResult = result;\n return result;\n };\n\n this.remove = function() { };\n}", "title": "" }, { "docid": "4a53cb41d36e491097e93769fe3bdb27", "score": "0.5965378", "text": "fCreateBtn( className, idName, counter, appendedTo, label ) {\n\t\t\tlet divName = document.createElement( \"BUTTON\" );\n\t\t\tdivName.id = idName + \"Id_\" + counter; //set id\n\t\t\tdivName.className = className; //title + \"Class\";\n\t\t\t//divName.href = \"#modalCarousel\";\n\t\t\t//let divNameId = $ (\"#\" + title + \"Id_\" + counter); //get id\n\t\t\t$( divName ).appendTo( appendedTo );\n\t\t\tlet buttonLabel = document.createTextNode( label );\n\t\t\t$( buttonLabel ).appendTo( divName );\n\t\t}", "title": "" }, { "docid": "043a16e142680b654b1f3dd5513e06ee", "score": "0.5962065", "text": "function createButton(text, action) {\n var button = window.document.createElement('button');\n button.innerHTML = text;\n button.onclick = action;\n return button;\n}", "title": "" }, { "docid": "19da91c4fe02b4d5f9910f5dc4dbcb6e", "score": "0.5960259", "text": "function createButton(activeCommand, id, direction) {\n if (activeCommand === direction) {\n id = id + \"-active\";\n return(<button className=\"activeButton\" id={id} onTouchEnd={this.handleRelease.bind(this, direction)} onTouchStart={this.handlePress.bind(this, direction)} onMouseDown={this.handlePress.bind(this, direction)}></button>);\n }\n else {\n return (<button className=\"inactiveButton\" id={id} onTouchEnd={this.handleRelease.bind(this, direction)} onTouchStart={this.handlePress.bind(this, direction)} onMouseDown={this.handlePress.bind(this, direction)}></button>);\n }\n}", "title": "" }, { "docid": "11c8a4365e42c011c0eeafe720c14f0a", "score": "0.5952276", "text": "addButton(object) {\n var btn = new Button(object);\n this.append(btn);\n }", "title": "" }, { "docid": "03605bb1301bdb98f79509f3a2eebb33", "score": "0.5948477", "text": "function createButtons(name, id) {\n var button1 = document.createElement(\"BUTTON\");\n button1.textContent = name;\n button1.id = id;\n return button1;\n\n}", "title": "" }, { "docid": "ec528f149d1911f09b4b73b1aa8440d4", "score": "0.5947125", "text": "function drawButton() {\n image(instructionAssets[1], 1680, 981); // button\n}", "title": "" }, { "docid": "719e13eae8f6391654c70a1a72b960b2", "score": "0.594048", "text": "function mxShapeIOS7OnOffButton(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n}", "title": "" }, { "docid": "cdabb6fe758b63636faff676b5e0cd49", "score": "0.5928027", "text": "function makeButton(position) {\n return ui.Button({\n label: position,\n style: {position: position}\n });\n}", "title": "" }, { "docid": "1fdc17375492a4e2b871b207ad1c6801", "score": "0.59271353", "text": "function LightControlBtn (posX : int, posY : int) {\n\tif ( GUI.Button(new Rect(posX, posY, btnSize.x, btnSize.y), \"Light A\") ){\n\t\tlightObj[0].GetComponent.<Light>().enabled = !lightObj[0].GetComponent.<Light>().enabled;\n\t}\n\tif ( GUI.Button(new Rect(posX + 5 + btnSize.x, posY, btnSize.x, btnSize.y), \"Light B\") ){\n\t\tlightObj[1].GetComponent.<Light>().enabled = !lightObj[1].GetComponent.<Light>().enabled;\n\t}\n\tif ( GUI.Button(new Rect((posX + (5 + btnSize.x) * 2), posY, btnSize.x, btnSize.y), \"Back Light\") ){\n\t\tlightObj[2].GetComponent.<Light>().enabled = !lightObj[2].GetComponent.<Light>().enabled;\n\t}\n}", "title": "" }, { "docid": "ba686f68af06568e2eb8be5483606af8", "score": "0.5926742", "text": "function createButton(text,functionName,id)\n{\n const style = createObject([['width', '210px'], ['height', '50px'],['fontSize','23px']]);\n return createObject([['tag', 'button'], ['id',id] ,['innerHTML', text], ['style', style], ['onclick', functionName]]);\n}", "title": "" }, { "docid": "64b3fe819482cfd1f033e64854498e1d", "score": "0.5923917", "text": "function mxShapeMockupOnOffButton(bounds, fill, stroke, strokewidth)\n{\n\tmxShape.call(this);\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n}", "title": "" }, { "docid": "e7953ab6ed5c18b27a22d999064cb197", "score": "0.5921829", "text": "function createButton(ButtonText, className){\r\n\r\n //creating button element\r\n var element = document.createElement(\"button\");\r\n //creating text for button\r\n var text = document.createTextNode(ButtonText);\r\n //assigning class to element button\r\n if (typeof className != undefined){\r\n element.classList.add(className);\r\n }\r\n //appending element to body\r\n document.body.appendChild(element);\r\n //appending text to button\r\n element.appendChild(text);\r\n return element;\r\n}", "title": "" }, { "docid": "95e66cfe110a72ed89a91a696fd6fae5", "score": "0.5919022", "text": "function Darleclick(){\n var salida = document.getElementById(\"salida1\");\n\n //document.createelement se utiliza para crear una etiqueta desde javascript\n var button = document.createElement(\"button\");\n\n //La instruccion set attribute llamamos a la clase para darle forma al boton\n button.setAttribute(\"class\",\"btn btn-primary btn-lg btn-block mt-2\"); // = class=\"btn btn-primary btn-lg btn-block\"\n button.setAttribute(\"id\", \"boton\"); // = id=\"boton\"\n button.setAttribute(\"type\", \"button\"); // = type = \"button\"\n button.setAttribute(\"onclick\", \"click2()\"); // = onclick=(\"click2()\")\n\n //Se utiliza para imprimir informacion en la etiqueta(boton);\n button.innerText = \"Boton Impreso\"; \n\n //Se utiliza para imprimir el boton creado \n salida.appendChild(button);\n}", "title": "" }, { "docid": "01ceda734d2fdf19df8630bdbca73e85", "score": "0.591648", "text": "function Button(element,type,value)\r\n{\r\n\tthis.element = element;\r\n\tthis.element.control = this;\r\n\tthis.type=type;\r\n\tthis.value = value;\r\n\t\r\n}", "title": "" }, { "docid": "ac1cf3ef8bd12598836f066842c0c7a3", "score": "0.5911397", "text": "function addBBOalertButton() {\n\tif (document.getElementById('myButton') != null) return;\n\tvar b = document.createElement(\"button\");\n\tb.style.width = '100%';\n\tb.style.height = '100%';\n\tb.style.backgroundColor = 'blue';\n\tb.textContent = 'Ale\\nrt';\n\tb.style.color = 'white';\n\tb.style.display = 'block';\n\tb.id = 'myButton';\n\tb.style.zIndex = \"1\";\n\tb.onclick = toggleOptions;\n\tvar cc = document.querySelector('.connectionClass');\n\tfor (var i = 0; i < cc.children.length; i++) cc.children[i].style.display = 'none';\n\tcc.appendChild(b);\n}", "title": "" }, { "docid": "b0413d0a448bca59d98d3124d21073bd", "score": "0.59062135", "text": "function Button ()\r\n{\r\n this.name = \"\"; // The name of the button.\r\n this.x = 0; // The x position (of course).\r\n this.y = 0; // The y position (of course).\r\n this.width = 0; // The width of the button image.\r\n this.height = 0; // The height of the button image.\r\n this.staticImage = null; // The default image of the button.\r\n this.hoverImage = null; // The hover image of the button.\r\n this.hoverStatus = false; // True when the position of the mouse collides.\r\n this.funct = null; // The default function used by the button click.\r\n this.functToggle = null; // The optional function for the button click.\r\n this.enabled = true; // Unless user specified assume our button is good to go.\r\n}", "title": "" }, { "docid": "ba825896f9efcd72dbed838e901361dc", "score": "0.59001875", "text": "function init_toggleButton(id, ontext, offtext, isOn) {\n var toggleButton = document.getElementById(id);\n toggleButton.innerHTML = \"\";\n if (isOn) {\n toggleButton.appendChild(document.createTextNode(ontext));\n toggleButton.classList.add(\"active\");\n } else {\n toggleButton.appendChild(document.createTextNode(offtext));\n toggleButton.classList.remove(\"active\");\n }\n $(toggleButton).state({\n text: {\n inactive: offtext,\n active : ontext\n }\n });\n}", "title": "" }, { "docid": "af94fd002c947ba8c8b195cd3a614553", "score": "0.58990246", "text": "function Button(options){\n\tcolor: options.color || \"native\";\n\tsize: options.size || \"medium\";\n}", "title": "" }, { "docid": "287a81fbe78b151213c4f6fe66b0bec2", "score": "0.58907145", "text": "function btnMaker(txt, myFunction) {\n\t\tlet btn = document.createElement(\"button\");\n\t\tbtn.setAttribute(\"type\", \"button\");\n\t\tbtn.style.width = \"23%\";\n\t\tbtn.style.lineHeight = \"50px\";\n\t\tbtn.style.margin = \"1%\";\n\t\tbtn.style.fontSize = \"2em\";\n\t\tbtn.style.borderRadius = \"4px\";\n\t\tbtn.style.backgroundColor = \"#dcdcdc\";\n\t\tbtn.val = txt;\n\t\tbtn.textContent = txt;\n\t\tif ( btn.textContent.includes(\"*\") || btn.textContent.includes(\"/\") || btn.textContent.includes(\"-\") || btn.textContent.includes(\"+\") ) {\n\t\t\tbtn.style.backgroundColor = \"#808080\";\n\t\t\tbtn.style.color = \"#fff\";\n\t\t}\n\t\t/* ...their events... */\n\t\tbtn.addEventListener(\"click\", myFunction);\n\t\t/* ...and their place in the project: */\n\t\tmain.appendChild(btn);\n\t}", "title": "" }, { "docid": "87f7d8f4e2ada95e1ca38e254e85801c", "score": "0.5890487", "text": "function CreateYUIButton(ele_type, ele_label, ele_id, ele_value)\n{\t\n\tvar obutton = 'button_'+ ele_id;\n\t\n\tvar obutton = new YAHOO.widget.Button({ type:ele_type, label: ele_label, id: ele_id, name: ele_id, value: ele_value, container: ele_id });\n\t\n\treturn obutton;\n}", "title": "" }, { "docid": "409d9f9c81afe546b0e63303ca118386", "score": "0.5886479", "text": "function create_button() {\n const button = document.createElement('button');\n button.onclick = execute;\n button.innerHTML = 'Rename All Pages';\n button.classList.add('btn');\n button.classList.add('rename_all_pages_btn');\n button.setAttribute('type', 'button');\n button.setAttribute('tabIndex', '0');\n button.style.marginRight = '0.25em';\n button.style.marginLeft = '0.25em';\n\n return button;\n}", "title": "" }, { "docid": "ecab7ceffc15f567620b89dd797ad08f", "score": "0.5886307", "text": "function myFunction() {\n var btn = document.createElement(\"BUTTON\");\n var t = document.createTextNode(\"CLICK ME\");\n btn.appendChild(t);\n document.body.appendChild(btn);\n}", "title": "" }, { "docid": "225f896c0b920d02166ffb39e3e0d130", "score": "0.58863044", "text": "function addNewBtn (newElement) {\n var newBtn = $(\"<button>\")\n newBtn.addClass(\"btn btn-secondary mr-1 mb-3\").attr(\"value\",newElement);\n newBtn.html(newElement);\n $(\"#displayBtn\").append(newBtn);\n}", "title": "" }, { "docid": "ab3340fe6264705a3b633abb9fd9218b", "score": "0.5886033", "text": "function createNewButton(text) {\n var button = $('<button>');\n button.text(text);\n button.click(fetchGiphs);\n $('#giphButtons').append(button);\n}", "title": "" }, { "docid": "3ca7e851631fa76d2b8c6f6cf1e03e7c", "score": "0.58792406", "text": "function createButton() {\n var listContainer = document.getElementById(\"list-item\");\n listContainer.insertAdjacentHTML('afterbegin', '<ch5-button class=\"app-button\" receiveStateShow=\"' + countOffset1() + '\" receivestatelabel=\"' + countOffset2() + '\" sendeventonclick=\"' + countOffset3() + '\" receivestateiconclass=\"WatchSource.Sources[4].IconClassOfSource\" ></ch5-button>');\n }", "title": "" }, { "docid": "9a34db4b6dc874c8ba17a706a2a29a50", "score": "0.5866695", "text": "function createControlBtns(pin)\n{\n var obj = createObject([['tag', 'div'], ['innerTags', [\n createObject([['tag', 'tr'], ['innerTags', [\n createButton('UP','spectatorMove','38')\n ]]]),\n createObject([['tag', 'tr'], ['innerTags', [\n createButton('LEFT','spectatorMove','37'),\n createButton('RIGHT','spectatorMove','39')\n ]]]),\n createObject([['tag', 'tr'], ['innerTags', [\n createButton('DOWN','spectatorMove','40')\n ]]]),\n createObject([['tag', 'br']]),\n createDisconnect(pin)\n ]]])\n\n return obj;\n}", "title": "" }, { "docid": "0b3ccfb0ac82b95740cd10a288b87931", "score": "0.5863586", "text": "function createAndAttachButton(metadata) {\n const button = document.createElement(\"BUTTON\");\n button.classList.add(\"circular-button\");\n button.onclick = () => {\n removeOldColorClasses();\n loadingIcon.style.filter = metadata.filter;\n changeTheme(\n metadata.umbrellaAssetLocation,\n metadata.lightColor,\n metadata.darkColor\n );\n };\n button.style.backgroundColor = metadata.darkColor;\n circularButtonDiv.appendChild(button);\n }", "title": "" }, { "docid": "061a12e7c8619d8b19cbc91bd08223d8", "score": "0.585658", "text": "function createButton(x, y) {\r\n let b = document.createElement('button')\r\n b.id = id;\r\n b.style.left = 60 * y + 'px'\r\n b.style.top = 60 * x + 'px'\r\n b.classList.add('but', 'cell');\r\n b.onclick = () => checkIfBomb(b.id);\r\n b.oncontextmenu = (e) => setFlag(e, b.id);\r\n field.appendChild(b)\r\n id++;\r\n}", "title": "" }, { "docid": "ea16452c971ef77cc73716d5f5725a08", "score": "0.58514225", "text": "function Button(_ref) {\n\tvar color = _ref.color,\n\t size = _ref.size,\n\t onClick = _ref.onClick,\n\t disabled = _ref.disabled,\n\t children = _ref.children;\n\n\tvar styles = {\n\t\tcolor: color,\n\t\tfontSize: Button.sizes[size]\n\t};\n\n\treturn _react2.default.createElement(\n\t\t'button',\n\t\t{ className: 'button', style: styles, onClick: onClick, disabled: disabled },\n\t\tchildren\n\t);\n}", "title": "" }, { "docid": "e93366657e4dc403cb93058506a76f15", "score": "0.5842656", "text": "function add(button_text, button_value) {\n //Create an input type dynamically. \n var element = document.createElement(\"button\");\n var br = document.createElement(\"br\");\n \n //Assign different attributes to the element.\n element.type = \"button\";\n element.value = button_value;\n element.innerHTML = button_text;\n // element.name = index;\n element.class = \"terms\"\n element.style.borderRadius = \"10px\";\n element.style.height = \"30px\";\n element.style.width = \"300px\";\n element.style.border= \"0.5px solid #ff1a1a\";\n \n element.addEventListener(\"click\", button_click); // this is where you JUMPPPPP\n \n document.body.appendChild(element);\n document.body.appendChild(br);\n}", "title": "" }, { "docid": "38bdf657a54e344948c6e0a6a37b21b7", "score": "0.5840983", "text": "function createButton(name, title, func) {\n // button will not lose caret selection\n var button = document.createElement('button');\n button.className = 'ed-button ed-icon-' + name + ' ed-button-' + name;\n if (title) {\n button.title = title;\n }\n button.name = name;\n\n events.bind(button, 'click', function(e) {\n e.preventDefault();\n if (func) {\n func(e);\n } else {\n format(name);\n }\n });\n\n toolbar.appendChild(button);\n return button;\n }", "title": "" }, { "docid": "b71bb75cb61509f4acecf848ac9c781a", "score": "0.5831621", "text": "function makeButton(idName, classNames, text, parentNode) {\n var newButton = document.createElement(\"button\");\n newButton.id = idName;\n newButton.className = classNames;\n newButton.textContent = text;\n parentNode.appendChild(newButton);\n //var breakLine = document.createElement(\"br\");\n //parentNode.appendChild(breakLine);\n}", "title": "" }, { "docid": "7e54f79db5617f9c66613c7c608480b5", "score": "0.581127", "text": "function createButton(toons){\n //make a button\n var theTopic = toons;\n var newButton = $(\"<button>\");\n //say what it is\n newButton.html(theTopic);\n newButton.attr(\"class\", \"topics btn btn-primary\");\n //assign data\n newButton.attr(\"data-topic\", theTopic);\n //put it in there\n $(\"#topics\").append(newButton);\n}", "title": "" }, { "docid": "a79e183667a9f22cd3740d76b636032b", "score": "0.5810855", "text": "function bt_OnConnect( ok )\n{\n if( ok ) bt.Write( \"digitalWrite(LED1,1);\\n\" );\n else app.ShowPopup( \"Failed to connect!\" );\n}", "title": "" }, { "docid": "9b7a209cdde569b6273eb3375018d159", "score": "0.5809529", "text": "function readButton(error, value) {\n if (error) throw error;\n // print the button value:\n buttonValue = value;\n console.log(value);\n // if the button is pressed:\n if (value === '1') {\n // toggle the ledState:\n if (ledState === 1) {\n ledState = 0;\n } else {\n ledState = 1;\n }\n // set the LED with ledState:\n led.writeSync(ledState);\n }\n}", "title": "" }, { "docid": "1c64006dba3d4eaf3d923e3e02039134", "score": "0.58080506", "text": "function ControlButton() {\n this._init.apply(this, arguments);\n}", "title": "" }, { "docid": "0fd1d330d11520bcfd9a22043fd751f2", "score": "0.5803649", "text": "function createDltBtn (li){\n const remove = document.createElement('button')\n remove.className = 'btn-remove'\n remove.innerHTML = 'X'\n li.prepend(remove)\n}", "title": "" } ]
276bc1de9b756610d24fe367587a0ff0
Maps the player data from the results and returns
[ { "docid": "fd5e3d501786ca33269fbf50e2a7394d", "score": "0.5461073", "text": "function processCityData(data){\n var playerInfo = {};\n\n for(let key in self.mappings.playerDataMap){\n if(key === 'cities'){\n playerInfo[key] = processCitiesArray(data[self.mappings.playerDataMap[key]]);\n } else {\n playerInfo[key] = data[self.mappings.playerDataMap[key]];\n }\n }\n\n return playerInfo;\n }", "title": "" } ]
[ { "docid": "a7f5694231ba045f47d2e491e98cdc1a", "score": "0.67290103", "text": "function assignData(response) {\n let name = response.data.players.map(player => {\n return `${player.player.name.first} ${player.player.name.last}`\n })\n\n let pos = response.data.players.map(player => {\n return player.player.info.position\n })\n\n let team = response.data.players.map(player => {\n return player.player.currentTeam.name\n })\n\n let app = response.data.players.map(player => {\n return player.stats[6].value\n })\n\n let goals = response.data.players.map(player => {\n return player.stats[0].value\n })\n\n let assists = response.data.players.map(player => {\n return player.stats[5].value\n })\n\n let gpm = response.data.players.map(player => {\n return Math.round(((player.stats[0].value) / (player.stats[6].value) + Number.EPSILON) * 100) / 100\n })\n\n let ppm = response.data.players.map(player => {\n return Math.round(((player.stats[4].value + player.stats[8].value) / player.stats[7].value + Number.EPSILON) * 100) / 100\n });\n\n player1 = new Player(name[0], pos[0], team[0], app[0], goals[0], assists[0], gpm[0], ppm[0]);\n player2 = new Player(name[1], pos[1], team[1], app[1], goals[1], assists[1], gpm[1], ppm[1]);\n player3 = new Player(name[2], pos[2], team[2], app[2], goals[2], assists[2], gpm[2], ppm[2]);\n player4 = new Player(name[3], pos[3], team[3], app[3], goals[3], assists[3], gpm[3], ppm[3]);\n player5 = new Player(name[4], pos[4], team[4], app[4], goals[4], assists[4], gpm[4], ppm[4]);\n\n}", "title": "" }, { "docid": "23a5008a80f7d6d32769247c97fad90b", "score": "0.6686898", "text": "function extractFullPlayerData(players_info) {\r\n return players_info.map((player_info) => {\r\n const { fullname, image_path, position_id, common_name, nationality,\r\n birthdate, birthcountry, height, weight, player_id} = player_info;\r\n // Default values \r\n let name = \"No Team\"\r\n let id = 0\r\n let position = \"No Positionn\"\r\n // Replace the defualt values if the values\r\n // Are set in the data. Otherwise keep them \r\n if(player_info.team){\r\n name = player_info.team.data.name;\r\n id = player_info.team.data.id\r\n }\r\n if(player_info.position)\r\n position = player_info.position.data.name\r\n\r\n return {\r\n id: player_id,\r\n team_id: id,\r\n position: position,\r\n position_id: position_id,\r\n fullname: fullname,\r\n common_name: common_name,\r\n nationality: nationality,\r\n birthplace: birthcountry,\r\n birthdate: birthdate,\r\n height: height,\r\n weight: weight,\r\n team: name,\r\n image_path: image_path\r\n };\r\n });\r\n}", "title": "" }, { "docid": "7526b52dd0f516e9839eeb065444b8aa", "score": "0.6623408", "text": "function handleSuccess(res){\n data.players = res.data\n }", "title": "" }, { "docid": "496682b0ed68c5f1934e92d65214a52e", "score": "0.6499864", "text": "function extractRelevantPlayerData(players_info) {\r\n return players_info.map((player_info) => {\r\n const { fullname, image_path, position_id } = player_info.data.data;\r\n const { name } = player_info.data.data.team.data;\r\n return {\r\n name: fullname,\r\n image: image_path,\r\n position: position_id,\r\n team_name: name,\r\n };\r\n });\r\n}", "title": "" }, { "docid": "2900ae7db86b5e6b1c8dfa083db2298e", "score": "0.6377132", "text": "static setMatchesResults() {\r\n const matches = this.session.getMatches()\r\n const results = this.getResultsAsMap()\r\n\r\n for (const match of matches) {\r\n match.timeP1 = results[match.cabeceiro.name][match.peseiro.name]\r\n }\r\n }", "title": "" }, { "docid": "d55ea47c8ba34a4f52ca9d5de66fc718", "score": "0.61448455", "text": "function altered(info, finalResults){\n finalResults = info.map(data => {\n data.image_url = data.image\n data.origin_url = data.origin.url\n data.origin_name = data.origin.name\n data.location_name = data.location.name\n data.location_url = data.location.url\n data.wins = 0\n data.losses = 0\n data.ties = 0\n data.rounds = 0\n\n })\n\n return finalResults\n\n}", "title": "" }, { "docid": "bc8193299c5b1e6a006892a4a92bcbb1", "score": "0.61286855", "text": "aggregateData(value, key, map){\n let player = key; //player name\n //value == allResponse: [], responses: map {prize => {...}}\n let prize = this.totalPrize;\n let prizeResponses = value.responses.get(prize); //prize Responses\n var parsedResponses = []\n if(prizeResponses != null){\n for (let response of prizeResponses){\n parsedResponses.push(JSON.parse(response))\n };\n }\n let pastMoves = this.getMoves(parsedResponses);\n let pastScores = this.getScores(parsedResponses);\n let pastHands = this.getHand(parsedResponses);\n let pastPrizes = this.getPrizes(parsedResponses);\n let pastTotalPrizes = this.getTotalTurnPrize(parsedResponses);\n //let pastPlayers = this.getPlayers(parsedResponses);\n let pastResponses = parsedResponses;\n let oppo = new opponent(player, pastMoves, pastScores, pastHands, pastPrizes, null, pastResponses, pastTotalPrizes);\n this.oppoData.push(oppo);\n //console.log(\"Past Moves: \" + moves + \"\\nPast Scores: \" + scores);\n }", "title": "" }, { "docid": "768464b7127130879e5fce0cadecc137", "score": "0.612316", "text": "function getMatch(match, matchId) { //Games without 10 or 6 players total are not fully supported yet because only 3v3 template and 5v5 template exist. Only supports 3x3 and 5x5\n $.ajax({\n url: '/Server/GetMatch.php',\n type: 'Get',\n data: { leagueData: 'https://na.api.pvp.net/api/lol/' + region + '/v2.2/match/' + matchId + '?' },\n dataType: 'json',\n success: function (resp) {\n var queueType = resp.queueType;\n if (queueType.substring(queueType.length - 3, queueType.length) == \"3x3\") {\n var playerClone = $(\".playerTemplate3x3\").clone().removeClass(\"playerTemplate3x3\");\n playerClone.appendTo(\".playerHolder\" + match).show();\n var pNum = 6;\n }\n else {\n var playerClone = $(\".playerTemplate5x5\").clone().removeClass(\"playerTemplate5x5\");\n playerClone.appendTo(\".playerHolder\" + match).show();\n var pNum = 10;\n }\n if (resp.teams[0].winner) {\n playerClone.find(\".win0\").html(\"<span style='color:#6C0'>Winner</span>\");\n playerClone.find(\".win1\").html(\"<span style='color:#D20'>2nd Place</span>\");\n }\n else {\n playerClone.find(\".win0\").html(\"<span style='color:#D20'>2nd Place</span>\");\n playerClone.find(\".win1\").html(\"<span style='color:#6C0'>Winner</span>\");\n }\n var playerIds = \"\", teamIdSumm;\n if (playerMapName.get(match + \"\" + resp.participants[0].teamId + \"\" + resp.participants[0].championId) != undefined &&\n playerMapName.get(match + \"\" + resp.participants[1].teamId + \"\" + resp.participants[1].championId) != undefined ||\n playerMapName.get(match + \"\" + resp.participants[1].teamId + \"\" + resp.participants[1].championId) != undefined &&\n playerMapName.get(match + \"\" + resp.participants[2].teamId + \"\" + resp.participants[2].championId) != undefined ||\n playerMapName.get(match + \"\" + resp.participants[0].teamId + \"\" + resp.participants[0].championId) != undefined &&\n playerMapName.get(match + \"\" + resp.participants[2].teamId + \"\" + resp.participants[2].championId) != undefined)\n teamIdSumm = resp.participants[0].teamId;\n else\n teamIdSumm = resp.participants[pNum - 1].teamId;\n for (var p = 0; p < pNum; p++) {\n if (queueType.substring(0, 6) == \"RANKED\") {\n playerClone.find(\".playerName\" + p).text(resp.participantIdentities[p].player.summonerName);\n playerIds = playerIds + resp.participantIdentities[p].player.summonerId + \",\";\n }\n else {\n var champIdHolder = resp.participants[p].championId;\n var teamIdHolder = resp.participants[p].teamId;\n if (playerMapName.get(match + \"\" + teamIdHolder + \"\" + champIdHolder) != undefined) {\n playerClone.find(\".playerName\" + p).text(playerMapName.get(match + \"\" + teamIdHolder + \"\" + champIdHolder));\n playerIds = playerIds + playerMap.get(match + \"\" + teamIdHolder + \"\" + champIdHolder) + \",\";\n }\n else if (resp.queueType.substring(0, 3) != \"BOT\") {\n playerClone.find(\".playerName\" + p).text(summonerNameActual);\n playerIds = playerIds + summonerID + \",\";\n }\n else\n if (teamIdHolder == teamIdSumm) {\n playerClone.find(\".playerName\" + p).text(summonerNameActual);\n playerIds = playerIds + summonerID + \",\";\n }\n else\n playerClone.find(\".playerName\" + p).text(ch[champIdHolder] + \" BOT\");\n }\n playerClone.find(\"#champ\" + p + \"ImgMatch\").attr(\"src\", \"http://ddragon.leagueoflegends.com/cdn/\" + version + \"/img/champion/\" + ch[resp.participants[p].championId] + \".png\");\n playerClone.find(\"#\" + p + \"summ1\").attr(\"src\", \"http://ddragon.leagueoflegends.com/cdn/\" + version + \"/img/spell/\" + sp[resp.participants[p].spell1Id] + \".png\");\n playerClone.find(\"#\" + p + \"summ2\").attr(\"src\", \"http://ddragon.leagueoflegends.com/cdn/\" + version + \"/img/spell/\" + sp[resp.participants[p].spell2Id] + \".png\");\n playerClone.find(\".playerLevel\" + p).text(resp.participants[p].stats.champLevel);\n playerClone.find(\".playerKDA\" + p).text(resp.participants[p].stats.kills + \"/\" + resp.participants[p].stats.deaths + \"/\" + resp.participants[p].stats.assists);\n var neutralMinionsKilled = resp.participants[p].stats.neutralMinionsKilled;\n var minionsKilled = resp.participants[p].stats.minionsKilled;\n if (neutralMinionsKilled != null && minionsKilled != null)\n playerClone.find(\".playerTotalMinionsKilled\" + p).text(neutralMinionsKilled + minionsKilled);\n else if (neutralMinionsKilled == null && minionsKilled != null)\n playerClone.find(\".playerTotalMinionsKilled\" + p).text(minionsKilled);\n else if (neutralMinionsKilled != null && minionsKilled == null)\n playerClone.find(\".playerTotalMinionsKilled\" + p).text(neutralMinionsKilled);\n else\n playerClone.find(\".playerTotalMinionsKilled\" + p).text('0');\n var goldEarned = resp.participants[p].stats.goldEarned;\n playerClone.find(\".goldEarned\" + p).text((goldEarned / 1000).toFixed(1) + \"k\");\n playerClone.find(\".playerDamageToChamps\" + p).text((resp.participants[p].stats.totalDamageDealtToChampions / 1000).toFixed(0) + \"k\");\n playerClone.find(\".playerWardsPlaced\" + p).text(resp.participants[p].stats.wardsPlaced);\n playerClone.find(\".playerWardsKilled\" + p).text(resp.participants[p].stats.wardsKilled);\n var items = [\n resp.participants[p].stats.item0, resp.participants[p].stats.item1, resp.participants[p].stats.item2, resp.participants[p].stats.item3,\n resp.participants[p].stats.item4, resp.participants[p].stats.item5, resp.participants[p].stats.item6\n ];\n for (var i = 0; i < 7; i++) {\n document.getElementById(\"player\" + p + \"Item\" + i).id = match + \"player\" + p + \"Item\" + i;\n if (items[i] != 0) {\n $(\"#\" + match + \"player\" + p + \"Item\" + i).attr(\"src\", \"http://ddragon.leagueoflegends.com/cdn/\" + version + \"/img/item/\" + items[i] + \".png\");\n try { new Opentip(document.getElementById(match + \"player\" + p + \"Item\" + i), \"<strong>\" + itemAPI.data[items[i]].name + \"</strong>\" + \"<br /><br />\" + itemAPI.data[items[i]].description); }\n catch (err) { };\n }\n else\n $(\"#\" + match + \"player\" + p + \"Item\" + i).attr(\"src\", \"Images/EmptySlot.gif\");\n }\n }\n getPlayersLeague(playerIds, pNum, playerClone);\n },\n error: function () {\n alert(\"Error getting match data\");\n }\n });\n }", "title": "" }, { "docid": "c6842d1c6edc0d2b52382ef7fad0cd36", "score": "0.6114885", "text": "function getPlayerData(id){\n\t}", "title": "" }, { "docid": "17e6cef0e6b9ed9d2d644a643416e78c", "score": "0.60958093", "text": "getPlayerData() {\n\t \treturn this.playerData;\n\t }", "title": "" }, { "docid": "19bcfef0cdcd0c450611ce3c9203055c", "score": "0.60957795", "text": "function extractRelevantPlayerData_sync(players_info) {\n array=[];\n let team=null;\n for (let value in players_info) {\n const { fullname, image_path, position_id } = players_info[value];\n if( players_info[value].team != null){\n team=players_info[value].team.data.name;\n }\n array.push({\n name: fullname,\n image: image_path,\n position: position_id,\n team_name: team,\n })\n}\nreturn array;\n }", "title": "" }, { "docid": "79ed5a35b5f5f7dd830b4e184ffc8d86", "score": "0.6071904", "text": "function loadPlayerData(data) {\n\t console.log(data);\n if (data.id == \"1\") {\n var playerData = new Player({socketID: data.socketID, ID: 1, name: \"tim\", rank: 1201, coin: 1001});\n } else if (data.id == \"2\") {\n var playerData = new Player({socketID: data.socketID, ID: 2, name: \"john\", rank: 1202, coin: 1002});\n } else if (data.id == \"0\") {\n var playerData = new Player({socketID: \"AA\", ID: 0, name: \"\", rank: 0, coin: 0});\n } else if (data.id == \"3\") {\n var playerData = new Player({socketID: data.socketID, ID: 3, name: \"tim\", rank: 1201, coin: 1001});\n } else {\n var playerData = new Player({socketID: data.socketID, ID: 3, name: \"UNKNOWN\", rank: 1203, coin: 1003});\n }\n //TODO: Fetch player database\n return playerData;\n }", "title": "" }, { "docid": "db76e65395798a49479a2ef87bc599bb", "score": "0.60706395", "text": "function makePlayerMap(players) {\n var playerMap = {};\n players.forEach(function (player) {\n playerMap[player._id] = { shortID: player.shortID, name: player.player_name };\n });\n return playerMap;\n}", "title": "" }, { "docid": "bc5854c3e0e7d888cd8bbf27123cb630", "score": "0.6041694", "text": "function handlePlayerCityData(results, data){\n self.loadedCount ++;\n $('#rankingsLoaded').text(self.loadedCount);\n self.playerInfoData.push(processCityData(JSON.parse(results)));\n console.log(processCityData(JSON.parse(results)));\n\n self.currentIndex++;\n\n window.setTimeout(function(){\n loadIndividualRankings(data);\n }, self.loadDelay);\n }", "title": "" }, { "docid": "aad749528ca03edeb7064a38de6ee818", "score": "0.6021898", "text": "async function getPlayerByName(player_name,pos,teamName){\n const info =\n await axios.get(`${api_domain}/players/search/${player_name}`,{\n params : {\n api_token: process.env.api_token ,\n include:\"team\",\n\n }\n});\n return extractRelevantPlayerData_sync(info.data.data);\n}", "title": "" }, { "docid": "af3a089a2e4a54c5a4467aa38c75bdab", "score": "0.60034806", "text": "async function extractCardPlayerData(player_info) {\n const {fullname, image_path, position_id, common_name, nationality, birthdate ,birthcountry,height,weight} = player_info.data.data;\n const { name } = player_info.data.data.team.data;\n return {\n name: fullname,\n image: image_path,\n position: position_id,\n team_name: name,\n common_name:common_name, \n nationality:nationality,\n birthdate:birthdate,\n birthcountry:birthcountry,\n height:height,\n weight:weight,\n };\n}", "title": "" }, { "docid": "9796a2ae9905029963b8f9a0da4ae155", "score": "0.59602684", "text": "toData() {\n let data = {\n name: this.name,\n currentScore: this.currentScore,\n players: []\n };\n for (let i in this.players) {\n data.players.push(this.players[i].toData());\n }\n return (data);\n }", "title": "" }, { "docid": "99152b636ee7533546b45c47f363920f", "score": "0.595264", "text": "function getPlayerData( gameName, playerIndex ) {\n\n\t// if there's no players send 404 error, client will stop requiring players\n\tif ( playerIndex >= games[ gameName ].players.length )\n\t\treturn \"404:NOT FOUND\"\n\n\tvar name = games[ gameName ].players[ playerIndex ].name\n\tvar team = games[ gameName ].players[ playerIndex ].team\n\tvar x = games[ gameName ].players[ playerIndex ].position.x\n\tvar y = games[ gameName ].players[ playerIndex ].position.y\n\n\treturn \"200:\" + name + \"/\" + team + \"/\" + x + \"/\" + y\n\n}", "title": "" }, { "docid": "8708ab6ba81622367fee57fa30b4164e", "score": "0.5942505", "text": "getAllPlayerData() {\n return this.getQuery('select * from Player');\n }", "title": "" }, { "docid": "b470644207647a64639b0dbe1822d2cf", "score": "0.5942097", "text": "function onResult(data) {\n addPlacesToMap(data.results);\n }", "title": "" }, { "docid": "e72da6e97f3cba00cb65d12e7c468fdc", "score": "0.59210145", "text": "function generateData() {\n var playerData = [];\n\n playersService.getPlayers(function(data) {\n\n data.forEach(function(currentPlayer, index, array) {\n\n var name = currentPlayer.playername;\n var ballCount = 0,\n hitCount = 0,\n inningCount = 0,\n games = 0;\n currentPlayer.gamestats.forEach(function(currentGame, index, array) {\n\n ballCount += currentGame.ballsfaced;\n hitCount += currentGame.hitcount;\n inningCount += currentGame.innings;\n games++;\n });\n\n playerData.push({\n key: name,\n values: [{\n x: (ballCount / games),\n y: (hitCount / games)\n }]\n });\n });\n });\n\n return playerData;\n }", "title": "" }, { "docid": "c13451b1aa1fbca2abf269e5291ce84d", "score": "0.59161276", "text": "function getPlayers(results, container) {\n // if they search again, card is not selected\n if (container === 'card-container-left') {\n leftSelect = false;\n leftPlayer = '';\n }\n if (container === 'card-container-right') {\n rightSelect = false;\n rightSelect = '';\n }\n checkButton();\n return results.map(function (player) {\n const cardContainer = document.getElementById(container);\n cardContainer.innerHTML += playerCard;\n let id = `${player.id}`,\n card = document.getElementById('card'),\n teamName = document.getElementById('team-name'),\n playerName = document.getElementById('player-name'),\n playerStats = document.getElementById('player-stats'),\n teamLogo = document.getElementById('team-logo'),\n h2 = createElement('h2'),\n team = `${player.team.full_name}`,\n logoDir = './static/images/logos/',\n p = createElement('p');\n // create unique IDs for the player card\n changeId(card, 'card' + id);\n changeId(playerName, 'player-name-' + id);\n changeId(playerStats, 'player-stats-' + id);\n changeId(teamName, 'team-name-' + id);\n changeId(teamLogo, 'team-logo-' + team);\n teamLogo.src = logoDir + team + '.png'\n // Add team name\n appendElement(teamName, h2);\n h2.innerHTML = team;\n\n // Add player name\n appendElement(playerName, p);\n p.innerHTML = `${player.first_name}` + ' ' + `${player.last_name}`;\n p.id = 'full-name';\n\n // Add player height\n p = createElement('p');\n appendElement(playerStats, p);\n if (`${player.height_feet}` === \"null\") {\n p.innerHTML = 'Height is not available'\n } else {\n p.innerHTML = 'Height: ' + `${player.height_feet}` + '\\'' + `${player.height_inches}` + '\"';\n }\n // Add player position\n p = createElement('p');\n appendElement(playerStats, p);\n p.innerHTML = 'Position: ' + `${player.position}`;\n });\n}", "title": "" }, { "docid": "d22b6c4c261533f248a3781a8e61fd5c", "score": "0.5894734", "text": "async function getplayersByName(name) {\r\n let players_list = [];\r\n // get all the players that have the search name\r\n const players = await axios.get(`${api_domain}/players/search/${name}`, {\r\n params: {\r\n api_token: process.env.api_token,\r\n include: \"team,position\",\r\n },\r\n });\r\n // loop on every player\r\n for(const player of players.data.data){\r\n let team_id;\r\n let team_name;\r\n let position_id;\r\n let position_name;\r\n // if dont have a team\r\n if(player.team == undefined){\r\n team_name = null;\r\n team_id = null;\r\n }\r\n else{\r\n team_name = player.team.data.name;\r\n team_id = player.team.data.id;\r\n }\r\n // if dont have position\r\n if(player.position == undefined){\r\n position_id = null;\r\n position_name = null;\r\n }\r\n else{\r\n position_id = player.position.data.id;\r\n position_name = player.position.data.name;\r\n }\r\n // make the json\r\n players_list.push({\"name\": player.firstname +\" \"+player.lastname ,\"image_url\": player.image_path ,\r\n \"team_name\": team_name, \"PositionNumber\": position_id,\"PositionName\": position_name}) \r\n }\r\n return players_list;\r\n}", "title": "" }, { "docid": "a0369fd543de5c17e322cba3c32c889f", "score": "0.5884335", "text": "function getPlayers() {\n return players;\n}", "title": "" }, { "docid": "a2cc25e769d08bab7b225bc7d404048e", "score": "0.58800244", "text": "function fetchAllPlayerNamesAndAvatars() {\n function makeSteamIdsString() {\n var steamids = '';\n for (var i = 0; i < accountsToLookUp.length; i++) {\n steamids += accountsToLookUp[i].steamid;\n\n if (accountsToLookUp[i + 1] != undefined)\n steamids += ',';\n }\n return steamids;\n }\n\n request.get({\n url: 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='+ config.STEAM_API_KEY + '&steamids=' + makeSteamIdsString(),\n json: true\n }, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n for(var i = 0; i < body.response.players.length; i++) {\n for(var i2 = 0; i2 < accountsToLookUp.length; i2++) {\n if(accountsToLookUp[i2].steamid == body.response.players[i].steamid) {\n accountsToLookUp[i2].avatar = body.response.players[i].avatarfull;\n accountsToLookUp[i2].name = body.response.players[i].personaname;\n }\n }\n }\n }\n });\n}", "title": "" }, { "docid": "409770622556436d68db1be6c719662e", "score": "0.58785003", "text": "function success(position){\n playerTimes(position.coords.latitude, position.coords.longitude);\n }", "title": "" }, { "docid": "167d604f494e148e2eb147cdd81626e0", "score": "0.5857818", "text": "function getPlayerValues()\n{\n for (var i = 0; i < players.length; i++) \n {\n\t if (players[i].name === yourName) \n {\n yourHealthPoints=players[i].healthPoints;\n yourAttackPower=players[i].attackPower;\n }\n\t}\n}", "title": "" }, { "docid": "711fe511e3ee50d36ec9e91f4489c6e1", "score": "0.5850124", "text": "async function getPlayers() {\n let users = {};\n\n if ( HasESX() ) {\n let usersTable = await executeQuery( config['fetchNames'].sql, config['fetchNames'].query, {} );\n\n Object.keys(usersTable).forEach(( k ) => {\n users[usersTable[k].identifier] = `${usersTable[k].firstname} ${usersTable[k].lastname}`;\n });\n\n let players = GetNumPlayerIndices();\n result = {};\n\n for (let i = 0; i < players; i++) {\n result[GetPlayerFromIndex(i)] = users[GetPlayerIdentifier(GetPlayerFromIndex(i))];\n }\n } else {\n let players = GetNumPlayerIndices();\n result = {};\n\n for (let i = 0; i < players; i++) {\n result[GetPlayerFromIndex(i)] = GetPlayerName(GetPlayerFromIndex(i));\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "9c1151738cc943217ff79430b72fa34c", "score": "0.5844843", "text": "function playbackRound(data) {\n var currentTurn = 0;\n playbackTurn(currentTurn, data);\n//renderMap(data.body.maps[0]);\n}", "title": "" }, { "docid": "af1bb2b0f7ccbe05572bd16de18f8d89", "score": "0.58309156", "text": "function showPlayerResults(data) {\n console.log(data);\n\n // Place a marker to identify user answer\n var userMarker = createMarker(data.lat, data.lng, 'blue');\n\n // Show user score, ranking and distance\n var resultsText = '<div class=\"results\"><b>' + round(data.distance) + ' km</b> away: ';\n\n // Show user score\n if (data.score == 0) {\n resultsText += '<span class=\"score\">Too far away!</span>';\n } else {\n resultsText += '<span class=\"score\">+<span id=\"score_value\">0</span> points</span>';\n }\n\n resultsText += '<br/>You are <b>#' + data.rank + '</b> out of <b>' + data.total + '</b> player(s) for this turn</div>';\n\n userMarker.bindPopup(resultsText).openPopup();\n\n if (data.score != 0) {\n // Animate player score\n animateValue('score_value', data.score);\n }\n\n}", "title": "" }, { "docid": "55214f839cfd8185e472de8b6d6e7406", "score": "0.5815381", "text": "function toMap(playersList: ApiPlayer[]): PlayersType {\n return playersList.reduce((map: PlayersType, player: ApiPlayer) => {\n map.set(player.id, toPlayer(player));\n return map;\n }, new Map());\n}", "title": "" }, { "docid": "f2b8938d2149533580ad25aeffabf332", "score": "0.5790194", "text": "function getPlayers() {\n\t$.ajax({\n\t\ttype: \"POST\",\n\t\tdataType: \"json\",\n\t\turl: \"../rest/game_events/get_players\",\n\t\tsuccess: function(data) {\n\t\t\tplayers = data[\"players\"];\n\t\t\t// remove all markers on the map\n\t\t\t$.each(playerMarkersArray, function(key, theMarker) {\n\t\t\t\tif (theMarker != undefined && data[\"players\"][key] == undefined) {\n\t\t\t\t\tplayerMarkersArray[key].setMap(null);\n\t\t\t\t\tradiusCirclesArray[key].setMap(null);\n\t\t\t\t}\n\t\t\t});\n\t\t\t// draw new markers\n\t\t\tif (players != undefined) {\n\t\t\t\t$.each(players, function(key, value) {\n\t\t\t\t\tdrawPlayerMarkerAtLatitudeLongitude(key, parseFloat(value[\"latitude\"]), parseFloat(value[\"longitude\"]), value[\"name\"], parseInt(value[\"range\"]));\n\t\t\t\t});\n\t\t\t}\n\t\t} \n\t})\n}", "title": "" }, { "docid": "09b76f3b39f712fb0d5425d642a0f5bf", "score": "0.578655", "text": "function processResults(weightMap) {\n let personalizedGames = [];\n let personalizedGame;\n var options = function(pageNumber) {\n return {\n method: 'GET',\n url: `https://rawg-video-games-database.p.rapidapi.com/games?ordering=-metacritic&page_size=6000&page=${pageNumber}`,\n headers: {\n 'x-rapidapi-key': '388c8cb1b0mshf709e0bbd1b0095p15acf2jsnf1bd7be0e38f',\n 'x-rapidapi-host': 'rawg-video-games-database.p.rapidapi.com'\n }\n }\n }\n async function fetchMetaData() {\n let allData = [];\n let morePagesAvailable = true;\n let total_pages = 20;\n let currentPage = 0;\n\n while (morePagesAvailable) {\n currentPage++;\n const response = await request(options(currentPage))\n //console.log(\"currentPage: \" + currentPage);\n if (response instanceof Error) {\n console.log(\"end\");\n return allData;\n }\n let data = await response.data.results;\n if (!data) {\n break;\n } else {\n data.forEach(function(e) {\n personalizedGame = {\n name: e.name,\n id: e.id,\n weight: calculateGameWeight(weightMap, e)\n }\n //console.log(e.name);\n //console.log(personalizedGame);\n allData.unshift(personalizedGame);\n });\n }\n morePagesAvailable = currentPage < total_pages;\n }\n\n return allData;\n }\n return fetchMetaData();\n}", "title": "" }, { "docid": "bde524dd898ac08007ee04152ec00f0c", "score": "0.5773832", "text": "async function searchPlayerByName(player_name){\r\n let player_data = await axios.get(`${api_domain}/players/search/${player_name}`, {\r\n params: {\r\n include: \"position, team\",\r\n api_token: process.env.api_token,\r\n },\r\n })\r\n if (player_data.data.data.length == 0)\r\n return [];\r\n return extractFullPlayerData(player_data.data.data);\r\n}", "title": "" }, { "docid": "360803846a128b6921b3ffacb33bfda0", "score": "0.5757253", "text": "function createAuxData(nextGamestate) {\r\n var dataAux = {};\r\n\r\n getAllPlayers(nextGamestate).forEach(function(player) {\r\n var marker = playerList[player.username];\r\n\r\n dataAux[player.username] = {\r\n start: {\r\n lat: marker.getPosition().lat(),\r\n lng: marker.getPosition().lng()\r\n },\r\n end: {\r\n lat: parseFloat(player.lat),\r\n lng: parseFloat(player.lng)\r\n }\r\n };\r\n });\r\n\r\n return dataAux;\r\n}", "title": "" }, { "docid": "7feb41c8596df2f413fe05e99f089a02", "score": "0.57547605", "text": "function handlePlayerCityData(results, data){\n self.citiesData.push(processCityData(results.data));\n self.currentIndex++;\n\n window.setTimeout(function(){\n loadCityDataPerPlayer(data);\n }, self.loadDelay);\n }", "title": "" }, { "docid": "e89128c468d2d11c25870960ba094f22", "score": "0.5715994", "text": "function getPlayerInfo(team, req, res, next) {\n\t// Get Client\n\tconst client = new Client({\n\t\tconnectionString: process.env.DATABASE_URL,\n\t\tssl: {\n\t\t\trejectUnauthorized: false\n\t\t},\n\t});\n\n\t// Connect\n\tclient.connect();\n\n\t// Get Staff Data\n\tclient.query(`SELECT * FROM PLAYERS WHERE team=($1) and id=($2);`, [team, req.params.player_id], (err, resp) => {\n\t\t// Handle error\n\t\tif (err || !resp) {\n\t\t\treq.loadedData = false;\n\t\t\tres.status(400);\n\t\t\treturn next();\n\t\t}\n\n\t\t// Get player data\n\t\tlet player = JSON.parse(JSON.stringify(resp.rows));\n\t\tplayer = player[0];\n\n\t\t// Store player data\n\t\tif(player != null) {\n\t\t\t// Process and store available player data\n\t\t\tprocessPlayerInfo(player);\n\n\t\t\t// Store each position's proficiency level\n\t\t\tconst naturalPositions = player.naturalpositions != null ? JSON.parse(player.naturalpositions) : [];\n\t\t\tconst competentPositions = player.competentpositions != null ? JSON.parse(player.competentpositions) : [];\n\n\t\t\tplayer.positions = {\n\t\t\t\tgk: getPositionKnowledge(POSITIONS.GOALKEEPER, player.position, naturalPositions, competentPositions),\n\t\t\t\tcb: getPositionKnowledge(POSITIONS.CENTER_BACK, player.position, naturalPositions, competentPositions),\n\t\t\t\trb: getPositionKnowledge(POSITIONS.RIGHT_BACK, player.position, naturalPositions, competentPositions),\n\t\t\t\tlb: getPositionKnowledge(POSITIONS.LEFT_BACK, player.position, naturalPositions, competentPositions),\n\t\t\t\tdm: getPositionKnowledge(POSITIONS.DEFENSIVE_MID, player.position, naturalPositions, competentPositions),\n\t\t\t\tcm: getPositionKnowledge(POSITIONS.CENTER_MID, player.position, naturalPositions, competentPositions),\n\t\t\t\tam: getPositionKnowledge(POSITIONS.ATTACKING_MID, player.position, naturalPositions, competentPositions),\n\t\t\t\trw: getPositionKnowledge(POSITIONS.RIGHT_WINGER, player.position, naturalPositions, competentPositions),\n\t\t\t\tlw: getPositionKnowledge(POSITIONS.LEFT_WINGER, player.position, naturalPositions, competentPositions),\n\t\t\t\tst: getPositionKnowledge(POSITIONS.STRIKER, player.position, naturalPositions, competentPositions)\n\t\t\t};\n\t\t}\n\n\t\t// Save player\n\t\treq.player = player;\n\n\t\t// End connection\n\t\tclient.end();\n\n\t\t// Continue\n\t\treturn next();\n\t});\n}", "title": "" }, { "docid": "5d28ba58859d783efc1c93f8ef4ac205", "score": "0.5713302", "text": "getTotalResults () {\n const playerList = [\n this.rankedState.playerProps[this.rankedState.playerOneId],\n this.rankedState.playerProps[this.rankedState.playerTwoId]\n ]\n\n // We send playerList and get back the results\n const returnData = calculateResults(playerList)\n\n return returnData\n }", "title": "" }, { "docid": "bd9588b1eeb28c25da5cf53ba3cc06e2", "score": "0.56932086", "text": "function dataMappings(){\n let self = this;\n\n self.playerDataMap = {\n 'alliance': 'a',\n 'score': 'b',\n 'name': 'player',\n 'cities': 'h'\n };\n\n self.cityDataMap = {\n 'score': 'a',\n 'xCoord': 'b',\n 'yCoord': 'c',\n 'continent': 'd',\n 'isCastle':'e',\n 'isWater': 'f',\n 'isTemple': 'g',\n 'name': 'h',\n 'id': 'i'\n };\n\n self.cityDetailsMap = {\n 'player': 'a',\n 'alliance': 'b',\n 'cityName': 'c',\n 'score': 'd',\n 'coords': 'e',\n 'continent': 'f',\n 'reportTable': 'j'\n };\n\n self.reportMap = {\n 'buildings': 'bd'\n }\n\n self.buildingIDs = {\n 445: 'Barracks',\n 446: 'Cabin',\n 447: 'Farm Estate',\n 448: 'Foresters Hut',\n 449: 'Forum',\n 455: 'Basilica',\n 460: 'Sawmill',\n 461: 'Stone Mine',\n 462: 'Masons Hut',\n 463: 'Grain Mill',\n 464: 'Storehouse',\n 465: 'Iron Mine',\n 466: 'Stables',\n 467: 'Castle',\n 477: 'Smelter',\n 479: 'Hideaway',\n 481: 'Villa',\n 482: 'Academy',\n 483: 'Training Arena',\n 488: 'Port',\n 489: 'Port',\n 490: 'Port',\n 498: 'Shipyard',\n 500: 'Sorcerers Tower',\n 502: 'Blacksmith',\n 504: 'Guard House',\n 539: 'Triari Post',\n 543: 'Ranger Post',\n 547: 'Sentinel Post',\n 551: 'Priest Post',\n 555: 'Balista Post',\n 559: 'Equine Barricade',\n 563: 'Rune Barricade',\n 567: 'Snag Barricade',\n 571: 'Vieled Barricade',\n 809: 'Wall',\n 890: 'Temple'\n };\n}", "title": "" }, { "docid": "107f93709291723e5f56e10f3e97ff1b", "score": "0.5673013", "text": "function getMidFielders() {\n //Getting Players Data Object Array\n let data = cleanData(); \n let midsArr = [];\n data.forEach(element => {\n if (\n element[\"Position\"] == \"RCM\" ||\n element[\"Position\"] == \"LCM\" ||\n element[\"Position\"] == \"LDM\" ||\n element[\"Position\"] == \"CAM\" ||\n element[\"Position\"] == \"CDM\" ||\n element[\"Position\"] == \"RM\" ||\n element[\"Position\"] == \"LAM\" ||\n element[\"Position\"] == \"LM\" ||\n element[\"Position\"] == \"RDM\" ||\n element[\"Position\"] == \"CM\" ||\n element[\"Position\"] == \"RAM\"\n ) {\n let forwardOb = {\n name: element[\"Name\"],\n club: element[\"Club\"],\n nationality: element[\"Nationality\"],\n rating: element[\"Overall\"],\n wage: element[\"Wage\"],\n position: element[\"Position\"]\n };\n midsArr.push(forwardOb);\n }\n });\n return midsArr;\n }", "title": "" }, { "docid": "00370e213dda06b1a234b4fe9e4417fb", "score": "0.56706977", "text": "function createPlayerResp(data) {\n game.id = data.game_id;\n game.is_public = data.game_public;\n\n player.id = data.player_id;\n player.name = data.player_name;\n player.symbol = data.symbol;\n player.is_my_turn = data.is_my_turn;\n player.opponent_name = data.opponents[0] ? data.opponents[0] : 'opponent';\n\n waitingForOpponentAlert();\n}", "title": "" }, { "docid": "2567eefca7922771a39c5fc3df9a7d76", "score": "0.5663257", "text": "async function getPlayersInfo(players_ids_list) {\r\n let promises = [];\r\n players_ids_list.map((id) =>\r\n promises.push(\r\n axios.get(`${api_domain}/players/${id}`, {\r\n params: {\r\n api_token: process.env.api_token,\r\n include: \"team, position\",\r\n },\r\n })\r\n )\r\n );\r\n let players_info = await Promise.all(promises);\r\n players_info = players_info.map(player => player.data.data)\r\n return extractFullPlayerData(players_info);\r\n}", "title": "" }, { "docid": "ca28c269ae39a8a63da72f531405b137", "score": "0.56547296", "text": "async function getServerData(address) {\n const req = new Request(`https://api.mcsrvstat.us/2/${address}`);\n const res = await req.loadJSON();\n\n // Number of players allowed in the player preview area\n const PLAYER_LIMIT = 8;\n const playerList = res.online && res.players.uuid ? Object.keys(res.players.uuid).map(e => { return { username: e, uuid: res.players.uuid[e] }}) : [];\n\n // get player images\n for(let player of playerList) {\n player.head = `https://crafatar.com/avatars/${player.uuid}`;\n }\n\n return {\n version: res.version || '',\n motd: res.motd || '',\n online: res.online,\n hostname: res.hostname || '',\n icon: res.icon || '',\n playersOnline: res.online ? res.players.online : 0,\n playersMax: res.online ? res.players.max : '???',\n playerList: playerList.slice(0, PLAYER_LIMIT),\n software: res.software ? res.software : 'Vanilla',\n };\n}", "title": "" }, { "docid": "ecf72a2eda31578217e2ead6aae4208e", "score": "0.5638123", "text": "function get_game_info(){\n\t//player object\n\tfor (let player of game.getPlayers()) {\n\t\tif(player.name === player_name.value){\n\t\t\tmyCards = player.getHand();\n\t\t\tmy_point = player.getPoints();\n\t\t}\n\t}\n\tprevCards = game.getPreviousCards(); \n\tcurrPlayer = game.getCurrentPlayer().getName();\n\tlet nextIndex = game.getPlayers().indexOf(game.getCurrentPlayer()) + 1;\n\tif(nextIndex >= game.getPlayers().length){\n\t\tnextIndex = 0;\n\t}\n\tnextPlayer = game.getPlayers()[nextIndex].getName();\n\n\tvar dict = {\n\t\tmyCards: myCards,\n\t\tprevCards: prevCards,\n\t\tcurrPlayer: currPlayer,\n\t\tnextPlayer: nextPlayer,\t\n\t\tpoints: my_point,\n\t\tplayers: game.getPlayers(),\n\t};\n\treturn dict;\n}", "title": "" }, { "docid": "624c3226965f463d616e78a7be7fd8ca", "score": "0.55995315", "text": "function updatePlayerData(newPlayerData){\n\t}", "title": "" }, { "docid": "1b882b511d476a225d925f28a0a92915", "score": "0.55776227", "text": "function getPlayers(key, elem, name, country)\n{\n // Define request URI\n var uri = \"\";\n\n // Set the URI\n if (typeof name != 'undefined' || typeof country != 'undefined')\n {\n uri = \"/v1/player/\" + country + \"/\" + name + \"?api_key=\" + key;\n }\n else\n {\n uri = \"/v1/player?api_key=\" + key;\n }\n\n $.ajax({\n type: \"GET\",\n contentType: \"application/json\",\n url: _HOST + _BASE + uri,\n cache: false,\n data: {},\n success: function (response)\n {\n // Build the format string\n var outputString = \"\";\n outputString += \"Request Type: 'GET',\\n\"\n + \"Content Type: 'application/json,'\\n\"\n + \"Request URL: \" + _HOST + _BASE + uri + \"\\n\\n\";\n\n outputString += \"{ \\n response: \" + response.errCode + \", \\n\" +\n \" message: '\" + response.errMsg + \"', \\n\" +\n \" players: [ \\n\";\n\n for (var i = 0; i < response.players.length; i++)\n {\n outputString += \" {\\n player_name: \" + response.players[i].player_name + \", \\n\"\n + \" player_location: \" + response.players[i].player_location + \", \\n\"\n + \" player_wins: \" + response.players[i].player_wins + \", \\n\"\n + \" player_draws: \" + response.players[i].player_draws + \", \\n\"\n + \" player_losses: \" + response.players[i].player_losses + \", \\n\"\n + \" player_points: \" + response.players[i].player_points + \", \\n\"\n + \" }\";\n\n if (i != response.players.length) {\n outputString += \",\\n\";\n } else {\n outputString += \"\\n\";\n }\n }\n \n outputString += \"}\";\n\n elem.text(outputString);\n elem.parent().slideDown();\n },\n error: function (response)\n {\n $(\"#error\").text(response);\n }\n });\n}", "title": "" }, { "docid": "2b56de11230adad14ded98c3cedaedd9", "score": "0.5557256", "text": "function loadScoreData(data) {\n data[0].players.forEach(function(item) {\n _players.push(item); \n });\n}", "title": "" }, { "docid": "2c35b64f790a90467f534f194a757336", "score": "0.55521", "text": "async getList()\n {\n const data = await this.getData();\n\n // Returns The Mapped Data (What We Only Need)\n return data.map((speaker) => {\n return {\n name: speaker.name,\n shortname: speaker.shortname,\n title: speaker.title,\n summary: speaker.summary,\n };\n });\n }", "title": "" }, { "docid": "f0634eec4defc6d26b75eff55435900b", "score": "0.55489236", "text": "function getData() {\n\n return {\n \"player\": this.getPlayers(),\n \"experience\": this.getExperience(),\n \"zeny\": this.getZeny()\n }\n }", "title": "" }, { "docid": "af0b24143adc188ce1063e9025720c35", "score": "0.5531709", "text": "function process_player_data(player) {\n\tif (config.media.kodi.enable !== true) return;\n\n\tif (!player) return;\n\tif (!player.data) return;\n\n\tif (player.data.item) {\n\t\tif (player.data.item.album) update.status('kodi.player.album', player.data.item.album, false);\n\t\tif (player.data.item.type) update.status('kodi.player.type', player.data.item.type, false);\n\t\tif (player.data.item.title) update.status('kodi.player.title', player.data.item.title, false);\n\t\tif (player.data.item.label) update.status('kodi.player.title', player.data.item.label, false);\n\n\t\tlet player_artist;\n\t\tif (player.data.item.albumartist) {\n\t\t\tplayer_artist = player.data.item.albumartist[0];\n\t\t}\n\t\telse if (player.data.item.artist) {\n\t\t\tplayer_artist = player.data.item.artist[0];\n\t\t}\n\n\t\tupdate.status('kodi.player.artist', player_artist, false);\n\n\t\tif (player.data.item.label || player.data.item.title) {\n\t\t\tif (config.media.kodi.text.ike === true && status.kodi.player.status === 'playing') {\n\t\t\t\tIKE.text_override(status.kodi.player.artist + ' - ' + status.kodi.player.title);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tget_active_players();\n\t\t}\n\t}\n\n\tif (player.data.player) {\n\t\tif (player.data.player.playerid) update.status('kodi.player.id', player.data.player.playerid, false);\n\n\t\tif (player.data.player.time) {\n\t\t\tif (player.data.player.time.minutes) update.status('kodi.player.time.minutes', player.data.player.time.minutes, false);\n\t\t\tif (player.data.player.time.seconds) update.status('kodi.player.time.seconds', player.data.player.time.seconds, false);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "6468f60c28f718047f79d08514b87479", "score": "0.5530331", "text": "function rcvPlayers(data) {\n PSt.rcvPlayers(data);\n PUI.refreshPlayerNames();\n}", "title": "" }, { "docid": "83f5e2f97fbe54131828e972f5fd6355", "score": "0.55284756", "text": "getTotalResults () {\n const playerList = [\n this.friendState.playerProps[this.friendState.playerOneId],\n this.friendState.playerProps[this.friendState.playerTwoId]\n ]\n\n // We send playerList and get back the results\n const returnData = calculateResults(playerList)\n\n return returnData\n }", "title": "" }, { "docid": "04979d2e69bcada992af0d987b5d62c1", "score": "0.5502652", "text": "componentDidMount() {\n const players = []\n axios.get(`https://statsapi.web.nhl.com/api/v1/teams/`, {\n }).then((res) => {\n const teams = res.data.teams;\n teams.map((team) => {\n const teamID = team.id;\n axios.get(`https://statsapi.web.nhl.com/api/v1/teams/${teamID}/roster`, {\n }).then((newRes) => {\n const roster = newRes.data.roster;\n roster.map((player) => {\n const playerID = player.person.id;\n axios.get(`https://statsapi.web.nhl.com/api/v1/people/${playerID}/?expand=person.stats&stats=statsSingleSeason`, {\n }).then((playerList) => {\n const playerObject = playerList.data.people[0];\n\n //MAKE FASTER WITH COMPONENT DID MOUNT, USE PLAYERS ARRAY TO STORE ALL PLAYER OBJECTS ON PAGE LOAD (V2)\n players.push(playerObject)\n // console.log(players);\n this.setState({\n players\n })\n\n })\n })\n })\n\n })\n })\n }", "title": "" }, { "docid": "aedb2ce779e1e2e56ee29513079ed1a8", "score": "0.549763", "text": "function getPlayerDataForYear(year, allPlayers) {\n\tvar result = [];\n\tvar playerIds = Object.keys(allPlayers);\n\tfor (var i = 0; i < playerIds.length; i++) {\n\t\tvar playerId = playerIds[i];\n\t\tvar player = allPlayers[playerId];\n\t\tvar playerName = player.name;\n\t\tif (year in player.data) {\n\t\t\tvar playerData = player.data[year];\n\t\t\tplayerData.name = playerName;\n\t\t\tplayerData.playerID = playerId;\n\t\t\tresult.push(playerData);\n\t\t}\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "909654fda079c2e86b835c1e1ae5251c", "score": "0.5489655", "text": "function handleResults(result) {\n console.log(result)\n\n if (result.results) {\n moveMap(result.results[0].position)\n }\n\n var marker = new tt.Marker()\n .setLngLat(result.results[0].position)\n .addTo(map);\n}", "title": "" }, { "docid": "34c0e592ba9ea5107de3d648396b31e6", "score": "0.5476956", "text": "async function getPlayersInfo(players_ids_list) {\r\n let promises = [];\r\n players_ids_list.map((id) =>\r\n promises.push(\r\n axios.get(`${api_domain}/players/${id}`, {\r\n params: {\r\n api_token: process.env.api_token,\r\n include: \"team\",\r\n },\r\n })\r\n )\r\n );\r\n let players_info = await Promise.all(promises);\r\n return extractRelevantPlayerData(players_info);\r\n}", "title": "" }, { "docid": "66d77b83d3eda54ece99cc828e6093a3", "score": "0.5473093", "text": "function PlayerInfo(name) {\n this.name = name;\n this.type = \"PlayerInfo\";\n this.games = [];\n this.gamesCount = 0;\n this.winsCount = 0;\n this.score = 0;\n this.scoreByHub = {};\n this.__defineGetter__('hubs', function() {return Object.keys(this.scoreByHub)});\n\n}", "title": "" }, { "docid": "1f88c3cd2137f99a049e9a6adfe8359a", "score": "0.54726577", "text": "function getMapData(_json)\n {\n var parsed = JSON.parse(_json.responseText);\n \n Map.TILE_W = parsed.tilewidth;\n Map.TILE_H = parsed.tileheight;\n Map.TILES_HORIZONTAL = parsed.width;\n Map.TILES_VERTICAL = parsed.height;\n Map.TILESHEET_W = parsed.tilesets[0].imagewidth;\n Map.TILESHEET_H = parsed.tilesets[0].imageheight;\n \n \n for (var key in parsed.layers )\n { \n switch( parsed.layers[key].name )\n { \n case \"base_layer\":\n baseSprites = parsed.layers[key].data;\n break;\n \n case \"basemix\":\n baseMix = parsed.layers[key].data;\n break;\n \n case \"middle_layer\":\n middleSprites = parsed.layers[key].data;\n break;\n \n case \"collision\":\n collisionSprites = parsed.layers[key].data;\n break;\n \n case \"coins animadas\":\n getObjectsAnimated( parsed.layers[key].objects );\n break;\n }\n }\n }", "title": "" }, { "docid": "a14289d668ebbfb674185dc6f17c38b2", "score": "0.54718816", "text": "function DB_getPlayers() {\n API.getPlayers()\t//Call the getPlayers() method off of our API object, which was imported from Utils.\n .then((db_players) => {\t\t//Then, with the retrieved data, ...\n setPlayers(db_players);\t\t//Set our players state to the retrieved data.\n }\n )\n .catch((err) => {\n console.error(err);\n });\n }", "title": "" }, { "docid": "af635cec9cca6701e8284d8c462d7027", "score": "0.5469786", "text": "fetchPlayers() {\n return this.players;\n }", "title": "" }, { "docid": "a50f8561262fccb45c26d26ee0214272", "score": "0.5468102", "text": "function matchLookUp(MATCH_NUM) {\n //var SUMMONER_NAME = \"\";\n //SUMMONER_NAME = $(\"#userName\").val();\n\n //var API_KEY = \"RGAPI-c16c2668-0913-4123-9416-113f700d30f0\";\n var Kill_coords = [];\n \n if (MATCH_NUM !== \"\") {\n\n $.ajax({\n url: 'https://na1.api.riotgames.com/lol/match/v3/timelines/by-match/' + MATCH_NUM + '?api_key=RGAPI-c16c2668-0913-4123-9416-113f700d30f0',\n type: 'GET',\n dataType: 'json',\n data: {\n },\n success: function (json) {\n //Loop to search for a Champion kill, then store its coordinate\n for (i=0; i<json.frames.length; i++)\n {\n for (j=0; j<json.frames[i].events.length; j++)\n {\n if (json.frames[i].events[j].type=='CHAMPION_KILL')\n {\n //console.log(json.frames[i].events[j].position.x);\n var x = json.frames[i].events[j].position.x;\n //console.log(x);\n var y = json.frames[i].events[j].position.y;\n Kill_coords.push([x, y]);\n }\n }\n }\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n alert(\"error getting Summoner data!\");\n },\n ///////////////////////////////////////////////////////////\n async: false // This line is the holy grail of our project/\n //and still a SUPER DUPER BAD idea ¯\\_(ツ)_/¯ //////////////\n ///////////////////////////////////////////////////////////\n }); \n displaymap(Kill_coords);\n } \n else {}\n}", "title": "" }, { "docid": "e4cc306776207ad0c5426c3e59591589", "score": "0.54668033", "text": "static getResultsAsMap() {\r\n const matches = {}\r\n for (const table of $('#session').children()) {\r\n if (table.id === 'match-set-table') {\r\n const rows = table.tBodies.item(0).rows\r\n for (const row of rows) {\r\n const c = row.childNodes[1].innerText\r\n const p = row.childNodes[2].innerText\r\n const result = Table.getValuesFromTimeInputCell(row.childNodes[3])\r\n if (!matches[c]) matches[c] = {}\r\n matches[c][p] = result.isSat ? Match.getSatValue() : result.time\r\n } \r\n }\r\n }\r\n return matches\r\n }", "title": "" }, { "docid": "6cb1e254407b5b48b10da3a02eca5e24", "score": "0.5465542", "text": "function get_player_cities_data(x, y) {\r\n var isError = false;\r\n if (!is_defined(x) || (x < 0) || (x >= MAP_LENGTH) || isNaN(parseInt(x))) {\r\n x = 0;\r\n isError = true;\r\n }\r\n if (!is_defined(y) || (y < 0) || (y >= MAP_WIDTH) || isNaN(parseInt(y))) {\r\n y = 0;\r\n isError = true;\r\n }\r\n if (isError) {\r\n add_log_message(DATA_MODULE, WARNING, \"Fetching 'player owned cities' data, wrong co-ordinates, (\" +\r\n x + \", \" + y + \"), defaulting to zero when necesaary.\");\r\n }\r\n \r\n var offset = (MAP_FETCH_SIZE - 1) / 2;\r\n map_data_at(x, y, offset, function(result, context, status) {\r\n }, null);\r\n \r\n var y_next = y + MAP_FETCH_SIZE;\r\n var y_end = y + offset;\r\n y = (y_end >= (MAP_WIDTH - 1)) ? 0 : ((y_next >= (MAP_WIDTH - 1)) ? (y_end + 1) : y_next);\r\n \r\n var x_next = x + MAP_FETCH_SIZE;\r\n var x_end = x + offset;\r\n x = (y != 0) ? x : ((x_end >= (MAP_LENGTH - 1)) ? 0 : ((x_next >= (MAP_LENGTH - 1)) ? (x_end + 1) : x_next));\r\n \r\n setTimeout(function() { get_player_cities_data(x, y); }, 1000);\r\n}", "title": "" }, { "docid": "ce4a43822f0ad4d6786761a9c9e398fe", "score": "0.5449964", "text": "function getPlayerNames(data) {\n var players = Object.keys(data);\n var play = [],\n i = 0;\n for (i; i < players.length; i++) {\n play.push(players[i]);\n }\n return play;\n}", "title": "" }, { "docid": "7ef92a582fc0faa58664bf4095e4046e", "score": "0.54349923", "text": "function PlayerData(strData)\r\n{\r\n // Set default values\r\n this.dateInitialized = (new Date()).getTime(); // Beginning of recorded history\r\n this.rpOwed = 0; // RP owed to the player by kage\r\n this.rpAwardedTotal = 0; // Total RP awarded to the player via storehouse\r\n this.ryoRaid = 0; // Total vryo earned via invasions\r\n this.numRaid = 0; // Total number of raids\r\n this.resInvasionBasic = 0; // Basic resources acquired via invasion\r\n this.resInvasionAdvanced = 0; // Advanced resources acquired via invasion\r\n this.numInvasion = 0; // Total number invasions\r\n this.numFullInvasion = 0; // Total number full-resource invasions\r\n this.resWheel = 0; // Basic resources earned from PH wheel\r\n this.resRobo = 0; // Basic resources earned from robo fighto tourney\r\n this.ryoContractTotal = 0; // Total vryo brought in via contracts\r\n this.resContractBasic = 0; // Total resources from contract milling\r\n this.resContractAdvanced = 0; // Advanced resources from contract milling\r\n this.numTotalSpies = 0; // Total number of spies placed\r\n this.numSpyWins = 0; // Total number of weeks where player placed the most spies\r\n this.numKaijuFavors = 0; // Total number of favors used on kaiju\r\n this.numTotalDaysActive = 0; // Total number of days active in the village (did a village action)\r\n this.numFullWeeksActive = 0; // Total number of full weeks active in the village\r\n this.numUpkeepWeeks = new Array(); // Total number of weeks at each upkeep level\r\n this.numUpkeepWeeks[0] = 0; // Total number of weeks at upkeep level 1\r\n this.numUpkeepWeeks[1] = 0; // Total number of weeks at upkeep level 2\r\n this.numUpkeepWeeks[2] = 0; // Total number of weeks at upkeep level 3\r\n this.numDaysLazy = 0; // Total number of days lazy in village\r\n this.rpStorehouseGift = 0; // Total rp value of items donated to storehouse\r\n this.rpStorehouseTake = 0; // Total rp value of items taken from storehouse\r\n this.rpBonus = 0; // Discretionary RP\r\n this.resSnakeOilBasic = 0; // Total Snake Oil basic resources\r\n this.resSnakeOilAdvanced = 0; // Total Snake Oil advanced resources\r\n this.numZReward = 0; // Total ZReward donated to village\r\n\r\n this.saveData = new Object(); // List of attributes to save across information resets\r\n this.saveData.numCurrSpies = 0; // Total number of spies for current week\r\n this.saveData.numConsecDaysActive = 0; // Current number of consecutive days for a week\r\n this.saveData.numUpkeepDays = new Array(); // Current number of days at each upkeep level\r\n this.saveData.numUpkeepDays[0] = 0; // Days at upkeep level 1\r\n this.saveData.numUpkeepDays[1] = 0; // Days at upkeep level 2\r\n this.saveData.numUpkeepDays[2] = 0; // Days at upkeep level 3\r\n this.saveData.cDonateRyoLeftover = 0; // Current amount of donated contract Ryo not yet used for RP\r\n this.saveData.cMillRyoLeftover = 0; // Current amount of milled contract Ryo not yet used for RP\r\n\r\n this.logText = \"\"; // Logging info, not stored for now but possibly displayed when script is run\r\n\r\n\r\n // Extract information from DOM Storage format, if strData not null\r\n if (strData)\r\n {\r\n\tvar data = strData.split(\"|\");\r\n\tthis.dateInitialized = parseInt(data[0], 10);\r\n\tthis.rpOwed = parseInt(data[1], 10);\r\n\tthis.rpAwardedTotal = parseInt(data[2], 10);\r\n this.ryoRaid = parseInt(data[3], 10);\r\n\tthis.numRaid = parseInt(data[4], 10);\r\n\tthis.resInvasionBasic = parseInt(data[5], 10);\r\n\tthis.resInvasionAdvanced = parseInt(data[6], 10);\r\n\tthis.numInvasion = parseInt(data[7], 10);\r\n this.numFullInvasion = parseInt(data[8], 10);\r\n\tthis.resWheel = parseInt(data[9], 10);\r\n\tthis.resRobo = parseInt(data[10], 10);\r\n\tthis.ryoContractTotal = parseInt(data[11], 10);\r\n\tthis.resContractBasic = parseInt(data[12], 10);\r\n\tthis.resContractAdvanced = parseInt(data[13], 10);\r\n\tthis.numTotalSpies = parseInt(data[14], 10);\r\n this.numSpyWins = parseInt(data[15], 10);\r\n\tthis.numKaijuFavors = parseInt(data[16], 10);\r\n\tthis.numTotalDaysActive = parseInt(data[17], 10);\r\n this.numFullWeeksActive = parseInt(data[18], 10);\r\n this.numUpkeepWeeks[0] = parseInt(data[19], 10);\r\n this.numUpkeepWeeks[1] = parseInt(data[20], 10);\r\n this.numUpkeepWeeks[2] = parseInt(data[21], 10);\r\n\tthis.numDaysLazy = parseInt(data[22], 10);\r\n\tthis.rpStorehouseGift = parseInt(data[23], 10);\r\n\tthis.rpStorehouseTake = parseInt(data[24], 10);\r\n\tthis.rpBonus = parseInt(data[25], 10);\r\n\tthis.resSnakeOilBasic = parseInt(data[26], 10);\r\n\tthis.resSnakeOilAdvanced = parseInt(data[27], 10);\r\n\tthis.numZReward = parseInt(data[28], 10);\r\n this.saveData.numCurrSpies = parseInt(data[29], 10);\r\n this.saveData.numConsecDaysActive = parseInt(data[30], 10);\r\n this.saveData.numUpkeepDays[0] = parseInt(data[31], 10);\r\n this.saveData.numUpkeepDays[1] = parseInt(data[32], 10);\r\n this.saveData.numUpkeepDays[2] = parseInt(data[33], 10);\r\n this.saveData.cDonateRyoLeftover = parseInt(data[34], 10);\r\n this.saveData.cMillRyoLeftover = parseInt(data[35], 10);\r\n }\r\n\r\n // Convert data to | delimited string format\r\n // Used for DOM Storage\r\n this.toString = function()\r\n {\r\n\tvar retArr = new Array(\r\n\t this.dateInitialized ,\r\n\t this.rpOwed ,\r\n\t this.rpAwardedTotal ,\r\n this.ryoRaid ,\r\n\t this.numRaid ,\r\n\t this.resInvasionBasic ,\r\n\t this.resInvasionAdvanced ,\r\n\t this.numInvasion ,\r\n this.numFullInvasion ,\r\n\t this.resWheel ,\r\n\t this.resRobo ,\r\n\t this.ryoContractTotal ,\r\n\t this.resContractBasic ,\r\n\t this.resContractAdvanced ,\r\n\t this.numTotalSpies ,\r\n this.numSpyWins ,\r\n\t this.numKaijuFavors ,\r\n\t this.numTotalDaysActive ,\r\n this.numFullWeeksActive ,\r\n this.numUpkeepWeeks[0] ,\r\n this.numUpkeepWeeks[1] ,\r\n this.numUpkeepWeeks[2] ,\r\n\t this.numDaysLazy ,\r\n\t this.rpStorehouseGift ,\r\n\t this.rpStorehouseTake ,\r\n\t this.rpBonus , \r\n\t this.resSnakeOilBasic ,\r\n\t this.resSnakeOilAdvanced ,\r\n\t this.numZReward ,\r\n this.saveData.numCurrSpies ,\r\n this.saveData.numConsecDaysActive ,\r\n this.saveData.numUpkeepDays[0] ,\r\n this.saveData.numUpkeepDays[1] ,\r\n this.saveData.numUpkeepDays[2] ,\r\n this.saveData.cDonateRyoLeftover ,\r\n this.saveData.cMillRyoLeftover\r\n\t);\r\n\r\n\treturn retArr.join(\"|\");\r\n }\r\n\r\n} // End PlayerData Definition", "title": "" }, { "docid": "44e6df93cfc1d7d2e0636f7424722fbc", "score": "0.5434924", "text": "toMap(name) {\n //loading the map the player chose\n this.onOverWorld = false;\n this.stopMusic();\n loaded = false;\n canvas.getContext(\"2d\").clearRect(0, 0, canvas.width, canvas.height);\n canvas.remove();\n loadMap(name, this.user, function (m) {\n m.loadCharacter(overWorld.characters.getCharacter());\n // m.playMusic();\n }, this);\n }", "title": "" }, { "docid": "178cf63a7934f9f0b7d1cd6f58ed8d61", "score": "0.5433058", "text": "function postMatchResults (playerList) {\n try {\n // We save the statistic to our database\n playerList.forEach(player => {\n postStatistic(player)\n })\n } catch (error) {\n logger.error('GAME ENGINE INTERFACE => Cannot post statistics')\n logger.error(error.stack)\n }\n}", "title": "" }, { "docid": "178cf63a7934f9f0b7d1cd6f58ed8d61", "score": "0.5433058", "text": "function postMatchResults (playerList) {\n try {\n // We save the statistic to our database\n playerList.forEach(player => {\n postStatistic(player)\n })\n } catch (error) {\n logger.error('GAME ENGINE INTERFACE => Cannot post statistics')\n logger.error(error.stack)\n }\n}", "title": "" }, { "docid": "f81edfc5121f7f10606dd22e777744f2", "score": "0.5430573", "text": "function matchLookUp(MATCH_NUM) {\n //var SUMMONER_NAME = \"\";\n //SUMMONER_NAME = $(\"#userName\").val();\n\n //var API_KEY = \"RGAPI-c16c2668-0913-4123-9416-113f700d30f0\";\n var Kill_coords = [];\n //console.log(\"hey\");\n if (MATCH_NUM !== \"\") {\n\n $.ajax({\n url: 'https://na1.api.riotgames.com/lol/match/v3/timelines/by-match/' + MATCH_NUM + '?api_key=RGAPI-c16c2668-0913-4123-9416-113f700d30f0',\n type: 'GET',\n dataType: 'json',\n data: {\n },\n success: function (json) {\n //Loop to search for a Champion kill, then store its coordinate\n for (i=0; i<json.frames.length; i++)\n {\n for (j=0; j<json.frames[i].events.length; j++)\n {\n if (json.frames[i].events[j].type=='CHAMPION_KILL')\n {\n //console.log(json.frames[i].events[j].position.x);\n var x = json.frames[i].events[j].position.x;\n //console.log(x);\n var y = json.frames[i].events[j].position.y;\n Kill_coords.push([x, y]);\n }\n }\n }\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n alert(\"error getting Summoner data!1\");\n },\n ///////////////////////////////////////////////////////////\n async: false // This line is the holy grail of our project/\n //and still a SUPER DUPER BAD idea ¯\\_(ツ)_/¯ //////////////\n ///////////////////////////////////////////////////////////\n }); \n displaymap(Kill_coords);\n } \n else {}\n}", "title": "" }, { "docid": "2662fd834291f83d85998414f92311b5", "score": "0.54292023", "text": "function drawPlayers(map)\n{\n //var player_map\n var db = new sql.Database( 'players.sqlite' );\n db.all(\"SELECT * FROM \" + table,\n function( err, rows ) {\n if (err != null)\n { console.log(err);\n return;\n }\n for( var i = 0; i < rows; i++ )\n {\n x= rows[i].xpos;\n y = rows[i].ypos\n map[x][y] += rows[i].name;\n //players are added into array from database\n }\n }\n } );\n\n}", "title": "" }, { "docid": "378ac5a1d6bdbf5ef09bc5b63ac98955", "score": "0.5426857", "text": "async initPlayerData(curTeammates) {\n // Init individual players\n for (let player of curTeammates) {\n if (this.teammates[player.name] == undefined) {\n this.teammates[player.name] = {};\n this.teammates[player.name].wins = 0;\n this.teammates[player.name].losses = 0;\n\n // Add icon url\n this.teammates[player.name].iconUrl = await gameInfo.getPlayerIconUrl(player.iconId);\n }\n }\n\n // Alphabetize player names and get unique key from concatenating them\n curTeammates.sort((a, b) => a.name.localeCompare(b.name));\n const teamKey = curTeammates.map(player => player.name).join(\"\");\n\n // Init unique teams\n if (this.teams[teamKey] == undefined) {\n this.teams[teamKey] = {};\n this.teams[teamKey].wins = 0;\n this.teams[teamKey].losses = 0;\n this.teams[teamKey].players = curTeammates.map(player => player.name);\n }\n }", "title": "" }, { "docid": "7cf6eeb0c959063d6e6a5e6ddcb825fe", "score": "0.5425536", "text": "componentDidMount() {\n (PlayerManager.getAllWithPMatches()).then(PlayerData=> {\n this.setState({\nPlayerData: PlayerData\n })\n })\n}", "title": "" }, { "docid": "2afd4955450c37382f0078a614db707f", "score": "0.54215604", "text": "function loadData(map, playerData){\r\n if (firstLoad) { //if the data is being loaded for the first time, create a temporary info window\r\n infowindow = new google.maps.InfoWindow({\r\n content: \"temp\"\r\n });\r\n } else { //if not, close the info window\r\n infowindow.close();\r\n }\r\n\r\n if(clickCounts[0] % 2){ //turn heatmap off if on\r\n document.getElementById('heatMapControl').click();\r\n document.getElementById('heatMapControl').style.fontWeight = \"normal\";\r\n }\r\n\r\n if(clickCounts[1] % 2){ //set markers off\r\n document.getElementById('markerControl').click();\r\n }\r\n\r\n clickCounts = [0, 0];\r\n for (var i = 0; i < markers.length; i++) { //clear all markers from the map\r\n markers[i].setMap(null);\r\n }\r\n markers.length = 0;; //to be filled based on query\r\n heatMapData.length = 0; //data for heatmap\r\n if(!firstLoad){ //if this is the first load, clear clusters and marker labels\r\n markerCluster.setMap(null);\r\n markerCluster.clearMarkers();\r\n }\r\n\r\n groupedLatLngData = {};\r\n //grouping response data by lat and lng\r\n for(var i = 0; i < playerData.length; i++){\r\n lat = playerData[i]['latitude'];\r\n lng = playerData[i]['longitude'];\r\n key = String(lat) + lng;\r\n player = {};\r\n player['roster_year'] = playerData[i]['roster_year'];\r\n player['first_name'] = playerData[i]['first_name'];\r\n player['last_name'] = playerData[i]['last_name'];\r\n player['position'] = playerData[i]['position'];\r\n player['heights'] = playerData[i]['heights'];\r\n player['weights'] = playerData[i]['weights'];\r\n player['home_town'] = playerData[i]['home_town'];\r\n player['state_or_country'] = playerData[i]['state_or_country'];\r\n player['high_school'] = playerData[i]['high_school'];\r\n player['alternative_school'] = playerData[i]['alternative_school'];\r\n player['college'] = playerData[i]['college'];\r\n player['college_league'] = playerData[i]['college_league'];\r\n player['bio_link'] = playerData[i]['bio_link'];\r\n player['starter_count'] = playerData[i]['starter_count'];\r\n player['accolade_count'] = playerData[i]['accolade_count'];\r\n\r\n if(!groupedLatLngData[key]){ //new key found (new lat lng pair)\r\n groupedLatLngData[key] = {};\r\n groupedLatLngData[key]['playerCount'] = 1;\r\n groupedLatLngData[key]['lat'] = playerData[i]['latitude'];\r\n groupedLatLngData[key]['lng'] = playerData[i]['longitude'];\r\n groupedLatLngData[key]['hs'] = playerData[i]['high_school'];\r\n if (playerData[i]['highschoolcity'] != null) {\r\n groupedLatLngData[key]['hsCity'] = playerData[i]['highschoolcity'].toLowerCase();\r\n }\r\n groupedLatLngData[key]['hsStateOrProvince'] = playerData[i]['highschoolstateorcountry'];\r\n groupedLatLngData[key]['hsStateOrProvince'] = playerData[i]['highschoolstateorprovince'];\r\n groupedLatLngData[key]['hsCountry'] = playerData[i]['highschoolcountry'].toLowerCase();\r\n groupedLatLngData[key]['players'] = [];\r\n players = groupedLatLngData[key]['players'];\r\n players.push(player)\r\n } else {\r\n groupedLatLngData[key]['playerCount'] = groupedLatLngData[key]['playerCount'] + 1;\r\n players = groupedLatLngData[key]['players'];\r\n players.push(player);\r\n }\r\n }\r\n //building heatmap and marker data\r\n for(var highSchool in groupedLatLngData){\r\n let latitude = groupedLatLngData[highSchool]['lat'];\r\n let longitude = groupedLatLngData[highSchool]['lng']\r\n let pos = {lat: latitude, lng: longitude};\r\n let marker = new google.maps.Marker({\r\n position: pos,\r\n map: map,\r\n title: groupedLatLngData[highSchool]['hs'], //high school name\r\n label: { //the label on the marker comes from the number of players from the associated highschool\r\n text: String(groupedLatLngData[highSchool]['playerCount']),\r\n fontWeight: \"bold\",\r\n color: \"black\"\r\n },\r\n number: groupedLatLngData[highSchool]['playerCount'],\r\n icon: { //import and adjust the icon to be used for markers\r\n url: \"http://maps.google.com/mapfiles/kml/shapes/schools.png\",\r\n scaledSize: new google.maps.Size(35, 35),\r\n labelOrigin: { x: 16, y: 26}\r\n },\r\n animation: google.maps.Animation.DROP //add a drop animation\r\n });\r\n\r\n heatMapData.push({location: new google.maps.LatLng(latitude, longitude), weight: groupedLatLngData[highSchool]['playerCount']});\r\n\r\n var stateOrProvince = groupedLatLngData[highSchool]['hsStateOrProvince'];\r\n var country = \"\";\r\n\r\n if (stateOrProvince == null) { //if the state or province is null, use the country instead\r\n stateOrProvince = \"\";\r\n country = \", \" + groupedLatLngData[highSchool]['hsCountry'];\r\n } else {\r\n stateOrProvince = \", \" + stateOrProvince;\r\n }\r\n\r\n //building info window\r\n let contentString = '<div id=\"content\">'+\r\n '<div id=\"siteNotice\">'+\r\n '</div>'+\r\n '<h1 id=\"firstHeading\" class=\"firstHeading\">'+ groupedLatLngData[highSchool]['hs'] +'</h1>'+\r\n '<div id=\"bodyContent\">'+\r\n '<p style=\"text-transform:capitalize\">'+groupedLatLngData[highSchool]['hsCity'] +\r\n stateOrProvince + country + '</p>' +\r\n '<p style=\"text-transform:capitalize\">'+ \"Student Count: \" + groupedLatLngData[highSchool]['playerCount'] +\r\n '</div>'+\r\n '</div>';\r\n\r\n\r\n marker.addListener('click', function() { //on click of a marker, change the info window and update the data in the table\r\n if (infowindow) {\r\n infowindow.close();\r\n }\r\n\r\n infowindow.setContent(contentString);// = contentString;\r\n\r\n infowindow.setPosition(new google.maps.LatLng(latitude, longitude));\r\n currentInfoWindow = infowindow;\r\n\r\n dt.destroy();\r\n infowindow.open(map);\r\n let table = document.getElementById('resultTableBody');\r\n let player_data = '';\r\n let key = String(latitude) + longitude;\r\n //table changes to marker-specific data on click\r\n for(let i = 0; i < groupedLatLngData[key]['players'].length; i++){\r\n let association = _findAssociativeIndices(groupedLatLngData[key]['players'][i]['roster_year']);\r\n let currentBioLink = _getCurrentDataElement(groupedLatLngData[key]['players'][i]['bio_link'], association);\r\n player_data += '<tr onclick = goToRosterPage(\"'.concat(currentBioLink).concat('\")>');\r\n player_data += '<td>' + _sortAggregateData(groupedLatLngData[key]['players'][i]['roster_year']) + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['first_name'] + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['last_name'] + '</td>';\r\n player_data += '<td>' + _getCurrentDataElement(groupedLatLngData[key]['players'][i]['position'], association) + '</td>';\r\n player_data += '<td>' + convertToInches(_getCurrentDataElement(groupedLatLngData[key]['players'][i]['heights'], association)) + '</td>';\r\n player_data += '<td>' + _getCurrentDataElement(groupedLatLngData[key]['players'][i]['weights'], association) + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['starter_count'] + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['accolade_count'] + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['college_league'] + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['college'] + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['home_town'] + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['state_or_country'] + '</td>';\r\n player_data += '<td>' + groupedLatLngData[key]['players'][i]['high_school'] + '</td>';\r\n player_data += '</tr>';\r\n }\r\n table.innerHTML = player_data;\r\n changeTableOnZoom = true;\r\n dt = $('#resultTable').DataTable({\r\n \"lengthMenu\": [[10, 25, 50, -1], [10, 25, 50, \"All\"]],\r\n \"scrollX\": true\r\n });\r\n document.getElementById('resultTable').style.width = '98%';\r\n });\r\n\r\n markers.push(marker);\r\n }\r\n\r\n\r\n let mcOptions = { //load in the info for the marker clusters usin the google maps cluster library\r\n gridSize: 45,\r\n minimumClusterSize: 2,\r\n imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'\r\n };\r\n\r\n markerCluster = new MarkerClusterer(map, markers, mcOptions);\r\n\r\n //creates a custom calculator method so the markers cluster on student count and not marker (highschool) count\r\n markerCluster.setCalculator(function(markers, numStyles){\r\n var index = 0;\r\n var count = 0;\r\n for (var i = 0; i < markers.length; i++) {\r\n if (markers[i].number) {\r\n count += markers[i].number;\r\n } else {\r\n count++;\r\n }\r\n }\r\n var dv = markers.length;\r\n while (dv !== 0) {\r\n dv = parseInt(dv / 10, 10);\r\n index++;\r\n }\r\n\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: count,\r\n index: index\r\n };\r\n });\r\n //update the heatmap\r\n heatMap = new google.maps.visualization.HeatmapLayer({\r\n data: heatMapData\r\n });\r\n firstLoad = false;\r\n $('.loader').hide();\r\n if(playerData.length!=0) {\r\n document.location.href = \"#map\";\r\n document.getElementById('zoomControl').click();\r\n } else {\r\n alert(\"Query Returned No Results\");\r\n }\r\n}", "title": "" }, { "docid": "680df768ea5a70b047f428a8f3eee191", "score": "0.5421507", "text": "getPlayersNames() {\n let allPlayers = {};\n \n for (let key in this.players) {\n if (this.players.hasOwnProperty(key)) {\n allPlayers[key] = this.players[key].name;\n }\n }\n return allPlayers;\n }", "title": "" }, { "docid": "bfb8bb1f6e4d3e81947db623f2815850", "score": "0.5421001", "text": "function getPlayer(teamID) {\n $.ajax({\n headers: {'X-Auth-Token': 'e34ad8f9aebb436eb3437851ca9b581a'},\n url: 'https://api.football-data.org/v1/teams/' + teamID + '/players',\n dataType: 'json',\n type: 'GET'\n }).done(function (response) {\n $('.results .players-detail-container').html('<table class=\"table\" id=\"players-result\"></table>');\n $('.players #players-category').clone().appendTo('#players-result');\n $.each(response.players, function (key, value) {\n var playerShown = showPlayer(value.name, value.position, value.jerseyNumber, value.nationality, value.marketValue);\n\n $('.results #players-result').append(playerShown);\n });\n });\n}", "title": "" }, { "docid": "9bccc2e4953353ca27a5fa88bf584585", "score": "0.54191655", "text": "function getScoreMap(scorecard){\n\n let innings = scorecard.get_object_member('past_ings');\n var scoreMap = new Array();\n /* \n Counting number of innings. In case of single inning, json emits an object, an array of objects otherwise.\n */\n let totalInnings = 1;\n if(innings !=null){\n //This means inning object is returned not an array. Hence only Single Inning.\n\n }else{\n //Multiple Innings\n innings = scorecard.get_array_member('past_ings');\n totalInnings = innings.get_length();\n innings = innings.get_elements();\n }\n /*\n Innings Object to Map\n */\n if(totalInnings==1){\n var r = innings.get_object_member('s').get_object_member('a');\n scoreMap[0]={\n\n 'teamId': r.get_string_member(\"i\"),\n 'runs': r.get_string_member(\"r\"),\n 'wickets': r.get_string_member(\"w\"),\n 'overs': r.get_string_member(\"o\")\n };\n \n }else{\n\n for(var i=0; i<totalInnings; i++){\n\n var r = innings[i].get_object().get_object_member('s').get_object_member('a');\n scoreMap[i] = {\n\n 'teamId': r.get_string_member(\"i\"),\n 'runs': r.get_string_member(\"r\"),\n 'wickets': r.get_string_member(\"w\"),\n 'overs': r.get_string_member(\"o\")\n };\n }\n }\n return scoreMap;\n}", "title": "" }, { "docid": "93b045f8eb3bb1ed4b016eefffff1aca", "score": "0.5418823", "text": "function initToPlayerData() {\n var data = { };\n data[Thunderjack.HandButtonIds.RIGHT] = Thunderjack.PlayerHandIds.LOWER_RIGHT;\n data[Thunderjack.HandButtonIds.MIDDLE] = Thunderjack.PlayerHandIds.LOWER_MIDDLE;\n data[Thunderjack.HandButtonIds.LEFT] = Thunderjack.PlayerHandIds.LOWER_LEFT;\n return(data);\n }", "title": "" }, { "docid": "c264aee7fb5fc374a6e56bfbdf53ea43", "score": "0.5417163", "text": "function onPlayerInfoReceived(context, data) {\r\n try {\r\n var memberName = data.n\r\n var pvp = data.d;\r\n var pve = data.bde;\r\n \r\n // Add player with its PvP/PvE score.\r\n rowData.push([memberName, pvp, pve]);\r\n\r\n if (rowData.length == memberCount) {\r\n // Show Alliance name in label.\r\n pvpHighScoreLabel.setValue(\"PvP and PvE for alliance: \" + data.an);\r\n\r\n dataTable.setData(rowData);\r\n dataTable.sortByColumn(1, false);\r\n }\r\n\r\n } catch (e) {\r\n console.log(\"onPlayerInfoReceived: \", e);\r\n }\r\n }", "title": "" }, { "docid": "c264aee7fb5fc374a6e56bfbdf53ea43", "score": "0.5417163", "text": "function onPlayerInfoReceived(context, data) {\r\n try {\r\n var memberName = data.n\r\n var pvp = data.d;\r\n var pve = data.bde;\r\n \r\n // Add player with its PvP/PvE score.\r\n rowData.push([memberName, pvp, pve]);\r\n\r\n if (rowData.length == memberCount) {\r\n // Show Alliance name in label.\r\n pvpHighScoreLabel.setValue(\"PvP and PvE for alliance: \" + data.an);\r\n\r\n dataTable.setData(rowData);\r\n dataTable.sortByColumn(1, false);\r\n }\r\n\r\n } catch (e) {\r\n console.log(\"onPlayerInfoReceived: \", e);\r\n }\r\n }", "title": "" }, { "docid": "e22dec74d75cbb06ca3174b0cce9c693", "score": "0.5416484", "text": "function add_player_to_map(fb_id) {\n $.ajax({\n type: \"GET\",\n url: \"http://localhost:3000/players/\" + fb_id,\n success: function(data) {\n var playerLoc = new google.maps.LatLng(data.latitude, data.longitude);\n players.push(new Player(playerLoc, data.name, map, data.strength));\n }\n });\n}", "title": "" }, { "docid": "eddcc2596259e6761aa5f42fd2bee84c", "score": "0.54160625", "text": "function sortPlayers(players){\n for(var i=0; i<players.length; i++){\n var position=players[i].position;\n switch (position) {\n case \"QB\":\n data.qbs.push(players[i])\n break;\n case \"RB\":\n data.rbs.push(players[i])\n break;\n case \"WR\":\n data.wrs.push(players[i])\n break;\n case \"TE\":\n data.tes.push(players[i])\n break;\n case \"K\":\n data.kicks.push(players[i])\n break;\n case \"DEF\":\n data.defs.push(players[i])\n break;\n }\n }\n}", "title": "" }, { "docid": "1244967d6e7d15559ac1690c174130ea", "score": "0.5414434", "text": "function prepareStatsAndNames(obj){ \n\tlet key;\n\tlet map = {};\n\tfor(i = 0; i < obj.length; i++){\n\t\tkey = obj[i].Player.toLowerCase();\n\t\tmap[key] = obj[i];\n\t}\n\treturn map;\n}", "title": "" }, { "docid": "297accc4e95a3f9ec3a3269a5c900767", "score": "0.5403925", "text": "function _getPlayers() {\n var externalReq = $http.get(endPoint['getPlayers'], null, _config);\n externalReq.success(function(data, status, headers, config) {\n $scope.currentPlayer = {\n id_player: $rootScope.siteData.player_id\n };\n $scope.players = (JSON.parse(data.Payload))[0];\n });\n externalReq.error(function(data, status, headers, config) {\n console.log('Error en invocacion servicio getPlayers');\n });\n }", "title": "" }, { "docid": "5690f19e3031489821761b4e23f20384", "score": "0.5397818", "text": "function exctractPlayerId(data){\r\n return data.id\r\n}", "title": "" }, { "docid": "cbd02ac33bd0ffcc794e41d97ac565bc", "score": "0.5397481", "text": "function getPlayer(playerId) {\n console.log(playerId);\n $.ajax({\n url: nflPlayerSite,\n method: \"GET\",\n dataType: 'json'\n })\n .then(function (response) {\n console.log(response);\n $(\"#teamcontainer\").empty();\n // $(\"#teamcontainer\").show();\n response.Players.forEach(function (player) {\n if (player.playerId === playerId) {\n \n console.log(player);\n let playerDiv = $(\"<div>\").addClass(\"player\");\n $(\"#teamcontainer\").prepend(playerDiv);\n playerDiv.attr(\"player-name\", player.displayName);\n playerDiv.append(player.displayName);\n //playerDiv.css('display',\"\");\n let statDiv = $(\"<div>\").addClass(\"playerStat\");\n $(\"#teamcontainer\").append(statDiv);\n statDiv.append(\"<div class='jersey'>Number: \" + player.jersey + \"</div>\");\n statDiv.append(\"<div class='position'>Position: \" + player.position + \"</div>\");\n statDiv.append(\"<div class='height'>Height: \" + player.height + \"\\\"\" + \"</div>\");\n statDiv.append(\"<div class='weight'>Weight: \" + player.weight + \" lbs\" + \"</div>\");\n statDiv.append(\"<div class='college'>College: \" + player.college + \"</div>\");\n statDiv.append(\"<div class='DOB'>DOB: \" + player.dob + \"</div>\");\n let isFelonDiv = $(\"<div>\").addClass(\"isFelon\");\n $(\"#teamcontainer\").append(isFelonDiv);\n isFelonDiv.append(\"<div class='felonBtn'><a href='#felon-panel'>Felon?</a></div\");\n isFelonDiv.append(\"<div class='goodBtn'><a href='#good-panel'>Good?</a></div\");\n getArrestInfo(player.displayName);\n }\n })\n })\n}", "title": "" }, { "docid": "d90be3f57b238dfb76e74231f9e6fbbb", "score": "0.5390053", "text": "function loadPlayers() {\n if (playersField.children.length > 0) {\n playersField.innerHTML = '';\n }\n\n fetch(url)\n .then(res => res.json())\n .then(data => {\n Object.keys(data).forEach(x => {\n playersField.appendChild(createPlayerDiv(data[x], x));\n });\n })\n .catch(err => console.log(err));\n }", "title": "" }, { "docid": "a63ea4a9b1e7631718d49778b5c80ed5", "score": "0.5382736", "text": "function json_res(arr) {\n res={};\n for(var i=0; i<4; i++ ){\n key='player'+((i+1).toString());\n res[key]={points:points(result(arr,i)), choice :pc[i], result :result(arr,i)};\n }\n return res;\n}", "title": "" }, { "docid": "b1bd5ef9519f900bad1e5cea223f1646", "score": "0.53778577", "text": "async function newPlayer() {\n reset();\n\n setResponseData((prev) => ({\n ...prev,\n ppgGuess: null,\n fgpGuess: null,\n yearGuess: null,\n }));\n if (currentPlayer !== 48) {\n setCurrentPlayer((prev) => prev + 1);\n }\n if (currentPlayer === 48) {\n setCurrentPlayer(0);\n }\n //loop back around if we reach the end of the list\n const url = `https://nba-players.herokuapp.com/players/${players[currentPlayer].lastName}/${players[currentPlayer].firstName}`;\n setPlayerName(\n `${players[currentPlayer].firstName} ${players[currentPlayer].lastName}`\n );\n try {\n const response = await axios(url);\n if (\n response.data ===\n \"Sorry, that player was not found. Please check the spelling.\"\n )\n setImgUrl(\n \"https://2wcvjr2o0jc97l6eq1lut4y1-wpengine.netdna-ssl.com/wp-content/uploads/2016/09/no-profile-img.jpg\"\n );\n else {\n setImgUrl(url);\n }\n } catch (err) {\n console.log(err);\n alert(err);\n }\n }", "title": "" }, { "docid": "5e187402efc7829a6720152e5acca5ee", "score": "0.53662866", "text": "function fetchPlayer(id){\n\n fetch(`https://mlb-data.p.rapidapi.com/json/named.player_info.bam?sport_code='mlb'&player_id='${id}'`, {\n \"method\": \"GET\",\n \"headers\": {\n \"x-rapidapi-host\": \"mlb-data.p.rapidapi.com\",\n \"x-rapidapi-key\": \"99277645d6msh6f62f53f4354a9fp1bbe68jsnfe46c1d9dfb5\"\n }\n })\n .then(response => {\n return response.json();\n })\n .then(function(data){\n console.log(\"data\", data)\n\n //INSERT CODE HERE\n if(!data.name_display_first_last){\n return;\n }\n \n const name = data.name_display_first_last;\n const position = data.position;\n \n const html = `<li>${name} - ${position} </li>`;\n \n document.getElementById('results').insertAdjacentHTML('beforebegin', html);\n })\n .catch(err => {\n console.log(err);\n });\n}", "title": "" }, { "docid": "63076ddfdee0e91d9ce211b466e5d5e3", "score": "0.5363329", "text": "function search(query, syncResults, asyncResults)\n{\n // get players matching query (asynchronously)\n var player_json = 'http://lookup-service-prod.mlb.com/json/named.search_player_all.bam?sport_code=%27mlb%27&name_part=%27'\n + encodeURI(query) + '%25%27';\n\n $.getJSON(player_json)\n .done(function(data, textStatus, jqXHR) {\n\n var row = data.search_player_all.queryResults.row;\n var row_length = data.search_player_all.queryResults.totalSize;\n var player_s = [];\n\n try {\n if ( row_length > 1){ /* if there is more than one row would be an array, otherwise it would be a string */\n for (var i = 0; i < row_length; i++){\n if ( row[i].position != 'P') { /* if the player is not a pitcher */\n var one_player = { /* create an object with these three properties */\n name: row[i].name_display_first_last,\n debut: row[i].pro_debut_date.substring(0,10),\n id: row[i].player_id\n };\n player_s.push(one_player); /* push the new object into the array */\n }\n }\n } else if ( row_length == 1) {\n if ( row.position != 'P') {\n one_player = {\n name: row.name_display_first_last,\n debut: row.pro_debut_date.substring(0,10),\n id: row.player_id\n };\n player_s.push(one_player);\n }\n } else { throw \"No such player name, search again please\"}\n }\n catch (err) {\n one_player = {\n name: err\n };\n player_s.push(one_player);\n }\n\n //call typeahead's callback with search results ( player's name and last name & player's debut & id)\n asyncResults(player_s);\n\n })\n\n .fail(function(jqXHR, textStatus, errorThrown) {\n\n // log error to browser's console\n console.log(errorThrown.toString());\n\n // call typeahead's callback with no results\n asyncResults([]);\n });\n}", "title": "" }, { "docid": "1ec57df0f19caffb75b55156ab373a84", "score": "0.5340013", "text": "function userFoundResponse(player){\n if (player.data){\n $scope.user = player.data;\n\n getUserSchedules();\n }\n }", "title": "" }, { "docid": "41012aaf3b45294ed31e01546cc68115", "score": "0.5336982", "text": "_collectEntries() {\n this.players.forEach((user) => {\n this.entries.push(...user.entries.map(text => ({text, font: user.font})))\n })\n }", "title": "" }, { "docid": "cbd3a17e1e9a3942a077beb2e95a1f6d", "score": "0.5331994", "text": "getGameResultsData(fixture) {\n const homeTeamId = fixture.teams.home.team.id;\n const homeTeamScore = fixture.teams.home.score;\n const awayTeamScore = fixture.teams.away.score;\n\n // check if home team is the current team and get result string\n return homeTeamId === this.props.currentTeamId\n ? this.getResultString(homeTeamScore, awayTeamScore)\n : this.getResultString(awayTeamScore, homeTeamScore);\n }", "title": "" }, { "docid": "521e526b4ba0eece9b3abc3cf916f7e9", "score": "0.5325056", "text": "function calculatePlayerLocation() {\n var retVal = {};\n retVal.x = Math.floor(player.x/30);\n retVal.y = Math.floor(player.y/30);\n\n return retVal;\n}", "title": "" }, { "docid": "93039a58051a7af45b61943d54d30daa", "score": "0.53203076", "text": "function newPlayer(name) {\n return {\n name,\n x: Math.round(Math.random() * (mapSize - 1)),\n y: Math.round(Math.random() * (mapSize - 1)),\n };\n}", "title": "" }, { "docid": "88addfd3cca8db0a7280c8af3d290d43", "score": "0.5313726", "text": "function startFetchingData() {\n fetchAllPlayerNamesAndAvatars();\n fetchAllPlayerGameStatistics();\n}", "title": "" }, { "docid": "5433a313fada236062219b0e59bcc54c", "score": "0.53128207", "text": "init(data) {\n this.player = data._Player;\n this.private = data._Private;\n this.map = data._Map;\n console.log(this.player + \"\\n\" + this.private + \"\\n\" + this.map + \"\\n\")\n }", "title": "" }, { "docid": "5a1bc06a5f59653e7ba1e9e6f5e566ff", "score": "0.5307569", "text": "function getPlayerStats() {\n var hp=$(\"#hitpointsBar\").text().split(\"/\");\n return { characterId:window.characterId,\n verifyCode:window.verifyCode,\n name:$(\"a[rel^=#profile]:eq(0)\").text(),\n maxhp:parseInt(hp[1]),\n hp:parseInt(hp[0]),\n health:+((hp[0]/hp[1])*100).toFixed(2),\n gold:parseInt($(\"#mainGoldIndicator\").text().replace(/,/g, \"\"))};\n }", "title": "" }, { "docid": "d375030574b9f7d9264bea6722ba323f", "score": "0.5304818", "text": "function handleResults(result) {\n console.log(result);\n\n if (result.results) {\n moveMap(result.results[0].position);\n }\n\n var marker = new tt.Marker().setLngLat(result.results[0].position).addTo(map);\n} // search for locations based on the query ", "title": "" } ]
e930259a7f41c25ad6b595fe976a04f7
This new method provides Entity Code(Merchant Report)
[ { "docid": "58068a0dc228f94b77bfede1f8617a8e", "score": "0.0", "text": "function setEntityList1(arrResponse,target){\n\tvar encDDL;\n\tvar encOption;\n\tencDDL = document.getElementById(target);\n\tencDDL.length = 0;\n\tencOption = new Option(\"------Select------\",'','',false,false);\n\tencDDL.add(encOption,null);\t\n\tjq.each(arrResponse, function(i, itemData) {\n\t\tencOption = new Option(itemData.entityCode,itemData.entityId,false,false);\n\t\ttry{\n\t\t\tencDDL.add(encOption,null);\n\t\t}catch(e){\n\t\t\tencDDL.add(encOption,-1);\n\t\t} \n\t});\n}", "title": "" } ]
[ { "docid": "385e04e65beb16399602f737e5496b59", "score": "0.59840244", "text": "get companyCode() {\n return this.getStringAttribute('company_code');\n }", "title": "" }, { "docid": "179c7fba66b0eed729ef3f9df48a4c8c", "score": "0.5977829", "text": "Code() {\n return this.code;\n }", "title": "" }, { "docid": "c0c85cb2b7b992aa5f471dcfd3317c8f", "score": "0.5814918", "text": "function getSmartCodesyId(){\n\n }", "title": "" }, { "docid": "8b6b1911b16f97e94bd508c053b5ff86", "score": "0.57834864", "text": "getCode() {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "148e987e06fe9bd6c3e5b90ba6dfa99b", "score": "0.5690823", "text": "getCode() {\r\n return this.compilerObject.code;\r\n }", "title": "" }, { "docid": "ad913579a05ec3386b13331689fdca20", "score": "0.56575054", "text": "static async getEntity(data) {\n let result = await Blockchain.get({\n config: DappLib.getConfig(),\n contract: DappLib.DAPP_STATE_CONTRACT,\n params: {\n from: null\n }\n },\n 'getEntity',\n DappLib.fromAscii(data.id, 32)\n ); \n\n if (result.callData) {\n result.callData.title = DappLib.toAscii(result.callData.title);\n result.callData.count = (new BN(result.callData.count)).toString(10);\n }\n return {\n type: DappLib.DAPP_RESULT_OBJECT,\n label: 'Get Entity',\n result: result.callData\n }\n }", "title": "" }, { "docid": "ce0fde11ed4fcad5ff2c30af31365d24", "score": "0.5568052", "text": "Type() {\n return ActionCode.CodeSettlement;\n }", "title": "" }, { "docid": "bc36381832390c728063b5d438f937b7", "score": "0.55221426", "text": "get code() {\n return this.result.code;\n }", "title": "" }, { "docid": "ef17243323a142d407bf047ed22af259", "score": "0.548893", "text": "get productCode$() {\n return this.currentProductService.getProduct().pipe(filter(Boolean), map((product) => product.code), tap((_) => this.productReferenceService.cleanReferences()));\n }", "title": "" }, { "docid": "24febc34f04098e5694a3343c8f746cf", "score": "0.535585", "text": "get code() {\n return this._code;\n }", "title": "" }, { "docid": "451e1affe9ae77a80d05ffaec3f1a804", "score": "0.5330988", "text": "static get indentity () {\n return genId()\n }", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.5327371", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.5327371", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.5327371", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.5327371", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "8a54a03d31de597f1eec156350f95b07", "score": "0.5327371", "text": "get code () {\n\t\treturn this._code;\n\t}", "title": "" }, { "docid": "76b518e81ad202809e8035d8366cbf9e", "score": "0.530757", "text": "getBase() {\n return 'ETH';\n }", "title": "" }, { "docid": "c7287fab880d528b98bce4972908aec7", "score": "0.5268412", "text": "function getRowCodeCommune(row) {\n if (row.parsedValues.commune_insee) {\n return row.parsedValues.commune_insee\n }\n\n if (row.additionalValues.cle_interop) {\n return row.additionalValues.cle_interop.codeCommune\n }\n}", "title": "" }, { "docid": "100e375829ef1304a5d716b7fc258d3d", "score": "0.5222215", "text": "function update_entityuse_codes() {\n //create an object with all unique customers \n nlapiLogExecution('AUDIT', ' -,-,- update entity/use codes -,-,- ');\n var array_of_customers = [];\n // var filters = [];\n // var columns = [\n // new nlobjSearchColumn('internalid')\n // ];\n // //run SuiteScript function to grab all customer ids and put them into an array\n // var customerSearch = nlapiCreateSearch('customer', filters, columns);\n // var result_set = customerSearch.runSearch();\n array_of_customers = nlapiSearchRecord(\"customer\", null,\n [\n [\"internalidnumber\", \"equalto\", \"894942\"],\n \"OR\",\n [\"internalidnumber\", \"equalto\", \"895145\"],\n \"OR\",\n [\"internalidnumber\", \"equalto\", \"895144\"]\n ],\n [\n new nlobjSearchColumn(\"entityid\").setSort(false)\n ]\n );\n // array_of_customers = getAllResults(result_set);\n checkGovernance(max_governance, 'Create Array of Customers', 0, array_of_customers.length);\n //run SuiteScript function to loop through customer ids, check if stage is equal to lead, prospect, then setting new entity fields\n for (var i = 0; i < array_of_customers.length; i++) {\n checkGovernance(max_governance, 'Set Entity/Use Code for Customer', i, array_of_customers.length);\n set_entityuse_code(array_of_customers[i].id, i, array_of_customers.length);\n }\n}", "title": "" }, { "docid": "2fa37bc8dbdd94b0e80c130e44d810e0", "score": "0.521721", "text": "function industryCodeChange() {\n try {\n var code = Xrm.Page.getAttribute(\"industrycode\").getValue();\n alert(code);\n }\n catch (_a) {\n }\n }", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "f472d2a0cc9d448fe3f4956102e0e125", "score": "0.52148306", "text": "get code() {\n\t\treturn this.__code;\n\t}", "title": "" }, { "docid": "a8c99ecdae88c816e2fd6dbb02355317", "score": "0.52121526", "text": "function GetCode() {\n $http({\n url: '/Accounts/FixedAsset/GetCode',\n method: 'GET',\n headers: { 'Content-Type': 'application/json' }\n }).success(function (data) {\n $scope.RefNo = data;\n });\n }//end of GetCode", "title": "" }, { "docid": "e1612f6813981966e111147d1b9d10ed", "score": "0.5175092", "text": "function getTrackingCode() {\n var res = \"\";\n var cid = s.getQueryParam(\"cid\");\n\n if (cid.length > 0) {\n res = cid;\n }\n\n return res;\n}", "title": "" }, { "docid": "0ba5bafeb3db453ef9068388a70d0c91", "score": "0.5145713", "text": "function retrieveDiagramCode() {\n\t\tvar getAllReq = otherThis.getAllDiagrams();\n\t\tgetAllReq.success(function(allDiagramsData) {\n\t\t\tvar diagram_id;\n\t\t\tvar code;\n\t\t\tfor (var i = 0; i < allDiagramsData.length; i++) {\n\n\t\t\t\tdiagram_id = allDiagramsData[i]._id;\n\t\t\t\tcode = allDiagramsData[i].code;\n\t\t\t\tconsole.log(code);\n\t\t\t\t// diagramCode += code;\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "d5c045e02e0864c30e4c2da8e6b75d3b", "score": "0.514352", "text": "getEntity () {\n\t\treturn this.entity;\n\t}", "title": "" }, { "docid": "39b31539dcdb338b9b0235d54bed40af", "score": "0.5125279", "text": "static getCode() {\n if (NewPerson.count === undefined) {\n NewPerson.count = 10000;\n } else {\n NewPerson.count++;\n }\n\n return NewPerson.count;\n }", "title": "" }, { "docid": "837494d6452afc312294668e773dc791", "score": "0.5124961", "text": "getRegionCode(){\n\t\treturn this.dataArray[3];\n\t}", "title": "" }, { "docid": "d6439298bd0615e8705e04a0316b134a", "score": "0.51220167", "text": "Type() {\n return ActionCode.CodeContractAmendment;\n }", "title": "" }, { "docid": "d1f8f4ff18e6c78844709ac07b6a8c91", "score": "0.50793606", "text": "Type() {\n return ActionCode.CodeContractOffer;\n }", "title": "" }, { "docid": "e82069bbe87c36bf8dff818808e8ac6c", "score": "0.5070494", "text": "Type() {\n return ActionCode.CodeEstablishment;\n }", "title": "" }, { "docid": "e3b91f3651c118a13854081f2619770b", "score": "0.5065594", "text": "generatePkceCodes() {\n return this.pkceGenerator.generatePkceCodes();\n }", "title": "" }, { "docid": "862ba0831fd72ace7123114a9f64960f", "score": "0.5026898", "text": "function getUrlCode() {\n\n const param = 'code';\n\n return getUrlParameter( param );\n\n }", "title": "" }, { "docid": "773e1249a6aecbd981ef3342a6c89820", "score": "0.501275", "text": "getCPCode() {\n var xCacheKey = this.getXCacheKey();\n if (xCacheKey != undefined)\n return xCacheKey.split('/')[3];\n return '';\n }", "title": "" }, { "docid": "8aea45624b7159530aff3b2e0d6486bc", "score": "0.49992037", "text": "toString () {\n return this.id()\n }", "title": "" }, { "docid": "050f70c2b698064f0fd8e7489a305092", "score": "0.4993628", "text": "get entity() {\n throw new Error('Method not implemented');\n }", "title": "" }, { "docid": "0662ad6bcb22477dee2acb40ac2203c1", "score": "0.49680367", "text": "async getIdentifier(tx) {\n // We consult the REST API because we don't have a local amino encoder\n const response = await this.lcdClient.encodeTx(tx);\n const hash = crypto_1.sha256(encoding_1.fromBase64(response.tx));\n return encoding_1.toHex(hash).toUpperCase();\n }", "title": "" }, { "docid": "a28211c3854ccfa8a4060185bc8aa407", "score": "0.49533212", "text": "getId() {\n return `${this.platform}_${this.type}_${this.brand}`;\n }", "title": "" }, { "docid": "6eb2c0eac3b61afc01296113ef5ed173", "score": "0.49509308", "text": "getEntity() {\n return this.entity;\n }", "title": "" }, { "docid": "e1ef2fe268889962fa659676e2c1c45d", "score": "0.48897895", "text": "eth_getCode(address, blockNumber) {\n return this.request(\"eth_getCode\", Array.from(arguments));\n }", "title": "" }, { "docid": "8dbbbe2828621d69a1ae38cea131803e", "score": "0.48842755", "text": "format() {\n return `${this.client} owes ${this.amount}$ for ${this.details}`;\n }", "title": "" }, { "docid": "1d7fba88ed11082dac42962369fac695", "score": "0.48770493", "text": "getEntityInfo(entityId, callback) {\n this.sendRequest({\n entityId: entityId,\n getEntityInfo: {\n\n },\n }, callback);\n }", "title": "" }, { "docid": "efda27f55bfaa7cff05d04df69662a5c", "score": "0.48745334", "text": "function entityEncode(strArg) {\n\tvar arrEntity = new Array();\n\t\n\tarrEntity[\"nbsp\"] = \"&#160;\";\n\tarrEntity[\"iexcl\"] = \"&#161;\";\n\tarrEntity[\"cent\"] = \"&#162;\";\n\tarrEntity[\"pound\"] = \"&#163;\";\n\tarrEntity[\"curren\"] = \"&#164;\";\n\tarrEntity[\"yen\"] = \"&#165;\";\n\tarrEntity[\"brvbar\"] = \"&#166;\";\n\tarrEntity[\"sect\"] = \"&#167;\";\n\tarrEntity[\"uml\"] = \"&#168;\";\n\tarrEntity[\"copy\"] = \"&#169;\";\n\tarrEntity[\"ordf\"] = \"&#170;\";\n\tarrEntity[\"laquo\"] = \"&#171;\";\n\tarrEntity[\"not\"] = \"&#172;\";\n\tarrEntity[\"shy\"] = \"&#173;\";\n\tarrEntity[\"reg\"] = \"&#174;\";\n\tarrEntity[\"macr\"] = \"&#175;\";\n\tarrEntity[\"deg\"] = \"&#176;\";\n\tarrEntity[\"plusmn\"] = \"&#177;\";\n\tarrEntity[\"sup2\"] = \"&#178;\";\n\tarrEntity[\"sup3\"] = \"&#179;\";\n\tarrEntity[\"acute\"] = \"&#180;\";\n\tarrEntity[\"micro\"] = \"&#181;\";\n\tarrEntity[\"para\"] = \"&#182;\";\n\tarrEntity[\"middot\"] = \"&#183;\";\n\tarrEntity[\"cedil\"] = \"&#184;\";\n\tarrEntity[\"sup1\"] = \"&#185;\";\n\tarrEntity[\"ordm\"] = \"&#186;\";\n\tarrEntity[\"raquo\"] = \"&#187;\";\n\tarrEntity[\"frac14\"] = \"&#188;\";\n\tarrEntity[\"frac12\"] = \"&#189;\";\n\tarrEntity[\"frac34\"] = \"&#190;\";\n\tarrEntity[\"iquest\"] = \"&#191;\";\n\tarrEntity[\"Agrave\"] = \"&#192;\";\n\tarrEntity[\"Aacute\"] = \"&#193;\";\n\tarrEntity[\"Acirc\"] = \"&#194;\";\n\tarrEntity[\"Atilde\"] = \"&#195;\";\n\tarrEntity[\"Auml\"] = \"&#196;\";\n\tarrEntity[\"Aring\"] = \"&#197;\";\n\tarrEntity[\"AElig\"] = \"&#198;\";\n\tarrEntity[\"Ccedil\"] = \"&#199;\";\n\tarrEntity[\"Egrave\"] = \"&#200;\";\n\tarrEntity[\"Eacute\"] = \"&#201;\";\n\tarrEntity[\"Ecirc\"] = \"&#202;\";\n\tarrEntity[\"Euml\"] = \"&#203;\";\n\tarrEntity[\"Igrave\"] = \"&#204;\";\n\tarrEntity[\"Iacute\"] = \"&#205;\";\n\tarrEntity[\"Icirc\"] = \"&#206;\";\n\tarrEntity[\"Iuml\"] = \"&#207;\";\n\tarrEntity[\"ETH\"] = \"&#208;\";\n\tarrEntity[\"Ntilde\"] = \"&#209;\";\n\tarrEntity[\"Ograve\"] = \"&#210;\";\n\tarrEntity[\"Oacute\"] = \"&#211;\";\n\tarrEntity[\"Ocirc\"] = \"&#212;\";\n\tarrEntity[\"Otilde\"] = \"&#213;\";\n\tarrEntity[\"Ouml\"] = \"&#214;\";\n\tarrEntity[\"times\"] = \"&#215;\";\n\tarrEntity[\"Oslash\"] = \"&#216;\";\n\tarrEntity[\"Ugrave\"] = \"&#217;\";\n\tarrEntity[\"Uacute\"] = \"&#218;\";\n\tarrEntity[\"Ucirc\"] = \"&#219;\";\n\tarrEntity[\"Uuml\"] = \"&#220;\";\n\tarrEntity[\"Yacute\"] = \"&#221;\";\n\tarrEntity[\"THORN\"] = \"&#222;\";\n\tarrEntity[\"szlig\"] = \"&#223;\";\n\tarrEntity[\"agrave\"] = \"&#224;\";\n\tarrEntity[\"aacute\"] = \"&#225;\";\n\tarrEntity[\"acirc\"] = \"&#226;\";\n\tarrEntity[\"atilde\"] = \"&#227;\";\n\tarrEntity[\"auml\"] = \"&#228;\";\n\tarrEntity[\"aring\"] = \"&#229;\";\n\tarrEntity[\"aelig\"] = \"&#230;\";\n\tarrEntity[\"ccedil\"] = \"&#231;\";\n\tarrEntity[\"egrave\"] = \"&#232;\";\n\tarrEntity[\"eacute\"] = \"&#233;\";\n\tarrEntity[\"ecirc\"] = \"&#234;\";\n\tarrEntity[\"euml\"] = \"&#235;\";\n\tarrEntity[\"igrave\"] = \"&#236;\";\n\tarrEntity[\"iacute\"] = \"&#237;\";\n\tarrEntity[\"icirc\"] = \"&#238;\";\n\tarrEntity[\"iuml\"] = \"&#239;\";\n\tarrEntity[\"eth\"] = \"&#240;\";\n\tarrEntity[\"ntilde\"] = \"&#241;\";\n\tarrEntity[\"ograve\"] = \"&#242;\";\n\tarrEntity[\"oacute\"] = \"&#243;\";\n\tarrEntity[\"ocirc\"] = \"&#244;\";\n\tarrEntity[\"otilde\"] = \"&#245;\";\n\tarrEntity[\"ouml\"] = \"&#246;\";\n\tarrEntity[\"divide\"] = \"&#247;\";\n\tarrEntity[\"oslash\"] = \"&#248;\";\n\tarrEntity[\"ugrave\"] = \"&#249;\";\n\tarrEntity[\"uacute\"] = \"&#250;\";\n\tarrEntity[\"ucirc\"] = \"&#251;\";\n\tarrEntity[\"uuml\"] = \"&#252;\";\n\tarrEntity[\"yacute\"] = \"&#253;\";\n\tarrEntity[\"thorn\"] = \"&#254;\";\n\tarrEntity[\"yuml\"] = \"&#255;\";\n\tarrEntity[\"fnof\"] = \"&#402;\";\n\tarrEntity[\"Alpha\"] = \"&#913;\";\n\tarrEntity[\"Beta\"] = \"&#914;\";\n\tarrEntity[\"Gamma\"] = \"&#915;\";\n\tarrEntity[\"Delta\"] = \"&#916;\";\n\tarrEntity[\"Epsilon\"] = \"&#917;\";\n\tarrEntity[\"Zeta\"] = \"&#918;\";\n\tarrEntity[\"Eta\"] = \"&#919;\";\n\tarrEntity[\"Theta\"] = \"&#920;\";\n\tarrEntity[\"Iota\"] = \"&#921;\";\n\tarrEntity[\"Kappa\"] = \"&#922;\";\n\tarrEntity[\"Lambda\"] = \"&#923;\";\n\tarrEntity[\"Mu\"] = \"&#924;\";\n\tarrEntity[\"Nu\"] = \"&#925;\";\n\tarrEntity[\"Xi\"] = \"&#926;\";\n\tarrEntity[\"Omicron\"] = \"&#927;\";\n\tarrEntity[\"Pi\"] = \"&#928;\";\n\tarrEntity[\"Rho\"] = \"&#929;\";\n\tarrEntity[\"Sigma\"] = \"&#931;\";\n\tarrEntity[\"Tau\"] = \"&#932;\";\n\tarrEntity[\"Upsilon\"] = \"&#933;\";\n\tarrEntity[\"Phi\"] = \"&#934;\";\n\tarrEntity[\"Chi\"] = \"&#935;\";\n\tarrEntity[\"Psi\"] = \"&#936;\";\n\tarrEntity[\"Omega\"] = \"&#937;\";\n\tarrEntity[\"alpha\"] = \"&#945;\";\n\tarrEntity[\"beta\"] = \"&#946;\";\n\tarrEntity[\"gamma\"] = \"&#947;\";\n\tarrEntity[\"delta\"] = \"&#948;\";\n\tarrEntity[\"epsilon\"] = \"&#949;\";\n\tarrEntity[\"zeta\"] = \"&#950;\";\n\tarrEntity[\"eta\"] = \"&#951;\";\n\tarrEntity[\"theta\"] = \"&#952;\";\n\tarrEntity[\"iota\"] = \"&#953;\";\n\tarrEntity[\"kappa\"] = \"&#954;\";\n\tarrEntity[\"lambda\"] = \"&#955;\";\n\tarrEntity[\"mu\"] = \"&#956;\";\n\tarrEntity[\"nu\"] = \"&#957;\";\n\tarrEntity[\"xi\"] = \"&#958;\";\n\tarrEntity[\"omicron\"] = \"&#959;\";\n\tarrEntity[\"pi\"] = \"&#960;\";\n\tarrEntity[\"rho\"] = \"&#961;\";\n\tarrEntity[\"sigmaf\"] = \"&#962;\";\n\tarrEntity[\"sigma\"] = \"&#963;\";\n\tarrEntity[\"tau\"] = \"&#964;\";\n\tarrEntity[\"upsilon\"] = \"&#965;\";\n\tarrEntity[\"phi\"] = \"&#966;\";\n\tarrEntity[\"chi\"] = \"&#967;\";\n\tarrEntity[\"psi\"] = \"&#968;\";\n\tarrEntity[\"omega\"] = \"&#969;\";\n\tarrEntity[\"thetasym\"] = \"&#977;\";\n\tarrEntity[\"upsih\"] = \"&#978;\";\n\tarrEntity[\"piv\"] = \"&#982;\";\n\tarrEntity[\"bull\"] = \"&#8226;\";\n\tarrEntity[\"hellip\"] = \"&#8230;\";\n\tarrEntity[\"prime\"] = \"&#8242;\";\n\tarrEntity[\"Prime\"] = \"&#8243;\";\n\tarrEntity[\"oline\"] = \"&#8254;\";\n\tarrEntity[\"frasl\"] = \"&#8260;\";\n\tarrEntity[\"weierp\"] = \"&#8472;\";\n\tarrEntity[\"image\"] = \"&#8465;\";\n\tarrEntity[\"real\"] = \"&#8476;\";\n\tarrEntity[\"trade\"] = \"&#8482;\";\n\tarrEntity[\"alefsym\"] = \"&#8501;\";\n\tarrEntity[\"larr\"] = \"&#8592;\";\n\tarrEntity[\"uarr\"] = \"&#8593;\";\n\tarrEntity[\"rarr\"] = \"&#8594;\";\n\tarrEntity[\"darr\"] = \"&#8595;\";\n\tarrEntity[\"harr\"] = \"&#8596;\";\n\tarrEntity[\"crarr\"] = \"&#8629;\";\n\tarrEntity[\"lArr\"] = \"&#8656;\";\n\tarrEntity[\"uArr\"] = \"&#8657;\";\n\tarrEntity[\"rArr\"] = \"&#8658;\";\n\tarrEntity[\"dArr\"] = \"&#8659;\";\n\tarrEntity[\"hArr\"] = \"&#8660;\";\n\tarrEntity[\"forall\"] = \"&#8704;\";\n\tarrEntity[\"part\"] = \"&#8706;\";\n\tarrEntity[\"exist\"] = \"&#8707;\";\n\tarrEntity[\"empty\"] = \"&#8709;\";\n\tarrEntity[\"nabla\"] = \"&#8711;\";\n\tarrEntity[\"isin\"] = \"&#8712;\";\n\tarrEntity[\"notin\"] = \"&#8713;\";\n\tarrEntity[\"ni\"] = \"&#8715;\";\n\tarrEntity[\"prod\"] = \"&#8719;\";\n\tarrEntity[\"sum\"] = \"&#8721;\";\n\tarrEntity[\"minus\"] = \"&#8722;\";\n\tarrEntity[\"lowast\"] = \"&#8727;\";\n\tarrEntity[\"radic\"] = \"&#8730;\";\n\tarrEntity[\"prop\"] = \"&#8733;\";\n\tarrEntity[\"infin\"] = \"&#8734;\";\n\tarrEntity[\"ang\"] = \"&#8736;\";\n\tarrEntity[\"and\"] = \"&#8743;\";\n\tarrEntity[\"or\"] = \"&#8744;\";\n\tarrEntity[\"cap\"] = \"&#8745;\";\n\tarrEntity[\"cup\"] = \"&#8746;\";\n\tarrEntity[\"int\"] = \"&#8747;\";\n\tarrEntity[\"there4\"] = \"&#8756;\";\n\tarrEntity[\"sim\"] = \"&#8764;\";\n\tarrEntity[\"cong\"] = \"&#8773;\";\n\tarrEntity[\"asymp\"] = \"&#8776;\";\n\tarrEntity[\"ne\"] = \"&#8800;\";\n\tarrEntity[\"equiv\"] = \"&#8801;\";\n\tarrEntity[\"le\"] = \"&#8804;\";\n\tarrEntity[\"ge\"] = \"&#8805;\";\n\tarrEntity[\"sub\"] = \"&#8834;\";\n\tarrEntity[\"sup\"] = \"&#8835;\";\n\tarrEntity[\"nsub\"] = \"&#8836;\";\n\tarrEntity[\"sube\"] = \"&#8838;\";\n\tarrEntity[\"supe\"] = \"&#8839;\";\n\tarrEntity[\"oplus\"] = \"&#8853;\";\n\tarrEntity[\"otimes\"] = \"&#8855;\";\n\tarrEntity[\"perp\"] = \"&#8869;\";\n\tarrEntity[\"sdot\"] = \"&#8901;\";\n\tarrEntity[\"lceil\"] = \"&#8968;\";\n\tarrEntity[\"rceil\"] = \"&#8969;\";\n\tarrEntity[\"lfloor\"] = \"&#8970;\";\n\tarrEntity[\"rfloor\"] = \"&#8971;\";\n\tarrEntity[\"lang\"] = \"&#9001;\";\n\tarrEntity[\"rang\"] = \"&#9002;\";\n\tarrEntity[\"loz\"] = \"&#9674;\";\n\tarrEntity[\"spades\"] = \"&#9824;\";\n\tarrEntity[\"clubs\"] = \"&#9827;\";\n\tarrEntity[\"hearts\"] = \"&#9829;\";\n\tarrEntity[\"diams\"] = \"&#9830;\";\n\tarrEntity[\"quot\"] = \"&#34;\";\n\tarrEntity[\"amp\"] = \"&#38;\";\n\tarrEntity[\"lt\"] = \"&#60;\";\n\tarrEntity[\"gt\"] = \"&#62;\";\n\tarrEntity[\"OElig\"] = \"&#338;\";\n\tarrEntity[\"oelig\"] = \"&#339;\";\n\tarrEntity[\"Scaron\"] = \"&#352;\";\n\tarrEntity[\"scaron\"] = \"&#353;\";\n\tarrEntity[\"Yuml\"] = \"&#376;\";\n\tarrEntity[\"circ\"] = \"&#710;\";\n\tarrEntity[\"tilde\"] = \"&#732;\";\n\tarrEntity[\"ensp\"] = \"&#8194;\";\n\tarrEntity[\"emsp\"] = \"&#8195;\";\n\tarrEntity[\"thinsp\"] = \"&#8201;\";\n\tarrEntity[\"zwnj\"] = \"&#8204;\";\n\tarrEntity[\"zwj\"] = \"&#8205;\";\n\tarrEntity[\"lrm\"] = \"&#8206;\";\n\tarrEntity[\"rlm\"] = \"&#8207;\";\n\tarrEntity[\"ndash\"] = \"&#8211;\";\n\tarrEntity[\"mdash\"] = \"&#8212;\";\n\tarrEntity[\"lsquo\"] = \"&#8216;\";\n\tarrEntity[\"rsquo\"] = \"&#8217;\";\n\tarrEntity[\"sbquo\"] = \"&#8218;\";\n\tarrEntity[\"ldquo\"] = \"&#8220;\";\n\tarrEntity[\"rdquo\"] = \"&#8221;\";\n\tarrEntity[\"bdquo\"] = \"&#8222;\";\n\tarrEntity[\"dagger\"] = \"&#8224;\";\n\tarrEntity[\"Dagger\"] = \"&#8225;\";\n\tarrEntity[\"permil\"] = \"&#8240;\";\n\tarrEntity[\"lsaquo\"] = \"&#8249;\";\n\tarrEntity[\"rsaquo\"] = \"&#8250;\";\n\tarrEntity[\"euro\"] = \"&#8364;\";\n\n\tvar slices, sl, re, out, slEnt, slResto, chrCode, chrUni;\n\t\n\tif(strArg){\n\t\tslices=strArg.split(\"&\");\n\t\tout=slices.shift();\n\t\tre = /^[a-z][a-z0-9]+;/i;\n\t\tfor (s in slices){\n\t\t\tsl=slices[s];\n\t\t\tif (re.test(sl)) {\n\t\t\t\tslEnt=sl.substring(0, sl.indexOf(\";\"));\n\t\t\t\tslResto=sl.substring(1+sl.indexOf(\";\"));\n\t\t\t\tif (arrEntity[slEnt]) {\n\t\t\t\t\tout+=arrEntity[slEnt]+slResto;\n\t\t\t\t} else {\n\t\t\t\t\tout+=\"&\"+slEnt+\";\"+slResto;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout+=\"&\"+sl;\n\t\t\t}\n\t\t}\n\t\tslices=out.split(\"&\");\n\t\tout=slices.shift();\n\t\tre = /^#[0-9]+;/i;\n\t\tfor (s in slices) {\n\t\t\tsl=slices[s];\n\t\t\tif (re.test(sl)) {\n\t\t\t\tchrCode=sl.substring(1, sl.indexOf(\";\"));\n\t\t\t\tslResto=sl.substring(1 + sl.indexOf(\";\"));\n\t\t\t\tif (chrCode > 255) {\n\t\t\t\t\tchrUni = eval(\"\\\"\\\\u\" + hexEncode(4, chrCode) + \"\\\"\")\n\t\t\t\t} else {\n\t\t\t\t\tchrUni = eval(\"\\\"\\\\x\" + hexEncode(2, chrCode) + \"\\\"\")\n\t\t\t\t}\n\t\t\t\tout+=chrUni+slResto;\n\t\t\t} else {\n\t\t\t\tout+=\"&\"+sl;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n}", "title": "" }, { "docid": "8d309d356beba3ebc96030b73748327e", "score": "0.48611367", "text": "Type() {\n return ActionCode.CodeReconciliation;\n }", "title": "" }, { "docid": "c55c104d907fa0e80a013db2300c3120", "score": "0.4852855", "text": "@api get assetId(){\n return this.recordId;\n }", "title": "" }, { "docid": "0214c622dbac436b7c08a1b16ad79686", "score": "0.48398072", "text": "info() {\n\n return `${codeNames[this.value.toString()]} de ${suitNames[this.suit]}`;\n }", "title": "" }, { "docid": "c332273ff27c17bec4537897c1a59283", "score": "0.4830557", "text": "function productCodeGeneration(productDetails, itemId) {\n var shortProductCode = \"\";\n var longProductCode = \"\";\n var productRunning = productDetails.custitem_zoku_runningnumber;\n var productType = productDetails[\"custitem_zoku_prodcodetype\"][0][\"value\"]; //Either 1 = 'Retail' or 2 = 'Sample'\n console.log(\"productType\", productType);\n\n shortProductCode += productDetails.itemid;\n longProductCode += productDetails.itemid;\n longProductCode +=\n \"-\" + randomTextGeneration() + \"-\" + randomTextGeneration();\n\n //Check if there's a running number existing on the item\n if (productRunning === \"\") {\n shortProductCode += \"-\" + formatRunningSuffix(0, productType);\n longProductCode += \"-\" + formatRunningSuffix(0, productType);\n productRunning = 1;\n } else {\n productRunning++;\n shortProductCode +=\n \"-\" + formatRunningSuffix(productRunning, productType);\n longProductCode += \"-\" + formatRunningSuffix(productRunning, productType);\n }\n\n //Save the item record with the new running value\n record.submitFields({\n type: record.Type.SERIALIZED_INVENTORY_ITEM,\n id: itemId,\n values: {\n custitem_zoku_runningnumber: productRunning,\n },\n options: {\n ignoreMandatoryFields: true,\n },\n });\n\n //Return the short product code\n return [shortProductCode, longProductCode];\n }", "title": "" }, { "docid": "b0364bc390e4bdb1b834c919f67fb9f3", "score": "0.48260573", "text": "getBankName(code) {\n switch(code) {\n case 0: return 'Acoustic';\n case 1: return 'Jihong';\n case 2: return '8-Bit';\n default: return 'Unknown Bank'\n }\n }", "title": "" }, { "docid": "9ac891aac4077e452ee6f0b393a10c04", "score": "0.4825191", "text": "async getInviteCode() {\n let res = await this.client.pupPage.evaluate(chatId => {\n return window.Store.Wap.groupInviteCode(chatId);\n }, this.id._serialized);\n\n if (res.status == 200) {\n return res.code;\n } \n\n throw new Error('Not authorized');\n }", "title": "" }, { "docid": "307341319f390ddcfa14c1ab7f4a43a5", "score": "0.4824243", "text": "fetch() {\n this.getCode();\n }", "title": "" }, { "docid": "04272118308ec53dd736938d725be25d", "score": "0.48090982", "text": "toString() {\n return this.code + ': \"' + this.message + '\"';\n }", "title": "" }, { "docid": "6782d9226929c7d823563ca7c102a2b2", "score": "0.48034194", "text": "get serviceInvoice() {\r\n\t\t\treturn {\r\n\t\t\t\tnumber: this.invoice.number,\r\n\t\t\t\tstatus: this.invoice.status,\r\n\t\t\t\tamount: parseInt(this.invoice.amount),\r\n\t\t\t\tpaymentMethod: this.invoice.paymentMethod\r\n\t\t\t};\r\n\t\t}", "title": "" }, { "docid": "d02634e6b3c6acf5678a1f869681ce74", "score": "0.47971877", "text": "toString () {\r\n return this.id()\r\n }", "title": "" }, { "docid": "40e484aa70bbc32e5d3d0daca4e2fd44", "score": "0.47871774", "text": "function decodeEntity(m, e) {\n\t\t\tif (e.match(/^[a-z]+$/i) && entities[e])\n\t\t\t\treturn String.fromCharCode(entities[e]);\n\t\t\tif (e.match(/^#x[0-9a-f]+$/i))\n\t\t\t\treturn String.fromCharCode(parseInt(e.substring(2),16));\n\t\t\tif (e.match(/^#[0-9]+$/i))\n\t\t\t\treturn String.fromCharCode(parseInt(e.substring(1),10));\n\t\t\treturn m;\n\t\t}", "title": "" }, { "docid": "62f6cd14bd4f486f7f4a89f54c472ba2", "score": "0.47820488", "text": "getEntityTypeId() {\n return this._registry.get('properties', 'entityTypeId')\n }", "title": "" }, { "docid": "54a87f42c0e5eaa766cf276da48bd506", "score": "0.47785088", "text": "get enterpriseId() {\n return this._model.enterprise_id;\n }", "title": "" }, { "docid": "eae693d8d88061861444b1176b29f000", "score": "0.4769019", "text": "getTownCode() {\n return this.townCode;\n }", "title": "" }, { "docid": "40a955df89440fa369790491250805ed", "score": "0.47610456", "text": "get bankName() {\n const bankObj = this.isValidBank ? this.getBankObj() : null;\n return bankObj ? bankObj.Bank_Name : 'No bank found';\n }", "title": "" }, { "docid": "4d5b5f426ce1523a787f182f0c10b92d", "score": "0.4757331", "text": "_getBarcode(use = 'usual') {\n try {\n const barcode = this.identifier.find(\n v =>\n v.system === 'http://livercenter.mn/fhir/identifiers/patient' &&\n v.use === use\n ).value\n return barcode\n } catch {}\n return\n }", "title": "" }, { "docid": "4f615ecbc1760231feee3bc51a2a5b48", "score": "0.47567803", "text": "display_account_information(){\n\n return 'FirstName: '+ this.firstName+'\\nLastName: '+\n this.lastName +'\\nAccount type: ' +this.accountType; +'\\nAccount number: ' +\n super.generate_account_number();\n\n }", "title": "" }, { "docid": "372730e1d8044ae3479babb60ede2030", "score": "0.47527143", "text": "Type() {\n return ActionCode.CodeContractFormation;\n }", "title": "" }, { "docid": "cb989783d29868a3595352d3511d79b4", "score": "0.474744", "text": "function retriveDataFromAnotherEntity(executionContext) {\n var formContext = executionContext.getFormContext();\n var companyDetails = \"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>\" +\n \" <entity name='new_companies'>\" +\n \" <attribute name='new_companiesid' />\" +\n \" <attribute name='new_name' />\" +\n \" <attribute name='createdon' />\" +\n \" <attribute name='new_managerid' />\" +\n \" <attribute name='new_companymobileno' />\" +\n \" <attribute name='new_companyemailid' />\" +\n \" <attribute name='new_companycity' />\" +\n \" <attribute name='new_companyname' />\" +\n \" <attribute name='new_companyid' />\" +\n \" <order attribute='new_name' descending='false' />\" +\n \" <filter type='and'>\" +\n \" <condition attribute='new_companiesid' operator='eq' uiname='Tcs' uitype='new_companies' value='{700D35A2-E8B0-EB11-8236-6045BD727DE9}' />\" +\n \" </filter>\" +\n \" </entity>\" +\n \"</fetch>\"\n var fetchresult = XrmServiceToolkit.Soap.Fetch(companyDetails);\n var fetchresultCount = fetchresult.length;\n\n if (fetchresultCount > 0) {\n var companyEmailId = fetchresult[0].attributes['new_companyemailid'].value;\n var companyMobileno = fetchresult[0].attributes['new_companymobileno'].value;\n var companyCity = fetchresult[0].attributes['new_companycity'].value;\n /* var manager = fetchresult[0].attributes['new_managerid'].value;\n alert(companyEmailId);\n alert(companyMobileno);\n alert(companyCity);\n alert(manager);\n */\n formContext.getAttribute(\"new_empmobileno\").setValue(companyMobileno);\n formContext.getAttribute(\"new_empcompanycity\").setValue(companyCity);\n formContext.getAttribute(\"new_empcompany_emailid\").setValue(companyEmailId);\n\n }\n}", "title": "" }, { "docid": "cb48506b46b3e4c72fb86551e1a8a066", "score": "0.4743881", "text": "getBaseEventId() {\n const mxEvent = this.props.mxEvent.replacingEvent() || this.props.mxEvent; // show the replacing event, not the original, if it is an edit\n const isEncrypted = mxEvent.isEncrypted();\n const baseMxEvent = this.props.mxEvent;\n\n if (isEncrypted) {\n // `relates_to` field is inside the encrypted event\n return mxEvent.event.content[\"m.relates_to\"]?.event_id ?? baseMxEvent.getId();\n } else {\n return mxEvent.getContent()[\"m.relates_to\"]?.event_id ?? baseMxEvent.getId();\n }\n }", "title": "" }, { "docid": "b282c2978f02aefdfd3f80cd2d9d9409", "score": "0.47428256", "text": "function CrmcampEntity(response) {\n var data = $(response).find('b\\\\:entity').find('b\\\\:attributes').each(function (k, i) { $(i).find('b\\\\:Keyvaluepairofstringanytype') });\n pagecount = pagecount + 1;\n datatopush = {\n \"PagingCookie\": $(response).find('b\\\\:Keyvaluepairofstringanytype').find('b\\\\:pagingcookie')[0].innerText,\n \"totalrecordcountlimitexceeded\": $(response).find('b\\\\:Keyvaluepairofstringanytype').find('b\\\\:totalrecordcountlimitexceeded')[0].outerText,\n \"morerecords\": $(response).find('b\\\\:Keyvaluepairofstringanytype').find('b\\\\:morerecords')[0].outerText,\n \"totalrecord\": $(response).find('b\\\\:Keyvaluepairofstringanytype').find('b\\\\:TotalRecordCount')[0].innerText,\n };\n for (var i = 0; i < data.length; i++) {\n var newobj = {\n \"ownerid\": \"\", \"modifiedby\": \"\", \"transactioncurrencyid\": \"\", \"createdby\": \"\", \"expectedrevenue\": \"\",\n \"totalactualcost\": \"\", \"budgetedcost\": \"\", \"actualend\": \"\", \"actualstart\": \"\", \"name\": \"\", \"proposedend\": \"\", \"proposedstart\": \"\",\n \"createdon\": \"\", \"modifiedon\": \"\", \"description\": \"\"\n };\n var a = $($(data[i]).each(function (k, p) { $(p).find('b\\\\:keyvaluepairofstringanytype') }).context.childNodes).each(function (a, b) { $(b).find('c\\\\:key') });\n for (var j = 0; j < a.length; j++) {\n if (a[j].childNodes[0].innerText == \"ownerid\") { newobj.ownerid = $(a[j].childNodes[1]).find('b\\\\:name')[0].innerHTML }\n if (a[j].childNodes[0].innerText == \"modifiedby\") { newobj.modifiedby = $(a[j].childNodes[1]).find('b\\\\:name')[0].innerHTML }\n if (a[j].childNodes[0].innerText == \"createdby\") { newobj.createdby = $(a[j].childNodes[1]).find('b\\\\:name')[0].innerHTML }\n if (a[j].childNodes[0].innerText == \"transactioncurrencyid\") { newobj.transactioncurrencyid = $(a[j].childNodes[1]).find('b\\\\:name')[0].innerHTML }\n if (a[j].childNodes[0].innerText == \"expectedrevenue\") { newobj.expectedrevenue = a[j].childNodes[1].innerText }\n if (a[j].childNodes[0].innerText == \"budgetedcost\") { newobj.budgetedcost = a[j].childNodes[1].innerText }\n if (a[j].childNodes[0].innerText == \"actualend\") { newobj.actualend = a[j].childNodes[1].innerHTML }\n if (a[j].childNodes[0].innerText == \"actualstart\") { newobj.actualstart = a[j].childNodes[1].innerHTML }\n if (a[j].childNodes[0].innerText == \"proposedend\") { newobj.proposedend = a[j].childNodes[1].innerHTML }\n if (a[j].childNodes[0].innerText == \"proposedstart\") { newobj.proposedstart = a[j].childNodes[1].innerHTML }\n if (a[j].childNodes[0].innerText == \"name\") { newobj.name = a[j].childNodes[1].innerHTML }\n if (a[j].childNodes[0].innerText == \"createdon\") { newobj.createdon = a[j].childNodes[1].innerHTML }\n if (a[j].childNodes[0].innerText == \"totalactualcost\") { newobj.totalactualcost = a[j].childNodes[1].innerText }\n if (a[j].childNodes[0].innerText == \"modifiedon\") { newobj.modifiedon = a[j].childNodes[1].innerHTML }\n if (a[j].childNodes[0].innerText == \"description\") { newobj.description = a[j].childNodes[1].innerHTML }\n }\n if (newobj.title != \"\")\n { $scope.arrey.push(newobj); }\n }\n $timeout(function () {\n $rootScope.hide();\n $scope.$broadcast('scroll.refreshComplete');\n }, 1000);\n }", "title": "" }, { "docid": "54b75a92c33ab471d108d5bb4208790d", "score": "0.47375074", "text": "function GetEntityLogicalName(executionContext) {\n try {\n //Get the form context\n var formContext = executionContext.getFormContext();\n //Get entity logical name here, Give lookup field logical name here\n var entityName = formContext.getAttribute(\"new_organizationid\").getValue()[0].entityType;\n Xrm.Utility.alertDialog(entityName);\n }\n catch (e) {\n Xrm.Utility.alertDialog(e.message);\n }\n}", "title": "" }, { "docid": "8656ffadfc5475ec9f6a91bd62c24d2e", "score": "0.47262105", "text": "get Codepoint() { return this.internal.Codepoint; }", "title": "" }, { "docid": "b01bc4f33cb1ac7baf1acd8aea972a47", "score": "0.4701672", "text": "toString() {\n return this.id();\n }", "title": "" }, { "docid": "ff85f634395500de81909710ac33adbf", "score": "0.46921", "text": "getBonusCodeid () { return this.bonusCodeid; }", "title": "" }, { "docid": "0b6d9d40e644884208ff35a4d6d1f64f", "score": "0.46877596", "text": "Type() {\n return ActionCode.CodeStaticContractFormation;\n }", "title": "" }, { "docid": "96df2339f00fa866c7752bb15aa8fb2c", "score": "0.46757486", "text": "get fullNZBankAccountNumber() {\n return this.accountSeparator ? [this.bank, this.branch, this.account, this.suffix].join(this.accountSeparator) : '';\n }", "title": "" }, { "docid": "91719b04f8980f7b0063ed234b03bc0e", "score": "0.46720994", "text": "function GetCode() {\n return Math.random().toString(36).substr(2,8);\n}", "title": "" }, { "docid": "afe97cd5bdc9628593cb6e30b24d8c94", "score": "0.46628147", "text": "function toString() {\n var retStr = \"\";\n for (var i = 0; i < this.dataStore.length; ++i) {\n retStr += this.dataStore[i].name + \" code: \" + this.dataStore[i].code + \"\\n\";\n }\n return retStr;\n }", "title": "" }, { "docid": "ea9234ccabf36d84a27d1eb883e2adfb", "score": "0.4660522", "text": "parseEntity(entity) {\n // startsWith would be significantly slower for this test.\n // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with\n if (entity[0] !== \"#\") {\n const defined = this.ENTITIES[entity];\n if (defined !== undefined) {\n return defined;\n }\n this.fail(this.isName(entity) ? \"undefined entity.\" :\n \"disallowed character in entity name.\");\n return `&${entity};`;\n }\n let num = NaN;\n if (entity[1] === \"x\" && /^#x[0-9a-f]+$/i.test(entity)) {\n num = parseInt(entity.slice(2), 16);\n }\n else if (/^#[0-9]+$/.test(entity)) {\n num = parseInt(entity.slice(1), 10);\n }\n // The character reference is required to match the CHAR production.\n if (!this.isChar(num)) {\n this.fail(\"malformed character entity.\");\n return `&${entity};`;\n }\n return String.fromCodePoint(num);\n }", "title": "" }, { "docid": "68cc50a9c772e44da4da021d578ae498", "score": "0.46563226", "text": "function PlanCodeObject(company, employee)\n{\n\tthis.Company = company;\n\tthis.Employee = employee;\n\tthis.NumberOfPlans = null;\n\tthis.Detail = new Array(0);\n}", "title": "" }, { "docid": "4d648630b84de74b446add01a9d92e08", "score": "0.4655992", "text": "generateCode() {\n return (Math.random().toString(16).substr(2, 4) + \"-\" \n + Math.random().toString(16).substr(2, 4) + \"-\" \n + Math.random().toString(16).substr(2, 4)).toUpperCase();\n }", "title": "" }, { "docid": "8a8f1876c78f57c0e8670da12d1d63f9", "score": "0.46542773", "text": "showCertificateDetails(entity) {\n this.getCertificateData(entity.alias)\n }", "title": "" }, { "docid": "44628afcc3a0a93df1381cdf8986cc43", "score": "0.46455175", "text": "getAccelaID(recordNumber){\n for(let i in this.serverData){\n if (this.serverData[i].recordId == recordNumber) {\n return this.serverData[i].capId;\n }\n }\n return '';\n }", "title": "" }, { "docid": "aa28395915085cdd46caa38ee68c0259", "score": "0.46367562", "text": "function aylienID(){\n return \"d78e0c77\";\n}", "title": "" }, { "docid": "0588abdf9f3f88e7e682252c037dbb94", "score": "0.46329704", "text": "getCustomerInfoId() {\n return this.customerInfoId;\n }", "title": "" }, { "docid": "bd3d701553519c2484f0ba62c0b7bff8", "score": "0.4625569", "text": "static async productReport() {\r\n return DAOUtil.report('/orders/_design/product-count/_view/product-count-view?group_level=1');\r\n\r\n }", "title": "" }, { "docid": "b92e265bcbb3e51238ce6735c6a0495e", "score": "0.46120816", "text": "function getExpenseCodes() {\n\t\t\treturn expenseCodes;\n\t\t}", "title": "" }, { "docid": "1a726f989633b010ff82a54b922912e6", "score": "0.4606311", "text": "function ATNType() {\n\n}", "title": "" }, { "docid": "1a726f989633b010ff82a54b922912e6", "score": "0.4606311", "text": "function ATNType() {\n\n}", "title": "" }, { "docid": "12a5a803c544e434437f51ebd9db9df9", "score": "0.46056014", "text": "function getCodeFromKey(key) {\r\n //Constants for key\r\n if (key == STUDENT_INBOX_KEY) return 1;\r\n if (key == ADMIN_INBOX_KEY) return 2;\r\n if (key == STUDENT_SENT_ITEMS_KEY) return 3;\r\n if (key == ADMIN_SENT_ITEMS_KEY) return 4;\r\n}", "title": "" }, { "docid": "0c7f1dcd00a819201cf773dbd083b132", "score": "0.46019536", "text": "function costEntitlements(type){\n\treturn{\n\t\t\"331278\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331401\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331402\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331403\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331439\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331458\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331459\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331460\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331461\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"331462\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"341159\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"341160\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"341161\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"341162\": \"I\\'m an entitlement but I\\'m impacted by aid\",\n\t\t\"341163\": \"I\\'m an entitlement but I\\'m impacted by aid\"\n\t}[type];\t\n}", "title": "" }, { "docid": "cb981eca4eb674216a5591d45645e129", "score": "0.45990467", "text": "getCodeNorm() {\n const c = this.getCode();\n return c === NL_LIKE ? NL : c;\n }", "title": "" }, { "docid": "22d69e372bf524171775c7eb7ca77e75", "score": "0.4595434", "text": "get statusAsCode() {\n return this._cancerProgression.value.coding[0].code.value;\n }", "title": "" }, { "docid": "4cf70f4f63818521731c5d3b565d2317", "score": "0.45908782", "text": "CurrentRateCodeRelatedToThisSva(billingAccount, serviceName) {\n let url = `/telephony/${billingAccount}/rsva/${serviceName}/currentRateCode`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "e29dcf92b0ae05fbc2cc5c058022ca22", "score": "0.45889333", "text": "get entity() { return this[entity]; }", "title": "" }, { "docid": "3b02aabbde9bb11c7c05f682e96167c2", "score": "0.45883438", "text": "get vaccineCode () {\n\t\treturn this._vaccineCode;\n\t}", "title": "" }, { "docid": "00de8ec02d8ed37d63b8b89d39b0ef4d", "score": "0.45783496", "text": "getLastEmeci(doctorId) {\n return api.getLastEmeci({ doctorId });\n }", "title": "" }, { "docid": "41c1e775d5feec7d88b3c23162293339", "score": "0.45781237", "text": "prepareEntityId(entityId) {\n return Buffer.from(JSON.stringify(entityId)).toString('base64');\n }", "title": "" }, { "docid": "53e6f830ed003ac7883932ffed8b9907", "score": "0.45759848", "text": "getAuthCode() {\n return getParameterByName('code');\n }", "title": "" }, { "docid": "a655e6b450e8bd852576ca5f94afe4a0", "score": "0.45747307", "text": "getBankObj() {\n if (!this.validationObj || !Object.keys(this.validationObj).length) this.validate();\n return this.validationObj ? this.validationObj.idData : null;\n }", "title": "" } ]
ecef8d20a69e28e136a1c6b5ef832c16
closing time based on tevila time approx. 2 hours after earliest tevila either 10, 10:30 or 11 last bath is 1 hr before closing, last shower is 30 min before closing
[ { "docid": "0784b12eaea1f9210945e09e20ad7705", "score": "0.6218146", "text": "function calculateClosing(tevilaHour, tevilaMinutes, date, holiday, dateFromDatePicker, erevTB) {\n\n var closingText;\n var lastBath;\n var lastShower;\n\n if (date.getDay() == 5 || holiday || erevTB) { // friday or holiday or erev TB so appt only\n closingText = \"-\";\n lastBath = \"-\";\n lastShower = \"-\";\n }\n else {\n if (tevilaHour < 8 || (tevilaHour == 8 && tevilaMinutes <= 14)) {\n closingText = \"10:00 PM\";\n lastBath = \"9:00 PM\";\n lastShower = \"9:30 PM\";\n }\n else if (tevilaHour > 8 || (tevilaHour == 8 && tevilaMinutes >= 45)) {\n closingText = \"11:00 PM\";\n lastBath = \"10:00 PM\";\n lastShower = \"10:30 PM\";\n }\n else {\n closingText = \"10:30 PM\";\n lastBath = \"9:30 PM\";\n lastShower = \"10:00 PM\";\n }\n }\n\n // for display purposes\n if (!dateFromDatePicker) { // regular screen\n document.getElementById(\"closes\").innerHTML = closingText;\n document.getElementById(\"last bath\").innerHTML = lastBath;\n document.getElementById(\"last shower\").innerHTML = lastShower;\n }\n else { // pop-up with calendar\n if (date.getDay() == 5 || holiday || erevTB) {\n $('#customDateTimes').collapse(\"hide\");\n $('#customDateApptOnly').collapse(\"show\");\n }\n else {\n $('#customDateApptOnly').collapse(\"hide\");\n document.getElementById(\"closes-modal\").innerHTML = \"Closes: \" + closingText;\n document.getElementById(\"bath-modal\").innerHTML = \"Last Bath: \" + lastBath;\n document.getElementById(\"shower-modal\").innerHTML = \"Last Shower: \" + lastShower;\n $('#customDateTimes').collapse(\"show\");\n }\n }\n}", "title": "" } ]
[ { "docid": "1af5535b283199ee7548a3eef90bc28b", "score": "0.71450055", "text": "function closeTime() {\n const date = new Date();\n const NewDate = date.getDate();\n const Month = date.getMonth() + 1;\n const Year = date.getFullYear();\n\n const closingTime = new Date(\n `${Month} ${NewDate}, ${Year} ${props.data.bar.closingTime}`\n ).getTime();\n\n const differnce = closingTime - date;\n\n let hours = Math.floor(\n (differnce % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)\n );\n let minutes = Math.floor((differnce % (1000 * 60 * 60)) / (1000 * 60));\n let seconds = Math.floor((differnce % (1000 * 60)) / 1000);\n\n setTime(\n `Closing In ${hours < 10 ? `0${hours}` : hours}:${\n minutes < 10 ? `0${minutes}` : minutes\n }:${seconds < 10 ? `0${seconds}` : seconds}`\n );\n\n if (differnce < 0) {\n setTime(\"we are closed\");\n }\n }", "title": "" }, { "docid": "c8bb61d0abbfbe611d88a274d64f4332", "score": "0.646474", "text": "function displayOpenCloseTime(hour, min, isOpen, hourNow, minNow) {\n \n // If time left open/close is less than this many minutes,\n // the hall is deemed to be changing state \"soon\"\n var soonLimit = 30;\n \n //var now = new Date();\n //var hourNow = now.getHours();\n //var minNow = now.getMinutes();\n \n /* \n // use this block if the script is internal in the html,\n // (to access python values)\n \n // getting this from .py file for testing for now\n // var now = new Date(); \n \n var hourNow = {{nowHr}}; // now.getHours();\n var minNow ={{nowMin}}; // now.getMinutes();\n \n */\n \n timeLabelStr = \"<font class='timeLabel'>closes at </font>\";\n if (!isOpen) timeLabelStr = \"<font class='timeLabel'>opens at </font>\";\n \n // calculate difference between current time and given time\n // diff = given-current to calculate time left open\n // diff = current-given to calculate time until open (or x -1)\n var timeDiff = (hour*60+min)-(hourNow*60+minNow);\n \n // -- dining location is closing soon --\n if( isOpen & timeDiff>0 & timeDiff<soonLimit )\n return \"<font color='mediumvioletred'><font class='timeLabel'>closes in </font>\" + timeDiff + \" min</font>\";\n\n // -- dining location is opening soon --\n if ( !isOpen & timeDiff>0 & timeDiff<soonLimit)\n return \"<font color='green'><font class='timeLabel'>opens in </font>\" + timeDiff + \" min</font>\";\n \n // dining location is not opening or closing soon\n // so just display the time normally\n return timeLabelStr + displayTime(hour, min);\n\n}", "title": "" }, { "docid": "7e84ad99e52c8dc1381aaff856f8359c", "score": "0.6236636", "text": "function timeTilNextShuttle(route, stop) {\n var t = getCurrTime();\n var day = t / 10000;\n var time = t % 10000;\n\n if (route == RouteA)\n {\n if (day < 1 || day > 5)\n return -1;\n else \n return timeDiff(routeAMF, time);\n }\n else if (route == RouteB)\n {\n if (day < 1 || day > 5)\n return -1;\n else\n return timeDiff(routeBMF, time);\n }\n else if (route == RouteAB)\n {\n if (day < 1 || day > 5) \n return timeDiff(routeABSSu, time);\n else\n return timeDiff(routeABMF, time);\n }\n else if (route == RouteC)\n {\n if (day > 4)\n return -1;\n else \n return timeDiff(routeCSuR, time);\n }\n else if (route == BakerySquareL)\n { \n if (stop == CICstop) \n {\n if (day < 1 || day > 5)\n return -1;\n else\n return timeDiff(BakerySquareLRCICMF, time);\n }\n else if (stop == BakerySquarestop)\n {\n if (day < 1 || day > 5)\n return -1;\n else \n return timeDiff(BakerySquareLRBSMF, time);\n }\n else \n return -1;\n }\n else if (route == BakerySquareS)\n {\n if (stop == CICstop) \n {\n if (day < 1 || day > 5)\n return -1;\n else\n return timeDiff(BakerySquareSRCICMF, time);\n }\n else if (stop == BakerySquarestop)\n {\n if (day < 1 || day > 5)\n return -1;\n else \n return timeDiff(BakerySquareSRBSMF, time);\n }\n else \n return -1;\n }\n else if (route == PTCroute)\n { \n if (stop == Morewoodstop) \n {\n if (day < 1 || day > 5)\n return timeDiff(PTCMorewoodSSu, time);\n else\n return timeDiff(PTCMorewoodMF, time);\n }\n else if (stop == PTCstop)\n {\n if (day < 1 || day > 5)\n return timeDiff(PTCPTCSSu, time);\n else\n return timeDiff(PTCPTCMF, time);\n }\n else\n return -1;\n }\n else \n return -1;\n}", "title": "" }, { "docid": "c14c258e48256b17214349a5302ad097", "score": "0.62079084", "text": "function isBetweenSystemClosingTime(timePortion) {\n let lowerTime = \"00:00:00\",\n upperTime = \"00:01:20\";\n return timePortion >= lowerTime && timePortion < upperTime;\n }", "title": "" }, { "docid": "0641e1185563bef4f74652da90b914ac", "score": "0.5925796", "text": "function calculateTevilaAndOpening(date, candleLightingArray, holiday, lastDayOfChag, dateFromDatePicker, erevTB) {\n var tevilaHour, tevilaMinutes, openHour, openMinutes;\n var tevilaText, openText;\n\n // add time to date for sunset calculation purposes\n date = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 12, 0, 0, 0, 0);\n\n if (date.getDay() != 5 && !holiday && !erevTB) { // not friday or a holiday or erevTB\n if (date.getDay() != 6 && !lastDayOfChag) { // not sat or last day of chag\n\n // regular day rules\n // tevila is based on sunset and opening is based on tevila\n var sunset = SunCalc.getTimes(date, 40.941430, -73.793830).sunset;\n var splitSunset = sunset.toString().split(\" \");\n var timeInString = splitSunset[4].split(\":\", 2);\n var sunsetHour = Number(timeInString[0]);\n var sunsetMin = Number(timeInString[1]);\n\n // tevila = sunset + 50 min\n tevilaHour = sunsetHour;\n tevilaMinutes = sunsetMin + 50;\n if (tevilaMinutes >= 60) {\n tevilaMinutes -= 60;\n tevilaHour++;\n }\n\n if (tevilaHour > 12) {\n tevilaHour -= 12;\n }\n\n // opening varies by season\n if (tevilaHour < 6) { //winter opening times, open at time of tevila\n openHour = tevilaHour;\n openMinutes = tevilaMinutes;\n }\n else if (tevilaHour == 6) { //when tevila is between 6-7, open 15 minutes before tevila rounded to nearest 15 (max 29)\n if (tevilaMinutes >= 0 && tevilaMinutes <= 14) {\n openHour = tevilaHour - 1;\n openMinutes = 45;\n }\n else if (tevilaMinutes >= 15 && tevilaMinutes <= 29) {\n openHour = tevilaHour;\n openMinutes = 0;\n }\n else if (tevilaMinutes >= 30 && tevilaMinutes <= 44) {\n openHour = tevilaHour;\n openMinutes = 15\n }\n else {\n openHour = tevilaHour;\n openMinutes = 30;\n }\n\n if (openHour > 12) {\n openHour = openHour - 12;\n }\n }\n else { //when tevila is after 7,open 30 minutes before tevila rounded to nearest 15 (max 44)\n if (tevilaMinutes >= 0 && tevilaMinutes <= 14) {\n openHour = tevilaHour - 1;\n openMinutes = 30;\n }\n else if (tevilaMinutes >= 15 && tevilaMinutes <= 29) {\n openHour = tevilaHour - 1;\n openMinutes = 45;\n }\n else if (tevilaMinutes >= 30 && tevilaMinutes <= 44) {\n openHour = tevilaHour;\n openMinutes = 0\n }\n else {\n openHour = tevilaHour;\n openMinutes = 15;\n }\n\n if (openHour > 12) {\n openHour = openHour - 12;\n }\n }\n\n }\n else { // sat or last day of chag\n\n if(lastDayOfChag) {\n candleLightingArray = lastDayOfChagTime(date);\n }\n\n // open based on candle lighting and tevila based on opening\n var candleLightingHour = parseInt(candleLightingArray[0],10);\n var candleLightingMin = parseInt(candleLightingArray[1],10);\n\n // open = at least 1 1/2 hour after CL, rounded to nearest 15 \n if (candleLightingMin >= 1 && candleLightingMin <= 15) {\n openHour = candleLightingHour+1;\n openMinutes = 45;\n }\n else if (candleLightingMin >= 16 && candleLightingMin <= 30) {\n openHour = candleLightingHour+2;\n openMinutes = 0;\n }\n else if (candleLightingMin >= 31 && candleLightingMin <= 45) {\n openHour = candleLightingHour+2;\n openMinutes = 15;\n }\n else {\n openHour = candleLightingHour+2;\n openMinutes = 30;\n\n if (candleLightingMin == 0) { // edge case - only add 1 to hour, not 2\n openHour = candleLightingHour+1;\n }\n }\n\n if (openHour > 12) {\n openHour -= 12;\n }\n\n tevilaHour = openHour;\n tevilaMinutes = openMinutes\n }\n\n openText = openHour.toString() + \":\" + (openMinutes < 10 ? \"0\" : \"\") + openMinutes.toString() + \" PM\";\n tevilaText = tevilaHour.toString() + \":\" + (tevilaMinutes < 10 ? \"0\" : \"\") + tevilaMinutes.toString() + \" PM\";\n }\n\n else { // it is friday or a holiday or erev TB so appt only\n openText = \"-\";\n tevilaText = \"-\";\n }\n\n // for display purposes\n if (!dateFromDatePicker) { // regular screen\n document.getElementById(\"tevila\").innerHTML = tevilaText;\n document.getElementById(\"open\").innerHTML = openText;\n } \n else { // pop-up with calendar\n if (date.getDay() == 5 || holiday || erevTB) { // display appt only text\n $('#customDateTimes').collapse(\"hide\");\n $('#customDateApptOnly').collapse(\"show\");\n }\n else { // display times text\n $('#customDateApptOnly').collapse(\"hide\");\n document.getElementById(\"tevilah-modal\").innerHTML = \"Earliest Tevila: \" + tevilaText;\n document.getElementById(\"opens-modal\").innerHTML = \"Opens: \" + openText;\n $('#customDateTimes').collapse(\"show\");\n }\n }\n \n // calculate closing based on tevila so call calculation function here\n calculateClosing(tevilaHour, tevilaMinutes, date, holiday, dateFromDatePicker, erevTB);\n}", "title": "" }, { "docid": "ee355a281805afaa7dee0ecec7da9dc3", "score": "0.58969176", "text": "function getOpenCloseTime(openTimings, closeTimings, closedDays) {\n\tvar days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];\n\tvar d = new Date();\n\tvar day = days[d.getDay()];\n\n\tif (closedDays[day] == \"1\") {\n\t\tvar retValue = L(\"CLOSED\") + storeOpensAt(openTimings, closedDays, day);\n\t\tTi.API.info('getOpenCloseTime ' + retValue);\n\t\treturn retValue;\n\t}\n\n\t// \tget opening time in 12 hour format\n\tif ((openTimings[day] != undefined && openTimings[day] != null)) {\n\t\tvar openingTime = openTimings[day];\n\t\topeningTime = tConvert(openingTime);\n\t} else {\n\t\tvar openingTime = \"NA\";\n\t}\n\n\t// \tget closing time in 12 hour format\n\tif ((closeTimings[day] != undefined && closeTimings[day] != null)) {\n\t\tvar closingTime = closeTimings[day];\n\t\tclosingTime = tConvert(closingTime);\n\t} else {\n\t\tvar closingTime = \"NA\";\n\t}\n\n\tvar openCloseTime = openingTime + \" to \" + closingTime;\n\tTi.API.info('openCloseTime ' + openCloseTime);\n\n\treturn openCloseTime;\n\n}", "title": "" }, { "docid": "6b611263df210ec313c60b3cdd625ff5", "score": "0.57413507", "text": "function beatToTime(when) {\n return when * 60.0 / bpm;\n}", "title": "" }, { "docid": "a9c7e6d0f7eb4ffbaef4f94f7b1ecab2", "score": "0.5638973", "text": "function _time() {\n var s = new Date();\n var e = new Date(\"2019/6/30 20:00:00\");\n getDiff(s, e, oDiv);\n}", "title": "" }, { "docid": "7b9ab258c52d8b8fc13c2ea89b52feaf", "score": "0.5628057", "text": "function determineTimeState(inputHour) {\n let currentHour = moment().format(\"H\");\n if (inputHour < currentHour) return \"past\";\n if (inputHour == currentHour) return \"present\";\n if (inputHour > currentHour) return \"future\";\n}", "title": "" }, { "docid": "ffd0a242af0acc0aa2b0c7339a7c292f", "score": "0.5609877", "text": "function hr(t) {return (90-t*30 % 360);}", "title": "" }, { "docid": "aa2a85e52ed77c7cdb418832c7ed8ad6", "score": "0.55912286", "text": "function overtime(hoursWorked) {\n return hoursWorked > 40;\n}", "title": "" }, { "docid": "6d236ec7a790744f80e17b24826b3895", "score": "0.5579651", "text": "getLastTimeslot () {\n return subMinutes(startOfDay(addDays(this.getNextFriday(), 1)), 30)\n }", "title": "" }, { "docid": "49c29241f3b0ff42ce10a3c331e7e34b", "score": "0.5571175", "text": "function hours(agent){\r\n\t\t\r\n\t\t//double checking for intent call ==========================================================================================================================================================================================================================================================================================\r\n\t\t\r\n\t\tconst verb = agent.parameters[VERB_ENTITY];\r\n\t\tif(verb !== 'open') return;\r\n\t\t\r\n\t\tconst libName = agent.parameters[LIBRARY_ENTITY];\r\n\t\tconst term = agent.parameters[TERM_ENTITY];\r\n\t\tconst date = agent.parameters[DATE_ENTITY]?new Date(agent.parameters[DATE_ENTITY]):'';\r\n\t\t\r\n\t\t//slot filling ==========================================================================================================================================================================================================================================================================================\r\n\t\t\r\n\t\tif(!(listOfLib.includes(libName))){\r\n\t\t\tagent.add('Let me know the library');\r\n\t\t}else if(!(['School Term', 'Vacation Term'].includes(term))){\r\n\t\t\tagent.add('Let me know the term');\r\n\t\t}else{\r\n\t\t\tconst openingHrs = {\r\n\t\t\t'Vacation Term':{\r\n\t\t\t'Lee Wee Nam Library':{\r\n\t\t\t'1':'8:30AM - 7:00PM',\r\n\t\t\t'2':'8:30AM - 7:00PM',\r\n\t\t\t'3':'8:30AM - 7:00PM',\r\n\t\t\t'4':'8:30AM - 7:00PM',\r\n\t\t\t'5':'8:30AM - 7:00PM',\r\n\t\t\t'6':'8:30AM - 5:00PM'\r\n\r\n\t\t\t},\r\n\t\t\t'Business Library':{\r\n\t\t\t'1':'8:30AM - 7:00PM',\r\n\t\t\t'2':'8:30AM - 7:00PM',\r\n\t\t\t'3':'8:30AM - 7:00PM',\r\n\t\t\t'4':'8:30AM - 7:00PM',\r\n\t\t\t'5':'8:30AM - 7:00PM',\r\n\t\t\t'6':'8:30AM - 5:00PM'\r\n\t\t\t}\r\n\t\t\t},\r\n\t\t\t'School Term':{\r\n\t\t\t'Lee Wee Nam Library':{\r\n\t\t\t'1':'8:30AM - 9:30PM',\r\n\t\t\t'2':'8:30AM - 9:30PM',\r\n\t\t\t'3':'8:30AM - 9:30PM',\r\n\t\t\t'4':'8:30AM - 9:30PM',\r\n\t\t\t'5':'8:30AM - 9:30PM',\r\n\t\t\t'6':'8:30AM - 5:00PM'\r\n\t\t\t},\r\n\t\t\t'Business Library':{\r\n\t\t\t'1':'8:30AM - 9:30PM',\r\n\t\t\t'2':'8:30AM - 9:30PM',\r\n\t\t\t'3':'8:30AM - 9:30PM',\r\n\t\t\t'4':'8:30AM - 9:30PM',\r\n\t\t\t'5':'8:30AM - 9:30PM',\r\n\t\t\t'6':'8:30AM - 5:00PM'\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t//Date is not mandatory ==========================================================================================================================================================================================================================================================================================\r\n\t\t\t//if date is given, system is able to give the specific date ==========================================================================================================================================================================================================================================================================================\r\n\t\t\t\r\n\t\t\tif(date === \"\"){\r\n\t\t\t\tagent.add(`Library opening hours are ${openingHrs[term][libName]['1']} on Monday-Friday and ${openingHrs[term][libName]['6']} on Saturday`);\r\n\t\t\t}else{\r\n\r\n\t\t\t\tconst day = String(date.getDay());\r\n\t\t\t\tconst dayDate = String(date.getDate());\r\n\t\t\t\tconst month = String(date.getMonth());\r\n\t\t\t\tconst year = String(date.getFullYear());\r\n\r\n\t\t\tif(day === '0'){\r\n\t\t\t\tagent.add('Library is closed on Sunday');\r\n\t\t\t}else{\r\n\t\t\t\tagent.add(`Library opening hours are ${openingHrs[term][libName][day]} on ${dayDate} ${month} ${year}`);\r\n\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6a51c1c73e642b9f39a655883ae6da19", "score": "0.55707747", "text": "calcTime() {\n const numIng = this.ingredients.length;\n const periods = Math.ceil(numIng / 3);\n this.time = periods * 15;\n }", "title": "" }, { "docid": "a6891f78038939f90b138e22663cd26d", "score": "0.55428034", "text": "function getHourly(sender_psid) {\n let response = {\n \"text\" : `MONDAY: Closed\\nTUESDAY: 9:30 - 7:30\\nWEDNESDAY: 9:30 - 7:30\\nTHURSDAY: 9:30 - 7:30\\nFRIDAY: 9:30 - 7:30\\nSATURDAY: 9:30 - 7:30\\nSUNDAY: 12:00 - 5:30\\n`\n }\n sendResponse.directMessage(sender_psid, response);\n timeOutReset(sender_psid);\n}", "title": "" }, { "docid": "e6f2478e1af75daef8e9ca09319650d5", "score": "0.550497", "text": "calcTime() {\n const numIng = this.ingredients.length;\n const periods = Math.ceil(numIng/3);\n this.time = periods * 15;\n }", "title": "" }, { "docid": "1b51e7b2b626c5cfb85da8dbc3e88792", "score": "0.5493891", "text": "function updateHour() {\n // get current number of hours\n var currentHour = moment().hours();\n\n // loop over time blocks\n $(\".time-block\").each(function () {\n var blockHour = parseInt($(this).attr(\"id\").split(\"-\")[1]);\n\n // check if we've moved past this time\n if (blockHour < currentHour) {\n $(this).addClass(\"past\");\n } //check if current time\n else if (blockHour === currentHour) {\n $(this).removeClass(\"past\");\n $(this).addClass(\"present\");\n } // or if time is in the future\n else {\n $(this).removeClass(\"past\");\n $(this).removeClass(\"present\");\n $(this).addClass(\"future\");\n }\n });\n }", "title": "" }, { "docid": "672826cf89ab30898e988d176821f92f", "score": "0.5493283", "text": "function getEndIndexForHour(index2) {\n let hourlyIndex = 0\n if (index2 < 5) {\n hourlyIndex = 1\n } else if (index2 < 7) {\n hourlyIndex = 2\n } else if (index2 < 9) {\n hourlyIndex = 3\n } else if (index2 < 11) {\n hourlyIndex = 4\n } else if (index2 < 13) {\n hourlyIndex = 5\n } else if (index2 < 15) {\n hourlyIndex = 6\n } else if (index2 < 17) {\n hourlyIndex = 7\n } else if (index2 < 19) {\n hourlyIndex = 8\n } else if (index2 < 21) {\n hourlyIndex = 9\n } else if (index2 < 23) {\n hourlyIndex = 10\n } else if (index2 < 25) {\n hourlyIndex = 11\n } else if (index2 < 27) {\n hourlyIndex = 12\n } else if (index2 < 29) {\n hourlyIndex = 13\n } else if (index2 < 31) {\n hourlyIndex = 14\n } else if (index2 < 33) {\n hourlyIndex = 15\n } else if (index2 < 35) {\n hourlyIndex = 16\n } else if (index2 < 37) {\n hourlyIndex = 17\n } else if (index2 < 39) {\n hourlyIndex = 18\n } else if (index2 < 41) {\n hourlyIndex = 19\n } else if (index2 < 43) {\n hourlyIndex = 20\n } else if (index2 < 45) {\n hourlyIndex = 21\n } else if (index2 < 47) {\n hourlyIndex = 22\n } else if (index2 < 49) {\n hourlyIndex = 23\n } else if (index2 < 51) {\n hourlyIndex = 24\n } else if (index2 < 53) {\n hourlyIndex = 25\n } else if (index2 < 55) {\n hourlyIndex = 26\n } else if (index2 < 57) {\n hourlyIndex = 27\n } else if (index2 < 59) {\n hourlyIndex = 28\n } else if (index2 < 61) {\n hourlyIndex = 29\n } else if (index2 < 63) {\n hourlyIndex = 30\n } else if (index2 < 65) {\n hourlyIndex = 31\n } else if (index2 < 67) {\n hourlyIndex = 32\n } else if (index2 < 69) {\n hourlyIndex = 33\n } else if (index2 < 71) {\n hourlyIndex = 34\n } else {\n hourlyIndex = 35\n }\n}", "title": "" }, { "docid": "031fb47694f1c10e84d26a7df2b252c3", "score": "0.54912686", "text": "function launchTime(open, close, stamp){\n\t\tif(stamp === 0){\n\t\t\treturn '<p class=\"time time-null\">TBD</p>';\n\t\t}else if (open === close){\n\t\t\treturn '<p class=\"time time-' + (i+1) + '\">Instantaneous: ' + open + '</p>';\n\t\t}\n\t\telse{\n\t\t\treturn '<p class=\"time time-' + (i+1) + '\">Window: ' + open + '-' + close + '</p>';\n\t\t}\n\t}", "title": "" }, { "docid": "a37c92fdb6f4eebe16cf943d928c774a", "score": "0.54901713", "text": "function calcAway(){\n\t\tvar a = snap.val().firstTrain;\n\t\tvar b = \"HH:mm\";\n\t\tvar c = moment(a, b);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "37c582188584d1cf5fb17ec9fc344e39", "score": "0.54353184", "text": "getHalfdayClose() {\n let halfdayClose\n\n switch (this.city) {\n case 'London':\n return halfdayClose = '12:30'\n case 'Amsterdam':\n return halfdayClose = '14:00'\n case 'Paris':\n return halfdayClose = '14:00'\n case 'Hong_Kong':\n return halfdayClose = '12:00'\n case 'Singapore':\n return halfdayClose = '12:00'\n case 'Sydney':\n return halfdayClose = '14:10'\n default:\n halfdayClose = '13:00'\n }\n\n return halfdayClose\n }", "title": "" }, { "docid": "73c2ea882e192d49d5f4753d89b645f4", "score": "0.54032266", "text": "timeSpent() {\r\n let diff = this.state.currentTime - this.state.startTime;\r\n if(diff >= this.props.loc.maxDuration * 60 * 1000) { //timeCap\r\n end(this.props.loc.name)\r\n return null;\r\n }\r\n if(diff <= 0) {\r\n return \"0:00\";\r\n }\r\n let secs = Math.floor(diff/1000);\r\n let mins = Math.floor(secs/60);\r\n secs = secs % 60;\r\n if(secs < 10) {\r\n secs = '0' + secs;\r\n }\r\n return `${mins}:${secs}`;\r\n }", "title": "" }, { "docid": "6f0ccbf715fff21a978acf66608aa0f9", "score": "0.53980577", "text": "function pmHours(h){return h>12?(h-12):h}", "title": "" }, { "docid": "f4428783797a479935259767dc4f7be4", "score": "0.538946", "text": "function afterTime(beforeTime, hournum) {\n var endTime = new Date((beforeTime) + 3600000 * (hournum - 8)); //1.小时=3600000毫秒 东八区时间差8小时\n var endDate = lessThan10(endTime.getMonth() + 1) + '月' + lessThan10(endTime.getDate()) + '日';\n return endDate\n}", "title": "" }, { "docid": "57c3d82ffa95e103f09e088cecce4ffc", "score": "0.53859824", "text": "function calculateTimeAtFullAP() {\n\tvar startDate = new Date();\n\tvar endDate = new Date();\n\tvar extraMinutes = (50 - ap) * 30\n\tvar endTime = \"\";\n\tvar endMinutes = startDate.getHours() * 60 + startDate.getMinutes() + extraMinutes;\n\n\tendMinutes -= endMinutes % 30;\n\tendMinutes = endMinutes % 1440;\n\n\tendDate.setSeconds(0);\n\tendDate.setMinutes(endMinutes % 60);\n\tendDate.setHours(endMinutes / 60);\n\n\tif(endDate.getHours() < 10) endTime += \"0\";\n\tendTime += endDate.getHours();\n\tif(endDate.getMinutes() < 10) endTime += \"0\";\n\tendTime += endDate.getMinutes();\n\n\treturn endTime;\n}", "title": "" }, { "docid": "af798bf44c01b73a878ae175fec7487b", "score": "0.53739536", "text": "reduceTime() {\n if(this.state.customTime <= 60) {\n return;\n }\n this.setState({\n customTime: this.state.customTime - 60\n });\n }", "title": "" }, { "docid": "1e1c2085a7e93838b9e7b54960494d46", "score": "0.536768", "text": "handleTimeUpdate(event) {\n let data = {};\n let currTime = this.breakManager.getBreakClipCurrentTimeSec();\n data.id = this.breakClipId;\n\n if (this.qt1 && currTime > this.qt1) {\n this.qt1 = null;\n data.action = 'BREAK_CLIP_QT1';\n } else if (this.qt2 && currTime > this.qt2) {\n this.qt2 = null;\n data.action = 'BREAK_CLIP_QT2';\n } else if (this.qt3 && currTime > this.qt3) {\n this.qt3 = null;\n data.action = 'BREAK_CLIP_QT3';\n } else {\n return;\n }\n\n this.sendData(data);\n }", "title": "" }, { "docid": "6868bff2c82d4509fd9884990a9c7f66", "score": "0.5363658", "text": "function hoursOfOperation(){\n var startTime = 6; // shops open at 6am\n var endTime = 9; // shops close at 9pm\n var pm = false;\n var currentTime = startTime;\n var workHours = [];\n while(pm === false || currentTime < endTime){\n if (pm === false && currentTime < 12){\n workHours.push(currentTime + ':00am');\n currentTime++;\n } else if (pm === false && currentTime === 12){\n pm = true;\n workHours.push(currentTime + ':00pm');\n currentTime = 1;\n } else {\n workHours.push(currentTime + ':00pm');\n currentTime++;\n }\n }\n return workHours; // returns an array with all available work hours... eg [6am, 7am, 8am, etc.]\n}", "title": "" }, { "docid": "6868bff2c82d4509fd9884990a9c7f66", "score": "0.5363658", "text": "function hoursOfOperation(){\n var startTime = 6; // shops open at 6am\n var endTime = 9; // shops close at 9pm\n var pm = false;\n var currentTime = startTime;\n var workHours = [];\n while(pm === false || currentTime < endTime){\n if (pm === false && currentTime < 12){\n workHours.push(currentTime + ':00am');\n currentTime++;\n } else if (pm === false && currentTime === 12){\n pm = true;\n workHours.push(currentTime + ':00pm');\n currentTime = 1;\n } else {\n workHours.push(currentTime + ':00pm');\n currentTime++;\n }\n }\n return workHours; // returns an array with all available work hours... eg [6am, 7am, 8am, etc.]\n}", "title": "" }, { "docid": "9ce4bae3baa2f3f39f431d28f7ea0307", "score": "0.5335284", "text": "function schedule(time, action) {\r\nlet [alarmH, alarmM] = time.split(':');\r\nlet now = new Date();\r\nnow = now.getHours() * 3600 + now.getMinutes() * 60 + now.getSeconds();\r\nlet difference = parseInt(alarmH) * 3600 + parseInt(alarmM) * 60 - now;\r\nif (difference <= 0) difference += 24 * 3600;\r\nreturn setTimeout(action, difference * 1000);\r\n}", "title": "" }, { "docid": "389b9672a1907181dc86653f2a89893a", "score": "0.53207713", "text": "function rebour(){\n\n //une variable pour la date a laquelle l'etude est paru//\n var dateActuelle = new Date();\n\n //variable pour l'evenement//\n // fin du monde prevu en 2100 selon une étude \"Approaching a state-shift in Earth’s biosphere,\" de 22 chercheurs//\n var dateEvenement = new Date(\"jul 27 00:00:00 2100\");\n\n //on calcule la differences des deux dates puis on divise par 1000 pour les avoirs en seconde//\n var sec = (dateEvenement - dateActuelle) / 1000;\n var n = 24* 3600; //1 jour = 60 x 60 x 24 = n.//\n if (sec > 0){\n //calculer le nombre de jours restants. Le nombre étant en secondes // \n j = Math.floor (sec / n);\n // calculer le nombre d heures restant. 1 heure = 60 x 60 secondes//\n h = Math.floor ((sec - (j * n)) / 3600);\n //meme techniques pour les minutes et les secondes//\n mn = Math.floor ((sec - ((j * n + h * 3600))) / 60);\n sec = Math.floor (sec - ((j * n + h * 3600 + mn * 60)));\n //affiche le compte a rebours//\n \n affiche.innerHTML = j +\" j \"+ h +\" h \"+ mn +\" min \"+ sec + \" s \";\n window.status = j +\" j \"+ h +\" h \"+ mn +\" min \"+ sec + \" s \";\n\n }\n\n tRebour = setTimeout (\"rebour();\", 1000);\n \n}", "title": "" }, { "docid": "fadd3292d6899cd8afd6c6a7e1bb8538", "score": "0.5316741", "text": "function is_open(dining_court){\n var date = today.getDate();\n var currTime = today.getHours() + \":\" + today.getMinutes();\n var i;\n\n var times = get_times(dining_court, date);\n\n if( times.length == 0 ){\n return false;\n }\n\n for(i = 0; i < times.length; i=i+2){\n var startTime = times[i];\n var endTime = times[i+1];\n if( (startTime <= currTime) && (currTime <= endTime) ){\n return true;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "a83c93bfe62e2489539756bd1943fbab", "score": "0.53015864", "text": "function calculateTimeBlock(time) {\n\n // break the time string into parts\n var matches = time.match(/(\\d{1,2}):(\\d{2})([AP]M)/);\n\n // time = :00 means its right on the hour, no class ends right on the hour\n // time = :53 means it ends right before the hour, so +1. No class starts at :53.\n // time = :30 means it starts at half hour. No class ends then.\n // anything else is considered half hour (:20 or :23)\n\n var row = ((\n\n // convert to 24 hour clock\n (parseInt(matches[1]) + ((matches[3] == 'AM' && parseInt(matches[1]) == 12)\n || (matches[3] == 'PM' && parseInt(matches[1]) != 12) ? 12 : 0))\n\n + (matches[2] == '00' ? 0 : // starts on the hour\n (matches[2] == '53' || matches[2] == '50') ? 1 : // ends before the hour\n .5)\n ) - 8) * 2;\n\n return row;\n}", "title": "" }, { "docid": "51ae3df83a3dcf08d9f5db3daeb1481f", "score": "0.52946985", "text": "function turnHoursToMinutes() { }", "title": "" }, { "docid": "a42e16e6372325cf2b7ddf0fe4e36a56", "score": "0.5294458", "text": "function displayTime(time) {\n if (time === 999) {\n return \"Closed\";\n }\n\n else if (time === 240) {\n return \"Unknown\";\n }\n\n else if (time === 0) {\n return \"No Wait\";\n } \n\n else if (time >= 180) {\n return \"3+ hours\";\n }\n\n else if (time > 60) {\n var stringHours = \" hours\";\n var hours = Math.floor(time/60);\n if (hours == 1) {\n stringHours = \" hour\";\n }\n var minutes = time%60;\n if (minutes == 0) {\n return hours.toString() + stringHours;\n }\n return hours.toString() + stringHours + \" \" + minutes.toString() + \" minutes\";\n } \n\n else {\n return time.toString() + \" minutes\";\n }\n}", "title": "" }, { "docid": "c394acc0e88e2aa018884edec3d61beb", "score": "0.52938193", "text": "function calculateTimeLeft(then){\r\n //this line is getting the current time and date\r\n var now = new Date().getTime();\r\n //this line is getting the difference(gap) between now and the selected holiday\r\n var gap = then - now;\r\n\r\n var seconds = 1000;\r\n var minutes = seconds* 60;\r\n var hours = minutes * 60;\r\n var days = hours * 24;\r\n\r\n var d = Math.floor(gap/(days));\r\n var h = parseInt(Math.floor(gap % (days))/ (hours));\r\n var m = parseInt(Math.floor(gap % (hours))/ (minutes));\r\n var s = parseInt(Math.floor(gap % (minutes))/ (seconds));\r\n\r\n document.getElementById('day').innerText = d;\r\n document.getElementById('hour').innerText = h;\r\n document.getElementById('minute').innerText = m;\r\n document.getElementById('second').innerText = s;\r\n\r\n}", "title": "" }, { "docid": "cce1b5d4ffad06e675d04bbf6c235bc6", "score": "0.529099", "text": "function getIdealSleepHours() {\n let idealHours = 8;\n return idealHours*7; \n}", "title": "" }, { "docid": "6f7379072367b6a93b45a6449f6bcdf5", "score": "0.52871746", "text": "function past(h, m, s){\n let hour = h * 60 * 60 * 1000;\n let minute = m * 60 * 1000;\n let second = s * 1000\n \n return hour + minute + second\n }", "title": "" }, { "docid": "3a0e258573eccf2d3e23008971cead44", "score": "0.52697545", "text": "function turnHoursToMinutes(){}", "title": "" }, { "docid": "a0886a7654942031b4e554de89e9c7a9", "score": "0.52633864", "text": "function getNextSubwayTime() {\n\t// Get the schedule information\n\t// TODO: Only update schedule info once a day\n\tgetSubwaySchedule(SUBWAY_ID).then(function (data) {\n\t\t// Get just the information for arrivals\n\t\tvar arrivals = data.data.result.arrivals;\n\n\t\t// Get current time\n\t\tvar now = moment();\n\t\tvar time = now.format(\"HH:mm:ss\");\n\n\t\t// Determine the closest subway time\n\t\tvar closest = getClosestTime(time, arrivals);\n\n\t\t// Get the next subway time\n\t\tvar time_next = getTimeTillNext(time, closest);\n\n\t\t// Render to the Pi\n\t\trenderNext(time_next);\n\t})[\"catch\"](function (err) {\n\t\trenderError(err);\n\t});\n}", "title": "" }, { "docid": "b7d482f8daf2fe93681017573aa8265a", "score": "0.526325", "text": "function calculateTime () {\n var BACFormula = valueFormula1 + valueFormula2 + valueFormula3 + valueFormula4 + valueFormula5 + valueFormula6 + valueFormula7 + valueFormula8 + valueFormula9 + valueFormula10;\n var BACTime = BACFormula/nationality;\n var BACTimeHours = BACTime.toString().split('.')[0];\n var BACTimeMinutes = (BACTime - BACTimeHours)*60;\n var BACTimeDrive = BACTime - alcoholAllowedToDrive/nationality;\n var BACTimeDriveHours = BACTimeDrive.toString().split('.')[0];\n var BACTimeDriveMinutes = (BACTimeDrive - BACTimeDriveHours)*60;\n if (BACTime <= 0){\n document.getElementById(\"timeTillSoberHours\").innerHTML = 0;\n document.getElementById(\"timeTillSoberMinutes\").innerHTML = 0;\n document.getElementById(\"timeTillDriveHours\").innerHTML = 0;\n document.getElementById(\"timeTillDriveMinutes\").innerHTML = 0;\n } else {\n document.getElementById(\"timeTillSoberHours\").innerHTML = BACTimeHours;\n document.getElementById(\"timeTillSoberMinutes\").innerHTML = BACTimeMinutes.toFixed(0);\n document.getElementById(\"timeTillDriveHours\").innerHTML = BACTimeDriveHours;\n document.getElementById(\"timeTillDriveMinutes\").innerHTML = BACTimeDriveMinutes.toFixed(0);\n }\n if (BACTimeDrive <=0){\n document.getElementById(\"timeTillDriveHours\").innerHTML = 0;\n document.getElementById(\"timeTillDriveMinutes\").innerHTML = 0;\n }\n }", "title": "" }, { "docid": "87e16ff3c2b451fcc5689f76d6f68e6e", "score": "0.5244184", "text": "function changehour(clase) {\n\n //si no tiene definido una variable\n if (clase.horaini == undefined || clase.horafin == undefined) {\n clase.horaini = new Date(\"1970-01-01T\" + self.horasLb[0].horaini);\n clase.horafin = newHour(clase.horaini, 1);\n } else {\n //Esto es para que las horas siempre sean netas\n var hour;\n if (clase.horaini.getHours() < 10) {\n hour = \"0\" + clase.horaini.getHours() + \":00:00\";\n clase.horaini = new Date(\"1970-01-01T\" + hour);\n } else {\n clase.horaini = new Date(\"1970-01-01T\" + clase.horaini.getHours() + \":00:00\");\n }\n if (clase.horafin.getHours() < 10) {\n hour = \"0\" + clase.horafin.getHours() + \":00:00\";\n clase.horafin = new Date(\"1970-01-01T\" + hour);\n } else {\n clase.horafin = new Date(\"1970-01-01T\" + clase.horafin.getHours() + \":00:00\");\n }\n }\n\n //si la horaini y horafin son iguales le incrementa una hora a horafin\n if (horaigual(clase.horaini, clase.horafin)) {\n clase.horafin = newHour(clase.horaini, 1);\n }\n //Si la horafin es menor a la ini le asigna 1 + horaini\n if (clase.horafin < clase.horaini) {\n clase.horafin = newHour(clase.horaini, 1);\n }\n\n if (validaHourOcupadas(clase.horaini, clase.horafin)) {\n\n if (self.horasLb.length == 1) {\n clase.horaini = new Date(\"1970-01-01T\" + self.horasLb[0].horaini);\n clase.horafin = newHour(clase.horaini, 1);\n } else {\n var free = [];\n\n free = self.horasLb.filter(function (item) {\n var aux = new Date(\"1970-01-01T\" + item.horaini)\n if (aux >= clase.horafin) {\n return item;\n }\n });\n\n if (free.length == 0) {\n clase.horaini = new Date(\"1970-01-01T\" + self.horasLb[0].horaini);\n clase.horafin = newHour(clase.horaini, 1);\n } else {\n clase.horaini = new Date(\"1970-01-01T\" + free[0].horaini);\n clase.horafin = newHour(clase.horaini, 1);\n }\n }\n }\n //Recalcula los valores de cantidad de hora y precio total\n recalcularModal(clase.horaini, clase.horafin);\n }", "title": "" }, { "docid": "aa7686ea96c3e152c940646b0c61ab3b", "score": "0.520805", "text": "function determineClassName(time) {\n let currentTime = moment();\n let scheduleTime = moment(time, \"h:mma\");\n let currentHour = Number(currentTime.format(\"HH\"));\n let scheduleHour = Number(scheduleTime.format(\"HH\"));\n console.log(currentHour, scheduleHour);\n if (currentHour > scheduleHour) {\n return \"past\";\n } else if (currentHour === scheduleHour) {\n return \"present\";\n } else {\n return \"future\";\n }\n}", "title": "" }, { "docid": "246f950b7c0d1fb58018c98802e13231", "score": "0.5205422", "text": "function tellTime(h, m) {\n\tif (m === 0) {\n\t\tconsole.log(onesAndTeens[h] + \" o' clock\")\n\t} else if (m < 30 && m > 0) {\n\t\tif (m == 1) {\n\t\t\tconsole.log(onesAndTeens[m] + \" minute past \" + onesAndTeens[h]);\n\t\t} else if (m < 20) {\n\t\t\tif (m === 15) {\n\t\t\t\tconsole.log(\"quarter past \" + onesAndTeens[h]);\n\t\t\t} else {\n\t\t\t\tconsole.log(onesAndTeens[m] + \" minutes past \" + onesAndTeens[h]);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"twenty \" + onesAndTeens[m%20] + \" minutes past \" + onesAndTeens[h]);\n\t\t}\n\t} else {\n\t\tif (m === 30) {\n\t\t\tconsole.log(\"half past \" + onesAndTeens[h]);\n\t\t} else {\n\t\t\tvar remainingMinutes = 60 - m;\n\n\t\t\tif (remainingMinutes === 1) {\n\t\t\t\tconsole.log(onesAndTeens[remainingMinutes] + \" minute to \" + onesAndTeens[h+1]);\n\t\t\t} else if (remainingMinutes < 20) {\n\t\t\t\tif (remainingMinutes === 15) {\n\t\t\t\t\tconsole.log(\"quarter to \" + onesAndTeens[h+1]);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(onesAndTeens[remainingMinutes] + \" minutes to \" + onesAndTeens[h+1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log(\"twenty \" + onesAndTeens[remainingMinutes%20] + \" minutes to \" + onesAndTeens[h+1]);\n\t\t\t}\n\n\t\t}\n\t}\n}", "title": "" }, { "docid": "75941aeb98af2d15aa4e44b3e0ac95b7", "score": "0.52030414", "text": "function descTime (time)\n{\n var hour = Math.floor (time / 3600);\n var min = Math.floor ((time - hour * 3600) / 60);\n\n var hours = hour == 0 ? '' : hour == 1 ? '1 hour' : hour + ' hours'\n var mins = min == 0 ? '' : min == 1 ? '1 minute' : min + ' minutes'\n\n return hours + (hours ? ' and ' : '') + mins;\n}", "title": "" }, { "docid": "10ce8424a70bd1ec44548bd5319a3fea", "score": "0.5192957", "text": "function startStopAlarm(smartOn, fromhr, frommin, tohr, tomin, base, canvasOverlayConf, splitup) {\n if (smartOn) {\n var fromstr = fixLen(fromhr) + fixLen(frommin);\n var tostr = fixLen(tohr) + fixLen(tomin);\n var smartStartPoint = new Date(base);\n var early = null;\n var late = null;\n for (var i = 0; i < splitup.length; i++) {\n var teststr1 = smartStartPoint.format(\"hhmm\");\n var smartStartPoint1 = smartStartPoint;\n smartStartPoint = smartStartPoint.addMinutes(mCommonConst().sampleIntervalMins);\n var teststr2 = smartStartPoint.format(\"hhmm\");\n if (early === null && fromstr >= teststr1 && fromstr <= teststr2) {\n early = returnAbsoluteMatch(smartStartPoint1, smartStartPoint, fromstr);\n }\n if (late === null && tostr >= teststr1 && tostr <= teststr2) {\n late = returnAbsoluteMatch(smartStartPoint1, smartStartPoint, tostr);\n }\n if (late !== null && early !== null) {\n break;\n }\n }\n if (early !== null) {\n var earlyOverlay = {\n dashedVerticalLine : {\n name : \"start\",\n x : early,\n lineWidth : 1,\n yOffset : 0,\n dashPattern : [ 1, 4 ],\n color : \"rgb(76, 217, 100)\",\n shadow : false\n }\n };\n canvasOverlayConf.show = true;\n canvasOverlayConf.objects.push(earlyOverlay);\n }\n if (late !== null) {\n var lateOverlay = {\n dashedVerticalLine : {\n name : \"end\",\n x : late,\n lineWidth : 1,\n yOffset : 0,\n dashPattern : [ 1, 4 ],\n color : \"rgb(255, 59, 48)\",\n shadow : false\n }\n };\n canvasOverlayConf.show = true;\n canvasOverlayConf.objects.push(lateOverlay);\n }\n }\n}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.5191716", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.5191716", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.5191716", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.5191716", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.5191716", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "94bc74fcad0e5d16974a90fbad7d69aa", "score": "0.5191716", "text": "function turnHoursToMinutes() {}", "title": "" }, { "docid": "62bd1e7dadfc3e2253f57fe582b520f6", "score": "0.5185376", "text": "function timeHandler(timeAry) {\n if (timeAry[1] === dataObj.everySecondTrig) {\n everySecond(timeAry[1]);\n if (timeAry[1] === 59) {\n dataObj.everySecondTrig = 0;\n } else {\n dataObj.everySecondTrig++; \n }\n } else if (Math.abs(timeAry[1] - dataObj.everySecondTrig) >= 2) {\n dataObj.everySecondTrig = timeAry[1] + 1;\n }\n \n //everyMinute(timeAry[2]);\n \n if (timeAry[1] % 30 === 0) {\n if (dataObj.computationReady) {\n everyThirty(timeAry[1]);\n dataObj.computationReady = false;\n } else {\n //console.log(\"Already computered.\");\n }\n } else {\n if (dataObj.computationReady === false) {\n dataObj.computationReady = true;\n }\n }\n}", "title": "" }, { "docid": "57ef48d32302a81476d1d229fe52dc88", "score": "0.5172554", "text": "function isOpen(openString) {\n var openPeriods = {\n \"Monday\": \"Closed\",\n \"Tuesday\": \"Closed\",\n \"Wednesday\": \"Closed\",\n \"Thursday\": \"Closed\",\n \"Friday\": \"Closed\",\n \"Saturday\": \"Closed\",\n \"Sunday\": \"Closed\"\n };\n if (typeof openString !== 'undefined' && openString !== \"\") { \n var daysOfTheWeek = [\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"];\n var shiftWeek = function(startOfWeek) {\n var tmp = daysOfTheWeek.slice(0);\n var shift = tmp.indexOf(startOfWeek) - 1;\n for(var i = 0; i <= shift; i++){\n tmp.push(tmp.shift());\n }\n return tmp;\n }\n var cleanArray = function(arr) {\n var result = [];\n arr = arr.filter(Boolean);\n for (var i = 0; i < arr.length; i++) {\n result.push(arr[i].trim());\n }\n return result;\n }\n var milTime = function(hour,nextDayCheck) {\n if (typeof hour !== 'undefined') {\n if (hour.indexOf(\":\") > -1) {\n var min = (parseInt(hour.substring((hour.indexOf(\":\")+1),(hour.indexOf(\":\")+3)),10) / 60);\n } else {\n var min = 0;\n }\n if (hour.indexOf(\"p.m.\") > -1) {\n var hr = parseInt(hour,10) + 12;\n } else if (nextDayCheck) {\n var hr = parseInt(hour,10) + 24;\n } else {\n var hr = parseInt(hour,10);\n }\n return (hr + min);\n } else {\n return 0;\n }\n }\n var normalizedOpenString = openString.replace(/midnight/ig,'12 a.m.').replace(/noon/ig,'12 p.m.').replace(/open/ig,'-12 a.m.');\n var dayStrings = normalizedOpenString.split(\";\");\n for (var i = 0; i < dayStrings.length; i++) {\n var dayString = dayStrings[i];\n var days = dayString.split(\"=\")[0];\n var dayRange = cleanArray(days.split(\"-\"));\n var hours = dayString.split(\"=\")[1];\n var hourRange = cleanArray(hours.split(\"-\"));\n var times = [milTime(hourRange[0], false),milTime(hourRange[1], true)];\n\n if (dayRange.length === 1) {\n openPeriods[dayRange[0]] = times;\n } else {\n var week = shiftWeek(dayRange[0]);\n var endDay = week.indexOf(dayRange[1]);\n for (var j = 0; j <= endDay; j++) {\n openPeriods[week[j]] = times;\n }\n }\n }\n }\n return openPeriods;\n}", "title": "" }, { "docid": "eb5cf47f3367273a5c3228a1cf0ccbe0", "score": "0.5168354", "text": "function onTime(input) {\n let examHour = Number(input.shift());\n let examMinutes = Number(input.shift());\n let arrivalHours = Number(input.shift());\n let arrivalMinutes = Number(input.shift());\n\n let examTotalMinutes = examHour * 60 + examMinutes;\n let arrivalTotalMinutes = arrivalHours * 60 + arrivalMinutes;\n\n let difference = Math.abs(examTotalMinutes - arrivalTotalMinutes);\n\n if (examTotalMinutes > arrivalTotalMinutes) {\n if (difference > 30) {\n console.log('Early');\n } else if (difference <= 30) {\n console.log('On time');\n }\n\n if (difference <= 59) {\n console.log(`${difference} minutes before the start`);\n } else {\n let minutes = difference % 60;\n let minutesToPrint = minutes < 10 ? \"0\" + minutes : minutes.toString();\n console.log(`${parseInt(difference / 60)}:${minutesToPrint} hours before the start`);\n }\n } else if (examTotalMinutes < arrivalTotalMinutes) {\n console.log('Late');\n\n if (difference <= 59) {\n console.log(`${difference} minutes after the start`);\n } else {\n let minutes = difference % 60;\n let minutesToPrint = minutes < 10 ? \"0\" + minutes : minutes.toString();\n console.log(`${parseInt(difference / 60)}:${minutesToPrint} hours after the start`);\n }\n } else {\n console.log('On time');\n }\n}", "title": "" }, { "docid": "21a759c37d42094239e5c6b14ff19b1c", "score": "0.5166497", "text": "function compareHour(){\n var currentHour = moment().hours();\n console.log(currentHour);\n $(\".time-block\").each(function(){\n // parses schedule time out as interger for comparison\n var schedTime = parseInt($(this).attr(\"id\").split(\"-\")[1]);\n console.log(schedTime);\n \n\n if (schedTime < currentHour){\n $(this).addClass(\"past\");\n } \n else if (schedTime === currentHour){\n $(this).removeClass(\"past\");\n $(this).addClass(\"present\"); \n } \n else {\n $(this).removeClass(\"past\");\n $(this).removeClass(\"present\");\n $(this).addClass(\"future\");\n }\n\n \n \n });\n }", "title": "" }, { "docid": "24f1a81425f6c1255fe521a7d7c0646f", "score": "0.5165617", "text": "function HumaneSocietyofMarathonCounty() {\r\n\tvar slot = document.getElementById(\"HumaneSocietyofMarathonCounty\");\r\n\t/* (Mon & Tues) 12pm - 5pm (Wed & Thurs) Closed (Fri & Sat) 12pm - 5pm (Sun) Closed */\r\n\tif(((1 == day && 11 <= hour && 16 >= hour)||(2 == day && 11 <= hour && 16 >= hour)||(5 == day && 11 <= hour && 16 >= hour)||(6 == day && 11 <= hour && 16 >= hour))&&\r\n\t\t(a === \"All of Wausau\"|| a === \"Wausau\")&&\r\n\t (b === \"Under 18\" || b === \"18-20\" || b === \"21 and Over\")&&\r\n\t\t(c >= 0)&&\r\n\t\td){\r\n\t \tslot.classList.remove(\"hide\");\r\n slot.classList.add(\"specificEventWausau\");\r\n\t} else {\r\n\t\tslot.classList.remove(\"specificEventWausau\");\r\n \t\tslot.classList.add(\"hide\");\r\n }\r\n}", "title": "" }, { "docid": "fddd95f2558af42fa07323881ba2f852", "score": "0.5165566", "text": "function past(h, m, s) {\n const MAX_HOUR = 23, MAX_MINUTES = MAX_SECONDS= 59;\n const MIN_HOUR = MIN_MINUTES = MIN_SECONDS = 0;\n const SECONDS_IN_MINUTE = 60, SECONDS_IN_HOUR = SECONDS_IN_MINUTE * 60;\n const MILLI = 1000;\n const condition = h <= MAX_HOUR && h >= MIN_HOUR && m <= MAX_MINUTES && m >= MIN_MINUTES && s <= MAX_SECONDS && s >= MIN_SECONDS;\n if (condition) {\n return (h * SECONDS_IN_HOUR + m * SECONDS_IN_MINUTE + s) * MILLI;\n }\n return -1;\n}", "title": "" }, { "docid": "59da3aa4aebfbcdf2d0d63d772b3f366", "score": "0.5152162", "text": "function schedule(time, action) {\n let [alarmH, alarmM] = time.replace('.', ':').split(':');\n let now = new Date();\n now = now.getHours() * 3600 + now.getMinutes() * 60 + now.getSeconds();\n// print(\"Time now:\" + now);\n let difference = parseInt(alarmH) * 3600 + parseInt(alarmM) * 60 - now;\n if (difference <= 0) difference += 24 * 3600;\n\n return setTimeout(action, difference * 1000);\n}", "title": "" }, { "docid": "cceb3b338dc11379098cc732f9963216", "score": "0.5145768", "text": "function alarmTime(player) {\n return player.date - 60000;\n}", "title": "" }, { "docid": "beea993d1c216c6015a5995e6250e936", "score": "0.5141342", "text": "function timeUpdate() {\n //check current \n var currentHour = moment().hour();\n \n\n //pull time block\n $(\".time-block\").each(function () {\n var blockHour = parseInt($(this).attr(\"id\").split(\"hour\")[1]);\n\n // loop - compare current time to time block to determing past, present, or future\n\n //check if hour is in the past\n if (blockHour < currentHour) {\n $(this).addClass(\"past\");\n $(this).removeClass(\"present\");\n $(this).removeClass(\"future\");\n }\n //check if hour is in the present \n else if (blockHour === currentHour) {\n $(this).removeClass(\"past\");\n $(this).addClass(\"present\");\n $(this).removeClass(\"future\");\n }\n //check if hour is in the future\n else {\n $(this).removeClass(\"past\");\n $(this).removeClass(\"present\");\n $(this).addClass(\"future\");\n }\n })\n}", "title": "" }, { "docid": "877682f71e61ef41acdaa3feffe9ff2d", "score": "0.51333797", "text": "function bez2_time( x0, x1, x2, x3, time, t0, t1 )\n{\n var v, t;\n\n t = t0 + ( t1 - t0 ) * 0.5;\n v = bezier( x0, x1, x2, x3, t );\n if ( Math.abs( time - v ) > .0001 ) {\n if ( v > time )\n t1 = t;\n else\n t0 = t;\n return bez2_time( x0, x1, x2, x3, time, t0, t1 );\n }\n else\n return t;\n}", "title": "" }, { "docid": "d48931aedfb21339e7a519c52b69a5b5", "score": "0.513241", "text": "constructor(time, open, high, low, close){\n this.time = time;\n this.open = open;\n this.high = high;\n this.low = low;\n this.close = close;\n }", "title": "" }, { "docid": "9e271896abaa760753e07ac49ec73b68", "score": "0.5130541", "text": "function SubwayWausauTwo() {\r\n\tvar slot = document.getElementById(\"SubwayWausauTwo\");\r\n var now = new Date();\r\n\tvar day = now.getDay();\r\n var hour = now.getHours();\r\n\tvar a = document.getElementById(\"city\").value;\r\n\tvar b = document.getElementById(\"age\").value; \r\n\tvar c = document.getElementById(\"spending\").value;\r\n\tvar d = document.getElementById(\"choiceEat\").checked;\r\n\t/* Mon-Fri 7am-10pm Sat&Sun 8am-9pm */\r\n\tif(((0 == day && 7 <= hour && 20 >= hour)||(1 == day && 6 <= hour && 21 >= hour)||(2 == day && 6 <= hour && 21 >= hour)||(3 == day && 6 <= hour && 21 >= hour)||(4 == day && 6 <= hour && 21 >= hour)||(5 == day && 6 <= hour && 21 >= hour)||(6 == day && 7 <= hour && 20 >= hour))&&\r\n\t\t( a === \"All of Wausau\"|| a === \"Wausau\") &&\r\n\t (b === \"Under 18\" || b === \"18-20\" || b === \"21 and Over\" )&&\r\n\t\tc >= 5 &&\r\n\t\td){\r\n\t\tslot.classList.remove(\"hide\");\r\n slot.classList.add(\"specificEventWausau\");\r\n\t} else {\r\n\t\tslot.classList.remove(\"specificEventWausau\");\r\n \t\tslot.classList.add(\"hide\");\r\n\t}\r\n}", "title": "" }, { "docid": "223c15e4d8b9f0f82f2410af4a63617a", "score": "0.5125062", "text": "function timeCheck() {\n var dayHour = parseInt(moment().format(\"k\"))\n var day = moment().format(\"dd\");\n console.log(dayHour)\n console.log(day)\n $(\".plan\").each(function () {\n var blockTime = parseInt($(this).attr(\"data-time\"));\n console.log(blockTime);\n \n \n\n if (dayHour === blockTime) {\n $(this).removeClass(\"past\");\n $(this).removeClass(\"future\");\n $(this).addClass(\"present\");\n } else if (dayHour < blockTime) {\n $(this).removeClass(\"past\");\n $(this).removeClass(\"present\");\n $(this).addClass(\"future\");\n } else if (dayHour === 9 && day === \"Mo\"){\n $(\"#9am\").removeClass(\"present\")\n $(\"#9am\").removeClass(\"future\")\n $(\"#9am\").removeClass(\"past\")\n $(\"#9am\").addClass(\"mith\")\n $(this).addClass(\"past\");\n console.log(\"I guess it worked?\")\n } else if (dayHour === 11 && day === \"Th\"){\n $(\"#11am\").removeClass(\"present\")\n $(\"#11am\").removeClass(\"future\")\n $(\"#11am\").removeClass(\"past\")\n $(\"#11am\").addClass(\"mith\")\n $(this).addClass(\"past\");\n console.log(\"I guess it worked?\")\n }else if (dayHour === 12 && day === \"We\"){\n $(\"#12pm\").removeClass(\"present\")\n $(\"#12pm\").removeClass(\"future\")\n $(\"#12pm\").removeClass(\"past\")\n $(\"#12pm\").addClass(\"mith\")\n $(this).addClass(\"past\");\n console.log(\"I guess it worked?\")\n }else if (dayHour === 14 && day === \"Tu\"){\n $(\"#2pm\").removeClass(\"present\")\n $(\"#2pm\").removeClass(\"future\")\n $(\"#2pm\").removeClass(\"past\")\n $(\"#2pm\").addClass(\"mith\")\n $(this).addClass(\"past\");\n console.log(\"I guess it worked?\")\n }else if (dayHour === 17 && day === \"Fr\"){\n $(\"#5pm\").removeClass(\"present\")\n $(\"#5pm\").removeClass(\"future\")\n $(\"#5pm\").removeClass(\"past\")\n $(\"#5pm\").addClass(\"mith\")\n $(this).addClass(\"past\");\n console.log(\"I guess it worked?\")\n }else {\n $(this).removeClass(\"future\");\n $(this).removeClass(\"present\");\n $(this).addClass(\"past\");\n // } if \n // }else {\n // $(\"#9am\").removeClass(\"mith\")\n // console.log(\"nope\")\n }\n \n // //if (dayHour < 22) {\n // $(\"#17\").text(\"This is a MONDO hint.\")\n // }\n \n \n })\n $(\".saveBtn\").on(\"click\",function (event) {\n \n console.log(dayHour)\n var activity = $(this).siblings(\".textarea\").val();\n console.log(activity);\n if (($(\"#9am\").val().toLowerCase().trim() === \"yiannis johnson\") && (dayHour === 9) && (day === \"Mo\")) {\n // alert(\"oh I see. Well then...\");\n // lucky = prompt(\"What's the password\");\n // console.log(lucky);\n // if (lucky !== \"ducksMan\") {\n // while (lucky !== \"ducksMan\") {\n // lucky = prompt(\"Nice try, but seriously \\nI need the right answer\"); \n // }\n // }else {\n // alert(\"Yea, you got that right...Ducks, man.\");\n // $(\"#10am\").val(\"\")\n // const surprise = $(\"<div>\").addClass(\"row\");\n // const newHour = $(\"<div>\").addClass(\"col-2 hour d-flex justify-content-end\");\n // const newHourTime = newHour.text(\"11PM\");\n // const newText = $(\"<textarea>\").addClass(\"col-8 textarea description plan text-warning bg-dark\");\n // const newTextEntry = newText.val(\"This could really use some contexxxt\").attr(\"id\",\"last\");\n // const newBtn = $(\"<button>\").addClass(\"col-1 saveBtn\").attr(\"src\", \"./images/proper/save-24.png\");\n // const newIcon= $(\"<img>\").attr(\"src\", \"./images/proper/save-24.png\");\n // newBtn.append(newIcon);\n // containerEl.append(surprise.append(newHour, newHourTime, newText, newTextEntry, newBtn));\n \n // const newImg= $(\"<img>\").attr(\"src\", \"https://pbs.twimg.com/profile_banners/342926562/1609481012/1500x500\");\n\n // containerEl.append(surprise.append(newImg));\n alert(\"55251\"); \n } else {\n console.log(\"fail\");\n }//end Monday\n if (($(\"#2pm\").val().toLowerCase().trim() === \"customer service department\") && (dayHour === 14) && (day === \"Tu\")) {\n alert(\"22513\"); \n } else {\n console.log(\"fail\");\n } //end Tuesday \n if (($(\"#12pm\").val().toLowerCase().trim() === \"but hey we need your money\") && (dayHour === 12) && (day === \"We\")) {\n alert(\"45342\"); \n } else {\n console.log(\"fail\");\n }//end wednesday\n\n if (($(\"#11am\").val().toLowerCase().trim() === \"#637b-89\") && (dayHour === 11) && (day === \"Th\")) {\n alert(\"14343\"); \n } else {\n console.log(\"fail\");\n } //end thursday\n \n if (($(\"#5pm\").val().trim() === \"Keep your eyes on the horiSEOn\") && (dayHour === 17) && (day === \"Fr\")) { \n alert(\"21344\"); \n } else {\n console.log(\"fail\");} //end Friday\n \n })\n \n }", "title": "" }, { "docid": "917e940bb92e033dd5de2c22f9c6ece6", "score": "0.51183295", "text": "function covnertToTime(time) {\r\n if (time > 12) {\r\n return `<span class=\"time\">${time - 12}PM</span>`;\r\n } else {\r\n return `<span class=\"time\">${time}AM</span>`;\r\n }\r\n}", "title": "" }, { "docid": "2a01c6a75a92b499671964d2c6c14dae", "score": "0.511522", "text": "function opensAfter(db, time) {\n // get time = {hour: 20, minute: 40}\n // const { hour, minute } = convertTo24(time);\n var hour = time.hour,\n minute = time.minute;\n var now = moment({\n hour: hour,\n minute: minute\n }).format();\n var openThisDay = db.filter(function (e) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = (0, _getIterator2.default)(e.open), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var each = _step2.value;\n\n var _convertTo3 = convertTo24(each.time.closeAt),\n hourEnd = _convertTo3.hour,\n minuteEnd = _convertTo3.minute;\n\n if (now < moment({\n hour: hourEnd,\n minute: minuteEnd\n }).format()) return true;\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n });\n return openThisDay;\n}", "title": "" }, { "docid": "0a9fea84e5341af0554e500fa2c2cae4", "score": "0.51145643", "text": "function timeDurationSubtract30(timeString){\t\n\tvar min = parseInt(timeString.substring(timeString.length-3,timeString.length-1));\n\tvar hour = parseInt(timeString.substring(0,timeString.length-4));\n\n\t\tif(!(min==0&hour==0)){\n\t\t\tif(min==0){\n\t\t\t\thour --;\n\t\t\t\tmin = 30;\n\t\t\t} else if (min==30){\n\t\t\t\tmin = \"00\"\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(hour!=0){\n\t\t\t\t\thour = hour - 1;\n\t\t\t\t\tmin = min + 30;\n\t\t\t\t}\n\t\t\t\tmin = \"00\";\n\t\t\t}\n\t\t}\n\n\t\tif(min==0){\n\t\t\tresult = hour+\":00h\";\n\t\t}else {\n\t\t\tresult = hour+\":\"+min+\"h\";\t\n\t\t}\n\treturn result;\n}", "title": "" }, { "docid": "76a6a51873ba293d6aaa84807e1e0203", "score": "0.51114595", "text": "function checkTimes(day, hours, toalett) {\n console.log(\"hours: \" + hours + \" - \" + \"search: \" + searchObj.open);\n\n var open = 0;\n var close = 0;\n var doesMatch = true;\n if(day === 6) { //check saturday\n open = parseInt(toalett.tid_lordag.substring(0, 2) + toalett.tid_lordag.substring(3, 5));\n close = parseInt(toalett.tid_lordag.substring(8, 10) + toalett.tid_lordag.substring(11, 13));\n\n if(hours < open || hours > close) {\n doesMatch = false;\n }\n } else if (day === 0) { // check sunday\n open = parseInt(toalett.tid_sondag.substring(0, 2) + toalett.tid_sondag.substring(3, 5));\n close = parseInt(toalett.tid_sondag.substring(8, 10) + toalett.tid_sondag.substring(11, 13));\n if(hours < open || hours > close) {\n doesMatch = false;\n }\n } else { // check mon-fri\n open = parseInt(toalett.tid_hverdag.substring(0, 2) + toalett.tid_hverdag.substring(3, 5));\n close = parseInt(toalett.tid_hverdag.substring(8, 10) + toalett.tid_hverdag.substring(11, 13));\n\n if(hours < open || hours > close) {\n doesMatch = false;\n }\n }\n return doesMatch;\n}", "title": "" }, { "docid": "31ea644b1895ac657a7d02088b8634f9", "score": "0.51067847", "text": "function twelveHourTime(currentHour) {\n\t\tif (currentHour > 12) {\n\t\t\tcurrentHour = (currentHour - 12);\n\t\t}\n\t\treturn currentHour;\n\t} // end twelveHourTime function", "title": "" }, { "docid": "601d6d3e0e5b3a0cb3d643f1daacf950", "score": "0.51049703", "text": "function timeToBucket(time) {\n var hour = time.getHours();\n var quarter = Math.floor(time.getMinutes() / 15);\n return (hour * 4 + quarter);\n}", "title": "" }, { "docid": "81ad883dcfbc546767713c93d6649ed8", "score": "0.50975347", "text": "function secInGameOrOvertime(style) {\n const secInMinute = 60;\n const minInNBA = 48;\n const minInFIBA = 40;\n const minInOvertime = 5;\n\n return cond([\n [equals('nba'), always(multiply(minInNBA, secInMinute))],\n [equals('fiba'), always(multiply(minInFIBA, secInMinute))],\n [equals('overtime'), always(multiply(minInOvertime, secInMinute))],\n [T, always(0)]\n ])(style);\n}", "title": "" }, { "docid": "80260293dd3cd6dfb7dc86e107ca9108", "score": "0.50963145", "text": "function getTime(time) {\n if (time <= 10) {\n return \"Good Morning\";\n } else if (time > 10 && time <= 20) {\n return \"Good Afternoon\";\n } else {\n return \"Good Evening\";\n }\n}", "title": "" }, { "docid": "e81f8c77bdf328202c58eb214001654c", "score": "0.50958157", "text": "function bookingAfter(e) {\n // Do not allow viewing bookings in the past\n var now = Math.ceil(new Date().getTime() / 1000);\n if(closeDateTime - 86400 < now)\n document.getElementById(\"bookingBefore\").classList.add(\"show\");\n\n // Advance the unix time by one day\n openDateTime += 86400;\n closeDateTime += 86400;\n vmMainScreen.now = new Date(vmMainScreen.now.getFullYear(), vmMainScreen.now.getMonth(), vmMainScreen.now.getDate() + 1, vmMainScreen.now.getHours(), vmMainScreen.now.getMinutes());\n refreshBooking();\n}", "title": "" }, { "docid": "8f3cd36b75ebe9931d491508789e4a6c", "score": "0.50886285", "text": "isFinalTimeInRange(time) {\n const convertedTime = FMCMainDisplay.hhmmToMinutes(time.padStart(4,\"0\"));\n return 0 <= convertedTime && convertedTime <= 90;\n }", "title": "" }, { "docid": "b7e6812edc546f5a8feca6548a35edc0", "score": "0.5082607", "text": "getWaitTime(t) {\n let _now = new Date();\n let _then = new Date(parseInt(t));\n let _t = (_now - _then) / 1000;\n let _m = Math.floor(_t / 60);\n let _s = _t - (_m * 60);\n\n _m = this._timeDigit(_m); //pretty strings\n _s = this._timeDigit(_s);\n\n return `${_m}:${_s}`; \n }", "title": "" }, { "docid": "25762041a5860e07539623df834cd79f", "score": "0.5077751", "text": "function displayEndTime(timestamp) {\n const end = new Date(timestamp);\n const hour = end.getHours();\n //this makes sure it doesn't return time in 24 hours clock instead in 12 hours...\n const adjustedHour = hour > 12 ? hour - 12 : hour;\n const minutes = end.getMinutes();\n endTime.textContent = `Be Back At ${adjustedHour}:${minutes < 10 ? '0' : ''}${minutes}`;\n}", "title": "" }, { "docid": "c8d1bbcbacc35cc4f0b0a6c5065c8a40", "score": "0.50662494", "text": "breakTimes() {\r\n const h = this.state.clock.getHours()\r\n\t\tconst m = this.state.clock.getMinutes()\r\n\t\tconst s = this.state.clock.getSeconds()\r\n\r\n //this is the part that sets the breaks\r\n if( this.state.begun){\r\n if((h == 14 || 8 ) && m == 0 && s == 0){\r\n this.stopTimer();\r\n //starts clock back up again after a period of time (15 minutes in milliseconds) has passed\r\n setTimeout(this.startTimer, 900000);\r\n }\r\n //this part sets the lunch break\r\n else if (h == 11 && m == 0 && s == 0){\r\n this.stopTimer();\r\n //starts clock back up again after a period of time (30 minutes) has passed\r\n setTimeout(this.startTimer, 1800000);\r\n }\r\n //this part stops the clock for the end of the day, and then starts up in the morning\r\n else if (h == 15 && m == 25 && s == 0) {\r\n this.stopTimer();\r\n setTimeout(this.startTimer, 49200000);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "24493cde21f0b42e64ff023ece178c34", "score": "0.50642097", "text": "function turnHoursToMinutes(){\n \n}", "title": "" }, { "docid": "93cafe1a7f3293e5cd669cc9c112c975", "score": "0.5062646", "text": "function getHourMovement(minute){\n if (minute >= 15 && minute < 30)\n return 0.505;\n else if (minute >= 30 && minute < 45)\n return 0.51;\n else if (minute >= 45)\n return 0.52;\n else\n return 0.5;\n }", "title": "" }, { "docid": "236c066c294054ec1e98d3302d50c3ec", "score": "0.50588185", "text": "function getLogoffTime()\n{\n var d = new Date();\n var Horas=d.getHours();\n Horas=((Horas>12)?Horas-12:Horas);\n var Minutos=((d.getMinutes()<10)?\":0\":\":\")+d.getMinutes();\n var Segundos=((d.getSeconds()<10)?\":0\":\":\")+d.getSeconds();\n OffTimeValue=(Horas+Minutos+Segundos);\n //console.log(\"Hora de actual: \"+OffTimeValue);\n offHoras=d.getHours();\n offMinutos=d.getMinutes();\n offSegundos=d.getSeconds();\n timer();\n}", "title": "" }, { "docid": "7935550985d70b103d0e5cdfab3649df", "score": "0.5054844", "text": "function displayEndTime(timestamp) {\n const end = new Date(timestamp);\n const hour = end.getHours();\n const adjustedHour = hour > 12 ? hour - 12 : hour;\n const minutes = end.getMinutes();\n endTime.textContent = `Be Back At ${adjustedHour}:${minutes < 10 ? '0' : ''}${minutes}`;\n}", "title": "" }, { "docid": "596df1507c5f89d44be70ddadb750602", "score": "0.5052115", "text": "function openHour() {\n var today = new Date();\n var hourNow = today.getHours();\n return hourNow;\n}", "title": "" }, { "docid": "9f66ea5b28683b31a9126080ab5be5d7", "score": "0.50502414", "text": "function addTheTime() {\n\n if (currentHour > 9) {\n $('.middle-9').addClass('past');\n } else if (currentHour === 9) {\n $('.middle-9').addClass('present');\n } else if (currentHour < 9) {\n $('.middle-9').addClass('future');\n // had to add a second 'past' here because it keept looping through so in every scenario the past would still be considered the future. I couldn't figure out how to change that so I added that temporary else statement in its place\n } else (currentHour > 17); {\n $('.middle-9').addClass('past')\n }\n\n if (currentHour > 10) {\n $('.middle-10').addClass('past');\n } else if (currentHour === 10) {\n $('.middle-10').addClass('present');\n } else if (currentHour < 10) {\n $('.middle-10').addClass('future');\n } else (currentHour > 17); {\n $('.middle-10').addClass('past')\n }\n\n if (currentHour > 11) {\n $('.middle-11').addClass('past');\n } else if (currentHour === 11) {\n $('.middle-11').addClass('present');\n } else if (currentHour < 11) {\n $('.middle-11').addClass('future');\n } else (currentHour > 17); {\n $('.middle-11').addClass('past')\n }\n\n if (currentHour > 12) {\n $('.middle-12').addClass('past');\n } else if (currentHour === 12) {\n $('.middle-12').addClass('present');\n } else if (currentHour < 12) {\n $('.middle-12').addClass('future');\n } else (currentHour > 17); {\n $('.middle-12').addClass('past')\n }\n\n if (currentHour > 13) {\n $('.middle-13').addClass('past');\n } else if (currentHour === 13) {\n $('.middle-13').addClass('present');\n } else if (currentHour < 13) {\n $('.middle-13').addClass('future');\n } else (currentHour > 17); {\n $('.middle-13').addClass('past')\n }\n\n if (currentHour > 14) {\n $('.middle-14').addClass('past');\n } else if (currentHour === 14) {\n $('.middle-14').addClass('present');\n } else if (currentHour < 14) {\n $('.middle-14').addClass('future');\n } else (currentHour > 17); {\n $('.middle-14').addClass('past')\n }\n\n if (currentHour > 15) {\n $('.middle-15').addClass('past');\n } else if (currentHour === 15) {\n $('.middle-15').addClass('present');\n } else if (currentHour < 15) {\n $('.middle-15').addClass('future');\n } else (currentHour > 17); {\n $('.middle-15').addClass('past')\n }\n\n if (currentHour > 16) {\n $('.middle-16').addClass('past');\n } else if (currentHour === 16) {\n $('.middle-16').addClass('present');\n } else if (currentHour < 16) {\n $('.middle-16').addClass('future');\n } else (currentHour > 17); {\n $('.middle-16').addClass('past')\n }\n\n if (currentHour > 17) {\n $('.middle-17').addClass('past');\n } else if (currentHour === 17) {\n $('.middle-17').addClass('present');\n } else if (currentHour < 17) {\n $('.middle-17').addClass('future');\n } else (currentHour > 17); {\n $('.middle-17').addClass('past')\n }\n\n}", "title": "" }, { "docid": "22732eaaf171138205e695db8aa0bc51", "score": "0.50496167", "text": "function convertCompletionTimeToStars(time) {\n let newStarValue;\n if (time < 30) {\n newStarValue = 0;\n } else if (time >= 30 && time < 45) {\n newStarValue = 1;\n } else if (time >= 45 && time < 60) {\n newStarValue = 2;\n } else if (time >= 60) {\n newStarValue = 3;\n }\n\n return newStarValue;\n }", "title": "" }, { "docid": "323483bbb48e1b260a05a7720dc03b3d", "score": "0.5048865", "text": "function PropsTimeToHMS() {\n\t\tlet fk_state = JSON.parse(props.data);\n\t\tfor (var key in fk_state) {\n\t\t\t// eslint-disable-next-line\n\t\t\tfk_state[key].forEach((element, i) => {\n\t\t\t\tfk_state[key][i].open = secondsToHms(fk_state[key][i].open);\n\t\t\t\tfk_state[key][i].close = secondsToHms(fk_state[key][i].close);\n\t\t\t})\n\t\t}\n\t\tsetSpecialDay(fk_state);\n\t}", "title": "" }, { "docid": "61b8cf512a6aee249709713f05c57906", "score": "0.50427926", "text": "function evalTBD(time) {\n if (time === '5:55 pm')\n return 'TBD';\n else\n return time;\n }", "title": "" }, { "docid": "5aed8da22961f7543ba5d556970938b9", "score": "0.5042193", "text": "function sh(t,h,m,s,l,i) { // t: julius year, h: hour, m: minute, s: second,\n // l: longitude, i: time difference\n d = ((s / 60 + m) / 60 + h) / 24 ; // elapsed hour (from 0:00 a.m.)\n th = 100.4606 + 360.007700536 * t + 0.00000003879 * t * t - 15 * i ;\n th += l + 360 * d ;\n while(th >= 360) { th -= 360 ; }\n while(th < 0) { th += 360 ; }\n return th ;\n }", "title": "" }, { "docid": "54aed11ffde4ad41afc516575376c4f9", "score": "0.50419277", "text": "function adjtime(tim) {\n if (player.STEALTH) player.updateStealth(-tim);\n if (player.UNDEADPRO) player.updateUndeadPro(-tim);\n if (player.SPIRITPRO) player.updateSpiritPro(-tim);\n if (player.CHARMCOUNT) player.updateCharmCount(-tim);\n // stop time\n if (player.HOLDMONST) player.updateHoldMonst(-tim);\n if (player.GIANTSTR) player.updateGiantStr(-tim);\n if (player.FIRERESISTANCE) player.updateFireResistance(-tim);\n if (player.DEXCOUNT) player.updateDexCount(-tim);\n if (player.STRCOUNT) player.updateStrCount(-tim);\n if (player.SCAREMONST) player.updateScareMonst(-tim);\n if (player.HASTESELF) player.updateHasteSelf(-tim);\n if (player.CANCELLATION) player.updateCancellation(-tim);\n if (player.INVISIBILITY) player.updateInvisibility(-tim);\n if (player.ALTPRO) player.updateAltPro(-tim);\n if (player.PROTECTIONTIME) player.updateProtectionTime(-tim);\n if (player.WTW) player.updateWTW(-tim);\n\n player.HERO = player.HERO > 0 ? Math.max(1, player.HERO - tim) : 0;\n player.GLOBE = player.GLOBE > 0 ? Math.max(1, player.GLOBE - tim) : 0;\n player.AWARENESS = player.AWARENESS > 0 ? Math.max(1, player.AWARENESS - tim) : 0;\n player.SEEINVISIBLE = player.SEEINVISIBLE > 0 ? Math.max(1, player.SEEINVISIBLE - tim) : 0;\n\n player.AGGRAVATE = player.AGGRAVATE > 0 ? Math.max(1, player.AGGRAVATE - tim) : 0;\n player.HASTEMONST = player.HASTEMONST > 0 ? Math.max(1, player.HASTEMONST - tim) : 0;\n player.HALFDAM = player.HALFDAM > 0 ? Math.max(1, player.HALFDAM - tim) : 0;\n player.ITCHING = player.ITCHING > 0 ? Math.max(1, player.ITCHING - tim) : 0;\n player.CLUMSINESS = player.CLUMSINESS > 0 ? Math.max(1, player.CLUMSINESS - tim) : 0;\n // confusion?\n // blindness?\n\n regen();\n}", "title": "" }, { "docid": "f0bc1ca3b989ba3a25135eb106d52152", "score": "0.503736", "text": "function getTime(y) {\n var hour = y / 30;\n hour = (hour - (hour % 1) + offset) % 24;\n var min = (y % 30) * 2;\n min = min - (min % 1);\n return (hour < 10 ? \"0\" + hour : hour) + \":\" + (min < 10 ? \"0\" + min : min);\n}", "title": "" }, { "docid": "f853b77df95b64a9ac8690782c0393e4", "score": "0.5027386", "text": "function calculateTime (app) {\n\n let myDate= calcTime(\"-5\"); //Eastern time right now\n let myHour= myDate.getHours();\n let myMinute= myDate.getMinutes();\n\n //Converting All the time in terms of minutes\n let currentInMinutes = (myHour*60) + myMinute;\n\n //Give 15 minute extra for person to go to sleep\n const PREPARE_TO_SLEEP = 15;\n\n //A good sleep consists of 5-6 sleeping cycles.\n //A cycle is 90 minutes long.\n\n let goodTimeToSleep = [];\n goodTimeToSleep[0] = convert_raw_minutes((5*90) + currentInMinutes + PREPARE_TO_SLEEP);\n goodTimeToSleep[1] = convert_raw_minutes((6* 90) + currentInMinutes + PREPARE_TO_SLEEP);\n \n\n function calcTime(offset) {\n // create Date object for current location\n var d = new Date();\n\n // convert to msec\n // subtract local time zone offset\n // get UTC time in msec\n var utc = d.getTime() - (d.getTimezoneOffset() * 60000);\n\n // create new Date object for different city\n // using supplied offset\n var nd = new Date(utc + (3600000*offset));\n\n // return time as a string\n return nd;\n }\n\n //Function to convert raw minutes to Hour:Minute Format Military Time\n function convert_raw_minutes(time)\n {\n let updatedTime = time % 1440; //1440 is total minutes in a day\n let hours = Math.floor(updatedTime/60);\n let minute = updatedTime % 60 ;\n return hours+\":\"+minute;\n }\n\n app.tell(\"Good time to wake up would be \" + goodTimeToSleep[0]+ \" or \"+ goodTimeToSleep[1]);\n\n }", "title": "" }, { "docid": "0b754c4d263c4565b4c6d0f2166fb778", "score": "0.5025425", "text": "function calc_time(hd, md, hf, mf) {\n let debut;\n let fin;\n\n if (hd < 10) debut = '0' + hd;\n else debut = hd;\n if (md == 0) debut += ':00';\n else debut += ':30'\n\n if (hf < 10) fin = '0' + hf;\n else fin = hf;\n if (mf == 0) fin += ':00';\n else fin += ':30'\n\n return [debut, fin];\n }", "title": "" }, { "docid": "e1d818189a22a5d61a72860ad302ebc7", "score": "0.50229037", "text": "function getdiff(x){\n var time = x.substring(11,19);\n var timeNow = new Date();\n var hoursNow = timeNow.getHours();\n var minutesNnow = timeNow.getMinutes();\n var secondsNow = timeNow.getSeconds();\n var current = hoursNow + \":\" + minutesNnow + \":\" + secondsNow;\n \n var time_start = new Date();\n var time_end = new Date();\n var value_start = current.split(':');\n var value_end = time.split(':');\n\n time_start.setHours(value_start[0], value_start[1], value_start[2], 0)\n time_end.setHours(value_end[0], value_end[1], value_end[2], 0)\n\n var diff = (time_end - time_start)/60000\n\n \n\n \n return diff;\n\n \n\n\n }", "title": "" }, { "docid": "38af33e3cae50e755d06f1f13a5ba058", "score": "0.5021155", "text": "onDecreaseHour() {\n\t\tconst { hour, minute, hourStep } = this.state;\n\t\tconst hourDecreased = hour - hourStep;\n\n\t\tlet inputValue = this.getValue(hourDecreased, minute);\n\n\t\tif (hourDecreased >= 0) {\n\t\t\tthis.setState({\n\t\t\t\thour: hourDecreased,\n\t\t\t\tinputValue\n\t\t\t});\n\t\t} else {\n\t\t\tinputValue = this.getValue(24 - hourStep, minute);\n\n\t\t\tthis.setState({\n\t\t\t\thour: 24 - hourStep,\n\t\t\t\tinputValue\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "62efe819214c8e6cf0f422b8f65477fe", "score": "0.5016444", "text": "ticker(){\n var time = this.state.time_delta;\n time = time.split(\":\");\n var sec = Number(time[2]) + 1;\n var min = Number(time[1]);\n if(sec >= 60){\n sec = 0;\n min += 1; \n }\n var hr = Number(time[0]);\n if(min >= 60){\n min = 0;\n hr += 1;\n }\n var time_del = \"\" + Math.floor(hr/10) + \"\" + hr%10 +\n \":\" + Math.floor(min/10) + \"\" + min%10 +\n \":\" + Math.floor(sec/10) + \"\" + sec%10;\n this.setState({\"time_delta\":time_del})\n }", "title": "" }, { "docid": "61785337845401b5ad25f1f589f0213c", "score": "0.50153714", "text": "function solve(time) {\n const H = \"midnight,one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,one,two,three,four,five,six,seven,eight,nine,ten,eleven,midnight\".split(',')\n const M = \"o'clock,one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,quarter,sixteen,seventeen,eighteen,nineteen,twenty,twenty one,twenty two,twenty three,twenty four,twenty five,twenty six,twenty seven,twenty eight,twenty nine,half\".split(',')\n let parts = time.split(':'), h = +parts[0], m = +parts[1], mins = m%15==0 ? '' : m==1 || m==59 ? ' minute' : ' minutes'\n return h+m==0 ? `${H[h]}` : m==0 ? `${H[h]} ${M[m]}` : m<=30 ? `${M[m]}${mins} past ${H[h]}` : `${M[60-m]}${mins} to ${H[h+1]}`\n}", "title": "" }, { "docid": "ad1a55ae4cd9446f9b9cddc1a4bf8348", "score": "0.5014085", "text": "function isValidTime(time) {\n const OPEN_TIME = \"10:00\";\n const CLOSE_TIME = \"21:00\";\n\n let parsedOpenTime = Date.parse(`01/01/1970 ${OPEN_TIME}:00`);\n let parsedCloseTime = Date.parse(`01/01/1970 ${CLOSE_TIME}:00`);\n let parsedTime = Date.parse(`01/01/1970 ${time}:00`);\n\n if (parsedTime < parsedOpenTime || parsedTime > parsedCloseTime) {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "d33e06d76d76e1a39ddec75e13b273f7", "score": "0.50134593", "text": "function mathTime(time) {\n let hour = Math.floor(time / 3600);\n let min = time - hour * 3600;\n min = Math.floor(min / 60);\n let sec = Math.floor(time - hour * 3600 - min * 60);\n return formatTime(hour) + \":\" + formatTime(min) + \":\" + formatTime(sec);\n}", "title": "" }, { "docid": "b1393ebd80afa45a115ac19d94073aa4", "score": "0.50132877", "text": "function hourUpdater() {\n // create a varible called currentHour and set it to current hour on a 24 hour clock\n var currentHour = moment().hours();\n\n // loop over time blocks\n $(\".time-block\").each(function() {\n // create a varible called \"blockHour\" and set it equal to the portion of the ID after the hyphen\n var blockHour = parseInt($(this).attr(\"id\").split(\"-\")[1]);\n\n // check if we've moved past this time\n if (blockHour < currentHour) {\n // adds the class of \"past\" to the element if it is less than the currentHour\n $(this).addClass(\"past\");\n } \n // if the ID has the identical number of the currentHour\n else if (blockHour === currentHour) {\n // then remove the class of \"past\"\n $(this).removeClass(\"past\");\n // then add the class of \"present\"\n $(this).addClass(\"present\");\n } \n // if it doesn't meet the requirements of above\n else {\n // then remove the class of \"past\"\n $(this).removeClass(\"past\");\n // then also remove the class of \"present\"\n $(this).removeClass(\"present\");\n // then add the class of \"future\"\n $(this).addClass(\"future\");\n }\n });\n }", "title": "" }, { "docid": "c860fb2a33cf767599e780a2f89b19c7", "score": "0.5012049", "text": "function validaHourOcupadas(hi, hf) {\n\n var h = false;\n console.log(\"self.horasAsg\", self.horasAsg);\n for (i = 0; i < self.horasAsg.length; i++) {\n\n var shi = new Date(\"1970-01-01T\" + self.horasAsg[i].horaini);\n var shf = new Date(\"1970-01-01T\" + self.horasAsg[i].horafin);\n\n if ((shi.getTime() >= hi.getTime() && shf.getTime() < hf.getTime()) ||\n (hi.getTime() >= shi.getTime() && hi.getTime() < shf.getTime()) ||\n (hf.getTime() > shi.getTime() && hf.getTime() < shf.getTime()) ||\n (hf.getTime() > shi.getTime() && hf.getTime() <= shf.getTime())) {\n h = true;\n //break;\n }\n }\n return h;\n }", "title": "" } ]
a4b64ddf709a1d44c45a5ee55fe6db18
Clean SVG by remove comments/title/desc/defs xmnls:xlink > xmnlsXlink strokewidth > strokeWidth etc. add name='brandParticles' to id='brandParticles'
[ { "docid": "2b63b48ff29a3095e94b022fed725f68", "score": "0.0", "text": "render () {\n return (\n <Container>\n <svg width='900px' height='900px' viewBox='0 0 900 900' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlnsXlink='http://www.w3.org/1999/xlink'>\n <g id='Artboard' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd' opacity='0.5'>\n <g name='brandParticles' id='brandParticles' transform='translate(9,79)' fill='#434343'>\n <path d='M510,171 C507.790861,171 506,169.209139 506,167 C506,164.790861 507.790861,163 510,163 C512.209139,163 514,164.790861 514,167 C514,169.209139 512.209139,171 510,171 Z M446.92,176.38 C448.27,175.43 449.65,177.71 448.45,178.64 C447.11,179.61 445.61,177.3 446.92,176.38 Z M496,213.557921 C497.15,212.627921 497.81,212.857921 497.99,214.267921 C496.82,215.207921 496.16,214.967921 496,213.557921 Z M363,198.46 C363.51,197.27 364.05,196.1 364.73,195 C365.06,196.19 365.38,197.38 365.68,198.59 C365.01,198.56 363.67,198.49 363,198.46 Z M391.83,197.35 C393.42,196.85 393.95,197.43 393.42,199.08 C391.82,199.59 391.29,199.01 391.83,197.35 Z M405.47,198.15 C406.47,196.55 408.92,198.39 407.74,199.82 C406.73,201.36 404.35,199.56 405.47,198.15 Z M500.06,203.46 C501.44,202.38 503.37,204.69 501.77,205.69 C500.35,206.84 498.42,204.48 500.06,203.46 Z M347.34,207.8 C348.3,208.43 350.64,208.72 349.62,210.35 C349.03,210.58 347.84,211.02 347.25,211.24 C347.28,210.38 347.32,208.66 347.34,207.8 Z M500.57,222.69 C501.05,222.66 502.03,222.62 502.51,222.59 C502.49,223.54 502.48,224.49 502.47,225.44 C501.99,225.43 501.02,225.39 500.53,225.37 C500.54,224.47 500.55,223.58 500.57,222.69 Z M575.09,260.47 C576.5,260.64 576.74,261.31 575.83,262.46 C574.41,262.29 574.16,261.62 575.09,260.47 Z M351.54,270.51 C351.95,270.6 352.78,270.78 353.19,270.87 C353.3,271.29 353.51,272.15 353.62,272.57 C353.02,272.63 351.83,272.74 351.23,272.79 C351.31,272.22 351.46,271.08 351.54,270.51 Z M522.41,284.16 C523.4,282.51 525.73,284.46 524.66,285.86 C523.64,287.45 521.28,285.57 522.41,284.16 Z M351.3,313.34 C351.83,313.36 352.89,313.4 353.43,313.41 C353.41,313.9 353.37,314.88 353.35,315.37 C352.86,315.39 351.89,315.42 351.4,315.43 C351.37,314.91 351.32,313.86 351.3,313.34 Z M280,325.52 C281.38,324.55 282.71,326.89 281.37,327.74 C279.98,328.81 278.6,326.35 280,325.52 Z M339.14,356.37 C340.57,355.21 342.33,357.66 340.82,358.67 C339.37,359.83 337.62,357.37 339.14,356.37 Z M530.22,367.46 C531.63,366.32 533.43,368.73 531.91,369.76 C530.49,370.89 528.67,368.47 530.22,367.46 Z M354.3,370.69 C353.51,368.81 355.59,368.33 356.91,367.87 C356.83,369.66 356.54,371.51 354.3,370.69 Z M533.43,402.27 C534.45,400.68 536.73,402.66 535.66,404.03 C534.59,405.56 532.23,403.66 533.43,402.27 Z M394.53,408.26 C396.16,407.86 396.66,408.46 396.03,410.08 C394.41,410.47 393.91,409.86 394.53,408.26 Z M513.03,411.42 C513.23,410.43 513.52,409.46 513.88,408.53 C515.72,408.55 515.62,410.21 515.83,411.55 C515.13,411.52 513.73,411.45 513.03,411.42 Z M436.37,155.93 C437.99,155.35 438.55,155.88 438.07,157.53 C436.46,158.08 435.89,157.55 436.37,155.93 Z M430.23,161.04 C431.28,159.55 433.57,161.46 432.56,162.85 C431.5,164.34 429.15,162.44 430.23,161.04 Z M355.42,162.35 C356.68,161.16 358.66,163.29 357.47,164.5 C356.2,165.82 354.2,163.57 355.42,162.35 Z M450.2,180.22 C451.74,179.54 452.8,182.08 451.07,182.51 C449.51,183.21 448.43,180.59 450.2,180.22 Z M349.2,203.39 C350.56,202.33 352.57,204.6 351.03,205.67 C349.65,206.7 347.67,204.46 349.2,203.39 Z M602.84,203.96 C604.45,203.44 605,204 604.5,205.63 C602.87,206.13 602.32,205.57 602.84,203.96 Z M535.4,212.92 C537.02,212.38 537.58,212.92 537.07,214.55 C535.45,215.08 534.89,214.54 535.4,212.92 Z M518.267068,241.550572 C519.247068,240.170572 521.957068,241.640572 520.747068,243.150572 C519.757068,244.510572 517.167068,243.020572 518.267068,241.550572 Z M330.49,233.57 C331.85,232.15 333.9,234.56 332.66,235.88 C331.29,237.43 329.25,234.88 330.49,233.57 Z M554.11,249.2 C555.96,248.67 556.61,251.74 554.91,252.3 C553.06,252.87 552.28,249.67 554.11,249.2 Z M341.5,275.37 C343.13,274.88 343.67,275.45 343.14,277.06 C341.51,277.55 340.97,276.98 341.5,275.37 Z M349.33,281.59 C350.95,280.99 351.55,281.5 351.13,283.11 C349.49,283.72 348.89,283.21 349.33,281.59 Z M323.33,300.13 C324.61,300.83 324.56,301.49 323.18,302.1 C321.91,301.38 321.96,300.73 323.33,300.13 Z M517.13,303.6 C518.77,303.03 519.37,303.55 518.92,305.14 C517.25,305.7 516.65,305.19 517.13,303.6 Z M330.53,304.94 C332.17,304.47 332.69,305.04 332.11,306.65 C330.47,307.11 329.94,306.54 330.53,304.94 Z M528.06,312.55 C529.29,311.56 530.46,313.69 529.3,314.48 C528.07,315.5 526.83,313.31 528.06,312.55 Z M538.92,324.87 C540.54,324.4 541.08,324.97 540.53,326.58 C538.89,327.04 538.35,326.47 538.92,324.87 Z M348.39,367.45 C349.99,366.9 350.56,367.44 350.09,369.07 C348.48,369.62 347.91,369.08 348.39,367.45 Z M524.41,377.15 C525.42,375.62 527.88,377.37 526.71,378.81 C525.69,380.34 523.26,378.56 524.41,377.15 Z M467.02,408.88 C468.67,408.36 469.22,408.9 468.67,410.51 C467.01,411.02 466.46,410.47 467.02,408.88 Z M351.38,416.33 C351.89,416.36 352.92,416.43 353.43,416.46 C353.41,416.99 353.36,418.05 353.33,418.59 C352.8,418.67 351.73,418.85 351.2,418.94 C351.24,418.29 351.34,416.98 351.38,416.33 Z M399.29,436.13 C401.01,436.08 400.63,438.85 399.08,438.77 C397.33,438.79 397.72,436.07 399.29,436.13 Z M455.26,202.55 C456.66,201.42 458.45,203.8 457,204.86 C455.59,206.02 453.75,203.57 455.26,202.55 Z M503.14,119.34 C504.76,118.83 505.32,119.38 504.81,121 C503.16,121.52 502.61,120.96 503.14,119.34 Z M298,380 C292.477153,380 288,375.522847 288,370 C288,364.477153 292.477153,360 298,360 C303.522847,360 308,364.477153 308,370 C308,375.522847 303.522847,380 298,380 Z M358.13,152.1 C359.75,151.56 360.31,152.11 359.81,153.74 C358.18,154.28 357.62,153.73 358.13,152.1 Z M349.16,185.31 C350.78,184.8 351.34,185.35 350.81,186.97 C349.17,187.49 348.62,186.93 349.16,185.31 Z M391.31,187.22 C392.94,186.69 393.47,187.24 392.89,188.87 C391.24,189.4 390.71,188.85 391.31,187.22 Z M410.21,197.28 C411.81,196.7 412.36,197.25 411.84,198.9 C410.23,199.47 409.68,198.93 410.21,197.28 Z M325.26,204.26 C326.87,203.66 327.44,204.18 326.95,205.83 C325.33,206.43 324.77,205.91 325.26,204.26 Z M511.28,218.24 C512.91,217.76 513.45,218.33 512.89,219.94 C511.24,220.41 510.7,219.84 511.28,218.24 Z M519.18,233.61 C518.43,231.21 520.22,231.01 522.18,231.22 C521.4,232.33 520.94,234.27 519.18,233.61 Z M341.81,224.76 C342.1,224.49 342.68,223.95 342.97,223.67 C345.56,224.1 341.87,227.41 341.81,224.76 Z M539.96,247.23 C541.6,246.71 542.16,247.26 541.65,248.86 C539.99,249.38 539.42,248.83 539.96,247.23 Z M353.21,260.26 C354.83,259.72 355.39,260.27 354.89,261.9 C353.26,262.43 352.7,261.89 353.21,260.26 Z M333.26,261.28 C334.86,260.74 335.41,261.3 334.9,262.96 C333.29,263.48 332.74,262.92 333.26,261.28 Z M544.29,267.16 C545.92,266.66 546.46,267.22 545.92,268.85 C544.28,269.34 543.74,268.77 544.29,267.16 Z M521.3,268.19 C522.92,267.66 523.48,268.22 522.96,269.85 C521.32,270.37 520.77,269.82 521.3,268.19 Z M571.37,274.11 C572.75,273.64 573.26,274.11 572.89,275.52 C571.5,275.98 570.99,275.51 571.37,274.11 Z M616,280.15 C617.62,279.64 618.17,280.2 617.65,281.82 C616.01,282.34 615.46,281.78 616,280.15 Z M338.25,289.29 C339.66,288.25 341.72,290.57 340.78,291.94 C339.34,293.04 337.23,290.67 338.25,289.29 Z M527.17,295.04 C528.76,294.48 529.32,295.03 528.85,296.69 C527.25,297.25 526.69,296.7 527.17,295.04 Z M340.2,312.34 C341.82,311.84 342.37,312.4 341.83,314.02 C340.19,314.52 339.64,313.96 340.2,312.34 Z M521.3,316.26 C522.92,315.74 523.47,316.3 522.95,317.93 C521.31,318.44 520.76,317.88 521.3,316.26 Z M352.03,318.11 C353.66,317.61 354.21,318.17 353.67,319.79 C352.03,320.29 351.48,319.73 352.03,318.11 Z M542.27,327.23 C543.87,326.69 544.42,327.25 543.91,328.91 C542.29,329.43 541.75,328.87 542.27,327.23 Z M324.32,336.94 C325.93,336.46 326.46,337.04 325.91,338.69 C324.29,339.16 323.76,338.58 324.32,336.94 Z M321.99,350.15 C323.6,349.62 324.16,350.18 323.67,351.81 C322.04,352.33 321.48,351.78 321.99,350.15 Z M532.23,356.2 C533.22,355.03 535.46,356.59 534.47,357.88 C533.46,359.03 531.18,357.51 532.23,356.2 Z M602.15,362.03 C603.79,361.54 604.33,362.1 603.78,363.71 C602.13,364.2 601.59,363.64 602.15,362.03 Z M323.09,375.08 C324.73,374.58 325.27,375.13 324.73,376.76 C323.09,377.26 322.54,376.7 323.09,375.08 Z M514.9,374.63 C516.29,375.15 518.31,375.66 517.92,377.6 C517.16,377.79 515.62,378.15 514.86,378.34 C514.87,377.41 514.89,375.55 514.9,374.63 Z M607.17,380.98 C608.79,380.46 609.34,381.02 608.83,382.66 C607.2,383.16 606.65,382.6 607.17,380.98 Z M349.16,381.99 C350.8,381.49 351.34,382.05 350.79,383.67 C349.15,384.16 348.6,383.59 349.16,381.99 Z M349.23,399.32 C350.88,398.77 351.43,399.3 350.88,400.92 C349.21,401.46 348.66,400.93 349.23,399.32 Z M448.13,420.27 C449.75,419.76 450.31,420.31 449.8,421.94 C448.16,422.45 447.6,421.89 448.13,420.27 Z M498.07,420.14 C499.68,419.55 500.24,420.08 499.74,421.73 C498.11,422.31 497.55,421.78 498.07,420.14 Z M360.97,427.19 C362.58,426.65 363.14,427.2 362.65,428.83 C361.02,429.37 360.46,428.82 360.97,427.19 Z M457.24,407.26 C458.57,406.25 460.01,408.58 458.84,409.55 C457.51,410.53 456.06,408.21 457.24,407.26 Z M462.34,406 C464.26,405.27 465.05,408.62 463.09,408.94 C461.23,409.4 460.43,406.44 462.34,406 Z M482.27,414.24 C483.59,413.19 485.11,415.5 483.85,416.45 C482.53,417.43 481.01,415.18 482.27,414.24 Z M517.03,427.18 C518.66,426.68 519.2,427.24 518.66,428.86 C517.02,429.35 516.47,428.79 517.03,427.18 Z M416.35,405.17 C417.99,404.69 418.53,405.26 417.96,406.88 C416.31,407.33 415.77,406.76 416.35,405.17 Z M400.39,406.31 C401.73,404.82 404.08,407.09 402.55,408.45 C401.26,409.93 399.02,407.6 400.39,406.31 Z M254.19,407.28 C255.82,406.75 256.37,407.3 255.86,408.93 C254.22,409.45 253.67,408.9 254.19,407.28 Z M437.11,429.23 C438.72,428.68 439.29,429.23 438.8,430.87 C437.17,431.4 436.61,430.86 437.11,429.23 Z M464,191.2 C465.59,190.67 466.14,191.23 465.65,192.88 C464.04,193.42 463.49,192.86 464,191.2 Z M416.16,170.17 C417.44,170.85 417.41,171.52 416.07,172.18 C414.77,171.5 414.8,170.84 416.16,170.17 Z M421.55,180.68 C421.94,180.7 422.71,180.73 423.09,180.75 C423.41,181.04 424.03,181.61 424.34,181.9 L424.71,182.27 C424.27,182.74 423.82,183.2 423.36,183.66 C422.85,183.31 421.83,182.61 421.31,182.27 C421.37,181.87 421.49,181.08 421.55,180.68 Z M472.28,205.02 C473.15,203.61 475.53,205.09 474.36,206.43 C473.46,207.81 471.13,206.37 472.28,205.02 Z M328.32,244.21 C329.54,243.6 331.55,244.5 331.51,245.99 C330.76,248.11 327.17,245.86 328.32,244.21 Z M537.67,341.6 C538.18,341.56 539.2,341.47 539.71,341.43 C539.73,341.96 539.77,343.03 539.79,343.56 C539.23,343.54 538.12,343.51 537.56,343.5 C537.59,343.03 537.65,342.07 537.67,341.6 Z M372.43,416.1 C373.7,416.52 375.46,416.62 375.56,418.32 C374.9,418.55 373.59,419.01 372.93,419.24 C372.72,418.19 372.56,417.15 372.43,416.1 Z M348.39,299.15 C349.49,298.14 351.57,298.85 352.09,300.19 C351.9,302.31 347.78,300.94 348.39,299.15 Z M441.96,403.21 C443.75,402.82 444.41,405.7 442.65,406.16 C440.67,406.83 439.8,403.41 441.96,403.21 Z M424.84,406.42 C425.74,405.33 428.65,406.23 427.59,407.81 C426.67,409.14 423.66,408.07 424.84,406.42 Z M557.24,455.39 C558.67,454.18 560.55,456.59 558.84,457.55 C557.4,458.72 555.51,456.34 557.24,455.39 Z' id='a' />\n <path d='M420.5,175.5 C421.08,175.42 422.24,175.27 422.83,175.19 C422.78,175.78 422.68,176.94 422.62,177.52 C422.19,177.43 421.33,177.26 420.9,177.17 C420.8,176.75 420.6,175.91 420.5,175.5 Z M328.47,180.94 C330.06,180.41 330.6,180.98 330.09,182.65 C328.5,183.16 327.96,182.59 328.47,180.94 Z M404.21,192.04 C405.13,192.38 406.04,192.76 406.95,193.16 C406.61,194.35 405.89,195.27 404.78,195.93 C404.56,194.63 404.37,193.34 404.21,192.04 Z M509,192.557921 C510.15,191.627921 510.81,191.857921 510.99,193.267921 C509.82,194.207921 509.16,193.967921 509,192.557921 Z M358.287287,191.46 C358.797287,190.27 359.337287,189.1 360.017287,188 C360.347287,189.19 360.667287,190.38 360.967287,191.59 C360.297287,191.56 358.957287,191.49 358.287287,191.46 Z M343.02,204.67 C343.97,204.73 344.93,204.78 345.89,204.84 C345.79,205.65 345.57,207.27 345.46,208.08 C344.04,207.39 343.02,206.33 343.02,204.67 Z M324.54,242.59 C325.04,242.58 326.03,242.55 326.52,242.53 C326.53,243.06 326.56,244.11 326.57,244.64 C326.05,244.63 324.99,244.6 324.47,244.59 C324.49,244.09 324.52,243.09 324.54,242.59 Z M589.8,257.16 C591.36,256.62 591.89,257.19 591.41,258.87 C589.83,259.42 589.29,258.85 589.8,257.16 Z M526.14,266.49 C527.55,265.34 529.34,267.75 527.82,268.77 C526.39,269.96 524.59,267.5 526.14,266.49 Z M346.49,269.38 C347.01,269.39 348.06,269.41 348.59,269.41 C348.56,269.93 348.51,270.96 348.48,271.48 C347.99,271.46 347,271.42 346.51,271.4 C346.5,270.89 346.49,269.89 346.49,269.38 Z M528.16,283.54 C529.58,282.36 531.44,284.75 529.76,285.72 C528.31,286.97 526.48,284.5 528.16,283.54 Z M345.13,299.41 C346.55,298.32 348.38,300.73 346.75,301.69 C345.29,302.84 343.52,300.37 345.13,299.41 Z M563.2,309.81 C564.89,309.32 565.45,309.87 564.88,311.44 C563.2,311.9 562.63,311.36 563.2,309.81 Z M346.47,314.58 C346.99,314.58 348.01,314.58 348.53,314.58 C349.58,315.54 348.63,317.72 347.15,317.26 C345.99,316.6 345.76,315.71 346.47,314.58 Z M526.11,317.36 C527.5,316.21 529.39,318.58 527.83,319.61 C526.41,320.75 524.55,318.39 526.11,317.36 Z M264.48,329.21 C265.47,327.56 267.87,329.43 266.65,330.86 C265.66,332.52 263.28,330.62 264.48,329.21 Z M557.02,331.84 C558.67,331.27 559.26,331.79 558.79,333.39 C557.14,333.94 556.55,333.43 557.02,331.84 Z M542.48,343.55 C542.98,343.55 543.98,343.55 544.48,343.55 C544.49,344.07 544.51,345.1 544.52,345.61 C544,345.61 542.95,345.62 542.43,345.62 C542.45,345.1 542.47,344.07 542.48,343.55 Z M295.6,348.44 C296.11,348.42 297.15,348.37 297.67,348.35 C297.65,348.88 297.63,349.95 297.61,350.48 C297.12,350.46 296.12,350.42 295.62,350.4 C295.62,349.91 295.6,348.93 295.6,348.44 Z M335.01,359.3 C336.38,358.13 338.31,360.45 336.79,361.52 C335.41,362.7 333.49,360.36 335.01,359.3 Z M542.37,377.26 C543.41,375.7 545.71,377.63 544.58,379.02 C543.52,380.58 541.18,378.65 542.37,377.26 Z M519.56,378.7 C521.21,377.5 521.9,382.45 519.8,381.8 C518.05,382.32 517.77,378.78 519.56,378.7 Z M322.89,391.92 C323.26,391.8 324.01,391.56 324.38,391.44 C324.43,392 324.53,393.12 324.58,393.68 C324,393.66 322.83,393.62 322.25,393.6 C322.41,393.18 322.73,392.34 322.89,391.92 Z M441.29,409.08 C442.26,407.49 444.71,409.25 443.61,410.71 C442.63,412.29 440.19,410.52 441.29,409.08 Z M339.7,411.13 C340.75,411.14 342,411.17 341.66,412.6 C340.98,413.1 340.28,413.58 339.56,414.04 C339.6,413.31 339.67,411.86 339.7,411.13 Z M398.4,413.5 C398.86,412.51 398.54,410.83 400,410.63 C401.73,410.72 401.44,412.43 401.73,413.62 C400.61,413.58 399.5,413.54 398.4,413.5 Z M462,412.2 C462.58,411.85 463.75,411.15 464.33,410.8 C465.98,411.06 465.24,412.93 465.55,414.05 C464.34,413.46 463.16,412.84 462,412.2 Z M414.27,420.39 C415.7,419.23 417.51,421.66 415.93,422.66 C414.51,423.72 412.63,421.36 414.27,420.39 Z M370.58,420.97 C371.48,421.37 372.75,421.36 373.32,422.3 C373.79,423.85 371.42,423.48 370.55,424.06 C370.55,423.29 370.57,421.74 370.58,420.97 Z M438.42,104.39 C440.01,103.79 440.59,104.31 440.17,105.96 C438.58,106.57 438,106.05 438.42,104.39 Z M386.19,172.36 C387.62,171.25 389.42,173.67 387.85,174.66 C386.42,175.75 384.59,173.34 386.19,172.36 Z M406.89,182.3 C408.46,181.74 409.01,182.29 408.54,183.96 C406.96,184.53 406.41,183.98 406.89,182.3 Z M313.38,194.04 C314.4,192.47 316.81,194.32 315.64,195.74 C314.62,197.29 312.25,195.45 313.38,194.04 Z M503.17,205.34 C504.6,204.24 506.38,206.68 504.81,207.65 C503.35,208.76 501.59,206.31 503.17,205.34 Z M317.49,227.45 C315.41,224.9 320.61,224.06 320.19,226.97 C319.49,228.09 318.59,228.25 317.49,227.45 Z M532.267068,234.550572 C533.247068,233.170572 535.957068,234.640572 534.747068,236.150572 C533.757068,237.510572 531.167068,236.020572 532.267068,234.550572 Z M568.15,244.43 C569.59,243.34 571.31,245.79 569.74,246.75 C568.26,247.89 566.52,245.37 568.15,244.43 Z M334.23,279.56 C335.86,278.97 336.46,279.48 336.02,281.09 C334.38,281.68 333.78,281.17 334.23,279.56 Z M278.98,311.86 C280.59,311.33 281.15,311.88 280.65,313.51 C279.02,314.02 278.47,313.47 278.98,311.86 Z M542.96,315.43 C544.26,314.47 545.74,316.71 544.55,317.67 C543.23,318.66 541.69,316.39 542.96,315.43 Z M545.3,363.37 C546.74,362.23 548.55,364.68 546.95,365.66 C545.51,366.75 543.71,364.35 545.3,363.37 Z M260.42,380.43 C262.06,379.99 262.59,380.57 262.02,382.16 C260.38,382.61 259.85,382.03 260.42,380.43 Z M328.76,404.8 C329.19,404.73 330.05,404.58 330.48,404.5 C330.56,405.06 330.72,406.17 330.8,406.73 C330.2,406.69 329.01,406.63 328.41,406.59 C328.5,406.15 328.67,405.25 328.76,404.8 Z M424.33,421.94 C425.95,421.37 426.54,421.9 426.08,423.54 C424.46,424.08 423.88,423.55 424.33,421.94 Z M505.05,433.45 C505.64,433.5 506.81,433.59 507.39,433.64 C507.36,434.83 507.33,436.02 507.3,437.22 C506,436.33 505.42,434.91 505.05,433.45 Z M476.57,437.93 C477.55,436.54 479.7,438.29 478.63,439.57 C477.65,440.86 475.53,439.18 476.57,437.93 Z M531.31,448.49 C532.93,447.99 533.49,448.54 532.96,450.15 C531.32,450.65 530.77,450.09 531.31,448.49 Z M395.3,451.41 C395.82,451.42 396.88,451.45 397.41,451.47 C397.4,451.97 397.38,452.97 397.37,453.47 C396.87,453.48 395.86,453.51 395.36,453.52 C395.34,452.99 395.31,451.94 395.3,451.41 Z M463.93,437.5 C465.54,436.97 466.09,437.52 465.59,439.14 C463.95,439.66 463.4,439.12 463.93,437.5 Z M448.86,160.99 C450.44,160.49 450.97,161.07 450.44,162.73 C448.84,163.23 448.32,162.65 448.86,160.99 Z M457.18,197.19 C459.03,196.7 459.63,199.83 457.91,200.33 C456,200.87 455.41,197.66 457.18,197.19 Z M346.3,129.1 C347.94,128.63 348.47,129.21 347.9,130.83 C346.25,131.28 345.72,130.71 346.3,129.1 Z M318.16,145 C319.79,144.48 320.34,145.04 319.82,146.67 C318.19,147.18 317.64,146.62 318.16,145 Z M412.06,145.1 C413.69,144.59 414.24,145.15 413.73,146.77 C412.1,147.28 411.54,146.73 412.06,145.1 Z M430.59,145.68 C431.1,145.68 432.11,145.68 432.62,145.68 C434.16,147.75 429.9,149.08 430.22,146.37 L430.59,145.68 Z M519.05,155.36 C520.45,155.01 520.92,155.53 520.44,156.91 C519.02,157.26 518.56,156.74 519.05,155.36 Z M452.73,166.9 C453,166.62 453.56,166.05 453.84,165.76 C456.46,165.97 453.01,169.52 452.73,166.9 Z M385.94,183.19 C387.55,182.66 388.12,183.21 387.65,184.84 C386.01,185.37 385.44,184.82 385.94,183.19 Z M625.33,192.21 C626.96,191.7 627.51,192.25 626.99,193.88 C625.34,194.38 624.79,193.82 625.33,192.21 Z M556.07,197.15 C557.68,196.57 558.25,197.11 557.78,198.75 C556.16,199.33 555.59,198.79 556.07,197.15 Z M468.37,176.46 C470.02,175.97 470.58,176.51 470.05,178.1 C468.38,178.59 467.82,178.05 468.37,176.46 Z M523.1,208.11 C524.73,207.59 525.28,208.15 524.75,209.78 C523.12,210.3 522.57,209.74 523.1,208.11 Z M234.05,211.26 C235.66,210.74 236.23,211.3 235.78,212.94 C234.16,213.45 233.59,212.89 234.05,211.26 Z M523.64,227.76 C524.13,227.67 525.12,227.51 525.61,227.43 C525.6,228.47 525.59,229.52 525.59,230.56 C525.1,230.47 524.13,230.3 523.64,230.21 C523.63,229.39 523.63,228.57 523.64,227.76 Z M341.81,224.76 C339.14,224.56 342.71,221.06 342.97,223.67 C342.68,223.95 342.1,224.49 341.81,224.76 Z M582.17,255.15 C583.76,254.6 584.32,255.15 583.84,256.81 C582.23,257.36 581.68,256.81 582.17,255.15 Z M318.17,256.99 C319.79,256.44 320.36,256.99 319.86,258.62 C318.24,259.16 317.67,258.61 318.17,256.99 Z M622.3,267.19 C623.92,266.62 624.5,267.15 624.03,268.78 C622.39,269.34 621.82,268.81 622.3,267.19 Z M326.24,272.31 C327.85,271.74 328.41,272.28 327.91,273.93 C326.29,274.49 325.73,273.94 326.24,272.31 Z M323.96,290.2 C325.58,289.75 326.14,290.33 325.65,291.94 C324.02,292.4 323.45,291.82 323.96,290.2 Z M538.26,296.2 C539.88,295.66 540.43,296.2 539.89,297.84 C538.25,298.37 537.71,297.83 538.26,296.2 Z M219.99,307.11 C221.62,306.6 222.16,307.15 221.63,308.78 C219.99,309.29 219.45,308.73 219.99,307.11 Z M325.1,316.06 C326.72,315.52 327.28,316.06 326.78,317.7 C325.16,318.24 324.6,317.7 325.1,316.06 Z M337.28,323.11 C338.9,322.55 339.44,323.1 338.91,324.75 C337.29,325.29 336.75,324.75 337.28,323.11 Z M613.12,346.26 C614.74,345.75 615.26,346.32 614.7,347.96 C613.07,348.46 612.54,347.9 613.12,346.26 Z M626.25,371.99 C627.66,371.56 628.11,372.05 627.57,373.46 C626.15,373.88 625.71,373.39 626.25,371.99 Z M303.1,390.12 C306.53,389.69 303.27,394.27 302.28,391.19 C302.49,390.92 302.89,390.39 303.1,390.12 Z M630.23,392.2 C631.84,391.65 632.4,392.2 631.91,393.84 C630.28,394.37 629.72,393.83 630.23,392.2 Z M548.15,397.3 C549.77,396.8 550.32,397.36 549.79,398.98 C548.15,399.48 547.6,398.92 548.15,397.3 Z M488.31,428.25 C489.94,427.75 490.49,428.31 489.95,429.94 C488.3,430.43 487.75,429.87 488.31,428.25 Z M211.44,436.21 C212.83,435.75 213.34,436.23 212.96,437.65 C211.57,438.09 211.06,437.61 211.44,436.21 Z M335.5,442.17 C336.9,441.81 337.36,442.33 336.89,443.73 C335.48,444.07 335.02,443.55 335.5,442.17 Z M455.07,472.16 C456.7,471.67 457.24,472.24 456.69,473.86 C455.05,474.35 454.51,473.78 455.07,472.16 Z M338.13,473.22 C339.75,472.7 340.31,473.25 339.79,474.88 C338.15,475.39 337.6,474.84 338.13,473.22 Z M572.96,476.09 C574.61,475.54 575.18,476.08 574.68,477.69 C573.02,478.23 572.45,477.69 572.96,476.09 Z M642.05,278.17 C643.67,277.64 644.22,278.2 643.72,279.83 C642.09,280.36 641.54,279.81 642.05,278.17 Z M474.29,200.17 C475.27,198.59 477.68,200.39 476.6,201.82 C475.61,203.42 473.17,201.61 474.29,200.17 Z M504.15,219.36 C505.46,218.14 507.83,220.19 506.45,221.55 C505.14,222.91 502.65,220.7 504.15,219.36 Z M554.27,241.15 C555.71,239.91 557.48,242.46 555.9,243.44 C554.46,244.57 552.73,242.15 554.27,241.15 Z M350.36,374.8 C350.5,373.4 350.83,371.98 352.17,371.26 C352.58,371.79 353.42,372.85 353.83,373.39 C352.68,373.88 351.52,374.35 350.36,374.8 Z M516.26,412.88 C516.88,413.02 518.14,413.31 518.77,413.45 C519.43,415.17 517.7,415.61 516.48,416.08 C516.42,415.28 516.31,413.68 516.26,412.88 Z M541.26,413.22 C542.03,412.43 542.82,411.66 543.66,410.93 C543.67,411.72 543.7,413.29 543.71,414.08 L545.83,413.54 C545.79,414.21 545.7,415.54 545.66,416.2 C544.15,415.26 542.71,414.23 541.26,413.22 Z M385.2,437.48 C386.65,436.3 388.44,438.75 386.76,439.69 C385.29,440.91 383.52,438.42 385.2,437.48 Z M522.38,72.14 C523.38,70.58 525.81,72.38 524.64,73.81 C523.63,75.39 521.24,73.55 522.38,72.14 Z' id='b' />\n <path d='M532.49,48.35 C534.09,47.79 534.64,48.34 534.13,50 C532.52,50.54 531.98,50 532.49,48.35 Z M439.88,78.94 C441.49,78.43 442.05,78.98 441.55,80.6 C439.92,81.11 439.36,80.55 439.88,78.94 Z M302.04,183.36 C303.44,182.23 305.29,184.59 303.74,185.62 C302.32,186.8 300.47,184.38 302.04,183.36 Z M544.267068,228.550572 C545.247068,227.170572 547.957068,228.640572 546.747068,230.150572 C545.757068,231.510572 543.167068,230.020572 544.267068,228.550572 Z M582.26,240.03 C583.3,238.53 585.68,240.35 584.54,241.76 C583.5,243.28 581.1,241.43 582.26,240.03 Z M693.21,274.86 C694.89,274.4 695.43,274.96 694.85,276.54 C693.17,276.98 692.62,276.42 693.21,274.86 Z M543.24611,296.592588 C544.24611,295.022588 546.58611,296.912588 545.60611,298.322588 C544.59611,299.872588 542.23611,298.012588 543.24611,296.592588 Z M339.1,300.59 C339.77,300.5 341.12,300.31 341.8,300.21 C341.69,300.87 341.48,302.19 341.37,302.85 C340.61,302.1 339.85,301.34 339.1,300.59 Z M573.17,321.54 C574.41,320.47 576.16,322.55 574.79,323.54 C573.54,324.62 571.71,322.5 573.17,321.54 Z M322.58,327.99 C323.56,326.6 325.67,328.36 324.63,329.63 C323.66,331.01 321.56,329.23 322.58,327.99 Z M649.92,381.54 C651.14,380.5 652.93,382.58 651.62,383.58 C650.37,384.62 648.56,382.56 649.92,381.54 Z M559.58,407.52 C560.09,407.48 561.11,407.41 561.62,407.37 C561.63,407.91 561.66,408.99 561.67,409.53 C561.16,409.52 560.13,409.49 559.62,409.48 C559.61,408.99 559.59,408.01 559.58,407.52 Z M318.31,416.35 C318.83,416.37 319.89,416.4 320.41,416.42 C320.4,416.92 320.38,417.92 320.37,418.41 C319.87,418.43 318.87,418.47 318.37,418.49 C318.35,417.96 318.32,416.89 318.31,416.35 Z M392.41,466.52 C392.85,466.56 393.74,466.66 394.19,466.71 C394.34,467.15 394.64,468.04 394.79,468.48 C394.11,468.54 392.74,468.65 392.06,468.71 C392.15,468.16 392.32,467.06 392.41,466.52 Z M529.95,480.86 C531.55,480.33 532.11,480.89 531.61,482.53 C529.98,483.02 529.43,482.47 529.95,480.86 Z M326.31,496.07 C327.32,494.46 329.61,496.44 328.62,497.84 C327.6,499.44 325.33,497.45 326.31,496.07 Z M588.38,496.34 C589.39,495.12 591.53,496.83 590.51,498.08 C589.46,499.27 587.34,497.59 588.38,496.34 Z M318.9,277.44 C320.51,276.91 321.06,277.46 320.55,279.08 C318.92,279.62 318.37,279.07 318.9,277.44 Z M572.195366,336.221176 C573.795366,335.651176 574.335366,336.181176 573.825366,337.831176 C572.215366,338.411176 571.665366,337.871176 572.195366,336.221176 Z M555.12,425.37 C556.53,425.52 556.77,426.19 555.86,427.36 C554.45,427.19 554.2,426.53 555.12,425.37 Z M405.33,94.25 C406.93,93.67 407.49,94.21 406.99,95.87 C405.38,96.44 404.83,95.9 405.33,94.25 Z M546.38,112.2 C547.98,111.69 548.52,112.26 547.98,113.91 C546.36,114.41 545.83,113.84 546.38,112.2 Z M458.19,192.46 C459.7,191.29 461.04,193.99 459.7,194.95 C458.16,196.2 456.78,193.4 458.19,192.46 Z M302.28,124.19 C303.91,123.7 304.46,124.26 303.9,125.89 C302.26,126.37 301.72,125.8 302.28,124.19 Z M381.35,158.25 C382.94,157.67 383.49,158.22 383.01,159.89 C381.41,160.45 380.86,159.9 381.35,158.25 Z M452.73,166.9 C450.09,166.67 453.6,163.12 453.84,165.76 C453.56,166.05 453,166.62 452.73,166.9 Z M648.18,180.22 C649.78,179.7 650.33,180.26 649.82,181.91 C648.2,182.43 647.65,181.87 648.18,180.22 Z M513.17,194.05 C514.8,193.62 515.36,194.2 514.83,195.81 C513.19,196.23 512.63,195.65 513.17,194.05 Z M210.22,201.19 C211.72,199.95 213.15,202.67 211.79,203.66 C210.29,204.87 208.87,202.17 210.22,201.19 Z M482.13,132.52 C483.8,132.03 484.37,132.57 483.83,134.13 C482.13,134.62 481.57,134.08 482.13,132.52 Z M607.18,249.1 C608.81,248.54 609.35,249.07 608.8,250.71 C607.15,251.27 606.61,250.73 607.18,249.1 Z M531.36,265.86 C532.93,265.43 533.5,266.06 533.06,267.74 C531.49,268.15 530.92,267.53 531.36,265.86 Z M310.98,269.24 C312.61,268.68 313.19,269.21 312.72,270.84 C311.09,271.4 310.51,270.87 310.98,269.24 Z M535.20625,283.176756 C536.83625,282.676756 537.38625,283.236756 536.85625,284.866756 C535.20625,285.356756 534.65625,284.796756 535.20625,283.176756 Z M294.25,291.49 C292.3,292.24 292.41,288.38 294.32,289.24 C294.3,289.81 294.27,290.93 294.25,291.49 Z M228.16,318.26 C229.77,317.77 230.31,318.35 229.77,319.98 C228.14,320.47 227.6,319.89 228.16,318.26 Z M310.02,319.23 C311.64,318.71 312.19,319.26 311.69,320.9 C310.06,321.42 309.51,320.87 310.02,319.23 Z M238.29,392.08 C239.59,392.74 239.57,393.41 238.23,394.1 C236.93,393.44 236.95,392.77 238.29,392.08 Z M518.92,416.89 C519.67,416.93 521.16,417.01 521.91,417.05 C521.92,417.76 521.93,419.17 521.93,419.88 C521.19,419.88 519.71,419.89 518.97,419.9 C518.96,419.15 518.93,417.64 518.92,416.89 Z M424.18,437.13 C425.84,436.59 426.39,437.12 425.82,438.74 C424.15,439.27 423.6,438.74 424.18,437.13 Z M464.02,443.13 C465.63,442.57 466.19,443.11 465.7,444.76 C464.08,445.31 463.52,444.77 464.02,443.13 Z M381.96,449.07 C383.35,448.57 383.83,449.03 383.42,450.46 C382.03,450.95 381.54,450.49 381.96,449.07 Z M190.09,450.33 C191.73,449.78 192.28,450.32 191.73,451.95 C190.07,452.48 189.53,451.94 190.09,450.33 Z M482.05,452.31 C483.66,451.84 484.23,452.42 483.75,454.03 C482.11,454.5 481.54,453.92 482.05,452.31 Z M329.302273,426.38662 C328.583047,424.297838 329.693292,422.021498 331.782074,421.302273 C333.870856,420.583047 336.147196,421.693292 336.866421,423.782074 C337.585647,425.870856 336.475401,428.147196 334.38662,428.866421 C332.297838,429.585647 330.021498,428.475401 329.302273,426.38662 Z M282.31,406.03 C283.94,405.55 284.49,406.11 283.94,407.74 C282.3,408.21 281.76,407.64 282.31,406.03 Z M334.5,205 C330.357864,205 327,201.642136 327,197.5 C327,193.357864 330.357864,190 334.5,190 C338.642136,190 342,193.357864 342,197.5 C342,201.642136 338.642136,205 334.5,205 Z M396.5,432 C392.357864,432 389,428.642136 389,424.5 C389,420.357864 392.357864,417 396.5,417 C400.642136,417 404,420.357864 404,424.5 C404,428.642136 400.642136,432 396.5,432 Z M467.5,433 C463.357864,433 460,429.642136 460,425.5 C460,421.357864 463.357864,418 467.5,418 C471.642136,418 475,421.357864 475,425.5 C475,429.642136 471.642136,433 467.5,433 Z M431.5,141 C425.70101,141 421,136.29899 421,130.5 C421,124.70101 425.70101,120 431.5,120 C437.29899,120 442,124.70101 442,130.5 C442,136.29899 437.29899,141 431.5,141 Z M298,223 C292.477153,223 288,218.522847 288,213 C288,207.477153 292.477153,203 298,203 C303.522847,203 308,207.477153 308,213 C308,218.522847 303.522847,223 298,223 Z M560.5,385 C554.70101,385 550,380.29899 550,374.5 C550,368.70101 554.70101,364 560.5,364 C566.29899,364 571,368.70101 571,374.5 C571,380.29899 566.29899,385 560.5,385 Z M700.5,258 C697.462434,258 695,255.537566 695,252.5 C695,249.462434 697.462434,247 700.5,247 C703.537566,247 706,249.462434 706,252.5 C706,255.537566 703.537566,258 700.5,258 Z M396.23,138.05 C396.15,136.21 399.11,136.29 399.14,138.06 C399.21,139.86 396.18,139.83 396.23,138.05 Z M450.39,146.14 C451.3,144.48 453.89,146.15 452.66,147.64 C451.73,149.27 449.2,147.63 450.39,146.14 Z M317.6,169.54 C318.82,168.33 321.15,170.25 319.62,171.48 C318.39,172.78 316.22,170.76 317.6,169.54 Z M379.53,169.13 C380.51,167.8 382.61,169.54 381.65,170.81 C380.68,172.18 378.58,170.38 379.53,169.13 Z M420.17,170.44 C420.81,170.43 422.1,170.41 422.74,170.41 C422.73,170.93 422.71,171.99 422.69,172.52 C422.08,172.52 420.86,172.53 420.25,172.53 C420.23,172 420.19,170.96 420.17,170.44 Z M353.233931,183.65307 C352.473931,182.36307 353.733931,181.52307 354.613931,180.79307 C355.533931,181.62307 355.853931,182.84307 356.193931,183.99307 C355.203931,183.92307 354.213931,183.81307 353.233931,183.65307 Z M518.44,179.12 C519.81,177.55 521.84,180.19 520.55,181.47 C519.15,182.84 517.19,180.42 518.44,179.12 Z M403.24,186.93 C404.15,187.58 405.06,188.24 405.91,188.99 C405.32,189.78 404.49,190.29 403.57,190.58 C403.27,189.38 403.16,188.16 403.24,186.93 Z M545.83,187.09 C547.4,186.6 547.92,187.19 547.38,188.85 C545.79,189.34 545.27,188.75 545.83,187.09 Z M476.33,195.32 C477.28,193.72 479.71,195.47 478.65,196.93 C477.69,198.55 475.21,196.79 476.33,195.32 Z M329.28,214.2 C330.26,212.6 332.66,214.42 331.56,215.85 C330.56,217.43 328.12,215.63 329.28,214.2 Z M507.55,215.43 C508.99,215.6 510.2,216.18 510.54,217.75 C509.73,217.75 508.11,217.74 507.3,217.74 C507.36,217.16 507.48,216.01 507.55,215.43 Z M527.64,224.18 C528.69,224.86 529.64,225.66 530.4,226.68 C529.6,226.68 528,226.69 527.19,226.7 C527.3,226.07 527.53,224.81 527.64,224.18 Z M568.46,235.28 C569.48,233.99 571.55,235.83 570.53,237.05 C569.47,238.27 567.42,236.51 568.46,235.28 Z M319.62,240.51 C320.75,239.82 321.67,240.02 322.39,241.13 C322.85,242.64 320.6,243.5 319.63,242.51 C319.63,242.01 319.63,241.01 319.62,240.51 Z M288.71,247.49 C289.2,247.44 290.2,247.33 290.69,247.27 C290.7,247.83 290.71,248.94 290.72,249.5 C290.22,249.47 289.22,249.4 288.71,249.37 C288.71,248.9 288.71,247.96 288.71,247.49 Z M605.04,253.45 C606.41,252.42 607.66,254.81 606.46,255.7 C605.08,256.77 603.71,254.32 605.04,253.45 Z M341.28,268.33 C342.22,266.78 344.73,268.43 343.67,269.9 C342.7,271.39 340.08,269.83 341.28,268.33 Z M193.97,308.81 C195.6,308.26 196.16,308.81 195.67,310.44 C194.05,310.96 193.48,310.41 193.97,308.81 Z M580.35,313.4 C577.71,315.54 576.82,310.33 579.91,310.81 C580.94,311.49 581.08,312.35 580.35,313.4 Z M341.42,316.25 C342.43,314.73 344.89,316.49 343.72,317.92 C342.7,319.41 340.22,317.68 341.42,316.25 Z M530.1,320.68 C530.7,319.74 531.3,318.8 532,317.92 C532.68,318.44 533.27,319.05 533.77,319.77 C532.84,320.88 531.36,320.58 530.1,320.68 Z M249.62,332.6 C250.1,332.57 251.06,332.51 251.54,332.48 C251.56,333.01 251.62,334.09 251.64,334.62 C251.09,334.6 249.99,334.55 249.44,334.53 C249.48,334.05 249.57,333.08 249.62,332.6 Z M547.35,345.43 C547.84,345.51 548.82,345.68 549.31,345.77 C549.29,346.58 549.28,347.39 549.27,348.21 C548.8,348.3 547.84,348.46 547.36,348.55 C547.35,347.5 547.34,346.46 547.35,345.43 Z M637.34,353.58 C638.29,352.4 640.54,353.81 639.57,355.15 C638.63,356.44 636.33,354.9 637.34,353.58 Z M281.29,354.42 C282.7,353.26 284.56,355.65 283,356.68 C281.59,357.79 279.72,355.43 281.29,354.42 Z M330.52,362.22 C331.56,360.71 333.96,362.59 332.79,363.99 C331.72,365.45 329.37,363.61 330.52,362.22 Z M347.34,374.77 C348.44,375.29 350.62,375.68 349.56,377.37 C348.99,377.58 347.84,378.01 347.26,378.23 C347.28,377.37 347.32,375.64 347.34,374.77 Z M520.98,383.87 C522.79,381.96 525.39,382.49 525.68,385.32 C523.89,385.54 522.32,385.05 520.98,383.87 Z M555.04,386.08 C556.47,384.95 558.24,387.44 556.72,388.43 C555.28,389.52 553.54,387.09 555.04,386.08 Z M311.28,402.26 C312.6,400.68 314.72,403.19 313.34,404.45 C311.98,405.92 309.77,403.56 311.28,402.26 Z M653.34,403.52 C654.95,402.96 655.52,403.5 655.07,405.12 C653.45,405.68 652.87,405.15 653.34,403.52 Z M442.34,413.39 C443.32,413.37 443.99,413.85 444.35,414.84 C443.71,415.59 443.05,416.32 442.38,417.03 C442.31,415.81 442.3,414.6 442.34,413.39 Z M368.1,426.29 C368.76,426.23 370.09,426.12 370.76,426.07 C370.72,426.72 370.65,428.01 370.62,428.66 C370.03,428.65 368.87,428.64 368.28,428.63 C368.23,428.05 368.14,426.87 368.1,426.29 Z M412.57,435.47 C412.95,435.56 413.73,435.75 414.12,435.84 C414.27,436.27 414.58,437.14 414.73,437.57 C414.16,437.6 413.02,437.65 412.45,437.67 C412.48,437.12 412.54,436.02 412.57,435.47 Z M494.33,442.38 C494.82,442.43 495.81,442.54 496.31,442.59 C496.35,443.06 496.43,444 496.47,444.47 C495.9,444.48 494.74,444.52 494.16,444.53 C494.2,444 494.29,442.92 494.33,442.38 Z M577.24,181.17 C578.56,181.8 578.55,182.47 577.22,183.17 C575.9,182.54 575.91,181.88 577.24,181.17 Z' id='c' />\n <path d='M568.5,401 C566.567003,401 565,399.432997 565,397.5 C565,395.567003 566.567003,394 568.5,394 C570.432997,394 572,395.567003 572,397.5 C572,399.432997 570.432997,401 568.5,401 Z M538.5,35 C535.462434,35 533,32.5375661 533,29.5 C533,26.4624339 535.462434,24 538.5,24 C541.537566,24 544,26.4624339 544,29.5 C544,32.5375661 541.537566,35 538.5,35 Z M531,400 C527.134007,400 524,396.865993 524,393 C524,389.134007 527.134007,386 531,386 C534.865993,386 538,389.134007 538,393 C538,396.865993 534.865993,400 531,400 Z M393.25,122.24 C394.25,120.63 396.58,122.53 395.49,123.93 C394.49,125.57 392.1,123.65 393.25,122.24 Z M452.55,130.16 C453.33,130.77 455.61,130.83 454.55,132.25 C454.02,132.44 452.95,132.81 452.42,132.99 C452.45,132.28 452.52,130.87 452.55,130.16 Z M374.14,154.52 C375.5,153.33 377.42,155.63 375.93,156.71 C374.56,157.93 372.6,155.59 374.14,154.52 Z M307.27,158.23 C308.27,156.67 310.66,158.48 309.54,159.9 C308.53,161.48 306.09,159.66 307.27,158.23 Z M418.29,165.39 C419.67,165.31 421.06,165.23 422.45,165.14 C422.07,166.15 421.69,167.16 421.31,168.17 C420.31,167.23 419.31,166.3 418.29,165.39 Z M348.233931,176.86 C347.473931,175.57 348.733931,174.73 349.613931,174 C350.533931,174.83 350.853931,176.05 351.193931,177.2 C350.203931,177.13 349.213931,177.02 348.233931,176.86 Z M557.16,176.42 C558.61,175.36 560.32,177.82 558.73,178.76 C557.24,179.88 555.52,177.35 557.16,176.42 Z M401.3,182.74 C402.4,182.77 403.51,182.82 404.61,182.87 C404,183.77 404.06,186.19 402.45,185.32 C401.32,185.18 401.74,183.5 401.3,182.74 Z M317.18,204.56 C318.62,203.46 320.35,205.88 318.81,206.87 C317.35,208.05 315.58,205.52 317.18,204.56 Z M582.55,229.01 C583.57,229.57 584.48,230.28 585.03,231.34 C584.35,231.41 582.99,231.56 582.31,231.63 C582.37,230.97 582.49,229.67 582.55,229.01 Z M314.87,240.59 C314.78,238.79 315.67,237.89 317.47,238 C317.51,238.61 317.6,239.82 317.65,240.43 C316.95,240.47 315.56,240.55 314.87,240.59 Z M620.17,250.08 C621.77,249.32 622.55,251.99 620.95,252.43 C619.31,253.19 618.52,250.51 620.17,250.08 Z M535.51,266.64 C534.84,264.46 537.01,262.5 538.7,264.66 C538.2,266.08 536.94,266.63 535.51,266.64 Z M336.13,266.16 C338.01,266.66 339.63,267.57 338.14,269.63 C336.27,269.4 336.35,267.55 336.13,266.16 Z M543.28,282.33 C544.73,281.17 546.52,283.64 544.92,284.62 C543.48,285.71 541.69,283.3 543.28,282.33 Z M334.94,300.34 C336.22,299.38 337.84,301.56 336.6,302.54 C335.3,303.49 333.67,301.32 334.94,300.34 Z M593.46,313.38 C594.8,311.64 596.88,314.22 595.43,315.48 C594.06,316.96 591.81,314.65 593.46,313.38 Z M535.79,322.22 C534.94,320.89 536.53,319.87 537.06,318.81 C537.55,319.72 538.11,320.62 538.48,321.6 C537.8,322.46 536.75,322.41 535.79,322.22 Z M234.69,334.81 C235.51,335.69 236.32,336.58 237.13,337.48 C236.43,337.61 235.03,337.86 234.33,337.99 C234.42,337.19 234.6,335.61 234.69,334.81 Z M551.07,348.95 C551.78,348.32 552.55,347.74 553.4,347.27 C554.11,348.48 554.17,349.75 553.57,351.09 C552.71,350.4 551.86,349.71 551.07,348.95 Z M343.24,379.18 C343.87,379.18 345.13,379.18 345.76,379.18 C345.77,379.87 345.79,381.25 345.8,381.94 C345.17,381.86 343.91,381.71 343.28,381.64 C343.27,381.03 343.25,379.8 343.24,379.18 Z M300,412.38 C301.37,411.34 303.39,413.62 301.73,414.62 C300.33,415.68 298.34,413.39 300,412.38 Z M676.36,414.9 C677.98,414.36 678.53,414.9 678.02,416.53 C676.4,417.05 675.84,416.51 676.36,414.9 Z M443.23,417.71 C443.92,418.82 444.52,419.98 445.06,421.18 C444.29,421.19 442.75,421.22 441.99,421.23 C442.37,420.05 442.78,418.87 443.23,417.71 Z M521.44,423.82 C521.79,422.19 522.81,421.14 524.47,420.9 C524.51,421.62 524.6,423.05 524.64,423.77 C523.84,423.79 522.24,423.81 521.44,423.82 Z M410.34,451 C411.36,449.42 413.74,451.29 412.59,452.71 C411.56,454.28 409.21,452.4 410.34,451 Z M381.07,451.98 C384.74,451.47 380.85,456.79 380.08,453.27 C380.33,452.95 380.82,452.3 381.07,451.98 Z M168.46,464.36 C169.09,464.46 170.36,464.67 170.99,464.77 C170.2,465.49 169.41,466.22 168.62,466.95 C168.58,466.31 168.5,465.01 168.46,464.36 Z M286.52,104 C288.12,103.47 288.65,104.04 288.13,105.7 C286.54,106.21 286,105.64 286.52,104 Z M431.24,114.57 C432.67,113.47 434.39,115.9 432.91,116.91 C431.46,118.06 429.7,115.55 431.24,114.57 Z M376.18,143.37 C377.57,142.27 379.56,144.55 377.94,145.59 C376.56,146.66 374.55,144.38 376.18,143.37 Z M456.1,150.42 C459.52,148.9 457.24,155.09 455.52,151.92 C455.66,151.54 455.95,150.79 456.1,150.42 Z M533.41,171.1 C534.45,169.52 536.77,171.43 535.63,172.83 C534.6,174.46 532.29,172.47 533.41,171.1 Z M290.32,173.89 C291.97,173.4 292.53,173.95 292,175.56 C290.35,176.04 289.79,175.48 290.32,173.89 Z M318.28,178.3 C319.59,179 319.57,179.67 318.25,180.32 C316.96,179.6 316.97,178.93 318.28,178.3 Z M186.27,191.6 C187.16,190.4 189.55,191.63 188.52,193.02 C187.64,194.34 185.16,192.98 186.27,191.6 Z M558.17,222.59 C556.61,221.25 559.08,219.16 560.38,220.48 C561.86,221.84 559.5,224 558.17,222.59 Z M597.02,235.11 C598.02,233.78 600.65,235.22 599.45,236.71 C598.48,238.15 595.78,236.58 597.02,235.11 Z M277.27,289.22 C278.57,287.71 281.02,289.89 279.5,291.28 C278.25,292.63 275.8,290.56 277.27,289.22 Z M615.88,299.45 C617.47,298.88 618.04,299.41 617.58,301.04 C615.95,301.62 615.38,301.08 615.88,299.45 Z M203.09,321.57 C204.5,321.72 204.76,322.38 203.86,323.56 C202.45,323.41 202.19,322.75 203.09,321.57 Z M588.1,324.39 C589.49,323.13 591.4,325.49 589.79,326.53 C588.4,327.77 586.46,325.42 588.1,324.39 Z M570.26,417.72 C571.53,417.86 572.8,418.09 574.05,418.41 C573.19,418.93 572.33,419.46 571.47,419.98 C571.17,419.42 570.56,418.29 570.26,417.72 Z M486.68,466.73 C487.18,466.62 488.17,466.38 488.66,466.27 C488.67,467.33 488.68,468.4 488.7,469.48 C488.22,469.4 487.26,469.24 486.79,469.16 C486.75,468.34 486.71,467.54 486.68,466.73 Z M389.26,481.47 C390.69,480.34 392.45,482.76 390.96,483.79 C389.53,484.93 387.74,482.47 389.26,481.47 Z M402.09,69.02 C403.7,68.5 404.24,69.06 403.72,70.71 C402.11,71.23 401.57,70.67 402.09,69.02 Z M588.195366,341.221176 C589.795366,340.651176 590.335366,341.181176 589.825366,342.831176 C588.215366,343.411176 587.665366,342.871176 588.195366,341.221176 Z M617.19,150.3 C618.81,149.76 619.37,150.31 618.87,151.94 C617.23,152.48 616.67,151.93 617.19,150.3 Z M670.95,168.22 C672.54,167.64 673.12,168.18 672.67,169.82 C671.06,170.4 670.48,169.87 670.95,168.22 Z M487.04,117.4 C488.46,116.3 490.28,118.68 488.69,119.67 C487.25,120.83 485.42,118.39 487.04,117.4 Z M296.21,266.09 C297.61,265.49 298.51,267.87 296.94,268.19 C295.53,268.75 294.68,266.46 296.21,266.09 Z M718.91,273.21 C720.53,272.69 721.12,273.24 720.66,274.85 C719.01,275.37 718.43,274.83 718.91,273.21 Z M168.23,310.31 C169.86,309.8 170.4,310.36 169.87,311.99 C168.22,312.48 167.68,311.92 168.23,310.31 Z M278.25,329.05 C279.88,328.55 280.43,329.11 279.89,330.74 C278.25,331.22 277.71,330.66 278.25,329.05 Z M308.17,333.05 C309.79,332.48 310.36,333.02 309.88,334.66 C308.26,335.22 307.69,334.68 308.17,333.05 Z M267.09,360.35 C268.73,359.79 269.28,360.32 268.75,361.96 C267.1,362.51 266.55,361.97 267.09,360.35 Z M697.31,401.21 C698.94,400.72 699.49,401.29 698.96,402.91 C697.31,403.39 696.76,402.82 697.31,401.21 Z M214.31,404.22 C215.91,403.65 216.46,404.21 215.96,405.88 C214.37,406.42 213.82,405.87 214.31,404.22 Z M620.51,412.12 C621.92,411.73 622.4,412.23 621.96,413.62 C620.54,413.99 620.05,413.5 620.51,412.12 Z M241.25,437.27 C242.23,436.04 244.44,437.64 243.43,438.92 C242.44,440.15 240.19,438.56 241.25,437.27 Z M308.19,428.27 C309.8,427.71 310.37,428.25 309.88,429.89 C308.25,430.44 307.69,429.9 308.19,428.27 Z M423.25,482.97 C424.89,482.49 425.43,483.06 424.87,484.68 C423.22,485.15 422.69,484.57 423.25,482.97 Z M275.302273,203.38662 C274.583047,201.297838 275.693292,199.021498 277.782074,198.302273 C279.870856,197.583047 282.147196,198.693292 282.866421,200.782074 C283.585647,202.870856 282.475401,205.147196 280.38662,205.866421 C278.297838,206.585647 276.021498,205.475401 275.302273,203.38662 Z M467.16,452.38 C468.79,451.83 469.33,452.37 468.79,454.01 C467.13,454.54 466.59,454 467.16,452.38 Z M632.22,243 C633.82,242.48 634.38,243.05 633.9,244.7 C632.29,245.2 631.73,244.63 632.22,243 Z M531.44,222.23 C532.4,220.85 535.16,222.24 533.94,223.77 C532.96,225.09 530.25,223.73 531.44,222.23 Z M478.5,190.4 C479.03,190.4 480.08,190.4 480.6,190.4 C480.58,190.91 480.54,191.94 480.52,192.45 C480.02,192.44 479.03,192.43 478.53,192.43 C478.52,191.92 478.51,190.9 478.5,190.4 Z M511.52,211.65 C512.02,211.65 513.03,211.65 513.54,211.64 C513.54,212.57 513.54,213.5 513.55,214.43 C512.98,214.41 511.85,214.38 511.28,214.36 C511.35,213.45 511.43,212.55 511.52,211.65 Z M274.09,242.45 C275.48,241.33 277.38,243.67 275.8,244.69 C274.4,245.82 272.47,243.47 274.09,242.45 Z M288.22,273.36 C289.63,272.21 291.48,274.6 289.93,275.62 C288.52,276.75 286.65,274.37 288.22,273.36 Z M336.2,317.42 C336.97,317.46 338.5,317.54 339.27,317.58 C338.49,318.55 337.55,319.37 336.53,320.08 C336.45,319.41 336.28,318.08 336.2,317.42 Z M662.13,360.48 C663.46,359.33 665.58,361.51 663.98,362.61 C662.64,363.73 660.51,361.56 662.13,360.48 Z M326.12,367.46 C325.82,365.57 326.92,364.86 328.69,364.86 C328.66,365.55 328.58,366.94 328.55,367.63 C327.94,367.59 326.73,367.5 326.12,367.46 Z M559.49,430.29 C561.09,429.79 561.62,430.37 561.08,432.02 C559.48,432.51 558.95,431.93 559.49,430.29 Z M459.46,187.38 C459.92,187.48 460.84,187.69 461.3,187.8 C461.3,188.6 461.3,189.41 461.3,190.21 C459.78,190.39 458.26,190.58 456.76,190.75 C457.36,190.58 458.58,190.23 459.18,190.06 C459.25,189.39 459.39,188.05 459.46,187.38 Z M528.2,167.22 C529.82,166.68 530.38,167.23 529.88,168.86 C528.25,169.39 527.69,168.85 528.2,167.22 Z M366.4,430.53 C367.85,429.23 369.62,432.18 367.99,433.01 C366.66,435.05 364.48,431.21 366.4,430.53 Z' id='d' />\n <path d='M400,175 C396.134007,175 393,171.865993 393,168 C393,164.134007 396.134007,161 400,161 C403.865993,161 407,164.134007 407,168 C407,171.865993 403.865993,175 400,175 Z M333.5,398 C329.357864,398 326,394.642136 326,390.5 C326,386.357864 329.357864,383 333.5,383 C337.642136,383 341,386.357864 341,390.5 C341,394.642136 337.642136,398 333.5,398 Z M263.5,296 C259.357864,296 256,292.642136 256,288.5 C256,284.357864 259.357864,281 263.5,281 C267.642136,281 271,284.357864 271,288.5 C271,292.642136 267.642136,296 263.5,296 Z M570.5,224 C564.70101,224 560,219.29899 560,213.5 C560,207.70101 564.70101,203 570.5,203 C576.29899,203 581,207.70101 581,213.5 C581,219.29899 576.29899,224 570.5,224 Z M431,105 C428.790861,105 427,103.209139 427,101 C427,98.790861 428.790861,97 431,97 C433.209139,97 435,98.790861 435,101 C435,103.209139 433.209139,105 431,105 Z M455,124 C452.790861,124 451,122.209139 451,120 C451,117.790861 452.790861,116 455,116 C457.209139,116 459,117.790861 459,120 C459,122.209139 457.209139,124 455,124 Z M614,235 C611.790861,235 610,233.209139 610,231 C610,228.790861 611.790861,227 614,227 C616.209139,227 618,228.790861 618,231 C618,233.209139 616.209139,235 614,235 Z M687.5,374 C684.462434,374 682,371.537566 682,368.5 C682,365.462434 684.462434,363 687.5,363 C690.537566,363 693,365.462434 693,368.5 C693,371.537566 690.537566,374 687.5,374 Z M389.99,107.19 C391.36,105.98 393.26,108.39 391.78,109.45 C390.39,110.61 388.55,108.28 389.99,107.19 Z M367.99,140.17 C369.37,138.98 371.26,141.38 369.78,142.44 C368.39,143.59 366.54,141.25 367.99,140.17 Z M297.25,146.6 C298.72,145.47 300.23,148.04 298.83,149.02 C297.33,150.24 295.76,147.56 297.25,146.6 Z M537.88,154.9 C539.5,154.38 540.05,154.93 539.54,156.56 C537.9,157.08 537.35,156.53 537.88,154.9 Z M419.34,159.95 C420.57,160.06 421.68,160.45 422.67,161.13 C421.79,161.98 420.6,162.2 419.5,162.59 C419.46,161.93 419.38,160.61 419.34,159.95 Z M568.28,166.3 C569.73,165.11 571.5,167.59 569.9,168.57 C568.47,169.65 566.64,167.25 568.28,166.3 Z M345.48,170.22 C346.6,170.66 348.6,170.33 348.53,172.03 C349.23,173.33 347.16,173.24 346.42,173.34 C345.76,172.44 345.78,171.24 345.48,170.22 Z M480,185.41 C480.59,185.31 481.78,185.11 482.37,185 C482.38,185.8 482.41,187.39 482.43,188.18 C481.25,187.57 480.16,186.83 480,185.41 Z M304.41,195.31 C305.37,193.74 307.81,195.51 306.74,196.95 C305.75,198.52 303.29,196.76 304.41,195.31 Z M540.59,215.48 C541.75,215.8 542.4,216.64 542.62,217.8 C541.76,218.55 540.98,219.37 540.29,220.26 L539.37,219.54 C538.59,220.23 537.8,220.89 536.99,221.52 C536.27,220.85 535.64,220.1 535,219.37 C536.37,218.72 537.79,218.42 539.04,219.74 C539.96,218.5 540.24,216.95 540.59,215.48 Z M596.69,223.44 C597.22,223.4 598.28,223.33 598.81,223.29 C598.76,223.9 598.68,225.11 598.64,225.72 C598.17,225.68 597.22,225.59 596.75,225.54 C596.73,225.02 596.71,223.97 596.69,223.44 Z M312.79,238.96 C310.92,238.37 309.41,237.39 310.87,235.36 C312.74,235.72 312.67,237.46 312.79,238.96 Z M634.58,247.1 C635.65,245.4 637.88,247.5 636.65,248.86 C635.58,250.54 633.37,248.43 634.58,247.1 Z M541.52,262.62 C543.3,261.29 543.83,264.81 542.38,265.61 C540.85,265.09 539.24,263.46 541.52,262.62 Z M331.41,265.26 C331.92,265.28 332.94,265.31 333.46,265.33 C333.47,265.94 333.49,267.17 333.5,267.79 C332.95,267.79 331.86,267.79 331.31,267.8 C331.34,267.16 331.39,265.89 331.41,265.26 Z M273.08,271.35 C274.45,270.17 276.39,272.5 274.85,273.57 C273.47,274.74 271.55,272.41 273.08,271.35 Z M744.14,271.48 C745.41,270.12 747.91,272.07 746.45,273.49 C745.21,274.83 742.53,272.85 744.14,271.48 Z M548.26,283.84 C546.81,282.48 549.3,280.48 550.59,281.62 C551.99,282.98 549.6,285.17 548.26,283.84 Z M329.23,301.17 C330.21,299.61 332.65,301.37 331.55,302.81 C330.57,304.39 328.09,302.62 329.23,301.17 Z M609.27,315.3 C610.71,314.16 612.5,316.62 610.91,317.6 C609.46,318.7 607.68,316.28 609.27,315.3 Z M331.28,319.07 C332.28,317.51 334.72,319.31 333.58,320.74 C332.58,322.29 330.16,320.49 331.28,319.07 Z M540.5,322.57 C539.8,320.91 542.63,321.25 543.31,320.44 C543.15,321.31 542.84,323.04 542.68,323.9 C541.68,323.77 540.95,323.33 540.5,322.57 Z M293.39,337.95 C294.99,337.37 295.56,337.9 295.09,339.54 C293.48,340.1 292.92,339.57 293.39,337.95 Z M601.05,347.49 C599.37,346.03 602.18,344.2 603.39,345.63 C604.86,347.08 602.25,348.88 601.05,347.49 Z M555.87,352.42 C556.4,351.21 557.07,350.06 557.94,349.05 C558.31,350.18 558.68,351.32 559.04,352.47 C558.25,352.46 556.66,352.43 555.87,352.42 Z M251.77,366.52 C252.6,366.43 254.25,366.25 255.07,366.16 C254.91,366.85 254.6,368.22 254.44,368.9 C253.54,368.11 252.65,367.32 251.77,366.52 Z M322.59,367.34 C324.07,367.64 324.42,369.06 324.8,370.33 C324.12,370.33 322.77,370.33 322.09,370.33 C322.22,369.32 322.39,368.33 322.59,367.34 Z M444.71,427.25 C444.12,426.52 441.47,424.98 443.01,424.22 C445.25,422.42 444.77,426.08 444.71,427.25 Z M524.14,427.4 C524.76,426.76 524.94,425.39 525.99,425.38 C527.81,424.8 527.68,426.99 528.24,428.1 C526.86,427.88 525.5,427.65 524.14,427.4 Z M699.38,426.13 C700.4,424.47 702.64,426.51 701.54,427.88 C700.5,429.55 698.23,427.5 699.38,426.13 Z M363.16,437.44 C363.74,435.95 364.83,434.99 366.47,434.87 C366.46,435.58 366.44,437 366.43,437.71 C365.34,437.62 364.25,437.53 363.16,437.44 Z M565.27,436.25 C566.71,435.07 568.51,437.54 566.92,438.53 C565.49,439.64 563.7,437.24 565.27,436.25 Z M408.3,465.9 C408.88,465.97 410.06,466.12 410.65,466.19 C410.53,466.69 410.3,467.69 410.19,468.19 C409.75,468.32 408.88,468.57 408.44,468.7 C408.4,468 408.33,466.6 408.3,465.9 Z M375.33,467.22 C376.33,465.64 378.67,467.53 377.67,468.95 C376.67,470.54 374.32,468.62 375.33,467.22 Z M398.61,43.3 C399.96,42.17 401.36,44.61 400.08,45.52 C398.72,46.58 397.43,44.21 398.61,43.3 Z M371.2,128.46 C372.56,127.4 374.55,129.66 373.04,130.73 C371.66,131.79 369.67,129.54 371.2,128.46 Z M637.31,134.56 C638.24,133.38 640.58,134.72 639.5,136.06 C638.57,137.35 636.15,135.9 637.31,134.56 Z M458.45,135.48 C459,135.45 460.1,135.39 460.65,135.36 C460.62,135.92 460.57,137.02 460.54,137.58 C460.06,137.53 459.11,137.44 458.64,137.39 C458.59,136.91 458.49,135.96 458.45,135.48 Z M693.92,156.54 C695.56,156 696.13,156.53 695.64,158.13 C693.97,158.66 693.4,158.13 693.92,156.54 Z M544.12,159.35 C547.55,157.87 545.24,164.04 543.55,160.85 C543.69,160.47 543.98,159.72 544.12,159.35 Z M278.51,163.51 C279,163.52 279.97,163.55 280.46,163.57 C280.49,164.07 280.54,165.06 280.57,165.56 C280.03,165.58 278.95,165.62 278.41,165.63 C278.43,165.1 278.48,164.04 278.51,163.51 Z M162.51,183.5 C161.06,182.25 163.3,180.16 164.47,181.65 C165.8,182.92 163.72,184.93 162.51,183.5 Z M280.43,263.24 C281.49,261.71 283.79,263.63 282.65,265.01 C281.58,266.55 279.23,264.62 280.43,263.24 Z M641.32,300.86 C642.95,300.35 643.49,300.91 642.94,302.53 C641.32,303.02 640.77,302.46 641.32,300.86 Z M142.41,312.12 C143.44,310.47 145.72,312.48 144.61,313.87 C143.58,315.5 141.31,313.49 142.41,312.12 Z M603.13,327.49 C604.5,326.44 606.47,328.69 604.96,329.77 C603.58,330.79 601.55,328.53 603.13,327.49 Z M293.37,423.31 C291.81,423.13 291.58,420.28 293.26,420.15 C294.99,420.17 295.15,423.23 293.37,423.31 Z M641.94,425.91 C643.54,425.33 644.11,425.86 643.67,427.51 C642.05,428.07 641.48,427.53 641.94,425.91 Z M583.48,427.52 C585.09,426.34 585.55,430.78 583.83,429.8 C581.85,430.74 581.94,427.33 583.48,427.52 Z M297.44,440.63 C297.98,438.71 299.85,439.43 301.16,440.09 C300.17,441.09 298.37,442.57 297.44,440.63 Z M220.58,453.01 C221.47,451.67 223.83,453.15 222.83,454.51 C221.92,455.75 219.64,454.35 220.58,453.01 Z M255.2,63.34 C256.83,62.8 257.37,63.34 256.82,64.98 C255.19,65.53 254.65,64.98 255.2,63.34 Z M470.31,467.19 C470.87,467.26 471.98,467.4 472.53,467.47 C472.45,467.88 472.27,468.69 472.18,469.09 C471.66,469.28 470.62,469.67 470.11,469.86 C470.16,469.19 470.26,467.86 470.31,467.19 Z M460.34,183.18 C461.68,181.5 463.97,183.89 462.41,185.24 C461.14,186.71 458.84,184.47 460.34,183.18 Z M264.16,122.98 C265.82,122.47 266.38,123.01 265.84,124.61 C264.19,125.12 263.63,124.58 264.16,122.98 Z M256.02,181.26 C257.67,180.75 258.23,181.3 257.7,182.91 C256.04,183.41 255.48,182.86 256.02,181.26 Z M491.41,103.2 C492.43,101.58 494.82,103.44 493.57,104.85 C492.55,106.5 490.17,104.6 491.41,103.2 Z M515.2,208.43 C516.46,207.11 518.79,209.22 517.41,210.55 C516.09,212.14 513.69,209.82 515.2,208.43 Z M657.3,237.04 C658.94,236.5 659.52,237.03 659.04,238.64 C657.39,239.18 656.81,238.64 657.3,237.04 Z M259.36,238.16 C261.01,237.67 261.54,238.23 260.98,239.85 C259.33,240.33 258.79,239.77 259.36,238.16 Z M177.22,325.19 C178.82,324.65 179.37,325.2 178.88,326.86 C177.27,327.4 176.72,326.84 177.22,325.19 Z M253.19,335.16 C254.84,334.64 255.4,335.18 254.88,336.8 C253.23,337.32 252.67,336.77 253.19,335.16 Z M169.11,428.05 C170.74,427.53 171.29,428.08 170.76,429.71 C169.13,430.22 168.58,429.67 169.11,428.05 Z M145.607311,479.88259 C144.719617,477.304542 146.089921,474.495004 148.667969,473.607311 C151.246017,472.719617 154.055556,474.089921 154.943249,476.667969 C155.830942,479.246017 154.460639,482.055556 151.88259,482.943249 C149.304542,483.830942 146.495004,482.460639 145.607311,479.88259 Z M217.302273,341.38662 C216.583047,339.297838 217.693292,337.021498 219.782074,336.302273 C221.870856,335.583047 224.147196,336.693292 224.866421,338.782074 C225.585647,340.870856 224.475401,343.147196 222.38662,343.866421 C220.297838,344.585647 218.021498,343.475401 217.302273,341.38662 Z M489.302273,484.38662 C488.583047,482.297838 489.693292,480.021498 491.782074,479.302273 C493.870856,478.583047 496.147196,479.693292 496.866421,481.782074 C497.585647,483.870856 496.475401,486.147196 494.38662,486.866421 C492.297838,487.585647 490.021498,486.475401 489.302273,484.38662 Z M721.18,411.08 C722.79,410.54 723.35,411.09 722.85,412.73 C721.22,413.26 720.66,412.72 721.18,411.08 Z' id='e' />\n <path d='M386.32,92.26 C387.33,90.69 389.71,92.53 388.58,93.94 C387.57,95.52 385.15,93.68 386.32,92.26 Z M547,148 C544.790861,148 543,146.209139 543,144 C543,141.790861 544.790861,140 547,140 C549.209139,140 551,141.790861 551,144 C551,146.209139 549.209139,148 547,148 Z M593,440 C590.790861,440 589,438.209139 589,436 C589,433.790861 590.790861,432 593,432 C595.209139,432 597,433.790861 597,436 C597,438.209139 595.209139,440 593,440 Z M399.5,28 C396.462434,28 394,25.5375661 394,22.5 C394,19.4624339 396.462434,17 399.5,17 C402.537566,17 405,19.4624339 405,22.5 C405,25.5375661 402.537566,28 399.5,28 Z M139.5,178 C136.462434,178 134,175.537566 134,172.5 C134,169.462434 136.462434,167 139.5,167 C142.537566,167 145,169.462434 145,172.5 C145,175.537566 142.537566,178 139.5,178 Z M363.5,131 C360.462434,131 358,128.537566 358,125.5 C358,122.462434 360.462434,120 363.5,120 C366.537566,120 369,122.462434 369,125.5 C369,128.537566 366.537566,131 363.5,131 Z M772.5,275 C769.462434,275 767,272.537566 767,269.5 C767,266.462434 769.462434,264 772.5,264 C775.537566,264 778,266.462434 778,269.5 C778,272.537566 775.537566,275 772.5,275 Z M533,443 C529.134007,443 526,439.865993 526,436 C526,432.134007 529.134007,429 533,429 C536.865993,429 540,432.134007 540,436 C540,439.865993 536.865993,443 533,443 Z M746.5,422 C743.462434,422 741,419.537566 741,416.5 C741,413.462434 743.462434,411 746.5,411 C749.537566,411 752,413.462434 752,416.5 C752,419.537566 749.537566,422 746.5,422 Z M418.65,155.53 C419.52,155.02 420.44,154.62 421.36,154.2 C421.36,155.4 421.37,156.6 421.37,157.8 C420.44,157.1 418.22,157.12 418.65,155.53 Z M579.42,156.19 C580.42,154.6 582.83,156.44 581.7,157.87 C580.69,159.43 578.29,157.6 579.42,156.19 Z M342.37,168.54 C342.22,167.01 343.49,166.42 344.68,165.89 C345.06,166.88 345.43,167.88 345.81,168.87 C344.65,168.8 343.51,168.69 342.37,168.54 Z M484,178.41 C484.59,178.31 485.78,178.11 486.37,178 C486.38,178.8 486.41,180.39 486.43,181.18 C485.25,180.57 484.16,179.83 484,178.41 Z M518.14,204.52 C519.62,204.59 522.63,204.93 520.63,207.05 C519.35,208.76 518.15,205.75 518.14,204.52 Z M544.18,215.61 C543.43,213.21 545.22,213.01 547.18,213.22 C546.4,214.33 545.94,216.27 544.18,215.61 Z M244.33,233.48 C245.6,232.26 248.22,234.05 246.64,235.47 C245.42,236.91 242.71,234.82 244.33,233.48 Z M304.92,233.02 C306.86,233.2 309.29,234.5 307.46,236.66 C305.76,236.55 305.78,234.12 304.92,233.02 Z M650.08,243.44 C651.5,242.21 653.19,244.68 651.76,245.72 C650.34,246.96 648.57,244.46 650.08,243.44 Z M546.23,261.16 C547.37,260.9 549.76,262.02 548.23,263.22 C546.85,265.36 543.49,262.08 546.23,261.16 Z M326.14,264.17 C326.78,264.15 328.06,264.11 328.7,264.09 C328.67,264.73 328.6,266.01 328.56,266.66 C328,266.61 326.87,266.51 326.31,266.46 C326.26,265.89 326.18,264.74 326.14,264.17 Z M257.12,269.32 C257.91,269.38 259.51,269.49 260.31,269.55 C259.45,270.44 258.52,271.25 257.55,272.02 C257.44,271.34 257.22,269.99 257.12,269.32 Z M560.008573,280.10621 C561.858573,279.37621 563.028573,282.63621 560.918573,282.97621 C559.118573,283.49621 558.138573,280.61621 560.008573,280.10621 Z M325.19,301.41 C326.9,300.69 327.31,303.44 325.74,303.8 C324.05,304.53 323.61,301.75 325.19,301.41 Z M117,313.94 C118.64,313.37 119.23,313.89 118.76,315.5 C117.11,316.05 116.53,315.53 117,313.94 Z M326.8,320.11 C328.38,319.62 328.92,320.21 328.42,321.87 C326.82,322.35 326.27,321.76 326.8,320.11 Z M546.19,322.23 C547.67,322.03 548.85,322.87 548.61,324.43 C546.8,325.96 543.63,323.84 546.19,322.23 Z M616.21,350.13 C617.67,348.82 619.3,351.49 617.74,352.42 C616.25,353.68 614.7,351.1 616.21,350.13 Z M560.93,354.59 C560.92,352.87 561.77,351.89 563.53,351.96 C563.59,352.59 563.69,353.87 563.74,354.51 C563.04,354.53 561.63,354.57 560.93,354.59 Z M317.22,371.51 C318.34,371.33 319.46,371.19 320.59,371.08 C320.47,371.7 320.22,372.93 320.1,373.54 C319.1,372.92 317.44,372.93 317.22,371.51 Z M288.53,425.36 C287.3,423.98 289.45,421.63 290.79,423.15 C292.14,424.49 289.79,426.72 288.53,425.36 Z M443.16,428.73 C443.74,428.72 444.89,428.72 445.47,428.71 C445.46,429.75 445.44,430.8 445.43,431.85 C443.67,431.59 442.83,430.52 443.16,428.73 Z M723.2,437.15 C724.75,436.52 725.71,439.1 723.98,439.47 C722.39,440.13 721.4,437.46 723.2,437.15 Z M361.48,439.43 C363.58,439.38 364.73,440.52 364.66,442.64 C362.43,442.78 361.15,441.76 361.48,439.43 Z M575.15,448.22 C577.13,447.72 579.18,448.71 579.08,450.99 C577.73,450.19 575.09,450.29 575.15,448.22 Z M371.4,481.44 C371.84,481.53 372.74,481.7 373.19,481.78 C373.26,482.22 373.41,483.08 373.48,483.51 C372.92,483.58 371.81,483.71 371.25,483.78 C371.29,483.2 371.36,482.03 371.4,481.44 Z M239.33,44.89 C238.02,43.59 240.13,41.21 241.48,42.56 C242.75,43.87 240.71,46.39 239.33,44.89 Z M366.35,114.24 C367.36,112.69 369.75,114.51 368.62,115.93 C367.6,117.49 365.17,115.67 366.35,114.24 Z M461.14,120.39 C461.84,120.34 463.26,120.25 463.96,120.2 C463.83,120.77 463.56,121.92 463.43,122.5 C463.01,122.41 462.19,122.23 461.78,122.15 C461.62,121.71 461.3,120.83 461.14,120.39 Z M716.3,145.05 C717.28,143.46 719.71,145.26 718.59,146.71 C717.62,148.34 715.24,146.46 716.3,145.05 Z M554.13,147.56 C555.51,146.51 557.47,148.78 555.87,149.8 C554.48,150.9 552.46,148.56 554.13,147.56 Z M266.49,153.5 C267.07,153.41 268.24,153.24 268.82,153.16 C268.76,153.76 268.65,154.97 268.59,155.58 C268.17,155.48 267.32,155.27 266.89,155.17 C266.79,154.75 266.59,153.92 266.49,153.5 Z M212.3,153.86 C213.93,153.31 214.49,153.85 213.98,155.48 C212.36,156.01 211.8,155.47 212.3,153.86 Z M265.38,260.23 C266.44,258.64 268.68,260.65 267.54,262.01 C266.48,263.62 264.18,261.59 265.38,260.23 Z M619.16,330.28 C620.74,329.79 621.42,332.43 619.77,332.73 C618.17,333.23 617.48,330.56 619.16,330.28 Z M278.45,342.99 C279.43,341.71 281.61,343.34 280.63,344.64 C279.67,345.94 277.5,344.26 278.45,342.99 Z M146.05,439.42 C147.47,438.35 149.39,440.67 147.69,441.64 C146.26,442.78 144.34,440.36 146.05,439.42 Z M286.67,135.44 C287.18,135.43 288.21,135.41 288.72,135.4 C288.7,135.93 288.66,136.99 288.64,137.52 C288.15,137.49 287.16,137.44 286.66,137.41 C286.66,136.92 286.67,135.93 286.67,135.44 Z M623.73,318.89 C623.24,317.41 625.42,316.42 626.41,317.48 C626.41,317.99 626.41,319.02 626.41,319.54 C625.29,320.24 624.4,320.02 623.73,318.89 Z M473.51,482.52 C474.06,482.45 475.17,482.32 475.73,482.25 C475.69,482.83 475.63,483.99 475.6,484.57 C475.15,484.49 474.26,484.34 473.81,484.26 C473.73,483.82 473.59,482.96 473.51,482.52 Z M246.25,104.31 C247.89,103.77 248.46,104.31 247.95,105.92 C246.3,106.45 245.73,105.91 246.25,104.31 Z M184.13,282.22 C185.76,281.7 186.31,282.26 185.79,283.89 C184.16,284.4 183.61,283.85 184.13,282.22 Z M667.03,301.59 C668.42,301.12 668.93,301.59 668.57,302.99 C667.16,303.45 666.64,302.99 667.03,301.59 Z M151.36,328.37 C152.98,327.83 153.55,328.37 153.06,330.01 C151.44,330.54 150.87,330 151.36,328.37 Z M664.1,439.4 C665.48,439.02 665.95,439.53 665.5,440.93 C664.1,441.32 663.63,440.81 664.1,439.4 Z M228.16,341.03 C229.78,340.53 230.32,341.09 229.78,342.73 C228.16,343.23 227.62,342.66 228.16,341.03 Z M290.302273,188.38662 C289.583047,186.297838 290.693292,184.021498 292.782074,183.302273 C294.870856,182.583047 297.147196,183.693292 297.866421,185.782074 C298.585647,187.870856 297.475401,190.147196 295.38662,190.866421 C293.297838,191.585647 291.021498,190.475401 290.302273,188.38662 Z M200.607311,467.88259 C199.719617,465.304542 201.089921,462.495004 203.667969,461.607311 C206.246017,460.719617 209.055556,462.089921 209.943249,464.667969 C210.830942,467.246017 209.460639,470.055556 206.88259,470.943249 C204.304542,471.830942 201.495004,470.460639 200.607311,467.88259 Z M285.302273,452.38662 C284.583047,450.297838 285.693292,448.021498 287.782074,447.302273 C289.870856,446.583047 292.147196,447.693292 292.866421,449.782074 C293.585647,451.870856 292.475401,454.147196 290.38662,454.866421 C288.297838,455.585647 286.021498,454.475401 285.302273,452.38662 Z M236.302273,374.38662 C235.583047,372.297838 236.693292,370.021498 238.782074,369.302273 C240.870856,368.583047 243.147196,369.693292 243.866421,371.782074 C244.585647,373.870856 243.475401,376.147196 241.38662,376.866421 C239.297838,377.585647 237.021498,376.475401 236.302273,374.38662 Z M496.08,88.34 C497.4,87.03 499.73,89.16 498.27,90.48 C496.94,91.85 494.44,89.66 496.08,88.34 Z M612,223 C609.790861,223 608,221.209139 608,219 C608,216.790861 609.790861,215 612,215 C614.209139,215 616,216.790861 616,219 C616,221.209139 614.209139,223 612,223 Z M460.85,179.63 C461.41,178.52 461.93,177.21 463.42,177.33 C463.62,178.06 464.02,179.51 464.22,180.24 C463.38,180.09 461.7,179.78 460.85,179.63 Z M658.13,119.12 C659.74,118.58 660.3,119.13 659.8,120.76 C658.17,121.3 657.61,120.75 658.13,119.12 Z M386.22,126.25 C387.84,125.73 388.39,126.29 387.87,127.91 C386.22,128.42 385.67,127.87 386.22,126.25 Z' id='f' />\n <path d='M374.02,76.32 C375.36,75.29 377.42,77.52 375.89,78.59 C374.52,79.64 372.52,77.42 374.02,76.32 Z M383.04,77.19 C384.04,75.79 386.57,77.38 385.4,78.83 C384.4,80.29 381.77,78.66 383.04,77.19 Z M679.5,109 C676.462434,109 674,106.537566 674,103.5 C674,100.462434 676.462434,98 679.5,98 C682.537566,98 685,100.462434 685,103.5 C685,106.537566 682.537566,109 679.5,109 Z M336.5,165 C332.357864,165 329,161.642136 329,157.5 C329,153.357864 332.357864,150 336.5,150 C340.642136,150 344,153.357864 344,157.5 C344,161.642136 340.642136,165 336.5,165 Z M274.302273,126.38662 C273.583047,124.297838 274.693292,122.021498 276.782074,121.302273 C278.870856,120.583047 281.147196,121.693292 281.866421,123.782074 C282.585647,125.870856 281.475401,128.147196 279.38662,128.866421 C277.297838,129.585647 275.021498,128.475401 274.302273,126.38662 Z M640,324 C637.790861,324 636,322.209139 636,320 C636,317.790861 637.790861,316 640,316 C642.209139,316 644,317.790861 644,320 C644,322.209139 642.209139,324 640,324 Z M224.5,30 C221.462434,30 219,27.5375661 219,24.5 C219,21.4624339 221.462434,19 224.5,19 C227.537566,19 230,21.4624339 230,24.5 C230,27.5375661 227.537566,30 224.5,30 Z M229.5,92 C226.462434,92 224,89.5375661 224,86.5 C224,83.4624339 226.462434,81 229.5,81 C232.537566,81 235,83.4624339 235,86.5 C235,89.5375661 232.537566,92 229.5,92 Z M126.5,338 C123.462434,338 121,335.537566 121,332.5 C121,329.462434 123.462434,327 126.5,327 C129.537566,327 132,329.462434 132,332.5 C132,335.537566 129.537566,338 126.5,338 Z M747.5,455 C744.462434,455 742,452.537566 742,449.5 C742,446.462434 744.462434,444 747.5,444 C750.537566,444 753,446.462434 753,449.5 C753,452.537566 750.537566,455 747.5,455 Z M591.23,145.53 C592.56,144.3 594.61,146.52 593.01,147.62 C591.66,148.86 589.6,146.61 591.23,145.53 Z M418.51,150.06 C419.94,148.38 422,151.11 420.45,152.36 C419.03,153.84 417.28,151.28 418.51,150.06 Z M521.38,202.06 C522.09,201.64 523.52,200.81 524.23,200.39 C524.48,201.46 524.71,202.54 524.9,203.63 C523.59,203.39 521.96,203.6 521.38,202.06 Z M548.64,209.76 C549.13,209.67 550.12,209.51 550.61,209.43 C550.6,210.47 550.59,211.52 550.59,212.56 C550.1,212.47 549.13,212.3 548.64,212.21 C548.63,211.39 548.63,210.57 548.64,209.76 Z M301.37,231.02 C302.28,231.73 304.39,232 303.54,233.58 C302.84,234.05 302.12,234.48 301.39,234.9 C301.36,233.6 301.35,232.31 301.37,231.02 Z M665.09,240.18 C666.55,239.07 668.13,241.65 666.7,242.62 C665.19,243.75 663.64,241.16 665.09,240.18 Z M550.71,259.81 C551.14,259.77 551.98,259.69 552.41,259.65 C552.78,260.07 553.53,260.91 553.91,261.32 C552.84,261.83 551.78,262.33 550.72,262.83 C550.71,261.82 550.71,260.81 550.71,259.81 Z M321.19,263.26 C321.99,262.81 322.81,262.4 323.64,262.02 C323.63,263.27 323.61,264.53 323.58,265.79 C322.54,265.15 320.98,264.8 321.19,263.26 Z M569.008573,279.10621 C570.858573,278.37621 572.028573,281.63621 569.918573,281.97621 C568.118573,282.49621 567.138573,279.61621 569.008573,279.10621 Z M319.27,301.52 C320.78,300.44 322.23,303.05 320.8,304 C319.29,305.12 317.79,302.43 319.27,301.52 Z M91.21,315.31 C92.66,314.17 94.43,316.61 92.85,317.6 C91.42,318.68 89.6,316.27 91.21,315.31 Z M320.81,323.57 C321,322.53 321.45,321.68 322.15,321.01 C323.73,320.84 323.64,322.54 324.1,323.58 C323.27,323.57 321.63,323.57 320.81,323.57 Z M550.69,323.66 C551.71,323.66 552.73,323.68 553.77,323.7 C553.54,325.43 552.47,326.49 550.74,326.7 C550.71,325.69 550.7,324.67 550.69,323.66 Z M565.73,354.14 C566.55,354.3 568.18,354.62 569,354.78 C568.19,355.73 567.42,356.79 566.12,357.07 C566.02,356.34 565.83,354.87 565.73,354.14 Z M630.48,354.54 C631.01,354.55 632.06,354.57 632.59,354.58 C632.69,355.11 632.89,356.16 632.99,356.68 C632.35,356.66 631.08,356.61 630.44,356.59 C630.45,356.07 630.47,355.05 630.48,354.54 Z M312.98,374.05 C314.16,373.97 315.57,373.36 316.49,374.47 C316.06,375.4 315.52,376.27 315.02,377.17 C314.32,376.14 313.64,375.1 312.98,374.05 Z M585.55,459.19 C586.53,457.61 589.03,459.41 587.85,460.85 C586.84,462.36 584.43,460.61 585.55,459.19 Z M360.69,101.73 C360.85,100.06 362.02,99.46 363.54,99.37 C363.6,99.94 363.71,101.09 363.77,101.66 C363,101.68 361.46,101.71 360.69,101.73 Z M464.48,105.4 C465.08,105.34 466.28,105.21 466.88,105.15 C466.8,105.73 466.63,106.91 466.55,107.5 C466.14,107.4 465.31,107.2 464.9,107.11 C464.8,106.68 464.59,105.83 464.48,105.4 Z M740.31,132.25 C741.93,132.16 741.99,134.96 740.39,135.01 C738.82,135.03 738.76,132.36 740.31,132.25 Z M563.53,136.33 C564.47,134.89 567.17,136.4 566.04,137.9 C565.05,139.27 562.47,137.82 563.53,136.33 Z M250.18,257.2 C251.17,255.66 253.61,257.41 252.48,258.84 C251.5,260.41 248.99,258.64 250.18,257.2 Z M692.89,302.91 C694.49,302.37 695.05,302.92 694.57,304.55 C692.93,305.07 692.37,304.52 692.89,302.91 Z M634.18,333.11 C636.08,332.58 636.71,335.71 634.88,336.17 C633.02,336.66 632.31,333.5 634.18,333.11 Z M264.16,347.53 C265.55,346.37 267.39,348.73 265.9,349.79 C264.5,350.98 262.62,348.56 264.16,347.53 Z M123.14,451.39 C124.5,450.16 126.47,452.47 124.96,453.58 C123.6,454.75 121.65,452.48 123.14,451.39 Z M685.35,453.17 C686.32,451.51 688.68,453.42 687.63,454.84 C686.63,456.44 684.23,454.6 685.35,453.17 Z M229.48,229.09 C230.48,227.52 232.97,229.32 231.75,230.75 C230.74,232.28 228.34,230.51 229.48,229.09 Z M463.17,172.55 C463.75,172.54 464.91,172.52 465.48,172.51 C465.44,173.44 465.4,174.37 465.36,175.3 C464.42,175.27 463.48,175.23 462.54,175.21 C462.74,174.32 462.95,173.43 463.17,172.55 Z M191.05,140.12 C192.67,139.59 193.22,140.15 192.7,141.78 C191.08,142.31 190.53,141.76 191.05,140.12 Z M255.16,143.19 C256.18,141.89 258.76,143.43 257.66,144.89 C256.62,146.19 254,144.68 255.16,143.19 Z M487.207822,171.171373 C488.847822,170.681373 489.397822,171.241373 488.847822,172.861373 C487.197822,173.341373 486.657822,172.781373 487.207822,171.171373 Z M500.61,73.63 C501.07,73.59 501.99,73.52 502.45,73.49 C502.5,74.02 502.59,75.07 502.63,75.6 C502.08,75.59 500.97,75.57 500.41,75.55 C500.46,75.07 500.56,74.11 500.61,73.63 Z M132.39,280.18 C134.02,279.65 134.57,280.2 134.06,281.84 C132.43,282.35 131.88,281.8 132.39,280.18 Z M203.08,347.1 C204.69,346.57 205.27,347.12 204.82,348.76 C203.2,349.28 202.62,348.72 203.08,347.1 Z M238.302273,270.38662 C237.583047,268.297838 238.693292,266.021498 240.782074,265.302273 C242.870856,264.583047 245.147196,265.693292 245.866421,267.782074 C246.585647,269.870856 245.475401,272.147196 243.38662,272.866421 C241.297838,273.585647 239.021498,272.475401 238.302273,270.38662 Z M277.21,433.42 C278.62,432.26 280.47,434.65 278.92,435.68 C277.51,436.82 275.65,434.44 277.21,433.42 Z M442.95,434.48 C443.84,434.42 445.62,434.28 446.5,434.21 C445.98,435.31 445.98,437.23 444.26,436.8 C443.8,436.04 443.36,435.26 442.95,434.48 Z' id='g' />\n <path d='M532,202 C528.134007,202 525,198.865993 525,195 C525,191.134007 528.134007,188 532,188 C535.865993,188 539,191.134007 539,195 C539,198.865993 535.865993,202 532,202 Z M467,101 C464.790861,101 463,99.209139 463,97 C463,94.790861 464.790861,93 467,93 C469.209139,93 471,94.790861 471,97 C471,99.209139 469.209139,101 467,101 Z M377.302273,64.3866195 C376.583047,62.2978376 377.693292,60.0214979 379.782074,59.3022726 C381.870856,58.5830473 384.147196,59.6932923 384.866421,61.7820743 C385.585647,63.8708563 384.475401,66.1471959 382.38662,66.8664212 C380.297838,67.5856465 378.021498,66.4754015 377.302273,64.3866195 Z M241.302273,134.38662 C240.583047,132.297838 241.693292,130.021498 243.782074,129.302273 C245.870856,128.583047 248.147196,129.693292 248.866421,131.782074 C249.585647,133.870856 248.475401,136.147196 246.38662,136.866421 C244.297838,137.585647 242.021498,136.475401 241.302273,134.38662 Z M210.302273,226.38662 C209.583047,224.297838 210.693292,222.021498 212.782074,221.302273 C214.870856,220.583047 217.147196,221.693292 217.866421,223.782074 C218.585647,225.870856 217.475401,228.147196 215.38662,228.866421 C213.297838,229.585647 211.021498,228.475401 210.302273,226.38662 Z M504,67 C501.790861,67 500,65.209139 500,63 C500,60.790861 501.790861,59 504,59 C506.209139,59 508,60.790861 508,63 C508,65.209139 506.209139,67 504,67 Z M646,364 C643.790861,364 642,362.209139 642,360 C642,357.790861 643.790861,356 646,356 C648.209139,356 650,357.790861 650,360 C650,362.209139 648.209139,364 646,364 Z M368.5,58 C365.462434,58 363,55.5375661 363,52.5 C363,49.4624339 365.462434,47 368.5,47 C371.537566,47 374,49.4624339 374,52.5 C374,55.5375661 371.537566,58 368.5,58 Z M682.5,242 C679.462434,242 677,239.537566 677,236.5 C677,233.462434 679.462434,231 682.5,231 C685.537566,231 688,233.462434 688,236.5 C688,239.537566 685.537566,242 682.5,242 Z M564,265 C560.134007,265 557,261.865993 557,258 C557,254.134007 560.134007,251 564,251 C567.865993,251 571,254.134007 571,258 C571,261.865993 567.865993,265 564,265 Z M564,334 C560.134007,334 557,330.865993 557,327 C557,323.134007 560.134007,320 564,320 C567.865993,320 571,323.134007 571,327 C571,330.865993 567.865993,334 564,334 Z M602.45,135 C603.87,133.34 605.66,136.09 604.49,137.37 C603.11,138.88 601.17,136.26 602.45,135 Z M418.22,144.18 C418.76,144.29 419.86,144.5 420.41,144.61 C420.53,145.15 420.77,146.24 420.89,146.79 C420.2,146.9 418.81,147.13 418.12,147.24 C418.15,146.48 418.19,144.95 418.22,144.18 Z M552.49,209.85 C552.47,208.65 553.21,205.01 554.99,207.32 C556.71,208.7 553.73,209.78 552.49,209.85 Z M295.99,229.59 C296.78,229.56 298.35,229.5 299.13,229.47 C298.93,230.58 298.51,231.59 297.87,232.5 C296.66,231.95 296.38,230.7 295.99,229.59 Z M580.008573,278.10621 C581.858573,277.37621 583.028573,280.63621 580.918573,280.97621 C579.118573,281.49621 578.138573,278.61621 580.008573,278.10621 Z M314.19,302.25 C314.75,302.31 315.87,302.44 316.42,302.5 C316.36,302.93 316.22,303.79 316.15,304.22 C315.72,304.33 314.84,304.53 314.41,304.64 C314.35,304.04 314.25,302.85 314.19,302.25 Z M65.3,317.14 C66.29,315.5 68.63,317.41 67.55,318.82 C66.54,320.43 64.16,318.56 65.3,317.14 Z M316.34,322.2 C316.91,322.27 318.05,322.41 318.62,322.48 C318.7,323.09 318.87,324.3 318.96,324.9 C318.27,324.88 316.9,324.84 316.21,324.83 C316.24,324.17 316.31,322.86 316.34,322.2 Z M570.28,356.53 C570.85,356.54 571.99,356.57 572.57,356.59 C572.65,357.28 572.83,358.66 572.92,359.36 C572.13,359.34 570.55,359.3 569.76,359.28 C569.89,358.59 570.15,357.22 570.28,356.53 Z M309.46,376.12 C310.49,376.62 311.78,376.84 312.38,377.98 C312.25,379.54 310.46,379.15 309.45,379.61 C309.44,378.44 309.44,377.28 309.46,376.12 Z M444.25,438.69 C445.27,439.21 446.83,439.31 446.97,440.76 C446.1,441.29 445.22,441.8 444.31,442.27 C444.3,441.37 444.27,439.58 444.25,438.69 Z M356.28,85.18 C357.71,83.92 359.47,86.47 357.92,87.46 C356.48,88.62 354.77,86.19 356.28,85.18 Z M574.26,124.34 C575.71,123.22 577.39,125.71 575.9,126.71 C574.44,127.82 572.73,125.32 574.26,124.34 Z M235.32,254.17 C236.8,253 238.48,255.58 236.88,256.52 C235.41,257.6 233.76,255.12 235.32,254.17 Z M106.35,279.11 C107.4,277.49 109.64,279.54 108.51,280.9 C107.45,282.53 105.22,280.47 106.35,279.11 Z M648.37,336.65 C650.34,336.02 651.21,337.17 651.26,339.14 C650.07,338.64 647.94,338.48 648.37,336.65 Z M249.52,352.54 C250.04,352.51 251.08,352.47 251.59,352.45 C251.6,352.98 251.6,354.04 251.61,354.58 C251.09,354.56 250.07,354.53 249.55,354.51 C249.54,354.02 249.53,353.03 249.52,352.54 Z M100.27,463.41 C101.23,462.18 103.45,463.73 102.48,465.03 C101.51,466.29 99.26,464.72 100.27,463.41 Z M464.06,167.62 C464.76,167.65 466.16,167.72 466.86,167.75 C466.82,168.43 466.74,169.78 466.69,170.46 C466.09,170.46 464.88,170.47 464.28,170.48 C464.22,169.76 464.12,168.33 464.06,167.62 Z M310.03,117.28 C311.64,116.74 312.2,117.29 311.72,118.92 C310.09,119.46 309.53,118.91 310.03,117.28 Z M762.29,121.15 C763.89,120.64 764.43,121.21 763.9,122.86 C762.28,123.36 761.74,122.79 762.29,121.15 Z M169.1,126.21 C170.73,125.74 171.27,126.31 170.72,127.92 C169.08,128.4 168.53,127.83 169.1,126.21 Z M316.13,261.08 C316.88,261.06 318.38,261.01 319.13,260.99 C319.11,261.74 319.08,263.23 319.06,263.98 C318.34,263.97 316.89,263.95 316.16,263.95 C316.15,263.23 316.14,261.8 316.13,261.08 Z M718.31,303.96 C719.92,303.51 720.44,304.1 719.86,305.74 C718.23,306.17 717.71,305.58 718.31,303.96 Z M274.04,438.37 C275.66,437.81 276.21,438.35 275.67,439.99 C274.03,440.54 273.49,440 274.04,438.37 Z M591.6784,469.478974 C590.751445,466.786901 592.182356,463.8531 594.874429,462.926145 C597.566501,461.99919 600.500303,463.430101 601.427258,466.122173 C602.354213,468.814246 600.923302,471.748047 598.231229,472.675002 C595.539157,473.601957 592.605355,472.171047 591.6784,469.478974 Z M707.18,466.41 C708.58,465.23 710.4,467.63 708.89,468.68 C707.48,469.8 705.63,467.42 707.18,466.41 Z M489.207822,166.141616 C490.847822,165.651616 491.397822,166.211616 490.847822,167.831616 C489.197822,168.311616 488.657822,167.751616 489.207822,166.141616 Z' id='h' />\n <path d='M585,118 C582.790861,118 581,116.209139 581,114 C581,111.790861 582.790861,110 585,110 C587.209139,110 589,111.790861 589,114 C589,116.209139 587.209139,118 585,118 Z M349.302273,76.3866195 C348.583047,74.2978376 349.693292,72.0214979 351.782074,71.3022726 C353.870856,70.5830473 356.147196,71.6932923 356.866421,73.7820743 C357.585647,75.8708563 356.475401,78.1471959 354.38662,78.8664212 C352.297838,79.5856465 350.021498,78.4754015 349.302273,76.3866195 Z M661,342 C658.790861,342 657,340.209139 657,338 C657,335.790861 658.790861,334 661,334 C663.209139,334 665,335.790861 665,338 C665,340.209139 663.209139,342 661,342 Z M40.5,326 C37.4624339,326 35,323.537566 35,320.5 C35,317.462434 37.4624339,315 40.5,315 C43.5375661,315 46,317.462434 46,320.5 C46,323.537566 43.5375661,326 40.5,326 Z M588,373 C584.134007,373 581,369.865993 581,366 C581,362.134007 584.134007,359 588,359 C591.865993,359 595,362.134007 595,366 C595,369.865993 591.865993,373 588,373 Z M729.5,487 C726.462434,487 724,484.537566 724,481.5 C724,478.462434 726.462434,476 729.5,476 C732.537566,476 735,478.462434 735,481.5 C735,484.537566 732.537566,487 729.5,487 Z M295.5,95.95 C297.09,95.36 297.64,95.89 297.14,97.57 C295.55,98.14 295,97.6 295.5,95.95 Z M614.21,124.45 C615.74,123.22 617.11,125.94 615.64,126.86 C614.09,128.18 612.73,125.35 614.21,124.45 Z M491.64,161.92 C493.12,162.26 494.18,163.23 494.94,164.52 C493.78,164.64 492.62,164.75 491.47,164.86 C491.52,164.13 491.6,162.65 491.64,161.92 Z M562.36,200.66 C564.42,200.6 564.03,204.94 562.06,203.83 C560.34,204.02 561.09,200.13 562.36,200.66 Z M291.56,227.23 C292.45,227.25 293.36,227.28 294.26,227.31 C294.27,227.9 294.28,229.08 294.28,229.67 C293.37,229.7 292.46,229.73 291.56,229.75 C291.56,229.12 291.56,227.86 291.56,227.23 Z M311.56,259.27 C312.57,259.78 313.58,260.3 314.51,260.97 C314.24,262.59 312.65,262.46 311.45,262.76 C311.47,261.59 311.51,260.43 311.56,259.27 Z M311.53,323.18 C312.59,323.68 313.67,324.15 314.57,324.93 C314.24,326.41 312.59,326.28 311.52,326.76 C311.5,325.56 311.51,324.37 311.53,323.18 Z M147.24,112.59 C148.87,112.01 149.46,112.52 149.03,114.12 C147.39,114.72 146.79,114.2 147.24,112.59 Z M541.04,184.49 C542.65,183.93 543.18,184.48 542.64,186.12 C541,186.67 540.47,186.13 541.04,184.49 Z M81.04,278.19 C82.65,277.64 83.21,278.18 82.74,279.82 C81.13,280.38 80.56,279.84 81.04,278.19 Z M744.09,305.04 C745.73,304.5 746.3,305.04 745.79,306.65 C744.14,307.18 743.57,306.65 744.09,305.04 Z M234.6,358.9 C235.15,358.62 236.25,358.07 236.8,357.79 C238.65,359.31 234.74,361.25 234.6,358.9 Z M306.05,379.16 C307.82,378.67 308.94,381.72 306.96,382.14 C305.12,382.7 304.13,379.6 306.05,379.16 Z M265.42,444.14 C266.41,442.78 269.16,444.2 267.89,445.72 C266.9,447.02 264.2,445.63 265.42,444.14 Z M74.9278687,478.454674 C73.8631362,475.362467 75.5067295,471.992601 78.5989371,470.927869 C81.6911447,469.863136 85.0610105,471.50673 86.1257429,474.598937 C87.1904754,477.691145 85.5468821,481.06101 82.4546745,482.125743 C79.3624669,483.190475 75.9926011,481.546882 74.9278687,478.454674 Z M470,165 C466.134007,165 463,161.865993 463,158 C463,154.134007 466.134007,151 470,151 C473.865993,151 477,154.134007 477,158 C477,161.865993 473.865993,165 470,165 Z M417.06,140.64 C419.073333,139.266667 420.16,139.376667 420.32,140.97 C419.786667,143.27 418.7,143.16 417.06,140.64 Z M645.57,148.07 C646.73,147.16 647.39,147.4 647.56,148.82 C646.39,149.73 645.72,149.48 645.57,148.07 Z M307.08,303.07 C307.63,303.06 308.74,303.02 309.29,303 C309.29,303.95 309.3,304.9 309.32,305.86 C308.74,305.82 307.58,305.74 307,305.7 C307.02,304.82 307.05,303.94 307.08,303.07 Z M220.22,251.02 C221.75,249.71 223.18,252.5 221.69,253.43 C220.17,254.68 218.83,251.96 220.22,251.02 Z M785.25,109.19 C786.87,108.62 787.45,109.16 786.98,110.79 C785.35,111.35 784.77,110.81 785.25,109.19 Z' id='i' />\n <path d='M807,106 C803.686292,106 801,103.313708 801,100 C801,96.6862915 803.686292,94 807,94 C810.313708,94 813,96.6862915 813,100 C813,103.313708 810.313708,106 807,106 Z M299.5,335 C295.357864,335 292,331.642136 292,327.5 C292,323.357864 295.357864,320 299.5,320 C303.642136,320 307,323.357864 307,327.5 C307,331.642136 303.642136,335 299.5,335 Z M575,199 C571.134007,199 568,195.865993 568,192 C568,188.134007 571.134007,185 575,185 C578.865993,185 582,188.134007 582,192 C582,195.865993 578.865993,199 575,199 Z M626,120 C623.790861,120 622,118.209139 622,116 C622,113.790861 623.790861,112 626,112 C628.209139,112 630,113.790861 630,116 C630,118.209139 628.209139,120 626,120 Z M417.06,136.63 C417.71,134.99 417.73,133.61 419.71,134.25 C420.73,137.14 419.07,136.73 417.06,136.63 Z M493.66,159.53 C493.19,158.51 494.72,157.65 495.01,156.73 C495.45,157.79 497.09,158.83 496.1,160.06 C495.6,161.25 493.75,160.77 493.66,159.53 Z M559.43,166.92 C561.04,166.34 561.6,166.87 561.12,168.52 C559.52,169.08 558.95,168.54 559.43,166.92 Z M287.27,224.56 C287.78,224.61 288.81,224.7 289.32,224.74 C289.37,225.76 289.42,226.78 289.47,227.81 C288.85,227.76 287.61,227.67 286.98,227.63 C286.85,226.61 286.94,225.58 287.27,224.56 Z M306,261.21 C305.85,259.74 306.3,258.21 308.02,258.23 C308.7,258.9 309.31,259.65 309.93,260.38 C308.62,260.69 307.31,260.96 306,261.21 Z M299.76,303.07 C300.31,303.06 301.42,303.02 301.97,303 C301.97,303.95 301.98,304.9 302,305.86 C301.42,305.82 300.26,305.74 299.68,305.7 C299.7,304.82 299.73,303.94 299.76,303.07 Z M300.29,384 C300.94,382.57 302.67,382.77 303.93,382.37 C303.75,383.36 303.51,384.35 303.21,385.32 C302.02,385.81 300.63,385.29 300.29,384 Z M126.16,98.39 C127.57,98.58 127.81,99.25 126.88,100.4 C125.47,100.21 125.24,99.54 126.16,98.39 Z M769.94,305.94 C771.53,305.47 772.05,306.05 771.5,307.7 C769.87,308.16 769.35,307.57 769.94,305.94 Z M55.19,276.95 C56.86,276.48 57.4,277.05 56.83,278.65 C55.18,279.11 54.63,278.54 55.19,276.95 Z M234.6,358.9 C231.95,357.92 236.76,355.16 236.8,357.79 C236.25,358.07 235.15,358.62 234.6,358.9 Z M200.302273,250.38662 C199.583047,248.297838 200.693292,246.021498 202.782074,245.302273 C204.870856,244.583047 207.147196,245.693292 207.866421,247.782074 C208.585647,249.870856 207.475401,252.147196 205.38662,252.866421 C203.297838,253.585647 201.021498,252.475401 200.302273,250.38662 Z M251.302273,456.38662 C250.583047,454.297838 251.693292,452.021498 253.782074,451.302273 C255.870856,450.583047 258.147196,451.693292 258.866421,453.782074 C259.585647,455.870856 258.475401,458.147196 256.38662,458.866421 C254.297838,459.585647 252.021498,458.475401 251.302273,456.38662 Z M478.23,116.13 C479.84,115.56 480.41,116.1 479.95,117.74 C478.33,118.31 477.76,117.77 478.23,116.13 Z' id='j' />\n <path d='M295.5,264 C291.357864,264 288,260.642136 288,256.5 C288,252.357864 291.357864,249 295.5,249 C299.642136,249 303,252.357864 303,256.5 C303,260.642136 299.642136,264 295.5,264 Z M274.5,228 C270.357864,228 267,224.642136 267,220.5 C267,216.357864 270.357864,213 274.5,213 C278.642136,213 282,216.357864 282,220.5 C282,224.642136 278.642136,228 274.5,228 Z M289.5,400 C285.357864,400 282,396.642136 282,392.5 C282,388.357864 285.357864,385 289.5,385 C293.642136,385 297,388.357864 297,392.5 C297,396.642136 293.642136,400 289.5,400 Z M795.5,310 C792.462434,310 790,307.537566 790,304.5 C790,301.462434 792.462434,299 795.5,299 C798.537566,299 801,301.462434 801,304.5 C801,307.537566 798.537566,310 795.5,310 Z M416.6,129.29 C417.52,129.29 418.45,129.28 419.39,129.29 C419.4,129.91 419.41,131.17 419.42,131.8 C418.46,131.79 417.5,131.78 416.55,131.77 C416.57,131.15 416.59,129.91 416.6,129.29 Z M293.08,304.07 C293.63,304.06 294.74,304.02 295.29,304 C295.29,304.95 295.3,305.9 295.32,306.86 C294.74,306.82 293.58,306.74 293,306.7 C293.02,305.82 293.05,304.94 293.08,304.07 Z M103.95,84.5 C105.25,83.56 106.8,85.77 105.56,86.73 C104.24,87.71 102.67,85.46 103.95,84.5 Z M29.24,275.43 C30.66,274.27 32.51,276.64 30.96,277.68 C29.57,278.77 27.64,276.44 29.24,275.43 Z M578.12,149.09 C579.75,148.58 580.29,149.13 579.76,150.76 C578.12,151.27 577.57,150.71 578.12,149.09 Z M624.49,161.96 C625.89,161.48 626.38,161.95 625.96,163.37 C624.56,163.83 624.07,163.36 624.49,161.96 Z M217.302273,365.38662 C216.583047,363.297838 217.693292,361.021498 219.782074,360.302273 C221.870856,359.583047 224.147196,360.693292 224.866421,362.782074 C225.585647,364.870856 224.475401,367.147196 222.38662,367.866421 C220.297838,368.585647 218.021498,367.475401 217.302273,365.38662 Z M495.1,153.58 C496.21,153.45 497.33,153.33 498.45,153.22 C498.44,153.95 498.43,155.41 498.42,156.14 C496.85,155.91 495.79,154.94 495.1,153.58 Z' id='k' />\n <path d='M418.5,125 C414.357864,125 411,121.642136 411,117.5 C411,113.357864 414.357864,110 418.5,110 C422.642136,110 426,113.357864 426,117.5 C426,121.642136 422.642136,125 418.5,125 Z M5.5,282 C2.46243388,282 0,279.537566 0,276.5 C0,273.462434 2.46243388,271 5.5,271 C8.53756612,271 11,273.462434 11,276.5 C11,279.537566 8.53756612,282 5.5,282 Z M243.44,240.13 C244.6,239.21 245.26,239.46 245.44,240.87 C244.27,241.78 243.6,241.54 243.44,240.13 Z M287.87,304.43 C288.68,304.44 290.3,304.46 291.12,304.47 C290.86,305.4 290.46,306.24 289.92,307.02 C288.23,307.29 288.26,305.57 287.87,304.43 Z M597,131.15 C598.64,130.64 599.2,131.18 598.67,132.79 C597.02,133.31 596.46,132.76 597,131.15 Z M497.67,148.52 C498.61,148.49 499.56,148.47 500.51,148.44 C500.48,149.39 500.46,150.34 500.45,151.29 C499.57,151.24 498.69,151.21 497.82,151.17 C497.76,150.28 497.71,149.4 497.67,148.52 Z M258.29,210.15 C259.92,209.65 260.46,210.22 259.92,211.85 C258.28,212.33 257.74,211.76 258.29,210.15 Z' id='l' />\n <path d='M506,147 C502.134007,147 499,143.865993 499,140 C499,136.134007 502.134007,133 506,133 C509.865993,133 513,136.134007 513,140 C513,143.865993 509.865993,147 506,147 Z M615.25,113.39 C615.85,113.43 617.04,113.53 617.64,113.58 C617.49,113.95 617.19,114.69 617.04,115.06 C616.66,115.23 615.9,115.57 615.52,115.74 C615.45,115.15 615.32,113.97 615.25,113.39 Z M218.47,232.19 C219.5,230.58 221.82,232.51 220.7,233.92 C219.67,235.53 217.36,233.57 218.47,232.19 Z M283.39,304.29 C283.87,304.37 284.83,304.52 285.31,304.59 C285.42,305.16 285.64,306.29 285.76,306.85 C285.07,306.94 283.71,307.11 283.03,307.19 C283.12,306.47 283.3,305.02 283.39,304.29 Z M413.13,88.01 C414.76,87.49 415.31,88.04 414.79,89.67 C413.16,90.19 412.61,89.64 413.13,88.01 Z M667.09,133.21 C668.73,132.69 669.29,133.23 668.78,134.85 C667.13,135.37 666.56,134.82 667.09,133.21 Z M212.22,187.34 C213.83,186.79 214.39,187.33 213.89,188.97 C212.26,189.52 211.7,188.97 212.22,187.34 Z' id='m' />\n <path d='M688.79,119.1 C690.34,118.54 690.88,119.11 690.41,120.79 C688.84,121.36 688.3,120.79 688.79,119.1 Z M277.69,305.27 C278.63,305.24 279.58,305.22 280.54,305.2 C280.53,305.84 280.51,307.14 280.5,307.78 C279.56,307.76 278.63,307.73 277.7,307.71 C277.7,307.1 277.69,305.88 277.69,305.27 Z M189.22,175.99 C190.86,175.47 191.43,176.02 190.92,177.64 C189.29,178.15 188.72,177.6 189.22,175.99 Z M194.1,225.21 C195.75,224.74 196.3,225.3 195.74,226.9 C194.07,227.37 193.53,226.8 194.1,225.21 Z M635.5,103 C632.462434,103 630,100.537566 630,97.5 C630,94.4624339 632.462434,92 635.5,92 C638.537566,92 641,94.4624339 641,97.5 C641,100.537566 638.537566,103 635.5,103 Z M525.94,93.41 C527.31,92.4 528.61,94.77 527.41,95.68 C526.04,96.72 524.66,94.31 525.94,93.41 Z' id='n' />\n <path d='M548.24,47.43 C549.63,46.23 551.56,48.57 550,49.63 C548.62,50.71 546.63,48.45 548.24,47.43 Z M711.5,110 C708.462434,110 706,107.537566 706,104.5 C706,101.462434 708.462434,99 711.5,99 C714.537566,99 717,101.462434 717,104.5 C717,107.537566 714.537566,110 711.5,110 Z M163.90392,221.868111 C162.918775,219.00704 164.439512,215.889066 167.300583,214.90392 C170.161654,213.918775 173.279628,215.439512 174.264774,218.300583 C175.249919,221.161654 173.729182,224.279628 170.868111,225.264774 C168.00704,226.249919 164.889066,224.729182 163.90392,221.868111 Z M166.2,164.27 C167.66,163.13 169.43,165.62 167.81,166.57 C166.37,167.65 164.61,165.23 166.2,164.27 Z M268.27,305.44 C268.74,305.56 269.69,305.81 270.16,305.93 C270.2,306.85 270.25,307.78 270.3,308.71 C270,308.72 269.41,308.75 269.11,308.76 C266.52,309.62 267.92,306.51 268.27,305.44 Z' id='o' />\n <path d='M559.62,25.01 C560.42,23.81 562.57,25.14 561.52,26.34 C560.69,27.48 558.64,26.2 559.62,25.01 Z M257.5,316 C253.357864,316 250,312.642136 250,308.5 C250,304.357864 253.357864,301 257.5,301 C261.642136,301 265,304.357864 265,308.5 C265,312.642136 261.642136,316 257.5,316 Z M142.5,160 C139.462434,160 137,157.537566 137,154.5 C137,151.462434 139.462434,149 142.5,149 C145.537566,149 148,151.462434 148,154.5 C148,157.537566 145.537566,160 142.5,160 Z' id='p' />\n <circle id='q' cx='569.5' cy='5.5' r='5.5' />\n </g>\n </g>\n </svg>\n </Container>\n )\n }", "title": "" } ]
[ { "docid": "58a910de3189663fdc48dea6340df6a3", "score": "0.59955794", "text": "function clean({ fileName, data }) {\n const allowedEls = ['path', 'g'];\n Object.keys(data).forEach(k => {\n // $ refers to own properties\n if (k === '$') {\n return;\n }\n\n // Remove disallowed elements.\n if (!allowedEls.includes(k)) {\n delete data[k];\n } else {\n // clean child nodes if allowed element\n data[k].forEach(el => {\n clean({ fileName, data: el });\n });\n }\n });\n\n // Remove unsupported keys\n const allowedProps = [\n 'version',\n 'id',\n 'xmlns',\n 'width',\n 'height',\n 'viewBox',\n 'd'\n ];\n\n if (data.$) {\n Object.keys(data.$).forEach(k => {\n if (!allowedProps.includes(k)) {\n delete data.$[k];\n }\n });\n }\n\n // Only runs on top level element\n if (data.$ && data.$.viewBox) {\n data.$.id = fileName.replace('.svg', '');\n\n // if width or height attributes have px definitions then remove\n if (typeof data.$.width === 'string' || typeof data.$.height === 'string') {\n data.$.width = data.$.width.replace('px', '');\n data.$.height = data.$.height.replace('px', '');\n }\n }\n\n return data;\n}", "title": "" }, { "docid": "30cb9bc325d2defb25e85db7b4812223", "score": "0.5876976", "text": "stripStyles(svgString) {\n return svgString.replace(/style=\\\\?\".*?\\\\?\"/g, '');\n }", "title": "" }, { "docid": "0cc678e92cf2ec060f7c8b62926ad092", "score": "0.58717734", "text": "function removeSvg() {\r\n $('table.newschart > tbody > tr > td.nval').removeClass(\"hideborder\");\r\n setPaths = false;\r\n $('svg').remove();\r\n}", "title": "" }, { "docid": "a9e437ec0baeee2347c56307fb9ec50c", "score": "0.567081", "text": "function fix_IE_SVGs() {\n var SVGs = $j('.pays__svg, .ships__svg, .socials__svg');\n if (SVGs.length) {\n SVGs.each(function (i, el) {\n\n var svg_class = $j(el).attr('class').replace(/light|dark|onecolor|pays__svg|\\s/g, '');\n var svgHTML = $j(el).parent().html();\n var regex = /viewBox\\=[\\\"\\'](.*?)[\\\"\\']/g;\n var viewbox = regex.exec(svgHTML);\n\n if (typeof viewbox != \"undefined\" && viewbox) {\n viewbox = viewbox[1].split(' ');\n\n var h = $j(el).height();\n var boxWidth = viewbox[2];\n var boxHeight = viewbox[3];\n var newWidth = (boxWidth * h) / boxHeight;\n\n newWidth = newWidth.toFixed(3);\n\n if ($j(el).parent().find('style').length) {\n $j(el).parent().find('style').remove();\n }\n $j(el).after('<style>svg.pays__svg.' + svg_class + '{ width: ' + newWidth + 'px }</style>');\n }\n\n });\n }\n}", "title": "" }, { "docid": "db7b794f5aabb2350138dda947a7675d", "score": "0.5666242", "text": "function removeHSVG() {\n d3.select(\"#heatmap\").remove();\n\n} // end removeSVG", "title": "" }, { "docid": "bb364f4e7e3ced8482423b24aa0fefae", "score": "0.5627655", "text": "function normalise ( data ) {\n // Remove inkscape props\n if ( data.startsWith( \"<?xml \" ) ) {\n data = data.replace( /(inkscape|sodipodi):[^= \"]+=\\\"[^\"]*\\\"/g, \"\" ); // Remove inkscape propterties\n data = data.replace( /-inkscape-[^;\"]+;/g, \"\" ); // Custom inkscape CSS\n data = data.replace( / xmlns:(inkscape|sodipodi)=\"[^\"]+\"/g, \"\" ); // Remove xml namespaces\n // Find and remove unused ids\n const ids = data.match( /\\(#[^)]+\\)\"/g ).map( id => id.slice( 2, -2 ) ).sort();\n const regxId = new RegExp( ` id=\"(?!${ids.join(\"|\")})[^\"]+\"`, \"g\" );\n data = data.replace( regxId, \"\" );\n // Fix svg links\n data = data.replace( /xlink:href/g, 'href' );\n }\n\n // Turns to one line\n data = data.replace( /\\s*[\\r\\n]+\\s*/g, \" \" );\n // Drop comments\n data = data.replace( /\\/\\*.*?\\*\\//g, \"\" ).replace( /<!--.*?-->/g, \"\" );\n // Drop spaces between and within tags\n data = data.replace( />\\s+</g, '><' ).replace( / \\/>/g, '/>' );\n // Minor trims\n data = data.replace( / +>/g, \" \" );\n\n // Set build time\n data = data.replace( /\\$DATE_BUILD/g, new Date().toISOString().split( /T/ )[0] );\n if ( ! data.includes( '<p>' ) ) {\n data = data.replace( /font-(stretch|style|variant|weight):normal;/g, \"\" );\n data = data.replace( /<sodipodi:namedview\\b.*?<\\/sodipodi:namedview>/g, \"\" );\n data = data.replace( /<metadata\\b.*?<\\/metadata>/g, \"\" );\n return data;\n }\n\n // Fix multiline sentences\n data = data.replace( /\\.(?=[A-Z])/g, \". \" );\n\n // Convert number range to ruby\n data = data.replace( /<data value=\"(\\d+)\">[^<]+<\\/data>/g, ( match, v ) => {\n return `<span title=\"${v}\">${+((+v).toPrecision(3))}</span>`;\n } );\n data = data.replace( /<data value=\"(\\d+)-(\\d+)\">[^<]+<\\/data>/g, ( match, a, b ) => {\n const min = +a, max = +b, avg = ( min + max ) / 2, deviation = Math.min( avg-min, max-avg );\n return `<span title=\"${min} – ${max}\">${+(avg.toPrecision(3))}<small> ±${+(deviation.toPrecision(2))}</small></span>`;\n } );\n\n // Convert list to <details>\n data = data.replace( /(<[ou]l class=\"desc)/g , '<details open=\"open\" class=\"leaf\"><summary>Description</summary>$1' );\n data = data.replace( /(<[ou]l class=\"key)/g , '<details open=\"open\" class=\"leaf\"><summary>Basics</summary>$1' );\n data = data.replace( /(<[ou]l class=\"use)/g , '<details open=\"open\" class=\"leaf\"><summary>Usages</summary>$1' );\n data = data.replace( /(<[ou]l class=\"note)/g , '<details open=\"open\" class=\"leaf\"><summary>Notes</summary>$1' );\n \n data = data.replace( /(<[ou]l class=\"vgood)/g, '<details open=\"open\" class=\"leaf\"><summary class=\"vgood\">Recommended</summary>$1' );\n data = data.replace( /(<[ou]l class=\"good)/g , '<details open=\"open\" class=\"leaf\"><summary class=\"good\">Good</summary>$1' );\n data = data.replace( /(<[ou]l class=\"maybe)/g, '<details open=\"open\" class=\"leaf\"><summary class=\"maybe\">Situational</summary>$1' );\n data = data.replace( /(<[ou]l class=\"bad)/g , '<details open=\"open\" class=\"leaf\"><summary class=\"bad\">Bad</summary>$1' );\n \n data = data.replace( /(<[ou]l summary=\"([^\"]+)\")/g, '<details open=\"open\" class=\"leaf\"><summary>$2</summary>$1' );\n data = data.replace( /<\\/ul>/g, '</ul></details>' );\n data = data.replace( /<\\/ol>/g, '</ol></details>' );\n\n return data;\n}", "title": "" }, { "docid": "cdca7e3aa0c61946e1ef523e28f78995", "score": "0.552688", "text": "function removeGraph() {\n filtro = \"\";\n $(\"svg\").remove();\n}", "title": "" }, { "docid": "ba009863873afb567b5299bba3db65f7", "score": "0.55217546", "text": "function cleanUpGroup(id, textOnly) {\r\n var node, next;\r\n var group = svgdoc.getElementById(id);\r\n node = group.firstChild;\r\n while (node != null) {\r\n next = node.nextSibling;\r\n group.removeChild(node);\r\n node = next;\r\n }\r\n}", "title": "" }, { "docid": "f95fac8020c30a0d624f9106c68e4a81", "score": "0.54868126", "text": "function removePathsInSVG() {\n //d3.select(\"svg\").selectAll(\"*\").remove(); //all children\n d3.selectAll(\".pathArea\").remove(); //\n }", "title": "" }, { "docid": "68ee8a69a4fe1ea115d156136ce9775c", "score": "0.5460203", "text": "function cleargraph(event){\n var svg=document.getElementById(\"svg\");\n for(var i=0; i< clearclassnames.length; i++){\n var elems = svg.getElementsByClassName(clearclassnames[i]);\n while(elems.length>0){\n svg.removeChild(elems[elems.length-1]);\n }\n }\n spans={};\n timespan=[1E99,0];\n}", "title": "" }, { "docid": "f9921ba0a5e1a9bd5e5c757659bcad16", "score": "0.5443169", "text": "function CleanTrending() {\n const removeTrendingGrilla = document.querySelectorAll(\".imageTrend\");\n removeTrendingGrilla.forEach(element => element.remove());\n}", "title": "" }, { "docid": "f74feb109afe505a17b7479b5faca382", "score": "0.54373634", "text": "_getSVGHandler(e){let root=this,temp=document.createElement(\"div\"),getID=function(element,alt){if(null===element.getAttribute(\"id\"))element.setAttribute(\"id\",alt);return element.getAttribute(\"id\")},setAriaLabelledBy=function(source,target,prefix){// adds title and desc elements to target and sets the aria-labelledby attribute\nlet svgElem=function(nodename){source=null!==source?source:root;//adds title or desc element to target\nlet attr=\"title\"===nodename?\"label\":nodename,query=source.querySelector(\"#\"+attr);var label=target.querySelector(nodename);//if the target doesn't have the element, add it\nif(null===label){label=document.createElement(nodename);target.prepend(label)}//populates the element with data from the source element\nif(null!==source.getAttribute(attr)){label.innerHTML=source.getAttribute(attr)}else if(null!==query&&\"\"!==query.innerHTML){label.innerHTML=query.innerHTML}//returns the new element's id\nreturn getID(label,prefix+\"-\"+attr)};//set aria-labelledby to the id's for title and descriptions\ntarget.setAttribute(\"aria-labelledby\",svgElem(\"desc\")+\" \"+svgElem(\"label\"))};//set up main svg and append to document\ntemp.innerHTML=e.detail.response;let svg=temp.querySelector(\"svg\"),svgid=getID(svg,\"svg-\"+Date.now()),hdata=dom(root).querySelectorAll(\"lrndesign-imagemap-hotspot\");setAriaLabelledBy(root,svg,svgid);this.shadowRoot.querySelector(\"#svg\").appendChild(svg);for(let i=0;i<hdata.length;i++){let hid=hdata[i].getAttribute(\"hotspot-id\"),hotspot=svg.querySelector(\"#\"+hid),clone=svg.cloneNode(!0);//clone svg for print versions and show hotspot as selected\nsetAriaLabelledBy(hdata[i],clone,hid);hdata[i].appendChild(clone);hdata[i].querySelector(\"#\"+hid).classList.add(\"selected\");hdata[i].setParentHeading(root.shadowRoot.querySelector(\"#heading\"));for(let j=0;j<hdata.length;j++){hdata[i].querySelector(\"#\"+hdata[j].getAttribute(\"hotspot-id\")).classList.add(\"hotspot\")}//configure hotspot on main (interactive) svg\nlet hbutton=document.createElement(\"button\");hbutton.setAttribute(\"tabindex\",0);hbutton.setAttribute(\"aria-label\",hdata[i].label);root.shadowRoot.querySelector(\"#buttons\").appendChild(hbutton);hbutton.addEventListener(\"focus\",function(){hotspot.classList.add(\"focus\")});hbutton.addEventListener(\"blur\",function(){hotspot.classList.remove(\"focus\")});hotspot.classList.add(\"hotspot\");hotspot.addEventListener(\"click\",e=>{this.openHotspot(hotspot,hdata[i])});hbutton.addEventListener(\"keyup\",e=>{if(13===e.keyCode||32===e.keyCode){if(!hotspot.classList.contains(\"selected\")){this.openHotspot(hotspot,hdata[i])}}})}}", "title": "" }, { "docid": "29a62664d4c75cbdbe8e2a7f929bfd48", "score": "0.5396457", "text": "function getSVGinfo() {\n console.log(this);\n S = document.getElementById(\"DYOSVG\").contentDocument;\n var STYLESVG = []\n , NUMCOLS = [];\n var i;\n\n for (var j = 0; j < S.styleSheets.length; j++) {\n var rules = S.styleSheets[j].rules || S.styleSheets[j].cssRules;\n // This CSS code may need to be modified to handle using commas in CSS for shared code\n for (i in rules) {\n if (typeof rules[i].selectorText == 'string') {\n STYLESVG.push(rules[i].selectorText)\n }\n }\n for (i in STYLESVG) {\n var start_pos = STYLESVG[i].indexOf('.') + 1;\n var end_pos = STYLESVG[i].indexOf('.', start_pos);\n if (end_pos != -1) {\n var NC = STYLESVG[i].substring(start_pos, end_pos);\n // begin IE stupidity workaround\n var NC2 = STYLESVG[i].substring(end_pos + 1);\n if (NC == \"fill\" || NC == \"stroke\" || NC == \"stopColor\") {\n NUMCOLS.push(NC2)\n } else if (NC2 == \"fill\" || NC2 == \"stroke\" || NC2 == \"stopColor\") {\n NUMCOLS.push(NC)\n }\n }\n }\n NUMCOLS = NUMCOLS.filter(function(itm, i, a) {\n return i == a.indexOf(itm)\n });\n }\n var PREVIOUS = document.getElementsByClassName(\"colourfill\");\n for (i = PREVIOUS.length; i > 0; i--) {\n var M = (PREVIOUS[i - 1].id.indexOf(\"[\") != -1) ? PREVIOUS[i - 1].id.slice(0, PREVIOUS[i - 1].id.indexOf(\"[\")) : PREVIOUS[i - 1].id;\n var A = (PREVIOUS[i - 1].id.indexOf(\"[\") != -1) ? PREVIOUS[0].id.slice(PREVIOUS[0].id.indexOf(\"[\") + 1, PREVIOUS[0].id.length - 1) : null;\n if (A != ACTIVE) {\n continue\n }\n PREVIOUS[i - 1].material = (typeof materialController == 'function') ? materialController(M) : PREVIOUS[i - 1].material;\n var col = readCookie(PREVIOUS[i - 1].id);\n if (col && PREVIOUS[i - 1].material.indexOf(col) == -1) {\n removeCookie(PREVIOUS[i - 1].id)\n }\n if (PREVIOUS[i - 1].material.indexOf(PREVIOUS[i - 1].value) == -1) {\n if (defcols[PREVIOUS[i - 1]] && PREVIOUS[i - 1].material.indexOf(defcols[PREVIOUS[i - 1]]) != -1) {\n PREVIOUS[i - 1].value = defcols[PREVIOUS[i - 1]];\n }\n {\n var rand = Math.floor(Math.random() * PREVIOUS[i - 1].material.length);\n PREVIOUS[i - 1].value = PREVIOUS[i - 1].material[rand];\n }\n colour.call(PREVIOUS[i - 1]);\n }\n if (NUMCOLS.indexOf(PREVIOUS[i - 1].id) == -1 && PREVIOUS[i - 1].id != \"S-BallColour\") {\n PREVIOUS[i - 1].parentNode.parentNode.removeChild(PREVIOUS[i - 1].parentNode)\n }\n }\n for (i in NUMCOLS) {\n if (!document.getElementById(NUMCOLS[i]) + \"[\" + ACTIVE + \"]\") {\n addColour(NUMCOLS[i] + \"[\" + ACTIVE + \"]\")\n }\n ;colour.call(document.getElementById(NUMCOLS[i] + \"[\" + ACTIVE + \"]\"))\n }\n // Re-Initialise set values\n if (typeof svgController == 'function') {\n svgController();\n }\n if (!S.getElementById(\"Content\")) {\n var CNT = document.createElementNS(SVG_NS, \"g\");\n CNT.id = \"Content\";\n S.documentElement.appendChild(CNT)\n }\n S.getElementById(\"Content\").style.visibility = \"hidden\";\n S.getElementById(\"Content\").style.visibility = \"hidden\";\n if (document.getElementById(\"SBALL[\" + ACTIVE + \"]\")) {\n drawSBall();\n // SBall();\n // colour.call(document.getElementById(\"S-BallColour[\" + ACTIVE + \"]\"));\n }\n DL = document.getElementById(\"logos[\" + ACTIVE + \"]\").getElementsByClassName(\"logoupload\");\n DT = document.getElementById(\"logos[\" + ACTIVE + \"]\").getElementsByClassName(\"addtext\");\n DS = document.getElementById(\"logos[\" + ACTIVE + \"]\").getElementsByClassName(\"uploadselect\");\n for (var i = 0; i < DS.length; i++) {\n embellish.call(DS[i])\n }\n for (var i = 0; i < DL.length; i++) {\n if (DL[i].value) {\n if (CYCLE == true) {\n DLCount++\n }\n HFS.call(DL[i])\n }\n }\n for (var i = 0; i < DT.length; i++) {\n if (DT[i].value) {\n addText.call(DT[i])\n }\n }\n // Continue with Garment Specific Logic\t\n //\tdocument.getElementById(\"Colour1\").classList.add(\"chosen\");\n //\tif(document.getElementById(\"Colour1\")){createColourPicker.call(document.getElementById(\"Colour1\"))}else{console.log(\"dfjvdfj\")}\n // colourBranding()\n //Clone the node \n if (CYCLE == true && DLCount == 0) {\n generateImages()\n }\n}", "title": "" }, { "docid": "6a347d28067018cb2ec6da894cf45d75", "score": "0.53920287", "text": "function removeSVGElements() {\n pieChart.selectAll(\"circle\").remove();\n pieChart.selectAll(\"path\").remove();\n}", "title": "" }, { "docid": "46de7d97bcf9b7264dcad60b398fb028", "score": "0.5388953", "text": "serialize() {\n var svg = document.getElementsByTagName(\"svg\")\n var editor = atom.workspace.getActiveTextEditor()\n if(editor && (svg.length == 0)){\n this.createGraph(editor);\n }\n }", "title": "" }, { "docid": "91e4b3c314b4490ffca739065e03be8e", "score": "0.53862995", "text": "function cleanUpGroup(id, textOnly) {\n var node, next;\n var group = svgdoc.getElementById(id);\n node = group.firstChild;\n while (node != null) {\n next = node.nextSibling;\n if (!textOnly || node.nodeType == 3) // A text node\n group.removeChild(node);\n node = next;\n }\n}", "title": "" }, { "docid": "8f940f1fc2fbc17810553a61d7153a7f", "score": "0.53769875", "text": "function conditionSVG(condition) {\n let svgItems = {\n \"Rainy Thunderstorm\": '<svg data-name=\"Rainy Thunderstorm\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M20.15 46.24l15.7 15.7M44.15 46.24l15.7 15.7\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M43.85 61.94L36 54.09h8l-7.85-7.85\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Thunderstorm\": '<svg data-name=\"Thunderstorm\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M46.3 50.5h8.2a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22h12.93\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M43.85 61.94L36 54.09h8l-7.85-7.85\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Tornado\": '<svg data-name=\"Tornado\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M53.12 12h-33.2a4 4 0 000 8h38.44a4 4 0 010 8H35.43a4 4 0 000 8H48a4 4 0 010 8H27.35a4 4 0 100 8h8.15a4 4 0 010 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Mist\": '<svg data-name=\"Mist\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Smoke\": '<svg data-name=\"Smoke\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Haze\": '<svg data-name=\"Haze\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Dust\": '<svg data-name=\"Dust\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Fog\": '<svg data-name=\"Fog\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Sand\": '<svg data-name=\"Sand\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Ash\": '<svg data-name=\"Ash\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Squall\": '<svg data-name=\"Squall\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M8 50c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 38c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 26c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8M8 14c5.6 0 5.6 8 11.2 8s5.6-8 11.2-8 5.6 8 11.19 8 5.6-8 11.21-8 5.6 8 11.2 8\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Clear Night\": '<svg data-name=\"Clear Night\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M46.65 50.5a14.5 14.5 0 010-29 14.21 14.21 0 012.63.25 19.5 19.5 0 100 28.5 14.21 14.21 0 01-2.63.25z\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Clear Day\": '<svg data-name=\"Clear Day\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><circle cx=\"36\" cy=\"36\" r=\"17.85\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M36 4.95v8.1M36 67.05v-8.1M67.05 36h-8.1M4.95 36h8.1M56.2 15.8l-3.97 3.97M15.8 56.2l3.97-3.97M56.2 56.2l-3.97-3.97M15.8 15.8l3.97 3.97\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Windy Clear Day\": '<svg data-name=\"Windy Clear Day\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M31.48 8.72v6.92M31.48 61.77v-6.92M58 35.24h-6.92M4.95 35.24h6.92M48.73 17.99l-3.39 3.39M14.22 52.5l3.39-3.39M14.22 17.99l3.39 3.39\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M50.5 50.5h13a4 4 0 010 8\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M29.5 47.5h19a5 5 0 000-10\" stroke-dasharray=\"2 4 1000\" fill=\"none\" stroke=\"#000\" stroke-miterlimit=\"10\"/><path d=\"M56.5 47.5h5a3 3 0 000-6\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M42.5 64.5a7 7 0 000-14h-11a15.24 15.24 0 1113.64-8.44\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Few Clouds\": '<svg data-name=\"Few Clouds\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M57.59 35.59a18 18 0 00-35.54-4h-.46a11 11 0 000 22h36a9 9 0 000-18z\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Cloudy\": '<svg data-name=\"Cloudy\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 32.5a18 18 0 00-35.54-4h-.46a11 11 0 000 22h36a9 9 0 000-18z\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Windy Clouds\": '<svg data-name=\"Windy Clouds\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M63 38.55a9 9 0 00-8.51-6 18 18 0 00-35.54-4h-.46a11 11 0 000 22h24a7 7 0 010 14\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M50.5 50.5h13a4 4 0 010 8\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M29.5 47.5h19a5 5 0 000-10\" stroke-dasharray=\"2 4 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M56.5 47.5h5a3 3 0 000-6\" stroke-dasharray=\"1 2 1000\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Partly Sunny Drizzle\": '<svg data-name=\"Partly Sunny Drizzle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M39.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M39.59 51.72v12.74\" stroke-dasharray=\"3.64 3.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M39.59 66.28v2M47.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M47.59 52.72v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M47.59 62v2M55.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M55.59 51.19v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M55.59 57.4v2M31.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M31.59 52.72v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M31.59 62v2M23.59 46.08v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M23.59 51.19v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M23.59 57.4v2M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M57.59 53.59a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Drizzle\": '<svg data-name=\"Drizzle\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M36.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M36.5 48.63v12.74\" stroke-dasharray=\"3.64 3.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M36.5 63.19v2M44.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M44.5 49.63v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M44.5 58.91v2M52.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M52.5 48.1v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M52.5 54.31v2M28.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M28.5 49.63v6.96\" stroke-dasharray=\"4.64 4.64\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M28.5 58.91v2M20.5 42.99v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M20.5 48.1v4.66\" stroke-dasharray=\"3.11 3.11\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M20.5 54.31v2\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Partly Sunny Snow\": '<svg data-name=\"Partly Sunny Snow\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M57.59 53.59a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path class=\"cls-2\" d=\"M22.53 53.48l2.12 2.12M22.53 46.48l2.12 2.12M22.53 55.6l2.12-2.12M22.53 48.6l2.12-2.12M54.53 53.48l2.12 2.12M54.53 46.48l2.12 2.12M54.53 55.6l2.12-2.12M54.53 48.6l2.12-2.12M30.53 56.48l2.12 2.12M30.53 49.48l2.12 2.12M30.53 58.6l2.12-2.12M30.53 63.48l2.12 2.12M30.53 65.6l2.12-2.12M30.53 51.6l2.12-2.12M46.53 56.48l2.12 2.12M46.53 49.48l2.12 2.12M46.53 58.6l2.12-2.12M46.53 63.48l2.12 2.12M46.53 65.6l2.12-2.12M46.53 51.6l2.12-2.12M38.53 53.48l2.12 2.12M38.53 46.48l2.12 2.12M38.53 55.6l2.12-2.12M38.53 60.48l2.12 2.12M38.53 62.6l2.12-2.12M38.53 67.48l2.12 2.12M38.53 69.6l2.12-2.12M38.53 48.6l2.12-2.12\" stroke-dasharray=\"3 4\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Snow\": '<svg data-name=\"Snow\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/><path d=\"M19.44 50.43l2.12 2.12M19.44 43.43l2.12 2.12M19.44 52.55l2.12-2.12M19.44 45.55l2.12-2.12M51.44 50.43l2.12 2.12M51.44 43.43l2.12 2.12M51.44 52.55l2.12-2.12M51.44 45.55l2.12-2.12M27.44 53.43l2.12 2.12M27.44 46.43l2.12 2.12M27.44 55.55l2.12-2.12M27.44 60.43l2.12 2.12M27.44 62.55l2.12-2.12M27.44 48.55l2.12-2.12M43.44 53.43l2.12 2.12M43.44 46.43l2.12 2.12M43.44 55.55l2.12-2.12M43.44 60.43l2.12 2.12M43.44 62.55l2.12-2.12M43.44 48.55l2.12-2.12M35.44 50.43l2.12 2.12M35.44 43.43l2.12 2.12M35.44 52.55l2.12-2.12M35.44 57.43l2.12 2.12M35.44 59.55l2.12-2.12M35.44 64.43l2.12 2.12M35.44 66.55l2.12-2.12M35.44 45.55l2.12-2.12\" stroke-dasharray=\"3 4\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Partly Sunny Rain\": '<svg data-name=\"Partly Sunny Rain\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M57.59 53.59a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M15.75 33.28a12.5 12.5 0 0119.44-15.2M26.69 5.5v5.67M4.95 27.24h5.67M40.82 13.1l-2.78 2.78M12.55 13.1l2.78 2.78M35.62 49.21l15.7 15.7M23.62 49.21l15.7 15.7M47.62 49.21l15.7 15.7\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>',\n \"Rain\": '<svg data-name=\"Rain\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 72 72\"><path d=\"M54.5 50.5a9 9 0 000-18 18 18 0 00-35.54-4h-.46a11 11 0 000 22M32.15 46.24l15.7 15.7M20.15 46.24l15.7 15.7M44.15 46.24l15.7 15.7\" fill=\"none\" stroke-miterlimit=\"10\" class=\"svg-stroke-style\"/></svg>'\n }\n\n return svgItems[condition];\n}", "title": "" }, { "docid": "8d2e565ef7897d526a4620cff4a5551a", "score": "0.5375223", "text": "function cleanUpGroup(id, textOnly) {\r\n var node, next;\r\n var group = svgdoc.getElementById(id);\r\n node = group.firstChild;\r\n while (node != null) {\r\n next = node.nextSibling;\r\n if (!textOnly || node.nodeType == 3) // A text node\r\n group.removeChild(node);\r\n node = next;\r\n }\r\n}", "title": "" }, { "docid": "8d2e565ef7897d526a4620cff4a5551a", "score": "0.5375223", "text": "function cleanUpGroup(id, textOnly) {\r\n var node, next;\r\n var group = svgdoc.getElementById(id);\r\n node = group.firstChild;\r\n while (node != null) {\r\n next = node.nextSibling;\r\n if (!textOnly || node.nodeType == 3) // A text node\r\n group.removeChild(node);\r\n node = next;\r\n }\r\n}", "title": "" }, { "docid": "3732f6670654e1012897a6ca8fca52f8", "score": "0.5350207", "text": "function hackSVG() {\n\tif (SVGElement && SVGElement.prototype) {\n\n\t\tSVGElement.prototype.hasClass = function(className) {\n\t\t\treturn new RegExp('(\\\\s|^)' + className + '(\\\\s|$)').test(this\n\t\t\t\t\t.getAttribute('class'));\n\t\t};\n\n\t\tSVGElement.prototype.addClass = function(className) {\n\t\t\tif (!this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', this.getAttribute('class') + ' '\n\t\t\t\t\t\t+ className);\n\t\t\t}\n\t\t};\n\n\t\tSVGElement.prototype.removeClass = function(className) {\n\t\t\tvar removedClass = this.getAttribute('class').replace(\n\t\t\t\t\tnew RegExp('(\\\\s|^)' + className + '(\\\\s|$)', 'g'), '$2');\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.setAttribute('class', removedClass);\n\t\t\t}\n\t\t};\n\t\tSVGElement.prototype.toggleClass = function(className) {\n\t\t\tif (this.hasClass(className)) {\n\t\t\t\tthis.removeClass(className);\n\t\t\t} else {\n\t\t\t\tthis.addClass(className);\n\t\t\t}\n\t\t};\n\n\t}\n}", "title": "" }, { "docid": "4bb8b531d03c1c449cbd48efcc794ae4", "score": "0.5328987", "text": "function tearDown() {\n dummySVG.parentNode.removeChild(dummySVG);\n }", "title": "" }, { "docid": "90b2479060a2b7415960331e46e8aff7", "score": "0.5316834", "text": "function cleaner() {\n svg.selectAll(\"path\").data([]).exit().remove();\n svg.selectAll(\"g\").data([]).exit().remove();\n document.getElementById('controls').innerHTML = '';\n document.getElementById('stats').innerHTML = '';\n}", "title": "" }, { "docid": "7ae96a242835da4faf80ea3db3e87dd8", "score": "0.529131", "text": "toSVG() {\n if (this.geometryObject &&\n (\n this.geometryObject.geometryIsVisible === false ||\n this.geometryObject.geometryIsHidden === true ||\n this.geometryObject.geometryIsConstaintDraw === true\n )\n ) {\n return '';\n }\n\n let path = this.getSVGPath();\n\n let attributes = {\n d: path,\n stroke: this.strokeColor,\n fill: '#000',\n 'fill-opacity': 0,\n 'stroke-width': this.strokeWidth,\n 'stroke-opacity': 1, // toujours à 1 ?\n };\n\n let path_tag = '<path';\n for (let [key, value] of Object.entries(attributes)) {\n path_tag += ' ' + key + '=\"' + value + '\"';\n }\n path_tag += '/>\\n';\n\n let pointToDraw = [];\n if (app.settings.areShapesPointed && this.name != 'silhouette') {\n if (this.isSegment())\n pointToDraw.push(this.segments[0].vertexes[0]);\n if (!this.isCircle())\n this.segments.forEach(\n (seg) => (pointToDraw.push(seg.vertexes[1])),\n );\n }\n\n this.segments.forEach((seg) => {\n //Points sur les segments\n seg.divisionPoints.forEach((pt) => {\n pointToDraw.push(pt);\n });\n });\n if (this.isCenterShown) pointToDraw.push(this.center);\n\n let point_tags = pointToDraw.filter(pt => {\n pt.visible &&\n pt.geometryIsVisible &&\n !pt.geometryIsHidden\n }).map(pt => pt.svg).join('\\n');\n\n let comment =\n '<!-- ' + this.name.replace('é', 'e').replace('è', 'e') + ' -->\\n';\n\n return comment + path_tag + point_tags + '\\n';\n }", "title": "" }, { "docid": "22b9d8a0ebb62b2507d7b6c1eb1a78f1", "score": "0.5284008", "text": "function destroy(){\n\t\tif(!_.isUndefined(svg) && _.isFunction(svg.style))\n\t\tsvg\n\t .style('background-color', 'none');\n\t}", "title": "" }, { "docid": "582d6b5d668dc3ff989b4ac89c360382", "score": "0.52401906", "text": "removeImgTag (el) {\n let svg = el.getElementsByClassName('svg')[0]\n if (svg) {\n el.removeChild(svg)\n }\n }", "title": "" }, { "docid": "8ea7206e7397abf0c8d223fa922e02a2", "score": "0.5231384", "text": "function RvgsToSvg()\n{\n\t// return qualifyURL(\"/survol/internals/gui_create_svg_from_several_rdfs.py\");\n\treturn LocalHost() + \"/survol/gui_create_svg_from_several_rdfs.py\";\n}", "title": "" }, { "docid": "17fd318c58a557e0b52b3b7f9272c619", "score": "0.5229603", "text": "function SaveAsSVG(document, newname)\r{\r var targetFolder = Folder(MATERIAL_EXPORT_PATH);\r\r if (! targetFolder.exists) {\r // geef een melding en \r throw(\"Onderstaande folder niet gevonden, is de netwerkverbinding gemaakt? \\n\\n\" +\r MATERIAL_EXPORT_PATH);\r }\r\r var exportOptions = new ExportOptionsSVG();\r var exportType = ExportType.SVG;\r\r var targetFile = MakeTempInvisibleFile(targetFolder, newname, \".ai\");\r // alert(targetFile);\r\r exportOptions.embedRasterImages = true;\r exportOptions.compressed = true;\r exportOptions.embedAllFonts = false;\r exportOptions.fontSubsetting = SVGFontSubsetting.GLYPHSUSED;\r exportOptions.cssProperties = SVGCSSPropertyLocation.PRESENTATIONATTRIBUTES;\r exportOptions.optimezForSVGViewer = true;\r\r document.exportFile( targetFile, exportType, exportOptions );\r document.close( SaveOptions.DONOTSAVECHANGES );\r\r var exportedFile = MakeTempInvisibleFile(targetFolder, newname, \".svgz\");\r // alert(exportedFile);\r if (exportedFile.exists) {\r if (! exportedFile.rename(newname+ \".svgz\")) {\r // bij aanwezig zijn oude file, deze proberen te deleten en vervolgens nogmaal renamen:\r var fl = new File(targetFolder + \"/\" + newname + \".svgz\");\r // alert(fl);\r if (fl.remove()) \r exportedFile.rename(newname+ \".svgz\")\r else\r alert(SCRIPT_NAME + \" is niet goed gelukt, oude file is nog aanwezig en niet te overschrijven!\") \r }\r } \r else\r alert(SCRIPT_NAME + \" is niet goed gelukt!\") \r}", "title": "" }, { "docid": "c71fb54c1d2889920806848e228f74c2", "score": "0.5229299", "text": "_getSVGHandler(data) {\n let loader = document.createElement(\"div\");\n let hotspots = [];\n loader.innerHTML = data;\n let svg = loader.querySelector(\"svg\");\n\n svg.slot = \"svg\";\n this.prepend(svg);\n console.log(this.childNodes);\n svg.setAttribute(\"aria-labelledBy\", this._getInfoNode(svg, \"title\"));\n svg.setAttribute(\"aria-describedBy\", this._getInfoNode(svg));\n this.hotspotDetails = [];\n // this is scrape the printable hotspots for info\n this.querySelectorAll(\"lrndesign-imagemap-hotspot\").forEach((hotspot) => {\n let obj = {\n id: hotspot.hotspotId,\n print: hotspot,\n hotspot: svg.querySelector(`#${hotspot.hotspotId}`),\n label: hotspot.label,\n position: hotspot.position || \"bottom\",\n details: document.createElement(\"div\"),\n };\n // Turning main svg interactive hotspots into buttons\n obj.hotspot.classList.add(\"hotspot\");\n obj.hotspot.setAttribute(\"role\", \"button\");\n obj.hotspot.setAttribute(\"controls\", \"figure\");\n obj.hotspot.addEventListener(\"click\", (e) => this.openHotspot(obj));\n\n //Copy hotspot details from printable hotspots\n\n hotspot.childNodes.forEach((node) => {\n obj.details.appendChild(node.cloneNode(true));\n });\n obj.details.slot = \"details\";\n this.append(obj.details);\n\n // Get array data for hotspot\n this.hotspotDetails.push(obj);\n hotspots.push(hotspot.hotspotId);\n });\n\n this.hotspotDetails.forEach((obj) => {\n obj.print.loadSvg(data, hotspots);\n });\n }", "title": "" }, { "docid": "ab881976677b427d3ec04256d742abd8", "score": "0.52236825", "text": "function SigmaEnableSVG() {\n return null;\n}", "title": "" }, { "docid": "7160571236d6548bff8460d763b28342", "score": "0.52206963", "text": "function createElements() {\n var svg = d3.select(document.getElementById('svgChartRight'));\n\n svg.selectAll('*').remove();\n\n connectorsSvg = svg.append('g').attr('class', 'connectors');\n arcsSvg = svg.append('g').attr('class', 'arcs');\n bubblesSvg = svg.append('g').attr('class', 'bubbles');\n bubbleLabelsSvg = svg.append('g').attr('class', 'bubbleLabels');\n}", "title": "" }, { "docid": "2f4d7154e47362ade4ce364b757ba81f", "score": "0.52078116", "text": "clear() {\n this.$svg.innerHTML = '';\n }", "title": "" }, { "docid": "0bf82cb287ce51fdbb6c265b00b7bdf3", "score": "0.5162283", "text": "function temperature_create(id, styleX){\n \tstyle1=\"\\\n \t\t<svg id='svg-\"+id+\"' xmlns='http://www.w3.org/2000/svg' style='width: 100px; height: 42px' >\\\n\t\t\t\t<clipPath id='shape1'>\\\n \t\t\t\t\t<circle id='circle1' r='5' cx='5' cy='5' />\\\n \t\t\t\t\t<rect x='4' y='2' rx='1' ry='1' width='38' height='6' />\\\n \t\t\t\t</clipPath>\\\n\t\t\t\t<clipPath id='shape2'>\\\n \t\t\t\t\t<circle id='circle1' r='4' cx='5' cy='5' />\\\n \t\t\t\t\t<rect x='5' y='3' rx='1' ry='1' width='36' height='4' />\\\n \t\t\t\t</clipPath>\\\n \t\t\t\t\\\n\t\t\t\t\\\n\t\t\t\t<clipPath id='shape11'>\\\n \t\t\t\t\t<circle id='circle1' r='5' cx='5' cy='37' />\\\n \t\t\t\t\t<rect x='2' y='0' rx='1' ry='1' width='6' height='38' />\\\n \t\t\t\t</clipPath>\\\n\t\t\t\t<clipPath id='shape22'>\\\n \t\t\t\t\t<circle id='circle1' r='4' cx='5' cy='37' />\\\n \t\t\t\t\t<rect x='3' y='1' rx='1' ry='1' width='4' height='36' />\\\n \t\t\t\t</clipPath>\\\n \t\t\t\t\\\n \t\t\t\t<g>\\\n\t \t\t\t\t<rect width='100%' height='100%' clip-path='url(#shape11)' style='fill: black'/>\\\n\t \t\t\t\t<rect id='\"+id+\"-color' width='100%' height='100%' clip-path='url(#shape22)' style='fill: red'/>\\\n\t \t\t\t\t<rect id='\"+id+\"-size' width='100%' height='30%' clip-path='url(#shape22)' style='fill: white'/>\\\n \t\t\t\t</g>\\\n \t\t\t\t<text id='\"+id+\"-text' x='10' y='25' fill='black' font-size='10'>--</text>\\\n\t\t\t\\\n\t\t\t</svg>\\\n\t\t\t\";\n\t\tstyle2=\"\\\n\t\t\t<svg id='svg-\"+id+\"' xmlns='http://www.w3.org/2000/svg' style='width: 40px; height: 40px;' viewBox='0 0 100 100' >\\\n \t\t\t\t<g>\\\n \t\t\t\t\t<polygon points='0,60 100,60 100,10' style='fill:white;stroke:black;stroke-width:1' />\\\n\t\t\t\t\t<polygon id='\"+id+\"-color' points='0,60 50,60 50,35' style='fill:red;stroke:black;stroke-width:0'/>\\\n\t\t\t\t\t<text id='\"+id+\"-text' x='0' y='18' fill='black' font-size='25'>--</text>\\\n \t\t\t\t</g>\\\n\t\t\t</svg>\\\n\t\t\t\";\n\t\tlog_temperatures(\"----------------------- styleX=\"+styleX);\n\t\tswitch(styleX) {\n\t\t\tcase \"style1\":\n\t\t\t\t$(\"#\"+id).html(style1);\n\t\t\t\tbreak;\n\t\t\tcase \"style2\":\n\t\t\t\t$(\"#\"+id).html(style2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$(\"#\"+id).html(style1);\n\t\t}\n }", "title": "" }, { "docid": "515d5bbdb3d790cf93c56fa47e499513", "score": "0.5147362", "text": "function makeIdsUnique(svg) {\n // Collect ids from all elements directly below the <defs> element(s).\n var defElements = svg.querySelectorAll('defs>[id]');\n var defElement, tag, id, newId;\n var propertyIdMap = {};\n var mappedProperties, mappedProperty;\n var i, j, k;\n for (i = 0; i < defElements[LENGTH]; i++) {\n defElement = defElements[i];\n tag = defElement.tagName;\n // Get array with possible property names for the element's tag name. If\n // the array is empty, the only property name is the same as the tag name.\n if (tag in TAG_NAME_PROPERTIES_MAP) {\n id = defElement.id;\n // Create a random new id for the element\n newId = id + '-' + Math.random().toString(36).substr(2, 10);\n defElement.id = newId;\n // Add mapping from id to new id for each mapped property\n mappedProperties = TAG_NAME_PROPERTIES_MAP[tag] || [tag];\n for (j = 0; j < mappedProperties[LENGTH]; j++) {\n mappedProperty = mappedProperties[j];\n (propertyIdMap[mappedProperty] || (propertyIdMap[mappedProperty] = [])).push([id, newId]);\n }\n }\n }\n // Run through all elements and replace ids in references\n var properties = Object.keys(propertyIdMap);\n if (properties[LENGTH]) {\n var allElements = svg.querySelectorAll('*');\n var element, property, propertyVal, idTuples;\n for (i = 0; i < allElements[LENGTH]; i++) {\n element = allElements[i];\n // Run through all property names for which ids were found\n for (j = 0; j < properties[LENGTH]; j++) {\n property = properties[j];\n propertyVal = element.getAttribute(property);\n if (propertyVal) {\n idTuples = propertyIdMap[property];\n for (k = 0; k < idTuples[LENGTH]; k++) {\n // Replace id if peroperty value has the form url(#anyId) or\n // url(\"#anyId\") (for Internet Explorer).\n if (propertyVal.replace(/\"/g, '') == 'url(#' + idTuples[k][0] + ')') {\n element.setAttribute(property, 'url(#' + idTuples[k][1] + ')');\n break;\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "f2df61b632efd16a021144b198bde82d", "score": "0.5142247", "text": "function processImageTag(line) {\n var imageId = tools.getAttrValue(line, \"id\");\n if (imageId !== null && imageId.indexOf(\"image\") === 0) {\n var newImgLine = \"\";\n var x = tools.getAttrValue(line, \"x\");\n var y = tools.getAttrValue(line, \"y\");\n var w = tools.getAttrValue(line, \"width\");\n var h = tools.getAttrValue(line, \"height\");\n var viewBox = \"0 0 \" + w + \" \" + h;\n // handle clip-path for image\n var clipPath = tools.getAttrValue(line, \"clip-path\");\n // console.log(clipPath);\n if (clipPath !== null) {\n newImgLine += \"<g clip-path=\\\"\" + clipPath + \"\\\" id=\\\"cp-layer\\\">\"\n }\n // console.log(\"viewBox:\"+viewBox);\n newImgLine += \"<svg version=\\\"1.1\\\" viewBox=\\\"\" + viewBox\n + \"\\\" x=\\\"\" + x + \"\\\" y=\\\"\" + y + \"\\\" width=\\\"\" + w + \"\\\" height=\\\"\" + h + \"\\\" preserveAspectRatio=\\\"xMidYMid meet\\\">\";\n var imgLine = line;\n imgLine = tools.removeAttr(imgLine, \"x\");\n imgLine = tools.removeAttr(imgLine, \"y\");\n imgLine = tools.removeAttr(imgLine, \"preserveAspectRatio\");\n if (clipPath !== null) {\n imgLine = tools.removeAttr(imgLine, \"clip-path\");\n }\n newImgLine += imgLine;\n newImgLine += \"</svg>\";\n if (clipPath !== null) {\n newImgLine += \"</g>\"\n }\n // newImgLine = tools.replaceAttrValue(newImgLine,\"xlink:href\",\"/designs/templates/\"+getAttrValue(newImgLine,\"xlink:href\"));\n // newImgLine = tools.replaceAttrValue(newImgLine,\"xlink:href\",\"../../\"+getAttrValue(newImgLine,\"xlink:href\"));\n // console.log(\"img:\"+newImgLine);\n return newImgLine + \"\\n\";\n }\n return line + \"\\n\";\n}", "title": "" }, { "docid": "c88b1b3d09efdd8f124f960ec8aca73a", "score": "0.51384544", "text": "function sanitizeSvg(href) {\n if (\n href.indexOf(`//`) === -1 &&\n String.prototype.endsWith &&\n href.endsWith(`.svg`)\n )\n return `${href}?sanitize=true`;\n\n return href;\n}", "title": "" }, { "docid": "e8fd645cad71f8fb7318e7dbdf19e80c", "score": "0.5132872", "text": "function SVGComic(evt, opts) {\n /// <summary>The main SVGComic object</summary>\n /// <param name=\"evt\">The calling event</param>\n /// <param name=\"opts\">The desired options</param>\n /// <option name=\"author\">The author's name (defaults to A. N. Onymous)</option>\n /// <option name=\"copyright\">The preferred copyright statement (defaults to \"&copy YEAR AUTHOR. All rights \n /// reserved\")</option>\n /// <option name=\"fill\">Preferred gutter color (defaults to black)</option>\n /// <option name=\"fontSize\">Preferred font size for title/author/subtitle/copyright (defaults to 12)</option>\n /// <option name=\"height\">Preferred comic height (defaults to 300)</option>\n /// <option name=\"subtitle\">Preferred secondary/episode title (defaults to blank)</option>\n /// <option name=\"textColor\">Preferred color for title/etc. text (defaults to white)</option>\n /// <option name=\"title\">Preferred title (defaults to \"untitled\")</option>\n /// <option name=\"width\">Preferred comic width (defaults to 800)</option>\n /// <option name=\"xGutter\">Preferred horizontal gutter (defaults to 10)</option>\n \n if (window.svgDocument == null) {\n svgDocument = evt.target.ownerDocument;\n }\n\n this.document = svgDocument;\n this.svg = this.document.rootElement;\n this.ns = 'http://www.w3.org/2000/svg';\n\n if (opts == null) {\n opts = new Array();\n }\n\n var date = new Date();\n\n this.author = opts['author'] || 'A. N. Onymous';\n\n this.copyright = opts['copyright'] || \"© \" + date.getFullYear() + \" \" + this.author + \". All rights reserved.\";\n this.fill = opts['fill'] || 'black';\n this.fontSize = opts['fontSize'] || 12;\n this.height = opts['height'] || 300;\n this.subtitle = opts['subtitle'] || '';\n this.textColor = opts['textColor'] || 'white';\n this.title = opts['title'] || 'Untitled';\n this.width = opts['width'] || 800;\n this.xGutter = opts['xGutter'] || 10;\n\n// this.x = opts['x'] || window.innerWidth / 2 - this.width / 2;\n// this.y = opts['y'] || window.innerHeight / 2 - this.height / 2;\n\n this.panels = new Array();\n\n this.initialize();\n}", "title": "" }, { "docid": "e80185d3d9178b814ffbf82231386edd", "score": "0.51246506", "text": "_cleanSiGML(parent) {\nvar cn, ix, j, k, len, len1, nd, nds, ref;\n// Problems if not handled as array: but Array.from not available in IE\nnds = [];\nref = parent.childNodes;\nfor (j = 0, len = ref.length; j < len; j++) {\ncn = ref[j];\nif (cn != null) {\nnds.push(cn);\n}\n}\nfor (ix = k = 0, len1 = nds.length; k < len1; ix = ++k) {\nnd = nds[ix];\nif (typeof lggr.trace === \"function\") {\nlggr.trace(`HtoG: SiGML Element ${ix}: ${nd.nodeType} ${nd.nodeName}`);\n}\nswitch (nd.nodeType) {\ncase Node.COMMENT_NODE:\ncase Node.TEXT_NODE:\nif (typeof lggr.trace === \"function\") {\nlggr.trace(`HtoG: Removing ${ix}: ${nd.nodeType} ${nd.nodeName}`);\n}\nparent.removeChild(nd);\nbreak;\ndefault:\nif (nd.childNodes != null) {\nif (typeof lggr.trace === \"function\") {\nlggr.trace(`HtoG: Recursive call ${ix}`);\n}\nthis._cleanSiGML(nd);\n}\n}\n}\nreturn parent;\n}", "title": "" }, { "docid": "a6551d22a552ef7fc0ff4bbafdb20633", "score": "0.50930506", "text": "function makeIdsUnique(svgElem) {\n var i, j;\n var idSuffix = '--inject-' + uniqueIdCounter++;\n // Get all elements with an id. The SVG spec recommends to put referenced elements inside <defs> elements, but\n // this is a requirement, therefore we have to search for IDs in the whole SVG.\n var idElements = svgElem.querySelectorAll('[id]');\n var idElem;\n var tagName;\n var iriTagNames = {};\n var iriProperties = [];\n for (i = 0; i < idElements[_LENGTH_]; i++) {\n idElem = idElements[i];\n tagName = idElem.tagName;\n // Make ID unique if tag name is IRI referenceable\n if (tagName in IRI_TAG_PROPERTIES_MAP) {\n iriTagNames[tagName] = 1;\n // Add suffix to element's id\n idElem.id += idSuffix;\n // Replace ids in xlink:ref and href attributes\n ['xlink:href', 'href'].forEach(function(refAttrName) {\n var iri = idElem.getAttribute(refAttrName);\n if (/^\\s*#/.test(iri)) { // Check if iri is non-null and has correct format\n idElem.setAttribute(refAttrName, iri.trim() + idSuffix)\n }\n });\n }\n }\n // Get all properties that are mapped to the found tags\n for (tagName in iriTagNames) {\n (IRI_TAG_PROPERTIES_MAP[tagName] || [tagName]).forEach(function (mappedProperty) {\n // Add mapped properties to array of iri referencing properties.\n // Use linear search here because the number of possible entries is very small (maximum 11)\n if (iriProperties.indexOf(mappedProperty) < 0) {\n iriProperties.push(mappedProperty);\n }\n });\n }\n // Replace IDs with new IDs in all references\n if (iriProperties[_LENGTH_]) {\n // Add \"style\" to properties, because it may contain references in the form 'style=\"fill:url(#myFill)\"'\n iriProperties.push(_STYLE_);\n // Regular expression for functional notations of an IRI references. This will find occurences in the form\n // url(#anyId) or url(\"#anyId\") (for Internet Explorer)\n var funcIriRegex = /url\\(\"?#([a-zA-Z][\\w:.-]*)\"?\\)/g;\n // Run through all elements of the SVG and replace ids in references. It seems that getElementsByTagName('*')\n // performs faster than querySelectorAll('*') in this case.\n var allElements = svgElem[_GET_ELEMENTS_BY_TAG_NAME_]('*');\n var element;\n var propertyName;\n var value;\n var newValue;\n for (i = 0; i < allElements[_LENGTH_]; i++) {\n element = allElements[i];\n if (element.tagName == _STYLE_) {\n value = element.textContent;\n newValue = value && value.replace(funcIriRegex, 'url(#$1' + idSuffix + ')');\n if (newValue !== value) {\n element.textContent = newValue;\n }\n } else if (element.hasAttributes()) {\n // Run through all property names for which ids were found\n for (j = 0; j < iriProperties[_LENGTH_]; j++) {\n propertyName = iriProperties[j];\n value = element.getAttribute(propertyName);\n newValue = value && value.replace(funcIriRegex, 'url(#$1' + idSuffix + ')');\n if (newValue !== value) {\n element.setAttribute(propertyName, newValue);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "1e35bf835ff3d659fd0273a937285b8f", "score": "0.50807923", "text": "function removeElements() {\n d3.selectAll('.svg-tooltip').remove();\n d3.selectAll('.y-axis').remove();\n d3.selectAll('.tooltip-container').remove();\n d3.selectAll('.title-container').remove();\n console.log('removed elements');\n }", "title": "" }, { "docid": "0110db5e7ca7541e7a0ded1d8c87955a", "score": "0.50756836", "text": "remove () {\r\n\t\tvar svg = d3.select(this.element);\r\n\t\tsvg.selectAll('*').remove();\r\n\t}", "title": "" }, { "docid": "dd863df0eb9e5e069f6d234dbd464c6a", "score": "0.50717825", "text": "function xformMermaids()\n{\n var mermaids = document.getElementsByClassName('prism language-mermaid');\n if (mermaids.length == 0) return;\n var i = 0;\n // skip anything that's already been rendered.\n for (i=0; (i<mermaids.length) && (mermaids[i].getAttribute(\"rendered\") != null);i++);\n if (i==mermaids.length) return;\n\n var mm = mermaids[i];\n mm.setAttribute(\"rendered\", true);\n var text = mm.firstChild.data;\n // console.log(text);\n mermaid.render('mer' + mermaidCount,text, function(svgGraph) {\n mm.parentNode.outerHTML = \"<div>\" + svgGraph + \"</div>\";\n });\n\n mermaidCount+=1;\n xformMermaids();\n}", "title": "" }, { "docid": "6f362bcb229b7bb6d5ea929c0e34510e", "score": "0.5071131", "text": "_transformText () {\n // Collect all text elements into a list.\n const textElements = [];\n const collectText = domElement => {\n if (domElement.localName === 'text') {\n textElements.push(domElement);\n }\n for (let i = 0; i < domElement.childNodes.length; i++) {\n collectText(domElement.childNodes[i]);\n }\n };\n collectText(this._svgTag);\n convertFonts(this._svgTag);\n // For each text element, apply quirks.\n for (const textElement of textElements) {\n // Remove x and y attributes - they are not used in Scratch.\n textElement.removeAttribute('x');\n textElement.removeAttribute('y');\n // Set text-before-edge alignment:\n // Scratch renders all text like this.\n textElement.setAttribute('alignment-baseline', 'text-before-edge');\n textElement.setAttribute('xml:space', 'preserve');\n // If there's no font size provided, provide one.\n if (!textElement.getAttribute('font-size')) {\n textElement.setAttribute('font-size', '18');\n }\n let text = textElement.textContent;\n\n // Fix line breaks in text, which are not natively supported by SVG.\n // Only fix if text does not have child tspans.\n // @todo this will not work for font sizes with units such as em, percent\n // However, text made in scratch 2 should only ever export size 22 font.\n const fontSize = parseFloat(textElement.getAttribute('font-size'));\n const tx = 2;\n let ty = 0;\n let spacing = 1.2;\n // Try to match the position and spacing of Scratch 2.0's fonts.\n // Different fonts seem to use different line spacing.\n // Scratch 2 always uses alignment-baseline=text-before-edge\n // However, most SVG readers don't support this attribute\n // or don't support it alongside use of tspan, so the translations\n // here are to make up for that.\n if (textElement.getAttribute('font-family') === 'Handwriting') {\n spacing = 2;\n ty = -11 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Scratch') {\n spacing = 0.89;\n ty = -3 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Curly') {\n spacing = 1.38;\n ty = -6 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Marker') {\n spacing = 1.45;\n ty = -6 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Sans Serif') {\n spacing = 1.13;\n ty = -3 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Serif') {\n spacing = 1.25;\n ty = -4 * fontSize / 22;\n }\n\n if (textElement.transform.baseVal.numberOfItems === 0) {\n const transform = this._svgTag.createSVGTransform();\n textElement.transform.baseVal.appendItem(transform);\n }\n\n // Right multiply matrix by a translation of (tx, ty)\n const mtx = textElement.transform.baseVal.getItem(0).matrix;\n mtx.e += (mtx.a * tx) + (mtx.c * ty);\n mtx.f += (mtx.b * tx) + (mtx.d * ty);\n\n if (text && textElement.childElementCount === 0) {\n textElement.textContent = '';\n const lines = text.split('\\n');\n text = '';\n for (const line of lines) {\n const tspanNode = SvgElement.create('tspan');\n tspanNode.setAttribute('x', '0');\n tspanNode.setAttribute('style', 'white-space: pre');\n tspanNode.setAttribute('dy', `${spacing}em`);\n tspanNode.textContent = line ? line : ' ';\n textElement.appendChild(tspanNode);\n }\n }\n }\n }", "title": "" }, { "docid": "3b5bf311a5f9763e20501840e0029efe", "score": "0.50200826", "text": "function sanitizeSvg (svg) {\n\n // Setup all the layers that should be user selectble\n var layers = svg.selectAll(\"svg > g > g\")\n .filter(function () {\n return d3.select(this).attr(\"inkscape:groupmode\") == \"layer\";})\n .attr(\"id\", function () {\n return d3.select(this).attr(\"inkscape:label\");}) // ugh\n .attr(\"display\", null)\n .style(\"display\", null);\n\n // Set which layers are selectable\n // TODO: find a better way to do this; it relies on inkscape\n // specific tags and hardcoding layer names is not nice either!\n layers\n .classed(\"layer\", true);\n layers\n .filter(function () {\n var name = d3.select(this).attr(\"inkscape:label\");\n return !_.contains([\"background\", \"symbols\"], name);})\n .classed(\"selectable\", true);\n\n // activate the zoom levels (also in need of improvement)\n var zoomlevels = svg.selectAll(\"svg > g > g > g\");\n zoomlevels\n .each(function () {\n var node = d3.select(this),\n name = d3.select(this).attr(\"inkscape:label\"),\n match = /zoom(\\d)/.exec(name);\n if (match) {\n var level = parseInt(match[1]);\n console.log(\"zoom level\", name, level);\n node.classed(\"zoom\", true);\n node.classed(\"level\"+level, true);\n }\n });\n\n if (svg.select(\"g\").attr(\"transform\"))\n console.log(\"*Warning* there is a transform on the 'main' layer/group in the SVG. \" +\n \"This is likely to mess up positioning of some things.\");\n\n\n // Remove inline styles from symbols, to make sure they will\n // take our class styles.\n // svg.selectAll(\"symbol>*\")\n // svg.selectAll(\"#symbols > *\")\n // .style(\"fill\", null)\n // .attr(\"fill\", null)\n // .style(\"display\", null)\n // .style(\"visibility\", null);\n\n // Find all <use> nodes and replace them with their reference.\n // This ugly hack is a workaround for qtwebkit being slow to\n // render <use> nodes in some cases (e.g. rotated\n // transforms). Hopefully this can be removed in the future.\n\n // svg.selectAll(\"use\")\n // .each(function () {util.reifyUse(svg, this);});\n\n // Here we might also do some checking on the supplied SVG\n // file so that it has the right format etc, and report\n // problems back.\n }", "title": "" }, { "docid": "e3f712c05402c677fff0ea275cb3456c", "score": "0.50173795", "text": "function retearPaper() {\n\n\t// Loop through tornPaperSvg and {{do stuff...}}\n\t\tfor (i = 0; i < tornPaperSvg.length; i++) {\n\n\t\t\t// Return child nodes of tornPaperSvg[i]\n\t\t\t\tvar childNodesList = tornPaperSvg[i].childNodes;\n\t\t\t\t// console.log('childNodesList:');\n\t\t\t\t// console.log(childNodesList);\n\n\t\t\t// Convert childNodes into an array\n\t\t\t\tvar childNodesArray = Array.from(childNodesList);\n\t\t\t\t// console.log('childNodesArray:');\n\t\t\t\t// console.log(childNodesArray);\n\n\t\t\t// Define tagNamesArray variable and assign to empty array\n\t\t\t\tvar tagNamesArray = [];\n\n\t\t\t// Define getTagNames(value) function\n\t\t\t\tfunction getTagNames(value) {\n\n\t\t\t\t\t// Determine the tagName of value argument and add to tagNamesArray\n\t\t\t\t\ttagNamesArray.push(value.tagName);\n\n\t\t\t\t}\n\n\t\t\t// Use the .forEach() method to call getTagNames function once for each element in childNodesArray array\n\t\t\t\tchildNodesArray.forEach(getTagNames);\n\n\t\t\t// Define polygonPosition variable and use .indexOf() method to search tagNamesArray for the specified item and return its position\n\t\t\t\t// NOTE: The .indexOf() method returns -1 if the value is not found\n\t\t\t\tvar polygonPosition = tagNamesArray.indexOf('polygon');\n\t\t\t\t// console.log('polygonPosition:');\n\t\t\t\t// console.log(polygonPosition);\n\n\t\t\t// Return data from childNodesArray[polygonPosition] to access <polygon> element\n\t\t\t\tvar polygonElement = childNodesArray[polygonPosition];\n\t\t\t\t// console.log('polygonElement:');\n\t\t\t\t// console.log(polygonElement);\n\n\t\t\t// Use the .getAttribute() method to return value of the points attribute\n\t\t\t\tvar pointsAttribute = polygonElement.getAttribute('points');\n\t\t\t\t// console.log('pointsAttribute:');\n\t\t\t\t// console.log(pointsAttribute);\n\n\t\t\t// Use the .split() method to convert the pointsAttribute string into an array\n\t\t\t\tvar pointsArray = pointsAttribute.split(',');\n\t\t\t\t// console.log('pointsArray:');\n\t\t\t\t// console.log(pointsArray);\n\n\t\t\t// Define lastElement variable and assign to empty array\n\t\t\t\tvar lastElement = [];\n\t\t\t\t// console.log('lastElement:');\n\t\t\t\t// console.log(lastElement);\n\n\t\t\t// Use .push() method to add last element of pointsArray to lastElement\n\t\t\t\tlastElement.push(pointsArray[pointsArray.length - 1]);\n\t\t\t\t// console.log('lastElement:');\n\t\t\t\t// console.log(lastElement);\n\n\t\t\t\t\t// Regex to extract characters before blank space\n\t\t\t\t\t\t//NOTE: The returned value will be a string and needs to be converted into an integer\n\t\t\t\t\t\tvar xString = lastElement[0].substr(0,lastElement[0].indexOf(' '));\n\t\t\t\t\t\t// console.log('xString:');\n\t\t\t\t\t\t// console.log(xString);\n\n\t\t\t\t\t// Convert xString to an integer\n\t\t\t\t\t\tvar xInt = parseInt(xString);\n\t\t\t\t\t\t// console.log('xInt:');\n\t\t\t\t\t\t// console.log(xInt);\n\n\t\t\t// Define oldSvgWidth variable and assign to value of xInt\n\t\t\t\tvar oldSvgWidth = xInt;\n\t\t\t\t// console.log('oldSvgWidth:');\n\t\t\t\t// console.log(oldSvgWidth);\n\n\t\t\t// Use the .getBoundingClientRect() method to return the size of tornPaperSvg[i].parentNode and its position relative to the viewport (left, top, right, bottom, x, y, width, and height properties)\n\t\t\t\tvar newRect = tornPaperSvg[i].parentNode.getBoundingClientRect();\n\t\t\t\tvar newRectWidth = newRect.width;\n\t\t\t\t// console.log('newRectWidth:');\n\t\t\t\t// console.log(newRectWidth);\n\t\t\t\tvar newRectHeight = newRect.height;\n\t\t\t\t// console.log('newRectHeight:');\n\t\t\t\t// console.log(newRectHeight);\n\n\t\t\t// Assign value of newRectWidth to newSvgWidth\n\t\t\t\tvar newSvgWidth = newRectWidth;\n\t\t\t\t// console.log('newSvgWidth:');\n\t\t\t\t// console.log(newSvgWidth);\n\n\t\t\t// Assign value of (newRectWidth * 0.045) to newSvgHeight\n\t\t\t\tvar newSvgHeight = (newRectWidth * 0.045);\n\t\t\t\t// console.log('newSvgHeight:');\n\t\t\t\t// console.log(newSvgHeight);\n\n\t\t\t// Assign value of newSvgWidth to tornPaperSvg[i] as width attribute\n\t\t\t\ttornPaperSvg[i].style.width = (newSvgWidth + 'px');\n\t\t\t\t// console.log('tornPaperSvg[' + i + '].width:');\n\t\t\t\t// console.log(tornPaperSvg[i].style.width);\n\n\t\t\t// Assign value of newSvgHeight to tornPaperSvg[i] as height attribute\n\t\t\t\ttornPaperSvg[i].style.height = (newSvgHeight + 'px');\n\t\t\t\t// console.log('tornPaperSvg[' + i + '].height:');\n\t\t\t\t// console.log(tornPaperSvg[i].style.height);\n\n\t\t\t// Define svgRatios variable and assign to empty array\n\t\t\t\tvar svgRatios = [];\n\t\t\t\t// console.log('svgRatios:');\n\t\t\t\t// console.log(svgRatios);\n\n\t\t\t// Loop through pointsArray and calculate ratios for X and Y Coordinates\n\t\t\t\tfor (j = 0; j < pointsArray.length; j++) {\n\n\t\t\t\t\t// Regex to extract characters before blank space\n\t\t\t\t\t\tvar xString = pointsArray[j].substr(0,pointsArray[j].indexOf(' '));\n\t\t\t\t\t\t// console.log('xString:');\n\t\t\t\t\t\t// console.log(xString);\n\n\t\t\t\t\t// Regex to extract characters after blank space\n\t\t\t\t\t\tvar yString = pointsArray[j].substr(pointsArray[j].indexOf(' ')+1);\n\t\t\t\t\t\t// console.log('yString:');\n\t\t\t\t\t\t// console.log(yString);\n\n\t\t\t\t\t// Convert xString to a float\n\t\t\t\t\t\tvar xFloat = parseFloat(xString);\n\t\t\t\t\t\t// console.log('xFloat:');\n\t\t\t\t\t\t// console.log(xFloat);\n\n\t\t\t\t\t// Convert yString to a float\n\t\t\t\t\t\tvar yFloat = parseFloat(yString);\n\t\t\t\t\t\t// console.log('yFloat:');\n\t\t\t\t\t\t// console.log(yFloat);\n\n\t\t\t\t\t// Calculate ratio of xFloat / oldSvgWidth\n\t\t\t\t\t\tvar xRatio = (xFloat / oldSvgWidth);\n\t\t\t\t\t\t// console.log('xRatio:');\n\t\t\t\t\t\t// console.log(xRatio);\n\n\t\t\t\t\t// Calculate ration of yFloat / (oldSvgWidth * 0.045)\n\t\t\t\t\t\tvar yRatio = (yFloat / (oldSvgWidth * 0.045));\n\t\t\t\t\t\t// console.log('yRatio:');\n\t\t\t\t\t\t// console.log(yRatio);\n\n\t\t\t\t\t// Add xRatio and yRatio values to svgRatios array\n\t\t\t\t\t\tsvgRatios.push(xRatio + ' ' + yRatio);\n\t\t\t\t\t\t// console.log('svgRatios:');\n\t\t\t\t\t\t// console.log(svgRatios);\n\n\t\t\t\t}\n\t\t\t\t// console.log('svgRatios:');\n\t\t\t\t// console.log(svgRatios);\n\n\t\t\t// Empty the contents of tornPaperSvg[i]\n\t\t\t\twhile (tornPaperSvg[i].hasChildNodes()) {\n\t\t\t\t\ttornPaperSvg[i].removeChild(tornPaperSvg[i].firstChild);\n\t\t\t\t}\n\t\t\t\t// console.log('tornPaperSvg[' + i + '].childNodes:');\n\t\t\t\t// console.log(tornPaperSvg[i].childNodes);\n\n\t\t\t// Define newSVGCoordinates variable and assign to empty array\n\t\t\t\tvar newSVGCoordinates = [];\n\t\t\t\t// console.log('newSVGCoordinates:');\n\t\t\t\t// console.log(newSVGCoordinates);\n\n\t\t\t// Loop through svgRatios array and caculate new X and Y Coordinates relative to newSvgWidth and newSvgHeight\n\t\t\t\tfor (k = 0; k < svgRatios.length; k++) {\n\n\t\t\t\t\t// Regex to extract characters before blank space\n\t\t\t\t\t\tvar xString = svgRatios[k].substr(0, svgRatios[k].indexOf(' '));\n\t\t\t\t\t\t// console.log('xString:');\n\t\t\t\t\t\t// console.log(xString);\n\n\t\t\t\t\t// Regex to extract characters after blank space\n\t\t\t\t\t\tvar yString = svgRatios[k].substr(svgRatios[k].indexOf(' ') + 1);\n\t\t\t\t\t\t// console.log('yString:');\n\t\t\t\t\t\t// console.log(yString);\n\n\t\t\t\t\t// Convert xString to a float\n\t\t\t\t\t\tvar xFloat = parseFloat(xString);\n\t\t\t\t\t\t// console.log('xFloat:');\n\t\t\t\t\t\t// console.log(xFloat);\n\n\t\t\t\t\t// Convert yString to a float\n\t\t\t\t\t\tvar yFloat = parseFloat(yString);\n\t\t\t\t\t\t// console.log('yFloat:');\n\t\t\t\t\t\t// console.log(yFloat);\n\n\t\t\t\t\t// Calculate new xCoordinate value\n\t\t\t\t\t\tvar xCoordinate = (xFloat * newSvgWidth);\n\t\t\t\t\t\t// console.log('xCoordinate:');\n\t\t\t\t\t\t// console.log(xCoordinate);\n\n\t\t\t\t\t// Calculate new yCoordinate value\n\t\t\t\t\t\tvar yCoordinate = (yFloat * newSvgHeight);\n\t\t\t\t\t\t// console.log('yCoordinate:');\n\t\t\t\t\t\t// console.log(yCoordinate);\n\n\t\t\t\t\t// Add xCoordinate and yCoordinate values to newSVGCoordinates array\n\t\t\t\t\t\tnewSVGCoordinates.push(xCoordinate + ' ' + yCoordinate);\n\t\t\t\t\t\t// console.log('newSVGCoordinates:');\n\t\t\t\t\t\t// console.log(newSVGCoordinates);\n\n\t\t\t\t}\n\t\t\t\t// console.log('newSVGCoordinates:');\n\t\t\t\t// console.log(newSVGCoordinates);\n\n\t\t\t// Use Snap.svg JavaScript library to create new drawing surface out of tornPaperSvg[i]\n\t\t\t\tvar svg = Snap(tornPaperSvg[i]);\n\n\t\t\t// Draw a polygon using the X Y coordinates from the newSVGCoordinates array and define a fill color\n\t\t\t\tlet tornPaperModulo = i % 4;\n\t\t\t\tif (tornPaperModulo == 0) {\n\t\t\t\t\tvar tornPaperFill = svg.polygon(newSVGCoordinates).attr({\n\t\t\t\t\t\tfill: '#c5342f'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse if (tornPaperModulo == 1) {\n\t\t\t\t\tvar tornPaperFill = svg.polygon(newSVGCoordinates).attr({\n\t\t\t\t\t\tfill: '#f47b3d'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse if (tornPaperModulo == 2) {\n\t\t\t\t\tvar tornPaperFill = svg.polygon(newSVGCoordinates).attr({\n\t\t\t\t\t\tfill: '#5b9d7a'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar tornPaperFill = svg.polygon(newSVGCoordinates).attr({\n\t\t\t\t\t\tfill: '#ffc63e'\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t}\n\n}", "title": "" }, { "docid": "1785ae52a739652e13e1d5d165798206", "score": "0.5015405", "text": "function buildSvgFullyOptimized() {\n\t\t\n\t\tlet svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'svg');\n \tsvgElement.setAttribute('viewBox','0 0 103.1 103.1');\n \tsvgElement.setAttribute('class','optimization-empty-svg mt-5 svg-absolute-center');\n \t\n \tlet gElement = document.createElementNS(\"http://www.w3.org/2000/svg\", 'g');\n \t\n \tlet pathElement1 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement1.setAttribute('class','optimization-empty-path-0');\n \tpathElement1.setAttribute('d','M51.5,0C23.1,0,0,23.1,0,51.5c0,28.5,23.1,51.5,51.5,51.5c3.7,0,7.3-0.4,10.7-1.1c22.8-4.8,40-24.8,40.8-48.8 c0-0.5,0-1.1,0-1.6C103.1,23.1,80,0,51.5,0z M67,90.2c-0.1,0.2-0.2,0.3-0.4,0.4c-4.9,1.6-11.6,2.4-15.8,2.4 c-3.6,0-10.2-0.8-15.3-2.3c-0.2-0.1-0.3-0.2-0.4-0.4c-0.1-0.2,0-0.4,0.1-0.5l4.2-5.8c0.1-0.2,0.3-0.2,0.5-0.2h23 c0.2,0,0.4,0.1,0.5,0.3l3.5,5.7C67.1,89.8,67.1,90,67,90.2z M97,51.8c-0.1,17-9.5,31.7-23.3,39.5l-6.5-10.4 c-0.8-1.3-2.2-2.1-3.7-2.1H39.4c-1.4,0-2.7,0.7-3.6,1.8l-7.4,10.1C15.1,82.9,6,68.3,6,51.5C6,26.4,26.4,6,51.5,6h0.3 C76.8,6.2,97,26.5,97,51.5V51.8z');\n \tgElement.appendChild(pathElement1);\n \t\n \tlet pathElement2 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement2.setAttribute('class','optimization-empty-path-1');\n \tpathElement2.setAttribute('d','M63.4,84c-0.1-0.2-0.3-0.3-0.5-0.3h-23c-0.2,0-0.4,0.1-0.5,0.2l-4.2,5.8c-0.1,0.2-0.1,0.4-0.1,0.5 c0.1,0.2,0.2,0.3,0.4,0.4c5.1,1.5,11.7,2.3,15.3,2.3c4.2,0,10.9-0.7,15.8-2.4c0.2-0.1,0.3-0.2,0.4-0.4c0.1-0.2,0-0.4-0.1-0.5 L63.4,84z');\n \tgElement.appendChild(pathElement2);\n \t\n \tlet pathElement3 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement3.setAttribute('class','optimization-empty-path-1');\n \tpathElement3.setAttribute('d','M51.8,6h-0.3C26.4,6,6,26.4,6,51.5c0,16.7,9,31.3,22.4,39.2l7.4-10.1c0.8-1.1,2.2-1.8,3.6-1.8h24.1 c1.5,0,2.9,0.8,3.7,2.1l6.5,10.4C87.6,83.5,96.9,68.8,97,51.8v-0.3C97,26.5,76.8,6.2,51.8,6z M20.2,52.8c0,0.3-0.1,0.6-0.3,0.8 c-0.2,0.2-0.5,0.3-0.8,0.3h-8.3c-0.6,0-1.1-0.5-1.1-1.1l0-2.4c0-0.3,0.1-0.6,0.3-0.8c0.2-0.2,0.5-0.3,0.8-0.3H19 c0.6,0,1.1,0.5,1.1,1.1V52.8z M30.2,76.2l-5.9,5.9c-0.2,0.2-0.5,0.3-0.8,0.3c-0.3,0-0.6-0.1-0.8-0.3L21,80.3 c-0.2-0.2-0.3-0.5-0.3-0.8s0.1-0.6,0.3-0.8l5.9-5.9c0.2-0.2,0.5-0.3,0.8-0.3s0.6,0.1,0.8,0.3l1.7,1.7c0.2,0.2,0.3,0.5,0.3,0.8 C30.5,75.7,30.4,76,30.2,76.2z M30.2,28.5l-1.7,1.7c-0.2,0.2-0.5,0.3-0.8,0.3c-0.3,0-0.6-0.1-0.8-0.3L21,24.3 c-0.4-0.4-0.4-1.1,0-1.6l1.7-1.7c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.6,0.1,0.8,0.3l5.9,5.9C30.6,27.4,30.6,28.1,30.2,28.5z M49.2,10.7c0-0.6,0.5-1.1,1.1-1.1h2.4c0.6,0,1.1,0.5,1.1,1.1V19c0,0.6-0.5,1.1-1.1,1.1h-2.4c-0.6,0-1.1-0.5-1.1-1.1V10.7z M57,49.6c0.3,0.5,0.5,1.1,0.7,1.8c0.8,3.8-1.5,7.5-5.3,8.4c-3.8,0.8-7.5-1.5-8.4-5.3c-0.8-3.8,1.5-7.5,5.3-8.3 c0.5-0.1,0.9-0.2,1.3-0.2l19.6-26.7L57,49.6z M93.4,53.3C93,64.4,87.9,75.4,80.3,82.1c-0.2,0.2-0.5,0.3-0.7,0.3l0,0 c-0.3,0-0.6-0.1-0.8-0.3l-5.9-5.9c-0.2-0.2-0.3-0.5-0.3-0.8c0-0.3,0.1-0.6,0.3-0.8l1.7-1.7c0.2-0.2,0.5-0.3,0.8-0.3 s0.6,0.1,0.8,0.3l3.6,3.6c5.6-6.4,8.7-14.2,9.3-22.6l-5,0c-0.3,0-0.6-0.1-0.8-0.3c-0.2-0.2-0.3-0.5-0.3-0.8v-2.4 c0-0.3,0.1-0.6,0.3-0.8c0.2-0.2,0.5-0.3,0.8-0.3h5c-0.5-8.4-3.7-16.3-9.3-22.6l-3.6,3.6c-0.2,0.2-0.5,0.3-0.8,0.3s-0.6-0.1-0.8-0.3 l-1.7-1.7c-0.2-0.2-0.3-0.5-0.3-0.8c0-0.3,0.1-0.6,0.3-0.8l5.9-5.9c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.5,0.1,0.7,0.3 c7.6,6.7,12.7,17.8,13.1,28.9C93.5,51.4,93.5,51.5,93.4,53.3z');\n \tgElement.appendChild(pathElement3);\n \t\n \tlet pathElement4 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement4.setAttribute('class','optimization-meter all-optimized');\n \tpathElement4.setAttribute('d','M80.3,21c-0.2-0.2-0.5-0.3-0.7-0.3c-0.3,0-0.6,0.1-0.8,0.3l-5.9,5.9c-0.2,0.2-0.3,0.5-0.3,0.8 c0,0.3,0.1,0.6,0.3,0.8l1.7,1.7c0.2,0.2,0.5,0.3,0.8,0.3s0.6-0.1,0.8-0.3l3.6-3.6c5.6,6.4,8.7,14.2,9.3,22.6h-5 c-0.3,0-0.6,0.1-0.8,0.3c-0.2,0.2-0.3,0.5-0.3,0.8v2.4c0,0.3,0.1,0.6,0.3,0.8c0.2,0.2,0.5,0.3,0.8,0.3l5,0 c-0.5,8.4-3.7,16.3-9.3,22.6l-3.6-3.6c-0.2-0.2-0.5-0.3-0.8-0.3s-0.6,0.1-0.8,0.3l-1.7,1.7c-0.2,0.2-0.3,0.5-0.3,0.8 c0,0.3,0.1,0.6,0.3,0.8l5.9,5.9c0.2,0.2,0.5,0.3,0.8,0.3l0,0c0.3,0,0.5-0.1,0.7-0.3c7.6-6.7,12.7-17.8,13.1-28.9 c0.1-1.8,0.1-1.8,0-3.4C93,38.7,87.9,27.7,80.3,21z');\n \tgElement.appendChild(pathElement4);\n \t\n \tlet pathElement5 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement5.setAttribute('class','optimization-meter all-optimized');\n \tpathElement5.setAttribute('d','M49.3,46.1c-3.8,0.8-6.1,4.6-5.3,8.3c0.8,3.8,4.6,6.1,8.4,5.3c3.8-0.8,6.1-4.6,5.3-8.4 c-0.2-0.6-0.4-1.2-0.7-1.8l13.2-30.4L50.6,46C50.2,46,49.8,46,49.3,46.1z');\n \tgElement.appendChild(pathElement5);\n \t\n \tlet pathElement6 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement6.setAttribute('class','optimization-empty-path-2');\n \tpathElement6.setAttribute('d','M50.3,20.2h2.4c0.6,0,1.1-0.5,1.1-1.1v-8.3c0-0.6-0.5-1.1-1.1-1.1h-2.4c-0.6,0-1.1,0.5-1.1,1.1V19 C49.2,19.7,49.7,20.2,50.3,20.2z');\n \tgElement.appendChild(pathElement6);\n \t\n \tlet pathElement7 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement7.setAttribute('class','optimization-empty-path-2');\n \tpathElement7.setAttribute('d','M24.3,21c-0.2-0.2-0.5-0.3-0.8-0.3c-0.3,0-0.6,0.1-0.8,0.3L21,22.8c-0.4,0.4-0.4,1.1,0,1.6l5.9,5.9 c0.2,0.2,0.5,0.3,0.8,0.3c0.3,0,0.6-0.1,0.8-0.3l1.7-1.7c0.4-0.4,0.4-1.1,0-1.6L24.3,21z');\n \tgElement.appendChild(pathElement7);\n \t\n \tlet pathElement8 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement8.setAttribute('class','optimization-empty-path-2');\n \tpathElement8.setAttribute('d','M19,49.2h-8.3c-0.3,0-0.6,0.1-0.8,0.3c-0.2,0.2-0.3,0.5-0.3,0.8l0,2.4c0,0.6,0.5,1.1,1.1,1.1H19 c0.3,0,0.6-0.1,0.8-0.3c0.2-0.2,0.3-0.5,0.3-0.8v-2.4C20.2,49.7,19.7,49.2,19,49.2z');\n \tgElement.appendChild(pathElement8);\n \t\n \tlet pathElement9 = document.createElementNS(\"http://www.w3.org/2000/svg\", 'path');\n \tpathElement9.setAttribute('class','optimization-empty-path-2');\n \tpathElement9.setAttribute('d','M28.5,72.9c-0.2-0.2-0.5-0.3-0.8-0.3s-0.6,0.1-0.8,0.3L21,78.8c-0.2,0.2-0.3,0.5-0.3,0.8s0.1,0.6,0.3,0.8 l1.7,1.7c0.2,0.2,0.5,0.3,0.8,0.3c0.3,0,0.6-0.1,0.8-0.3l5.9-5.9c0.2-0.2,0.3-0.5,0.3-0.8c0-0.3-0.1-0.6-0.3-0.8L28.5,72.9z');\n \tgElement.appendChild(pathElement9);\n \t\n \tsvgElement.appendChild(gElement);\n \t\n \treturn svgElement;\n\t}", "title": "" }, { "docid": "e8791dff6a04dc4a6cabf408d2369503", "score": "0.50122803", "text": "function svgConverter() {\n jQuery('img.svg').each(function(){\n var $img = jQuery(this);\n var imgID = $img.attr('id');\n var imgClass = $img.attr('class');\n var imgURL = $img.attr('src');\n\n jQuery.get(imgURL, function(data) {\n // Get the SVG tag, ignore the rest\n var $svg = jQuery(data).find('svg');\n\n // Add replaced image's ID to the new SVG\n if(typeof imgID !== 'undefined') {\n $svg = $svg.attr('id', imgID);\n }\n // Add replaced image's classes to the new SVG\n if(typeof imgClass !== 'undefined') {\n $svg = $svg.attr('class', imgClass + ' replaced-svg');\n }\n\n // Remove any invalid XML tags as per http://validator.w3.org\n $svg = $svg.removeAttr('xmlns:a');\n\n // Replace image with new SVG\n $img.replaceWith($svg);\n updateElements();\n });\n });\n}", "title": "" }, { "docid": "2c419cdf8592ae23ffa5bfb18b4cb243", "score": "0.500857", "text": "function loadSVG(path,name) {\n svg[name] = pd.xmlmin(fs.readFileSync(__dirname+path,\"utf8\"))\n}", "title": "" }, { "docid": "3b255e014c739bac1e4f44e2fabcd874", "score": "0.4999029", "text": "function transformSvg (svg, cb) {\n svg.attr({ style: 'display:none' })\n cb(null)\n}", "title": "" }, { "docid": "12e9b4d6531280948230df56f2cbb2b0", "score": "0.499734", "text": "get avoidNs(){ return [ this.xhtmlNS, this.svgNS, 'http://ns.adobe.com/2006/mxml/' ] }", "title": "" }, { "docid": "bc5c32e4ed0a041a9c11048c33cea42b", "score": "0.49879235", "text": "function transformSvg(svg, cb) {\n svg.attr({ style: 'display:none' });\n cb(null);\n}", "title": "" }, { "docid": "cf4436eef4971f31a48afff92e8364e6", "score": "0.49864534", "text": "function createSvg () {\r\n // Remove the existing one\r\n d3\r\n .select(canvasId)\r\n .selectAll('svg')\r\n .remove();\r\n // Create a new svg node\r\n svg = d3\r\n .select(canvasId)\r\n .append('svg:svg')\r\n .attr('width', 500)\r\n .attr('height', 500)\r\n .append('g') // Group all element to make alignment easier\r\n .attr('transform', function () { // Place in center of the page\r\n return 'translate(' + (500 / 2) + ', ' + (500 / 2) + ')';\r\n });\r\n }", "title": "" }, { "docid": "beed437463d5482db0470fae1b858ef9", "score": "0.4982008", "text": "function post_graph(target, g, options) {\n var elem = document.getElementById(target)\n var no_dims = options && options.no_dims;\n // elem.innerHTML += \"<code>\" + g + \"</code>\"\n var rendered = Viz(g, \"svg\");\n if (no_dims) {\n // ugh what a hack\n // console.log(\"pre-replace \" + rendered);\n rendered = rendered.replace(/width=\"[^\"]*\"/, '');\n // console.log(\"mid-replace \" + rendered);\n rendered = rendered.replace(/height=\"[^\"]*\"/, '');\n // console.log(\"postreplace \" + rendered);\n }\n elem.innerHTML += rendered;\n}", "title": "" }, { "docid": "bdf5d81159b5f0a2b1fa1b184e5a199a", "score": "0.49792272", "text": "_initEmptyTitle(){\n const oldTitle = this.svg.select(\"graph-title\");\n if (oldTitle) {\n oldTitle.remove();\n }\n\n this.titleSVG = this.svg.append(\"text\")\n .attr(\"id\", \"graph-title\")\n .attr(\"x\", (this.width / 2))\n .attr(\"y\", 0 - (this.margin.top / 2))\n .attr(\"text-anchor\", \"middle\");\n }", "title": "" }, { "docid": "5c97ceee0014b9fa3027af4dacc0f038", "score": "0.49749237", "text": "replaceImgTag (el, params) {\n let img = el.getElementsByClassName('svg')[0]\n img.style.fill = params.fill\n let w = params.width - params.padding * 2\n let h = params.height - params.padding * 2\n this.replaceWithSVG(img, w, h)\n }", "title": "" }, { "docid": "990ea175fc80d8f7422875e0a7ba64ed", "score": "0.49731618", "text": "function removeAll(){\n d3.selectAll(\".announcementText\").remove() \n d3.selectAll(\".circle\").remove()\n d3.selectAll(\".lastfmurl\").remove()\n d3.selectAll(\".artistname\").remove()\n d3.selectAll(\".axis\").remove()\n d3.selectAll(\".radio\").remove()\n}", "title": "" }, { "docid": "3cc5e3a865ce910ae014f443c6c3eaab", "score": "0.49721348", "text": "function scrapOld() {\n\twhile (pixelCanvas.firstChild)\n\tpixelCanvas.removeChild(pixelCanvas.firstChild);\n}", "title": "" }, { "docid": "91608de8064a756d6e7517a18a008f4f", "score": "0.49665454", "text": "_initSvgEls() {\n const _this = this;\n\n this.svgEls = {\n panel: document.createElementNS(this.SVG_NS, \"rect\"),\n sliders: [],\n sliderPanels: []\n };\n\n this._appendSvgEls();\n this._update();\n }", "title": "" }, { "docid": "e123a4fb210368c7307a233b93f8d358", "score": "0.496582", "text": "function beginClean(done) {\n del([iconURL, graphicURL]);\n done();\n}", "title": "" }, { "docid": "06efb9feb1e99dea70ed83d1466e4c45", "score": "0.49643832", "text": "function gravestone_cleanup() {\n for (var i = 0; i < env.b.children.length; i++) {\n if ((env.b.children[i].tagName == 'DIV') && (env.b.children[i]._type == \"gravestone\")) {\n env.b.removeChild(env.b.children[i]);\n// b.children[i].destroy()\n i--;\n }\n }\n}", "title": "" }, { "docid": "8949ae0f978a528bf5686f7888b90da8", "score": "0.49500188", "text": "function stripEffect(line) {\n i = 0;\n while (i < line.length) {\n line = line.replace(\"\\n\", \" \");\n line = line.replace(\"<b>\", \"**\");\n line = line.replace(\"</b>\", \"**\");\n line = line.replace(\"<b>\", \"**\");\n line = line.replace(\"</b>\", \"**\");\n line = line.replace(\"\\n\", \"\");\n line = line.replace(\"<i>\", \"_\");\n line = line.replace(\"</i>\", \"_\");\n line = line.replace(\"#\", \"\");\n line = line.replace(\"$\", \"\");\n line = line.replace(\"[x]\", \"\"); // Why does this show up on cards?\n i++;\n }\n return line;\n}", "title": "" }, { "docid": "00f5e56f3ea3294e299e25e9c60a4981", "score": "0.49388805", "text": "function applyStyleToSVG() {\n page.evaluate(function (css) {\n //We need to apply the style to the SVG\n var defs = document.createElement(\"defs\"),\n style = document.createElement(\"style\");\n style.innerHTML = css;\n\n defs.appendChild(style);\n document.querySelector(\"svg\").appendChild(defs);\n }, css);\n }", "title": "" }, { "docid": "14f6e026d5b9e0162def0668b1020130", "score": "0.49379274", "text": "function parseSVG(s) {\n var div = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');\n div.innerHTML = '<svg xmlns=\"http://www.w3.org/2000/svg\">' + s + '</svg>';\n var frag = document.createDocumentFragment();\n while (div.firstChild.firstChild)\n frag.appendChild(div.firstChild.firstChild);\n return frag;\n}", "title": "" }, { "docid": "a240a602f2b9b2c68d4ea140eaf0ba7e", "score": "0.49324223", "text": "function removeDrinkImg() {\n const appendElement = document.querySelector(\"#drink-info\");\n while (appendElement.lastChild) {\n appendElement.removeChild(appendElement.lastChild);\n }\n}", "title": "" }, { "docid": "6a0dad934b738f991743aadb2671f08e", "score": "0.4927507", "text": "function _dragClean() {\r\n\tif (!dragable) {\r\n\t\treturn;\r\n\t}\r\n\tif (colouredElement) {\r\n\t\tfindSpanChild(colouredElement).className = 'treetitle';\r\n\t}\r\n\t\r\n\tfloatDragElement.parentElement.removeChild(floatDragElement);\r\n\tfloatDragElement = null;\r\n\tcolouredElement = null;\r\n\tdraggedNodeID = null;\r\n\tlastDraggedOnNodeID = null;\r\n}", "title": "" }, { "docid": "b550d6ef831077724b055a851dd31974", "score": "0.49266532", "text": "function portfolioSVG() {\n return src(input)\n .pipe(svgSprite(config))\n .pipe(dest(output))\n}", "title": "" }, { "docid": "96d777ebc8dafa6aa541f91691af0069", "score": "0.49264127", "text": "function insertSVG() {\t\r\n\tjQuery(document).ready(function() {\r\n\t\tjQuery('img.svg').each(function(){\r\n\t\t\tvar $img = jQuery(this);\r\n\t\t\tvar imgID = $img.attr('id');\r\n\t\t\tvar imgClass = $img.attr('class');\r\n\t\t\tvar imgURL = $img.attr('src');\r\n\t\t\t\r\n\t\t\tjQuery.get(imgURL, function(data) {\r\n\t\t\t\t// Get the SVG tag, ignore the rest\r\n\t\t\t\tvar $svg = jQuery(data).find('svg');\r\n\t\t\t\t\r\n\t\t\t\t// Add replaced image's ID to the new SVG\r\n\t\t\t\tif(typeof imgID !== 'undefined') {\r\n\t\t\t\t\t$svg = $svg.attr('id', imgID);\r\n\t\t\t\t}\r\n\t\t\t\t// Add replaced image's classes to the new SVG\r\n\t\t\t\tif(typeof imgClass !== 'undefined') {\r\n\t\t\t\t\t$svg = $svg.attr('class', imgClass + ' replaced-svg');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Remove any invalid XML tags as per http://validator.w3.org\r\n\t\t\t\t$svg = $svg.removeAttr('xmlns:a');\r\n\t\t\t\t\r\n\t\t\t\t// Replace image with new SVG\r\n\t\t\t\t$img.replaceWith($svg);\r\n\t\t\t}, 'xml');\r\n\t\t});\t\t\r\n\t});\t\r\n\t\r\n\t$(window).load(function() {\r\n\t\t// Update the css for the github_logo class (path)\r\n\t\tjQuery('.github_logo path').css('fill', colorSentenceBorder);\r\n\t});\r\n}", "title": "" }, { "docid": "68428c589e3f6c54c6a6be9c0b98d0a1", "score": "0.4924245", "text": "function drawSvg() {\n\t\t// selector can be #residential, or #commercial which should be in graph.html\n\t\tvar dataSources = [{selector: '#commercial', data: data.commGraphData}, \n\t\t\t{selector: '#residential', data: data.residGraphData}];\n\n\t\tdataSources.forEach(function(item) {\n\t\t\tvar canvas = createCanvas(item.selector, item.data);\n\t\t\tdrawHorizontalLabel(canvas);\n\t\t\tdrawVerticalLable(canvas, item.data);\n\t\t\tdrawHeatMap(canvas, item.data);\n\t\t});\n\t}", "title": "" }, { "docid": "3b7661f3681b3baf6217a57a9ee68d8e", "score": "0.49156365", "text": "function removeDynamicStyle() {\n util.$(\"#annotator-dynamic-style\").remove();\n }", "title": "" }, { "docid": "42eb6b3bfa0c9cd7bf86e68f32a52012", "score": "0.4907024", "text": "destroy() {\n d3.select(this.el).selectAll('svg').remove();\n }", "title": "" }, { "docid": "6f655cdc39478b79cdb13a341ad662be", "score": "0.48987624", "text": "function wipe () {\n svg.selectAll(\"circle\")\n .attr(\"title\", \"\")\n .style(\"fill\", function (d,i){\n return defC;\n });\n}", "title": "" }, { "docid": "e3a9c272ada077de01f66fcd6489b1f1", "score": "0.48898795", "text": "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "title": "" }, { "docid": "e3a9c272ada077de01f66fcd6489b1f1", "score": "0.48898795", "text": "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "title": "" }, { "docid": "e3a9c272ada077de01f66fcd6489b1f1", "score": "0.48898795", "text": "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "title": "" }, { "docid": "e3a9c272ada077de01f66fcd6489b1f1", "score": "0.48898795", "text": "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "title": "" }, { "docid": "e3a9c272ada077de01f66fcd6489b1f1", "score": "0.48898795", "text": "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "title": "" }, { "docid": "e8ef81902153fbb609c37f9e6c265af2", "score": "0.4889842", "text": "function cleanReport() {\n\n // delete actual report contents and put on a loading gif\n $('#map-div').hide();\n $('#report-div').empty().hide();\n $('.nvtooltip').remove();\n svg.selectAll('*').remove();\n svg.style('display', 'none');\n\n // TODO: loading gif, a nice one\n}", "title": "" }, { "docid": "b62fb16580544118a7c3a5b819002ff7", "score": "0.48865318", "text": "function xformMermaids() {\n while (true) {\n var mermaids = document.getElementsByClassName('prism language-mermaid');\n if (mermaids.length == 0) return;\n var i = 0;\n // skip anything that's already been rendered.\n for (i = 0;\n (i < mermaids.length) && (mermaids[i].getAttribute(\"rendered\") != null); i++);\n if (i == mermaids.length) return;\n\n var mm = mermaids[i];\n mm.setAttribute(\"rendered\", true);\n var text = mm.firstChild.data;\n // console.log(text);\n mermaid.render('mer' + mermaidCount, text, function(svgGraph) {\n mm.parentNode.outerHTML = \"<div>\" + svgGraph + \"</div>\";\n });\n\n mermaidCount += 1;\n }\n}", "title": "" }, { "docid": "bb13c3249af910a7a4a1267431b53fd9", "score": "0.48856884", "text": "function makecncsvgexport()\n{\n var c,d,x,y,x0,y0,pts,txt=\"\";\n getdefaults();\n var sfx=cutterwidth/(xmax-xmin);\n var sfy=cutterheight/(ymax-ymin);\n switch(originpos)\n {\n case 0: originx=0; originy=0; break; // Bottom left\n case 1: originx=0; originy=cutterheight; break; // Top left\n case 2: originx=cutterwidth; originy=0; break; // Bottom right\n case 3: originx=cutterwidth; originy=cutterheight; break; // Top right\n case 4: originx=cutterwidth/2; originy=cutterheight/2; break; // Middle\n }\n txt+='<?xml version=\"1.0\" encoding=\"utf-8\"?>\\r\\n';\n txt+='<svg id=\"gcodercncsvg\" width=\"'+cutterwidth+'px\" height=\"'+cutterheight+'px\" style=\"background-color:#FFFFFF\" version=\"1.1\" ';\n txt+='xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns=\"http://www.w3.org/2000/svg\" ';\n txt+=makedefaultsparams()+' ';\n txt+='>\\r\\n';\n for(c=0;c<commands.length;c++)\n {\n if(commands[c][0]==='L')\n {\n pts=commands[c][1];\n pts=scaletoolpath(pts,sfx,sfy,cutterheight);\n pts=simplifytoolpath(pts,arcdist);\n txt+=' <path id=\"'+commands[c][12]+'\" d=\"M ';\n for(d=0;d<pts.length;d++)\n {\n x=pts[d][0]-originx;\n y=(cutterheight-pts[d][1])-originy;\n if(d===0)\n {\n x0=x;\n y0=y;\n }\n if(d===pts.length-1 && commands[c][11]===1) txt+=\"Z\";\n else txt+=x.toFixed(3)+\",\"+y.toFixed(3)+\" \";\n }\n txt+='\" opacity=\"1\" stroke=\"#000000\" stroke-opacity=\"1\" stroke-width=\"1\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-dasharray=\"none\" fill-opacity=\"0\" ';\n txt+=makepathparams(c)+' ';\n txt+='/>\\r\\n';\n }\n }\n txt+='</svg>\\r\\n';\n return txt;\n}", "title": "" }, { "docid": "f067f6cf630e2313f11a78440ae98520", "score": "0.48829848", "text": "function cleanElems() {\n if (afterInit) {\n delete mStyle.style;\n delete mStyle.modElem;\n }\n }", "title": "" }, { "docid": "720c09e8e537e513d29c237390954cf1", "score": "0.48824126", "text": "function CleanMap() {\n\tRemoveMarkers();\n\tRemovePolylines();\n}", "title": "" }, { "docid": "5b409ff9f8211778a5beddcf41498d86", "score": "0.48803017", "text": "function removeVisualizations() {\n _removeSpellingVisualization();\n _removeGrammarVisualization();\n }", "title": "" }, { "docid": "01fb37b2e87c36addf465b32e9334624", "score": "0.4878524", "text": "function replaceSVGs(_this, counter) {\n var imgType;\n var counter = counter;\n\n var newURL;\n\n // get dimensions of current svg\n var width = Math.floor(_this.outerWidth());\n var height = Math.floor(_this.outerHeight());\n var backgroundSize = 'cover';\n\n // If the dimensions are 0 x 0 do nothing\n if ( (width >= 1) && (height >= 1) ) {\n\n // Set up dimensions of current element as strings to be used for css rules later\n var widthString = 'width: ' + width + 'px !important; ';\n var heightString = 'height: ' + height + 'px !important; ';\n // console.log('widthString: ', widthString, 'heightString: ', heightString);\n\n // Check if the element is very wide or very tall. if it is, set new dimensions as needed so we can add a tiled background image\n var isWideOrTall = isWideOrTallRectangle(width, height, _this);\n // console.log('isWideOrTall: ', isWideOrTall);\n\n if (isWideOrTall.wideOrTall === \"wide\") {\n width = isWideOrTall.newWidth;\n backgroundSize = isWideOrTall.newBackgroundSize;\n } else if (isWideOrTall.wideOrTall === \"tall\") {\n height = isWideOrTall.newHeight;\n backgroundSize = isWideOrTall.newBackgroundSize;\n }\n\n // Cycle through the different placecage options\n counter++;\n result = imgCounter(counter);\n imgType = result.imgType;\n counter = result.counter;\n\n // Need to use cssText to use !important\n newUrl = \"background-image: url(\" + settings.placeholderSite + imgType + width + \"/\" + height + \") !important\";\n\n // combine image url with height and width rules to use in cssText\n var cssTextVar = widthString + heightString + newUrl;\n _this.css({\n 'cssText' : cssTextVar,\n 'background-size' : backgroundSize,\n 'background-repeat': 'repeat',\n 'background-position' : 'center center'\n });\n\n // add classes to see it was changed\n _this.addClass('cagified cagified--svg');\n\n // clear svg in case it contains anything\n _this.empty();\n }\n\n return counter;\n }", "title": "" }, { "docid": "7e3b704c92114a74367460b57a173fbc", "score": "0.48757562", "text": "function changeMrSvgPathColorDynamically(data) {\n let detectorsInTooltip = data.detectors;\n let mrPath = d3.selectAll(\".path\");\n for (let i = 0; i < mrPath._groups[0].length; i++) {\n let mrPathSvg = mrPath._groups[0][i];\n for (let k = 0; k < detectorsInTooltip.length; k++) {\n if (detectorsInTooltip[k] == mrPathSvg.id) {\n d3.select(mrPathSvg).attr(\"styleClass\", \"pulse\");\n break;\n } else {\n d3.select(mrPathSvg).attr(\"styleClass\", null);\n }\n }\n }\n}", "title": "" }, { "docid": "13b4f8ce47c45881dd2dea9de9600d05", "score": "0.4871837", "text": "function setupSVG(svg, width, height) {\n //Remove children of svg to eventually tiles from the previous image\n svg.innerHTML = '';\n\n //Give to svg the same size as the image\n svg.setAttribute('viewBox', '0 0 '+width+' '+height);\n svg.setAttribute('width', '100%');\n svg.setAttribute('height', '100%');\n}", "title": "" }, { "docid": "fb2e63d77a73aae8d09d78c8381723be", "score": "0.4871339", "text": "function saveSVG() {\n var doctype = '<?xml version=\"1.0\" standalone=\"no\"?>'\n + '<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">';\n var serializer = new XMLSerializer();\n d3.select(\".graphinfo\").style(\"visibility\", \"hidden\")\n var source = serializer.serializeToString(d3.select(\"svg\").node());\n d3.select(\".graphinfo\").style(\"visibility\", \"visible\")\n var blob = new Blob([doctype + source], { type: \"image/svg+xml\" });\n saveAs(blob, getFilenameWithoutExtension(curFilename) + \".svg\");\n}", "title": "" }, { "docid": "2732839a78b5697c60fe1438d9d3a0a5", "score": "0.4869778", "text": "function cleargraphs(){\n d3.selectAll(\".graph\").selectAll(\"*\").remove();\n // $(\"#graphparam1\").text(\"\");\n $(\"#graphparam2\").text(\"\");\n}", "title": "" }, { "docid": "f67fe8a3ea85fb1f4e68c0695c6aa9ca", "score": "0.48571876", "text": "function get_svg()\n {\n var svg = document.getElementById('SVGobject');\n if( svg.contentDocument != null )\n { \n svg = svg.contentDocument.getElementsByTagName('svg');\n\n\t\t // Get viewbox here and check for undefined to fix IE from failing...\n\t\t var viewbox = $(svg).attr(\"viewBox\");\n if( svg != null && viewbox !== undefined )\n {\n clearInterval(get_svg_id);\n svg_elm = svg;\n viewbox = viewbox.split(/ /);\n fullwidth = parseInt(viewbox[2]);\n ratio = parseInt(viewbox[3]) / fullwidth;\n\t fitwidth = $(elm).width();\n chart_resize(fitwidth);\n $(elm).removeClass(\"noshow\"); //Makes chart show on page\n\t\t\t $(\"a.showline\").css(\"display\", \"inline\");;\n return;\n } \n }\n }", "title": "" }, { "docid": "e45d6f2bfc0f0ad5e7a2489d2a9556ef", "score": "0.48479575", "text": "renderSvg(svg) {\n return svg.replace(/\"/g, \"'\");\n }", "title": "" }, { "docid": "030b0c17b5db17274cb26566bc58a61d", "score": "0.48468947", "text": "function dashboard_clear() {\n d3.select(\"#dashboard\").selectAll(\"svg\").remove();\n}", "title": "" }, { "docid": "b71f7ed598a05f213c4b93f98b1574df", "score": "0.48462605", "text": "function remove_start_point(x, y) {\n\tsvg.select('#'+'p'+x+'black'+y).remove();\n}", "title": "" }, { "docid": "44072059a4102881219324b323d9d4cb", "score": "0.48455447", "text": "cleanSkeletonContainer() {\n const skeletonWrap = document.body.querySelector('#nozomi-skeleton-html-style-container');\n if (skeletonWrap) {\n removeElement(skeletonWrap);\n }\n }", "title": "" }, { "docid": "8233ec817b792c96dc1099a960e45568", "score": "0.48422953", "text": "function compress_nodes(readings) {\n //add text of other readings to 1st reading\n\n var first = get_ellipse(readings[0]);\n var first_title = first.parent().find('text')[0];\n var last_edges = edges_of(get_ellipse(readings[readings.length - 1]));\n for (var i = 0; i < last_edges.length; i++) {\n if (last_edges[i].is_incoming == false) {\n var last = last_edges[i];\n }\n }\n\n var total = parseInt(first[0].getAttribute('cx'), 10);\n\n for (var i = 1; i < readings.length; i++) {\n var cur = get_ellipse(readings[i]);\n var cur_title = cur.parent().find('text')[0];\n\n first_title.textContent += \" \" + cur_title.textContent;\n total += parseInt(cur[0].getAttribute('cx'), 10);\n };\n\n var avg = Math.round(total / readings.length);\n\n // Reattach last external edge to new to-be-merged node: NB: We\n // can't to this after the removal as startpoint wants the cx etc\n // of the ellipse the edge is moving from..\n // last.attach_startpoint(readings[0]);\n\n\n // do this once:\n var x = parseInt(first[0].getAttribute('cx'), 10);\n first[0].setAttribute('rx', 4.5 * first_title.textContent.length);\n\n if (text_direction !== \"BI\") {\n first[0].setAttribute('cx', avg);\n first_title.setAttribute('x', first[0].getAttribute('cx'));\n }\n\n //merge then delete all others\n for (var i = 1; i < readings.length; i++) {\n var node = get_ellipse(readings[i]);\n var rid = readings[i - 1] + '->' + readings[i];\n\n var titles = svg_root.getElementsByTagName('title');\n var titlesArray = [].slice.call(titles);\n\n // old edge, delete after moving stuff around!\n if (titlesArray.length > 0) {\n var title = titlesArray.find(function(elem) {\n return elem.textContent === rid;\n });\n }\n\n // only merge start on the last one, else, we get ourselves confused!\n if (readings[i] == readings[readings.length - 1]) {\n merge_node(rid2node[readings[i]], rid2node[readings[0]], true);\n } else {\n merge_left(rid2node[readings[i]], rid2node[readings[0]]);\n }\n\n if (title && title.parentNode) {\n title.parentNode.remove();\n }\n }\n\n /* Fix size of arrows to node for LR/RL texts. */\n if (text_direction !== \"BI\") {\n /* This is the remaining node; find the incoming edge, which is now the\n * wrong size */\n var first_edge;\n var first_edges = edges_of(first);\n\n for (var i = 0; i < first_edges.length; i++) {\n if (first_edges[i].is_incoming == true) {\n first_edge = first_edges[i];\n break;\n }\n }\n\n if (first_edge) {\n //arrow\n var polygon = first_edge.g_elem.children('polygon');\n\n if (polygon.size() > 0) {\n //the line\n var edge_elem = first_edge.g_elem.children('path')[0];\n\n var d = edge_elem.getAttribute('d');\n //https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n //This 'Curveto' property determines how long the line is.\n //The Syntax is C c1x,c1y c2x,c2y x,y where x,y are where the\n //path ends.\n var c_attr = d.match(/C\\s?(\\S+) (\\S+) (\\S+)/);\n\n var c_x = parseInt(first[0].getAttribute('cx'), 10);\n var r_x = parseInt(first[0].getAttribute('rx'), 10);\n\n var x;\n if (text_direction === 'LR') {\n //line ends to the left of the ellipse,\n //so its center minus its radius\n x = c_x - r_x;\n } else if (text_direction === 'RL') {\n //line ends to the right of the ellipse,\n //so its center plus its radius\n x = c_x + r_x;\n }\n\n if (c_attr.length >= 4) {\n var full = c_attr.shift();\n\n var end_point = c_attr[2].split(',');\n var end_x = parseInt(end_point[0]);\n var end_y = parseInt(end_point[1]);\n //how much do we need to move the arrow by?\n //this is the same amount we'll be moving its line\n var dx = x - end_x;\n\n //build the new 'C' property. We only changed 'x' here\n var new_cattr = \"C\" + c_attr[0] + \" \" + c_attr[1] + \" \" + x + \",\" + end_y;\n edge_elem.setAttribute('d', d.replace(full, new_cattr));\n\n //and moe the arrow\n var end_point_arrowhead = new svgshape(polygon);\n end_point_arrowhead.reposition(dx, 0);\n }\n }\n }\n }\n\n get_node_obj(readings[0]).update_elements();\n}", "title": "" }, { "docid": "b28e4ec14d5ef63390a7e195f1f01664", "score": "0.48408565", "text": "function createSVG() {\n svg = d3.select(\"#bubble-chart\")\n .append(\"svg\")\n .attr(\"width\", width)\n .attr(\"height\", height);\n }", "title": "" }, { "docid": "da89857fc50ff1f0c0948a2586da5e8c", "score": "0.48382977", "text": "function graphRemove() {\r\n svg.selectAll(\"*\").remove();\r\n d3nodes = [];\r\n d3links = [];\r\n}", "title": "" }, { "docid": "1314ebc30d2e40232305ccd354701fd3", "score": "0.48345703", "text": "function LMplot(xml,imagename) {\n // Display image:\n $('body').append('<svg id=\"canvas\" width=\"2560\" height=\"1920\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><image id=\"img\" xlink:href=\"' + imagename + '\" x=\"0\" y=\"0\" height=\"1920\" width=\"2560\" /></svg>');\n\n // Display polygons:\n var N = $(xml).children(\"annotation\").children(\"object\").length;\n for(var i = 0; i < N; i++) {\n var obj = $(xml).children(\"annotation\").children(\"object\").eq(i);\n if(!parseInt(obj.children(\"deleted\").text())) {\n // Get object name:\n var name = obj.children(\"name\").text();\n\n // Get points:\n var X = Array();\n var Y = Array();\n if (obj.children(\"polygon\") != null){\n for(var j = 0; j < obj.children(\"polygon\").children(\"pt\").length; j++) {\n X.push(parseInt(obj.children(\"polygon\").children(\"pt\").eq(j).children(\"x\").text()));\n Y.push(parseInt(obj.children(\"polygon\").children(\"pt\").eq(j).children(\"y\").text()));\n }\n }\n else {\n X.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"xmin\").text()));\n X.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"xmax\").text()));\n X.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"xmax\").text()));\n X.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"xmin\").text()));\n Y.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"ymin\").text()));\n Y.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"ymin\").text()));\n Y.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"ymax\").text()));\n Y.push(parseInt(obj.children(\"segm\").children(\"box\").children(\"ymax\").text()));\n }\n // Draw polygon:\n var attr = 'fill=\"none\" stroke=\"' + HashObjectColor(name) + '\" stroke-width=\"4\"';\n var scale = 1;\n DrawPolygon('myCanvas_bg',X,Y,name,attr,scale);\n }\n }\n \n return 'canvas';\n }", "title": "" }, { "docid": "086e07f58df93aded532f35f62c7a8b5", "score": "0.48283288", "text": "function saveSVG(){\n\tsvg = \"<svg>\\n\\t\" + main.innerHTML + \"\\n</svg>\";\n\tvar link = document.createElement('a');\n\tmimeType = 'image/svg+xml' || 'text/plain';\n\tvar today = new Date();\n\tvar date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate() + '_' + today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n\tvar base = document.getElementsByName('base')[0].value;\n\tvar armWidth = document.getElementsByName('armWidth')[0].value;\n\tvar vertexExtrusion = document.getElementsByName('vertexExtrusion')[0].value;\n\tvar vertexDiameter = document.getElementsByName('vertexDiameter')[0].value;\n\tvar sideRadius = document.getElementsByName('sideRadius')[0].value;\n\tvar filename = 'Triangle_' + date + '_Base' + base + '_ArmWidth' + armWidth + \n\t\t'_VertexExtrusion' + vertexExtrusion + '_VertexDiameter' + vertexDiameter +\n\t\t'_SideRadius' + sideRadius + '.svg';\n\tlink.setAttribute('download', filename);\n\tlink.setAttribute('href', 'data:image/svg+xml; charset=utf-8,' + encodeURIComponent(svg));\n\tdocument.body.append(link);\n\tlink.click();\n\tdocument.body.removeChild(link);\n\tconsole.log(link);\n}", "title": "" }, { "docid": "ca21129d95d90fe986394a438f4eb44d", "score": "0.4826084", "text": "function refreshSVG(id) {\n\tvar elem = $(\"#\"+id);\n\t$(\"#\"+id).html(elem.html());\n}", "title": "" }, { "docid": "1f1f83191950bbf14d00300edf5c839e", "score": "0.48199674", "text": "function asy_postcompact(geogebra){\r\n return geogebra\r\n .replace(/\\/\\*(.*?)\\*\\//g, \"\")\r\n .replace(/;( *)?\\n([a-z])/g, \"; $2\")\r\n .replace(/labelscalefactor/g, \"lsf\")\r\n .replace(/dotstyle/g, \"ds\")\r\n .replace(/\\n( *)?(\\n( *)?)*/g, \"\\n\");\r\n}", "title": "" }, { "docid": "8b829b7fd44b5046f664ab26b2a0e168", "score": "0.48168233", "text": "function recoverDiagram(){\n let i;\n let wires = document.getElementsByClassName('wire');\n for(i = 0; i < wires.length; i++){\n wires[i].setAttribute('opacity','1');\n }\n let texts = document.getElementsByClassName('textOnWire');\n for(i = 0; i < texts.length; i++){\n texts[i].setAttribute('opacity','1');\n }\n let circles = document.getElementsByTagName('circle');\n for(i = 0; i < circles.length; i++){\n if(!$(circles[i]).hasClass('dataCircle')){\n circles[i].setAttribute('opacity','1');\n }\n }\n let uses = document.getElementsByTagName('use');\n for(i = 0; i < uses.length; i++){\n if(!$(uses[i]).hasClass('transparent')){\n uses[i].setAttribute('opacity','1');\n }\n }\n $('#instructionTable').css('opacity', '1');\n $('#registerTable').css('opacity', '1');\n $('#memoryTable').css('opacity', '1')\n}", "title": "" }, { "docid": "75fbd5284bcdb39f209a68fa99c4c55b", "score": "0.48133206", "text": "generateStyleDefs(svgDomElement) {\n let styleDefs = \"\";\n let sheets = document.styleSheets;\n for (let i = 0; i < sheets.length; i++) {\n if(sheets[i].href !== \"https://fonts.googleapis.com/css?family=Roboto\"){\n let rules = sheets[i].cssRules;\n for (let j = 0; j < rules.length; j++) {\n let rule = rules[j];\n if (rule.style) {\n let selectorText = rule.selectorText;\n let elems = svgDomElement.querySelectorAll(selectorText);\n if (elems.length) {\n styleDefs += selectorText + \" { \" + rule.style.cssText + \" }\\n\";\n }\n }\n }\n }\n }\n let s = document.createElement('style');\n s.setAttribute('type', 'text/css');\n s.innerHTML = styleDefs;\n let defs = document.createElement('defs');\n defs.appendChild(s);\n svgDomElement.insertBefore(defs, svgDomElement.firstChild);\n return svgDomElement;\n }", "title": "" }, { "docid": "cbf4bb2d78d791495e9d83f9405e35f4", "score": "0.48123038", "text": "handleDeleteSVG(event){\n\t\t// using split() here because event.target.className gives you all classes associated with an element as a long string.\n\t\t// Delete this specific shape by sending its index to the masterReducer for deletion\n\t\t// this.props.removeSVG(event.target.value, this.props.masterSVGArray[event.target.className.split(\" \")[2].indexInChildArray]);\n\t\tthis.props.removeFromMaster(event.target.className.split(\" \")[2]);\n\t\tconsole.log(event.target.className.split(\" \")[2]);\n\t}", "title": "" } ]
32d79232cfa815bc948e769c0413687a
all of the json documents that come out of the map
[ { "docid": "4642e5a9c5e9aee48838ce21cec0be3d", "score": "0.0", "text": "function emit(key, value){\n\tvar pair = {\"key\":key,\"value\":value}\n\tglobalEmit.push(pair)\n\t//console.log(pair)\n}", "title": "" } ]
[ { "docid": "67568f7941412d159a9fbc1032ea60ce", "score": "0.6698912", "text": "function theJSONs() {\n start({headers: headers});\n return toJSON({\n \"@context\": \"http://www.w3.org/ns/anno.jsonld\",\n \"@id\": \"http://example.org/annotations/\",\n \"@type\": \"BasicContainer\",\n \"label\": \"A Container for Open Annotations\",\n \"contains\": ids\n });\n }", "title": "" }, { "docid": "fe0e68a6ea787473329845a2bfc3e62d", "score": "0.60991824", "text": "get documents() {\n return Object.values( this._collections )\n .reduce( ( ds, c ) => {\n if( c.outputable ) {\n ds = ds.concat( c.documents );\n }\n return ds;\n }, []);\n }", "title": "" }, { "docid": "4c7bf27c33292e0d5424601cfb296947", "score": "0.5761782", "text": "get allDocuments() {\n return Object.values( this._collections )\n .reduce( ( ds, c ) => ds.concat( c.documents ), [] );\n }", "title": "" }, { "docid": "142a282ed1466c7d8ee0718a228cad7e", "score": "0.5749796", "text": "function json_collection(data_for) {\n\n for (value in data_for) {\n\n if (typeof data_for[value] == \"object\") {\n json_show(data_for[value]);\n } else {\n total_data[value] = data_for[value];\n }\n\n }\n return total_data;\n\n}", "title": "" }, { "docid": "4cfa2bfcade4e3c6bd693e3277915454", "score": "0.57292813", "text": "entries() {\n return this.#map.entries();\n }", "title": "" }, { "docid": "e70cc1d75c44f82e854e5ae2485910da", "score": "0.5689599", "text": "function get_docs(data){\n aFeatures.forEach((item, i) => {\n let obj = data.find(function (o) {\n return o[0] === \"\" + item.properties.docID + \"\";\n });\n pathway_ids.push(obj[1]);\n });\n\n // Setting these values makes sure the right type of results come-back i.e. not GeoJSON.\n app_v.location_view_props.render_map = 0;\n app_v.location_view_props.study_country = \"no_country\";\n // Get the results\n app_f.get_dataset_results(pathway_ids, 1, 1, app_v.heatmap_props, app_v.location_view_props, app_v.text_search);\n // Show the correct bit of interface\n $('.searchResult').show(\"slide\", \"swing\", { direction: \"left\" }, 1000);\n $('.doc_view').show(\"slow\", function(e){\n $('.doc_view_in').fadeIn(\"200\");\n });\n\n }", "title": "" }, { "docid": "a823751e22d7bc528adea394d19e3a62", "score": "0.5687134", "text": "renderGeojsons() {\n const vectors = this.state.vectors; // has all the vector data by name\n const vectorsOnMap = this.state.vectorsOnMap;\n let vectorsToRender = [];\n\n Object.keys(vectors).forEach( vectorName => {\n if (vectorsOnMap.includes(vectorName)) {\n vectorsToRender.push(vectors[vectorName]);\n }\n });\n\n return vectorsToRender;\n }", "title": "" }, { "docid": "13b85063fd5c975d8a824bbd3ddedbcd", "score": "0.5633054", "text": "function getCollectionData(collection) {\n return collection.docs.map(getDocData);\n}", "title": "" }, { "docid": "d9fa36ed214ae2e2cc4254722560c05f", "score": "0.55879813", "text": "function allDataSets() {\n var uri = \"/info\"; \n \n return request.jsonWhen(uri);\n}", "title": "" }, { "docid": "a973ce59d7e5827763520242d056fff1", "score": "0.5579741", "text": "function all(){\n return data;\n }", "title": "" }, { "docid": "a973ce59d7e5827763520242d056fff1", "score": "0.5579741", "text": "function all(){\n return data;\n }", "title": "" }, { "docid": "0e09c04c83673f3c6b239641896f17de", "score": "0.5555796", "text": "get mapJSON () {\n\t\treturn this.map\n\t}", "title": "" }, { "docid": "04b18348ff44b88e6e1d2d35f8202efd", "score": "0.5511512", "text": "async all() {\n const resp = await fetch(this.annotationPageId);\n const annos = await resp.json();\n return this.createAnnotationPage(annos);\n }", "title": "" }, { "docid": "e80f8c56ba0c164919095f89001ddf0d", "score": "0.5502375", "text": "async all(collection) {\r\n let results = {};\r\n const querySnapshot = await this.api\r\n .collection(collection)\r\n .get();\r\n querySnapshot.forEach(doc => {\r\n results[doc.id] = doc.data();\r\n });\r\n return results;\r\n }", "title": "" }, { "docid": "d6b48f1d0a205e604e38b171e6a5632a", "score": "0.5467682", "text": "function mapEntries(json){\r\n\r\n var dataframe = new Array();\r\n \r\n var row = new Array();\r\n for (var i=0; i < json.feed.entry.length; i++) {\r\n\r\n var entry = json.feed.entry[i];\r\n if (entry.gs$cell.col == '1') {\r\n if (row.length > 0) {\r\n dataframe.push(row);\r\n }\r\n\r\n var row = new Array();\r\n }\r\n row.push(entry.content.$t);\r\n } \r\n dataframe.push(row);\r\n \r\n dataLoaded(dataframe);\r\n}", "title": "" }, { "docid": "5d0a30272006fdd766aef9aeb2f120f5", "score": "0.54575837", "text": "function getDocLocations(data){\n //bounds object needed to fit all markers in map zoomed view\n var bounds = new google.maps.LatLngBounds();\n //loop through each doctor in data object\n for (var i = 0; i < data.data.length; i++) {\n //loop through each practice for a particular doctor\n for (var j = 0; j < data.data[i].practices.length; j++) {\n //add marker to map\n var marker = new google.maps.Marker({\n position: {\n lat: data.data[i].practices[j].lat,\n lng: data.data[i].practices[j].lon\n },\n map: map,\n title: data.data[i].uid\n });\n marker.addListener('click', function(){\n $('.doc-card').css('border', '1px solid black');\n $('.expanded-description').hide();\n $('#results').find('#' + this.title).css('border', '1px solid red');\n $('#results').find('#' + this.title + ' .expanded-description').show();\n });\n bounds.extend(marker.getPosition());\n }\n }\n map.fitBounds(bounds);\n }", "title": "" }, { "docid": "f6df325df97ccd26c283fd06b6f224da", "score": "0.5453509", "text": "async getMapContents(limit, offset) {\n const geoJSON = this.getClusterGeometry();\n const zoom = this.getZoom();\n const postData = {\n \"output_srid\": this.srid,\n \"geometry_type\": (0, $aca83a355307fe8a$export$8f4397a63c3cef66).area,\n \"geojson\": geoJSON,\n \"clear_cache\": false,\n \"filters\": this.filters,\n \"limit\": limit,\n \"offset\": offset\n };\n const data = this.anycluster.getAreaContent(zoom, postData);\n return data;\n }", "title": "" }, { "docid": "f6df325df97ccd26c283fd06b6f224da", "score": "0.5453509", "text": "async getMapContents(limit, offset) {\n const geoJSON = this.getClusterGeometry();\n const zoom = this.getZoom();\n const postData = {\n \"output_srid\": this.srid,\n \"geometry_type\": (0, $aca83a355307fe8a$export$8f4397a63c3cef66).area,\n \"geojson\": geoJSON,\n \"clear_cache\": false,\n \"filters\": this.filters,\n \"limit\": limit,\n \"offset\": offset\n };\n const data = this.anycluster.getAreaContent(zoom, postData);\n return data;\n }", "title": "" }, { "docid": "1f33515dd892249f463bcff56b46d1ad", "score": "0.54406995", "text": "function allDocsInner(metadata, data) {\n if (PouchUtils.isLocalId(metadata.id)) {\n return cursor['continue']();\n }\n var doc = {\n id: metadata.id,\n key: metadata.id,\n value: {\n rev: PouchMerge.winningRev(metadata)\n }\n };\n if (opts.include_docs) {\n doc.doc = data;\n doc.doc._rev = PouchMerge.winningRev(metadata);\n if (doc.doc._doc_id_rev) {\n delete(doc.doc._doc_id_rev);\n }\n if (opts.conflicts) {\n doc.doc._conflicts = PouchMerge.collectConflicts(metadata);\n }\n for (var att in doc.doc._attachments) {\n doc.doc._attachments[att].stub = true;\n }\n }\n if ('keys' in opts) {\n if (opts.keys.indexOf(metadata.id) > -1) {\n if (PouchUtils.isDeleted(metadata)) {\n doc.value.deleted = true;\n doc.doc = null;\n }\n resultsMap[doc.id] = doc;\n }\n } else {\n if (!PouchUtils.isDeleted(metadata)) {\n results.push(doc);\n }\n }\n cursor['continue']();\n }", "title": "" }, { "docid": "c21c89ff1cdb71c85cca68082a6f91bf", "score": "0.5422262", "text": "processingComplete({ doclets }) {\n const docs = taffy(doclets)()\n .get()\n .filter((doc) => {\n return !doc.undocumented;\n });\n console.log(docs);\n handleDocsData(docs);\n }", "title": "" }, { "docid": "c7c70d6f515975acfd9af43a95a92a40", "score": "0.5397758", "text": "function traversJSON() {\n try {\n return ajaxService.getCategories().then(function (data) {\n hashMap = data;\n return hashMap;\n });\n } catch (error) {\n throw error;\n }\n }", "title": "" }, { "docid": "4575ce56b31009adf13cb8e76aec0b32", "score": "0.53838134", "text": "extract() {\n const result = [];\n this.templates.forEach((template) => {\n const templateResult = new Map();\n const templateName = template.name;\n const templateBodies = this.visit(template.templateBodyParseTree);\n let isNormalTemplate = true;\n templateBodies.forEach((templateBody) => (isNormalTemplate = isNormalTemplate && templateBody === undefined));\n if (isNormalTemplate) {\n const templates = [];\n for (const templateBody of templateBodies) {\n templates.push(templateBody[0]);\n }\n templateResult.set(templateName, templates);\n }\n else {\n templateResult.set(templateName, templateBodies);\n }\n result.push(templateResult);\n });\n return result;\n }", "title": "" }, { "docid": "2b9c410a7337c1869a1bb5178a278693", "score": "0.5371126", "text": "function loadAll() {\n var Notes = [\n {\n 'name' : 'Jane Doe',\n 'mrn' : '123456',\n }\n ];\n \n \n }", "title": "" }, { "docid": "200ccaf233a888101f174424a66a3ea1", "score": "0.5367244", "text": "generateFlatExerciseList(){\n console.log(\"...generating full list of exercises...\")\n \n let result =[ ] //list of all exercises in exercises.js\n \n for(let bodypart in this.responses) {\n let list = this.responses[bodypart].exercises\n \n list.forEach(item=>result.push(item))\n }\n \n return result;\n }", "title": "" }, { "docid": "f2441d9dca679d70175a1878e8d914f9", "score": "0.5346146", "text": "_getMetadataObjectsBySourceNames(map) {\n // eslint-disable-next-line lint/strictly-null\n if (map.mappings === undefined) {\n const indexMap = map;\n return Object.assign.apply(\n Object,\n [{}].concat(\n _toConsumableArray(\n indexMap.sections.map(section =>\n this._getMetadataObjectsBySourceNames(section.map)\n )\n )\n )\n );\n }\n\n if (\"x_facebook_sources\" in map) {\n const basicMap = map;\n return (basicMap.x_facebook_sources || []).reduce(\n (acc, metadata, index) => {\n let source = basicMap.sources[index];\n\n if (source != null) {\n source = this._normalizeSource(source, basicMap);\n acc[source] = metadata;\n }\n\n return acc;\n },\n {}\n );\n }\n\n return {};\n }", "title": "" }, { "docid": "bbd8ca7f24aaaf43696a7aeecc890ed3", "score": "0.53446186", "text": "listDocuments() {\n return new Promise((resolve) => {\n let documentEntries = []\n forEach(this.documents, (html, documentId) => {\n let manifest = _getManifest(documentId)\n let entry = Object.assign({}, manifest, {id: documentId})\n documentEntries.push(entry)\n })\n resolve(documentEntries)\n })\n }", "title": "" }, { "docid": "4b91d70442efa88ceea3e4b7e4aee71c", "score": "0.53429955", "text": "function mapData(data) {\n return _.map(data, function(object) {\n return {\n title: object.title,\n description: object.description,\n price: object.price,\n images: {\n full: object.MainImage.url_fullxfull,\n small: object.MainImage.url_170x135\n }\n }\n })\n }", "title": "" }, { "docid": "b5c375f5b0dce7730ae48952865ebfc2", "score": "0.53412735", "text": "function generarJsonLDIndex() {\n let info = {\n \"@context\": \"http://schema.org/\",\n \"@type\": \"WebApplication\",\n \"applicationCategory\": \"Restaurantes Vegetarianos Mallorca, Supermercados Vegetarianos Mallorca, Información Vegetarianos Mallorca\",\n \"applicationSubCategory\": \"Cursos, Ferias\",\n \"about\": \"Información vegetariana Mallorca\",\n \"name\": \"Veggie Mallorca\",\n \"description\": \"MENJAR BÉ TOTS ELS DIES ÉS MÉS SENZILL DEL QUE ET PENSES. Descobreix les meravelles que ofereix el món vegetarià: troba aquí tota la inspiració necessària i troba una nova forma de cuidar-te.\",\n \"audience\": {\n \"@type\": \"Audience\",\n \"audienceType\": \"familia, turistas, locales, grupos, amigos\",\n \"geographicArea\": \"Mallorca\"\n },\n \"author\": [\n {\n \"@type\": \"Person\",\n \"givenName\": \"Aisha\",\n \"familyName\": \"Gandarova\",\n \"gender\": \"Female\",\n },\n {\n \"@type\": \"Person\",\n \"givenName\": \"Maria\",\n \"familyName\": \"Orell\",\n \"gender\": \"Female\",\n }\n ],\n \"contentLocation\":\n {\n \"address\": \"Mallorca, Islas Baleares, Spain\",\n \"geo\":\n {\n \"@type\": \"GeoCoordinates\",\n \"latitude\": \"39.69988587628037\",\n \"longitude\": \"3.016459872869967\"\n }\n },\n\n \"genre\": \"Restaurants Vegetarians Mallorca, Supermercats Vegetarians Mallorca\",\n \"operatingSystem\": \"Windows, MacOS, iOS, Android, Linux\",\n \"video\":\n {\n \"@type\": \"VideoObject\",\n \"name\": \"Vídeo Cocina\",\n \"description\": \"Video de cocina vegetariana Mallorca\",\n \"contentUrl\": [\"assets/img/fotosIndex/videoPortada.mp4\", \"assets/img/fotosIndex/videoPortada.webm\"],\n \"uploadDate\": \"2021-05-15\",\n \"thumbnailUrl\": [\"assets/img/fotosIndex/videoPortada.mp4\", \"assets/img/fotosIndex/videoPortada.webm\"],\n }\n }\n return info;\n}", "title": "" }, { "docid": "7f9a52d16df253fe016abf0d532bede9", "score": "0.5337917", "text": "function getData() {\n Jobs.find(function(err, docs) {\n docs.forEach(function(item){\n console.log('Received a GET request for _id ' + item._id + ' job: ' + item.title);\n });\n console.log('items getData:');\n console.log(docs);\n alldocs = docs;\n return alldocs;\n\n })\n}", "title": "" }, { "docid": "ede1972d4b3b04f1f6cfe3ab2db34c6a", "score": "0.5318595", "text": "function getD3JSONCounting() {\n\t\n\tvar doc = '';\n\t$.ajax({\n\t\t type: 'GET',\n\t\t dataType: 'json',\n\t\t url: server + 'twittering_replica/_design/counting/_view/coordinates',\n\t\t success: function(result) {\n\t\t\t doc = result;\n\t\t },\n\t\t async: false\n\t});\n\t\n\tvar res = {\n\t\t\"extent\" : [150.821457,-34.026391,151.319962,-33.724244],\n\t\t\"features\" : []\n\t};\n\tfor (var i = 0; i < doc.total_rows; i++) {\n\t\tvar point = {\n\t\t\t\"geometry\": {\n\t\t\t\t\"type\" : \"point\",\n\t\t\t\t\"coordinates\" : [doc.rows[i].value[0],doc.rows[i].value[1]]\n\t\t\t}\n\t\t}\n\t\tres.features.push(point);\n\t}\n\treturn res;\n}", "title": "" }, { "docid": "09793fc710d6bed511a290c20fd262f7", "score": "0.53049123", "text": "readJson()\n\t{\n\t\tthis.readJsonFile(\"json/stations.json\", function(data){\n\t\t\tlet obj = JSON.parse(data);\n\t\t\tlet stations = obj.stations;\n\t\t\t\n\t\t\tlet arrayStations = Object.keys(stations).map(function(key) {\n\t\t\t return [Number(key), stations[key]];\n\t\t\t});\n\n\t\t\t//console.log(stations[\"Anchor\"]);\n\t\t\t\n\t\t\tfor(let i = 0; i < arrayStations.length; i++)\n\t\t\t{\n\t\t\t\tconsole.log(arrayStations[i][1]);\n\t\t\t}\n\t \t});\n\t}", "title": "" }, { "docid": "364037c608f8e13a41e6b04607fd6590", "score": "0.5303983", "text": "_getAllCustomMarkers (path) {\n let markers = this._documentMarkers[path] || []\n for (let surfaceId in this._surfaceMarkers) {\n if (!this._surfaceMarkers.hasOwnProperty(surfaceId)) continue\n let surfaceMarkers = this._surfaceMarkers[surfaceId][path]\n if (surfaceMarkers) markers = markers.concat(surfaceMarkers)\n }\n // TODO: support container markers\n return markers\n }", "title": "" }, { "docid": "8038c9e97539dd1078b15c9cb9ec4550", "score": "0.5303417", "text": "function map(patient) {\n\n var keys = Object.keys(patient.json); // For each patient (JSON)\n // ...find keys (an object)\n emit(\"Keys used: \" + keys, 1); // Emit keys, labeled \"Keys used:\"\n}", "title": "" }, { "docid": "17a0f1a21814f143b7a165686583678f", "score": "0.53011805", "text": "static async getAllObjectsInScene(){\n let objectID = RPM.game.hero.system.id; //Gets the hero's ID so that only camera view is considered.\n\n //Portions of the map based on the event's position.\n let globalPortion = SceneMap.getGlobalPortion(RPM.currentMap.allObjects[\n objectID]);\n \n let localPortion = RPM.currentMap.getLocalPortion(globalPortion);\n let mapPortion;\n \n let returningObj = null; //The object that is returned.\n if (RPM.currentMap.isInPortion(localPortion))\n {\n \n mapPortion = RPM.currentMap.getMapPortionByPortion(localPortion);\n let objects = mapPortion.objectsList;\n returningObj = objects;\n }\n return returningObj;\n }", "title": "" }, { "docid": "b4bf871b38444792d739f4ff8f202908", "score": "0.5294648", "text": "function getNewsFoundData() {\n newspaper.forEach(newspaper =>{\n const paperForm = { newspaper: newspaper };\n postFormWithResponse(\"../service/scraping-service/scraping-new-data-service.php\",\n paperForm, function(response){\n try {\n const newsFound = JSON.parse(response);\n newsFound.map(newsFound =>{\n newsFound.newspaper = newspaper;\n });\n dateFilter(newsFound);\n } catch (error) {\n console.error(error);\n }\n });\n });\n }", "title": "" }, { "docid": "ed440a9f321e9b0eebd2fd881b5397eb", "score": "0.5293522", "text": "function updateDijks() {\n var array = geojson.features;\n fullMap = new Object();\n for (var i = 0; i < array.length; i++) {\n var name = array[i].properties.locationName;\n fullMap[name] = {\n \"locationName\": array[i].properties.locationName,\n \"locationType\": array[i].properties.locationType,\n \"locationImageUrl\": array[i].properties.locationImageUrl,\n \"coordinates\": array[i].geometry.coordinates,\n \"faculty\": array[i].properties.faculty,\n \"rooms\": array[i].properties.rooms,\n \"edgeList\": array[i].properties.edgeList\n }\n }\n console.log(JSON.stringify(fullMap));\n}", "title": "" }, { "docid": "595c94a33b9280e8bb8b3f0feb5628d9", "score": "0.5292725", "text": "getAll () {\n\t\t// TODO: to be setup with pagination later\n\t}", "title": "" }, { "docid": "2ff8daba6cf5caf411106bfa216e6b69", "score": "0.52885157", "text": "function docData() {\n const allIds = new Set();\n Object.keys(versionFiles).forEach(version => {\n Object.keys(versionFiles[version]).forEach(id => {\n allIds.add(id);\n });\n });\n\n const metadatas = [];\n\n languages.filter(language => language.enabled).forEach(language => {\n versions.forEach(version => {\n allIds.forEach(id => {\n let useVersion;\n try {\n useVersion = docVersion(id, version);\n } catch (e) {\n console.log(e);\n process.exit(1);\n }\n if (!useVersion) {\n return;\n }\n const file = versionFiles[useVersion][id];\n\n metadatas.push(\n processVersionMetadata(file, version, useVersion, language.tag)\n );\n });\n });\n });\n\n return metadatas;\n}", "title": "" }, { "docid": "a2fc032cd1c00ef0874ec9892353a358", "score": "0.52793205", "text": "function renderAllToMap(data)\n{\n $.each(data.prototype, function(key, val) {\n var item = val.Adres + \", Gent\";\n // trace(\"Rendering: \" + item);\n\n });\n}", "title": "" }, { "docid": "d02678da23ab429054f067677f72a3ee", "score": "0.52747506", "text": "collect() {\n const promises = this.sources.map((src) => {\n return src.query();\n });\n\n return Promise.all(promises)\n .then((values) => {\n\n const dp = Object.assign.apply(this, values);\n dp.timestamp = new Date().getTime();\n\n return fse.readJson(this.dataFile)\n .then((obj) => {\n obj.push(dp)\n return fse.writeJson(this.dataFile, obj);\n })\n .catch((obj) => {\n return fse.writeJson(this.dataFile, [dp]);\n });\n });\n }", "title": "" }, { "docid": "8783a0cb8547163b582e1d02df252409", "score": "0.52739626", "text": "function addMappedDataToDocumentResults (mapping, results) {\n for (const d of results) {\n d._mapping = mapping[getDocumentId(d)] || {}\n }\n}", "title": "" }, { "docid": "c1419fe1a80e9e53d4eb32c39aeb58b2", "score": "0.5273216", "text": "mapData( datas ){\r\n\t\treturn datas.map(item => {\r\n\r\n\t\t\tset( item , 'search_text' , JSON.stringify(item).toLowerCase() );\r\n\t\t\tset( item , '_id' , GUID() );\r\n\t\t\tset( item , '_notify' , false );\r\n\t\t\tset( item , '_expand' , false );\r\n\t\t\tset( item , 'isExpand' , function(){\r\n\t\t\t\treturn get(this, '_expand') ? true : false;\r\n\t\t\t});\r\n\r\n\t\t\treturn item;\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "ccd9e8466f1a2e6186e2b61c3c3bb0e7", "score": "0.52715635", "text": "async function getDocs(req,res) {\n res.json([\n {id:1234,title:\"title1\",category:\"cat1\",path:\"http://www.example.com\"},\n {id:1234,title:\"title2\",category:\"cat2\",path:\"http://www.example.com\"},\n {id:1234,title:\"title3\",category:\"cat1\",path:\"http://www.example.com\"},\n {id:1234,title:\"title4\",category:\"cat3\",path:\"http://www.example.com\"}\n ])\n}", "title": "" }, { "docid": "b55c5da154a65333a188fb531a46e325", "score": "0.5258902", "text": "async getAll() {\n //open the file called this.filename\n //parse the contents\n //return the parsed data\n return JSON.parse(\n await fs.promises.readFile(this.filename, {\n encoding: 'utf8'\n })\n );\n }", "title": "" }, { "docid": "6c9d6459568aa563abff40c909651c0b", "score": "0.5254014", "text": "function docDataCallback(data){\n //build html for results section\n displayDocResults(data);\n //get doctor locations and add markers to map\n getDocLocations(data);\n\n }", "title": "" }, { "docid": "408bba6b18625e4bec954d358754293a", "score": "0.5249247", "text": "function view_map_location() {\n var results = [];\n var map_location = story['map'].filter(function (map) { return map.x == story['character']['x'] && map.y == story['character']['y'] && map.z == story['character']['z'] });\n if (map_location.length > 0) {\n var rec = {};\n rec['title'] = map_location[0]['name'].toUpperCase();\n rec['lines'] = [map_location[0]['description']];\n if ('items' in map_location[0] && map_location[0]['items'].length > 0) {\n for (var i = 0; i < map_location[0]['items'].length; i++) {\n rec['lines'].push('A <span class=\"game_item\">' + map_location[0]['items'][i].toLowerCase() + '</span> is here.');\n }\n }\n var enemies_in_room = story['enemies'].filter(function(enemies){return enemies.x == story['character']['x'] && enemies.y == story['character']['y'] && enemies.z == story['character']['z']});\n if (enemies_in_room.length > 0) {\n for (var i = 0; i < enemies_in_room.length; i++) {\n rec['lines'].push(toTitleCase(enemies_in_room[i]['name']) + ' is here.');\n }\n }\n var friendlies_in_room = story['friendlies'].filter(function(friendlies){return friendlies.x == story['character']['x'] && friendlies.y == story['character']['y'] && friendlies.z == story['character']['z']});\n if (friendlies_in_room.length > 0) {\n for (var i = 0; i < friendlies_in_room.length; i++) {\n rec['lines'].push(toTitleCase(friendlies_in_room[i]['name']) + ' is here.');\n }\n }\n if ('objects' in map_location[0] && map_location[0]['objects'].length > 0) {\n for (var i = 0; i < map_location[0]['objects'].length; i++) {\n rec['lines'].push('A <span class=\"game_item\">' + map_location[0]['objects'][i].toLowerCase() + '</span> is here.');\n }\n }\n results.push(rec);\n var obvious_exits = false;\n if ('exits' in map_location[0] && map_location[0]['exits'].length > 0) {\n // list what exists are available;\n var rec = {};\n rec['title'] = 'EXITS';\n rec['lines'] = [map_location[0]['exits'].join(', ').toUpperCase()];\n results.push(rec);\n obvious_exits = true;\n }\n if ('locked_exits' in map_location[0] && map_location[0]['locked_exits'].length > 0) {\n var locked = [];\n for (var i = 0; i < map_location[0]['locked_exits'].length; i++) {\n locked.push(map_location[0]['locked_exits'][i].toUpperCase());\n }\n var rec = {};\n rec['title'] = 'LOCKED EXITS';\n rec['lines'] = [locked.join(', ')];\n results.push(rec);\n obvious_exits = true;\n }\n if (!obvious_exits) {\n var rec = {};\n rec['title'] = 'EXITS';\n rec['lines'] = ['There are no obvious exits!'];\n results.push(rec);\n }\n if ('for_sale' in map_location[0] && map_location[0]['for_sale'].length > 0) {\n var available_to_buy = [];\n for (var i = 0; i < map_location[0]['for_sale'].length; i++) {\n if (map_location[0]['for_sale'][i]['available'] > 0) {\n available_to_buy.push(map_location[0]['for_sale'][i]['name'] + ' (' + map_location[0]['for_sale'][i]['buy_price'] + ' coins)');\n }\n }\n if (available_to_buy.length > 0) {\n var rec = {}\n rec['title'] = 'FOR SALE';\n rec['lines'] = [available_to_buy.join(', ') + '.'];\n results.push(rec);\n }\n }\n // display tags if they exist\n if ('notes' in map_location[0] && map_location[0]['notes'] != '') {\n var rec = {}\n rec['title'] = 'TAGGED: ';\n rec['lines'] = [map_location[0]['notes']];\n results.push(rec);\n }\n // mark the room as seen\n map_location[0]['seen'] = true;\n } else {\n var rec = {};\n rec['title'] = 'NO WAY';\n rec['lines'] = ['You\\'re so cool that you\\'re off the map!'];\n results.push(rec);\n }\n return results;\n }", "title": "" }, { "docid": "1dd217c729b2413936dce37a145d7d02", "score": "0.52491707", "text": "async getAll() {\r\n\t\t// Open the file, parse the contents and return the parsed data\r\n\t\treturn JSON.parse(await fs.promises.readFile(this.filename, { encoding: 'utf8' }));\r\n\t}", "title": "" }, { "docid": "259d7b7bf449d848228fa6ba64823269", "score": "0.5234249", "text": "function onSuccess(json) {\n //console.log(json.features[0].properties.title);\n\n\n json.features.forEach(function(object) {\n console.log(object.properties.title);\n });\n // celebrate!\n // });\n }", "title": "" }, { "docid": "04739fbc8b19f0c538dd103f9da08023", "score": "0.5233123", "text": "getDemographics(){\n for (let i = 0, len =this.state.data.categories.length; i < len; i++) {\n let category=this.state.data.categories[i];\n if(category.features.length>0){\n $.ajax({\n url: \"http://ec2-54-153-92-109.us-west-1.compute.amazonaws.com:57772/api/db/categoryreviewers/\"+category.categoryName+\"?CacheUserName=SuperUser&CachePassword=SYS\",\n dataType:'json',\n method: \"get\",\n success: data => {\n let markers=data.reviewers.slice(0, 100).map((reviewer,index)=>{\n return {index:index, location:reviewer.location, reviewerID:reviewer.id}\n });\n\n this.setState({markers:markers})\n }});\n }}\n }", "title": "" }, { "docid": "d4ae331764cfe90acc005a1958d23412", "score": "0.5232023", "text": "function onCompletedAllArticlesGet(json) {\n //Uncomment to see all articles in a seperate file\n /*fs.writeFile('allArticles.json', JSON.stringify(json), 'utf-8', function (err) {\n if (err) throw err;\n });*/\n console.log('Fetched all articles \\n'.blue);\n allArticles = json;\n for(var itemNum in json.items) { //Iterate through each article and find duplicate articles\n var workingJSON = json.items[itemNum];\n if(workingJSON.title.indexOf(\"/\") > -1){ //If \"/\" found, take everything after \"/\" (\"/\" defines subpage)\n arrayCreator(workingJSON,workingJSON.title.substr(workingJSON.title.indexOf(\"/\")+1)); //Send article title to \"arrayCreator\"\n allArticleIds[workingJSON.title.substr(workingJSON.title.indexOf(\"/\")+1)] = { //Add to master list of article ids\n \"id\" : workingJSON.id\n };\n } else {\n arrayCreator(workingJSON,workingJSON.title); //Send article title to \"arrayCreator\"\n allArticleIds[workingJSON.title] = { //Add to master list of article ids\n \"id\" : workingJSON.id\n };\n }\n }\n //Uncomment to see all article in a seperate file\n /*fs.writeFile('articleIDs.json', JSON.stringify(allArticleIds), 'utf-8', function (err) {\n if (err) throw err;\n console.log('articleIDs.json created\\n');\n });*/\n createMasterArticleIdList();\n}", "title": "" }, { "docid": "e8ac9f38ff287a209248b76e292f720c", "score": "0.522355", "text": "getJSON() {\r\n return this.state.doc.toJSON();\r\n }", "title": "" }, { "docid": "060e34dae42ec73c52694fe076935db7", "score": "0.52055293", "text": "function items_geojson(){\n\t\treturn [{\n\t\t \"isEnabled\" : true,\n\t\t \"name\": name, \n\t\t \"type\": format['type'],\n\t\t \"url\": resource_url,\n\t\t}]\n\t }", "title": "" }, { "docid": "03210fddc325190bc021ce45e2645763", "score": "0.52054584", "text": "getResults() {\n return this.json;\n }", "title": "" }, { "docid": "cbfd49a7f5f9e216ad4b5ab89677376b", "score": "0.52053064", "text": "function exportJSON(db, onError, onSuccess) {\n const output = {};\n db.allDocs().then(documents => {\n console.log(documents);\n });\n}", "title": "" }, { "docid": "23c31debf0a0c63ab37879f356f6385f", "score": "0.52036107", "text": "get map(){\n\treturn \"map\" + this.indexMap + \".json\";\n }", "title": "" }, { "docid": "9fe6793897800141b8c1cacbcfb5545f", "score": "0.5200932", "text": "getAnnotationItems(key){\n let items= []\n for (let ont of this.lastsuggest[key].ontologies) {\n let item={type:'SpecificResource',source:ont.uris}\n items.push(item)\n }\n items.push({type:'TextualBody',value:this.lastsuggest[key].name})\n return items;\n }", "title": "" }, { "docid": "695dbe8599e4c39de853404e2215ad1f", "score": "0.52004206", "text": "async getAll(searchterm) { \r\n searchterm = searchterm.trim().split(' ');\r\n console.log(searchterm);\r\n\r\n let promises = searchterm.map(e => {\r\n return Service.get(`posts?title=${e}`);\r\n });\r\n\r\n let responses = await Promise.all(promises);\r\n let vrati = {}\r\n responses.forEach(e => {\r\n e.data.forEach(doc =>{\r\n let post = {\r\n id: doc.id,\r\n url: doc.source, \r\n email: doc.createdBy, \r\n title: doc.title, \r\n posted_at: Number(doc.postedAt)\r\n };\r\n vrati[doc.id] = post\r\n });\r\n }); \r\n return vrati;\r\n }", "title": "" }, { "docid": "4b0a8a5b4fc9a9c0c6178d64ed1da3da", "score": "0.51953894", "text": "async function getSome(){\n const restaurantsCollection=await restaurants();\n const allRestaurants=await restaurantsCollection.find({}).toArray();\n let resultsList=[];\n for(let i=0;i<24;i++){\n let list=[];\n for(let j=0;j<allRestaurants[i].R_review.length;j++){\n let review={\n reviewer_name:allRestaurants[i].R_review[j].reviewer_name,\n reviewer_like:allRestaurants[i].R_review[j].reviewer_like,\n review:allRestaurants[i].R_review[j].review\n } \n list.push(review);\n }\n let content={\n _id:allRestaurants[i]._id,\n R_cuisine:allRestaurants[i].R_cuisine,\n R_name:allRestaurants[i].R_name,\n R_href:allRestaurants[i].R_href,\n R_location:allRestaurants[i].R_location,\n R_review:list[0].review\n }\n resultsList.push(content);\n }\n return resultsList; \n}", "title": "" }, { "docid": "ac75b514fc6ef4ad0cf3f6a5d2aa7bb8", "score": "0.519413", "text": "function getData(map) {\n //Load the data through AJAX\n $.ajax(\"data/stadiums.geojson\", {\n dataType: \"json\",\n success: function(response) {\n search(response, map);\n }\n });\n}", "title": "" }, { "docid": "077d3116579e9e1b5c00da70d0cf6365", "score": "0.5192359", "text": "function useTheData(doc) {\n\t\t//Geodata handling goes here, using JSON properties of the doc object\n\t\t//Number of polygons within Kml file\n\t\tvar numPolys = doc[0].gpolygons.length;\n\t\tvar numPolys2 = doc[1].gpolygons.length;\n\t\tvar numPolys3 = doc[2].gpolygons.length;\n\t\t\n\t\t//console.log(numPolys3);\n\t\t\n\t\t// Loop through each polygon\n\t\tfor(var i = 0; i < numPolys; i++){\n\t\t\t//hide all the polygons within kml file\n\t\t\tdoc[0].gpolygons[i].setMap(null);\n\t\t};\t\n\t\t\n\t\tfor(var i = 0; i < numPolys2; i++){\n\t\t\t//hide all the polygons within kml file\n\t\t\tdoc[1].gpolygons[i].setMap(null);\n\t\t};\n\t\t\n\t\tfor(var i = 0; i < numPolys3; i++){\n\t\t\t//hide all the polygons within kml file\n\t\t\tdoc[2].gpolygons[i].setMap(null);\n\t\t};\n\t\t\t\t\t\t\n\t\t//Single out a certain polygon for visualization\n\t\t//doc[0].gpolygons[6].setMap(map);\n\t\t\n\t\t//Function contains \"Contains\" from v3_epoly.js file\n\t\t//Determines if a function is within a certain polygon\n\t\t//Will use for loop for outer custom geopolygon to see if out of big island\n\t\tfor(var i = 0; i <= numPolys; i++){\n\t\t\t\n\t\t\tif(doc[2].gpolygons[0].Contains(grabLoc)){ \n\t\t\t\tif(i < numPolys){\n\t\t\t\t\tif(doc[0].gpolygons[i].Contains(grabLoc)){\n\t\t\t\t\t\ttsunamiZone.value = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//zone 9\n\t\t\t\t\t\t//lavaZone.value = doc[1].placemarks[0].name;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar haz1 = 2;\n\t\t\t\t\t\t//lavaZone.value = doc[1].placemarks[6].name;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar tsunamiValue = tsunamiZone.value;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#hazIdent\").val('1');\n\t\t\t\t\t\t$(\"#hazValue\").val(zoneValue);\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar val = 'Hazard_idHazard='+ haz1 +'&hazVal='+ tsunamiZone.value;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\t\turl: \"php/findDesc.php\",\n\t\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\t\ttsuDesc.value = data;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\t\turl: \"php/findMit.php\",\n\t\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\t\ttsuMit.value = data;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\t\turl: \"php/findSrc.php\",\n\t\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\t\ttsuSrc.value = data;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}else if(i == numPolys){\n\t\t\t\t\ttsunamiZone.value = 0;\n\t\t\t\t\t\n\t\t\t\t\t//zone 9\n\t\t\t\t\t//lavaZone.value = doc[1].placemarks[0].name;\n\t\t\t\t\t\n\t\t\t\t\tvar haz1 = 2;\n\t\t\t\t\t//lavaZone.value = doc[1].placemarks[6].name;\n\t\t\t\t\t\n\t\t\t\t\tvar tsunamiValue = tsunamiZone.value;\n\t\t\t\t\t\n\t\t\t\t\t$(\"#hazIdent\").val('0');\n\t\t\t\t\t$(\"#hazValue\").val(zoneValue);\n\t\t\t\t\t\n\t\t\t\t\tvar val = 'Hazard_idHazard='+ haz1 +'&hazVal='+ tsunamiZone.value;\n\t\t\t\t\t\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\turl: \"php/findDesc.php\",\n\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\ttsuDesc.value = data;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\turl: \"php/findMit.php\",\n\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\ttsuMit.value = data;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\turl: \"php/findSrc.php\",\n\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\ttsuSrc.value = data;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\ttsunamiZone.value = \"Outside Big Island\";\n\t\t\t\ttsuDesc.value = \"Outside Big Island\";\n\t\t\t\ttsuMit.value = \"Outside Big Island\";\n\t\t\t\ttsuSrc.value = \"Otuside Big Island\";\n\t\t\t}\n\t\t};\n\t\t\n\t\tfor(var i = 0; i <= numPolys2; i++){\n\t\t\n\t\t\tif(i < numPolys2){\n\t\t\t\tif(doc[1].gpolygons[i].Contains(grabLoc)){\t\t\n\t\t\t\t\t//zone 9\n\t\t\t\t\tlavaZone.value = doc[1].placemarks[i].name;\n\t\t\t\t\t\n\t\t\t\t\tvar haz2 = 1;\n\t\t\t\t\t//lavaZone.value = doc[1].placemarks[6].name;\n\t\t\t\t\t\n\t\t\t\t\tvar zoneValue = lavaZone.value;\n\t\t\t\t\t\n\t\t\t\t\t$(\"#hazIdent\").val('2');\n\t\t\t\t\t$(\"#hazValue\").val(zoneValue);\n\t\t\t\t\t\n\t\t\t\t\tvar val = 'Hazard_idHazard='+ haz2 +'&hazVal='+ lavaZone.value;\n\t\t\t\t\t\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\turl: \"php/findDesc.php\",\n\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\tlavaDesc.value = data;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\turl: \"php/findMit.php\",\n\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\tlavaMit.value = data;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\turl: \"php/findSrc.php\",\n\t\t\t\t\t\tdata: val,\n\t\t\t\t\t\tcache: false,\n\t\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t\tlavaSrc.value = data;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tlavaZone.value = 'Outside of Big Island';\n\t\t\t\tlavaDesc.value = 'Outside of Big Island';\n\t\t\t\tlavaMit.value = 'Outside of Big Island';\n\t\t\t\tlavaSrc.value = 'Outside of Big Island';\n\t\t\t}\n\t\t};\n\t\t\n\t\t$(\"#HazArray\").show();\n\t\t\n\t\t//Dialog box \n\t\t$(function() {\n\t\t\t$( \"#Dialog\" ).dialog({\n\t\t\t\t//autoOpen: false,\n\t\t\t\tmodal: false,\n\t\t\t\twidth: 500,\n\t\t\t\theight: 400\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "5911b32851d23343f2c644b4517f7f08", "score": "0.5189848", "text": "function jsonOverview (cb) {\n // Loop over each dataset JSON and save to in-memory string\n const serialize = ndjson.serialize();\n let json = '';\n serialize.on('data', function(line) {\n json += line;\n });\n const datasets = requireDir('./tmp');\n for (var k in datasets) {\n serialize.write(datasets[k]);\n }\n serialize.end();\n\n // Save string to file\n fs.writeFileSync('./docs/index.ndjson', json);\n\n return cb();\n}", "title": "" }, { "docid": "5219b366c5e3eecb97626fb6d237d693", "score": "0.5174692", "text": "getAllMentors() { \n const fileData = fs.readFileSync(this.fileName).toString();\n const allMentors = JSON.parse(fileData);\n return(allMentors);\n }", "title": "" }, { "docid": "636182ac4034649e726e99612cd16059", "score": "0.5173116", "text": "applyAccessMapToData(accessMap, data) {\n debug('%s: apply accessMap to data %j', this.getName(), data);\n\n return data.map(sourceDoc => {\n let doc = clone(sourceDoc);\n\n // Cache query results\n let testedQueries = {};\n for (let prop of Object.keys(accessMap.accessMap)) {\n let val = accessMap.accessMap[prop];\n\n let allow;\n\n if (typeof(val) ==='boolean') {\n allow = val;\n } else {\n let query = val.query;\n // Apply query on object\n // TODO: we don't need md5\n let queryId = md5(JSON.stringify(query));\n // Check for cached result\n if (testedQueries[queryId] !== undefined) {\n allow = testedQueries[queryId];\n } else {\n // Apply query\n // TODO: probably, we should put data formatting in the last middleware\n // TODO: and not access node here\n let queryResult = sift(query, [doc]);\n\n if (queryResult.length) {\n allow = true;\n } else {\n allow = false;\n }\n testedQueries[queryId] = allow;\n }\n }\n\n if (!allow) {\n // FIXME: quick workaround\n if (prop == 'id') {\n doc['_id'] = null;\n continue;\n }\n\n // TODO: should we actually remove property completely with delete\n // TODO: we currently operate with mongoose objects\n // TODO: should we ever convert it to plain objects\n doc[prop] = null;\n }\n }\n\n debug(this.getName(), 'doc with applied accessMap', doc);\n\n // check if doc is all null values document - return null then\n let isAllNull = true;\n // If doc is mongodb model - convert it to object\n let plainNode = doc.toObject ? doc.toObject() : doc;\n for (let key of Object.keys(plainNode)) {\n if (accessMap.accessMap[key] === undefined) {\n continue;\n }\n\n if (plainNode[key] !== null) {\n isAllNull = false;\n break;\n }\n }\n\n if (isAllNull) {\n debug(this.getName(), 'all null');\n return null;\n }\n\n return doc;\n }).filter(doc => {\n // remove null docs\n return doc !== null\n });\n }", "title": "" }, { "docid": "9fccd5efbc0bd9ce170bd55c359ad584", "score": "0.51677215", "text": "function getDocumentList()\n{\n updateLocation();\n}", "title": "" }, { "docid": "254db9865967a1aeb779c61f13a2c37d", "score": "0.5161809", "text": "function eventList(jsonDoc) {\n\t\t\n\t\tif(!jsonDoc) {\t//bail if its an error\n\t\t\tthisPtr.outputError(\"bang\");\n\t\t\treturn;\t\t\n\t\t} else {\n\t\t\teval('var responseJSON='+jsonDoc);\n\t\t}\t\n\t\t\n\t\tfor(var i=0;i<responseJSON.diggs.length;i++)\n\t\t\tthisPtr.outputData({\"date\":responseJSON.diggs[i].date,\"story\":responseJSON.diggs[i].story,\"id\":responseJSON.diggs[i].id,\"user\":responseJSON.diggs[i].user,\"status\":responseJSON.diggs[i].status});\n\t\n\t\tthisPtr.outputError(\"bang\");\t//done\n\t}", "title": "" }, { "docid": "414f3e4215ceba72cbdac6eab5ce04cf", "score": "0.516034", "text": "function initialOutputOfList(){\n //request\n const url = `http://165.22.78.137:8080/documents`;\n fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'user_token': `${localStorage.getItem('user_token')}`\n }\n })\n .then(res => {\n console.log('fetch got items of user');\n console.log(res);\n if(!res.ok){\n throw Error();\n }\n console.log('fetch was ok and got items of user');\n console.log('response');\n return res.json();\n })\n .then(json => {\n console.log(json);\n const list = json;\n outputMatches2HTML(list);\n }).catch(error => {\n console.log(error);\n alert('Fehler beim Laden der Einträge. Bitte versuche es später erneut!');\n });\n }", "title": "" }, { "docid": "4c2a877e0b90776bfb9d709acf4f50a7", "score": "0.51580137", "text": "async function mapData(){ \n\t\tawait fetch('/geo-json/'+ geoJSONfile).then(res => res.json()).then(data => { \n\t\t\t\n\t\t\tconst coordData = data.features[0].geometry.coordinates;\n\t\t\tconst startCoords = [coordData[0][0], coordData[0][1]];\n\t\t\tconst finishCoords = [coordData[coordData.length - 1][0], coordData[coordData.length - 1][1]]\n\n\t\t\t\n\t\t\tvar finishMarker = new mapboxgl.Marker({\n\t\t\t\tcolor: \"#dd430d\"\n\t\t\t\t}).setLngLat(finishCoords)\n\t\t\t\t.addTo(map);\n\n\t\t\tvar startMarker = new mapboxgl.Marker({\n\t\t\t\tcolor: \"#89e12b\"\n\t\t\t\t}).setLngLat(startCoords)\n\t\t\t\t.addTo(map);\n\n\t\t\t\n\t\t});\n\t}", "title": "" }, { "docid": "0281c84fa95b666afb69d9515ea84379", "score": "0.5154215", "text": "function addExistingDocuments() {\n var stopURL = '/get_all_documents/'\n d3.json(stopURL, function(foo) {\n for (i = 0; i < foo['allDocuments'].length; i++) {\n documentSamples.push({\n name: foo['allDocuments'][i]['name'],\n contents: foo['allDocuments'][i]['contents']\n });\n }\n updateDocumentVisuals(documentSamples);\n });\n}", "title": "" }, { "docid": "f06b1fa8f29c075f245c37da0e78b4c4", "score": "0.5135549", "text": "function getGigs() {\n const events = $map.data('events');\n // console.log(events);\n $.each(events, (index, location) => {\n addMarker(location);\n });\n }", "title": "" }, { "docid": "a6daa4a4d76ea9aeeab2cd609e29c083", "score": "0.5132543", "text": "function all(){\n var deferred = $q.defer();\n\n $http.get('/pokemons.json')\n .success(function(data){\n deferred.resolve(data);\n });\n\n return deferred.promise;\n }", "title": "" }, { "docid": "8cdca82f2243b22b61448df15af1f1bb", "score": "0.51318854", "text": "function DisplayJsonFile(){\n var wrapper = $(\"#wrapper\"), container;\n for (var key in file_content){\n container = $('<div id=\"list_displayed\" class=\"container\"></div>');\n wrapper.append(container);\n container.append('<div class=\"date\">' + key + '</div>');\n for (const dict of file_content[key]){\n container.append('<div class=\"name\">' + dict.name + '</div>');\n container.append('<div class=\"time\">' + dict.time + '</div>');\n container.append('<div class=\"calories\">' + dict.calories + \" Cals\" + '</div>');\n }\n }\n}", "title": "" }, { "docid": "00ec7519a794df4131e31655ef0cf617", "score": "0.5129957", "text": "function getItems() {\n // Aquire root objects\n objectService.getObjects(ROOTS).then(function (objectsById) {\n var objects = [],\n id;\n \n // Get each of the domain objects in objectsById\n for (id in objectsById) {\n objects.push(objectsById[id]);\n }\n \n // Index all of the roots' descendents\n indexItems(objects);\n });\n }", "title": "" }, { "docid": "823f38bdd2671fa96a829b6004b5cab6", "score": "0.51293457", "text": "function initMap() {\n var center = new google.maps.LatLng(49.2578263, -123.1939435);\n var mapOptions = {\n zoom: 13,\n center: center,\n mapTypeId: google.maps.MapTypeId.TERRAIN,\n mapTypeControl: false, \n };\n\n googlify = function (lat, lng){\n return new google.maps.LatLng(lat, lng)\n }\n\n function getWaterData(){\n const url = \"https://opendata.vancouver.ca/api/records/1.0/search/?dataset=drinking-fountains&q=&rows=1000&facet=in_operation&facet=pet_friendly&facet=geo_local_area\";\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n\n\n var data = request.responseText;\n var obj = JSON.parse(data);\n\n var waterfountains = []\n \n for(i=0;i<obj.records.length;i++){\n var record = obj.records[i];\n var long = record.fields.geom.coordinates[0];\n var lat = record.fields.geom.coordinates[1];\n var type = \"fountain\";\n var pet_friendly = \"unknown\";\n var in_operation = \"na\";\n if (\"pet_friendly\" in record.fields){\n pet_friendly = record.fields.pet_friendly;\n }\n if (\"in_operation\" in record.fields){\n in_operation = record.fields.in_operation;\n }\n var waterfountain = {\"lat\": lat, \"lng\": long, \"type\": \"fountain\", \"category\":{\"in_operation\":in_operation, \"pet_friendly\": pet_friendly}}\n waterfountains.push(waterfountain);\n //console.log(waterfountain);\n }\n return waterfountains;\n }\n //\n\n function getWashroomData(){\n const url = \"https://opendata.vancouver.ca/api/records/1.0/search/?dataset=public-washrooms&q=&rows=1000&facet=type&facet=summer_hours&facet=winter_hours&facet=wheel_access&facet=maintainer&facet=geo_local_area\";\n\n console.log(url);\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n\n\n var data = request.responseText;\n var obj = JSON.parse(data);\n\n var washrooms = []\n \n for(i=0;i<obj.records.length;i++){\n var record = obj.records[i];\n var long = record.fields.geom.coordinates[0];\n var lat = record.fields.geom.coordinates[1];\n var type = \"washroom\";\n var hours;\n switch (record.fields.winter_hours){\n case \"Dawn to Dusk\":\n hours = \"Dawn to Dusk\";\n break;\n case \"24 hrs\":\n hours = \"24 hrs\";\n break;\n case \"Closed\":\n hours = \"closed\";\n break;\n default:\n hours =\"na\";\n }\n var washroom = {\"lat\": lat, \"lng\": long, \"type\": \"washroom\", \"category\":{\"hours\":hours}};\n washrooms.push(washroom);\n //console.log(washroom);\n }\n //console.log(washrooms.length);\n return washrooms;\n }\n\n function getDogparkData(){\n const url = \"https://opendata.vancouver.ca/api/records/1.0/search/?dataset=dog-off-leash-parks&q=&rows=1000&facet=geo_local_area\";\n\n console.log(url);\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n\n\n var data = request.responseText;\n var obj = JSON.parse(data);\n\n var dogparks = []\n \n for(i=0;i<obj.records.length;i++){\n var record = obj.records[i];\n if (record.fields.geom.coordinates.length == 2){\n var coords = record.fields.geom.coordinates[1];\n }\n else{\n var coords = record.fields.geom.coordinates[0]\n }\n\n points = []\n\n for (j=0; j<coords.length; j++){\n points.push({\"lat\": coords[j][1], \"lng\": coords[j][0]});\n }\n\n var type = \"dogpark\";\n var dogpark = {\"coords\":points, \"type\": \"dogpark\", \"category\":{}};\n dogparks.push(dogpark);\n //console.log(dogpark);\n }\n //console.log(\"dogpark length\" + dogparks.length);\n return dogparks;\n } \n\n //getDogparkData();\n var features=getWaterData();\n features=features.concat(getWashroomData());\n features=features.concat(getDogparkData());\n\n const markers = [];\n map = new google.maps.Map(document.getElementById(\"map\"), mapOptions);\n // Create markers.\n const styleControl = document.getElementById(\"style-selector-control\");\n map.controls.push(styleControl);\n // Apply new JSON when the user chooses to hide/show features.\n document.getElementById(\"hide-poi\").addEventListener(\"click\", () => {\n map.setOptions({ styles: styles[\"hide\"] });\n });\n document.getElementById(\"show-poi\").addEventListener(\"click\", () => {\n map.setOptions({ styles: styles[\"default\"] });\n });\n const styles = {\n default: [],\n hide: [\n {\n featureType: \"poi\",\n stylers: [{ visibility: \"off\" }],\n },\n {\n featureType: \"poi.park\",\n stylers: [{ visibility: \"on\" }],\n },\n {\n featureType: \"transit\",\n elementType: \"labels.icon\",\n stylers: [{ visibility: \"off\" }],\n },\n ],\n };\n\n\n getColour = function (category) {\n if (category == \"fountain\") {\n return {\n url:\n // \"https://www.freepnglogos.com/uploads/water-drop-png/water-drop-falling-illustration-transparent-png-svg-vector-29.png\",\n \"https://maps.google.com/mapfiles/ms/icons/blue-dot.png\",\n //scaledSize: new google.maps.Size(25, 25), // scaled size\n };\n } else if (category == \"washroom\") {\n return {\n // url: \"https://cdn1.iconfinder.com/data/icons/tools-and-construction-2-6/65/64-512.png\",\n // url:\"http://planyourwalk.online.s3-website-us-east-1.amazonaws.com/toilet_pin.png\",\n url:\"https://maps.google.com/mapfiles/ms/icons/pink-dot.png\",\n\n // scaledSize: new google.maps.Size(25, 25), // scaled size\n };\n } else if (category == \"dogpark\") {\n return { \n url: \"https://cdn.iconscout.com/icon/free/png-256/paw-29-459421.png\",\n //scaledSize: new google.maps.Size(25, 25), // scaled size\n };\n }\n };\n\n\n\n for (let i = 0; i < features.length; i++) {\n if(features[i].type !='dogpark'){\n const marker = new google.maps.Marker({\n position: googlify(features[i].lat,features[i].lng),\n map: map,\n visible: true,\n category: features[i].category,\n type: features[i].type,\n icon: getColour(features[i].type),\n });\n markers[i] = marker;\n }else{\n const marker = new google.maps.Polygon({\n paths: features[i].coords,\n type: features[i].type,\n strokeColor: \"#6A0DAD\",\n strokeOpacity: 0.8,\n strokeWeight: 2,\n fillColor: \"#6A0DAD\",\n fillOpacity: 0.6,\n })\n marker.setMap(map);\n markers[i] = marker;\n }\n \n \n }\n\n\n showSubFilters = function (category, checked) {\n if (category=='fountain'){\n \n if(checked){\n document.getElementById(\"fountain_operation\").style.display = \"block\";\n }else{\n document.getElementById(\"fountain_operation\").style.display = \"none\";\n }\n }\n if (category=='washroom'){\n \n if(checked){\n document.getElementById(\"washroom_operation\").style.display = \"block\";\n }else{\n document.getElementById(\"washroom_operation\").style.display = \"none\";\n }\n }\n };\n\n\n filterMarkers = function (category, checked) {\n for (i = 0; i < markers.length; i++) {\n marker = markers[i];\n // If is same category or category not picked\n if (marker.type == category) {\n if (category != \"dogpark\") {\n if (checked) {\n marker.setVisible(true);\n } else {\n marker.setVisible(false);\n }\n } else {\n if (checked) {\n marker.setMap(map);\n } else {\n marker.setMap(null);\n }\n }\n }\n }\n showSubFilters(category, checked);\n };\n\n filterFountainMarkers= function (category, checked){\n for (i = 0; i < markers.length; i++) {\n marker = markers[i];\n // If is same category or category not picked\n if (marker.category.in_operation == category && marker.type == \"fountain\") {\n if (checked) {\n marker.setVisible(true);\n } else if (marker.type == \"fountain\" && marker.category.in_operation == category ){\n marker.setVisible(false);\n }\n }\n if (marker.category.pet_friendly == category && marker.type == \"fountain\") {\n if (checked) {\n marker.setVisible(true);\n } else if (marker.category.pet_friendly == category && marker.type == \"fountain\"){\n marker.setVisible(false);\n }\n }\n }\n }\n filterWashroomMarkers= function (category, checked){\n for (i = 0; i < markers.length; i++) {\n marker = markers[i];\n // If is same category or category not picked\n if (marker.category.hours == category && marker.type == \"washroom\") {\n if (checked) {\n marker.setVisible(true);\n } else if (marker.type == \"washroom\"){\n marker.setVisible(false);\n }\n }\n }\n }\n \n}", "title": "" }, { "docid": "8eba453211c4ae973b94e07056e87619", "score": "0.5127896", "text": "_parseRendering() {\n const keys = Object.keys(this.atlas.Rendering)\n const output = {\n county: [],\n town: []\n }\n\n for (let k of keys) {\n let arr = k.split('-')\n if (arr[0] === 'county') {\n output.county.push(arr[1]) \n } else if (arr[0] === 'town') {\n output.town.push(arr[1]) \n }\n }\n\n return output\n }", "title": "" }, { "docid": "b89eefaa3790d23c59b76be13bd42a15", "score": "0.5127365", "text": "function all() {\n return areas\n}", "title": "" }, { "docid": "47057dc6b77036bc57fb4d3a352e3e00", "score": "0.5116518", "text": "function serializeMap(map) {\r\n\t\t\t\tif (map === null || map === undefined) return null;\r\n\r\n\t\t\t\tvar meta = {\r\n\t\t\t\t\tgeometries: {},\r\n\t\t\t\t\tmaterials: {},\r\n\t\t\t\t\ttextures: {},\r\n\t\t\t\t\timages: {}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tvar json = map.toJSON(meta);\r\n\t\t\t\tvar images = extractFromCache(meta.images);\r\n\t\t\t\tif (images.length > 0) json.images = images;\r\n\t\t\t\tjson.sourceFile = map.sourceFile;\r\n\r\n\t\t\t\treturn json;\r\n\t\t\t}", "title": "" }, { "docid": "247e7b94d28237371912987c23c29cee", "score": "0.511401", "text": "getMapList() {\n return Object.values(this.map).flatMap((n) => n);\n }", "title": "" }, { "docid": "a34f617304108129e19d5c9f96ed990a", "score": "0.51117045", "text": "function refresh() {\n\n\tNOSQL('pages').find().fields('id,url,name,title,parent,icon,language,ispartial,nocache,dtcreated,dtupdated').callback(function(err, response) {\n\n\t\tvar sitemap = {};\n\t\tvar helper = {};\n\t\tvar partial = [];\n\t\tvar pages = [];\n\t\tvar wildcard = [];\n\n\t\tfor (var i = 0, length = response.length; i < length; i++) {\n\t\t\tvar doc = response[i];\n\n\t\t\t// A partial content is skipped from the sitemap\n\t\t\tif (doc.ispartial) {\n\t\t\t\tpartial.push({ id: doc.id, url: doc.url, name: doc.name, title: doc.title, icon: doc.icon, language: doc.language, nocache: doc.nocache });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar wild = doc.url.indexOf('*/') !== -1;\n\t\t\tif (wild)\n\t\t\t\tdoc.url = doc.url.replace('*/', '');\n\n\t\t\tvar key = doc.url.toLowerCase();\n\t\t\tvar lng = doc.language;\n\t\t\tvar obj = { id: doc.id, url: doc.url, name: doc.name, title: doc.title, parent: doc.parent, icon: doc.icon, links: [], language: doc.language, dtcreated: doc.dtcreated, dtupdated: doc.dtupdated, wildcard: wild, nocache: doc.nocache };\n\n\t\t\thelper[doc.id] = key;\n\t\t\tsitemap[key] = obj;\n\n\t\t\tif (wild)\n\t\t\t\twildcard.push(obj);\n\n\t\t\tif (lng) {\n\t\t\t\tkey = lng + ' ' + key;\n\t\t\t\tsitemap[key] = CLONE(obj);\n\t\t\t\thelper[lng + '_' + doc.id] = key;\n\t\t\t}\n\n\t\t\tpages.push(obj);\n\t\t}\n\n\t\t// Pairs parents by URL\n\t\tvar keys = Object.keys(sitemap);\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tvar key = keys[i];\n\t\t\tvar parent = sitemap[key].parent;\n\t\t\tif (parent) {\n\t\t\t\tvar tmp = sitemap[key];\n\t\t\t\ttmp.parent = helper[parent] || helper[tmp.language + '_' + parent];\n\t\t\t\ttmp.parent && sitemap[tmp.parent] && sitemap[tmp.parent].links.push(sitemap[key]);\n\t\t\t}\n\t\t}\n\n\t\tMAIN.sitemap = sitemap;\n\t\tMAIN.partial = partial;\n\t\tMAIN.pages = pages;\n\t\tMAIN.wildcard = wildcard;\n\n\t\t$GET('Pages/Globals', function(err, response) {\n\t\t\tresponse.body && parseGlobals(response.body);\n\t\t\tF.cache.removeAll('cachecms');\n\t\t\tloaded = true;\n\t\t});\n\n\t});\n}", "title": "" }, { "docid": "5844a82cad1f7241ce524450f109f533", "score": "0.5106258", "text": "getOnlyDoc(ArrJson) {\n this.myJson = {};\n ArrJson.map((json) => {\n this.myJson = {\n utente: json.doc.utente.utente,\n id: json.doc.id,\n titolo: json.doc.titolo,\n documento: json.doc.documento\n }\n this.data.push(this.myJson);\n })\n\n }", "title": "" }, { "docid": "c8d70eaa1a98ba4cf3a5bfe38a49ae15", "score": "0.51006037", "text": "function getkeys(name){\n \t var filename = DATAROOT+ name + '.json';\n \t fs.readFile(filename, 'utf-8',function(err,content){\n if(err)\n respondErr(err);\n else{\n \t var contentobj = JSON.parse(content);\n \t if(contentobj.length){\n \t \t var firstobj = contentobj[0];\n var allkeys = Object.keys(firstobj);\n res.writeHead(200, {'content-type':'text/html'});\n\t res.end(JSON.stringify({keys:allkeys}));\n \t }else\n \t //file exists but empty file(no object)\n \t //respond(404, \"0 tupleFile\"); \n \t server404(); \n } \n });\n }", "title": "" }, { "docid": "085d6541872b1f705dfca01d0da35140", "score": "0.509909", "text": "function all (req, res) {\n db.notes.orderByChild('/crt_timestamp').once('value', snapshot => { \n var data = snapshot.val();\n res.send(data);\n \n }) \n}", "title": "" }, { "docid": "2039fd1ad67a0cf76b8abdcc3fa30dd3", "score": "0.5098511", "text": "async begin() {\n this.logger.debug(\"NetlifyMdResourceTransformer:begin - Begin Begin\");\n\n const jsonFetchers = Object.keys(this.mappingUrls).map(async key => {\n await this.getMappingFile(key, this.mappingUrls[key]);\n }) \n\n await Promise.all(jsonFetchers);\n\n this.logger.debug(\"NetlifyMdResourceTransformer:begin - End Begin\"); \n }", "title": "" }, { "docid": "2dd9588793fdea2f99af31e60633888b", "score": "0.5094161", "text": "async loadAllInVirtualMap(){\n try{\n\n const siblings = await this.findAllHashMap( );\n\n for (let i=0; i < siblings.length; i++)\n this._addCache(siblings[i].id, \"view\", siblings[i]);\n\n return true;\n\n }catch(err){\n\n }\n }", "title": "" }, { "docid": "a381a7479c922919fb489064f00b85f3", "score": "0.5093688", "text": "function retrieveMonthLocations() {\n\tvar dataFiles = ['laweekly.json', 'discover.json'];\n\tvar allData = [];\n\n\tvar laweekly = fs.readFileSync('crawldata\\\\may\\\\' + dataFiles[0], 'utf8');\n\tvar discover = fs.readFileSync('crawldata\\\\may\\\\' + dataFiles[1], 'utf8');\n\n\tlaweekly = JSON.parse(laweekly);\n\tdiscover = JSON.parse(discover);\n\n\tlaweekly = laweekly.events;\n\tdiscover = discover.events;\n\n\tconsole.log('laweekly length: ' + laweekly.length, 'discover length: ' + discover.length);\n\n\tallData = allData.concat(laweekly);\n\tallData = allData.concat(discover);\n\tconsole.log('number of events: ' + allData.length);\n\n\tvar json = JSON.stringify(allData);\n\tfs.writeFile('crawldata\\\\may\\\\mayLocationsPreClean.json', JSON.stringify(allData), 'utf8', function(err) {\n\t\tconsole.log('saved');\n\t});\n\n\tvar filteredLocationData = _.filter(allData, function(e) {\n\t\treturn e.address && e.locationName != \"\";\n\t});\t\n\t\n\t// test getting unique locations\n\tvar uniqueLocationData = _.uniq(filteredLocationData, 'location'); \n\n\tconsole.log('number of full data events: ' + uniqueLocationData.length);\n\n\tvar locationData = _.map(uniqueLocationData, function(e) {\n\t\tvar location = e.locationName;\n\t\tvar address = e.address;\n\t\tif (address.indexOf('CA 9'))\n\t\t\taddress = address.split('CA 9')[0];\n\t\tif (location.indexOf('@') > -1)\n\t\t\tlocation = location.replace('@', '').trim();\n\t\tif (address.indexOf('\\\\') > -1)\n\t\t\taddress = address.replace('\\\\', '');\n\t\treturn {\n\t\t\t'location' : location,\n\t\t\t'address' : address\n\t\t};\n\t});\n\n\tconsole.log(locationData[0]);\n\tconsole.log('number of locations: ' + locationData.length);\n\n\tvar newJson = JSON.stringify(locationData);\n\tfs.writeFile('crawldata\\\\may\\\\mayLocations.json', newJson, 'utf8', function(err) {\n\t});\n}", "title": "" }, { "docid": "2be87de4574406e1ac567dfa90e874d1", "score": "0.5091801", "text": "getDynamicMap() {\n const rv = [];\n let hasDynamic = false;\n this.voices.forEach((voice) => {\n voice.notes.forEach((note) => {\n if (note.dynamicText) {\n rv.push({\n note,\n text: note.dynamicText\n });\n hasDynamic = true;\n } else {\n rv.push({\n note,\n text: ''\n });\n }\n });\n });\n\n if (hasDynamic) {\n return rv;\n }\n return [];\n }", "title": "" }, { "docid": "1c655ab50f25c74d8306356f5a6b8e1c", "score": "0.50889057", "text": "function getImagesData() {\n const ajaxSettings = {\n method: 'get',\n dataType: 'json'\n }\n $.ajax('data/page-1.json', ajaxSettings).then(data => {\n // console.log(data); \n data.forEach(element => {\n let ImageObject = new ImagesFun(element.image_url, element.title, element.description, element.keyword, element.horns);\n ImageObject.render();\n });\n })\n}", "title": "" }, { "docid": "0c10d80298637a2e89e9113c286d902d", "score": "0.5085284", "text": "function loadCouchData() {\n $.ajax({\n url:'http://' + couchHost +\n '/couch/tweets_polygons_relational/_design/stats/_view/count_polygons?group=true',\n dataType: 'jsonp',\n success: function (data) {\n console.log(data);\n\n // update the max and average sentiment sample size\n data.rows.forEach(function (dp) {\n var total = dp.value.positive + dp.value.negative + dp.value.neutral;\n avgSentiment += total / data.rows.length;\n if (total > maxSentiment) {\n maxSentiment = total;\n }\n });\n\n // iterate over the sentiments and attach them to the map\n data.rows.forEach(function (dataPoint) {\n // update the map features\n map.data\n .getFeatureById(dataPoint.key)\n .setProperty(prop.tweet, dataPoint.value);\n\n });\n },\n\n error: function () {\n alert('failed to load tweets');\n },\n });\n}", "title": "" }, { "docid": "0801fc2f6062865ee6a6da488d00dd74", "score": "0.5082209", "text": "async function gatherAllDocuments(fullDocumentRevArray) {\n let allDocuments = [];\n\n let documentIDs = Object.keys(fullDocumentRevArray);\n\n for (let documentID of documentIDs) {\n let documentData = {\n id: documentID,\n documents: []\n }\n\n for (let rev of fullDocumentRevArray[documentID]) {\n let documentRevURL = documentBaseURL + documentID + \"?rev=\" + rev;\n\n try {\n let document = await axios.get(documentRevURL);\n documentData.documents.push(document.data);\n } catch(e) {\n console.log(\"Error getting full document revision list: \", e);\n }\n }\n\n allDocuments.push(documentData);\n }\n\n return allDocuments;\n}", "title": "" }, { "docid": "2cde76d9263b7b75ef0f90a70fc52572", "score": "0.5077445", "text": "SaveMapResources()\n\t{\n\t\t// TAG STILL SAME? OR NEED LOCATION?\n\t\t//\tIF DEPRECATED\n\t\t// \t\tIF NOT, HP\n\t\tsavedMapResources.length = 0;;\n\t\tlet thisObject = null;\n\t\tvar thisResource;\n\t\tfor (let i = 0; i < this.Perseus.objects.length; i++)\n\t\t{\n\t\t\tthisObject = this.Perseus.objects[i];\n\t\t\tif (thisObject instanceof Tree)\n\t\t\t{\n\t\t\t\tthisResource = {\n\t\t\t\t\ttag: thisObject.tag,\n\t\t\t\t\texhausted: thisObject.exhausted,\n\t\t\t\t\tresourceAmount: thisObject.resourceAmount\n\t\t\t\t}\n\t\t\t\tsavedMapResources.push(thisResource)\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "543610bf9b18a63f03a0515a2d63f20d", "score": "0.5076046", "text": "constructor(){\n // Initialize instance variables\n this.documents = new Map();\n this.ids = new Map();\n this.bias = new Map();\n }", "title": "" }, { "docid": "03e9bc18d6a99ce35f690e573380dc0c", "score": "0.5073533", "text": "function getJSON(){\n\t$.getJSON('https://data.lacity.org/resource/2nrs-mtv8.json?$order=date_rptd%20desc',function(data){\n\t\tconsole.log(data)\n\t\tjsondata = data;\n\t\tmapJSON();\n\t})\n}", "title": "" }, { "docid": "063cdeb01afd5f85f4e962d92ecc0a49", "score": "0.50727624", "text": "getMap() {\n const result = {};\n this.internalRepr.forEach((values, key) => {\n if (values.length > 0) {\n const v = values[0];\n result[key] = v instanceof Buffer ? v.slice() : v;\n }\n });\n return result;\n }", "title": "" }, { "docid": "063cdeb01afd5f85f4e962d92ecc0a49", "score": "0.50727624", "text": "getMap() {\n const result = {};\n this.internalRepr.forEach((values, key) => {\n if (values.length > 0) {\n const v = values[0];\n result[key] = v instanceof Buffer ? v.slice() : v;\n }\n });\n return result;\n }", "title": "" }, { "docid": "64864dbeb861005eb6c40f9e45840d90", "score": "0.50560576", "text": "function initMap() {\n //Define parameters for retrieving data from Open Baltimore/Socrata Open Data API\n $.ajax({\n url: \"https://data.baltimorecity.gov/resource/zqh4-9ud5.json\",\n type: \"GET\",\n data: {\n \"$limit\" : 5000,\n \"$$app_token\" : \"IAPCDodkEyfP95b6c7eJLut59\"\n },\n //A dataFilter function which manipulates/sanitizes data before it's finsihed loading.\n //If an entry is missing an attribute/value pair, it is set to an empty string.\n //This prevents \"undefined\" values from causing crashes.\n dataFilter: function(data) {\n //Parse data from string to JS object\n var data = JSON.parse(data);\n //check for duplicate latitudes\n //checkDuplicateLats(data)\n //Define length outside of loop\n var dataLength = data.length;\n //Loop through the data. If an attribute is undefined, set it to empty string.\n for(var i = 0; i < dataLength; i++) {\n data[i].artistfirstname = data[i].artistfirstname ? data[i].artistfirstname : \"\";\n data[i].artistlastname = data[i].artistlastname ? data[i].artistlastname : \"\";\n data[i].year = data[i].year ? data[i].year : \"\";\n data[i].location = data[i].location ? data[i].location : \"\";\n data[i].location.toBeGeocoded = data[i].location.toBeGeocoded ? data[i].location.toBeGeocoded : false;\n //See if the mural has an image, if not, set path to img/flag.svg\n if (!data[i].image){\n data[i].image = {\"file_id\": \"\", \"filename\": \"\"};\n data[i].imageURL = \"img/flag.svg\";\n } else {\n data[i].imageURL = (\"https://data.baltimorecity.gov/views/zqh4-9ud5/files/\" + data[i].image.file_id);\n }\n }\n cleanData(data);\n //Return the modified results as a string.\n return JSON.stringify(data);\n }\n //Prepare the data for Google Maps API and Knockout \n }).done(function(data) {\n //Define the prototype for the Google Maps InfoWindow object \n var largeInfoWindow = new google.maps.InfoWindow();\n //Define the prototype for the Geocoding service\n var geocoder = new google.maps.Geocoder();\n //The array of murals to be geocoded\n var geoCodeArray = [];\n //Define length outside of loop\n var dataLength = data.length;\n for(var i = 0; i < dataLength; i++) {\n //Add a unique ID for each object in the array\n data[i].id = i;\n //if the mural has a bad lat/long, retrieve new lat/long with api\n if (data[i].toBeGeocoded === true) {\n geoCodeArray.push(i);\n }\n //Create a new marker object and add the data to it\n var marker = new google.maps.Marker({\n position: new google.maps.LatLng(data[i].location_1.latitude, data[i].location_1.longitude),\n firstname: data[i].artistfirstname,\n lastname: data[i].artistlastname,\n address: data[i].location,\n year: data[i].year,\n id: i,\n icon: 'http://maps.google.com/mapfiles/ms/icons/red-dot.png',\n imageURL: data[i].imageURL, \n map: map\n });\n //Add an event listener (google API) that displays the infowindow and pans to the marker\n marker.addListener('click', function(){\n populateInfoWindow(this, largeInfoWindow);\n map.panTo(marker.getPosition());\n });\n //Add location to array for KO list\n viewModel.locations.push(data[i]);\n //Add marker to the global markers object\n markers.push(marker);\n }\n //Place any markers with coordinates in the localstorage cache\n geoCodeCache(geoCodeArray);\n //Determine the remaining amount of markers\n geoCodeIndex = geoCodeArray.length - localStorage.length\n //If there are at least 10 murals to geocode, call the first 10 murals\n if (geoCodeIndex > 10) {\n geoCodeLoop(geoCodeArray, geocoder, data, geoCodeIndex, 10);\n }\n //If there are less than 10 murals to code, either code the murals or don't call the function\n else if (geoCodeIndex < 10) {\n if (geoCodeIndex > 0) {\n geoCodeLoop(geoCodeArray, geocoder, data, geoCodeIndex, geoCodeIndex);\n }\n else if (geoCodeIndex <= 0) {\n console.log(\"Nothing to geocode\")\n }\n }\n //If the data isn't retrieved from the server, send the error message to the KO observable\n }).fail(function() {\n viewModel.ajaxFail('Failed to retrieve data via API');\n });\n map = new google.maps.Map(document.getElementById('map'), {\n center: {lat: 39.310000, lng: -76.610000},\n zoom: 13\n });\n}", "title": "" }, { "docid": "e93fd0a74ebdebb63f4f9b9dcf0d7aaf", "score": "0.505105", "text": "function extractWorksItems(data) {\n //Create document fragment to temporary store response text\n var docFrag = document.createElement(\"div\"),\n doc = {};\n \n docFrag.innerHTML = data;\n\n // Title of document\n doc.title = docFrag.querySelector(\"title\").innerHTML;\n\n doc.works = docFrag.querySelector(\".works_collection\");\n\n docInsert = document.createDocumentFragment();\n\n var elems = [].slice.call(doc.works.children);\n \n // Append elem to temporary document fragment\n for (var i = 0; i < elems.length; i++) {\n elem = elems[i] ;\n docInsert.appendChild( elem );\n }\n\n response = {\n title: doc.title,\n elems: elems,\n docInsert: docInsert,\n raw: docFrag\n };\n\n return response; \n }", "title": "" }, { "docid": "1cf8748745d522f542ae20a4e7df1a08", "score": "0.5049183", "text": "@computed\n get pathsToDocuments(): DocumentPath[] {\n let results = [];\n const travelDocuments = (documentList, collectionId, path) =>\n documentList.forEach(document => {\n const { id, title, url } = document;\n const node = { id, collectionId, title, url, type: \"document\" };\n results.push(concat(path, node));\n travelDocuments(document.children, collectionId, concat(path, [node]));\n });\n\n if (this.isLoaded) {\n this.data.forEach(collection => {\n const { id, name, url } = collection;\n const node = {\n id,\n collectionId: id,\n title: name,\n url,\n type: \"collection\",\n };\n results.push([node]);\n travelDocuments(collection.documents, id, [node]);\n });\n }\n\n return results.map(result => {\n const tail = last(result);\n return {\n ...tail,\n path: result,\n };\n });\n }", "title": "" }, { "docid": "825b14b72562c6d6678742c727010471", "score": "0.50486887", "text": "function getData(){\n console.log(\"citymap.length=\"+citymap.length);\n for (var city in citymap) {\n //console.log(\"getting top track for the country \"+citymap[city].Country+\" corresponding to the metro \"+ city);\n \n getTopTracks(citymap[city].Country, city);\n }\n console.log(\"HELLO ALLTOPTRACKS.length=\" +ALLTOPTRACKS.length);\n}", "title": "" }, { "docid": "6e22a11abe7336b508a9e6099b30bfc0", "score": "0.5038815", "text": "async getAllOurwork(){\n\n //Get all the data\n const data = await this.getData();\n //Remap the data to a new array\n const ourworks = data.map((service) => {\n return service.ourwork;\n });\n \n\n //Create a variable to store all the artworks\n var allOurWork = [];\n \n ourworks.forEach(function(element) {\n \n allOurWork.push(...element);\n });\n \n \n return allOurWork;\n \n }", "title": "" }, { "docid": "5a66ef7f1e9e55f3b9685527e90183e3", "score": "0.50385135", "text": "printAllPlaza () {\n\n\t\tvar mapa = this;\n\t\t$.each(mapa.plazas, function (i, plaza) {\n\n\t\t\tmapa.printPlaza (plaza);\n\n\t\t});\n\n\t}", "title": "" }, { "docid": "96494f76bb1f9a26c96c19b6b3f19588", "score": "0.503177", "text": "function searchForEntries () {\n // calculate bounds to search for\n if (userLocation.map.getBounds() !== undefined) {\n var bounds = userLocation.map.getBounds();\n var max_lat = bounds.getNorthEast().lat().toFixed(10);\n var max_lon = bounds.getNorthEast().lng().toFixed(10);\n var min_lat = bounds.getSouthWest().lat().toFixed(10);\n var min_lon = bounds.getSouthWest().lng().toFixed(10);\n // get nearby locations\n var locationsUrl = django_js_utils.urls.resolve(\"get-area-locations-with-stories-image\", {\n lat: min_lat,\n lon: min_lon,\n maxlat: max_lat,\n maxlon: max_lon\n });\n $.getJSON(locationsUrl, function (data) {\n $.each(data, function (index, value) {\n addMarker(value);\n })\n });\n }\n}", "title": "" }, { "docid": "c130e5116cb7cf8e19b16dc21d400245", "score": "0.50316495", "text": "values() {\n return this.#map.values();\n }", "title": "" } ]
c3a224305c97cf51a42bc2720371edad
Adds a row to the selection table with the specified image.
[ { "docid": "e38864ce57d9e0296322a46355232990", "score": "0.6516146", "text": "function addRow(img, uri, mime) {\n\tif (mime.startsWith(\"image\")) {\n\t\t//update arrays\n\t\timageList.push(img);\n\t\turiList.push(uri);\n\t\t\n\t\t//create row\n\t\tvar newRow = st.insertRow(st.getElementsByTagName(\"tr\").length - 1);\n\t\t\n\t\tpopulateRow(newRow, trimFilePath(img), uri);\n\t\ttoggleAddButtonFromURI(uri);\n\t\tnoImageCheck();\n\t\t\n\t\tinfo.innerHTML = \"\";\n\t} else {\n\t\talert(\"Error: File is not an image.\");\n\t}\n}", "title": "" } ]
[ { "docid": "43631921aec0c592e69c676b54251b05", "score": "0.66635966", "text": "function addRow() {}", "title": "" }, { "docid": "a9dc886ff3e49b4d042251b79d93679b", "score": "0.6229918", "text": "function addRow(id, status, table, track) {\n var new_row = $('<tr><td>'+id+'</td><td><img src=/images/icons/mic_ico.png border=0 width=45% height=40%></td><td>'+table+'</td><td>'+track+'</td></tr>');\n // new_row.hide();\n $('#karaoke > tbody').append(new_row);\n // new_row.fadeIn(1000);\n}", "title": "" }, { "docid": "69d835715d60f50a0beff6625376db1b", "score": "0.60664624", "text": "function addRow() {\n \n uploads.addRows(\"dataTable\",\"filename\");\n uploads.formreset(\"detailform\"); \n \n \n }", "title": "" }, { "docid": "707869cd61d98d5380a9c2e652ec5ae2", "score": "0.60636103", "text": "function entry(row) {\nfor (var i=0; i < selections.length; i++) {\n\t//iterate through pictures\n\tvar col=\"<img class='picture' src='images/\" + row[i] + \".jpg' alt='\" + row[i] + \"'>\";\n$('.first-row').append(col);\n}\n}", "title": "" }, { "docid": "c041cb4c5faa7a63a1ac853f006e4495", "score": "0.60533714", "text": "function addNewRow(){\n\t$(\"tr:last\").after(\"<tr><td class=cell style=font-family:Courier contenteditable=true></td><td class=cell style=font-family:Courier contenteditable=true></td><td onclick=deleteRow()><img src=https://cdn2.iconfinder.com/data/icons/aspneticons_v1.0_Nov2006/delete_16x16.gif alt=Smiley face></td></tr>\");\n}", "title": "" }, { "docid": "32b29cbf6cfb8c2ed67396426d6271ab", "score": "0.60372007", "text": "function populateRow(newRow, img, uri) {\n\t//add movement buttons\n\tvar moveCell = newRow.insertCell();\n\tmoveCell.setAttribute(\"class\", \"move\");\n\t\n\tvar topButton = document.createElement(\"div\");\n\ttopButton.setAttribute('class', 'imgButton topButton');\n\ttopButton.setAttribute('onclick', 'moveRow(this, true, true)');\n\ttopButton.title = \"Move image to top\";\n\ttopButton.appendChild(document.createElement(\"img\"));\n\ttopButton.children[0].setAttribute('src', '/img/top.png');\n\tmoveCell.appendChild(topButton);\n\t\n\tvar upButton = document.createElement(\"div\");\n\tupButton.setAttribute('class', 'imgButton upButton');\n\tupButton.setAttribute('onclick', 'moveRow(this, true, false)');\n\tupButton.title = \"Move image up\";\n\tupButton.appendChild(document.createElement(\"img\"));\n\tupButton.children[0].setAttribute('src', '/img/up.png');\n\tmoveCell.appendChild(upButton);\n\t\n\tmoveCell.appendChild(document.createElement(\"br\"));\n\t\n\tvar bottomButton = document.createElement(\"div\");\n\tbottomButton.setAttribute('class', 'imgButton bottomButton');\n\tbottomButton.setAttribute('onclick', 'moveRow(this, false, true)');\n\tbottomButton.title = \"Move image to bottom\";\n\tbottomButton.appendChild(document.createElement(\"img\"));\n\tbottomButton.children[0].setAttribute('src', '/img/bottom.png');\n\tmoveCell.appendChild(bottomButton);\n\t\n\tvar downButton = document.createElement(\"div\");\n\tdownButton.setAttribute('class', 'imgButton downButton');\n\tdownButton.setAttribute('onclick','moveRow(this, false, false)');\n\tdownButton.title = \"Move image down\";\n\tdownButton.appendChild(document.createElement(\"img\"));\n\tdownButton.children[0].setAttribute('src', '/img/down.png');\n\tmoveCell.appendChild(downButton);\n\t\n\t//add text\n\tvar textCell = newRow.insertCell();\n\ttextCell.setAttribute(\"class\", \"selectedFiles\");\n\ttextCell.appendChild(document.createTextNode(img));\n\t\n\t//add button\n\tvar buttonCell = newRow.insertCell();\n\tbuttonCell.setAttribute(\"class\", \"remove\");\n\tvar removeButton = document.createElement('div');\n\tremoveButton.setAttribute('class', 'imgButton removeButton');\n\tremoveButton.setAttribute('onclick','removeRow(this)');\n\tremoveButton.title = \"Remove image from selection\";\n\tremoveButton.appendChild(document.createElement(\"img\"));\n\tremoveButton.children[0].setAttribute('src', '/img/remove.png');\n\tbuttonCell.appendChild(removeButton);\n\t\n\t//store uri info in hidden cell\n\tvar uriCell = newRow.insertCell();\n\turiCell.innerHTML = uri;\n\turiCell.setAttribute('class', 'uri');\n\turiCell.style.display = \"none\";\n}", "title": "" }, { "docid": "3b79590678d9b8e4f264a3f4e2c402b0", "score": "0.60296166", "text": "function insertRowInTable(table, selectedMt) {\n let mtName = selectedMt.name;\n let mtDesc = selectedMt.desc;\n let mtElevation = selectedMt.elevation;\n let mtEffort = selectedMt.effort;\n let mtImg = selectedMt.img;\n\n //clearTable();\n let row = table.insertRow(table.rows.length);\n\n let cell1 = row.insertCell(0);\n cell1.innerHTML = \"<b>Name</b>\";\n let cell2 = row.insertCell(1);\n cell2.innerHTML = mtName;\n\n let row2 = table.insertRow(table.rows.length);\n let cell3 = row2.insertCell(0);\n cell3.innerHTML = \"<b>Desc</b>\";\n let cell4 = row2.insertCell(1);\n cell4.innerHTML = mtDesc;\n\n let row3 = table.insertRow(table.rows.length);\n let cell5 = row3.insertCell(0);\n cell5.innerHTML = \"<b>Elevation</b>\";\n let cell6 = row3.insertCell(1);\n cell6.innerHTML = mtElevation.toLocaleString() + \" ft\";\n\n let row4 = table.insertRow(table.rows.length);\n let cell7 = row4.insertCell(0);\n cell7.innerHTML = \"<b>Effort</b>\";\n let cell8 = row4.insertCell(1);\n cell8.innerHTML = mtEffort;\n\n let row5 = table.insertRow(table.rows.length);\n let cell9 = row5.insertCell(0);\n cell9.innerHTML = \"<b>Coordinates</b>\";\n let cell10 = row5.insertCell(1);\n cell10.innerHTML = \"( Latitude: \" + selectedMt.coords.lat + \"&#176;, Longitude: \" + selectedMt.coords.lng + \"&#176; )\";\n\n let row6 = table.insertRow(table.rows.length);\n let cell11 = row6.insertCell(0);\n cell11.innerHTML = \"<b>Image</b>\";\n let imgSrc = document.createElement(\"img\");\n imgSrc.src = \"img/\" + mtImg;\n let cell12 = row6.insertCell(1);\n cell12.appendChild(imgSrc);\n}", "title": "" }, { "docid": "354ea59c77698e98ef015b5d30a5cde2", "score": "0.6016247", "text": "function addRow() {\n \n}", "title": "" }, { "docid": "07aab093a43d018c258bd03cd2521939", "score": "0.59954065", "text": "function appendRow(data) {\n var row = '<tr>';\n for ( var i = 0; i < _metadata.length; i++) {\n var key = _metadata[i].field;\n row += '<td>' + data[key] + '</td>';\n }\n row += '</tr>';\n $(_tbody).append(row);\n\n // Make the new row selectable if the table allows it.\n if (_selectable) {\n selectableRow(_table, $(_rows + ':last'));\n }\n }", "title": "" }, { "docid": "87b52eb8d3b07b6980600f6a74d468cb", "score": "0.5985849", "text": "function AddToTable(chSelected) {\n\n var Table = document.getElementById(\"AmountTable\");\n var rowCount = $('#AmountTable tr').length;\n\n var row = Table.insertRow(rowCount);\n row.setAttribute(\"id\", \"row\" + chSelected.id);\n row.setAttribute(\"class\", \"CustomRow\");\n var cell1 = row.insertCell(0);\n var cell2 = row.insertCell(1);\n var cell3 = row.insertCell(2);\n var cell4 = row.insertCell(3);\n cell1.innerHTML = 1;\n cell2.innerHTML = chSelected.text;\n cell2.setAttribute(\"class\", \"ProductListItem\");\n cell3.innerHTML = chSelected.value;\n\n var link = document.createElement(\"a\");\n link.setAttribute(\"id\", chSelected.id);\n link.className = \"btn btn-danger\";\n var linkText = document.createTextNode(\"X\");\n link.appendChild(linkText);\n cell4.appendChild(link);\n }", "title": "" }, { "docid": "0b899b2ab026e52e5e0cccf9b054be0c", "score": "0.59735286", "text": "function add_product_table_row(index, id, model, picture, descript, cost, price, profit){\n\n if(picture == null){\n picture = \"no-image.png\";\n }\n\n table = \"\";\n table += \"<tr>\";\n table += \" <td>\" + index + \"</td>\";\n table += \" <td>\" + model + \"</td>\";\n table += \" <td>\" + \"<img src='../assert/product/\" + picture + \"' class='img-responsive'>\" + \"</td>\";\n table += \" <td>\" + descript + \"</td>\";\n table += \" <td>\" + cost + \"</td>\";\n table += \" <td>\" + price + \"</td>\";\n table += \" <td>\" + profit + \"</td>\";\n table += \" <td>\" + \"<i class='fa fa-fw fa-pencil-square-o change_product' product_id='\" + id + \"' style='cursor:pointer'></i>\" + \"<i class='fa fa-fw fa-trash-o delete_pro' data_id='\" + id + \"' style='cursor:pointer; color:red' data-toggle='modal' data-target='#modal-delete'></i>\" + \"</td>\";\n table += \"</tr>\";\n\n return table;\n\n }", "title": "" }, { "docid": "834ac2e972dda44a55704ce6b7ba1114", "score": "0.59129524", "text": "updateSelectedTableRow ({ commit }, row) {\n commit('SET_NEW_TABLE_ROW', row)\n }", "title": "" }, { "docid": "4cdcf08eca9330720c893c7b09ab9507", "score": "0.5904007", "text": "function addImageSource(table, index, name, value) {\n var row = table.insertRow(index);\n row.insertCell(0).innerHTML = name;\n\n if (name === \"Image URL\") {\n value = \"<a href='\" + value + \"'>Link</a>\";\n }\n\n row.insertCell(1).innerHTML = value;\n return row;\n}", "title": "" }, { "docid": "ade38086e5541abfc4156cb00936219c", "score": "0.5889336", "text": "function addRowAbove() {\n let row = createRow();\n let activeIndex = findActiveCellRowIndex();\n table.insertBefore(row, table.childNodes[activeIndex]);\n}", "title": "" }, { "docid": "f4241f0451f4a47028b23b356d82f0c0", "score": "0.5835826", "text": "function addRow(item, num, cost) {\n let row = table.insertRow(1);\n let cell1 = row.insertCell(0);\n let cell2 = row.insertCell(1);\n let cell3 = row.insertCell(2);\n cell1.innerHTML = item;\n cell2.innerHtml = num;\n cell3.innerHTML = cost;\n}", "title": "" }, { "docid": "98bc7830525bbf6c62a9439734ad140b", "score": "0.5783751", "text": "function newPreStudyRow(table, instance, objective) {\n if(objective) {\n var response = get5PointDescription(instance.response);\n } else {\n var response = instance.response;\n }\n var addRow = \"<tr>\" +\n \"<td>\" + instance.question + \"</td>\" +\n \"<td>\" + response + \"</td></tr>\";\n\n table.append(addRow);\n}", "title": "" }, { "docid": "5db576b661788040f843f1acc49930b5", "score": "0.57727706", "text": "function addRow(data) {\n const table = document.getElementById('tablebody');\n\n const tr = create('tr');\n\n const nameElem = create('td');\n nameElem.textContent = data.name;\n tr.appendChild(nameElem);\n\n const repsElem = create('td');\n repsElem.textContent = data.reps;\n tr.appendChild(repsElem);\n\n const weightElem = create('td');\n weightElem.textContent = data.weight;\n tr.appendChild(weightElem);\n\n const unitElem = create('td');\n unitElem.textContent = data.lbs ? 'lbs' : 'kg';\n tr.appendChild(unitElem);\n\n const dateElem = create('td');\n dateElem.textContent = data.date.slice(0,10);\n tr.appendChild(dateElem);\n\n const optElem = create('td');\n optElem.appendChild(createButtons(data.id));\n tr.appendChild(optElem);\n\n table.appendChild(tr);\n}", "title": "" }, { "docid": "b864a685630f69e2f5f93d840a28fddb", "score": "0.57389534", "text": "function appendRow() {\n var tbl = document.getElementById('my-table'), // table reference\n row = tbl.insertRow(tbl.rows.length), // append table row\n i;\n // insert table cells to the new row\n for (i = 0; i < tbl.rows[0].cells.length; i++) {\n createCell(row.insertCell(i), i, 'row');\n }\n}", "title": "" }, { "docid": "6e77271420fe48d553a0e836fe5326ae", "score": "0.57040364", "text": "function addRow() {\n var checkbox, row;\n\n // TODO: Set checkbox to a new \"input\" element.\n // TODO: Set the type attribute of checkbox to \"checkbox\".\n // TODO: Register the checkboxChange function\n // TODO: as a \"change\" event listener on the checkbox.\n\n // TODO: Set row to a new row (tr) that is appended to table.\n\n appendCell(row, checkbox);\n appendCell(row, nameInput.value);\n appendCell(row, relationshipSelect.value);\n appendCell(row, ageInput.value);\n\n // TODO: Clear nameInput by setting its value to an empty string.\n // TODO: Clear ageInput by setting its value to an empty string.\n // TODO: Move focus to nameInput.\n}", "title": "" }, { "docid": "9b4d5832fba499b8572b722c9719de1e", "score": "0.56860703", "text": "function addRow(tableID){var table=document.getElementById(tableID);\r\n\r\nvar rowCount=table.rows.length;\r\n\r\nvar row=table.insertRow(rowCount);var colCount=table.rows[0].cells.length;for(var i=0;i<colCount;i++){var newcell=row.insertCell(i);newcell.innerHTML=table.rows[0].cells[i].innerHTML;switch(newcell.childNodes[0].type){case\"text\":newcell.childNodes[0].value=\"\";break;case\"checkbox\":newcell.childNodes[0].checked=false;break;case\"select-one\":newcell.childNodes[0].selectedIndex=0;break;\r\n}}}", "title": "" }, { "docid": "24abbc624113222e05f64568d5835ced", "score": "0.5685642", "text": "function addRow(data, tableID)\n{\n\tvar table = document.getElementById(tableID);\n\tnewRow = table.insertRow(table.length);\n\t\n\tnewRow.id = data.id;\n\tnewRow.insertCell(0).textContent = data.name;\n\tnewRow.insertCell(1).textContent = data.reps;\n\tnewRow.insertCell(2).textContent = data.weight;\n\tnewRow.insertCell(3).textContent = data.date;\n\tnewRow.insertCell(4).textContent = data.lbs;\n}", "title": "" }, { "docid": "de9c4e26f32bf43c49439507ee33c985", "score": "0.5679476", "text": "function tableAddItem(txn) {\n\t vm.displayRowsCollection.push(txn);\n\t }", "title": "" }, { "docid": "bd28c8244a9598409cc3d79f2f3fdf5f", "score": "0.56787527", "text": "function addRow(tbl){\n var tr = document.createElement(\"tr\");\n tbl.appendChild(tr);\n }", "title": "" }, { "docid": "be33800f54499d4403bc3faa57481cb0", "score": "0.56780237", "text": "function addIngredientRow() {\n vm.ingredients.push({_id: (new Date).getTime()});\n }", "title": "" }, { "docid": "ac48ede312c6694d4e113c272a60b8d5", "score": "0.5676901", "text": "function addIngredientRow() {\n vm.recipe.ingredients.push({_id: (new Date).getTime()});\n }", "title": "" }, { "docid": "b35416d8a6026ce7e7cfe11a57873ada", "score": "0.5673817", "text": "function addRow(newRow) {\n setData(prev => prev.concat(newRow))\n alertSetter(true, \"success\", \"Success adding row!\")\n }", "title": "" }, { "docid": "1119796f7388290985ce0452c20bf8dc", "score": "0.56685257", "text": "function addRows2(srcImg, var1, var2, onClickSubmit){\n\tif($(\"#tableHBox tr\").length === 1){\n\t\t//remove row\n\t\t$(\"#tableHBox tr\").eq(0).remove();\n\t\t//removing tds using\n\t\t\n\t\t//add a second row\n\t\t$(\"#tableHBox\").append('<tr>'+\n\t\t\t\t\t\t\t\t\t'<td><label id=\"var1\" class=\"vars\"></label><img id=\"operator\"><label id=\"var2\" class=\"vars\"></label>'+\n\t\t\t\t\t\t\t\t\t'<img id=\"equalSign\" src=\"../img/equalSign.png\" alt=\"Equal sign\"></td>'+\n\t\t\t\t\t\t\t\t'</tr><tr>'+\n\t\t\t\t\t\t\t\t\t'<td><input type=\"text\" id=\"answerText\"></td>'+\n\t\t\t\t\t\t\t\t'</tr><tr>'+\n\t\t\t\t\t\t\t\t\t'<td><input type=\"submit\" value=\"Submit\" id=\"submitAnswer\" class=\"translate\"></td>'+\n\t\t\t\t\t\t\t\t'</tr>');\n\t\t\n\t\t$(\"#operator\").attr('src', srcImg);\n\t\t//change size of images\n\t\t$(\"#operator\").css(\"width\",\"40px\");\n\t\t$(\"#operator\").css(\"height\",\"40px\");\n\t\t$(\"#equalSign\").css(\"width\", \"40px\");\n\t\t$(\"#equalSign\").css(\"height\",\"40px\");\n\t\t$(\"#var2\").html(var2);\n\t\t$(\"#var1\").html(var1);\n\t\t\n\t\tonTextChange($(\"#submitAnswer\"));\n\t\t$(\"#submitAnswer\").click(function(){\n\t\t\tonClickSubmit();\n\t\t});\n\t}\n}", "title": "" }, { "docid": "33bf77842030f6f80adb082b3208e7ad", "score": "0.565361", "text": "function addPhoneToTable(data) {\n var table = $(\"#phonesTable\").DataTable();\n table.row\n .add({\n image: data.image,\n brand: data.brand,\n model: data.model,\n os: data.os,\n screensize: data.screensize,\n id: data.id\n })\n .draw();\n}", "title": "" }, { "docid": "38137b434ccdb39e496950ec6f62bbcb", "score": "0.56434816", "text": "function addRow (theTable){\r\n\t\tvar theObj = document.getElementById(theTable);\r\n\t\t//Check to ensure the object exists.\r\n\t\tif (theObj){\r\n\t\t\t//Add a new row to the end.\r\n\t\t\tnewTr = theObj.insertRow (theObj.getElementsByTagName(\"tr\").length);\r\n\t\t\tnewTr.style.height = \"30px\";\r\n\t\t\t//Then add the columns.\r\n\t\t\tfor (var j = 0; j < numCols; j++){\r\n\t\t\t\t//Create a new column.\r\n\t\t\t\tvar myTd;\r\n\t\t\t\tmyTd = document.createElement (\"td\");\r\n\t\t\t\tmyTd.style.width = \"20%\";\r\n\t\t\t\t//Add a \"remove\" button in the first element of each row.\r\n\t\t\t\tif (j == 0){\r\n\t\t\t\t\tmyTd.innerHTML = \"Click to Remove\";\r\n\t\t\t\t\tmyTd.onclick = function () { removeRow (theObj, this.parentNode.rowIndex); };\r\n\t\t\t\t}\r\n\t\t\t\t//Add the column to the listing.\r\n\t\t\t\tnewTr.appendChild (myTd);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b17c2df0e00557eae2e6ee0a8d661700", "score": "0.5617499", "text": "function extendTable() {\n var elements = document.getElementsByClassName(\"tr menuElement\");\n var headCol = document.createElement(\"div\"); // create and append header \"pictureSelection\" to the table\n headCol.setAttribute(\"name\", \"pictureSelection\");\n headCol.setAttribute(\"class\", \"td\");\n headCol.innerHTML = \"Picture selection\";\n document.getElementById('head').appendChild(headCol);\n\n for (var i = 0; i < elements.length; i++) { //loop every table row\n var elRow = document.createElement(\"div\"); //create div to display the images\n var input = document.createElement(\"input\"); // create input to edit pictures\n\n elRow.setAttribute(\"class\", \"td\");\n elRow.setAttribute(\"id\", \"autocomplete\");\n elRow.style.position = \"relative\";\n\n input.setAttribute(\"class\", \"input\");\n input.setAttribute(\"id\", \"pictureSelection\");\n input.setAttribute('oninput', 'pictureSelection(this)');\n\n var img = elements[i].children[elements[i].children.length - 1];\n\n var value = img.firstChild.src.split(\"/\");\n input.value = value[value.length - 1];\n\n\n elRow.appendChild(input);\n elements[i].appendChild(elRow);\n\n }\n\n}", "title": "" }, { "docid": "05835b8358d39a45aca502d99979ac2f", "score": "0.5612536", "text": "function addVehicle(id, color) {\r\n\tvar tr = document.getElementsByTagName('tr');\r\n\t$(\"#table-vehiclelist\").append(\r\n\t\t`<tr id=\"icon-vehicle-` + id + `\" onclick=\"selectVehicle(` + id + `)\" style=\"height: 40px;\">\r\n <td>\r\n <div style=\"border: none; background: none; width: 100%; margin-left:auto; margin-right:auto;\"><center><i class=\"icon-plane text-` + color + `\"></i></center></div>\r\n </td>\r\n </tr>`\r\n\t);\r\n}", "title": "" }, { "docid": "3813723e7c7e783db576fcb97968a0a1", "score": "0.5588021", "text": "function addInstanceRow(tableId) {\r\n\r\n\tvar tableObj=getTargetControl(tableId);\r\n\tvar tbodyOnlineEdit=getTableTbody(tableObj);\r\n\tvar theadOnlineEdit=tableObj.getElementsByTagName(\"tbody\")[0];\r\n\tvar elm=theadOnlineEdit.rows[theadOnlineEdit.rows.length-1].cloneNode(true);\r\n\t//alert(\"I am an alert box!!\")\r\n\t//alert(theadOnlineEdit.rows.length-1);\r\n\t\r\n\telm.style.display=\"\";\r\n\ttbodyOnlineEdit.appendChild(elm);\r\n\t//tbodyOnlineEdit.appendChild(elm);\r\n}", "title": "" }, { "docid": "d3b80afde04cb5a7baa565042a8e4e2a", "score": "0.5586452", "text": "addNewRow() {\n this.canvas.unshift([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]);\n }", "title": "" }, { "docid": "1499e37c957cda4a0bca441887c7242f", "score": "0.5584342", "text": "function insertRow(opts, change, at, // row index\ngetRow // Generate the row yourself\n) {\n var value = change.value;\n var startKey = value.startKey;\n\n\n var pos = _utils.TablePosition.create(opts, value.document, startKey);\n var table = pos.table;\n\n // Create a new row with the right count of cells\n\n var columns = table.nodes.get(0).nodes.size;\n var newRow = getRow ? getRow(columns) : (0, _utils.createRow)(opts, columns);\n\n if (typeof at === \"undefined\") {\n at = pos.getRowIndex() + 1;\n }\n\n return change.insertNodeByKey(table.key, at, newRow).collapseToEndOf(newRow.nodes.get(pos.getColumnIndex()));\n}", "title": "" }, { "docid": "7717fff0a941c20aff9818a86b2309c5", "score": "0.55755496", "text": "function AddRowButtonClicked() {\n\taddNewRowFlag = true;\n}", "title": "" }, { "docid": "2d02d276976666bd4f3e108fe11defe8", "score": "0.55548495", "text": "function row_add_datatables(table,dictionary_obj){\n table.row.add(dictionary_obj).draw( false );\n}", "title": "" }, { "docid": "2e568da6d01317ba881e351cbe767fc0", "score": "0.5545416", "text": "function insRow() {\n x = document.getElementById(\"table\").insertRow(1);\n c1 = x.insertCell(0);\n c2 = x.insertCell(1);\n c3 = x.insertCell(2);\n c4 = x.insertCell(3);\n c5 = x.insertCell(4);\n\n c6 = x.insertCell(5);\n}", "title": "" }, { "docid": "14f09454ea1804042492747558bfb1bb", "score": "0.55435085", "text": "function addRow() {\r\n //Read current selection\r\n var currentSelection = $( \"#item option:selected\" ).text();\r\n\r\n //Read the current table content\r\n // var row1 = document.getElementById('row1');\r\n // var row2 = document.getElementById('row2');\r\n\r\n //Users can only add 1 phone and one charger to the table \r\n //if table empty\r\n // if (row1 == null || row1 == \"\"){\r\n // $('#courtesy-phone-table row1').eq(0).html(row1.text());\r\n // }\r\n // $('#courtesy-phone-table currentSelection').eq(row1).html('test');\r\n $(\"#row1\").text(\"text\");\r\n\r\n\r\n //if table already has a phone\r\n //if selection has already been added\r\n\r\n //if table already has a charger\r\n //if selection has already been added\r\n\r\n \r\n\r\n //If Customer Type != business, then total is calculated as the 'bond' (business doesn't get charged bond)\r\n\r\n}", "title": "" }, { "docid": "b927043e986dd1b43c3fca9094f71a26", "score": "0.5541539", "text": "function addNewRowTable(table) {\n\ttry\t{\n\t\tvar row = $(\"#table-row tr\").clone();\n\t\tvar col_index = $('.'+ table + ' tbody tr').length;\n\t\tif (col_index < 30) {\n\t\t\t$('.'+ table + ' tbody').append(row);\n\t\t}\t\t\n\t\t_updateTable(table, true);\n\t\t//set first forcus input in row\n\t\t$('.'+ table + ' tbody tr:last :input:first').focus();\n\t} catch (e) {\n\t\tconsole.log('addNewRowTable: ' + e.message);\n\t}\n}", "title": "" }, { "docid": "d2e17790792d19b71faa1a5fb02cdbc4", "score": "0.5539578", "text": "function addDynamicRow(idTable, rowId, newRow, classRow, styleRow, pathImageDelete){\n var table = document.getElementById(idTable); \n if (table!=null){ //1\n var countRows = getCountRows(idTable);\n var row = table.insertRow(countRows);\n row.id=\"row\"+consecutiveRow;\n row.className = classRow;\n row.style.cssText = styleRow;\n if (row!=null && newRow.length>=2){//2\n for(i=0;i<= newRow.length;i++){//3\n var cell = newRow[i];\n var newCell = row.insertCell(i);\n var elementL;\n if (cell!=null){ \n if (cell[0] == SELECT){\n element = document.createElement(SELECT);\n if (cell.length>=9 && cell[9]!=null){\n for (k=0;k<cell[9].length;k++){\n var option = cell[9][k];\n if (option!=null){\n var opt = document.createElement(\"option\");\n opt.value = option[0];\n opt.innerHTML= option[1];\n element.appendChild(opt);\n }\n }\n }\n }else if (cell[0] == IMG){\n\t\telement = document.createElement(\"img\");\n if (cell.length >=10){\n\t element.src = cell[10];\n }\n }else if (cell[0] != STRING ){\n element = document.createElement(\"input\");\n\t element.type = cell[0];\n }\n \n\t element.id = cell[1];\n if (cell.length >=2){\n element.name = cell[2];\n }\n if (cell.length >=3){\n addEvents(element,cell);\n }\n if (cell.length >=4){\n element.className= cell[4];\n }\n if (cell.length >=5 && cell[0] != STRING ){\n element.style.cssText=cell[5];\n }\n if (cell.length >=7){\n newCell.className=cell[7];\n }\n if (cell.length >=8){\n newCell.style.cssText=cell[8];\n }\n if (cell.length >=11){\n element.value=cell[11];\n }\n }else{\n if (pathImageDelete!=null && pathImageDelete!=\"\"){\n newCell.style.cssText=\"text-align:center\";\n var element = document.createElement(\"img\");\n\t element.src = pathImageDelete;\n element.onmouseover= function(){ \n this.style.cursor='pointer';\n };\n element.onclick= new Function(\"deleteRow('\"+rowId+consecutiveRow+\"')\");\n\t }else{\n logs+=\"\\nMethod addDynamicRow: pathImageDelete is empty\";\n\t }\n }\n if ( cell!=null && cell.length >=6 && cell[6]!=null){\n var text = cell[6].split(\",\");\n\t \t\n if (text[1]==\"right\"){\n if (cell[0] != STRING ){\n\t newCell.appendChild(element);\n\t\t }\n\t\t newCell.appendChild(document.createTextNode(text[0]));\n }else{\n newCell.appendChild(document.createTextNode(text[0])); \n if (cell[0] != STRING ){\n newCell.appendChild(element);\n\t }\n }\n }else{\n \tnewCell.appendChild(element);\n }\n }//3\n }else{ //2\n logs+=\"\\nMethod addDynamicRow: The type and id of the cell are required\";\n }\n }else{ //1\n\tlogs+=\"\\nMethod addDynamicRow: The idTable doesn't exist \"+idTable;\n }\n consecutiveRow++;\n}", "title": "" }, { "docid": "b9fcef4f58032ce5225ac343e057850c", "score": "0.5537636", "text": "function addRow(table, values, startInd) {\n\t\tvar cell;\n\t\tfor (var i = 0; i < values.length; i++) {\t\t\t// for all cells in the table\n\t\t\tcell = table.rows[0].insertCell(startInd++);\t// insert a cell at startInd\n\t\t\tcell.innerHTML = values[i];\t\t\t\t\t\t// make the innerHTML of the cell cells[i]\n\t\t}\n\t}", "title": "" }, { "docid": "72a8fb1e9be01ab5f03e1683247b8e62", "score": "0.5534845", "text": "function appendRow(id,tb) {\r\n let tbl = document.getElementById(id); // table reference\r\n let row = tbl.insertRow(tbl.rows.length); // append table row\r\n\r\n // insert table cells to the new row\r\n for (let i = 0; i < tbl.rows[0].cells.length; i++) {\r\n createCell(row.insertCell(i), tb[i], 'row');\r\n }\r\n}", "title": "" }, { "docid": "5d65de08ed7ec047888a1dc602e1a08e", "score": "0.5521778", "text": "function appendRow(row)\r\n{\r\n var that = this;\r\n\r\n function exists(item)\r\n {\r\n return that.identifier && item[that.identifier] === row[that.identifier];\r\n }\r\n\r\n if (!this.rows.contains(exists))\r\n {\r\n this.rows.push(row);\r\n return true;\r\n }\r\n\r\n return false;\r\n}", "title": "" }, { "docid": "bc2f01676f1ff5d476de838746961de7", "score": "0.55173695", "text": "function addRow(data) {\n var row = '<tr data-id=' + data.id + ' id=\"row' + data.id + '\">' +\n '<td>' + data.rut + '</td>' +\n '<td>' + data.full_name + '</td>' +\n '<td>' +\n '<div class=\"t-actions\">' +\n '<a class=\"editar_parvulo\" href=\"#\" data-toggle=\"modal\" data-target=\"#modal-editar-parvulo\" role=\"button\" ><i class=\"fa fa-pencil\"></i></a>' + ' ' +\n '<a href=\"#\" type=\"submit\" class=\"btn-delete-parvulo\"><i class=\"fa fa-trash-o\"></i></a>' + ' ' +\n '</div>' +\n '</td>' +\n '</tr>';\n $('#t-header-content-principal').after(row);\n }", "title": "" }, { "docid": "2e0664bf2784b56cf26a10060be27721", "score": "0.5517318", "text": "function addItem(evt){\n var self = evt.target;\n var template = dom.closest(self, 'wb-row');\n // we want to clone the row and it's children, but not their contents\n var newItem = dom.clone(template);\n template.parentElement.insertBefore(newItem, template.nextElementSibling);\n}", "title": "" }, { "docid": "40f2f25e47b99b7b8669e4a491b176fd", "score": "0.55134046", "text": "function addRowBelow() {\n let row = createRow();\n let activeIndex = findActiveCellRowIndex();\n if (table.lastChild == table.childNodes[activeIndex]) {\n table.appendChild(row);\n }\n else {\n table.insertBefore(row, table.childNodes[activeIndex+1]);\n }\n}", "title": "" }, { "docid": "727e316c06649b6db784fde6faa77e31", "score": "0.54929686", "text": "function addRow() {\n let table = document.getElementById('tbl');\n\n // return the body of the table\n let tbody = Array.prototype.slice.call(table.children)[0];\n\n let numberOfRows = tbody.children.length;\n\n let lastRow = tbody.children[numberOfRows - 1];\n\n let numberOfCells = lastRow.children.length;\n \n let newRow = document.createElement('tr');\n\n while (numberOfCells > 0) {\n let td = document.createElement('td');\n newRow.appendChild(td);\n numberOfCells -= 1;\n }\n \n tbody.appendChild(newRow);\n return;\n }", "title": "" }, { "docid": "83efded1eae4ad39f5c5104f21bf5772", "score": "0.54889375", "text": "addRow(row){\n this.rowData.push(row);\n }", "title": "" }, { "docid": "63e43dcf203aa88657abc42efec3bdd0", "score": "0.54840004", "text": "function displayBreed(image) {\n\n // add a row to the table\n $(\".test\").append(\" <div class='col-sm-4'> <img id='' src='\" +image[0]['url']+\"' class='img-responsive my-cat-img' /><p>ID:\" + image[0]['breeds'][0]['id'] + \"</p></div>\");\n\n}", "title": "" }, { "docid": "d3b6beab33b135db4a63f67ba426710b", "score": "0.5483742", "text": "function addRow(){\n\t\tvar gridRowId = jQuery(\"#htmlTable\").getDataIDs().length;\n\t\tfor(var i = 1; i <= 10 - gridRowId ; i++){\n\t\t\tjQuery(\"#htmlTable\").jqGrid(\"addRowData\", gridRowId+i, datarow);\n\t\t}\n\t}", "title": "" }, { "docid": "2e0a35d04949b7b2b510b745b7d5e7cb", "score": "0.5472573", "text": "function createRow(parentElem, rowData) {\n\n\n for (let i = 0; i < rowData.results.length; i++) {\n const item = rowData.results[i];\n const tr = parentElem.insertRow(parentElem.rows.length);\n const cell1 = tr.insertCell(0).innerHTML = item.name.first + \" \" + item.name.last;\n const cell2 = tr.insertCell(1).innerHTML = item.gender;\n const cell3 = tr.insertCell(2).innerHTML = item.location.street.number + \" \" + item.location.street.name + item.location.city + \", \" + item.location.state + \", \" + item.location.country;\n const cell4 = tr.insertCell(3).innerHTML = item.dob.age;\n const cell5 = tr.insertCell(4).innerHTML = item.phone;\n //creating image\n //from source https://www.w3schools.com/jsref/dom_obj_image.asp\n const x = document.createElement(\"img\");\n x.setAttribute(\"src\", item.picture.medium);\n\n const cell6 = tr.insertCell(5).appendChild(x);\n\n }\n}", "title": "" }, { "docid": "3d2dda70b996767367d55bb2fc23c9ed", "score": "0.54685384", "text": "function addRow() {\n var rowIndividualName = (new Date()).toTimeString();\n\n var tr = document.createElement('tr');\n keywordsTable.appendChild(tr);\n\n\n var td = document.createElement('td');\n var selectList = document.createElement('select');\n var option = document.createElement(\"option\");\n option.value = 'all_cat';\n option.text = 'All categories';\n selectList.appendChild(option);\n\n for (var i in tableContent) {\n option = document.createElement(\"option\");\n option.value = i;\n option.text = i;\n selectList.appendChild(option);\n }\n selectList.name = rowIndividualName;\n selectList.setAttribute('class', 'select-categories');\n selectList.addEventListener('change', onSelectChange, false);\n td.appendChild(selectList);\n tr.appendChild(td);\n\n\n var td1 = document.createElement('td');\n var list = ['LIKE', '=', '<>'];\n var selectOperand = document.createElement('select');\n\n selectOperand.name = rowIndividualName;\n selectOperand.setAttribute('class', 'select-operations');\n fillingSelect(selectOperand, list);\n td1.appendChild(selectOperand);\n tr.appendChild(td1);\n\n\n var td2 = document.createElement('td');\n var elem = document.createElement('input');\n\n elem.type = 'text';\n elem.name = rowIndividualName;\n td2.appendChild(elem);\n tr.appendChild(td2);\n\n\n var td3 = document.createElement('td');\n var deleteImage = document.createElement('span');\n\n deleteImage.setAttribute('title', \"Delete this clause\");\n deleteImage.className = \"del-clause\";\n deleteImage.addEventListener('click', deleteRow, false);\n td3.appendChild(deleteImage);\n td3.setAttribute('style', 'width: 30px;');\n tr.appendChild(td3);\n}", "title": "" }, { "docid": "3afaed81311fa514eb5fbdef034d939e", "score": "0.54576504", "text": "function rowClicked(row){\n\t/* highlighting selected recipe row */\n\t$(\"tr.selected\").removeClass(\"selected\");\n\trow.classList.add(\"selected\");\n\t\n\tvar recipeID = row.firstElementChild.textContent;\n\tvar recipe_ings = recIngsMap[recipeID];\n\n\t/* setting selected recipe id */\n\t$(\"#recipe-id\").val(recipeID);\n\t$(\".input-sumbit\").show();\n\t\n\t/* empty selected options */\n\t$(\".pRemoveAll\").click();\n\n\t/* looping through recipe_ings map and making ingredients selected */\n\t$.each(recipe_ings, function (i, val) {\n\t\t$(\"option[data-id='\"+val.key+\"']\").prop('selected', true);\n\t\t$(\".pAdd\").click();\n\t});\n\t\n\t$(\"option\").prop('selected', false);\n}", "title": "" }, { "docid": "cc4ed3fd1db5bfb6a810314fc4500f67", "score": "0.54461455", "text": "function createRow(title, url, thumbnail, rating) {\n var tRow = $(\"<tr>\");\n var gifTitle = $(\"<td>\").text(title);\n var gifUrl = $(\"<td>\").text(url);\n var gifThumb = $(\"<img>\");\n gifThumb.attr(\"src\", thumbnail).attr(\"class\", \"preview\");\n var gifRating = $(\"<td>\").text(rating);\n var gifLink = $(\"<a>\");\n gifLink.html(\"[Link]\");\n gifLink.attr(\"href\", url).attr('target', '_blank').addClass(\"external\");\n tRow.append(gifTitle, gifUrl, gifThumb, gifRating, gifLink);\n $(\"tbody\").append(tRow);\n }", "title": "" }, { "docid": "1bb338e608d66b93e6b0915df817f4a4", "score": "0.54459006", "text": "function addErasers(){\n $('#myRemoveTable tr:last').after('<tr><td class=\"removeRow\"><input type=\"image\" src=\"images/Eraser-2-icon.png\" alt=\"Button\" onclick=\"deleteRow(this); deleteEraser(this)\"></td></tr>');\n}", "title": "" }, { "docid": "c608fcecde5e7b7b20ee6a4d55120d34", "score": "0.5421608", "text": "function addRows(table, value){\r\n let currentTable = document.getElementById(table);\r\n let table_num = currentTable.childElementCount\r\n let content = document.getElementById(value).innerHTML;\r\n\r\n let new_row = currentTable.insertRow(-1);\r\n new_row.innerHTML = content;\r\n\r\n}", "title": "" }, { "docid": "1bde4bdbb2fb8c41b048462d1baf7da7", "score": "0.5405504", "text": "function addSuggestRow(){\n\t \t\tvar srow = $( '<div class=\"add-row sg-row\"></div>' );\n\t \t\t$wpolayout.append( srow );\n\t \t\tsrow.click( function(){\n\t \t\t\taddRow( this );\n \t\t\t\t\n\t \t\t} );\n\t \t}", "title": "" }, { "docid": "f4f98cef5a9b043f9d4248b3b987a6f3", "score": "0.54028827", "text": "function addTableRow(rowData, options) {\r\n\t\tvar $row = $('<tr id=\"' + rowData.id + '\"></tr>');\r\n\t\t$row.data('tag', rowData);\r\n\t\t$.each(datasource.resource.fields, function(key, field) {\r\n\t\t\t$row.append($('<td class=\"'\r\n\t\t\t\t\t+ key\r\n\t\t\t\t\t+ (field.type != 'textarea' ? \" tui-nowrap\"\r\n\t\t\t\t\t\t\t: \" tui-large-cell\") + '\">'\r\n\t\t\t\t\t+ getFieldCellContent(field, rowData[key]) + '</td>'));\r\n\t\t});\r\n\r\n\t\tif (datasource.resource.relations) {\r\n\t\t\t$.each(datasource.resource.relations, function(key, relation) {\r\n\t\t\t\t$tdRelation = $('<td class=\"' + key\r\n\t\t\t\t\t\t+ 'tui-relation-column tui-nowrap\" />');\r\n\t\t\t\t$row.append($tdRelation);\r\n\t\t\t\tif (_this.enableShowRelations) {\r\n\t\t\t\t\tvar $button = addTableButton($tdRelation, new TableButton(\r\n\t\t\t\t\t\t\tfirstLetterToUpper(relation.title),\r\n\t\t\t\t\t\t\t'btn-show-relation', TableButtonIcon.Link,\r\n\t\t\t\t\t\t\t\"Zeigt die zugewiesene \"\r\n\t\t\t\t\t\t\t\t\t+ firstLetterToUpper(relation.title)\r\n\t\t\t\t\t\t\t\t\t+ \" an\"));\r\n\t\t\t\t\t$button.data(\"relation\", key);\r\n\t\t\t\t\t$button.addClass(\"tui-relation-button\");\r\n\t\t\t\t\t$button.css(\"font-weight\", \"normal\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$tdRelation.text(relation.title);\r\n\t\t\t\t}\r\n\t\t\t\tif (!showRelations) {\r\n\t\t\t\t\t$tdRelation.hide();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (rowButtons) {\r\n\t\t\t$td = $('<td class=\"tui-action-column tui-nowrap\" />');\r\n\t\t\t$row.append($td);\r\n\t\t\tvar i = 0;\r\n\t\t\trowButtons.forEach(function(tablebutton) {\r\n\t\t\t\t$button = addTableButton($td, tablebutton);\r\n\t\t\t\tif (i < rowButtons.length - 1) {\r\n\t\t\t\t\t$button.css('margin-right', '4px');\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t});\r\n\r\n\t\t\tif (!showActions) {\r\n\t\t\t\t$td.hide();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$tbody = $('tbody', $table);\r\n\t\tif (!options) {\r\n\t\t\t$tbody.append($row);\r\n\t\t} else if (options.replaceRowId) {\r\n\t\t\tvar $rowToReplace = $(\"#\" + options.replaceRowId, $tbody);\r\n\t\t\tif ($rowToReplace.length == 1) {\r\n\t\t\t\t$rowToReplace.replaceWith($row);\r\n\t\t\t} else {\r\n\t\t\t\t$tbody.append($row);\r\n\t\t\t}\r\n\r\n\t\t} else if (options.insertAfterRowId) {\r\n\t\t\tvar $anchorRow = $(\"#\" + options.insertAfterRowId, $tbody);\r\n\t\t\tif ($anchorRow) {\r\n\t\t\t\t$row.insertAfter($anchorRow);\r\n\t\t\t} else {\r\n\t\t\t\t$tbody.append($row);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $row;\r\n\t}", "title": "" }, { "docid": "1d1c347102e7b80affe5fc6a2d4c7e6c", "score": "0.53875005", "text": "function addRow(){\n var x = table.rows.length; \n var y = table.rows[0].cells.length;\n var row=table.insertRow(x);\n \n for (var c=0; c < y; c++) {\n var new_cell = row.insertCell(c);\n if(c<a)\n {\n new_cell.innerHTML = \"-\";\n new_cell.contentEditable=\"true\";\n }\n else\n {\n new_cell.innerHTML = \"0\";\n }\n if(c>a)\n {\n new_cell.classList.add('show');\n }\n if(c===0)\n {\n new_cell.onclick = function() {highlight(x)};\n }\n }\n b++;\n display();\n calc();\n}", "title": "" }, { "docid": "b0a68ae51cb0951906c647dab5103983", "score": "0.53775054", "text": "function trinding_row(){\r\n var row=document.getElementById(\"trinding-row\");\r\n for(var i=0;i<20;i++){\r\n var imgs=document.createElement(\"img\");\r\n imgs.src=image_api+data.results[i].poster_path;\r\n // add style to img\r\n imgs.classList.add(\"trinding-cards\");\r\n // append img in trinding row div\r\n row.appendChild(imgs);\r\n }\r\n }", "title": "" }, { "docid": "8b98c846a5557c3653eabb60187bc5aa", "score": "0.53740776", "text": "function addRow(_ind,_tea,_tep,_pg,_si,_int,_cuota,_amort,_sf){\n $('#tableResult > tbody:last-child')\n .append(\n '<tr class=\"table\"> ' +\n '<td>'+_ind+'</td>'+\n '<td>'+_tea+'</td>'+\n '<td>'+_tep+'</td>'+\n '<td>'+_pg+'</td>'+\n '<td>'+_si+'</td>'+\n '<td>'+_int+'</td>'+\n '<td>'+_cuota+'</td>'+\n '<td>'+_amort+'</td>'+\n '<td>'+_sf+'</td>'+\n '</tr>');\n}", "title": "" }, { "docid": "16b325aa2a5ee4c542730ac119fe74a1", "score": "0.5372128", "text": "onRowImageSelected(index) {\n Analytics.record({\n name: analyticsEvents.image_selected_from_highlights,\n attributes: { screen: this.props.screen, imageIndex: this.props.index }\n })\n\n this.props.onImageSelected(index);\n }", "title": "" }, { "docid": "c8b49eb6a08403d2df9adb2c819d8bb9", "score": "0.53615886", "text": "function AddNewRowAfter(data, rowNum) {\n\t// Create the field's title label\n\tvar fieldTitleLabel = Ti.UI.createLabel({\n\t\ttext: data.TextOfFieldTitle\n\t});\n\t$.addClass(fieldTitleLabel, \"fieldTitleLabel\");\n\n\t// Create the field's value text field\n\tvar fieldTextField = Ti.UI.createLabel({\n\t\ttext: data.TextOfField != \"\" ? data.TextOfField : data.HintTextOfField,\n\t\thintText: data.HintTextOfField,\n\t\tfieldType: data.FieldType,\t// Used in editing the addable fields, to know the array that should be processed\n\t\tkeyboardType: data.KeyboardType,\n\t\tkeyboardToolbar: data.KeyboardToolbar,\n\t});\n\t// After applying the class with gray color, must check if it's hint text or value text\n\t$.addClass(fieldTextField, \"fieldText\");\n\tif(data.TextOfField != \"\") fieldTextField.color = 'black';\n\tfieldTextField.addEventListener(\"click\", ValueLabelClicked);\n\t\n\t// Create the field's privacy label\n\tvar privacyLabel = Ti.UI.createLabel({\n\t\ttext: data.TextOfPrivacy,\n\t\tfieldType: data.FieldType,\t// Used in editing the addable fields' privacy, to know the array that should be processed\n\t});\n\tprivacyLabel.addEventListener(\"click\", PrivacyLabelClicked);\n\t$.addClass(privacyLabel, \"privacyLabel\");\n\t\n\t// Create the field's row\n\tvar newRow = Ti.UI.createTableViewRow({\n\t\tfieldType: data.FieldType,\n\t\tfieldValue: data.TextOfField\t// Used in deleting the row, to get the value's index in the array\n\t});\n\t$.addClass(newRow, \"fieldRow\");\n\t\n\tnewRow.add(fieldTitleLabel);\n\tnewRow.add(fieldTextField);\n\tnewRow.add(privacyLabel);\n\t\n\t// Add a remove row image view for android\n\tif(OS_ANDROID) {\n\t\tvar removeIcon = Ti.UI.createImageView();\n\t\tremoveIcon.addEventListener(\"click\", function() { androidDeleteRowFlag = true; });\n\t\t$.addClass(removeIcon, \"removeRowImage\");\n\t\tnewRow.add(removeIcon);\n\t}\n\t\n\t$.tableView.insertRowAfter(rowNum - 1, newRow, { animated: true });\n}", "title": "" }, { "docid": "ea2db6b0b3b8916bf13399a280c4fcc7", "score": "0.5348609", "text": "_addNewRowFromModal() {\n const data = this._getFormData();\n this._addSpinner();\n fetch(this._apiPath + '/products/add', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(data),\n })\n .then((response) => {\n response.json();\n this._removeSpinner();\n })\n .then((data) => {\n this._datatable.draw();\n })\n .catch((error) => {\n console.error('Error:', error);\n });\n this._datatableExtend.unCheckAllRows();\n this._datatableExtend.controlCheckAll();\n }", "title": "" }, { "docid": "f866c0b2b62450c307f8ed7fa42808e4", "score": "0.532621", "text": "addRowWithData(name) {\n var rows = this.state.rows;\n var fake_rows = this.state.fake_rows;\n var data = reviewData;\n var new_row = data[name]\n\n if (!new_row) {\n alert(\"Professor Not Found\");\n console.log(name);\n } else if (rows.indexOf(new_row) === -1) {\n new_row.id_num = rows.length + 1;\n rows.push(new_row);\n this.setState({ fake_rows: fake_rows });\n this.setState({ rows: rows });\n }\n }", "title": "" }, { "docid": "8904a490d40504fd0aeae32fcc799ae1", "score": "0.5324883", "text": "function addRow(r) {\n\tvar allRows, cClk, cInp, cRow, cSel, idName, idNo, i, j, myRoot, newArray, newId, newNo, newOnclk, size, sizeMe, thisClick;\n\tmyRoot = document.getElementById(r).getElementsByTagName('TBODY')[0];\n\tallRows = myRoot.getElementsByTagName('TR');\n\tsizeMe = r.length;\n\tsize = allRows.length;\n\tidNo = parseInt(allRows[0].id.substr(sizeMe), 10) + 1;\n\tnewId = generateUniqueIdName(r, idNo);\n\tnewNo = newId.substr(sizeMe);\n\tcRow = allRows[0].cloneNode(true);\n\treplaceIdNumber(cRow, addZero(1), addZero(size + 1));\n\tmyRoot.appendChild(cRow);\n\tvar j = document.getElementById(r).parentNode.getElementsByTagName('INPUT')[1];\n\tj.disabled = false;\n}", "title": "" }, { "docid": "a5aee9f0db9bf63884bf3f8dc7195283", "score": "0.5322033", "text": "function addRow() {\n\t\tvar row = {};\n\t\trow.newRow = true;\n\t\tthat.projects = that.projects || [];\n\t\tthat.projects.push(row);\n\t\trow.times = angular.copy(that.timeSheet);\n\t}", "title": "" }, { "docid": "109797f5cd0c9def78ebf01a6ac03ad1", "score": "0.5285896", "text": "function probar_conexion_red(){\n /*--- primero probamos la conexion a la red \n se crea un campo donde se carga una imagen, si esta carga hay conexion ---*/\n var tabla = $('#dataTable').attr(\"id\");\n addRow(tabla);\n}", "title": "" }, { "docid": "f85d7704068abc048f1fb6f6d7c285d2", "score": "0.5265692", "text": "function addRow(count,docID,keyData,dbData,currentData,dbKey) {\n\tvar empTab = document.getElementById(docID + '_docDetailsTable');\n\n\tvar rowCnt = empTab.rows.length; // GET TABLE ROW COUNT.\n\tvar tr = empTab.insertRow(rowCnt); // TABLE ROW.\n\ttr = empTab.insertRow(rowCnt);\n\n\t// Check Both DATA\n\t// If DATA is changed then mark it red\n\tif(dbData != currentData) {\n\t tr.setAttribute(\"class\",'table-danger');\n\t}\n\n\tfor (var c = 0; c < arrHead.length; c++) {\n\t\tvar td = document.createElement('td'); // TABLE DEFINITION.\n\t\ttd = tr.insertCell(c);\n\n\n\t\tswitch(c) {\n\t\t\tcase 0:\n\t\t\t\ttd.innerHTML = count;\n\n\t\t\tbreak;\n\n\t\t\tcase 1:\n td.innerHTML = keyData;\n\n break;\n\n case 2:\n td.innerHTML = dbKey;\n\n break;\n\n\t\t\tcase 3:\n td.innerHTML = dbData;\n\t\t\tbreak;\n\n\t\t\tcase 4:\n td.innerHTML = currentData;\n\t\t\tbreak;\n\t\t}\n\n\n\t}\n}", "title": "" }, { "docid": "bafd50346dc9012117bfe6854fb8809b", "score": "0.52656883", "text": "function addPlaysheetRow(){\n\t\tinsertPlaysheetRow(num_rows-1);\t\n\t}", "title": "" }, { "docid": "006ca95fccad2fae3e953f3cb7b4a77c", "score": "0.5264147", "text": "function addSrcItem() {\n var srcTable = document.getElementById(\"src_table\");\n var row = srcTable.insertRow(1);\n var item = row.insertCell(0);\n var num = row.insertCell(1);\n var desc = row.insertCell(2);\n var numRows = srcTable.rows.length - 1;\n item.innerHTML = buildDropDown(\"src_item_\", numRows, mySpareItemsLst);\n // item.innerHTML = \"<select name=\\\"src_items\\\" id=\\\"src_item_\" + numRows + \"\\\"><option value=\\\"dst_wheel\\\">Wheel</option><option value=\\\"dst_chassis\\\">Chassis</option><option value=\\\"dst_body\\\">Door</option><option value=\\\"dst_ngine\\\">Engine</option></select>\";\n num.innerHTML = \"<input id=\\\"src_num_\" + numRows + \"\\\"type=\\\"number\\\" placeholder=\\\"How many\\\" value=\\\"\\\" />\";\n desc.innerHTML = \"<label>Descr...</label>\";\n\n // if(numRows > 2) {\n // document.getElementById('src_item_1').addEventListener('change', function() {\n // console.log('You selected: ', this.value);\n // });\n // }\n}", "title": "" }, { "docid": "1fba219141fcc88efd29dad36069516f", "score": "0.52603185", "text": "function addRow() {\n let table = document.getElementById(\"objectiveTable\");\n // the -1 allows it to be the last item to be added in the table\n let row = table.insertRow(-1);\n let cell1 = row.insertCell(0);\n let cell2 = row.insertCell(1);\n let cell3 = row.insertCell(2);\n let cell4 = row.insertCell(3);\n let cell5 = row.insertCell(4);\n cell1.outerHTML = \"<th>First</th>\";\n cell2.outerHTML = \"<td dir='ltr' class='tLine' nowrap ondblclick='addInput(this)'>New Student</td>\";\n cell3.className = \"red\";\n cell4.className = \"red\";\n cell5.className = \"red\";\n //need to re-run colorChange so that the array is updated with the new items that are inserted\n colorChange()\n}", "title": "" }, { "docid": "1ad919e25fdff5835ef77750a2a37557", "score": "0.5254622", "text": "function addRowImages(cell, cellData, rowData, row, col) {\n //assign variables for\n //populating certain attributes\n //of the HTML tags to be formed below\n var songtitle = rowData[0],\n altsongtitlesplit = rowData[0].split(' '),\n altsongtitle = altsongtitlesplit.join('-');\n \n //form a new img element\n var newCellHTML = '<img src=\"https://i3.ytimg.com/vi/'; \n newCellHTML += cellData;\n newCellHTML += '/mqdefault.jpg\" alt=\"'; \n newCellHTML += altsongtitle;\n newCellHTML += '-thumbnail\" ';\n newCellHTML += 'height=\"84px\" width=\"154px\" ';\n newCellHTML += 'longdesc=\"Thumbnail for the Youtube karaoke video of \\''; \n newCellHTML += songtitle + '\\'\" title=\"' + songtitle + '\"/>';\n \n //place the img element into\n //the relevent videos table TD\n $(cell).html(newCellHTML);\n }", "title": "" }, { "docid": "626e4257bbcbd01df7358dff0709cba6", "score": "0.5254216", "text": "onImagePress(rowData = {}, rowID = null) {\n // Your logic here\n // Eg: Navigate to the user profile\n }", "title": "" }, { "docid": "425642cc796badbb6615c55dff4489f6", "score": "0.5237545", "text": "appendCellsToRow() {\r\n\r\n\t}", "title": "" }, { "docid": "17ad1b305a8c79275fa7ca828041cfb0", "score": "0.5235052", "text": "function addRow() {\n let tr = document.createElement(\"tr\");\n let td = document.createElement(\"td\");\n td.setAttribute(\"class\", \"row-index\");\n td.innerHTML = ++rowSize;\n tr.appendChild(td);\n for (let i = 0; i < columnSize; i++) {\n let td = createNewCell();\n tr.appendChild(td);\n }\n EXCEL.appendChild(tr);\n}", "title": "" }, { "docid": "ece69b71ef231a338d33ff95deca9a4d", "score": "0.5224552", "text": "function addRowClick(){\n let tbBox = document.getElementsByClassName('table-box')[0];\n\n g_table.createNewRow();\n document.documentElement.scrollTop = document.documentElement.scrollHeight;\n tbBox.scrollLeft = 0;\n\n}", "title": "" }, { "docid": "a3e49dcea3342fa9a11fb0939c9f5b17", "score": "0.5224394", "text": "function addInstanceRow(objTable,Names,Values){\n var tbodyOnlineEdit=objTable.getElementsByTagName(\"TBODY\")[0];\n var theadOnlineEdit=objTable.getElementsByTagName(\"THEAD\")[0];\n //true表示深度克隆\n var elm = theadOnlineEdit.lastChild.cloneNode(true)\n elm.style.display=\"\";\n for(var i=0;i<Names.length;i++){\n setInputValue(elm,Names[i],Values[i]);\n }\n fileCount = fileCount + 1;\n tbodyOnlineEdit.insertBefore(elm);\n}", "title": "" }, { "docid": "27bae5efa3153d0c23a885165bad67ee", "score": "0.5218299", "text": "function addRowToTable(tableId, newRows, rowCount)\r\n{\r\n\tvar tbl = document.getElementById(tableId).tBodies[0];\t// get tbody of table\r\n\tvar lastRow = tbl.rows.length;\t\t\t\t\t\t\t// get number of rows currently in tbody\r\n\tvar limit = lastRow + newRows;\t\t\t\t\t\t\t// max\r\n\t\r\n\tfor(index = lastRow + 1; lastRow < limit; index ++)\r\n\t{\r\n\t\tvar row = tbl.insertRow(lastRow);\r\n\t\t\r\n\t\t// index cell\r\n\t\tvar indexCell = row.insertCell(0);\r\n\t\tindexCell.innerHTML = index+\".\";\r\n\t\t\r\n\t\t// part number cell\r\n\t\tvar partNumCell = row.insertCell(1);\r\n\t\tvar e1 = document.createElement('input');\r\n\t\te1.type = 'text';\r\n\t\te1.name = 'ProductIdentifier_' + index;\r\n\t\te1.id = 'ProductIdentifier_' + index;\r\n\t\te1.size = 40;\r\n\t\te1.maxLength = 40;\r\n\t\tpartNumCell.appendChild(e1);\r\n\t\t\r\n\t\t// quantity cell\r\n\t\tvar qtyCell = row.insertCell(2);\r\n\t\tvar e2 = document.createElement('input');\r\n\t\te2.type = 'text';\r\n\t\te2.name = 'ProductQuantity_' + index;\r\n\t\te2.id = 'ProductQuantity_' + index;\r\n\t\te2.size = 7;\r\n\t\te2.maxLength = 7;\r\n\t\tqtyCell.appendChild(e2);\r\n\t\t\r\n\t\t// clear link cell\r\n\t\tvar clearCell = row.insertCell(3);\r\n\t\tclearCell.className = \"small\";\r\n\t\tclearCell.innerHTML = \"<a href=\\\"#\\\" onClick=\\\"document.getElementById('ProductIdentifier_\"+index+\"').value='';document.getElementById('ProductQuantity_\"+index+\"').value=''; return false;\\\">Clear</a>\";\r\n\t\t\r\n\t\tlastRow++;\r\n\t}\r\n\t\r\n\tdocument.getElementById(rowCount).value=lastRow;\r\n}", "title": "" }, { "docid": "76c7637c746503d0ae529cff20bd03ed", "score": "0.52171075", "text": "function addRow(element) {\n\n // Get a reference to the table\n var table = document.getElementById('ufo-table').getElementsByTagName('tbody')[0];\n\n // Get the count of the cells to iterate and add values \n cellCount = document.getElementById('ufo-table').rows[0].cells.length;\n\n // Create a array of values from the object 'element' \n values = Object.values(element);\n\n // Insert a row at the end of the table by using -1 index\n var newRow = table.insertRow(-1);\n\n // Insert cells iterating over values array for the length of header cells \n for(i = 0; i < cellCount; i++) {\n \n // Insert a cell in the row at index i\n var newCell = newRow.insertCell(i);\n\n // Append a text node to the cell with value at index i \n var newText = document.createTextNode(values[i]);\n newCell.appendChild(newText);\n };\n\n }", "title": "" }, { "docid": "344b5124873f687e21547a0ed65e9a5d", "score": "0.52115667", "text": "function addNewNGRowTable() {\n\tcloneNGRowTableAutoIncrementNo();\n\tresetNGLastRowTable();\n}", "title": "" }, { "docid": "37899e4326d66a2c12c57d3a02aa26e8", "score": "0.5210868", "text": "function insertRow(position, data, animationPower)\n {\n position = Math.max(0, Math.min(rowsPresent.length, position));\n animationPower = (animationPower === undefined ? 4 : animationPower);\n\n var domId = nextRowId();\n var row = {\n data: data,\n animationStep: ANIMATION_START,\n domId: domId,\n animationPower: animationPower\n };\n var authorId = data.id;\n\n handleRowData(row);\n rowsPresent.splice(position, 0, row);\n var tr;\n if (animationPower == 0)\n {\n tr = $(getRowHtml(domId, getUserRowHtml(getAnimationHeight(0), data), authorId));\n row.animationStep = 0;\n }\n else\n {\n rowsFadingIn.push(row);\n tr = $(getRowHtml(domId, getEmptyRowHtml(getAnimationHeight(ANIMATION_START)), authorId));\n }\n handleRowNode(tr, data);\n if (position == 0)\n {\n $(\"table#otheruserstable\").prepend(tr);\n }\n else\n {\n rowNode(rowsPresent[position - 1]).after(tr);\n }\n\n if (animationPower != 0)\n {\n scheduleAnimation();\n }\n\n handleOtherUserInputs();\n\n return row;\n }", "title": "" }, { "docid": "a66be666f8b9a14468255f91e89b33f2", "score": "0.52062064", "text": "function insertDataToRow(i) {\n let rows = body.insertRow();\n rows.insertCell().innerHTML = GOODS[i].category;\n rows.insertCell().innerHTML = GOODS[i].name;\n rows.insertCell().innerHTML = GOODS[i].amount;\n rows.insertCell().innerHTML = GOODS[i].price;\n}", "title": "" }, { "docid": "939d1c1984f4da8477aa0d8a98f96220", "score": "0.5203993", "text": "function addAttachmentRow(tableId)\n{\n\tvar tbl = document.getElementById(tableId);\n\tvar lastRow = tbl.rows.length;\n\t\n\t// Check if maximum number of allowed attachments reached\n\tif (lastRow == NO_ATTACHMENTS_ALLOWED - 1)\n\t{\n\t\t// Don't allow any more attachments to be added\n\t\tdocument.getElementById(\"addAttachment\").disabled = true;\n\t}\n\t\n\t// Insert row/cell in table\n\tvar row = tbl.insertRow(lastRow);\n\tvar cell = row.insertCell(0);\n\tcell.className = 'Attachment';\n\n\t// Create new unique name for file (since they can be deleted and added as-desired)\n\tvar fname = 'fileName' + fileIndex++;\n\t\n\tcell.innerHTML = '<label class=\"BrowseButtonLabel\">&nbsp;</label>' + \n\t\t' <span class=\"BrowseButtonClass\"><input type=\"file\" name=\"' + fname + '\" contentEditable=\"false\" />' +\n\t\t' </span><span class=\"RemoveButtonWrapper\">' +\n\t\t' <img class=\"RemoveButtonClass\" name=\"remove\" title=\"' + REMOVE + '\"' +\n\t\t' onclick=\"removeAttachmentRow(\\'' + tableId + '\\','+ row.rowIndex+');\"' +\n\t\t' src=\"' + commonVariables.templatePath + '/images/delete.gif\" /></span>';\n\n\tcell = row.insertCell(1);\n}", "title": "" }, { "docid": "5d83bd8e7bd70a4a29779ff01b6f0387", "score": "0.520169", "text": "function insRow1() {\n x = document.getElementById(\"accepted\").insertRow(1);\n c1 = x.insertCell(0);\n c2 = x.insertCell(1);\n c3 = x.insertCell(2);\n c4 = x.insertCell(3);\n}", "title": "" }, { "docid": "5d5136e5ca3b0bff2e78265d829cd498", "score": "0.51907057", "text": "function addRowToTable(num)\r\n{\r\n\r\n\t\tvar tbl = document.getElementById(TABLE_NAME);\r\n\t\tvar nextRow = tbl.tBodies[0].rows.length;\r\n\t\tvar iteration = nextRow + ROW_BASE;\r\n\t\tif (num == null) { \r\n\t\t\tnum = nextRow;\r\n\t\t} else {\r\n\t\t\titeration = num + ROW_BASE;\r\n\t\t}\r\n\t\t\r\n\t\t// add the row\r\n\t\tvar row = tbl.tBodies[0].insertRow(num);\r\n\t\t\r\n\t\t// CONFIG: requires classes named classy0 and classy1\r\n\t\trow.className = 'classy' + (iteration % 2);\r\n\t\r\n\t\t// CONFIG: This whole section can be configured\r\n\t\t\r\n\t\t// cell 0 - text\r\n\t\tvar cell0 = row.insertCell(0);\r\n\t\tvar textNode = document.createTextNode(\"Enter the question \"+iteration);\r\n\t\tcell0.className='classlangTestleft_TDDYNA';\t\r\n\t\tcell0.appendChild(textNode);\r\n\t\t\r\n\t\t// cell 1 - input text\r\n\t\tvar cell1 = row.insertCell(1);\r\n\t\tvar txtInp = document.createElement('input');\r\n\t\ttxtInp.type = 'text';\r\n\t\ttxtInp.name = INPUT_NAME_PREFIX;\r\n\t\ttxtInp.setAttribute('id', 'mockTest'+ iteration);\r\n\t\ttxtInp.setAttribute('class', 'reSizeforOther');\t\r\n\t\ttxtInp.setAttribute('onkeypress', 'return AllowChars(event);');// onkeypress=\"return AllowChars(event);\"\t\r\n\t\tcell1.className='classlangTestright_JS';\t\r\n\t\tcell1.setAttribute('colspan', '3' );\r\n\t\tcell1.appendChild(txtInp);\r\n\t\t\r\n\t\t// cell 3 - delete button\r\n\t\tvar cell2 = row.insertCell(2);\r\n\t\tvar btnEl = document.createElement('input');\r\n\t\t\r\n\t\tbtnEl.type = 'button';\r\n\t\tbtnEl.value = '';\r\n\t\tbtnEl.setAttribute('style', 'width:16px; height:16px;float:center;');\r\n\t\tbtnEl.setAttribute('class', 'srcvis');\r\n\t\tbtnEl.onclick = function () {deleteCurrentRow(this)};\r\n\t\tcell2.className='delImg';\r\n\t\tcell2.appendChild(btnEl);\r\n\t\t\t\t\r\n\t\t// Pass in the elements you want to reference later\r\n\t\t// Store the myRow object in each row\r\n\t\trow.myRow = new myRowObject(textNode, txtInp);\r\n\t\t\r\n\t\tdocument.getElementById('total_box').value = iteration; // Stores the total value\r\n\t\tdocument.getElementById('PartAPart1QCountDIV').innerHTML = iteration;\r\n\r\n\t}", "title": "" }, { "docid": "59fd73a60854ad2f77117febad07790e", "score": "0.5190579", "text": "function addItemToTableFromForm(e){\r\n e.preventDefault();\r\n\r\n console.log('e.target.id - table');\r\n console.log(e.target.id);\r\n console.log('>>');\r\n \r\n // Get input value\r\n var newItem = inputForm.value;\r\n inputForm.value = null;\r\n\r\n console.log(`>newItem ${newItem} - ${newItem.trim().length} [${newItem.trim()}]`);\r\n\r\n // break it into constituents \r\n ingredientLineArray = splitLineIntoQtyAndIngredient(newItem); // return [qty, units, modifier, ingredient];\r\n\r\n // timestamp it \r\n if (ingredientLineArray[TRACK_NIX_TIME] === null) {\r\n ingredientLineArray[TRACK_NIX_TIME] = timeNixTimeInms(); \r\n }\r\n\r\n // create html ID for it\r\n ingredientLineArray[HTML_ID] = idFromIngredient(ingredientLineArray);\r\n \r\n //atomic, qty, sevings, item, timestamp, img_id, html_id\r\n // ['1', '180g', '(0)', 'steak', 1568927767066, tag_id]\r\n \r\n dtk['dtk_rcp']['ingredients'].push(ingredientLineArray); \r\n \r\n // reset yield to zero so it's recalculated\r\n invalidateYield();\r\n\r\n // all print exaclty the same thing\r\n console.log( `dtk['dtk_rcp'] ingredientLineArray - ${ingredientLineArray}` ); // => [[ingredient_arr]]\r\n //console.log( `dtk['dtk_rcp']['ingredients'][lastIngredient] - ${dtk['dtk_rcp']['ingredients'][lastIngredient]}` );// => [ingredient_arr]\r\n \r\n //addRowToTable( tableWithFocus, dtk['dtk_rcp']['ingredients'][lastIngredient]);\r\n addRowToTable( tableWithFocus, ingredientLineArray);\r\n\r\n console.log(dtk['dtk_rcp']['ingredients']);\r\n \r\n}", "title": "" }, { "docid": "cfe9902ccc26c0186955b2fcc21c08cc", "score": "0.5190247", "text": "function TableViewRowClicked(e) {\n\tif(addNewRowFlag) {\n\t\t// Add it to the user's data, the call is by reference, so no need to wait a returning value\n\t\taddNewFieldToUserData(userDataInArrays, e.row.isInterest > 0 ? \"interests\" : \"favorite_places\");\n\t\t\n\t\t// Add it to the UI\n\t\tvar data = createBindingRowData(\"\", \"friends\", e.row.isInterest > 0);\n\t\tAddNewRowAfter(data, e.index + 1);\n\t\taddNewRowFlag = false;\n\t}\n\t// If delete flag is true, delete the selected row for android\n\telse if(OS_ANDROID && androidDeleteRowFlag) {\n\t\tDeletePressed({ source: {\n\t\t\tfieldType: e.row.fieldType,\n\t\t\tfieldValue: e.row.fieldValue,\n\t\t}});\t// Call DeletePressed event listener and send it the required arguments get from selected row\n\t\t$.tableView.deleteRow(e.index);\t// Delete the row from the table view\n\t\tandroidDeleteRowFlag = false;\n\t}\n}", "title": "" }, { "docid": "cbce0c5dfbed2e554409058f685683af", "score": "0.5184504", "text": "function addRow(type, newRow)\r\n{\r\n row_counter++;\r\n idCounter++; \r\n \r\n // if the header is not there print table headers\r\n if( !header_flag )\r\n {\r\n \t //alert(header_flag);\r\n buildTableHeader(type);\r\n } \r\n \r\n obj = $('#in_attachments').get(0);\r\n tr = document.createElement('tr');\r\n \r\n pref = objs[type].pref;\r\n len = objs[type].h.length;\r\n last = objs[type].last++; \r\n \r\n tr.appendChild(addCol('<input type=\"text\" id =\"year_'+idCounter+'\" name=\"year_'+idCounter+'\" value=\"'+idCounter+'\" class=\"disabled vis input R W45\" readonly /> '));\r\n tr.appendChild(addCol('<input type=\"text\" id =\"capital_cost_'+idCounter+'\" value=\"0\" name=\"capital_cost_'+idCounter+'\" onChange=\"calculateTotalPrice('+idCounter+'); updateCost('+idCounter+');\" class=\"vis input R W75\"/>'));\r\n tr.appendChild(addCol('<input type=\"text\" id =\"operating_cost_'+idCounter+'\" value=\"0\" name=\"operating_cost_'+idCounter+'\" onChange=\"calculateTotalPrice('+idCounter+'); updateCost('+idCounter+');\" class=\"vis input R W75\"/>'));\r\n tr.appendChild(addCol('<input type=\"text\" id =\"total_cost_'+idCounter+'\" value=\"0\" name=\"total_cost_'+idCounter+'\" class=\"disabled vis input R W75\" readonly />'));\r\n tr.appendChild(addCol('<input type=\"text\" id =\"discount_val_tot_cost_'+idCounter+'\" value=\"0\" name=\"discount_val_tot_cost_'+idCounter+'\" class=\"disabled vis input R W75\" readonly />'));\r\n tr.appendChild(addCol('<input type=\"text\" id =\"benefit_'+idCounter+'\" value=\"0\" name=\"benefit_'+idCounter+'\" onChange=\"calculateBenefitDiscountValue('+idCounter+'); updateCost('+idCounter+');\" class=\"vis input R W75\" />'));\r\n tr.appendChild(addCol('<input type=\"text\" id =\"discount_val_benefit_'+idCounter+'\" value=\"0\" name=\"discount_val_benefit_'+idCounter+'\" class=\"disabled vis input R W75\" readonly />'));\r\n tr.appendChild(addCol('<img border=\"0\" style=\"display: none\" src=\"/app_contents/irr_calculator/images/delete.png\" id=\"del_'+idCounter+'\" onclick=\"removeRow(\\''+type+'\\', parentNode)\" />'));\r\n \r\n // if it is a new row increase the project life time \r\n // and hide the previous rows delete image\r\n if(newRow == 1)\r\n {\r\n var plt = $('#project_life_time').val()*1+1;\r\n $('#project_life_time').val(plt);\r\n updateProjectLifeTime(pid);\r\n hidePrevDeleteImg(idCounter-1);\r\n }\r\n\r\n obj.appendChild(tr);\r\n \r\n // if it is last row then show the delete sign\r\n if (idCounter == $('#project_life_time').get(0).value)\r\n {\r\n showPrevDeleteImg(idCounter);\r\n }\r\n}", "title": "" }, { "docid": "aae30b9aa81d5744cad23ac107aee606", "score": "0.5184409", "text": "function addRow( srow, sub ){\n\n\t \t\tvar row = $( '<div class=\"wpo-row lg-row\"><div class=\"wpo-tool\"><div class=\"wpo-sortable ptstooltip\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Sort\"></div></div><div class=\"inner clearfix\"></div></div>' );\n\t \t\tvar edit = $('<div class=\"wpo-edit ptstooltip\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Edit\"></div>');\n\t \t\tvar copy = $('<div class=\"wpo-copy ptstooltip\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Duplicate\"></div>');\n\t \t\tvar del = $('<div class=\"wpo-delete ptstooltip\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"Delete\"></div>');\n\t \t\t\n\t \t\t$(row).children(\".wpo-tool\").append(del).append(copy).append(edit);\t\n\t \t\t\n\t \t\tbindingRowEvents( row , srow, sub );\n\t \t\t\n\t\t\t//row.insertBefore( srow );\n\t\t\tif( sub !=null && sub== true ){\n\t\t\t\tsrow.append( row );\t\n\t\t\t\tsrow.addClass('hd-widgets-func');\n\t\t\t\taddSuggestColumn( row );\n\t\t\t\trow.addClass( 'active' );\n\t\t\t}else {\n\t\t\t\t$wpolayout.children('.inner').append( row );\t\n\t\t\t\taddSuggestColumn( row );\n\t\t\t\t$wpolayout.children('.inner').children( \".wpo-row\").removeClass( \"active\" );\t\n\t\t\t\trow.addClass( 'active' );\n\t\t\t}\n\t\t\n\t\t\n\t\t\trow.data( \"rowcfg\", new WPO_DataRow() );\n\n\t\t\treturn row;\n\t \t}", "title": "" }, { "docid": "4665666959da791dbcb9ff8f65df2c44", "score": "0.5181005", "text": "function insertVehicleImage(id, imgSrc){\n let img = `<img src = \"${imgSrc}\"`;\n $(`#${id}`).append();\n}", "title": "" }, { "docid": "7cbdd77b058ccbb570b2b8e0cd4f86e0", "score": "0.5173482", "text": "function addRow(tab, rowClass, innerHTML) {\n var r = $('<tr/>');\n if (rowClass)\n r.addClass(rowClass);\n $(tab).append(r);\n r.html(innerHTML);\n return r;\n}", "title": "" }, { "docid": "3ee494e74629f793680fb80af5b384ac", "score": "0.51695937", "text": "OnAddRow(rowId) {\n const getGuid = () => {\n const templ = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n let result = templ.replace(/[xy]/g, (c, r) => {\n\n return c === 'x' ? Math.random() * 16 | 0 : r & 0x3 | 0x8;\n });\n\n return result.toString(16);\n };\n\n let skip = (this._tableData.length === 1 && !this._tableData[0].skip) ? true : false;\n if (this.get('isError') && skip) {\n this.set('isError', false);\n }\n\n let index = -1;\n for (let i = 0; i < this._tableData.length; i++) {\n if (this._tableData[i].id === rowId) {\n index = i;\n }\n }\n\n const row = {\n id: getGuid(),\n number: '0-1',\n readonly: true,\n skip: skip,\n direction: null,\n rhumb: null,\n distance: null,\n directionValid: false,\n rhumbValid: false,\n distanceValid: false\n };\n\n this._tableData.insertAt(index + 1, row);\n\n this._countOrder();\n }", "title": "" }, { "docid": "7cc6e9ac8fca3c8737b9a8428ab5892c", "score": "0.5166922", "text": "function AddRow(tableId, html){\n\n $(tableId).children(\"tbody\").append(html);\n\n}", "title": "" }, { "docid": "7cc6e9ac8fca3c8737b9a8428ab5892c", "score": "0.5166922", "text": "function AddRow(tableId, html){\n\n $(tableId).children(\"tbody\").append(html);\n\n}", "title": "" }, { "docid": "8119d16d13da7303e376684085a0ab01", "score": "0.51667374", "text": "function insert_Row() {\n var table = document.getElementById(\"sampleTable\");\n var row = table.insertRow(0);\n var cell1 = row.insertCell(0);\n var cell2 = row.insertCell(1);\n cell1.innerHTML = \"New Cell1\";\n cell2.innerHTML = \"NewCell2\";\n}", "title": "" }, { "docid": "245fb14008ce44fc3c5cc8963b384fdf", "score": "0.51605964", "text": "function addGridRow(data) {\n // ui.grid.addRow( data );\n console.log(\"updated grid component with:\" + data);\n}", "title": "" }, { "docid": "8f65e79cc23a07a6ae8650483aa1dad4", "score": "0.51588976", "text": "function _InsertRow(tableRef, description, sCode, ngssCode, gradeBand, color, id, setBorder){\n\tvar newRow = tableRef.insertRow(tableRef.rows.length);\n\tnewRow.id = sCode\n newRow.style.backgroundColor = color;\n newRow.style.borderBottom= \"1px solid #A0A0A0\";\n //highlight the approprate border in the standards table.\n if(setBorder){\n currentTableRow = sCode;\n newRow.style.border = \"4px solid \" + _GetMatchingBorderColor(color, 0);\n }\n\tnewRow.onclick = function(){\n\t\tTableRowClickAction(sCode, color);\n\t\tHighlightNode(id)\n currentSelectedNode = sCode\n BuildAlignedDocumentsTable(sCode);\n\t};\n\n //Build the html for the table row\n var ul = \"underline\";\n var n = \"none\";\n var NGSSLink = '';\n if(color == GREY_COLOR[0] || color == PURPLE_COLOR[0]){\n NGSSLink = '<span style=\"margin-right:3%\">|</span>' + '<span style=\"\">'\n + '<a class = \"clickableTableCell\" onclick=SubmitTableClick(\\'' + sCode + '\\'); style = \"margin-right:2%; color:blue; cursor: pointer; font-size:10pt;\">' + ngssCode + '</a>'\n + '<a onmouseover= this.style.textDecoration=\"underline\" onmouseout=this.style.textDecoration=\"none\" onclick=ViewNGSSPage(\\'' + sCode + '\\') style=\"color:blue; cursor:pointer; hover:red\">NGSS.org</a>'\n + '</span>' + '<br>';\n }\n newRow.innerHTML =\n '<a class = \"clickableTableCell\" onclick = SubmitTableClick(\\'' + sCode + '\\') style = \"margin-right:2%; float:left; color:blue; cursor: pointer; font-size:10pt\">' + sCode + '</a>'\n\n + '<a href=http://asn.jesandco.org/resources/'+sCode+' target=\"_blank\" style=\"color:blue;margin-right:3% \">ASN.org</a>'\n +'<span style=\"\">'\n + NGSSLink + FormatStdDescription(description, sCode, gradeBand) + ' </span>'\n}", "title": "" }, { "docid": "e48a8af4863d69850fcbe13c749a6a16", "score": "0.51529837", "text": "function createRow(options) {\n return Ti.UI.createTableViewRow({\n backgroundColor : Global.Theme.ROW.BACKGROUND,\n backgroundSelectedColor : Global.Theme.ROW.PRESS,\n backgroundFocusedColor : Global.Theme.ROW.PRESS,\n backgroundDisabledColor : Global.Theme.ROW.PRESS,\n color : Global.Theme.ROW.TITLE,\n title : options.title, //'Parámetros',\n name : options.name, //'Parametros',\n preventista : options.preventista, //true,\n leftImage : options.leftImage, //'/images/settings_56.png',\n font : options.font /*{\n fontSize : 18\n }*/\n });\n}", "title": "" }, { "docid": "cd6346a073de3a7dea18e6131890071b", "score": "0.515291", "text": "function makeRow(rowData, headerRow=false) {\r\n var body = document.getElementById(\"tbody\");\r\n var row = document.createElement(\"tr\");\r\n row.id = rowData.id;\r\n body.appendChild(row);\r\n \r\n //Append each of the cells\r\n makeCell(row, rowData.id, rowData.id, \"hidden\");\r\n makeCell(row, rowData.name, rowData.id, \"text\");\r\n makeCell(row, rowData.reps, rowData.id, \"number\");\r\n makeCell(row, rowData.weight, rowData.id, \"number\");\r\n makeRadioInputs(row, rowData.unit, rowData.id);\r\n makeCell(row, rowData.date, rowData.id, \"date\");\r\n makeButton(row, rowData.id, \"Update\");\r\n makeButton(row, rowData.id, \"Delete\");\r\n}", "title": "" } ]
19b9d31f187c06155899c1f5dea001b1
This string needs to be compressed (for reference) Note reserved characters Replace spaces (they take up 3 chars) Find a way to guess repeat subjects
[ { "docid": "4c0be13cf4c14191988508661e3f474f", "score": "0.0", "text": "function saveTimetable()\n{\n\tvar tokens = $.map( $( \"td\" ), function( element )\n\t{\n\t\tvar name = $( element ).find( \".name\" ).html()\n\t\n\t\tif( name == null || name == \"\" ) \n\t\t\treturn;\n\t\telse\n\t\t\tname = name.replace( /:|\\.|_|,/g, \"\" ).replace( \" \", \"_\" );\n\n\t\tvar room = $( element ).find( \".room\" ).html()\n\t\t\n\t\tif( room == null )\n\t\t\troom = \"\";\n\t\telse\n\t\t\troom = room = room.replace( /:|\\.|_|,|\\(|\\)/g, \"\" ).replace( \" \", \"_\" );\n\t\t\t\n\t\tvar length = $( element ).attr( \"rowspan\" );\n\t\tvar coords = decodeCoords( element );\n\n\t\tvar base_encoding = coords.x + \":\" + coords.y + \",\" + name + \",\" + room;\n\t\t\n\t\tif( length > 1 ) // include the length and the repeat\n\t\t\tbase_encoding += \",\" + length;\n\n\t\treturn base_encoding;\n\t} );\n\t\n\t// Look for similar tokens and compress them\n\tfor( var i = 0; i < tokens.length; i++ )\n\t{\n\t\tfor( var j = 0; j < tokens.length; j++ )\n\t\t{\n\t\t\tif( j != i )\n\t\t\t{\n\t\t\t\tvar temp_subject_two = tokens[ j ].substring( 0, 2 ) + tokens[ i ][ 2 ] + tokens[ j ].substring( 3 );\n\n\t\t\t\t/* If they are now equal then the only difference was y and based on this information\n\t\t\t\t * we can now compress it.\n\t\t\t\t */\n\t\t\t\tif( tokens[ i ] == temp_subject_two )\n\t\t\t\t{\n\t\t\t\t\tvar token_length = tokens[ i ].split( \",\" ).length;\n\t\t\t\t\t\n\t\t\t\t\tif( token_length == 4 )\n\t\t\t\t\t\ttokens[ i ] += \"+\" + tokens[ j ][ 2 ];\n\t\t\t\t\telse\n\t\t\t\t\t\ttokens[ i ] += \",+\" + tokens[ j ][ 2 ];\n\t\t\t\t\n\t\t\t\t\ttokens[ j ] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvar generated_state = encodeURI( tokens.join(\".\").replace( /\\.\\./g, \".\" ).replace( /(\\.$)/g, \"\" ) );\n\t\n\t// save the generated state in the URL\t\n\tvar url = $( location ).attr( \"href\" );\n\tif( url.match( /#.*?$/ ) )\n\t\t$( location ).attr( \"href\", url.replace( /#.*?$/, \"#\" + generated_state ) );\n\telse\n\t\t$( location ).attr( \"href\", url + \"#\" + generated_state );\n}", "title": "" } ]
[ { "docid": "3c1b4a55d9a21b8e1f9d71b4174ea2f2", "score": "0.6206379", "text": "function compressRepeatCharacter(str) {\n let workingChar = '';\n\n return str.split('').reduce((acc, item) => {\n if (workingChar === item) {\n return acc+=1\n } else {\n workingChar = item;\n return 2; \n }\n }) + workingChar;\n}", "title": "" }, { "docid": "e4f76f29b665653d360ec6b82cc8e13a", "score": "0.6185095", "text": "function compressString(s){\n if (s.length <=1 ) return s;\n\n let counter = 0; // Keep track of num of repeated char\n let compressedArr = [];\n let compressedStr;\n \n for (let i = 0; i < s.length; i ++){\n const currChar = s[i];\n const nextChar = s[i + 1];\n counter++;\n\n if (currChar !== nextChar || (i + 1 >= s.length)){\n compressedArr.push(currChar);\n compressedArr.push(counter);\n counter = 0;\n }\n }\n\n compressedStr = compressedArr.join('');\n\n return s.length > compressedStr.length? compressedStr : s;\n}", "title": "" }, { "docid": "746691d885e63c397c9703ba07b8e114", "score": "0.60837877", "text": "function findDuplicateChars(s) {\n let obj = {};\n for (let i = 0; i < s.length; i++) {\n const e = s[i];\n obj[e] = (obj[e] || 0) + 1;\n }\n s = '';\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (obj[key] > 1) {\n s += key;\n }\n }\n }\n return s;\n}", "title": "" }, { "docid": "ac276589a2abc9bcc16a9d5e7bee2bdb", "score": "0.60184324", "text": "function encode(pattern) {\n const iteratePattern = pattern.split(\"\");\n var count = 1; //starts at one to account for the first instance of the letter\n var compressedPattern = \"\";\n\n for (var i = 0; i < pattern.length; i++) { //iterates through split string from 0\n var j = i + 1 //looks at next index from the increment (i) to compare, when it reaches the end of the split string it will compare against \"undefined\" and stop\n\n var build = count + iteratePattern[i]; //returns count of each group of letters as it iterates through the pattern to be appended to the compressedPattern\n\n if (iteratePattern[i] === iteratePattern[j]) {\n count++;\n\n } else {\n compressedPattern += build; //\"builds\" the compressed version of the pattern\n\n count = 1; //resets count if not matched, but only after appending the previous build\n }\n }\n console.log(\"input: \" + pattern)\n console.log(\"output: \" + compressedPattern);\n return compressedPattern;\n }", "title": "" }, { "docid": "e659d57f7ed4af7513b0deca93bef44e", "score": "0.60096854", "text": "function verificarRepeticao(pLen, str) {\n res = \"\"\n for (i = 0; i < str.length ; i++) {\n repeated = true\n for (j = 0; j < pLen && (j + i + pLen) < str.length; j++)\n repeated = repeated && (str.charAt(j + i) == str.charAt(j + i + pLen))\n if (j < pLen) repeated = false\n if (repeated) {\n i += pLen - 1\n repeated = false\n }\n else {\n res += str.charAt(i)\n }\n }\n return res\n}", "title": "" }, { "docid": "922eb3caab91851bd2d37774ce2fa208", "score": "0.59458935", "text": "function duplicateEncode(word){\n let wrd = word.split('')\n let count = 0\n let result = []\n for (let i = 0; i < wrd.length; i++) {\n count = 0\n for (let j = 0; j < wrd.length; j++) {\n if(wrd[i].toLowerCase() === wrd[j].toLowerCase()){\n count += 1\n }\n }\n if(count > 1){\n result.push(')')\n }else {\n result.push('(')\n }\n }\n return result.join('')\n}", "title": "" }, { "docid": "36dd1bce43e35e060205038b40c48f45", "score": "0.59424615", "text": "function rot13(str) { // LBH QVQ VG!\n var regex = /[A-Z]/, result = \"\", cc;\n var threshold = \"Z\".charCodeAt(0) - 13;\n for (var i = 0, l = str.length; i < l; i++) {\n if (regex.test(str[i])) {\n cc = str[i].charCodeAt(0);\n if (cc <= threshold)\n result += String.fromCharCode(cc + 13);\n else\n result += String.fromCharCode(cc - 13);\n } else {\n result += str[i];\n }\n }\n return result;\n}", "title": "" }, { "docid": "dd82d9cc8bac8ae17674f4e1f1bf19e7", "score": "0.59218323", "text": "function repeatedDNASequences(s) {\n var secuenceCount = {};\n var letter = '';\n var resulstsDNA = [];\n var i, secuence;\n for (i = 0; i <= s.length - 10; i++) {\n letter = s.substring(i,i + 10);\n secuenceCount[letter] = secuenceCount[letter] == undefined ? 1 : secuenceCount[letter] + 1;\n }\n for (secuence in secuenceCount) {\n if (secuenceCount[secuence] > 1)\n resulstsDNA.push(secuence);\n }\n return resulstsDNA.sort();\n}", "title": "" }, { "docid": "eeef9f490febad72286338249187d2ec", "score": "0.59086156", "text": "function repeatedString(s, n) {\n let len = s.length\n let amountOfTimesToRepeat= Math.floor(n/len)\n let remainingChars = n%len\n let aTracker =0;\n let aBeforeCutOff=0;\n for(let i=0;i<len;i++){\n if(s[i]==\"a\"){\n i<remainingChars ? aBeforeCutOff++ : aTracker++\n }\n }\nreturn amountOfTimesToRepeat*(aBeforeCutOff+aTracker) + aBeforeCutOff\n\n}", "title": "" }, { "docid": "5b06a9d294ac7b328efbb67562a69bb9", "score": "0.5903419", "text": "function checkRepeatChar(str)\n{\n\t//str = str.replace(/\\s+/g,\"_\");\n\tstr = str.replace(/\\s+/g,\"\");\n\tstr = str.toUpperCase();\n\t//if(/(\\d)(\\1{4,})/g.test(str))\n\tif(/([A-Za-z])(\\1{4,})/g.test(str)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "223b7f5effccdfd9a96091959c5b967d", "score": "0.5901706", "text": "function duplicateEncode(word){\r\nlet smallCase = word.toLowerCase().split('')\r\n\r\nlet result = [];\r\n for ( let i =0; i < smallCase.length; i++) {\r\n let char = smallCase[i]\r\n let firstIndex = smallCase.indexOf(char);\r\n let lastIndex = smallCase.lastIndexOf(char)\r\n if ( lastIndex > firstIndex ) {\r\n result.push(')')\r\n }\r\n else result.push('(')\r\n\r\n }\r\n return result.join('');\r\n}", "title": "" }, { "docid": "5e24a0b8e0c46f9e9c4fe39945fa883a", "score": "0.5900979", "text": "function stringCompression(str) {\n let compressedString = ''\n let currentLetter = str[0]\n let count = 1\n // note the str.length + 1\n for (let i = 1; i < str.length + 1; i++) {\n if (str[i] === currentLetter) {\n count += 1\n } else {\n if (count === 1) {\n compressedString += currentLetter\n } else {\n compressedString += currentLetter + count\n count = 1\n }\n currentLetter = str[i]\n }\n }\n return compressedString.length < str.length ? compressedString : str\n}", "title": "" }, { "docid": "e752bdb2dac88c2525751f42348441cd", "score": "0.5884461", "text": "function StringReduction(str) { \r\n\r\n var result;\r\n var reg_non_repeat = /a[bc]|b[ac]|c[ab]/; //Finds all non-repeating pairs for a through c\r\n\r\n var string_reduce = function(str) {\r\n var match = str.match(reg_non_repeat); //Find the first match from left to right of the string\r\n\r\n if (match == null) { //If no non-repeating pairs found, we're done\r\n result = str.length;\r\n }\r\n else {\r\n var swap_letter = \"abc\".match( new RegExp( '[^'+match[0]+']' )) //Find the adjacent character\r\n var str = str.replace(match[0], swap_letter[0]) //Replace match with adjacent character\r\n string_reduce(str); //Call itself with smaller string\r\n }\r\n\r\n };\r\n string_reduce(str);\r\n return result;\r\n}", "title": "" }, { "docid": "0cd3a263cd1067ede117402f68a0511a", "score": "0.58770305", "text": "function duplicateEncode(word){\r\n var new_string = \"\";\r\n \r\n for (var i=0; i<word.length; i++){\r\n if ((/[A-Za-z0-9]/g).test(word[i])){\r\n if(word.match(new RegExp(word[i],'gi')).length > 1) new_string += \")\";\r\n else new_string += \"(\";\r\n }else {\r\n if(word.match(new RegExp(\"\\\\\"+word[i],'gi')).length > 1) new_string += \")\";\r\n else new_string += \"(\";\r\n }\r\n }\r\n \r\n return new_string;\r\n}", "title": "" }, { "docid": "b21c0b253133903f8600fd264fe5eed1", "score": "0.5875083", "text": "function problem2() {\n\n var inputStr = \"v<><^^v^^v<^^<>><>vv<<>><<>>v>^v^<<>>vv^>vv>^<>^><^vv^>>^v^<^^>^<<v^><v^^><>^^v>^v>v^<v^>^^v<v^v>^^<>v><<<<>^>v>^<><^<^vv<>vv^<>v^vv^^^^>v^<v<><>>^<<<<^^^v^^^>v^^^<v<^^<<^<<>><<<<<v>^vv^<><<^>>>^^<vv>>^^^^vv<v<>vv<^>v>>v^^>v<>^^<>>><<<v<<<>>v<<vv^<<^^<><v^<>>^<<><<^v^<^v>^>^v^v<v><<>>^<vv^<>>>v>>>v><>vv>v<v>vv><^^v><v<>v><^>v<>v><>^<^^<^^v<^vv^<<>^^vv<<^<>>><^^<v^>^><^<<^>>v^>>>><^^>v^^>vv><^^><>>>^>>v^^<<>><<^^<^<>><>v>>^v>v^^<<v<vv<vv^<<^><<v<><><<><^^<>v>^vvv><v>^v>^>>>>^^v^<><<vv>>v><vv<<v>><^<>^^v<^<vv>^<<v<^v<^v^^<<vv^^>v>>>^<^^v^vv>>^<^<^v^<^v<><<^<v<^>^^>^^<^>v<<^v^v><v<v<v<>>>^vv><>>><<^>^>^<^vvv^^<<v>>v><<v^^><v<vv^<v^>>v<^<>v^>><^><^>^<^>>^>^>>vv>v^v<vv<>v^<v^^vv<^>>vv<^>^>>v^v^v<<v<><v^v<^^>><<<^><<<>^vv<vv<^^v<vv<<v^^<<><>v^>v<>>^^^^^^^^>^<^^>vvv^<<<<<v^>^v>>>v<><v<^v>v^<^^^<<><<>vv<v>^vv<<><<^v<<<^v>^>^^><><>^>vv><>^vvv<^^vv^<>^<^<><^<^v^^<v^>v><vv><v^v>vv><>^^^<<><^>v<^><^^^^<^^v>^>v^<v^<v^v<^<vvvv>^^^^^>^^<^^^v^^><v^^^^<<vv<<vvvv><<>vvv>>^<vvv>v^>^><<vv^^>>^v^<^<vv^^>>^^>v^><><^>^v^>^><^^^<^v^v<<v>v^^v>>v<>>>^vv><^<<>^v>>^>>^^<v>>^v>v<^<>^^>v^><>v^>^>^>v<v^^<^>vvvv<v<<v^^>>v<^<^^>v><v<v><>v>^v^v>><^<>vv^v<>v^^<^<vv<<<<>>^<^^<>v<v>>><^>>>><><v^^v^>>v>v><v>^><vv<>^vv>vv>^<>^^><^vvvv^><<^>>^v>v>v^>^><^^^<^>^>><^>vv^^v<>^vv>>^^<<>>><<vvv<v<>^^<^\";\n var inputArr = inputStr.split(\"\");\n\n // Vert and Horiz captures the entire location.\n var loc = {\n v: 0, // Vertical Location\n h: 0, // Horizontal Location\n newVisited: 0, // This is the counter of new locations,\n key: function() {\n return this.v + \":\" + this.h;\n }\n };\n\n var visitedMap = {}; // Stores list of Positions visited\n\n // The Starting location is considered as visited\n visitedMap[loc.key()] = \"1\";\n\n inputArr.forEach(function(newPos) {\n\n // Step 1: Update Position\n updatePosition(newPos,loc);\n\n // Step 2: Perform \"Visited Logic\"\n checkVisited(loc, visitedMap);\n\n });\n\n console.log(loc.newVisited);\n}", "title": "" }, { "docid": "d62cfd72955c8d5a7b41bd93f1fcb041", "score": "0.5850302", "text": "function firstNotRepeatingCharacter(s) {\n let alpha = {};\n for (let i = 0; i < s.length; i++) {\n if (!alpha[s[i]]) {\n alpha[s[i]] = i + 1;\n } else {\n alpha[s[i]] = \"dup\";\n }\n }\n let idx = Object.keys(alpha).reduce((acc, ele) => {\n return alpha[ele] !== \"dup\" ? alpha[ele] - 1 < acc ? alpha[ele] - 1 : acc : acc;\n }, Infinity)\n console.log(idx)\n return idx === Infinity ? \"_\" : s[idx];\n}", "title": "" }, { "docid": "43951f7789a1ec47138d34a9b3ad12a4", "score": "0.5841892", "text": "function lineEncoding(s) {\n // in a loop get the current letter. check if its the same as prev letter if yes add 1 to\n // a base 1 counter. if not the same, push the count (if greater than 0) and the letter\n // to result array, concat.\n let prev;\n let count = 1;\n let res = [];\n s = s+'z';\n for (let letter of s) {\n if (prev == letter) {\n count++;\n } else {\n if (count > 1) {\n res.push(count+prev);\n } else {\n res.push(prev);\n }\n prev = letter;\n count = 1;\n }\n\n }\n return res.join('');\n}", "title": "" }, { "docid": "ed5ba671864d538067cf7e44a206f2bf", "score": "0.5834341", "text": "function compress(s){\n\tvar s2 = \"\";\n\tfor(var i = 0; i < s.length; i++){\n\t\tvar s2 = s2 + s[i];\n\t\tvar count = 1;\n\t\t while(s[i] === s[i+1]){\n\t\t\tcount++;\n\t\t\ti++;\n\t\t}\n\t\ts2 = s2 + count.toString();\n\t}\n\tif (s.length <= s2.length){\n\t\treturn s;\n\t}else{\n\t\treturn s2;\n\t};\n}", "title": "" }, { "docid": "4f2fd7ccf4f9a1fddff153160243f22e", "score": "0.58051884", "text": "function firstNonRepeatingLetter(s) {\n\n const reducer = (acc, cur) => {\n let l = cur.toLowerCase();\n acc[l] ? acc[l][1] += 1 : acc[l] = [cur, 1];\n return acc;\n }\n \n const obj = s\n .split('')\n .reduce(reducer, {});\n \n const result = Object.values(obj).find(el => el[1] === 1);\n \n return result ? result[0] : '';\n}", "title": "" }, { "docid": "21e885f6a8c2657f7e062d21b3c06c66", "score": "0.5790643", "text": "function firstNotRepeatingCharacter(s) {\n var charTrack = {};\n for (var i = 0; i < s.length; i++) {\n if (charTrack[s[i]])\n charTrack[s[i]] = 'Repeat Value'\n\n else\n charTrack[s[i]] = 'First Time'\n\n }\n for (i = 0; i < s.length; i++) {\n if (charTrack[s[i]] === 'First Time') {\n return s[i];\n }\n }\n return '';\n}", "title": "" }, { "docid": "13f37524edbe15cf145c42f31d6f2863", "score": "0.57897127", "text": "function nonRepeated(str) {\n var arra1 = str.split('');\n var result = '';\n var ctr = 0;\n for (var x = 0; x < arra1.length; x++) {\n ctr = 0;\n for (var y = 0; y < arra1.length; y++)\n {\n if (arra1[x] === arra1[y]) {\n ctr+= 1;\n }\n }\n if (ctr < 2) {\n result = arra1[x];\n break;\n }\n }\n return result;\n }", "title": "" }, { "docid": "8f8176fa87846e466bd678c7637214ce", "score": "0.578609", "text": "function strCompress(input){\n\tif(input.length <= 1)\n\t\treturn input;\n\n\t//O(n) space\n\tvar arr = [];\n\tvar cnt = 1;\n\t//loop through string and add letter to array, then count of letter\n\tfor(var i = 0;i<input.length;i++){\n\t\t//same letter, more than once in a row, increment count\n\t\tif(input[i] === input[i + 1]){\n\t\t\tcnt++;\n\t\t}\n\t\t//if a new letter is coming next, we add the current char and count to the array\n\t\telse{\n\t\t\tarr.push(input[i]);\n\t\t\tarr.push(cnt);\n\t\t\t//resent cnt to 1\n\t\t\tcnt = 1;\n\t\t}\n\t}\n\t\n\t//if compressed string is longer than orginial return the original\n\tif(arr.length >= input.length)\n\t return input;\n\telse\n\t return arr.join(\"\");\n}", "title": "" }, { "docid": "523d61ede23b610b5f97cb818e4f3543", "score": "0.57473195", "text": "function firstNonRepeatingLetter(s) {\n\n if (s === \"\") {\n return \"\"\n }\n\n let sArr = s.toLowerCase().split(\"\")\n console.log(sArr)\n let result = {}\n let singleKeys = []\n let other = []\n\n if (sArr.length === 1) {\n return sArr[0]\n }\n\n for (i = 0; i < sArr.length; i++) {\n if (!result[sArr[i]])\n result[sArr[i]] = 0\n result[sArr[i]]++\n }\n if (Object.keys(result).length === 1) {\n return \"\"\n }\n\n for (key in result) {\n if (result[key] === 1) {\n singleKeys.push(key)\n } else {\n other.push(key)\n }\n }\n\n if (singleKeys.length === 0) {\n return \"\"\n }\n\n if (s.split(\"\").indexOf(singleKeys[0]) === -1) {\n console.log(s)\n console.log(singleKeys)\n console.log(singleKeys[0])\n return singleKeys[0].toUpperCase()\n }\n return singleKeys[0]\n}", "title": "" }, { "docid": "a67705a4ed9079b0354b5984f7c6a8ca", "score": "0.5742042", "text": "function main() {\n var len = parseInt(readLine());\n var s = readLine();\n\n let maxLen = 0;\n let charMap = '';\n\n function isAlternate(str) {\n if (str.length < 2) {\n return false;\n }\n for (let i = 1; i < str.length; i++) {\n if (i === 1) {\n if (str[i] === str[i-1]) {\n return false;\n }\n } else if (str[i] === str[i-1] || str[i] !== str[i-2]) {\n return false;\n }\n }\n return true;\n }\n\n // create character map of s\n for (c of s) {\n if (charMap.indexOf(c) === -1) {\n charMap += c;\n }\n }\n\n // create all possible character pairs\n for (let j = 0; j < charMap.length - 1; j++) {\n for (let i = j+1; i < charMap.length; i++) {\n const thisPair = charMap[j] + charMap[i];\n // remove every other character besides thisPair\n const testString = s.split('').filter(c => {\n return (c === thisPair[0] || c === thisPair[1]);\n }).join('');\n if (isAlternate(testString) && testString.length > maxLen) {\n maxLen = testString.length;\n }\n }\n }\n console.log(maxLen);\n}", "title": "" }, { "docid": "8dd84fb0d020efc65f507c468266ea4c", "score": "0.57369065", "text": "function permAlone(str) {\n // [2,3]\n repeatingLetterGroups = [];\n\n\n // if str is one element return 1\n if (str.length === 1) {\n return 1;\n }\n // if string is made of one repeating letter return 0\n if (str.match(/^([a-z])\\1+$/g)){\n return 0;\n }\n\n // count groups of repeating letters, and their size\n\n\n // count++ each valid combination\n // \n // []\n // skip each combination with repeating neighbours\n\n return str;\n}", "title": "" }, { "docid": "22543cca8a72fdf3848c0369f940f4ab", "score": "0.5726334", "text": "function repeatLetters(str) {\n var strToArr = str.split('') //separa en comas\n var biblio = {} // el objeto donde se añade el resultado\n for (var i = 0; i < strToArr.length; i++) { // crea el primer ciclo para comparar con los siguientes (j,k,l,m,n,m,ñ...)\n var count = 0 //cuenta a partir de esta cifra\n for (var j = 0; j < strToArr.length; j++) { // otro ciclo para compararlo ( este lo haría con k,l,m,n,ñ... )\n if (strToArr[i] === strToArr[j]) {\n count++ //\n biblio[strToArr[i]] = count\n } else {\n biblio[strToArr[i]] = count\n }\n }\n }\n return biblio\n}", "title": "" }, { "docid": "8a9d4ae3d2a3a7207f47b265e358c40e", "score": "0.5723962", "text": "decode(s) {\n let dict = {}\n let data = (s + \"\").split(\"\")\n let currChar = data[0]\n let oldPhrase = currChar\n let out = [currChar]\n let code = 256\n let i, phrase, currCode\n\n for (i=1; i<data.length; i++) {\n currCode = data[i].charCodeAt(0)\n \n if (currCode < 256) {\n phrase = data[i]\n }\n else {\n phrase = dict['_'+currCode] ? dict['_'+currCode] : (oldPhrase + currChar)\n }\n\n out.push(phrase)\n currChar = phrase.charAt(0)\n dict['_'+code] = oldPhrase + currChar\n code++\n oldPhrase = phrase\n }\n return out.join(\"\")\n }", "title": "" }, { "docid": "9316ff90a213c30364f50b56c4f5d399", "score": "0.5719281", "text": "function duplicateEncode(word){\n word = word.toLowerCase();\n var result=\"\";\n for (var i in word){\n var matchesCount = word.split(word[i]).length - 1;\n result+=(matchesCount ==1)? \"(\" : \")\";\n }\n return result;\n}", "title": "" }, { "docid": "432af1619305a7a117228c680463e773", "score": "0.5713464", "text": "function rot13(message){\n let code;\n return [...message].reduce((acc, s) => {\n code = s.charCodeAt(0);\n if (code >= 65 && code <= 90){\n if (code + 13 > 90) {\n code = 65 + 13 - (91 - code);\n return acc.concat(String.fromCharCode(code));\n } else {\n code = code + 13;\n return acc.concat(String.fromCharCode(code));\n }\n } else if (code >= 97 && code <= 122) {\n if (code + 13 > 122) {\n code = 97 + 13 - (123 - code);\n return acc.concat(String.fromCharCode(code));\n } else {\n code = code + 13;\n return acc.concat(String.fromCharCode(code));\n }\n } else {\n return acc.concat(s);\n }\n }, \"\");\n \n}", "title": "" }, { "docid": "c5aa896e6cf0d57b63a32367282f611d", "score": "0.5713088", "text": "function encode(string) {\n if (!string) return '';\n let encode = '';\n\n for (let i = 0; i < string.length; i++) {\n let count = 1;\n for (let j = i; j < string.length; j++) {\n if (string[i] !== string[j+1]) break;\n count++;\n i++;\n }\n encode += count == 1 ? string[i] : count + string[i];\n // console.log(encode += count, 'checking the encode')\n\n }\n\n return encode\n }", "title": "" }, { "docid": "23ebff9bf7a2eff46a46d8f2b0ec6d1f", "score": "0.5699825", "text": "function rot13(str) { // LBH QVQ VG!\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n if (char > 77 && char <= 90) { str = str.slice(0, i) + str[i].replace(str[i], String.fromCharCode(char - 13)) + str.slice(i + 1); }\n else if (char >= 65 && char <= 77) { str = str.slice(0, i) + str[i].replace(str[i], String.fromCharCode(char + 13)) + str.slice(i + 1); }\n } return str;\n}", "title": "" }, { "docid": "01ae20ba1b25e86fee51e08ff6452086", "score": "0.5695931", "text": "function solution(s) {\n let answer = 0;\n \n let alpabet = Array(26).fill(0);\n let aChar = 'a'.charCodeAt(0);\n\n // 단어 카운팅\n for(let i=0; i < s.length; i++) {\n let c = s.charCodeAt(i);\n alpabet[c-aChar]++;\n }\n\n for(let i=0; i < alpabet.length; i++) {\n\n if(alpabet[i] === 0) continue;\n let c1 = aChar+ i;\n\n for(let j=i+1; j < alpabet.length; j++) {\n\n if(alpabet[j] === 0) continue;\n\n let c2 = aChar + j;\n\n let charCount = 0; // 문자 수\n let curFlag = -1; // 단어 중복 카운팅.\n\n for(let c=0; c < s.length; c++) {\n let c3 = s.charCodeAt(c);\n\n //console.log(`${c1} ${c2} ${c3} ${s[c]}`)\n if(c1 === c3) {\n\n // 중복되었다면.\n if(curFlag === 1) {\n curFlag = -1;\n break;\n }\n curFlag = 1;\n charCount++;\n }\n else if(c2 === c3) {\n\n if(curFlag === 2) {\n curFlag = -1;\n break;\n }\n curFlag = 2;\n charCount++;\n }\n }\n \n if(curFlag != -1 && charCount > answer) {\n answer = charCount;\n }\n }\n }\n return answer;\n}", "title": "" }, { "docid": "47f779f76c1fa95233d7b73b0ead1769", "score": "0.5683413", "text": "function rot13(message){\n // uppercase letters' codes start from 65, lowercas from 97\n let code;\n let start;\n return message.replace(/[a-z]/gi, s => {\n code = s.charCodeAt(0);\n start = code >= 97 ? 97 : 65;\n if (code + 13 > start + 25) {\n code = start + 13 - (start + 26 - code);\n } else {\n code = code + 13;\n }\n \n return String.fromCharCode(code);\n }); \n}", "title": "" }, { "docid": "064635d12ce78034f1820882386c4a15", "score": "0.56713694", "text": "function compressString(string){\n\n\tvar bandera = 1, passChar ='0', cadena = \"\"\n\n\tvar mapa = new Map()\n\n\tvar otString = string.split('')\n\n\totString.forEach(function(element,index){\n\n\t\tif(index == 0){\n\n\t\t\tpassChar = element\n\t\t\tbandera++\n\n\t\t}else{\n\n\t\t\tif(passChar == element){\n\n\t\t\t\tbandera ++\n\n\t\t\t}else if(passChar != element){\n\n\t\t\t\tcadena += passChar + bandera\n\n\t\t\t\tpassChar = element\n\n\t\t\t\tbandera = 1;\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tif((index + 1) == otString.length){\n\n\t\t\tcadena += passChar + bandera\n\n\t\t}\n\n\t})\n\n\tif(cadena.length > string.length){\n\n\t\treturn string\n\n\t}else{\n\n\t\treturn cadena\n\n\t}\n\n\n}", "title": "" }, { "docid": "187b945f8b4ef29ec8ddffa3398503ab", "score": "0.5670591", "text": "function firstNotRepeatingCharacter(s = '') {\n\n let obj = {};\n let arr = s.split('');\n for (const item of arr) {\n obj[item] = obj[item] + 1 || 1;\n }\n for (const key in obj) {\n if (obj[key] <= 1) return key;\n }\n return '_';\n}", "title": "" }, { "docid": "a0b8b72da9dfe62af284e3045b27128d", "score": "0.566497", "text": "function compression(str){\n let compressed = ''\n let splitStr = str.split('')\n for(let i = 0; i < splitStr.length; i++){\n let charCount = 1\n let current = splitStr[i]\n while(i < splitStr.length - 1 && current === splitStr[i + 1]){\n charCount++\n i++\n }\n if(charCount == 1){\n compressed += current\n } else {\n compressed += current + charCount\n }\n }\n return compressed\n}", "title": "" }, { "docid": "a0565ac003d40ca4ce7b01cb7292c107", "score": "0.5659288", "text": "function rot13(str) { // LBH QVQ VG!\n \n var newStr = '';\n \n for(var i = 0; i < str.length; i++){\n if(str.charCodeAt(i) > 64 && str.charCodeAt(i) < 91){\n newStr += String.fromCharCode((str.charCodeAt(i) - 65 + 13) %26 +65); \n }else{\n newStr += str[i];\n }\n }\n \n return newStr;\n }", "title": "" }, { "docid": "fc8ede6d1e30957ae3afb8c17af04175", "score": "0.5652506", "text": "function repeatedString(s, n) {\n const l = s.length,\n repeatsRequired = Math.ceil(n / l),\n charsRequired = repeatsRequired * l,\n numCharsInLastRepeat = l - (charsRequired % n);\n\n console.log(l, repeatsRequired, charsRequired, numCharsInLastRepeat);\n\n const a_s = s.countCharacter(\"a\"),\n a_r = s.slice(0, numCharsInLastRepeat).countCharacter(\"a\");\n\n console.log(a_s);\n console.log(a_r);\n\n console.log(a_s * (repeatsRequired - 1) + a_r);\n\n return a_s * (repeatsRequired - 1) + a_r;\n}", "title": "" }, { "docid": "c4b51a3b6c2a6884a431dd040bf17e3d", "score": "0.5645242", "text": "function duplicateEncode(word) {\n const letterArray = word.toLowerCase().split(\"\");\n let newArr = [];\n for (let i in letterArray) {\n newArr.push(\n word.toLowerCase().split(letterArray[i]).length - 1 <= 1 ? \"(\" : \")\"\n );\n }\n return newArr.join(\"\");\n }", "title": "" }, { "docid": "fc8b4baa1cf4c76752d117bbff6d3717", "score": "0.5642269", "text": "function compression(str) {\n\n var count = 1;\n var previousChar = str.charAt(0);\n var compressedStr = '';\n var strLength = str.length;\n \n for (var i = 1; i < strLength; i++) {\n var currentChar = str[i];\n if(previousChar === currentChar) {\n count++;\n } else if (count === 1) {\n compressedStr += previousChar + count;\n previousChar = currentChar;\n } else {\n compressedStr += previousChar + count;\n previousChar = currentChar;\n count = 1;\n }\n }\n\n if (count === 1) {\n compressedStr += currentChar;\n } else {\n compressedStr += currentChar + count;\n }\n if (compressedStr.length > str.length) {\n \treturn str;\n } else {\n \treturn compressedStr;\n }\n}", "title": "" }, { "docid": "644d3578adb1f826c8736a6157cb1634", "score": "0.5636472", "text": "function d9(input, recursive) {\n \n //Original inputs length\n let length = input.length;\n \n const compressed = (input.substring(\"(\") != -1);\n\n // Decompress inputing\n // if brackets cannot be founded (=contains no compression) skip this loop and return only the length of string itself\n for (let i = input.indexOf(\"(\"); i < input.length && i != -1 && compressed; i = input.indexOf(\"(\",i)) { \n\n //Extract marker with regex-search\n const marker = input.substr(i).match(/^\\((\\d+)x(\\d+)\\)/); \n\n //Regex search group 1 matches the length of repeated string\n const markerlength = parseInt(marker[1], 10);\n \n // Reges search group 2 matches the repeating times\n const repeattimes = parseInt(marker[2], 10);\n \n //Starting point of the repetation inputing (marker + its length)\n const start = i + marker[0].length;\n\n //String that needs to be decompressed\n const decompressedString = input.substr(start, markerlength);\n\n //If recursive, start decompressing of the decompressed string\n const decompressedLength = recursive ? d9(decompressedString, true) : decompressedString.length;\n\n //Length = original length + how much decompressing makes string longer\n // = decompressed string * repetation times - original compressed string - marker length\n\n // Example: \n // X(8x2)(3x3)ABCY\n // = 15 + (8 (=\"(3x3)ABC\".length) + 3 (=\"ABC\".length) * 3 (=3x) - 3 (=\"ABC\".length) - 5 (\"(3x3)\".length)) * 2 - 8 - 5\n // = 15 + 9 * 2 (=2x) - 8 (=\"(3x3)ABC\".length) - 5 (\"(8x2).length)\n // = 15 + 5\n // = 20\n\n length += decompressedLength * repeattimes - decompressedString.length - marker[0].length;\n \n //Continue from where decompressing ended\n i = start + decompressedString.length;\n }\n \n return length;\n}", "title": "" }, { "docid": "5292899cd1b5d7bb6f1a2d9a549e6ba4", "score": "0.5629336", "text": "function pigIt(str) {\n str = str.split(\" \");\n str.forEach(function (el, i, str) {\n if (str[i].charCodeAt(0) > 64 && str[i].charCodeAt(0) < 123) {\n str[i] += str[i][0] + \"ay\";\n str[i] = str[i].slice(1);\n }\n });\n return str.join(\" \");\n}", "title": "" }, { "docid": "c6acba90cac61ee6168614c56585ff08", "score": "0.560603", "text": "function compression(str){\n \n var resultStr = \"\";\n var count = 1;\n var current = str[0];\n for (var i=1; i<=str.length; i++){\n if(current === str[i]){\n count += 1;\n }else{\n resultStr += (current + count);\n current = str[i];\n count = 1;\n }\n }\n if(str.length <= resultStr.length){\n return str;\n }\n \n return resultStr;\n \n}", "title": "" }, { "docid": "7a0d9eafa7517215c9d3a97594bba4b2", "score": "0.56026286", "text": "function compress(str) {\n let saved = 0\n let i = 0\n let compressedArray = []\n\n while (str[i]) {\n let counter = 1\n saved--\n while (str[i + counter] && str[i + counter] === str[i]) {\n counter++\n saved++\n }\n compressedArray.push(str[i])\n compressedArray.push(counter)\n i = i + counter\n }\n if (saved > 0) return compressedArray.join('')\n else return str\n}", "title": "" }, { "docid": "71f838a2f9dad7d04366d6131becd581", "score": "0.559982", "text": "function repeatingChars(str) {\n let strArr = [];\n for (let i = 0; i < str.length; i++) {\n if (str[i] != str[i + 1]) {\n strArr.push(str[i]);\n }\n }\n console.log(strArr.join(''));\n}", "title": "" }, { "docid": "c6d3a3035a78f8932e034b41dbd946d2", "score": "0.55984336", "text": "function dup(s) {\n return s.map (w => w.replace(/(.)\\1+/g,'$1'))\n}", "title": "" }, { "docid": "8bf8062bd17fa283e8925950037a1e83", "score": "0.55983156", "text": "function repeatedString(s, n) {\n let spacesLeft = n - s.length;\n let newString = s;\n let y = 0;\n let counter = 0;\n\n for (let x = 0; x < spacesLeft; x++) {\n if (y === s.length) y = 0;\n newString += s[y];\n y++;\n //console.log(newString, y, s.length);\n }\n\n for (let z = 0; z < newString.length; z++) {\n if (newString[z] === 'a') {\n counter++;\n }\n }\n\n return counter;\n}", "title": "" }, { "docid": "ab001fbe324848aa8f9d2359f84e2e2c", "score": "0.55900997", "text": "function encode(str){\n var encArr = [str[0],1]\n // count similar characters\n Array.from(str).forEach((c) => {\n if(encArr.slice(-2)[0]===c){\n ++encArr[encArr.length-1]\n } else {\n encArr.push(c)\n encArr.push(1)\n }\n })\n return encArr.join(\"\");\n}", "title": "" }, { "docid": "fe5015c0336ac6dbd377580ce2ff5e50", "score": "0.55867463", "text": "function solve(s) { return \"abcdefghijklmnopqrstuvwxyz\".includes([...s].sort().join``) }", "title": "" }, { "docid": "ea7c194720dbfa299e6952a688e11ede", "score": "0.5585892", "text": "function nonRepeatedCharacters(string) {\n var hist = {};\n var strArr = string.split('');\n strArr.reduce(function(accum, item) {\n if(!accum[item]) {\n accum[item] = 1;\n } else {\n accum[item]++;\n }\n return accum;\n }, hist);\n \n for(var i = 0; i < strArr.length; i++) {\n if(hist[strArr[i]] === 1) {\n return strArr[i];\n } \n }\n return 'sorry';\n}", "title": "" }, { "docid": "ab259feaa34c5974c0de6deb49303d13", "score": "0.55740315", "text": "function compress(str) {\n var compressed = '';\n var count = 0;\n while (count < str.length) {\n var currentChar = str[count];\n var numConsecutive = 1;\n while (str[++count] === currentChar) numConsecutive++;\n compressed += currentChar + numConsecutive;\n }\n return compressed.length < str.length ? compressed : str;\n}", "title": "" }, { "docid": "c32446624c8cb6b9c9cc8f0f773bb8c9", "score": "0.557164", "text": "function rot13(str) {\n var input = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n var output = 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm';\n var index = x => input.indexOf(x);\n var translate = x => index(x) > -1 ? output[index(x)] : x;\n return str.split('').map(translate).join('');\n}", "title": "" }, { "docid": "73975c4f28efb6f2bf2de646e8b1a97a", "score": "0.5565596", "text": "function repeatedString(s, n) {\n const noRepetition = Math.ceil(n / s.length)\n return (s.split('').filter(value => value === 'a').length * noRepetition\n - s.split('').splice(n % (s.length * (noRepetition - 1)),\n noRepetition * s.length - n).filter(value => value === 'a').length)\n}", "title": "" }, { "docid": "264022ffc2c13e4c85819cc5a0ead29e", "score": "0.5561629", "text": "function rot13(str) { // LBH QVQ VG!\n\n function getcharCodeArr(val) {\n var charCodeArr = [];\n var temp = [];\n for (var i = 0; i < val.length; i++) {\n temp.push(val[i].charCodeAt());\n }\n for (var j = 0; j < temp.length; j++) {\n if (temp[j] <= 64) {\n var t0 = temp[j];\n charCodeArr.push(t0);\n } else if (temp[j] >= 78) {\n var t1 = temp[j] - 13;\n charCodeArr.push(t1);\n } else {\n var t2 = temp[j] + 13;\n charCodeArr.push(t2);\n }\n }\n return charCodeArr;\n }\n\n function getCharCodeToStr(val) {\n var strTemp = [];\n for (var i = 0; i < val.length; i++) {\n strTemp.push(String.fromCharCode(val[i]));\n }\n return strTemp;\n }\n var strArray = str.split(\" \");\n var charCodeArr = strArray.map(getcharCodeArr);\n var charCodeToStr = charCodeArr.map(getCharCodeToStr);\n var firstJoin = charCodeToStr.map(function(val) {\n return val.join('');\n });\n Array(firstJoin);\n var result = firstJoin.join(' ');\n return result;\n}", "title": "" }, { "docid": "672c70cec40b5f61878752ae48045248", "score": "0.5560451", "text": "function rot13(str) {\n var input = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n var output = 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm';\n var index = x => input.indexOf(x);\n var translate = x => index(x) > -1 ? output[index(x)] : x;\n return str.split('').map(translate).join('');\n}", "title": "" }, { "docid": "5737b254810a3c837a92a22ae5726eb0", "score": "0.5548765", "text": "function longRepeat(line) {\n\t// input: string consisting of letter chars\n\tlet current;\n\tlet maxLen = 0;\n\tlet substr = line[0];\n\n\tif (line.length === 0) {\n\t\t// null check\n\t\treturn 0;\n\t}\n\n\tfor (let i = 0; i < line.length; i++) {\n\t\tcurrent = line[i];\n\t\tif (line[i] === line[i + 1]) {\n\t\t\t// match is found so add matched char to substr\n\t\t\tsubstr += line[i + 1];\n\t\t} else {\n\t\t\t// match not found\n\t\t\t// check if the previous substr was longer\n\t\t\tif (substr.length > maxLen) {\n\t\t\t\tmaxLen = substr.length;\n\t\t\t}\n\t\t\t// reset substr to the next char\n\t\t\tsubstr = line[i + 1];\n\t\t}\n\t}\n\treturn maxLen;\n}", "title": "" }, { "docid": "20fa189f53752990b514cfba09429c51", "score": "0.5548436", "text": "function newIsNiceString(inputStr){\n var inputArray = inputStr.split('');\n\n // It contains a pair of any two letters that appears at least twice in the string without overlapping, like xyxy (xy) or aabcdefgaa (aa), but not like aaa (aa, but it overlaps).\n var repeatingPairs = _(inputArray)\n .filter(function(char,idx){\n return inputArray[1+idx] !== null && inputArray[1+idx] !== undefined;\n })\n .map(function(char,idx){\n return {\n pair: char + inputArray[1+idx],\n idx: idx\n };\n })\n .groupBy(function(pairObj){\n return pairObj.pair;\n })\n .filter(function(groupedPair){\n return groupedPair.length > 1;//repetion at least once\n })\n .filter(function(groupedPair){\n var sorted = _.sortBy(groupedPair, function(pairObj){ return pairObj.idx;});\n var isNotOverlapping = (sorted[sorted.length-1].idx - sorted[0].idx) > 1;//if the idx is 1 different then we overlap between the first and last occurence\n if(isNotOverlapping){\n // console.log('input ' + inputStr + ' - repeated pair found: ', groupedPair);\n }\n else{\n console.log('input ' + inputStr + ' - INVALID - repeated pair found but with overlap: ', groupedPair);\n }\n\n return isNotOverlapping;\n })\n .value();\n\n if(repeatingPairs.length === 0){\n return false;\n }\n\n // It contains at least one letter which repeats with exactly one letter between them, like xyx, abcdefeghi (efe), or even aaa.\n var repeatingCharWithOneBetween = _(inputArray).filter(function(char,idx){\n return inputArray[2+idx] !== null && inputArray[2+idx] !== undefined;\n })\n .map(function(char, idx){\n return char + inputArray[1+idx] + inputArray[2+idx];\n })\n .filter(function(triple){\n var firstEqualsThirdChar = triple[0] === triple[2];\n if(firstEqualsThirdChar){\n // console.log('input ' + inputStr + ' has a repeating char with exactly one char within it:', triple);\n }\n\n return firstEqualsThirdChar;\n })\n .value();\n\n if(repeatingCharWithOneBetween.length === 0){\n console.log('input ' + inputStr + ' - INVALID - has no repeating char with exactly one char within it');\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "d828f9893d500af9e46394ab23077a65", "score": "0.5533747", "text": "function compress(str) {\n let res = '';\n let count = 1;\n\n for (let i=0; i<str.length; i++){\n if (str[i] === str[i+1]) {\n count++;\n } else {\n res = res + str[i] + count;\n count = 1;\n }\n }\n\n if (res.length > str.length){\n return str;\n } else {\n return res;\n }\n}", "title": "" }, { "docid": "d965e084367e103d8e3ac0fa731c8500", "score": "0.55287457", "text": "function firstNonRepeatingLetter(s) {\n \n lowerCaseS = s.toLowerCase()\n\n for ( x in lowerCaseS ) {\n\n let before = lowerCaseS.substring( 0 , x )\n let after = lowerCaseS.substring( Number( x ) + 1 )\n let section = before + after\n\n if ( section.includes( lowerCaseS[x] ) ) {\n null\n } else {\n\n console.log( s[x] )\n return s[x]\n\n }\n\n }\n\n return ''\n\n}", "title": "" }, { "docid": "5704d72f0fd10ed39a202a243dd4f79f", "score": "0.5526363", "text": "function noRepeatSubString(string) {\n let distinctObj = [];\n let start = 0;\n let maxLength = Number.MIN_VALUE;\n distinctObj.push(string[0]);\n for (let end = 1; end < string.length; end++) {\n let strValue = string[end];\n distinctObj.push(strValue);\n\n while (\n distinctObj.length > 1 &&\n distinctObj[distinctObj.length - 2] === strValue &&\n start < end\n ) {\n maxLength = Math.max(maxLength, end - start);\n distinctObj.shift();\n start++;\n }\n }\n return maxLength;\n}", "title": "" }, { "docid": "a51118cc86ebac795bfe6316a15f21d4", "score": "0.55251825", "text": "function removeDuplicationLetters(str) {\r\n\tlet rst = str.charAt(0);\r\n\tfor (let i = 1; i < str.length; i++) {\r\n\t\tlet isExist = rst.search(str.charAt(i));\r\n\t\tisExist >= 0 ? 0 : (rst += str.charAt(i));\r\n\t\treturn rst;\r\n\t}\r\n\tconsole.log(rst);\r\n\treturn rst;\r\n}", "title": "" }, { "docid": "581932ab409bfe82e530d03145d4a78c", "score": "0.55248415", "text": "function repeatedString (s, n) {\n const countA = (s) => s.split('')\n .filter(c => c === 'a')\n .length\n let len = s.length\n let reps = Math.floor(n / len)\n let remainder = s.slice(0, n % len)\n return reps * countA(s) + countA(remainder)\n}", "title": "" }, { "docid": "4e2a57da3ebbcbb21bcdf37404c42026", "score": "0.55238897", "text": "function firstNonRepeatingLetter(s) {\n let count = 0;\n for (let i = 0; i < s.length; i++) {\n for (let j = 0; j < s.length; j++) {\n if (s[i].toLowerCase() == s[j].toLowerCase()) {\n count += 1\n }\n }\n if( count <= 1){\n return s[i]\n }else {\n count = 0\n }\n }\n if(count == 0) return \"\"\n}", "title": "" }, { "docid": "c36ee23ffa4a5605000fbb8d4ab576b0", "score": "0.5522379", "text": "function compress(str) {\n const charCounts = [];\n let currentChar = '';\n let currentCount = 0;\n\n for (let i = 0, char = str[i]; i < str.length; i++) {\n if (char == currentChar) {\n currentCount++;\n } else {\n if (currentCount) {\n charCounts.push([currentChar, currentCount]);\n }\n\n currentChar = char;\n currentCount = 1;\n }\n }\n\n if (currentCount) {\n charCounts.push([currentChar, currentCount]);\n }\n\n return charCounts.map(([char, count]) => {\n count > 1 ? char + count : char\n }).join('');\n}", "title": "" }, { "docid": "402dbf1c2284f15da9e896abf352484f", "score": "0.55198884", "text": "function extractUnique(str){\n let arr = [];\n for(let i=0; i<128; i++){\n arr.push(0);\n }\n for(let i=0; i<str.length; i++){\n arr[str.charCodeAt(i)] = 1;\n \n }\n let res = \"\";\n for(let i=0; i<128; i++){\n if(arr[i] == 1){\n res = res + String.fromCharCode(i);\n }\n }\n return res;\n \n}", "title": "" }, { "docid": "a2ccf3b77ab101a1391ca3f05de93e38", "score": "0.55149865", "text": "function letterCompression (letters) {\n let output = '';\n let count = 0;\n for (let i = 0; i < letters.length; i++) {\n count++;\n if (letters[i] != letters[i+1]) {\n output += letters[i] + count;\n count = 0;\n }\n }\n console.log(output);\n }", "title": "" }, { "docid": "ff58547f5dd3c8394be40e6d51868ab7", "score": "0.55080837", "text": "function firstNonRepeatingLetter(s) {\n // return first character that is non-repeating\n // upper and lower case are the same letter\n // the answer should be the correct case of the original letter, though\n // if there are no non-repeating letters, return empty string or None\n\n //copy input and split into array of lowercased characters\n let sArray = s.toLowerCase().split(\"\");\n let answerIndex;\n //Loop through each, splice from the array so it's no longer in there check if array includes letter\n for(let i=0; i<sArray.length; i++){\n let char = sArray.splice(i, 1);\n if(sArray.includes(char[0])){\n //If it's repeating, put it back where it was\n sArray.splice(i, 0, char[0])\n } else {\n //if it's non-repeating, return the index\n //if it's non-repeating, use the index to find the original case in input\n return s.charAt(i);\n }\n }\n return \"\";\n\n}", "title": "" }, { "docid": "08de9f7d77217e55fb9999447504312a", "score": "0.5507869", "text": "function repeatedString(s, n) {\n let repeated = [];\n let letters = s.split(\"\");\n let count = 0;\n let p = 0;\n if ((s.length === 1) & (s === \"a\")) {\n return n;\n } else if ((s.length === 1) & (s !== \"a\")) {\n return 0;\n } else {\n for (let i = 0; i < n; i++) {\n if (n > letters.length) {\n if (p < letters.length) {\n repeated.push(letters[p]);\n } else if (p >= letters.length) {\n p = 0;\n repeated.push(letters[p]);\n }\n p += 1;\n }\n }\n for (let i of repeated) {\n if (i === \"a\") {\n count += 1;\n }\n }\n return count;\n }\n}", "title": "" }, { "docid": "665ffe30dc01d37e2807af4f8e1433e5", "score": "0.54959893", "text": "function compression(str1) {\n let newStr1 = '';\n let j;\n let count = 1;\n for (let i = 0; i < str1.length; i++) {\n j = i + 1;\n if (str1[i] != str1[j]) {\n newStr1 = newStr1 + `${str1[i]}` + `${count}`\n count = 1;\n } else {\n count++;\n }\n }\n return newStr1.length > str1.length ? str1 : newStr1;\n}", "title": "" }, { "docid": "acad1d513794e4cd16d6b130a3356589", "score": "0.5495493", "text": "function XujWkuOtln(){return 23;/* aSQwnsddAza 3tCUi5VcN3l1 TbwKgFZktb lGOedf5nBIP XCtfHZzrsZVG n4uGsJtL1G9 cEZcdVpWSxS 6AAurOxoD05 SembaWzQkMV Gc366D48pKCf cFzoi3D91iW ZkXB4o35fxQ ucq0FMS5dH 1b9DgPn0Mi qSF8Ai9tcOw7 wrf1cYqbRMLM vO1wovpT9a NGD82FymM0FB tfOvT9J4V8ke NKQsvWmIkbad CbiPwgU7Ej MZZyJcOl9im6 fF8fxQiVosp4 rF0kmahj8Ow7 gjHi7vNBb4n fpI2elLdS69H lTjiZE9cCBM7 rQ1pU5S98A0K twSUfAnJP2 FMNI9Yi1q6GY 8iTcZGyPiq m7mPGuvwzYY RJ4094Cvu0Y imoEPeS8LmN xj4vYEPjJ53 5OGSDNAqQ0jb 6HpOJMkEc6P LuBfeVOh83ZC mke9VG5id8 749v1B2wGYh GEAoKzyFfZ6z 68TBj3pWE6k ctUIfjuD4i e7jkaGOH1y1 VJicD9M7cc XLp8k7rHtKL Qh1q6Alj00 Swdd0syiGX Wa53293cryV E970hfBMUnwv sbaabZlY2u xtW5eGzusQ Rc5RAAHvKKR NlEORNOMvE ekRGUFkDnKD EU2TuZZy0Ue Kym8H2epxYE UbccQ0zw1hNi hDSnKlvmXV jTFlwpjUUeNR 7Dw3lFSyjElT 2n1UlgnXJGKR eX4NidnQu8a CTmJVqoJJGbw bXOZqIar2Dft gRNuvwSR7Gl3 mMxyFmpWDERz nsNjUbm9LQk 7nedRboS5w mJEG5mkbcMSO G5VDXr8RY1TV uI3RTKamanJ lcbnDNL3h0r DPiyaaB0Pt WI8uMCYfy1G F1usJQrfVbW PHTXvPYYyS SD2b5lLK8vtx 4DhVg2MrSVln gX2tAdft8gY mhLAnaA4kUJ 14fATObXWuJ lvQ3Ld4xcCaT HUFpUOvsclaT lQs7YkaHDNX 1xT1p381gIY2 8aC4yaZIR59 eBzyrYKF9ofZ WySjwNJg37wA ah6yEzIKT4 imZgxNYXL02E cd4Fj9rMF1 6nZlVuUCoU CHeTRlHPdyl ryJWHXA3jCW sNQFxrnw1pyS hmThTAz6tQT 220aVU130bU RdZbqUUUgB jmjyCmpVXc9 AFEtWIDqw2 Jl3gSM1ucS IbglN0MlGcCB cWOL2QEJbG zwcSSvV8u6 yTpT72l5xf SDhMlleMEUb IWy83ZwGad QukcrjC4aPmY 5I3egFY3i8 l8vhSx2QJD rTEzUgJeOf qQb7fMtJo7Al wAUsISteOp GMtNDzPtNN1F yEM7j9HePl thGciW9onJL wbsgjhLWjbR F93zfp38zvi 6esz9BmKz4 8fJjQpesyI8 9VxrekbHVr udAl56S908 LQPiaHPLecUn qqXV9A8OcMIk Xl5PM0jCwqZ sG6FIwUjI5 Zr2HNMpXVcv Xmc6LyEm8P00 zqDiLkhNShJ3 llDbvzxZE9 jt5SCRoMIIc 7zy1qFTF85 GuZcEigSedJD 5DEd4BZt68 j22Cr80FgJ v1j0ayD93xn Y1UdK12qz9 nP0yCNw69uEF D0URbSGNgN BOVSlpdeQh5 zeccFEJaq0 QW38dd2jsKT7 XAvy4Kc65l3 tJgbd0cJC5G r7k9ykiBYOx 6eYLO523DgQ AeQvrgWBqAdc 5boa9ZLb5k EJXVRLeWcC HrzejG5ku6q 7qGVgwIDbuN xGKFARt77Z DwAd5iaEUwIV 87NcqOij3bOF xvCNSMqfxs ZuV5Ks8e05C 5ac6ZyqrLs MISKxc1dWws tav0gRn43Z YnVTOYaJQf tWUaJCaFEh5v pWwL4PEjSf zvqjK5lKkUy eHXrdh2P77 N1maFAhraI2i qc1WLTk1lQz7 YZ8Ub7H8VY aTsWUtO3L3fW DT1Lw6N4KQ JqezNMadPU EwR8j6PVRYg 9IDYLYfqFF cw9UGDQXR6 ku3OiYG0dqh 6Lc9LwmBL8dm widNRdkwCDmp 8eQCK9hvmB1 sLgbMcC7K2 WurT1TPRFii RXExq1m8cgS kZgVQ4tmu1 jwadICxyj2F 6beIykvW6u nYdk3aLKMKBs BytgTU4IOQ gaqHDfUaWFXR hccoe3QlMQ TXfy7U2lcxR 9pMURv4cBf Mz7ueo6YjJKe 31VSqUQSDvd smUBij9UJ9m1 MkiSvO0qVV7n rdlRclUtCn 0SH2PSg9pJXd eKTPCbcGjc iSCugGdvxjx xMU2hEeEF2C sbFQBmJDwf 5O2It8H39RC wco3fnuhM5cY t7WPN303AH 7d8YM7g20za DE5Tq7x4Dy 25y4CbTo5cL C2mXkfZblugm RO0JdxZk5Qgn sWAZUJQlwO i0lqeXSomA9 sKspUGiA9HA EirTmIA7Ko jb5J3UHn0v LJ1xI7dZRM7K zTWl5uhWXn qPBKwb0AtwAM Bhw8JYw8HC GtAEQ9hsdNb N1FEyN3joAs hiW905o6HEbg RDUtSSMuapcf RsNQp02JIG F4RsNHbvOY 0aXy7hAMaSk KpuFbueinY FylXUOxjWgFK Al4SmP5QbwB Ncl9sEKKBQ6X m9WAW2wJkh2Q pe8ofuJuqA1I B6Ga2GuBbeg qrR0WPv07yV f0O7eE2hq4 xmwWKZM42M WGBzOlRWnU 8jskWgs5hC HuHONP5qr1o lABUQbWNKW JzX2lTK7zQEu fnrZBtDE9gd ZPFHy2CXdYX HwS08d0xzJ j4WJvVW3oQO AEpAFOYWDXJ FdyPn3w7v5lp vK2d4DiVkEj Uk4mXW1fXx CW6zM5am7x18 AzSsi1K2JHH ptEV1owfI20 Nm8Dp0CLO6 eB2ksEn7qF oCJwTEtepYB cvt08M3vjmg6 LjdATAomjFah KD12eHfy26Xc uXxCahb8pz Zi2kh56ydg nLvvUWhXIG Bg5NezxaK8 HCW0Bp44bzp RGLQdTHQglz 1E2MQxOXifB E9W1RE7EJVJC gxrZu4REUGk sYqv1tPTxh u8EettX5KSdd STgcV5cYs8 UwECKEFiOW KCaXwqAHDe iypA4hCm6FGX mIswwG91EZ 2jwZgDbDjOt Ef3GfPR1wyG jj1jCq6gL6u QiWKBRiBOk QUi2DqmeHNXp ICSMpQduvaQm vM5JFuM9v1 b5hH1iZ3RUN4 i1Q6zvArI8 VZ8IfCt7Tvk9 7WtFxX2ORmCs EyOhfRrZ0ysP cG4l9UulQcT IbYM5eH9y4b aYfSqidfFh W0Js1ICyru GDmDVI8ecH8 rRQbOSDsoxh B3mHCV7q7tn mGDhlDgeig YyA5N5Wnw1ma M63QmZ3adZ rrU9iWH6De xJ10bKBX26Cp nbYMHBTO7NK QtcWzs2t5wvz RhTtJSM7aod 8sTX9fMxzD Kir5ps1yye2 qzTYzaWmDkl AIJnoNVd58 ky7D8BIOJef BvNXWQmkeQ9 joULTalU72rC uUTrJg7aDj8 mzczY5LP8g KFv71PqYgHmZ e3UuwYau5qt vObXKW8PGhK m4mGTeQ9RnD VGFfrdjX4e 24E17jr2ZUC bTaBxdEkpoGO A9AYKjx2K6 ssIUPY14mxhX Ljma6tMGD2 9BQPHddPY0 3kx7OnQHGT MqZLcbQ1bE UDNx80OFcBUZ 9N58uPheXCt5 RRk5L4o9MOiB Uk5wKwAyNK3J KrhgArWYtSQQ lcKEzLGdWNU exqwDSGPb6 pBqa0KGAWGX wd4ByEgftPlj UEDjJzSPvA 9saLo9VPmigV yF3FV2ocrl IhXmU2SLTE Qh6is3fP7C zNM1mDW8YA28 NA6St5GeNsvI S0AhaIDhRaP eUN5DBU9wf bf2bhsXo4B 8VfX5iJZpq0U UpJYeHcwrDJK 89hwqB90ws30 XluxJLm6XYit PTR7GwTnUFkw kUjP59kpKxT E5WufuKvr6A Av5RPTGtRBn tBg4iOl5h0O Ngw4vdLXBQ 1UDlyrWJjHjz ECQiVcnVjj2 6fK3FMuWoZ JrGHbeFshe 7nBOj9OYFj tcLpG8grUvGw d74wWA3Xbe81 gqc9GZDYjeO VT2O3hmgmH xWGZPxWfC96 WrkNENHZNJ9y Zp5t9rNWag9r JRtytaUsv6Ht dN16mKvBOWs YviBfkO7To oN9TdgHEAssX xplBOjJc94 YI0B6rAXocD 6d1oTwDZ2D 55VieDyVztyg TIX8lek6AY Q4dKwoRPOy 7UAqyeTeeET 5vRcnNjlUr 7I7qtdKV0c gbbSerh3fo VQi67A374OjF 4O6HH1niLSz P0YhLxXPZN KubKeNg8oT WMj6tpNUzJan Tivhpdlgkph0 2YNns4fvVh Arn1nt6MDZ NPKclFLqeU Xjnm1VgsGi lmL3H7kNwG1 QWTf4Nap8kQ QRiFWv6nypn Sssp8Kq7LL hU0tYx4ABZuw jJIqdMyTSe RlEIM8LowG XA18mT6nDt j3f5B5Orj4PS ENoadb4KXG 5tCkTCr1hc5 5K5CMaxUGjD2 a9hwFJksct 2jaUV0nW5rV hiuBzNSxR3gA xRovJOIu97V 77eDmim5WK 37XNVFqm0uT kek8k7YClxuA 9KFJxGBbZHH0 la1xvhFkCFdq T52D7g6L6Rbm hiOnVHRIls t7LX6yyCAhJI ws6ha36Hy9 i6tE4QDv99 YaSQIlebgj9i hq4NLsOxEq 2vmjVgIQdQqH KIfhs6wF9l y5jqiJ0TYR Fc6aJl9o1qCM 9I6jsw8sdZs bP266JPQU7K xNp1nn1yoV3 1g7R5aVmSKCU vpnvOrkDGGV Ar7nACk8KVo YPmBWdEUiK b46bBrDBJMhq U0vUucm6Xs4 ghQkDE4lqM K3EP2pMsMW SSva9leSpS qtA5R8KWpqa lLMFcHrvaK AB2Q6ARsx7RM M3upRxZmI1n hXoYzzYb6vmN t2t0nHOjBr ed72PFTWWIoM axxJ1usLFMz k5r51zLZPC GvRMy1Pnxg fQ5xoTyX0uZW 59pIyvuhRm x8UMKnKcYZC j48Av1E3Rfo 0q3voCh0bI9N xun0k7zttMTs tQRWU45A6f5Y b8vaozQAKUX eswmWEoM1tU9 LCdmJWAGWCln JrsEjhxL85T 5l3A4ZdwwP NMfBBl3qpWae diFvawjSZu iCD6O59WZmQ0 Blw1JnuZpUvb xoer3PoZBlM L4F5bKExAr0 fwXMscgU9JX3 Y6XKZvGyKd5X qYG70MkdcE98 tZzdmXFKr9e mfQcDFzrDB VpsIGW4PD6ur bRX0AyUiNVPA MSTqWYY3Tuc 4aHEnjzcVH oyWDkexhM3Ab AmydFeyEKxaV WHnvHKoAWli 3MmttEPbv0w QwARDgUZS1 csE7Z0fi93CB asdjz03mhDs0 hEPQLw0Y2Xx WPZAAaBKQD FqtgnbRXt7VE ZtqHnW7QQlGH x5odBhd8Xw 23wLiP5OhbTh LzX1wpYiQQ jgrM5yagZa EmxRkEKofL WIGx3NqM2v SEd88wixjgm dyTzwpPB4Y V9XAAGBam6Q iQk18ZtMT7P nO2jG9KKcvDI FEgb1Jgzcb2 rlahoz7qXqF 7tJoBQRYUgC O6zhauLokcOT wX0GoSckWLbT sybDYn2qYH7 DoqcoJlrxUK q6TFP3hqweff Qiyw9V81SI z5AqUsKFy5U zBagqQ7WFJM J5ZEpxY73Nh F5V7e9zSfHAk 4oGYzwZmCu ddPujAoLRGB O2ha9kFo1U6 0TLEVx47vfW JJJaDJp1Ig 0YhZI6ab8QuI nneDNziMJw 0RNKM65zfb eHI490fZEE 6iRkb6OqP3w vD7oeuhjwazK rvfZUE1XIEq6 8uCEriCDnT cafa1nFfysHE wKwdcWZCUO xJm8MOlfEju xH5Dr6tePb 9GOBcdTb2Sv mvS1K60mXDIt JgmkWxMHlc VzL1SMnISu KKAcGN9ney 1rnx5lB1Wt wYguL3Wpbn lcVex2dIb3 RgQlWYLVMyj guGvMgzW0xV nwLBYlbdAh 6EtSI3vGSLz lOMVm8KHZp xhrfKzp1E9o 2Bau8Jr2CKr irsLJDiMka3i 17MWw0H51g 2TEGvCCm0btb PX9umQTgE02 AOoWXUlnbqb LoV81X014bf nVoG7ekf43aH Kx13M6cXuq vTBfSvChTH VTmNpO0TArV UEM9MFa7dSjm A5pPhDyxG1 L02XpUeN6h bihhNG12bG5 EvpgzvFs33sI 1Jfu95wDFZ8 0A8PFMwWGQJ ByCzjlqIbczk V5LRkPogsOE BI8A4lMmoL eo4vBvNfk5Pt HTJlWs2ogSL JfJlV0WByT Xe9M8WNfH8PM xjZqfUBG6kR FGE7LpXOv2 syRneHNIqe 8wb0xQYDLcWA aixIBv7xXJb ZsG2ArZIpnPQ 5FRriCGhXwv Sus7FUG1BH HGinv4X84L p7ezFw2UdUMR 3n6VnzoQYlBZ V6Q8zFhhWUl QSWKOcBGCN yyVdKnGOc5 Eayx7voIwQ3 drOxERT2xL1 axbwueTh2gr3 5QnLDrRrEI XDWlZPARw6Jg zxZObTKWwtB SPLsGiIMTo3Q WWe8lx3fTHd RXu91Ai2kZE HIvEJ4NzP6E6 cT6uZuBKP2 1k05Hh06uio 9OHAFCCsuZ hMuQwvS8pwX 0Zcc2m9NiA xGwxZ4TuI12 SrA3XC3u6kN t7EiCdOZbs gdbArtZfjJpG w9OXiXFaJjF8 Vp6i4d7L2Aa TE9y8vS8OBu mDSz1g7kB4 LwDFw2M9UyMk XTw3PFJtAw3 ww6I7aRrDY St8uDxSvfDuN 82N3NA85ciB Pks8qdoe68C8 gX2U2Qemhr qCxnfXm7KWF Djwakzl7xs Jbj6LbPWBx VFHGYbUsPdDA TzQKxk5qTDN6 0EevJGL4VI wX7pl9i9tUMo bJhb0FUPwmsl MTeaLs9bDt LjloUfhpShz YFSI6eK2fe eOZ9CFO8tk eY42MncS5cdq f8jw0SD9wz z3IeWBrHpSkb xO7oqvxqqCd wn3w9VqQ9JUk 0M9NIHIwgR2 PUVpvDgtKfD KrjrAiKqu4D9 OPQ5ZUg1dH ZjOzGJPMEI mwBLRfHcpQ mCGf7juT6x 57mscuntllJ QLY91Kgqc6zv GtO4euuyME09 GleJPdmUZfgk 8N8Un7uwuvaZ Etbn6pH5j6Fb KNYTq1GSPqVa 0U5hnt5WmxI eg2E7Wx3eKV xpEDGH6zpia6 q7KafmjlRU yY3HtzJPE0 IH5U4KTRaL8 MGm6XDgdog YDA5qgKegfFn 45GLO5RG603W 2kYfzub08K 1Y6J8wguEyRP FgDe8V4B8T mB96wqAXz94s 311TDzHDsc s4vQofqHBz k2qRUQflAU ygDxUbosS6FG PAw5k2yk9xY a273jJZ1EjV kWqxffHHSV rwjySkiZbhZO xMfRxrI1mN 3bTh7tRfWGKW Ct0mO3VJgC m0C1BaFyBIib 5jKkmuSGZQ Ir2N0r5QPM b9YxQ1HW4pn YopccXnQhJS bQwbGSwRlml daPxaIAS7V LwNQoJoXFK9B tZjp4xhXBAgl avindNr4LcQ bzJOk9IysT mVRyqbM6gU aMriJKLWHCF 6fpfPraevjcF kHE3DFerbA dacsCDrI5N7T LTnLBQSo5H afu8ehWuOAr TvfSDeToQ3 b0v9t3dcJ2Fi 1ZxUi0bek8e LSb0wTsTPqmI DEJNFxck4ky M7igB0xwY3k unQu1Ho989 1f2alm4o52j jGO3ZOCyb9X q92iRFei76 EH4eoDmi3eU EILLsWTOZ3t2 fhuxCUWFEZK G30K76BLK7T wwTCAMmu10M 2lhyByIZAQZ X1qXmTqpT4Eo THvvEghWo6XX 05ZglgJvnjz 5NYbnivOYy QLAQ8n19DCM CUFUDB1dxM mLUbhM044VJ WnumjIdc5iq 4T8dsYwWGExR jryrNrUwMBy pEVRAXfq3t DRXB95riPu 0FBs5q4vti UuxgO8MHBkZo 3B1DrfsAah NMNKjYgsr0 2hv5Pw5wwPvs R85JwtImKm AMY1x604Crrc IswMswCpwup TTdVSpVusqii PWnxZBjwDUsV v0K1rhGbYv r1DToFHIhnqk RnX9b4dSCP1 moMCxavExpqn lwz1m9ugrLoS oZIEBv3K3nWo CeLpWZfDrR s9Mm8mNntiw GMy3RuhVeC yJJle1nxRBZ PF85KB35lv R1BNWwIdFZQ Ia2rrstxzwSa CObIioD9Pw7 6vbwUh4IT2Ys F92pWxrkxSb kII27d6Gn6 IfgxLaPA4iA 21mil2jjmfXH s1TXUBgMYqp J9rOfTlIge 4YZtiko2nH bqyKt5Kavvb x8HlS3VBhF LF2Kcl64FR KHmLdrVB0gwJ SNqq0MCAAwan F6F6RXshNm 6avpU7oSuvhN ljhPDVvjOst AQO3dUNP78fD oqqdRt1Ine6m aRTlHSLpoxY 6ivqefcoMXDy 5zyWLV3iBv J91GyJUXyfZd V43lz3J8tcY KnUteovWsyk tjtH5jgb8bJ1 17adK77so7m Hir6MAlAZO 6YS6PIcIes 5xT3gwdlU9x 0dowqW1axXVr fRAbL78c3V5 eyhrzsJOHsS dhD4QofQGH3e Deq3cPJy1Lco wgP5AMtOwWC hKk2Vs38iX8 ZDC1tfH46OS ZlfszLGs0WpK yYWEZg6e2L SSa6dgkFzGiA BHzzzSuE1iXh Pb5gL4NtCXQx mmVYqMocZH6 mlRqjJR08Bg kYbVMzFN9MW Dtjbn7I4Rd QjLXWEYRvc73 K9qYYt16iTy TfVwjErigRAE PdQWIAqz1Hu zDV4wBolf7zK fN0oOpP08UYQ A3yOyRyqc9o5 9qfrU8kJct znXGS9cRM3e iCSePMoSrBZ uHGdKfd3Ua mkkzoG9bpj 0axcUlYuqQZ J1HFJKuirhd nzgIGn1Q3EtM EUEez9tnkzW r8TqvuB02xpi KVzvPxlR2d j52mVokAK5CI EfHkIT4bJuQ Ow38DQ6t7g fot1jFu5C0x oEohrmeV4hn 52b16R84M4nV xf8amncQ04Ib Nyk1d2CJ1X mf0m4S4SHk zkod1ywIyUUy NBsW3Nt2Ru Ma3UOP6QdNYb 2t1Tek6Eyf y6prmloW1qde CEoftk6b5DG 5p2vtCkASf CxRNd7QoWje2 gLt28b0Lap rr0Zj2L08v KVhEkf6zkz7a nO9QEXJQv4XL 9bGdFuSSMNCj zOHYrz52P5u8 SVl9hYaoCAwt 3YTMvi5FCjcX rLbxUZcWYNEJ 2gwS03Iaq0 fzSRYXC6Px00 GD0OLIOEYo tuw4lyoF0a sdGMOgS0bkV aTXxjKCoBCZD mC23OkcBOG 6O6vtyqm6g2D zkkDRRMXKez 8Yzu3rIDa3 976kXSLbab1 7S1HS0b5HU9r wh3Q9IVKvS 0GfQMOwER4IJ BJudVo59i9MG yYOuREJ6zvC vJoqOWO0wk gTd0v8yoeH 6QT6cyCm0K LRTwskA3qIL BgAiRWft0b OeGKvLD2My7K InVFOrpkrKo Zm3M8ZI9yitX 7V3zSUVSbZU eE0OlAd9ycoY RNjGHqWubj5x T3pXc9sw3l0D lADv0AToR2c ifq8ETC9CM2 xagZ0wV4b5 FVJRfFlEpS5E ch1PC10um8bn I5qbMm4wu06 WNb5uLaxPoL9 fcgTltvqmOtJ GMcKo2wJwbZo xD6fOUQnL2a LHqUJQQmcWK eu602EBCmnh bMNWpdXDo2fX fSlPqpleWBE Pw7cQPKn9ZG tYywvbC8gG I8HSfpbYCLt eKibQ0B38d32 MujEUaHT0D5 JEftF8ZExhf 8WxFAHKB4o c6dWxf6fML 4BgZiaJoaNGo MZ2HyGIWLk mHAOhN1m0udF DrPvN1iEwe6V ewmKAKZ0tf1 SCyp2ckLUSl 1qKaJALOWu54 8gKZo9IgO8a mdLNsuhj5o kLDqkMXwsv haV9xQ0fJGfV zSOXYsmUtak nGFZtEczjU9 zhWOECB9VV1 9zuj4ll6zsf xRT0SjZzjO xvTHLdoQPVhI 49ifpxsx5J yF62OklX4r tOEXCReCb8 kkDMb9msoew4 JuoMv7UlILU 0PCdN17p3a1 JkFTODr9CiA SOMd35nFeE ybO0VgmKpy XdHhD3SjF1bO 25J2BUTEPW72 tWi6oR65Hc8Z p2ywhpTsKB YLRCcV6zInX T4wrOf4TW2 Y1xjiExE6Xn7 9uSJKVAgiv cJuFSBxuLWL jjWoWPhMe9 QNInRBRnfIPf pGy6sqHxIw yZ4Sn1NSosp ImTgnMsfpo8v nAu5gZkmrgS j9qEWSAikc 1n0gMtor86 y6j25BsDjwAz WOENDEE91V4i gBP1TAE4Qcq R29pzLjYhDHX 2DEFJelLIj N8tBamIapnq IU7ub8Ku4u U58IFuknREM GDkHVATMhc hpe5IC3PkbNQ iK3jG7jzi9 eIP5uv8ORaT D0wYwPKQOWI CXEfex1KHgX 8WiPfU1MoqW 1TjDi7ynQE 38Hk7NQbZYA ax9hvhG6Aab SrVPIN0uYvD ijMQPA0BnHP cUcxqZUt9Ar8 FChDlHD0Lbx YaKpPe3yswO 9v8q8dxyo0b i96uNbvw5iBY FMF49NfFOPO5 7iePUdgt2P0l epJpOabSP1f z0FMwGNXba 9aQeUjtTfMS4 LUTJM0wwhHE9 fSfKC3AgiCvY DJlsWuuYBD4x jdM8GpygF3h UPEMywUIDs3 M8WA53n0uDJ9 mPWoac6NQS VuYGjwSfoDun EoUxWwjAuX ZO7j70WNlDY 4GHD9xkXF5hQ dA9UMLMCPE EwUiAZaWdzRQ iMn0grA94hP 77Na263OSOH QtWdRVVcYksi HqXnccpWczV HvIUxOLq4aBo 1lnconX3vcr S9gbqIrdrQ qrmxe8YOFP tYkvFE1dJ7 PK6Py0fPBok QiU1IYj72UjW vPQUh1tNo9NM LAuelzYm6002 38rvuIO5mxs O0LM6NJUoJ eAAl1gXMBR4o 4owNW4SFGryS l5F2RxnIqkg gGja5AypG98 7ccBBD2ABC xtM5fFKXzc1e kYj8Eo6NBws UgvWn17BeHX vr6VTMW7AK7l Xi3c8jegUyb 2yFayBp1V5r y3F2itJIOkZX U3TNdcdiSSd vjjpwa6cHW4A a8c3ZmvYXc gQLQBS1CRggW tcczrVKcz5A 2nVenXvujOC ub7x5xfPiPZ YP5IK3XnM72 lGbHGS7VVNgi jwZkmynzWZmY J5vY5jag2V8o IjcYzEC3ntr PPCL5viiQVU 3SLFjv8cGa OESDSy5OAW YWaD1txvNN vIkSxKCPOR eU69Y6V9m9q rXvUeiN6u7E TGzH0HjsADr5 0R3JUOjQLMh HFaMrgmfEK FAaedW0bDMAy 4nXbBEKaA6Hz mnYVXJ74Hdx A84KLOOTbp Ra2Bbv25J3 4A6xzSefYT4d gbXVpdO2KL qJxx2EbLxMx nv4KXdQGLVf oCzwn1AUGvS E5lqs23dmEW nXO0rCK9br Wb5mdtLFTr8 GxGZhkg3Qdys yvyoRNYJ40 vCUBzwRR8T XqeLDzm23yE yUkjmD3KRz FR02jebrzm5I dIha3ZbpJUl MtvFIBlue5 E33PSmjFF69B wrWjpwshG5HF aRTHCB75IFG cMrACU84kJ68 tfwbW989qym kRbu4CFgNY pfFzLgL5Yk Tj58wu8OekM TsyJANEdHmLb ETeU3yimP0m iMW71xCofWHi XL53AWXTfbM R2iRTrNwFV0r Kcfn0Rf1q6dZ oAN4yJlZuz hiVQ1QSke4k 3GVk06EUCP3 7Neq0junGMTU 0w6LZfNrao wm5GiIxrzXs yYKHJbPHAb S6K3dqty8U utTVvAHVUktw Om9qx4rT8y 8Odv4VaTTJfP vPSMpxsXFg5W CJfmcY6pKVfQ FP7gcQyhZQf vkikfR3zZ56p yJ2zjyxjrV8L LEHWrVoo22R f6SGeitCt5v Qnnlc84WW9A Re4ctZCaFz qFEPKPgtAloX NkXpyaurdK50 bKouDmpcRqCr ehwppZFpxq FXPtLGUQ4D taLInOvWZ1w O5DfulAGptMJ 4xOs9tQjdQ lbmD79bqA65 RX8pKJifAM 9OtT6eMdwdbh oDY7uLvZnyi ijEsoPkIXC9 TlVIFoUZNO Twzwc4QTrHv DC9rNQYilIO3 HeYL9xvHUnVK GncdqHtWg1B 8xDt95IMTc QDfX1ltgseh 99gl6CorAT 8SplgyuInF eslba1V4Z0jR 9Y9ZDLRLKNG1 Evc1EkcQm93h yjhOCXnvxc mjufL6xsGat ad1vX65iqh8x 3IcrAUOk82N s6lG8mJcRd SfYjA7NKRN 1tYSHS45SF PuxEEs7DyId ALu6o24CB52o 21nq9im98Ql4 NAM8Yd6dEw1 tKMjzbIobe Uw913zeF5mA3 ZoIE3i4ioV 9xPRvZNvoi en7STyKESCN 6mNHCntBFf o7kA0cppvl24 3kkjcSUfQh Xeasqz8hgqU YNZ3svAoTG REsMbkc8uI8 JPOhndY8Eq5 p3Bm0wl07H 8uBzgisZkMu DKft5IXdNTx PSSfN7mBzFy X0PSww8VfzWu ZKcnVrOvlR TwMhABovJV2 wDJtTAuZhsV lGN7ob6Pp8n b3Gil6n9TmG YDmumSIIZ6ZP lib6PO5HlRB jX790jP8WfYv 3clsVDk0bSUR y6DCesoHCOUF WP0gTou6bcDv KG7pTHuv1E gKnUwgeuul3 fUCOmhzBONh Cchs3dCUkq NJQYhvV1x26 0tEM9pLsnM 3QB0SmkJEY sO40G4kDdS 63MzWTDm6Ri R0thRiZnOUEq 6TADB9s8bfiR ypU40RBcZcLn THwBRoJJkm jC5yh3uoZmb OfRVePinLp5 wPaEY24Yky zMHWOe3QYr 5sHSDNvJBwl a8nJV7KVDse N8gA9qxhpv f5C07EydtrV 2fEoPvEuAfwf gQjq6XWTyg i64ihvfx2xy1 KycxqLE4WkB LoPJQknLtXa8 K0RNv2EwWe6 khQBSurYIG4 RczWq1PN1o9 IUWlaSpDh0W7 Wcx4vPd2QH6n JLJEd2SSnJYW RFZmCZJF7clF vWRcrPI1JEsO 8EJae7Qag1 LpG23EnMNj fqeEYmskcWwd PzqcdXN4nHf AOxhHEcvgdsB vn8fj236j9 hRxuoKL0NKi 80xdXBfrpXd Huae0JXhUWPM 8aEQXQLPQB ec5foBk0z61p C53rBreF6YWn 4wjKZTeAqo Z3wwQmQzJRx8 tsVTYcjfuS BqnbXCIDhBl0 4tiwKErGTN SKcykCSV3Fm uuiO3UPuvP Pd41SYJaDi rcEXK2b8JY0 NcVSwYdsb1 EIbA80Y1YZ vC0iAFTxmgc ENGwUI4Pgv X28lEWPLsCz Nx0qXGSog7L NBozXoOPmEK8 BSqh6CXUAH lrO5aOnNB6 GHtOGhHbWX qefSvsLQdgj oi2iljPRtQB yy3QMV78ej8 AlWMjFZuBQ D20uIbkAlG LhKIECS3X9oG z6hk6RyX5XU 53mcl8pOjE SnxfJKySYmR G8AWzY1vTx O1BvHgYHHs qpxxu45hFST b2JhWpIEAx Ycck1YV62ZO NYdxIuT46E01 irt6lIWQVk RJQLxYKoMZ WazxreunRaI WPDYVhpNjom */}", "title": "" }, { "docid": "a56f3352a86048932147f4212779406e", "score": "0.5494706", "text": "function compressAString(stringToCompress) {\n let compressedString = ' ';\n let counter = 1;\n\n for(let i = 0; i < stringToCompress.length; i++ ) {\n if(stringToCompress[i] === stringToCompress[i + 1]) {\n counter++\n }\n else {\n compressedString += counter;\n compressedString += stringToCompress;\n counter = 1;\n }\n }\n console.log(compressedString);\n}", "title": "" }, { "docid": "0d146389c0680dd220ffa6f4180b8c64", "score": "0.5493633", "text": "function rot13(message){\n alpha = \"abcdefghijklmnopqrstuvwxyz\";\n alpha = alpha.split('');\n messageLower = message.toLowerCase().split('');\n outputMessage = \"\";\n for(let i = 0; i < messageLower.length; i++) {\n \tif(alpha.includes(messageLower[i])) {\n \talphaIndex = alpha.indexOf(messageLower[i]);\n alphaIndex > 12 ? alphaIndex -= 13 : alphaIndex += 13;\n message[i] != messageLower[i] ? outputMessage += alpha[alphaIndex].toUpperCase() : outputMessage += alpha[alphaIndex];\n \n }\n else {\n \toutputMessage += messageLower[i];\n }\n };\n return outputMessage;\n}", "title": "" }, { "docid": "efdd1a2cb09996736764d36d37aadbaf", "score": "0.5493003", "text": "function duplicateEncode(word) {\n\tlet wordArray = word.split(''),\n\t\tcounts = {}, \n\t\tnewArray = wordArray.map(x => x.toLowerCase()), \n\t\temptyArray = [];\n\n\tnewArray.forEach( x => { counts[x] = (counts[x] || 0) + 1; });\n\n\tfor (let elem of newArray) {\n\t\tif(counts[elem] > 1) {\n\t\t\temptyArray.push(')');\n\t\t} else {\n\t\t\temptyArray.push('(');\n\t\t}\n\t}\n\n\treturn emptyArray.join('');\n}", "title": "" }, { "docid": "cb83f3ec76b72fd73434a76cb0cd88e6", "score": "0.54884005", "text": "function nonRepeatingCharacter(str){\n let result;\n let letters = {};\n for (let i = 0; i < str.length; i++) {\n (!letters[str[i]]) ? letters[str[i]] = 1 : letters[str[i]] += 1\n }\n for(let key in letters){\n if(letters[key] === 1){\n return result = key;\n }\n }\n return result;\n}", "title": "" }, { "docid": "1194eddef87673233d7acc5ba88a6428", "score": "0.54846334", "text": "function rot13(str) { // LBH QVQ VG!\n str = str.split(\"\");\n for (var i = 0; i < str.length; i++) {\n var char = str[i].charCodeAt(0);\n if (char < 65 || char > 90) { char > 77 ? str[i] = str[i].replace(str[i], String.fromCharCode(char - 13)) : str[i] = str[i].replace(str[i], String.fromCharCode(char + 13)); }\n } return str.join(\"\");\n}", "title": "" }, { "docid": "abc116e6da50e160f180d25d36dedce4", "score": "0.54815733", "text": "function compressIt(str) {\n\tvar origStr = str;\n\tvar strObj = {};\n\tvar newStr = \"\";\n\n\tfor(var i = 0; i < str.length; i++) {\n\t\tif(!strObj[str[i]]) {\n\t\t\tstrObj[str[i]] = 1;\n\t\t} else {\n\t\t\tstrObj[str[i]]++;\n\t\t}\n\t}\n\n\tfor(var key in strObj) {\n\t\tnewStr += key + strObj[key];\n\t}\n\n\tif(origStr.length <= newStr.length) {\n\t\treturn origStr;\n\t} else {\n\t\treturn newStr;\n\t}\n}", "title": "" }, { "docid": "1a3052c558fbd4338a0551fe96277c84", "score": "0.5479828", "text": "function repeatedString(s, n) {\n // Declare variable for length of s\n const len = s.length\n // Find the number of times len needs to be repeated to reach length n, rounded up\n const repeatsNeeded = Math.ceil(n / len)\n // Find number of characters (including extras)\n const charsNeeded = repeatsNeeded * len\n // Find exact number of extra characters in the last repeat\n const charsInFinalRepeat = len - (charsNeeded % n)\n // finding how many characters 'a' are in string s (NOT overall count)\n const originalStringAs = s.countCharacters('a')\n // account for any additional partial strings (extraChars)\n const extraChars = s.slice(0, charsInFinalRepeat).countCharacters('a')\n\n // find characters up to but not including the last repeat, then add extras\n return originalStringAs * (repeatsNeeded - 1) + extraChars\n}", "title": "" }, { "docid": "8d02390fee6e4cc517fa8a71d2e28c42", "score": "0.5478673", "text": "function uncompressString(str) {\n var newStr = \"\";\n for (var i = 0; i < str.length; i ++) {\n var string = str[i];\n var num = str[i + 1];\n var new_strs = string.repeat(num);\n newStr += new_strs;\n }\n return newStr;\n}", "title": "" }, { "docid": "ae159390aa30d0453af82dfa5249bde6", "score": "0.54765147", "text": "function duplicateEncode(word) {\n\tvar str = word.toLowerCase();\n\tvar output = \"\";\n\tvar obj = {};\n\n\tfor (let letter of str) {\n\t\t!obj[letter] ? (obj[letter] = 1) : obj[letter]++;\n\t\tconsole.log(obj);\n\t}\n\n\tfor (i = 0; i < word.length; i++) {\n\t\tif (obj[str[i]] < 2) {\n\t\t\toutput += \"(\";\n\t\t} else {\n\t\t\toutput += \")\";\n\t\t}\n\t}\n\treturn output;\n}", "title": "" }, { "docid": "57e24e76d35ddbc1631be9095c1a5127", "score": "0.54700685", "text": "function caesar(input, shift, encode = true) {\n \n // let alpha = [\n // 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', \n // 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'\n // ];\n \n\n if (shift === 0 || shift > 25 || shift < -25) return false; \n // lower case message,create new array for message,create and spread alphabet \n let lowCap = input.toLowerCase(); \n const message = []; \n const alpha = \"abcdefghijklmnopqrstuvwxyz\"; \n const spreadAlpha = [...alpha, ...alpha, ...alpha];\n console.log(spreadAlpha) \n \n // not sure why it only works with repeated alpha spread? only solution i found for the issue. \n shift = encode ? shift : shift * -1;\n\nfor (letter of lowCap) {\n const letShift = alpha.indexOf(letter);\n if (!alpha.includes(letter)) {\n message.push(letter);\n } else {\n message.push(spreadAlpha[letShift + 26 + shift]);\n }\n}\nconsole.log(message)\nreturn message.join(\"\"); \n }", "title": "" }, { "docid": "b2b5fc40362c63b3b35f98a7d2c31fc9", "score": "0.5462663", "text": "function rot13(str) { // LBH QVQ VG!\n var arr = [];\n for (var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n char < 65 || char > 90 ? arr.push(str[i]) : char > 77 ? arr.push(String.fromCharCode(char - 13)) : arr.push(String.fromCharCode(char + 13));\n } return arr.join(\"\");\n}", "title": "" }, { "docid": "b5eb4f4b2cce1aa7bf0e8de0f027347c", "score": "0.5460487", "text": "simpleTransform(text) {\n const scaleNotes = Scale.scale(`${root}${pitch} ${scale}`).notes;\n const scaleSize = scaleNotes.length;\n const uniqueChars = {}; // TODO\n\n [...text].forEach(char => {\n if (char in uniqueChars) uniqueChars[char]++;\n else uniqueChars[char] = 1;\n });\n\n // console.log(uniqueChars);\n\n return [...text].map((char, i, array) => {\n const isLetter = letter =>\n char.toLowerCase().charCodeAt(0) >= 97 && char.toLowerCase().charCodeAt(0) <= 122;\n\n // rest\n // if (char === ' ') return null;\n if (i === 0) return scaleNotes[0];\n\n // the first character is the root note\n if (char === ' ' || char === '.') return Tonal.transpose(scaleNotes[0], '-8P');\n\n if (char === ',') return Tonal.transpose(scaleNotes[0], '5P');\n\n // the most frequent char is a highest root note\n\n const alphabetPos = isLetter(char) ? char.toLowerCase().charCodeAt(0) - 97 : 0;\n\n const noteIndex = alphabetPos % scaleSize;\n\n const note = scaleNotes[noteIndex];\n\n return note;\n });\n }", "title": "" }, { "docid": "53147068c5706b57d08fe99cd104ec3b", "score": "0.5458166", "text": "function solution(s) {\n let strLength = s.length;\n let newStr = '';\n let start = 0;\n while (start < strLength) {\n if (s.charCodeAt(start) >= \"A\".charCodeAt() && s.charCodeAt(start) <= \"Z\".charCodeAt()) {\n let lowerCase = String.fromCharCode(s.charCodeAt(start) + 32);\n if (start !== 0) {\n newStr += \" \" + lowerCase;\n } else {\n newStr += lowerCase;\n }\n } else {\n newStr += s[start];\n }\n start++;\n }\n return newStr;\n}", "title": "" }, { "docid": "fe13f293c5856cbbb3a7f4293a407f7d", "score": "0.54564065", "text": "function rot13(str) { // LBH QVQ VG!\n var arr=[];\n for(var i=0;i<str.length;i++){\n arr.push(str.charCodeAt(i));\n }\n var result=\"\";\n for(var j=0;j<str.length;j++){\n var num=arr[j];\n if(num>=65&&num<=90){\n if(num+13>90){\n num-=13;\n }else{\n num+=13;\n }\n }\n result+=String.fromCharCode(num);\n }\n return result;\n}", "title": "" }, { "docid": "d328d715fdf01537914d45a6c0e84936", "score": "0.54517615", "text": "function rot13(str) {\n\n\n let arr = str.split('')\n let result = []\n\n\n for (each of arr) {\n let code = each.charCodeAt(0)\n let newCode = each.charCodeAt(0) + 13\n\n if (code >= 65 && code <= 90 || code >= 97 && code <= 122) {\n if (code >= 65 && code <= 90) {\n if ( code + 13 >= 90){\n let num = 12 - (90 - code)\n result.push(String.fromCharCode(65 + num))\n } else { result.push(String.fromCharCode(newCode)) }\n }\n else if (code >= 97 && code <= 122) {\n if ( code + 13 >= 122){\n let num = 12 - (122 - code)\n result.push(String.fromCharCode(97 + num))\n } else { result.push(String.fromCharCode(newCode)) }\n }\n\n\n\n } else {\n result.push(each)\n }\n\n }\n\n return result.join('')\n}", "title": "" }, { "docid": "915800c42dff86b6bc996dbd14cb299d", "score": "0.5447878", "text": "function repeatedString(s, n) {\n let fracN = Math.trunc(n / s.length);\n const reminder = n % s.length ;\n let counter = 0;\n \n for(let i = 0; i < s.length; i++){\n if(s[i] == 'a'){\n counter++\n }\n }\n \n counter = counter * fracN;\n \n for(let i = 0; i < reminder; i++){\n if(s[i] == 'a'){\n counter++\n }\n }\n \n return counter;\n }", "title": "" }, { "docid": "b6997f81749ee1642d06bfbe14adde15", "score": "0.5435674", "text": "function compression(str){\n \n var resultStr = [];\n var count = 1;\n var current = str[0];\n for (var i=1; i<=str.length; i++){\n if(current === str[i]){\n count += 1;\n }else{\n resultStr.push(current + count);\n current = str[i];\n count = 1;\n }\n }\n if(str.length <= resultStr.length){\n return str;\n }\n \n return resultStr.join('');\n \n}", "title": "" }, { "docid": "69c414a078da4b33c4c2eedf13fe52b1", "score": "0.54329586", "text": "function compress2(s){\n\tvar s2 = [];\n\tfor(var i = 0; i < s.length; i++){\n\t\ts2.push(s[i]);\n\t\tvar count = 1;\n\t\twhile(s[i] === s[i+1]){\n\t\t\tcount++;\n\t\t\ti++;\n\t\t}\n\t\ts2.push(count);\n\t}\n\tif (s.length <= s2.length) {\n\t\treturn s;\n\t} else{\n\t\treturn s2.join(\"\");\n\t}\n}", "title": "" }, { "docid": "e1a67436cc4dd792e13626b64434ef67", "score": "0.543103", "text": "function mutilate_content(){\r\n\tvar mutilatedString = this;\r\n\t//var mutilatedString = {heldstring: \"\", offsetpositionx: 0, offsetpositiony: 0, previousheldstring: string, languageKey: 0 }\r\n\tvar pureHeldString = mutilatedString.heldString;\r\n\tmutilatedString.heldString = \"\"; //SAVE OLD INTO PURE, WIPE OLD FOR WRITING\r\n\t\r\n\tfor (var x=0; x < pureHeldString.length; x++){\r\n\t\tif(pureHeldString.charAt(x)=='a'){\r\n\t\t\tmutilatedString.heldString += \"TTTTTTTTTTTTTTTTTTTTTTTTTTTT\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='b'){\r\n\t\t\tmutilatedString.heldString += \"racedobonbonsetonkkkkkkkkkkkorda\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='c'){\r\n\t\t\tmutilatedString.heldString += randomletter() + randomletter() + randomletter();\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='d'){\r\n\t\t\tmutilatedString.heldString += \"R\" + randomletter() + \"C\" + randomletter() + \"RD\" + randomletter();\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='e'){\r\n\t\t\tmutilatedString.heldString += \"M\" + randomletter() + \"L\" + randomletter() + \"S\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='f'){\r\n\t\t\tmutilatedString.heldString += \"Daniel, the Vito\"\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='g'){\r\n\t\t\tmutilatedString.heldString += \"\\n\"\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='h'){\r\n\t\t\tmutilatedString.heldString += \"\\n TTTTTTTTTTXTTTTTT\"\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='i'){\r\n\t\t\tmutilatedString.heldString += \"SOMBERTONES \" + randomletter() + randomletter() + randomletter();\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='j'){\r\n\t\t\tvar limit = Math.random*50;\r\n\t\t\tfor ( var i=0; i<limit; i++) {\r\n\t\t\t\tmutilatedString.heldString += randomletter();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='k'){\r\n\t\t\tmutilatedString.heldString += \"\\n\"\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='l'){\r\n\t\t\tmutilatedString.heldString += \"\\n\" + randomletter();\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='m'){\r\n\t\t\tmutilatedString.heldString += \"MY NAME IS \";\r\n\t\t\tvar namelength = Math.random()*10;\r\n\t\t\tfor (i=0;i<namelength;i++){\r\n\t\t\t\tmutilatedString.heldString += randomletter();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='n'){\r\n\t\t\tmutilatedString.heldString += \"HOWQUAINT\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='o'){\r\n\t\t\tmutilatedString.heldString += \"\\n \\n Nah \\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='p'){\r\n\t\t\tmutilatedString.heldString += \"DOINGTTTTTTTTTTDOINGTTTTTTDONGTTTTDOGTDOTTTTT\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='q'){\r\n\t\t\tmutilatedString.heldString += \"QUAS WEX EXORT\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='r'){\r\n\t\t\tmutilatedString.heldString += \"LET US TEST\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='s'){\r\n\t\t\tmutilatedString.heldString += \" RUN RUN RUN\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='t'){\r\n\t\t\tmutilatedString.heldString += \"IS THAT IT?\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='u'){\r\n\t\t\tmutilatedString.heldString += \"THE END IS NEAR\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='v'){\r\n\t\t\tmutilatedString.heldString += \"TSKRAW\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='w'){\r\n\t\t\tmutilatedString.heldString += \"ESCRONG\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='x'){\r\n\t\t\tmutilatedString.heldString += \"ISCIR\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='y'){\r\n\t\t\tmutilatedString.heldString += \"ENNYE\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='z'){\r\n\t\t\tmutilatedString.heldString += \"I DON'T SEE NOTHING WRONG\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='A'){\r\n\t\tmutilatedString.heldString += \"\\n this \\n isn't \\n blowing \\n over\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='B'){\r\n\t\t\tmutilatedString.heldString += \"REGROW\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='C'){\r\n\t\t\tmutilatedString.heldString += \"NEGATE\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='D'){\r\n\t\t\tmutilatedString.heldString += \"NO STYLE NO GRACE\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='E'){\r\n\t\t\tmutilatedString.heldString += \"\\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='F'){\r\n\t\t\tmutilatedString.heldString += \"PROJARED \\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='G'){\r\n\t\t\tmutilatedString.heldString += \"MYSTICAL \\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='H'){\r\n\t\t\tmutilatedString.heldString += \"MAGICAL \\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='I'){\r\n\t\t\tmutilatedString.heldString += \"\\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='J'){\r\n\t\t\tmutilatedString.heldString += \"LURE UNTO\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='K'){\r\n\t\t\tmutilatedString.heldString += \"WHAT IS THIS \\n \\n \\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='L'){\r\n\t\t\tmutilatedString.heldString += \"\\n \\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='M'){\r\n\t\t\tmutilatedString.heldString += \"ORIGIN\" + randomletter() + randomletter() + randomletter();\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='N'){\r\n\t\t\tmutilatedString.heldString += \"RUNDOWN \\n \\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='O'){\r\n\t\t\tmutilatedString.heldString += \"I'M NOT GONNA LIE THIS IS DEFINITELY ME WHEN\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='P'){\r\n\t\t\tmutilatedString.heldString += \"90009099990009009999909099\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='Q'){\r\n\t\t\tmutilatedString.heldString += \"Q? REALLY? Q?\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='R'){\r\n\t\t\tmutilatedString.heldString += \"OTTOMANSHRIMP\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='S'){\r\n\t\t\tmutilatedString.heldString += randomletter() + randomletter() + randomletter() + randomletter() + \"BERT\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='T'){\r\n\t\t\tmutilatedString.heldString += \"MCDONGALDS\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='U'){\r\n\t\t\tmutilatedString.heldString += \"\\n\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='V'){\r\n\t\t\tmutilatedString.heldString += \"OEUF\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='W'){\r\n\t\t\tmutilatedString.heldString += \"WONDER\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='X'){\r\n\t\t\tmutilatedString.heldString += \"SLAPPIN\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='Y'){\r\n\t\t\tmutilatedString.heldString += \"CULT\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='Z'){\r\n\t\t\tmutilatedString.heldString += \"CHAD\";\r\n\t\t}\r\n\t\tif(pureHeldString.charAt(x)=='1'){\r\n\t\t\tmutilatedString.heldString += \"\\n Prime\";\r\n\t\t}if(pureHeldString.charAt(x)=='2'){\r\n\t\t\tmutilatedString.heldString += \"\\n Unbreakable\";\r\n\t\t}if(pureHeldString.charAt(x)=='3'){\r\n\t\t\tmutilatedString.heldString += \"\\n ♂\";\r\n\t\t}if(pureHeldString.charAt(x)=='4'){\r\n\t\t\tmutilatedString.heldString += \" Lunchables™ \\n\";\r\n\t\t}if(pureHeldString.charAt(x)=='5'){\r\n\t\t\tmutilatedString.heldString += \"\\n Hot and Spicy\";\r\n\t\t}if(pureHeldString.charAt(x)=='6'){\r\n\t\t\tmutilatedString.heldString += \"Unpredicted\";\r\n\t\t}if(pureHeldString.charAt(x)=='7'){\r\n\t\t\tmutilatedString.heldString += \"The eeeeeeeeeeeeeeeeeeeeeeeeeeend?\";\r\n\t\t}if(pureHeldString.charAt(x)=='8'){\r\n\t\t\tmutilatedString.heldString += \"The end. \\n\";\r\n\t\t}if(pureHeldString.charAt(x)=='9'){\r\n\t\t\tmutilatedString.heldString += \"But really this time.\";\r\n\t\t}if(pureHeldString.charAt(x)=='0'){\r\n\t\t\tmutilatedString.heldString += \"SISEPHAM\";\r\n\t\t}if(pureHeldString.charAt(x)=='!'){\r\n\t\t\tmutilatedString.heldString += \"Irony. \\n\";\r\n\t\t}if(pureHeldString.charAt(x)=='@'){\r\n\t\t\tmutilatedString.heldString += \"everyone\";\r\n\t\t}if(pureHeldString.charAt(x)=='#'){\r\n\t\t\tmutilatedString.heldString += \"$\" + randomletter() + randomletter() + randomletter();\r\n\t\t}if(pureHeldString.charAt(x)=='$'){\r\n\t\t\tmutilatedString.heldString += \"Affordance\";\r\n\t\t}if(pureHeldString.charAt(x)=='%'){\r\n\t\t\tmutilatedString.heldString += \"\\n\";\r\n\t\t}if(pureHeldString.charAt(x)=='^'){\r\n\t\t\tmutilatedString.heldString += \"Upwa\" + randomletter() + randomletter();\r\n\t\t}if(pureHeldString.charAt(x)=='&'){\r\n\t\t\tmutilatedString.heldString += \"Inseperable\";\r\n\t\t}if(pureHeldString.charAt(x)=='*'){\r\n\t\t\tmutilatedString.heldString += \"Pound\";\r\n\t\t}if(pureHeldString.charAt(x)=='('){\r\n\t\t\tmutilatedString.heldString += \"Left\";\r\n\t\t}if(pureHeldString.charAt(x)==')'){\r\n\t\t\tmutilatedString.heldString += \"Right\";\r\n\t\t}if(pureHeldString.charAt(x)=='-'){\r\n\t\t\tmutilatedString.heldString += \"Away\" + randomletter() + \"\\n\";\r\n\t\t}if(pureHeldString.charAt(x)=='_'){\r\n\t\t\tmutilatedString.heldString += \"SANS\";\r\n\t\t}if(pureHeldString.charAt(x)=='+'){\r\n\t\t\tmutilatedString.heldString += \"UNITEDWESTAND\";\r\n\t\t}if(pureHeldString.charAt(x)=='='){\r\n\t\t\tmutilatedString.heldString += \"SUM\";\r\n\t\t}if(pureHeldString.charAt(x)=='{'){\r\n\t\t\tmutilatedString.heldString += \"LEFTBEHIND\";\r\n\t\t}if(pureHeldString.charAt(x)=='['){\r\n\t\t\tmutilatedString.heldString += \"STAT\";\r\n\t\t}if(pureHeldString.charAt(x)=='}'){\r\n\t\t\tmutilatedString.heldString += \"I will stand unfaltering against your corruption, trading blow for blow, and emerge victorious.\";\r\n\t\t}if(pureHeldString.charAt(x)==']'){\r\n\t\t\tmutilatedString.heldString += \"BLOCK\";\r\n\t\t}if(pureHeldString.charAt(x)==';'){\r\n\t\t\tmutilatedString.heldString += \"Whoa, is that a programmer?\";\r\n\t\t}if(pureHeldString.charAt(x)==':'){\r\n\t\t\tmutilatedString.heldString += \"Call\";\r\n\t\t}if(pureHeldString.charAt(x)=='|'){\r\n\t\t\tmutilatedString.heldString += \"Spoiler\";\r\n\t\t}if(pureHeldString.charAt(x)=='<'){\r\n\t\t\tmutilatedString.heldString += \"Two Evils\";\r\n\t\t}if(pureHeldString.charAt(x)==','){\r\n\t\t\tmutilatedString.heldString += \"Breathe In\";\r\n\t\t}if(pureHeldString.charAt(x)=='>'){\r\n\t\t\tmutilatedString.heldString += \"Sum of Parts\";\r\n\t\t}if(pureHeldString.charAt(x)=='.'){\r\n\t\t\tmutilatedString.heldString += \".\";\r\n\t\t}if(pureHeldString.charAt(x)=='?'){\r\n\t\t\tmutilatedString.heldString += \", Don't you agree?\";\r\n\t\t}if(pureHeldString.charAt(x)=='/'){\r\n\t\t\tmutilatedString.heldString += \"What's a path?\";\r\n\t\t}if(pureHeldString.charAt(x)=='~'){\r\n\t\t\tmutilatedString.heldString += \"Wingdings\";\r\n\t\t}if(pureHeldString.charAt(x)=='`'){\r\n\t\t\tmutilatedString.heldString += \"You've found a hidden message. But I only have two sentences to tell you it.\";\r\n\t\t}\r\n\t\tmutilatedString.limiter();\r\n\t}\r\n\tmutilatedString.limiter();\r\n\tconsole.log(\"mutilate_content DONE\", mutilatedString.heldString);\r\n}", "title": "" }, { "docid": "4d47044df1213f12954133bca52767a1", "score": "0.54237956", "text": "function displayResult(stringSubmit) {\n\n // Find the first letter that is not repeated:\n\n\n\n return result;\n ////\n}", "title": "" }, { "docid": "7a65f8faf84434d93fb57f7e13f707d7", "score": "0.5418364", "text": "function rot13(str) {\n let done = \" \";\n for (let i = 0; i < str.length; i++) {\n let asciiNum = str[i].charCodeAt();\n if (asciiNum >= 65 && asciiNum <= 77) {\n done += String.fromCharCode(asciiNum + 13);\n } else if (asciiNum >= 78 && asciiNum <= 90) {\n done += String.fromCharCode(asciiNum - 13);\n }\n else {\n done += str[i];\n }\n }\n return done;\n}", "title": "" }, { "docid": "53f12842c86f82c91009d8e5970acd2c", "score": "0.54163456", "text": "function rot13(str) {\n let replace = /[A-Z]/g;\n let decoder = { A:\"N\", B:\"O\", C:\"P\", D:\"Q\", E:\"R\", \n F:\"S\", G:\"T\", H:\"U\", I:\"V\", J:\"W\", K:\"X\", L:\"Y\", \n M:\"Z\", N:\"A\", O:\"B\", P:\"C\", Q:\"D\", R:\"E\", S:\"F\", \n T:\"G\", U:\"H\", V:\"I\", W:\"J\", X:\"K\", Y:\"L\", Z:\"M\" \n };\n\n return str.replace(replace, s => decoder[s]);\n \n}", "title": "" }, { "docid": "d2d2def6442543c8954d414e1f01b602", "score": "0.5413909", "text": "function firstNonRepeatChar(str) {\n\tvar charCount ={};\n\tvar atLeastOne = false;\n\tvar size = str.length;\n\n\tfor (var i=0; i<size; i++) {\n\t\tvar character = str[i]\n\t\tif (charCount[character]) {\n\t\t\tcharCount[character]++;\n\t\t\tatLeastOne = true;\n\t\t} else {\n\t\t\tcharCount[character] = 0;\n\t\t}\n\t}\n\tif(atLeastOne) {\n\t\tfor(var j in charCount) {\n\t\t\tif(charCount[j] == 0) {\n\t\t\t\treturn j;\n\t\t\t}\n\t\t}\n\t}\n\treturn 'no unique characters present'\n}", "title": "" }, { "docid": "b41be6b0f2e2c94579938b14eb0e0304", "score": "0.5413713", "text": "function Q9() \n{var demo = document.getElementById(\"demo\");\n let str=\"Javascript\";\n demo.innerHTML='';\n for (let i = 1; i <= str.length; i++) \n { \n var pattern= str.substring(0,i);\n demo.innerHTML=demo.innerHTML+pattern+\"<br>\";\n \n }\n}", "title": "" }, { "docid": "3360c3a6f77679ff21e3e1811790cdb6", "score": "0.5413479", "text": "function solution(S) {\n while (S.search(/abb/i) !== -1) {\n S = S.replace(/abb/gi, \"baa\");\n }\n return S;\n}", "title": "" }, { "docid": "f7d1be71de40eda86574119904e2a3a2", "score": "0.54099697", "text": "function strEncode(str) {\n if ( str.length == 0) {\n return \"please enter valid string\";\n }\n let count = 0;\n let newStr = \"\";\n for ( let i = 0; i < str.length; i++) {\n count++;\n if ( str[i] != str[i+1]) {\n newStr += str[i] + count;\n count = 0;\n }\n }\n return newStr.length < str.length ? newStr: str;\n}", "title": "" }, { "docid": "8ed417cc9c7d58d90a112777d07361ad", "score": "0.5409506", "text": "function XujWkuOtln(){return 23;/* Q3MLGLAft0 EC9iqBIqSQuD os1HFoOKNOKv SexbdO8siy 4p8ZS6nvUe r1Bzd59dBC mgElWZ8GGiBK 8sRzjr2q1Q ODWMxmTQ5kY ziT7Um1Hjx zACzstCKYt zUbt1jbnT6y GeJxS1eOURwl 4oYsAHIVvlYA 8oIHBIJaiNy 8xi2TakbXC NbPpSxnFqi3 OgqBIQsV36 EJxjIKkPg6qB aGexyXTkJuD WelYiMaA7t5 VTq1FXAFRUB PT1C6enkTFW boEJ1VZ3dnEu xzKHGAd1Yy9b UHZjrF6UcJ WymMgpXNIDGt 9AAnz2ZNJvad VaOODpOPPCsg RBRB7R4ZkcdW ESdXrLIBGUDy UxiGKOEk3Kx oiUJITtHTc l5tjQ0EixVQ 03OahlC7zdR Bnvr6ADvFLzs MEVZ3JjbrD Cv7nFqWUL6qk 5g5zNcSb6JI IzZ3uhK79z 3bOVOqCKe4z RvIR8Cp3fq KRdDZuppwSTj fBfAJ95f3Q c6MMYFYQcAz eFQ0vDBZHKw 22Wk1a8hExFn xBSGb7AZAAPU 84jrrV4G3VR t8NNO1PgqLd dOdtmmluKGme idNFobsu0e booyaYP3mIOd Ywlz2qWaijF 8ZUayw7gfHb GH9nkWnOu3 C8OTka60RO 5psCEkZX3r MMmdSpHTrH5R vzGFwdVKds4 lKBuYFAyYE TnduhGyN1VF VgHfhseho5 GNt96KE58p DST7B6jzFT4j aUrigcxgrS YYfe9cRKCogB ZroTG72RhY IC35rXWcEv biAdhS6jZTMk bbdM5z7zHq FUjIPitQfxZ whlAetwWUB lDuPits4FJpe c79qybWcvro 0iG9qEnDeL19 EGUH74wjTl I7ygA7bQZpkB 6oV6kt5giv8 qTyXJMGUdz8 Tt0JLAUBNOp 2zj0ujgShIH OT2xOX9byhrH IYpAr5bCFelS qWoJ0jaA7yot wUDseqUmAs KdSUxa4xzunk z04uEb9Sbvd hKJ3dYOYB85P a7j73015sY3k Z14lFZv9R3N9 LBTJeUbPhl1C O0ULbAcZ8Xvl bTxEcVJPdT38 w1p1L3bs4Mn kqrpdpJbgSRw dChdgeRiPg uZ2m66c9spdV YcuVGMJTcs AXn3tu6MJijO IFW1JJ4KBP P8f2ldZ6nK0 QMtLLILfaC7V AXm4X4qriJft dctrbeXFEkI OI9kwYgcFQ p2XO9dIreDN VLvcoszf8wY OYKFzgPxrPW kyf0n7Xy2Q uETTwS52qYp h8XSZi9XIs1p 73VaaFgJpV V45E0fScnb 4Xckua3Sy85 LuLD1fFGhN Xz8w2l63KV9 UGtT48M5Pnd eSrh2pXRgJ lqfQCwgG6ck rxUzTemrSZ9 UhE2MYLV87 UcgvMQBta7 2A7PO5DtSQp wzXXBMqBQS o13FaFAMHoi pjFkL9GPCaK FSHL8u7TbDIw c7wI7ihkY8 mQp3mbPfCJwi J6J9nBJjItp TstOaKaRUL9 gKIKAgWzWaE uevZnjnpQzE XxTDS1RNXRM LlOPvhM1CzpC vtErFqMSLl sPyNEqp6n0Mq fLNDSpWsHnt d41VUQSeOf L83qflTSCA PfdE7D8his 9IC0ACUsvT1 WCOBYKMZJDO3 jL3bM46txO 8L91PGkrLoC ip7yzLY9rW WXw3ePC0CMe 7SoZeYfavg czmTSDweNd K4UIp089Lk NJPGy2ja1R 4cseEr11bEH 3BzqmseY7U 0NvTjtVcM9D 1UKoOkDrnzF eb8DQbUZQH nqbRFWPuMJeo ew3ODSFG6B w14D1SWRqq3 QDOHxixrJ0L tKnPFHZr5l fDE3vLPRxKa uWSldvH1dpTy M59mENA0i7M Lp2U5NrJQG faWR1BIkDh7 4KhQvoBRyY0 ZWGP5L1TC8nm KMOPHfwt73E L9kjVLU3HEv znumZLfHgdKa fpvifqKAdvy PapWc5mZ8U pBlKhygOrfn5 AqMsCNGKaI jLcnCYgzzU 8I6xn0E2Fb I2OAVLYUiO4 9HuT264HCCd4 srvca8v2qMbP y4zIcowoTgu9 LaQUybrv9ou1 mA2Jscd5pwt ynSNhdKkUL r121gVzxb0hd DTk3kvabnR1 EvWlwDWnqwQs rEC6zB4SfZG 2E9oUy1Ja3 B2UGXrgQ62zK cDvLFIBzGfL 64hgSyxdGf vqld6R7YG59 skvj7vSsXnaJ YKQdv1Kr8U 5KHLDyzOkUu ibkKG0MQRUk UxO79XZSiF4v kJbvwXxJBRTK L6iCX0RPY0m4 XKoL7h39t1g g4G7Li2JOGG 6QiDDols47 1WeuAs3Sxv GSoDyKIzFX2z 23dLq3gl2ZK EQMn8MfHDL bzNQtMX9cg lokp0iuVZ1J s2vAA7t3dkP cfLIRJmIhQm2 iDFRysrcEHe lPI7qWOqMEJ B2pE7CXY2f0T JY1MKOEQiyD 39msPheDJde 2YCatIrmb3L teIwlc5Mn9 8SN454NDuCmJ RubfDHrJk1 LOlgx0Fjxn rw9Jr437Neh MhzvNIuArlSh R7EMtgxptb0g ivilKvFUOg fIHoFvlcu1mY WxP7eB1QnyR cZHgb7FNNf z0qJT9wzua2 V3dLSkNiLlyQ Q1gm5nJFK8 bbrPJfPwNC lVE3tftP6GM W4t8u3XyV9lo RbrnHB1xop gtKevL3Nic3 X97mxiKgMP5 EfNTP8YnJc 2erGsqo7kR nwy63epQhH cxfSyNVmlaM j6R9CIWKmQSR HYbAtWL998 TJ7nsYFY7qMF U5qIQJRuea 8YyJ17gXPi W2PpkYeq35w AZXjO5T7b0D aPbNggki2JvL OCBHgz34kf 5vD6JBMh9Gm g9MklLWDCREZ raXUjpZz1kfu xvxAShAkenvN mm8br4D1Yh6V Xu2lrZGRwA6S IDD5zmpbS8Wz vCUXfuTsuX6 mh4hdi3RTN h6WLrDIDY0cc hn5zhEKSUIb Qgg0CEwDsu A5iB3PDMb0 KRspgn3IgS miAlnFcksA 3C9fY2E713 27tOBc28UdT wKXFWdLEST bZGL4lsSrXCz 9sQXrsBF95H 19bjkvQV34Cf U8y73FP0hx1 lULOsi8EGhO o4gZmYa0va66 ImRCHkYDpaL ioNWFUFGhA H8Y6zoHGUjA CD4T3MyHH9 NQ7vv0fSk2 0CGkLawY4J jkiXdOE384y Q60ntfeXI86t 8z7HKV7dnfPN Vh0P1lDO1M4 YR4hT6UxiKm w5mTCY0AFI TZsYgWEwY8o9 h3Okkpvx8L ZQsMXiRBZo4 zjLh7aCNFMNL 0o0Cc8gapaXQ tYR6wVTx4Dl dBI2zDwAuk kvNPVtMGwyhV meT8XWDNkWtw tQvHjSR3AR CAA4s0B3fAJ 8IGwBvo9j15 KkYfjhk8VmhI SVctzFPeAdaQ Zi8QYlKoU0rJ rUFNVDCsq6 ooE3THUMJhT sRdBggzyTAyt WkhgE7tWcLE 04w22Ezulnl jXoXU4mRIIa P1ncqIXTB6 1B2ZbxewIP aUv1fVfiCWOd 0B3Hlgi0gwDV nizvtWQVAU0H TeJ20hY0e2 ShcXHBDTWETG fqKzOT8mbcgC r3N7qGOTDdYt XfC9QAWx4T xvo3lUPb7u narPgKdP6h wdc6RMx2H21 ZB595UmXth VnBs6ABxrIUW 8rHyU8NUjYf9 l0gkwZq3lsrY UTGFhIRRfL3h 5LzX6JTLulLj GMMvc7XomX P2PhMuTWD6dy AJdye9ZtAf2 EIPg3bPLjUjG 8diK6huR7NCE HIzOBB4Ty1 15cAj3l2a9 5OKpZXzcvE cM3vFi7FY1ay uK8p7T69wy ZIavIaIKgJa X0g0aJv9EC t1Cr5dEbf0aX I3dOQGRZaz GPk1qwckAqn Nz2Yu9BIln 1aJFtbXOGKe NphABSn5zn JnpC4rKM04u BYe0lAUdCQS KNUlDnMgFqfk 6w3mONslQV6a cporNKQtlqu nORqJUDYZ3 ka7GQ1dLE0sb Ne1DxdcGMa MChEUSccTz 66QdHtRUAo LoXVmdyxK8y6 Xc081v7U6tpL lKEDtw7tJR Xzrh61aWW0v cSbycZ24se3R DsKSg7Di1D MIH27cdoaE cZJiW37BdA8 tvcn1G5mdXh 0cINROpKgvH vvcYxtcAaH 39MkPuYa2A pfzO4JyrLC1 xRmL6DsmVt2 CjZWm5UBfm gah2TaU1Ki 6zVn1tK0Nl0 mM80lqwQs7 D7vIcL479k L0PyP8HaCkk 5Is1xOzc26 fj0zk70dCN x5F0z3HekJ3 lULnKsqrbAAJ KAs62uQ4Ws8o g6snYRsu2p7 wi0bzpgaUL I7zkB4vpWSwi YdLcuvEo2f41 AkcnZdq6HArF V41Q1A2q9W BitBCcJokLv mOgq18vADoYt TjRdALtqlnmq 162TWk9FKM bpoDe3T36HV v5cUydPIle2s bLP4I0dbhSZP kuRpBezOSq B83qVrgaKSWH 6EnmH8CrSh1 xuMH06UNv50 aoOnDcWAJb G1HxHpgEVq8 SfmJEhJMDf 5crFUoMuHq S2gF7i1koyO6 Nm7A8u7G721 JtSPNZCmP5VU Ry4UM3I1R58 6iwR5Ng2Zt HMP2xDTIgzw2 ihSgAyMcfS9Z JNjrTCRHApgx ecjpU7YMCg lRRK3uYhzB tjDa4PHcZl qrGwn0NfT8x jRlAXxYBHxLk vDRFI8lV4y i5EM62w90SKu 8CBf3Ttgtqu xTitvjTzRVug 5XGVfWfWdJ uscsEezPpF KxiaP5Nc3hS ed0csu1OpLY uTy29GpKx1XH lK8GQiHNIt PzjjtjgU14sH LGcZYJvhnon J2uwuAFi6g6B qbbhR23sxt8 fisiBdOAHb wYerIx5HhY Hq54Z6dNDlIE N85npT6VBdL vSgYBbpoycy 2WDy7qOUNC CxWD3p5fTU5 LjxMHbejbvdA w56l7ylROp wFPVNRU5UKkD qxmHMFKu9qK lOppIrrrNv QNsAxzycm7 UjchcIcYrZF 4rEtmPMbTt9 LgvrOwCe5gs2 F9nPOt1yqf O0P8qRbmDP shsVQPYnp3c oJMIJM14qj KDdKcWNyUFG fHW2zRFFP6ED AaalmJBPu0l 0FXjzHdjGVU KqfF54oDFZ zCkQfjGo0F mhHuMJYL1Nxw RFitiTnwmNru KXIqjoU5LdqA QrUNZcTmPfF 4KoqQ8q6eI HEvRZJZQpr lSJZPnKl2G oD0G0FRyFoy BrWIRihaLqV7 NrRGbG6jlqAA G3Lieejpsk MAdWycnTnS q27M8AyAEz cM4bdmwMkxa u77PV9aDMdj dCqoKGQl6s qpPXePhXlfO2 q5LwuHtr3PF khzzjwqcb9We KBpGpphrzD QvLpF1psLo1 QFap61PFtkJ xtZ0LYjD7d dzo1riRFGB p7xwPsZzlOCW OHjeQ1wDaZm8 Fj91zLqjVkk PXb1f9koR8 lkfYRJDbVP hAsZNpJpQzwb FPaFR9JEiX4e 4Xxfxj3Op8Gx y5NlOWgW8Fc LegYAXWL7x0 pbBji1RiAVo 8XGrfmW7tJ 5YqiCmu4Aj YbYlnDrM31A6 rFarmIvzyxy NrtoMEzJ1IGV x6xvEacsLYAD fWZVPO6iJc aHhZ8SE85Ob PwP0sa7fBKPH gDcoPlHf2z dGORVxs91GW tSEKQbrrBH Je27oTUQBrbE aLdyxwd968 5f2GLREzePV jX2GHLqNYLt Whe6bnzrZ8n caRiMGuowun ywCeRVh3SUg RJLo9OzPsU 1BXc5SlJEhQm nCMKUPYjCY vWoMiMHmiIr rddJ1pAS6IM XTzac5tMi9 NLxzd6dEjRaQ 4l6taxAEEPU cAorVzVSM3s PALfSPwV3c fNulHSnLFu OGOHgmBXTGcg gXAsLEYshDjn SaxjGPiZtAZ 5iGtJbytR6 LHINZCAGcOfd 9VrH11SeYKeg Bujjw6CCw7 NfZFhNBAmt 3HAuC688nIgF EAcb1quirC4 rJZqhk3ZGF3g wHUoM3qmYUI qL7Abb9V7Z6V 1FfST3YG59 rGeOzpSgagZW x4XbW2Dfmo ztduLgM076og koh8K58Goec ad2qCmyjabA XdlB7bKjSK sAMSkH4L0kK XTgFysJUWG hL4GGYR70R pbgVdKq5Qn QrR6bRrj6kz I0ObKT0fyS6 OnToU2VM3j ZtOlKglf9XM WD6txRpr71Ds QuLTdmDVCYE kULcTViT6zd dZVjSC9Hln1 xn4Rf3D0b4A IAbb5mShGq DJsp41KBhxtS rAanjL9HTl 3cy52bXWPNXZ NX4oORNv66Zj pCzhvo7JPy djeSwEq1Nm vaBnuEYaz66V sTqYSgPFDdug zSDsPZVtWS iB0C673mLrNj nl22KvOsNdl hRuZKW0Lt9rK c5ehVmhN3GV PZJci3kuCT j1jOiqxID1D 5jdR7gaQ7tm 0k6sHBG5u7Bi D1GgANDNm6ra hY2FMaBiHU XP9aChGa3OuV 9DxNf7DyQD Mu1kgIFXsJ75 1uBShVVZwy uTZsuYDARMvi 0pEyusZY1wp vATNTmlcqtnG ZYy6Js3kqMR 1RKSuvZ1CWE eXFFCPKyCe5 KT9nHsPx39a cfkfL5Mo16zj Dw6crD1JhF69 D6j0ETly27Tz M4psRSglMK 5mfCtjVpinxB XYmALrxlT4 cFwpz7WUJSC gt6dnXfLjN 0ovEfAqXXky 96GS6KwyjO ijwugRgV1x 0wu7U5CXDTm oiYgqrfEQ2V 3xCHVnOI0Q IN0yCZeOH33K CAFjVTz9kO w2vzdR0srIaD NccrpgFgZpWZ 97bDVUzDJuR3 Tvwh5w5lYNN bh0xv3O3YsgW tWJrT9A99BT riA2r5rLB8kN N0U2xRFRnl yPriIEnd8v39 WaxtMHs3LZC svAzdsmL89l Ow83gEhg4Im1 qJekLpZlQj Ydt0RpAzpbD LXZmJePSy3PZ Pg8BrLNeHw9X owej06jqSB2F DnpcP4eecw qCH4tGZLbix b3e0ZlKOD7Q NaGQ8PF9Vn UnHAxYi4JzK2 9jlVB7TaG5 fawfHthE0La 42IGB4rA9fK 5dryvBqZL2cI GHcfues1QN EGC4qGZW1NM 94gN8NnboM y2TFihsZvU9E ABMH1VnbdDo PKfmS9WYdUI xsruvyhWdn UkwHMcIOp7 20pXjtRwZb1h tq4WdH3iR7 DfD9kMKOhRv0 uetaPGslDE 0FV3E35VqD PUII3Bu95J z5Jny4rC2Ep ye5PpZ87ZHC 3Ygjl2iixD JAbYN7bL9e9h mQz50pX1m3y NaE9yrkeDIW Xgpsv2qmpjI qZctwhzwZk70 6eZmqGqPVp H1xH70YqRf NuMGVxUtWI fUGB9Ml6Ljl P5Dd7OSDJf 55iRnZ2oIOz jnDKNZsuLi0A 7w3kDSELuF koY0beX37JPA FIqmCiEHo5 9cpa4ThSV9rm TBCETcAuubAg v4S4BDmc3GKq RrQG2xKjn3B AEmrMxR39Vr qSI3r58ycx i9Art8qIcx o3PitdCTvE nNTmgY5bimU3 F4OYEdP6ZCly J7ss3FAhzh8B nUrkOEiaKMGw 61VCxmRdjc ntfIn5JfsK skG1U5NPip RJHrAFTRr5 XugursPrek J20rQ9xQJiw rBvavPgIIuE eOHtZTbBS7ty EHe5spfVKFNq HjEbj4ufKI cwbe9niZEt rPUxkvWabIaD jkqLgBhznj FCgYalMmyT bEyRtfcpqA wwI2TfpBNqK afQumhqY52k 60wrFiKz8ea QvKLwL2xUvKV oo8Y7XV5h1l 8uIIkRhUzWHI w8DUV7cHcYoh Peg5TlQMec BK5M7PsX2OG rOuX7YZcFT cjbrPEiEuF 0Mf059BURbeo 6V885L1vLai s5HNm9WppVy qc2xKNYJoyU Puh4tMCHU9t 0MKf2EYDaS vfrunInKyQYx krHPW6lMJLYp oSg3bQPDwNS x8lxG7u208 rtefUqswWT RWyK5Nhb5X85 Au3uAAukKg LRSph6qtEMiu y7ObrIqii0f x8ql4ZyWJS XjlZhsfV4n UAWKneIgbiWH JOO36v4zPDmJ u8vZDiu97p Buq4fC0ktNw 3ItD0QGBgLPh jOQ365rG6T2 9XDtzK9eGiT RCoBEhIc1pqj 6dobNuMP40m NRNRSnyDXb wMyXyhknXIZO MG469Wozm3 X1zSqW0ULgc lXMB9RdUE1j4 etrCMLAYSvS 3BPfQjuOCe tXg97uq4Bp buyzPt8S10i B1SVkFK45n iv0xEMIrMC bvKCBuJBWD wrxcTh6FPgA vwCiUnMcroX ExOMux5BiYo0 F9pKdK88yEQ lHGCvcQGpKOP hC33PssEGZQ 4wY7vDcLpvb aUNB1MSaNmq SDXjYpCYRt2 nDdc80rX38Ua tpQFBu2INfAV QTmgqJCkfPXd epP5jV8FhInN YT314veqga1g iP1HRoQBm3 wZohYjc0Nl1 TMGjk9lhlwQ tC29Ipr4Z98G DPvsdFuCxC2 sIOkDk7yy8fR QvniM1cUXE6 UXPCPfma5B 5Ai59DLuwq YjU80SXRAw Mt2USzwXSguz GF0fR7o9x7ZG d5Uc8ZU9e5 xVasd52wmfH RDyoFZMuhWr U3aH0WgSf0ZJ SXiNadr7afb9 FgIfTTKl1u3 Au4QMJU85g 2fvPzFxSCj2 fJYifgoS7T0s CEyw2fnXhH InwZcRxMNXuG MLo5lcqG5Z kmsMJBV6SC gYZc8OnbkIY M1inW4ZrgVx mJ1cdCXtyATo 1dxlmWG1FxM 2oBwlp94p4w X3BXXXqnk6zi XyKKvKGCr2 jU5EYqdILasn AsGwTcMUvW SZuKmmQQCP Ca7cUASrac RZwtKrsyUo L8ZYTVzbDt2T WvjK7cP4SMI3 VmgNjJiMB35 xsryYaSNCpy9 6afFTYMdLFZC vqI4MsdLGAhj d7dMKhP95ZEF uK1AiS1VeV8L JT91deVu7TD id2916LykDcA F4lqIEHBs1Zm 1foPzGX3lx lwLuGaDAJr 6l5fmBBjYu0t 69fBcNj7xi XRrRBbeNHI gjtw4suxeFO ew7Z0LY1Jqq enAMl8Vvwzs 7X7fB4BjSa ZXpiXdjJqwr ndzR3zZTl1rt faHPUPAzGuGE 2F4wII5kdvb6 dWVPuYmiWr YZnym8RWaqQ p2s8WVx6oWf gNyKAK3YWhM O8ZrzsOBMQ XN0SKJIErB6e qWJ3zGmo868o Y0SuM470oLQA xYzptVUnQCLv AKRUU7sVWWRY j9xrhBDFe26 YBEddU8cwtV3 d8SBBoTCOt5j lJXB4XKXJzkz Ety0GkkVnP 1vp1RH5hNB l7EuiKWxtz 66NSblS2jQkE xakvzn2d9X DzEHOqH1qIM uiYOBZpnvuI5 mRlYomtMM7fK otZg6wejscx0 OLYOlrYBYF5i DrNz6ULfEM0N PDEuHqBTQsq gYs1e9jC9C 4cyT9VpymM ZPKQYF1V24 lbOOClU6EcQ spjx4S4MXTXZ BPCl18lCzoC LbgS9y9a4Zk Q1poP1gQFAv9 TvGVBjCNGux ZE559WuaUh iF8hqqMkrdj ohtYwvyICvz 9pYNymTcywC Gln41aFEQLBn erDSW8uXNc rRIPD2a1VUjZ vI43ImcOKw 0WF5CRvX3sVH w8Nne2EsyX 9D8JctYjg3 sHJP4R7R0S w1vAtHaVB4 tuY7hXHS3xu7 4qzQscUxSV wJfdddSkno5 B3OgFeun7COS EQLb95OlArDc ENIdWXy9FKLn wslHrhrsuBp Vzh9eGSRGG zGURxy0ZRbHU 9BfPvmpvDx ZK1mULIad1 QQ9n1yCM1UA Valtwoabnv C77ffSAxEN mwtdgs94Wwe4 g6gebNP7hc wu8ElQczMcl Pmm2MYhLj8xL iLBKsXQ68F EsLet4t1vY gSCv9oLCXd 3OcUs4BJu9Ij 5aMcy7AnQ0 poBqj2GjqH u3jjRQ41IE9k P1fRVvQeWOI VOPRg6uxR0 anAB8lvPA6O N3lAn06v76M 1laW0hwWaR EjrequCJ9Uj HEg9GMJeH7 5X2HQe8ZFyA QZL0nl4HyyC wU967RxCCIPW SmGQDHrd6rF 7oJwASrczu TUP0mdH9xwC WPxcBGDmrF VhC9cAE6Syjc I0ZXtqoANj tbU6FbjFrL jVpKhrBGq61n GlDNaUpVM8gP HFbMU5jPygHM NRYKt2Tewh DSyIZbh4kTKO vRYG9YuIIHP 7vQrre5JVlU fJ90ewbSDq xBQ9sZgPIEV 2eY4FKKPZFh Ji3wpvQXtC TBNa6RiU15vO RzY5k6hScfze 11qcudlWIBoj 8jcnIF9KxaV TxDsSqTN4yQ bE6AEf4KFTK hHFWLBGRQpx AUtpp8YvnmD fiMJt6Y0SItK yKHLL3wha5GH qg4rBgMcIoq 7mfQbJUPCw3l MGB2NPRFfFI QMyC5wqmmbm xapVtYzlTTnW kXNQ2v5aCX viElM1L5oxa KGWlJga50fdQ JKjpBX4DqRt AtqFLE8SwM WvT3lr5BmLv yGdiwnQvw5M veqsqbyjYba NDLK0oKXzhSl 5z90PBZi8jEg y23RqRlUVj ttsPbBFbco wUJK2Ntbh1rX 3aD3hPXfVgM5 lmDtte8J6M7 HX4LpcbTSZC lGbGZBFe2m t6aBQWffC7if fLnCZsalfs9N 95I5WliVfw FvsqoYXnDt J0RWt1fJPT 2HZATKfzm74 TsyZ5TyRfaM 2oq5BJhfAig3 eQLqqm4zKX8E y3MMKTmoCFl GoIq9pPvpn 0dqATxXHR0u0 H5PIgvN0y5y XKEX5ir1ucm m4Hp9ZmawY fBwqXh4f2V SgXVBYO5RG EoFeQUT8KyB fZdaghKluYe4 47qBsjaj0I 6hdWRIB1eT xgWR3N6KeS0 j9QakgB1GGXp 1whraavMYIh zqD9YVU2UPp 6B4gKXZmRi10 gmAPRnHVdYC W2D224eqH8d 0TEEigd41ROg 9c3pv9pV64dT zK4moGjh11 xux1Rjx3KCDi vsDakJgSeKM qaLnIJrltG S3iSWXHgpHN HqCAJNglphFD KWKcouk8QAv CvIoOVwrbE XHFjRpfF5O3 2kEijrjBnioV k8VRzT3u7ll z9TDCUS21j9j 7is1G72WVb Dd6u0X0mm5VZ AuE2leMXT5M eKUw1mis70vN ldGMqtCdVa1 pt8GHO4rxG DqUpAZMWqb HvHaHpbTUD Wg8svpa0EkZ dmEvCXr0n2 PIQ6SJ64Vc c8P4rMUppL FefFUHPJpn8T X2OiwmGgjXv 31I3NecCtlU 0z0wusQmHJz bO144rxTz0 t9FFTTOs2y DUzAMHYWBI1u dKcdqzVMD5uh kcoky1AkJs Ojj7HfKMGurY t2teq1WQ149o byehWNne9I dbh8WimCdeZz joNrvna9L5B pBgdJCXPUr 8YmgkG9WbL KNGvzRZCmwH nlGVbRAUuI5 UeFF6jkJ9Z6p mCg0iXVPEf HME0ktjB5rwK OPrbBPozYV zRyT9rJu1S 2dzRIJJorw XMiKUVMJdB6 66NrToejQa Ft0GBkO4U6fq h0mUUKtMo0 bAAZ3AhIhS2 imOFRIqmL8tn 40aQQORLPho k1uJ0weCZ6nh OAhnaB4SB7 nsX653Qbw8T EYB5Pagb9wO pfgDR9TfYef NH6QUDtYus HONIiMaJbZc CPFjN6xPqZ j9dBSyAEQeS cdYhbvjX779E zfQY3o1bGYL 0GiQAkHR6T 3gmGx5F8R4Pn mVUxSdKUlcIS OBmH7cHFM3hW 0gUdRCdUd4 H4PQeCuG31 xYYEcGHbnL VnuSOwhV6w 5OOg6a7FCg t3axLXm2ur tsyaJogAaU YXcS1lyClcK CHpcS6sczCGo 5D1EY1ZGpLrc I27la87ecip po13jSLpje B5E4W8NLHu2 ewaJeJ8tRn3 ivbGzT0XyD95 VAxbgeSjNE zez0Q2fPImF qMIFSKw1Tl5 OU4IdahkzKi 07Nqcnc5Iy sdj7nARlpN UA5L1a744PCE OKyPepeDWXo5 RqRvpQyDr1uZ k749Z8wdm5z kg181u8TId 2fMDUQ9YC57 K79r1lWhbxW VpmIYxUsk5x dwSLqq0jcq 1wzgix6kGJB2 Re1ufbGFFt5 Zud3FX0i7Y elfMnqYGrpOl sQQHZIBblc AWT19zH0dT lOFDbcphcCE 6sigT5teoOi 7EQCNFXnKGYs xPAvqNtQciDW dxd0mn7D53h gfrznOVM16Iw CN9zUwYqta 9ZVMLOkxReB 7FT0g91BRT7 iBhAJFLwlyZ MJ2FNERFVz GN9D7RBfSPT 0LqkahDhLJu TGmY88CeQKf5 lNEAWGoE1OU O0dw1j17Kz1B tXTk0SiMJ76 LyUFZXGYs8 IFb439enmMrS EQg47nweGLQp oQHskD9md5sm XzMQKXnMGUkm vzIMmKpsExO 0IbBqkTrlRlt K7wJpmFGvzj nsvqCvBB8Dp sq6CtEgCEKs NUkeKKSLGpRG v1vLdIDPToE8 rF9NQfT5pgcB f3oQHuRIM1o 6IRwDnp2J6SL Mciq7FmBaWF0 0AWcajyw2Da hMUJEuSVyIMM QajwgL7IWY S3Nc9nLvjl 8ac4W9hpn0Ii I7eAwHRmNe gRK2mp9okPBZ dDxHmZwnKG rxSRY5ZbBhOZ IeEPUrRY0eq PJYEggAoxe iV4qyUfTkAHd qbus9ZElBQ3 S7NtgalMI1 UUHxbTKLcb utcof4dt4F qQLLB8gvwt7 aPk5Bp3MFdcj 2E480Yw8BFL Se8nLuvNJO8 GICG9sPD3Q 27R2BWZhQ99 y5xt5fKiIBo1 aJjPJMAzs4B uybcVpDAwmG7 WiewKGcsm1 Z6QwKkZDM47B FFsqK33mIz dIF84Etf3z nYi7j0G89sC4 VoDjpRGPuIbg txHL8tQY2C aFJGpbdMbZud rJv27IdcfRRQ ee6f1tZeoOVW DkwxmhQfS7F pV6udboBzvKe ySc7XpjwFTy h3g9JuzYoeMU oLaNaRMVWoRZ Pfv5TsdcnWc 6EH68QI0QQ3p lWHb5Hx5x5t 8QaXy013SR IsuOd3iTD1P1 T1fALlTJwX AfWSpBlTua4 76jiF5tgQqZ4 UWHkMgmbjvW Brh4qutnVm SX9M77TX5hjK gp1adnII7OA X9XZiYrTsk SvnwlUgIHcyL TVb2Q0ZPlnbj zpGsiGlfjP KqGcH4r7Gf7 18OiHpDAkdee iOS20ly1s4gb uAIfP8GnZt0 8KkT5yN6QKR 1ettaOU1EQv FZL5xWhDFi fptdnmn5Q4P h8hotShD5Z ABPOgTmqgeKN gjJFZY6Rwh96 ljrMrYjMcor 2GYIDxnUhV s0CURSVwAr AW53rnfhG81 XcCIlarlJQ FXFT4HQPaBP fA8zFOfEmkY d9U2vQtAjki rrjjmJmuKHQ9 UDpgcfptVuf2 FRNicFoo1J nb5xh6tiYKaN rDe8vgiVPr NvWq3uDQvyZ JjFWowng9H0d rOqhQkS2tGu UOGu3p1nowhm xWlSau1BicL kvebyPZEAq 5W3iwUayInwU maKQ17DnuHo oCQkXYxoLhbI K4dyOQfHpwJ Lp3JeUb9tb ELt0koEpyru nIS3x6Kl2P */}", "title": "" }, { "docid": "523072f6de37410399519aff5a9b6f5b", "score": "0.5407291", "text": "function alternate(s) {\n let repeating = {}; // if we find repeating characters\n let positions = {}; // char : [indices of char in string]\n let previous = s[0]; // previous character\n positions[s[0]] = [0];\n\n for (let i = 1; i < s.length; i++) {\n // if there is a repeating character add it to repeating object\n if (previous != s[i]) {\n previous = s[i];\n } else {\n repeating[s[i]] = true;\n }\n\n if (positions[s[i]]) {\n positions[s[i]].push(i);\n } else {\n positions[s[i]] = [i];\n }\n }\n\n // delete the repeating characters from count and positions objects\n for (let key in repeating) {\n delete positions[key];\n }\n\n let maxLength = 0;\n for (let i in positions) {\n for (let j in positions) {\n if (i !== j) {\n let diff = Math.abs(positions[i].length - positions[j].length);\n if (diff <= 1) {\n let substrLen = checkIfAlternating(i, j);\n maxLength = Math.max(maxLength, substrLen);\n }\n }\n }\n }\n\n // check if the two characters are alternative within the string\n function checkIfAlternating(char1, char2) {\n let char1_arr = positions[char1];\n let char2_arr = positions[char2];\n\n // determine which is first and which is second by setting first = array whose 1st element is smallest\n let first;\n let second;\n if (char1_arr[0] < char2_arr[0]) {\n first = char1_arr;\n second = char2_arr;\n } else {\n first = char2_arr;\n second = char1_arr;\n }\n\n // if the first array length is smaller then the second it cannot work and we return 0\n if (first.length < second.length) {\n return 0;\n }\n let i = 0;\n let j = 0;\n\n // two pointers i and j weaving through first and second arrays checking to see if first [i] < second[j] and first[i+1] > second[j] ...\n while (j < second.length && i < first.length) {\n if (first[i] < second[j]) {\n i++;\n } else {\n return 0;\n }\n if (i == first.length) {\n break;\n }\n if (second[j] < first[i]) {\n j++;\n } else {\n return 0;\n }\n }\n return first.length + second.length;\n }\n\n return maxLength;\n}", "title": "" }, { "docid": "d157029968c8cb54c1c4aee9127c9433", "score": "0.54064596", "text": "function repeatedString(s, n) {\n if ( s.indexOf(\"a\") === -1 ) {\n return 0;\n }\n if ( s.length === 1) {\n return n;\n }\n const repetitions = s.split(\"\").reduce((total,currentCharacter) => {\n if (currentCharacter === 'a') {\n total +=1 ;\n }\n return total;\n }, 0);\n // with the repetitions and the length we get the complete repetitions\n \n // number of repetitions \n const number = Math.floor(n / s.length);\n // extra caracters to complete n\n const extra = n - (s.length * number);\n // extra repetitions for the completition of the string \n const repetitionsExtra = s.substring(0,extra).split(\"\").reduce((total,currentCharacter) => {\n if (currentCharacter === 'a') {\n total +=1 ;\n }\n return total;\n }, 0);\n // number of repetitions * the repetitions of a in the string + the extra to complete the length\n return (number * repetitions) + repetitionsExtra;\n}", "title": "" }, { "docid": "888e3ee45ccc4207ffe5946471feebde", "score": "0.54061466", "text": "function compressString(input) {\n var compressed = [];\n var current = input[0];\n var count = 1;\n for (var i = 1; i < input.length; i++) {\n if (input[i] === current) {\n count++;\n if (i === input.length - 1) {\n compressed.push(current);\n compressed.push(count);\n }\n } else {\n compressed.push(current);\n compressed.push(count);\n current = input[i];\n count = 1;\n }\n }\n compressedString = compressed.join('');\n if (compressedString.length > input.length) {\n return input;\n } else {\n return compressedString;\n }\n}", "title": "" }, { "docid": "ea240b407889451219f0047d62584b68", "score": "0.5388957", "text": "function question1(s, t) {\n if (s.toLowerCase().length != t.toLowerCase().length) {\n return false\n }\n\n // make a dictionary to keep track the count of each character occurence.\n let dict = {}\n\n // we count every occurence of characters in the string and add it in our dictionary\n // keeping track of its count.\n for (let i = 0; i < s.length; i++) {\n dict[s[i]] = dict[s[i]] ? dict[s[i]] + 1 : 1\n dict[t[i]] = dict[t[i]] ? dict[t[i]] - 1 : -1\n }\n\n for (let d in dict) {\n if (dict[d] !== 0) {\n return false\n }\n }\n return true\n}", "title": "" } ]
d676ec63969e9b510b36e82eeb3c1cf5
MANAGERS ==================================================================== Transfer/tip manager, mode can be string "transfer" "dilution" "adapter"
[ { "docid": "0caf434bcb184e0ca1a0fe34fbad342c", "score": "0.6004201", "text": "function TransferManager(transferMode, tipMode) {\n\t// Error state is set to false if an exception is caught:\n\tthis.errorState = true;\n\tthis.functionMap = {\"transfer\":parseTransfers,\n\t\t\t\t\t\t\"dilution\":parseDilutionTransfers,\n\t\t\t\t\t\t\"adapter\":parseAdapterTransfers,\n\t\t\t\t\t\t\"lims_dilution\": parseDilutionTransfersLims };\n\tif(transferMode in this.functionMap) { \n\t\tthis.parseFunction = this.functionMap[transferMode];\n\t} else {\n\t\tthrow \"UnknownParseModeException: \\\"\" + transferMode + \"\\\"\";\n\t}\n\t// Array of Transfer object arrays:\n\tthis.transfers;\n\t// Current transfer object:\n\tthis.current;\n\t// Index of current plate:\n\tthis.plate;\n\t// Index of current transfer object (reset for each plate):\n\tthis.index;\n\t// Reference next element to predict tip handling:\n\tthis.next;\n\t// Number of transfers per source:\n\tthis.sizes;\n\t// Whether all volumes are the same (per source):\n\tthis.constantVolumes;\n\t// Tip handling (uses default value if not specified):\n\tthis.tipMode = tipMode || {\"row\":8, \"column\":12};\n\tthis.newTips = new Tipbox(96, this.tipMode);\n\tthis.usedTips = new Tipbox(0, this.tipMode);\n\t// Open and parse a transfer file:\n\tthis.openTransferFile = function(filePath) {\n\t\ttry {\n\t\t\tvar fileContent = readFile(filePath);\n\t\t\tprint(\"fileContent.length=\"+fileContent.length);\n\t\t\tthis.transfers = this.parseFunction(fileContent);\n\t\t\tprint(\"transfers.length=\"+this.transfers.length);\n\t\t\tthis.next = this.transfers[0][0];\n\t\t} catch(e) {\n\t\t\tthis.next = undefined;\n\t\t\tthis.errorState = false;\n\t\t\tprint(e);\n\t\t}\n\t\t// Reset state:\n\t\tthis.current = undefined;\n\t\tthis.plate = 0;\n\t\tthis.index = -1;\n\t\tthis.updateSize();\n\t\tthis.checkVolumes();\n\t}\n\t// Calculate number of transfers for each source ID:\n\t// Calculate number of transfers for each source ID:\n\tthis.updateSize = function() {\n\t\tvar n = this.transfers.length\n\t\tif(this.transfers && n) {\n\t\t\tthis.sizes = Array(n);\n\t\t\tfor(var i=n; i-->0;) {\n\t\t\t\tthis.sizes[i] = this.transfers[i].length;\n\t\t\t}\n\t\t\t// The VWorks JS engine doesn't seem to support Array.map\n\t\t\t// this.sizes = this.transfers.map(function(x) { return x.length; });\n\t\t}\n\t}\n\t// Return total size:\n\tthis.getSize = function() {\n\t\tvar tot = 0;\n\t\tfor(var i=this.transfers.length; i-->0;) {\n\t\t\ttot += this.transfers[i].length;\n\t\t}\n\t\treturn tot;\n\t}\n\t// Return the length of the current transfer array:\n\tthis.getCurrentSize = function() {\n\t\treturn this.transfers[this.plate].length;\n\t}\n\t// Return the number of plates in the transfer array:\n\tthis.numberOfPlates = function() {\n\t\treturn this.transfers.length;\n\t}\n\t// Return an array of transfer objects:\n\tthis.getAll = function() {\n\t\tvar all = [];\n\t\tfor(var i=0, n=this.transfers.length; i<n; i++) {\n\t\t\tall = all.concat(this.transfers[i]);\n\t\t}\n\t\treturn all;\n\t}\n\t// Return whether the transfer array of the current plate has a next element:\n\tthis.hasNextTransfer = function() {\n\t\treturn this.index < this.transfers[this.plate].length - 1;\n\t}\n\t// Return whether the transfer array has an array for another plate:\n\tthis.hasNextPlate = function() {\n\t\treturn this.plate < this.transfers.length - 1;\n\t}\n\t// Return whether tipbox is empty:\n\tthis.hasTip = function() {\n\t\treturn this.newTips.hasTip();\n\t}\n\tthis.resetTips = function() {\n\t\tthis.newTips = new Tipbox(96, this.tipMode);\n\t\tthis.usedTips = new Tipbox(0, this.tipMode);\n\t}\n\tthis.increment = function() {\n\t\t// Temporarily store the transfer array of the current plate:\n\t\tvar temp = this.transfers[this.plate];\n\t\ttry {\n\t\t\tthis.current = this.next;\n\t\t\tthis.index++;\n\t\t\tif(this.hasNextTransfer()) {\n\t\t\t\tthis.next = temp[this.index+1]; \n\t\t\t} else if(this.hasNextPlate()) {\n\t\t\t\ttemp = this.transfers[++this.plate];\n\t\t\t\tthis.index = -1;\n\t\t\t\tthis.next = temp[0];\n\t\t\t} else {\n\t\t\t\tthis.next = undefined;\n\t\t\t}\n\t\t} catch(e) {\n\t\t\tthis.errorState = false;\n\t\t\tprint(e);\n\t\t}\n\t}\n\n\t// This could be implemented with a queue as well:\n\t// (Just an example, do not use this method)\n\tthis.increment2 = function() {\n\t\treturn undefined;\n\t\tthis.current = this.transfers[0].shift();\n\t\tif(this.transfers[0].length === 0) this.transfers.shift();\n\t\tthis.next = this.transfers[0][0];\n\t}\n\t// For each array of transfers, check if the volumes in that array are equal:\n\tthis.checkVolumes = function() {\n\t\tif(this.transfers && this.transfers.length) {\n\t\t\tthis.constantVolumes = [];\n\t\t\tfor(var i=this.transfers.length; i-->0;) {\n\t\t\t\tvar temp = this.transfers[i];\n\t\t\t\tthis.constantVolumes[i] = temp.length > 0;\n\t\t\t\tfor(var j=0, m=this.transfers[i].length; j<m-1; j++) {\n\t\t\t\t\tif(temp[j].volume !== temp[j+1].volume) {\n\t\t\t\t\t\tthis.constantVolumes[i] = 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}\n\tthis.getWellSelectionTransferSource = function() {\n\t\treturn this.current.sourceWell;\n\t}\n\tthis.getWellSelectionTransferDestination = function() {\n\t\treturn this.current.destinationWell;\n\t}\n\tthis.getWellSelectionTipSource = function() {\n\t\treturn this.newTips.getNextTipPosition();\n\t}\n\tthis.getWellSelectionTipDestination = function() {\n\t\treturn this.usedTips.getNextEmptyPosition();\n\t}\n\tthis.takeTip = function() {\n\t\treturn this.newTips.takeTip();\n\t}\n\tthis.putTip = function() {\n\t\treturn this.usedTips.putTip();\n\t}\n\tthis.getVolume = function() {\n\t\treturn this.current.volume;\n\t}\n\tthis.useNewTip = function() {\n\t\treturn this.current.newTip;\n\t}\n\tthis.returnTip = function() {\n\t\treturn (!(this.hasNextTransfer() || this.hasNextPlate()) || this.next.newTip);\n\t}\n\tthis.updateTipState = function() {\n\t\tthis.newTips.increment();\n\t\tthis.usedTips.increment();\n\t}\n\tthis.changePlate = function() {\n\t\treturn (this.next && this.current.sourcePlate !== this.next.sourcePlate);\n\t}\n}", "title": "" } ]
[ { "docid": "2b717d07a96b457aa86c2f618762d523", "score": "0.52440953", "text": "function action(mode, type, selection) {\r\n if (mode == 1) {\r\n\tstatus++;\r\n } else {\r\n\tstatus--;\r\n }\r\n if (status == 1) {\r\n\tif (cm.getMapId() == 910320001) {\r\n\t\tcm.warp(910320000, 0);\r\n\t\tcm.dispose();\r\n\t} else if (cm.getMapId() == 910330001) {\r\n\t\tvar itemid = 4001321;\r\n\t\tif (!cm.canHold(itemid)) {\r\n\t\t\tcm.sendOk(\"É necessário 1 slot vago no seu inventário 'ETC'.\");\r\n\t\t} else {\r\n\t\t\tcm.gainItem(itemid,1);\r\n\t\t\tcm.warp(910320000, 0);\r\n\t\t}\r\n\t\tcm.dispose();\r\n\t} else if (cm.getMapId() >= 910320100 && cm.getMapId() <= 910320304) {\r\n\t\tcm.sendYesNo(\"Gostaria de sair deste lugar?\");\r\n\t\tstatus = 99;\r\n\t} else {\r\n\t\tcm.sendSimple(\"Meu nome é Mr.Lim.\\r\\n#b#e#L1#Entrar na Plataforma Empoeirada.#l#n\\r\\n#L2#Vá em direção ao Trem 999.#l\\r\\n#L3#Receba uma <Medalha do Empregado Honorário>.l#k\");\r\n\t}\r\n } else if (status == 2) {\r\n\t\tsection = selection;\r\n\t\tif (selection == 1) {\r\n\t\t\tif (cm.getPlayer().getLevel() < 25 || cm.getPlayer().getLevel() > 30 || !cm.isPartyLeader()) {\r\n\t\t\t\tcm.sendOk(\"Você deve estar entre os leveis 25-30 e ser líder.\");\r\n\t\t\t} else {\r\n\t\t\t\tif (!cm.start_PyramidSubway(-1)) {\r\n\t\t\t\t\tcm.sendOk(\"A Plataforma Empoeirada está cheia no momento.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//todo\r\n\t\t} else if (selection == 2) {\r\n\t\t\tif (cm.haveItem(4001321)) {\r\n\t\t\t\tif (cm.bonus_PyramidSubway(-1)) {\r\n\t\t\t\t\tcm.gainItem(4001321, -1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcm.sendOk(\"O Trem 999 está cheia no momento\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcm.sendOk(\"Você não tem o cartão de embarque.\");\r\n\t\t\t}\r\n\t\t} else if (selection == 3) {\r\n\t\t\tvar record = cm.getQuestRecord(7662);\r\n\t\t\tvar data = record.getCustomData();\r\n\t\t\tif (data == null) {\r\n\t\t\t\trecord.setCustomData(\"0\");\r\n\t\t\t\tdata = record.getCustomData();\r\n\t\t\t}\r\n\t\t\tvar mons = parseInt(data);\r\n\t\t\tif (mons < 10000) {\r\n\t\t\t\tcm.sendOk(\"Por favor derrotar pelo menos 10.000 monstros na Estação e procure por mim novamente. Mortes: \" + mons);\r\n\t\t\t} else if (cm.canHold(1142141) && !cm.haveItem(1142141)){\r\n\t\t\t\tcm.gainItem(1142141,1);\r\n\t\t\t\tcm.forceStartQuest(29931);\r\n\t\t\t\tcm.forceCompleteQuest(29931);\r\n\t\t\t} else {\r\n\t\t\t\tcm.sendOk(\"Por favor, limpe um espaço do seu inventário 'EQUIP' para receber o item.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcm.dispose();\r\n\t} else if (status == 100) {\r\n\t\tcm.warp(910320000,0);\r\n\t\tcm.dispose();\r\n\t}\r\n}", "title": "" }, { "docid": "0bf5de1d8d9be6929423f0c1a616fbe1", "score": "0.52250755", "text": "changeMode(context, mode) {\n console.log(mode + \" \" + context.state.additionMode);\n if(context.state.additionMode === mode) {\n context.commit('changeMode', \"\");\n }\n else {\n switch (mode) {\n case \"addMarker\":\n context.commit('changeMode', mode);\n break;\n case \"addConnectedMarker\":\n context.commit('changeMode', mode);\n break;\n case \"lineAdd\":\n context.commit('changeMode', mode);\n break;\n default:\n context.commit('changeMode', \"\");\n break;\n }\n }\n }", "title": "" }, { "docid": "01093137f7430c9877148f8245f9aa74", "score": "0.5107818", "text": "function action(mode, type, selection) {\n if (mode == 1) {\n status++;\n } else {\n if (status == 99 || status <= 1) {\n cm.dispose();\n return;\n }\n status--;\n }\n if (status == 1) {\n if (cm.getMapId() >= 926020001 && cm.getMapId() <= 926020004) {\n var itemid = 4001321 + (cm.getMapId() % 10);\n if (!cm.canHold(itemid)) {\n cm.sendOk(\"请确认背包其他栏有足够空间.\");\n } else {\n cm.gainItem(itemid, 1);\n cm.warp(cm.getMapId() - 10000, 0);\n }\n cm.dispose();\n } else if (cm.getMapId() >= 926010001 && cm.getMapId() <= 926010004) {\n cm.warp(926010000, 0);\n cm.dispose();\n } else if (cm.getMapId() >= 926010100 && cm.getMapId() <= 926013504) {\n cm.sendYesNo(\"你想要离开这里了吗?\");\n status = 99;\n } else {\n cm.sendSimple(\"我是守护奈特神的金字塔的杜阿特。\\r\\n\\r\\n#b#L0#听取金字塔的介绍。#l\\r\\n#e#L1#进入金字塔。#l#n\\r\\n#L2#寻找组队。#l\\r\\n#L3#用<奈特的绿宝石>交换其他物品。#l\\r\\n#L4#查看今日剩余挑战次数。#l\\r\\n\");\n }\n } else if (status == 2) {\n section = selection;\n if (selection == 0) {\n cm.sendNext(\"这里就是混沌与复仇之神奈特的金字塔。尽管很长时间以来它都隐藏在沙漠深处,但奈特神的意志已然来到了人间。如果不想对将来未知的混沌和死亡感到害怕的话,最好来金字塔挑战下奈特神的试炼。\");\n } else if (selection == 1) {\n cm.sendSimple(\"你这个无知的傻瓜,那么请选择吧!\\r\\n#L0# #v3994115# #l#L1# #v3994116# #l#L2# #v3994117# #l#L3# #v3994118# #l\");\n } else if (selection == 2) {\n //cm.sendSimple(\"What gem have you brought?\\r\\n#L0##i4001322##t4001322##l\\r\\n#L1##i4001323##t4001323##l\\r\\n#L2##i4001324##t4001324##l\\r\\n#L3##i4001325##t4001325##l\");\n cm.sendNext(\"打开组队界面寻找找一个队伍吧\");\n cm.dispose();\n } else if (selection == 3) {\n cm.sendSimple(\"通过奈特神的考验,搜集到#e#b#t4001623:##k#n之后,可以交换为其他道具。你想要什么道具呢?\\r\\n#b\\r\\n#L0# #i1132013:# #t1132013# #r(需要#t4001623#40个)#b#l\\r\\n#L1# #i1072619:# #t1072619# #r(需要#t4001623#40个)#b#l\\r\\n#L2# #i1112682:# #t1112682# #r(需要#t4001623#40个)#b#l\");\n } else if (selection == 4) {\n cm.sendOk(\"今天剩余挑战次数是\" + (maxenter - cm.getPQLog(PQLog)) + \"次。\");\n cm.dispose();\n } else if (selection == 5) {\n var record = cm.getQuestRecord(7760);\n var data = record.getCustomData();\n if (data == null) {\n record.setCustomData(\"0\");\n data = record.getCustomData();\n }\n var mons = parseInt(data);\n if (mons < 50000) {\n cm.sendOk(\"Please defeat at least 50,000 monsters in the Pyramid and look for me again. Kills : \" + mons);\n } else if (cm.canHold(1142142) && !cm.haveItem(1142142)) {\n cm.gainItem(1142142, 1);\n cm.forceStartQuest(29932);\n cm.forceCompleteQuest(29932);\n } else {\n cm.sendOk(\"Please make room.\");\n }\n cm.dispose();\n }\n } else if (status == 3) {\n if (section == 0) {\n cm.sendNext(\"当你进入金字塔的瞬间,奈特神的试炼就已经开始了。你必须阻止不断涌现的怪物到达#b#e方尖碑#n#k。从金字塔里获得的点数可以用来购买#b眼睛道具#k。\");\n } else if (section == 1) {\n var cont_ = false;\n if (selection == 0) { //easy; 40-60\n if (cm.getPlayer().getLevel() < 40) {\n cm.sendOk(\"你的等级必须在40以上.\");\n } else if (cm.getPlayer().getLevel() > 60) {\n cm.sendOk(\"你的等级必须在60以下.\");\n } else {\n cont_ = true;\n }\n } else if (selection == 1) { //normal; 60-80\n if (cm.getPlayer().getLevel() < 60) {\n cm.sendOk(\"你的等级必须在60以上.\");\n } else if (cm.getPlayer().getLevel() > 80) {\n cm.sendOk(\"你的等级必须在80以下.\");\n } else {\n cont_ = true;\n }\n } else if (selection == 2) { //hard; 80-100\n if (cm.getPlayer().getLevel() < 80) {\n cm.sendOk(\"你的等级必须在80以上.\");\n } else if (cm.getPlayer().getLevel() > 100) {\n cm.sendOk(\"你的等级必须在100以下.\");\n } else {\n cont_ = true;\n }\n } else if (selection == 3) { //hell; 61+\n if (cm.getPlayer().getLevel() < 100) {\n cm.sendOk(\"你的等级必须在100以上.\");\n } else {\n cont_ = true;\n }\n }\n if (cont_ && cm.isLeader()) {//todo\n if (!cm.isAllPartyMembersAllowedPQ(PQLog, maxenter)) {\n cm.sendNext(\"你的队员#r#e \\\"\" + cm.getNotAllowedPQMemberName(PQLog, maxenter) + \"\\\" #k#n次数已经达到上限了。\");\n } else if (!cm.start_PyramidSubway(selection)) {\n cm.sendOk(\"奈特神的金字塔当前进行的人数已满.\");\n } else {\n cm.gainMembersPQ(PQLog, 1);\n }\n\n } else if (cont_ && !cm.isLeader()) {\n cm.sendOk(\"需要组成一个队伍!\");\n }\n cm.dispose(); //todo\n } else if (section == 3) {\n var itemid = 4001623;\n var bounse = 0;\n if (selection == 0) {\n bounse = 1132013;\n } else if (selection == 1) {\n bounse = 1072619;\n } else {\n bounse = 1112682;\n }\n if (!cm.haveItem(itemid, 40)) {\n cm.sendOk(\"奈特的绿宝石差得太多了。想获得#b#i\" + bounse + \":##t\" + bounse + \"##k的话,至少需要40个。\");\n } else {\n cm.gainItem(bounse, 1);\n cm.gainItem(itemid, -40);\n }\n cm.dispose(); //todo\n }\n } else if (status == 4) {\n if (section == 0) {\n cm.sendNext(\"通过奈特的试炼的人会得到无上的荣耀,在试炼前倒下的人就只好自求多福了。我对你的提醒就到这里了。剩下的就全凭你自己的实力了。\");\n cm.dispose();\n }\n } else if (status == 100) {\n cm.warp(926010000, 0);\n cm.dispose();\n }\n}", "title": "" }, { "docid": "e6ba85d8a870009b2c3677f9a29d62ae", "score": "0.5081819", "text": "get mode() {\n return this.destinationMode;\n }", "title": "" }, { "docid": "e6ba85d8a870009b2c3677f9a29d62ae", "score": "0.5081819", "text": "get mode() {\n return this.destinationMode;\n }", "title": "" }, { "docid": "faee760995f5b6abdab1d5d0b33146da", "score": "0.50700855", "text": "mode(pin, mode) {\n\t\tlet params = {\n\t\t\tpin: pin,\n\t\t\tmode: mode\n\t\t}\n\t\tlet req = http.request(this._requestOption('/mode', params), (res) => {\n\t\t\tconsole.log('mode!');\n\t\t});\n\t\treq.end();\n\t}", "title": "" }, { "docid": "90e6930d2f33b6d2445a1c9a743a3ab1", "score": "0.48703945", "text": "changeMode(state, mode) {\n state.directionAndMode = { direction: state.directionAndMode.direction, mode: mode };\n window.localStorage.setItem('direction-and-mode', JSON.stringify({ direction: state.directionAndMode.direction, mode: mode }))\n }", "title": "" }, { "docid": "835364ebd4715fad05e82e98800227a1", "score": "0.48462978", "text": "function masterSendMode(mode) {\n var p = prot.parts.mode;\n var out = new DataView(new ArrayBuffer(p.length));\n out.setUint32(0, prot.ids.mode, true);\n out.setUint32(p.mode, mode, true);\n masterSock.send(out.buffer);\n}", "title": "" }, { "docid": "bb99519390f947dfd225a5e10f3b55d2", "score": "0.48211157", "text": "function set_amount(obj, option_mode, mode) {\n option_manager.set_amount(obj, option_mode, mode);\n if (typeof window.diy_opt != 'undefined' && option_mode == 'addition') {\n diy_option_price(window.diy_opt.conf());\n }\n}", "title": "" }, { "docid": "089c198ac5bf3b2f522d46847bb3ee44", "score": "0.47173432", "text": "function autorizer(request, sender, sendResponse){\r\n sendResponse({'data': active[sender.tab.id]});\r\n}", "title": "" }, { "docid": "d62e7835073f07c8ad7b9031d019db21", "score": "0.4683693", "text": "function changePaymentmode(payment_mode) {\r\n\t\tif( payment_mode == 'Credit' ) {\r\n\t\t\tself.shipment.bill_to = 'To Pay';\t\r\n\t\t} else {\r\n\t\t\tself.shipment.bill_to = '';\r\n\t\t}\r\n\t\tself.tax_payable(); // Tax payable on Reverse Charge \r\n\t}", "title": "" }, { "docid": "1ff8dec3a0443fe95c1e2510e57d076a", "score": "0.46666718", "text": "function action(mode, type, selection) {\n if (mode == 1) {\n\tstatus++;\n\tif (status == 0) {\n\tsel = selection;\n\tswitch (selection) {\n\t case 0:\n\t case 1:\n\t case 2:\n\t case 28:\n\t\tcm.warp(lobby,0);\n\t\tbreak;\n\t case 3:\n\t\tcm.sendOk(\"#bCurrent BPQ Points : \" + points);\n\t\tbreak;\n\t case 4: // Timeless Blindness\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1492023)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1492023, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t\tcase 40: // Timeless Blooms\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1522015)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1522015, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t\t\n\t case 5: // Timeless Lampion\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1472068)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1472068, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 6: // Timeless Black Beauty\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1462050)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1462050, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 7: // Timeless Engaw\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1452057)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1452057, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 8: // Timeless Alchupiz\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1432047)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1432047, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 9: // Timeless Aeas Hand\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1382057)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1382057, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n \t case 10: // Timeless Enreal Tear\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1372044)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1372044, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n \t case 11: // Timeless Killic\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1332074)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1332074, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 12: // Timeless Pescas\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1332073)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1332073, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 13: // Timeless Equinox\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1482023)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1482023, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 14: // Timeless Diesra\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1442063)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1442063, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 15: // Timeless Bellocce\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1422037)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1422037, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 16: // Timeless Tabarzin\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1412033)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1412033, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 17: // Timeless Nibleheim\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1402046)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1402046, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 18: // Timeless Allargando\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1322060)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1322060, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 19: // Timeless Bardiche\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1312037)) {\n\t\t\tintPoints -= 1312037;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(2049100, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 20: // Timeless Executioners\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1302081)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1302081, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\t\n\t case 21: // Balanced Fury\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 125000) {\n\t\t if (cm.canHold(2070018)) {\n\t\t\tintPoints -= 125000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(2070018, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 22: // Fairy Pendant\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 30000) {\n\t\t if (cm.canHold(1122017)) {\n\t\t\tintPoints -= 30000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItemPeriod(1122017, 1, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t case 27:\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 75000) {\n\t\t if (cm.canHold(2340000)) {\n\t\t\tintPoints -= 75000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(2340000, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\n\t case 29:\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 15000) {\n\t\t if (cm.canHold(5490001)) {\n\t\t\tintPoints -= 15000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(5490001, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\n\t case 30:\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 30000) {\n\t\t if (cm.canHold(5490000)) {\n\t\t\tintPoints -= 30000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(5490000, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\n\t case 31: // Timeless Katara\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1342011)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1342011, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\n\t case 34: // Obliterator\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 120000) {\n\t\t if (cm.canHold(1532015)) {\n\t\t\tintPoints -= 120000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(1532015, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\n\t case 32: //Enchanted Scroll, used to buy/sell BossPQ points\n\t\tvar intPoints = parseInt(points);\n\t if (intPoints < 1000) {\n\t\t cm.sendOk(\"You need at least 1000 points for an Enchanted Scroll.\");\n\t\t cm.dispose();\n\t } else {\n\t\t cm.sendGetNumber(\"How many would you like? (1 Enchanted Scroll = 1000 points) (Current Points: \" + intPoints + \") (Current Scrolls: \" + cm.getPlayer().itemQuantity(5221001) + \")\", intPoints / 1000, 1, intPoints / 1000);\n\t }\n\t\tbreak;\n\t case 33: //points\n\t\tvar intPoints = parseInt(points);\n\t if (!cm.getPlayer().haveItem(5221001)) {\n\t\t cm.sendOk(\"You need at least 1 Enchanted Scroll.\");\n\t\t cm.dispose();\n\t } else {\n\t\t cm.sendGetNumber(\"How many would you like to redeem? (1 Enchanted Scroll = 1000 points) (Current Scrolls: \" + cm.getPlayer().itemQuantity(5221001) + \") (Current Points: \" + intPoints + \")\", cm.getPlayer().itemQuantity(5221001), 1, cm.getPlayer().itemQuantity(5221001));\n\t }\n\t\tbreak;\n\t case 36: //item\n\t\tvar intPoints = parseInt(points);\n\t if (intPoints < 10000) {\n\t\t cm.sendOk(\"You need at least 10000 points for a Bamboo Luck Sack.\");\n\t\t cm.dispose();\n\t } else {\n\t\t cm.sendGetNumber(\"How many would you like? (1 Bamboo Luck Sack = 10000 points) (Current Points: \" + intPoints + \") (Current: \" + cm.getPlayer().itemQuantity(3993002) + \")\", intPoints / 10000, 1, intPoints / 10000);\n\t }\n\t\tbreak;\n\t case 37: //points\n\t\tvar intPoints = parseInt(points);\n\t if (!cm.getPlayer().haveItem(3993002)) {\n\t\t cm.sendOk(\"You need at least 1 Bamboo Luck Sack.\");\n\t\t cm.dispose();\n\t } else {\n\t\t cm.sendGetNumber(\"How many would you like to redeem? (1 Bamboo Luck Sack = 10000 points) (Current: \" + cm.getPlayer().itemQuantity(3993002) + \") (Current Points: \" + intPoints + \")\", cm.getPlayer().itemQuantity(3993002), 1, cm.getPlayer().itemQuantity(3993002));\n\t }\n\t\tbreak;\n\t case 38:\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 75000) {\n\t\t if (cm.canHold(2530000)) {\n\t\t\tintPoints -= 75000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(2530000, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\n\t case 39:\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 150000) {\n\t\t if (cm.canHold(2531000)) {\n\t\t\tintPoints -= 150000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(2531000, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\t\n\t case 35: // Crystal Ilbi\n\t\tvar intPoints = parseInt(points);\n\n\t\tif (intPoints >= 75000) {\n\t\t if (cm.canHold(2070016)) {\n\t\t\tintPoints -= 75000;\n\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\tcm.gainItem(2070016, 1);\n\t\t\tcm.sendOk(\"Enjoy your rewards :P\");\n\t\t } else {\n\t\t\tcm.sendOk(\"Please check if you have sufficient inventory slot for it.\")\n\t\t }\n\t\t} else {\n\t\t cm.sendOk(\"Please check if you have sufficient points for it, #bCurrent Points : \" + points);\n\t\t}\n\t\tbreak;\n\t\tcase 40:\n\t\t\tcm.warp(219010000,0);\n\t\t\tbreak;\n\t\tcase 41:\n\t\t\tcm.warp(219020000,0);\n\t\t\tbreak;\n\t}\n\t} else {\n\t var intPoints = parseInt(points);\n\t if (sel == 32) {\n\t\tif (selection >= 1 && selection <= (intPoints / 1000)) {\n\t\t\tif (selection > (intPoints / 1000)) {\n\t\t\t\tcm.sendOk(\"You can only get max \" + (intPoints / 1000) + \" Scrolls. 1 Scroll = 1000 points.\");\n\t\t\t} else if (!cm.canHold(5221001, selection)) {\n\t\t\t\tcm.sendOk(\"Please make space in CASH tab.\");\n\t\t\t} else {\n\t\t\t\tcm.gainItem(5221001, selection);\n\t\t\t\tintPoints -= selection * 1000;\n\t\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\t\tcm.sendOk(\"You have gained \" + selection + \" Scrolls and lost \" + (selection * 1000) + \" points. Current Points: \" + intPoints);\n\t\t\t}\n\t\t}\n\t }if (sel == 41) {\n\t\tif (selection >= 1 && selection <= (intPoints / 5000)) {\n\t\t\tif (selection > (intPoints / 5000)) {\n\t\t\t\tcm.sendOk(\"You can only get max \" + (intPoints / 5000 * 10) + \"k NX Cash. 10K NX = 5000 points.\");\n\t\t\t} else {\n\t\t\t\t//cm.gainCash();//\n\t\t\t\tintPoints -= selection * 5000;\n\t\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\t\tcm.sendOk(\"You have gained \" + (selection * 10) + \"K NX Cash and lost \" + (selection * 5000) + \" points. Current Points: \" + intPoints);\n\t\t\t}\n\t\t}\n\t } else if (sel == 33) {\n\t\tif (selection >= 1 && selection <= cm.getPlayer().itemQuantity(5221001)) {\n\t\t\tif (intPoints > (2147483647 - (selection * 1000))) {\n\t\t\t\tcm.sendOk(\"You have too many points.\");\n\t\t\t} else {\n\t\t\t\tcm.gainItem(5221001, -selection);\n\t\t\t\tintPoints += selection * 1000;\n\t\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\t\tcm.sendOk(\"You have lost \" + selection + \" Scrolls and gained \" + (selection * 1000) + \" points. Current Points: \" + intPoints);\n\t\t\t}\n\t\t} \n\t } else if (sel == 36) {\n\t\tif (selection >= 1 && selection <= (intPoints / 10000)) {\n\t\t\tif (selection > (intPoints / 10000)) {\n\t\t\t\tcm.sendOk(\"You can only get max \" + (intPoints / 10000) + \". 1 Item = 10000 points.\");\n\t\t\t} else if (!cm.canHold(3993002, selection)) {\n\t\t\t\tcm.sendOk(\"Please make space in SETUP tab.\");\n\t\t\t} else {\n\t\t\t\tcm.gainItem(3993002, selection);\n\t\t\t\tintPoints -= selection * 10000;\n\t\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\t\tcm.sendOk(\"You have gained \" + selection + \" and lost \" + (selection * 10000) + \" points. Current Points: \" + intPoints);\n\t\t\t}\n\t\t}\n\t } else if (sel == 37) {\n\t\tif (selection >= 1 && selection <= cm.getPlayer().itemQuantity(3993002)) {\n\t\t\tif (intPoints > (2147483647 - (selection *10000))) {\n\t\t\t\tcm.sendOk(\"You have too many points.\");\n\t\t\t} else {\n\t\t\t\tcm.gainItem(3993002, -selection);\n\t\t\t\tintPoints += selection * 10000;\n\t\t\t\tcm.setCData(\"bossquest\", \"\"+intPoints+\"\");\n\t\t\t\tcm.sendOk(\"You have lost \" + selection + \" and gained \" + (selection * 10000) + \" points. Current Points: \" + intPoints);\n\t\t\t}\n\t\t} \n\t }\n\t cm.dispose();\n\t}\n }\n if (selection != 32 && selection != 33 && selection != 36 && selection != 37) {\n cm.dispose();\n }\n}", "title": "" }, { "docid": "69d9bd0bfa9a572a08a2c31f11e8b75a", "score": "0.4610869", "text": "function moreManagering() {\n inquirer\n .prompt([{\n name: \"more\",\n type: \"confirm\",\n message: \"Would you like to do more managering?\"\n }]).then(function (answer) {\n if (answer.more) {\n managerInit();\n } else {\n console.log(figlet.textSync(\"Then GET OUT!\", {\n font: \"Big\",\n horizontalLayout: \"default\",\n verticalLayout: \"default\"\n }));\n connection.end();\n }\n })\n}", "title": "" }, { "docid": "ace3c5b63b12bde5f6239646edbebd9e", "score": "0.4607793", "text": "function setModeName(mode_name) {\n if (mode_name === 'offline' || mode_name === 'unguarded') {\n checker.cloakerCatcherMode = mode_name;\n } else {\n checker.cloakerCatcherMode = \"online\";\n }\n}", "title": "" }, { "docid": "df6ee1baa41dadf360911cc6e372690d", "score": "0.4601743", "text": "function setup(selected, mode) {\n var object = selected.attr('data-modalObject');//.toLowerCase();\n\n //getData($(this).attr('data-userID'), $(this).attr('data-modalObject') + '();');\n $('[name=\"heading\"]').html(mode + ' ' + object);\n //var form = $('[name=\"' + object + 'ModalForm\"]');\n var form = $('#' + object + 'Modal').find('form');\n\n form.attr('action', selected.attr('data-modalRoute'));\n\n if (selected.attr('data-modalMethod') == \"PUT\" || selected.attr('data-modalMethod') == \"PATCH\") {\n form.attr('method', 'POST');\n form.prepend('<input name=\"_method\" type=\"hidden\" value=\"PUT\"/>');\n } else if (selected.attr('data-modalMethod') == \"DELETE\") {\n form.attr('method', 'POST');\n form.prepend('<input name=\"_method\" type=\"hidden\" value=\"DELETE\"/>');\n } else {\n form.attr('method', selected.attr('data-modalMethod') || 'POST');\n }\n }", "title": "" }, { "docid": "9d5ed1cadc4e310b8bbf197b7437564f", "score": "0.4582809", "text": "function confirmTransfer() {\n API.triggerServerEvent('atm_confirm_transfer');\n}", "title": "" }, { "docid": "0f8a5636c588d34a4e7a3fbe1b406d4c", "score": "0.458098", "text": "function modeCalculation(mode) {\n switch(mode) {\n case 'easy':\n return 1;\n break;\n case 'normal':\n return 3;\n break;\n case 'hard':\n return 10;\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "454660357c655593fa177c179401ea1e", "score": "0.4543323", "text": "op () {\n this.channel.setModes('+o', [this.user.nickName])\n }", "title": "" }, { "docid": "3e4eda318c8d56b52982cf2f78a4edc2", "score": "0.4538825", "text": "function managerMode() {\n inquirer.prompt([\n {\n type: \"password\",\n message: \"What is the manager password?\",\n name: \"password\"\n }]\n )\n\n .then(function (response) {\n if (response.password === \"farley\") {\n console.log(chalk.green(\"password accepted!\"));\n showManagerOptions();\n }\n\n else if (response.password !== \"farley\") {\n console.log(chalk.red(\"Sorry, your password is incorrect\"));\n connection.end();\n }\n\n })\n\n}", "title": "" }, { "docid": "ca040d10a1311101ead4b95416628783", "score": "0.4527516", "text": "function forwardToNextNode(mode, data) {\n var modeMap = {\n 'TAG': TYPE_.TAG_BACKUP_DATA,\n 'NOTE': TYPE_.NOTE_BACKUP_DATA,\n 'EDIT': TYPE_.EDIT_BACKUP_DATA,\n 'DATA': TYPE_.STORE_BACKUP_DATA\n };\n if (mode in modeMap && _nextNode.id)\n _nextNode.send(packet_.construct({\n type_: modeMap[mode],\n data: data\n }));\n}", "title": "" }, { "docid": "9c6ae4ca5036d50fc66d02767a10e97a", "score": "0.4525151", "text": "function mode_manual_node1(){\n\t var onoff_mode_manual1 = document.getElementById(\"onoff_mode_manual1\").value;\n\t if(onoff_mode_manual1 == \"aktif\"){\n\t\t\tclient.publish('node1/pengabutan/manual', 'aktif');\n\t\t\tconsole.log(\"manual node 1 :\"+onoff_mode_manual1+\"\");\n\t }\n\t if (onoff_mode_manual1 == \"mati\"){\n client.publish('node1/pengabutan/manual', 'mati');\n } \n\t console.log(\"manual node 1 :\"+onoff_mode_manual1+\"\");\n}", "title": "" }, { "docid": "3582f940a19120d128c463ee356c0330", "score": "0.45013487", "text": "function changeTravelMode() {\n\t\ttravelMode = document.getElementById('mode').value;\n\t\tcalcRoute(startMarker.getPosition(), endMarker.getPosition());\n\t\t}", "title": "" }, { "docid": "1b9008cfdb6510e9262e3a3c343647ea", "score": "0.44865626", "text": "function Mode() {\n }", "title": "" }, { "docid": "9c53363b6dceb6ea87dd9b2968c19c9d", "score": "0.4479569", "text": "setToAddMode(){\n this.mode = MODE_ADD\n }", "title": "" }, { "docid": "a7f583d855cda31125912e68f10d45a9", "score": "0.44792253", "text": "changeMode(mode) {\n\t\tconst { id } = this.handle.api;\n\t\tlet value;\n\n\t\tswitch (mode) {\n\t\t\tcase 'auto':\n\t\t\t\tvalue = 0;\n\t\t\t\tbreak;\n\n\t\t\tcase 'sleep':\n\t\t\t\tvalue = 1;\n\t\t\t\tbreak;\n\n\t\t\tcase 'favorite':\n\t\t\t\tvalue = 2;\n\t\t\t\tbreak;\n\n\t\t\tcase 'none':\n\t\t\t\tvalue = 3;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn this.call('set_properties', [\n\t\t\t{ did: `${id}`, siid: 2, piid: 5, value }\n\t\t]);\n\t}", "title": "" }, { "docid": "725e0ef6e42c00208bb3efb12f08136d", "score": "0.44287807", "text": "function setMode(mode) {\n chrome.storage.sync.set({'mode': mode}, function(){\n //console.debug(\"setMode(): \" + mode);\n //console.debug('Mode Saved');\n })\n}", "title": "" }, { "docid": "d81f68e8f1f609f79a6fdb025ad5915f", "score": "0.44182965", "text": "function add_mode_callback(tgt)\n {\n var target = tgt || '#trip-modetype';\n var THIS = this;\n $(target).change(function() {\n THIS.switch_mode(null, true);\n });\n }", "title": "" }, { "docid": "47a59166dbcbbc81071cac4486b58365", "score": "0.44037083", "text": "function setMode(mode){\r\n switch(mode)\r\n {\r\n case 'tree':\r\n $scope.ui.showNavigation = true;\r\n $scope.ui.showContextMenu = false;\r\n $scope.ui.showContextMenuDialog = false;\r\n $scope.ui.stickyNavigation = false;\r\n break;\r\n case 'menu':\r\n $scope.ui.showNavigation = true;\r\n $scope.ui.showContextMenu = true;\r\n $scope.ui.showContextMenuDialog = false;\r\n $scope.ui.stickyNavigation = false;\r\n break;\r\n case 'dialog':\r\n $scope.ui.stickyNavigation = true;\r\n $scope.ui.showNavigation = true;\r\n $scope.ui.showContextMenu = false;\r\n $scope.ui.showContextMenuDialog = true;\r\n break;\r\n case 'search':\r\n $scope.ui.stickyNavigation = false;\r\n $scope.ui.showNavigation = true;\r\n $scope.ui.showContextMenu = false;\r\n $scope.ui.showSearchResults = true;\r\n $scope.ui.showContextMenuDialog = false;\r\n break; \r\n default:\r\n $scope.ui.showNavigation = false;\r\n $scope.ui.showContextMenu = false;\r\n $scope.ui.showContextMenuDialog = false;\r\n $scope.ui.showSearchResults = false;\r\n $scope.ui.stickyNavigation = false;\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "f9452b2810e2bbba0229e8c65eb13df5", "score": "0.43934312", "text": "function openTransfer() {\n API.triggerServerEvent('atm_open_transfer');\n}", "title": "" }, { "docid": "f550fc5c59ba74c831e9fa421836aa98", "score": "0.4393361", "text": "function managerView() {\n // prompt for info about the product to purchase\n inquirer\n .prompt([\n {\n name: \"managerViews\",\n type: \"list\",\n message: \"Select a menu option:\",\n choices: [\"View Products for Sale\",\n \"View Low Inventory\",\n \"Add to Inventory\",\n \"Add New Product\"]\n }\n ])\n .then(function(answer) {\n switch(answer.managerViews){\n case \"View Products for Sale\":\n viewSale();\n break;\n case \"View Low Inventory\":\n viewLowInventory();\n break;\n case \"Add to Inventory\":\n updateInventory();\n break;\n case \"Add New Product\": \n addNewProduct();\n break;\n default:\n console.log(\"Select a valid selection from the managers view.\");\n start();\n }\n});\n}", "title": "" }, { "docid": "6f5901d65c6e0165aa5f735553086ce8", "score": "0.43651676", "text": "function sendMoneroNewTab () {\n var destination = document.getElementById('send-dest-popup-0').value;\n var amount = String(document.getElementById('send-amount-popup-0').value);\n var pay_id = document.getElementById('send-pay-id-popup').value;\n var mixin = Number(document.getElementById('send-mixin-popup').value);\n\n if (pay_id.length == 0) { pay_id = undefined; }\n if (mixin.length == 0 || mixin < 3) { mixin = 3; }\n\n var fee = undefined, unlock_time = undefined, get_tx_key = true, new_algo = true;\n var dests = [{amount: JSONbig.parse(coinsToAtomic(amount)), address: destination}];\n\n transferSplit(wallet_info.remote, wallet_info.port, dests, pay_id, fee, mixin, unlock_time, get_tx_key, new_algo,\n function (resp) {\n if (resp.hasOwnProperty(\"result\")) {\n // Send successful:\n var tx_hash_list = resp.result.tx_hash_list;\n var status = document.getElementById('send-success-popup');\n\n var tx_hashes = [];\n for (var i=0; i < tx_hash_list.length; i++) {\n var this_hash = tx_hash_list[i];\n tx_hashes.push(this_hash);\n document.getElementById('send-txhashlist-popup').innerHTML += '<a target=\"_blank\" href=\"http://explore.moneroworld.com/search?value=' + this_hash + '\">' + this_hash + '</a><br>';\n }\n\n outgoingTxsDB.createOutgoingTx(pay_id, dests, tx_hashes, function(contact) {\n console.log('Outgoing tx successfully stored in database.');\n });\n\n status.style.display = 'block';\n setTimeout(function() {\n status.style.display = 'none';\n }, 20000);\n } else if (resp.hasOwnProperty(\"error\")) {\n // Send unsuccessful:\n var status = document.getElementById('send-error-popup');\n status.innerHTML = \"Error: \" + resp.error.message;\n status.style.display = 'block';\n setTimeout(function() {\n status.style.display = 'none';\n }, 10000);\n } else {\n // Unknown error:\n var status = document.getElementById('send-error-popup');\n status.innerHTML = 'There was an error sending your transaction.';\n status.style.display = 'block';\n setTimeout(function() {\n status.style.display = 'none';\n }, 10000);\n }\n },\n function (err) {\n var status = document.getElementById('send-error-popup');\n status.innerHTML = 'There was an error connecting to monero-wallet-rpc.';\n status.style.display = 'block';\n setTimeout(function() {\n status.style.display = 'none';\n }, 10000);\n }\n );\n}", "title": "" }, { "docid": "c83e23c5b21474601f35a0aadfb8aa37", "score": "0.43638217", "text": "function loadModeByName(editor, mode) {\n\t loadInfo(editor, CodeMirror.findModeByName(mode));\n\t}", "title": "" }, { "docid": "329be957ae08c0dba8a0f94318f54aa6", "score": "0.43609682", "text": "function tabChanged(e){\n // var node = e.selectedValueTab;\n // gTrans.showDialogCorp = true;\n // if (node.id == 'tab1') {\n //\n // }\n // if (node.id == 'tab2'){\n // gTrans.dialog.activeDataOnTab('tab2');\n // gTrans.dialog.USERID = gCustomerNo;\n // gTrans.dialog.PAYNENAME = \"3\";\n // gTrans.dialog.TYPETEMPLATE = \"1\";\n // gTrans.dialog.requestData(node.id);\n // }\n }", "title": "" }, { "docid": "35a8fd1791d799ab0834a8a0ef544b75", "score": "0.4358085", "text": "mode(mode) {\r\n\t\tif (mode == GRAPHIC_MODE || mode == TEXT_MODE) {\r\n\t\t\tthis._currentMode = mode\r\n\t\t\tthis.refreshSettings()\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a4b790c79693adf32c2ae39534bef360", "score": "0.43577147", "text": "get mode() {return this._mode;}", "title": "" }, { "docid": "2d34a6df184e13fc88e2ceb6625976f0", "score": "0.43533188", "text": "function setMode(mode) {\n if((typeof mode !== 'string') || (mode == ''))\n return false;\n \n switch (mode) {\n case 'bar-only':\n body.removeClass(\"active-tasks\");\n pageTitle.text(titleText);\n favicon.attr(\"href\",\"img/favicon.png\");\n break;\n case 'active-tasks':\n body.addClass(\"active-tasks\");\n favicon.attr(\"href\",\"img/favicon_inactive.png\");\n break;\n }\n return true;\n }", "title": "" }, { "docid": "17d3604841b85724e70e1a49fd0e6833", "score": "0.43520132", "text": "function operationModes(){\n return modes.STORAGE;\n }", "title": "" }, { "docid": "462faeb26bb4be0a189c66a5bbb846cd", "score": "0.43497923", "text": "getActionSetupFrom(source,target,mode){\n const items = source._battleSlotsItems && $huds.combats.getSlotItemsID || []; // monster non pas d'items\n const baseA = this.getBaseFromMode(mode).getContextsFrom(source,target); // attack,def,,magic\n const baseB = items && _stateItem.getContextsFrom(source,target,items) || []; // items\n // Extent actionA et ActionB de ces infliger potentiel, et les return en arrays\n const infligers = this.scanStatesInfligers(source,target,items,baseA,baseB);\n // les infliger peuvent etre des pre ou after, pre:applique avant, after: appliquer au resulta\n const influers = this.scanStatesInfluer(source,target,items,baseA,baseB,infligers);\n return {baseA,baseB,infligers,influers}; // renvoi la lister des infligeur\n }", "title": "" }, { "docid": "a8d0aad80ada97b4a73e5563326d5e86", "score": "0.43478554", "text": "function wifiModeSelect( mode ){\n switch ( mode ){\n case \"ap\":\n case \"wisp_m\":\n $( \"#div_known\" ).hide();\n $( \"#div_scanList\" ).hide();\n $( \"#div_manConf\" ).show();\n break;\n case \"client\":\n case \"wisp_s\":\n $( \"#div_known\" ).show();\n $( \"#div_scanList\" ).show();\n $( \"#div_manConf\" ).hide();\n break;\n }\n }", "title": "" }, { "docid": "6ce65a2d006bc91ab2d7811d8760801f", "score": "0.43356526", "text": "constructor(mode, holdType, itemIdentifier, titleIdentifier = '', pickupLocation ='',feeAcknowledged, expirationDate = ' ') {\n super('15');\n\n this.mode = mode; // either '+'/'-'/'*' Add, delete, change\n this.holdType = holdType;\n this.itemIdentifier = itemIdentifier;\n this.titleIdentifier = titleIdentifier;\n this.pickupLocation = pickupLocation;\n this.transactionDate = RequestMessage.getDateTime();\n this.expirationDate = expirationDate;\n this.feeAcknowledged = feeAcknowledged || null;\n }", "title": "" }, { "docid": "768fd610ec2aa63d57e40985ab2370bb", "score": "0.43237114", "text": "function padetail_getData( tab ){\n\tswitch (tab){\n\tcase \"newapp\":\n\t\tpadetailObj.service = providerObj.service;\n\t\tbreak;\n\tcase \"editapp\":\n\t\tpadetailObj.service = pappObj.service;\n\t\tbreak;\n\tcase \"apps\":\n\t\tpadetailObj.service = providerObj.services[ padetailObj.serviceId ];\n\t\tbreak;\n\tdefault:\n\t\tconsole.error(\"Unkow from name !\");\n\t\tbreak;\n\t}\n\tpu_backupData();\n}", "title": "" }, { "docid": "eacbd83542590a6cb0e85b6c9c8752ed", "score": "0.4321537", "text": "function drageanddropzone () {\n\n\tExt.talian.REMOTING_API.enableBuffer = 0;\n \tvar remotingProvider = Ext.Direct.addProvider( Ext.talian.REMOTING_API);\n \tvar isReservationLoaded = false ;\n \tvar isSummaryLoaded = false ;\n\n\n \tvar dsReservation = new Ext.data.DirectStore( {\n\t paramsAsHash:false,\n\t root:'data',\n\t directFn: DataBean.getMbo,\n\t idProperty:'RESERVATIONID',\n\t totalProperty:'totalProperty',\n\t fields: [\n\t {name: 'RESERVATIONID' },\n\t {name: 'TRIPDATE' },\n\t {name: 'FLIGHTSESSION' },\n\t {name: 'RESTYPE' },\n\t {name: 'DISPLAYNAME' },\n\t {name: 'ORG'},\n\t {name: 'DEST'},\n\t {name: 'POV'},\n\t {name: 'PRIORITY'},\n\t {name: 'LUGGAGEWEIGHT'},\n\t {name: 'PAXWEIGHT'}\n\t ],\n\t listeners: {\n\t load: function(s, records){\n\t textStatus (\"Loaded \" + records.length + \" records\", true, false) ;\n\t }\n\t },\n\t baseParams : {\n\t start : 0,\n\t limit : 22,\n\t sort : \"RESERVATIONID\",\n\t mboname : \"RESERVATION\",\n\t where : \"FLIGHTSESSION='0915'\",\n\t dir : \"ASC\"\n\t },\n\t paramOrder: 'mboname|where|start|limit|sort|dir'\n });\n\n\n var PatientRecord = Ext.data.Record.create([{\n name: 'name'\n }, {\n name: 'paxoff'\n }, {\n name: 'paxon'\n }, {\n name: 'loadoff'\n }, {\n name: 'loadon'\n }, {\n name: 'weight'\n }, {\n name: 'from'\n }, {\n name: 'to'\n }, {\n \tname: 'clname'\n }]);\n\n var acregs = [{\n code: 'AAAAA',\n name: 'PK-TPE',\n address: 'no addr',\n telephone: '020 7188 7188',\n fuel: 0,\n payload: 0,\n svctime: '00:00',\n pathcolor: 'red',\n\t\tstartpos: 'SPG',\n\t\tendpos: 'CPU',\n assignment: [],\n revassignment: [],\n loadtext: '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'\n }, {\n code: 'BBBBB',\n name: 'PK-TPF',\n address: 'no addr',\n telephone: '0115 924 9924',\n fuel: 0,\n payload: 0,\n svctime: '00:00',\n pathcolor: 'green',\n\t\tstartpos: 'SPG',\n\t\tendpos: 'CPU',\n assignment: [],\n revassignment: [],\n loadtext: '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'\n }, {\n code: 'CCCCC',\n name: 'PK-TPG',\n address: 'noaddr',\n telephone: '020 7377 7000',\n fuel: 0,\n payload: 0,\n svctime: '00:00',\n pathcolor: 'blue',\n\t\tstartpos: 'SPG',\n\t\tendpos: 'CPU',\n assignment: [],\n revassignment: [],\n loadtext: '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'\n }, {\n code: 'DDDDD',\n name: 'PK-TPD',\n address: 'noaddr',\n telephone: '020 7377 7000',\n fuel: 0,\n payload: 0,\n svctime: '00:00',\n pathcolor: 'yellow',\n\t\tstartpos: 'SPG',\n\t\tendpos: 'CPU',\n assignment: [],\n revassignment: [],\n loadtext: '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'+\n \t\t '<tr><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td><td class=\"fuel-table\">&nbsp</td></tr>'\n }];\n\n var HospitalRecord = Ext.data.Record.create([{\n name: 'name'\n }, {\n name: 'fuel'\n }, {\n name: 'payload'\n }, {\n name: 'svctime'\n }, {\n name: 'pathcolor'\n }, {\n name: 'assignment'\n }, {\n name: 'revassignment'\n }, {\n name: 'startpos'\n }, {\n name: 'endpos'\n }, {\n name: 'loadtext'\n }\n ]);\n\n var acregStore = new Ext.data.Store({\n data: acregs,\n reader: new Ext.data.JsonReader({\n id: 'code'\n }, HospitalRecord)\n });\n\n var pager = new Ext.PagingToolbar({\n store: dsReservation,\n displayInfo: true,\n pageSize: 20\n });\n\n dsReservation.load() ;\n\n var patientView = new Ext.grid.GridPanel( {\n\t store: dsReservation,\n\t height: 533,\n\t stripeRows: true,\n\t columns: [\n\t {\n\t header: 'Name',\n\t dataIndex: 'DISPLAYNAME',\n\t width: 60\n\t },\n\t {\n\t header: 'Org',\n\t dataIndex: 'ORG',\n\t sortable: true,\n\t width: 25\n\t },\n\t {\n\t header: 'Dest',\n\t dataIndex: 'DEST',\n\t sortable: true,\n\t width: 25\n\t },\n\t {\n\t header: 'POV',\n\t dataIndex: 'POV',\n\t sortable: true,\n\t width: 25\n\t }\n\t ],\n\t bbar:pager,\n\t viewConfig: {\n \tforceFit:true,\n \ttpl: new Ext.XTemplate( '<div class=\"patient-source\"><table><tbody>' +\n \t\t '<tr><td class=\"{clname}\">{name}</td><td class=\"patient-name\">{from}</td><td class=\"patient-name\">{to}</td><td class=\"patient-name\">{no}</td></tr>' +\n \t\t '</tbody></table></div>' ),\n \tcls: 'patient-view',\n \titemSelector: 'div.patient-source',\n \toverClass: 'patient-over',\n \tselectedClass: 'patient-selected',\n \tmultiSelect: true\n },\n listeners: {\n render: initializePatientDragZone\n }\n\t }) ;\n\n var hospitalGrid = new Ext.grid.GridPanel({\n title: 'Fleet Assignment',\n region: 'east',\n height: 560,\n margins: '0 2 2 0',\n bbar: [{\n text: 'Scenario',\n handler: function() {\n \t\tExt.winScenario.show(this);\n\t\t\t\tvar dom = Ext.get('scenarios');\n\t\t\t\tdom.applyStyles(\"position:absolute;top:100px;\");\n\n\t\t\t\tvar domShadow = Ext.query('.x-ie-shadow');\n\t\t\t\tExt.get(domShadow).applyStyles(\"top:100px;\");\n }\n }, {\n \ttext: 'Clear',\n \thandler: function() {\n\n \t\tfor (var i=0; i<acregStore.data.items.length; i++) {\n \t\t\tvar rec = acregStore.data.items[i] ;\n\n \t\t\tEditorBean.clearAssignment(rec.data.name);\n \t\t\tif (rec.data.assignment) {\n \t\t\t\tfor (var j=0; j<rec.data.assignment.length; j++) {\n \t\t\t\t\tvar recData = rec.data.assignment[j] ;\n\n\t\t\t\t\t\t\tif (j==0 && typeof (recData.returnpath) != 'undefined') {\n\t\t\t\t\t\t\t\trecData.returnpath.remove() ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (typeof (recData.overlay) != 'undefined')\n\t\t\t\t\t\t\t\trecData.overlay.remove() ;\n\n \t\t\t\t\trecData.set (\"clname\",\"patient-label\") ;\n \t\t\t\t\trecData.commit () ;\n \t\t\t\t}\n \t\t\t}\n\n \t\t\trec.data.revassignment = null ;\n \t\t\trec.data.assignment = null ;\n\n \t\t\trec.set(\"fuel\", 0) ;\n \t\t\trec.set(\"payload\", 0) ;\n \t\t\trec.set(\"svctime\",\"00:00\") ;\n \t\t\trec.set(\"assignment\", []) ;\n \t\t\trec.set(\"revassignment\", []) ;\n \t\t\trec.set(\"loadtext\", dTable()) ;\n\n \t\t\trec.commit () ;\n \t\t}\n \t}\n }, {\n \ttext: 'Configuration',\n \thandler: function() {\n \t}\n }],\n columns: [ {\n\t\t\tdataIndex: ' ',\n header: ' ',\n\t\t\tsortable: false,\n width: 30,\n\t\t\trenderer: renderCraftButton\n\t\t},{\n dataIndex: 'name',\n header: 'Reg No',\n width: 100\n }, {\n dataIndex: 'startpos',\n header: 'Start Position',\n width: 100\n }, {\n dataIndex: 'endpos',\n header: 'End Position',\n width: 100\n }, {\n dataIndex: 'fuel',\n header: 'Fuel',\n width: 100\n }, {\n dataIndex: 'payload',\n header: 'Pay Load',\n width: 100\n }, {\n dataIndex: 'svctime',\n header: 'Svc Time',\n width: 100\n }],\n viewConfig: {\n tpl: new Ext.XTemplate('<div class=\"hospital-target\" >'+\n\t\t\t\t\t\t\t\t\t\t'<div style=\"border:2px solid {pathcolor};width:384px;height:48px;margin:1px;padding:0px\">' +\n\t\t\t\t\t\t\t\t\t\t\t'<table><tbody><tr>' +\n\t\t\t\t\t\t\t\t\t\t\t'<td width=\"313px\">' +\n\t\t\t\t\t\t\t\t\t\t\t\t'<div style=\"border:1px solid {pathcolor};width:308px;height:46px;margin:0px;padding:1px\">' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<table class=\"heli-seating\"><tbody>' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'{loadtext}'+\n\t\t\t\t\t\t\t\t\t\t\t\t\t'</tbody></table>' +\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'</td>'\t+\n\t\t\t\t\t\t\t\t\t\t\t'<td>' +\n\t\t\t\t\t\t\t\t\t\t\t\t'<table><tbody><tr><td>' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<div style=\"border:1px solid ;width:11px;height:11px;margin:0px;padding:0px\">' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'1</div>' +\n\t\t\t\t\t\t\t\t\t\t\t\t'</td></tr><tr><td>' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<div style=\"border:1px solid ;width:11px;height:11px;margin:0px;padding:0px\">' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'1</div>' +\n\t\t\t\t\t\t\t\t\t\t\t\t'</td></tr><tr><td>' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<div style=\"border:1px solid ;width:11px;height:11px;margin:0px;padding:0px\">' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t'1</div>' +\n\t\t\t\t\t\t\t\t\t\t\t\t'</td></tr>' +\n\t\t\t\t\t\t\t\t\t\t\t\t'</tbody></table>' +\n\t\t\t\t\t\t\t\t\t\t\t'</td>' +\n\t\t\t\t\t\t\t\t\t\t\t'</tr></tbody></table>' +\n\t\t\t\t\t\t\t\t\t\t'</div>' +\n \t\t '</div>'),\n enableRowBody: true,\n getRowClass: function(rec, idx, p, store) {\n p.body = this.tpl.apply(rec.data);\n }\n },\n store: acregStore,\n listeners: {\n render: initializeHospitalDropZone\n }\n });\n\n\n new Ext.Viewport({\n layout: 'border',\n applyTo: 'data1_canvas',\n items: [ {\n title: 'Reservation',\n region: 'west',\n width: 280,\n height: 560,\n margins: '0 0 0 0',\n items: patientView\n }]\n });\n\n new Ext.Viewport({\n layout: 'border',\n applyTo: 'data2_canvas',\n items: [ {\n \tregion: 'center',\n \twidth: 410,\n \theight: 560,\n \tmargins: '0 0 0 0',\n items: hospitalGrid\n }]\n });\n}", "title": "" }, { "docid": "36733c89be5764808a44f9f458e3a65f", "score": "0.43157429", "text": "function setOptions() {\n if (tabControl.isTabShowing(tabControl.TABS.DIRECTIONS)) {\n planTrip();\n }\n }", "title": "" }, { "docid": "f0b382c62334905ab11f609310a0953b", "score": "0.43157324", "text": "setMode(mode) {\n if (mode === MODE.addEdge) {\n this.state.eh.enable();\n this.state.eh.enableDrawMode();\n } else {\n this.state.eh.disableDrawMode();\n this.state.eh.disable();\n }\n this.setState({mode: mode});\n }", "title": "" }, { "docid": "64a4742d2aace7a0539572a9885ab465", "score": "0.43143627", "text": "function On_Command(Player, cmd, args)\n{\n\tif(cmd == \"owner\") {\n\t\tif (args.Length == 0) {\n\t\t\tPlayer.Message(\"OwnerMode\");\n\t\t\tPlayer.Message(\"To activate use the command \\\"/owner start\\\"\");\n\t\t\tPlayer.Message(\"To deactivate use the command \\\"/owner stop\\\"\");\n\t\t}\n\t\tif (args.Length == 1) {\n\t\t\tif (Player.Admin) {\n\t\t\t\tvar id = Player.SteamID;\n\t\t\t\tif(args[0] == \"start\") {\n\t\t\t\t\tDataStore.Add(\"OwnerMode\", id, \"true\");\n\t\t\t\t\tPlayer.Message(\"---Owner---\");\n\t\t\t\t\tPlayer.Message(\"You are in Owner mode\");\n\t\t\t\t\tPlayer.Message(\"If you finished, don't forget to quit from It!\");\n\t\t\t\t}\t\t\n\t\t\t\telse if(args[0] == \"stop\") {\n\t\t\t\t\tDataStore.Add(\"OwnerMode\", id, \"false\");\n\t\t\t\t\tPlayer.Message(\"---Owner---\");\n\t\t\t\t\tPlayer.Message(\"You quit Owner mode!\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}\n\telse if(cmd == \"offban\") {\n\t\tif (args.Length == 0) {\n\t\t\tPlayer.Message(\"Specify an ID\");\n\t\t}\n\t\tif (args.Length == 1) {\n\t\t\tif (Player.Admin) {\n\t\t\t\tvar id = args[0];\n\t\t\t\tvar iban = ManualBan();\n\t\t\t\tiban.AddSetting(\"Banned\", id, 1);\n\t\t\t\tiban.Save();\n\t\t\t\tPlayer.Message(\"Id of Player (\" + id + \") was banned.\");\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c9f54ad6e0c09637cec464d1c4772777", "score": "0.43143", "text": "function manager() {\n inquirer.prompt([\n {\n name: \"manage\",\n type: \"list\",\n message: \"\\nWhat would you like to do?\",\n choices: [\"View Products for Sale\", \"View Low Inventory\", \"Add to Inventory\", \"Add New Product\", \"Quit Application\"]\n\n }\n ]).then(function (input) {\n switch (input.manage) {\n case \"View Products for Sale\":\n displayInventory();\n break;\n\n case \"View Low Inventory\":\n lowInventory();\n break;\n\n case \"Add to Inventory\":\n addInventory();\n break;\n\n case \"Add New Product\":\n console.log(\"Add New Product function\");\n addProduct()\n break;\n\n case \"Quit Application\":\n connection.end();\n }\n })\n}", "title": "" }, { "docid": "aaebea7c4c3af8dcf6f32e885c5c264d", "score": "0.43064702", "text": "function setMode(m) {\n console.log(\"setMode\")\n localStorage.setItem(\"AvsA-mode\", m);\n window.location.href = 'AvsA.html'\n}", "title": "" }, { "docid": "11c9ced49375e433f1fee05e71cff1f2", "score": "0.43026", "text": "function loadEditingToolforMM(map){\n\t//var guideLayers = [];\n\t//drawnItems = new L.geoJson();\n\tdrawnItems= new L.FeatureGroup();\n\tvar arrowHead;\n\t\n\t//drawnItems.addTo(map);\n\tmap.addLayer(drawnItems);\n\n\tvar options = {\n\t\tposition: 'topleft',\n\t\tdrawMarker: false,\n\t\tdrawPolyline: true,\n\t\tdrawRectangle: false,\n\t\tdrawPolygon: true,\n\t\tdrawCircle: false,\n\t\tcutPolygon: false,\n\t\teditMode: true,\n\t\tremovalMode: true,\n\t};\n\tmap.pm.addControls(options);\n\n\t/**\n\t * now how drawing works\n\t * using again leaflet plugin \"leaflet.pm\"\n\t */\n\t\n\tmap.on('pm:create', function(event){\n\t\tvar layer = event.layer;\n\t\tvar type = event.shape;\n\t\tfeature=layer.feature=layer.feature||{};\n\t\tfeature.type=feature.type||\"Feature\";\n\t\tvar props =feature.properties=feature.properties||{};\n\t\tprops.FID = null;\n\t\tprops.id = null;\n\t\tprops.isRoute = null;\n\t\tprops.name =null;\n\t\tprops.feat_type=null;\n\t\tprops.sm_sk_type=\"rectangle | olopololi | some stuff\";\n\t\tprops.descriptn=\"something\";\n\n\t\tdrawnItems.addLayer(layer);\n\t\tif (type ===\"Line\"){\n\t\t\taddStreetPopupMM(layer);\n\t\t\tlayer.openPopup();\n\t\t\t// add Arrows to each line\n\t\t\tarrowHead = L.polylineDecorator(layer, {\n\t\t\t\tpatterns: [\n\t\t\t\t\t{offset: 25, repeat: 50, endoffset: 0, symbol: L.Symbol.arrowHead({pixelSize: 15, pathOptions: {fillOpacity: 1, weight: 0}})}\n\t\t\t\t]\n\t\t\t}).addTo(map);\n\t\t}\n\t\tif (type===\"Poly\"){\n\t\t\taddLandmarkPopupMM(layer);\n\t\t\tlayer.openPopup();\n\t\t}\n\t});\n\t\n\tmap.on('pm:remove', function(event){\n\t\tlayerid = event.layer._leaflet_id;\n\t\t//console.log(event.layer);\n\t\t//console.log(drawnItems);\n\t\t//console.log(layerid);\n\t\tdeleteFunction();\n\t})\n\tfunction deleteFunction(){\n\t\tdrawnItems.eachLayer(function(l){\n\t\t\t//console.log(l._leaflet_id);\n\t\t\tjsonId = l._leaflet_id;\n\t\t\t\n\t\t\tif(layerid == jsonId){\n\t\t\t\tdrawnItems.removeLayer(l);\n\t\t\t\tconsole.log(l.feature.properties.id);\n\t\t\t\tfor(i = 0; i<MMStreetIDs.length; i++){\n\t\t\t\t\tif (MMStreetIDs[i] != l.feature.properties.id){\n\t\t\t\t\t\tMMStreetIDsNew.push(l.feature.properties.id)\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tMMStreetIDs=[];\n\t\t\t\tMMStreetID = MMStreetIDsNew;\n\n\n\t\t\t\tfor(i = 0; i<MMLandmarksIDs.length; i++){\n\t\t\t\t\tif (MMLandmarksIDs[i] == l.feature.properties.id){\n\t\t\t\t\t\tMMLandmarKsIDs.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//console.log(drawnitems);\n\t\t\t}\n\t\t})\n\t}\n}", "title": "" }, { "docid": "33a3991e83ff41703eba5cb582ee26ba", "score": "0.43001726", "text": "function mgrOptions() {\n inquirer\n .prompt([\n {\n name: \"mgr\",\n type: \"list\",\n choices: ['View Products for Sale','View Low Inventory', 'Add to Inventory', 'Add New Product'],\n message: \"Welcome Store Manager. What would you like to to do today?\"\n }, \n ])\n .then(function(answer) {\n switch (answer.mgr) {\n case \"View Products for Sale\":\n viewProducts();\n break;\n \n case \"View Low Inventory\":\n lowInv();\n break;\n \n case \"Add to Inventory\":\n addInv();\n break;\n \n case \"Add New Product\":\n addProd();\n break;\n }\n });\n }", "title": "" }, { "docid": "e36b262bf7234d17def4496261cab468", "score": "0.42930514", "text": "function managePerms(params){\n\t\t$res.redirectWithToken($server.rootUrl+\"myna/permissions/index.ejs\")\n\t}", "title": "" }, { "docid": "2a94f0fa412ccf81aea97d3eec1899e3", "score": "0.4290248", "text": "deop () {\n this.channel.setModes('-o', [this.user.nickName])\n }", "title": "" }, { "docid": "ddd9eb9b6668625de011d262c8fd9cde", "score": "0.42854676", "text": "function DoMegaPizdato()\n{\n\t// get settings\n\tGetSettings();\n\t\n\t// fill the extended textarea with the result\n\tif( resultFormat == 'html' ) {\n\t\t$(\"#txtDestTextExt\").val( CreateHTML( true ) );\n\t} else {\n\t\t$(\"#txtDestTextExt\").val( CreateBBCode( true ) );\n\t}\n\t$(\"#txtDestTextExt\").focus();\n}", "title": "" }, { "docid": "317a54ab9185600b9e0d7f617a048ea2", "score": "0.42739296", "text": "function handleRelayExtend(message) {\n\t\tvar circuitNum = readOps.getCircuit(message);\n\t\tvar destination = incomingRoutingTable[circuitNum];\n\t\tif(destination === 'primed') {\n\t\t\tif(!getConnection) {\n\t\t\t\tgetConnection = require('./ConnectionManager').getConnection;\n\t\t\t}\n\t\t\t// construct a create from the body, send to correct port based on agent\n\t\t\tgetConnection(readOps.getExtendAgent(message), readOps.getExtendHost(message), function(status, establisher) {\n\t\t\t\tif(status === 'success') {\n\t\t\t\t\t// use establisher to send a create packet with a handler that\n\t\t\t\t\t// listens for a create success and relays it as a relay extended\n\t\t\t\t\t// and also adds us to incomingRoutingTable\n\t\t\t\t\testablisher.registerHandler(circuitNum, torSocket.getID(), function(status, response) {\n\t\t\t\t\t\tresponseHandler(status, response, circuitNum, establisher);\n\t\t\t\t\t});\n\n\t\t\t\t\tvar create = makeOps.constructCreate(circuitNum);\n\t\t\t\t\testablisher.sendMessage(torSocket.getID(), create);\n\t\t\t\t} else {\n\t\t\t\t\tvar extendFailed = makeOps.constructRelayExtendFailed(circuitNum);\n\t\t\t\t\ttorSocket.write(extendFailed);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tvar extendFailed = makeOps.constructRelayExtendFailed(circuitNum);\n\t\t\ttorSocket.write(extendFailed);\n\t\t}\n\t}", "title": "" }, { "docid": "d307a77246747b5d8069fa899ba5e886", "score": "0.42658606", "text": "function setUpTransfer(isModify, transferSettings) {\n\tif (urlParam!=null && typeof(urlParam.RES_PROP_ID)==\"undefined\") urlParam.RES_PROP_ID = $(\"#RES_PROP_ID\").val();\n\n\tvar isModify = isModify || false,\n\t\ttransferSettings = transferSettings || false,\n RES_LANGUAGE = data.RES_LANGUAGE,\n\t\tOVERVIEW_TXT = isModify ? \"\" : transferSettings[urlParam.RES_PROP_ID]['OVERVIEW_'+RES_LANGUAGE],\n\t\tIS_TRANSFER_ACTIVE = isModify ? data.IS_TRANSFER_ACTIVE : (transferSettings[urlParam.RES_PROP_ID].IS_ACTIVE==1 ? true : false ),\n\t\tHAS_ARRIVAL_DATA = isModify && typeof(data)!=\"undefined\" && (data.RESERVATION.AIRLINE!=\"\" || data.RESERVATION.FLIGHT!=\"\"),\n\t\tHAS_TRANSFER_FIELDS = isModify && typeof(data)!=\"undefined\" && typeof(data.RESERVATION.TRANSFER_CAR)!=\"undefined\" && typeof(data.RESERVATION.TRANSFER_FEE)!=\"undefined\",\n\t\tHAS_TRANSFER_DATA = HAS_TRANSFER_FIELDS && (data.RESERVATION.TRANSFER_CAR!=\"\" || data.RESERVATION.TRANSFER_FEE!=\"\"),\n\t\tPICKUP_DAYS = 2,\n\t\t//TRANSFER_DAYS = 4 + (isModify?1:0),\n TRANSFER_DAYS = isModify ? 31 : 5;\n\t\tDAYS_LEFT = isModify ? data.DAYS_LEFT : dateDiff(data.RES_CHECK_IN);\n /*\n\ttry {\n\t\tconsole.log(\"isModify: \" + (isModify?\"YES\":\"NO\"));\n\t\tconsole.log(\"IS_TRANSFER_ACTIVE: \" + IS_TRANSFER_ACTIVE);\n\t\tconsole.log(\"HAS_ARRIVAL_DATA: \" + (HAS_ARRIVAL_DATA?\"YES\":\"NO\"));\n\t\tconsole.log(\"HAS_TRANSFER_DATA: \" + (HAS_TRANSFER_DATA?\"YES\":\"NO\"));\n\t\tconsole.log(\"HAS_TRANSFER_FIELDS: \" + (HAS_TRANSFER_FIELDS?\"YES\":\"NO\"));\n console.log(\"RES_CHECK_IN: \" + data.RES_CHECK_IN);\n\t\tconsole.log(\"DAYS_LEFT: \" + DAYS_LEFT);\n console.log(\"PICKUP_DAYS: \" + PICKUP_DAYS);\n\t\tconsole.log(\"typeof(data): \" + typeof(data));\n\t\tconsole.log(\"typeof(data.RESERVATION.TRANSFER_CAR): \" + typeof(data.RESERVATION.TRANSFER_CAR));\n\t\tconsole.log(\"typeof(data.RESERVATION.TRANSFER_FEE): \" + typeof(data.RESERVATION.TRANSFER_FEE));\n\t\tconsole.log(\"typeof(data.RESERVATION.ARRIVAL): \" + typeof(data.RESERVATION.ARRIVAL));\n\t} catch (err){}\n */\n\tHAD_TRANSFER = isModify && HAS_TRANSFER_DATA;\n\n\tif (isModify) {\n\t\tclearAllTransferFrm();\n\t\t\n\t\ttry {\n\t\t\t$(\"input[name=RES_GUEST_ARRIVAL_TIME]\").val(data.RESERVATION.ARRIVAL_TIME);\n\t\t\t$(\"input[name=RES_GUEST_ARRIVAL_AMPM]:eq(\"+(data.RESERVATION.ARRIVAL_AMPM==\"PM\"?\"1\":\"0\")+\")\").attr(\"checked\",\"true\");\n\n\t\t\t$(\"input[name=RES_GUEST_AIRLINE]\").val(data.RESERVATION.AIRLINE);\n\t\t\t$(\"input[name=RES_GUEST_FLIGHT]\").val(data.RESERVATION.FLIGHT);\n\t\t\t$(\"input[name=RES_GUEST_ARRIVAL]\").val(data.RESERVATION.ARRIVAL);\n\t\t\tif (data.RESERVATION.ARRIVAL_AP==\"PM\") $(\"#RES_A_PM\").attr(\"checked\",\"true\");\n\n\t\t\t$(\"input[name=RES_GUEST_DEPARTURE_AIRLINE]\").val(data.RESERVATION.DEPARTURE_AIRLINE);\n\t\t\t$(\"input[name=RES_GUEST_DEPARTURE_FLIGHT]\").val(data.RESERVATION.DEPARTURE_FLIGHT);\n\t\t\t$(\"input[name=RES_GUEST_DEPARTURE]\").val(data.RESERVATION.DEPARTURE);\n\t\t\tif (data.RESERVATION.DEPARTURE_AP==\"PM\") $(\"#RES_D_PM\").attr(\"checked\",\"true\");\n\n\t\t\t$(\"#HAD_TRANSFER_DATA\").val(HAS_TRANSFER_DATA?\"1\":\"0\");\n\t\t} catch (err){}\n\t} else {\n\t\t// New Reservation\n\t}\n\n\tif (DAYS_LEFT >= PICKUP_DAYS) {\n\t\tif (DAYS_LEFT >= TRANSFER_DAYS && IS_TRANSFER_ACTIVE) {\n\t\t\t//console.log(\" A \")\n\t\t\t$('#transfer_box').show();\n\t\t\t$('.add_pickup').hide();\n\t\t\t$('.add_transfer').show();\n\t\t\tif (isModify) {\n\t\t\t\tif (HAS_TRANSFER_DATA) {\n\t\t\t\t\t//console.log(\"#addtransfer ON \")\n\t\t\t\t\t$(\"#addtransfer\").attr(\"checked\",\"checked\");\n\t\t\t\t\t$('.transfer_field').css('display','block');\n\t\t\t\t\t$(\".add_transfer.btn\").html(RES_LANGUAGE==\"EN\"?\"CANCEL PRIVATE TRANSFER\":\"CANCELAR TRANSPORTE\");\n\t\t\t\t\t$('#'+( typeof(data.RESERVATION.TRANSFER_TYPE)!=\"undefined\"&&data.RESERVATION.TRANSFER_TYPE!=\"\"?data.RESERVATION.TRANSFER_TYPE:\"ONWAY\" )).click();\n\t\t\t\t} else {\n\t\t\t\t\t//console.log(\"#addtransfer OFF \")\n\t\t\t\t\t$(\"#addtransfer\").removeAttr(\"checked\");\n\t\t\t\t\t$(\".add_transfer.btn\").html(RES_LANGUAGE==\"EN\"?\"ADD PRIVATE TRANSFER\":\"ADICIONAR TRANSPORTE\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tgetTransferOverviewCars(OVERVIEW_TXT);\n\t\t\t}\n\t\t} else {\n\t\t\t//console.log(\" B \")\n\t\t\t$('#transfer_box').hide();\n\t\t\t$('.add_pickup').show();\n\t\t\t$('.add_transfer').hide();\n\t\t\tif (isModify) {\n\t\t\t\tif (HAS_ARRIVAL_DATA) {\n\t\t\t\t\t//console.log(\"#airportPickup ON \")\n\t\t\t\t\t$(\"#airportPickup\").attr(\"checked\",\"checked\");\n\t\t\t\t\t$(\"#airportpickup_open\").show();\n\t\t\t\t} else {\n\t\t\t\t\t//console.log(\"#airportPickup OFF \")\n\t\t\t\t\t$(\"#airportPickup\").removeAttr(\"checked\");\n\t\t\t\t}\n\t\t\t\tif (HAS_TRANSFER_DATA) {\n\t\t\t\t\t$(\".add_pickup\").hide();\n\t\t\t\t\tif (data.RESERVATION.TRANSFER_TYPE==\"ROUNDT\") $(\"#DEPARTURE_INFO_TBL\").show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $('#addtransfer').change(function(){\n\t\t\taddTransferClicked($(this).attr('checked'), isModify);\n\t\t\tvar btn = $(\".add_transfer.btn\");\n\t\t\tif ($(this)[0].checked) {\n\t\t\t\tbtn.html(\"CANCEL PRIVATE TRANSFER\");\n\t\t\t} else {\n\t\t\t\tbtn.html(\"ADD PRIVATE TRANSFER\");\n\t\t\t}\n\t\t});\n\t\t$(\".add_transfer.btn\").unbind(\"click\").click(function(){\n\t\t\t$('#addtransfer').click();\n\t\t})\n\t} else {\n\t\t//console.log(\" C \")\n\t\tclearAllTransferFrm();\n\t}\n}", "title": "" }, { "docid": "119e6c0317c1e5550b4627c31ba78afb", "score": "0.42609105", "text": "setDetailsTab(tab) {\n this.createIndex = false;\n if (tab === 1) {\n this.showVote = true;\n this.multisigVote = false;\n } else if (tab === 2) {\n this.multisigAccount = this._DataStore.account.metaData.meta.cosignatoryOf[0];\n this.showVote = true;\n this.multisigVote = true;\n } else if (tab === 3) {\n this.showVote = false;\n this.multisigVote = false;\n }\n this.checkHasVoted();\n }", "title": "" }, { "docid": "97422938e73407e85299dcfb0a11d541", "score": "0.42501342", "text": "function actionPTP(valArr){\n\t\tvar mlist=[];\n\t\tvar twist = new ROSLIB.Message\n\t\t({\n\t\t\tlinear : {\n\t\t\t\tx : valArr[0],\n\t\t\t\ty : valArr[1],\n\t\t\t\tz : valArr[2]\n\t\t\t},\n\t\t\tangular : {\n\t\t\t\tx : valArr[3],\n\t\t\t\ty : valArr[4],\n\t\t\t\tz : valArr[5]\n\t\t\t}\n\t\t});\n\n\t\tvar send = new ROSLIB.Message\n\t\t({\n\t\t\tcmd : 'PTP',\n\t\t\tpose : twist\n\t\t});\n\n\t\tmlist.push(send);\n\t\tvar goal = new ROSLIB.Goal\n\t\t({\n\t\t\tactionClient : teachModeClient,\n\t\t\tgoalMessage : {\n\t\t\t\tcmd_list : mlist\n\t\t\t}\n\t\t});\n\n\t\t$(\"#infoContent\").html('Goal was send cmdlist'\n\t\t\t\t\t+'<BR>Cmd : ' + send.cmd\n\t\t\t\t\t+\"<BR>Pose : \"\n\t\t\t\t\t+\"<BR>linear:<BR>\"+ send.pose.linear.x +\"<BR>\"+ send.pose.linear.y +\"<BR>\"+ send.pose.linear.z\n\t\t\t\t\t+\"<BR>angular<BR>\"+ send.pose.angular.x +\"<BR>\"+ send.pose.angular.y +\"<BR>\"+ send.pose.angular.z\n\t\t);\n\t\tgoal.send();\n\t\tmlist = [];\n\t}", "title": "" }, { "docid": "d8ecfd4211cf77a47c902a859608f027", "score": "0.4244776", "text": "function defineMode(name, mode) {\n\t if (arguments.length > 2)\n\t { mode.dependencies = Array.prototype.slice.call(arguments, 2) }\n\t modes[name] = mode\n\t}", "title": "" }, { "docid": "a79b34c1ee40d0bf3547b20e104744cb", "score": "0.42437565", "text": "function defineMode(name, mode) {\n arguments.length > 2 && (mode.dependencies = Array.prototype.slice.call(arguments, 2)), \n modes[name] = mode;\n }", "title": "" }, { "docid": "a79b34c1ee40d0bf3547b20e104744cb", "score": "0.42437565", "text": "function defineMode(name, mode) {\n arguments.length > 2 && (mode.dependencies = Array.prototype.slice.call(arguments, 2)), \n modes[name] = mode;\n }", "title": "" }, { "docid": "fb9132e3cb8ed13d2dda560609cafe51", "score": "0.42298073", "text": "function transfer(func_transfer_success, func_transfer_error, contract, method, to, quantity, memo)\n{\n \nvar myaction = \n [{ \n account: contract,\n name: method, // transfer/xtransfer\n authorization: [{\n actor: global_account,\n permission: global_account_permission\n }]\n ,\n data: {\n from: global_account,\n to: to,\n quantity: quantity,\n memo: memo\n }\n }];\n \n\nif (currentwallet == \"ANCHOR\")\n { \n session.transact( { actions: myaction } ).then((result) => \n \t\t{\n \n func_transfer_success(result.processed.id);\n \n }) \n }\n\n\n\nif (currentwallet == \"SCATTER\")\n { \n scattereos.transaction( { actions: myaction } ).then(result => \n \t\t\t{\n \n console.log(\"Success!!!\");\n func_transfer_success(\"Success\");\n return;\n }).catch(error => {\n console.log(\"jsonerr: \" + error);\n err = JSON.parse(error);\n \n func_transfer_error( err.error.details[0].message );\n return;\n });\n }\n \n} // transfer", "title": "" }, { "docid": "eaa5880fc4a56632259e371f30f06672", "score": "0.42132115", "text": "function sendWorkerMessage(tab, type, message){\n console.log(\"sendWorkerMessage: \", workers, type, message);\n\n if(type == \"activate\"){\n //sent activate to the active tab, and deactivate to the others\n for(var i = workers.length -1; i >= 0 ; i--){\n if(workers[i].tab == tab){\n workers[i].port.emit(\"activate\", message);\n }else{\n workers[i].port.emit(\"deactivate\", message);\n }\n }\n }else{\n //just send the message\n for(var i = 0; i < workers.length; i++){\n console.log(\"worker: \", workers[i]);\n workers[i].port.emit(type, message);\n }\n }\n}", "title": "" }, { "docid": "bf15b7f42b69025f737fb20be7d6c0df", "score": "0.42069423", "text": "get mode() { return this._mode; }", "title": "" }, { "docid": "bf15b7f42b69025f737fb20be7d6c0df", "score": "0.42069423", "text": "get mode() { return this._mode; }", "title": "" }, { "docid": "bf15b7f42b69025f737fb20be7d6c0df", "score": "0.42069423", "text": "get mode() { return this._mode; }", "title": "" }, { "docid": "876c9f123955117fef90fb92998f8686", "score": "0.42023236", "text": "get manager() {\n return this._t;\n }", "title": "" }, { "docid": "757d274d28cdddc8b12e75d8ce967b1b", "score": "0.41970745", "text": "function change_mode(is_labeling) {\n parameters['Mode'] = ( is_labeling ) ? \"LABELING\" : \"VIEWING\";\n}", "title": "" }, { "docid": "b68c3d90f9bc988970c6b8c217eac80e", "score": "0.41916502", "text": "function transfer() {\n byId(\"transfer-button\").classList.add(\"hidden\")\n byId(\"transfer-progress\").classList.remove(\"hidden\")\n var guy = getValue(\"transfer-address-input\")\n var wad = getValue(\"transfer-amount-input\").replace(/,/g, \"\") * WAD\n eos_token.transfer(guy, wad, hopefully(result => ping(result).then(() => {\n hidePanes()\n byId(\"transfer-button\").classList.remove(\"hidden\")\n byId(\"transfer-progress\").classList.add(\"hidden\")\n })))\n}", "title": "" }, { "docid": "4fa1a0f5ba5a46be13eebfd86e564e77", "score": "0.41916198", "text": "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "title": "" }, { "docid": "58f7690adae9cffbece53ee864b0b774", "score": "0.41883337", "text": "function manager() {\n inquirer.prompt( {\n name: \"manager\",\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\"Available Items\", \"Low Inventory\", \"Add Quantity\", \"Add New Product\", \"Exit\"]\n }).then(function(answer) {\n switch (answer.manager) {\n case \"Available Items\":\n return listItems();\n\n case \"Low Inventory\":\n return lowInventory();\n\n case \"Add Quantity\":\n return addQuan();\n\n case \"Add New Product\":\n return addItem();\n\n case \"Exit\":\n return exit();\n }\n });\n}", "title": "" }, { "docid": "70cbfaa5680ee9410a7174e8d5a5f1fb", "score": "0.4185122", "text": "function setupTormenta20(msg) {\n if (killAllAnimations) { return; }\n let handler = new Tormenta20Handler(msg);\n if (game.user.id === msg.user.id) {\n switch (true) {\n case ((handler.animType === \"t12\") && (handler.animOverride)):\n teleportation(handler);\n break;\n }\n }\n if (game.user.id === msg.user.id) {\n return;\n }\n trafficCop(handler);\n}", "title": "" }, { "docid": "6ca65f61c4d62c145011947873feb121", "score": "0.4182801", "text": "changeMode() {\n if(this.state == MENU) {\n this.changeHeuristic();\n this.mode = this.modesSel.value;\n }\n }", "title": "" }, { "docid": "41f9f26ccc16622a38a7eb8d10f2ad74", "score": "0.4178662", "text": "function changeGeneralPolicyType(selName){\n\tvar selValue = comboSelectedValueGet (selName);\n\tif (!selValue) return;\t\t\n switch (parseInt(selValue, 10)){\n \t\tcase 1:\t/* Auto Policy */\n\t\t\tfieldStateChangeWr ('tf1_SPIIncoming tf1_SPIOutgoing tf1_manualEncryptionAlgorithm tf1_encryptionkeyLength tf1_encryptionKeyIn tf1_encryptionKeyOut tf1_integrityAlgorithm tf1_integrityKeyIn tf1_integrityKeyOut','','tf1_enableKeepalive tf1_exchangeMode tf1_direction tf1_natTraversal tf1_localIdentifierType tf1_remoteIdentifierType tf1_encryptionAlgorithm tf1_blowfish tf1_cast128 tf1_authAlgorithm tf1_authMethod tf1_authMethod tf1_presharedkey tf1_diffieHellman tf1_diffieHellman tf1_SALifeTime tf1_enableDeadPeerDetection tf1_extendedAuth tf1_SALifeTime tf1_autoSALifeTime tf1_Lifetime tf1_phase2encryptionAlgorithm tf1_encryptionDes tf1_encryptionNone tf1_encryption3Des tf1_encryptionAes128 tf1_encryptionAes192 tf1_encryptionAes256 tf1_encryptionAesCcm tf1_encryptionAesGcm tf1_encryptionTwofish128 tf1_encryptionTwofish192 tf1_encryptionTwofish256 tf1_phase2EncryptionBlowfish tf1_phase2EncryptionCast128 tf1_integrityMd5 tf1_integritySha1 tf1_integritySha224 tf1_integritySha256 tf1_integritySha384 tf1_integritySha512 tf1_pfsKeyGroup','tf1_IKEVersion_div tf1_remoteEndpoint_div'); \t\n \t\tvidualDisplay('tf1_SPIIncoming tf1_SPIOutgoing tf1_manualEncryptionAlgorithm tf1_encryptionkeyLength tf1_encryptionKeyIn tf1_encryptionKeyOut tf1_integrityAlgorithm tf1_integrityKeyIn tf1_integrityKeyOut tf1_manualPolicyParameters', 'hide'); \n \tvidualDisplay('tf1_enableKeepalive tf1_phase1IKESaParameters tf1_exchangeMode tf1_direction tf1_natTraversal tf1_localIdentifierType tf1_remoteIdentifierType tf1_encryptionAlgorithm tf1_blowfish tf1_cast128 tf1_authAlgorithm tf1_authMethod tf1_presharedkey tf1_diffieHellman tf1_SALifeTime tf1_enableDeadPeerDetection tf1_extendedAuth tf1_SALifeTime tf1_autoSALifeTime tf1_Lifetime tf1_phase2encryptionAlgorithm tf1_encryptionDes tf1_encryptionNone tf1_encryption3Des tf1_encryptionAes128 tf1_encryptionAes192 tf1_encryptionAes256 tf1_encryptionAesCcm tf1_encryptionAesGcm tf1_encryptionTwofish128 tf1_encryptionTwofish192 tf1_encryptionTwofish256 tf1_phase2EncryptionBlowfish tf1_phase2EncryptionCast128 tf1_integrityMd5 tf1_integritySha1 tf1_integritySha224 tf1_integritySha256 tf1_integritySha384 tf1_integritySha512 tf1_pfsKeyGroup tf1_IKEVersion tf1_remoteEndpoint tf1_autoPolicyParameters', 'configRow');\n \tvidualDisplay('break6 break3 break35 break37 break44 break47 break50', 'break');\n \tdocument.getElementById('tf1_remoteEndPointLable').innerHTML=LANG_LOCALE['11389'];\n \tenableRedundantVPNGatewayParameters(); \n \tcheckDhcp();\n\t\tenableTextFieldByAnchorClick('tf1_enableKeepalive','tf1_sourceIpAddr tf1_destinationIpAddr tf1_detectionPeriod tf1_reconnectAfterFailureCount','break25 break26 break27 break28');\n enableTextFieldByAnchorClick('tf1_pfsKeyGroup','tf1_pfsKeyGroupSelect');\n\n fieldStateChangeWr ('','','tf1_chkL2tpIpsec','');\n \tvidualDisplay('tf1_chkL2tpIpsec', 'configRow');\n \tvidualDisplay('break5', 'break');\n checkL2tpIpsec ();\n\n break; \n case 2:\t/* Manual Policy */ \t\n \tvar imgObjVal = document.getElementById('tf1_enableDHCP').className; \n \t\tvar imageName = imgObjVal.substring (imgObjVal.lastIndexOf ('/') + 1);\n \t\tif (imageName == ON_ANCHOR)\t{\n \t\t\talert(LANG_LOCALE['13514']);\n \t\t\tvar selObj = document.getElementById(selName);\n \t\t\tselObj.selectedIndex = 0;\n \t\t\treturn;\n\t\t\t} \t\t\n \tfieldStateChangeWr ('tf1_redundantVANGatewayParameters tf1_enableKeepalive tf1_sourceIpAddr tf1_destinationIpAddr tf1_detectionPeriod tf1_reconnectAfterFailureCount tf1_exchangeMode tf1_direction tf1_natTraversal tf1_natKeepAliveFrequency tf1_localIdentifierType tf1_localIdentifierType tf1_localIdentifier tf1_remoteIdentifierType tf1_remoteIdentifierType tf1_remoteIdentifier tf1_encryptionAlgorithm tf1_blowfish tf1_blowfishValue tf1_cast128 tf1_cast128Value tf1_authAlgorithm tf1_authMethod tf1_authMethod tf1_presharedkey tf1_diffieHellman tf1_diffieHellman tf1_SALifeTime tf1_enableDeadPeerDetection tf1_Phase1DetectionPeriod tf1_reconnectAfterFailure tf1_extendedAuth tf1_authType tf1_UserName tf1_Password tf1_SALifeTime tf1_phase2encryptionAlgorithm tf1_encryptionDes tf1_encryptionNone tf1_encryption3Des tf1_encryptionAes128 tf1_encryptionAes192 tf1_encryptionAes256 tf1_encryptionAesCcm tf1_encryptionAesGcm tf1_encryptionTwofish128 tf1_encryptionTwofish192 tf1_encryptionTwofish256 tf1_phase2EncryptionBlowfish tf1_phase2EncryptionBlowfishValue tf1_phase2EncryptionCast128 tf1_integrityMd5 tf1_integritySha1 tf1_integritySha224 tf1_integritySha256 tf1_integritySha384 tf1_integritySha512 tf1_pfsKeyGroup tf1_pfsKeyGroupSelect','tf1_Lifetime_div tf1_IKEVersion_div tf1_remoteEndpoint_div','tf1_SPIIncoming tf1_SPIOutgoing tf1_manualEncryptionAlgorithm tf1_encryptionkeyLength tf1_encryptionKeyIn tf1_encryptionKeyOut tf1_integrityAlgorithm tf1_integrityKeyIn tf1_integrityKeyOut','');\n \tvidualDisplay('tf1_redundantVANGatewayParameters tf1_enableKeepalive tf1_sourceIpAddr tf1_destinationIpAddr tf1_detectionPeriod tf1_reconnectAfterFailureCount tf1_phase1IKESaParameters tf1_exchangeMode tf1_direction tf1_natTraversal tf1_natKeepAliveFrequency tf1_localIdentifierType tf1_localIdentifierType tf1_localIdentifier tf1_remoteIdentifierType tf1_remoteIdentifierType tf1_remoteIdentifier tf1_encryptionAlgorithm tf1_blowfish tf1_blowfishValue tf1_cast128 tf1_cast128Value tf1_authAlgorithm tf1_authMethod tf1_authMethod tf1_presharedkey tf1_diffieHellman tf1_diffieHellman tf1_SALifeTime tf1_enableDeadPeerDetection tf1_Phase1DetectionPeriod tf1_reconnectAfterFailure tf1_extendedAuth tf1_authType tf1_UserName tf1_Password tf1_SALifeTime tf1_phase2encryptionAlgorithm tf1_encryptionDes tf1_encryptionNone tf1_encryption3Des tf1_encryptionAes128 tf1_encryptionAes192 tf1_encryptionAes256 tf1_encryptionAesCcm tf1_encryptionAesGcm tf1_encryptionTwofish128 tf1_encryptionTwofish192 tf1_encryptionTwofish256 tf1_phase2EncryptionBlowfish tf1_phase2EncryptionBlowfishValue tf1_phase2EncryptionCast128 tf1_integrityMd5 tf1_integritySha1 tf1_integritySha224 tf1_integritySha256 tf1_integritySha384 tf1_integritySha512 tf1_pfsKeyGroup tf1_pfsKeyGroupSelect tf1_Lifetime tf1_IKEVersion tf1_remoteEndpoint tf1_autoPolicyParameters', 'hide'); \n vidualDisplay('break3 break25 break26 break27 break28', 'hide'); \n\t\t\tvidualDisplay('tf1_SPIIncoming tf1_SPIOutgoing tf1_manualEncryptionAlgorithm tf1_encryptionkeyLength tf1_encryptionKeyIn tf1_encryptionKeyOut tf1_integrityAlgorithm tf1_integrityKeyIn tf1_integrityKeyOut tf1_manualPolicyParameters', 'configRow');\t\t\n\t\t\tdocument.getElementById('tf1_remoteEndPointLable').innerHTML=LANG_LOCALE['30465'];\n\t\t\tdocument.getElementById('tf1_ipSecMode').innerHTML= LANG_LOCALE['13160'];\n\t\t\tchangeManualEncryptionAlgorithm('tf1_manualEncryptionAlgorithm');\n\n fieldStateChangeWr ('tf1_chkL2tpIpsec','','','');\n \tvidualDisplay('tf1_chkL2tpIpsec break5', 'hide');\n\t\tfieldStateChangeWr ('','','tf1_remoteEndpointValue tf1_localStartIpAddr tf1_localEndIpAddr tf1_localSubnetMask tf1_localPrefixLength tf1_remoteStartIpAddr tf1_remoteEndIpAddr tf1_remoteSubnetMask tf1_remotePrefixLength tf1_enableNetBIOS tf1_localIp tf1_remoteIp','');\n vidualDisplay('tf1_remoteEndpointValue tf1_enableNetBIOS tf1_localStartIpAddr tf1_localEndIpAddr tf1_localSubnetMask tf1_localPrefixLength tf1_remoteStartIpAddr tf1_remoteEndIpAddr tf1_remoteSubnetMask tf1_remotePrefixLength tf1_localIp tf1_remoteIp', 'configRow');\n\t vidualDisplay('break8 break10 break13 break14 break15 break16 break17 break18 break20 break21 break22 break23 break24', 'break');\n \t\tchangeLocalIpSelect('tf1_localIp');\n \t\tchangeRemoteIpSelect('tf1_remoteIp');\n\t\tbreak; \n\t} \n nonEditChange();\n}", "title": "" }, { "docid": "2654548dd1ce9daa99535dfa42c8df87", "score": "0.4172092", "text": "function on_cm(sender, data) {\n // Checking if toon is allowed to send command\n if (!auth(sender, false)) return;\n // Check ok, processing command\n if (data.message == \"bring_potions\") { // refer to 'request_merchant()' function\n var potion_seller = get_npc_by_id('fancypots');\n var potion_seller_location = { x: potion_seller.x, y: potion_seller.y, map: potion_seller.map };\n // we need to top off our potions at the potion seller\n if (!smart.moving) {\n smart_move(potion_seller_location, function () {\n // once we arrive at the potion seller\n buy_with_gold(potion_types[0], data.hpot); // buy health pots for the farmer\n buy_with_gold(potion_types[1], data.mpot); // buy mana pots for the farmer\n // move to the farmer\n smart_move(data.location, function () {\n // once we arrive at the farmer, we send them potions they asked for\n send_item(data.name, locate_item(potion_types[0]), data.hpot);\n send_item(data.name, locate_item(potion_types[1]), data.mpot);\n });\n });\n }\n }\n}", "title": "" }, { "docid": "15911ed6498b03af4b686f649510b9b3", "score": "0.41689703", "text": "function ADT2(cfg) {\r\n cfg.id = \"adtTabId\" + cfg.id;\r\n TabPanel = Ext.getCmp(\"mainTabPanel\");\r\n if (typeof TabPanel == \"undefined\") {\r\n Ext.MessageBox.show({\r\n title: \"Error\",\r\n msg: \"No existe el componente \" + cfg.name,\r\n buttons: Ext.MessageBox.OK,\r\n icon: Ext.MessageBox.ERROR\r\n });\r\n } else {\r\n ItemTabPanel = TabPanel.getItem(cfg.id);\r\n if (typeof ItemTabPanel != \"undefined\") {\r\n ItemTabPanel.show();\r\n } else {\r\n if (typeof cfg.inc != \"undefined\") {\r\n Inc(cfg.inc.url, function () {\r\n ItemTabPanel = TabPanel.add(cfg).show();\r\n NewObject = eval(cfg.inc.name);\r\n new NewObject({own: ItemTabPanel});\r\n });\r\n } else {\r\n TabPanel.add(cfg).show();\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "806d0b8143fed319d5ec274bea2c139d", "score": "0.41689062", "text": "function setMode(action, message) {\n var textarea = document.getElementById(\"log\"),\n rocketMode = document.getElementById(\"rocketmode\"),\n airplaneMode = document.getElementById(\"airplanemode\"),\n newMode = action,\n rocketModeOn,\n rocketModeOff,\n airplaneModeOn,\n airplaneModeOff;\n \n console.log('setting mode: ' + action);\n rocketModeOff = 'images/rocketModeOff.png';\n airplaneModeOff = 'images/airplaneModeOff.png';\n \n // determine the correct set of button images, based on the current state of the system\n switch (currentState) {\n case 'flight':\n rocketModeOn = 'images/rocketModeOn.png';\n airplaneModeOn = 'images/airplaneModeOn.png';\n break;\n \n case 'standby':\n rocketModeOn = 'images/rocketModeOff.png';\n airplaneModeOn = 'images/airplaneModeOff.png';\n newMode = 'off';\n break;\n \n default:\n rocketModeOn = 'images/rocketModeStandby.png';\n airplaneModeOn = 'images/airplaneModeStandby.png';\n }\n \n // set the proper button to 'on', based on the current flight mode\n switch (newMode) {\n case 'rocket':\n rocketMode.src = rocketModeOn;\n airplaneMode.src = airplaneModeOff;\n break;\n \n case 'airplane':\n rocketMode.src = rocketModeOff;\n airplaneMode.src = airplaneModeOn;\n break;\n \n default:\n rocketMode.src = rocketModeOff;\n airplaneMode.src = airplaneModeOff;\n }\n \n // save the current state of the system\n currentMode = newMode;\n \n // echo the chat message to the log\n if (message !== undefined) {\n $('#log').append('<div>' + message + '</div>');\n // set the scrollbar to the bottom\n textarea.scrollTop = textarea.scrollHeight;\n }\n }", "title": "" }, { "docid": "13be0239fe6ca946c301711aae6be9fb", "score": "0.41675755", "text": "function mode_otomatis_kelembaban(topic, message){\n\tvar kelembabanSekarang = parseInt(message);\n\tvar batas_kelembaban = document.getElementById(\"id_kelembaban\").value;\n\tvar onoff_mode_otomatis = document.getElementById(\"onoff_mode_otomatis\").value;\n\n\t//RULE MENYALAKAN PENGABUTAN - AKTIF JIKA KURANG DARI BATAS KELEMBABAN\n\tif (topic == 'node1/status/kelembaban' && kelembabanSekarang<batas_kelembaban) {\n\t\tconsole.log(\"Pengabutan jalan (\"+topic+\") - karena kelembaban \"+message+\" kurangdari \"+batas_kelembaban+\"\");\n\t\tclient.publish('node1/pengabutan/otomatis', 'aktif');\n\t\treturn pengabutan_kelembaban1=\"aktif\";\n\t}\n if (topic == 'node1/status/kelembaban' && kelembabanSekarang>=batas_kelembaban) {\n console.log(\"kelembaban node1 sesuai\");\n client.publish('node1/pengabutan/otomatis', 'mati');\n return pengabutan_kelembaban1=\"mati\";\n }\n\n\tif (topic == 'node2/status/kelembaban' && kelembabanSekarang<batas_kelembaban){\n\t\tconsole.log(\"Pengabutan jalan (\"+topic+\") - karena kelembaban \"+message+\" kurangdari \"+batas_kelembaban+\"\");\n\t\tclient.publish('node2/pengabutan/otomatis', 'aktif');\n\t\treturn pengabutan_kelembaban2=\"aktif\";\n\t}\n if (topic == 'node2/status/kelembaban' && kelembabanSekarang>=batas_kelembaban){\n console.log(\"kelembaban node2 sesuai\");\n client.publish('node2/pengabutan/otomatis', 'mati');\n return pengabutan_kelembaban2=\"mati\";\n }\n\n}", "title": "" }, { "docid": "246c92ce9590ae288005179649a3f4aa", "score": "0.4165356", "text": "function modeHandler (e) {\n mode = e.type;\n template.data(\"mode\", mode);\n switch (mode) {\n case \"view\": view.show(); _view.hide(); break;\n case \"edit\": edit.show(); _edit.hide(); break;\n case \"search\": search.show(); _search.hide(); break;\n }\n e.stopPropagation();\n }", "title": "" }, { "docid": "9ec86fb75113fe43d6fec7501a80dd7b", "score": "0.4154668", "text": "function mode() {\n var value = (attr.mdMode || \"\").trim();\n if ( value ) {\n switch(value) {\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n case MODE_BUFFER:\n case MODE_QUERY:\n break;\n default:\n value = MODE_INDETERMINATE;\n break;\n }\n }\n return value;\n }", "title": "" }, { "docid": "9ec86fb75113fe43d6fec7501a80dd7b", "score": "0.4154668", "text": "function mode() {\n var value = (attr.mdMode || \"\").trim();\n if ( value ) {\n switch(value) {\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n case MODE_BUFFER:\n case MODE_QUERY:\n break;\n default:\n value = MODE_INDETERMINATE;\n break;\n }\n }\n return value;\n }", "title": "" }, { "docid": "9ec86fb75113fe43d6fec7501a80dd7b", "score": "0.4154668", "text": "function mode() {\n var value = (attr.mdMode || \"\").trim();\n if ( value ) {\n switch(value) {\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n case MODE_BUFFER:\n case MODE_QUERY:\n break;\n default:\n value = MODE_INDETERMINATE;\n break;\n }\n }\n return value;\n }", "title": "" }, { "docid": "9ec86fb75113fe43d6fec7501a80dd7b", "score": "0.4154668", "text": "function mode() {\n var value = (attr.mdMode || \"\").trim();\n if ( value ) {\n switch(value) {\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n case MODE_BUFFER:\n case MODE_QUERY:\n break;\n default:\n value = MODE_INDETERMINATE;\n break;\n }\n }\n return value;\n }", "title": "" }, { "docid": "dc59187212f2fd444a2adff22c0a0821", "score": "0.4149018", "text": "function mode() {\n var value = (attr.mdMode || \"\").trim();\n if (value) {\n switch (value) {\n case MODE_DETERMINATE:\n case MODE_INDETERMINATE:\n case MODE_BUFFER:\n case MODE_QUERY:\n break;\n default:\n value = MODE_INDETERMINATE;\n break;\n }\n }\n return value;\n }", "title": "" }, { "docid": "7142c54b4332153a3d996c24a0e2debb", "score": "0.41485506", "text": "function defineMode(name, mode) {\n if (arguments.length > 2) {\n mode.dependencies = Array.prototype.slice.call(arguments, 2);\n }\n modes[name] = mode;\n }", "title": "" }, { "docid": "6d0bc05a2b9c869d844a46c8f8ba0e2a", "score": "0.41472998", "text": "setTravelMode(travelMode){\n this.travelMode = travelMode;\n }", "title": "" }, { "docid": "2cc18d3d91a596a93ce20243ef3c9108", "score": "0.41465712", "text": "function gestion_btn(){\r\n\tbtn_on_off();\r\n\tbtn_switch();\r\n\tbtn_switch_tiers();\r\n\tbtn_switch_supp_modif();\r\n\tbtn_confirmer_edit();\r\n\r\n}", "title": "" }, { "docid": "8c41d94f170c3aa460b6ac89f5e6044e", "score": "0.4146542", "text": "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "title": "" }, { "docid": "8c41d94f170c3aa460b6ac89f5e6044e", "score": "0.4146542", "text": "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "title": "" }, { "docid": "8c41d94f170c3aa460b6ac89f5e6044e", "score": "0.4146542", "text": "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "title": "" }, { "docid": "8c41d94f170c3aa460b6ac89f5e6044e", "score": "0.4146542", "text": "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "title": "" }, { "docid": "8c41d94f170c3aa460b6ac89f5e6044e", "score": "0.4146542", "text": "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "title": "" }, { "docid": "bf076d744978588505dd2c667c262c01", "score": "0.41418472", "text": "function navigation_mode(treeview) {\n // Activation du mode \"tree view\" utilise par la version reduite et parallaxe\n if (treeview && Data.navigation.mode != 'treeview') {\n // Definition du mode\n Data.navigation.mode = 'treeview';\n Data.navigation.bar.setAttribute('role', 'tree');\n // Traitement des elements du menu (niveau 0)\n if (Data.navigation.links != null) {\n m = Data.navigation.links.level0.length;\n for (i = 0; i < m; i++) {\n d = Data.navigation.links.all[Data.navigation.links.level0[i]];\n d.block.setAttribute('role', 'treeitem');\n if (d.ismenu) d.list.setAttribute('role', 'group');\n }\n // Traitement des elements du menu (niveau 1)\n m = Data.navigation.links.level1.length;\n for (i = 0; i < m; i++) {\n d = Data.navigation.links.all[Data.navigation.links.level1[i]];\n d.block.setAttribute('role', 'treeitem');\n if (d.ismenu) d.animtag.removeAttribute('role');\n }\n }\n // Activation du mode \"menu\" utilise par la version deployee hors du parallaxe\n } else if (!treeview && Data.navigation.mode == 'treeview') {\n // Definition du mode\n Data.navigation.mode = 'menuview';\n Data.navigation.bar.setAttribute('role', 'menubar');\n // Mise a jour du selecteur\n navigation_select();\n // Traitement des elements du menu (niveau 0)\n if (Data.navigation.links != null) {\n m = Data.navigation.links.level0.length;\n for (i = 0; i < m; i++) {\n d = Data.navigation.links.all[Data.navigation.links.level0[i]];\n d.block.setAttribute('role', 'menuitem');\n if (d.ismenu) d.list.setAttribute('role', 'menu');\n }\n // Traitement des elements du menu (niveau 1)\n m = Data.navigation.links.level1.length;\n for (i = 0; i < m; i++) {\n d = Data.navigation.links.all[Data.navigation.links.level1[i]];\n d.block.setAttribute('role', 'menuitem');\n if (d.ismenu) d.animtag.setAttribute('role', 'tree');\n }\n }\n }\n }", "title": "" }, { "docid": "bddea90b6a13fb486dfd66fd93a04fe4", "score": "0.41359273", "text": "function onModeBtnClick() {\n if (isMapMode) {\n switchToManual();\n } else {\n switchToMap();\n }\n isMapMode = !isMapMode;\n }", "title": "" }, { "docid": "fd1f35610b6322e06d37e15364bbb4fb", "score": "0.41355732", "text": "modeChange(mode) {\n this.emit(\"mode-change\", {mode});\n }", "title": "" }, { "docid": "5bd120d3da6215587a552f04d554cf11", "score": "0.4134535", "text": "get mode () {\r\n\t\treturn this._mode;\r\n\t}", "title": "" }, { "docid": "eb45d64ee2069b439ebb15a75a2d62a7", "score": "0.413084", "text": "function setViewMode() {\n\t\t_lastViewMode = _moff.getMode();\n\t}", "title": "" }, { "docid": "bc2869349570173eacddcc3eefb6c0b7", "score": "0.4124056", "text": "function doCalc() {\n var selectedMode = $(\"#mode\").val();\n var waypts = [];\n //alle punten tussen start en einde\n for (var i = 1; i < (locations.length - 1); i++) {\n waypts.push({\n location: locations[i].Adres\n });\n }\n var request = {\n origin: locations[0].Adres,\n destination: locations[locations.length - 1].Adres,\n waypoints: waypts,\n travelMode: google.maps.TravelMode[selectedMode]\n };\n\n directionsService.route(request, function (response, status) {\n if (status == google.maps.DirectionsStatus.OK) {\n directionsDisplay.setDirections(response);\n }\n });\n }", "title": "" }, { "docid": "1b1a0888b20c71fc91cc784f5c8109de", "score": "0.41233858", "text": "function getMode(){\r\n var mode = window.location.pathname.split(\"/\")[1]\r\n\r\n //Default to bus\r\n return mode || 'bus'\r\n}", "title": "" }, { "docid": "f19b5edf6d4b09d58c8eddd8232f3a0c", "score": "0.41219625", "text": "function onOffer(offer, name) { \n connectedUser = name; \n myConnection.setRemoteDescription(offer);\n //crea la respuesta a la oferta \n myConnection.createAnswer(function (answer) { \n myConnection.setLocalDescription(answer); \n send({ \n type: \"answer\", \n answer: answer \n }); \n }, function (error) { \n alert(\"oops...error\",error); \n }); \n}", "title": "" }, { "docid": "689e7a37e7723ccac11c4ea7515625fa", "score": "0.4120972", "text": "setTab(tab) {\n this.inputAddressValid = true;\n this.loadingAddressError = false;\n this.createIndex = false;\n this.showDetails = false;\n this.tab = tab;\n if(tab === 4){ //options tab\n }\n else{\n this.updateList();\n }\n }", "title": "" }, { "docid": "e7ea7aab1759ebc128761f74ea7c5f11", "score": "0.41160995", "text": "function showManagerOptions() {\n inquirer.prompt([\n {\n type: \"list\",\n message: \"What would you like to do?\",\n choices: [\"Add an item to the store\", \"Update Quantities\", \"Show low quantity items\", \"Exit\"],\n name: \"action\"\n }\n ]).then(function (response) {\n switch (response.action) {\n case \"Add an item to the store\":\n listItem();\n break;\n\n case \"Update Quantities\":\n updateWhichItem();\n break;\n\n case \"Show low quantity items\":\n showLowTable();\n break;\n\n case \"Exit\":\n console.log(\"Goodbye!\");\n connection.end();\n\n }\n })\n}", "title": "" } ]
0157be5497c4df0665efbd67243d5d81
/ Get Player Details by Available
[ { "docid": "ef83a0c44370b7f98460ac9b59ab4c9b", "score": "0.73967355", "text": "getPlayerDetailsByAvailablePromise(){\n return this.GetPromise('/v3/nfl/stats/{format}/Players');\n }", "title": "" } ]
[ { "docid": "974cf0613db8f63cd8098de2e35dae2f", "score": "0.7067791", "text": "function retrieve() {\n return playerInfo;\n }", "title": "" }, { "docid": "0a66eb85372321301b50b9b258f72376", "score": "0.70639116", "text": "function getPlayer() {\n hideButtonsAndText();\n let sport = qs(\"textarea\").value;\n let url = INDEX_URL + \"sport=\" + sport;\n if(sport === \"list\") {\n getSports();\n } else {\n fetch(url, {mode: 'cors'})\n .then(checkStatus)\n .then(JSON.parse)\n .then(showPlayer)\n .catch(printError);\n }\n }", "title": "" }, { "docid": "a9112359128a0239f0afc2256a3287de", "score": "0.6962355", "text": "getPlayerDetails (id) {\n return this._players[id]\n }", "title": "" }, { "docid": "ec51009a42b0dc61425012ac9f5302e8", "score": "0.6895217", "text": "function getPlayerData() {\n\t\tCallModel.fetch('UserGet', {\n\t\t\tid: $routeParams.player1Id\n\t\t},\n\t\t{\n\t\t\tsuccess: function (response) {\n\t\t\t\t$scope.player1.fullName = response.first_name + ' ' + response.last_name;\n\t\t\t\t$scope.player1.id = response.id;\n\t\t\t}\n\t\t});\n\n\t\tCallModel.fetch('UserGet', {\n\t\t\tid: $routeParams.player2Id\n\t\t},\n\t\t{\n\t\t\tsuccess: function (response) {\n\t\t\t\t$scope.player2.fullName = response.first_name + ' ' + response.last_name;\n\t\t\t\t$scope.player2.id = response.id;\n\t\t\t}\n\t\t})\n\t}", "title": "" }, { "docid": "502c71ef2fc86bf4d55f50ab44cfcf1e", "score": "0.6762893", "text": "function getPlayerDetails() {\r\n\tgetJob();\r\n\tgetLevel();\r\n\tcreateStats(playerDetails.job, playerDetails.level);\r\n\tgetName();\r\n\tgetRace();\r\n\tgetGender();\r\n\tgetDefense();\r\n\tgetExp();\r\n}", "title": "" }, { "docid": "62330092d7ba9c4eb4393c90dbccdf07", "score": "0.6725476", "text": "async function getPlayerbasicDetailsByName(player_name){\n \n const all_player_with_same_name = await axios.get(`${api_domain}/players/search/${player_name}`, {\n params: {\n api_token: process.env.api_token,\n include: \"team.league\", \n },\n })\n return all_player_with_same_name.data.data.map((player_info) => {\n if(player_info != undefined)\n {\n const { player_id, fullname, image_path, position_id } = player_info;\n if(fullname.includes(player_name))\n {\n if( player_info.team != undefined)\n {\n const { name } = player_info.team.data;\n if(player_info.team.data.league != undefined)\n {\n const {id} = player_info.team.data.league.data;\n if(id == 271) \n {\n return {\n id: player_id,\n name: fullname,\n image: image_path,\n position: position_id,\n team_name: name, \n };\n }\n }\n }\n }\n } \n \n }); \n }", "title": "" }, { "docid": "cded9340ddaa56b5ff627f69619f75ec", "score": "0.6657995", "text": "function getPlayerData(list, playerName) {\n for (let p = 0; p < list.length; p++) {\n const player = list[p];\n if (player.name === playerName) {\n return player;\n }\n }\n // console.log(\"Unable to find player \", playerName, \"in list:\\n\", list);\n}", "title": "" }, { "docid": "6a9bb6d5ceb48a48423dc55074f6dd16", "score": "0.659553", "text": "function getPlayerData(list, playerName) {\n for (let p = 0; p < list.length; p++) {\n const player = list[p];\n if (player.name === playerName) {\n return player;\n }\n }\n console.log(\"Unable to find player \", playerName, \"in list:\\n\", list);\n}", "title": "" }, { "docid": "26d847eeb4f18f6aa6a14d8dc2a250b0", "score": "0.6584456", "text": "async function getPlayerfullDetails(player_id){\n const player_info = await axios.get(`${api_domain}/players/${player_id}`, {\n params: {\n api_token: process.env.api_token,\n include: \"team\",\n },\n })\n const { fullname, image_path, position_id, common_name, nationality, birthdate, birthcountry, height, weight } = player_info.data.data;\n const { name } = player_info.data.data.team.data;\n \n return{\n id: parseInt(player_id),\n name: fullname,\n image: image_path,\n position: position_id,\n team_name: name,\n common_name: common_name,\n nationality_player :nationality,\n birth_date : birthdate,\n birth_country : birthcountry,\n height: height,\n weight: weight,\n \n };\n}", "title": "" }, { "docid": "2762153d5fbaa4ba9f2a4dc1880e5fe0", "score": "0.6561668", "text": "function getGameInfo() {\n limiter.request({\n url: `https://global.api.pvp.net/api/lol/static-data/euw/v1.2/champion?champData=all&${api}`,\n method: 'GET',\n json: true,\n }, (error, response) => {\n if (!error && response.statusCode === 200) {\n champions = response.body.data;\n version = response.body.version;\n console.log(champions);\n }\n if (error) {\n throw new Error('Cannot connect to Riot API');\n }\n });\n}", "title": "" }, { "docid": "be60ccf054021a52b7d43045c43472d3", "score": "0.6475922", "text": "getPlayerByName(playerName) {\n return this.players.find((value) => {\n return (value._player.name === playerName);\n });\n }", "title": "" }, { "docid": "54f512096bbfecd53001d3dd36bd1fd4", "score": "0.64358187", "text": "async function getPlayerbasicDetailsByTeam(player_name, team_name){\n const all_player_with_same_name = await axios.get(`${api_domain}/players/search/${player_name}`, {\n params: {\n api_token: process.env.api_token,\n include: \"team.league\", \n },\n })\n return all_player_with_same_name.data.data.map((player_info) => {\n if(player_info != undefined && player_info.team != undefined)\n {\n const { player_id, fullname, image_path, position_id } = player_info;\n if(fullname.includes(player_name))\n {\n if( player_info.team.data.name == team_name)\n {\n const { name } = player_info.team.data;\n if(player_info.team.data.league != undefined)\n {\n const {id} = player_info.team.data.league.data;\n if(id == 271) \n {\n return {\n id: player_id,\n name: fullname,\n image: image_path,\n position: position_id,\n team_name: name, \n };\n }\n }\n }\n }\n } \n \n }); \n }", "title": "" }, { "docid": "0446b1035404c0d457b60143e84549f4", "score": "0.6418894", "text": "function retrieve_player(player_name, callback) {\n var player = NBA.findPlayer(player_name);\n if(player === undefined)\n return;\n var player_id = player.playerId;\n var team_id = player.teamId;\n var player_obj = {\n \"first_name\" : player.firstName,\n \"last_name\" : player.lastName,\n \"full_name\" : player.fullName,\n \"player_id\" : player_id,\n \"team_id\" : team_id,\n \"gms\" : 0\n };\n get_team_name(player_obj, callback);\n}", "title": "" }, { "docid": "63e9e8d9ba1c12d9e4eb1d1c3018a92e", "score": "0.6364801", "text": "function availablePlayers(jwt) {\n const activeGamesURL = BASE_URL + '/player/available_players'\n return httpRequestJWT(activeGamesURL, 'get', jwt)\n}", "title": "" }, { "docid": "bc6abb0a44f6fc7d1e0db88523c0f0ff", "score": "0.62983066", "text": "function getPlayer(){\n\t\tconsole.log(\"id\"+session.avatorId)\n\t\tvar data = {\"name\": name, \"avatorId\": session.avatorId};\n\t\tusersWS[name].emit(\"player data\", data);\n\t}", "title": "" }, { "docid": "b3b07f7ae6f2a46dd41ce683713e46e1", "score": "0.6277272", "text": "function extractRelevantPlayerData(players_info) {\n return players_info.map((player_info) => {\n if (player_info.data.data != undefined){\n \n const { player_id ,fullname, image_path, position_id } = player_info.data.data;\n if(fullname == undefined){fullname = \"\";}\n const { name } = player_info.data.data.team.data;\n const { length } = player_info.data.data.trophies.data;\n return {\n id: player_id,\n name: fullname,\n image: image_path,\n position: position_id,\n team_name: name,\n number_of_trophies: length,};\n\n }});\n}", "title": "" }, { "docid": "a9a5c8f73819597f23e546491de56596", "score": "0.6267786", "text": "function playerInfo(playerName, playerCountry, ) {\n this.name = playerName; // Player's name\n this.country = playerCountry; // Player's choice\n}", "title": "" }, { "docid": "5a7610fdc70228749b7cf80d729aeff5", "score": "0.62584066", "text": "info () {\n return {\n name: this.name,\n players: this.players.map(player => player.name)\n }\n }", "title": "" }, { "docid": "38dde76d4fcc8c6f73a2e9ae174a7126", "score": "0.62460756", "text": "getPlayerResults() {\n this.setMethod('GET');\n this.setPlayerId();\n return this.getApiResult(`${Config.PLAY_API}/${this.playerId}/results`);\n }", "title": "" }, { "docid": "ab75bf6315dff45f8db053cc24de47c8", "score": "0.6236114", "text": "async function getPlayerbasicDetailsByPosition(player_name, position_name){\n const all_player_with_same_name = await axios.get(`${api_domain}/players/search/${player_name}`, {\n params: {\n api_token: process.env.api_token,\n include: \"team.league, position\", \n },\n })\n return all_player_with_same_name.data.data.map((player_info) => {\n if(player_info != undefined && player_info.team != undefined && player_info.position != undefined)\n {\n const { player_id, fullname, image_path, position_id } = player_info;\n if(fullname.includes(player_name))\n {\n if( player_info.position.data.name == position_name)\n {\n const { name } = player_info.team.data;\n if(player_info.team.data.league != undefined)\n {\n const {id} = player_info.team.data.league.data;\n if(id == 271) \n {\n return {\n id: player_id,\n name: fullname,\n image: image_path,\n position: position_id,\n position_name: player_info.position.data.name,\n team_name: name, \n };\n }\n }\n }\n } \n }\n }); \n }", "title": "" }, { "docid": "4ad0b21865087f0d280e0954e55bfaff", "score": "0.6185629", "text": "getPlayers(){\n let players = fetch(API_URL + '/api/players',\n {method: 'GET'}).then((response) => response.json())\n return players;\n }", "title": "" }, { "docid": "51272bae0d74e63139e7cb26eb37037c", "score": "0.61780035", "text": "getPlayer(playerId) {\n // Find the player's room\n var room = this.rooms.filter((room) => {\n return room.players.filter((player) => player.id === playerId)[0];\n })[0];\n\n if (!room) return undefined;\n\n // Select the players\n var players = this.getPlayers(room.id);\n\n // Select the player from this room\n var cur = players.filter((user) => user.id === playerId)[0];\n\n return cur;\n }", "title": "" }, { "docid": "4ed3725d914cb11e52c9eb0208e46656", "score": "0.6167366", "text": "function getPlayerName(player) {\r\n return player.PLAYER;\r\n}", "title": "" }, { "docid": "010bf229bbd3f069da5690a590b35792", "score": "0.61608", "text": "getPlayerNameById (playerId) {\n return THIS.view.players[playerId].displayName\n }", "title": "" }, { "docid": "4fc5a011beca3cc932b4edc685e55947", "score": "0.61579716", "text": "function getInfo (name) {\n\tconsole.log(name);\n\tconst playerId = name.accountId;\n\tconsole.log(`Account ID: ${playerId}`);\n\tconst playerName = name.name;\n\tconsole.log(`Player name: ${playerName}`);\n\tconst summonerLevel = name.summonerLevel;\n\tconsole.log(`Player Level: ${summonerLevel}`);\n\tconst profileIcon = name.profileIconId;\n\tconsole.log(`Icon number: ${profileIcon}`);\n\trenderName(playerName, summonerLevel, profileIcon);\n\t$('.matches').html(`<h2>${playerName}'s last 3 matches`);\n\tgetRecentMatches(playerId, getMatchList);\n}", "title": "" }, { "docid": "fbd6152fa153bcc61ac6ca4f4f78f07c", "score": "0.60911095", "text": "getPlayerDetailsByPlayerPromise(playerid){\n var parameters = {};\n parameters['playerid']=playerid;\n return this.GetPromise('/v3/nfl/stats/{format}/Player/{playerid}', parameters);\n }", "title": "" }, { "docid": "462e8712623abcb778f64f8fb9171b4b", "score": "0.6066267", "text": "searchPlayerNames(params, shard = this.defaultShard){\n return this.requestDetails(\n shard,\n this.endpoint.players,\n dataParameters.map(params, dataParameters.attributes.players)\n );\n }", "title": "" }, { "docid": "34fca2b1d9413362844a84095885f826", "score": "0.6058411", "text": "function getPlayers() {\n $.get(\"/api/standardPlayers\", function (data) {\n console.log(\"get\");\n players = _.filter(data, function (player) {\n return player.TeamId === null \n });\n\n createPlayerRow(null);\n\n });\n }", "title": "" }, { "docid": "26e133b03c5c492c722136bcc56140e0", "score": "0.6049558", "text": "function fetchPlayer(playerName, apiUrl, callback){\r\n\r\n utils.httpsFetch(apiUrl+'player?filter=login==\"'+playerName+'\"&include=clanMemberships.clan,globalRating,ladder1v1Rating,names,avatarAssignments.avatar', function(d){\r\n\r\n\t\tconst data = JSON.parse(d);\r\n\t\tif (data.data != undefined && data.data.length > 0){\r\n\r\n\t\t\tlet player = {\r\n\t\t\t\tid : data.data[0].id,\r\n\t\t\t\tname : data.data[0].attributes.login,\r\n\t\t\t\tcreateTime : data.data[0].attributes.createTime,\r\n\t\t\t\tupdateTime : data.data[0].attributes.updateTime,\r\n\t\t\t\tclans : [],\r\n\t\t\t\taliases : [],\r\n\t\t\t\tavatarId : '',\r\n\t\t\t\tavatarUrl : '',\r\n\t\t\t\tlastAvatarTime: null\r\n\t\t\t}\r\n\r\n\t\t\tconst inc = data.included;\r\n\r\n\t\t\tfor (let i = 0; i < inc.length; i++){\r\n\t\t\t\tlet thisData = inc[i];\r\n\t\t\t\tswitch (thisData.type){\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"nameRecord\":\r\n\t\t\t\t\t\tplayer.aliases.push(thisData.attributes.name);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"clan\":\r\n\t\t\t\t\t\tplayer.clans.push({\r\n\t\t\t\t\t\t\tname: thisData.attributes.name,\r\n\t\t\t\t\t\t\ttag: thisData.attributes.tag,\r\n\t\t\t\t\t\t\tsize: thisData.relationships.memberships.data.length,\r\n\t\t\t\t\t\t\twebsiteUrl: thisData.attributes.websiteUrl,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"globalRating\":\r\n\t\t\t\t\t\tplayer.global = {};\r\n\t\t\t\t\t\tplayer.global.rating = thisData.attributes.rating;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"ladder1v1Rating\":\r\n\t\t\t\t\t\tplayer.ladder = {};\r\n\t\t\t\t\t\tplayer.ladder.rating = thisData.attributes.rating;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"avatarAssignment\":\r\n\t\t\t\t\t\tif (player.lastAvatarTime < Date.parse(thisData.attributes.updateTime) && thisData.attributes.selected){\r\n\t\t\t\t\t\t\tplayer.avatarId = thisData.relationships.avatar.data.id;\r\n\t\t\t\t\t\t\tplayer.lastAvatarTime = Date.parse(thisData.attributes.updateTime);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < inc.length; i++){\r\n\t\t\t\tlet thisData = inc[i];\r\n\t\t\t\tswitch (thisData.type){\r\n\t\t\t\t\tcase \"avatar\":\r\n\t\t\t\t\t\tif (thisData.id == player.avatarId){\r\n\t\t\t\t\t\t\tplayer.avatarUrl = thisData.attributes.url.replace(/( )/g, \"%20\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\r\n\t\t\tlet embedMes = {\r\n\t\t\t\t\"content\": \"Player info for [\"+player.name+\"]\",\r\n\t\t\t \"embed\": {\r\n\t\t\t\t\"title\": \"ID : \"+player.id+\"\",\r\n\t\t\t\t\"color\": 0xFF0000,\r\n\t\t\t\t\"author\": {\r\n\t\t\t\t \"name\": player.name\r\n\t\t\t\t},\r\n\t\t\t\t\"fields\": []\r\n\t\t\t }\r\n\t\t\t}\r\n\r\n\t\t\taliasString = \"None\";\r\n\r\n\t\t\tif (player.aliases.length > 0){\r\n\t\t\t\tconst maxAliases = 5; // max aliases\r\n\t\t\t\taliasString = \"\";\r\n\t\t\t\tfor (var i = 0; i < Math.min(player.aliases.length, maxAliases); i++){\r\n\t\t\t\t\taliasString += player.aliases[i]+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\tif (player.aliases.length > maxAliases){\r\n\t\t\t\t\taliasString += \"...\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t {\r\n\t\t\t\t\t\"name\": \"Aliases\",\r\n\t\t\t\t\t\"value\": aliasString,\r\n\t\t\t\t\t\"inline\": false\r\n\t\t\t\t });\r\n\r\n\t\t\tif (player.avatarUrl != ''){\r\n\t\t\t\tembedMes[\"embed\"].thumbnail = {};\r\n\t\t\t\tembedMes[\"embed\"].thumbnail.url = player.avatarUrl;\r\n\t\t\t}\r\n\r\n\t\t\tif (player.ladder){\r\n\t\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t {\r\n\t\t\t\t\t\"name\": \"Ladder rating\",\r\n\t\t\t\t\t\"value\": \"\"+Math.floor(player.ladder.rating),\r\n\t\t\t\t\t\"inline\": true\r\n\t\t\t\t });\r\n\t\t\t}\r\n\r\n\t\t\tif (player.global){\r\n\t\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t {\r\n\t\t\t\t\t\"name\": \"Global rating\",\r\n\t\t\t\t\t\"value\": \"\"+Math.floor(player.global.rating),\r\n\t\t\t\t\t\"inline\": true\r\n\t\t\t\t });\r\n\t\t\t}\r\n\r\n\t\t\tif (player.clans.length > 0){\r\n\r\n\t\t\t\tfor (i = 0; i < player.clans.length; i++){\r\n\t\t\t\t\tconst thisClan = player.clans[i];\r\n\t\t\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t\"name\": \"Clan : \"+thisClan.name+\"[\"+thisClan.tag+\"]\"+\"\",\r\n\t\t\t\t\t\t\"value\": \"Clan size : \"+thisClan.size+\"\\n\"+\"URL : \"+thisClan.websiteUrl,\r\n\t\t\t\t\t });\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\tcallback(embedMes);\r\n\t\treturn;\r\n\t}\r\n\telse{\r\n\t\tcallback(\"Requested player does not exist.\");\r\n\t\treturn;\r\n\t}\r\n\r\n});\r\n}", "title": "" }, { "docid": "4eac2f292bf7855655d892cb1b20903e", "score": "0.6048211", "text": "showPlayerDetails(id) {\n fetch('https://playdraft.herokuapp.com/api/v1/players/' + id)\n .then(response=>response.json())\n .then(data=>{\n this.setState({\n modalIsOpen: true,\n modalData: data.player\n });\n })\n }", "title": "" }, { "docid": "2f5e7e2005c2d64b33300c6a814c8228", "score": "0.6045207", "text": "function fetchPlayer(playerName, apiUrl, callback){\r\n\r\n utils.httpsFetch(apiUrl+'player?filter=login==\"'+playerName+'\"&include=clanMembership.clan,globalRating,ladder1v1Rating,names,avatarAssignments.avatar', function(d){\r\n\r\n\t\tconst data = JSON.parse(d);\r\n\t\tif (data.data != undefined && data.data.length > 0){\r\n\r\n\t\t\tlet player = {\r\n\t\t\t\tid : data.data[0].id,\r\n\t\t\t\tname : data.data[0].attributes.login,\r\n\t\t\t\tcreateTime : data.data[0].attributes.createTime,\r\n\t\t\t\tupdateTime : data.data[0].attributes.updateTime,\r\n\t\t\t\tclans : [],\r\n\t\t\t\taliases : [],\r\n\t\t\t\tavatarId : '',\r\n\t\t\t\tavatarUrl : '',\r\n\t\t\t\tlastAvatarTime: null\r\n\t\t\t}\r\n\r\n\t\t\tconst inc = data.included;\r\n\r\n\t\t\tfor (let i = 0; i < inc.length; i++){\r\n\t\t\t\tlet thisData = inc[i];\r\n\t\t\t\tswitch (thisData.type){\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"nameRecord\":\r\n\t\t\t\t\t\tplayer.aliases.push(thisData.attributes.name);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"clan\":\r\n\t\t\t\t\t\tplayer.clans.push({\r\n\t\t\t\t\t\t\tname: thisData.attributes.name,\r\n\t\t\t\t\t\t\ttag: thisData.attributes.tag,\r\n\t\t\t\t\t\t\tsize: thisData.relationships.memberships.data.length,\r\n\t\t\t\t\t\t\twebsiteUrl: thisData.attributes.websiteUrl,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"globalRating\":\r\n\t\t\t\t\t\tplayer.global = {};\r\n\t\t\t\t\t\tplayer.global.rating = thisData.attributes.rating;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"ladder1v1Rating\":\r\n\t\t\t\t\t\tplayer.ladder = {};\r\n\t\t\t\t\t\tplayer.ladder.rating = thisData.attributes.rating;\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"avatarAssignment\":\r\n\t\t\t\t\t\tif (player.lastAvatarTime < Date.parse(thisData.attributes.updateTime) && thisData.attributes.selected){\r\n\t\t\t\t\t\t\tplayer.avatarId = thisData.relationships.avatar.data.id;\r\n\t\t\t\t\t\t\tplayer.lastAvatarTime = Date.parse(thisData.attributes.updateTime);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < inc.length; i++){\r\n\t\t\t\tlet thisData = inc[i];\r\n\t\t\t\tswitch (thisData.type){\r\n\t\t\t\t\tcase \"avatar\":\r\n\t\t\t\t\t\tif (thisData.id == player.avatarId){\r\n\t\t\t\t\t\t\tplayer.avatarUrl = thisData.attributes.url.replace(/( )/g, \"%20\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\r\n\t\t\tlet embedMes = {\r\n\t\t\t\t\"content\": \"Player info for [\"+player.name+\"]\",\r\n\t\t\t \"embed\": {\r\n\t\t\t\t\"title\": \"ID : \"+player.id+\"\",\r\n\t\t\t\t\"color\": 0xFF0000,\r\n\t\t\t\t\"author\": {\r\n\t\t\t\t \"name\": player.name\r\n\t\t\t\t},\r\n\t\t\t\t\"fields\": []\r\n\t\t\t }\r\n\t\t\t}\r\n\r\n\t\t\taliasString = \"None\";\r\n\r\n\t\t\tif (player.aliases.length > 0){\r\n\t\t\t\tconst maxAliases = 5; // max aliases\r\n\t\t\t\taliasString = \"\";\r\n\t\t\t\tfor (var i = 0; i < Math.min(player.aliases.length, maxAliases); i++){\r\n\t\t\t\t\taliasString += player.aliases[i]+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\tif (player.aliases.length > maxAliases){\r\n\t\t\t\t\taliasString += \"...\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t {\r\n\t\t\t\t\t\"name\": \"Aliases\",\r\n\t\t\t\t\t\"value\": aliasString,\r\n\t\t\t\t\t\"inline\": false\r\n\t\t\t\t });\r\n\r\n\t\t\tif (player.avatarUrl != ''){\r\n\t\t\t\tembedMes[\"embed\"].thumbnail = {};\r\n\t\t\t\tembedMes[\"embed\"].thumbnail.url = player.avatarUrl;\r\n\t\t\t}\r\n\r\n\t\t\tif (player.ladder){\r\n\t\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t {\r\n\t\t\t\t\t\"name\": \"Ladder rating\",\r\n\t\t\t\t\t\"value\": \"\"+Math.floor(player.ladder.rating),\r\n\t\t\t\t\t\"inline\": true\r\n\t\t\t\t });\r\n\t\t\t}\r\n\r\n\t\t\tif (player.global){\r\n\t\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t {\r\n\t\t\t\t\t\"name\": \"Global rating\",\r\n\t\t\t\t\t\"value\": \"\"+Math.floor(player.global.rating),\r\n\t\t\t\t\t\"inline\": true\r\n\t\t\t\t });\r\n\t\t\t}\r\n\r\n\t\t\tif (player.clans.length > 0){\r\n\r\n\t\t\t\tfor (i = 0; i < player.clans.length; i++){\r\n\t\t\t\t\tconst thisClan = player.clans[i];\r\n\t\t\t\t\tembedMes[\"embed\"].fields.push(\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t\"name\": \"Clan : \"+thisClan.name+\"[\"+thisClan.tag+\"]\"+\"\",\r\n\t\t\t\t\t\t\"value\": \"Clan size : \"+thisClan.size+\"\\n\"+\"URL : \"+thisClan.websiteUrl,\r\n\t\t\t\t\t });\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\tcallback(embedMes);\r\n\t\treturn;\r\n\t}\r\n\telse{\r\n\t\tcallback(\"Requested player does not exist.\");\r\n\t\treturn;\r\n\t}\r\n\r\n});\r\n}", "title": "" }, { "docid": "69d2881b5f02348f08c593f16699e7e8", "score": "0.6044007", "text": "function playerInfo(userID,username) {\n return {\n userId: userID,\n username: username\n }\n}", "title": "" }, { "docid": "4f0d574b6928f01ef2d17e72f21d1a61", "score": "0.60368025", "text": "fetchPlayers() {\n if(this.players.length === 0) { return []; }\n return this.players.map((value) => value._player);\n }", "title": "" }, { "docid": "35e6acada25dc04997f6320dc3b661ad", "score": "0.6025523", "text": "getCurrentPlayer() {\n return this.props.players.find(p =>\n p.playerName === this.props.playerName\n );\n }", "title": "" }, { "docid": "da1a3904653c0f0d4dda9335372f30be", "score": "0.60108715", "text": "getPlayer(username) {\n return client({\n method: 'GET',\n path: PLAYER_SEARCH_ROOT+'findPlayerByUsername',\n params: {\n username: username\n }\n });\n }", "title": "" }, { "docid": "bb0caf8b4203ec38e04ee7b3baa041e0", "score": "0.59976524", "text": "function getPlayers(player, team) {\n console.log(player + \": \" + team);\n}", "title": "" }, { "docid": "dd48087cde065ec77eba679bf07c73d9", "score": "0.5970124", "text": "function extractFullPlayerData(players_info) {\n return players_info.map((player_info) => {\n const { fullname, image_path, position_id, common_name, nationality,\n birthdate, birthcountry, height, weight} = player_info.data.data;\n const { name, id } = player_info.data.data.team.data;\n return {\n name: fullname,\n image: image_path,\n position_id: position_id,\n position: player_info.data.data.position.data.name,\n team_name: name,\n team_id: id,\n nationality: nationality,\n birthdate: birthdate,\n birthcountry: birthcountry,\n common_name: common_name,\n weight: weight,\n height: height\n };\n });\n}", "title": "" }, { "docid": "699f666b3ba9c2711da9ecc1dcbc29fc", "score": "0.59645164", "text": "getAllPlayers() {\n return Player.find({}).exec();\n }", "title": "" }, { "docid": "78640ab627d55a7e5ad2af10f2ff1202", "score": "0.59601074", "text": "function loadOtherPlayer(player, position) {\n var nameDiv = $('#' + position + 'PlayerName');\n nameDiv.html(player.username);\n //show player name\n nameDiv.css(\"display\", \"block\");\n //show player card\n $('#' + position + 'PlayerCards').css(\"display\", \"block\");\n // if is_ready show ready\n if (player.is_ready == true) {\n $('#' + position + 'PlayerReady').css(\"display\", \"block\");\n }\n // if uno show uno\n if (player.uno == true) {\n $('#' + position + 'PlayerUno').css(\"display\", \"block\");\n }\n}", "title": "" }, { "docid": "84c61032b3889a5af13ab56dffac9d0c", "score": "0.59530115", "text": "function getBluePlayers() {\r\n\treturn room.getPlayerList().filter(p => p.team == 2);\r\n}", "title": "" }, { "docid": "7bdd7d77d9738278e85d2bb65ae5f2d1", "score": "0.59479845", "text": "function getPlayerAccountInfo() {\n\tconsole.log(\"Get Player Account Info Button Pressed.\");\n\n\tvar id = 0;\n\n\t$.get(\"api/users/\" + id, function(data){\n\n\t\tvar username = data.username;\n\t\tvar balance = data.balance;\n\t\tvar money_spent = data.money_spent;\n\t\tvar money_earned = data.money_earned;\n\n\n\t\t$(\"#playerAccountInfo\").empty();\n\t\t$(\"#playerAccountInfo\").append(\"<h4>\" + username + \"</h4>\");\n\t\t$(\"#playerAccountInfo\").append(\"<p>Balance: \" + balance + \"</p>\");\n\t\t$(\"#playerAccountInfo\").append(\"<p>Money Spent: \" + money_spent + \"</p>\");\n\t\t$(\"#playerAccountInfo\").append(\"<p>Money Earned: \" + money_earned + \"</p>\");\n\n\t});\n}", "title": "" }, { "docid": "19810ecad679e42a1c61d0945c6c5885", "score": "0.59447384", "text": "_getClientDetails() {\n // parse search parameters in URL\n let query = location.search.substr(location.search.indexOf(\"?\") + 1).split(\"&\"),\n queries = {};\n\n for (let i = 0; i < query.length; i++) {\n queries[query[i].substr(0, query[i].indexOf(\"=\"))] = query[i].substr(query[i].indexOf(\"=\") + 1);\n }\n\n this.playerName = queries.name || \"p\" + Date.now();\n this.hostName = queries.join;\n }", "title": "" }, { "docid": "20f5c1543b573debd0434be0e08a726b", "score": "0.5929435", "text": "function playerLookUp(name, enemyName){\n //Pulls layer ID and level from API\n $.getJSON(\"https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/\" + name + \"?api_key=\" + API_KEY, function(player){\n playerID = player[name].id;\n $(\"#sLevel\").text(player[name].summonerLevel)\n $(\"#sID\").text(playerID)\n\n //New JSON request to get player's matchlist\n $.getJSON(\"https://na.api.pvp.net/api/lol/na/v2.2/matchlist/by-summoner/\" + playerID + \"?api_key=\" + API_KEY, function(playerMatchList){\n var playerMatches = playerMatchList;\n //Once we get the matchlist from the player, do the same for \"enemy\" player, sending it player matchlist\n enemyLookUp(enemyName, playerMatches, playerID);\n });\n \n });\n }", "title": "" }, { "docid": "74874b29819f5fe26a60a1fcacc9807d", "score": "0.5927765", "text": "getPlayer(playerID){\n for (player in this.#players){\n if(playerID===player.valueOf()){\n return player;\n }\n }\n return null;\n }", "title": "" }, { "docid": "75cb782f61a2d33449c7b968924b0045", "score": "0.5927652", "text": "function loadPlayerList() {\n Player_v.all({order: 'id'}, function(err, results) {\n var players = [];\n var player = {};\n player.player_name = 'Not Selected';\n player.id = \"\";\n players[0] = player;\n\n if(results.length > 0) {\n for (var i = 0; i < results.length; i++) {\n // create a brand new instance of player object for every record. One cannot reuse the same player variable.\n var player = { player_name: results[i].first_name + \" \" + results[i].last_name + \"-\" + results[i].city + \"/\" + results[i].state_or_province,\n id: results[i].id};\n players.push(player);\n }\n } // end of if.\n\n this.player_list = players;\n\n next(); // process the next tick.\n }.bind(this));\n}", "title": "" }, { "docid": "c8a8b423bdacf9ba5e886de1192c0bfc", "score": "0.5915236", "text": "getPlayer() {\n console.log(\"execute getPlayer with gameId:\" + this.gameId);\n findPlayer({ gameId: this.gameId })\n .then((result) => {\n if (result) {\n this.playerRecord = result;\n this.commHandler.publish(\n // @ts-ignore\n window.phaserIframeElement,\n {\n data: result,\n eventName: EventNames.titleScene_playerDetail\n }\n );\n }\n })\n .catch((error) => {\n console.log(\"ERROR executing findPlayer: \", error);\n });\n }", "title": "" }, { "docid": "8ece18037c47689d5229cab89eeb96db", "score": "0.59122086", "text": "function get_player_data_from_db(playername) {\n /*\n TODO: Replace with DB calls\n Return hash like `var cruoti` is setup above\n */\n var playerData = JSON.parse(sessionStorage.getItem('playerData'));\n return playerData[playername];\n}", "title": "" }, { "docid": "55dd5d12812419bc6b82c941705c076a", "score": "0.58959717", "text": "async displayInfo(currentPlayer, targetPlayer) {\n const player = targetPlayer || currentPlayer;\n const information = await this.database_.getAccountInformation(player.account.userId);\n if (!information) {\n return alert(player, {\n title: 'Account information of ' + player.name,\n message: 'The information could not be retrieved. Note that this feature is not ' +\n 'available on the staging and local servers.',\n });\n }\n\n const display = new Menu('Account information of ' + player.name, [\n 'Property',\n 'Value',\n ]);\n\n display.addItem('Username', information.username);\n display.addItem('E-mail', information.email);\n display.addItem('Registered', formatDate(information.registered, true));\n display.addItem('Level', information.level);\n display.addItem('Karma', format('%d', information.karma));\n display.addItem('----------', '----------');\n\n // The financial information of an account is only accessible by the player themselves, or\n // by Management members who have ways of getting it anyway.\n const canAccessFinancialInformation =\n currentPlayer.isManagement() || player === currentPlayer;\n\n if ((information.vip || information.donations > 0) && canAccessFinancialInformation) {\n const donations = format('%$', information.donations).replace('$', '') + ' euro';\n\n display.addItem('VIP', information.vip ? 'Yes' : 'No');\n display.addItem('Donations', donations);\n display.addItem('----------', '----------');\n }\n\n display.addItem('Sessions', information.sessions);\n\n await display.displayForPlayer(currentPlayer);\n }", "title": "" }, { "docid": "9bdf30d48479954f858c354f7292ba29", "score": "0.5893949", "text": "async getPlayerInternal(row) {\r\n\t\tconst now = new Date().getTime();\r\n\t\tconst configRows = await sql.all(`SELECT * FROM Config WHERE Player_ID = $id`, {$id: row.ID});\r\n\t\tconst sponsorshipRow = await sql.get(`SELECT s.ID, f.Name FROM Sponsorships s\r\n\t\t\tLEFT JOIN Fighters f ON f.ID = s.Fighter_ID WHERE Player_ID = $id`, {$id: row.ID});\r\n\r\n\t\tlet player = {\r\n\t\t\tid: row.ID,\r\n\t\t\tusername: row.Username,\r\n\t\t\tuserId: row.User_ID,\r\n\t\t\tname: row.Name,\r\n\t\t\tchannel: row.Channel,\r\n\t\t\tcoins: row.Coins,\r\n\t\t\tlastActive: row.Last_Update,\r\n\t\t\tconfig: {}\r\n\t\t};\r\n\r\n\t\tplayer.idle = player.lastActive < now - 24 * hour;\r\n\r\n\t\tfor(var i in enums.Configs) {\r\n\t\t\tif(i == 'Defaults' || i == 'Type') continue;\r\n\t\t\tvar configValue = configRows.find(row => row.Key == i);\r\n\t\t\tif(configValue && configValue.Value) {\r\n\t\t\t\tswitch(enums.Configs.Type[i]) {\r\n\t\t\t\t\tcase 'bool':\r\n\t\t\t\t\t\tplayer.config[i] = configValue.Value == true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tplayer.config[i] = configValue.Value;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tplayer.config[i] = enums.Configs.Defaults[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(sponsorshipRow) {\r\n\t\t\tplayer.sponsored = {\r\n\t\t\t\tid: sponsorshipRow.ID,\r\n\t\t\t\tname: sponsorshipRow.Name\r\n\t\t\t};\r\n\t\t}\r\n\t\t\r\n\t\treturn player;\r\n\t}", "title": "" }, { "docid": "8df9d9a2276c989f9342d55a5d721352", "score": "0.58932775", "text": "function queryPlayerData(player){\r\n\t// Admin log to ensure function is called\r\n\tconsole.log(\"Querying player \" + player + \"...\");\r\n\treturn fetch_retry(STORE.apiUrl + \"battles/\" + player, 3)\r\n\t\t.then(res => {\r\n\t\t\tif(res.ok){ \r\n\t\t\t\tconsole.log(`Player ${player} data returned`);\r\n\t\t\t\treturn res.json() \r\n\t\t\t}\r\n\t\t\telse { // insert 3 attempt call here then throw catch}\r\n\t\t\t}\r\n\t\t})\r\n\t\t.then(playerData => {\r\n\t\t\t// Player battle data returned\r\n\t\t\treturn playerData;\r\n\t\t})\r\n\t\t.catch(err => console.log(err));\r\n}", "title": "" }, { "docid": "9e4e0a33a7ba181be839a1feedd5b17d", "score": "0.5889315", "text": "getFeaturedPlayers(){\n return client({\n method: 'GET',\n path: PLAYER_SEARCH_ROOT+\"getAllByOrderByEloDesc\",\n params: {\n page: 0,\n size: 3\n }\n })\n }", "title": "" }, { "docid": "6e48350ffa9ca92ea15c5be922a0f198", "score": "0.5883867", "text": "get activePlayer() {\n return this.players.find(player => player.active === true);\n }", "title": "" }, { "docid": "0a8f037ba5cc34ad0cdefb13b753bdd8", "score": "0.5863701", "text": "getPlayer() {\n fetch(\"/api/games\")\n .then(function(response) {\n if (response.ok) {\n return response.json();\n } else {\n throw new Error(\"Unable to retrieve data\");\n }\n })\n .then(function(jsonData) {\n app.player = jsonData.player;\n });\n }", "title": "" }, { "docid": "d4e76b7b5de9b51d7968f3e12bdad2ed", "score": "0.5862878", "text": "function GetUser(name : String) : UserClass{ \n\tfor(var i : int = 0; i < playerList.Count; i++){ \n \tif(name == playerList[i].name){\n \t\treturn playerList[i];\n \t}\n }\n return null;\n}", "title": "" }, { "docid": "acdf5e8ec50e26914bb0823627a39098", "score": "0.5852022", "text": "function getPlayerCard() {\n \n}", "title": "" }, { "docid": "4ce5ac293b03b34dc82d8e109c7a0c73", "score": "0.5836676", "text": "inRoom(idPlayer){\n return bdConf.searchRoomWithPlayer(idPlayer)\n }", "title": "" }, { "docid": "526d79f65ae6a217b06874e3939c6548", "score": "0.5826544", "text": "function playerInfo(playerName, playerChoice) {\n this.name = playerName; // Player's name\n this.choice = playerChoice; // Player's choice\n}", "title": "" }, { "docid": "aa2e8419140db15d43d7c834030daacf", "score": "0.58220553", "text": "function getUserByName(name) {\r\n\tvar player = players.find(obj => obj.name == name);\r\n\tif (player) {\r\n\t\treturn player;\r\n\t}\r\n\treturn {};\r\n}", "title": "" }, { "docid": "e0f8c5576190718ee0f3bfcfb2f4b072", "score": "0.58157", "text": "function onAllianceInfoReceived(context, data) { \n try { \n // Crear \n rowData = []; \n dataTable.setData(rowData); \n \n var members = data.m; \n memberCount = data.mc; \n \n for (var i in members) { \n var member = members[i]; \n \n // For Each member (player); Get the PvP/PvE Score \n if (member.n.length > 0) { \n ClientLib.Net.CommunicationManager.GetInstance().SendSimpleCommand(\"GetPublicPlayerInfoByName\", { \n name: member.n \n }, phe.cnc.Util.createEventDelegate(ClientLib.Net.CommandResult, this, onPlayerInfoReceived), null); \n } \n } \n } catch (e) { \n console.log(\"onAllianceInfoReceived: \", e); \n } \n }", "title": "" }, { "docid": "e0f8c5576190718ee0f3bfcfb2f4b072", "score": "0.58157", "text": "function onAllianceInfoReceived(context, data) { \n try { \n // Crear \n rowData = []; \n dataTable.setData(rowData); \n \n var members = data.m; \n memberCount = data.mc; \n \n for (var i in members) { \n var member = members[i]; \n \n // For Each member (player); Get the PvP/PvE Score \n if (member.n.length > 0) { \n ClientLib.Net.CommunicationManager.GetInstance().SendSimpleCommand(\"GetPublicPlayerInfoByName\", { \n name: member.n \n }, phe.cnc.Util.createEventDelegate(ClientLib.Net.CommandResult, this, onPlayerInfoReceived), null); \n } \n } \n } catch (e) { \n console.log(\"onAllianceInfoReceived: \", e); \n } \n }", "title": "" }, { "docid": "5024558542924596efe77a54bfb95e8e", "score": "0.58032584", "text": "async function getPlayerIdByName(player_name){\n const player_data = await axios.get(`${api_domain}/players/search/${player_name}`, {\n params: {\n api_token: process.env.api_token,\n },\n })\n let players_ids = []\n player_data.data.data.map(player => {\n if (player.fullname == player_name)\n players_ids.push(player.player_id)})\n return players_ids;\n}", "title": "" }, { "docid": "6c503ed3aa05dd6529dd9d1f0dc25641", "score": "0.58026", "text": "function _getThePeople() {\n\tconst match = _storage.getState().Match;\n\tconst { uid } = _storage.getState().Main.user;\n\treturn Object.keys(match.players).map(_pid => {\n\t\tconst pl = match.players[_pid];\n\t\tif (pl.status !== 'D') {\n\t\t\treturn Div({className: 'player-box'}, [\n\t\t\t\t(match.id === uid && _pid !== uid)\n\t\t\t\t? Div({ className: 'delete-btn', onclick: kick })\n\t\t\t\t: Div(),\n\t\t\t\tSpan({}, pl.displayName),\n\t\t\t\tDiv({ className: 'score' }, [Span({}, `x${pl.score}`), Span({className: 'score-coin'})])\n\t\t\t])\n\t\t}\n\t\treturn;\n\t})\n}", "title": "" }, { "docid": "0550450c98c4740be33945e669bb8776", "score": "0.57967234", "text": "async players(ctx) {\n console.log('Controller HIT: DataCenterController::Players');\n return new Promise((resolve, reject) => {\n const query = ' SELECT * FROM Players;';\n \n chpConnection.query(query, (err, res) => {\n if(err) {\n reject(`Error querying CHP.Teams: ${err}`);\n }\n \n ctx.body = res;\n ctx.status = 200;\n \n resolve();\n });\n })\n .catch(err => {\n ctx.status = 500;\n ctx.body = err;\n });\n }", "title": "" }, { "docid": "9dfac05f5adcd8a1cc5cbb554b95491e", "score": "0.57933474", "text": "function getPlayers(filter) {\n currentPlayers = []\n\n var endpoint = \"/player\";\n switch (filter.timespan) {\n case \"This month\": endpoint += \"/month\"; break;\n case \"This week\": endpoint += \"/week\"; break;\n case \"Today\": endpoint += \"/today\"; break;\n }\n\n getPlayersFilter(endpoint);\n\n var aux = [];\n\n if (filter.search) {\n currentPlayers.forEach(function (current) {\n if (current.username.toLowerCase().includes(filter.search.toLowerCase())) {\n aux.push(current);\n return;\n }\n });\n\n currentPlayers = aux;\n }\n}", "title": "" }, { "docid": "1cc3ce4bc4b812d86515668f330fc18d", "score": "0.57927644", "text": "function getPlayer(player_ID, foundPlayer) {\n\n Player.find({'playerID': player_ID}, function(err, playerfound) {\n if(err) console.error(err);\n playerfound = playerfound[0]; \n\n foundPlayer(playerfound); \n }); \n}", "title": "" }, { "docid": "0a0aa2c1e7b74ff9368fd8ab04a9c4d4", "score": "0.578321", "text": "function loadPlayers() {\n // Selects all of the data from the MySQL products table\n connection.query(\"SELECT Player, (MP/G)*(USGP)*(PER/4 + TSP/3 + 3PAR/4 + FTR/4 + TRBP/3 + ASTP/3 + STLP/4 + BLKP/4 - TOVP/4) + 100*(OWS + DWS/2 + WS + WS48) + 20*(OBPM + DBPM/2 + BPM + VORP) AS rawAdv FROM playersadvanced WHERE Tm ='HOU' OR Tm='GSW' ORDER BY rawAdv DESC LIMIT 200\", function(err, res) {\n if (err) throw err;\n\n // Draw the table in the terminal using the response\n console.table(res);\n });\n}", "title": "" }, { "docid": "e098ad9e484ce7a5ee29be2d2a88e940", "score": "0.57767594", "text": "function getTeamFromInfo(playerInfo) {\n for (var j = 0; j < Teams.length; j++) {\n if (Teams.includes(playerInfo[j])) {\n var team = playerInfo[j];\n break;\n }\n }\n return team;\n}", "title": "" }, { "docid": "5ad47a4851a199042d063e0ac842d528", "score": "0.5765656", "text": "function searchPlayer (req, res) {\n let query = `${req.body.firstname} ${req.body.lastname}`\n query = query.toLowerCase();\n const player = NBA.findPlayer(query)\n console.log(player)\n\n NBA.stats.playerInfo({ PlayerID: player.playerId })\n .then (result => {\n let newPlayer = new Player(result)\n \n NBA.stats.playerSplits({ PlayerID: player.playerId })\n .then (result => {\n let newPlayerSplits = new PlayerSplits(result)\n \n NBA.stats.playerProfile({ PlayerID: player.playerId })\n .then (result => {\n let newPlayerCareerSplits = new PlayerCareerSplits(result)\n \n res.render('show', {newPlayer, newPlayerSplits, newPlayerCareerSplits}) \n })\n })\n })\n}", "title": "" }, { "docid": "78f6cf20449e0637be96da723d408897", "score": "0.5750606", "text": "getPlayerDetailsByTeamPromise(team){\n var parameters = {};\n parameters['team']=team;\n return this.GetPromise('/v3/nfl/stats/{format}/Players/{team}', parameters);\n }", "title": "" }, { "docid": "6a7a4b2eb1f381363649d0187d10bc60", "score": "0.5742299", "text": "function getUser(pool, playerid, callback){\n pool.connect(function(err, client) {\n if(err){\n callback && callback(err);\n }\n else{//Get player info\n var queryString = 'SELECT * FROM player WHERE playerid = ' + playerid;\n // console.log(queryString);\n client.query(queryString, function(err, player){\n if(err){\n client.release();\n callback && callback(err, null);\n }\n else {//Get team info for all teams player belongs to\n appendTeamInfo(client, player.rows[0], callback);\n }\n });\n }\n });\n}", "title": "" }, { "docid": "a31902079c6a6a7f03026e39bcd6f681", "score": "0.5725173", "text": "function whichPlayer(player) {\n if (player == 1) {\n return playerOneName;\n } else if (player == 2) {\n return playerTwoName;\n }\n }", "title": "" }, { "docid": "edafe110a723022103272da23aba77fd", "score": "0.5725038", "text": "async function currentlyPlaying() {\n return await callApiCurrPlaying( \"GET\", PLAYER + \"?market=US\", null );\n}", "title": "" }, { "docid": "77ff0c6b9aff9bc24bb7fddc2636c701", "score": "0.57246834", "text": "function activePlayer(players) {\n return players.find(player => player.isActive === false).name; // === !player.isActive\n}", "title": "" }, { "docid": "ccb354ad912b70f695be4d625f5cb99b", "score": "0.5718986", "text": "function getInfo() {\n fetch(TRAINERS_URL)\n .then(response => response.json())\n .then(json => makeCard(json.data))\n}", "title": "" }, { "docid": "19b91ddd5ffc16c29ba21b398e1fd21f", "score": "0.5716189", "text": "toDisplay() {\n return {\n player_names: this.p_name,\n player_LIDs: this.p_lid,\n player_active: this.p_active\n };\n }", "title": "" }, { "docid": "9cf6ef96fd7f043f33d9dc62240022e7", "score": "0.57135", "text": "function getPlaylist(info) {\n $http.get(\"/playlist/\" + $rootScope.userLog).then(function (response) {\n if (response.status == 200) {\n $scope.playlist = response.data.playlist;\n username.innerHTML = response.data.username;\n }\n });\n }", "title": "" }, { "docid": "d7df3738cfe1f05d685b3905ed013157", "score": "0.5707662", "text": "function findPlayer() {\n\t$.ajax({\n\t\ttype : 'POST',\n\t\turl : '/api/find_battle',\n\t});\n\tinitPage();\n\tdisplayBattles(mybattles);\n}", "title": "" }, { "docid": "8ba36acc9634adca5dec67b376eb3822", "score": "0.57011306", "text": "function getPlayersInfo(tournamentid, callback) {\n var playersInfo = [];\n Tournament.findOne({shortID : tournamentid}, function(err, result) {\n if (err) {\n callback(err, null, []);\n } else if (result == null) {\n callback(null, null, []);\n } else {\n for (var i = 0; i < result.players.length; i++) {\n playersInfo.push(result.players[i].getAllInformation(result));\n }\n playersInfo.sort(function(first, second) {\n return second.stats[\"PPG\"] - first.stats[\"PPG\"];\n });\n callback(null, result, playersInfo);\n }\n });\n}", "title": "" }, { "docid": "83157b9c35879a8a2079a3d2fecf8e2f", "score": "0.5699377", "text": "getPlayerDetailsByFreeAgentsPromise(){\n return this.GetPromise('/v3/nfl/stats/{format}/FreeAgents');\n }", "title": "" }, { "docid": "da2a555f98ebc19d82bcb5f9ba976902", "score": "0.5696987", "text": "getPlayerStats(playerId) {\n return PlayerStat.find({ player: ObjectId(playerId) }).exec();\n }", "title": "" }, { "docid": "0197a67f8e75dbc64a3ba57c888a6540", "score": "0.5696742", "text": "getCurrentPlayer() {}", "title": "" }, { "docid": "a82f1fcb433a2bef482fcad0f37706e0", "score": "0.5695826", "text": "function getPlayerData() {\n var storedPlayerInitials = JSON.parse(localStorage.getItem(\"player-initials\"));\n if (storedPlayerInitials !== null) {\n playerInitials = storedPlayerInitials;\n }\n var storedPlayerScores = JSON.parse(localStorage.getItem(\"player-scores\"));\n if (storedPlayerScores !== null) {\n playerScores = storedPlayerScores;\n }\n}", "title": "" }, { "docid": "0c3544efc7cb90edb5bfa27a23b03e59", "score": "0.56932366", "text": "function onAllianceInfoReceived(context, data) {\r\n try {\r\n // Crear \r\n rowData = [];\r\n dataTable.setData(rowData);\r\n\r\n var members = data.m;\r\n memberCount = data.mc;\r\n\r\n for (var i in members) {\r\n var member = members[i];\r\n\r\n // For Each member (player); Get the PvP/PvE Score\r\n if (member.n.length > 0) {\r\n ClientLib.Net.CommunicationManager.GetInstance().SendSimpleCommand(\"GetPublicPlayerInfoByName\", {\r\n name: member.n\r\n }, phe.cnc.Util.createEventDelegate(ClientLib.Net.CommandResult, this, onPlayerInfoReceived), null);\r\n }\r\n }\r\n } catch (e) {\r\n console.log(\"onAllianceInfoReceived: \", e);\r\n }\r\n }", "title": "" }, { "docid": "0c3544efc7cb90edb5bfa27a23b03e59", "score": "0.56932366", "text": "function onAllianceInfoReceived(context, data) {\r\n try {\r\n // Crear \r\n rowData = [];\r\n dataTable.setData(rowData);\r\n\r\n var members = data.m;\r\n memberCount = data.mc;\r\n\r\n for (var i in members) {\r\n var member = members[i];\r\n\r\n // For Each member (player); Get the PvP/PvE Score\r\n if (member.n.length > 0) {\r\n ClientLib.Net.CommunicationManager.GetInstance().SendSimpleCommand(\"GetPublicPlayerInfoByName\", {\r\n name: member.n\r\n }, phe.cnc.Util.createEventDelegate(ClientLib.Net.CommandResult, this, onPlayerInfoReceived), null);\r\n }\r\n }\r\n } catch (e) {\r\n console.log(\"onAllianceInfoReceived: \", e);\r\n }\r\n }", "title": "" }, { "docid": "0f4cf7794b276f97f5f90cd545c8c779", "score": "0.56870717", "text": "function getPlayerDetails(player, id) {\n\n var message = null;\n var params = {\n // Request parameters\n };\n\n var options = {\n uri: 'https://api.fantasydata.net/v3/nfl/stats/JSON/Player/' + id,\n headers: {\n 'Ocp-Apim-Subscription-Key': apikey\n },\n json: true // Automatically parses the JSON string in the response\n };\n\n var note = request(options)\n .then(function(info) {\n //console.log(info.UpcomingFanDuelSalary);\n if (info.UpcomingFanDuelSalary !== player.salary) {\n message = player.player + \"'s Salary changed this week!\";\n }\n\n return message;\n })\n .catch(function(err) {\n console.log(err);\n });\n\n return note;\n}", "title": "" }, { "docid": "9524e4afd1931e25006fb2ae50ed553e", "score": "0.568664", "text": "getAlivePlayers(id) {\n return this.getRoom(id).players.filter((player) => player.alive === true);\n }", "title": "" }, { "docid": "49ddc031d7aec04d797c00cbaa6b8caa", "score": "0.56824714", "text": "getCurrentPlayer() {\n return this.findPlayerByName(this.props.playerName);\n }", "title": "" }, { "docid": "af936351eaa23025fef74409b28fca95", "score": "0.5681213", "text": "function loadStatus() {\n document.getElementById(\"player-1-name\").innerHTML = player1.getSymbol() + \" won\";\n document.getElementById(\"player-1-win\").innerHTML = player1win;\n document.getElementById(\"player-2-name\").innerHTML = player2.getSymbol() + \" won\";\n document.getElementById(\"player-2-win\").innerHTML = player2win;\n}", "title": "" }, { "docid": "bebeb42cde43adff1154a82e2baa5df2", "score": "0.5679248", "text": "getPlayerWithTurn() {\n return JSON.parse(JSON.stringify(this.state.players.find((player) => {\n return player.turn\n })))\n }", "title": "" }, { "docid": "16f5e33f6671c3bad474cb0839d4298d", "score": "0.5674133", "text": "function getPlayer(){\n\tvar test = \"A8RZYZZ3\";\n\tconst http = new XMLHttpRequest();\n\tconst url='http://localhost:3001/getUser/A8RZYZZ3';\n\thttp.open(\"GET\", url);\n\thttp.send();\n\thttp.onreadystatechange= function(){\n\t\tif(http.readyState === XMLHttpRequest.DONE && http.status === 200) {\n\t\t\tvar jsonResponse = JSON.parse(http.responseText);\n\t\t\tif(!jsonResponse.length){\n\t\t\t\tconsole.log(\"add new player\");\n\t\t\t\tinsertPlayer();\n\t\t\t} else {\n\t\t\t\tvar player = jsonResponse[0];\n\t\t\t\tif(player.high_score < playerscore){\n\t\t\t\t\tplayer.high_score = playerscore;\n\t\t\t\t}\n\n\t\t\t\tplayer.total_trash = player.total_trash + 10 // aqui seria el acumulado de trash correct?\n\n\t\t\t\t//updatePlayer\n\t\t\t\t//load highscores\n\t\t\t}\n\t \t}\n\t}\n}", "title": "" }, { "docid": "e78197496b11a115e0ceab286b393583", "score": "0.5667775", "text": "function pcByPlayerName (player) {\n for (var i = 0; i < PCs.length; i++) {\n if (player === PCs[i].playerName) {\n return PCs[i];\n }\n }\n\n return false;\n\n}", "title": "" }, { "docid": "f838b6cef79176443945b6ded33d833f", "score": "0.56671464", "text": "async getPlayer(channel, name) {\r\n\t\tif(!name) {\r\n\t\t\treturn null;\r\n\t\t}\r\n // Exact name match\r\n\t\tlet row = await sql.get(this.generatePlayerQuery(`UPPER(p.name) = $name`), {$name: name.toUpperCase(), $channel: channel});\r\n\t\tif(!row) {\r\n\t\t\t// Starts With name match\r\n\t\t\trow = await sql.get(this.generatePlayerQuery(`UPPER(p.name) LIKE ($namePattern)`), {$namePattern: name.toUpperCase() + '%', $channel: channel});\r\n\t\t}\r\n\t\tif(!row) {\r\n\t\t\t// Contains name match\r\n\t\t\trow = await sql.get(this.generatePlayerQuery(`UPPER(p.name) LIKE ($namePattern)`), {$namePattern: '%' + name.toUpperCase() + '%', $channel: channel});\r\n\t\t}\r\n\r\n\t\tif(row) {\r\n\t\t\treturn await this.getPlayerInternal(row);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "22688658d01c6feb30f25ccfbc925839", "score": "0.5663871", "text": "async function getInfo(req, res)\n{\n var id = parseInt(req.params.id);\n var nick = req.params.nick;\n\n var player;\n\n if(id === undefined || isNaN(id))\n {\n if(nick === undefined) return res.status(400).send({message: \"Petición inválida, no se ha enviado ningún dato\"});\n\n else\n {\n try\n {\n player = await MongoJS.findPlayerSafe({ nick: nick });\n }\n catch (error)\n {\n return res.status(502).send({message: \"Base de datos no acepta conexión\"});\n }\n }\n }\n else\n {\n try\n {\n player = await MongoJS.findPlayerSafe({ id: id });\n }\n catch (error)\n {\n return res.status(502).send({message: \"Base de datos no acepta conexión\"});\n }\n }\n\n if (player === null) return res.status(404).send({message: \"No se ha encontrado jugador\"});\n\n return res.send(player);\n}", "title": "" }, { "docid": "47a1d32900a1176d24d4b283e1b797ce", "score": "0.5663304", "text": "getNowPlayingInfo () {\n return this.info\n }", "title": "" }, { "docid": "4ac252929e32c494417b16f7d8d3ba17", "score": "0.56562036", "text": "function GetPlayerProxy(player) {\n\n\t\treturn {\n\t\t\tname: player.data.get(\"name\"),\n\t\t\tcolor: player.data.get(\"color\"),\n\t\t\tpoints: player.data.get(\"point\"),\n\t\t\tpurchasedItems: player.data.get(\"purchasedItems\"),\n\t\t\tresources: player.data.get(\"resources\")\n\t\t};\n\t}", "title": "" }, { "docid": "ab9456e074f1c67837708fdd3d101b2a", "score": "0.56509876", "text": "getActivePlayerName () {\n return THIS.view.players[THIS.view.currentPlayer].displayName\n }", "title": "" }, { "docid": "8a9a08c09859c8111365d701b7886d76", "score": "0.5647347", "text": "getPlaying() {\n return apiClient.get(\n '/movie/now_playing?api_key=6c1e80dae659cb7d1abdf16afd8bb0e3&language=en-US&page=1'\n )\n }", "title": "" }, { "docid": "feb22e93e79331bf7bd810a4c7cde6f6", "score": "0.5646884", "text": "function getAvailableGames() {\n ticTacToeData\n .getAvailableGames(auth.access_token())\n .then(function (data) {\n $scope.availableGames = data;\n $scope.allMyGames = $scope.allMyGames.concat(data);\n });\n }", "title": "" }, { "docid": "11c917e62363c49623d904b92196cc34", "score": "0.56457573", "text": "function showPlayers(players) {\n\tvar list_players = [];\n\tvar list_players_10pts = [];\n\tvar list_players_5rbs = [];\n\tfor(var i = 0; i < players.length; i++) {\n\t\tlist_players.push(players[i].name);\n\t\tif(players[i].avgPoints > 10) list_players_10pts.push(players[i].name);\n\t\tif(players[i].avgRebounds > 5) list_players_5rbs.push(players[i].name);\n\t}\n\tconsole.log(\"All players: \" + list_players);\n\tconsole.log(\"Players who average more than 10 points per game: \" + list_players_10pts);\n\tconsole.log(\"Players who average more that 5 rebounds per game: \" + list_players_5rbs);\n}", "title": "" }, { "docid": "a6957540fe64ac1725a0ae8f62ddb4a7", "score": "0.5642178", "text": "function fetchSpecificTeamData(value) {\n fetch(`https://free-nba.p.rapidapi.com/games/${value}`, {\n method: \"GET\",\n headers: {\n \"x-rapidapi-key\": \"85d43d1b47msh7273a9c7d1d5c94p1b0a1cjsnbc483a52d1e3\",\n \"x-rapidapi-host\": \"free-nba.p.rapidapi.com\",\n },\n })\n .then((response) => response.json())\n .then((json) => fillFilteredData(json));\n}", "title": "" } ]
8fc2647c52f8f2d5730b8a331e821bdd
Start chaining a wrapped Underscore object.
[ { "docid": "a8bc586f4e18ab6638606f0a2216bb9d", "score": "0.646587", "text": "function chain(obj) {\n var instance = _$1(obj);\n instance._chain = true;\n return instance;\n }", "title": "" } ]
[ { "docid": "5e7c11abdba921b141d59cd2e8fe6c6b", "score": "0.7320745", "text": "function chain(obj) {\n var instance = underscore(obj);\n instance._chain = true;\n return instance;\n }", "title": "" }, { "docid": "1bbc5bc23785f694b119c634a3f9d148", "score": "0.7029015", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n }", "title": "" }, { "docid": "1bbc5bc23785f694b119c634a3f9d148", "score": "0.7029015", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n }", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "54ca2d3922a093083d356b475a369634", "score": "0.6986945", "text": "function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}", "title": "" }, { "docid": "1305827704ed3923dc5615389af77210", "score": "0.6941055", "text": "function __(obj) { return _(obj).chain() }", "title": "" }, { "docid": "eb33b9e2ccb4a47b50df9d751cb2738c", "score": "0.643544", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n }", "title": "" }, { "docid": "eb33b9e2ccb4a47b50df9d751cb2738c", "score": "0.643544", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n }", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "4a9d57e57a58aca30823514f1e6068e9", "score": "0.63588613", "text": "function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}", "title": "" }, { "docid": "5e60c49e67d0e11d60307e0544bec1f4", "score": "0.537176", "text": "function ring(args) { return initObject(this, ring, args) }", "title": "" }, { "docid": "f177ec54ac1468ccf057843a3ffc1203", "score": "0.53352076", "text": "static create (key, userInvocationStack, specWindow, args) {\n const chainer = new $Chainer(userInvocationStack, specWindow)\n\n // this is the first command chained off of cy, so we use\n // the stack passed in from that call instead of the stack\n // from this invocation\n chainer.useInitialStack = true\n\n // since this is the first function invocation\n // we need to pass through onto our instance methods\n const chain = chainer[key].apply(chainer, args)\n\n chain.useInitialStack = false\n\n return chain\n }", "title": "" }, { "docid": "65ed392e318255279eac51a546cdfc6f", "score": "0.533041", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n }", "title": "" }, { "docid": "65ed392e318255279eac51a546cdfc6f", "score": "0.533041", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n }", "title": "" }, { "docid": "7c83159b17c3367c1d553878a44221f5", "score": "0.52933675", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n }", "title": "" }, { "docid": "7c83159b17c3367c1d553878a44221f5", "score": "0.52933675", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n }", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "360cf7f12d6e942ad4c2946fff320d0b", "score": "0.5225561", "text": "function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}", "title": "" }, { "docid": "cddadd8ef75f6c387901ceecfd6287ff", "score": "0.5133234", "text": "function _$1(obj) {\n if (obj instanceof _$1) return obj;\n if (!(this instanceof _$1)) return new _$1(obj);\n this._wrapped = obj;\n }", "title": "" }, { "docid": "cddadd8ef75f6c387901ceecfd6287ff", "score": "0.5133234", "text": "function _$1(obj) {\n if (obj instanceof _$1) return obj;\n if (!(this instanceof _$1)) return new _$1(obj);\n this._wrapped = obj;\n }", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "db9dfc8a90c7a30eba2b702818a5db9f", "score": "0.51320976", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}", "title": "" }, { "docid": "74f1fee1c18370d0b0862f530e7101d5", "score": "0.513123", "text": "function _object_init() {//\"this\" refers to the initialized object\n var args, i, len;\n \n Bench.start(\"Atom#init\");\n \n //1. apply mixin\n args = slice.call(arguments, 0);\n len = args[0] ? args.length : 0;//prevent invoking with no arguments\n\n for(i=0;i<len;i++) {\n extend(this, args[i]);\n }\n //2. save a guid\n this.guid = \"%@-%@\".fmt(\"object\", Q.guid());\n\n //3. save created time\n this.createdAt = new Date();\n \n if(!this.lazy) {\n //4. run #init\n if(this.init) this.init();\n \n //5. run #initMixin if any\n if(this.initMixin) {\n if(Q.typeOf(this.initMixin) == \"array\") {\n this.initMixin.invoke();\n } else {\n this.initMixin();\n }\n }\n } \n \n Bench.end(\"Atom#init\");\n\n //finaly, return\n return this;\n }", "title": "" }, { "docid": "b59b2889d4c0d2807917868f41cf1d6b", "score": "0.5104473", "text": "function chain() {\n const results = actions.map(a => a.call(this)).filter(r=>r)\n if (!results.length) { return }\n const result = {};\n for (let r of results) { _.extend(result,r); }\n return result;\n }", "title": "" }, { "docid": "69161ccdeff584524ba0c3982551e2e0", "score": "0.50926507", "text": "chain(fn) {\n\t\treturn this.bind(fn);\n\t}", "title": "" }, { "docid": "eecc9425a51722d063f2e0968cfd8cb9", "score": "0.5084081", "text": "withWrap(shouldWrap = true) {\n this._wrap = shouldWrap;\n return this;\n }", "title": "" }, { "docid": "eecc9425a51722d063f2e0968cfd8cb9", "score": "0.5084081", "text": "withWrap(shouldWrap = true) {\n this._wrap = shouldWrap;\n return this;\n }", "title": "" }, { "docid": "8140ed70f9b06fc4401e7bc5a9c4687a", "score": "0.50329804", "text": "function underscoreServiceWrapper() {\n //console.log(\"underscoreServiceWrapper\");\n\n //This is what underscore does, so effectively the whole purpose of this service \n //is to change the syntax BACK to just \"_.*\"\n return window._;\n }", "title": "" }, { "docid": "6689d4d9555511a8f536ba19beab53f5", "score": "0.5001523", "text": "use(fn) {\n super.use(fn);\n this.composedMiddleware = compose(this.middleware);\n return this;\n }", "title": "" }, { "docid": "ce565b0b747e6a45cef720bf5698e49d", "score": "0.50005007", "text": "function K() { return this; }", "title": "" }, { "docid": "e374875111b99d523ca63742d143c988", "score": "0.49710304", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _$1[name] = obj[name];\n _$1.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_$1, args));\n };\n });\n return _$1;\n }", "title": "" }, { "docid": "e374875111b99d523ca63742d143c988", "score": "0.49710304", "text": "function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _$1[name] = obj[name];\n _$1.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_$1, args));\n };\n });\n return _$1;\n }", "title": "" }, { "docid": "8f45336cbd93a12309295eae6160bd50", "score": "0.49635142", "text": "start(val) {\n this._start = val;\n return this;\n }", "title": "" }, { "docid": "7777e839c9e15247b04d7394c3d99860", "score": "0.49439102", "text": "with(data) {\n return new (this.constructor)(merge(this, data));\n }", "title": "" }, { "docid": "8e3916fd574938a5f3cca297a737404a", "score": "0.49398214", "text": "run() {\n return this;\n }", "title": "" }, { "docid": "55ecbd0a2b52fa4cc43aa70ed64cdd3d", "score": "0.49189973", "text": "_makeIterator() {\n return this.fn.apply(this.context, this.args);\n }", "title": "" }, { "docid": "86e8a5a81a1fac6adc0d9ac08568353e", "score": "0.49170107", "text": "function chain1(a,b){\n this.a=a;\n this.b=b;\n}", "title": "" }, { "docid": "b5a2bcf712cdac114b2d2b104dfe6870", "score": "0.49168587", "text": "async start() {\n throw new NotImplementedError();\n\n return this;\n }", "title": "" }, { "docid": "84997611981f1f469e8452c76ac5ad96", "score": "0.4909738", "text": "function chainResult(instance, obj) {\n return instance._chain ? _$1(obj).chain() : obj;\n }", "title": "" }, { "docid": "84997611981f1f469e8452c76ac5ad96", "score": "0.4909738", "text": "function chainResult(instance, obj) {\n return instance._chain ? _$1(obj).chain() : obj;\n }", "title": "" }, { "docid": "f20c3f0ee10c0f7f6d2eed7d2e6e8802", "score": "0.49030316", "text": "function chain(cb){\n\t\tchainCallback = cb;\n\t\treturn exports;\n\t}", "title": "" }, { "docid": "cca190b794003e7d0093464958bf89a0", "score": "0.4886026", "text": "function funutils() {\n var service = {\n cat: cat,\n mapcat: mapcat,\n construct: construct,\n partial: partial,\n partial1: partial1,\n renameKeys: renameKeys,\n pickOptional: pickOptional\n };\n return service;\n\n //-------\n\n function cat() {\n var head = _.first(arguments);\n if (head !== null) {\n return head.concat.apply(head, _.rest(arguments));\n }\n return [];\n }\n\n function mapcat(fun, coll) {\n return cat.apply(null, _.map(coll, fun));\n }\n\n function construct(head, tail) {\n return cat([head], _.toArray(tail));\n }\n\n function partial(fun /*, pargs */) {\n var pargs = _.drop(arguments);\n\n return function(/* arguments */) {\n var args = cat(pargs, _.toArray(arguments));\n return fun.apply(fun, args);\n };\n }\n\n function partial1(fun, arg1) {\n return function(/* args */) {\n var args = construct(arg1, arguments);\n return fun.apply(fun, args);\n };\n }\n\n function renameKeys(obj, newNames) {\n return _.reduce(newNames,\n function(o, nu, old) {\n if (_.has(obj, old)) { o[nu] = obj[old]; }\n return o;\n },\n _.omit.apply(null, construct(obj, _.keys(newNames))));\n }\n\n function pickOptional(obj /*, keys */) {\n var keys = _.drop(arguments);\n var result = {};\n _.each(keys, function(key) {\n if ((obj[key] !== undefined) && (obj[key] !== null)) {\n result[key] = obj[key];\n }\n });\n return result;\n }\n\n }", "title": "" }, { "docid": "811ed2828ccacec27f86729d47baca2a", "score": "0.4873919", "text": "_wrap(generator) {\n return new Sequence({ [Symbol.iterator]: generator.bind(this) });\n }", "title": "" }, { "docid": "950e3c75d2776c73ca6b69eec7c24fc9", "score": "0.4862521", "text": "constructor() {\n\t\treturn (async() => {\n\t\t\treturn this;\n\t\t})();\n\t}", "title": "" }, { "docid": "fb254ad73e0a17af2bd8be2e359fdc91", "score": "0.48622423", "text": "function forge() {\n\t var inst = Object.create(this.prototype);\n\t var obj = this.apply(inst, arguments);\n\t return (Object(obj) === obj ? obj : inst);\n\t }", "title": "" }, { "docid": "3a4ca955474b8cb2206491a23a1c9ff7", "score": "0.4838786", "text": "function typal_mix() {\n var self = this;\n for(var i=0,o,k; i<arguments.length; i++) {\n o=arguments[i];\n if (!o) continue;\n if (Object.prototype.hasOwnProperty.call(o,'constructor'))\n this.constructor = o.constructor;\n if (Object.prototype.hasOwnProperty.call(o,'toString'))\n this.toString = o.toString;\n for(k in o) {\n if (Object.prototype.hasOwnProperty.call(o, k)) {\n if(k.match(position) && typeof this[k.replace(position, '')] === 'function')\n layerMethod.call(this, k, o[k]);\n else\n this[k] = o[k];\n }\n }\n }\n return this;\n}", "title": "" }, { "docid": "16251239dfcf48d89b67fcfb4229de26", "score": "0.48314413", "text": "function makeWrapped() {\n this.GoogleAPIError = GoogleAPIError;\n this.GAPIError = GAPIError;\n this.AuthenticationError = AuthenticationError;\n this.APIResponseError = APIResponseError;\n this.load = loadAPI;\n this.withAuth = function(f) {return failCheck(authCheck(f));};\n this.request = (function(params, skipAuth) {\n return gQ(function() { return gapi.client.request(params); }, skipAuth);\n });\n this.auth = auth;\n this.hasAuth = function() { return auth !== null; };\n }", "title": "" }, { "docid": "aa6b2c19f597cc09615957852871276a", "score": "0.48166192", "text": "function A() {\r\n return _this;\r\n }", "title": "" }, { "docid": "e38e1d10ec51b3892bf126e2e64f443e", "score": "0.4788088", "text": "function _init() {\n var self = this\n ;\n\n }", "title": "" }, { "docid": "8d635f5343d4d7e232cf242fdf74d012", "score": "0.47779915", "text": "function _() { }", "title": "" }, { "docid": "8d635f5343d4d7e232cf242fdf74d012", "score": "0.47779915", "text": "function _() { }", "title": "" }, { "docid": "8d635f5343d4d7e232cf242fdf74d012", "score": "0.47779915", "text": "function _() { }", "title": "" }, { "docid": "8d635f5343d4d7e232cf242fdf74d012", "score": "0.47779915", "text": "function _() { }", "title": "" }, { "docid": "e9247458246b55e8db4825f2ac189262", "score": "0.4777067", "text": "function z(){r.call(this)}", "title": "" }, { "docid": "3deb1cfebee5b11e8a2176a0b9997976", "score": "0.47688326", "text": "function underscore() {\n var _ = {};\n\n // Current version.\n _.VERSION = '1.5.2-Webflow';\n\n // Establish the object that gets returned to break out of a loop iteration.\n var breaker = {};\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n concat = ArrayProto.concat,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeForEach = ArrayProto.forEach,\n nativeMap = ArrayProto.map,\n nativeReduce = ArrayProto.reduce,\n nativeReduceRight = ArrayProto.reduceRight,\n nativeFilter = ArrayProto.filter,\n nativeEvery = ArrayProto.every,\n nativeSome = ArrayProto.some,\n nativeIndexOf = ArrayProto.indexOf,\n nativeLastIndexOf = ArrayProto.lastIndexOf,\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind;\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles objects with the built-in `forEach`, arrays, and raw objects.\n // Delegates to **ECMAScript 5**'s native `forEach` if available.\n var each = _.each = _.forEach = function(obj, iterator, context) {\n /* jshint shadow:true */\n if (obj == null) return;\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, length = obj.length; i < length; i++) {\n if (iterator.call(context, obj[i], i, obj) === breaker) return;\n }\n } else {\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;\n }\n }\n };\n\n // Return the results of applying the iterator to each element.\n // Delegates to **ECMAScript 5**'s native `map` if available.\n _.map = _.collect = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n each(obj, function(value, index, list) {\n results.push(iterator.call(context, value, index, list));\n });\n return results;\n };\n\n // Return all the elements that pass a truth test.\n // Delegates to **ECMAScript 5**'s native `filter` if available.\n // Aliased as `select`.\n _.filter = _.select = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\n each(obj, function(value, index, list) {\n if (iterator.call(context, value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Delegates to **ECMAScript 5**'s native `some` if available.\n // Aliased as `any`.\n var any = _.some = _.any = function(obj, iterator, context) {\n iterator || (iterator = _.identity);\n var result = false;\n if (obj == null) return result;\n if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\n each(obj, function(value, index, list) {\n if (result || (result = iterator.call(context, value, index, list))) return breaker;\n });\n return !!result;\n };\n\n // Determine if the array or object contains a given value (using `===`).\n // Aliased as `include`.\n _.contains = _.include = function(obj, target) {\n if (obj == null) return false;\n if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n return any(obj, function(value) {\n return value === target;\n });\n };\n\n // Function (ahem) Functions\n // --------------------\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){ return func.apply(null, args); }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = function(func) {\n return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n };\n\n // Returns a function, that, when invoked, will only be triggered once every\n // browser animation frame - using tram's requestAnimationFrame polyfill.\n _.throttle = function(func) {\n var wait, args, context;\n return function () {\n if (wait) return;\n wait = true;\n args = arguments;\n context = this;\n window.tram.frame(function () {\n wait = false;\n func.apply(context, args);\n });\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n return function() {\n context = this;\n args = arguments;\n timestamp = new Date();\n var later = function() {\n var last = (new Date()) - timestamp;\n if (last < wait) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n if (!timeout) {\n timeout = setTimeout(later, wait);\n }\n if (callNow) result = func.apply(context, args);\n return result;\n };\n };\n\n // Object Functions\n // ----------------\n\n // Retrieve the names of an object's properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = nativeKeys || function(obj) {\n if (obj !== Object(obj)) throw new TypeError('Invalid object');\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n return keys;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return hasOwnProperty.call(obj, key);\n };\n\n // Export underscore\n return _;\n }", "title": "" }, { "docid": "3deb1cfebee5b11e8a2176a0b9997976", "score": "0.47688326", "text": "function underscore() {\n var _ = {};\n\n // Current version.\n _.VERSION = '1.5.2-Webflow';\n\n // Establish the object that gets returned to break out of a loop iteration.\n var breaker = {};\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n concat = ArrayProto.concat,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeForEach = ArrayProto.forEach,\n nativeMap = ArrayProto.map,\n nativeReduce = ArrayProto.reduce,\n nativeReduceRight = ArrayProto.reduceRight,\n nativeFilter = ArrayProto.filter,\n nativeEvery = ArrayProto.every,\n nativeSome = ArrayProto.some,\n nativeIndexOf = ArrayProto.indexOf,\n nativeLastIndexOf = ArrayProto.lastIndexOf,\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind;\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles objects with the built-in `forEach`, arrays, and raw objects.\n // Delegates to **ECMAScript 5**'s native `forEach` if available.\n var each = _.each = _.forEach = function(obj, iterator, context) {\n /* jshint shadow:true */\n if (obj == null) return;\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, length = obj.length; i < length; i++) {\n if (iterator.call(context, obj[i], i, obj) === breaker) return;\n }\n } else {\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;\n }\n }\n };\n\n // Return the results of applying the iterator to each element.\n // Delegates to **ECMAScript 5**'s native `map` if available.\n _.map = _.collect = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);\n each(obj, function(value, index, list) {\n results.push(iterator.call(context, value, index, list));\n });\n return results;\n };\n\n // Return all the elements that pass a truth test.\n // Delegates to **ECMAScript 5**'s native `filter` if available.\n // Aliased as `select`.\n _.filter = _.select = function(obj, iterator, context) {\n var results = [];\n if (obj == null) return results;\n if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);\n each(obj, function(value, index, list) {\n if (iterator.call(context, value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Delegates to **ECMAScript 5**'s native `some` if available.\n // Aliased as `any`.\n var any = _.some = _.any = function(obj, iterator, context) {\n iterator || (iterator = _.identity);\n var result = false;\n if (obj == null) return result;\n if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);\n each(obj, function(value, index, list) {\n if (result || (result = iterator.call(context, value, index, list))) return breaker;\n });\n return !!result;\n };\n\n // Determine if the array or object contains a given value (using `===`).\n // Aliased as `include`.\n _.contains = _.include = function(obj, target) {\n if (obj == null) return false;\n if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;\n return any(obj, function(value) {\n return value === target;\n });\n };\n\n // Function (ahem) Functions\n // --------------------\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){ return func.apply(null, args); }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = function(func) {\n return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));\n };\n\n // Returns a function, that, when invoked, will only be triggered once every\n // browser animation frame - using tram's requestAnimationFrame polyfill.\n _.throttle = function(func) {\n var wait, args, context;\n return function () {\n if (wait) return;\n wait = true;\n args = arguments;\n context = this;\n window.tram.frame(function () {\n wait = false;\n func.apply(context, args);\n });\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n return function() {\n context = this;\n args = arguments;\n timestamp = new Date();\n var later = function() {\n var last = (new Date()) - timestamp;\n if (last < wait) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n if (!timeout) {\n timeout = setTimeout(later, wait);\n }\n if (callNow) result = func.apply(context, args);\n return result;\n };\n };\n\n // Object Functions\n // ----------------\n\n // Retrieve the names of an object's properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = nativeKeys || function(obj) {\n if (obj !== Object(obj)) throw new TypeError('Invalid object');\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n return keys;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return hasOwnProperty.call(obj, key);\n };\n\n // Export underscore\n return _;\n }", "title": "" }, { "docid": "95b70191bc05bb0097b59d3cc45bc98c", "score": "0.47595057", "text": "function Wrapper() {}", "title": "" }, { "docid": "95b70191bc05bb0097b59d3cc45bc98c", "score": "0.47595057", "text": "function Wrapper() {}", "title": "" }, { "docid": "63810ab52f488cb7f182199b41f529c4", "score": "0.47439963", "text": "function _init() {\n var self = this\n ;\n\n\n }", "title": "" }, { "docid": "acdf2e4c01f3e19f88dc1f186b96b0bb", "score": "0.47298202", "text": "function baseLodash() {\n }", "title": "" }, { "docid": "814efc6f25b17df6984cb24e63244fb5", "score": "0.47229818", "text": "function _() {} // Initial state", "title": "" }, { "docid": "ea5eb1fb1458935d5b949b372063dd7a", "score": "0.4717894", "text": "function C(){r.call(this)}", "title": "" }, { "docid": "d8fb9a66c6384dae259accba6034cb5f", "score": "0.4711269", "text": "function _chain(f1, f2) { return function() { f1.apply(this, arguments); return f2.apply(this, arguments); }; }", "title": "" }, { "docid": "e28df6460c153ea4bf7de98fecd3a27d", "score": "0.4707588", "text": "function ControllerChain() {}", "title": "" }, { "docid": "f82347bfc2ed559ee732d63fb0ed41ce", "score": "0.4707447", "text": "function K() {\n return this;\n}", "title": "" }, { "docid": "1b02358296c4549c9f0da186c1589fad", "score": "0.46987996", "text": "function returnThis () { return this }", "title": "" }, { "docid": "8e1ec0dd85cee3ea18596dad4a53e186", "score": "0.46982563", "text": "function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kl.apply(this,arguments)}", "title": "" }, { "docid": "97588b7421d1270f8410951293a34202", "score": "0.46922165", "text": "function toSelf() {\n var instance = this;\n var setStateThen = function(update) {\n return function(effects) {\n return function() {\n instance.setState(function(state) {\n return { $$state: update(state.$$state) };\n }, effects);\n };\n };\n };\n var self = {\n props: instance.props.$$props,\n state: instance.state === null ? null : instance.state.$$state,\n setState: function(update) {\n return setStateThen(update)(undefined);\n },\n setStateThen: setStateThen,\n instance_: instance\n };\n return self;\n }", "title": "" }, { "docid": "f3ac4348aa58435b81d50bb360411500", "score": "0.46888617", "text": "function i(e){if(!(this instanceof i))return new i(e);this._wrapped=e}", "title": "" }, { "docid": "0ddaec49d3d94a0ab2b0954fa200781c", "score": "0.46642205", "text": "start() {\n this.ticker.start();\n return this;\n }", "title": "" }, { "docid": "acea8198500cac26cf95d44056a65ebb", "score": "0.4663738", "text": "here(callback) {\n return this;\n }", "title": "" } ]
24213fcb209f6955a9faec66f9f4f0bf
Class for cursor adornments when displaying selected actor
[ { "docid": "ffd0517d19ef63f9398fd64275a32bc5", "score": "0.6582267", "text": "function Cursors() {\n \"use strict\";\n var i;\n var a;\n this.attachedTo = null;\n this.resizers = []; // array of 8 small square resizers\n this.lines = []; // array of 4 bounding box lines\n this.lineColor = [0.5, 0.5, 0.5, 1];\n this.resizerColor = [0, 0, 0, 1];\n this.depthAdornments = new DepthAdornment();\n\n for (i = 0; i < 4; i++) { // lines\n a = dali.createSolidColorActor(this.lineColor, false, [0, 0, 0, 1], 0);\n a.name = \"**_dali_adornment\";\n this.lines.push(a);\n }\n\n for(i = 0; i < 8; i++) { // squares\n a = dali.createSolidColorActor(this.resizerColor, true, [1, 1, 1, 1], 1);\n a.name = \"**_dali_adornment\";\n this.resizers.push(a);\n this.resizers[i].size = [10, 10, 1];\n }\n\n ActorList.show(this.lines, false);\n ActorList.show(this.resizers, false);\n\n}", "title": "" } ]
[ { "docid": "bf1f7ef2ace30befa26a87a029d3d675", "score": "0.5876524", "text": "cursorLocation(){ return this.edit.selection.getCursor() }", "title": "" }, { "docid": "cb96e38b5d5d67210deb3d1fb9e85069", "score": "0.5802756", "text": "buildCursor(props) {\n let cursorCameraControls = `movement-controls=\"controls: checkpoint\"`;\n let cursor = ``;\n\n if (props.cursorCamera === true) {\n // Add camera cursor\n // cursorCameraControls = `look-controls movement-controls=\"controls: checkpoint\"`;\n cursorCameraControls = `look-controls`;\n cursor = `<a-entity\n cursor=\"fuse: true\"\n material=\"color: black; shader: flat\"\n position=\"0 0 -3\"\n raycaster=\"objects: ${props.cursorTargetClass};\"\n geometry=\"primitive: ring; radiusInner: 0.08; radiusOuter: 0.1;\"\n >\n </a-entity>`;\n }\n return {\n cursorCameraControls: cursorCameraControls,\n cursor: cursor\n }\n }", "title": "" }, { "docid": "3552392cc75d9cb48d3d93fada90edb8", "score": "0.5721709", "text": "function show_cursor() {\n //Function to show/hide the cursor\n if (cursor.classList.contains('rjs_cursor_hidden')) {\n cursor.classList.remove('cursor_hidden')\n }\n cursor.classList.add('cursor_visible')\n}", "title": "" }, { "docid": "d133b6242b57115cf5ccac831665197d", "score": "0.56909215", "text": "function onActorSelected(actor) {\n \"use strict\";\n var i;\n var name;\n var gridBlock;\n var nameBlock;\n var valueBlock;\n var actorId;\n\n //\n // recreate property tab\n //\n var elem = document.getElementById(\"selected\");\n\n removeAllChildren(elem);\n\n //\n // setup property view\n //\n if (actor) {\n actorId = actor.getId();\n\n var p = document.createElement(\"div\");\n p.innerHTML = \"<h3><b>\" + actor.name + \"</b> [<b>\" + actorId + \"</b>] (<b>\" + actor.position + \"</b>)</h3>\";\n elem.appendChild(p);\n\n var parent = actor.getParent();\n if(parent) {\n p = document.createElement(\"div\");\n p.innerHTML =\n \"<p>\" +\n \"(Parent: <b>\" + parent.name + \"</b> [<b>\" + parent.getId() + \"</b>] (<b>\" + parent.position + \"</b>)\" +\n \" Anchored: <b>\" + actor.anchorPoint + \"</b>\" +\n \" ParentOrigin: <b>\" + actor.parentOrigin + \"</b> )\" +\n \"</p>\";\n elem.appendChild(p);\n }\n\n if( actorId in actorIdToShaderSet &&\n \"shaderEffect\" in actorIdToShaderSet[actorId]) { // if has compiled\n var shaderOptions = actorIdToShaderSet[actorId];\n var uniforms = dali.sourceUniformMetaData(shaderOptions.vertex);\n uniforms = uniforms.concat(dali.sourceUniformMetaData(shaderOptions.fragment));\n\n var shader = getShader(actor);\n\n if(uniforms.length) {\n gridBlock = document.createElement(\"div\");\n gridBlock.className = \"row\";\n\n nameBlock = document.createElement(\"div\");\n nameBlock.className = \"col-md-5\";\n nameBlock.innerHTML = \"<u>Shader Uniforms:</u>\";\n gridBlock.appendChild(nameBlock);\n\n valueBlock = document.createElement(\"div\");\n valueBlock.className = \"col-md-7\";\n valueBlock.innerHTML = \"\";\n gridBlock.appendChild(valueBlock);\n\n elem.appendChild(gridBlock);\n\n for(i = 0; i < uniforms.length; i++) {\n var type = uniforms[i].type;\n name = uniforms[i].name;\n gridBlock = document.createElement(\"div\");\n gridBlock.className = \"row\";\n\n nameBlock = document.createElement(\"div\");\n nameBlock.className = \"col-md-5\";\n nameBlock.innerHTML = type + \" \" + name + \"<i> (Animatable) </i>\";\n\n gridBlock.appendChild(nameBlock);\n\n valueBlock = document.createElement(\"div\");\n valueBlock.className = \"col-md-7\";\n valueBlock.innerHTML = shader[ name ];\n gridBlock.appendChild(valueBlock);\n\n elem.appendChild(gridBlock);\n\n }\n }\n\n }\n\n // getproperties returns std::vector<string>\n var props = actor.getProperties();\n\n gridBlock = document.createElement(\"div\");\n gridBlock.className = \"row\";\n\n nameBlock = document.createElement(\"div\");\n nameBlock.className = \"col-md-5\";\n nameBlock.innerHTML = \"<u>Properties:</ul>\";\n gridBlock.appendChild(nameBlock);\n\n valueBlock = document.createElement(\"div\");\n valueBlock.className = \"col-md-7\";\n valueBlock.innerHTML = \"\";\n gridBlock.appendChild(valueBlock);\n\n elem.appendChild(gridBlock);\n\n\n for (i = 0; i < props.size(); i++) {\n name = props.get(i);\n\n gridBlock = document.createElement(\"div\");\n gridBlock.className = \"row\";\n\n var animatable = actor.isPropertyAnimatable(actor.getPropertyIndex(name));\n\n nameBlock = document.createElement(\"div\");\n nameBlock.className = \"col-md-5\";\n if(animatable) {\n nameBlock.innerHTML = \"'\" + name + \"'\" + \"<i> (animatable)</i>\";\n } else {\n nameBlock.innerHTML = \"'\" + name + \"'\";\n }\n gridBlock.appendChild(nameBlock);\n\n valueBlock = document.createElement(\"div\");\n valueBlock.className = \"col-md-7\";\n\n valueBlock.appendChild( createElementForActorProperty(actor, name) );\n\n gridBlock.appendChild(valueBlock);\n\n elem.appendChild(gridBlock);\n }\n\n props.delete();\n\n }\n\n}", "title": "" }, { "docid": "76d9c637c0a71fb72289aa88453c6dd8", "score": "0.56696385", "text": "function crosshairCursor(options = {}) {\n let [code, getter] = keys[options.key || 'Alt']\n let plugin = dist_ViewPlugin.fromClass(\n class {\n constructor(view) {\n this.view = view\n this.isDown = false\n }\n set(isDown) {\n if (this.isDown != isDown) {\n this.isDown = isDown\n this.view.update([])\n }\n }\n },\n {\n eventHandlers: {\n keydown(e) {\n this.set(e.keyCode == code || getter(e))\n },\n keyup(e) {\n if (e.keyCode == code || !getter(e)) this.set(false)\n },\n mousemove(e) {\n this.set(getter(e))\n }\n }\n }\n )\n return [\n plugin,\n EditorView.contentAttributes.of((view) => {\n var _a\n return (\n (_a = view.plugin(plugin)) === null || _a === void 0\n ? void 0\n : _a.isDown\n )\n ? showCrosshair\n : null\n })\n ]\n }", "title": "" }, { "docid": "c3cfce1f29fa4191ae44ef024990bf2f", "score": "0.5665979", "text": "initCursor(){\n\t\tthis.cursor.setAttribute(\"fuse\",false);\n\t\tthis.cursor.setAttribute(\"position\", \"0 0 -0.1\");\n\t\tthis.cursor.setAttribute(\"size\", \"0.1\");\n\t\tthis.cursor.setAttribute(\"color\",\"#ffc421\");\n\t\tthis.cursor.setAttribute(\"geometry\", \"primitive: ring; radiusInner: 0.0005; radiusOuter: 0.001\");\n\t\tthis.cursor.setAttribute(\"raycaster\",\"objects: .clickable; far: 90;\");\n\t}", "title": "" }, { "docid": "14ef3a3ef170dd1e5b4fcd6ef039a0e8", "score": "0.56421", "text": "function on_cursor_activity() {\n if (!$popup.hasClass('emoji-autocomplete__m-visible')) return;\n\n let editor = N.MDEdit.__textarea__;\n\n if (editor.selectionStart !== editor.selectionEnd) {\n // something is selected\n $popup.removeClass('emoji-autocomplete__m-visible');\n return;\n }\n\n // Get line before cursor\n let lineStart = editor.value.lastIndexOf('\\n', editor.selectionStart - 1) + 1;\n let line = editor.value.slice(lineStart, editor.selectionEnd);\n\n if (!emojiAtEndRE.test(line)) {\n $popup.removeClass('emoji-autocomplete__m-visible');\n return;\n }\n\n showPopup(line.match(emojiAtEndRE)[1]);\n }", "title": "" }, { "docid": "3c974c077b761c85dc62ec831dc3af7f", "score": "0.5606479", "text": "static cursor(pos, assoc = 0, bidiLevel, goalColumn) {\n return new SelectionRange(pos, pos, (assoc == 0 ? 0 : assoc < 0 ? 4 /* AssocBefore */ : 8 /* AssocAfter */) |\n (bidiLevel == null ? 3 : Math.min(2, bidiLevel)) |\n ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 33554431 /* NoGoalColumn */) << 5 /* GoalColumnOffset */));\n }", "title": "" }, { "docid": "168c2d3335876c486c673c8e1c0e6f43", "score": "0.55709743", "text": "onMouseOver(){\n this.inputController.selection.add(this.x, this.y)\n }", "title": "" }, { "docid": "3554f33db614f5aa0bfe3b05d864e19b", "score": "0.5560397", "text": "interact(actor) {\n return null;\n }", "title": "" }, { "docid": "ebf1387b2d0a48d8f93c8f8a02b924d9", "score": "0.5554794", "text": "cursorLocation(){ return [0,0] }", "title": "" }, { "docid": "d77da2a0e0bc3c64fec8dda84f2dbf0b", "score": "0.55394506", "text": "static cursor(pos, assoc = 0, bidiLevel, goalColumn) {\n return SelectionRange.create(\n pos,\n pos,\n (assoc == 0\n ? 0\n : assoc < 0\n ? 4 /* RangeFlag.AssocBefore */\n : 8) /* RangeFlag.AssocAfter */ |\n (bidiLevel == null ? 3 : Math.min(2, bidiLevel)) |\n ((goalColumn !== null && goalColumn !== void 0\n ? goalColumn\n : 33554431) /* RangeFlag.NoGoalColumn */ <<\n 5) /* RangeFlag.GoalColumnOffset */\n )\n }", "title": "" }, { "docid": "d001222c6e73fcd7727b0868bbff90ae", "score": "0.55277544", "text": "function enableGrabCursor () { sceneEl.canvas.classList.add('a-grab-cursor'); }", "title": "" }, { "docid": "0a6f6acd47e73230236eda3340d4fb8d", "score": "0.5514088", "text": "function CursorDeviceLayer() {}", "title": "" }, { "docid": "523542c34d821c078d52446e2f7a8cd5", "score": "0.55062735", "text": "function CursorDeviceSlot() {}", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0c1e3059370e423df8f5440ec7c8620e", "score": "0.549639", "text": "function updateSelectionCursor(cm) {\n var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, \"div\");\n display.cursor.style.left = pos.left + \"px\";\n display.cursor.style.top = pos.top + \"px\";\n display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n display.cursor.style.display = \"\";\n\n if (pos.other) {\n display.otherCursor.style.display = \"\";\n display.otherCursor.style.left = pos.other.left + \"px\";\n display.otherCursor.style.top = pos.other.top + \"px\";\n display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n } else { display.otherCursor.style.display = \"none\"; }\n }", "title": "" }, { "docid": "0fcd7cc0705c0c881ece0bc289edbc7c", "score": "0.54776925", "text": "static cursor(pos, assoc = 0, bidiLevel, goalColumn) {\n return new SelectionRange(pos, pos, (assoc == 0 ? 0 : assoc < 0 ? 4 /* AssocBefore */ : 8 /* AssocAfter */) |\n (bidiLevel == null ? 3 : Math.min(2, bidiLevel)) |\n ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 33554431 /* NoGoalColumn */) << 5 /* GoalColumnOffset */));\n }", "title": "" }, { "docid": "9c05c6984ac7e802ba80797aa4cc5e45", "score": "0.54523647", "text": "_addCursorSprite() {\n this.addChild(this._cursorSprite);\n }", "title": "" }, { "docid": "fbede6d29ef958de74283fe69bd1bdd5", "score": "0.54422045", "text": "function cursor(x, y, params) {\n //run component()'s initialization logic - cursor extends component\n component.call(this, x, y, params);\n\n this.image = assetPool.cursorImg;\n\n this.visible = true;\n this.hoverEnemy = false;\n\n //update position with respect to user input\n this.newPos = function () {\n this.x = gameArea.mouseX;\n this.y = gameArea.mouseY;\n };\n this.update = function () {\n if (gameArea.mouseDown) {\n //sprite animation increments to maximum and holds if mouseDown\n if (this.index < 10) {\n this.index += 2;\n } else {\n this.index = 10;\n }\n } else if (this.index > 0) {\n //else decrements to minimum and holds if !mouseDown\n this.index -= 2;\n } else {\n this.index = 0;\n }\n\n if (this.visible) {\n this.width = params.widthMouse;\n this.height = params.heightMouse;\n this.drawSprite();\n } else {\n this.width = params.widthTouch;\n this.height = params.heightTouch;\n }\n };\n }", "title": "" }, { "docid": "5480ff14362b38384de80e9c457a6836", "score": "0.54404855", "text": "update()\n {\n if (this.faune){\n //pass cursor keys to character\n this.faune.update(this.cursors)\n }\n }", "title": "" }, { "docid": "ce52491fdb7fb8b998549450336f8017", "score": "0.5438991", "text": "function Cursor () {\n // What color the cursor is\n this.color = '#ff0000'; // Red\n this.size = 10;\n \n // Where the cursor is on the screen (its upper left corner)\n this.x = 0;\n this.y = 0;\n}", "title": "" }, { "docid": "29eef9fbe7c07011da72e8d0f0981e65", "score": "0.5435067", "text": "cursorIndex(){ return 0 }", "title": "" }, { "docid": "3d3d5f71591f5a3578698229da124045", "score": "0.54302245", "text": "function drawSelectionCursor(cm, range, output) {\r\n var pos = cursorCoords(cm, range.head, \"div\");\r\n\r\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\r\n cursor.style.left = pos.left + \"px\";\r\n cursor.style.top = pos.top + \"px\";\r\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\r\n\r\n if (pos.other) {\r\n // Secondary cursor, shown when on a 'jump' in bi-directional text\r\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\r\n otherCursor.style.display = \"\";\r\n otherCursor.style.left = pos.other.left + \"px\";\r\n otherCursor.style.top = pos.other.top + \"px\";\r\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\r\n }\r\n }", "title": "" }, { "docid": "3ddf0cbe4e8fa7ddb102090a91d9f0f6", "score": "0.54156137", "text": "onMouseDown(){\n this.inputController.selection.start(this.x, this.y)\n }", "title": "" }, { "docid": "f5051d8098c6efc38f872c20254cd2e0", "score": "0.5404917", "text": "function handleSelection() {\n\n}", "title": "" }, { "docid": "b13ed913a634192781fc65669e2300d8", "score": "0.53904545", "text": "displayMainMenu() {\n background(this.sceneData.bgColor); // Alpha value set to 10 for transparency\n // Display all the actors and handle their eating and movement\n this.adam.display(this.sceneData.sizeMultiplier);\n for (let j = 0; j < this.actorFactory.numberOfActors; j++) {\n this.persons[j].move();\n this.persons[j].display();\n }\n }", "title": "" }, { "docid": "04899ca02796660acf70145efc2f4fef", "score": "0.5386125", "text": "function setActive() {\n var activeElements = { // these LHS menu items can be marked as selected\n pencil: document.getElementById('pencil'),\n highlighter: document.getElementById('highlighter'),\n eraser: document.getElementById('eraser'),\n 'input-text': document.getElementById('input-text')\n };\n\n // iterate through the list of aloowed active buttons and add or remove class to highlight the selected item\n Object.keys(activeElements).forEach(function (key) {\n if (key === currentActive) {\n activeElements[key].classList.add('active');\n } else {\n activeElements[key].classList.remove('active');\n }\n });\n\n var pointerStyles = {\n pencil: 'pencil-pointer',\n highlighter: 'highlighter-pointer',\n eraser: 'eraser-pointer',\n 'input-text': 'text-pointer'\n }\n pointerContainer.className = pointerStyles[currentActive];\n // canvas.style.cursor = 'none';\n\n // For highlighters, using the darken property so that the highlighter doesn't overlap the strokes.\n if (currentActive === 'highlighter') {\n // highlighter works only when the strokes are darker and the highlighter color is lighter.\n // TODO: Make the highlighter work with opacity.\n // TODO: highlighter to work on darker strokes.\n context.globalCompositeOperation = 'darken';\n } else {\n context.globalCompositeOperation = 'source-over';\n }\n}", "title": "" }, { "docid": "832e9267a8de51707c2d1236e4750173", "score": "0.53767556", "text": "function capture_cursor(range) {\n var cursorStart = document.createElement('span');\n var collapsed = !!range.collapsed;\n\n cursorStart.id = 'cursorStart';\n cursorStart.appendChild(document.createTextNode('—'));\n range.insertNode(cursorStart);\n\n if(!collapsed) {\n var cursorEnd = document.createElement('span');\n cursorEnd.id = 'cursorEnd';\n range.collapse(true);\n range.insertNode(cursorEnd);\n }\n }", "title": "" }, { "docid": "a41a32794fcc5c393e9082cb1b69fe06", "score": "0.5374285", "text": "function SeSGetAccessibleObjectUnderCursor()\r\n{\r\n\tvar wx = g_util.GetCursorX();\r\n\tvar wy = g_util.GetCursorY();\r\n\treturn SeSGetAccessibleObjectAt(wx, wy);\r\n}", "title": "" }, { "docid": "ccf58e9921a6ccadbed5ed2147dd14de", "score": "0.5368443", "text": "function drawSelectionCursor(cm, head, output) {\n\t var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\t\n\t var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n\t cursor.style.left = pos.left + \"px\";\n\t cursor.style.top = pos.top + \"px\";\n\t cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\t\n\t if (pos.other) {\n\t // Secondary cursor, shown when on a 'jump' in bi-directional text\n\t var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n\t otherCursor.style.display = \"\";\n\t otherCursor.style.left = pos.other.left + \"px\";\n\t otherCursor.style.top = pos.other.top + \"px\";\n\t otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n\t }\n\t }", "title": "" }, { "docid": "ccf58e9921a6ccadbed5ed2147dd14de", "score": "0.5368443", "text": "function drawSelectionCursor(cm, head, output) {\n\t var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\t\n\t var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n\t cursor.style.left = pos.left + \"px\";\n\t cursor.style.top = pos.top + \"px\";\n\t cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\t\n\t if (pos.other) {\n\t // Secondary cursor, shown when on a 'jump' in bi-directional text\n\t var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n\t otherCursor.style.display = \"\";\n\t otherCursor.style.left = pos.other.left + \"px\";\n\t otherCursor.style.top = pos.other.top + \"px\";\n\t otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n\t }\n\t }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.5365128", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.5365128", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.5365128", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.5365128", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.5365128", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.5365128", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "21bb48b73ff18c1108f2a01f50dec906", "score": "0.5365128", "text": "function drawSelectionCursor(cm, range, output) {\n var pos = cursorCoords(cm, range.head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "c80df91eaf328064e2050ce4a19a026b", "score": "0.536099", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "aa4d18c6703e086e51f27e57370adf1c", "score": "0.5360875", "text": "function Cursor() {\r\n\tvar fader2d = Fader2D();\r\n\tvar pushDetector = PushDetector();\r\n\r\n\tvar events = Events();\r\n\tvar api = {\r\n\t\tonattach : onattach,\r\n\t\tondetach : ondetach,\r\n\t\tpushDetector : pushDetector,\r\n\t\tfader2d : fader2d,\r\n\t\tvalue : [0,0],\r\n\t\tx : 0,\r\n\t\ty : 0,\r\n\t}\r\n\tevents.eventify(api);\r\n\t\r\n\tfader2d.addEventListener('valuechange', function(f) {\r\n\t\tapi.value[0] = api.x = f.value[0];\r\n\t\tapi.value[1] = api.y = 1 - f.value[1];\r\n\t\tevents.fireEvent('move', api);\r\n\t});\r\n\r\n\tpushDetector.addEventListener('push', function(pd) {\r\n\t\tevents.fireEvent('push', api);\r\n\t});\r\n\tpushDetector.addEventListener('release', function(pd) {\r\n\t\tevents.fireEvent('release', api);\r\n\t});\r\n\tpushDetector.addEventListener('click', function(pd) {\r\n\t\tevents.fireEvent('click', api);\r\n\t});\r\n\r\n\tfunction onattach(target) {\r\n\t\ttarget.addListener(fader2d);\r\n\t\ttarget.addListener(pushDetector);\r\n\t}\r\n\r\n\tfunction ondetach(target) {\r\n\t\ttarget.removeListener(fader2d);\r\n\t\ttarget.removeListener(pushDetector);\r\n\t}\r\n\r\n\treturn api;\r\n}", "title": "" }, { "docid": "1075206167ee2a8855a021d57d595d0e", "score": "0.5346349", "text": "function drawSelectionCursor(cm, head, output) {\n\t var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\t\n\t var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n\t cursor.style.left = pos.left + \"px\"\n\t cursor.style.top = pos.top + \"px\"\n\t cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\t\n\t if (pos.other) {\n\t // Secondary cursor, shown when on a 'jump' in bi-directional text\n\t var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n\t otherCursor.style.display = \"\"\n\t otherCursor.style.left = pos.other.left + \"px\"\n\t otherCursor.style.top = pos.other.top + \"px\"\n\t otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n\t }\n\t}", "title": "" }, { "docid": "87f84c3dc7d43948bf217d1c850d79f5", "score": "0.53385246", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = _cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", '\\xA0', \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", '\\xA0', \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "f34bde7d333022b73f9e3f9bfcc4b2fe", "score": "0.5329862", "text": "function change_cursor_create_p2(e, attachedElement){\r\n\tattachedElement.style.cursor = \"default\";\r\n\tcreate_p2(e,attachedElement);\r\n}", "title": "" }, { "docid": "5c85943e2ffbac57b3d42e89895cec10", "score": "0.532262", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "6fb1bd2930ecfb15b5c6ad668ea156f9", "score": "0.5319037", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "6fb1bd2930ecfb15b5c6ad668ea156f9", "score": "0.5319037", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "3bfd4e772ac277de40e1bf25b745146d", "score": "0.53169864", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "2c4682229419ba07566323908e21f224", "score": "0.5316797", "text": "function drawSelectionCursor(cm, head, output) {\n\t var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n\t var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n\t cursor.style.left = pos.left + \"px\"\n\t cursor.style.top = pos.top + \"px\"\n\t cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n\t if (pos.other) {\n\t // Secondary cursor, shown when on a 'jump' in bi-directional text\n\t var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n\t otherCursor.style.display = \"\"\n\t otherCursor.style.left = pos.other.left + \"px\"\n\t otherCursor.style.top = pos.other.top + \"px\"\n\t otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n\t }\n\t}", "title": "" }, { "docid": "1e8a504b8c7369e048a40ed24ef54a5a", "score": "0.53132045", "text": "_createCursorSprite() {\n /**\n * @private\n * @readonly\n * @type {DKTools.Sprite.Cursor}\n */\n this._cursorSprite = new DKTools.Sprite.Cursor();\n }", "title": "" }, { "docid": "cc4dcebfa6c00bfab6f62a88db0b1c53", "score": "0.5311619", "text": "actuators()\n {\n }", "title": "" }, { "docid": "b833dc3cbb300f752847f8a8beeaf6dd", "score": "0.5304986", "text": "createCursor() {\n var cursor = document.createElement( 'div' );\n cursor.classList.add( 'cursor' );\n cursor.style.height = this.lineHeight + 'px';\n this.overlay.appendChild( cursor );\n\n return cursor;\n }", "title": "" }, { "docid": "e54319d321ceb3c006f47995fadc46e9", "score": "0.52981657", "text": "get activeSelection() {\n return this.i.activeSelection;\n }", "title": "" }, { "docid": "094edd2adda87925804609fe8047ab88", "score": "0.5295119", "text": "function showCursor(cur) {\n if (cur != undefined) selectCursor(cur);\n slides.style.cursor = currentCursor;\n }", "title": "" }, { "docid": "4ef1a4f321db84e02fc6f3f839d9ba0a", "score": "0.52947116", "text": "toggleMouseCursor(){\n\t\tif(this.useMouse){\n\t\t\tthis.addCursor();\n\t\t\tthis.aelement.setAttribute(\"cursor\",\"\");\n\t\t\tthis.aelement.setAttribute(\"raycaster\",\"\");\n\t\t}else{\n\t\t\tthis.removeCursor();\n\t\t\tthis.aelement.setAttribute(\"cursor\",\"rayOrigin: mouse;\");\n\t\t\tthis.aelement.setAttribute(\"raycaster\",\"objects: .clickable; far: 90;\");\n\t\t}\n\n\t\tthis.useMouse = !this.useMouse;\n\t}", "title": "" }, { "docid": "1e7efae77aedc8915f0d765c3e03d4c0", "score": "0.5285164", "text": "function drawActors(actors) {\n return elt(\"div\", {}, ...actors.map(actor => {\n let rect = elt(\"div\", {class: `actor ${actor.type}`});\n rect.style.width = `${actor.size.x * scale}px`;\n rect.style.height = `${actor.size.y * scale}px`;\n rect.style.left = `${actor.pos.x * scale}px`;\n rect.style.top = `${actor.pos.y * scale}px`;\n return rect;\n }));\n}", "title": "" }, { "docid": "654870f230d0a307e07a14361d6a10db", "score": "0.5284607", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (/\\bcm-fat-cursor\\b/.test(cm.getWrapperElement().className)) {\n var charPos = charCoords(cm, head, \"div\", null, null);\n var width = charPos.right - charPos.left;\n cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + \"px\";\n }\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "654870f230d0a307e07a14361d6a10db", "score": "0.5284607", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (/\\bcm-fat-cursor\\b/.test(cm.getWrapperElement().className)) {\n var charPos = charCoords(cm, head, \"div\", null, null);\n var width = charPos.right - charPos.left;\n cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + \"px\";\n }\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }", "title": "" }, { "docid": "12839f752304e5aafa228a1d98081eae", "score": "0.5271969", "text": "function Cursor (position, selectionEnd) {\n this.position = position;\n this.selectionEnd = selectionEnd;\n }", "title": "" }, { "docid": "12839f752304e5aafa228a1d98081eae", "score": "0.5271969", "text": "function Cursor (position, selectionEnd) {\n this.position = position;\n this.selectionEnd = selectionEnd;\n }", "title": "" }, { "docid": "f6281e6d3efd5c4b4f5704b87b0b5394", "score": "0.52575004", "text": "get cursor() {\n return this.mCursorSprite.position;\n }", "title": "" }, { "docid": "3da0a037cac54365025d9633a0a497d0", "score": "0.525434", "text": "function Cursor (dx, dy) {//{{{\n/*\n dx, dy - offset prenasledovania kurzora\n*/\n var self = this;\n self.sel = null; // aktualny nastroj\n var x, y; // actual mouse position\n var hnd = 0;\n \n this.Add = function (el) {//{{{\n if (self.sel != el) {\n self.Rem ();\n el.addClass ('tool');\n document.body.appendChild (el);\n el.pin ();\n self.sel = el;\n el.setStyle ('opacity', 1.0);\n el.setPosition ({'x':dx + x, 'y':dy + y});\n px = x; py = y;\n \n // Posun kurzora v intervaloch, aby nespomalil prehliadac\n hnd = setInterval (function () {\n if (self.sel) self.sel.setPosition ({'x':dx + x, 'y':dy + y});\n }, 100); // 30\n }\n }//}}}\n this.Rem = function (el) {//{{{\n if (self.sel && (el == undefined || self.sel == el)) {\n // Stopnutie posunu, aby zbytocne netikal\n if (hnd) {\n clearInterval (hnd);\n hnd = 0;\n }\n\n self.sel.unpin ();\n document.body.removeChild (self.sel);\n self.sel.removeClass ('tool');\n self.sel = null;\n }\n }//}}}\n\n $(document).addEvents ({//{{{\n 'mousemove': function (e) {\n x = e.page.x; y = e.page.y;\n /*\n //if (self.sel && (Math.abs (px - x) > 10 || Math.abs (py - y) > 10)) {\n if (self.sel) {\n self.sel.setPosition ({'x':dx + x, 'y':dy + y});\n px = x; py = y;\n }\n */\n }\n });//}}}\n}", "title": "" }, { "docid": "39083760b224b202fa35832fce40d959", "score": "0.5251253", "text": "setCursor (x, y) {\n this.cursor.x = x;\n this.cursor.y = y;\n }", "title": "" }, { "docid": "f49d244cb1c4be30d5560a07ce71555f", "score": "0.52480304", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n cursor.style.left = pos.left + \"px\"\n cursor.style.top = pos.top + \"px\"\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n otherCursor.style.display = \"\"\n otherCursor.style.left = pos.other.left + \"px\"\n otherCursor.style.top = pos.other.top + \"px\"\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n }\n}", "title": "" }, { "docid": "f49d244cb1c4be30d5560a07ce71555f", "score": "0.52480304", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n cursor.style.left = pos.left + \"px\"\n cursor.style.top = pos.top + \"px\"\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n otherCursor.style.display = \"\"\n otherCursor.style.left = pos.other.left + \"px\"\n otherCursor.style.top = pos.other.top + \"px\"\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n }\n}", "title": "" }, { "docid": "f49d244cb1c4be30d5560a07ce71555f", "score": "0.52480304", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n cursor.style.left = pos.left + \"px\"\n cursor.style.top = pos.top + \"px\"\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n otherCursor.style.display = \"\"\n otherCursor.style.left = pos.other.left + \"px\"\n otherCursor.style.top = pos.other.top + \"px\"\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n }\n}", "title": "" }, { "docid": "f49d244cb1c4be30d5560a07ce71555f", "score": "0.52480304", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n cursor.style.left = pos.left + \"px\"\n cursor.style.top = pos.top + \"px\"\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n otherCursor.style.display = \"\"\n otherCursor.style.left = pos.other.left + \"px\"\n otherCursor.style.top = pos.other.top + \"px\"\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n }\n}", "title": "" }, { "docid": "f49d244cb1c4be30d5560a07ce71555f", "score": "0.52480304", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n cursor.style.left = pos.left + \"px\"\n cursor.style.top = pos.top + \"px\"\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n otherCursor.style.display = \"\"\n otherCursor.style.left = pos.other.left + \"px\"\n otherCursor.style.top = pos.other.top + \"px\"\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n }\n}", "title": "" }, { "docid": "f49d244cb1c4be30d5560a07ce71555f", "score": "0.52480304", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n cursor.style.left = pos.left + \"px\"\n cursor.style.top = pos.top + \"px\"\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n otherCursor.style.display = \"\"\n otherCursor.style.left = pos.other.left + \"px\"\n otherCursor.style.top = pos.other.top + \"px\"\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n }\n}", "title": "" }, { "docid": "f49d244cb1c4be30d5560a07ce71555f", "score": "0.52480304", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\n cursor.style.left = pos.left + \"px\"\n cursor.style.top = pos.top + \"px\"\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\n otherCursor.style.display = \"\"\n otherCursor.style.left = pos.other.left + \"px\"\n otherCursor.style.top = pos.other.top + \"px\"\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\n }\n}", "title": "" }, { "docid": "f38ae7c54ede8b2bd15c3cc0e42d83ed", "score": "0.52438116", "text": "function drawSelectionCursor(cm, head, output) {\r\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine)\r\n\r\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"))\r\n cursor.style.left = pos.left + \"px\"\r\n cursor.style.top = pos.top + \"px\"\r\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\"\r\n\r\n if (pos.other) {\r\n // Secondary cursor, shown when on a 'jump' in bi-directional text\r\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"))\r\n otherCursor.style.display = \"\"\r\n otherCursor.style.left = pos.other.left + \"px\"\r\n otherCursor.style.top = pos.other.top + \"px\"\r\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\"\r\n }\r\n}", "title": "" }, { "docid": "f9e35397d914edefbccf04dcdd36d65d", "score": "0.5237411", "text": "cursorIndex(){ return this.edit.session.doc.positionToIndex(this.edit.selection.getCursor()) }", "title": "" }, { "docid": "77b9a808c12af01b3e6318df21809e53", "score": "0.52329314", "text": "setCursor (x, y) {\n this.cursorx = x;\n this.cursory = y;\n }", "title": "" }, { "docid": "fb81ec3d07b64a5f9432c5a5a2048a1a", "score": "0.5230417", "text": "function mouseClicked() {\n // TODO: map cursor position to request\n request();\n}", "title": "" }, { "docid": "69cc34622a745e482d86023ef9b1a625", "score": "0.522475", "text": "handleCursor() {\n const index = this.state.toDoTasks.length -1;\n document.getElementById(\"task\" + index).focus();\n }", "title": "" }, { "docid": "0b016975f19039221990155406e6fbdb", "score": "0.5221463", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n}", "title": "" }, { "docid": "0b016975f19039221990155406e6fbdb", "score": "0.5221463", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n}", "title": "" }, { "docid": "0b016975f19039221990155406e6fbdb", "score": "0.5221463", "text": "function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n}", "title": "" } ]
b606bd05779b5d14dd69b0de66702721
console.log(returnDifference(12)); while loops >
[ { "docid": "9ea0f1c0ed314a0891b552645c43b214", "score": "0.0", "text": "function whileLoop(number) {\n\n while (number>1) {\n number = number - 1;\n console.log(number);\n }\n if ( number === 1 ) {\n console.log(\"Blastoff!\");\n }\n }", "title": "" } ]
[ { "docid": "bc486aa0580fde3433bd4b190ec4eb0e", "score": "0.6742594", "text": "function difference(a, b) {\n return;\n}", "title": "" }, { "docid": "66d0ae196b75751c166c868634cf3fe6", "score": "0.66228896", "text": "function difference (m,n){\n\tvar diff = m - n;\n\tif(m < n){\n\t\tdiff = (diff)*3;\n\t\tconsole.log(diff, \"I am the triple of the diff\");\n\t\treturn diff;\n\t}\n\telse{\n\t\tconsole.log(diff);\n\t\treturn diff;\n\t}\n}", "title": "" }, { "docid": "bc81eac56b2990702eb35f98676d13a0", "score": "0.62719035", "text": "function getDifference(a, b) {\n if (a < b) {\n // console.log(\"-> b - a\", b - a);\n return b - a;\n } else {\n // console.log(\"-> a - b\", a - b);\n return a - b;\n }\n}", "title": "" }, { "docid": "6c0fbbb9d88c2282cbf152495540e053", "score": "0.6254432", "text": "function diff(num1, num2) {\n return num1 - num2;\n}", "title": "" }, { "docid": "2514af6aca9355c580ecd97809a71fcf", "score": "0.6236111", "text": "function subNums(){\n let diff= addNums()-200;\n console.log(\"The difference is : \", diff);\n //return num3;\n}", "title": "" }, { "docid": "90dac44bc1bfdba0f39a399ce170c2c2", "score": "0.62195003", "text": "function crazyDiff(n){\nif (n > 19) {\n return Math.abs(n-19)*3\n} else {\n return Math.abs(n-19)\n}\n}", "title": "" }, { "docid": "1f4d8723e9635389ba21f7265d879d47", "score": "0.61827207", "text": "function difference(a, b) {\n return a - b;\n}", "title": "" }, { "docid": "89af99355d6fddea331e1f83aff03bcb", "score": "0.6103022", "text": "function differences(string1, string2) {\n var num = 0;\n var index = 0; \n var index2 = 0;\n while (index < string1.length) {\n while (index2 === index) {\n if (string1[index] !== string2[index2]) {\n console.log(string1[index]);\n num++;\n } \n index2++;\n }\n index++;\n }\n return num;\n}", "title": "" }, { "docid": "1da556e6c1b1fa1e62d3f0f085ebc5cc", "score": "0.60809845", "text": "function subtraction(num1, num2) {\n var difference = num1 - num2;\n results.innerHTML += difference;\n return difference;\n}", "title": "" }, { "docid": "e41a8f205ff07f3282463002ae84e646", "score": "0.60356635", "text": "function crazyDiff(n1) {\n \tif (n1 > 19)\n \t\treturn Math.abs(n1 - 19) * 3\n\n \treturn Math.abs(n1 - 19)\n\n \t// return n1 > 19 ? Math.abs(n1 - 19) * 3 : Math.abs(n1 - 19)\n }", "title": "" }, { "docid": "33fc5a7f18dd1ea3a0907f2c20f07111", "score": "0.59909385", "text": "function checkDifference(){\n var difference;\n if (winningNumber > playersGuess) {\n difference = winningNumber - playersGuess;\n }\n else {\n difference = playersGuess - winningNumber;\n }\n return difference;\n}", "title": "" }, { "docid": "3186a7e980dd31cf69496573166a3991", "score": "0.597475", "text": "getDiff() {\n return this.hrend[0] * 1e9 + this.hrend[1];\n }", "title": "" }, { "docid": "baa6dc41b14577aaf9167a0670c6097e", "score": "0.5951593", "text": "function diagonalDifference(arr) {\n // Write your code here\n let a = 0;\n let b = 0;\n\n for (let i = 0; i < arr[0].length; i++) {\n a += returnValue(arr, i, i)\n b += returnValue(arr, i, arr[i].length - (i + 1))\n }\n return Math.abs(a - b)\n}", "title": "" }, { "docid": "07840e02c36a452092b962ac55697578", "score": "0.5878547", "text": "function difference(n) {\n return n > 13 ? (n - 13) * 2 : 13 - n;\n}", "title": "" }, { "docid": "b64f547d6457ad4b2061f9852840d20d", "score": "0.58729476", "text": "function difference(n) \n \n {\n if ( n<= 13)\n\n return 13 - n ;\n\n else \n return (n-13) * 2 ;\n \n }", "title": "" }, { "docid": "24369c73c19b5f7443b3bc3c30fb7a2d", "score": "0.58636093", "text": "function findDiff(){\n let sumOfSquares=0, squareOfSum =0;\n\n for(let i = 1;i<=100;i++){\n sumOfSquares += (i*i);\n squareOfSum +=i;\n }\n squareOfSum *= squareOfSum;\n\n return (squareOfSum - sumOfSquares);\n\n}", "title": "" }, { "docid": "0ae9e37441a41dd28d45c6b24639c7b8", "score": "0.5855986", "text": "function difference () {\n var lastValue\n return filter(function (value) {\n var condition = value !== lastValue\n lastValue = value\n return condition\n })\n}", "title": "" }, { "docid": "9221063ee05396696ee0c6584f9c4583", "score": "0.585008", "text": "function difference(n) {\n if (n <= 13)\n return 13 - n;\n else\n return (n - 13) * 2;\n}", "title": "" }, { "docid": "60208e9ccab21b60b38c9c85cb639d53", "score": "0.5841878", "text": "function main() {\r\n let output = add(10, 20);\r\n console.log(\"Add\", output);\r\n \r\n let soutput = subtract(50, 10);\r\n console.log(\"Difference\", soutput);\r\n }", "title": "" }, { "docid": "75b60314425d296e6fbb8f57a566a93d", "score": "0.5833378", "text": "function getDifference(n1,n2){\n var r = n1 - n2;\n return Math.abs(r);\n}", "title": "" }, { "docid": "9e791224afce6ebe3e9922120f80d94c", "score": "0.5819651", "text": "function subtract(n1,n2) {\n difference = (n1-n2)\n console.log(difference)\n}", "title": "" }, { "docid": "c0bb23ca18e3cfd12b771690dae4a670", "score": "0.581913", "text": "function crazyDiff(x){\r\n if (x <= 19){\r\n return (19 - x)\r\n }\r\n else{\r\n return (x-19) * 3\r\n }\r\n}", "title": "" }, { "docid": "47705bc864bd4be735d4afd0d74eb6bb", "score": "0.5816401", "text": "function diff(a) {\n if (a > 19) {\n return (a - 19) * 3;\n }\n else\n return 19 - a;\n}", "title": "" }, { "docid": "7ab78bb56ff72d8edaced28aec0e54aa", "score": "0.5815759", "text": "function checkDifference(x){\n return \"My football team lost \" + x + \" times this week!\";\n\n}", "title": "" }, { "docid": "6392a64a712b90da574a3f7020e90304", "score": "0.58050084", "text": "iterative(N) {\n let steps = 0;\n while (N != 6174) {\n console.log('N: ' + N);\n let x = this._findAllDigits(N);\n console.log('x: ' + x);\n if (!this._isValid(x)) return -1;\n let arr = this._create2Nums(x);\n console.log('arr: ' + arr);\n N = arr[0] - arr[1];\n console.log('diff: ' + N);\n steps++;\n }\n return steps;\n }", "title": "" }, { "docid": "92a520b1e2c575bff8ebb68b045a2122", "score": "0.57826555", "text": "function getDifference(num1, num2) {\n const sum = num1 - num2;\n return sum;\n}", "title": "" }, { "docid": "19f6382de2a6eab8e44737f79a76d9aa", "score": "0.57815397", "text": "get difference() {\n return getTotal(this.batches, 'difference');\n }", "title": "" }, { "docid": "36f53e848d545edac2046741e56ca988", "score": "0.57763743", "text": "function find_difference(a, b) {\n\t var A = (a[0]*a[1]*a[2])\n\t var B = (b[0]*b[1]*b[2])\n\t if (A > B){\n\t return (A - B);\n\t }\n\t else {\n\t return (B - A);\n\t }\n\t}", "title": "" }, { "docid": "01e38237f8e18b1f240691e6a9c16fc9", "score": "0.57711405", "text": "function myWorkFunction(work, a ) {\n return ( work )- a ; // Function returns the difference of work - 24\n\n\n\n}", "title": "" }, { "docid": "84c2dcbffecd3f35512faf2d6a9273fa", "score": "0.5706738", "text": "function totalDiff(arr1, arr2) {\n\n}", "title": "" }, { "docid": "59b65f63f298d510ecd48a498891fb27", "score": "0.5691487", "text": "function sub()\n{\n let num1=20;\n let num2=80;\n return(num2-num1);\n}", "title": "" }, { "docid": "b2df053a5a36d2f3a014bfac628c2a68", "score": "0.568314", "text": "function whileLoop(n) {\n while (n > 0) {\n console.log(n);\n --n; \n }\n return \"done\";\n}", "title": "" }, { "docid": "a842bc6c12eb4004bb29b8a305dd82ad", "score": "0.56796587", "text": "function measure() {\n let literation = 1e7;\n const a = 1;\n const b = 2;\n //\n while (literation--) {\n add(a, b);\n }\n}", "title": "" }, { "docid": "5a64776732902785198228fc1d3f4fd3", "score": "0.56713146", "text": "function difference() {\n\n var s = 0;\n for ( var i = 0 ; i <= n ; i++ )\n s += (-1)**i * binomial(n,i) * f( x + (n-2*i)*h );\n\n return s / (2*h)**n\n\n }", "title": "" }, { "docid": "5a64776732902785198228fc1d3f4fd3", "score": "0.56713146", "text": "function difference() {\n\n var s = 0;\n for ( var i = 0 ; i <= n ; i++ )\n s += (-1)**i * binomial(n,i) * f( x + (n-2*i)*h );\n\n return s / (2*h)**n\n\n }", "title": "" }, { "docid": "22d16cc2dbe51671d6fe38e3ad3556c7", "score": "0.5666788", "text": "function whileLoop (n) {\n while (n >0) {\n console.log(n);\n n --;\n }\n return \"done\";\n}", "title": "" }, { "docid": "718e97dc95e4eb9918a06a061253d533", "score": "0.5651618", "text": "function difference(getal) {\n return getal - 100;\n}", "title": "" }, { "docid": "aef11688fb02ca97a5cbfb2abe546015", "score": "0.5643332", "text": "function twelve()\n{ \n var num = 0;\n while(num != 13)\n {\n console.log(num);\n console.log('chick');\n console.log('boom');\n num++;\n }\n}", "title": "" }, { "docid": "a702b05976d56cc18bf0b8552d9a5a36", "score": "0.5617548", "text": "function kata15() {\n let result = 0\n let i = 1\n while (i<=20){\n result+=i;\n i++\n }\n showResults(`KATA 15 : [ ${result} ]`)\n}", "title": "" }, { "docid": "615c38b9bc16451e9cec7833e0492bf5", "score": "0.5601058", "text": "function sub(){\r\n var num1 = 50\r\n var num2 = 20\r\n var result = num1-num2\r\n console.log(result)\r\n \r\n}", "title": "" }, { "docid": "a7c1f1abe697bcc6adf2a81d275c93ea", "score": "0.55771834", "text": "function func6(){\n var wheelsAnswer = spaceship.wheels - car.wheels\n console.log(wheelsAnswer);\n }", "title": "" }, { "docid": "530a0c80938730920851095390ba4a60", "score": "0.5570712", "text": "function findDifference(a, b) {\n return Math.abs(a[0]*a[1]*a[2] - b[0]*b[1]*b[2]);\n}", "title": "" }, { "docid": "35d3c2dd18b648d4a838ecde0afa084d", "score": "0.55692124", "text": "function summfrom1000to100decrementby17bywhile(startvalue,endvalue,stepvalue) { \n var sum = 0;\n Loop_variable=startvalue;//intialising the starting value.\n while(Loop_variable >= endvalue){\n sum += Loop_variable;\n Loop_variable += stepvalue\n }\n //console.log(sum);\n //changing the html contents based on the results calculated\n document.getElementById(\"disp_resultwhile\").innerHTML = sum;\n document.getElementById(\"calc_btnwhile\").style=\"display:none\"\n return sum;\n }", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "9b529c48208ffcd071e1f0c0f69514bf", "score": "0.55633664", "text": "function Diff() {}", "title": "" }, { "docid": "a8cfea70c9bbff45d17838a42f2b36f1", "score": "0.5537877", "text": "function getDif(num){\r\n\t\r\n\tlet numArr = num.toString().split('');\r\n\t\r\n\tlet bgstNum = numArr[0];\r\n\t\r\n\tlet smllstNum = numArr[0];\r\n\t\r\n\tfor ( let i = 0; i < numArr.length; i++){\r\n\t\t\r\n\t\tbgstNum = bgstNum < numArr[i] ? numArr[i] : bgstNum;\r\n\t\r\n\t\tsmllstNum = smllstNum > numArr[i] ? numArr[i] : smllstNum;\r\n\t\t\r\n\t}\r\n\t\r\n\treturn (bgstNum-smllstNum);\r\n}", "title": "" }, { "docid": "9747cf264a88996c5ddce7ccba65dff0", "score": "0.5536195", "text": "function wLoopE1() {\r\n let counter = 1;\r\n\r\n while (counter <= 12) {\r\n\r\n if (counter % 2 === 0) {\r\n console.log(counter);\r\n }\r\n\r\n counter++;\r\n }\r\n}", "title": "" }, { "docid": "7f194d07e6a5fef5a058219303509476", "score": "0.55340934", "text": "function resta() {\n obtenerDatos();\n let resta = numeroA - numeroB;\n console.log('El resultado es:', resta);\n asignarOperacion(resta);\n}", "title": "" }, { "docid": "1d6ed96b47aef20493716072965066f0", "score": "0.55260384", "text": "function loop(i) {\n if (i > 5) {\n return null;\n }\n console.log(i)\n loop(i += 1)\n}", "title": "" }, { "docid": "9a91b2596ea8f714c77a3a46f3a470ac", "score": "0.55251205", "text": "function findDifference(a, b) {\n return Math.abs((a[0]*a[1]*a[2])-(b[0]*b[1]*b[2]))\n}", "title": "" }, { "docid": "f1bd33cd35335fb80e420746c84f930c", "score": "0.5520516", "text": "function findDifference(a, b) {\n return Math.abs(a.reduce((tot, cur) => tot *= cur) - b.reduce((tot, cur) => tot *= cur))\n }", "title": "" }, { "docid": "6419ebf13b8503332a4348edc2260d48", "score": "0.55176777", "text": "function diff(a,b){\nvar i,j,result=a.slice();\nfor(i=0; i<result.length; i++){\nfor(j=0; j<b.length; j++){\nif(result[i] === b[j]){\nresult.splice(i,1);\ni--;\nbreak;\n}\n}\n}\nreturn result;\n}", "title": "" }, { "docid": "8968c6a1c6c74b774a176b5af507d1a7", "score": "0.55147284", "text": "function subtractNumbers(number1, number2) {\r\n var sum = number1 - number2;\r\n console.log(sum);\r\n}", "title": "" }, { "docid": "7525ff843d7956b74fd19b4b2a4c8119", "score": "0.5511008", "text": "function restar (num1, num2){\n let resultado = num1 - num2;\n return resultado;\n}", "title": "" }, { "docid": "f95a33b64b22e0e17e2a7230548bcfe4", "score": "0.55095035", "text": "function SumOfNumbers(numberOne,numberTwo){ \n return numberOne + numberTwo;\n //the code after return will not be executed\n let razlika=numberOne-numberTwo;\n}", "title": "" }, { "docid": "b286ccecbfdc1516a44dbaad781bc42f", "score": "0.5503185", "text": "function difference(array1, array2) {\n\n\t\t\tconsole.log(\"This is array 1: \" + array1)\n\t\t\tconsole.log(\"This is array 2: \" + array2)\n\n\t\t\t// countDifference holds the tally of the difference between array values\n\t\t\tlet countDifference = 0;\n\n\t\t\tfor (let i = 0; i < array1.length; i++) {\n\t\t\t\tcountDifference += Math.abs(array1[i] - array2[i]);\n\t\t\t}\n\n\t\t\t// return the difference between the two arrays reflecting the deviation\n\t\t\treturn countDifference;\n\t\t}", "title": "" }, { "docid": "9dfa8209ddd9a25183c51e871f9c04b1", "score": "0.54998076", "text": "function resta(num1, num2){\n\n return num1-num2\n}", "title": "" }, { "docid": "e9e65c183d03e46baae06a1d166f42a5", "score": "0.5478355", "text": "function calculations(number1,number2){//word 'function must be fisrt letter lowercase\n //*using console.log to show results for this experiment only, there are better ways to show them.\n \n //!caught error, why?, cheking\n console.log(\"alone numbers: \"+number1,number2); //!result: undifined\n\n //*it result on an undifined answer.\n console.log(\"Sum: \" + (number1+number2));\n console.log(\"Rest: \" +(number1-number2));\n console.log(\"Multiplication: \" +(number1*number2));\n console.log(\"Divition: \" + (number1/number2));\n}", "title": "" }, { "docid": "97a5058e5c35a4cbaec9db002337a262", "score": "0.5474735", "text": "function returnDifference(num) {\n let sum=0;\n let product = 1;\n let number = num.toString();\n for (let i =0; i<number.length; i++) {\n sum += parseInt(number[i]);\n product *= parseInt(number[i]);\n }\n return sum - product;\n}", "title": "" }, { "docid": "fdecbe0ccebe71fe93025b4107f91659", "score": "0.5470271", "text": "function get_diff(entry){\n\tlet orig_entry=get_stored_entry();\n\treturn diff(entry, orig_entry);\n}", "title": "" }, { "docid": "2d94dc4afb09eeb352db0198fd32e4b6", "score": "0.5469493", "text": "function whileLoop(n){\n while(n > 0){\n console.log(--n)\n }\n return 'done'\n}", "title": "" }, { "docid": "d7c14377a35c3d1fa2e097574f43e6d5", "score": "0.5460027", "text": "function whileLoop(n) {\n while (n > 0){\n console.log(--n)\n }\n return 'done'\n}", "title": "" }, { "docid": "14c2f8b04b7b40455ea3524e8d1fce2a", "score": "0.5431125", "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": "aeca9e1eebe5d26da4531035e3666b5b", "score": "0.5416432", "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": "864cad3845eb7e6b1b446e6f7b798279", "score": "0.541238", "text": "function ejercicio8(){\n let down=()=>{\n for (let x=1;x<10;x++){\n let cont=\"\"\n for (let y=1;y<=x;y++){\n cont+=x\n }\n console.log(cont)\n }\n }\n let up=()=>{\n for (let x=9;x>0;x--){\n let cont=\"\"\n for (let y=1;y<=x;y++){\n cont+=x\n }\n console.log(cont)\n }\n }\n down()\n console.log(\"**********\")\n up()\n}", "title": "" }, { "docid": "182fd862d351115c8f9b9e88afedeecc", "score": "0.539986", "text": "function myCalculator(number1, number2) {\r\n var sum = number1 - number2;\r\n console.log(sum); //-9\r\n}", "title": "" }, { "docid": "260d3c7cbda5035b73b9a4ee370035b3", "score": "0.53991187", "text": "function differences(arr) {\n let newArr = []\n while (arr.length > 1) {\n arr = arr.slice(1).map((num, i) => Math.abs(arr[i] - arr[i+1]))\n }\n return parseInt(arr)\n}", "title": "" }, { "docid": "a8a56cebca7496df06c8cee15541fc81", "score": "0.5380331", "text": "function calculate(scores1, scores2){\n\tlet diff = 0;\n\n\tfor(let i = 0; i < scores1.length; i++){\n\n\n\t\tdiff += Math.abs( scores1[i] - scores2[i]);\n\n\t}\n\tconsole.log(\"returning a difference of \" + diff);\n\treturn diff;\n}", "title": "" }, { "docid": "8e2cb6455d9e9e880fb24073120b6ef6", "score": "0.53760743", "text": "function calcDelta(name){\n console.log(\"looking up \"+name);\n console.log(bmiDB);\n let newBMIIndex=-1;\n let previousBMIIndex=-1;\n let i=0;\n\n for(i=bmiDB.length-1; i>=0;i--)\n if(bmiDB[i].name==name) {\n newBMIIndex=i;\n console.log(\"NEW \"+i);\n break;\n } \n \n for(--i;i>=0;i--) \n if(bmiDB[i].name==name) {\n previousBMIIndex=i;\n console.log(\"PREV \"+i);\n break;\n } \n if(newBMIIndex>=0 && previousBMIIndex>=0) \n return round2Decimals(calcBMI(bmiDB[newBMIIndex].height, bmiDB[newBMIIndex].weight)-\n calcBMI(bmiDB[previousBMIIndex].height, bmiDB[previousBMIIndex].weight)); \n else \n return 0;\n}", "title": "" }, { "docid": "0e80671299b3a6b22a50bbfc5b043e0c", "score": "0.5363983", "text": "function whileLoop(num) {\n while ( num > 0 ) {\n console.log(num--);\n }\n return 'done';\n}", "title": "" }, { "docid": "8cc9085510e891331b21f837ed6cfa4f", "score": "0.5356713", "text": "function kangaroo(x1, v1, x2, v2) {\n\n // kangaroo(0 3 4 2)\n\n console.log(\"-- DO THE KANGAROOs MEET?! --\");\n\n var output = 'NO';\n var count = 0;\n var k1 = x1;\n var k2 = x2;\n\n\n while ((output == 'NO') && (count < 100)) {\n\n if (k1 == k2) {\n output = 'YES';\n\n } else if (k1 != k2) {\n k1 += v1;\n k2 += v2;\n count++;\n console.log(\"Durchgang: \" + count + \" Känguruh 1 bei \" + k1 + \", Känguruh 2 bei \" + k2);\n }\n\n }\n\n\n console.log(output);\n output9.innerHTML = output;\n\n}", "title": "" }, { "docid": "60b8c0d8b7cc93972f657f15ea1c9e4a", "score": "0.53479624", "text": "function arrayChange(inputArray = [-1000, 0, -2, 0]) {\n let count = 0;\n\n for (let i = 0; i < inputArray.length; i++) {\n let num1 = inputArray[i];\n let num2 = inputArray[i + 1];\n //be careful when checking if ints exist because a 0 evaluates to false and could give bad behavior\n if (\n inputArray[i] !== \"undefined\" &&\n inputArray[i + 1] !== \"undefined\" &&\n num1 >= num2\n ) {\n let diff = num1 + 1 - num2;\n count += diff;\n console.log(`adding ${diff}`);\n inputArray[i + 1] = num1 + 1;\n }\n }\n console.log(count);\n console.log(inputArray);\n return count;\n}", "title": "" }, { "docid": "332e8707c8367d55d42be362906ca802", "score": "0.5335461", "text": "function subtractTwoNumbers(num1, num2) {\n var output1 = num1 - num2;\n return output1;\n}", "title": "" }, { "docid": "da17775b67f71fe894a1ef46c7f479d5", "score": "0.5333618", "text": "function subtraction(){\r\n let difference = a1 - a2;\r\n console.log(a1 + \"-\" + a2 + \"=\" + difference); // what the directions asked for plus my own addition to clarify it\r\n}", "title": "" }, { "docid": "1a8769fb5d6e2796063a1dfdeb1f3bfe", "score": "0.5333114", "text": "function third()\r\n{\r\n let third=second()%15;\r\n console.log('adwogi',third);\r\n return third;\r\n}", "title": "" }, { "docid": "d89437fb0ce0508cdc011fe1a22e2dcb", "score": "0.53316283", "text": "function _getDifference(a, b) {\n let i = 0;\n let j = 0;\n let result = \"\";\n\n while (j < b.length) {\n if (a[i] != b[j] || i == a.length)\n result += b[j];\n else\n i++;\n j++;\n }\n return result;\n}", "title": "" }, { "docid": "87abf181d871ba243c0487747cb62320", "score": "0.5319618", "text": "function problemOne(){\n for (var i = 12; i>=0; i--){\n if (i %2 !== 0){\n console.log(i)\n }\n }\n}", "title": "" }, { "docid": "f8be975a6dc22ec85394c052615f515c", "score": "0.53155625", "text": "function calculateDiff(array1, array2) {\n var totalDiff = 0;\n for (let i = 0; i < array1.length; i++) {\n totalDiff += Math.abs(array1[i] - array2[i]);\n }\n\n return totalDiff;\n }", "title": "" }, { "docid": "8750efebc682cfa63248a02c259eaa93", "score": "0.5302283", "text": "function partOne() {\n let differences = {\n 1: 1, // wall to device is one difference\n 2: 0,\n 3: 1, // last adapter to device is three difference\n }\n\n const sortedNumbers = data.split('\\n').map(x => parseInt(x)).sort((a,b) => a-b);\n\n for (let i = 0; i < sortedNumbers.length - 1; i++) {\n let difference = sortedNumbers[i + 1] - sortedNumbers[i];\n differences[difference]++;\n }\n\n console.log(differences);\n console.log(differences[1] * (differences[2] || 1) * differences[3]);\n}", "title": "" }, { "docid": "7d88495a8811b8dd8a1ea92930e9258b", "score": "0.52944434", "text": "function whileLoop(num) {\n\twhile(num > 0) {\n\t\tconsole.log(num);\n\t\tnum--\n\t}\n\treturn 'done'\n}", "title": "" }, { "docid": "6cecb269e90d910c2025d773ddaf0726", "score": "0.52907395", "text": "function compareScoreDiff(friendA, friendB) {\n let totalDiff = 0;\n\n for (let i = 0; i < 10; i++) {\n totalDiff += Math.abs(friendA.scores[i] - friendB.scores[i]);\n };\n return totalDiff;\n //console.log(totalDiff);\n }", "title": "" }, { "docid": "039b20423c814d644d2072bacfdc3588", "score": "0.5282789", "text": "function getDiffs(boardInitial, boardAfter) {\n const diffs = [];\n for (let i = 0; i < boardAfter.data.length; i++) {\n if (boardInitial.data[i] !== boardAfter.data[i]) {\n diffs.push({ \"coord\": i, \"val\": boardAfter.data[i] });\n }\n }\n console.log(diffs);\n return diffs;\n}", "title": "" }, { "docid": "b1966fe47d7548d7b7f7bad18ee699fd", "score": "0.52795124", "text": "function diff(a, b) {\n \tvar i,\n \t j,\n \t result = a.slice();\n\n \tfor (i = 0; i < result.length; i++) {\n \t\tfor (j = 0; j < b.length; j++) {\n \t\t\tif (result[i] === b[j]) {\n \t\t\t\tresult.splice(i, 1);\n \t\t\t\ti--;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \treturn result;\n }", "title": "" }, { "docid": "9ce2664d63fa95aa0a36b855d7138d9f", "score": "0.52715147", "text": "function countDown(nat) {\n let count = nat\n while (count >= 0) {\n console.log(count)\n count--\n }\n}", "title": "" }, { "docid": "8995f25c1714bfc81ad7357ba5c44d4b", "score": "0.52600473", "text": "function symmetricDifference(nums1, nums2){\n\n}", "title": "" }, { "docid": "8622a2babf4020e972fbad42e2a4cead", "score": "0.5259653", "text": "function foo() {\n\tvar a = 1;\n\n\tif (a >= 1) {\n\t\tlet b = 2;\n\n\t\twhile (b < 5) {\n\t\t\tlet c = b * 2;\n\t\t\tb++;\n\n\t\t\tconsole.log( a + c );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ff0d26804b5ba144522f713712a430c4", "score": "0.5252172", "text": "function demoDoWhileLoop() {\n\n let index = 10;\n\n do {\n console.log ( index-- ); \n } while ( index > 0);\n\n}", "title": "" }, { "docid": "22703fce2d5a0ed4792d1a015aefb15d", "score": "0.5244433", "text": "function difference(array1, array2) {\n\n // differenceAmount holds the tally of the difference between array values\n var differenceAmount=0;\n \n for (var i=0; i<array1.length; i++) {\n differenceAmount += Math.abs(array1[i] - array2[i]);\n }\n \n // return the difference between the two arrays reflecting the deviation\n return differenceAmount;\n }", "title": "" }, { "docid": "192955c75a8730d29b0e9bc8391be6f1", "score": "0.52311265", "text": "function fname() {\n console.log(a - b);\n }", "title": "" }, { "docid": "310726bc13aaf446a31aef38e23e90ac", "score": "0.522945", "text": "function testLoop2(userInput) {\n var result = 0\n for (var i = 0; i < userInput; i+=1) {\n result += 1;\n console.log(result);\n }\n return result;\n}", "title": "" }, { "docid": "1fd50064d147d8a14452eb31eef7343e", "score": "0.5227454", "text": "function tester() {\n document.getElementById(\"output\").innerHTML += canBalance([1, 1, 1, 2, 1]);\n // document.getElementById(\"output\").innerHTML += nextOne(true, false);\n //test third method, etc\n}", "title": "" }, { "docid": "3beb2301e3414aa28c710103b483b666", "score": "0.5221261", "text": "function subtract(a, b){\n\treturn difference(a, b);\n}", "title": "" }, { "docid": "5f2a6f76a4343daf3b8d078538eaa3b5", "score": "0.52199286", "text": "function calcSubtract(num1, num2) {\n \tlet difference = (num1 - num2);\n \treturn difference\n }", "title": "" } ]
d1c69fe7da58d17aad6f067fcca3a980
set up function to do AJAX request
[ { "docid": "11e67db37b0b96465361600255ab4f60", "score": "0.0", "text": "function doAjax () {\n \t\t\tconsole.log(time)\n\t\t\t// function to send request to backe-end\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: \"/givethisback\",\n\t\t\t\tdata: {inputData: txt},\n\t\t\t\tsuccess: \n\t\t\t\t\tfunction ( ddata, status ) {\n\t\t\t\t\t\t// function performs autocomplete\n\t\t\t\t\t\t$('#datalist').empty()\n\t\t\t\t\t\t\tfor (var i = ddata.length - 1; i >= 0; i--) {\n\t\t\t\t\t\t\t\t$('#datalist').append('<option value=\"' + ddata[i] + '\"></option>')\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t})\n\t\t}", "title": "" } ]
[ { "docid": "75088f1d6d27ae957c4d66fec63201ba", "score": "0.7616146", "text": "function Ajax(){}", "title": "" }, { "docid": "42d06de273754264110ad34542f11ac9", "score": "0.7405572", "text": "function Ajax() {}", "title": "" }, { "docid": "49ae02516411bebbee4f765d32eb8c2b", "score": "0.71459764", "text": "function ajax(url, data, cb) {}", "title": "" }, { "docid": "6f8c0682d5be512be6e5bf8144a9ca8b", "score": "0.69957167", "text": "function ajaxFunction(){\n\t\t\t\n\t\t\ttry{\n\t\t\t\t// Opera 8.0+, Firefox, Safari\n\t\t\t\tajaxRequest = new XMLHttpRequest();\n\t\t\t} catch (e){\n\t\t\t\t// Internet Explorer Browsers\n\t\t\t\ttry{\n\t\t\t\t\tajaxRequest = new ActiveXObject(\"Msxml2.XMLHTTP\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tajaxRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t\t\t\t} catch (e){\n\t\t\t\t\t\t// Something went wrong\n\t\t\t\t\t\talert(\"Your browser broke!\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7cabedc86b8b0a5824fd5b409590cdc8", "score": "0.6958907", "text": "function setting_company_gig_hotel_process(){\n\tconsole.log(\"ajax server request runing for the gig_hotel\");\n\tvar xhttp = new XMLHttpRequest();\n\txhttp.onreadystatechange = function() {\n\t\tif (this.readyState == 4 && this.status == 200) {\n\t\t\tvar seller=JSON.parse(this.responseText);\n\t\tsetting_company_gig_hotel(seller);\n\t\t}\n\t};\n\txhttp.open(\"GET\", \"/gig_hotel\", true);\n\txhttp.send();\n}", "title": "" }, { "docid": "2b2e6d55831e9620df536c426f7cfcd7", "score": "0.6936689", "text": "function doAjax(event) {\n event.preventDefault();\n\n // The object we use to start the AJAX request using JQuery's format\n let requestObject = {\n url: `https://api.flickr.com/services/rest/?method=flickr.photos.getRecent&api_key=5b7fd66b51d24258c6135f2647adfb3f&extras=url_q,url_h&per_page=30&format=json&nojsoncallback=1`,\n method: \"GET\",\n success: handleSuccess,\n error: handleError\n };\n\n // Actually start the AJAX request\n $.ajax(requestObject);\n }", "title": "" }, { "docid": "e66b3c6130fc92b1687ae49be432548f", "score": "0.6886641", "text": "function myAJAX(options){\n options.url = api_url + options.url;\n var xhr = new XMLHttpRequest();\n var params ='';\n for(let attr in options.data){\n params += attr +'='+options.data[attr]+'&';\n }\n params = params.substr(0,params.length - 1);\n if(options.type==='get'&&options.data.left!=0){\n options.url = options.url+'?'+params;\n }\n xhr.open(options.type,options.url);\n if(options.type==='post'){\n xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');\n xhr.send(params);\n }else {\n xhr.send();\n }\n\n xhr.onload = function () {\n options.success(xhr.responseText);\n }\n}", "title": "" }, { "docid": "e66b3c6130fc92b1687ae49be432548f", "score": "0.6886641", "text": "function myAJAX(options){\n options.url = api_url + options.url;\n var xhr = new XMLHttpRequest();\n var params ='';\n for(let attr in options.data){\n params += attr +'='+options.data[attr]+'&';\n }\n params = params.substr(0,params.length - 1);\n if(options.type==='get'&&options.data.left!=0){\n options.url = options.url+'?'+params;\n }\n xhr.open(options.type,options.url);\n if(options.type==='post'){\n xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');\n xhr.send(params);\n }else {\n xhr.send();\n }\n\n xhr.onload = function () {\n options.success(xhr.responseText);\n }\n}", "title": "" }, { "docid": "af0b9822f44553a4f2c28a0cd85820c3", "score": "0.6867675", "text": "function request_ajax(url, action, info){\n $.ajax({\n url: url,\n type: 'GET',\n dataType: 'jsonp',\n success: function(result, textStatus, request) {\n switch(action){\n case \"build_advertisements_home\":\n build_advertisements_home(result, info);\n break;\n case \"show_company_details\":\n show_company_details(result, info);\n break;\n case \"build_company_list\":\n build_company_list(result, info);\n break;\n case \"build_company_list_home\":\n build_company_list_home(result, info);\n break;\n case \"build_company_list_pagination\":\n build_company_list_pagination(result, info);\n break;\n case \"build_advertisements\":\n build_advertisements(result, info);\n break;\n case \"build_advertisements_pagination\":\n build_advertisements_pagination(result, info);\n break;\n case \"show_advertisement_detail\":\n show_advertisement_detail(result, info);\n break;\n }\n }\n });\n }", "title": "" }, { "docid": "a5d1817fa1e9d800e25a313a52f00fdd", "score": "0.68638086", "text": "function ajax_request(url, funcRet, HttpMethod) {\n\t// verifica o parametro do HttpMethod (default)\n if (!HttpMethod) { HttpMethod = \"GET\"; }\n\n // inicia variavel do objeto XMLHttpRequest\n var xRequest = null;\n\n // Procura por um objeto nativo\n if (window.XMLHttpRequest) { xRequest = new XMLHttpRequest(); } // Mozilla/Safari\n else { xRequest = new ActiveXObject(\"Microsoft.XMLHTTP\"); } // Internet Explorer\n\n // method\n xRequest.open(HttpMethod, url, true);\n \n // verifica se eh POST\n if (HttpMethod == \"POST\") {\n // seta o Header\n \txRequest.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n }\n\n // ReadyStateChange (onReadyStateChange)\n xRequest.onreadystatechange = function() {\n \t// apenas quando o estado for \"completado\"\n if (xRequest.readyState == READY_STATE_COMPLETE) {\n \t// pega o retorno\n var resposta = xRequest.responseText;\n\n // apenas se o servidor retornar \"OK\"\n if (xRequest.status == 200) { if (resposta != \"\") { if (funcRet) { funcRet(resposta); }}}\n\n // apaga o objeto do Request\n delete xRequest;\n }\n else {}\n };\n\n // Send\n xRequest.send(null);\n}", "title": "" }, { "docid": "71b1606c0feba7f8f3929a5b1df848c2", "score": "0.68591535", "text": "function AjaxRequest (url, opts){\r\n var headers = {\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n 'X-Prototype-Version': '1.6.1',\r\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\r\n };\r\n var ajax = null;\r\n \r\n if (window.XMLHttpRequest)\r\n ajax=new XMLHttpRequest();\r\n else\r\n ajax=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n \r\n if (opts.method==null || opts.method=='')\r\n method = 'GET';\r\n else\r\n method = opts.method.toUpperCase(); \r\n \r\n if (method == 'POST'){\r\n headers['Content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\r\n } else if (method == 'GET'){\r\n addUrlArgs (url, opts.parameters);\r\n }\r\n\r\n ajax.onreadystatechange = function(){\r\n// ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; states 0-4\r\n if (ajax.readyState==4) {\r\n if (ajax.status >= 200 && ajax.status < 305)\r\n if (opts.onSuccess) opts.onSuccess(ajax);\r\n else\r\n if (opts.onFailure) opts.onFailure(ajax);\r\n } else {\r\n if (opts.onChange) opts.onChange (ajax);\r\n }\r\n } \r\n \r\n ajax.open(method, url, true); // always async!\r\n\r\n for (var k in headers)\r\n ajax.setRequestHeader (k, headers[k]);\r\n if (matTypeof(opts.requestHeaders)=='object')\r\n for (var k in opts.requestHeaders)\r\n ajax.setRequestHeader (k, opts.requestHeaders[k]);\r\n \r\n if (method == 'POST'){\r\n var a = [];\r\n for (k in opts.parameters){\r\n\t if(matTypeof(opts.parameters[k]) == 'object')\r\n\t\tfor(var h in opts.parameters[k])\r\n\t\t\ta.push (k+'['+h+'] ='+ opts.parameters[k][h] );\r\n\t else\r\n a.push (k +'='+ opts.parameters[k] );\r\n\t}\r\n ajax.send (a.join ('&'));\r\n } else {\r\n ajax.send();\r\n }\r\n}", "title": "" }, { "docid": "5dcb25758c98d47a8819431e304c0abe", "score": "0.6851639", "text": "function ajax() {\n\n const request = new XMLHttpRequest();\n request.open( resource.method, resource.method === 'get' && resource.params ? buildURL( resource.url, resource.params ) : resource.url, true );\n if ( resource.headers )\n for ( const key in resource.headers ) {\n request.setRequestHeader( key, resource.headers[ key ] );\n if ( key.toLowerCase() === 'authorization' )\n request.withCredentials = true;\n }\n ( resource.method === 'post' || resource.method === 'put' ) && request.setRequestHeader( 'Content-Type', 'application/json' );\n request.onreadystatechange = () => {\n if ( request.readyState === 4 )\n request.status >= 200 && request.status < 300 ? successData( request.responseText ) : error( request );\n };\n request.send( resource.method === 'post' || resource.method === 'put' ? ccm.helper.stringify( resource.params ) : undefined );\n }", "title": "" }, { "docid": "bbd6112a1b918f68be54c5e2dca4d1de", "score": "0.68157804", "text": "function IAjaxRequest() {}", "title": "" }, { "docid": "e642e11aeb293869bd6b1b5c26229e5a", "score": "0.6753029", "text": "function httpRequest(reqType, url, asynch, respHandle) { \n if (window.XMLHttpRequest) { // Mozilla-based browsers \n request = new XMLHttpRequest(); \n } \n else if (window.ActiveXObject) { \n request = new ActiveXObject(\"Msxml2.XMLHTTP\"); \n if (!request) { \n request = new ActiveXObject(\"Microsoft.XMLHTTP\"); \n } \n } \n // very unlikely, but we test for a null request \n // if neither ActiveXObject was initialized \n if (request) { \n // if the reqType parameter is POST, then the \n // 5th argument to the function is the POSTed data \n if (reqType.toLowerCase() != \"post\") { \n initReq(reqType, url, asynch, respHandle); \n } \n else { \n // the POSTed data \n var args = arguments[4]; \n if (args != null && args.length > 0) { \n initReq(reqType, url, asynch, respHandle, args); \n } \n } \n } \n else { \n alert(\"Your browser does not permit the use of all \"+ \n \"of this application's features!\"); \n } \n}", "title": "" }, { "docid": "23f31d98d2ebb70ac5e48b57e2c47e75", "score": "0.6728007", "text": "function ajax(config){\n//Headers\nvar headers= {\n\t\t\t\"*\": \"*/\".concat(\"*\"),\n\t\t\t'text': \"text/plain\",\n\t\t\t'html': \"text/html\",\n\t\t\t'xml': \"application/xml, text/xml\",\n\t\t\t'json': \"application/json, text/javascript\"\n\t\t}\nvar conf = config;\nvar scope = conf['scope'] ?conf['scope']: window;\nvar type = conf['type'] ?conf['type']:\"json\";\nvar async = typeof(conf['async']) == 'boolean' ?conf['async']:true;\n\nif(type != 'jsonp'){\nvar method = conf['method'] ?conf['method']: \"GET\";\nvar req = new XMLHttpRequest();\nvar isExecuted = false;\nreq.onreadystatechange = function () {\n\n if (req.readyState != 4) return; //exit if the xhr is not ready\n\tif (isExecuted) return; //exit if it was called twice \n\tisExecuted = true;\n if (req.status != 200 && req.status != 304) { // execute failure if the the status is not \"SUCCESS\" or \"NOT Modified\"\n \tconf['failure'].call(scope,null,'failed',req);\n return;\n }\n \n try{\n\t\tdata = type == \"json\" ? JSON.parse(req.responseText) : req.responseText;\n \tconf['success'].call(scope,data,'success',req); // execute when data is recived\n }\n catch(e){ // execute failure when we cannot parse string to json\n \tconf['failure'].call(scope,null,'failed',req);\n }\n\n}\nif (req.readyState == 4) return; // exit if the XHR is not ready\nvar generatedUrl = '';\nvar generatedData = '';\nif(method =='GET'){\n\tgeneratedUrl = generateUrl(conf['url'],convertDatatoParams(conf['data']));\n\tgeneratedData = null;\n}\nelse{\n\tgeneratedUrl = conf['url'];\n\tgeneratedData = convertDatatoParams(conf['data']);\n}\nreq.open(method,generatedUrl,async);\nreq.setRequestHeader(\"Content-Type\",headers[type]);\nreq.send(generatedData);\n\n}\nelse{\nvar script = document.createElement('script');\nvar callbackfunc = config['callback']?config['callback']:(\"e\" + Date.now());\nvar head = document.getElementsByTagName('head')[0];\nvar status = 'failed';\nfunction callback(data){\n\thead.removeChild(script);\n\tstatus = 'success';\n\tconf['success'].call(scope,data,status);\n}\n\nwindow[callbackfunc] = function(obj){\n\tcallback(obj);\n}\nscript.setAttribute('src',generateUrl(conf['url'],convertDatatoParams(conf['data'])) + '&jsoncallback=' + callbackfunc);\nscript.async = async;\n\nscript.addEventListener('error',function(){\nhead.removeChild(script);\n\tconf['failure'].call(scope,null,status);\n},false);\nif (e['browser']['msie'] && e['browser']['version'] == 8)\nscript.attachEvent('onerror',function(){\n\thead.removeChild(script);\n\tconf['failure'].call(scope,null,status);\n});\n\nhead.appendChild(script); \n}\n\n}", "title": "" }, { "docid": "0cea6119463ef36b61b3b7f2e41c8b6e", "score": "0.6708389", "text": "function ajaxRequest(_url, _form, _settings, _callback) {\n // code for IE7+, Firefox, Chrome, Opera, Safari\n let xmlhttp = new XMLHttpRequest();\n\n try {\n if (_settings == null) _settings = {};\n\n // set send method\n if (typeof _settings.method != \"undefined\") {\n xmlhttp.open(_settings.method, _url, true);\n\n } else { // default\n xmlhttp.open(\"POST\", _url, true);\n }\n\n // set content type\n if (typeof _settings.contentType != \"undefined\") {\n if (_settings.contentType) {\n xmlhttp.setRequestHeader(\"Content-type\", _settings.contentType);\n }\n\n } else { // default\n xmlhttp.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n }\n\n // set custom headers\n if (typeof _settings.headers != \"undefined\") {\n let headers = _settings.headers;\n for (let i = 0; i < headers.length; i++) {\n xmlhttp.setRequestHeader(headers[i][0], headers[i][1]);\n }\n }\n\n // send request to server\n if (_form == null) {\n xmlhttp.send();\n\n } else {\n xmlhttp.send(_form);\n }\n\n // response on state change and return the responds\n xmlhttp.onreadystatechange = function () {\n if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {\n _callback(xmlhttp.responseText, xmlhttp.status);\n\n } else if (xmlhttp.status !== 200) {\n _callback(null, xmlhttp.status);\n }\n };\n }\n catch (err) { // catch client error\n console.error(err);\n }\n}", "title": "" }, { "docid": "7f51a8b15ba55e1ec8e5711b2326c5a4", "score": "0.67061365", "text": "function ajaxRequest(method, url, data, callback){\t\n\t_request.open(method,url+data,true);\n\t//if post then set request header\n\tif(method == \"POST\"){\n\t\t_request.setRequestHeader \n\t\t('Content-Type','application/x-www-form-urlencoded');\n\t}\n\t//if ready state is 4 (ready) and request status is 200 (request successful) then\n\t_request.onreadystatechange = function(){\n\t\tif (_request.readyState == 4) {\n\t\t\tif (_request.status == 200) {\n\t\t\t\tresponse = _request.responseText;\n\t\t\t\t\n\t\t\t\tcallback(response);\t\n\t\t\t\t} \n\t\t\t\telse\t\n\t\t\t\t{\n\t\t\t\t//else handle error\n\t\t\t\thandleError(_request.statusText);\n\t\t\t\t}\n\t\t\t}\n \t\t }\n\t_request.send(data);\n\t}", "title": "" }, { "docid": "21fec2fa89ee23cc4c5b91c18b6b377b", "score": "0.6705166", "text": "function make_request(method_type, url, data, success_fun) {\n $.ajax({\n type: method_type,\n url: url,\n data: data,\n dataType: \"JSON\",\n processData: false,\n contentType: false,\n success: success_fun\n });\n }", "title": "" }, { "docid": "0435e2c4a103bc7842530d4f647cc9d0", "score": "0.67025167", "text": "function AjaxRequest (url, opts){\n var headers = {\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-Prototype-Version': '1.6.1',\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\n };\n var ajax = null;\n \n if (window.XMLHttpRequest)\n ajax=new XMLHttpRequest();\n else\n ajax=new ActiveXObject(\"Microsoft.XMLHTTP\");\n \n if (opts.method==null || opts.method=='')\n method = 'GET';\n else\n method = opts.method.toUpperCase(); \n \n if (method == 'POST'){\n headers['Content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n } else if (method == 'GET'){\n addUrlArgs (url, opts.parameters);\n }\n\n ajax.onreadystatechange = function(){\n// ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; states 0-4\n if (ajax.readyState==4) {\n if (ajax.status >= 200 && ajax.status < 305)\n if (opts.onSuccess) opts.onSuccess(ajax);\n else\n if (opts.onFailure) opts.onFailure(ajax);\n } else {\n if (opts.onChange) opts.onChange (ajax);\n }\n } \n \n ajax.open(method, url, true); // always async!\n\n for (var k in headers)\n ajax.setRequestHeader (k, headers[k]);\n if (matTypeof(opts.requestHeaders)=='object')\n for (var k in opts.requestHeaders)\n ajax.setRequestHeader (k, opts.requestHeaders[k]);\n \n if (method == 'POST'){\n var a = [];\n for (k in opts.parameters){\n\t if(matTypeof(opts.parameters[k]) == 'object')\n\t\tfor(var h in opts.parameters[k])\n\t\t\ta.push (k+'['+h+'] ='+ opts.parameters[k][h] );\n\t else\n a.push (k +'='+ opts.parameters[k] );\n\t}\n ajax.send (a.join ('&'));\n } else {\n ajax.send();\n }\n}", "title": "" }, { "docid": "e9469ba1dcbb37f36bf580fa963e7f0b", "score": "0.66876715", "text": "function httpRequest(reqType,url,asynch){\n //Mozilla-based browsers\n \n\tif(window.XMLHttpRequest){\n request = new XMLHttpRequest();\n } else if (window.ActiveXObject){\n request=new ActiveXObject(\"Msxml2.XMLHTTP\");\n if (! request){\n request=new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n }\n //the request could still be null if neither ActiveXObject\n //initializations succeeded\n if(request){\n initReq(reqType,url,asynch);\n } else {\n alert(\"Your browser does not permit the use of all \"+\n \"of this application's features!\");}\n\t\n}", "title": "" }, { "docid": "5d91c1756eea935794776cb004d3f1d6", "score": "0.6685686", "text": "function request() {\n var ajax = new _ajaxRequest.default();\n return ajax.request.apply(ajax, arguments);\n }", "title": "" }, { "docid": "5d91c1756eea935794776cb004d3f1d6", "score": "0.6685686", "text": "function request() {\n var ajax = new _ajaxRequest.default();\n return ajax.request.apply(ajax, arguments);\n }", "title": "" }, { "docid": "7afd2d04f7be4d25dd238d05cedb651f", "score": "0.668524", "text": "function setting_company_gig_car_process(){\n\tconsole.log(\"ajax server request runing for the gig_car\");\n\tvar xhttp = new XMLHttpRequest();\n\txhttp.onreadystatechange = function() {\n\t\tif (this.readyState == 4 && this.status == 200) {\n\t\t\tvar seller=JSON.parse(this.responseText);\n\t\tsetting_company_gig_car(seller);\n\t\t}\n\t};\n\txhttp.open(\"GET\", \"/gig_car\", true);\n\txhttp.send();\n}", "title": "" }, { "docid": "21c9580bcfe0893a3b2aead67e727123", "score": "0.66677624", "text": "function getLogisticsShipmentDetails(number,ponum,id){\n // alert(\"hii\");\n \n var num=number;\n var ponumber=ponum;\n var id = id;\n //alert(\"this general ajax num-->\"+num);\n //alert(\"this general ajax ponumber-->\"+ponumber);\n //alert(\"this general ajax id-->\"+id);\n // var req = new XMLHttpRequest(); &id=\"+id\n $(function() {\n \n $('#detail_box').show();\n return false;\n \n });\n var req = getXMLHttpRequest();\n req.onreadystatechange = readyStateHandlerText(req,populateLogisticsShipmentDetails); \n \n var url=\"../ajax/getLogisticsShipmentDetails.action?asnNumber=\"+num+\"&poNumber=\"+ponum+\"&id=\"+id;\n \n req.open(\"GET\",url,\"true\");\n req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n req.send(null);\n}", "title": "" }, { "docid": "9ee86844cadca34cfb3761c9bc399409", "score": "0.6661638", "text": "function ajax(funcname, param, postdata, callback) {\n // private\n this.xmldata;\n // public\n var req=false;\n var sync;\n\n function get_return() {\n req.return_value=json_decode(req.responseText);\n }\n\n function req_change() {\n if(req.readyState==4) {\n if(req.status==0)\n\treturn;\n\n get_return();\n\n if(callback)\n callback(req);\n }\n }\n\n // branch for native XMLHttpRequest object\n if(window.XMLHttpRequest) {\n try {\n req = new XMLHttpRequest();\n }\n catch(e) {\n req = false;\n }\n // branch for IE/Windows ActiveX version\n } else if(window.ActiveXObject) {\n try {\n req = new ActiveXObject(\"Msxml2.XMLHTTP\");\n }\n catch(e) {\n try {\n req = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n catch(e) {\n req = false;\n }\n }\n }\n\n if(req) {\n var p=new Array();\n ajax_build_request(param, \"param\", p);\n p=p.join(\"&\");\n\n if(typeof(postdata)==\"function\") {\n callback=postdata;\n postdata=\"\";\n }\n else if(!postdata)\n postdata=\"\";\n\n req.onreadystatechange = req_change;\n sync=callback!=null;\n req.open((postdata==\"\"?\"GET\":\"POST\"),\n \"ajax.php?func=\"+funcname+\"&\"+p, sync);\n last_params=p;\n\n if(postdata!=\"\") {\n req.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n req.setRequestHeader(\"Content-length\", postdata.length);\n req.setRequestHeader(\"Connection\", \"close\");\n }\n\n req.send(postdata);\n\n if(!sync) {\n get_return();\n }\n }\n\n return req;\n}", "title": "" }, { "docid": "b9e356d1f2b5d0ba694576232e299763", "score": "0.6658813", "text": "function ajax_request(uri){\n\n $('loadwindow').show();\n new Ajax.Request(uri, {\n method: 'get',\n onComplete: function(transport){\n\t\t\t$('loadingtext').innerHTML = loading_text;\n $('loadwindow').hide();\n\n ui_add_window(transport.responseText);\n \n }\n });\n}", "title": "" }, { "docid": "e856ed1ba8927b9168f87000c6bf28cb", "score": "0.6653338", "text": "function ajaxFunction(uri, method, data) {\r\n return $.ajax({\r\n type: method,\r\n url: uri,\r\n dataType: 'json',\r\n contentType: 'application/json',\r\n crossDomain: true,\r\n data: data ? JSON.stringify(data) : null\r\n }).fail(function (jqXHR, textStatus, errorThrown) {\r\n alert('Error : ' + errorThrown);\r\n });\r\n }", "title": "" }, { "docid": "d63dbd29c651c00fcc2402187763d1d5", "score": "0.6645008", "text": "function firstInvite(){\n\t\n\tvar payload = {title: \"Test\", address: \", Canada\", phone: \"111-111-1111\", email: \"[email protected]\", community: undefined};\n\tvar target = \"https://www.tastes-good.com/uploader/sales_new_prospect.php\";\n\tvar callback = function(response){\n\tApp.rest_id = response.data.rest_id;\n\tApp.rest_token = response.data.token;\n\t\n\tconsole.log(\"[email protected] PROSPECT CREATED\");\n\tapproveInvite(response.data);\n\t\t\n};\n\najaxRequest(target, payload, callback);\n}", "title": "" }, { "docid": "1a4070f45e7f32ab7d148937d8da0000", "score": "0.6643506", "text": "function AjaxRequest (url, opts){\r\n RPM++;\r\n var headers = {\r\n 'X-Requested-With': 'XMLHttpRequest',\r\n 'X-Prototype-Version': '1.6.1',\r\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\r\n };\r\n var ajax = null;\r\n \r\n if (window.XMLHttpRequest)\r\n ajax=new XMLHttpRequest();\r\n else\r\n ajax=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n \r\n if (opts.method==null || opts.method=='')\r\n method = 'GET';\r\n else\r\n method = opts.method.toUpperCase(); \r\n \r\n if (method == 'POST'){\r\n headers['Content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\r\n } else if (method == 'GET'){\r\n addUrlArgs (url, opts.parameters);\r\n }\r\n ajax.onreadystatechange = function(){\r\n// ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; states 0-4\r\n if (ajax.readyState==4) {\r\n if (ajax.status == 500)\r\n if (opts.onFailure) opts.onFailure(ajax);\r\n if (ajax.status >= 200 && ajax.status < 305)\r\n if (opts.onSuccess) opts.onSuccess(ajax);\r\n else\r\n if (opts.onFailure) opts.onFailure(ajax);\r\n \r\n Options.ResponseSize += parseInt(ajax.getResponseHeader (\"Content-Length\"));\r\n } else {\r\n if (opts.onChange) opts.onChange (ajax);\r\n } \r\n } \r\n \r\n ajax.open(method, url, true); // always async!\r\n for (var k in headers)\r\n ajax.setRequestHeader (k, headers[k]);\r\n if (matTypeof(opts.requestHeaders)=='object')\r\n for (var k in opts.requestHeaders)\r\n ajax.setRequestHeader (k, opts.requestHeaders[k]);\r\n \r\n \r\n if (method == 'POST'){\r\n var a = [];\r\n for (k in opts.parameters){\r\n if(matTypeof(opts.parameters[k]) == 'object')\r\n for(var h in opts.parameters[k])\r\n a.push (k+'['+h+'] ='+ opts.parameters[k][h] );\r\n else\r\n a.push (k +'='+ opts.parameters[k] );\r\n }\r\n ajax.send (a.join ('&'));\r\n } else {\r\n ajax.send();\r\n }\r\n}", "title": "" }, { "docid": "486bd14720467dfffa6fe5a30cdef717", "score": "0.6631045", "text": "function requestServce(url_request, json_request, callback) {\n\t$.ajax({\n\t\turl: url_request,\n\t\ttype: 'POST',\n\t\tcontentType: 'application/json; charset=utf-8',\n\t\tdata: JSON.stringify(json_request),\n\t\tdataType: 'json',\n\t\tsuccess: callback\n\t});\n}", "title": "" }, { "docid": "06b525781dd5f25d367c85bea720f1ba", "score": "0.6628085", "text": "function ajax() {\n var xhr = new XMLHttRequest();\n xhr.open(\"POST\", \"formPost\");\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n var input = document.getElementByTagName(\"input\");\n var obj = {\n fname: input[0].value,\n lname: input[1].value\n };\n xhr.send(JSON.stringify(obj));\n return false;\n }", "title": "" }, { "docid": "c5245872e9fba0944abfe13b6ac98345", "score": "0.6623901", "text": "function getRequest(url, success, error, data) {\r\n\t\t var req = false;\r\n\t\t try{\r\n\t\t // most browsers\r\n\t\t req = new XMLHttpRequest();\r\n\t\t } catch (e){\r\n\t\t // IE\r\n\t\t try{\r\n\t\t req = new ActiveXObject(\"Msxml2.XMLHTTP\");\r\n\t\t } catch(e) {\r\n\t\t // try an older version\r\n\t\t try{\r\n\t\t req = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t\t } catch(e) {\r\n\t\t return false;\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t if (!req) return false;\r\n\t\t if (typeof success != 'function') success = function () {};\r\n\t\t if (typeof error!= 'function') error = function () {};\r\n\t\t req.onreadystatechange = function(){\r\n\t\t if(req.readyState == 4) {\r\n\t\t return req.status === 200 ? \r\n\t\t success(req.responseText) : error(req.status);\r\n\t\t }\r\n\t\t }\r\n\t\t req.open(\"POST\", url, true);\r\n\t\t req.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t req.send(data);\r\n\t\t return req;\r\n\t\t}", "title": "" }, { "docid": "d4ff52dc1c9f90d240a53d3c63b5e82a", "score": "0.66192406", "text": "function doAjaxRequest(parameters) {\n\t\t// alows cors requests (necesary for IE10)\n\t\tjQuery.support.cors = true;\n\t\t// performs request\n\t\t$.ajax(\n\t\t{\n\t\t\ttype: \"GET\",\n\t\t\turl: jsget_request_url,\n\t\t\tdata: parameters,\n\t\t\tdataType: \"text\",\n\t\t\tcrossDomain: true,\n\t\t\tsuccess: function (data, textStatus, jqXHR) {\n\t\t\t\tloadOnSuccess(data, textStatus, jqXHR);\n\t\t\t},\n\t\t\terror: loadOnError,\n\t\t\tcomplete: loadOnComplete\n\t\t});\n\t}", "title": "" }, { "docid": "16137f5b8afe8b3ba8b37ced4f3d7e55", "score": "0.66189027", "text": "function makeRequest() {\n if (window.XMLHttpRequest) { // Mozilla, Safari, ...\n httpRequest = new XMLHttpRequest();\n } else if (window.ActiveXObject) { // IE\n try {\n httpRequest = new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch (e) {\n try {\n httpRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\n } catch (e) {}\n }\n }\n\n if (!httpRequest) {\n alert('Giving up :( Cannot create an XMLHTTP instance');\n return false;\n }\n httpRequest.onreadystatechange = fillSidebar; //sidebar\n httpRequest.open('GET', 'data/espn.json');\n httpRequest.send();\n\n console.log('Fired makeRequest');\n\n } //makeRequest", "title": "" }, { "docid": "5fe09b2f6393b7a959590fce25d0a313", "score": "0.661832", "text": "function RequestData(_data)\n{ alert(\"GET request\"); $.ajax({ type:\"GET\",data: _data } ); }", "title": "" }, { "docid": "83bef05de0463115267654c2240d833f", "score": "0.6615755", "text": "function request() {\n const ajax = new _ajaxRequest.default();\n return ajax.request(...arguments);\n }", "title": "" }, { "docid": "d58cd6c7550e36ea60af65eec9158924", "score": "0.6613128", "text": "function xhr(url, data, callback) { \n\t\t\tvar request = new XMLHttpRequest(); \n\t\t\trequest.onreadystatechange = function () { \n\t\t\t\tif (request.readyState == 4 && request.status == 200) { \n\t\t\t\t\tcallback(request.responseText); } \n\t\t\t\t}; \n\t\t\t\trequest.open('POST', url); request.send(data); \n}", "title": "" }, { "docid": "ee51cefa4cabde9f0a1c2ba9ec3812df", "score": "0.660673", "text": "function ajaxRequest(params) {\n $.ajax({\n type: \"GET\",\n url: \"/submit/api/getsubmits\",\n data: params.data,\n dataType: \"json\",\n success: function(data) {\n if(data.status == 0){\n params.success({\n \"rows\": data.object.rows,\n \"total\": data.object.total\n })\n }\n },\n error: function (er) {\n params.error(er);\n }\n });\n}", "title": "" }, { "docid": "70096d68e6bd7f0b84aa199dcbfbb7a7", "score": "0.66062516", "text": "function getInvDetails(number,ponum,fileID){\n var num=number;\n //alert(\"inv number-->\"+num);\n // var req = new XMLHttpRequest();\n $(function() {\n \n $('#detail_box').show();\n return false;\n \n });\n var req = getXMLHttpRequest();\n req.onreadystatechange = readyStateHandlerText(req,populateInvDetails); \n\n var url=\"../ajax/getInvDetails.action?invNumber=\"+num+\"&poNumber=\"+ponum+\"&fileId=\"+fileID;\n req.open(\"GET\",url,\"true\");\n req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n req.send(null);\n}", "title": "" }, { "docid": "1c5abe87284dcc2f3946a2db23f843c9", "score": "0.6588559", "text": "function httpRequest(reqType,url,asynch){\n //Mozilla-based browsers\n if(window.XMLHttpRequest){\n request = new XMLHttpRequest();\n } else if (window.ActiveXObject){\n request=new ActiveXObject(\"Msxml2.XMLHTTP\");\n if (! request){\n request=new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n }\n //the request could still be null if neither ActiveXObject\n //initializations succeeded\n if(request){\n initReq(reqType,url,asynch);\n } else {\n alert(\"Your browser does not permit the use of all \"+\n \"of this application's features!\");}\n}", "title": "" }, { "docid": "228aa321e0c64c4b24b02eb44746064a", "score": "0.65872115", "text": "function aJaxManejador(){\n\t\t\t\t\t\thttp.open('get', pag+'?'+ act,true);\n\t\t\t\t\t\thttp.onreadystatechange = handleResponse;\n\t\t\t\t\t\thttp.send(null);\n\t\t\t\t}", "title": "" }, { "docid": "0b7b84365e010ae1f5061ec25e50add6", "score": "0.65869975", "text": "static _request(url, ajax, success, failure) {\n var headers = new Headers();\n headers.append('Content-Type', 'application/json');\n\n ajax.headers = headers;\n (async () => {\n try {\n let response = await fetch(url, ajax);\n let data = await response.json();\n\n if (data.error) {\n if (failure) {\n failure(data.error);\n }\n } else if (success) {\n success(data);\n }\n } catch (e) {\n if (failure) {\n failure(e);\n }\n }\n })();\n }", "title": "" }, { "docid": "f331b6eebf0c7c4fe2377060b1921e93", "score": "0.6586924", "text": "initRequest(){this.shadowRoot.querySelector(\"#rssajax\").generateRequest()}", "title": "" }, { "docid": "51a8eced5841f329c7b2eadbb0baf0e0", "score": "0.65822303", "text": "function ajax(method, url, data, success, error) {\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(method, url);\r\n xhr.setRequestHeader(\"Accept\", \"application/json\");\r\n xhr.onreadystatechange = function () {\r\n if (xhr.readyState !== XMLHttpRequest.DONE) return;\r\n if (xhr.status === 200) {\r\n success(xhr.response, xhr.responseType);\r\n } else {\r\n error(xhr.status, xhr.response, xhr.responseType);\r\n }\r\n };\r\n xhr.send(data);\r\n }", "title": "" }, { "docid": "a021f6d5509910d4c061a911745a6203", "score": "0.6565531", "text": "function callAjax(callback, req_type, req_url, req_body) {\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = function() {\n if (xmlhttp.readyState == XMLHttpRequest.DONE && xmlhttp.status == 200) {\n callback(xmlhttp.responseText);\n }\n }\n xmlhttp.open(req_type, req_url, true);\n xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');\n xmlhttp.send(req_body);\n}", "title": "" }, { "docid": "1e0faed3601a0bfb4cf997134c088421", "score": "0.6556401", "text": "function _ajax_request(url, data, callback, type, method){\n if(jQuery.isFunction(data)){\n callback = data;\n data = {};\n }\n return jQuery.ajax({\n type: method,\n url: url,\n data: data,\n success: callback,\n dataType: type\n }); \n}", "title": "" }, { "docid": "e6bce71a58257e1350c5a98b70daaeec", "score": "0.6555229", "text": "function reqData(){\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200) {\n display(JSON.parse(this.responseText));\n } else if(this.status === 404 && this.readyState === 4)\n {\n alert(\"An error occur please refresh!\");\n } \n };\n xhr.open(\"GET\", url, true);\n xhr.send();\n}", "title": "" }, { "docid": "ac56a92161ccaad41ee4d70b304b6f1f", "score": "0.65546036", "text": "function init(){\n if (window.XMLHttpRequest) {\n //alert(\"init successful\");\n return new XMLHttpRequest();\n } else if (window.ActiveXObject) {\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n } else {\n alert(\"Your browser does not support AJAX!\");\n }\n }", "title": "" }, { "docid": "8a66a49e705bf57e8d7378e804c7c0cf", "score": "0.65525156", "text": "function ajax_background(type, view,data1){\n var tool = new XMLHttpRequest();\n tool.open(\"POST\", \"/MVC/ajax_php/ajax_MVC.php\", true);\n tool.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n tool.onreadystatechange = function () {\n if (tool.readyState == 4 && tool.status == 200) {\n //console.log(tool.responseText);\n var response = JSON.parse(tool.responseText);\n //console.log(response);\n if (\"ERROR\" in response){\n errors(response.ERROR);\n } else if (\"ALERT\" in response){\n alerts(response.ALERT,response.DATA)\n } else {\n switchArray(type,response);\n }\n }\n };\n tool.send(\"type=\"+type+\"&view=\"+view+\"&data1=\"+data1+\"&data2=&data3=&data4=&data5=&data6=\");\n}", "title": "" }, { "docid": "fec5afe2bcf43bb574a4836b8a5b9051", "score": "0.65453917", "text": "function makeRequest() {\n if (window.XMLHttpRequest) {\n httpRequest = new XMLHttpRequest();\n }\n else {\n httpRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n\n httpRequest.onreadystatechange = responseMethod;\n httpRequest.open('GET', url + '?api_key=' + apiKey + '&country=US&year=2021');\n httpRequest.send();\n //set up country and year as variable, create a form to get values and use in request\n }", "title": "" }, { "docid": "55853c6e46523c9cf2d3fbca451781c6", "score": "0.65440965", "text": "call_of_ajax(obj = {}, multiple_request = 'false') {\n\t\t// Prevents multiple AJAX request.\n\t\tif (this.request_in_progess && multiple_request == 'false') {\n\t\t\treturn;\n\t\t}\n\t\tthis.request_in_progess = true;\n\t\tthis.show_loading({\n\t\t\te: obj.e\n\t\t});\n\n\t\tlet xhr = new XMLHttpRequest();\n\t\txhr.open(this.method, this.url, true);\n\t\txhr.setRequestHeader('X-Requested-with', 'XMLHttpRequest');\n\t\t//--For POST request\n\t\t// Do not set content-type with FormData\n\t\tif (obj.has_form == false && this.method == 'POST') {\n\t\t\txhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');\n\t\t}\n\n\t\txhr.onreadystatechange = () => {\n\t\t\ttry {\n\t\t\t\tconsole.log(xhr.readyState, xhr.status);\n\t\t\t\tif (xhr.readyState == 4 && xhr.status == 200) {\n\t\t\t\t\tthis.hide_loading({\n\t\t\t\t\t\te: obj.e,\n\t\t\t\t\t\tdefault_btn_value: this.hide_loading_param\n\t\t\t\t\t});\n\t\t\t\t\tconsole.log(xhr.responseText);\n\t\t\t\t\tlet json = JSON.parse(xhr.responseText);\n\n\t\t\t\t\tif (json.hasOwnProperty('type')) {\n\t\t\t\t\t\tswitch (json.type) {\n\t\t\t\t\t\t\tcase 'create_short_url':\n\t\t\t\t\t\t\t\tif (json.hasOwnProperty('result') && json.result == 'true') {\n\t\t\t\t\t\t\t\t\twindow.location.href ='./shorted_url.php?id='+json.data.short_url_id;\n\t\t\t\t\t\t\t\t} else if (json.hasOwnProperty('errors')) {\n\t\t\t\t\t\t\t\t\tthis.show_reg_form_err(json.errors);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'total_views':\n\t\t\t\t\t\t\t\tif (json.hasOwnProperty('result') && json.result == 'true') {\n\t\t\t\t\t\t\t\t\tif(json.data['views'] > ShowLiveView.get_previous_views){\n\t\t\t\t\t\t\t\t\tcounter_meter('live_view_here', json.data['views']);\n\t\t\t\t\t\t\t\t\tShowLiveView.get_previous_views = json.data['views'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (json.hasOwnProperty('errors')) {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t/*case 'user_reg':\n\t\t\t\t\t\t\t\tif (json.hasOwnProperty('result') && json.result == 'true') {\n\t\t\t\t\t\t\t\t\t// [][][] show alert like PUBG (yellow) .\n\t\t\t\t\t\t\t\t\t// alert => may be data has been added successfuly.\n\t\t\t\t\t\t\t\t\tthis.reset_reg_form_err();\n\t\t\t\t\t\t\t\t\twindow.location.href = json['redirect_url'];\n\t\t\t\t\t\t\t\t} else if (json.hasOwnProperty('errors')) {\n\t\t\t\t\t\t\t\t\tthis.show_reg_form_err(json.errors);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 'user_login':\n\t\t\t\t\t\t\t\tif (json.hasOwnProperty('result') && json.result == 'true') {\n\t\t\t\t\t\t\t\t\tthis.reset_login_form_err();\n\t\t\t\t\t\t\t\t\twindow.location.href = json['redirect_url'];\n\t\t\t\t\t\t\t\t} else if (json.hasOwnProperty('errors') && json.result == 'false') {\n\t\t\t\t\t\t\t\t\tthis.show_login_form_err(json.errors);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;*/\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t// statements_def\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if (xhr.readyState == 4 && xhr.status == 404) {\n\t\t\t\t\t// code for handle errors...\n\t\t\t\t\t// [][][] show alert like PUBG (yellow) .\n\t\t\t\t\t// alert => may be like something went wrong.\n\t\t\t\t\tconsole.log(`ERROR : script for processing not found. (${xhr.status})`);\n\t\t\t\t\t// (has_form == true) ? hide_loading(e) : hide_loading_specific(e);\n\n\t\t\t\t}\n\t\t\t\t// It means request has completed.\n\t\t\t\tthis.request_in_progess = false;\n\t\t\t} catch (e) {\n\t\t\t\t// [][][] show alert like PUBG (yellow) .\n\t\t\t\tconsole.log('%c ERROR : ' + e, 'color: red;');\n\t\t\t} finally {\n\t\t\t\t/*\t if(xhr.readyState == 4){\n\t\t\t\t\t\t\tif(document.querySelector('.temp_loading')){\n\t\t\t\t\t\t\t\tlet second_loading = document.querySelectorAll('.temp_loading');\n\t\t\t\t\t\t\t\tfor (let k = 0; k < second_loading.length; k++) {\n\t\t\t\t\t\t\t\t\tsecond_loading[k].remove();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}*/\n\t\t\t}\n\n\n\t\t}; // onreadystatechange()\n\t\t/* Sending the request */\n\t\tif (obj.has_form == true) {\n\t\t\txhr.send(this.get_form_data(this.form_id));\n\t\t} else {\n\t\t\txhr.send();\n\t\t}\n\t}", "title": "" }, { "docid": "9c15b2b05de8de7b4aff11ff8b5799b7", "score": "0.6534358", "text": "function getTodosAJAX() {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\",\"/api/todos\",true);\n xhr.onreadystatechange = function () {\n\n if(xhr.readyState==RESPONSE_DONE){\n if(xhr.status == STATUS_OK){\n addTodoElements(xhr.responseText);\n }\n }\n };\n xhr.send(data=null);\n}", "title": "" }, { "docid": "f4c10956bb4df1f1bbe86f985ea8d9f9", "score": "0.65304655", "text": "function $MI_AJAX(data){//==============================================================================start AJAX\n\n\tparameter = '';\n\tif(typeof data.data != \"undefined\"){//disini pembuatan parameter jika diperlukan.\n\n\t\tfor(x in data.data){\n\t\t\tparameter = parameter + x + '=' + data.data[x] +'&';\n\t\t}\n\t}\n\n\tvar xhttp;\n\tif (window.XMLHttpRequest) {\n\t // code for modern browsers\n\t xhttp = new XMLHttpRequest();\n\t} else {\n\t // code for IE6, IE5\n\t \txhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t}\n\t\n\tmethode = data.methode.toUpperCase();\n\tif(methode=='POST'){\n\t\txhttp.open(methode, data.url, true);\n\t\txhttp.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n \t\txhttp.send(parameter);\n\t}\n\telse if(methode=='GET'){\n\t\txhttp.open(methode, data.url+ \"?\"+ parameter, true);\n \t\txhttp.send();\n\t}\n\telse {\n\t\talert('SMI Scurity : Error Ajax ..');\n\t} \n\t\n\tif(typeof data.PROGRESS != \"undefined\"){//data progress dijalankan\n\t\txhttp.onprogress = function(){\n\t\t\tdata.PROGRESS(xhttp.status);\n\t\t}\n\t}\n\n\tif(typeof data.HASIL!= \"undefined\"){\n\t\txhttp.onload = function () {//memanggil function hasil dari ajax\n\t\t\tdata.HASIL(xhttp.responseText);\n\t\t}\t\n\t}\n\t//==================================================================================================//end AJAX\n\n}", "title": "" }, { "docid": "94cd4eaa01287b05b02831db088332c8", "score": "0.6527602", "text": "function getLogisticsInvDetails(number,id){\n // alert(\"hii\");\n var num=number;\n var id=id;\n //alert(\"inv number-->\"+num);\n // var req = new XMLHttpRequest();\n $(function() {\n \n $('#detail_box').show();\n return false;\n \n });\n var req = getXMLHttpRequest();\n req.onreadystatechange = readyStateHandlerText(req,populateLogisticsInvDetails); \n \n var url=\"../ajax/getLogisticsInvDetails.action?invNumber=\"+num+\"&id=\"+id;\n \n req.open(\"GET\",url,\"true\");\n req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n req.send(null);\n}", "title": "" }, { "docid": "00a7eac2b507e48e78874f10d458121b", "score": "0.6525241", "text": "function ajaxGetRequest(url) {\n $.ajax({\n type: 'GET',\n url: url,\n dataType: 'json',\n beforeSend: function () {\n $(\"#preloader\").show();\n },\n complete: function () {\n $(\"#preloader\").hide();\n },\n success: function (response) {\n $.toast().reset('all');\n var delayTime = 0;\n if (response.delayTime) {\n delayTime = response.delayTime;\n }\n if (response.success) {\n toastr.success(response.message, delayTime);\n } else {\n toastr.error(response.message, delayTime);\n }\n if (response.url) {\n if (response.delayTime) {\n setTimeout(function () {\n window.location.href = response.url;\n }, response.delayTime);\n } else {\n window.location.href = response.url;\n }\n }\n }\n });\n }", "title": "" }, { "docid": "44909197b7ed82d64c9d0ff6869aede1", "score": "0.6523919", "text": "function sendRequest(request){\n $.getJSON(request, onDataReturn);\n }", "title": "" }, { "docid": "e5e5cec1412095c8d5aad076c5606b1e", "score": "0.652136", "text": "function getPartnerDetails(partnerId){\n // alert(\"hii\");\n $(function() {\n \n $('#detail_box').show();\n return false;\n \n });\n var req = getXMLHttpRequest();\n req.onreadystatechange = readyStateHandlerText(req,populatePartnerDetails); \n var url=\"../ajax/getPartnerDetails.action?partnerId=\"+partnerId;\n req.open(\"POST\",url,\"true\");\n // req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n req.send(null);\n}", "title": "" }, { "docid": "dc2c2d46d4b667042fb3a97e44c254a5", "score": "0.65038615", "text": "function cpan_forum_ajaxFunction(url, action) {\n var xmlHttp = cpan_forum_get_xmlHttp();\n if (xmlHttp == false) {\n alert(\"Your browser does not support AJAX!\");\n return;\n }\n xmlHttp.onreadystatechange=function() {\n if(xmlHttp.readyState==4) {\n action(xmlHttp.responseText);\n }\n }\nalert(url);\n xmlHttp.open(\"GET\", url, true);\n xmlHttp.send(null);\n}", "title": "" }, { "docid": "3bb4a78575d1c9a35451a2126cb3ae98", "score": "0.65035635", "text": "function search(){\n $.ajax({\n url: getURL(),\n success: resultReceived\n });\n}", "title": "" }, { "docid": "31511589a444f4fa172a81897371b0c0", "score": "0.650188", "text": "function ajaxRequest(URL, Type, Parameters) {\n\n var request = new XMLHttpRequest;\n this.URL = URL + Parameters.city + ',' + Parameters.state + '&units=metric';\n\n //if request failed\n if(!request) {\n alert('Page request failed.');\n\treturn false;\n }\n \n //create object \n var createdObj = {}\n createdObj.success = false;\n\tcreatedObj.code = undefined;\n createdObj.codeDetail = undefined;\n createdObj.response = undefined;\n\t\n\t\n //test the state of the request and response code\n //assign the response if complete and success\n request.onreadystatechange = function() {\n if(request.readyState === 4) {\n createdObj.code = request.status;\n createdObj.codeDetail = request.statusText;\n createdObj.response = request.responseText;\n\t\n \t if(request.status >= 200 && request.status <= 226) {\n\t createdObj.success = true;\n\t }\n\t}\n };\n \n /* \n // Prepare GET or POST request details\n var url = URL; // local URL in case of GET\n var strungURL = urlStringify(Parameters);\n // Set up GET or POST details\n if (Type === 'GET') {\n url += strungURL;\n } else if (Type !== 'POST') {\n // it's not GET or POST, throw error\n throw 'HTTP request type is not GET or POST.';\n }\n */\n /*\n if (Type === 'POST') {\n request.open(Type, URL);\n request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n request.send(strungURL);\n }\n else if (Type === 'GET') {\n request.open(Type, URL);\n request.send();\n URL += strungURL;\n }\n */\n //determine method to make call\n if (Type === 'GET'){\n URL += '?' + stringURL(Parameters);\n console.debug('UR:', URL);\n request.open(Type, URL, true);\n request.send();\n } else if(Type === 'POST') {\n request.open(Type, URL, true);\n request.setRequestHeader('Content-Type',\n 'application/x-www-form-urlencoded');\n request.send(stringURL(Parameters));\n } else {\n alert('Request must be POST or GET');\n\treturn;\n\t}\n \n return createdObj;\n}", "title": "" }, { "docid": "8059fb627bb4741df311640869e84309", "score": "0.6500053", "text": "function doAjax(uri, method, data, succFunc, errFunc) {\n var option = {\n url: url + (uri.substring(0, 1) === '/' ? uri : '/' + uri),\n method: method,\n dataType: 'jsonp',\n jsonp: 'jsonpcb',\n success: succFunc,\n error: errFunc\n }\n if (data) {\n option['data'] = data;\n }\n $.ajax(option);\n }", "title": "" }, { "docid": "87a1be9ca254933885f3d210391c191e", "score": "0.64997774", "text": "function sendAjaxGet(url, func) {\n \n // step 1: obtain xhr object (Internet Explorer 5,6 don't have it...)\n let xhr = new XMLHttpRequest() || new ActiveXObject(\"Microsoft.HTTPRequest\");\n // step 2: define onreadystatechange\n xhr.onreadystatechange = function() {\n \n // readyState of 4 means request is complete\n // status of 200 means ok\n if (this.readyState == 4 && this.status == 200) {\n func(this);\n }\n }\n // step 3: prepare the request\n xhr.open(\"GET\", url, true);\n // step 4: send the request\n xhr.send(); \n // IF WE WERE SENDING A POST REQUEST OR ANYTHING THAT USED THE BODY\n // IT WOULD GO AS AN ARGUMENT TO SEND()\n}", "title": "" }, { "docid": "f68abef195ee4f45b4096404b1df49e5", "score": "0.6497602", "text": "function makeRequest() {\n\t\t//open method\n\t\thttpRequest = new XMLHttpRequest();\n\t\thttpRequest.onreadystatechange = responseMethod; //1/2final step. set response method function as what should happen??\n\t\t//provide url to method\n\t\thttpRequest.open('GET', url + '&appid=' + apiKey);\n\t\t//sends url\n\t\thttpRequest.send();\n\t}", "title": "" }, { "docid": "5e7fd8aff12a5cdd72e070124d951e27", "score": "0.6492538", "text": "function init_ajax() {\n if (window.XMLHttpRequest)\n request = new XMLHttpRequest();\n else if (window.ActiveXObject)\n try {\n request = new ActiveXObject(\"MSXML2.XMLHTTP\");\n } catch (error) {\n try {\n request = new ActiveXObject(\"Microsoft.XMLHTTP\");\n } catch (error) { /* pass */ }\n }\n}", "title": "" }, { "docid": "ba2281e7a61796148f56e1018418d416", "score": "0.64913374", "text": "function IniciarAJAX(){\r\n var xml_http;\r\n\r\n try {\r\n xml_http = new XMLHttpRequest();\r\n } catch(ee) {\r\n try {\r\n xml_http = new ActiveXObject(\"Msxml2.XMLHTTP\");\r\n } catch(e) {\r\n try {\r\n xml_http = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n } catch(E){\r\n xml_http = false;\r\n }\r\n }\r\n }\r\n return xml_http;\r\n} //fim - IniciarAJAX()", "title": "" }, { "docid": "6fcd5c23eb4cc10817f5d6aa7414b892", "score": "0.6488368", "text": "function ajaxRequest(){\n var xmlhttp;\n if (window.XMLHttpRequest)// code for IE7+, Firefox, Chrome, Opera, Safari\n xmlhttp=new XMLHttpRequest();\n else// code for IE6, IE5\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n return xmlhttp;\n}", "title": "" }, { "docid": "609607a2b0afd6e0137eb7f967e34f6b", "score": "0.6486441", "text": "function ajax_query(url, query, callback, method) {\n if (request) {\n request.open(method, url, true); /* true: asíncrono */\n request.onreadystatechange = function() { if (request.readyState == 4) callback(); };\n request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n request.send(query);\n } else { /* pass */ }\n /* alert(\"Su navegador no soporta Ajax\"); */ /* recuperar */\n\n return false;\n}", "title": "" }, { "docid": "7bb172930b30ef6dd9f7aae2419e3ee8", "score": "0.64755046", "text": "function sendRequest() {\n\t// Show the loader ICON when the AJAX request is taking time to load data\n\tshowLoading();\n\t//gets the lat / lng of the maps center. \n\t//when we move map to new location we get new location and new values for lat/ lng to pass to the Yelp API.\n\t//\tlatitude=32.75&longitude=-97.13 are for Arlington which professor has asked us to keep\n\tvar center = map.getCenter();\n\tvar northeast = map.getBounds().getNorthEast();\n\tvar radius = Math.round(google.maps.geometry.spherical.computeDistanceBetween(center, northeast));\n\tvar xhr = new XMLHttpRequest();\n\t//get Search Parameter and encodeURI encode the query as per the web URL i.e space replaced by %20 etc. \n\tvar query = encodeURI(document.getElementById(\"search\").value);\n\txhr.open(\"GET\", \"php/proxy.php?term=\" + query + \"&latitude=\" + center.lat() + \"&longitude=\" + center.lng() + \"&radius=\" + radius + \"&limit=10\");\n\txhr.setRequestHeader(\"Accept\", \"application/json\");\n\txhr.onreadystatechange = function () {\n\t\tif (this.readyState == 4) {\n\t\t\thideLoading();\n\t\t\tvar jsonResponse = JSON.parse(this.responseText);\n\t\t\tconsole.log(jsonResponse);\n\t\t\t// This creates the elements for displaying the results on the page. \n\t\t\tcreateTitles(jsonResponse, radius);\n\t\t}\n\t};\n\txhr.send(null);\n\n}", "title": "" }, { "docid": "eec32edb1fc35a12b11c7667b480be58", "score": "0.6474686", "text": "function extend_ajax_send_prepare(url){\n\n \txmlHttp.open(\"post\",extend_ajax_php_path + url,true);\n\txmlHttp.onreadystatechange=extend_stateChanged;\n\txmlHttp.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\t\n}", "title": "" }, { "docid": "d5a5bf3330143ff1247926230eda9522", "score": "0.6464496", "text": "function ajaxCall(){\r\n\t //go make an AJAX call\r\n\t \r\n\t if(http){//if object exists\r\n\t \r\n\t http.open('get','data.xml',true);\r\n\t\thttp.onreadystatechange=handleHttpResponse;\r\n\t http.send();\r\n\t }\r\n\t \r\n }", "title": "" }, { "docid": "a5d99ba2156f274772aea4849e4db7f7", "score": "0.6457933", "text": "function sendRequest() {\n\t\t\t// Do request using OAuth, if available\n\t\t\tif ( typeof oauth !== \"undefined\" && jQuery.oauth ) {\n\t\t\t\treturn jQuery.oauth( jQuery.extend( {}, oauth, request ) );\n\t\t\t}\n\n\t\t\treturn jQuery.ajax( request );\n\t\t}", "title": "" }, { "docid": "e46042b5f2b6c3bd4f62ed7af50c5613", "score": "0.6450853", "text": "ajax(config){\r\n config = config || {};\r\n config.type = config.type || 'GET';\r\n config.async = config.async || 'true';\r\n config.data = config.data || {};\r\n config.success = config.success || function(){};\r\n config.error = config.error || function(){};\r\n\r\n // 组装参数列表\r\n let paramArr = [],\r\n param = config.data;\r\n for(let key in param){\r\n if(Array.isArray(param[key])){\r\n let arr = params[key];\r\n for(let item of arr){\r\n paramArr.push(encodeURIComponent(key)+'='+encodeURIComponent(item));\r\n }\r\n }else{\r\n paramArr.push(encodeURIComponent(key)+'='+encodeURIComponent(param[key]));\r\n }\r\n }\r\n let paramStr = paramArr.join('&');\r\n\r\n let xhr = new XMLHttpRequest();\r\n xhr.onreadystatechange = function(){\r\n if(xhr.readyState === 4){\r\n if(xhr.status>=200 && xhr.status<300 || xhr.status===304){\r\n let data;\r\n switch(config.dataType.toLowerCase()){\r\n case 'json': \r\n if(window.JSON && JSON.parse){\r\n data = JSON.parse(xhr.responseText);\r\n }else{\r\n data = eval(xhr.responseText);\r\n }\r\n break;\r\n case 'xml':\r\n data = xhr.responseXML;\r\n break;\r\n default:\r\n data = xhr.responseText;\r\n break;\r\n }\r\n config.success(data);\r\n }else{\r\n config.error();\r\n }\r\n }\r\n };\r\n if(config.type.toUpperCase() === 'GET'){\r\n xhr.open(config.type, config.url + '?' + paramStr, config.async);\r\n xhr.send(null);\r\n }else{\r\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\r\n xhr.open(config.type, config.url, config.async);\r\n xhr.send(paramStr);\r\n }\r\n }", "title": "" }, { "docid": "50ecb8ca834e6d0ea2bba1a2277c84ad", "score": "0.64475715", "text": "function ajax(url, flux, rappel, method) {\n var r = window.XMLHttpRequest ? new XMLHttpRequest() :\n (window.ActiveXObject ? new ActiveXObject(\"Microsoft.XMLHTTP\") : '');\n if (!r) return false;\n r.onreadystatechange = function () {rappel(r);}\n r.open(method ? method : 'GET', url, true);\n if (flux)\n r.setRequestHeader(\"Content-Type\", \n \"application/x-www-form-urlencoded; \");\n r.send(flux);\n return true;\n}", "title": "" }, { "docid": "ee8136a2e0c4eae15849106ed42090b6", "score": "0.644176", "text": "function ajaxCallGetQuestionAnswers(action, fields, primary_key, order, order_by){\n\t//building string to send through an ajax call to the back of the front (question_middle.php) in the format required for 'x-www-form-urlencoded'\n\tfields = escapeThemAll(fields)\n\tvar data = 'json_string={\"action\":\"'+action+'\"'\n\tif(fields != '')\n\t\tdata = data+',\"fields\":'+fields\n\tif(primary_key != '')\n\t\tdata = data+',\"primary_key\":\"'+primary_key+'\"'\n\tif(order!='')\n\t\tdata = data+',\"order\":\"'+order+'\"'\n\tif(order_by!='')\n\t\tdata = data+',\"order_by\":\"'+order_by+'\"'\n\tdata = data + '}'\n\n\t//console.log(data)\n\t//creating an ajax request object.\n\t\n\tvar request = new XMLHttpRequest();\n\t//opening request of type 'POST' to endpoint 'login.php' (back of the front)\n\trequest.open('POST', '../../controllers/question_answer/question_answer_front.php', true);\n\t//setting up the content type in the header to 'x-wwww-form-urlencoded'\n\trequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n\t//making ajax request.\n\trequest.send(data);\n\n\t//ajax request was successful\n\trequest.onload = function() {\n\t\tif (request.status >= 200 && request.status < 400) {\n\t\t\t//console.log(request.responseText)\n\t\t\tvar resp = JSON.parse(request.responseText);\n\t\t\tconsole.log(resp['status'])\n\t\t\tif(resp['status']==\"success\")\n\t\t\t\tlistExamsToTake(resp)\n\t\t\telse\n\t\t\t\tconsole.log(\"Internal error: \"+resp['internal_message'])\n\t\t\t//console.log(JSON.stringify(response))\n\t\t\t//console.log(resp)\n\t\t} else {\n\t\t\tvar resp = request.responseText;\n\t\t\tconsole.log(\"Something major happened!\")\n\t\t\tconsole.log(JSON.stringify(resp))\n\n\t\t}\n\t};\n\n\t//ajax request failed\n\trequest.onerror = function() {\n\t\tconsole.log(\"Something went wrong\")\n\t};\n}", "title": "" }, { "docid": "1a9a08207c4287e73c57eadc246366b4", "score": "0.64382774", "text": "function gethome() {\n\n var home = new ajaxCall();\n home.a.URL = \"/home\";\n home.setArgs();\n // opens up the ajax connection\n home.c.Open();\n}", "title": "" }, { "docid": "db4e97373f844e62e717c0ba87f86007", "score": "0.6426634", "text": "function sendRequest() {\n var url = _app_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].threadEndpoint.replace('{thread}', $('#current_apartment').data('thread'));\n $.ajax(url, {\n method: 'GET',\n headers: {\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-CSRF-TOKEN': $('meta[name=\"csrf-token\"]').attr('content')\n },\n success: function success(data) {\n printResults(data);\n },\n error: function error(e) {\n console.log(e);\n },\n complete: function complete() {\n //scroll to bottom on thread body when it is loaded\n $('.custom_container_body').scrollTop($('.custom_container_body').height());\n }\n });\n}", "title": "" }, { "docid": "33d9253a036858ec4cfffcb1fa8187aa", "score": "0.6425324", "text": "function ajaxCallGet(url, handler)\n{\n let xmlhttp = new XMLHttpRequest();\n\n xmlhttp.open(\"GET\", url, true);\n xmlhttp.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n xmlhttp.onload = handler;\n xmlhttp.send();\n}", "title": "" }, { "docid": "206eb3569a42df161059d1abed959855", "score": "0.6420677", "text": "_handleRequestAjax(options)\n {\n var ajaxSettings = this._applyAJAXResponseHandlers(options.settings);\n $.ajax(ajaxSettings);\n }", "title": "" }, { "docid": "cc3cca5561922d9543cdcea51a5442be", "score": "0.64138377", "text": "function callAjax(action) {\n // Display that data is being loaded.\n show_overlay(\"Data is being loaded. Please wait. If it doesn't load in few seconds, please try again.\");\n\n\t\tvar dtype = 'json';\n\t\tvar postData = {\n\t\t\t'action' : 'questions',\n\t\t\t'SESSION_LID' : 10,\n\t\t\t'SESSION_GID' : 'nysmith',\n\t\t\t'SESSION_UID' : 'reddy'\n\t\t};\n\t\tif (action == 'lesson') {\n\t\t\tdtype = 'text';\n\t\t\tpostData = {\n\t\t\t\t'action' : 'lesson',\n\t\t\t\t'SESSION_LID' : 10,\n\t\t\t\t'SESSION_GID' : 'nysmith',\n\t\t\t\t'SESSION_UID' : 'reddy'\n\t\t\t}\n\t\t};\n\n\t\t$.ajax({\n\t\t\ttype : \"POST\",\n\t\t\turl : \"cgi-bin/Levels1to4/levels1to4.pl\",\n\t\t\tdata : postData,\n\t\t\tdataType : dtype,\n\t\t\t//timeout : 2000,\n\t\t\tbeforeSend : function(xhr) {\n\t\t\t\t//$jsontext.empty();\n\t\t\t},\n\t\t\terror : function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t$jsontext.html('<h2>' + textStatus + '</h2><p>' + errorThrown + '</p>');\n\t\t\t\talert('FAILED: Either it is taking too long or generator failed.' + textStatus);\n\t\t\t},\n\t\t\tsuccess : function(data, textStatus, jqXHR) {\n\t\t\t\tif (!data) {\n\t\t\t\t\t$jsontext.html('<h2>Server not available.</h2><p>Please try again later. We apologize for the inconvenience.</p>');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Assign the returned data to 'globalData' to be used by other functions\n\t\t\t\tglobalData = data;\n\n\t\t\t}\n\t\t}).done( function() {\n if ( typeof globalData === 'undefined' || globalData === \"\" || globalData.length < 0 ) {\n show_overlay(\"There was a problem loading data. Please try again.\");\n } else {\n\t\t\t\tswitch (action) {\n\t\t\t\tcase 'lesson':\n\t\t\t\t\tdisplayLesson();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'examples':\n\t\t\t\t\tdisplayExamples();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'exercises':\n\t\t\t\t\tdisplayExercises();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tests':\n\t\t\t\t\tdisplayTests();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$jsontext.html('<h2>Action requested does not match known types [levels 1 to 4]');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n // remove_overlay();\n }\n });\n\t}", "title": "" }, { "docid": "84ad3092b0063197123d3e46b08fcdb3", "score": "0.6410753", "text": "function do_ajax() {\n\n //check to make sure there are more requests to make\n if (current < ajaxes.length) {\n\n if (ajaxes[current].data == undefined) {\n ajaxes[current].data = {};\n }\n //make the AJAX request with the given data from the `ajaxes` array of objects\n $.ajax({\n url: ajaxes[current].url,\n dataType: ajaxes[current].dataType,\n data: ajaxes[current].data,\n async: IsAsync,\n success: function (serverResponse) {\n GeneralUtilities.BindDropdownGeneric(ajaxes[current].Controlid, serverResponse.model);\n if (IsPredective) {\n $('' + ajaxes[current].Controlid + '').chosen();\n }\n current++;\n\n do_ajax();\n }\n });\n }\n }", "title": "" }, { "docid": "d55097c940c3af5ba1dd233fd183b5c5", "score": "0.64061534", "text": "function httpreq()\r\n{\r\n\tvar ajaxRequest; \r\n\ttry{\r\n\t\tajaxRequest = new XMLHttpRequest();\r\n\t} catch (e){\r\n\t\ttry{\r\n\t\t\tajaxRequest = new ActiveXObject(\"Msxml2.XMLHTTP\");\r\n\t\t} catch (e) {\r\n\t\t\ttry{\r\n\t\t\t\tajaxRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t\t\t} catch (e){\r\n\t\t\t\talert(\"Browser Error!\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn ajaxRequest;\r\n}", "title": "" }, { "docid": "a8f9d6a2e7ae95c27583fd9f4118aef8", "score": "0.6402875", "text": "function ajaxCall(arg,url,fun) {\n var xhr = ajaxFunction();\n xhr.onreadystatechange = function() {\n if (xhr.readyState == 4) {\n if (xhr.status == 200 || xhr.status == 304) {\n\t\t\t\tif (fun != null) {\t\t\t\t\n\t fun(xhr.responseText)\n\t\t\t\t}\n }\n }\n }\n xhr.open(\"POST\", url, true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.send(arg);\n}", "title": "" }, { "docid": "ed7ee29f6c137c276f1c6dac90399124", "score": "0.63961065", "text": "function objetoAjax(){\n if (window.XMLHttpRequest)\n {// code for IE7+, Firefox, Chrome, Opera, Safari\n xmlhttp=new XMLHttpRequest();\n }\n else\n {// code for IE6, IE5\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n return xmlhttp;\n}", "title": "" }, { "docid": "e1cd6671d70502baeb97f600dd5253bd", "score": "0.6387337", "text": "function t_ajax(index, content) {\n var xhttp = new XMLHttpRequest();\n var ret;\n //Defines what happens when you receive an answer with status code 200\n xhttp.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200) {\n if (this.responseText != \"false\") {\n ret = this.responseText;\n }\n }\n };\n\n //Opens the Request in POST-Mode with the given URL\n xhttp.open(\"POST\", 'https://localhost:8080', false);\n\n //Sends the request with the JSON in the POST\n var data = Object();\n data.request = index;\n data.value = content;\n xhttp.send(JSON.stringify(data));\n return ret;\n}", "title": "" }, { "docid": "7b24995d94384359eef56b4fbc28a7b2", "score": "0.6382948", "text": "function get_user_data() {\n ajax_req(\n php_redir,\n \"\", \n get_succ, \n get_err\n );\n}", "title": "" }, { "docid": "04685e06da2badb0292bc4c7b8e49f86", "score": "0.63824666", "text": "function SendAjax4(x, xValue, y, yValue, z, zValue, r, rValue, url, FinalFunction)\n{\n if (window.XMLHttpRequest)\n {// code for IE7+, Firefox, Chrome, Opera, Safari\n\t xmlhttp=new XMLHttpRequest();\n }\n else\n {// code for IE6, IE5\n \t xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n xmlhttp.onreadystatechange=function()\n {\n\t if (xmlhttp.readyState==4 && xmlhttp.status==200)\n\t {\n\t\t FinalFunction(xmlhttp);\n\t }\n };\n xmlhttp.open(\"GET\", url +\".php?\"+ x + \"=\"+xValue+\"&\"+y+\"=\"+yValue+\"&\"+z+\"=\"+zValue+\"&\"+r+\"=\"+rValue,true);\n xmlhttp.send();\n}", "title": "" }, { "docid": "b8e468d581e4203a2347b476b8ca4766", "score": "0.63823485", "text": "function request(method, url, data){\n return $.ajax({\n method: method,\n url: url,\n dataType: \"json\",\n data: data,\n })\n}", "title": "" }, { "docid": "b07de1e392f280e9d5f3b7d03fc96a2d", "score": "0.6381123", "text": "function getRequest(url, success, error) {\n var req = false;\n try{\n // most browsers\n req = new XMLHttpRequest();\n } catch (e){\n // IE\n try{\n req = new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch(e) {\n // try an older version\n try{\n req = new ActiveXObject(\"Microsoft.XMLHTTP\");\n } catch(e) {\n return false;\n }\n }\n }\n if (!req) return false;\n if (typeof success != 'function') success = function () {};\n if (typeof error!= 'function') error = function () {};\n req.onreadystatechange = function(){\n if(req.readyState == 4) {\n return req.status === 200 ? \n success(req.responseText) : error(req.status);\n }\n }\n req.open(\"GET\", url, true);\n req.send(null);\n console.log(req);\n return req;\n}", "title": "" }, { "docid": "a1760685c11958e65e47ef397f1ebe3d", "score": "0.6380515", "text": "function load(){\n ajaxRequest('GET','/exp/init',function(a,b,c){loadHandler(a,b,c)});\n}", "title": "" }, { "docid": "f66b91740270513c9a8d58fe832f700e", "score": "0.6372087", "text": "function getXMLHttpRequest(){if(window.XMLHttpRequest&&(window.location.protocol!==\"file:\"||!(\"ActiveXObject\"in window))){return new XMLHttpRequest();}else{try{/*global ActiveXObject */return new ActiveXObject(\"Microsoft.XMLHTTP\");}catch(e){logger.error(\"browser doesn't support AJAX.\");return null;}}}", "title": "" }, { "docid": "21f74ea0baf4d039914807f6e0615c86", "score": "0.6369043", "text": "function createAjaxObj(){\nvar httprequest=false\n// if Mozilla, Safari etc\n if (window.XMLHttpRequest) \n httprequest = new XMLHttpRequest()\n // if IE\n else if (window.ActiveXObject){ \n try {\n httprequest = new ActiveXObject(\"Msxml2.XMLHTTP\")\n } \n catch (e){\n try{ \n\t httprequest = new ActiveXObject(\"Microsoft.XMLHTTP\") \n\t }catch (e){}\n }\n }else{\n alert('This Browser do not support AJAX-Technology!');\n return ;\n }\n\n\t\nreturn httprequest\n}", "title": "" }, { "docid": "4802dfc0e143cce5b62231b8d821a847", "score": "0.6367646", "text": "function bl_ajax() {\n var xmlhttp = false;\n try {\n xmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch (e) {\n try {\n xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n } catch (E) {\n xmlhttp = false;\n }\n }\n\n if (!xmlhttp && typeof XMLHttpRequest !== 'undefined') {\n xmlhttp = new XMLHttpRequest();\n }\n return xmlhttp;\n}", "title": "" }, { "docid": "1900be570bf9a62de6318048bd1df095", "score": "0.6365596", "text": "function ajaxRequest(params) {\n $.ajax({\n type: \"GET\",\n url: \"/vuln/api/getcurrentglobalvuln\",\n data: params.data,\n dataType: \"json\",\n success: function(data) {\n if(data.status == 0){\n params.success({\n \"rows\": data.object.rows,\n \"total\": __vulnTop\n })\n }\n },\n error: function (er) {\n params.error(er);\n }\n });\n}", "title": "" }, { "docid": "9983ac2381d524830b734da44f2ccff3", "score": "0.6362162", "text": "_initRequest() {\n const xhr = this.xhr = new XMLHttpRequest();\n\n // Note that your request may look different. It is up to you and your editor\n // integration to choose the right communication channel. This example uses\n // a POST request with JSON as a data structure but your configuration\n // could be different.\n xhr.open('POST', this.action ? this.action : '/thinkadmin/main/upload', true);\n xhr.responseType = 'json';\n }", "title": "" }, { "docid": "0a075631e8a94af4239a923bc3c84aba", "score": "0.636086", "text": "function getPickupRequests() {\n\n //initialize xhr\n var http = false;\n if (window.XMLHttpRequest) {\n http = new XMLHttpRequest();\n } else if (window.ActiveXObject) {\n http = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n\n http.onreadystatechange = function() { //Call a function when the state changes.\n\n if (http.readyState == 4 && http.status == 200) {\n //return the response to the correct html div tag\n document.getElementById(\"details\").innerHTML = http.responseText;\n }\n }\n\n //send a simple get request\n http.open(\"GET\", \"pickup_data.php?getPickups\", true);\n http.send();\n\n}", "title": "" }, { "docid": "72c6dae20b4d1b68195ce975708b4da6", "score": "0.6358098", "text": "function ajax(config){\n\tthis.method = config.method || 'GET';\n\tthis.payload = config.payload || null;\n\tvar xhr = new XMLHttpRequest();\n\txhr.open(this.method, config.url, true);\n\txhr.upload.addEventListner('progress',\n\t\tfunction(e){\n\t\t\tconfig.progress(e);\n\t\t});\n\txhr.addEventListner('load', \n\t\tfunction(){\n\t\t\tconfig.sucess(xhr);\n\t\t});\n\txhr.addEventListner('error', config.error);\n\txhr.send(this.payload);\n}", "title": "" }, { "docid": "57bb3c01ead714f368d2562715362685", "score": "0.6356583", "text": "request (url) {\n\n\t\trequest\n\t\t\t.get(url)\n\t\t\t.set('X-Requested-With', 'XMLHttpRequest')\n\t\t\t.end( (err, response) => {\n\n\t\t\t\tif (err !== null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.emit(this.REQUEST_END, response);\n\n\t\t\t});\n\n\t}", "title": "" }, { "docid": "3b17d11d9f8827071878c7896cf3dd9e", "score": "0.6356294", "text": "function getAsnDetails(number,ponum,fileId){\n \n var num=number;\n var poNum=ponum;\n // alert(\"poNumber-->\"+num);\n // var req = new XMLHttpRequest();\n $(function() {\n \n $('#detail_box').show();\n return false;\n \n });\n var req = getXMLHttpRequest();\n req.onreadystatechange = readyStateHandlerText(req,populateASNDetails); \n\n var url=\"../ajax/getASNDetails.action?asnNumber=\"+num+\"&poNumber=\"+poNum+\"&fileId=\"+fileId;\n req.open(\"GET\",url,\"true\");\n req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n req.send(null);\n}", "title": "" }, { "docid": "3bb06c5a892d2cbc5be17074fc7e5689", "score": "0.6348662", "text": "function getTechNews(source){\n\n $.ajax({\n type: \"POST\",\n dataType: 'json',\n url: \"/newsResults\",\n data: {source: source},\n }).done(function(data) {\n updateList(data);\n }).fail(function(err){\n console.log(err);\n });\n}", "title": "" }, { "docid": "d171d766b8221d7e2a8cd7d37dbd2f3c", "score": "0.6348614", "text": "function CarregaData(){\r\n\turl = 'Data.php';\r\n\treq = null;\r\n\tif (window.XMLHttpRequest) {\r\n\t\treq = new XMLHttpRequest();\r\n\t\treq.onreadystatechange = processReqChange3;\r\n\t\treq.open(\"GET\",url,true);\r\n\t\treq.send(null);\r\n\t} else if (window.ActiveXObject) {\r\n\t\treq = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t\tif (req) {\r\n\t\t\treq.onreadystatechange = processReqChange3;\r\n\t\t\treq.open(\"GET\",url,true);\r\n\t\t\treq.send();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "9a6fce42b2d9902c3fc0c65494ddd1bb", "score": "0.63425153", "text": "function requestTranSearch(){\n URL = \"http://localhost:8080/transcriptsearch\";\n $.ajax({\n type: \"GET\",\n url: URL,\n data: \"\",\n dataType: \"html\",\n success: function(msg) {\n document.getElementById('content').innerHTML = msg;\n },\n error: function(xhr,ajaxOptions,thrownError){\n $(\"#content\").html(\"Error loading transcript search page\");\n }\n });\n}", "title": "" } ]
e796f2aeee8891b554a6aee0098e39b4
Add the template HTML
[ { "docid": "f7be7935a16168aacce3a2e46205a1eb", "score": "0.0", "text": "function createUI() {\n\t\tDOMElement.innerHTML += template;\n\t\tDOMElement.setAttribute(\"data-whatever\", totalVotes);\n\t}", "title": "" } ]
[ { "docid": "8f354980e1a4de063cd565407bf3f321", "score": "0.70945984", "text": "function createTemplate(data){\n\tvar selected1=data.selected1;\n\tvar selected2=data.selected2;\n\tvar selected3=data.selected3;\n\tvar selected4=data.selected4;\n\tvar content=data.content;\n\tvar htmlTemplate=`\n\t<!doctype html>\n\t<html>\n\t\t<head>\n\t\t\t<!-- Bootstrap compiled and minified CSS -->\n\t\t\t<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" \n\t\t\tintegrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">\n\t\t\t<link href=\"/ui/css/style.css\" rel=\"stylesheet\" />\n\t\t\t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css\">\n\t\t\t<!-- latest jQuery direct from google's CDN -->\n\t\t\t<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\">\n\t\t\t</script>\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t</head>\n\t\t<body class=\"bgimg\">\n\t\t\t<div class=\"navigation menu\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li ${selected1}><a href=\"/\" ><p class=\"bold animated bounceInLeft\">Home</p></a></li>\n\t\t\t\t\t<li ${selected2}><a href=\"/about\" ><p class=\"bold animated bounceInLeft\">About Me</p></a></li>\n\t\t\t\t\t<li ${selected3}><a href=\"/contact\" ><p class=\"bold animated bounceInLeft\">Contact</p></a></li>\n\t\t\t\t\t<li ${selected4}><a href=\"/articles\"><p class=\"bold animated bounceInLeft\">Articles</p></a></li>\n\t\t\t\t\t<li id=\"Share\" class=\"animated bounceInRight\">\n\t\t\t\t\t\t<a href=\"https://twitter.com/ajasharma1101\" target=\"_blank\" style=\"text-decoration:none;\">\n\t\t\t\t\t\t<img src=\"https://g.twimg.com/dev/documentation/image/Twitter_logo_blue_32.png\" alt=\"Twitter\" style=\"border:0;width:32px;height:32px\"></a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li id=\"Share\" class=\"animated bounceInRight\">\n\t\t\t\t\t\t<a href=\"//plus.google.com/u/0/106415896484965862024?prsrc=3\"rel=\"publisher\" target=\"_blank\" style=\"text-decoration:none;\">\n\t\t\t\t\t\t<img src=\"//ssl.gstatic.com/images/icons/gplus-32.png\" alt=\"Google+\" style=\"border:0;width:32px;height:32px;\"/>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li id=\"Share\" class=\"bold\"><p class=\"animated bounceInRight\">Follow me on</p><li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t${content}\n\t\t\t<script type=\"text/javascript\" src=\"/ui/main.js\">\n\t\t\t</script>\n\t\t</body>\n\t</html>\t`;\n\treturn htmlTemplate;\n}", "title": "" }, { "docid": "35dc3fab28fd4c454810072c11f75a4c", "score": "0.70603764", "text": "render() {\n return this.addHTML(this.template);\n }", "title": "" }, { "docid": "ab6bf6b02b9a63ffa049522049f52f10", "score": "0.69671315", "text": "create() {\n if (this.template) {\n this.innerHTML = elation.template.get(this.template, this);\n }\n }", "title": "" }, { "docid": "0cdc88b20b1c8de843b14bbee5400901", "score": "0.6952656", "text": "function createTemplate(data){\n var title=data.title;\n var date=data.date;\n var content=data.content;\nvar HtmlTemplate=`<html>\n<head>\n<title>${title}</title>\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"/>\n<link href=\"/ui/style.css\" rel=\"stylesheet\" />\n</head>\n<body>\n${date}\n<div class=\"container\">\n ${content}\n</div>\n<div>\n<p>hey we are not applying css here</p>\n\n</div>\n</body>\n</html>`;\n return (HtmlTemplate);\n}", "title": "" }, { "docid": "aa69451361d9d45773ba4f340e1aa40b", "score": "0.68356574", "text": "function load_template() {\n $(root).html(editor_template);\n }", "title": "" }, { "docid": "2dd1a19aa461e496d34acb826b468043", "score": "0.66177154", "text": "_renderHtml(template, data) {\n return template(data);\n }", "title": "" }, { "docid": "5934aaefd0298e77f6e0cf4831119678", "score": "0.6596811", "text": "createTheHtmlTemplate() {\n let display = `\n <!-- Template File -->\n <div class=\"myWidget\">Hello World</div>`;\n\n return display;\n }", "title": "" }, { "docid": "b1451822909dd6a4afbc2068e178266e", "score": "0.6578548", "text": "_initialiseTemplate() {\n// #initialiseTemplate() {\n const template = document.createElement('template');\n template.innerHTML = this.template();\n\n this.me.appendChild(template.content.cloneNode(true));\n }", "title": "" }, { "docid": "a8e80e799cc867020b55414867eb3825", "score": "0.6567018", "text": "async function createHTML() {\n template = render(employees);\n}", "title": "" }, { "docid": "56987667c1cde9304b3ad9241250436a", "score": "0.65230155", "text": "static get template(){\n // pass a string literal to the html helper function to return an instance of\n // HTMLTemplateElement\n return html `\n <style include=\"shared-styles\">\n :host {\n display: block;\n padding: 10px;\n }\n </style>\n <div class=\"card\"> \n <div class=\"circle\">1</div>\n <h1>New View</h1>\n <paper-checkbox>Ready to deploy!</paper-checkbox>\n <p>New View!!</p>\n </div>\n \n `;\n }", "title": "" }, { "docid": "5491428cab19a7ba7ccfd93740e3cd78", "score": "0.6498937", "text": "generateHTML(){\n var self = this;\n // super.generateHTML();\n var html = \" <div class='profile-page'> \\\n </div>\";\n \n \n $(\".\"+this.creator.class_name).append(html);\n self.addHeader();\n self.addBody();\n self.addBioContainer();\n self.addStanceContainer(self.topics_dict);\n self.addListeners();\n \n }", "title": "" }, { "docid": "214c650ba0f6be1373f28661f4990c23", "score": "0.64877903", "text": "function renderHtml() {\n var template = settings.datasource.role === 'index' ? 'index' : 'datasource';\n settings.extensions = { Before: null, After: null };\n self._renderTemplate('triplepatternfragments/' + template, settings, request, response, done);\n }", "title": "" }, { "docid": "e39215258c4652acb576b035f1bd94f6", "score": "0.6463521", "text": "static createElement(html, _options) {\n const el = d.createElement('template');\n el.innerHTML = html;\n return el;\n }", "title": "" }, { "docid": "e39215258c4652acb576b035f1bd94f6", "score": "0.6463521", "text": "static createElement(html, _options) {\n const el = d.createElement('template');\n el.innerHTML = html;\n return el;\n }", "title": "" }, { "docid": "b6b691aaf0f0e6ae573c703f46d2e5b6", "score": "0.6402848", "text": "function setTemplate() {\n //data needed to fill template\n var key = Object.keys(Jack.getQuestion(Jack.getQuestionNumber()));\n var currentQuestion = Jack.getQuestion(Jack.getQuestionNumber())[key];\n var types = TheDrunkenPirate.getIngredientType(key);\n //template to use\n var source = $(\"#question-template\").html();\n var template = Handlebars.compile(source);\n //fields to be filled in the template\n var context = {\n drink_question: currentQuestion,\n answer1: types[0],\n answer2: types[1],\n answer3: types[2]\n };\n //set the fields in the template\n var html = template(context);\n //add to the html\n $('.question-section').html(html);\n }", "title": "" }, { "docid": "e9375ea0801e59763abfc72a459c39ef", "score": "0.6401006", "text": "function addCustomHtml(form) {\r\n var templatePage = nlapiLoadFile(ApiConstants.Files.HtmlTemplateMain);\r\n\r\n form.addField(\"custpage_page_template\", \"inlinehtml\").setDefaultValue(templatePage.getValue());\r\n}", "title": "" }, { "docid": "61566ed6e5d578c8014bcfbb942f1246", "score": "0.6395235", "text": "function generateHtml() {\n const newTemplate = new Template(teamMembers);\n newTemplate.generateWeb();\n}", "title": "" }, { "docid": "b6266d62c321fac6f8277c7246a9807e", "score": "0.6385339", "text": "function Template() {\n\t\tthis.defaultTemplate\n\t\t=\t'<li data-id=\"{{id}}\" class=\"{{completed}}\">'\n\t\t+\t\t'<div class=\"view\">'\n\t\t+\t\t\t'<input class=\"toggle\" type=\"checkbox\" {{checked}}>'\n\t\t+\t\t\t'<label>{{title}}</label>'\n\t\t+\t\t\t'<button class=\"destroy\"></button>'\n\t\t+\t\t'</div>'\n\t\t+\t'</li>';\n\t}", "title": "" }, { "docid": "fb09e5e6a7214fddeb08fbdb9d1463db", "score": "0.63835907", "text": "function get_template() {\n\n const template_string =\n \"<div class='setup container'>\" +\n \" <div class='left'>\" +\n get_generic() +\n \" <div class='modal-footer'>\" +\n \" <button name='cancel_button' class='btn btn-default'>Cancel</button>\" +\n \" <button name='save_button' class='btn btn-primary'>Save</button>\" +\n \" </div>\" +\n \" <br/>\" +\n \" <div class='error output'></div>\" +\n \" </div>\" +\n \"</div>\";\n\n return template_string;\n}", "title": "" }, { "docid": "3d392ee88bae49587135ea7fd6fddb5b", "score": "0.6377992", "text": "function template(manager, engineers, interns) {\n\n return `\n <!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>My Team</title>\n <link\n rel=\"stylesheet\"\n href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css\"\n />\n <link\n href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\"\n rel=\"stylesheet\"\n integrity=\"sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x\"\n crossorigin=\"anonymous\"\n />\n <link rel=\"stylesheet\" href=\"style.css\" />\n </head>\n <body>\n <header>\n <h1 class=\"page-title\">My Team</h1>\n </header>\n <section>\n <div class=\"row justify-content-center\">\n ${generateManager(manager)}\n ${generateEngineers(engineers)}\n ${generateInterns(interns)}\n </div>\n </section>\n </body>\n </html>\n \n `;\n}", "title": "" }, { "docid": "e5919c82f26570f006b860088793e4ff", "score": "0.63281584", "text": "function showTemplate(template, data, content){\n\tvar html = template(data);\n\n\t// this is for debugging\n\t// console.log(html);\n\n\t$(content).html(html);\n}", "title": "" }, { "docid": "29ff73ebcb7dc95d8ce40bb9556df762", "score": "0.6328008", "text": "function injectTemplate(e) {\n\n e.preventDefault();\n\n var d = new Date(); \n var n = d.getMonth(); // we use n to dynamically populate the changelog with the current month \n var month = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];\n var longMonth = ['January', 'Feburary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n var y = d.getFullYear(); // likewise for the current year\n \n var templates = {\n 'inject-varlistentry': ' <varlistentry>\\n\\\n <term></term>\\n\\\n <listitem>\\n\\\n <para></para>\\n\\\n </listitem>\\n\\\n </varlistentry>',\n 'inject-twocolumntable': ' <table>\\n\\\n <title></title>\\n\\\n <tgroup cols=\"2\">\\n\\\n <thead>\\n\\\n <row>\\n\\\n <entry>\\n\\\n Column 1 heading\\n\\\n </entry>\\n\\\n <entry>\\n\\\n Column 2 heading\\n\\\n </entry>\\n\\\n </row>\\n\\\n </thead>\\n\\\n <tbody>\\n\\\n <row>\\n\\\n <entry>\\n\\\n <para>\\n\\\n </para>\\n\\\n </entry>\\n\\\n <entry>\\n\\\n <para>\\n\\\n </para>\\n\\\n </entry>\\n\\\n </row>\\n\\\n </tbody>\\n\\\n </tgroup>\\n\\\n </table>',\n 'inject-threecolumntable': ' <table>\\n\\\n <title></title>\\n\\\n <tgroup cols=\"3\">\\n\\\n <thead>\\n\\\n <row>\\n\\\n <entry>\\n\\\n Column 1 heading\\n\\\n </entry>\\n\\\n <entry>\\n\\\n Column 2 heading\\n\\\n </entry>\\n\\\n <entry>\\n\\\n Column 3 heading\\n\\\n </entry>\\n\\\n </row>\\n\\\n </thead>\\n\\\n <tbody>\\n\\\n <row>\\n\\\n <entry>\\n\\\n <para>\\n\\\n </para>\\n\\\n </entry>\\n\\\n <entry>\\n\\\n <para>\\n\\\n </para>\\n\\\n </entry>\\n\\\n <entry>\\n\\\n <para>\\n\\\n </para>\\n\\\n </entry>\\n\\\n </row>\\n\\\n </tbody>\\n\\\n </tgroup>\\n\\\n </table>',\n 'inject-picture': ' <figure>\\n\\\n <title></title>\\n\\\n <mediaobject>\\n\\\n <imageobject>\\n\\\n <imagedata fileref=\"images/PUTTHENUMBERHERE.png\"/>\\n\\\n </imageobject>\\n\\\n <textobject>\\n\\\n <phrase>\\n\\\n </phrase>\\n\\\n </textobject>\\n\\\n </mediaobject>\\n\\\n </figure>',\n 'inject-procedure': ' <procedure>\\n\\\n <title></title>\\n\\\n <step>\\n\\\n <para>\\n\\\n </para>\\n\\\n </step>\\n\\\n <step>\\n\\\n <substeps>\\n\\\n <step>\\n\\\n <para>\\n\\\n </para>\\n\\\n </step>\\n\\\n </substeps>\\n\\\n </step>\\n\\\n </procedure>\\n\\\n <formalpara>\\n\\\n <title>Result</title>\\n\\\n <para>\\n\\\n </para>\\n\\\n </formalpara>',\n 'inject-changelog': ' <variablelist role=\"changelog\">\\n' +\n ' <varlistentry>\\n' + \n ' <term role=\"changelog-toggle\">Changes</term>\\n' + \n ' <listitem>\\n' + \n ' <itemizedlist role=\"changelog-items\">\\n' + \n ' <listitem>\\n' + \n ' <para role=\"changelog-' + month[n] + '-' + y + '\">\\n' + \n ' Updated ' + longMonth[n] + ' ' + y + '.\\n' + \n ' </para>\\n' + \n ' <!-- add the attribute role=\"changes-' + month[n] + '-' + y + '\" to all elements affected by the change\" -->\\n' + \n ' </listitem>\\n' + \n ' </itemizedlist>\\n' + \n ' </listitem>\\n' + \n ' </varlistentry>\\n' + \n ' </variablelist>\\n'\n };\n window.editor.replaceSelection(templates[this.id]);\n topicEdited();\n updateXMLPreviewRoute(editor.getValue(), document.getElementsByClassName(\"div-preview\"));\n}", "title": "" }, { "docid": "d81d278b590725c4a70f5235241bb99a", "score": "0.6321371", "text": "function Template() {\n\t\tthis.todoTemplate =\n\t\t\t'<li data-id=\"{{id}}\" class=\"item {{completed}}\">' +\n\t\t\t'<div class=\"view\">' +\n\t\t\t'<input class=\"toggle\" type=\"checkbox\" {{checked}}>' +\n\t\t\t\"<label>{{title}}</label>\" +\n\t\t\t'<button class=\"destroy\"></button>' +\n\t\t\t\"</div>\" +\n\t\t\t\"</li>\";\n\n\t\tthis.listTemplate =\n\t\t\t'<li data-id=\"{{id}}\" class=\"item\">' +\n\t\t\t'<div class=\"view\">' +\n\t\t\t\"<label>{{title}} <span class='date-list'>{{date}}</span> </label>\" +\n\t\t\t'<a href=\"#/lists/{{link-id}}\" class=\"edit-list\"></a>' +\n\t\t\t'<button class=\"destroy\"></button>' +\n\t\t\t\"</div>\" +\n\t\t\t\"</li>\";\n\t}", "title": "" }, { "docid": "18b8b0bc49d3b8c1ec3f64eb50cc384d", "score": "0.6317797", "text": "function loadTemplate() {\n\t\t\tvar template = $('#' + settings.template).html();\n\n\t\t\tif (!template) {\n\t\t\t\tthrow 'Please specify Id to exising template for mapCoordinates widget';\n\t\t\t}\n\n\t\t\t//Append template to main container\n\t\t\t$el.html(us.template(template, settings));\n\n\t\t\t//Bind events\n\t\t\tbindEvents();\n\t\t}", "title": "" }, { "docid": "98398ce9cfeae54e4a52d9591d6815e6", "score": "0.63064617", "text": "function showTemplate(template, data){\n\tvar html = template(data);\n\t$('#content').html(html);\n}", "title": "" }, { "docid": "0ff393ee4291fa5bdc35916243d08ddd", "score": "0.6304692", "text": "function addTemplate() {\r\n let ta = document.getElementById(\"detail-editor\");\r\n if (ta.value.length > 0) {\r\n ta.value += \"\\n\";\r\n ta.value += \"\\n\";\r\n }\r\n ta.value += mdTemplate;\r\n updateDetailViewer();\r\n}", "title": "" }, { "docid": "cc3f00ec019646eb1eb4176b8c6575f1", "score": "0.6298686", "text": "function renderSendEmailtemplate() {\n\n $.tmpl(opt.tmpl, {\n items: getFilesInfo()\n }).appendTo(opt.emailDialog);\n\n $(\"#to\", opt.emailDialog).focus();\n }", "title": "" }, { "docid": "89a96ff5b91b999e686d02446c68ab8f", "score": "0.62984836", "text": "function insertTemplatesAsScriptTags(indexHtml, demo) {\n if (demo.files.html.length) {\n var tmp = angular.element(indexHtml);\n angular.forEach(demo.files.html, function(template) {\n tmp.append(\"<script type='text/ng-template' id='\" +\n template.name + \"'>\" +\n template.contents +\n \"</script>\");\n });\n return tmp[0].outerHTML;\n }\n return indexHtml;\n }", "title": "" }, { "docid": "4c351781cc07e88b5edd56c66a477674", "score": "0.6286759", "text": "template (data) {\n return html`<div>OVERRIDE ME</div>`;\n }", "title": "" }, { "docid": "740601e8dc841334f3580903661ca714", "score": "0.628222", "text": "function setTemplate(scope, elem, attrs) {\n $templateRequest(getTemplateUrl(attrs.displayType))\n .then(function (html) {\n\n var template = angular.element(html);\n elem.append(template);\n\n $compile(template)(scope);\n });\n }", "title": "" }, { "docid": "8659a9fe8186ff87fd58b77895728254", "score": "0.6268725", "text": "function showTemplate(template, data) {\n var html = template(data);\n $('#content').html(html);\n}", "title": "" }, { "docid": "873c4a40181156ca7cd65958d6db6b8f", "score": "0.62667674", "text": "render() {\n return tmpl;\n }", "title": "" }, { "docid": "27077ccfe692e59d3209b064ef9bb4ce", "score": "0.62605226", "text": "function showTemplate(template, data){\n var html = template(data);\n $('#content').html(html);\n}", "title": "" }, { "docid": "80d8b1f7bf4808145affe08109655681", "score": "0.6245117", "text": "function Template(dom){\n\t\tvar label=$(document.createElement('div')).addClass('view_label').appendTo(dom);\n\t\t\n\t\tvar name=$(document.createElement('span')).appendTo($(document.createElement('div')).appendTo(label));\n\t\t\n\t\tvar tabContainer=$(document.createElement('div')).appendTo(label).addClass('label_hide_seek');\n\t\tvar rowContainer=$(document.createElement('div')).appendTo(tabContainer);\n\t\t\n\t\t//container for data\n\t\tvar dataContainer=$(document.createElement('div')).appendTo(rowContainer).addClass('label_data_div');\n\t\t\n\t\tvar tools=$(document.createElement('div')).addClass('label_tools').appendTo(dataContainer);\n\t\t\n\t\tvar edit=$(document.createElement('div')).addClass('label_edit').appendTo(dataContainer);\n\t\t\n\t\tvar data=$(document.createElement('div')).appendTo(dataContainer);\n\t\t\n\t\t//container of links (objects)\n\t\tvar divOfLinks=$(document.createElement('div')).addClass('label_link_container').appendTo(data);\n\t\tvar listOfLinks=$(document.createElement('ul')).appendTo(divOfLinks);\n\t\t//end of container of links\n\t\t\n\t\t//container of tags (objects)\n\t\tvar wrapperOfTags=$(document.createElement('div')).appendTo(data);\n\t\t//end of container of tags\n\t\t\n\t\tvar divOfElements=$(document.createElement('div')).appendTo(data);\n\t\tvar listOfElements=$(document.createElement('ul')).appendTo(divOfElements);\n\t\t\n\t\tvar divOfSets=$(document.createElement('div')).appendTo(data);\n\t\tvar listOfSets=$(document.createElement('ul')).appendTo(divOfSets);\n\t\t\n\t\tvar listOfObjects=$(document.createElement('div')).appendTo(data);\n\t\t\n\t\tvar content=$(document.createElement('div')).appendTo(data);\n\t\t\n\t\tvar buttonEdit=$(document.createElement('button')).appendTo(tools)//create edit button. is this the ideal place?\n\t\t.append(document.createTextNode('edit'));\n\t\t\n\t\tvar showElements=$(document.createElement('button')).appendTo(tools)//create show_links button\n\t\t.append(document.createTextNode('elements'));\n\t\t\n\t\tvar showSet=$(document.createElement('button')).appendTo(tools)//create show_links button\n\t\t.append(document.createTextNode('part of'));\n\t\t\n\t\tvar showLinks=$(document.createElement('button')).appendTo(tools)//create show_links button\n\t\t.append(document.createTextNode('links'));\n\t\t\n\t\tvar showLinked=$(document.createElement('button')).appendTo(tools)//create show_links button\n\t\t.append(document.createTextNode('linked'));\n\t\t\n\t\tvar deleteNode=$(document.createElement('button')).appendTo(tools)//create show_links button\n\t\t.append(document.createTextNode('delete'));\n\t\t\n\t\tvar hideShowRights=$(document.createElement('button')).appendTo(tools)//create show_links button\n\t\t.append(document.createTextNode('share'));\n\t\t\n\t\t//container for rights\n\t\tvar rightsContainer=$(document.createElement('div')).appendTo(rowContainer).css({position:'absolute'});\n\t\tvar rightsDiv=$(document.createElement('div')).appendTo(rightsContainer);\n\t\t//end of container for rights\n\t\t\n\n\t\t\n\t\treturn {\n\t\t\tmain:label,\n\t\t\tdata:{main:data,name:name,content:content,links:listOfLinks,elements:listOfElements,sets:listOfSets,linkDiv:divOfLinks,objects:listOfObjects},//we need divOfLinks to attach eventListener\n\t\t\ttools:{main:tools,edit:buttonEdit,showElements:showElements,showSet:showSet,showLinks:showLinks,showLinked:showLinked,delete:deleteNode,rights:hideShowRights},\n\t\t\tedit:{main:edit},\n\t\t\trights:rightsContainer,\n\t\t\ttags:wrapperOfTags\n\t\t};\n\t}", "title": "" }, { "docid": "96839330c5b1e05ad69c4c11b3e2b5f6", "score": "0.62222636", "text": "function Template() {\n this.defaultTemplate\n =\t'<li data-id=\"{{id}}\">'\n +\t'<div class=\"view\">'\n +\t'{{long_description}}'\n + ' - '\n + '({{quantity_recommended}}g) '\n +\t'<button class=\"remove-item-button\">Delete</button>'\n +\t'</div>'\n +\t'</li>';\n}", "title": "" }, { "docid": "43e60c2dc1ca5f04c12a03148d730a46", "score": "0.6219378", "text": "constructor() {\n\t\t\tsuper(); \n\t\t\tthis._shadowRoot = this.attachShadow({mode: \"open\"});\n this._shadowRoot.appendChild(tmpl.content.cloneNode(true));\n\t\t}", "title": "" }, { "docid": "76e41e80f71e9b126e2096de9ad86a66", "score": "0.62025845", "text": "function adicionaTemplate ( formul )\n {\n var objProcessar = transformFormToObj( formul ) ;\n\n //var nomeTemplate = formul.tmpl.options[formul.tmpl.selectedIndex].value ;\n\n //var nomeTemplate = $(\"#\" + formul.tmpl.id).val() ;\n\n var nomeTemplate = $(formul.tmpl).val() ;\n\n var htmlObj = template( nomeTemplate , objProcessar );\n escreveNoDocumento( htmlObj ) ;\n\n return false ; // para nao enviar o formulario\n }", "title": "" }, { "docid": "c8d41d25af6747421a6561ef2930ae08", "score": "0.619945", "text": "get Template() {\n let template = ''\n template += `\n <div class=\"col-12 shadow-sm bg-body rounded p-3\">\n <div class=\"row d-flex justify-content-between\">\n <img src=\"${this.img}\" alt=\"${this.name}\" class=\"col-2 w-100\">\n <h3 class=\"col-2\">${this.name}</h3>\n <p class=\"col-2\">$${this.price}</p>\n <p class=\"col-2\">${this.quantity}</p>\n <p class=\"col-2\">${this.quantity * this.price}</p>\n <div class=\"col-1\">\n <button onclick=\"app.postController.deletePost('${this.id}')\" id=\"${this.id}-button\">Remove</button>\n </div>\n </div>\n </div>\n `\n return template\n }", "title": "" }, { "docid": "2973beeb8c394518e8ddba83b7c5722f", "score": "0.61970186", "text": "createHtml() {\n return `<p>${this.content}</p>`\n }", "title": "" }, { "docid": "92f36cd8500a0558e5c7ac9a52f72c6c", "score": "0.6194976", "text": "function showTemplate(template, data){\n\tvar html = template(data);\n\t$('#content').html(html);\n}", "title": "" }, { "docid": "92f36cd8500a0558e5c7ac9a52f72c6c", "score": "0.6194976", "text": "function showTemplate(template, data){\n\tvar html = template(data);\n\t$('#content').html(html);\n}", "title": "" }, { "docid": "e5e24d78adfc1ba18400cb9a69e9f47b", "score": "0.6193463", "text": "setTemplate(template) { super.setTemplate(template); }", "title": "" }, { "docid": "f19dcd0f3c1ad163889ed87474387680", "score": "0.6192489", "text": "renderMarkup(){\n if(typeof(this.template) === \"function\")\n app.innerHTML = this.template();\n else\n this.tpl();\n }", "title": "" }, { "docid": "f1efe16777208060d05fc5437d517637", "score": "0.6185875", "text": "function AddTemplate(ElementId, Template, Data) {\n $('#' + ElementId).html(tmpl(Template, Data));\n}", "title": "" }, { "docid": "a4044eeaf99c8c662ebc5936003c071a", "score": "0.61823153", "text": "writing() {\n this.writeTemplates(TEMPLATES);\n }", "title": "" }, { "docid": "d0b91e55deb2eae32293153e2237232a", "score": "0.6172522", "text": "function Template() {\n }", "title": "" }, { "docid": "c224191f5a103476c11ca65f9764334d", "score": "0.61698145", "text": "html(html, config) {\r\n return this.create({\r\n title: null,\r\n body: null,\r\n config: Object.assign(Object.assign({}, config), { html })\r\n });\r\n }", "title": "" }, { "docid": "c2a018d4cb14642c7fe93cf8d2191b92", "score": "0.616202", "text": "function htmlTemplate(team) {\n return `\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <title>Employee Directory</title>\n <!-- stylesheets -->\n <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\"/>\n <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css\"/>\n <link rel=\"stylesheet\" href=\"./src/style.css\"/>\n </head>\n\n <body>\n <div class=\"jumbotron jumbotron-fluid\">\n <div class=\"container\">\n <h1 class=\"display-4\">Employee Directory</h1>\n <p class=\"lead\">Please select an employee below.</p>\n </div>\n</div>\n ${team}\n\n</body>`;\n}", "title": "" }, { "docid": "1143110c0940293f9771dd4500ea8e5f", "score": "0.6147596", "text": "render() {\n this.shadowRoot.appendChild(this.getTemplate().content.cloneNode(true));\n }", "title": "" }, { "docid": "ed15ab7f25c472f658fdef29082a1a88", "score": "0.613149", "text": "_renderTemplate(template) {\n // Add in entity data and template context\n const data = this.mixinTemplateContext(this.serializeData()) || {};\n\n // Render and add to el\n const html = this._renderHtml(template, data);\n if (typeof html !== 'undefined') {\n this.attachElContent(html);\n }\n }", "title": "" }, { "docid": "3ac47494207fdd96bd52ce8954a027de", "score": "0.612493", "text": "function generateContentTemplate(data){\n\t\tvar hasMoreInfos = data.hasMoreInfos;\n\t\tvar hasQuestion = data.hasQuestion;\n\t\tvar id = data.id;\n\t\tvar content = data.content;\n\t\tvar title = content.match(/==(.*)==/);\n\t\tif (title){\n\t\t\ttitle = title[1];\n\t\t\tvar description = content.replace(\"==\" + title + \"==\", \"\");\n\t\t\t$(\"#ueberschriftContent\").text(title);\n\t\t\t$(\"#descriptionContent\").text(description);\n\t\t}\n\t\tvar lat = data.lat;\n\t\tvar lng = data.lng;\n\t\tvar allowedDistance = data.allowedDistance;\n\t\t\t\t\t\n\t\t/* if a content has a question: then put a button into the div, linking to the specific question */\n\t\tif (hasQuestion){\n\t\t\t$(\"#questionButton\").html(\"<a href=\\\"#questionPrototype\\\" data-role=\\\"button\\\" onClick='controller.contentHandler.grabQuestion(\"+id+\")'\\\">Zur Frage</a>\");\n\t\t}\n\t\n\t\t/*push infos into the preview site*/\n\t\tgeneratePreviewDistance(data);\n\t\t\n\t}", "title": "" }, { "docid": "4733423c28aa0329bb3507c17a0976d7", "score": "0.61209196", "text": "render() {\n this.shadowRoot.appendChild(this.getTemplate().content.cloneNode(true))\n }", "title": "" }, { "docid": "2938e203adc5dda98c10de4198c0aecb", "score": "0.6119905", "text": "function addHTML(containerDiv) {\n $(\"#\" + containerDiv + \"Content\").html(\"<table class='grid'></table>\");\n }", "title": "" }, { "docid": "5b404b347b502de319d18b5625d6d6b5", "score": "0.61080575", "text": "function Template(src) {\n\tsrc.replace(/[<][%](?:([!]\\w+)?\\s)(.*?)[%][>]/g,function(block,tag,content){\n\t\t;\n\t});\n\t//Returns a \"new\" template with\n\t$this.apply=function() {\n\t}\n}", "title": "" }, { "docid": "54b958288fd9ed57425f4edba3a660f5", "score": "0.6101737", "text": "function template(data) {\r\n reviewList.insertAdjacentHTML(\"beforeend\", `\r\n <div class=\"review flex items-start justify-start\">\r\n \r\n <div class=\"flex-1\">\r\n <h3 class=\"review-author\">${data.author}</h3>\r\n <p class=\"review-body\">${data.review}</p>\r\n </div>\r\n </div>\r\n </div>`);\r\n}", "title": "" }, { "docid": "0ac05ba57a761f21ddcc2f0ddc7ceb8e", "score": "0.609626", "text": "template() {\n document.querySelector('#detailView').innerHTML += /*html*/ `\n <article>\n <div class=\"line\"> <!-- White background -->\n <button type=\"button\" onclick=\"goback()\">Go back</button> <!-- Back to persons button -->\n </div>\n \n \n <div id=\"detailViewContent\"> <!-- Div for the person data -->\n </div>\n \n </article>\n `\n\n }", "title": "" }, { "docid": "626d3f27caf72a126c119124d1736e1a", "score": "0.6095827", "text": "function s(e){this.content=t.fillTemplate(this.template,e),i.callback&&i.callback.call(i.context,i.data)}", "title": "" }, { "docid": "f57e0dc5a26f2735c1cfec249a4ee3c5", "score": "0.6086633", "text": "template(){\n throw new Error('O metodo \\'_template\\' deve ser implementado');\n }", "title": "" }, { "docid": "1b17d117fdb12a60f30ba4b54f4961be", "score": "0.6080757", "text": "buildTemplates () {\n\t\tif (this.flagDebug === true) {\n\t\t\tconsole.debug (`Using basepath ${this.basePath}.`);\n\t\t}\n\t\t\n\t\t// Get every <br> tag\n\t\tlet placeholders = document.getElementsByClassName (\"sb-template\");\n\t\tfor (let i = 0; i < placeholders.length; i++) {\n\t\t\tthis._requestTemplate (\n\t\t\t\tplaceholders[i].dataset.template,\n\t\t\t\tplaceholders[i]\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "1ad66b65d64371b463c7e4cbc4b44942", "score": "0.60692376", "text": "function appendtoMainHTML() {\n let mainTemplate = fs.readFileSync(path.resolve(templateFolder, \"main.html\"), \"utf8\")\n var mainAdded = \"\"\n mainAdded = mainAdded + mainTemplate.replace(/{{ team }}/g, teamMembers)\n // appends selection to index.html for output\n let file = path.join(__dirname, 'dist', \"/index.html\");\n console.log(file);\n fs.writeFile(file, mainAdded, function (err) {\n if (err) {\n throw new Error(err)\n }\n console.log('done')\n })\n}", "title": "" }, { "docid": "6f204e85db3b8dc0807d0d07d3d37755", "score": "0.6066304", "text": "function renderTemplate() {\n var template = {};\n var item = {};\n\n template.data = [];\n\n item = {};\n item.name = 'name';\n item.value = '';\n item.prompt = 'Name';\n template.data.push(item);\n\n item = {};\n item.name = 'email';\n item.value = '';\n item.prompt = 'Email';\n template.data.push(item);\n\n item = {};\n item.name = 'blog';\n item.value = '';\n item.prompt= 'Blog';\n template.data.push(item);\n\n cj.collection.template = template;\n}", "title": "" }, { "docid": "c724bc6f858eab43b2b518400c5ce733", "score": "0.6060942", "text": "function getHtml(template) {\n return template.join('\\n');\n }", "title": "" }, { "docid": "729e187cfaf9d5d90efed2536008f431", "score": "0.6053409", "text": "function Template() {\n this.renderRow = function (cellDataList) {\n var $row = plugin.settings.row.clone();\n var $list = plugin.settings.list.clone();\n var $cell = plugin.settings.cell.clone();\n\n for (var x in cellDataList) {\n if (cellDataList.hasOwnProperty(x)) {\n var elementHtml = cellDataList[x];\n var $newCell = $cell.clone();\n $newCell.html(elementHtml);\n $list.append($newCell);\n }\n }\n\n var $newRow = $row.clone();\n $newRow.append($list);\n return $newRow;\n }\n }", "title": "" }, { "docid": "27abc24cab030049856f351c91bfb394", "score": "0.60438037", "text": "static populate(template, parameters = {}) {\n // Find the template\n let templateElement = this.find(template);\n // Create the element\n let created = templateElement.cloneNode(true);\n // Add the HTML\n let html = created.innerHTML;\n // Replace parameters\n for (let key in parameters) {\n if (key in parameters) {\n let search = \"${\" + key + \"}\";\n let value = parameters[key];\n // Sanitize value\n let sanitizer = document.createElement(\"p\");\n sanitizer.innerText = value;\n value = sanitizer.innerHTML;\n // Replace\n while (html.includes(search))\n html = html.replace(search, value);\n }\n }\n created.innerHTML = html;\n // Return created element\n return created.content;\n }", "title": "" }, { "docid": "6179e5d4ec8608e148be8ba6a57f2e9e", "score": "0.6028556", "text": "function populateTpl(t){}", "title": "" }, { "docid": "6e8d8b2c294a12823b24d8ac6d082102", "score": "0.6026794", "text": "function template(item) {\n return `\n <article>\n <header>\n <h1>${item.title}</h1>\n <time>${convertDate(item.pubDate)}</time>\n\n </header>\n\n ${parseHTML(item.description)}\n\n </article>\n `;\n }", "title": "" }, { "docid": "1f63869b378f742e7f7d27b6d946fa8e", "score": "0.60199153", "text": "function compile_and_insert_html(template_id, div_id, data) {\n\tvar template = _.template($(template_id).html());\n\tvar template_html = template({\n\t\t'rows': data\n\t});\n\t$(div_id).html(template_html);\n}", "title": "" }, { "docid": "3a41429537aaf24988a714fac9edf9ab", "score": "0.6013405", "text": "render(html) { //Förvandlar till HTML. Render är en metod som ärver av domer, metoden ska returnera en sträng.\n return html` \n <h3>This is the information that you have submitted</h3> <!---Texten dyker upp när fälten är inskrivna, och användaren trycker på knappen!--->\n <li>${this._name}</li> <!---detta puschas in i UL taggen --->\n <li>${this._gmail}</li>\n <li>${this._subject}</li>\n <li>${this._title}</li>\n <li>${this._date}</li>\n \n `;\n }", "title": "" }, { "docid": "a31236c44bc0248f1a14afc30755f08c", "score": "0.6013374", "text": "function productInformationTemplate(data) {\n //takes template and populate it with passed array\n var rawTemplate = document.getElementById(\"productInformationTemplate\").innerHTML;\n var compiledTemplate = Handlebars.compile(rawTemplate);\n var productInformationGeneratedHTML = compiledTemplate(data);\n // display template in choosen ID tag\n var productContainer = document.getElementById(\"productInformationContainer\");\n productContainer.innerHTML = productInformationGeneratedHTML;\n}", "title": "" }, { "docid": "573a5b0d88fd35d3fd3b4437892d944f", "score": "0.60071", "text": "function insertTemplate(name, containerSelector, context) {\n $(containerSelector).html(Templates[name](context));\n setListeners();\n}", "title": "" }, { "docid": "286b3461c2e4782e5d6dec6e23765d7b", "score": "0.6006402", "text": "function generateHTML(data) {\n const section = document.createElement('section');\n peopleList.appendChild(section);\n const img_src = (data.thumbnail && data.thumbnail.source) ? data.thumbnail.source : \"\";\nsection.innerHTML = `<img src=${img_src}>`;\n //<img src=${data.thumbnail.source}>\n section.innerHTML += \n `<h2>${data.title}</h2>\n <p>${data.description}</p>\n <p>${data.extract}</p>\n `;\n }", "title": "" }, { "docid": "9cdf8473cd2c40cba14f8e105371fcde", "score": "0.5994364", "text": "_switchContent(templ) {\n let content = this._initContent();\n content.removeChildren();\n content.appendChild(templ);\n }", "title": "" }, { "docid": "7f9f672bfb40e8121d6b454582587aa2", "score": "0.5993835", "text": "function toTemplate(elements, template) {\r\n var result = $('<div></div>');\r\n for (k in elements) {\r\n var template_filled = template.clone();\r\n template_filled.find('.service_type_info_side_header').html(k).end().find('.service_type_info_side_content').html(elements[k]);\r\n result.append(template_filled);\r\n }\r\n return result;\r\n }", "title": "" }, { "docid": "75c72d88a28bc31c11b65eacdc9d9b47", "score": "0.59936786", "text": "template() {\n\t}", "title": "" }, { "docid": "48d1b66c957bbe0ac937f80a833b32b3", "score": "0.5993219", "text": "function createHtml() {\n\n const employeeHtml = render(employeeList);\n\n fs.writeFile(outputPath, employeeHtml, (err) => {\n\n if(err) console.log(err);\n\n })\n\n}", "title": "" }, { "docid": "6188edac2a02e6b874c58a4673b74fa7", "score": "0.5990971", "text": "connectedCallback() {\n this.innerHTML = this.getTemplate();\n }", "title": "" }, { "docid": "dcb3b6d891aca803c8a88308bdee8107", "score": "0.59907246", "text": "connectedCallback() {\r\n const temp = document.importNode(template.content, true);\r\n this.appendChild(temp);\r\n }", "title": "" }, { "docid": "38c75191b048ac1ae48e3f07b642e1c3", "score": "0.5986183", "text": "function ApplyTemplate( template, placeholders=[], tag = '#container' ){\n\tRead( template, function( content ){\n placeholders.forEach(function( placeholder ){\n content = content.replace( placeholder[ 0 ], placeholder[ 1 ] );\n });\n\t\t$( tag ).html( content );\t\n\t})\n}", "title": "" }, { "docid": "cadb5de44cbca7dd8f1a59884717d470", "score": "0.5983066", "text": "get template() {\n return Xen.html`\n <div style=\"padding: 8px;\">\n Hola <b>{{name}}</b>\n <div>{{list}}</div>\n </div>\n `;\n }", "title": "" }, { "docid": "c4109a3fa1fe7a80ba393f4fbd32d16c", "score": "0.5978593", "text": "atualizaRelogioTemplateInformacao(tarefa) {\n console.log(\"entrou\");\n let template = `<h1 class=\"informacaoTexto atualizaTarefa\">Tarefa Iniciada</h1>\n <h2 class=\"informacaoTexto\">Nome Tarefa : ${tarefa.nome} </h2>\n <h3 class=\"informacaoTexto\">Tempo : ${tarefa.hora} Hrs ${tarefa.minuto} Min ${tarefa.segundo} Seg</h3>\n <p class=\"informacaoTexto\">Descrição : ${tarefa.descricao} </p>\n `;\n return template;\n }", "title": "" }, { "docid": "8fb5ce625b667a9764b81b43b2150d50", "score": "0.5977749", "text": "function generalTemplate(todo){\n\n list.innerHTML += `<li class=\"list-group-item d-flex justify-content-between align-items-center\">\n <span>${todo}</span>\n <i class=\"far fa-trash-alt delete\"></i>\n</li>`\n\n}", "title": "" }, { "docid": "97968491329c101d54931be2ee135681", "score": "0.5973722", "text": "function renderTemplate(renderFromHtml, data, renderToHtml){\n $.get(renderFromHtml, function(renderFromHtml_html){\n $(\"#\" + renderToHtml).html($.templates(renderFromHtml_html).render(data));\n });\n}", "title": "" }, { "docid": "00b93f2ee271d8df41038516d6002e6d", "score": "0.59696716", "text": "function Jade (data, template){\n var new_page_element = document.createElement('span')\n new_page_element.innerHTML = template(data);\n return new_page_element;\n}", "title": "" }, { "docid": "6c77996cf1c1fa991f907dce4a52a9ad", "score": "0.5961232", "text": "function compileTemplate () {\r\n var template = $attrs.$mdTabsTemplate,\r\n element = angular.element(elements.data);\r\n element.html(template);\r\n $compile(element.contents())(ctrl.parent);\r\n delete $attrs.$mdTabsTemplate;\r\n }", "title": "" }, { "docid": "078d0013c3b59af2374120f95da1ad0f", "score": "0.5951225", "text": "function template(){\n //SELF\n var self = this;\n //CODE\n ['buy', 'do', 'drink', 'eat', 'go', 'item-group', 'main', 'other', 'see', 'sleep', 'vicinity']\n .forEach(function(partial){\n handlebars.registerPartial(partial,fs.readFileSync(\"template/\" + partial + \".mustache\",{encoding: \"UTF-8\"}));\n });\n var itemGroupTemplate = handlebars.compile(\"{{>item-group}}\");\n handlebars.registerHelper({\n 'item-group': function (name, options) {\n const items = this[name];\n if (!items) {\n return options.inverse(this)\n }\n return itemGroupTemplate({name: name, items: items, icon: options.fn(items, options)});\n },\n 'slice': function (array, start, end, options) {\n if (!array || array.length == 0)\n return options.inverse(this);\n\n return array.slice(start, end).map(options.fn).join('');\n }\n });\n}", "title": "" }, { "docid": "d973fc4a8f9fce37e44b06b8673e3d7d", "score": "0.5947278", "text": "function compileTemplate () {\n var template = $attrs.$mdTabsTemplate,\n element = angular.element(elements.data);\n element.html(template);\n $compile(element.contents())(ctrl.parent);\n delete $attrs.$mdTabsTemplate;\n }", "title": "" }, { "docid": "03170fe89b72e1eb7c9d3570059f9c25", "score": "0.59438133", "text": "static renderInitialTemplate() {\n const appTarget = document.getElementById('app');\n\n if (!appTarget) {\n throw new Error('App requires an HTML element with id `app` to render.');\n }\n\n appTarget.insertAdjacentHTML(\n 'beforeend',\n ` \n <header>\n <h1 class=\"logo-text\">todos</h1>\n </header>\n\n <section class=\"app-container\">\n <form class=\"todo-form\" autocomplete=\"off\">\n <span class=\"todo-form__toggler\" data-action=\"toggle-all\">‹</span>\n\n <input\n type=\"text\"\n class=\"todo-form__input\"\n id=\"todo-input\"\n placeholder=\"What needs to be done?\"\n />\n </form>\n\n <ul class=\"todo-list\"></ul>\n\n <footer class=\"app-footer is-hidden\"></footer>\n </section>\n `\n );\n }", "title": "" }, { "docid": "5cb8d336f068b1a6b0232a085a0382f8", "score": "0.59413326", "text": "bindHandlebarsTemplateToDom() {\n $(this.container).html(template(this.products));\n }", "title": "" }, { "docid": "c406356ba2172f8d7c384ff62b5abb97", "score": "0.5940718", "text": "template(data) {\n return `<document>\n <alertTemplate>\n <title>${data.title}</title>\n <description>${data.description}</description>\n </alertTemplate>\n </document>`;\n }", "title": "" }, { "docid": "c406356ba2172f8d7c384ff62b5abb97", "score": "0.5940718", "text": "template(data) {\n return `<document>\n <alertTemplate>\n <title>${data.title}</title>\n <description>${data.description}</description>\n </alertTemplate>\n </document>`;\n }", "title": "" }, { "docid": "4d2dbdd72becbe9ace010bd62b2df22c", "score": "0.59358907", "text": "renderTemplate(data) {\n const result = this.template(data);\n\n this.updateElement(result);\n\n this._attach();\n\n this.rendered = true;\n\n return this;\n }", "title": "" }, { "docid": "88413d7d3b5255e61525902724ae4de9", "score": "0.59328806", "text": "function render() {\r\n const template = createTemplate(store.slides[getIndex()]);\r\n $('main').html(template);\r\n console.log('render ran');\r\n}", "title": "" }, { "docid": "88413d7d3b5255e61525902724ae4de9", "score": "0.59328806", "text": "function render() {\r\n const template = createTemplate(store.slides[getIndex()]);\r\n $('main').html(template);\r\n console.log('render ran');\r\n}", "title": "" }, { "docid": "45aa92c9923203afe291c9714ad2c241", "score": "0.5928216", "text": "getHTMLDetail() {\n loadTemplate('templates/detailStudent.html',function(responseText) {\n let TPL_STUDENT = this;\n let scope = {};\n scope.TPL_ATTITUDE_TASKS = [];\n this.attitudeTasks.reverse().forEach(function(atItem) {\n let itemAT = attitudeMAP.get(parseInt(atItem.id));\n itemAT.datetime = atItem.timestamp;\n scope.TPL_ATTITUDE_TASKS.push(itemAT);\n });\n let TPL_GRADED_TASKS = '';\n gradedtaskMAP.forEach(function(gtItem) {\n TPL_GRADED_TASKS += '<li class=\"list-group-item\">' + gtItem.getStudentMark(TPL_STUDENT.getId()) + '->' +\n gtItem.name + '->' + formatDate(new Date(gtItem.datetime)) + '</li>';\n });\n let out = template(responseText,scope);\n console.log(out);\n $('#content').html(eval('`' + out + '`'));\n }.bind(this));\n }", "title": "" }, { "docid": "ad5af9e04fe5a8baf6a9911c17c7f1e5", "score": "0.59220684", "text": "function createMarkup(data) {\n const markup = cardTemplate(data);\n refs.gallery.insertAdjacentHTML('beforeend', markup);\n}", "title": "" }, { "docid": "30e5f8a52d29cd02490b992dc84c1848", "score": "0.59140056", "text": "get Template(){\n return `\n <div class=\"col-4 border border-warning rounded shadow ${this.color}\">\n <button type=\"button\" class=\"close text-danger\" onclick=\"app.listController.delete('${this.id}')\">\n <span>&times;</span>\n </button>\n <h1>${this.title}</h1>\n <form onsubmit=\"app.listController.addListItem(event, '${this.id}')\">\n <div class=\"form-group\">\n <label for=\"listItemName\">list Item:</label>\n <input type=\"text\" name=\"listItemName\" class=\"form-control\" placeholder=\"Type a list item in here...\" aria-describedby=\"helpId\">\n </div>\n </form>\n <h5>List Items:</h5>\n <dl>\n ${this.ListItemsTemplate}\n </dl>\n </div>\n `\n }", "title": "" }, { "docid": "4bf9d3745aa191c2cb0641d2a135f52a", "score": "0.5913913", "text": "template() {\n let container = doc.createElement('div');\n let input = doc.createElement('input');\n input.setAttribute('placeholder', 'write something here');\n this.bindElementToData('text', input);\n container.appendChild(input);\n container.appendChild(doc.createElement('br'));\n container.appendChild(doc.createElement('br'));\n\n return container;\n }", "title": "" }, { "docid": "e2dbca9170652e429e5605427e2563ba", "score": "0.5910296", "text": "constructor () {\n super()\n\n // Attach a shadow DOM tree to this element and append the template to the shadow root.\n this.attachShadow({ mode: 'open' })\n .appendChild(template.content.cloneNode(true))\n }", "title": "" }, { "docid": "e3db557626d48bc4d1e9ecd3ae48914d", "score": "0.59047073", "text": "function Template(_1){\r\nthis.editor=_1;\r\nvar _2=_1.config;\r\nvar _3=this;\r\n_2.registerButton({id:\"template\",tooltip:Xinha._lc(\"Insert template\",\"Template\"),image:_1.imgURL(\"ed_template.gif\",\"Template\"),textMode:false,action:function(_4){\r\n_3.buttonPress(_4);\r\n}});\r\n_2.addToolbarElement(\"template\",\"inserthorizontalrule\",1);\r\n}", "title": "" }, { "docid": "c9f68d5295b82c3d2dca3f675b64c5a3", "score": "0.5904328", "text": "constructor() {\n super(template);\n }", "title": "" }, { "docid": "092adcb74a2076f874b2b63cd1a66811", "score": "0.5899677", "text": "createdCallback() {\n var tplContent = document.importNode(template.content, true);\n // set the passed name into .name\n var name = this.getAttribute('name');\n tplContent.querySelector('.' + compPrefix + 'name').innerHTML = name;\n \n // set the passed title into the .title\n var title = this.getAttribute('title');\n var titleEl = tplContent.querySelector('.' + compPrefix + 'title');\n if (title && title.trim()) {\n titleEl.innerHTML = title;\n } else {\n titleEl.parentElement.removeChild(titleEl);\n }\n\n // set the modified template in the element\n var shadow = this.createShadowRoot();\n shadow.appendChild(document.importNode(tplContent, true));\n }", "title": "" } ]
a1fa73733015a7a0688bb0298f002f46
Update a property on an element. If the property name also exists as an input property on one of the element's directives, the component property will be set instead of the element property. This check must
[ { "docid": "def4764b8c9e4319206a07e143c65e68", "score": "0.54824895", "text": "function elementProperty(index, propName, value, sanitizer, nativeOnly) {\n elementPropertyInternal(index, propName, value, sanitizer, nativeOnly);\n}", "title": "" } ]
[ { "docid": "1f763b7b9487cf5027a486c0f6aafb01", "score": "0.694155", "text": "function elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var viewData = getViewData();\n var element = getNativeByIndex(index, viewData);\n var tNode = getTNode(index, viewData);\n var inputData = initializeTNodeInputs(tNode);\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(viewData, dataValue, value);\n if (isComponent(tNode))\n markDirtyIfOnPush(viewData, index + HEADER_OFFSET);\n }\n else if (tNode.type === 3 /* Element */) {\n var renderer = getRenderer();\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n ngDevMode && ngDevMode.rendererSetProperty++;\n isProceduralRenderer(renderer) ?\n renderer.setProperty(element, propName, value) :\n (element.setProperty ? element.setProperty(propName, value) :\n element[propName] = value);\n }\n}", "title": "" }, { "docid": "263ab909da2158764aa61327ed2b669c", "score": "0.6895373", "text": "function elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var node = loadElement(index);\n var tNode = node.tNode;\n // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked\n if (tNode && tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);\n }\n var inputData = tNode && tNode.inputs;\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(dataValue, value);\n markDirtyIfOnPush(node);\n }\n else {\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n var native = node.native;\n ngDevMode && ngDevMode.rendererSetProperty++;\n isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :\n (native.setProperty ? native.setProperty(propName, value) :\n native[propName] = value);\n }\n}", "title": "" }, { "docid": "74fc122021688c833aaaa6ebfcff2a66", "score": "0.68633014", "text": "function elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var node = data[index];\n var tNode = (node.tNode);\n // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked\n if (tNode && tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);\n }\n var inputData = tNode && tNode.inputs;\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(dataValue, value);\n markDirtyIfOnPush(node);\n }\n else {\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n var native = node.native;\n isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :\n (native.setProperty ? native.setProperty(propName, value) :\n native[propName] = value);\n }\n}", "title": "" }, { "docid": "d535c8a1a64fb61a373c2e28deeb7bae", "score": "0.6859816", "text": "function elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var node = data[index];\n var tNode = node.tNode;\n // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked\n if (tNode && tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);\n }\n var inputData = tNode && tNode.inputs;\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(dataValue, value);\n markDirtyIfOnPush(node);\n }\n else {\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n var native = node.native;\n isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :\n (native.setProperty ? native.setProperty(propName, value) :\n native[propName] = value);\n }\n}", "title": "" }, { "docid": "d535c8a1a64fb61a373c2e28deeb7bae", "score": "0.6859816", "text": "function elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var node = data[index];\n var tNode = node.tNode;\n // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked\n if (tNode && tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);\n }\n var inputData = tNode && tNode.inputs;\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(dataValue, value);\n markDirtyIfOnPush(node);\n }\n else {\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n var native = node.native;\n isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :\n (native.setProperty ? native.setProperty(propName, value) :\n native[propName] = value);\n }\n}", "title": "" }, { "docid": "3ae13f5e90b67146672a6bd606a37349", "score": "0.6638408", "text": "function singlePropertyUpdate (el, componentName, propName, propertyValue) {\n el.updateComponentProperty(componentName, propName, propertyValue);\n }", "title": "" }, { "docid": "2c13462e7d417c110e0812bb74cf033e", "score": "0.6464654", "text": "updateProperty(prop){\n var match = {\n thng: {name: prop.thng},\n prop: {name: prop.key}\n };\n var existingProp = _.find(this.properties, match);\n existingProp.prop.value = prop.value;\n }", "title": "" }, { "docid": "39ce791c2ced162cb363b4669ca62ec4", "score": "0.6286473", "text": "function changeInputPropertyById(elementId, property, propertyValue) {\n $('input[id=\"' + elementId + '\"]').prop(property, propertyValue);\n}", "title": "" }, { "docid": "985c27787d5fc6c6b276b5e2e8f2b3cd", "score": "0.62736917", "text": "function setProp(el, name, value) {\n if (name in el) {\n // @ts-expect-error Overriding value\n el[name] = value;\n } else\n {\n setAttr(el, name, rboolean.test(name) ? value ? '' : null : \"\" + value);\n }\n}", "title": "" }, { "docid": "563ffb2a1eb2aae5164736c539682049", "score": "0.61946696", "text": "onPropertyChanged(newProp, oldProp) {\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'width':\n this.setElementWidth(newProp.width);\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'enabled':\n Input.setEnabled(newProp.enabled, this.element);\n break;\n case 'enableRtl':\n Input.setEnableRtl(newProp.enableRtl, [this.container]);\n break;\n case 'readonly':\n Input.setReadonly(newProp.readonly, this.element);\n if (this.readonly) {\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"attributes\"])(this.element, { 'aria-readonly': 'true' });\n }\n else {\n this.element.removeAttribute('aria-readonly');\n }\n break;\n case 'htmlAttributes':\n this.updateHTMLAttrToElement();\n this.updateHTMLAttrToWrapper();\n this.updateDataAttribute(true);\n this.checkAttributes(true);\n Input.validateInputType(this.container, this.element);\n break;\n case 'placeholder':\n Input.setPlaceholder(newProp.placeholder, this.element);\n break;\n case 'step':\n this.step = newProp.step;\n this.validateStep();\n break;\n case 'showSpinButton':\n this.updateSpinButton(newProp);\n break;\n case 'showClearButton':\n this.updateClearButton(newProp);\n break;\n case 'floatLabelType':\n this.floatLabelType = newProp.floatLabelType;\n this.floatLabelTypeUpdate();\n break;\n case 'value':\n this.isDynamicChange = (this.isAngular || this.isVue) && this.preventChange;\n this.updateValue(newProp.value);\n if (this.isDynamicChange) {\n this.preventChange = false;\n this.isDynamicChange = false;\n }\n break;\n case 'min':\n case 'max':\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"setValue\"])(prop, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"])(prop, newProp), this);\n this.validateMinMax();\n this.updateValue(this.value);\n break;\n case 'strictMode':\n this.strictMode = newProp.strictMode;\n this.updateValue(this.value);\n this.validateState();\n break;\n case 'locale':\n this.initCultureFunc();\n this.l10n.setLocale(this.locale);\n this.setSpinButton();\n this.updatePlaceholder();\n Input.setPlaceholder(this.placeholder, this.element);\n this.updateValue(this.value);\n break;\n case 'currency':\n let propVal = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"])(prop, newProp);\n this.setProperties({ currencyCode: propVal }, true);\n this.updateCurrency(prop, propVal);\n break;\n case 'currencyCode':\n let propValue = Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"])(prop, newProp);\n this.setProperties({ currency: propValue }, true);\n this.updateCurrency('currency', propValue);\n break;\n case 'format':\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"setValue\"])(prop, Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"getValue\"])(prop, newProp), this);\n this.initCultureInfo();\n this.updateValue(this.value);\n break;\n case 'decimals':\n this.decimals = newProp.decimals;\n this.updateValue(this.value);\n }\n }\n }", "title": "" }, { "docid": "15d90fc937bb6e8972b2c1575bb0d68c", "score": "0.6191177", "text": "onPropertyChanged(newProp, oldProp) {\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'floatLabelType':\n Input.removeFloating(this.textboxWrapper);\n Input.addFloating(this.respectiveElement, this.floatLabelType, this.placeholder);\n break;\n case 'enabled':\n Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);\n this.bindClearEvent();\n break;\n case 'width':\n Input.setWidth(newProp.width, this.textboxWrapper.container);\n break;\n case 'value':\n let prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n if (!this.isBlank(this.value)) {\n this.value = this.value.toString();\n }\n this.isProtectedOnChange = prevOnChange;\n Input.setValue(this.value, this.respectiveElement, this.floatLabelType, this.showClearButton);\n if (this.isHiddenInput) {\n this.element.value = this.respectiveElement.value;\n }\n this.inputPreviousValue = this.respectiveElement.value;\n /* istanbul ignore next */\n if ((this.isAngular || this.isVue) && this.preventChange === true) {\n this.previousValue = this.isAngular ? this.value : this.previousValue;\n this.preventChange = false;\n }\n else if (Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(this.isAngular) || !this.isAngular\n || (this.isAngular && !this.preventChange) || (this.isAngular && Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(this.preventChange))) {\n this.raiseChangeEvent();\n }\n break;\n case 'htmlAttributes':\n this.updateHTMLAttrToElement();\n this.updateHTMLAttrToWrapper();\n let attributes$$1 = this.element.attributes;\n this.checkAttributes(true);\n Input.validateInputType(this.textboxWrapper.container, this.element);\n break;\n case 'readonly':\n Input.setReadonly(this.readonly, this.respectiveElement);\n break;\n case 'type':\n if (this.respectiveElement.tagName !== 'TEXTAREA') {\n this.respectiveElement.setAttribute('type', this.type);\n Input.validateInputType(this.textboxWrapper.container, this.element);\n this.raiseChangeEvent();\n }\n break;\n case 'showClearButton':\n if (this.respectiveElement.tagName !== 'TEXTAREA') {\n Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);\n this.bindClearEvent();\n }\n break;\n case 'enableRtl':\n Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);\n break;\n case 'placeholder':\n Input.setPlaceholder(this.placeholder, this.respectiveElement);\n break;\n case 'autocomplete':\n if (this.autocomplete !== 'on' && this.autocomplete !== '') {\n this.respectiveElement.autocomplete = this.autocomplete;\n }\n else {\n this.removeAttributes(['autocomplete']);\n }\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'locale':\n this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"Internationalization\"](this.locale);\n this.l10n.setLocale(this.locale);\n this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);\n Input.setPlaceholder(this.placeholder, this.respectiveElement);\n break;\n }\n }\n }", "title": "" }, { "docid": "9f12664353b91bd08e9068c30510b639", "score": "0.59903985", "text": "function updateElementValue(element,attr,value){element.prop('value',value);attr.$set('value',value);}", "title": "" }, { "docid": "2af9dbcaa11b9ae055b1f2a94b8c534c", "score": "0.59432733", "text": "function setProperty (el, propObj) {\n\n\t\t\tif (el && propObj) {\n\n\t\t\t\t_.forOwn(propObj, function (value, key) {\n\n\t\t\t\t\tkey = _.escape(key);\n\n\t\t\t\t\tif (key in el) {\n\t\t\t\t\t\tel[key] = value;\n\t\t\t\t\t} else { \n\t\t\t\t\t\tel.setAttribute(key, value);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0a91925eac27f92d4370d85e8a237e3c", "score": "0.5935227", "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 (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 }\n}", "title": "" }, { "docid": "8b4d50a9fc2b9cc3c5c21104b9828dac", "score": "0.5933517", "text": "updateProperty(prop, value) {\n if (this.isFanConnected()) {\n this.miioFanDevice.setProperty(prop, value);\n this.emit(Events.FAN_DEVICE_MANUAL_PROPERTIES_UPDATE, []);\n }\n }", "title": "" }, { "docid": "a4d01bf3391eb9ee94dcd0f973b1d39b", "score": "0.59110194", "text": "function applyProp(el, name, value) {\n // tslint:disable-next-line:no-any\n el[name] = value;\n}", "title": "" }, { "docid": "f854686ca560da7a5fc1679e5f84b202", "score": "0.5900454", "text": "updateProperties(data, element) {\n for (let property in data[0]) {\n if (data[0].hasOwnProperty(property))\n element.attr(property, d => d[property]);\n }\n }", "title": "" }, { "docid": "0cf32350aeb7b698de7d8a0d394980a5", "score": "0.58798295", "text": "set(propName, value) {\n // keep ahold of the current value;\n let oldValue = this._props[propName];\n\n switch (this.constructor.properties[propName].type) {\n case Number:\n // Number(null) === 0, but we want to allow nulls\n this._props[propName] = value === null ? null : Number(value);\n break;\n default:\n this._props[propName] = value;\n break;\n }\n\n // if property has changed\n if (oldValue !== this[propName]) {\n if (this.constructor.properties[propName].reflectToAttribute) {\n const attributeName = this._propsToAttrs[propName];\n\n // Remove the attribute if new value is null\n if (this[propName] === null) {\n this.removeAttribute(attributeName);\n } else {\n switch (this.constructor.properties[propName].type) {\n case Boolean:\n if (this[propName]) {\n // ignore the next attribute changed callback otherwise\n // there'll be an infinite loop\n this._ignoreNextAttributeChange[attributeName] = true;\n\n // a truthy value sets the attribute to an empty string\n this.setAttribute(attributeName, '');\n } else {\n // a falsey value removes the attribute\n this.removeAttribute(attributeName);\n }\n break;\n case Array: case Object:\n // ignore the next attribute changed callback otherwise\n // there'll be an infinite loop\n this._ignoreNextAttributeChange[attributeName] = true;\n this.setAttribute(attributeName, JSON.stringify(this[propName]));\n break;\n default:\n // ignore the next attribute changed callback otherwise\n // there'll be an infinite loop\n this._ignoreNextAttributeChange[attributeName] = true;\n this.setAttribute(attributeName, this[propName]);\n break;\n }\n }\n }\n\n // if this property is observed\n if (this.constructor.properties[propName].observer) {\n\n // check to see if this property has been changed already in this task\n const existingItemIndex = setStack.findIndex(item => (\n item.component === this && item.propName === propName\n ));\n\n // if it has already been changed\n if (existingItemIndex > -1) {\n // find where in stack the previous changed is queued\n const existingItem = setStack[existingItemIndex];\n // remove it\n setStack.splice(existingItemIndex, 1);\n // keep the oldValue as the original property value\n oldValue = existingItem.oldValue;\n }\n\n // put the observer on the stack to call later\n setStack.unshift({\n component: this,\n propName,\n observer: this.constructor.properties[propName].observer,\n oldValue,\n newValue: this[propName],\n });\n\n if (loopPaused) {\n // wait until microtasks are run\n Promise.resolve().then(() => {\n if (loopPaused) {\n loopPaused = false;\n // process stack\n runLoop();\n }\n });\n }\n }\n }\n }", "title": "" }, { "docid": "9fcaf0c19985a8d2951892918c5f8425", "score": "0.5864713", "text": "updatePropertyState(property, value) {\n if (value) {\n this.setAttribute(property, value === true ? '' : value);\n }\n else {\n this.removeAttribute(property);\n }\n }", "title": "" }, { "docid": "5e705f5810ff58b5d3702b3a2b95771a", "score": "0.5835237", "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": "2ac7c3a32cf028087180013848b27577", "score": "0.5811655", "text": "function updateStyleProp(context, offset, input, directiveRef) {\n _updateSingleStylingValue(context, offset, input, false, directiveRef);\n}", "title": "" }, { "docid": "2ac7c3a32cf028087180013848b27577", "score": "0.5811655", "text": "function updateStyleProp(context, offset, input, directiveRef) {\n _updateSingleStylingValue(context, offset, input, false, directiveRef);\n}", "title": "" }, { "docid": "2ac7c3a32cf028087180013848b27577", "score": "0.5811655", "text": "function updateStyleProp(context, offset, input, directiveRef) {\n _updateSingleStylingValue(context, offset, input, false, directiveRef);\n}", "title": "" }, { "docid": "2ac7c3a32cf028087180013848b27577", "score": "0.5811655", "text": "function updateStyleProp(context, offset, input, directiveRef) {\n _updateSingleStylingValue(context, offset, input, false, directiveRef);\n}", "title": "" }, { "docid": "2ac7c3a32cf028087180013848b27577", "score": "0.5811655", "text": "function updateStyleProp(context, offset, input, directiveRef) {\n _updateSingleStylingValue(context, offset, input, false, directiveRef);\n}", "title": "" }, { "docid": "b5b85498cc3ab413880f177cb333ecee", "score": "0.5760648", "text": "function setProp(el, name, value, xmlMode) {\n if (name in el) {\n // @ts-expect-error Overriding value\n el[name] = value;\n }\n else {\n setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : \"\".concat(value));\n }\n}", "title": "" }, { "docid": "2a3f9a738dc840c843ef698eaa94c08d", "score": "0.57591736", "text": "function propertyChangeHandler($el, $iNode, attrs, key, newVal, oldVal) {\n switch (key) {\n case 'iconposition':\n $el.attr('icon-position', newVal);\n break;\n case 'iconsize':\n $el[0].style.fontSize = newVal;\n break;\n case 'opacity':\n $el[0].style.opacity = newVal;\n break;\n case 'color':\n $iNode[0].style.color = newVal;\n break;\n case 'iconclass':\n $iNode.removeClass(oldVal).addClass(newVal);\n break;\n case 'hint':\n attrs.$set('title', newVal);\n break;\n }\n }", "title": "" }, { "docid": "de762b184cc7be11dd8042792a562a6c", "score": "0.5740931", "text": "function Input( el, property, callback, customUpdate ) {\n _this.attachInputChangeHandler( el, _trackEvent, property, callback );\n\n function updateUI() {\n var val = _popcornOptions[ property ];\n el.value = val;\n if ( customUpdate ) {\n customUpdate( el );\n }\n }\n\n updateUI( _popcornOptions[ property ] );\n\n return {\n el: el,\n updateUI: updateUI\n };\n }", "title": "" }, { "docid": "b8dcd153cab87c242b208a0a08721106", "score": "0.5729706", "text": "function setProp(el, name, value, xmlMode) {\n if (name in el) {\n // @ts-expect-error Overriding value\n el[name] = value;\n }\n else {\n setAttr(el, name, !xmlMode && rboolean.test(name) ? (value ? '' : null) : \"\" + value);\n }\n}", "title": "" }, { "docid": "2f1767b45c00e407b62de27232fce28d", "score": "0.5719375", "text": "_requestUpdate(name,oldValue){let shouldRequestUpdate=!0;// If we have a property key, perform property update steps.\nif(name!==void 0){const ctor=this.constructor,options=ctor._classProperties.get(name)||defaultPropertyDeclaration;if(ctor._valueHasChanged(this[name],oldValue,options.hasChanged)){if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}// Add to reflecting properties set.\n// Note, it's important that every change has a chance to add the\n// property to `_reflectingProperties`. This ensures setting\n// attribute + property reflects correctly.\nif(!0===options.reflect&&!(this._updateState&STATE_IS_REFLECTING_TO_PROPERTY)){if(this._reflectingProperties===void 0){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}}else{// Abort the request if the property should not be considered changed.\nshouldRequestUpdate=!1}}if(!this._hasRequestedUpdate&&shouldRequestUpdate){this._enqueueUpdate()}}", "title": "" }, { "docid": "f269b062653bb3989c8b0179debc76e4", "score": "0.56789446", "text": "set property(){}", "title": "" }, { "docid": "38bfdf02af01e5ee971bf43f3d5a207c", "score": "0.56786776", "text": "_requestUpdate(name,oldValue){let shouldRequestUpdate=!0;// If we have a property key, perform property update steps.\nif(void 0!==name){const ctor=this.constructor,options=ctor._classProperties.get(name)||defaultPropertyDeclaration$1;if(ctor._valueHasChanged(this[name],oldValue,options.hasChanged)){if(!this._changedProperties.has(name)){this._changedProperties.set(name,oldValue)}// Add to reflecting properties set.\n// Note, it's important that every change has a chance to add the\n// property to `_reflectingProperties`. This ensures setting\n// attribute + property reflects correctly.\nif(!0===options.reflect&&!(this._updateState&STATE_IS_REFLECTING_TO_PROPERTY$1)){if(void 0===this._reflectingProperties){this._reflectingProperties=new Map}this._reflectingProperties.set(name,options)}}else{// Abort the request if the property should not be considered changed.\nshouldRequestUpdate=!1}}if(!this._hasRequestedUpdate&&shouldRequestUpdate){this._enqueueUpdate()}}", "title": "" }, { "docid": "c1e698d16e0c1f1780ab3e62c0cfd402", "score": "0.5677074", "text": "onPropertyChanged(newProp, oldProp) {\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'value':\n setMaskValue.call(this, this.value);\n if (this.placeholder) {\n this.setMaskPlaceholder(false, false);\n }\n break;\n case 'placeholder':\n this.setMaskPlaceholder(true, true);\n break;\n case 'width':\n this.setWidth(newProp.width);\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'enabled':\n Input.setEnabled(newProp.enabled, this.element, this.floatLabelType, this.inputObj.container);\n break;\n case 'readonly':\n Input.setReadonly(newProp.readonly, this.element);\n break;\n case 'enableRtl':\n Input.setEnableRtl(newProp.enableRtl, [this.inputObj.container]);\n break;\n case 'customCharacters':\n this.customCharacters = newProp.customCharacters;\n this.resetMaskedTextBox();\n break;\n case 'showClearButton':\n Input.setClearButton(newProp.showClearButton, this.element, this.inputObj, undefined, this.createElement);\n bindClearEvent.call(this);\n break;\n case 'floatLabelType':\n this.floatLabelType = newProp.floatLabelType;\n Input.removeFloating(this.inputObj);\n Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);\n break;\n case 'htmlAttributes':\n this.updateHTMLAttrToElement();\n this.updateHTMLAttrToWrapper();\n this.checkHtmlAttributes(true);\n break;\n case 'mask':\n let strippedValue$$1 = this.value;\n this.mask = newProp.mask;\n this.updateValue(strippedValue$$1);\n break;\n case 'promptChar':\n if (newProp.promptChar.length > 1) {\n newProp.promptChar = newProp.promptChar[0];\n }\n if (newProp.promptChar) {\n this.promptChar = newProp.promptChar;\n }\n else {\n this.promptChar = '_';\n }\n let value = this.element.value.replace(new RegExp('[' + oldProp.promptChar + ']', 'g'), this.promptChar);\n if (this.promptMask === this.element.value) {\n value = this.promptMask.replace(new RegExp('[' + oldProp.promptChar + ']', 'g'), this.promptChar);\n }\n this.promptMask = this.promptMask.replace(new RegExp('[' + oldProp.promptChar + ']', 'g'), this.promptChar);\n this.undoCollec = this.redoCollec = [];\n setElementValue.call(this, value);\n break;\n }\n }\n }", "title": "" }, { "docid": "f4adf00ac823c5b699799b2aa0d39116", "score": "0.567583", "text": "function setPropertyOnElement(element, key, value) {\n data(element)[key] = value;\n }", "title": "" }, { "docid": "12b88fe00fcf6bebd85bf8fbc8df23aa", "score": "0.5671486", "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 if (value == null) {\n el.removeAttribute(key);\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 // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\n try {\n el[key] = 0;\n }\n catch (_a) { }\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": "919a46853be1884d7b86c88631da1cda", "score": "0.566508", "text": "function updateShadowAttribute($element, prop, value) {\n prop = 'data-ui-' + _.caseDash(prop)\n if ( value == null ) {\n $element.removeAttr(prop)\n }\n else {\n $element.attr(prop, typeof value == 'object' ?\n JSON.stringify(value) : value\n )\n }\n}", "title": "" }, { "docid": "adb8d3074ce38c42d3bfbf01e7323a07", "score": "0.56369656", "text": "onPropertyChanged(newProp, oldProp) {\n let label = this.getLabel();\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'checked':\n if (newProp.checked) {\n this.updateChange();\n }\n this.element.checked = newProp.checked;\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.unWireEvents();\n }\n else {\n this.element.disabled = false;\n this.wireEvents();\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"removeClass\"])([label], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"addClass\"])([label], newProp.cssClass.split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n label.classList.add(RTL$1);\n }\n else {\n label.classList.remove(RTL$1);\n }\n break;\n case 'label':\n this.setText(newProp.label);\n break;\n case 'labelPosition':\n if (newProp.labelPosition === 'Before') {\n label.classList.add('e-right');\n }\n else {\n label.classList.remove('e-right');\n }\n break;\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'value':\n if (!Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"isNullOrUndefined\"])(this.htmlAttributes) && this.htmlAttributes.value) {\n break;\n }\n this.element.setAttribute('value', newProp.value);\n break;\n case 'htmlAttributes':\n this.updateHtmlAttribute();\n break;\n }\n }\n }", "title": "" }, { "docid": "ec510b816f5d35892253de80f0a32c73", "score": "0.56201226", "text": "onPropertyChanged(newProp, oldProp) {\n let wrapper = this.getWrapper();\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'checked':\n this.changeState(newProp.checked);\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.unWireEvents();\n }\n else {\n this.element.disabled = false;\n wrapper.classList.remove(DISABLED$1);\n wrapper.setAttribute('aria-disabled', 'false');\n this.wireEvents();\n }\n break;\n case 'value':\n this.element.setAttribute('value', newProp.value);\n break;\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'onLabel':\n case 'offLabel':\n this.setLabel(newProp.onLabel, newProp.offLabel);\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n wrapper.classList.add(RTL$2);\n }\n else {\n wrapper.classList.remove(RTL$2);\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"removeClass\"])([wrapper], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"addClass\"])([wrapper], newProp.cssClass.split(' '));\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "ccf44fa16b14225b7292cf9030a34f63", "score": "0.56093955", "text": "updateInvalid(element, prop) {\n const invalid = this.metaList.some((meta) => meta.userData[prop] !== this.meta.userData[prop]);\n element.invalid = invalid;\n }", "title": "" }, { "docid": "99783eb443979f12b9b798a03475e65e", "score": "0.56088567", "text": "function setPropertyOnElement(element, key, value) {\n data(element)[key] = value;\n}", "title": "" }, { "docid": "99783eb443979f12b9b798a03475e65e", "score": "0.56088567", "text": "function setPropertyOnElement(element, key, value) {\n data(element)[key] = value;\n}", "title": "" }, { "docid": "65e4332b218cd9231739c2ee9867b72b", "score": "0.560185", "text": "function linkInputToProperty(object, name, input) {\n //Clear previous handlers\n input.off(\"change\");\n \n input.val(object[name]);\n input.on(\"change\", () => {\n editorDirty = true;\n object[name] = input.val();\n });\n}", "title": "" }, { "docid": "c5132b14f05749c0044e1f90392116af", "score": "0.55926365", "text": "function changeElementPropertyByValue(elementValue, property, propertyValue) {\n $('[value=\"' + elementValue + '\"]').prop(property, propertyValue);\n}", "title": "" }, { "docid": "6a1344d54883154076a73d41ecdae628", "score": "0.5592345", "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 if (value == null) {\n el.removeAttribute(key);\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value);\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 // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\n try {\n el[key] = 0;\n }\n catch (_a) { }\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": "6a1344d54883154076a73d41ecdae628", "score": "0.5592345", "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 if (value == null) {\n el.removeAttribute(key);\n }\n return;\n }\n if (value === '' || value == null) {\n const type = typeof el[key];\n if (type === 'boolean') {\n // e.g. <select multiple> compiles to { multiple: '' }\n el[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value);\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 // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\n try {\n el[key] = 0;\n }\n catch (_a) { }\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": "4138075a4802275fbd4229568b91a6ea", "score": "0.55806434", "text": "onPropertyChanged(newProp, oldProp) {\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'placeholder':\n _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__[\"Input\"].setPlaceholder(newProp.placeholder, this.inputElement);\n this.inputElement.setAttribute('aria-placeholder', newProp.placeholder);\n break;\n case 'readonly':\n _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__[\"Input\"].setReadonly(this.readonly, this.inputElement, this.floatLabelType);\n if (this.readonly) {\n this.hide();\n }\n this.setTimeAllowEdit();\n break;\n case 'enabled':\n this.setProperties({ enabled: newProp.enabled }, true);\n this.setEnable();\n break;\n case 'allowEdit':\n this.setTimeAllowEdit();\n break;\n case 'enableRtl':\n if (!this.isBlazorServer) {\n this.setProperties({ enableRtl: newProp.enableRtl }, true);\n this.setEnableRtl();\n }\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'zIndex':\n this.setProperties({ zIndex: newProp.zIndex }, true);\n this.setZIndex();\n break;\n case 'htmlAttributes':\n this.updateHtmlAttributeToElement();\n this.updateHtmlAttributeToWrapper();\n this.checkAttributes(true);\n break;\n case 'min':\n case 'max':\n if (!this.isBlazorServer) {\n this.getProperty(newProp, prop);\n }\n break;\n case 'showClearButton':\n _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__[\"Input\"].setClearButton(this.showClearButton, this.inputElement, this.inputWrapper);\n this.bindClearEvent();\n break;\n case 'locale':\n this.setProperties({ locale: newProp.locale }, true);\n this.globalize = new _syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"Internationalization\"](this.locale);\n this.l10n.setLocale(this.locale);\n this.updatePlaceHolder();\n if (!this.isBlazorServer) {\n this.setValue(this.value);\n }\n break;\n case 'width':\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"setStyleAttribute\"])(this.inputWrapper.container, { 'width': this.setWidth(newProp.width) });\n this.containerStyle = this.inputWrapper.container.getBoundingClientRect();\n break;\n case 'format':\n this.setProperties({ format: newProp.format }, true);\n this.checkTimeFormat();\n if (!this.isBlazorServer) {\n this.setValue(this.value);\n }\n break;\n case 'value':\n if (!this.isBlazorServer) {\n this.invalidValueString = null;\n this.checkInvalidValue(newProp.value);\n newProp.value = this.value;\n if (!this.invalidValueString) {\n if (typeof newProp.value === 'string') {\n this.setProperties({ value: this.checkDateValue(new Date(newProp.value)) }, true);\n newProp.value = this.value;\n }\n else {\n if ((newProp.value && +new Date(+newProp.value).setMilliseconds(0)) !== +this.value) {\n newProp.value = this.checkDateValue(new Date('' + newProp.value));\n }\n }\n this.initValue = newProp.value;\n newProp.value = this.compareFormatChange(this.checkValue(newProp.value));\n }\n else {\n this.updateInputValue(this.invalidValueString);\n this.checkErrorState(this.invalidValueString);\n }\n this.checkValueChange(null, false);\n if (this.isPopupOpen()) {\n this.setScrollPosition();\n }\n if (this.isAngular && this.preventChange) {\n this.preventChange = false;\n }\n }\n break;\n case 'floatLabelType':\n this.floatLabelType = newProp.floatLabelType;\n _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__[\"Input\"].removeFloating(this.inputWrapper);\n _syncfusion_ej2_inputs__WEBPACK_IMPORTED_MODULE_2__[\"Input\"].addFloating(this.inputElement, this.floatLabelType, this.placeholder);\n break;\n case 'strictMode':\n if (!this.isBlazorServer) {\n this.invalidValueString = null;\n if (newProp.strictMode) {\n this.checkErrorState(null);\n }\n this.setProperties({ strictMode: newProp.strictMode }, true);\n this.checkValue((this.inputElement).value);\n this.checkValueChange(null, false);\n }\n break;\n case 'scrollTo':\n if (!this.isBlazorServer) {\n if (this.checkDateValue(new Date(this.checkInValue(newProp.scrollTo)))) {\n if (this.popupWrapper) {\n this.setScrollTo();\n }\n this.setProperties({ scrollTo: this.checkDateValue(new Date(this.checkInValue(newProp.scrollTo))) }, true);\n }\n else {\n this.setProperties({ scrollTo: null }, true);\n }\n }\n else {\n if (this.popupWrapper) {\n this.setScrollTo();\n }\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "7ac71715df86b20d17aa904f724caff1", "score": "0.5556192", "text": "function setInputsForProperty(inputs, value) {\n for (var i = 0; i < inputs.length; i += 2) {\n ngDevMode && assertDataInRange(inputs[i], directives);\n directives[inputs[i]][inputs[i + 1]] = value;\n }\n}", "title": "" }, { "docid": "7ac71715df86b20d17aa904f724caff1", "score": "0.5556192", "text": "function setInputsForProperty(inputs, value) {\n for (var i = 0; i < inputs.length; i += 2) {\n ngDevMode && assertDataInRange(inputs[i], directives);\n directives[inputs[i]][inputs[i + 1]] = value;\n }\n}", "title": "" }, { "docid": "7ac71715df86b20d17aa904f724caff1", "score": "0.5556192", "text": "function setInputsForProperty(inputs, value) {\n for (var i = 0; i < inputs.length; i += 2) {\n ngDevMode && assertDataInRange(inputs[i], directives);\n directives[inputs[i]][inputs[i + 1]] = value;\n }\n}", "title": "" }, { "docid": "9ce263b66da3b808226fa71e2ba699cb", "score": "0.5511115", "text": "mountingAttPanel() {\n this.shadowRoot.querySelectorAll('[att-prop]').forEach(el => {\n\n el.addEventListener('change', () => {\n let data = {};\n console.log('Im here', el.value);\n data[el.getAttribute('att-prop')] = el.value;\n // 2. Second way, update directly to referenceElem\n if (this.refElem) {\n // this.refElem.updateInstance(data);\n this.refElem.setAttribute(el.getAttribute('att-prop'), el.value);\n }\n if (el.getAttribute('att-prop') == 'name') {\n this.shadowRoot.querySelector('[att-title]').innerHTML = data['name'];\n }\n })\n })\n }", "title": "" }, { "docid": "48fd217990e30e090308637f8cd25db5", "score": "0.5508214", "text": "function setInputsForProperty(inputs, value) {\n for (var i = 0; i < inputs.length; i += 2) {\n ngDevMode && assertDataInRange(inputs[i], (directives));\n directives[inputs[i]][inputs[i + 1]] = value;\n }\n}", "title": "" }, { "docid": "528b30f121fd0232a8dbb8f7f59e45fb", "score": "0.547964", "text": "function decorateShadowAttribute($element, shadowAttrs, prop) {\n var currValue = shadowAttrs[prop]\n Object.defineProperty(shadowAttrs, prop, {\n get: function() {\n return currValue\n },\n set: function(value) {\n var previousValue = currValue\n var eventAssign = $.Event('assign:' + prop, {\n value: value,\n name: prop\n })\n $element.trigger(eventAssign)\n var isPrevented = eventAssign.isDefaultPrevented()\n if ( !isPrevented ) {\n currValue = eventAssign.value\n updateShadowAttribute($element, prop, currValue)\n }\n var eventSet = $.Event('set:' + prop, {\n value: isPrevented ? value : currValue,\n previousValue: previousValue,\n name: prop\n })\n $element.trigger(eventSet)\n }\n })\n}", "title": "" }, { "docid": "7cb770518fcae39e37963578555dae71", "score": "0.5468352", "text": "function updateProperty(conn, targetName, propertyName, value) {\n\tcontroller.findPotentialMUDObjects(conn, targetName, function(objs) {\n\t\tupdatePropertyInternal(conn, objs, propertyName, value);\n\t}, true, true);\n}", "title": "" }, { "docid": "dd8dd443a893cdd3bbff9202459c050f", "score": "0.54665047", "text": "function _stylingProp(elementIndex, bindingIndex, prop, value, isClassBased, defer) {\n var lView = getLView();\n var tNode = getTNode(elementIndex, lView);\n var native = getNativeByTNode(tNode, lView);\n var updated = false;\n if (value !== NO_CHANGE) {\n if (isClassBased) {\n updated = updateClassBinding(getClassesContext(tNode), lView, native, prop, bindingIndex, value, defer, false);\n }\n else {\n var sanitizer = getCurrentStyleSanitizer();\n updated = updateStyleBinding(getStylesContext(tNode), lView, native, prop, bindingIndex, value, sanitizer, defer, false);\n }\n }\n return updated;\n}", "title": "" }, { "docid": "4ef2fee8e438ea1ce1cfae0641ae2aa2", "score": "0.5449885", "text": "static getProperty (element) {\n\t\tvar property = element.getAttribute(\"property\") || element.getAttribute(\"itemprop\");\n\n\t\tif (!property) {\n\t\t\tvar multiple = element.getAttribute(\"mv-multiple\");\n\n\t\t\tif (element.hasAttribute(\"property\")) { // property used without a value\n\t\t\t\tproperty = multiple || element.name || element.id || element.classList[0];\n\n\t\t\t\tif (!property) {\n\t\t\t\t\tproperty = _.generatePropertyName(multiple === null? \"prop\" : \"collection\", element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (property) {\n\t\t\telement.setAttribute(\"property\", property);\n\t\t}\n\n\t\treturn property;\n\t}", "title": "" }, { "docid": "4b069e34a6475d52106154b18d427eac", "score": "0.5443377", "text": "function updateDirectiveInputValue(context, lView, tNode, bindingIndex, newValue, isClassBased) {\n var oldValue = lView[bindingIndex];\n if (oldValue !== newValue) {\n // even if the value has changed we may not want to emit it to the\n // directive input(s) in the event that it is falsy during the\n // first update pass.\n if (newValue || isContextLocked(context)) {\n var inputs = tNode.inputs[isClassBased ? 'class' : 'style'];\n var initialValue = getInitialStylingValue(context);\n var value = normalizeStylingDirectiveInputValue(initialValue, newValue, isClassBased);\n setInputsForProperty(lView, inputs, value);\n }\n lView[bindingIndex] = newValue;\n }\n}", "title": "" }, { "docid": "30e53047704f1ec383e57e7c727069b7", "score": "0.5437381", "text": "function updateElement(id,property,value){\n \n var elementToChange = testFormElements[id];\n propertyToChange = elementToChange[property] = value;\n elementToChange.buildHTML();\n \n //console.log('updated label: after '+ elementToChange.label);\n return elementToChange.html;\n //$( '#outputForm').appendElement(elementToChange.buildHTML());\n }", "title": "" }, { "docid": "9616376523e0786bc9d956667cee5172", "score": "0.5436046", "text": "function preparePropertyEditor(node,property,prefix) {\n var input = $(\"#\"+prefix+\"-\"+property);\n if (input.attr('type') === \"checkbox\") {\n input.prop('checked',node[property]);\n } else {\n var val = node[property];\n if (val == null) {\n val = \"\";\n }\n input.val(val);\n }\n }", "title": "" }, { "docid": "3b6cbdcd37af7ed42b150e90a7be3c67", "score": "0.5403986", "text": "function updateAttribute(element, name, value, oldValue) {\n if (name === 'className') name = 'class'\n if (name === 'key') {\n } else if (name === 'style') {\n Object.assign(element.style, value)\n } else {\n // bind the event listener\n if (name.startsWith('on')) {\n const eventName = name.substr(2)\n if (!element.events) {\n element.events = {}\n } else if (!oldValue) {\n oldValue = element.events[eventName]\n }\n\n element.events[eventName] = value\n\n if (value) {\n if (!oldValue) {\n element.addEventListener(eventName, eventListener)\n }\n } else {\n element.removeEventListener(eventName, eventListener)\n }\n } else if (value === null || value === false) {\n element.removeAttribute(name)\n } else {\n element.setAttribute(name, value)\n }\n }\n }", "title": "" }, { "docid": "7b998cf3c2cf7d47ae8a5b8ac7cf6e1d", "score": "0.5401528", "text": "updateProp(props){\n if(props)\n for(let prop of props){\n this.__props.set(prop[0],prop[1]);\n }\n }", "title": "" }, { "docid": "a6e577b1a2c5d0869566dc741939c41b", "score": "0.539417", "text": "static update(elem, newProps, oldProps={}) {\n let updateProp\n\n// Check if the given prop on the given element needs updated or not,\n// and update, add or remove it...\n updateProp =(elem, name, newVal, oldVal)=> {\n if (!newVal) {\n this.remove(elem, name, oldVal)\n } else if (!oldVal || newVal !== oldVal) {\n this.set(elem, name, newVal)\n }\n }\n\n// Combine old and new props into 1 new object...\n const props = _.combineObjects(newProps, oldProps)\n// Get an array of unique props keys and use it to iterate through\n// both objects comparing for differences and update requirements...\n Object.keys(props).forEach(name=> {\n updateProp(elem, name, newProps[name], oldProps[name])\n })\n }", "title": "" }, { "docid": "2b1a6594b12fdec7bdbd340c4120eb84", "score": "0.5377883", "text": "function handleProperties(component, properties, attributes, scope) {\n utils.objectKeys(properties).forEach(function (attr) {\n if (!(attr in attributes))\n return;\n // HACK: We don't have a proper API to reset a value\n // to its default. We use the '__setFromString' here\n function setDefault() {\n component.__setFromString(attr, null);\n }\n // For templates, we treat empty strings as default\n // values. You'll get emtpy strings if the template\n // evaluates to undefined etc. For example, in\n // <awsui-alert type==\"{{undefined}}\">\n // the type attribute evaluates to an empty string.\n function templateHandler(newVal) {\n if (newVal === '') {\n setDefault();\n }\n else {\n component[attr] = newVal;\n }\n }\n function handler(newVal) {\n var propValue = toPropValue(component, attr, newVal);\n if (angular.isDefined(propValue)) {\n component[attr] = propValue;\n }\n else {\n setDefault();\n }\n }\n // We treat strings differently from other property\n // types: with strings we use the interpolate\n // template syntax. For the other types we use\n // expression syntax: these will be watch expressions\n // on the current scope.\n // This seems to most closely mirror the way the different\n // types work in Angular. For example, ng-if uses the\n // expression syntax for booleans. ng-href uses the\n // template syntax.\n var type = properties[attr].type || 'string';\n if (type === 'string' || type === 'region') {\n attributes.$observe(attr, templateHandler);\n }\n else {\n scope.$watch(attributes[attr], handler, ['object', 'array'].indexOf(type) >= 0);\n }\n });\n}", "title": "" }, { "docid": "2292245a0d4af18eab8bb0e7e19b6a69", "score": "0.5377301", "text": "function setElementProperty (id, propertyName, propertyValue) {\n\tlet e;\n\n\te = document.getElementById (id);\n\tif (e != null) {\n\t\te[propertyName] = propertyValue;\n\t}\n}", "title": "" }, { "docid": "9d0c27dfb1b87cb6a527e6fe99ae1ef0", "score": "0.5377282", "text": "_requestUpdate(name, oldValue) {\n let shouldRequestUpdate = true; // If we have a property key, perform property update steps.\n\n if (name !== undefined) {\n const ctor = this.constructor;\n const options = ctor._classProperties.get(name) || defaultPropertyDeclaration;\n\n if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) {\n if (!this._changedProperties.has(name)) {\n this._changedProperties.set(name, oldValue);\n } // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n\n\n if (options.reflect === true && !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) {\n if (this._reflectingProperties === undefined) {\n this._reflectingProperties = new Map();\n }\n\n this._reflectingProperties.set(name, options);\n }\n } else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n\n if (!this._hasRequestedUpdate && shouldRequestUpdate) {\n this._enqueueUpdate();\n }\n }", "title": "" }, { "docid": "9d0c27dfb1b87cb6a527e6fe99ae1ef0", "score": "0.5377282", "text": "_requestUpdate(name, oldValue) {\n let shouldRequestUpdate = true; // If we have a property key, perform property update steps.\n\n if (name !== undefined) {\n const ctor = this.constructor;\n const options = ctor._classProperties.get(name) || defaultPropertyDeclaration;\n\n if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) {\n if (!this._changedProperties.has(name)) {\n this._changedProperties.set(name, oldValue);\n } // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n\n\n if (options.reflect === true && !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) {\n if (this._reflectingProperties === undefined) {\n this._reflectingProperties = new Map();\n }\n\n this._reflectingProperties.set(name, options);\n }\n } else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n\n if (!this._hasRequestedUpdate && shouldRequestUpdate) {\n this._enqueueUpdate();\n }\n }", "title": "" }, { "docid": "527a15696b6fc0b947bc5e8f62d8035c", "score": "0.53660536", "text": "set prop3( value ) {\n }", "title": "" }, { "docid": "5cc880d291426f09ef1b22ce769d0e57", "score": "0.5360788", "text": "function setPropertyField(inputElement, obj) {\n let childNodes = inputElement.childNodes;\n if (obj.length > 0) {\n let indexOfButton = childNodes.length - 1;\n for (let i in obj) {\n childNodes[indexOfButton].click();\n\n let graphicalElement = childNodes[childNodes.length - 1]\n setParameterField(graphicalElement, obj[i]);\n\n let graphicalElementChild = graphicalElement.childNodes\n if (obj[i].name != undefined) {\n graphicalElementChild[graphicalElementChild.length - 1 - 2].value = obj[i].name;\n }\n if (obj[i].type != undefined) {\n graphicalElementChild[graphicalElementChild.length - 1].value = obj[i].type;\n }\n }\n }\n}", "title": "" }, { "docid": "678c0c68b34f18abe0ff88583b0f22df", "score": "0.53602874", "text": "_requestUpdate(name, oldValue) {\n let shouldRequestUpdate = true; // If we have a property key, perform property update steps.\n\n if (name !== undefined) {\n const ctor = this.constructor;\n const options = ctor._classProperties.get(name) || defaultPropertyDeclaration;\n\n if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) {\n if (!this._changedProperties.has(name)) {\n this._changedProperties.set(name, oldValue);\n } // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n\n\n if (options.reflect === true && !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) {\n if (this._reflectingProperties === undefined) {\n this._reflectingProperties = new Map();\n }\n\n this._reflectingProperties.set(name, options);\n }\n } else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n\n if (!this._hasRequestedUpdate && shouldRequestUpdate) {\n this._enqueueUpdate();\n }\n }", "title": "" }, { "docid": "2dc45f50d7b29fc5f1372ff442deb424", "score": "0.535425", "text": "update(_changedProperties){if(this._reflectingProperties!==void 0&&0<this._reflectingProperties.size){// Use forEach so this works even if for/of loops are compiled to for\n// loops expecting arrays\nthis._reflectingProperties.forEach((v,k)=>this._propertyToAttribute(k,this[k],v));this._reflectingProperties=void 0}}", "title": "" }, { "docid": "2b6e1c31e5157a7a72e6ee689b8d1632", "score": "0.53514475", "text": "setProperty(property, value) {\n this.each((e) => {\n e[property] = value;\n });\n }", "title": "" }, { "docid": "02e762a674c959fa29822a75c0ae33e2", "score": "0.5330758", "text": "setProperty(key, value) {\n this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n }", "title": "" }, { "docid": "02e762a674c959fa29822a75c0ae33e2", "score": "0.5330758", "text": "setProperty(key, value) {\n this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n }", "title": "" }, { "docid": "32ad5c4aa6fe8f35e0dbe8250dbf903a", "score": "0.5324449", "text": "update(_changedProperties){if(void 0!==this._reflectingProperties&&0<this._reflectingProperties.size){// Use forEach so this works even if for/of loops are compiled to for\n// loops expecting arrays\nthis._reflectingProperties.forEach((v,k)=>this._propertyToAttribute(k,this[k],v));this._reflectingProperties=void 0}}", "title": "" }, { "docid": "b79d393f79728778300eb8d6acb29d6e", "score": "0.5322585", "text": "function bindInput(object, property, id) {\n\tif (id === undefined) {\n\t\tid = '';\n\t}\n\tvar elem = document.getElementById(property + id);\n\tif (elem.tagName.toLowerCase() == 'input') {\n\t\tswitch (elem.type) {\n\t\t\tcase 'checkbox':\n\t\t\t\telem.checked = (object[property] == '1');\n\t\t\t\telem.onchange = function () {object[property] = (elem.checked ? 1 : 0); saveChanges(object, property);};\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\telem.value = object[property];\n\t\t\t\telem.onchange = function () {object[property] = elem.value; saveChanges(object, property);};\n\t\t\t\tbreak;\n\t\t}\n\t} else if (elem.tagName.toLowerCase() == 'select') {\n\t\telem.value = object[property];\n\t\telem.onchange = function () {object[property] = elem.value; saveChanges(object, property);};\n\t}\n}", "title": "" }, { "docid": "f6fab927855dd0c34e2bd41a13d927be", "score": "0.53085923", "text": "set prop1( value ) {\n }", "title": "" }, { "docid": "c7e807528c7778d592860d1a4075a7f8", "score": "0.5307876", "text": "update(_changedProperties){if(this._reflectingProperties!==undefined&&this._reflectingProperties.size>0){// Use forEach so this works even if for/of loops are compiled to for\n// loops expecting arrays\nthis._reflectingProperties.forEach((v,k)=>this._propertyToAttribute(k,this[k],v));this._reflectingProperties=undefined;}}", "title": "" }, { "docid": "428869561a87ed08b6abd6d786276016", "score": "0.5286874", "text": "_requestUpdate(name, oldValue) {\n let shouldRequestUpdate = true;\n // If we have a property key, perform property update steps.\n if (name !== undefined) {\n const ctor = this.constructor;\n const options = ctor.getPropertyOptions(name);\n if (ctor._valueHasChanged(this[name], oldValue, options.hasChanged)) {\n if (!this._changedProperties.has(name)) {\n this._changedProperties.set(name, oldValue);\n }\n // Add to reflecting properties set.\n // Note, it's important that every change has a chance to add the\n // property to `_reflectingProperties`. This ensures setting\n // attribute + property reflects correctly.\n if (options.reflect === true &&\n !(this._updateState & STATE_IS_REFLECTING_TO_PROPERTY)) {\n if (this._reflectingProperties === undefined) {\n this._reflectingProperties = new Map();\n }\n this._reflectingProperties.set(name, options);\n }\n }\n else {\n // Abort the request if the property should not be considered changed.\n shouldRequestUpdate = false;\n }\n }\n if (!this._hasRequestedUpdate && shouldRequestUpdate) {\n this._updatePromise = this._enqueueUpdate();\n }\n }", "title": "" }, { "docid": "540ec5dc451a46dea79edf31d345716c", "score": "0.5286202", "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' &&\r\n el.tagName !== 'PROGRESS' &&\r\n // custom elements may use _value internally\r\n !el.tagName.includes('-')) {\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 // #4956: always set for OPTION elements because its value falls back to\r\n // textContent if no value attribute is present. And setting .value for\r\n // OPTION has no side effect\r\n el.tagName === 'OPTION') {\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 (type === 'boolean') {\r\n // e.g. <select multiple> compiles to { multiple: '' }\r\n el[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value);\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 // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error\r\n try {\r\n el[key] = 0;\r\n }\r\n catch (_a) { }\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 ((true)) {\r\n (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop \"${key}\" on <${el.tagName.toLowerCase()}>: ` +\r\n `value ${value} is invalid.`, e);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "b69323803745476f4de59b337d162582", "score": "0.5267947", "text": "set NameProperty(value)\n {\n this.Name= value;\n }", "title": "" }, { "docid": "bf3785197d4aafebbbb7a3e98490c339", "score": "0.5264914", "text": "function updateInputElement(value) {\n ngModel.$setViewValue(value);\n ngModel.$render();\n }", "title": "" }, { "docid": "373b31d251869129604dd9d35389edb5", "score": "0.5250696", "text": "onPropertyChanged(newProp, oldProp) {\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'width':\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"setStyleAttribute\"])(this.element, { 'width': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"formatUnit\"])(newProp.width) });\n break;\n case 'height':\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"setStyleAttribute\"])(this.element, { 'height': Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"formatUnit\"])(newProp.height) });\n break;\n case 'zIndex':\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"setStyleAttribute\"])(this.element, { 'zIndex': newProp.zIndex });\n break;\n case 'enableRtl':\n this.setEnableRtl();\n break;\n case 'position':\n case 'relateTo':\n this.refreshPosition();\n break;\n case 'offsetX':\n let x = newProp.offsetX - oldProp.offsetX;\n this.element.style.left = (parseInt(this.element.style.left, 10) + (x)).toString() + 'px';\n break;\n case 'offsetY':\n let y = newProp.offsetY - oldProp.offsetY;\n this.element.style.top = (parseInt(this.element.style.top, 10) + (y)).toString() + 'px';\n break;\n case 'content':\n this.setContent();\n break;\n case 'actionOnScroll':\n if (newProp.actionOnScroll !== 'none') {\n this.wireScrollEvents();\n }\n else {\n this.unwireScrollEvents();\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "3c78b19150aa3d4482a42eef292f3bcc", "score": "0.5249271", "text": "updated(changedProperties) {\n changedProperties.forEach((oldValue, propName) => {\n if ([\"text\", \"delay\", \"elementVisible\"].includes(propName)) {\n this._observeText(this.text, this.delay, this.elementVisible);\n }\n });\n }", "title": "" }, { "docid": "9a42e65348f92e5f7bad2f3097758c93", "score": "0.5248883", "text": "function propertyChangeHandler(scope, element, key, newVal, oldVal) {\n var dataSet = scope.dataset || scope.scopedataset,\n isBoundToServiceVariable;\n /*Checking if widget is bound to service variable*/\n if (CONSTANTS.isStudioMode && scope.binddataset) {\n isBoundToServiceVariable = _.startsWith(scope.binddataset, 'bind:Variables.') && FormWidgetUtils.getBoundVariableCategory(scope) === \"wm.ServiceVariable\";\n }\n /*Monitoring changes for properties and accordingly handling respective changes.*/\n switch (key) {\n case 'dataset':\n /*Displaying no data message when bound to service variable in studio mode*/\n if (isBoundToServiceVariable && CONSTANTS.isStudioMode) {\n FormWidgetUtils.appendMessage(element);\n } else {\n /*generating the radioset based on the values provided*/\n constructRadioSet(scope, element, newVal);\n }\n break;\n case 'displayfield':\n case 'datafield':\n case 'usekeys':\n case 'orderby':\n if (CONSTANTS.isRunMode || !isBoundToServiceVariable) {\n /*generating the radioset based on the values provided*/\n constructRadioSet(scope, element, dataSet);\n }\n break;\n case 'selectedvalue':\n /*generating the radioset based on the values provided*/\n dataSet = FormWidgetUtils.getParsedDataSet(dataSet, scope, element);\n assignModelValue(scope, dataSet);\n break;\n case 'disabled':\n element.find('input[type=\"radio\"]').attr('disabled', newVal);\n break;\n case 'layout':\n element.removeClass(oldVal).addClass(newVal);\n break;\n }\n }", "title": "" }, { "docid": "40aad9e0b885c5f2a76102423615a102", "score": "0.5239589", "text": "componentUpdated(el, binding, vnode, oldVnode) {}", "title": "" }, { "docid": "a5468e787c830beb1d5a39e3e9266d68", "score": "0.52355933", "text": "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "title": "" }, { "docid": "a5468e787c830beb1d5a39e3e9266d68", "score": "0.52355933", "text": "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "title": "" }, { "docid": "a5468e787c830beb1d5a39e3e9266d68", "score": "0.52355933", "text": "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "title": "" }, { "docid": "a5468e787c830beb1d5a39e3e9266d68", "score": "0.52355933", "text": "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "title": "" }, { "docid": "a5468e787c830beb1d5a39e3e9266d68", "score": "0.52355933", "text": "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "title": "" }, { "docid": "a5468e787c830beb1d5a39e3e9266d68", "score": "0.52355933", "text": "function patchProperty(obj, prop, value) {\r\n obj[prop] = value;\r\n}", "title": "" }, { "docid": "d4ba71e2c8d86b7110a81a677a973717", "score": "0.5235216", "text": "onPropertyChanged(newProp, oldProp) {\n let wrapper = this.getWrapper();\n for (let prop of Object.keys(newProp)) {\n switch (prop) {\n case 'checked':\n this.indeterminate = false;\n this.element.indeterminate = false;\n this.changeState(newProp.checked ? 'check' : 'uncheck');\n break;\n case 'indeterminate':\n if (newProp.indeterminate) {\n this.changeState();\n }\n else {\n this.element.indeterminate = false;\n this.changeState(this.checked ? 'check' : 'uncheck');\n }\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.wrapper = this.getWrapper();\n this.unWireEvents();\n }\n else {\n this.element.disabled = false;\n wrapper.classList.remove(DISABLED);\n wrapper.setAttribute('aria-disabled', 'false');\n this.wireEvents();\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"removeClass\"])([wrapper], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"addClass\"])([wrapper], newProp.cssClass.split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n wrapper.classList.add(RTL);\n }\n else {\n wrapper.classList.remove(RTL);\n }\n break;\n case 'label':\n this.setText(newProp.label);\n break;\n case 'labelPosition':\n let label = wrapper.getElementsByClassName(LABEL)[0];\n let labelWrap = wrapper.getElementsByTagName('label')[0];\n Object(_syncfusion_ej2_base__WEBPACK_IMPORTED_MODULE_0__[\"detach\"])(label);\n if (newProp.labelPosition === 'After') {\n labelWrap.appendChild(label);\n }\n else {\n labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);\n }\n break;\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'value':\n if (this.isVue && typeof newProp.value === 'object') {\n break;\n }\n this.element.setAttribute('value', newProp.value);\n break;\n case 'htmlAttributes':\n this.updateHtmlAttributeToWrapper();\n break;\n }\n }\n }", "title": "" }, { "docid": "5aec795c197d4339605e92d186e4b949", "score": "0.5233497", "text": "static UpdateInputAttribute(caller, attribute, value) {\n caller.updateComplete.then(() => {\n if (!caller._theInputElement) {\n // eslint-disable-next-line no-param-reassign\n caller._theInputElement = caller.shadowRoot.getElementById('input');\n }\n if (value !== null) {\n caller._theInputElement.setAttribute(attribute, value);\n } else {\n // remove the attribute on null value\n caller._theInputElement.removeAttribute(attribute);\n }\n caller.dispatchEvent(\n new CustomEvent('input-attr-updated', {\n detail: value,\n bubbles: true,\n composed: true,\n }),\n );\n });\n }", "title": "" }, { "docid": "c30c6d698bdf5af1d2d91e34a221b60b", "score": "0.5227706", "text": "function component_prop(value) {\n /*jshint validthis: true */\n if (arguments.length === 0)\n return this._componentProps[propertyName];\n this._componentProps[propertyName] = value;\n return this;\n }", "title": "" }, { "docid": "2112bea4967e2a85a78be0484ed8a9b3", "score": "0.5208203", "text": "function updateElementValue(element, attr, value) {\n element.prop('value', value);\n attr.$set('value', value);\n }", "title": "" }, { "docid": "2112bea4967e2a85a78be0484ed8a9b3", "score": "0.5208203", "text": "function updateElementValue(element, attr, value) {\n element.prop('value', value);\n attr.$set('value', value);\n }", "title": "" }, { "docid": "2112bea4967e2a85a78be0484ed8a9b3", "score": "0.5208203", "text": "function updateElementValue(element, attr, value) {\n element.prop('value', value);\n attr.$set('value', value);\n }", "title": "" } ]
c2d90b9ad4c4c1017c539017c0d49b59
add test to queue; return generated Calper object Usage: test(name, function[, arguments][, context][, type])
[ { "docid": "4c3cec07ecfa4ece2343cf530e8c3d6b", "score": "0.72420764", "text": "function test(){\r\n\tvar parg = slice.call(arguments),\r\n\t\tname = parg.shift(),\r\n\t\tfunc = parg.shift(),\r\n\t\targs = (parg[0] && parg[0].join) ? parg.shift().slice(0) : [],\r\n\t\tcntx = (typeof parg[0] == 'object') ? parg.shift() : window,\r\n\t\ttype = (typeof parg[0] == 'string') ? parg.shift() : 'outer',\r\n\t\tncalper = new Calper(name, func, args, cntx, type);\t// create new test object\r\n\tobjQueue.push(ncalper);\t// push test object to queue\r\n\treturn ncalper;\t\t\t// return newly created object\r\n}", "title": "" } ]
[ { "docid": "945becf2a12b898a997592fe070dea44", "score": "0.61474013", "text": "test(name, test) {\n this._tests.set(test, name);\n return this;\n }", "title": "" }, { "docid": "6d000829d1911768e92cd636a5b88daa", "score": "0.6005891", "text": "function addTest(func, context, args, returnValue) {\n testRunner.testCases.push(new TestCase(func, context, args, returnValue));\n}", "title": "" }, { "docid": "98b35d87d6c655d57bfdf8c1ded4b0cd", "score": "0.5983329", "text": "function Calper(name, func, args, cntx, type){\r\n\tvar ts = this;\t\t// useful for compression\r\n\t\r\n\t// passed opts\r\n\tts.name = name;\t\t// test name\r\n\tts.func = func;\t\t// function to test\r\n\tts.args = args;\t\t// arguments to pass to function\r\n\tts.cntx = cntx;\t\t// context of 'this'\r\n\tts.type = type;\t\t// 'inner', 'outer' or 'async'\r\n\r\n\t// globals opts\r\n\tts.cint = config.cint;\t\t\t// confidence interval\r\n\tts.idelay = config.idelay;\t\t// delay between tests\r\n\tts.rtime = config.rtime;\t\t// target runtime for tests\r\n\tts.cloop = rCint(config.cint);\t// runs remaining\r\n\r\n\t// generated later\r\n\tts.results = null;\t// statistical results from completed tests\r\n\tts.cal = [];\t// runtime data in itterations/ms\r\n\tts.raw = [];\t// raw data\r\n\r\n\t/**\r\n\t * run single test and return results */\r\n\tts.run = function(){\r\n\t\t\r\n\t\t// initialization\r\n\t\tCalper.testStart(ts);\r\n\t\tgenItter(ts.func, ts.args, ts.cntx, ts.rtime, ts.type, function(itter){\r\n\t\t\tts.itter = itter;\r\n\t\t\t\r\n\t\t\t// reassign ts.run() after finishing initialization\r\n\t\t\tts.run = function(){\r\n\t\t\t\ttestItter(ts.func, ts.args, ts.cntx, ts.itter, ts.type, function(time){\r\n\t\t\t\t\tts.raw.push(time);\t// push raw runtime\r\n\t\t\t\t\tts.cal.push(ts.itter / time * 1000);\t// push converted time\r\n\t\t\t\t\tts.cloop--;\t// decrement loop count;\r\n\t\t\t\t\tstart();\t// run next test\r\n\t\t\t\t});\r\n\t\t\t\treturn ts;\r\n\t\t\t};\r\n\t\t\tstart();\t// run next test\r\n\t\t});\r\n\t\treturn ts;\r\n\t};\r\n\r\n\treturn ts;\r\n}", "title": "" }, { "docid": "12a6ca8ac9beb65fb65ea213c0bc908e", "score": "0.58848536", "text": "ADD_TEST(state, test) {\n state.tests.push(test);\n }", "title": "" }, { "docid": "1b52d8662342a0e7ed5a24ccf13f328a", "score": "0.58237946", "text": "function run() {\n var test = new Test(testInput);\n test.runTest();\n}", "title": "" }, { "docid": "b908933eb19104c4df2399434ed6bd1a", "score": "0.5760684", "text": "function runTestCase(){\n \tthis.test = new Array();\n this.testFunction();\n }", "title": "" }, { "docid": "d25d0698480f7963c4d042bd0beebc59", "score": "0.57015234", "text": "function TestSuiteRunner() {\n var start = function () {};\n\n var dispatch = function (msg) {\n console.log(\"Receiving message \" + msg);\n };\n\n return {\n start: start,\n dispatch: dispatch,\n handler: {}\n };\n}", "title": "" }, { "docid": "d0c00a2a381b28a86d5f742e897fc4d6", "score": "0.5633031", "text": "test(...args) {\n let opts;\n if (args.length === 1) {\n if (typeof args[0] === \"function\") {\n opts = {\n test: args[0]\n };\n } else {\n opts = args[0];\n }\n } else if (args.length === 2) {\n opts = {\n name: args[0],\n test: args[1]\n };\n } else {\n opts = {\n name: args[0],\n message: args[1],\n test: args[2]\n };\n }\n if (opts.message === void 0)\n opts.message = mixed.default;\n if (typeof opts.test !== \"function\")\n throw new TypeError(\"`test` is a required parameters\");\n let next = this.clone();\n let validate3 = createValidation(opts);\n let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n if (opts.exclusive) {\n if (!opts.name)\n throw new TypeError(\"Exclusive tests must provide a unique `name` identifying the test\");\n }\n if (opts.name)\n next.exclusiveTests[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter((fn2) => {\n if (fn2.OPTIONS.name === opts.name) {\n if (isExclusive)\n return false;\n if (fn2.OPTIONS.test === validate3.OPTIONS.test)\n return false;\n }\n return true;\n });\n next.tests.push(validate3);\n return next;\n }", "title": "" }, { "docid": "bba8e2c478f31f690e3b1bf8a23d880e", "score": "0.5615267", "text": "add(name, func) {\n node_opcua_assert_1.assert(_.isFunction(func));\n this.suites[name] = {\n functor: func,\n name: name,\n };\n return this;\n }", "title": "" }, { "docid": "be72ab57bffe95fff24d8f9fadc17237", "score": "0.56133616", "text": "add(priority, id, func1, func2) {\n if (typeof priority === 'string') {\n func2 = func1;\n func1 = id;\n id = priority;\n priority = 0;\n }\n\n assert(id);\n assert(typeof func1 === 'function');\n\n let initFunc = null;\n let testFunc = func1;\n if (typeof func2 === 'function') {\n initFunc = func1;\n testFunc = func2;\n }\n\n assert(!this.tests[id], 'tests need unique id strings');\n this.tests[id] = {id, priority, initFunc, testFunc, opts: this.opts};\n return this;\n }", "title": "" }, { "docid": "53fcb9ffe3e8cc04a49e31218b628215", "score": "0.55776954", "text": "get test() { return this._run('test'); }", "title": "" }, { "docid": "3551edb2fa99cf1812ab97db252fcaa6", "score": "0.55594313", "text": "function addToQueue(cb, params, context) {\n if (context == undefined) {\n context = this;\n }\n funqueue.push(wrapFunction(cb, context, params));\n}", "title": "" }, { "docid": "8d263cf87202959c0312492a67cc9a86", "score": "0.5545813", "text": "function TestCollection () {}", "title": "" }, { "docid": "cd54bcc0329e87e5154d83bb3705050a", "score": "0.54878104", "text": "function cd(){//the callb ack function pushed into queue once check the stack is empty the function will execute\n\t\t\tconsole.log(\"test case1 is pushed in queue\");\n\t\t}", "title": "" }, { "docid": "b0d779f96c2e169ef6d7650386d0c8bb", "score": "0.5471119", "text": "function runNextTest() {\n var tdomain = Domain.create();\n var test = tests.shift();\n if(!test) {\n console.log(\"Finished tests for \"+process.argv[1]);\n complete(null);\n }\n var name = test.name || test.test.name;\n if(specified_tests && specified_tests.indexOf(name) < 0) {\n console.log(\"specified_tests: \"+specified_tests.length);\n console.log(\"Skipping \"+name);\n return runNextTest();\n }\n tdomain.on('error', function(err) {\n console.log(\"*** Test \"+test.name+\" failed\");\n console.log(err.message);\n console.log(err.stack);\n runNextTest();\n });\n tdomain.run(function() {\n var timeout = default_timeout;\n if(test instanceof Function) {\n test = test; \n } else if (test instanceof Object && test.hasOwnProperty('test')) {\n if(test.hasOwnProperty(\"timeout\")) {\n timeout = test.timeout; \n }\n test = test.test;\n } else {\n assert('Test entries should be functions, or objects with a field called \"test\" that is a function');\n }\n console.log(\"--- Starting test \"+test.name+(timeout?\" (Times out in \"+timeout+\")\":\"\"));\n\n var timeout_id;\n beforeeach(function() {\n test(function() {\n clearTimeout(timeout_id);\n console.log(\" Test \\\"\"+test.name+\"\\\" passed\");\n process.nextTick(runNextTest);\n });\n });\n timeout_id = setTimeout(function() {\n assert(false, test.name+\" timed out!\");\n }, timeout);\n tdomain.add(timeout_id);\n });\n }", "title": "" }, { "docid": "ee56202fc7dc1b35c2593a242a56d7bd", "score": "0.5444577", "text": "function handleTestNext(){\n\n}", "title": "" }, { "docid": "0e841145531c777ebc9b59a9d66ca26e", "score": "0.5436201", "text": "function TestRunner() {\n this.queue = [];\n this.activeTest = null;\n $('keyboard').addKeysetChangedObserver(this.scheduleCheckQueue.bind(this));\n}", "title": "" }, { "docid": "9eaab41fe3304534eca5cb8f71045d22", "score": "0.54274887", "text": "test() {\n //\n }", "title": "" }, { "docid": "5ab22fdfbd702c14aceb390e105ffcb9", "score": "0.54224277", "text": "function queueMe(response) {\r\n print(\"Defined function called: \" + response + \"\\n\");\r\n}", "title": "" }, { "docid": "c9f74583408056dbbb6cdae789ba8500", "score": "0.54071474", "text": "function TCQueue() {}", "title": "" }, { "docid": "e744a6beb12508c5d0637fe97b4175d0", "score": "0.5374098", "text": "function createChainableTest(testFunction) {\n var testFn = function(client) {\n var client = this.setClient(client);\n\n // testFunction(this, client);\n testFunction(client);\n\n return this;\n };\n\n return testFn;\n}", "title": "" }, { "docid": "68d9cb68d7c63b2d9bb8529c6f906c85", "score": "0.536997", "text": "function test(test_name, run_function)\n{\n\tif(test_name==null || test_name==\"\")\n\t{\n\t\tthrow \"Test cannot be specified with no name\";\n\t}\n\n\tif(run_function==null || run_function==0)\n\t{\n\t\tthrow \"Test cannot be specified with no run_function\";\n\t}\n\n\t/* This contains the set up done before each test\n\t*/\n\tthis.set_up=function()\n\t{\n\t\tsession.memory.loadProgram(\"../msp430f2013/quicksort/Debug/quicksort.out\");\n\t}\n\t\n\t/* The test itself is specified as a parameter (i.e. run_function)\n\t*/\n\tthis.run=run_function;\n\t\n\t/* This contains the tear down done after each test\n\t*/\n\tthis.tear_down=function()\n\t{\n\t\tsession.breakpoint.removeAll();\n\t}\n\t\n\t/* Provide a way of getting the test name\n\t*/\n\tthis.toString=function()\n\t{\n\t\treturn test_name;\n\t}\n\t\n\tthis.init=function()\n\t{\n\t\t/* Try to set up\n\t\t*/\n\t\ttry\n\t\t{\n\t\t\tthis.set_up();\n\t\t} catch(exception)\n\t\t{\n\t\t\tenv.traceWrite(\"SET UP FAILURE: \" +this.toString());\n\t\t}\n\t\t\n\t\t/* Try to run the test\n\t\t*/\n\t\ttry\n\t\t{\n\t\t\tthis.run();\n\t\t\tenv.traceWrite(\"PASS: \" +this.toString());\n\t\t} catch(exception)\n\t\t{\n\t\t\tenv.traceWrite(\"FAILURE: \" +this.toString());\n\t\t}\n\t\t\n\t\t/* Try to tear down\n\t\t*/\n\t\ttry\n\t\t{\n\t\t\tthis.tear_down();\n\t\t} catch(exception)\n\t\t{\n\t\t\tenv.traceWrite(\"TEAR DOWN FAILURE: \" +this.toString());\n\t\t}\n\t}\n\t\n\t/* Call init to set up, run, and tear down\n\t*/\n\tthis.init();\n}", "title": "" }, { "docid": "e1792e6679fb44b7662345fe9f2379e2", "score": "0.5355699", "text": "function createQueue() {\r\n return {\r\n _timer: null,\r\n _queue: [],\r\n // fn: the function to be called\r\n // \r\n add: function (fn, context, time) {\r\n var setTimer = function (time, self) {\r\n self._timer = setTimeout(function () {\r\n time = self.add();\r\n if (self._queue.length) {\r\n setTimer(time, self);\r\n }\r\n }, time || 2);\r\n };\r\n\r\n if (fn) {\r\n this._queue.push([fn, context, time]);\r\n if (this._queue.length === 1) {\r\n setTimer(time, this);\r\n }\r\n return;\r\n }\r\n\r\n var next = this._queue.shift();\r\n if (!next) {\r\n return 0;\r\n }\r\n next[0].call(next[1] || window);\r\n return next[2];\r\n },\r\n clear: function () {\r\n clearTimeout(this._timer);\r\n this._queue = [];\r\n },\r\n isEmpty: function () {\r\n return (this._queue.length === 0);\r\n }\r\n };\r\n }", "title": "" }, { "docid": "0c0439ddce571b276b1f19fef3712b4a", "score": "0.53468615", "text": "function entry_test(func, description) {\n const test = async_test(description);\n tests.push(test.step_func((entry, item) => func(test, entry, item)));\n}", "title": "" }, { "docid": "ba94b94a0bf7582f282688a003e955e1", "score": "0.5342856", "text": "function testcont(){\n console.log(\"testing cont\");\n let test_queue = [\n \"room:create_room/apoa\",\n \"room:create_room/dbeu\",\n \"room:create_room/comal\"];\n let results = [];\n \n cont_req(test_queue,results);\n console.log(results);\n}", "title": "" }, { "docid": "4e2ede5d4300aaf6998cfe301e49aa96", "score": "0.5306573", "text": "function runTest() {\n return exports.handler(test_input, null, function(err, result) {\n if (err) console.error(err);\n else console.output(result);\n });\n}", "title": "" }, { "docid": "281b0a8a3f07b3e1206007c877efe52f", "score": "0.529473", "text": "registerTests () {\n this.assignHooks()\n\n this.test.classMethods()\n .filter(method => this.test.includes(method))\n .forEach(methodName => this.createTest(methodName))\n }", "title": "" }, { "docid": "2126ec4957268d228596e62a8a30084a", "score": "0.5285781", "text": "setupTests () {\n const {\n runners,\n allTestFns,\n localTestFns,\n sauceTestFns,\n } = this\n\n this.getTestContexts().forEach((context) => {\n const runner = new RunTestWithRetry(context, this.eventsEmitter)\n runners.push(runner)\n\n const testArray = context.mode === 'sauce' ? sauceTestFns : localTestFns\n\n testArray.push(testFn)\n allTestFns.push(testFn)\n\n async function testFn () {\n debug('starting %s', context.test.id)\n const result = await runner.exec()\n debug('finished %s', context.test.id)\n return result\n }\n })\n }", "title": "" }, { "docid": "f1d3cb6af2b37165a706cfde2214a70b", "score": "0.5244501", "text": "add(type, callback) {\n let benchmark = (this.benchmarks[type] = new Benchmark());\n\n return function(...args) {\n benchmark.before();\n let ret = callback.call(this, ...args);\n benchmark.after();\n return ret;\n };\n }", "title": "" }, { "docid": "3b68f0c298be8b6aae5e718b596e5e19", "score": "0.5194458", "text": "function buildTest(steps, last) {\n \n if (!last) {\n last = function() { currentStep = steps.length + 1; completed = true; };\n harness.registerTestFunction(last);\n }\n \n if (steps.length == 0) {\n // Write the initialization of the test\n return function() {\n completed = false;\n currentStep = 0;\n last();\n };\n }\n \n var step = steps.pop();\n var test = null;\n var invoke;\n \n if (!harness.getDebugMode()) {\n invoke = safeInvoke;\n }\n else {\n invoke = debugInvoke;\n }\n \n switch (step.Type)\n {\n case StepType.Sync :\n // AddStep(Action)\n test = function() {\n if (!completed) {\n harness.registerOnResumeFunction(last);\n currentStep = steps.length + 1;\n invoke(step.Action);\n last();\n }\n };\n break;\n case StepType.AsyncWait :\n // AddStep(Action, WaitDuration, Verification)\n test = function() {\n if (!completed) {\n harness.registerOnResumeFunction(last);\n currentStep = steps.length + 1;\n invoke(step.Action);\n var f = function() {\n if (!completed) {\n invoke(step.Verification);\n last();\n }\n };\n window.setTimeout(f, step.WaitDuration);\n }\n };\n break;\n case StepType.AsyncCheck :\n // AddStep(Action, CheckComplete, Interval, Timeout, Verification)\n test = function() {\n if (!completed) {\n harness.registerOnResumeFunction(last);\n currentStep = steps.length + 1;\n invoke(step.Action);\n var remaining = step.Timeout;\n var f = function() {\n remaining -= step.Interval;\n if (!invoke(step.CheckComplete) && remaining > 0) {\n if (!completed) {\n window.setTimeout(f, step.Interval);\n }\n return;\n } else if (remaining <= 0) {\n fail('Timeout exceeded');\n }\n if (!completed) {\n invoke(step.Verification);\n last();\n }\n };\n window.setTimeout(f, step.Interval);\n }\n };\n break;\n case StepType.PostBack :\n if (step.Element) {\n test = function() {\n if (!completed) {\n harness.registerOnResumeFunction(last);\n currentStep = steps.length + 1;\n if (step.Element.click) {\n // calling safeInvoke here would blow up Firefox\n step.Element.click();\n } else if (step.Element.submit) {\n // calling safeInvoke here would blow up Firefox\n step.Element.submit();\n } else if (window && window.forms &&\n window.forms[0] && window.forms[0].submit) {\n // calling safeInvoke here would blow up Firefox\n window.forms[0].submit();\n } else {\n fail('Unable to force a postback');\n }\n }\n };\n } else {\n test = function() {\n if (!completed) {\n harness.registerOnResumeFunction(last);\n currentStep = steps.length + 1;\n if (window && window.forms &&\n window.forms[0] && window.forms[0].submit) {\n // calling safeInvoke here would blow up Firefox\n window.forms[0].submit();\n } else {\n fail('Unable to force a postback');\n }\n }\n };\n }\n break;\n default :\n test = last;\n break;\n }\n \n if (test != last) {\n harness.registerTestFunction(test);\n }\n \n return buildTest(steps, test);\n }", "title": "" }, { "docid": "c8bc045f3972fa898a6c9f8637aa5ba5", "score": "0.51857334", "text": "function enqueue() {\n queue.push(bench.clone({\n '_original': bench,\n 'events': {\n 'abort': [update],\n 'cycle': [update],\n 'error': [update],\n 'start': [update]\n }\n }));\n }", "title": "" }, { "docid": "e51e44dc6c3ce15544fba787d497504e", "score": "0.51829505", "text": "function test() {\n var t = new Ut_valid();\n t.run();\n}", "title": "" }, { "docid": "82ca19147185e6721e7f645c7fa47fa7", "score": "0.5165296", "text": "function SmokeTest(parameters, completeCallback) {\n\n const TestOptions = {\n duration: parameters.duration,\n sampleRate: parameters.sampleRate,\n bufferLength: parameters.bufferLength,\n bufferChannelCount: 2,\n };\n\n const ConsumerOptions = {\n label: 'consumer',\n blockLength: parameters.pullBlockLength,\n sampleRate: TestOptions.sampleRate,\n };\n\n const ProducerOptions = {\n label: 'producer',\n blockLength: parameters.pushBlockLength,\n sampleRate: TestOptions.sampleRate,\n };\n\n const T = new Tracer();\n const Consumer = new Worker('smoke-test/smoke-test-agent.js');\n const Producer = new Worker('smoke-test/smoke-test-agent.js');\n const SharedBuffer = FreeQueue.createSharedBuffer(\n TestOptions.bufferLength, TestOptions.bufferChannelCount);\n\n function initializeTest() {\n T.trace1('test-start');\n Consumer.onmessage = (event) => {\n Consumer.state = event.data.state;\n handleAgentEvent(event);\n };\n Producer.onmessage = (event) => {\n Producer.state = event.data.state;\n handleAgentEvent(event);\n };\n Consumer.postMessage({\n command: 'initialize',\n payload: {sharedBuffer: SharedBuffer, options: ConsumerOptions}});\n Producer.postMessage({\n command: 'initialize',\n payload: {sharedBuffer: SharedBuffer, options: ProducerOptions}});\n }\n\n function startAgents() {\n Consumer.postMessage({command: 'start'});\n Producer.postMessage({command: 'start'});\n }\n\n function stopAgents() {\n Consumer.postMessage({command: 'stop'});\n Producer.postMessage({command: 'stop'});\n }\n\n function prepareTestResult() {\n const result = {};\n result.testDuration =\n T.getRecord('test-end')[0][2] - T.getRecord('test-start')[0][2];\n result.pullSuccess = T.getRecord('consumer-success').length;\n result.pullFail = T.getRecord('consumer-fail').length;\n result.pullSuccessRate =\n result.pullSuccess / (result.pullSuccess + result.pullFail) * 100;\n result.pushSuccess = T.getRecord('producer-success').length;\n result.pushFail = T.getRecord('producer-fail').length;\n result.pushSuccessRate =\n result.pushSuccess / (result.pushSuccess + result.pushFail) * 100;\n result.pushInterval = ProducerOptions.blockLength / TestOptions.sampleRate;\n result.pullInterval = ConsumerOptions.blockLength / TestOptions.sampleRate;\n result.pushStats = Tracer.getStat(T.getRecord('producer-interval'), 1);\n result.pullStats = Tracer.getStat(T.getRecord('consumer-interval'), 1);\n return result;\n }\n\n function handleAgentEvent(event) {\n switch (event.data.state) {\n case 'ready':\n if (Consumer.state === 'ready' && Producer.state === 'ready') {\n startAgents();\n setTimeout(stopAgents, TestOptions.duration);\n }\n break;\n case 'stopped':\n T.mergeRecords(event.data.payload);\n if (Consumer.state === 'stopped' && Producer.state === 'stopped') {\n T.trace1('test-end');\n Consumer.terminate();\n Producer.terminate();\n completeCallback(prepareTestResult());\n }\n break;\n default:\n console.error('NOTREACHED');\n break;\n }\n }\n\n initializeTest();\n}", "title": "" }, { "docid": "4c2cd51eccdb07307bece2644966a22d", "score": "0.51644665", "text": "add(job) {\n this.jobs.push(job);\n this[kRun]();\n }", "title": "" }, { "docid": "35ed04991387db56593b74baaf62cbb5", "score": "0.5161648", "text": "function sendTestEvent(testEvent, testEventType, copilotCb, managerCb) {\n copilotCallback = copilotCb;\n managerCallback = managerCb;\n correlationId += 1;\n\n sourceExchange.publish(testEvent, {\n key: testEventType,\n correlationId: correlationId.toString(),\n });\n }", "title": "" }, { "docid": "08d538d41db6dc41c88df46026ed1ac3", "score": "0.51613003", "text": "function getTest1() {}", "title": "" }, { "docid": "1823f1663c3e4b9b902eab7acba6e127", "score": "0.51304626", "text": "function callFactory(test) {\n return call\n\n function call(node) {\n return element$1(node) && Boolean(test.apply(this, arguments))\n }\n}", "title": "" }, { "docid": "3c718a200afcf06f8df022b312b634b2", "score": "0.51114774", "text": "function Queue() {}", "title": "" }, { "docid": "027de9a81799e7e5b0849311acd99dac", "score": "0.5107763", "text": "async function testFn () {\n const counts = []\n const tom = new Tom('one', () => {\n counts.push('one')\n })\n\n const runner = new TestRunner(tom)\n await runner.start()\n a.deepEqual(counts, ['one'])\n a.equal(tom.state, 'pass')\n }", "title": "" }, { "docid": "6f4aa4365789c750126954146fddbffa", "score": "0.51015013", "text": "function test() { }", "title": "" }, { "docid": "0dca16fa3bdfc81bda4d5f020bd2ff66", "score": "0.5089775", "text": "function runner(data, functs, name = \"Test\") {\n console.log(name);\n functs.forEach(element => {\n var result = element.funct(data);\n console.log(\" - \" + element.funct.name + \" result: \" + result + \", expected: \", element.exp);\n if (element.hasOwnProperty('exp')) {\n assert(result == element.exp)\n }\n });\n}", "title": "" }, { "docid": "31ac3faff81962e41732c8d8a06adcdc", "score": "0.50877434", "text": "async runTest(scope, test) {\n const start = new Date();\n\n await this.component.clearAsync();\n\n if (scope.beforeEach) { await scope.beforeEach.call(scope) };\n \n this.component.reRender();\n\n const { describeLabel, label, f } = test;\n const description = `${describeLabel}: ${label}`;\n\n // Run the test, console logging the result.\n try {\n await f.call(scope);\n const stop = new Date();\n const time = (stop - start) / 1000;\n\n let successMsg = `${description} ✅`;\n console.log(successMsg);\n\n this.results.push({\n describeLabel: describeLabel,\n description: description,\n message: successMsg,\n passed: true,\n time: time\n });\n\n if (!(this.reporter instanceof Function)\n && this.reporter.type == 'realtime' ) {\n const result = { message: successMsg, passed: true };\n this.reporter.send(result);\n }\n\n } catch (e) {\n const stop = new Date();\n const time = (stop - start) / 1000;\n \n let fullErrorMessage = `${description} ❌\\n ${e.message}`;\n console.warn(fullErrorMessage);\n\n this.results.push({\n describeLabel: describeLabel,\n description: description,\n message: fullErrorMessage,\n errorMessage: e.message,\n passed: false,\n time: time\n });\n\n if (!(this.reporter instanceof Function)\n && this.reporter.type == 'realtime' ) {\n const result = { message: fullErrorMessage, passed: false };\n this.reporter.send(result);\n }\n\n // Increase error count for reporting.\n this.errorCount += 1;\n }\n }", "title": "" }, { "docid": "04de5288ee7575bc44626eda3a6edf36", "score": "0.5085205", "text": "function test(test) {\n var attrs = {\n classname: test.parent.fullTitle()\n , name: test.title\n , time: (test.duration / 1000) || 0\n };\n\n if ('failed' == test.state) {\n var err = test.err;\n console.log(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + \"\\n\" + err.stack))));\n } else if (test.pending) {\n console.log(tag('testcase', attrs, false, tag('skipped', {}, true)));\n } else {\n console.log(tag('testcase', attrs, true) );\n }\n}", "title": "" }, { "docid": "c5311adbf2a2c43b6e5f1c4749952300", "score": "0.5084191", "text": "add( data ) {\n this._queue.push( data );\n }", "title": "" }, { "docid": "b2da8692ee8d3b7586c1a6f6dcd09ecb", "score": "0.50777775", "text": "function attachTestCases (error, res) {\n if (_.isFunction(fn)) {\n insert(fn, error, res);\n } else\n if (_.isFunction(data)) {\n insert(data, error, res); \n }\n }", "title": "" }, { "docid": "ac7044548f92c5b022cadad470c7ffa1", "score": "0.5073369", "text": "function addTestFn() {\n redisAdapter.setClientFunction('testFn', function (err, reply, callback) {\n const [host, port] = this.resolveHostAndPort();\n reply = reply || 456;\n if (err && !redisAdapter.isMovedError(err)) {\n console.error(`Intentionally failing testFn for host (${host}) & port (${port}) with error (${err})`);\n if (callback) callback(err);\n } else {\n console.log(`Intentionally succeeding testFn for host (${host}) & port (${port}) with reply (${JSON.stringify(reply)})`);\n if (callback) callback(null, reply);\n }\n });\n}", "title": "" }, { "docid": "621d6946f39ce6ddf88d637afea75d61", "score": "0.5067747", "text": "function enqueue() {\n queue.push(_.assign(bench.clone(), {\n '_original': bench,\n 'events': {\n 'abort': [update],\n 'cycle': [update],\n 'error': [update],\n 'start': [update]\n }\n }));\n }", "title": "" }, { "docid": "46c972e050c362a4c5a29b9c4171786b", "score": "0.50563407", "text": "function test_1(args, done) {\n var itemId = args.itemId;\n \n done(null, { message: itemId, output: 'message received and processed' });\n }", "title": "" }, { "docid": "bbcc4357f6d35febdd5ea18c216d9e7e", "score": "0.5055631", "text": "function test(){\n console.log('test function firing');\n}", "title": "" }, { "docid": "045a1663f79e18170170e549ddb8afb9", "score": "0.50548905", "text": "async function testFn () {\n const actuals = []\n const tom = new Tom()\n tom.test('one', async () => {\n await sleep(30)\n actuals.push(1)\n })\n tom.test('two', async () => {\n await sleep(15)\n actuals.push(1.1)\n })\n tom.test(async () => {\n await sleep(50)\n actuals.push(1.2)\n })\n tom.test(async () => {\n await sleep(10)\n actuals.push(2)\n })\n tom.test(async () => {\n await sleep(40)\n actuals.push(2.1)\n })\n tom.test(async () => {\n await sleep(60)\n actuals.push(2.2)\n })\n\n const runner = new TestRunner(tom)\n const results = await runner.start()\n a.deepEqual(actuals, [2, 1.1, 1, 2.1, 1.2, 2.2])\n }", "title": "" }, { "docid": "e71c38d188dc1f3808ee48adee2dae05", "score": "0.5032817", "text": "function testSuite (t) {\n return function tests (error, md) {\n\n t.test('nonsense', function (t) {\n // @TODO: refine or remove this test\n t.plan(3)\n // PREPARE\n var x = 1\n // TEST\n t.ok(x===1, 'yay')\n t.ok(x!==2, 'yay')\n t.doesNotThrow(function(){})\n // function logg (text) { return function (data) { console.log(text,': ',data) }}\n // md.on('put', logg('md:put'))\n // md.on('batch', logg('md:batch'))\n // DB.post({start:'',end:'~'},function (change){console.log('post DB')})\n // DB.on('put', logg('DB:put'))\n // DB.on('batch', logg('DB:batch'))\n // dbA.post({start:'',end:'~'},function (change){console.log('post dbA')})\n\n // dbA.put('/foobar/asdf', 'dbA:asdf')\n // DB.put('DB:asdf', 'DB:asdf')\n // md.put('md:asdf', 'md:asdf')\n })\n\n // t.test('@TODO', function (t) {\n //\n // }\n var write$ = createTestWritable('/')\n var dbt = TRACKER(md)\n var state$ = dbt.duplexable('foobar/') // @TODO: defaults\n // TEST DATA\n var testChunkread = { type: 'put', value: 'blerg', key: '/foobar/01' }\n var testChunkwrite = [\n { type: 'put', value: 'blerg 02', key: '/foobar/02' },\n { type: 'del', key: '/foobar/03' }\n ]\n // TEST GENERATOR\n state$.push(testChunkread)\n // CHECK RECEIVING UPDATES\n state$.pipe(write$) // READ\n // CHECK SENDING UPDATES - instad of .pipe(state$)\n state$.write(testChunkwrite) // WRITE\n ///////////////////////////////////////////////////////////////////////////\n var write$1 = createTestWritable('/test1')\n var dbt1 = dbt.sublevel('test1')\n var state1$ = dbt1.duplexable('bar/')\n // TEST DATA\n var testChunk1read = { type: 'put', value: 'blerg', key: '/bar/01' }\n var testChunk1write = [\n { type: 'put', value: 'blerg 02', key: '/bar/02' },\n { type: 'del', key: '/bar/03' }\n ]\n // TEST GENERATOR\n state1$.push(testChunk1read)\n // CHECK RECEIVING UPDATES\n state1$.pipe(write$1) // READ\n // CHECK SENDING UPDATES - instad of .pipe(state$)\n state1$.write(testChunk1write) // WRITE\n ///////////////////////////////////////////////////////////////////////////\n var write$2 = createTestWritable('/test2')\n var dbt2 = dbt.sublevel('test2')\n var state2$ = dbt2.duplexable('baz/')\n // TEST DATA\n var testChunk2read = { type: 'put', value: 'blerg', key: '/baz/01' }\n var testChunk2write = [\n { type: 'put', value: 'blerg 02', key: '/baz/02' },\n { type: 'del', key: '/baz/03' }\n ]\n // TEST GENERATOR\n state2$.push(testChunk2read)\n // CHECK RECEIVING UPDATES\n state2$.pipe(write$2) // READ\n // CHECK SENDING UPDATES - instad of .pipe(state$)\n state2$.write(testChunk2write) // WRITE\n ///////////////////////////////////////////////////////////////////////////\n var write$3 = createTestWritable('/doobidoo1')\n var dbt3 = dbt1.sublevel('doobidoo1')\n var state3$ = dbt3.duplexable('quux/')\n // TEST DATA\n var testChunk3read = { type: 'put', value: 'blerg', key: '/quux/01' }\n var testChunk3write = [\n { type: 'put', value: 'blerg 02', key: '/quux/02' },\n { type: 'del', key: '/quux/03' }\n ]\n // TEST GENERATOR\n state3$.push(testChunk3read)\n // CHECK RECEIVING UPDATES\n state3$.pipe(write$3) // READ\n // CHECK SENDING UPDATES - instad of .pipe(state$)\n state3$.write(testChunk3write) // WRITE\n ///////////////////////////////////////////////////////////////////////////\n var write$4 = createTestWritable('/doobidoo2')\n var dbt4 = dbt2.sublevel('doobidoo2')\n var state4$ = dbt4.duplexable('beep/')\n // TEST DATA\n var testChunk4read = { type: 'put', value: 'blerg', key: '/beep/01' }\n var testChunk4write = [\n { type: 'put', value: 'blerg 02', key: '/beep/02' },\n { type: 'del', key: '/beep/03' }\n ]\n // TEST GENERATOR\n state4$.push(testChunk4read)\n // CHECK RECEIVING UPDATES\n state4$.pipe(write$4) // READ\n // CHECK SENDING UPDATES - instad of .pipe(state$)\n state4$.write(testChunk4write) // WRITE\n state4$.write(testChunk4write) // WRITE\n state4$.write(testChunk4write) // WRITE\n state4$.write(testChunk4write) // WRITE\n\n // @TODO: test some normal .put, .del, .... on all sublevels\n\n // var ops = [ // make from 'chunk'\n // // defaults to type:'put'\n // // key' of null or undefined will callback(error)\n // { type: 'del', key: 'father'/*, value: 'is ignored'*/ },\n // // type:put, value of null or undefined will callback(error)\n // { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' },\n // { type: 'put', key: 'dob', value: '16 February 1941' },\n // { type: 'put', key: 'spouse', value: 'Kim Young-sook' },\n // { type: 'put', key: 'occupation', value: 'Clown' }\n // ]\n // state5$.write(ops)\n // state5$.on('error', function (err, meeeh) {\n // if (err) return console.log('Ooops!', err)\n // console.log('end batch: ', meeeh)\n // })\n\n\n // var generate = populate(md, 200)\n // generate(dbt, [\n // { prefix: '/bar/', interval: 5 },\n // { prefix: '/foobar/', interval: 25 },\n // { prefix: '/beep', interval: 48 }\n // ])\n // generate(dbt1, [\n // { prefix: '/baz/', interval: 5 },\n // { prefix: '/bar/', interval: 25 },\n // { prefix: 'dbt1', interval: 48 }\n // ])\n // generate(dbt2, [\n // { prefix: '/baz/', interval: 5 },\n // { prefix: '/bar/', interval: 25 },\n // { prefix: 'dbt2', interval: 48 }\n // ])\n // generate(dbt3, [\n // { prefix: '/quux/', interval: 5 },\n // { prefix: '/beep/', interval: 25 },\n // { prefix: '/dbt3', interval: 48 }\n // ])\n // generate(dbt4, [\n // { prefix: '/quux/', interval: 5 },\n // { prefix: '/beep/', interval: 25 },\n // { prefix: '/dbt4', interval: 48 }\n // ])\n }\n}", "title": "" }, { "docid": "c7923265ba804e113adafe984b4faf8c", "score": "0.5029838", "text": "function testMethod() {}", "title": "" }, { "docid": "20810f9725d136cc446bc4d7073227be", "score": "0.5007342", "text": "function test(name, test_function) {\n exports[name] = test_function;\n}", "title": "" }, { "docid": "6697e1a7f73afc330bc878ed5cbfe80e", "score": "0.50046957", "text": "function test(params) {\n\n}", "title": "" }, { "docid": "0fcd58c25aa30591dc7d30356acd75c3", "score": "0.4998239", "text": "function addTestChild(){\n \n }", "title": "" }, { "docid": "a09c364bfb2adbb4e12ea15d81216fe8", "score": "0.4987521", "text": "function Queue(optFns) {\n\n // store your callbacks\n this._methods = (optFns && optFns[0]) || [];\n // keep a reference to your response\n this._response = null;\n // all queues start off unflushed\n this._flushed = false;\n}", "title": "" }, { "docid": "9247d29b1dd0ca01ca3b5740476aedc3", "score": "0.49660328", "text": "constructor(eventQueue, fn, delay, remove) {\n this.eventQueue = eventQueue;\n this.fn = fn;\n this.delay = Math.max(delay || 0, 0);\n this.remove = remove;\n\n this.handle = global.setTimeout(this.fire.bind(this), this.delay);\n this.next = Date.now() + this.delay;\n }", "title": "" }, { "docid": "ca501233b3234dd5dcf1b0ed3ca41bca", "score": "0.49562722", "text": "addCase(test) {\n if (this.caseList.includes(test.prototype.constructor)) {\n throw new Error(`The specified test already exists in this test suite.`);\n }\n this.caseList.push(test);\n }", "title": "" }, { "docid": "aeb307d847b9dcdeb46364524fe665bb", "score": "0.49517497", "text": "start() {\n this.constructor.increaseCounter();\n\n /* build class name */\n var className = '';\n if (this.originClass) {\n className = ('name' in this.originClass ? this.originClass.name : this.originClass.constructor.name) + ': ';\n }\n\n this.log(\n String('%counter) %classRunning %statustest \"%message\" %mode%code.').\n replace(/%counter/, String(JsTest.getCounter()).padStart(3)).\n replace(/%class/, className).\n replace(/%status/, this.type ? this.type + ' ' : '').\n replace(/%message/, this.message).\n replace(/%mode/, this.mode !== null ? '[mode: ' + this.mode + '] ' : '').\n replace(/%code/, this.code ? '(Code: ' + this.code + ')' : ''),\n 'info'\n );\n\n /* reset counters */\n staticContainerJsTest.equalObjectInstanceCounter = 0;\n staticContainerJsTest.equalIntegerCounter = 0;\n staticContainerJsTest.equalNumberCounter = 0;\n staticContainerJsTest.equalArrayValuesCounter = 0;\n staticContainerJsTest.equalArrayLengthCounter = 0;\n\n var timeStart = performance.now();\n try {\n this.testOK = this.testFunction.call(this);\n } catch (error) {\n this.testOK = this.errorFunction.call(this, error);\n }\n var timeFinished = performance.now();\n\n var timeNeeded = Math.round((timeFinished - timeStart) * 100000) / 100000;\n\n var message = this.testOK ? 'Test succeeded%message (%time).' : 'Test failed%message (%time).';\n\n message = ' → ' + message.replace('%message', this.testMessage ? ': \"' + this.testMessage + '\"' : '').replace('%time', timeNeeded + ' ms');\n\n this.testOK ? this.log(message, 'success') : this.log(message, 'error');\n\n if (!this.testOK) {\n this.constructor.increaseErrorCounter();\n } else {\n this.constructor.increaseSuccessCounter();\n }\n }", "title": "" }, { "docid": "e4e7006bd87aadc4b7f3a92c3134e05b", "score": "0.49423087", "text": "function internalMakeTest() {\n console.log(this, '\\ninternalMakeTest() called inside of the testObj.makeTest() function body');\n }", "title": "" }, { "docid": "e4e7006bd87aadc4b7f3a92c3134e05b", "score": "0.49423087", "text": "function internalMakeTest() {\n console.log(this, '\\ninternalMakeTest() called inside of the testObj.makeTest() function body');\n }", "title": "" }, { "docid": "7da48c8b676f7dc281639530d1e2cbf5", "score": "0.49358535", "text": "static startTests() {\n var title = 'Tests';\n\n if (typeof arguments[0] === 'string') {\n var title = Array.prototype.shift.apply(arguments);\n }\n\n var message = String('Start test \"%title\"').replace(/%title/, title);\n\n this.log('─'.repeat(message.length));\n this.log(message);\n this.log('─'.repeat(message.length));\n this.log('');\n\n this.timeStart = performance.now();\n this.doTests.apply(this, arguments);\n this.resultTests();\n }", "title": "" }, { "docid": "3cdba91c21918bbe3af60fb762e1ab63", "score": "0.49211195", "text": "constructor() {\n this.message = 'js-testing-framework test';\n this.mode = null;\n this.code = null;\n this.type = '';\n this.originClass = null;\n this.testOK = false;\n this.errorClass = Error;\n this.testMessage = null;\n\n [].forEach.call(arguments, function (argument) {\n this.doArgument(argument);\n }, this);\n\n /* start the test */\n if (staticContainerJsTest.autostart) {\n this.start();\n }\n }", "title": "" }, { "docid": "5584c49d7aa44b2bdf0172384ad13faa", "score": "0.4919318", "text": "function addTestRunner(testSuite){\n this.testSuite[this.testSuite.length] = testSuite;\n }", "title": "" }, { "docid": "3aff65718e34d36df0e6a40d5394aaad", "score": "0.49108514", "text": "function deferTest() {}", "title": "" }, { "docid": "3aff65718e34d36df0e6a40d5394aaad", "score": "0.49108514", "text": "function deferTest() {}", "title": "" }, { "docid": "50e69d3942a7f1388e017be7687af48f", "score": "0.49034983", "text": "function callTest(args) {\n internalTests.testPassArguments(args[0], args[1], args[2], args[3],\n args[4]);\n }", "title": "" }, { "docid": "fa547272b438f949cd9092a85a8d2fc7", "score": "0.49034387", "text": "function makeTest( moduleName, promise, JSON ) {\n\n var person = {\n firstName: promise(\"John\"),\n lastName: \"Doe\",\n age: promise(32),\n eyeColor: \"blue\",\n family: {\n mother: promise({\n name: \"Claire\",\n age: 57,\n working: promise(true),\n eyeColor: \"blue\"\n }),\n father: {\n name: \"Steven\",\n age: 60,\n working: false,\n eyeColor: promise(\"brown\")\n }\n }\n };\n\n var context = { topic: topic( person, JSON ) };\n batch[moduleName] = context;\n\n addValueTest( context,'firstName','John');\n addValueTest( context,'lastName','Doe');\n addValueTest( context,'age',32);\n addValueTest( context,'eyeColor','blue');\n\n addValueTest( context,'family.mother.name', \"Claire\");\n addValueTest( context,'family.mother.age', 57);\n addValueTest( context,'family.mother.working', true);\n addValueTest( context,'family.mother.eyeColor', \"blue\");\n\n addValueTest( context,'family.father.name', \"Steven\");\n addValueTest( context,'family.father.age', 60);\n addValueTest( context,'family.father.working', false);\n addValueTest( context,'family.father.eyeColor', \"brown\");\n\n}", "title": "" }, { "docid": "24b3edbd04a58b0fbd70b8adb442bb66", "score": "0.48820597", "text": "function testfun(params) {\n console.log(\"test fun\")\n}", "title": "" }, { "docid": "394569b546742196d94a8cfb7a1d7da0", "score": "0.48747757", "text": "function counter() {\n let numTests = {passed:0,failed:0}\n return (string,cb) => {\n testCb(string,cb,numTests)\n }\n}", "title": "" }, { "docid": "e54f2df52cdf6a558cdffa34e1de6d01", "score": "0.48696795", "text": "function generateTestCaseCallback(Y) {\r\n var testCases = new Array();\r\n var Assert = Y.Assert;\r\n\r\n testCases[0] = new Y.Test.Case({\r\n name: \"blackberry.invoke for Phone\",\r\n\t\t\t\r\n\t\t\tsetUp : function () {\r\n\t\t\t\t//Order is a stack, last object will appear first in DOM\r\n\t\t\t\tframework.setupFailButton();\r\n\t\t\t\tframework.setupPassButton();\r\n\t\t\t\tframework.setupInstructions();\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\ttearDown : function () {\r\n\t\t\t\tframework.tearDownFailButton();\r\n\t\t\t\tframework.tearDownPassButton();\r\n\t\t\t\tframework.tearDownInstructions();\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t_should: {\r\n error: {\r\n\t\t\t\t\t\r\n } \r\n },\r\n\t\t\t\r\n\t\t\t\"blackberry.invoke.PhoneArguments should exist\" : function() {\r\n\t\t\t\tAssert.isNotUndefined(blackberry.invoke.PhoneArguments);\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t\"blackberry.invoke.PhoneArguments.VIEW_CALL should exist\" : function() {\r\n\t\t\t\tAssert.isNotUndefined(blackberry.invoke.PhoneArguments.VIEW_CALL);\r\n\t\t\t\tAssert.areSame(0, blackberry.invoke.PhoneArguments.VIEW_CALL);\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t\"blackberry.invoke.PhoneArguments.VIEW_VOICEMAIL should exist\" : function() {\r\n\t\t\t\tAssert.isNotUndefined(blackberry.invoke.PhoneArguments.VIEW_VOICEMAIL);\r\n\t\t\t\tAssert.areSame(1, blackberry.invoke.PhoneArguments.VIEW_VOICEMAIL);\r\n\t\t\t},\r\n\t\r\n\t\t\t/*\r\n\t\t\t//Still errors for some reason\r\n\t\t\t//Invoke Phone with PhoneArguments with bad parameters\r\n\t\t\t\"blackberry.invoke.PhoneArguments should throw error on bad parameter types\" : function() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvar args = new blackberry.invoke.PhoneArguments(false, 'notBoolean', 'notNumber');\r\n\t\t\t\t\targs.view = blackberry.invoke.PhoneArguments.VIEW_CALL; \r\n\t\t\t\t\tblackberry.invoke.invoke(blackberry.invoke.APP_PHONE, args); \r\n\t\t\t\t} catch (err) {\r\n\t\t\t\t\tthrow new Error(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Still errors for some reason\r\n\t\t\t//Invoke Phone with PhoneArguments with lineID set and VIEW_VOICEMAIL\r\n\t\t\t\"blackberry.invoke.PhoneArguments should throw error on lineID set and VIEW_VOICEMAIL\" : function() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvar args = new blackberry.invoke.PhoneArguments('555-555-5555', true, 0);\r\n\t\t\t\t\targs.view = blackberry.invoke.PhoneArguments.VIEW_VOICEMAIL; \r\n\t\t\t\t\tblackberry.invoke.invoke(blackberry.invoke.APP_PHONE, args); \r\n\t\t\t\t} catch (err) {\r\n\t\t\t\t\tthrow new Error(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\t//Invoke Phone with no parameters defined\r\n\t\t\t\"MANUAL 1 should invoke Phone with empty PhoneArguments\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Result should be Phone application opening up\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke phone and passing empty PhoneArguments\");\r\n\t\t\t\tvar args = new blackberry.invoke.PhoneArguments();\r\n blackberry.invoke.invoke(blackberry.invoke.APP_PHONE, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Phone with no PhoneArguments with VIEW_CALL\r\n\t\t\t\"MANUAL 2 should invoke Phone with PhoneArguments and VIEW_CALL\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Result should be Phone application opening up and placing a call\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke phone and passing PhoneArguments with VIEW_CALL\");\r\n\t\t\t\tvar args = new blackberry.invoke.PhoneArguments('555-555-5555', true);\r\n\t\t\t\targs.view = blackberry.invoke.PhoneArguments.VIEW_CALL; \r\n blackberry.invoke.invoke(blackberry.invoke.APP_PHONE, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Phone with no PhoneArguments with VIEW_VOICEMAIL\r\n\t\t\t\"MANUAL 3 should invoke Phone with PhoneArguments and VIEW_VOICEMAIL\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Result should be Phone application opening up and going to voicemail\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke phone and passing PhoneArguments with VIEW_VOICEMAIL\");\r\n\t\t\t\tvar args = new blackberry.invoke.PhoneArguments('555-555-5555', true);\r\n\t\t\t\targs.view = blackberry.invoke.PhoneArguments.VIEW_VOICEMAIL;\r\n blackberry.invoke.invoke(blackberry.invoke.APP_PHONE, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\t\r\n });\r\n\r\n return testCases;\r\n }", "title": "" }, { "docid": "d0a77ad6639f752181e55b8cd9f6f1ee", "score": "0.48690778", "text": "function makeTest( predicate, param ) {\n return makeTestOperator( predicate, param )\n }", "title": "" }, { "docid": "446a54767a3623e89e166769c7fc0b50", "score": "0.4867911", "text": "function test() {\n}", "title": "" }, { "docid": "ca3419e5827ee01822c02deb20cb868a", "score": "0.48651966", "text": "function test_1() {\n vassert.testComplete()\n}", "title": "" }, { "docid": "ad9a83536bb14944a456997e979db441", "score": "0.48593605", "text": "runTests() {\n let errors = [];\n let successes = 0;\n let limit = this.getTestCount();\n let counter = 0;\n Object.entries(this.tests).forEach(([containerKey, containerVal]) => {\n Object.entries(containerVal).forEach(([testCase, testFunct]) => {\n // Self invoking anonymous function\n (() => {\n try {\n testFunct(() => {\n // If it calls back withou throwing, then it succeeded, so log it in green\n console.log(Colors.GREEN, testCase);\n counter++;\n successes++;\n if(counter == limit) {\n this.generateTestReport(limit, successes, errors);\n }\n });\n } catch(err) {\n // If it throws, then it failed, so capture the error thrown and log it in red\n errors.push({'name' : testCase, 'error' : err});\n console.log(Colors.RED, testCase);\n counter++;\n if(counter == limit) {\n this.generateTestReport(limit, successes, errors);\n }\n }\n })();\n });\n });\n }", "title": "" }, { "docid": "320baefd05afdd19badc63d8cc30d7a0", "score": "0.48581743", "text": "async function testFn () {\n const counts = []\n const tom = new Tom()\n tom.test('one', () => {\n return Promise.reject(new Error('broken'))\n })\n tom.test('two', () => 2)\n tom.on('pass', () => counts.push('test-pass'))\n tom.on('fail', () => counts.push('test-fail'))\n\n const runner = new TestRunner(tom)\n counts.push('prop:' + runner.state)\n runner.on('state', state => counts.push('event:' + state))\n a.deepEqual(runner.ended, false)\n const promise = runner.start()\n .then(() => {\n counts.push('prop:' + runner.state)\n a.deepEqual(counts, ['prop:pending', 'event:in-progress', 'prop:in-progress', 'test-pass', 'test-fail', 'event:fail', 'prop:fail'])\n a.deepEqual(runner.ended, true)\n })\n counts.push('prop:' + runner.state)\n return promise\n }", "title": "" }, { "docid": "8889d087464eca107f87415eed16e55e", "score": "0.48579034", "text": "function include_unittest(strunittesttype,params){ CUnitTest.register( strunittesttype, params ); }", "title": "" }, { "docid": "5472d154c4bb676002aa47d81f1c56dd", "score": "0.48432112", "text": "function TestFrameworkExample() {\n\n}", "title": "" }, { "docid": "d9c2bba6093770ccdffd67aaf2920a5a", "score": "0.48412508", "text": "function registerTest(response, request, query) \n{\n var callback = function(datas) \n {\n\tqueryResult(response);\n };\n \n var errorCallback = function() \n {\n\tqueryResult(response, ERROR_UNKNOWN);\n };\n \n executeWhenRequestEnded(request, function() {\n registerIfNotExists(datas, test.model);\n\t});\n}", "title": "" }, { "docid": "8aa73067cb71912ad0ac719eac6f0e6d", "score": "0.4839577", "text": "function createQueue() {\n let queue = [];\n\n return {\n send: function () {\n queue.push(Array.from(arguments))\n },\n drain: function (drainFunc) {\n queue.forEach(args => drainFunc.apply(null, args));\n calls = [];\n }\n }\n}", "title": "" }, { "docid": "b76d54f5b79759dc156c6dbfb653bf1a", "score": "0.48347163", "text": "function test() {\n console.log('this is a test');\n}", "title": "" }, { "docid": "c7563135f8e068c7b6579d2484747d5b", "score": "0.4814502", "text": "runTest() {\n this.result.recordResultWhileTesting();\n }", "title": "" }, { "docid": "78c5f53401e447efb0eaddb1bc326407", "score": "0.48113868", "text": "makeTestFunction() {\n this.testFunction = (data) => {\n return tfc.tidy(() => {\n const valOutputs = [];\n let totalLoss;\n const inputs = data.slice(0, this.inputs.length);\n const targets = data.slice(this.inputs.length, this.inputs.length + this.outputs.length);\n const feeds = [];\n for (let i = 0; i < this.inputs.length; ++i) {\n feeds.push({ key: this.inputs[i], value: inputs[i] });\n }\n const feedDict = new FeedDict(feeds);\n const outputs = execute(this.outputs, feedDict);\n // Compute total loss.\n for (let i = 0; i < this.lossFunctions.length; ++i) {\n const lossFunction = this.lossFunctions[i];\n // TODO(cais): Add sample weighting and replace the simple\n // averaging.\n const loss = tfc.mean(lossFunction(targets[i], outputs[i]));\n if (i === 0) {\n totalLoss = loss;\n }\n else {\n totalLoss = tfc.add(totalLoss, loss);\n }\n valOutputs.push(totalLoss);\n }\n // Compute the metrics.\n for (let i = 0; i < this.metricsTensors.length; ++i) {\n const metric = this.metricsTensors[i][0];\n const outputIndex = this.metricsTensors[i][1];\n // TODO(cais): Replace K.mean() with a proper weighting function.\n const meanMetric = tfc.mean(metric(targets[outputIndex], outputs[outputIndex]));\n valOutputs.push(meanMetric);\n }\n return valOutputs;\n });\n };\n }", "title": "" }, { "docid": "c222aa49346520daca423a8e70149219", "score": "0.4808706", "text": "function makeTest(name) {\n return function(measurement) {\n return breakpointTest(breakpointFindByName(breakpointDefaultSpec(), name), measurement);\n };\n}", "title": "" }, { "docid": "a3a3e89d1d808a189987031a61302d00", "score": "0.48029423", "text": "function run_test() {\n add_test(test_ECBEncryption);\n add_test(test_ECBDecryption);\n run_next_test();\n}", "title": "" }, { "docid": "921c8d46897079e7200a0ed1e788b131", "score": "0.47965902", "text": "function test() {\n\tconst tests = [\n\t\ttestHrtimer, testHeaders, testLatency, testHttpClient,\n\t\ttestServer, integrationTest, testLoadtest, testWebsocket,\n\t\ttestRequestGenerator, testBodyGenerator, testResult,\n\t];\n\ttesting.run(tests, 4200);\n}", "title": "" }, { "docid": "9f9e2496b11699b001d0d04db09a3489", "score": "0.47854453", "text": "function tester() {\n document.getElementById(\"output\").innerHTML += sleepIn(true, false);\n document.getElementById(\"output\").innerHTML += nextOne(true, false);\n //test third method, etc\n}", "title": "" }, { "docid": "4d8c7ea96d585bb47459a426c3da5035", "score": "0.4783781", "text": "function addTestsToQUnit() {\n if (options.randomize) {\n pendingContexts = randomize(pendingContexts);\n }\n\n pendingContexts.forEach(function(context) {\n QUnit.module(context.fullDescription(), {\n /**\n * We use QUnit's current `queue` to ensure hook functions are run in\n * the right order and obey QUnit's async rules. QUnit synchronizes\n * calls in this order:\n *\n * module('mod', {\n * setup: function(){}, // Step 1\n * teardown: function(){} // Step 3\n * });\n *\n * test('test', function(){}); // Step 2\n *\n * We add some abstractions to that, so we want to run things in this\n * order:\n *\n * describe('outer', function() {\n * lazy('a', function(){}); // Step 1\n *\n * before(function(){}); // Step 3\n * before(function(){}); // Step 4\n *\n * describe('inner', function() {\n * lazy('a', function(){}); // Step 2\n *\n * before(function(){}); // Step 5\n * it('test', function(){}); // Step 6\n * after(function(){}); // Step 7\n * });\n *\n * after(function(){}); // Step 8\n * after(function(){}); // Step 9\n * });\n *\n * So before `setup` is called below, the QUnit queue looks like this:\n *\n * - setup\n * - test\n * - teardown\n *\n * QUnit unshifts `setup` and runs it. We then call `prependHook` which\n * prepends our `before` callbacks so the queue now looks like this:\n *\n * - before (#3)\n * - before (#4)\n * - before (#5)\n * - test\n * - teardown\n *\n * And then we call `prependHook` for the `lazySetup` callbacks, so we\n * end up with this:\n *\n * - lazySetup (#1)\n * - lazySetup (#2)\n * - before (#3)\n * - before (#4)\n * - before (#5)\n * - test\n * - teardown\n *\n * QUnit will ensure that each step is run only once\n * `QUnit.config.semaphore` has gone back down to 0.\n *\n * Similarly, once `teardown` is run we add additional queue items for\n * `lazyTeardown` and `after` callbacks.\n */\n\n setup: function() {\n if (!QUnit.config.current.callback.skipped) {\n context.prependHook('before', false, this);\n context.prependHook('lazySetup', false, this);\n }\n },\n teardown: function() {\n if (!QUnit.config.current.callback.skipped) {\n context.prependHook('lazyTeardown', true, this);\n context.prependHook('after', true, this);\n }\n }\n });\n\n var tests = context.tests;\n\n if (options.randomize) {\n tests = randomize(tests.slice());\n }\n\n tests.forEach(function(test) {\n QUnit.test(test.description, test.body);\n });\n });\n\n pendingContexts.length = 0;\n }", "title": "" }, { "docid": "e9bb89d73e7399c35142467f9646724d", "score": "0.47832364", "text": "function run()\n{\n\t\n\n\t//test();\n\n\trunIt();\n\n}", "title": "" }, { "docid": "1ee917f45ef11b849a8465ac9f34d006", "score": "0.47790152", "text": "function TestCollection (tests) {\n return new TestCollection.fn.init(tests);\n }", "title": "" }, { "docid": "d41ae8ed77846493e7107b33d4466955", "score": "0.47735265", "text": "function createTest(useAddMessage: boolean = true, useAddMessages: boolean = false) {\n function Test({ topics, addMessagesOverride }: { topics: string[], addMessagesOverride?: any }) {\n Test.result(\n PanelAPI.useMessageReducer({\n topics,\n addMessage: useAddMessages ? undefined : Test.addMessage,\n addMessages: useAddMessages ? addMessagesOverride || Test.addMessages : undefined,\n restore: Test.restore,\n })\n );\n return null;\n }\n Test.result = jest.fn();\n Test.restore = jest.fn();\n Test.addMessage = jest.fn();\n Test.addMessages = jest.fn();\n return Test;\n }", "title": "" }, { "docid": "6044d67e8c9dae5bc2f18dd65ceb1acc", "score": "0.4771403", "text": "function testRunner(){var featureNames;var feature;var aliasIdx;var result;var nameIdx;var featureName;var featureNameSplit;for(var featureIdx in tests){if(tests.hasOwnProperty(featureIdx)){featureNames=[];feature=tests[featureIdx];if(feature.name){featureNames.push(feature.name.toLowerCase());if(feature.options&&feature.options.aliases&&feature.options.aliases.length){\n// Add all the aliases into the names list\r\nfor(aliasIdx=0;aliasIdx<feature.options.aliases.length;aliasIdx++){featureNames.push(feature.options.aliases[aliasIdx].toLowerCase())}}}result=is(feature.fn,\"function\")?feature.fn():feature.fn;for(nameIdx=0;nameIdx<featureNames.length;nameIdx++){featureName=featureNames[nameIdx];featureNameSplit=featureName.split(\".\");if(featureNameSplit.length===1){Modernizr[featureNameSplit[0]]=result}else{if(Modernizr[featureNameSplit[0]]&&!(Modernizr[featureNameSplit[0]]instanceof Boolean)){Modernizr[featureNameSplit[0]]=new Boolean(Modernizr[featureNameSplit[0]])}Modernizr[featureNameSplit[0]][featureNameSplit[1]]=result}classes.push((result?\"\":\"no-\")+featureNameSplit.join(\"-\"))}}}}", "title": "" }, { "docid": "6a8797206479e33bc5f09685a6c891c4", "score": "0.47668123", "text": "async function testFn () {\n const actuals = []\n const tom = new Tom()\n tom.test('one', () => {\n actuals.push('one')\n throw new Error('broken')\n })\n tom.test('two', () => {\n actuals.push('two')\n throw new Error('broken2')\n })\n\n const runner = new TestRunner(tom)\n const results = await runner.start()\n a.deepEqual(actuals, ['one', 'two'])\n }", "title": "" }, { "docid": "c49363c17d2fd51d01d133c630f20491", "score": "0.47662848", "text": "function CreateTestObj(code) {\n\tvar splitCode = code.split(';');\n\tvar condtionCode = splitCode[0];\n\tvar testCode = splitCode[1];\n\tvar message = splitCode[2];\n //used to store parsable terms and their meanings, needs to be manualy updated when new potential piece parameters are added\n var tokenDict = {\n Operators: \"+-*/^%!=&|><()\", //if a symbol is in this string it is parsed in the same form\n\n //list all possible names for road piece parameters and what they should be parsed as here\n currentspeed: \"thisPiece.speedLimit\",\n\t\totherspeed: \"otherPiece.speedLimit\",\n curvature: \"thisPiece.curvature\",\n\t\tothercurvature: \"otherPiece.curvature\",\n\t\tnumlanes: \"thisPiece.nlanes\",\n\t\tothernumlanes: \"otherPiece.nlanes\",\n\t\ttaperlength: \"thisPiece.taperLength\",\n\t\tothertaperlength: \"otherPiece.taperLength\",\n\t\tsuperelevation: \"thisPiece.superelevation\",\n\t\totherSuperelevation: \"otherPiece.superelevation\",\n\t\tfriction: \"thisPiece.friction\",\n\t\totherfriction: \"otherPiece.friction\",\n\t\ttype: \"thisPiece.type\",\n\t\tothertype: \"otherPiece.type\",\n\t\t\n\t\t//feature types\n\t\tsegment: \"'segment'\",\n\t\tspeed:\"'speed'\",\n\t\tmerge:\"'laneEnd'\",\n\t\tdiverge:\"'laneAdd'\",\n\t\tofframp:\"'offRamp'\",\n\t\tonramp: \"'onramp'\",\n\t\t\n\t\t\n\t\t//list of possible names for calculatable parameters, the functions must be defined in newFunsObject()\n\t\tdistancefromcenter: \"funs.distanceFromCenters(thisPiece, otherPiece)\",\n\t\tdistance: \"funs.distanceFromEdges(thisPiece, otherPiece)\",\n\t\tdistancefoward: \"funs.distanceFoward(thisPiece, otherPiece)\",\n\t\tdistanceback: \"funs.distanceBack(thisPiece, otherPiece)\"\n\t};\n\t//constructor for object that stores functions used in tests\n\tfunction newFunsObject(){\n\t\tfunction distanceFromCenters(thisPiece, otherPiece){\n\t\t\tvar otherCenter = (otherPiece.loc+(otherPiece.len/2));\n\t\t\tvar thisCenter = (thisPiece.loc+(thisPiece.len/2));\n\t\t\treturn Math.abs(otherCenter - thisCenter);\n\t\t}\n\t\tfunction distanceFromEdges(thisPiece, otherPiece){\n\t\t\tvar start2start = Math.abs(otherPiece.loc - thisPiece.loc);\n\t\t\tvar\tend2start = Math.abs(otherPiece.loc - (thisPiece.loc+thisPiece.len));\n\t\t\tvar start2end = Math.abs((otherPiece.loc+otherPiece.len) - thisPiece.loc);\n\t\t\tvar end2end = Math.abs((otherPiece.loc+otherPiece.len) - (thisPiece.loc+thisPiece.len));\n\t\t\treturn Math.min(start2start, start2end, end2start, end2end);\n\t\n\t\t}\n\t\tfunction distanceFoward(thisPiece, otherPiece){\n\t\t\tvar end2start = otherPiece.loc - (thisPiece.loc + thisPiece.len);\n\t\t\treturn end2start;\n\t\t}\n\t\tfunction distanceBack(thisPiece, otherPiece){\n\t\t\tvar start2end = Math.abs((otherPiece.loc+otherPiece.len) - thisPiece.loc);\n\t\t\treturn start2end;\n\t\t}\n\treturn {\n\t\tdistanceFromCenters: distanceFromCenters,\n\t\tdistanceFromEdges: distanceFromEdges,\n\t\tdistanceFoward: distanceFoward, \n\t\tdistanceBack: distanceBack\n\t}\n\t}\n \n\t//verify the code is actually code\n //if (typeof condtionCode !== \"string\" || typeof testCode !== \"string\") throw Error(\"parameters must be strings\");\n //parse the test\n var testObj = parseTestString(condtionCode, testCode);\n\n //returns the applyTest method\n return { applyTest: applyTest };\n\n //function used to apply the test stored in the object to a road\n //returns a list of issues: {segmentId, location(segment), message}\n function applyTest(road) {\n //initialise the array of issues\n var issues = [];\n //for each piece\n for (var i = 0; i < road.length; i++) {\n //if the piece fails the test\n if (applyTestToPiece(road, road[i], newFunsObject(), testObj.expression, testObj.conditons)) {\n\t\t\t\t//create an issue and add it to the array\n issues.push({segID: road[i].seg, location: locationCurried(road[i].POnSeg) , message: message});\n }\n }\n\t\t\n\t\t//return the array of issues\n return issues;\n\t\t\n\t\t//Higher order function used to create issue.location()\n\t\t//given number P from 0-1000 returns a function \n\t\t//that takes a segment and returns the coordinates P/1000 along the segment\n\t\tfunction locationCurried(P){\n\t\t\treturn function(segment){\n\t\t\t\tvar x1 = segment.startX;\n\t\t\t\tvar y1 = segment.startY;\n\t\t\t\tvar x2 = segment.endX;\n\t\t\t\tvar y2 = segment.endY;\n\t\t\t\n\t\t\t\treturn {\n\t\t\t\t\tx: x1+((P/1000)*(x2-x1)), \n\t\t\t\t\ty: y1+((P/1000)*(y2-y1))\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n //applys the test to a single road piece\n function applyTestToPiece(road, piece, funsObj, testFun, condtions) {\n\t\t\t\n\t\t\tvar hasFailed = false;\n\t\t\tfor (var i = 0; i < road.length; i++){\n\t\t\t\tvar expressionsTrue = true;\n for (var j = 0; j < condtions.length; j++) {\n expressionsTrue = expressionsTrue && condtions[j](piece, road[i], funsObj);\n }\n\t\t\t\tif (expressionsTrue){\n\t\t\t\t\t//apply the test function to the pieces\n\t\t\t\t\thasFailed = hasFailed || testFun(piece, road[i], funsObj);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn hasFailed;\n }\n }\n\t\n //function to parse the code into js functions\n function parseTestString(conditionCode, testCode) {\n\n //parse conditons\n if (conditionCode !== \"\") {\n var conditonsStringArray = conditionCode.split(\",\");\n var conditons = [];\n for (i = 0; i < conditonsStringArray.length; i++) {\n var newConditon = parseExpression(expressionStream(charStream(conditonsStringArray[i])));\n conditons.push(newConditon);\n }\n }\n\t\t\n\t\t//parse test\n\t\tvar testExpression = parseExpression(expressionStream(charStream(testCode)));\n\t\t\n return {conditons: conditons, expression: testExpression };\n\n function expressionStream(charStream) {\n\n var current = null;\n\n return {\n next: next,\n peek: peek,\n endof: endof,\n throwErr: throwErr\n };\n\n\n //Primary function of tokenStream, used in peek() and next() to assemble the next token from charStream\n function readNext() {\n\n if (charStream.endof()) return null;\n var char = charStream.peek();\n readWhile(isWhitespace);\n char = charStream.peek();\n if (char === '#') {\n skipComment();\n return readNext();\n }\n if (isDigit(char)) return readNumber();\n if (isLetter(char)) return readWord();\n if (isOperator(char)) {return readOperator();}\n charStream.throwErr(\"Unable to read: \" + char);\n }\n\n //methods\n function peek() {\n return current || (current = readNext());\n }\n function next() {\n var token = current;\n current = null;\n return token || readNext();\n }\n function endof() {\n return peek() === null;\n }\n\n //Utilities\n function isLetter(char) {\n return /[a-z]/i.test(char);\n }\n function isDigit(char) {\n return /[0-9]/i.test(char);\n }\n function isOperator(char) {\n return tokenDict.Operators.indexOf(char) >= 0;\n }\n function isWhitespace(char) {\n return \" \\t\\n\".indexOf(char) >= 0;\n }\n function skipComment() {\n charStream.next();\n readWhile(function (char) { return char !== \"#\"; });//return true;});\n charStream.next();\n }\n\n //token generating functions. these functions are called by readNext when it has identified what is about to be read\n //they read through charStream until they reach the end of the thing they are designed to read and return it.\n\n //attempts to read a number\n function readNumber() {\n var isDecimal = false; //stores if a period has been found\n\n var number = readWhile(function (char) {//read while function returns true\n if (char === \".\") {//if the next char is a period\n if (isDecimal) return false;//and a period has already been found return false\n isDecimal = true;//else set isDecimal to true\n return true;//and return true\n }\n return isDigit(char);//return whether next char is digit\n });//end read while\n return number;//return token type num with read value\n }\n\n //attempts to read a word\n function readWord() {\n //read until a char other than a letter, number, underscore or period is found\n var word = readWhile(function (char) { return isLetter(char) || isDigit(char) || char === '_' || char === '.'; });\n\n //return the meaning of the word if it is in the dictonary otherwise throw an error\n if (tokenDict[word] === null) charStream.throwErr(\"unknown input '\" + word + \"'\");\n return tokenDict[word];\n }\n\n //reads an operator symbol\n function readOperator() {\n\t\t\t\tvar operator = readWhile(function (char) { return isOperator(char); });\n return operator;\n }\n\n //takes a function and then reads through charStream until the function returns false then returns the string of characters it read.\n function readWhile(predicate) {\n var string = \"\";\n while (!charStream.endof() && predicate(charStream.peek())) {\n string += charStream.next();\n }\n return string;\n }\n\n //custom errors\n //throw when test code ends unexpectedly\n function endError() {\n charStream.throwErr(\"Unexpected end of code\");\n }\n\n //throw when unexpected punction is found\n function puncError(punc, section) {\n charStream.throwErr(\"'\" + punc + \"' used in incorrect section\");\n }\n\n function throwErr(msg) {\n charStream.throwErr(msg);\n }\n\n }\n\n\t\tfunction charStream(input) {\n var pos = 0, line = 1, col = 0;\n var code = input.toLowerCase();\n return {\n next: next,\n peek: peek,\n endof: endof,\n throwErr: throwErr\n };\n function next() {\n var char = code.charAt(pos++);\n if (char === \"\\n\") line++ , col = 0; else col++;\n return char;\n }\n function peek() {\n return code.charAt(pos);\n }\n function endof() {\n return peek() === \"\";\n }\n function throwErr(msg) {\n console.log(msg + \" (\" + line + \":\" + col + \")\");\n throw new Error(msg + \" (\" + line + \":\" + col + \")\");\n }\n }\n \n\t\t//converts an expression stream into a js function\n\t\tfunction parseExpression(expressionStream){\n\t\t\t//function body\n\t\t\tvar expressionString = \"return\";\n\t\t\t\n\t\t\t//while there is code in the expression stream\n\t\t\twhile (!expressionStream.endof()) {\n\t\t\t\t//add the next token to the function body\n\t\t\t\texpressionString += \" \" + expressionStream.next();\n\t\t\t}\n\t\t\t//finish the function body\n\t\t\texpressionString += ';';\n\t\t\t\n\t\t\t//if expressionString is \"retrun null;\" then the expression should actually always return true\n\t\t\tif (expressionString === \"return null;\"){expressionString = \"return true;\"}\n\t\t\treturn new Function('thisPiece', 'otherPiece', 'funs', expressionString);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "641826801f61638e5570a7c7ca0a5173", "score": "0.47648245", "text": "add() {}", "title": "" }, { "docid": "3860ac20b6b7825c9d2455624ca7517e", "score": "0.47643837", "text": "function TestSuite() {\n this.tests = [];\n}", "title": "" }, { "docid": "2fdc04f5b175a4baef1cbed9a9e19d77", "score": "0.4761802", "text": "add(callback, duration, skip=false) {\n if (!skip) this.queue.push({ callback, duration, active: false, done: false });\n if (this.disable) return;\n\n let current = this.queue[0]; \n if (current && !current.active && !current.done) {\n this.queue[0].active = true;\n setTimeout(function() {\n try {\n this.queue[0].done = true;\n current.callback();\n this.queue.shift();\n this.add(null, null, true);\n } catch(e) {\n\n }\n }.bind(this), current.duration);\n }\n }", "title": "" }, { "docid": "b75dd29c52b22cad04efa620b899c174", "score": "0.475546", "text": "function MyCustomTest(redlineApi, testNum, rand, config)\n{\n\t// We need Redline API to report results, errors, requests.\n\tthis.redlineApi = redlineApi;\n\n\t// Keep track of test information.\n\tthis.testNum = testNum;\n\tthis.rand = rand;\n\n\t// This is the test configuration file (loadtest.ini)\n\tthis.config = config;\n\n\t// Hardcode endpoint, requires plugin to customize.\n\tthis.url = this.config.url;\n\tif ( !this.url )\n\t\tthis.url = \"https://httpbin.org/status/200\";\n\n\t// Would need plugin to customize instead of hard-code.\n\tthis.minDelayMs = this.config.min | 500;\n\tthis.maxDelayMs = this.config.max | 10000;\n\tthis.delayRangeMs = this.maxDelayMs - this.minDelayMs + 1;\n\n\t// Would need plugin to customize from test.\n\tthis.remainingIterations = this.config.iterations | 1;\n}", "title": "" }, { "docid": "5399a8405d7ce98bef9ccf4c477191de", "score": "0.47540703", "text": "queueAndFeed(method, ...args) {\r\n if (this.DEBUG) console.log(method.name, \"Queuing with feeding\");\r\n this.addToQueue({ method, args, feeding: true });\r\n }", "title": "" }, { "docid": "62250272bc867b5e474b5f8afd51c090", "score": "0.4748596", "text": "function test() {\n var msg = 'I am ...'\n\n return function() {\n console.log(msg)\n }\n }", "title": "" } ]
c06566412085f3540c42bc28a43876dd
Chamar outros perfis cadastrados
[ { "docid": "c083ac96356abdc42abc3110282c8d1a", "score": "0.0", "text": "function loadAnotherUsers(){\n $(\".other-profiles\").append(\"<h2>Encontre outros jogadores: </h2>\");\n database.ref(\"users/\").once('value')\n .then(function(snapshot) {\n snapshot.forEach(function(childSnapshot) {\n var otherUsersID = childSnapshot.key;\n var otherUsersNames = childSnapshot.val().name;\n var url = window.location.href + 'profile=' + otherUsersID;\n $(\".other-profiles\").append(\"<li><a href='\" + url + \"'>\" + otherUsersNames + \"</a></li>\");\n });\n });\n}", "title": "" } ]
[ { "docid": "fdec52cb6a769897dcf7301213086650", "score": "0.58841294", "text": "getStatsProprietes(){\n let stats = {\n color: {\n total: 0,\n libre: 0,\n achete: 0,\n pourcent: 0\n },\n all: {\n total: 0,\n libre: 0,\n achete: 0,\n pourcent: 0\n }\n };\n let it = GestionFiche.iteratorTerrains();\n while (it.hasNext()) {\n let fiche = it.next();\n if (fiche.statut != null) {\n stats.all.total++;\n if (fiche.statut === ETAT_LIBRE) {\n stats.all.libre++;\n } else {\n stats.all.achete++;\n }\n if (this._containGroup(fiche.color)) {\n stats.color.total++;\n if (fiche.statut === ETAT_LIBRE) {\n stats.color.libre++;\n } else {\n stats.color.achete++;\n }\n }\n }\n }\n stats.color.pourcent = (stats.color.libre / stats.color.total) * 100;\n stats.all.pourcent = (stats.all.libre / stats.all.total) * 100;\n return stats;\n }", "title": "" }, { "docid": "f60867ade92300bf6a9ee44b4ef4bcd4", "score": "0.57092184", "text": "function getTodosServicios(req, res){\n\n Servicio.find({ })\n .exec( \n (err, servicios) => {\n if(err){\n return res.status(500).json({\n ok: false,\n mensaje: 'Error cargando servicio',\n errors: err\n });\n }\n\n Servicio.count({}, (err, conteo)=>{\n res.status(200).json({\n ok: true,\n servicios: servicios,\n total: conteo\n });\n });\n }); \n}", "title": "" }, { "docid": "accf303b9e0eded7b79e2ab9ff351718", "score": "0.56737775", "text": "function chamaMaisClientes(){\r\n Dashboard.getStatement(Indicadores.statements.clientesMaisCompraram, params).done(function(data){\r\n var colors = [ \"#3498db\", '#1abc9c', \"#2ecc71\", \"#e74c3c\", \"#e67e22\", \"#f1c40f\", \"#9b59b6\", \"#34495e\",\"#95a5a6\", \"#ecf0f1\" ].reverse();\r\n var dataset = [];\r\n var percentual;\r\n var total = 0;\r\n\r\n if (data.statement.rows.length > 0) {\r\n var produtos = (data.statement.rows).sort(function(a,b){\r\n if (a[1] > b[1])\r\n return -1;\r\n if (a[1] < b[1])\r\n return 1;\r\n return 0;\r\n });\r\n\r\n for (var i = 0; i < 9; i++) {\r\n percentual = (produtos[i][1] * 100) / Indicadores.items.volumeVendasTotal;\r\n dataset.push([ produtos[i][0].toUpperCase(), percentual ]);\r\n total += percentual;\r\n };\r\n dataset.push([ \"OUTROS\", 100 - total ]);\r\n };\r\n Dashboard.loader('[data-type=clientes-mais-compraram]', 'hide');\r\n Dashboard.renderPie('[data-type=clientes-mais-compraram] .pie', dataset, colors, '<h3>Clientes que mais compraram (%)</h3>');\r\n });\r\n }", "title": "" }, { "docid": "f0b9a0986bbb2eab0a8d1fc28ddbfd5e", "score": "0.5645754", "text": "function Mostrarcontador(datam,codiserv){\n\tvar i=0;\n\tvar total=0;\n\twhile (i < datam.Servicios.length){\n\t\t if (datam.Servicios[i].CodServicio == codiserv) {\n\t\t total=(datam.Servicios[i].ConEntradas-datam.Servicios[i].ConSalidas);\n\t\t\t //$(\"#datoscontador\").append('<ul><li><a href=\"\">Entradas: '+datam.Servicios[i].ConEntradas+'</a></li><li><a href=\"\">Salidas: '+datam.Servicios[i].ConSalidas+'</a></li><li><a href=\"\">Total evento: '+total+'</a></li></ul>');\n\t $(\"#datoscontador1\").text('Entradas: '+datam.Servicios[i].ConEntradas+'');\n\t\t\t $(\"#datoscontador2\").text('Salidas: '+datam.Servicios[i].ConSalidas+'');\n\t\t\t $(\"#datoscontador3\").text('Total evento: '+total+'');\n\t $(\"#datconuno1\").text('Entradas: '+datam.Servicios[i].ConEntradas+'');\n\t $(\"#datconuno2\").text('Salidas: '+datam.Servicios[i].ConSalidas+'');\n\t $(\"#datconuno3\").text('Total evento: '+total+''); \n $(\"#contegresar1\").text('Entradas: '+datam.Servicios[i].ConEntradas+'');\n\t $(\"#contegresar2\").text('Salidas: '+datam.Servicios[i].ConSalidas+'');\n\t $(\"#contegresar3\").text('Total evento: '+total+''); \t \n\t\t }\n\t\t i=i+1;\n } \t\t\t \t\t\t \t\t\t\t\n}", "title": "" }, { "docid": "f73c45195ad0c00de938c658e9659e5d", "score": "0.5555064", "text": "function buscarDatos(){\n\t\t\t\tbuscarAnios();\n\t\t\t\tbuscarNiveles();\n\t\t\t}", "title": "" }, { "docid": "f425d23a0fb49d7a636c08ac9e5160b9", "score": "0.55326784", "text": "function getStatiCrescita() {\n colturaService.getStatiCrescita().then(function (result) {\n vm.statiCrescitaDisponibili = result;\n for (var i = 0; i < vm.statiCrescitaDisponibili.length; i++) {\n if (vm.statiCrescitaDisponibili[i] == vm.colturaCorrente.statoCrescita) {\n //tolgo gli stati passati\n vm.statiCrescitaDisponibili = vm.statiCrescitaDisponibili.slice(i + 1, vm.statiCrescitaDisponibili.length);\n break;\n }\n }\n });\n }", "title": "" }, { "docid": "083533f76d51f0433238411f7ae426b6", "score": "0.55066603", "text": "async function requestsPerService() {\n const queryString = `SELECT fk_service_id AS service,\n COUNT (fk_service_id)\n FROM requests\n GROUP BY fk_service_id`;\n await db.query(queryString, (err, res) => {\n if (err) {\n throw err;\n } else {\n csvHelper.generateCSV(\"requestsPerService\", res.rows);\n }\n });\n}", "title": "" }, { "docid": "b3d85bd806c4a0bbe85c6de5a358670a", "score": "0.5506151", "text": "function renderPorSucursal() {\n\n for (var a = 0; a < local.sucursal.length; a++) {\n console.log(\"Total de \" + local.sucursal[a] + \": \" + ventasVendedora(local.sucursal[a]))\n }\n}", "title": "" }, { "docid": "fbe5987d8791318a3d53a7653900840e", "score": "0.5483965", "text": "function totalCausas(){\n var admin=0;\n var sans=0;\n var penal=0;\n var familia=0;\n for (const afl of afiliados) { \n (afl.causas);\n if (afl.causas==\"sanciones\") {\n admin++;\n }else if (afl.causas==\"Administrativo\") {\n sans++;\n }\n else if (afl.causas==\"Penal\") {\n penal++;\n }\n else if (afl.causas==\"Familia\") {\n familia++;\n }\n }\n conAdmin(admin,sans,penal,familia);\n}", "title": "" }, { "docid": "c514d865ebbe8bdcca90016fc6b83a5a", "score": "0.5374392", "text": "function getIdSeeCursos(tobyd, table) {\n $('tbody').on(\"click\", \"a.seeC\", function () {\n var data = table.row($(this).parents(\"tr\")).data();\n var fechInic = new Date(data.fech_inic).getTime();\n var fechFina = new Date(data.fech_fin).getTime();\n //Obteneindo cantidad de dias entre la fecha inicial y la fechafinal del curso\n var cantDiasGlob = (fechFina - fechInic) / (1000 * 60 * 60 * 24);\n //Obteniendo cantidad de dias entre la fecha inicial y la fecha actual\n var hoy = new Date();\n var cantDiasAct = (fechFina - hoy.getTime()) / (1000 * 60 * 60 * 24);\n console.log(cantDiasAct);\n //porcentaje de dias que han pasado entre las fechas\n var porcDiasPasa = 1 - (cantDiasAct / cantDiasGlob);\n //sacando el valor procentual de los dias\n if (porcDiasPasa < 0) {\n var porcDiasCien = (0 * 100);\n } else {\n if (porcDiasPasa > 1) {\n var porcDiasCien = (1 * 100);\n } else {\n var porcDiasCien = (porcDiasPasa.toFixed(2) * 100);\n }\n }\n //agregando width al progress de avance de proyecto\n $(\"#determinateAvance\").width(porcDiasCien + \"%\");\n //agregando cantidad de progreso\n $(\"#progresoCursoC\").text(porcDiasCien + \"% / 100%\");\n llenandoListaMaestros(data.codi_curs);\n //agregando informacion al formulario\n var codi_curs = $(\"#codiCursSee\").val(data.codi_curs),\n nomb_curs = $(\"#tituloCurso\").text(data.nomb_curs + \" (\" + data.corr_curs + \")\"),\n fech_inic = $(\"#fechasCursoInic\").text(\"Fecha Inicio del Curso : \" + data.fech_inic.split('-').reverse().join('/')),\n fech_fin = $(\"#fechasCursoFin\").text(\"Fecha Fin del Curso : \" + data.fech_fin.split('-').reverse().join('/')),\n cant_part = $(\"#cantidadParticipantes\").text(\"Cantidad de Participantes: \" + data.cant_part),\n mont_esti = $(\"#montoEstimado\").text(\"Monto Estimado: \" + data.mont_esti),\n codi_cate = $(\"#categoriaCurso\").text(\"Categoria: \" + data.nomb_cate);\n });\n\n}", "title": "" }, { "docid": "1cfd7fe7d9ab4cd7824d1599a0fde35b", "score": "0.5372187", "text": "function requestCounts() {\n (async() => {\n let result = await fetch(endPointRoot + \"queries/\")\n .then((res) => {\n if (res.ok) {\n return res.json();\n }\n })\n .then((res) => {\n res.forEach(element => console.log(element.uri));\n\n res.forEach(element => createTableObject(element.type, rootUri + element.uri, element.stat));\n })\n })();\n}", "title": "" }, { "docid": "4ae7ee53ab057fc570e05d77ce88bf62", "score": "0.5367725", "text": "function eventosLlenado() {\n //recorre la tabla creada para revisar los ckb\n revisarCkb();\n //da los eventos de guardar observaciones en valor de boton.\n darEventoObservaciones();\n //dar total \n resultadoConteo();\n\n}//fin 21", "title": "" }, { "docid": "eea07f8e28ea94dec9c36f7605e4207c", "score": "0.5352191", "text": "function renderPorSucursal(){\r\nlet porSucursal=0\r\n for (let i = 0; i < local.sucursal.length; i++) {\r\n let porSucursal= console.log('Total de ' + local.sucursal[i] + ': ' + ventasTotal(local.sucursal[i]))\r\n }\r\n return porSucursal\r\n }", "title": "" }, { "docid": "98c1e6b4d1d3441fbf3b4d10783cbf5c", "score": "0.5349718", "text": "function getServicios(req, res){\n\n var desde = req.query.desde || 0;\n desde = Number(desde);\n\n Servicio.find({ })\n .skip(desde)\n .limit(5)\n .exec( \n (err, servicios) => {\n if(err){\n return res.status(500).json({\n ok: false,\n mensaje: 'Error cargando servicio',\n errors: err\n });\n }\n\n Servicio.count({}, (err, conteo)=>{\n res.status(200).json({\n ok: true,\n servicios: servicios,\n total: conteo\n });\n });\n }); \n}", "title": "" }, { "docid": "227f6c15775c37ef1975a0b87a111cbc", "score": "0.5322122", "text": "async function getInfo(id){\n let crosswalkHistory = [];\n let numPed = 0;\n let numVeh = 0;\n const now = new Date();\n const midnight = new Date(now.getFullYear(),now.getMonth(),now.getDate());\n try{\n crosswalkHistory = await CrosswalksHistory.aggregate([\n {$match: {crosswalk_id: id}},\n {$project: {history:1}},\n {$unwind: '$history'},\n {$match: {\"history.crossedAt\": {$gte: midnight , $lt: now}}},\n {$group: {_id: { id: '$history.client.id', type: '$history.client.kind' }}},\n ]);\n crosswalkHistory.forEach(function(entry){\n if(entry._id.type == 'pedestrian'){\n numPed++;\n }\n else{\n numVeh++;\n }\n });\n }\n catch (error){\n console.log(error);\n }\n const result = {num_ped: numPed, num_veh: numVeh}\n return result;\n}", "title": "" }, { "docid": "5c340405cf950c4c937ebb8dd4eb077f", "score": "0.5318968", "text": "function modificarInspeccion(){\n Concurrent.Thread.create(obtenerValoresIniciales);\n Concurrent.Thread.create(obtenerValoresPreliminar);\n Concurrent.Thread.create(obtenerValoresProteccion);\n Concurrent.Thread.create(obtenerValoresElementos);\n Concurrent.Thread.create(obtenerValoresDefectos);\n Concurrent.Thread.create(obtenerValoresObservacionFinal);\n Concurrent.Thread.create(obtenerValoresAudios);\n Concurrent.Thread.create(obtenerValoresFotografias);\n}", "title": "" }, { "docid": "1427eb93b7801e37e4a07e9f456f9734", "score": "0.5260895", "text": "function montaValorMes () {\r\n // laco de contas\r\n for (var x in $scope.contas) {\r\n // separo a despesa\r\n var conta = $scope.contas[x];\r\n // crio um atributo pres(array) na conta\r\n conta.pres = [];\r\n \r\n // laco de meses até 8\r\n // for (var m=0; m<8; m++) {\r\n for (var m=0; m<$scope.tlmeses; m++) {\r\n var day = moment().add(m, \"M\").date(); // dia atual + 1\r\n var month = moment().add(m, \"M\").month(); // mes atual + 1\r\n var year = moment().add(m, \"M\").year(); // ano atual + 1\r\n var data = ''; // variavel data\r\n \r\n var totalParcela = (conta.parcela<10) ? '0'+conta.parcela : conta.parcela;\r\n var valorParcela = (conta.valor/conta.parcela).toFixed(2);\r\n var contaparcela = conta.parcela;\r\n\r\n // se as parcelas forem indeterminadas\r\n if (+conta.parcela === 0) {\r\n totalParcela = 'IND';\r\n valorParcela = conta.valor;\r\n contaparcela = 12;\r\n }\r\n\r\n \r\n // if (totalParcela === undefined) {\r\n // console.log(conta);\r\n // }\r\n\r\n // laco de parcelas da conta\r\n for (var p=0; p<contaparcela; p++) {\r\n var dia = moment(conta.datavencimento).add(p, \"M\").date(); // dia da data conta + index\r\n var mes = moment(conta.datavencimento).add(p, \"M\").month(); // mes data conta + index\r\n var ano = moment(conta.datavencimento).add(p, \"M\").year(); // ano data conta + index\r\n \r\n // console.log(dia + ' _ ' + mes + ' _ ' + ano);\r\n\r\n // caso o mes e ano da conta seja = ao mes e ano atual \r\n if (mes === month && ano === year) {\r\n if (conta.tipo === 'ARECEBER') {\r\n data = {\"data\": mes+\"/\"+ano, \"valor\":valorParcela, \"icon\":\"fa fa-plus\", \"ngClass\":\"entrada\"};//conta.valor};\r\n }else{\r\n data = {\"data\": mes+\"/\"+ano, \"valor\":valorParcela, \"icon\":\"fa fa-minus\", \"ngClass\":\"saida\"};//conta.valor};\r\n }\r\n // pegando a prestação atual\r\n if (m === 0) { // m = o ( mes atual )\r\n var pa = ((p+1)<10)?'0'+(p+1):(p+1);\r\n // indeterminado\r\n if (+conta.parcela === 0) {\r\n conta.parcelaAtual = totalParcela;\r\n // com parcelas\r\n }else{\r\n conta.parcelaAtual = pa+\"/\"+totalParcela;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!conta.parcelaAtual) {\r\n // se ano = atual mas mes menor ou ano menor\r\n if ( (ano === year && mes < month) || (ano < year) ) {\r\n if (+conta.parcela === 0) {\r\n conta.parcelaAtual = totalParcela;\r\n }else{\r\n conta.parcelaAtual = totalParcela+\"/\"+totalParcela;\r\n }\r\n }else{\r\n // if (+conta.parcela === 0) {\r\n // conta.parcelaAtual = totalParcela;\r\n // }else{\r\n conta.parcelaAtual = \"00/\"+totalParcela;\r\n // }\r\n }\r\n }\r\n \r\n if ( data === '' ) {\r\n conta.pres.push({\"data\": \"00/0000\", \"valor\":\"xxxx\", \"ngClass\":\"neutro\", \"icon\":\"fa-trophyx\"});\r\n }else{\r\n conta.pres.push(data);\r\n // calculando o total mensal\r\n if (conta.tipo === 'APAGAR') {\r\n $scope.totalMesDespesa[m].valor = (+$scope.totalMesDespesa[m].valor + +valorParcela).toFixed(2);\r\n }else{\r\n $scope.totalMesRecebimento[m].valor = (+$scope.totalMesRecebimento[m].valor + +valorParcela).toFixed(2);\r\n }\r\n $scope.totalMesSaldo[m].valor = (+$scope.totalMesRecebimento[m].valor + -$scope.totalMesDespesa[m].valor).toFixed(2);\r\n\r\n }\r\n }\r\n \r\n if (conta.tipo === 'APAGAR') {\r\n $scope.totalDespesa = (+$scope.totalDespesa + +conta.valor).toFixed(2);\r\n }else{\r\n $scope.totalRecebimento = (+$scope.totalRecebimento + +conta.valor).toFixed(2);\r\n }\r\n \r\n $scope.totalSaldo = (+$scope.totalRecebimento - +$scope.totalDespesa).toFixed(2);\r\n }\r\n setUpDownMes();\r\n }", "title": "" }, { "docid": "71d777962f79c0b3f9e6a7f1e1a9d425", "score": "0.52419066", "text": "function atualizaLista() {\n query.exec(function (err, codigosProdutos) {\n if (err)\n return console.log(err);\n codigosProdutos.forEach(function (codigoProduto) {\n \n codigoParaPut = JSON.stringify(codigoProduto).split(\"[\").join(\"\").split(\"]\").join(\"\");\n console.log(\"Numero de vezes: \" + inc);\n \n \n produto[inc] = JSON.parse(codigoParaPut).input;\n inc++;\n });\n \n \n });\n \n }", "title": "" }, { "docid": "dddd7f65ec01a72ba04e2b6f31f894b1", "score": "0.5237435", "text": "function counter() {\n collection.forEach(function(eli, ind, arr){\n continentCounter(eli);\n });\n}", "title": "" }, { "docid": "d2f705ea7106ff3f8a90c451a3fc0716", "score": "0.5231699", "text": "iniciarCalculoMora () {\n //como no tiene id prestamo o cliente, no se puede calcular comportamiento plan pago, agregar mensaje bitacora // si verificarComportamientoPago == false\n if( tamanoActualBandera == tamanoFinalBandera ) {\n guardarUnicaVez = false;\n guardarTipoCredito = false, guardarCategoriaClasificacion = false, guardarMora = false, guardarCriterioDeterioro = false;\n /*for (var i = 0; i < this.state.tablasOrginales.length; i++) {\n this.fetchDataComportamientoPago(this.state.tablasOrginales[i].ID);\n };*/\n //comportamientoPagoBanderas = [], tiposCreditosBanderas = [], categoriasClasificacionBanderas\n comportamientoPagoBanderas = [];\n for (var i = 0; i < comportamientoPagoSeleccionados.length; i++) {\n comportamientoPagoBanderas.push(false);\n this.getPrestamoTablaComportamientoPago(comportamientoPagoSeleccionados[i], i);\n }\n if(comportamientoPagoSeleccionados.length == 0) {\n this.initWebWorkerComportamientoPago(null, null, null, null, null, null, false, null);\n }\n }\n }", "title": "" }, { "docid": "496aad51c09b51a1f3ba966485ca7fad", "score": "0.5206619", "text": "fetchPerformance() {\n var vm = this;\n let key;\n\n this.fullClear();\n\t\t\tthis.perfomanceClear();\n\n axios.get('api/performance', {\n params: {\n \tyear: vm.filter.year,\n employee: vm.filter.employee \n }\n })\n .then(function (response) { \n \t//console.log(response.data) \n \tif(response.data.length != 0){\n \tvm.pTable = response.data; \n\t\t\t\t\t\tvm.pTableTotal = vm.calculateTotalColumn(false); \n\t\t\t\t\t\tvm.tTable = vm.getTotalTable();\n\t\t\t\t\t\tvm.tTableTotal = vm.calculateTotalColumn(true);\n\t\t\t\t\t\tvm.loadFormValues();\t\t\t\t\t\t\t\t\t\t\t\n \t} \t\n })\n .catch(function (error) {\t \n \tvm.showErrors(error.response.data)\n });\n }", "title": "" }, { "docid": "39a507d3ae51a7e8eec5259866f3e8e4", "score": "0.5203132", "text": "listadoCompleto() {\n /* Obtiene las llaves del objeto y lo recorre */\n Object.keys(this._listado).forEach( (key,index) => {\n this.printTarea(index, this._listado[key]);\n });\n }", "title": "" }, { "docid": "abc0c594666d449b3a00d5e2735e17d0", "score": "0.5202688", "text": "listaEstadosFluxo(res) {\n const sql = `\n select sum(1) as total,\n concat(fase_anterior, 'ª fase: ', estado_anterior ) as origem,\n concat(fase_atual, 'ª fase: ',estado_atual ) as destino\n\n from (\n select anterior.*,\n pa.fase as fase_atual, e.nome estado_atual, a.nome nome_atual, pa.time_id_vencedor as time_atual\n from (\n select p.fase as fase_anterior, e.nome estado_anterior, a.nome nome_anterior, p.time_id_vencedor as time_anteriro\n from partidas as p\n inner join arenas a on (a.arena_id = p.arena_id)\n inner join estados e on (e.estado_id = a.estado_id)\n ) as anterior\n inner join partidas pa on ((pa.time_id_A = anterior.time_anteriro or pa.time_id_B = anterior.time_anteriro) and pa.fase = anterior.fase_anterior+1)\n inner join arenas a on (a.arena_id = pa.arena_id)\n inner join estados e on (e.estado_id = a.estado_id)\n ) as partidas group by estado_anterior, estado_atual, fase_anterior, fase_atual `\n conexao.query(sql, (erro, resultados) => {\n if(erro) {\n res.status(400).json(erro)\n } else {\n res.status(200).json(resultados)\n }\n })\n }", "title": "" }, { "docid": "9649471fe067ec8c08ee70c61a967e38", "score": "0.51956016", "text": "function countTasks() {\n var allTasks = 0;\n for (var key in data) {\n allTasks = allTasks + data[key].length; // sumuje ilosc zadan w kazdym dniu\n };\n allTaskcounterBox.html(allTasks); // dodawanie ilosci zadan we wszystkich dniach\n counter.html(taskList.children().length); // dodawanie ilosci zadan w jednym, wybranym dniu\n }", "title": "" }, { "docid": "22cc280374377fb42de57e06d5c07344", "score": "0.5194563", "text": "async obtenerHistorialListadoUsuarios() {\n\t\tlet resultados = {};\n\t\tconst instruccionSQL = `\nSELECT\n\tusuario::text,\n\ttiempo::timestamptz\nFROM monitorizacion_usuarios\nWHERE (\n\tid = $1\n)\nORDER BY tiempo`;\n\n\t\ttry {\n\t\t\tresultados = await baseDatos.query(instruccionSQL, [ this.id ]);\n\t\t\tthis.historial.usuarios = resultados.rows;\n\t\t} catch (_e) {}\n\t}", "title": "" }, { "docid": "04dc86ed9208f52d6393189b119f51dd", "score": "0.5179918", "text": "async function generarHistorial(anio, saLarioAnual, cliente, tramite, banco, aportacionVol) {\n // el salario se divide en 3\n const salarioPeriodico = getSumaAleatoria(saLarioAnual,3);\n const anioA = anio - 1;\n let facturaAnterior = await Factura.findOne({anio: anioA, periodoN: 3, cliente: cliente});\n console.log(`anio del tramite: ${anio}`,facturaAnterior);\n const fac1 = await crearFactura(anio,cliente,1,salarioPeriodico[0],tramite,banco,aportacionVol,facturaAnterior);\n const fac2 = await crearFactura(anio,cliente,2,salarioPeriodico[1],tramite,banco,0,fac1);\n const fac3 = await crearFactura(anio,cliente,3,salarioPeriodico[2],tramite,banco,0,fac2);\n}", "title": "" }, { "docid": "50e04c623d9c0b0d168f339577657224", "score": "0.5158553", "text": "function detalleVehiculos(listaVehiculos) {\n let printConsola = '';\n for (let vehiculo of listaVehiculos) {\n printConsola += `${toCapitalize(Object.keys(vehiculo)[0])}: ${\n vehiculo.marca\n } // ${toCapitalize(Object.keys(vehiculo)[1])}: ${\n vehiculo.modelo\n } // ${toCapitalize(Object.keys(vehiculo)[2])}: ${\n Object.values(vehiculo)[2]\n } // ${toCapitalize(Object.keys(vehiculo)[3])}: $${vehiculo.precio.toFixed(\n 2\n )}\n `;\n }\n printConsola += '=============================';\n printConsola += `\n Vehículo más caro: ${masCaro(listaVehiculos)}\n Vehículo más barato: ${masBarato(listaVehiculos)}\n Vehiculo que contiene en el modelo la letra 'Y': ${modeloLetraY(\n listaVehiculos\n )}\n `;\n printConsola += '=============================';\n printConsola += `\n Vehículos ordenados por precio de mayor a menor: ${precioMayorAMenor(\n listaVehiculos\n )}`;\n\n console.log(printConsola);\n}", "title": "" }, { "docid": "493e982c91aadf3da7843d00756c9d45", "score": "0.51580566", "text": "function refresh() {\n this.pedidosEvaluacion = Pedidos.query({\n e: this.user.enterprise.enterprise,\n tipoPedido: this.tipoPedido,\n estado: 'pendiente evaluacion',\n p: 0,\n pcount: 20\n });\n this.pedidosRealizados = Pedidos.query({\n e: this.user.enterprise.enterprise,\n tipoPedido: this.tipoPedido,\n estado: 'pendiente aprobacion',\n p: 0,\n pcount: 20\n });\n this.pedidosAprobados = Pedidos.query({\n e: this.user.enterprise.enterprise,\n tipoPedido: this.tipoPedido,\n estado: 'aprobada',\n p: 0,\n pcount: 20\n });\n this.pedidosRechazados = Pedidos.query({\n e: this.user.enterprise.enterprise,\n tipoPedido: this.tipoPedido,\n estado: 'rechazada',\n p: 0,\n pcount: 20\n });\n this.pedidosBorrador = Pedidos.query({\n e: this.user.enterprise.enterprise,\n tipoPedido: this.tipoPedido,\n estado: 'borrador',\n p: 0,\n pcount: 20\n });\n\n }", "title": "" }, { "docid": "e8574281a5e7577fcc02c10fb75fb0cb", "score": "0.5156499", "text": "function contaMetas(dadosNovos){\n setTimeout(function(){\n var x = dadosNovos;\n //dados horas e minutos\n //horas\n var inicioHors = x.indexOf(\"oras\") + 4;\n var finalHors = x.indexOf(\"minutos\");\n var corteHors = x.slice(inicioHors, finalHors);\n //minutos\n var inicioMin = x.indexOf(\"utos\") + 4;\n var finalMin = x.indexOf(\"revisitas\");\n var corteMin = x.slice(inicioMin, finalMin);\n var aux = corteMin / 60;//conta os minutos e somar nas horas\n if (aux >= 1) {\n corteHors = (parseInt(corteHors) + parseInt(aux));\n }\n //dados revisitas\n var inicioRevis = x.indexOf(\"itas\")+4;\n var finalRevis = x.indexOf(\"revistas\");\n var corteRevis = x.slice(inicioRevis, finalRevis);\n //dados revistas\n var inicioRev = x.indexOf(\"stas\")+4;\n var finalRev = x.indexOf(\"livros\");\n var corteRev = x.slice(inicioRev, finalRev);\n //dados livros\n var inicioLivr = x.indexOf('vros')+4;\n var finalLivr = x.indexOf('broxuras');\n var corteLivr = x.slice(inicioLivr, finalLivr);\n //dados broxuras\n var inicioBrox = x.indexOf('uras')+4;\n var finalBrox = x.length;\n var corteBrox = x.slice(inicioBrox, finalBrox);\n \n //var totGeral = (parseInt(corteRevis) + parseInt(corteRevs) + parseInt(corteLivr) + parseInt(corteBrox));//talvez fazer um progresso geral com media de tudo dividido por 100%...\n if (x) {\n var idMes = document.getElementById('mensalMeta');\n //progresso meta ano / hora\n function atualizaHoraMes() {\n //selecao dos dados\n var y = idMes.value;\n var inicioMesHors = y.indexOf('Horas pretendidas: ')+19;\n var finalMesHors = y.indexOf('Revisitas');\n var corteMesHors = y.slice(inicioMesHors, finalMesHors);\n //atualizacao hora\n var elemHora = document.getElementById('progressHoraMes');\n \n //Calculo enorme para pegar a porcentagem certa\n if(corteHors > corteMesHors){\n var progresso = Number(corteHors) * 100 / Number(corteMesHors);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n if(barraHora >= 100){\n var barraHoraPositivo = 100; \n }else{\n var barraHoraPositivo = barraHora;\n }\n }else if(corteMesHors > corteHors){\n var progresso = Number(corteMesHors) * 100 / Number(corteHors);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = 100 - Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n var barraHoraPositivo = Math.abs(barraHora);\n }\n var progressoWidth = 0;\n var barra = setInterval(frame, 65);//seta o intervalo da funcao frame para 65 microsegundos\n function frame() {\n if (progressoWidth >= barraHoraPositivo){\n clearInterval(barra);\n }else{\n progressoWidth++;\n elemHora.style.width = progressoWidth + '%';\n //por o numero horas feitas em cima da barra\n elemHora.innerHTML = progressoWidth * 1 + '%';\n }\n }\n }\n function atualizaReviMes() {\n //selecao dos dados\n var y = idMes.value;\n var inicioMesRevi = y.indexOf('Revisitas pretendidas: ') + 23;\n var finalMesRevi = y.indexOf('Revistas');\n var corteMesRevi = y.slice(inicioMesRevi, finalMesRevi);\n //atualizacao revisitas\n var elemRevi = document.getElementById('progressReviMes');\n\n //Calculo enorme para pegar a porcentagem certa\n if(corteRevis > corteMesRevi){\n var progresso = Number(corteRevis) * 100 / Number(corteMesRevi);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n if(barraHora >= 100){\n var barraPositivo = 100; \n }else{\n var barraPositivo = barraHora;\n }\n }else if(corteMesRevi > corteRevis){\n var progresso = Number(corteMesRevi) * 100 / Number(corteRevis);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = 100 - Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n var barraPositivo = Math.abs(barraHora);\n }\n var progressoWidth = 0;\n var barra = setInterval(frame, 65);//seta o intervalo da funcao frame para 65 microsegundos\n function frame() {\n if (progressoWidth >= barraPositivo){\n clearInterval(barra);\n }else{\n progressoWidth++;\n elemRevi.style.width = progressoWidth + '%';\n elemRevi.innerHTML = progressoWidth * 1 + '%';\n }\n }\n }\n function atualizaRevMes() {\n //selecao dos dados\n var y = idMes.value;\n var inicioMesRev = y.indexOf('Revistas pretendidas: ') + 22;\n var finalMesRev = y.indexOf('Livros');\n var corteMesRev = y.slice(inicioMesRev, finalMesRev);\n //atualizacao revistas\n var elemRev = document.getElementById('progressRevMes');\n\n //Calculo enorme para pegar a porcentagem certa\n if(corteRev > corteMesRev){\n var progresso = Number(corteRev) * 100 / Number(corteMesRev);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n if(barraHora >= 100){\n var barraPositivo = 100; \n }else{\n var barraPositivo = barraHora;\n }\n }else if(corteMesRev > corteRev){\n var progresso = Number(corteMesRev) * 100 / Number(corteRev);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = 100 - Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n var barraPositivo = Math.abs(barraHora);\n }\n var progressoWidth = 0;\n var barra = setInterval(frame, 65);//seta o intervalo da funcao frame para 65 microsegundos\n function frame() {\n if (progressoWidth >= barraPositivo){\n clearInterval(barra);\n }else{\n progressoWidth++;\n elemRev.style.width = progressoWidth + '%';\n elemRev.innerHTML = progressoWidth * 1 + '%';\n }\n }\n }\n function atualizaLivrMes() {\n //selecao dos dados\n var y = idMes.value;\n var inicioMesLivr = y.indexOf('Livros pretendidos: ') + 20;\n var finalMesLivr = y.indexOf('Broxuras');\n var corteMesLivr = y.slice(inicioMesLivr, finalMesLivr);\n //atualizacao livros\n var elemLivr = document.getElementById('progressLivrMes');\n\n //Calculo enorme para pegar a porcentagem certa\n if(corteLivr > corteMesLivr){\n var progresso = Number(corteLivr) * 100 / Number(corteMesLivr);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n if(barraHora >= 100){\n var barraPositivo = 100; \n }else{\n var barraPositivo = barraHora;\n }\n }else if(corteMesLivr > corteLivr){\n var progresso = Number(corteMesLivr) * 100 / Number(corteLivr);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = 100 - Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n var barraPositivo = Math.abs(barraHora);\n }\n var progressoWidth = 0;\n var barra = setInterval(frame, 65);//seta o intervalo da funcao frame para 65 microsegundos\n function frame() {\n if (progressoWidth >= barraPositivo){\n clearInterval(barra);\n }else{\n progressoWidth++;\n elemLivr.style.width = progressoWidth + '%';\n elemLivr.innerHTML = progressoWidth * 1 + '%';\n }\n }\n }\n function atualizaBroxMes() {\n //selecao dos dados\n var y = idMes.value;\n var inicioMesBrox = y.indexOf('Broxuras pretendidas: ') + 22;\n var finalMesBrox = y.length;\n var corteMesBrox = y.slice(inicioMesBrox, finalMesBrox);\n //atualizacao broxuras\n var elemBrox = document.getElementById('progressBroxMes');\n\n //Calculo enorme para pegar a porcentagem certa\n if(corteBrox > corteMesBrox){\n var progresso = Number(corteBrox) * 100 / Number(corteMesBrox);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n if(barraHora >= 100){\n var barraPositivo = 100; \n }else{\n var barraPositivo = barraHora;\n }\n }else if(corteMesBrox > corteBrox){\n var progresso = Number(corteMesBrox) * 100 / Number(corteBrox);//calcula a porcentagem 1º do valor da meta, e 2º do valor cumprido!\n var barraHora = 100 - Math.round(progresso);//subtrai para achar quanto de 100 foi feito\n var barraPositivo = Math.abs(barraHora);\n console.log(barraPositivo);\n }\n var progressoWidth = 0;\n var barra = setInterval(frame, 65);//seta o intervalo da funcao frame para 65 microsegundos\n function frame() {\n if (progressoWidth >= barraPositivo){\n clearInterval(barra);\n }else{\n progressoWidth++;\n elemBrox.style.width = progressoWidth + '%';\n elemBrox.innerHTML = progressoWidth * 1 + '%';\n }\n }\n }\n idMes.addEventListener(\"change\", atualizaHoraMes);\n idMes.addEventListener(\"change\", atualizaReviMes);\n idMes.addEventListener(\"change\", atualizaRevMes);\n idMes.addEventListener(\"change\", atualizaLivrMes);\n idMes.addEventListener(\"change\", atualizaBroxMes);\n }\n\n\n\n\n //dados videos x\n var inicioVideo = x.indexOf(\"\")+4;\n var finalVideo = x.indexOf(\"\");\n var corteVideo = x.slice(inicioVideo, finalVideo);\n if (x) {\n //document.querySelector('div#mostrVideo').innerHTML = corteVideo;\n }\n }, 1000);\n}", "title": "" }, { "docid": "b29720cca51059a1ff026613ce5babc4", "score": "0.51540625", "text": "function caricaelencoScrittture() {\n $.postJSON(baseUrl + \"_ottieniListaConti.do\", {}, function(data) {\n var listaMovimentiPerTabella;\n if(impostaDatiNegliAlert(data.errori, alertErrori)) {\n // Svuoto la select ed esco\n return;\n }\n\n if (data.isContiCausale) {\n listaMovimentiPerTabella = data.listaElementoScritturaPerElaborazione;\n popolaTabella(listaMovimentiPerTabella);\n $(\"#totaleDare\").html(data.totaleDare);\n $(\"#totaleAvere\").html(data.totaleAvere);\n\n }\n });\n }", "title": "" }, { "docid": "242eecd47647c9f10b6f089f66b3b4bb", "score": "0.51412797", "text": "compute(filtered = false) {\n let countDownFiles = 0;\n let datasetCount = 0;\n let sumExistenceDate = 0; //exda - Average\n let sumExistenceDiscovery = 0; //exdi Average\n let sumExistenceContact = 0; //exco BOOLEAN MAX\n let sumConformanceLicense = 0; //coli BOOLEAN\n let sumConformanceDateFormat = 0;//coda NUMBER\n let sumConformanceAccess = 0; //coac BOOLEAN\n let sumOpendataOpenFormat = 0;//opfo NUMBER\n let sumOpendataMachineRead = 0; //opma NUMBER\n\n\n const dirPath = `./dados/${this._snapshot}/${this._portalId}/${filtered ? 'filter' : ''}`;\n fs.readdir(dirPath, function (e, files) {\n if (e) {\n console.error(colors.red(e));\n global.log.error(e);\n } else {\n countDownFiles = files.length;\n files.forEach(function (f) {\n if (fs.statSync(path.join(dirPath, f)).isFile()) {\n const regEx = /^datasets-[A-z]+-(.*?).json$/;\n const match = regEx.exec(f);\n if (match != null) {\n datasetCount++;\n fs.readFile(path.join(`./dados/${this._snapshot}/${this._portalId}/metrics/`, `${match[1]}.json`), 'UTF-8', function (e, data) {\n if (e) {\n console.error(`Leitura de ${path.join(dirPath, f)}`, colors.red(e));\n global.log.error(e);\n throw e;\n }\n let metrics = JSON.parse(data);\n sumExistenceDate += metrics.exda;\n sumExistenceDiscovery += metrics.exdi;\n sumExistenceContact += metrics.exco ? 1 : 0;\n sumConformanceLicense += metrics.coli ? 1 : 0;\n sumConformanceDateFormat += metrics.coda;\n sumConformanceAccess += metrics.coac ? 1 : 0;\n sumOpendataOpenFormat += metrics.opfo;\n sumOpendataMachineRead += metrics.opma;\n\n countDownFiles--;\n if (countDownFiles == 0) {\n this._existenceDate = sumExistenceDate / datasetCount;\n this._existenceDiscovery = sumExistenceDiscovery / datasetCount;\n this._existenceContact = sumExistenceContact / datasetCount;\n this._conformanceLicense = sumConformanceLicense / datasetCount;\n this._conformanceDateFormat = sumConformanceDateFormat / datasetCount;\n this._conformanceAccess = sumConformanceAccess / datasetCount;\n this._opendataOpenFormat = sumOpendataOpenFormat / datasetCount;\n this._opendataMachineRead = sumOpendataMachineRead / datasetCount;\n console.log(colors.yellow(this._portalId), `${filtered ? '(filtrado)'.yellow : ''}:`, datasetCount);\n console.log('Existence Date: ', this._existenceDate);\n console.log('Existence Discovery: ', this._existenceDiscovery);\n console.log('Existence Contact: ', this._existenceContact);\n console.log('Conformance License: ', this._conformanceLicense);\n console.log('Conformance Date Format: ', this._conformanceDateFormat);\n console.log('Conformance Access: ', this._conformanceAccess);\n console.log('Opendata Open Format: ', this._opendataOpenFormat);\n console.log('Opendata Machine Read: ', this._opendataMachineRead);\n }\n }.bind(this));\n }\n } else {\n countDownFiles--;\n }\n }.bind(this))\n\n }\n }.bind(this))\n }", "title": "" }, { "docid": "063dceb9be41172a6e9b5c9d8a8acbd4", "score": "0.5133337", "text": "function bloqueado(principal,processes){\r\n for(var i = 0; i< principal;i++){\r\n principal[i].bloqueado = 0;\r\n for (var x = 0; x< processes.length;x++){\r\n if(principal[i].Id === processes[x].Id){\r\n\r\n }else{\r\n principal[i].bloqueado += (processes[x].final- processes[x].inicio);\r\n console.log(principal[i].bloqueado);\r\n }\r\n }\r\n }\r\n return principal;\r\n}", "title": "" }, { "docid": "b4b38da9855b822bb36d6317e96f28ec", "score": "0.51327586", "text": "listaTimesPrimeiraKill(res) {\n const sql = `\n select * from (\n select t.nome, t.logo_angular, sum(1) as first_kills from (\n select j.time_id, IF(p.time_id_vencedor=j.time_id, 1, 0) as venceu from rounds r\n inner join rounds_jogadores_armas rja on (rja.round_id = r.round_id)\n inner join kills k on (k.round_jogador_arma_id = rja.round_jogador_arma_id)\n inner join jogadores j on (j.jogador_id = rja.jogador_id)\n inner join partidas p on (p.partida_id = rja.partida_id)\n group by r.round_id\n ) as kill_1_time\n inner join times t on (t.time_id = kill_1_time.time_id)\n group by t.time_id\n ) as kill_1_time order by first_kills desc, nome limit 20`\n conexao.query(sql, (erro, resultados) => {\n if(erro) {\n res.status(400).json(erro)\n } else {\n res.status(200).json(resultados)\n }\n })\n }", "title": "" }, { "docid": "6e82b7b95be4c66cf59087e33d282d88", "score": "0.51307875", "text": "function ejercicio4_5 () {\nlet porcentajePeliEstrenada = 0\nlet peliSinEstrenar = 0\nlet contPelis = 0\nmovies.forEach((movies) => {\n\n contPelis++\n\n if (movies.ComingSoon) {\n peliSinEstrenar ++\n }\n \n })\n porcentajePeliEstrenada = (peliSinEstrenar *100)/contPelis\n console.log(\"el total de películas es : \",contPelis)\n console.log(\"el total de películas sin estrenar es : \",peliSinEstrenar)\n console.log(\"el % de películas sin estrenar es : \",porcentajePeliEstrenada.toFixed(2),\"%\") \n}", "title": "" }, { "docid": "2f57f5ff2c3f5370ed8422577b6cc2d1", "score": "0.5129965", "text": "function calcularHorariosDisponibles(horarios, horarioAtencion) {\n var horariosDisponibles = [];\n\n //Hora Inicial de horarios disponibles\n var horaIni = horarioAtencion.horaInicio;\n //Hora Final de horarios disponibles\n var horaTer = horarioAtencion.horaFin;\n\n for (var i = 0; i < horarios.length; i++) {\n if (horarios[i].horaInicio == horarioAtencion.horaInicio) {\n horaIni = horarios[i].horaFin;\n } else {\n var objeto = {};\n if (horaIni != horarios[i].horaInicio) {\n objeto.horaInicio = horaIni;\n objeto.horaFin = horarios[i].horaInicio;\n\n horariosDisponibles[horariosDisponibles.length] = objeto;\n horaIni = horarios[i].horaFin;\n } else {\n horaIni = horarios[i].horaFin;\n }\n\n }\n\n }\n\n if (horaIni != horaTer) {\n var objeto = {\n horaInicio: horaIni,\n horaFin: horaTer\n };\n horariosDisponibles[horariosDisponibles.length] = objeto;\n }\n\n return horariosDisponibles;\n}", "title": "" }, { "docid": "deeca37835df34c03fd98b93c0c0440a", "score": "0.51070094", "text": "async generateReport() {\n\n let json = {}\n\n for(var db of this.db.sort((a, b) => Number(a.id) - Number(b.id))) {\n\n let stats = await db.fileData.collection.stats()\n\n json[`Cluster-${db.id}`] = {\n files: stats.count,\n size: `${((stats.storageSize / 1024) / 1024).toFixed(2)} Mb`,\n totalIndexSize: stats.totalIndexSize\n }\n\n }\n\n return json\n\n }", "title": "" }, { "docid": "3344f9edfab2eaca4368839394ac27f5", "score": "0.5104678", "text": "function getCuentas(callback) {\n\tvar criterio = {$or: [\n \t {$and: [\n\t \t{'datosMonitoreo' : {$exists : true}},\n \t\t{'datosMonitoreo' : {$ne : ''}},\n \t\t{'datosMonitoreo.id' : {$ne : ''}}\n \t ]},\n \t {$and: [\n \t\t{'datosPage' : {$exists : true}},\n\t\t{'datosPage': {$ne : ''}},\n\t\t{'datosPage.id' : {$ne : ''}}\n \t ]}\n \t]};\n\tvar elsort = { nombreSistema : 1 };\n \tclassdb.buscarToStream('accounts', criterio, elsort, 'solicitudes/getof/getCuentas', function(cuentas){\n\t if (cuentas === 'error') {\n\t\treturn callback(cuentas);\n\t }\n\t else {\n\t\trefinaCuentas(cuentas, 0, [], function(refinadas){\n\t\t return callback(refinadas);\n\t\t});\n\t }\n\t});\n }", "title": "" }, { "docid": "fef7671989aa356c14e680791f8166b8", "score": "0.5094494", "text": "reiniciarConteo(){\n this.ultimo = 0;\n this.tickets = [];\n this.ultimos4 = [];\n this.guardarDatos();\n console.log('Nuevo dia a empezar echandole ganas');\n \n}", "title": "" }, { "docid": "03575749153ff4b037791bfe9e62d359", "score": "0.50912833", "text": "fetchAllData(){\n // clear current prosumerData list\n this.prosumerData = new Array()\n var query = `query { \n simulate {\n consumption\n wind\n }\n \n }`\n\n this.prosumerList.forEach( pro => {\n fetchFromSim(query).then( (data) => {\n // structure of returned data: data['data']['simulate']['getWind']\n this.prosumerData.push(\n {\n \"id\": pro.id,\n \"consumption\": data.data.simulate.consumption,\n \"wind\": data.data.simulate.wind\n }\n )\n })\n })\n }", "title": "" }, { "docid": "204198b2b7224a3c4e14ff91278230d4", "score": "0.5083986", "text": "function actualizarCarrito() {\n contadorCarrito.innerText = carritoDeCompras.reduce((acc , el)=> acc + el.cantidad, 0);\n precioTotal.innerText = carritoDeCompras.reduce((acc, el) => acc + (el.precio * el.cantidad), 0);\n }", "title": "" }, { "docid": "b01db886f901789b5ddedf90ce266831", "score": "0.50812936", "text": "async function resumenEntradaGeneral(req,res){\n var fecha = new Date(new Date().getFullYear() +'-'+ (new Date().getMonth()+1) +'-' + (new Date().getDate()+1));\n fecha.setHours('00');\n try{\n var resumen = await AsistenciaMdl.aggregate([{$match:{\"fecha\":fecha}},{$group:{ \"_id\":\"$resumen.reporte\" , \"total\":{$sum:1}}}]);\n res.status(200).send(resumen);\n }catch(err){\n res.status(500).send({message:\"Error en la base de datos\"});\n }\n}", "title": "" }, { "docid": "ae921d2ee1e8c3abca4f8fc01e7ad058", "score": "0.50781345", "text": "function desaparecerRepetidos(){\n sustituirCero(obtenerRepetidos());\n }", "title": "" }, { "docid": "e89c7364c138b4c6f661bb2dd3e02c5a", "score": "0.50750077", "text": "function obterDados (req, res) {\n\t//var inicio = utils.getDateFromOnePatternToAnother(i, \"DD/MM/YYYY HH:mm:ss\", \"YYYY-MM-DD HH:mm:ss\");\n//\tvar fim = utils.getDateFromOnePatternToAnother(f, \"DD/MM/YYYY HH:mm:ss\", \"YYYY-MM-DD HH:mm:ss\");\n\n/*\tmodels.enduro.findAll({\n\t\twhere: {\n\t\t\tdatahora: {\n\t\t\t\t$gte: inicio,\n\t\t\t\t$lte: fim\n\t\t\t}\n\t\t}\n\t}).then(function (medicoes) {\n\t\tres.status(200).json(medicoes);\n\t});*/\n\n\tvar dados = {\n\t\t\"versao\": \"vbeta\",\n\t\t\"nome\": \"Enduro à pé\",\n\t\t\"tempo\": \"12:32\",\n\t\t\"iniciou\": \"true\",\n\t\t\"acabou\": \"false\",\n\t\t\"equipes\": [\n\t\t\t{\n\t\t\t\t\"id\": \"1\",\n\t\t\t\t\"nome\": \"alface\",\n\t\t\t\t\"checkpoints\": \"4\",\n\t\t\t\t\"pontos\": \"22\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"id\": \"2\",\n\t\t\t\t\"nome\": \"pomba\",\n\t\t\t\t\"checkpoints\": \"4\",\n\t\t\t\t\"pontos\": \"28\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"id\": \"3\",\n\t\t\t\t\"nome\": \"curucucus\",\n\t\t\t\t\"checkpoints\": \"3\",\n\t\t\t\t\"pontos\": \"22\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"id\": \"4\",\n\t\t\t\t\"nome\": \"info\",\n\t\t\t\t\"checkpoints\": \"7\",\n\t\t\t\t\"pontos\": \"20\"\n\t\t\t}\n\t\t]\n\t};\n\tres.status(200).json(dados);\n}", "title": "" }, { "docid": "ed46c38099eea5d3f6d3eef52b0721f2", "score": "0.50713277", "text": "async listarCloud(caminho, { filter, fields }) {\n let result = {\n hasNext: false\n };\n\n let offset = 0;\n let limit = 25;\n let hasNext = true;\n let arrayTotal = []\n\n while(hasNext) {\n await apiFonteScript.get('/'+ caminho, { \n params: {\n offset,\n limit,\n filter,\n fields\n } \n }).then(function (response) {\n result = response.data\n\n result.content.forEach(i => { \n arrayTotal.push(i)\n });\n })\n .catch(function (error) {\n result.hasNext = false;\n })\n\n offset += limit\n\n hasNext = result.hasNext\n } \n\n return arrayTotal\n }", "title": "" }, { "docid": "cdcf5203c45ba85343b2a97f2447ff4f", "score": "0.50677943", "text": "function getCasosRechazados(req, res) {\n //verifica token y usuario\n if(req.query.token == \"undefined\" || !auth.autentificarAccion(req.query.token)){\n res.status(100)\n res.json({ error: true , casos: []})\n return\n }\n //pide de la BD todos los perfiles\n casoRechazadoModel.find().sort({rechazo: -1})\n .exec((err, casos) => {\n if (err) {\n res.status(500)\n res.json({error:true})//error\n }\n res.status(200)\n res.json({error:false, casos: casos})//exito\n })\n}", "title": "" }, { "docid": "8664979bd89aaf17801401ba43a773ec", "score": "0.5067224", "text": "function getDados(){\r\n\r\n\t\t\t\t\t$scope.chartOptions = {\r\n\t\t\t\t\t\t\ttooltipTemplate: \"<%=label + ': R$ ' + Chart.moneyFormat(value) %>\",\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar basicQuerys = [\"disable=0\",\"baixada=1\",\"valor>0\"];\r\n\r\n\t\t\t\t\tvar basicInfo = {\r\n\t\t\t\t\t\t\tcolumns:\"dataBaixa,sum(valor)\",\r\n\t\t\t\t\t\t\tobjeto:\"Movimentacao\",\r\n\t\t\t\t\t\t\tgroupBy:\"month(dataBaixa)\",\r\n\t\t\t\t\t\t\textra: \" order by dataBaixa asc\"\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbasicQuerys.push(dateUtil.getQueryOfPeriod(\"dataBaixa\",$scope.de||new Date(),$scope.ate||new Date()));\r\n\r\n\t\t\t\t\t//Receitas (tipo=2)\r\n\t\t\t\t\tbasicInfo.qs = angular.copy(basicQuerys);\r\n\t\t\t\t\tbasicInfo.qs.push(\"tipo=2\");\r\n\t\t\t\t\tstService.getProjecoes(basicInfo).success(function(respReceitas){\r\n\r\n\t\t\t\t\t\tvar projReceitas=respReceitas.itens;\r\n\r\n\t\t\t\t\t\t//Desepsas (tipo=1)\r\n\t\t\t\t\t\tbasicInfo.qs = angular.copy(basicQuerys);\r\n\t\t\t\t\t\tbasicInfo.qs.push(\"tipo=1\");\r\n\t\t\t\t\t\tstService.getProjecoes(basicInfo).success(function(respDespesas){\r\n\r\n\t\t\t\t\t\t\tvar projDespesas=respDespesas.itens;\r\n\t\t\t\t\t\t\tvar proj = getProjsBalanco($scope.de,$scope.ate,projReceitas,projDespesas)\r\n\t\t\t\t\t\t\tconsole.log(\"Projecoes\");\r\n\t\t\t\t\t\t\tconsole.log(proj);\r\n\r\n\r\n\t\t\t\t\t\t\t$scope.proj = proj;\r\n\r\n\t\t\t\t\t\t})\r\n\r\n\t\t\t\t\t})\r\n\r\n\t\t\t\t}", "title": "" }, { "docid": "37de5d94dc42342ac8c1ce820f15c913", "score": "0.50589645", "text": "function requestsPerConsumer() {\n const queryString = `SELECT fk_consumer_authenticated_entity AS consumer,\n COUNT (fk_consumer_authenticated_entity)\n FROM requests\n GROUP BY fk_consumer_authenticated_entity`;\n db.query(queryString, (err, res) => {\n if (err) {\n throw err;\n } else {\n csvHelper.generateCSV(\"consumerRequests\", res.rows);\n }\n });\n}", "title": "" }, { "docid": "b8f1dfd8e2e3ad72c340a1763794edd2", "score": "0.50571233", "text": "perfomanceClear(){\n\t\t\tthis.pTable = [];\n\t\t\tthis.pTableTotal = []; \n\t\t\tthis.tTable = [];\n\t\t\tthis.tTableTotal = [];\n\t\t}", "title": "" }, { "docid": "3d5de3d8c934406fe43e42c84661fc5b", "score": "0.50512326", "text": "mahasiswa() {\n let counter = 1;\n for(let mahasiswa of listMahasiswa) {\n console.log();\n console.log(`Mahasiswa ke-${counter}`);\n mahasiswa.printData();\n console.log();\n counter++;\n }\n }", "title": "" }, { "docid": "d852365350d93fbe8cd91c2a464918a1", "score": "0.5044886", "text": "countAll() {\n let sqlRequest = \"SELECT COUNT(*) AS count FROM trades\";\n return this.common.findOne(sqlRequest);\n }", "title": "" }, { "docid": "3aa5631104799bacc0f4f4b69cf93ea2", "score": "0.50376856", "text": "desencolarTotal()\r\n { \r\n while(this.desencolar() !== null)\r\n {\r\n this.desencolar();\r\n }\r\n console.log(\"El total de la fila se a desencolado\");\r\n }", "title": "" }, { "docid": "921c1efe21a25ee8aab3eabb5b0752c3", "score": "0.50329846", "text": "function mesEscrito (mes){\n for(let i = diaDeComienzo(); i>0; i--){\n fechas.innerHTML += `<div class=\"calendario__fechas calendario__item ultimosDias\">${diasTotales(numeroMes-1)-(i-1)}</div>`;\n \n }\n\n\n for (let i = 1; i <= diasTotales(mes); i++){\n \n if (i==diaCorriente) {\n fechas.innerHTML += `<div class=\"calendario__fechas calendario__item hoy\">${i}</div>`;\n }else{\n fechas.innerHTML += `<div class=\"calendario__fechas calendario__item\">${i}</div>`;\n }\n }\n}", "title": "" }, { "docid": "7c63ef0476c38cb66eadfa521b60ee5e", "score": "0.5027623", "text": "recalculo(){\n let total = 0;\n for(let i = 0; i < this.detalles.length ; i++){\n total += this.calcularSubtotal(this.detalles[i].det_cant\n ,this.detalles[i].det_punit);\n }\n this.fact_igv_t = total * this.fact_igv_p / 100;\n this.comp_total = total;\n }", "title": "" }, { "docid": "712263d7e458ea133222624159c14b03", "score": "0.5024428", "text": "function refreshCounts () {\n containers.forEach(el => {\n // Get count of all student elements in a target element\n let count = el.querySelectorAll('.student').length\n let elHeader = el.querySelector('.count')\n // Inject count in target container\n elHeader.textContent = ` (${count})`\n })\n }", "title": "" }, { "docid": "6e81e181615f4b6a1e01371c83f9020a", "score": "0.5020658", "text": "function recuento(){\r\n n = 0\r\n total = 0\r\n for (p in propuestas){\r\n\r\n if (propuestas[p].votado){\r\n n++;\r\n total += propuestas[p].precio\r\n }\r\n }\r\n\r\n return [n, total]\r\n}", "title": "" }, { "docid": "156fc921c7b78d9242521f01b9f791d5", "score": "0.501992", "text": "function getnumeros(req, res) {\n getcompraventa().then((resp)=> {\n return res.status(200).send({Message: 'Lista de compra-venta Cargada!', total: resp});\n })\n}", "title": "" }, { "docid": "638cc3a56b351e652a073ba79ddf2c27", "score": "0.50108546", "text": "function leerDatosCursos(curso) {\r\n //Crear un objeto con el contenido actual\r\n const infoCurso = {\r\n imagen: curso.querySelector(\"img\").src,\r\n titulo: curso.querySelector(\"h4\").textContent,\r\n precio: curso.querySelector(\".precio span\").textContent,\r\n id: curso.querySelector(\"a\").getAttribute(\"data-id\"),\r\n cantidad: 1,\r\n };\r\n\r\n //Revisa si el elemento ya exite en el carrito\r\n const existe = articulosCarritos.some((curso) => curso.id === infoCurso.id);\r\n if (existe) {\r\n //actualizamos la cantidad\r\n const cursos = articulosCarritos.map((curso) => {\r\n if (curso.id === infoCurso.id) {\r\n curso.cantidad++;\r\n return curso; //Retorna los objetos actualizos\r\n } else {\r\n return curso; //Retorna los objetos que no son duplicados\r\n }\r\n });\r\n articulosCarritos = [...cursos];\r\n } else {\r\n //Agregar elementos al arreglo del carrito\r\n articulosCarritos = [...articulosCarritos, infoCurso];\r\n }\r\n\r\n //articulosCarritos.push(infoCurso);\r\n console.log(articulosCarritos);\r\n carritoHTML();\r\n}", "title": "" }, { "docid": "679ef4943478aad575b96b990f8042b8", "score": "0.500743", "text": "function actualizarCarrito() {\n precioTotal.innerText = carrito.reduce((acc, el) => acc + el.precio, 0);\n}", "title": "" }, { "docid": "e18c2ee5b13648b18fc50a2d98b9668c", "score": "0.50021005", "text": "function Estadistica() {\n $.get(\"api/?statistic\").done(function (data) {\n if (data.indexOf(\"Necesitas registrarte como usuario\") == -1) {\n $(\".content\").html(\"\");\n var txt = \"<div class='stats'><h2 style='margin-top: 0px;padding-top: 5px;'>Estadisticas <sub style='font-size:12px'>De esta semana</sub></h2>\";\n //Estadistica\n var datos = JSON.parse(data);\n var curr = new Date;\n var first = curr.getDate() - curr.getDay() + 1;\n var max_numero = 0;\n var porcentaje = 10;\n for (var a = 0; a < 7; a++) {\n var tabla = [];\n txt += \"<div class='colstats'>\";\n var fecha = new Date(new Date().setDate(first + a));\n var fecha_compatible = CeroIzq(fecha.getDate()) + \"/\" + CeroIzq(fecha.getMonth() + 1) + \"/\" + fecha.getFullYear();\n var cant = 0;\n for (var linea of datos) {\n if (fecha_compatible == linea.fecha) {\n cant++;\n tabla.push(linea.url);\n }\n }\n var accesotxt = VerAcceso(tabla);\n if (max_numero < cant)\n max_numero = cant;\n if (max_numero > 29)\n porcentaje = 5;\n else if (max_numero > 90)\n porcentaje = 2;\n txt += \"<div title='Visitas: \" + cant + \"' alt='Visitas: \" + cant + accesotxt + \"' style='height:\" + (cant * porcentaje) + \"px' class='chart'></div>\";\n txt += \"<p class='title_chart'>\" + fecha_compatible + \"</p>\";\n txt += \"</div>\";\n }\n txt += \"<div class='info'></div></div>\";\n $(\".content\").html(txt);\n $(\".chart\").click(verDetalle);\n }\n });\n }", "title": "" }, { "docid": "f728bc4835e53201c67e905992a5354e", "score": "0.49995267", "text": "vereficaCuerpo() {\n for (var i = 0; i < 1; i++) {\n this.contador = 0;\n this.contadorcara = 2;\n if (this.cuerpo0.y > 600) this.contador++;//1 1\n else this.contadorcara += 2;\n if (this.cuerpo1.y > 600) this.contador++;//2 4\n else this.contadorcara += 2;\n if (this.cuerpo2.y > 600) this.contador++;//3 4\n else this.contadorcara += 2;\n if (this.cuerpo3.y > 600) this.contador++;//4 6\n else this.contadorcara += 2;\n if (this.cuerpo4.y > 600) this.contador++;//5 8\n else this.contadorcara += 2;\n if (this.cuerpo5.y > 600) this.contador++;//6 10\n else this.contadorcara += 2;\n }\n }", "title": "" }, { "docid": "794f4b9e9791a2300d169fd409cfe1d2", "score": "0.4997846", "text": "async function global() {\n var config = {\n method: \"get\",\n url: \"https://6cume.sse.codesandbox.io/facturaglobal\",\n headers: {\n Accept: \"application/json\"\n }\n };\n\n ffin = Date.now();\n\n axios(config)\n .then(function (response) {\n var data = response.data;\n var doubles = data.map(function (x) {\n var date = x.datem * 1000;\n var fechap = new Date(date);\n\n if (date >= finicio && date <= ffin) {\n console.log(\"ok\");\n\n var totalconiva = x.total_ttc;\n var iva = totalconiva * 0.16;\n var totalsiniva = totalconiva - iva;\n var newCon = {\n clave_producto_servicio: \"01010101\",\n clave_unidad_de_medida: \"ACT\",\n cantidad: 1,\n descripcion: \"Venta\",\n valor_unitario: Number(totalsiniva),\n total: Number(totalconiva)\n };\n notas.partidas.push(newCon);\n console.log(notas.partidas);\n }\n });\n notas.partidas.map(function (y) {\n total4 += Number(y.total);\n console.log(\"total4:\" + total4);\n });\n jquery(\"#root\").append(\"total:\" + total4);\n })\n .catch(function (error) {\n console.log(error);\n });\n}", "title": "" }, { "docid": "4e4fa3ff423ad1dddb2bc25fc10203e9", "score": "0.49969694", "text": "function entradasPeso() {\r\n\tvar pesos = [];\r\n\tvar categorias = frequencia();\r\n\r\n\tfor(let i=0; i<categorias.length; i++) {\r\n\t\tpesos[categorias[i].Entrada] = math.dotDivide(somaClasses(Object.values(categorias[i])), somaTotaisClasses());\r\n\t}\r\n\treturn pesos;\r\n}", "title": "" }, { "docid": "c64b15aead9e3ecac2e0c72eadb881ec", "score": "0.4987456", "text": "function updateDados() {\n Object.keys(climaApp.locaisSelecionados).forEach((key) => {\n const location = climaApp.locaisSelecionados[key];\n const card = getCardClima(location);\n\n getClimaCache(location.geo)\n .then((forecast) => {\n carregarClima(card, forecast);\n });\n\n getAtualizacaoClima(location.geo)\n .then((forecast) => {\n carregarClima(card, forecast);\n });\n }); \n}", "title": "" }, { "docid": "00dd74e52923b64a036e7c93faa985b0", "score": "0.4987271", "text": "runLots() {\n Performance.start('runLots');\n this.rows = [];\n this._add(10000);\n Performance.stop();\n }", "title": "" }, { "docid": "6871688c2150507ece1e039ce21615ab", "score": "0.49846238", "text": "function getCuentas(callback) {\n var criterio = {$or: [\n {$and: [\n\t{'datosMonitoreo' : {$exists : true}},\n \t{'datosMonitoreo' : {$ne : ''}},\n \t{'datosMonitoreo.id' : {$ne : ''}}\n ]},\n {$and: [\n \t{'datosPage' : {$exists : true}},\n\t{'datosPage': {$ne : ''}},\n\t{'datosPage.id' : {$ne : ''}}\n ]}\n ]};\n classdb.buscarToStream('accounts', criterio, {}, 'solicitudes/getpb/getCuentas', function(cuentas){\n if (cuentas === 'error') {\n\treturn callback(cuentas);\n }\n else {\n\trefinaCuentas(cuentas, 0, [], function(refinadas){\n\t return callback(refinadas);\n\t});\n }\n });\n }", "title": "" }, { "docid": "a9cf478be37073d8703849236f5c965b", "score": "0.49841246", "text": "curar(min, max){\n const curarAstronauta = this.valorAleatorio(min, max)\n\n this.vidaAstronauta = Math.min(this.vidaAstronauta + curarAstronauta, 100)\n \n this.historico(`Astronauta ganhou cura de ${curarAstronauta}`, 'astro')\n }", "title": "" }, { "docid": "3f28e62e5086776eed49337a137f7986", "score": "0.49830696", "text": "listadoCompleto(){\n const tareas = this.listadoArr\n\n console.log();\n tareas.forEach((tarea, index) => { \n const idx = `${index + 1}.`.green;\n const { descripcion, completadoEn } = tarea;\n const estado = ( completadoEn )\n ? 'Completada'.green\n : 'Pendiente'.red\n\n console.log(`${idx} ${descripcion} :: ${estado}`);\n })\n }", "title": "" }, { "docid": "d71070b9b5b4174a0ef0030f9877d389", "score": "0.49810287", "text": "function findAll(req, res){\n\n StatisticsService.findAll()\n .then((result) => { \n\n console.log(result); // Devuelve un array de documentos. [0] - Da el primero\n /*\n [{ _id: 5c7e8a56b2bc8b37ac40e58c,\n userId: 8,\n regLog: 1,\n onDate: 2019-03-05T14:40:22.448Z,\n __v: 0 },\n\n { _id: 5c7e8b73a7f12d2a3cf02123,\n userId: 8,\n regLog: 1,\n onDate: 2019-03-05T14:45:07.178Z,\n __v: 0 },\n */\n\n //console.log(result.length); \n\n\n //let totalNumLogin\n //let totalNumRegister\n \n \n //res.send(result);\n })\n .catch(err => {\n console.log(err);\n res.send(err);\n });\n\n}", "title": "" }, { "docid": "5a1b38a75b6f972480b0a095d455225e", "score": "0.49787268", "text": "function mostrarReporteTotales(ctx) {\n\tdivMensajeEspera(\"reporteConstanciasForm\", \"Generando Reporte para impresi\\xf3n, espere un momento por favor...\");\n\thabilitarBotones(\"reporteConstanciasForm\", false);\t\n\tvar fi = obtenerElemento(\"fechaInicial\");\n\tvar ff = obtenerElemento(\"fechaFinal\");\t\n\tvar estado = obtenerElemento(\"estado\");\n\tvar src = ctx + \"/reporteConstanciasInscripcion.do?do=generarTotalesConstancias&fechaInicial=\"+fi.value+\"&fechaFinal=\"+ff.value+\"&estado=\"+estado.value;\n\tvar iframe = crearElemento(\"iframe\", [\"id\", \"reporteTotales\"], [\"src\", src], [\"scrolling\", \"no\"], [\"height\", \"100%\"], [\"width\", \"100%\"], [\"frameborder\", \"0\"]);\n\tdocument.body.appendChild(iframe);\t\n\tmostrarDiv(false, \"divConfirm\");\n\tcursorDefault();\n\thabilitarBotones(\"reporteConstanciasForm\", true);\n}", "title": "" }, { "docid": "7f579ba6208ab018b132bd0b1eda12a9", "score": "0.49718612", "text": "function calcularTotal() {\n // Limpiamos precio anterior\n total = 0;\n // Recorremos el array del carrito\n carrito.forEach((item) => {\n // De cada elemento obtenemos su precio\n const miItem = baseDeDatos.filter((itemBaseDatos) => {\n return itemBaseDatos.id_producto === parseInt(item);\n });\n total = total + miItem[0].precio;\n });\n // Renderizamos el precio en el HTML\n DOMtotal.textContent = total.toFixed(2);\n}", "title": "" }, { "docid": "238df6a1dc47e82570153b48fea1b2af", "score": "0.496906", "text": "async function GetAllServiti() {\n let prenotazioni = []; //array che contiene la lista di tutte le prenotazioni\n let _prenotazioni = await Prenotazioni.findAll({\n where: {\n OraConsumazione: {\n [Op.ne]: 0\n }\n }\n }); //query al DB\n\n _prenotazioni.forEach(prenotazione => {\n prenotazioni.push(prenotazione.dataValues);//aggiunge ogni utente all'array users\n });\n let jobj = {\n \"Status\": 0,\n \"Result\": prenotazioni\n }\n return(JSON.stringify(jobj));\n}", "title": "" }, { "docid": "da081b926294a437d398ef679966afaa", "score": "0.49682993", "text": "countAll(res) {\n\n this.eventDao.countAll()\n .then(this.common.findSuccess(res))\n .catch(this.common.serverError(res));\n }", "title": "" }, { "docid": "3cfa6014da876829ab73811f6b98eb43", "score": "0.49680784", "text": "async function reporteEntradaGeneral(req, res){\n var fecha = new Date(new Date().getFullYear() +'-'+ (new Date().getMonth()+1) +'-' + (new Date().getDate()+1));\n fecha.setHours('00');\n var year =new Date().getFullYear() ;\n\n var prePrimero = await AsistenciaMdl.aggregate([\n {$match:{\"fecha\":fecha}},\n {$lookup:{from:\"estudiantes\",localField:\"estudiante\", foreignField:\"_id\", as:\"estudiante\" }},\n {$match: {\"estudiante.referencia.primero.year\":year.toString(), \"estudiante.estado\":\"activo\"}},\n {$group: {\"_id\": {\"seccion\": \"$estudiante.referencia.primero.seccion\", \"asistencia\": \"$resumen.reporte\"}, \"total\":{$sum:1}}},\n {$sort:{\"_id.seccion\":+1}}\n ]);\n\n var preSegundo = await AsistenciaMdl.aggregate([\n {$match:{\"fecha\":fecha}},\n {$lookup:{from:\"estudiantes\",localField:\"estudiante\", foreignField:\"_id\", as:\"estudiante\" }},\n {$match: {\"estudiante.referencia.segundo.year\":year.toString(), \"estudiante.estado\":\"activo\"}},\n {$group: {\"_id\": {\"seccion\": \"$estudiante.referencia.segundo.seccion\", \"asistencia\": \"$resumen.reporte\"}, \"total\":{$sum:1}}},\n {$sort:{\"_id.seccion\":+1}}\n ]);\n\n var preTercero = await AsistenciaMdl.aggregate([\n {$match:{\"fecha\":fecha}},\n {$lookup:{from:\"estudiantes\",localField:\"estudiante\", foreignField:\"_id\", as:\"estudiante\" }},\n {$match: {\"estudiante.referencia.tercero.year\":year.toString(), \"estudiante.estado\":\"activo\"}},\n {$group: {\"_id\": {\"seccion\": \"$estudiante.referencia.tercero.seccion\", \"asistencia\": \"$resumen.reporte\"}, \"total\":{$sum:1}}},\n {$sort:{\"_id.seccion\":+1}}\n ]);\n\n var preCuarto = await AsistenciaMdl.aggregate([\n {$match:{\"fecha\":fecha}},\n {$lookup:{from:\"estudiantes\",localField:\"estudiante\", foreignField:\"_id\", as:\"estudiante\" }},\n {$match: {\"estudiante.referencia.cuarto.year\":year.toString(),\"estudiante.estado\":\"activo\"}},\n {$group: {\"_id\": {\"seccion\": \"$estudiante.referencia.cuarto.seccion\", \"asistencia\": \"$resumen.reporte\"}, \"total\":{$sum:1}}},\n {$sort:{\"_id.seccion\":+1}}\n ]);\n\n var preQuinto = await AsistenciaMdl.aggregate([\n {$match:{\"fecha\":fecha}},\n {$lookup:{from:\"estudiantes\",localField:\"estudiante\", foreignField:\"_id\", as:\"estudiante\" }},\n {$match: {\"estudiante.referencia.quinto.year\":year.toString(), \"estudiante.estado\":\"activo\"}},\n {$group: {\"_id\": {\"seccion\": \"$estudiante.referencia.quinto.seccion\", \"asistencia\": \"$resumen.reporte\"}, \"total\":{$sum:1}}},\n {$sort:{\"_id.seccion\":+1}}\n ]);\n\n\n var primero = await gradoProc(prePrimero);\n var segundo = await gradoProc(preSegundo);\n var tercero = await gradoProc(preTercero);\n var cuarto = await gradoProc(preCuarto);\n var quinto = await gradoProc(preQuinto);\n var reporte = '['+primero+','+segundo+','+tercero+','+cuarto+','+quinto+']';\n res.send(reporte);\n \n}", "title": "" }, { "docid": "24d4088eba1e2a844a58aa1212c38dac", "score": "0.49672824", "text": "function estudiantesPromedioObjetivosHse(sprint, casa, bloque){\n var promediosH=promediosHse(sprint, casa, bloque);\n var promedioEstudiantes=[];\n for (var i=0; i < promediosH.length; i++){\n promedioEstudiantes.push(Math.round(promediosH[i]))\n }\n return promedioEstudiantes;\n}", "title": "" }, { "docid": "de7fa3d24a75d8b450e72c801292e124", "score": "0.49670506", "text": "function recuperarComentarios()\n{\n var awd=$.get(\n \"https://ri897rw0k6.execute-api.us-east-1.amazonaws.com/Recuperar_comentarios\",\n {id_video: hashes[1]},\n function (datasource){\n var count = Object.keys(datasource.nombre_usuarios).length;\n generarComentarios(datasource,count);\n }\n );\n}", "title": "" }, { "docid": "de6625a10484374af597c6d7b0f1928a", "score": "0.49662206", "text": "function acelerar() {\n cronometro = setInterval(function () {\n contador++;\n console.log(contador);\n renderizar();\n }, tiempo/2);\n }", "title": "" }, { "docid": "e8510da73c7511df87e634ac433dccb5", "score": "0.49651402", "text": "logStatistics() {\n const { fetchedDocuments, migratedDocuments, ignoredDocuments, totalDocuments } = this.statistics;\n const string = ` Total: ${totalDocuments} :: Fetched: ${fetchedDocuments} :: Migrated: ${migratedDocuments} :: Ignored: ${ignoredDocuments} `;\n const percent = (migratedDocuments + ignoredDocuments) && Math.round((migratedDocuments + ignoredDocuments) / totalDocuments * 100 * 10) / 10;\n process.stdout.clearLine();\n process.stdout.cursorTo(0);\n process.stdout.write(`DbMigrator :: collection :: ${percent}% :: ${string}`);\n }", "title": "" }, { "docid": "1db13e3a163d02e6cd0e6b9af2badf68", "score": "0.49638456", "text": "function buscaContatos() {\n Contato.query(function(response) {\n $scope.contatos = response;\n $scope.mensagem = {};\n }, \n function(error) {\n $scope.mensagem = {\n texto: 'Não foi possível obter a lista de contatos',\n style: 'alert-danger'\n };\n }\n );\n }", "title": "" }, { "docid": "254b4df0b4e5b8669c3b2933fff69d73", "score": "0.49627587", "text": "function procesarCiclo(){\n if (forzarDetencion === true) {\n $(\"html\").css({ cursor: \"default\"});\n return;\n }\n var aciertos = encontrarAciertos();\n \n if(aciertos.length === 0){\n juegoBloqueado = false;\n $(\"html\").css({ cursor: \"default\"});\n return\n }\n \n juegoBloqueado = true;\n $(\"html\").css({ cursor: \"progress\"});\n\n pintarAciertos(aciertos);\n setTimeout(function(){\n tablero = renovarTablero(aciertos);\n pintarTablero();\n puntaje = puntaje + aciertos.length;\n $(\"#score-text\").html(puntaje);\n procesarCiclo();\n }, 3500)\n}", "title": "" }, { "docid": "c5be4d419f58dfa6fb1eb57258093143", "score": "0.49621743", "text": "progreso() {\n let filtroEnProgreso = tareas.filter(element => element.estado == 'En progreso');\n filtroEnProgreso.forEach(element => {\n console.log(chalk.inverse(' ► ', element.titulo + ' - ' )+ chalk.black.bgYellowBright('(' + element.estado + ')'));\n });\n }", "title": "" }, { "docid": "dee59c4a92ecb2d8618866ca8e763f40", "score": "0.4959813", "text": "function statistics(ataque, hp, defensa, velocidad) {\n\n var chart = new CanvasJS.Chart(\"chartContainer\", {\n theme: \"light1\", // \"light1\", \"light2\", \"dark1\", \"dark2\"\n exportEnabled: true,\n animationEnabled: true,\n title: {\n text: \"Habilidades del Pokemon\"\n },\n data: [{\n type: \"pie\",\n startAngle: 25,\n toolTipContent: \"<b>{label}</b>: {y}%\",\n showInLegend: \"true\",\n legendText: \"{label}\",\n indexLabelFontSize: 16,\n indexLabel: \"{label} - {y}%\",\n dataPoints: [\n { y: ataque, label: \"Ataque\" },\n { y: hp, label: \"Punta de Vida\" },\n { y: defensa, label: \"Defensa\" },\n { y: velocidad, label: \"Velocidad\" }\n \n ]\n }]\n });\n chart.render();\n \n }", "title": "" }, { "docid": "d0040a96211dfda23b894c8c4855817f", "score": "0.4954639", "text": "function extractCounts(res) {\n return new Promise(function(resolve, reject) {\n var result = {};\n\n var i = 0;\n res.forEach(function() {\n var count = services[i].extractCount(res[i]);\n result[ services[i].name ] = count;\n i++;\n });\n\n resolve(result);\n });\n }", "title": "" }, { "docid": "25df09bec3bfbb360ecdc745ff567a0d", "score": "0.49545854", "text": "function getStats(response, filter, table){\n\tvar stats = [];\n\tvar query;\n\tif(filter === \"all\"){\n\t\tquery = connection.query(\"SELECT (SELECT COUNT(*) FROM \"+table+\" WHERE status = 'success') AS success, \"+ \n\t\t\t\t\"(SELECT COUNT(*) FROM \"+table+\" WHERE status = 'danger') as failure, \"+\n\t\t\t\t\"(SELECT COUNT(*) FROM \"+table+\" WHERE status != 'success' AND status != 'danger') as other\", function(err, rows, fields) {\n\t\t\tif (err) {\n\t\t\t\tconsole.log(err);\n\t\t\t} else {\n\t\t\t\tstats[0] = rows[0];\n\t\t\t\tstats[0].filter = \"All\";\n\t\t\t}\n\t\t});\n\n\t\tquery.on('end',function(){\n\t\t\tresponse.write(JSON.stringify(stats));\n\t\t\tresponse.end();\n\t\t});\t\n\t} else if(filter === \"runInfo\"){\n\t\tvar runInfos = [];\n\t\tquery = connection.query(\"SELECT DISTINCT runInfo FROM \"+table, function(err, rows, fields) {\n\t\t\tif (err) {\n\t\t\t\tconsole.log(err);\n\t\t\t} else {\n\t\t\t\tfor(var i = 0; i < rows.length; i++){\n\t\t\t\t\trunInfos.push(rows[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tquery.on('end',function(){\t\t\n\t\t\tvar doneWith = 0;\n\t\t\tfor(var j = 0; j < runInfos.length;){\n\t\t\t\tquery2 = connection.query(\"SELECT DISTINCT runInfo, (SELECT COUNT(*) FROM \"+table+\" WHERE status = 'success' AND \"+connection.escape(runInfos[j])+\") AS success, \"+ \n\t\t\t\t\t\t\"(SELECT COUNT(*) FROM \"+table+\" WHERE status = 'danger' AND \"+connection.escape(runInfos[j])+\") as failure, \"+\n\t\t\t\t\t\t\"(SELECT COUNT(*) FROM \"+table+\" WHERE status != 'success' AND status != 'danger' AND \"+connection.escape(runInfos[j])+\") as other FROM \"+table+\" WHERE \"+connection.escape(runInfos[j]), function(err, rows, fields) {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar stat = {};\n\t\t\t\t\t\tstat.filter = rows[0].runInfo;\n\t\t\t\t\t\tstat.success = rows[0].success;\n\t\t\t\t\t\tstat.failure = rows[0].failure;\n\t\t\t\t\t\tstat.other = rows[0].other;\n\t\t\t\t\t\tstats.push(stat);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tj++;\n\t\t\t\tquery2.on('end',function(){\n\t\t\t\t\tdoneWith++;\n\t\t\t\t\tif(doneWith == runInfos.length){\n\t\t\t\t\t\tresponse.write(JSON.stringify(stats));\n\t\t\t\t\t\tresponse.end();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\t\n\t} else{\n\t\tresponse.end();\n\t}\n}", "title": "" }, { "docid": "dee3bb3a176826f8da8a7d8467bfb5bb", "score": "0.49543953", "text": "async function filtrarPedidosCliente(offset = 0) {\n // Obtenemos los datos del filtro y páginación\n let fechaInicio = document.getElementById('fechaInicio').value\n let fechaFin = document.getElementById('fechaFin').value\n let estado = document.getElementById('estado').value\n\n\n // Obtenemos los pedidos mediante el filtro\n let datos = JSON.stringify({\n fechaInicio: fechaInicio,\n fechaFin: fechaFin,\n estado: estado,\n offset: offset\n })\n\n // Obtenemos los datos\n let resultado = await obtenerPedidosCliente(datos)\n\n // Imprimimimos la páginacion\n let total = resultado.paginas\n imprimirPedidosCliente(resultado.pedidos)\n imprimirPaginacion('#cajaPaginacion', \"filtrarPedidosCliente\", total, offset )\n}", "title": "" }, { "docid": "397ecc93f9ec2a25ba7ebcc9231916c3", "score": "0.49492794", "text": "function loop() {\n fetch_data();\n sum_K1 = sum_U1 = sum_K2 = sum_U2 = sum_TOTAL1 = sum_TOTAL2 = 0;\n\n for (var i = 0; i < x.cpu.numOfProcessors; i++) {\n sum_K1 = sum_K1 + x.cpu.processors[i].usage.kernel;\n sum_U1 = sum_U1 + x.cpu.processors[i].usage.user;\n sum_TOTAL1 = sum_TOTAL1 + x.cpu.processors[i].usage.total;\n }\n\n setTimeout(() => {\n fetch_data();\n for (var i = 0; i < x.cpu.numOfProcessors; i++) {\n sum_K2 = sum_K2 + x.cpu.processors[i].usage.kernel;\n sum_U2 = sum_U2 + x.cpu.processors[i].usage.user;\n sum_TOTAL2 = sum_TOTAL2 + x.cpu.processors[i].usage.total;\n }\n\n delta_K = Math.floor(sum_K2 - sum_K1);\n delta_U = Math.floor(sum_U2 - sum_U1);\n delta_TOTAL = Math.floor(sum_TOTAL2 - sum_TOTAL1);\n // console.log(\"delta K=\", delta_K);\n // console.log(\"delta U=\", delta_U);\n // console.log(\"delta TOTAL=\", delta_TOTAL);\n\n cpu_usage_percentage = 100 - ((delta_K + delta_U) / delta_TOTAL * 100);\n console.log(\"cpu usage percentage=\", cpu_usage_percentage);\n }, 1000);\n\n }", "title": "" }, { "docid": "4a344ed781909c0ba1a6edaa0099efc8", "score": "0.49440616", "text": "function carga(){\r\n\r\n vehiculos.forEach((vehiculo,index)=>{\r\n if (vehiculo[4]=== 'auto'){\r\n var dato = new Auto(vehiculo[0],vehiculo[1],vehiculo[2],vehiculo[3]);\r\n //console.log(dato) \r\n\r\n concesionario.push(dato);\r\n }else {\r\n var dato = new Motocicleta(vehiculo[0],vehiculo[1],vehiculo[2],vehiculo[3]);\r\n //console.log(dato)\r\n concesionario.push(dato);\r\n \r\n }\r\n \r\n });\r\n // console.log(concesionario)\r\n}", "title": "" }, { "docid": "c4d1a0bf67e9d56bea5aac16a8d9bd92", "score": "0.49429175", "text": "function buscarCompetencias() {\n return resource.buscarCompetencias({}, '',\n function(data) {\n return data;\n },\n function(error) {\n $log.error(error.data.mensagem);\n }\n ).$promise;\n }", "title": "" }, { "docid": "a4219b946952cb40eaf55a46498cf23a", "score": "0.49416992", "text": "function getAllPadreEstudiante() {\n ajaxHelper(padreestudianteUri, 'GET').done(function (data) {\n $('#progreso').hide();\n self.PadresEstudiantes(data);\n });\n }", "title": "" }, { "docid": "4c1bfb5adb9da851a02f74ae372d6a48", "score": "0.49334785", "text": "getContrabandTotal() {\n let total = 0;\n contraband.forEach((good) => {\n total += this.getCount(good.name) * good.value;\n });\n return total;\n }", "title": "" }, { "docid": "b132ab0f91697b347fab0a9d6e193498", "score": "0.49328244", "text": "function calcularPorcentaje() {\n for (let partido of partidos_votos) {\n let porcentaje = (partido.votos * 100) / suma_votos;\n partido.porcentaje = porcentaje.toFixed(2)\n\n }\n\n}", "title": "" }, { "docid": "1a420129daa9ab251b688e45320dd8b1", "score": "0.49314454", "text": "async function collectionMonitoringParameters(msg) {\n console.log(colors.bgGreen(\"Start Monitoring resources now!\"));\n var register = [];\n //* Table Header\n\n var MONITORING = process.env.MONITORING || true;\n var start = new tc.nowUtc();\n let printTableCsv = [];\n let startOfMonitoring = msg.startOfMonitoring;\n let dataJsonFormat = {};\n let countInit = -1;\n\n var countProcess = -1;\n\n var count2 = -1;\n\n while (MONITORING && startOfMonitoring) {\n count2 = count2 + 1;\n var stopControl = fs.readFileSync(\"util/stop.tmp\", \"utf8\");\n\n if (stopControl === \"true\") {\n console.log(\"STOP MONITORING\");\n MONITORING = false;\n startOfMonitoring = false;\n console.log(colors.bgRed(\" STOP MONITORING RESOURCES\"));\n }\n\n countProcess = countProcess + 1;\n\n //if (countProcess > 5) {\n\n countProcess = 0;\n\n register = await getMonitoringParameters(register);\n controlData = await readMonitoringControl();\n\n //! Calculate time for down monitoring task\n\n var end = new tc.nowUtc();\n var duration = end.diff(start);\n duration = duration.seconds();\n\n //! Save measurement.\n\n countInit = countInit + 1;\n for (const key in register[\"tableRegister\"]) {\n let dataPrintTable = register[\"tableRegister\"][key];\n printTableCsv.push(dataPrintTable);\n\n var jsonItem = Object.keys(dataPrintTable);\n\n for (const key in jsonItem) {\n itemJsonData = jsonItem[key];\n\n if (itemJsonData != \"service\") {\n //? Build array for send inside of reports.\n try {\n dataJsonFormat[dataPrintTable.service][itemJsonData].push(\n dataPrintTable[itemJsonData]\n );\n } catch (error) {\n try {\n dataJsonFormat[dataPrintTable.service][itemJsonData] = [];\n dataJsonFormat[dataPrintTable.service][itemJsonData].push(\n dataPrintTable[itemJsonData]\n );\n } catch (error) {\n dataJsonFormat[dataPrintTable.service] = {};\n dataJsonFormat[dataPrintTable.service][itemJsonData] = [];\n dataJsonFormat[dataPrintTable.service][itemJsonData].push(\n dataPrintTable[itemJsonData]\n );\n }\n }\n }\n }\n }\n\n //! Time Control\n let MONITORING_TIME = global.config.MONITORING_TIME;\n\n var BREAK = false;\n if (count2 > 20) {\n BREAK = true;\n }\n\n console.log(\"------ ----- ----- ------ duration:\");\n console.log(MONITORING_TIME, duration + 10, duration > MONITORING_TIME);\n\n if (duration + 10 > MONITORING_TIME || BREAK) {\n //? Order data:\n process.send({\n monitoringData: {\n data: dataJsonFormat,\n },\n });\n MONITORING = true;\n break;\n }\n }\n\n console.log(colors.bgRed(\" STOP MONITORING RESOURCES\"));\n\n return [register];\n}", "title": "" }, { "docid": "2c13d332be2e18e4d060a724fc378f31", "score": "0.49309427", "text": "function estudiantesPromedioObjetivosTech(sprint, casa, bloque){\n var promediosT=promediosTech(sprint, casa, bloque);\n var promedioEstudiantes=[];\n for (var i=0; i < promediosT.length; i++){\n promedioEstudiantes.push(Math.round(promediosT[i]))\n }\n return promedioEstudiantes;\n}", "title": "" }, { "docid": "256f4ecad05348b4baf0e2d7ec569320", "score": "0.49304697", "text": "function updateCounts() {}", "title": "" }, { "docid": "fd77459941acf0ce3ead51dfa0c1de16", "score": "0.49301448", "text": "function montaValorMes () {\n\t\t// laco de despesas\n\t\tfor (var x in $scope.despesas) {\n\t\t\t// separo a despesa\n\t\t\tvar despesa = $scope.despesas[x];\n\t\t\t// crio um atributo pres(array) na despesa\n\t\t\tdespesa.pres = [];\n\n\t\t\t// laco de meses até 8\n\t\t\t// for (var m=0; m<8; m++) {\n\t\t\tfor (var m=0; m<$scope.tlmeses; m++) {\n\t\t\t\tvar day = moment().add(m, \"M\").date(); // dia atual + 1\n\t\t\t\tvar month = moment().add(m, \"M\").month(); // mes atual + 1\n\t\t\t\tvar year = moment().add(m, \"M\").year(); // ano atual + 1\n\t\t\t\tvar data = ''; // variavel data\n\n\t\t\t\t// laco de prestacoes da despesa\n\t\t\t\tfor (var p=0; p<despesa.prestacoes; p++) {\n\t\t\t\t\tvar dia = moment(despesa.datavencimento).add(p, \"M\").date(); // dia da data despesa + index\n\t\t\t\t\tvar mes = moment(despesa.datavencimento).add(p, \"M\").month(); // mes data despesa + index\n\t\t\t\t\tvar ano = moment(despesa.datavencimento).add(p, \"M\").year(); // ano data despesa + index\n\t\t\t\t\t\n\t\t\t\t\t// caso o mes e ano da despesa seja = ao mes e ano atual \n\t\t\t\t\tif (mes === month && ano === year) {\n\t\t\t\t\t\tdata = {\"data\": mes+\"/\"+ano, \"valor\":despesa.valor};\n\t\t\t\t\t\t// pegando a prestação atual\n\t\t\t\t\t\tif (m === 0) { // m = o ( mes atual )\n\t\t\t\t\t\t\tdespesa.prestacao = (p+1)+\"/\"+despesa.prestacoes;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!despesa.prestacao) {\n\t\t\t\t\t// se ano = atual mas mes menor ou ano menor\n\t\t\t\t\tif ( (ano === year && mes < month) || (ano < year) ) {\n\t\t\t\t\t\tdespesa.prestacao = despesa.prestacoes+\"/\"+despesa.prestacoes;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdespesa.prestacao = \"0/\"+despesa.prestacoes;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( data === '' ) {\n\t\t\t\t\tdespesa.pres.push({\"data\": \"00/0000\", \"valor\":\"xxxx\", \"color\":\"background:#f0f5f5; color:#ccc;\", \"icon\":\"fa-trophyx\"});\n\t\t\t\t}else{\n\t\t\t\t\tdespesa.pres.push(data);\n\t\t\t\t\t$scope.totais[m].valor = $scope.totais[m].valor + parseInt(despesa.valor);\n\t\t\t\t\t\n\t\t\t\t\tif($scope.totais[m-1] != undefined && $scope.totais[m].valor < $scope.totais[m-1].valor) {\n\t\t\t\t\t\t$scope.totais[m].icon = \"fa-arrow-down\";\n\t\t\t\t\t}else if($scope.totais[m-1] != undefined && $scope.totais[m].valor > $scope.totais[m-1].valor) {\n\t\t\t\t\t\t$scope.totais[m].icon = \"fa-arrow-up\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$scope.totais[m].icon = \"fa-arrow-right\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$scope.totalgeral = $scope.totalgeral + parseFloat(despesa.valor);\n\t\t}\n\t}", "title": "" }, { "docid": "f9e9173121496875a7f70ccd1d405866", "score": "0.4919815", "text": "function updatecounter(entrada,salida){\n var numpersonevento=(entrada-salida);\n\t if(numpersonevento<0){\n\t numpersonevento=0;\n\t }\n\t $(\"#datoscontador1\").text('Entradas: '+entrada+'');\n\t $(\"#datoscontador2\").text('Salidas: '+salida+'');\n\t $(\"#datoscontador3\").text('Total evento: '+numpersonevento+''); \n $(\"#datconuno1\").text('Entradas: '+entrada+'');\n\t $(\"#datconuno2\").text('Salidas: '+salida+'');\n\t $(\"#datconuno3\").text('Total evento: '+numpersonevento+''); \t\n\t $(\"#contegresar1\").text('Entradas: '+entrada+'');\n\t $(\"#contegresar2\").text('Salidas: '+salida+'');\n\t $(\"#contegresar3\").text('Total evento: '+numpersonevento+''); \t\n}", "title": "" }, { "docid": "8529a933d7383ec6cee589b80e043469", "score": "0.4916456", "text": "function obtenerCeldasPorPagina(filasDisponibilizadas){\r\n var celdas = [];\r\n $.each(filasDisponibilizadas, function(index, value){\r\n var tds = $(value).find(\"td[class*='cell-t']\").not('.celdaInvalida, .cell-totalDigitado');\r\n $.each(tds, function(index, value){\r\n celdas.push(value);\r\n });\r\n });\r\n return celdas;\r\n}", "title": "" }, { "docid": "3bf202a385a453ce0580ec835c6b8876", "score": "0.49114686", "text": "function inicialitzarTaules() {\n let opcions = {\n language: {\n \"sProcessing\": \"Processant...\",\n \"sLengthMenu\": \"Mostra _MENU_ registres\",\n \"sZeroRecords\": \"No s'han trobat registres.\",\n \"sInfo\": \"Mostrant de _START_ a _END_ de _TOTAL_ registres\",\n \"sInfoEmpty\": \"Mostrant de 0 a 0 de 0 registres\",\n \"sInfoFiltered\": \"(filtrat de _MAX_ total registres)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Filtrar:\",\n \"sUrl\": \"\",\n \"oPaginate\": {\n \"sFirst\": \"Primer\",\n \"sPrevious\": \"Anterior\",\n \"sNext\": \"Següent\",\n \"sLast\": \"Últim\"\n }\n }\n };\n chainsDataTable = $('#chainsTable').DataTable(opcions);\n updateChainTableHeaders();\n }", "title": "" }, { "docid": "6418a44d78ecc69355efb318818777ac", "score": "0.49113756", "text": "obtenerSugerencias(busqueda) {\n this.api.obtenerDatos()\n .then(datos => {\n // Obtener los resultados\n const resultados = datos.respuestaJSON.lugares;\n\n // Enviar el JSON y la busqueda al Filtro\n this.filtrarSugerencias(resultados, busqueda);\n })\n }", "title": "" }, { "docid": "173be271ce83b2e0613bf98cb9273027", "score": "0.49094263", "text": "function buscarCargos() {\n return resource.buscarCargos({}, '',\n function(data) {\n return data;\n },\n function(error) {\n $log.error(error.data.mensagem);\n }\n ).$promise;\n }", "title": "" }, { "docid": "511dd37ed58ec2eefece5b055f631653", "score": "0.4907223", "text": "function ventasMes(mes, anio) {\n var ventasDelMes = 0; //en esta variable quiero guardar el resultado de preciomaquina\n // for (let i = 0; i < local.ventas[i].length; i++) {\n // } if (local.ventas[i].fecha.getMonth() == 1) {\n // }\n\n var ventasAda = 0;\n var ventasGrace = 0;\n\n\n\n for (var i = 0; i < local.ventas.length; i++) {\n if (local.ventas[i].fecha.getMonth() + 1 == mes && local.ventas[i].fecha.getFullYear() == anio) {\n ventasDelMes = ventasDelMes + precioMaquina(local.ventas[i].componentes)\n }\n }\n\n return ventasDelMes\n\n // if (local.ventas[i].fecha.getMonth() == 1 && local.ventas[i].nombreVendedora == \"Grace\")\n // ventasDelMes + precioMaquina\n // if (local.ventas[i].fecha.getMonth() == 2 && local.ventas[i].nombreVendedora == \"Ada\")\n // console.log(ventasDelMes + precioMaquina)\n // }\n}", "title": "" }, { "docid": "d840335aeb5950d3b071ad91296c5476", "score": "0.49067056", "text": "function mostrarCuadros(unLimite){\ndocument.getElementById(listaNumeros[idElemento]).style.background = 'rgb(34, 222, 247)';\n idElemento++;\n if(idElemento === unLimite){\n console.log(\"tenemos que parar\");\n clearInterval(retardo);\n }\n}", "title": "" } ]
8e04b5ae400b291af3368ae6531f4515
print META ((export t))
[ { "docid": "bd70ab3b9f4a310ab6edbf95c5f78b80", "score": "0.0", "text": "function sc_print(s) {\n if (arguments.length === 1) {\n\tsc_display(s);\n\tsc_newline();\n }\n else {\n\tfor (var i = 0; i < arguments.length; i++)\n\t sc_display(arguments[i]);\n\tsc_newline();\n }\n}", "title": "" } ]
[ { "docid": "c7dd01b4a065af44ba00af23ffccbb7d", "score": "0.6062737", "text": "function c(t,e){return t(e={exports:{}},e.exports),e.exports}", "title": "" }, { "docid": "17cda68506bed33128e0ebfb00dfc655", "score": "0.59215224", "text": "export( obj ) {}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "388a759664675fdd45549fd864a4b1f8", "score": "0.56550413", "text": "function __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}", "title": "" }, { "docid": "74a916c32a1e8b9e7888b4a259cc92d1", "score": "0.56173366", "text": "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "title": "" }, { "docid": "74a916c32a1e8b9e7888b4a259cc92d1", "score": "0.56173366", "text": "function __export(m) {\n\t for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n\t}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" }, { "docid": "0fe750a29316cfc5042c28c1a871dc9a", "score": "0.5607724", "text": "function __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}", "title": "" } ]
249037582b22a8dd0967842517ce6980
The getRandomQuote function assigns a random number less than the length of the array to the variable randomNum and then returns the quote of indexOf random number.
[ { "docid": "53cbe073e88270c1becbf98be7a766ac", "score": "0.8065773", "text": "function getRandomQuote(){\n var randomNum = Math.floor(Math.random() * quotes.length);\n return quotes[randomNum];\n}", "title": "" } ]
[ { "docid": "a3d8154cd7dfecbb2fb64438fb133eb9", "score": "0.83801997", "text": "function getRandomQuote (num) {\n randomNum = Math.floor(Math.random() * num);\n return arr[randomNum];\n }", "title": "" }, { "docid": "9f9b309fba0c5b01d479bad5a58cac91", "score": "0.8132863", "text": "function getRandomQuote () {\n var randomArrayNum = Math.floor(Math.random() * quotes.length);\n var actualQuote = quotes[randomArrayNum];\n return actualQuote;\n}", "title": "" }, { "docid": "754b56b22c7a27c8977fd188119478cf", "score": "0.80886126", "text": "function getRandomQuote(){\n var randomNumb = Math.floor(Math.random()*quotes.length);\n return quotes[randomNumb];\n }", "title": "" }, { "docid": "2bf562f332240a0d2dc530cd549286e1", "score": "0.80852276", "text": "function getRandomQuote() {\n\t//create random number\n\tconst randomIndex = Math.floor( Math.random() * quotes.length );\n\t//use the randomIndex to access a random quote from the array\n\tconst getRandomQuote = quotes[randomIndex];\n\treturn getRandomQuote;\t\n}", "title": "" }, { "docid": "43b1482a76fde7c514f6ac810bcbdf62", "score": "0.8017514", "text": "function getRandomQuote() {\n var randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes [randomNumber];\n}", "title": "" }, { "docid": "a3f2c4ca78884b4b4f5b9920def0d6fa", "score": "0.8002656", "text": "function getRandomQuote(){\n var randNum = Math.floor((Math.random()*quotes.length));\n return quotes[randNum];\n}", "title": "" }, { "docid": "982c51193176e3c06e411f032b1c5fd7", "score": "0.79954606", "text": "function getRandomQuote(array) {\n var randomNumber = 0;\n randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "437710b4ab1eb4b13d1b9cd6d0ceb7c8", "score": "0.79904675", "text": "function getRandomQuote() {\t\t\t\t\t\n\treturn quotes[getRandomNumber()];\n}", "title": "" }, { "docid": "231d7b76ea130e50eefff140e8b3eae5", "score": "0.7982289", "text": "function getRandomQuote(array){\n var randomNumber = Math.floor(Math.random()*array.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "3127cd9eca8d05e660ba1745e7f63385", "score": "0.79748493", "text": "function getRandomQuote(){\n var number= Math.floor(Math.random() * quotes.length);\n return quotes[number];\n}", "title": "" }, { "docid": "e77330974f74030e196e66115d699001", "score": "0.79602915", "text": "function getRandomQuote(array) {\n var randomNumber = Math.floor(Math.random() * (array.length));\n return array[randomNumber];\n\n}", "title": "" }, { "docid": "ab81d94abeb81edd2fa212eeedf877e3", "score": "0.7959692", "text": "function getRandomQuote(){\n let randomNum = Math.floor(Math.random() * quotes.length);\n let randomQuote = quotes[randomNum];\n return randomQuote;\n }", "title": "" }, { "docid": "4aa5f75ca72550bdb8918d7369cec3a9", "score": "0.7959099", "text": "function getRandomQuote() {\n var randomNumber = Math.floor(Math.random() * quotes.length);\n var randomQuote = quotes[randomNumber];\n return randomQuote;\n}", "title": "" }, { "docid": "18f57af61a50ceb01b2b8c61703886c9", "score": "0.7954112", "text": "function getRandomQuote() {\n var randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "18f57af61a50ceb01b2b8c61703886c9", "score": "0.7954112", "text": "function getRandomQuote() {\n var randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "4cde39f7d5b9972940ecd1896ae9aeb6", "score": "0.7951648", "text": "function getRandomQuote () {\n var randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "2eabdd177b05ede6430b6ac5039999e3", "score": "0.7944198", "text": "function getRandomQuote() {\n var randomQuote = quotes[randomNumber];\n return randomQuote;\n}", "title": "" }, { "docid": "af408501fda38168dbf3b8fdd0fc6cd9", "score": "0.7942197", "text": "function getRandomQuote() {\n var randomNumber = Math.floor(Math.random() * quotes.length);\n randomQuote = quotes[randomNumber];\n return randomQuote;\n}", "title": "" }, { "docid": "55704a3d1fd8f47bdcc1ba93a6a5c538", "score": "0.7941197", "text": "function getRandomQuote() {\n const randomIndex = getRandomNumber(0, quotes.length);\n return quotes[randomIndex];\n}", "title": "" }, { "docid": "b704ef426951ba0d03b038d5e9f5466e", "score": "0.7937712", "text": "function getRandomQuote(array) {\n var randomNumber = 0;\n randomNumber = Math.floor(Math.random() * quotes.length);\n if (randomNumber === 0) {\n return quotes[0];\n } else if (randomNumber === 1) {\n return quotes[1];\n } else if (randomNumber === 2) {\n return quotes[2];\n } else if (randomNumber === 3) {\n return quotes[3];\n } else if (randomNumber === 4) {\n return quotes[4];\n } else if (randomNumber === 5) {\n return quotes[5];\n } else if (randomNumber === 6) {\n return quotes[6];\n }\n}", "title": "" }, { "docid": "7e491390e6903b29c402aec7cb626dab", "score": "0.79242945", "text": "function getRandomQuote() {\n let randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber]; \n}", "title": "" }, { "docid": "72769977faec532eb0c7a88c90b81c8e", "score": "0.79165083", "text": "function getRandomQuote() {\n const randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber]; \n}", "title": "" }, { "docid": "e0db68e3c33beefcbf4b3650e23aca1f", "score": "0.791143", "text": "function getRandomQuote(array) {\n var Num = randomQuoteGenerator();\n var getRandomQuote = quotes[Num];\n return getRandomQuote;\n}", "title": "" }, { "docid": "6597fa3da0eb7c4e80137a79b2ad5f73", "score": "0.7907707", "text": "function getRandomQuote() {\n\n var i;\n var randomQuote;\n \n i = Math.floor(Math.random() * quotes.length);\n randomQuote = quotes[i];\n \n return randomQuote;\n}", "title": "" }, { "docid": "a43ef05bca504045619c8179ae0a19d3", "score": "0.7900256", "text": "function getRandomQuote(array) {\n randomQuoteNumber = Math.floor(Math.random() * array.length); \n return array[randomQuoteNumber];\n}", "title": "" }, { "docid": "4465f581d5a22eae4a756575b4aba453", "score": "0.78943115", "text": "function getRandomQuote () {\n let randoNumber = Math.floor((Math.random() * quotes.length));\n return quotes[randoNumber];\n}", "title": "" }, { "docid": "23eaf7d8420e07a83abc8c6bf44cff9f", "score": "0.78907186", "text": "function getRandomQuote(array){\n let randomNumber = Math.floor((Math.random() * array.length));\n return array[randomNumber];\n}", "title": "" }, { "docid": "7fa0f84475823fa465396c9524ef1aed", "score": "0.7881502", "text": "function getRandomQuote() {\n var randNumber = getRandomNumber();\n\n return quotes[randNumber];\n}", "title": "" }, { "docid": "5248d6359bc94ed53ebf91da58733969", "score": "0.7880115", "text": "function getRandomQuote(){\n let randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "1d9a4f5c2f4af3feff492a051790402c", "score": "0.78725845", "text": "function getRandomQuote() {\n const RandomNum = Math.floor(Math.random() * quotes.length)\n return quotes[RandomNum]\n}", "title": "" }, { "docid": "240dc448b47b35a40676b695a1afa52d", "score": "0.7872481", "text": "function getRandomQuote() {\n var random = Math.floor(Math.random() * quotes.length);\n return quotes[random];\n\n}", "title": "" }, { "docid": "0c3f2a6d03da8661d14117b8b319750a", "score": "0.78722", "text": "function getRandomQuote (){\n const randomNumber = Math.floor( Math.random() *quotes.length );\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "4704bc472e804678eace08d34e8cd0fd", "score": "0.78588575", "text": "function getRandomQuote(){\n var rand = Math.floor( Math.random()*quotes.length);\n return quotes[rand];\n\n}", "title": "" }, { "docid": "d1bf4f5840d0f7ba59ac60406a394118", "score": "0.78554046", "text": "function getRandomQuote() {\n var randomNum = Math.floor(Math.random() * 4); //random number generator 0 to 4\n var randomQuote = quotes[randomNum];\n return randomQuote;\n}", "title": "" }, { "docid": "07d1e5d6db32834b82060ebe550cca8c", "score": "0.78543216", "text": "function getRandomQuote(){\n\tconst number = Math.floor(Math.random() * quotes.length);\n\treturn quotes[number];\n}", "title": "" }, { "docid": "34cc6b1ebbf910fd284e05867d459cc8", "score": "0.7852889", "text": "function getRandomQuote() {\n const randomNum = Math.floor(Math.random() * quotes.length);\n\n return quotes[randomNum];\n}", "title": "" }, { "docid": "4dd6d57efc4f29955ec9ecb7db25d0ad", "score": "0.784986", "text": "function getRandomQuote(){\n var randomQuote = Math.floor(Math.random()*quotes.length);\n return quotes[randomQuote]\n}", "title": "" }, { "docid": "a8a15a06e553979a416d819279a2cf4b", "score": "0.7848226", "text": "function getRandomQuote() {\n let randomNumber = Math.floor(Math.random() * (quotes.length));\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "fda69ab74ce622d3a720db434a5c3ffc", "score": "0.7843355", "text": "function getRandomQuote() {\n var randomNum = Math.floor(Math.random() * quotes.length);\n var anotherVariable1 = quotes[randomNum];\n return anotherVariable1;\n}", "title": "" }, { "docid": "75acba13f203dcd5cf8aff3dc3b6144e", "score": "0.78418446", "text": "function getRandomQuote() {\n var pickQuote = Math.floor(Math.random()* quotes.length);\n return (quotes[pickQuote]);\n\n}", "title": "" }, { "docid": "6cda74b129df9c8636529f5f9b561f2e", "score": "0.7839878", "text": "function getRandomQuote() {\n var getRandomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[getRandomNumber]; //to get random quotes.\n}", "title": "" }, { "docid": "010b049bc46692e4c3c7b43825338167", "score": "0.7835836", "text": "function getRandomQuote() {\n const randomNumber = Math.floor(Math.random() * quotes.length)\n randomQuote = quotes[randomNumber]\n return randomQuote\n}", "title": "" }, { "docid": "be70f4d3c97eebe4c1f63bc01b48d5e6", "score": "0.78325355", "text": "function getRandomQuote(quotes) {\n var randomNum = Math.floor(Math.random() * quotes.length); // getRandomQuote assigns a random number to the variable randomNum\n console.log(randomNum); // test to see if its working \n var randomQuote = quotes[randomNum]; // using the random number assign it to a random index of the array \n console.log(randomQuote.quote); // test to see if its printing out the right quote\n return randomQuote; // return the quote\n}", "title": "" }, { "docid": "4075c582cbce8e2f890a76055bc43abd", "score": "0.7827952", "text": "function getRandomQuote(array){return quotes[Math.floor(Math.random() *6)]}", "title": "" }, { "docid": "d0217cc752566fa57a51e433120618ec", "score": "0.7823195", "text": "function getRandomQuote(array)\n{\n i = Math.floor(Math.random() * array.length)\n return quotes[i]; \n}", "title": "" }, { "docid": "654575dd0f8fb3754ff4d2c7b5016597", "score": "0.7813461", "text": "function getRandomQuote () {\n const randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n\n}", "title": "" }, { "docid": "f5f6c767c55514dc20c91426af7c7fcf", "score": "0.78091955", "text": "function getRandomQuote() {\n\n const randomNumber = Math.floor(Math.random() * quotes.length)\n return quotes[randomNumber];\n\n}", "title": "" }, { "docid": "5c6f0880cb365063a30c1c84bc08f193", "score": "0.7804237", "text": "function getRandomQuote() {\n var Quotez = Math.floor(Math.random() * (quotes.length));\n return quotes[Quotez];\n}", "title": "" }, { "docid": "253ed53d5f88a5f76804ec76f7292cfd", "score": "0.7804183", "text": "function getRandomQuote(){\n\tvar random = quotes[Math.floor(Math.random() * quotes.length)];\n\treturn random;\n\n}", "title": "" }, { "docid": "f85476bcc0cfc44bca027ca4bb3ccb01", "score": "0.7804006", "text": "function getRandomQuote() {\n var randomQuoteIndex = Math.floor(Math.random() * quotes.length);\n return quotes[randomQuoteIndex];\n \n}", "title": "" }, { "docid": "e8bcbcc874d85b6f9755b0e28b983c72", "score": "0.7802911", "text": "function getRandomQuote() {\n const randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "e8bcbcc874d85b6f9755b0e28b983c72", "score": "0.7802911", "text": "function getRandomQuote() {\n const randomNumber = Math.floor(Math.random() * quotes.length);\n return quotes[randomNumber];\n}", "title": "" }, { "docid": "205ab99807e505d84d9d797892058a38", "score": "0.78010064", "text": "function getRandomQuote(){\n return quotes[Math.floor(Math.random() * quotes.length)];\n}", "title": "" }, { "docid": "a9ddf231847af478b7d69245695fbea4", "score": "0.77976537", "text": "function getRandomQuote () {\n\tvar quote = Math.floor(Math.random() * (randomQuote.length));\n\treturn randomQuote[quote];\n}", "title": "" }, { "docid": "efbcd318028498c06b92446976e96572", "score": "0.7794235", "text": "function randomQuote() \n {\n var randomIndex = Math.floor(Math.random()*(quotes.length));\n return quotes[randomIndex];\n }", "title": "" }, { "docid": "8a514617d9236084665a0bad656130e1", "score": "0.7791961", "text": "function getRandomQuote () {\n\tvar i = Math.floor(Math.random() * quotes.length);\n\tvar randomQuote = quotes[i];\n\treturn randomQuote;\n}", "title": "" }, { "docid": "2ef8e460dadd0923c60649ebfd77aa78", "score": "0.7791871", "text": "function getRandomQuote() {\n let randomNumber = Math.floor( Math.random() * quotes.length);\n let randomQuote = quotes[randomNumber];\n\n return randomQuote;\n}", "title": "" }, { "docid": "22f82bb26fc546c826b6585a9423f159", "score": "0.7788702", "text": "function getRandomQuote() {\n let generateQuote = Math.floor(Math.random() * quotes.length);\n return quotes[generateQuote]\n }", "title": "" }, { "docid": "cfac476008116038d735e7ec9df39286", "score": "0.7786777", "text": "function getRandomQuote() {\n var randomQuote = Math.floor(Math.random() * quotes.length);\n var quote = quotes[randomQuote];\n //We can check in the javascript console the random quote. \n console.log(quote);\n return quote; \n}", "title": "" }, { "docid": "2c882491c05c2a4555da1517df339ca0", "score": "0.77785885", "text": "function getRandomQuote () {\n return quotes[Math.floor(Math.random() * quotes.length)];\n}", "title": "" }, { "docid": "95c04a7bd07d8a7fc6ba0d777ebc4196", "score": "0.7767017", "text": "function getRandomQuote(){\n randomQuote = quotes[Math.floor(Math.random() * quotes.length)];\n console.log(randomQuote); // sanity check\n return randomQuote;\n}", "title": "" }, { "docid": "1aab85098dfc97866ed110297630c271", "score": "0.7761875", "text": "function getRandomQuote(){\n const randomNumber= Math.floor(Math.random()*quotes.length)\n return quotes[randomNumber]\n\n}", "title": "" }, { "docid": "e882358d2706e2ba0782bb0ba0152da5", "score": "0.7751021", "text": "function getRandomQuote(array) {\n\tconst num = Math.round(Math.random() * array.length );\n\tconst selectedQuote = array[num];\n\treturn selectedQuote;\n}", "title": "" }, { "docid": "7b3adb1a7e8b01c710fbcd790fcdee2e", "score": "0.7750757", "text": "function getRandomQuote() {\n let randomQuote = Math.floor(Math.random() * quotes.length);\n\n return quotes[randomQuote];\n}", "title": "" }, { "docid": "179b9d34fd9158f4621f305b9d2bd6f9", "score": "0.7741386", "text": "function getRandomQuote() {\n var picked;\n do {\n randNum = Math.floor(Math.random() * quotes.length);\n picked = usedNums.indexOf(randNum);\n if ( usedNums.length === quotes.length ) {\n usedNums = [];\n }\n}\n while ( picked !== -1 );\n usedNums.push(randNum);\n//I left this in to double check that 2 of the same numbers are not used in usedNums Array.\n console.log('usedNums ' + usedNums.join());\n return quotes[randNum];\n}", "title": "" }, { "docid": "caa12ec9d7f0b29714c9ab7fbb526c4a", "score": "0.77346253", "text": "function getRandomQuote (arr) {\n var random = Math.floor(Math.random() * quotes.length); // generate random numbers based on the length of quotes\n for (var i = 0; i < arr.length; i++) { \n var randomQuotes = arr[random]; \n} // loop randomQuotes\n return randomQuotes; \n}", "title": "" }, { "docid": "0f18460b74dbe133a37fecdc0c33d5b6", "score": "0.7727927", "text": "function getRandomQuote() {\n let a = Math.floor(Math.random()*quotes.length);\n console.log(a);\n return quotes[a];\n}", "title": "" }, { "docid": "c651a2ddb27f27c3de57a450fdf93910", "score": "0.77268577", "text": "function getRandomQuote () {\n let quoteNum = Math.floor( Math.random() * quotes.length );\n let ranQuote = quotes[quoteNum];\n return ranQuote;\n}", "title": "" }, { "docid": "21e5ae459b674b2a1cc84e3ca720d9da", "score": "0.771757", "text": "function getRandomQuote() {\nvar getQuote = Math.floor(Math.random() * (quotes.length) );\n return quotes[getQuote];\n}", "title": "" }, { "docid": "160d9fc801925bc1f73f30109dc4cf47", "score": "0.77126414", "text": "function getRandomQuote() {\n // generate a random number within the possible indexes\n var random = Math.floor(Math.random() * (quotes.length - 1));\n // use the random number as index to get the object at the position in the quotes array\n var quote = quotes[random];\n // add quote to usedQuotes array\n usedQuotes.push(quote);\n // remove quote from quotes array\n quotes.splice(random, 1);\n // check if the quotes array is empty\n if(quotes.length === 0){\n // assign usedQuotes to quotes\n quotes = usedQuotes;\n // assign an empty array to usedQuotes\n\t\tusedQuotes = [];\n\t};\n // use the random number as index and return the object at the position in the quotes array\n return quote;\n}", "title": "" }, { "docid": "c9550ba306e0ea5331470a1b522cc217", "score": "0.7710694", "text": "function getRandomQuote(array) {\n var randomQuote = Math.floor(Math.random() * quotes.length);\n for (var i = 0; i < array.length; i++) {\n var printQuote = array[randomQuote];\n }\n return printQuote;\n}", "title": "" }, { "docid": "78b4d8e4b8844473068e18f10f3d557e", "score": "0.77083707", "text": "function getRandomQuote() {\n\n const randomNumber = Math.floor(Math.random() * Quotes.length);\n const randomQuote = Quotes[randomNumber];\n return randomQuote;\n\n}", "title": "" }, { "docid": "693e99666a5feb47f8dd49205a3f55fe", "score": "0.77030694", "text": "function getRandomQuote(QuotesArray){\n let random = Math.floor(Math.random() * QuotesArray.length);\n let randomPhrase = QuotesArray[random];\n return randomPhrase;\n}//end getRandomQuote", "title": "" }, { "docid": "1be2afb15d6c5f68085ee3bd00201d2d", "score": "0.7698518", "text": "function getRandomQuote(array) {\n let randomIndex = Math.floor(Math.random() * array.length);\n return array[randomIndex];\n}", "title": "" }, { "docid": "399819845c545ea106440504edeac3a0", "score": "0.76862663", "text": "function getRandomQuote(arr) {\n let num = Math.floor(Math.random() * arr.length);\n\n return(arr[num])\n }", "title": "" }, { "docid": "218a4e5e527730483e1b3cd3e0f96c6a", "score": "0.76787406", "text": "function getRandomQuote() {\n quote = quotes[Math.floor(Math.random() * quotes.length)];\n return quote;\n}", "title": "" }, { "docid": "d007c39e9916427a9867e7242171708b", "score": "0.76749384", "text": "function getRandomQuote() {\n do {\n var randomNum = getRandomFromZero(quotes.length-1);\n }\n while(randomNum === lastRandomQuoteVal);\n\n lastRandomQuoteVal = randomNum;\n return quotes[randomNum];\n}", "title": "" }, { "docid": "d57d189a1ade36db71ad2fad6bb01e66", "score": "0.76732254", "text": "function getRandomQuote() {\n getRandomNumber();\n // check a random number is always being pulled in\n // console.log(randomNumber);\n return quotes[randomNumber]\n}", "title": "" }, { "docid": "9366cbbb51b701f736708e753ce54565", "score": "0.7662664", "text": "function getRandomQuote() {\n const randomNumber = Math.floor(Math.random() * quotes.length); // storing random quotes number to randomNumber variable\n const randomQuote = quotes[randomNumber]; // storing quotes[randomNumber] to variable randomQuote \n console.log(randomNumber);\n console.log(randomQuote);\n return randomQuote; \n}", "title": "" }, { "docid": "00e23e50ace1d7dc428df673937ff004", "score": "0.76589113", "text": "function getRandomQuote(quotes) {\n var random = Math.floor((Math.random() * quotes.length) );\n return quotes[random];\n}", "title": "" }, { "docid": "511531f927be68d744ccd1f9a956f627", "score": "0.76413155", "text": "function getRandomQuote(quoutes) {\n var randomNumber = quoutes[Math.floor(Math.random() * quotes.length)];\n return randomNumber;\n}", "title": "" }, { "docid": "d8ee3c1d957f95ff3641e95dbb1e21b7", "score": "0.7640121", "text": "function getRandomQuote(){ // creating a function to generate the random quote\n let randomnum = Math.floor(Math.random() * quotes.length); // generates the random quote.\n return quotes[randomnum]; \n}", "title": "" }, { "docid": "dc1d280382598a2fe254207d56bcfd0f", "score": "0.7620004", "text": "function getRandomQuote() {\n var quoteWithName = quoteArray[Math.floor(Math.random() * 10)];\n return quoteWithName;\n}", "title": "" }, { "docid": "d0692a98a4125372f965c349dec22584", "score": "0.761594", "text": "function getRandomQuote() {\n var randNumber = Math.floor(Math.random() * 5);\n return quotes[randNumber];\n}", "title": "" }, { "docid": "4b4aa459aa1ca51da70835fb992964b1", "score": "0.76116216", "text": "function getRandomQuote() {\n\n let randomQ = quotes[Math.floor(Math.random() * quotes.length)];\n\n return randomQ;\n}", "title": "" }, { "docid": "7422dee91a0f0772d8f629ea9b692594", "score": "0.76014364", "text": "function getRandomQuote() {\n const randomQuoteIndex = Math.floor(Math.random() * quotes.length);\n return quotes[randomQuoteIndex];\n}", "title": "" }, { "docid": "d73f0ec0862e465b87e60181c2658882", "score": "0.75851595", "text": "function getRandomQuote() {\n\trandomQuote = quotes[Math.floor(Math.random()*quotes.length)];\n\treturn randomQuote;\n}", "title": "" }, { "docid": "117f10d3c2b5fb06c716e0af0e44eec2", "score": "0.75848836", "text": "function getRandomQuote (array) {\nvar randomNumber = Math.floor( Math.random() * 5 ) //Generates the random number\nreturn array[randomNumber] //This returns a quote object to pass into the printQuote function\n}", "title": "" }, { "docid": "0c377d2910a2f67085a76f524436e46f", "score": "0.75647897", "text": "function getRandomQuote(){\n const random = Math.floor(Math.random() * quotes.length);\n return random;\n \n}", "title": "" }, { "docid": "c0b5640c4db066b85fb260e243bbbe97", "score": "0.7561032", "text": "function getRandomQuote(array){\n var randomNumber =Math.floor(Math.random()*array.length);\n //return randomNumber;\n //above is what i had before, where it just returned a randomNumber\n // below it should return an object\n return array[randomNumber].quote;\n}", "title": "" }, { "docid": "211dfd27b3c51b3810d2f364b64cbc82", "score": "0.75599796", "text": "function getRandomQuote() {\n var randomquote = Math.floor( Math.random() * quotes.length);\n var element = quotes[randomquote];\n\n return (element);\n}", "title": "" }, { "docid": "fd989dec159be95507a94558dcd1af2f", "score": "0.7550043", "text": "function getRandomQuote() {\n let randomQuote = quotes[Math.floor(Math.random() * quotes.length)];\n return randomQuote;\n}", "title": "" }, { "docid": "cb3b56e99fa97ae47eb26c573ac02430", "score": "0.7539251", "text": "function getRandomQuote(array) {\n var quoteIndex = Math.floor( Math.random() * (quotes.length));\n for (var i = 0; i < quotes.length; i++) {\n var randomQuote = array[quoteIndex];\n }\n return randomQuote;\n }", "title": "" }, { "docid": "bd0367c56e0eeac47857ec87f2de237e", "score": "0.7518568", "text": "function getRandomQuote(arr){\n return arr[ Math.floor(Math.random() * 6)];\n}", "title": "" }, { "docid": "bd0367c56e0eeac47857ec87f2de237e", "score": "0.7518568", "text": "function getRandomQuote(arr){\n return arr[ Math.floor(Math.random() * 6)];\n}", "title": "" }, { "docid": "c6f5b1188b2cf7d65955fdbc8d8d6c51", "score": "0.75108343", "text": "function getRandomQuotes() {\n iRandom = Math.floor(Math.random() * quotes.length);\n return quotes[iRandom];\n}", "title": "" }, { "docid": "a10523d13d486a641ba6ceea1c5b26fc", "score": "0.7497979", "text": "function getRandomQuote(quotes) {\n var quoteIndex = Math.floor( Math.random() * (quoteLength));\n for (var i = 0; i < quoteLength; i++) {\n var randomQuote = quotes[quoteIndex];\n}\nreturn randomQuote;\n}", "title": "" }, { "docid": "270639d7c3805ce4076f768d02fc7f43", "score": "0.74899995", "text": "function getQuote() {\n return quotes[Math.floor(Math.random()*quotes.length)];\n}", "title": "" }, { "docid": "fa6602287af693c95ef05f6e67d3465f", "score": "0.74701154", "text": "function getRandomQuote(array) {\n // generate a random number from 0 to the length of the parameter array\n let randomNum=Math.floor(Math.random()*array.length);\n return array[randomNum];\n}", "title": "" }, { "docid": "af07895a6a9febed349e9efd75f4c849", "score": "0.73854977", "text": "function getRandomNumber() {\n var num = Math.floor(Math.random() * quotes.length);\n return num;\n}", "title": "" } ]
a3ccae14447cb6753e3cffac0bf4df44
Replace a decimal with it's percentage value
[ { "docid": "3f5eac0d7613eb34a052b5a2bced864e", "score": "0.676942", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "title": "" } ]
[ { "docid": "c47846efbb0f529fb0d044455c6c337a", "score": "0.7397558", "text": "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "title": "" }, { "docid": "c47846efbb0f529fb0d044455c6c337a", "score": "0.7397558", "text": "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "title": "" }, { "docid": "c47846efbb0f529fb0d044455c6c337a", "score": "0.7397558", "text": "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "title": "" }, { "docid": "c47846efbb0f529fb0d044455c6c337a", "score": "0.7397558", "text": "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "title": "" }, { "docid": "c47846efbb0f529fb0d044455c6c337a", "score": "0.7397558", "text": "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "title": "" }, { "docid": "c47846efbb0f529fb0d044455c6c337a", "score": "0.7397558", "text": "function pctChange(val){\r\n if(val > 0){\r\n return '' + val + '%';\r\n }else if(val < 0){\r\n return '' + val + '%';\r\n }\r\n return val;\r\n }", "title": "" }, { "docid": "f05626e0f4bfb0ab1e667833a479d48d", "score": "0.73852247", "text": "function percentOf(val, percent) {\r\n return (val * percent) / 100;\r\n}", "title": "" }, { "docid": "28f28b744370534c7f90e58a7f73112c", "score": "0.73460466", "text": "function formatPercentage(aPerc100x)\n{\n return (aPerc100x / 100).toFixed(2) + \"%\";\n}", "title": "" }, { "docid": "22ce78bbac68f223362a2ed47f5c6e6a", "score": "0.7261995", "text": "function percentify(num) {\n return parseFloat(num*100).toFixed(0)+\"%\"\n}", "title": "" }, { "docid": "e1f4c0d55d7ab0a584131edfd2177987", "score": "0.7165849", "text": "function toPct(e) {\n return e + \"%\"\n }", "title": "" }, { "docid": "9dcb6d91e338957457c84160e067d3d0", "score": "0.7157337", "text": "function handlePercentageConvertSetter(value) {\r\n var $item = this,\r\n fixedDigit = +$item.attr('data-percentage-convert'),\r\n regexp = /^-?\\d+(?:[.]\\d+)?$/,\r\n match = regexp.exec(value),\r\n displayValue = match == null\r\n ? (0).toFixed(fixedDigit) + ' %'\r\n : (+value * 100).toFixed(fixedDigit) + ' %';\r\n\r\n setValueToField.call($item, displayValue);\r\n }", "title": "" }, { "docid": "4d07e5287f19652f6b59f0edf6501364", "score": "0.7123517", "text": "function percentage() {\n return percent;\n}", "title": "" }, { "docid": "27681205a78190f9c08a29f08ee7b241", "score": "0.7108929", "text": "_toPercent(ratio) {\n return `${ratio * 100}%`;\n }", "title": "" }, { "docid": "d607ade12d0263f07919de0ef17428fd", "score": "0.7013729", "text": "function percentOf(num1, num2){\n num3 = num1/num2 * 100\n return num3 + \"%\"\n}", "title": "" }, { "docid": "4f362024da15854e801afab60f9b94ea", "score": "0.7009938", "text": "function pct(a, b) {\n return Math.round(a / b * 100) + '%';\n }", "title": "" }, { "docid": "f01674e1a68b599adb9431a9c911d99a", "score": "0.6997692", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + \"%\";\n }\n\n return n;\n }", "title": "" }, { "docid": "41500c941322b9cf9441991fc5cbe62e", "score": "0.6986538", "text": "function numToPercentage(num, p){\n return (num * p / 100).toFixed(2);\n}", "title": "" }, { "docid": "b30c17b917eb50cf1d2a70e79b1182ba", "score": "0.69737834", "text": "function toPercent(point){\n var str = Number(point*100).toFixed(2);\n str += \"%\";\n return str;\n}", "title": "" }, { "docid": "7e85bbcda3a17020fad35871ba6cc3ca", "score": "0.6965283", "text": "function convertToPercentage(delayed,punctual) {\n return ((delayed / (delayed + punctual))*100)\n\n}", "title": "" }, { "docid": "847b181991d417b6481d7053936bea4b", "score": "0.69514245", "text": "function percent(number, total) {\n return (number / total) * 100;\n}", "title": "" }, { "docid": "c2abddcda40eefd646db52dd68218e6d", "score": "0.6943916", "text": "function percentage() {\n if (this.currentInput.indexOf(\"%\") == -1) {\n this.currentInput = this.currentInput * 100;\n this.currentInput = this.currentInput.toString() + \"%\";\n }\n this.displayCurrentInput();\n}", "title": "" }, { "docid": "2e258e9d10bfb6ded8861f5378398eb1", "score": "0.69202024", "text": "function to_percent(ask) {\n return Math.round((ask - BASE_PRICE) / BASE_PRICE * 10000) / 100.0;\n }", "title": "" }, { "docid": "0bc7f20e8098a5280701ee075b9a6a89", "score": "0.69165057", "text": "function toPct ( pct ) {\n\t\treturn pct + '%';\n\t}", "title": "" }, { "docid": "0bc7f20e8098a5280701ee075b9a6a89", "score": "0.69165057", "text": "function toPct ( pct ) {\n\t\treturn pct + '%';\n\t}", "title": "" }, { "docid": "0bc7f20e8098a5280701ee075b9a6a89", "score": "0.69165057", "text": "function toPct ( pct ) {\n\t\treturn pct + '%';\n\t}", "title": "" }, { "docid": "88505f5400e645f4c6b625d524ef43df", "score": "0.6895012", "text": "function percentage() {\r\r\n if (isPercentage === false && lastButton === \"num\") {\r\r\n var indexPerc = currentNum.indexOf(\".\");\r\r\n if (indexPerc !== -1) {\r\r\n if (indexPerc === 0) {\r\r\n currentNum = \".00\" + currentNum.slice(1); \r\r\n } else if (indexPerc === 1) {\r\r\n currentNum = \".0\" + currentNum.slice(0, indexPerc) + currentNum.slice(indexPerc + 1);\r\r\n } else if (indexPerc === 2) {\r\r\n currentNum = \".\" + currentNum.slice(0, indexPerc) + currentNum.slice(indexPerc + 1);\r\r\n } else {\r\r\n currentNum = currentNum.slice(0, indexPerc - 2) + \".\" + currentNum.slice(indexPerc - 2, indexPerc) + currentNum.slice(indexPerc + 1);\r\r\n }\r\r\n } else {\r\r\n if (currentNum.length === 1) {\r\r\n currentNum = \".0\" + currentNum;\r\r\n } else if (currentNum.length === 2) {\r\r\n currentNum = \".\" + currentNum;\r\r\n } else {\r\r\n currentNum = currentNum.slice(0, currentNum.length - 2) + \".\" + currentNum.slice(currentNum.length - 2);\r\r\n }\r\r\n }\r\r\n isPercentage = true;\r\r\n isDecimal = true;\r\r\n }\r\r\n}", "title": "" }, { "docid": "562414d1b21add088c1aac050b83199e", "score": "0.68794775", "text": "function FormatPercentage(value, decimalpoints)\n{\n var pct = value * 100.0;\n return pct.toFixed(decimalpoints) + '%';\n}", "title": "" }, { "docid": "6548e03c8613f8f3d476e12281e6062d", "score": "0.6875731", "text": "function calcPercent(number, percent) {\n return number / 100 * percent;\n}", "title": "" }, { "docid": "76888b2097f0f75c020fb500a8a53254", "score": "0.68748415", "text": "function convertToPercentage(n) {\r\n if (n <= 1) {\r\n n = (n * 100) + \"%\";\r\n }\r\n\r\n return n;\r\n }", "title": "" }, { "docid": "24281caffe66354979c14ef4513725b9", "score": "0.68693304", "text": "function calculatePercentage(percentage) {\n let totalPriceToPercentage = parseFloat(totalWithPromo.innerText);\n let result = (totalPriceToPercentage * percentage) / 100;\n totalWithPromo.innerText = totalPriceToPercentage - result;\n}", "title": "" }, { "docid": "788c7ea971f67d48d4b49a353febfccc", "score": "0.6856693", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "title": "" }, { "docid": "788c7ea971f67d48d4b49a353febfccc", "score": "0.6856693", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "title": "" }, { "docid": "788c7ea971f67d48d4b49a353febfccc", "score": "0.6856693", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n }", "title": "" }, { "docid": "7154d3fa16fcec596ec242f4f7dc2034", "score": "0.68395543", "text": "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "title": "" }, { "docid": "7154d3fa16fcec596ec242f4f7dc2034", "score": "0.68395543", "text": "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "title": "" }, { "docid": "7154d3fa16fcec596ec242f4f7dc2034", "score": "0.68395543", "text": "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = (n * 100) + \"%\";\n\t }\n\t\n\t return n;\n\t}", "title": "" }, { "docid": "20e06438f228211a3d9c5727d062a06e", "score": "0.683907", "text": "function asPercent(fraction) {\n return Math.ceil(fraction * 100)\n}", "title": "" }, { "docid": "19d029ed2d494c1fad8e7c3dadff7082", "score": "0.6829595", "text": "function perc(v) {\n return v + '%';\n }", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "13122e803e0f518d061da6c7dcfcabf7", "score": "0.68255436", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}", "title": "" }, { "docid": "749d9a84442ff633362bfdee2133143f", "score": "0.68194205", "text": "function calculatePercentage( partialValue, totalValue ) {\n return ( 100 * partialValue ) / totalValue;\n }", "title": "" }, { "docid": "bd9f2ae40c1e255ff7bf6dd121a95a93", "score": "0.68149835", "text": "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t n = n * 100 + \"%\";\n\t }\n\t return n;\n\t}", "title": "" }, { "docid": "2dd53c5738be5c0e96e38892ea87158e", "score": "0.6808422", "text": "function percent(value, extra) {\n\treturn value + ' %' + ((extra) ? ' (' + extra + ')' : '');\n}", "title": "" }, { "docid": "3f2298cc018c9ea0cf4bb6f477fabaa7", "score": "0.6785331", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + '%';\n }\n return n;\n }", "title": "" }, { "docid": "bdd75b60f1421f9b99c10faa1a77ebd6", "score": "0.6775015", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return `${Number(n) * 100}%`;\n }\n return n;\n}", "title": "" }, { "docid": "17ceaf094665b85fcefafbe9ff59c90a", "score": "0.6769348", "text": "function convertToPercent(index, val) {\n\n if (index == \"Above4\" || index == \"Above5\") {\n\n return Math.round(val * 100) + \"%\";\n\n }\n\n return val;\n\n}", "title": "" }, { "docid": "ca836914bdba83892acafe494edc1542", "score": "0.67674994", "text": "function _byteToPercent(value) { return (value / 255.0) * 100.0; }", "title": "" }, { "docid": "b69c8fa62482a79a82b15cdc396efc6e", "score": "0.6745941", "text": "function pctChange(val) {\n if (val > 0) {\n return '<span style=\"color:green;\">' + val + '%</span>';\n } else if (val < 0) {\n return '<span style=\"color:red;\">' + val + '%</span>';\n }\n return val;\n }", "title": "" }, { "docid": "983561dc50a2dbe6c439069eafa73632", "score": "0.67452604", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}", "title": "" }, { "docid": "59c4a2f17f26565752c0474bf66a04ca", "score": "0.67232066", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}", "title": "" }, { "docid": "f3eea6f7cf98d39c99c1a71734919de5", "score": "0.67226624", "text": "function pxToPercent(n, m) {\r return Math.round(n / m * 1000) / 10;\r}", "title": "" }, { "docid": "e37250b03844eafeaaa8fcf282ffa0b6", "score": "0.66947967", "text": "function convertToPercentage(n) {\n\t if (n <= 1) {\n\t return Number(n) * 100 + \"%\";\n\t }\n\t return n;\n\t}", "title": "" }, { "docid": "d4e7fbc27ff97bc0ef3e2df0c06d14f8", "score": "0.6692231", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "title": "" }, { "docid": "d4e7fbc27ff97bc0ef3e2df0c06d14f8", "score": "0.6692231", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "title": "" }, { "docid": "d4e7fbc27ff97bc0ef3e2df0c06d14f8", "score": "0.6692231", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "title": "" }, { "docid": "d4e7fbc27ff97bc0ef3e2df0c06d14f8", "score": "0.6692231", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "title": "" }, { "docid": "d4e7fbc27ff97bc0ef3e2df0c06d14f8", "score": "0.6692231", "text": "function convertToPercentage(n) {\n if (n <= 1) {\n return Number(n) * 100 + \"%\";\n }\n return n;\n}", "title": "" }, { "docid": "5f146486694ff1a545e5bd827bc06c45", "score": "0.6690029", "text": "function pctChange(val){\n if(val > 0){\n return '<span style=\"color:green;\">' + val + '%</span>';\n }else if(val < 0){\n return '<span style=\"color:red;\">' + val + '%</span>';\n }\n return val;\n }", "title": "" }, { "docid": "1d1436a81d605e3c1d3a7d577003d0d6", "score": "0.66844845", "text": "function calculatePercent(percent, num) {\n return (percent * 100) / num\n}", "title": "" }, { "docid": "bff36774224995969b09e86547243f4e", "score": "0.66791433", "text": "function valueToPercentage(d) {\n return parseFloat((d.value / tmCurrentRoot.value) * 100).toFixed(2);\n}", "title": "" }, { "docid": "c0fd7776b7264ef2a24e35ea2e1dc2a9", "score": "0.66737837", "text": "function percentage (a, b){\n let P= Math.round(a/(a+b)*1000)/10;\n return \"your percentage is \" + P + \"%\";\n}", "title": "" } ]
4f36a42f9f13c98183ad38ba91119d24
date and time from ref 2822 format
[ { "docid": "3273f879da90af59152807dff18d0bd1", "score": "0.0", "text": "function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i));\n if (match) {\n var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }", "title": "" } ]
[ { "docid": "5d5bb002cf2f8c6d17abf0bdcdb0a429", "score": "0.653082", "text": "function createDrupalDateFromPieces(date, hour, minute, marker) {\n //Build time\n var time = hour + ':' + minute + ' ' + marker;\n //Build full date\n var dateTime = moment(date + ' ' + time, 'YYYY-MM-DD hh:mm A');\n //Return date in 24-hour format\n return moment(dateTime);\n }", "title": "" }, { "docid": "c2b0ea49b70600eb5cc245358d6888d9", "score": "0.64146084", "text": "_parsedDate(date) { //parse date for events\n let ndate = date.toString().split(' ');\n let time = this._parseTime(ndate[4]);\n return time.toString();\n }", "title": "" }, { "docid": "6d2ccf09aa7304ec079ff14eea1a2b8e", "score": "0.6174176", "text": "function sits_to_datetime(dtim,frmi) {\n if(typeof(frmi)!=\"string\" || frmi.length<1) {\n frmi = \"\";\n }\n var dat = undefined;\n if(typeof(dtim)==\"string\" && dtim!=\"\" && dtim.length>3) {\n dat = sits_uniface_to_date(dtim); //try uniface format first\n if(typeof(dat)==\"undefined\") {\n var dstr = \"\";\n var tstr = \"\";\n var pos = dtim.indexOf(\":\")-1; //time delimiter is always colon\n if(pos>=0) {\n while(pos>=0 && $.isNumeric(dtim.charAt(pos))) { //loop back to find non-numeric\n pos--;\n }\n if(pos>=0) {\n dstr = sits_white_trim(dtim.substring(0,pos)); //split date and time\n tstr = sits_white_trim(dtim.substr(pos+1));\n }\n else {\n tstr = dtim; //time only\n }\n }\n else {\n dstr = dtim; //date only\n }\n var dfrm = \"\";\n var tfrm = \"\";\n if(frmi!=\"\") {\n var hfrm = \"H\";\n pos = frmi.indexOf(hfrm);\n if(pos<0) {\n hfrm = \"h\";\n pos = frmi.indexOf(hfrm);\n }\n if(pos==0) {\n tfrm = frmi; //time format only\n }\n else if(pos<0) {\n dfrm = frmi; //date format only\n }\n else {\n var arr = frmi.split(hfrm); //split date and time\n dfrm = sits_white_trim(arr.splice(0,1));\n tfrm = sits_white_trim(hfrm+arr.join(hfrm));\n }\n }\n var tdat = sits_to_date(dstr,dfrm); //convert both parts\n var ttim = sits_to_time(tstr,tfrm);\n if(typeof(tdat)!=\"undefined\") {\n if(typeof(ttim)!=\"undefined\") {\n var str = sits_date_to_string(tdat,\"yy-mm-dd\")+\"T\"+sits_time_to_string(ttim,\"H2:N2:S2.T2\");\n dat = new Date(str); //combine date and time\n }\n else {\n dat = tdat; //date only\n }\n }\n else {\n if(typeof(ttim)!=\"undefined\") {\n dat = ttim; //time only\n }\n }\n }\n }\n return dat;\n}", "title": "" }, { "docid": "ac970edc1dd5c450a9c2740e1d119002", "score": "0.605324", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "ac970edc1dd5c450a9c2740e1d119002", "score": "0.605324", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "ac970edc1dd5c450a9c2740e1d119002", "score": "0.605324", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "63e294b7d4a11a2e59f6da24d480142a", "score": "0.6051558", "text": "function t(e,t,r){var o=\" \";return(e%100>=20||e>=100&&e%100==0)&&(o=\" de \"),e+o+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[r]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "e56ce415af42388cb81447969903ecf4", "score": "0.6021129", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "eee9a6fea315209b9c9da9f26904b33a", "score": "0.5998254", "text": "function timeconvert(x)\n{\n var ds = x.time_created;\n var day = new Date(ds.replace(' ', 'T') + 'Z').toDateString().split(\" \");\n return day[2] + ' ' + day[1] + ' ' + day[3];\n}", "title": "" }, { "docid": "09cbda07c541cfe12965b48cba214cd7", "score": "0.59945226", "text": "function t(e,t,r){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[r]}", "title": "" }, { "docid": "8b2ba426ac938984036f4e696a983ea5", "score": "0.5991798", "text": "function extract_time(date_str)\n{\n RMPApplication.debug (\"begin extract_time\");\n c_debug(debug.prepare_data, \"=> extract_time: date_str = \", date_str);\n var time_str = date_str.substr(11,5);\n return time_str;\n RMPApplication.debug (\"end extract_time\");\n}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "92d1b72c2944dc889819677dd53a99e8", "score": "0.59771127", "text": "function t(e,t,n){var i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "547ea1c07b23b758831a3ff1a514eebb", "score": "0.597495", "text": "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "ba961ff727d9acf683046ce768320057", "score": "0.5960425", "text": "function sits_datetime_to_string(valu,frmi) {\n if(typeof(valu)==\"string\") {\n valu = sits_uniface_to_date(valu); //try converting Uniface date string into date\n }\n if(typeof(frmi)!=\"string\" || frmi.length<1) {\n frmi = sits_date_format+\" \"+sits_time_format;\n }\n var frmi1 = \"\";\n\tvar frmi2 = \"\";\n\tvar char_to_split = frmi.toUpperCase().search(\"H\");\n\tif(char_to_split<0) char_to_split = frmi.toUpperCase().search(\"N\");\n\tif(char_to_split<0) char_to_split = frmi.toUpperCase().search(\"S\");\n\tif(char_to_split<0) char_to_split = frmi.toUpperCase().search(\"T\");\n\tif(char_to_split<0) char_to_split = frmi.toUpperCase().search(\"P\");\n\tif(char_to_split>=0) {\n\t frmi1 = frmi.substring(0,char_to_split);\n\t frmi2 = frmi.substring(char_to_split);\n\t}\n else {\n\t frmi1 = frmi;\n\t}\n var datepart = sits_date_to_string(valu,frmi1);\n\tvar timepart = sits_time_to_string(valu,frmi2);\n\tif(datepart!=\"\" && timepart!=\"\") {\n\t return datepart+timepart;\n }\n\treturn \"\";\n}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "2beb273ec977d22b724edbc032dc89e8", "score": "0.5950483", "text": "function t(e,t,n){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "5db1876cd9f4980c1744c536e411cbec", "score": "0.5919827", "text": "function t(e,t,r){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[r]}", "title": "" }, { "docid": "abbd8d9435d43ef8e85bd8b40dde75bf", "score": "0.5918", "text": "function formatDate(date,format) {\n format=format+\"\";\n var result=\"\";\n var i_format=0;\n var c=\"\";\n var token=\"\";\n var y=date.getYear()+\"\";\n var M=date.getMonth()+1;\n var d=date.getDate();\n var E=date.getDay();\n var H=date.getHours();\n var m=date.getMinutes();\n var s=date.getSeconds();\n var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;\n // Convert real date parts into formatted versions\n var value=new Object();\n if (y.length < 4) {\n y=\"\"+(y-0+1900);\n }\n value[\"y\"]=\"\"+y;\n value[\"yyyy\"]=y;\n value[\"yy\"]=y.substring(2,4);\n value[\"M\"]=M;\n value[\"MM\"]=LZ(M);\n value[\"MMM\"]=MONTH_NAMES[M-1];\n value[\"NNN\"]=MONTH_NAMES[M+11];\n value[\"d\"]=d;\n value[\"dd\"]=LZ(d);\n value[\"E\"]=DAY_NAMES[E+7];\n value[\"EE\"]=DAY_NAMES[E];\n value[\"H\"]=H;\n value[\"HH\"]=LZ(H);\n if (H==0){\n value[\"h\"]=12;\n }\n else if (H>12){\n value[\"h\"]=H-12;\n }\n else {\n value[\"h\"]=H;\n }\n value[\"hh\"]=LZ(value[\"h\"]);\n if (H>11){\n value[\"K\"]=H-12;\n } else {\n value[\"K\"]=H;\n }\n value[\"k\"]=H+1;\n value[\"KK\"]=LZ(value[\"K\"]);\n value[\"kk\"]=LZ(value[\"k\"]);\n if (H > 11) {\n value[\"a\"]=\"PM\";\n }\n else {\n value[\"a\"]=\"AM\";\n }\n value[\"m\"]=m;\n value[\"mm\"]=LZ(m);\n value[\"s\"]=s;\n value[\"ss\"]=LZ(s);\n while (i_format < format.length) {\n c=format.charAt(i_format);\n token=\"\";\n while ((format.charAt(i_format)==c) && (i_format < format.length)) {\n token += format.charAt(i_format++);\n }\n if (value[token] != null) {\n result=result + value[token];\n }\n else {\n result=result + token;\n }\n }\n return result;\n}", "title": "" }, { "docid": "123a7b66f2cb223fd11609bc34a7d3a8", "score": "0.59023315", "text": "function e(n,e,t){var r=\" \";return(n%100>=20||n>=100&&n%100==0)&&(r=\" de \"),n+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[t]}", "title": "" }, { "docid": "58a1f0d7aa3ab201d8f4dbaae75fe3e0", "score": "0.58995897", "text": "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "58a1f0d7aa3ab201d8f4dbaae75fe3e0", "score": "0.58995897", "text": "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "58a1f0d7aa3ab201d8f4dbaae75fe3e0", "score": "0.58995897", "text": "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "58a1f0d7aa3ab201d8f4dbaae75fe3e0", "score": "0.58995897", "text": "function t(e,t,n){var a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "1a90ea2cd02dc3ca812ea45028f2175b", "score": "0.589797", "text": "function formatDate(date, format) {\r\n\tformat = format + \"\";\r\n\tvar result = \"\";\r\n\tvar i_format = 0;\r\n\tvar c = \"\";\r\n\tvar token = \"\";\r\n\tvar y = date.getYear() + \"\";\r\n\tvar M = date.getMonth() + 1;\r\n\tvar d = date.getDate();\r\n\tvar E = date.getDay();\r\n\tvar H = date.getHours();\r\n\tvar m = date.getMinutes();\r\n\tvar s = date.getSeconds();\r\n\tvar yyyy, yy, MMM, MM, dd, hh, h, mm, ss, ampm, HH, H, KK, K, kk, k;\r\n\t// Convert real date parts into formatted versions\r\n\tvar value = new Object();\r\n\tif (y.length < 4) {y = \"\" + (y - 0 + 1900);}\r\n\tvalue[\"y\"] = \"\" + y;\r\n\tvalue[\"yyyy\"] = y;\r\n\tvalue[\"yy\"] = y.substring(2, 4);\r\n\tvalue[\"M\"] = M;\r\n\tvalue[\"MM\"] = LZ(M);\r\n\tvalue[\"MMM\"] = MONTH_NAMES[M - 1];\r\n\tvalue[\"NNN\"] = MONTH_NAMES[M + 11];\r\n\tvalue[\"d\"] = d;\r\n\tvalue[\"dd\"] = LZ(d);\r\n\tvalue[\"E\"] = DAY_NAMES[E + 7];\r\n\tvalue[\"EE\"] = DAY_NAMES[E];\r\n\tvalue[\"H\"] = H;\r\n\tvalue[\"HH\"] = LZ(H);\r\n\tif (H == 0) {value[\"h\"] = 12;}\r\n\telse if (H > 12) {value[\"h\"] = H - 12;}\r\n\telse {value[\"h\"] = H;}\r\n\tvalue[\"hh\"] = LZ(value[\"h\"]);\r\n\tif (H > 11) {value[\"K\"] = H - 12;} else {value[\"K\"] = H;}\r\n\tvalue[\"k\"] = H + 1;\r\n\tvalue[\"KK\"] = LZ(value[\"K\"]);\r\n\tvalue[\"kk\"] = LZ(value[\"k\"]);\r\n\tif (H > 11) { value[\"a\"] = \"PM\"; }\r\n\telse { value[\"a\"] = \"AM\"; }\r\n\tvalue[\"m\"] = m;\r\n\tvalue[\"mm\"] = LZ(m);\r\n\tvalue[\"s\"] = s;\r\n\tvalue[\"ss\"] = LZ(s);\r\n\twhile (i_format < format.length) {\r\n\t\tc = format.charAt(i_format);\r\n\t\ttoken = \"\";\r\n\t\twhile ((format.charAt(i_format) == c) && (i_format < format.length)) {\r\n\t\t\ttoken += format.charAt(i_format++);\r\n\t\t}\r\n\t\tif (value[token] != null) { result = result + value[token]; }\r\n\t\telse { result = result + token; }\r\n\t}\r\n\treturn result;\r\n}", "title": "" }, { "docid": "7e59cfde63797db23766475d8870fea6", "score": "0.58909506", "text": "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "19aed501bc17b3a923a64a5ed745d00a", "score": "0.5876259", "text": "function formatDate(date,format) {\n\tformat=format+\"\";\n\tvar result=\"\";\n\tvar i_format=0;\n\tvar c=\"\";\n\tvar token=\"\";\n\tvar y=date.getYear()+\"\";\n\tvar M=date.getMonth()+1;\n\tvar d=date.getDate();\n\tvar E=date.getDay();\n\tvar H=date.getHours();\n\tvar m=date.getMinutes();\n\tvar s=date.getSeconds();\n\tvar yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;\n\t// Convert real date parts into formatted versions\n\tvar value=new Object();\n\tif (y.length < 4) {y=\"\"+(y-0+1900);}\n\tvalue[\"y\"]=\"\"+y;\n\tvalue[\"yyyy\"]=y;\n\tvalue[\"yy\"]=y.substring(2,4);\n\tvalue[\"M\"]=M;\n\tvalue[\"MM\"]=LZ(M);\n\tvalue[\"MMM\"]=MONTH_NAMES[M-1];\n\tvalue[\"NNN\"]=MONTH_NAMES[M+11];\n\tvalue[\"d\"]=d;\n\tvalue[\"dd\"]=LZ(d);\n\tvalue[\"E\"]=DAY_NAMES[E+7];\n\tvalue[\"EE\"]=DAY_NAMES[E];\n\tvalue[\"H\"]=H;\n\tvalue[\"HH\"]=LZ(H);\n\tif (H==0){value[\"h\"]=12;}\n\telse if (H>12){value[\"h\"]=H-12;}\n\telse {value[\"h\"]=H;}\n\tvalue[\"hh\"]=LZ(value[\"h\"]);\n\tif (H>11){value[\"K\"]=H-12;} else {value[\"K\"]=H;}\n\tvalue[\"k\"]=H+1;\n\tvalue[\"KK\"]=LZ(value[\"K\"]);\n\tvalue[\"kk\"]=LZ(value[\"k\"]);\n\tif (H > 11) { value[\"a\"]=\"PM\"; }\n\telse { value[\"a\"]=\"AM\"; }\n\tvalue[\"m\"]=m;\n\tvalue[\"mm\"]=LZ(m);\n\tvalue[\"s\"]=s;\n\tvalue[\"ss\"]=LZ(s);\n\twhile (i_format < format.length) {\n\t\tc=format.charAt(i_format);\n\t\ttoken=\"\";\n\t\twhile ((format.charAt(i_format)==c) && (i_format < format.length)) {\n\t\t\ttoken += format.charAt(i_format++);\n\t\t\t}\n\t\tif (value[token] != null) { result=result + value[token]; }\n\t\telse { result=result + token; }\n\t\t}\n\treturn result;\n\t}", "title": "" }, { "docid": "bb2df904f79e949a496524e1a415a134", "score": "0.5871416", "text": "function extractDate2(paragraph) {\n\tdate = paragraph.slice(5,15);\n\tfunction numberAt(start, length) {\n\t\treturn Number(date.slice(start, start+length));\n\t}\n\treturn new Date(numberAt(6,4), numberAt(3,2)-1, numberAt(0,2));\n}", "title": "" }, { "docid": "04811d69072ff9eecfa195c0596799ba", "score": "0.5867427", "text": "function t(e,t,a){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "title": "" }, { "docid": "04811d69072ff9eecfa195c0596799ba", "score": "0.5867427", "text": "function t(e,t,a){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "title": "" }, { "docid": "04811d69072ff9eecfa195c0596799ba", "score": "0.5867427", "text": "function t(e,t,a){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "title": "" }, { "docid": "04811d69072ff9eecfa195c0596799ba", "score": "0.5867427", "text": "function t(e,t,a){var n=\" \";return(e%100>=20||e>=100&&e%100==0)&&(n=\" de \"),e+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[a]}", "title": "" }, { "docid": "4db1d3cb269c2685f124151c996400fe", "score": "0.58602566", "text": "function render_datetime(data){\n\t\tif (data == \"\" || data === undefined)\n\t\t\treturn \"\";\n\t var datetime = data.split(' ');\n\t var date = datetime[0].split('-').reverse().join('/');\n\t var time = datetime[1].substring(0,5);\n\t return date+' às '+time;\n\t}", "title": "" }, { "docid": "d64761742d7d1a8179ba8677e87de9dd", "score": "0.5847974", "text": "function e(n,e,t){var a=\" \";return(n%100>=20||n>=100&&n%100==0)&&(a=\" de \"),n+a+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[t]}", "title": "" }, { "docid": "4e3086cc0e9c1e949d97df6511cf8baf", "score": "0.5847704", "text": "function e(t,e,n){var i=\" \";return(t%100>=20||t>=100&&t%100==0)&&(i=\" de \"),t+i+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "80e09fca31783f8f5fecf4f3da5287af", "score": "0.5847463", "text": "function e(t,e,n){var r=\" \";return(t%100>=20||t>=100&&t%100==0)&&(r=\" de \"),t+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "8fc843540521f2fe98e097ecf834363d", "score": "0.58462644", "text": "function Time(bcd1, bcd2, bcd3){\n\n const c = parseInt(bcd3).toString(16)\n const c1 = parseInt(bcd1).toString(16)\n const c2 = parseInt(bcd2).toString(16)\n\n const val = c + c1 + c2\n\n let buffer = new Buffer.from(`${val}`, 'hex');\n\n const date = bcdDate.decode(buffer);\n let buffers = bcdDate.encode(date);\n \n const dates = bcdDate.decode(buffers, true);\n console.log(dates)\n\n\n return dates;\n}", "title": "" }, { "docid": "b79394385a4e97eca4a3b3c85350cd69", "score": "0.582715", "text": "function n(e,n,t){var r=\" \";return(e%100>=20||e>=100&&e%100==0)&&(r=\" de \"),e+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[t]}", "title": "" }, { "docid": "0450449d6b8e7f2bb27b499e6e663b95", "score": "0.5813297", "text": "function sits_datetime_to_uniface(valu) {\n\treturn sits_datetime_to_string(valu,\"yymmddH2N2S2T2\");\n}", "title": "" }, { "docid": "13abe8a4746783f46be91a143342a7ee", "score": "0.58098656", "text": "function e(t,e,n){var r=\" \";return(t%100>=20||t>=100&&t%100==0)&&(r=\" de \"),t+r+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[n]}", "title": "" }, { "docid": "ba6c40712c07f42de0004392b2e54ba1", "score": "0.58023673", "text": "function edgeDateFormat(date)\n{\n return printf(\"%04d-%02d-%02dT%02d:%02d:%02d\",date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\n}", "title": "" }, { "docid": "1bdadb5a17a2dbb9bbf9bf6a2a1356ec", "score": "0.5795458", "text": "function e(t,e,r){var n=\" \";return(t%100>=20||t>=100&&t%100==0)&&(n=\" de \"),t+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[r]}", "title": "" }, { "docid": "7f110917f934155b87de569047e4f41c", "score": "0.5789455", "text": "function formatDate(date,format) {\n\tformat=format+\"\";\n\tdate = new Date(date);\n\tvar result=\"\";\n\tvar i_format=0;\n\tvar c=\"\";\n\tvar token=\"\";\n\tvar y=date.getYear()+\"\";\n\tvar M=date.getMonth()+1;\n\tvar d=date.getDate();\n\tvar E=date.getDay();\n\tvar H=date.getHours();\n\tvar m=date.getMinutes();\n\tvar s=date.getSeconds();\n\tvar yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,KK,K,kk,k;\n\t// Convert real date parts into formatted versions\n\tvar value=new Object();\n\tif (y.length < 4) {y=\"\"+(y-0+1900);}\n\tvalue[\"y\"]=\"\"+y;\n\tvalue[\"yyyy\"]=y;\n\tvalue[\"yy\"]=y.substring(2,4);\n\tvalue[\"M\"]=M;\n\tvalue[\"MM\"]=LZ(M);\n\tvalue[\"MMM\"]=MONTH_NAMES[M-1];\n\tvalue[\"NNN\"]=MONTH_NAMES[M+11];\n\tvalue[\"d\"]=d;\n\tvalue[\"dd\"]=LZ(d);\n\tvalue[\"E\"]=DAY_NAMES[E+7];\n\tvalue[\"EE\"]=DAY_NAMES[E];\n\tvalue[\"H\"]=H;\n\tvalue[\"HH\"]=LZ(H);\n\tif (H==0){value[\"h\"]=12;}\n\telse if (H>12){value[\"h\"]=H-12;}\n\telse {value[\"h\"]=H;}\n\tvalue[\"hh\"]=LZ(value[\"h\"]);\n\tif (H>11){value[\"K\"]=H-12;} else {value[\"K\"]=H;}\n\tvalue[\"k\"]=H+1;\n\tvalue[\"KK\"]=LZ(value[\"K\"]);\n\tvalue[\"kk\"]=LZ(value[\"k\"]);\n\tif (H > 11) { value[\"a\"]=\"PM\"; }\n\telse { value[\"a\"]=\"AM\"; }\n\tvalue[\"m\"]=m;\n\tvalue[\"mm\"]=LZ(m);\n\tvalue[\"s\"]=s;\n\tvalue[\"ss\"]=LZ(s);\n\twhile (i_format < format.length) {\n\t\tc=format.charAt(i_format);\n\t\ttoken=\"\";\n\t\twhile ((format.charAt(i_format)==c) && (i_format < format.length)) {\n\t\t\ttoken += format.charAt(i_format++);\n\t\t\t}\n\t\tif (value[token] != null) { result=result + value[token]; }\n\t\telse { result=result + token; }\n\t\t}\n\treturn result;\n}", "title": "" }, { "docid": "a61698da568af5ff30e4ca5ffa89498e", "score": "0.5771895", "text": "function get_formatted_date(date) {\r\n function get_formatted_num(num, expected_length) {\r\n var str = \"\";\r\n var num_str = num.toString();\r\n var num_zeros = expected_length - num_str.length;\r\n for (var i = 0; i < num_zeros; ++i) {\r\n str += '0';\r\n }\r\n str += num_str;\r\n return str;\r\n }\r\n var msg = get_formatted_num(date.getFullYear(), 4) + \"-\";\r\n msg += get_formatted_num(date.getMonth() + 1, 2) + \"-\";\r\n msg += get_formatted_num(date.getDate(), 2) + \" \";\r\n msg += get_formatted_num(date.getHours(), 2) + \":\";\r\n msg += get_formatted_num(date.getMinutes(), 2) + \":\";\r\n msg += get_formatted_num(date.getSeconds(), 2);\r\n return msg;\r\n}", "title": "" }, { "docid": "186073981883478959ad4ac5140fd552", "score": "0.57705367", "text": "function friendlyDate(date)\n{\t\t\n\treturn dateFormat(new Date(date), \"dd mmm yyyy HH:MM:ss\");\n}", "title": "" }, { "docid": "4772abd233cb5105ca3f83eba837f912", "score": "0.57521087", "text": "function hexdate2ddmmyy(hd)\n{\n\tvar y= (hd >> 16);\n\tvar m= ((hd - (y << 16)) >> 8);\n\tvar d= ((hd - (y << 16)) - (m << 8));\n\treturn \"\"+ ((d<=9)?\"0\":\"\") + d + \"-\" + ((m<=9)?\"0\":\"\") + m + \"-\" + ((y<=9)?\"0\":\"\") + y;\n}", "title": "" }, { "docid": "906a86046aecba398e11322ff1de9750", "score": "0.5738672", "text": "function dateExtractor(rawText) {\n let start = rawText.indexOf('>');\n let middle = rawText.indexOf('-', start);\n let end = rawText.indexOf('</span>');\n\n //adjusts appearance of date string to Dayname, Month Day, Year. Start time: TIME\n let dateString = `${rawText.substring(start + 1, middle - 1)}. Start Time: ${rawText.substring(middle + 2, end)}`;\n return dateString;\n}", "title": "" }, { "docid": "a328c3478b157268f2d2c5d1fc206b8e", "score": "0.5714242", "text": "function themerex_parse_date(dt) {\n \"use strict\";\n dt = dt.replace(/\\//g, '-').replace(/\\./g, '-').replace(/T/g, ' ').split('+')[0];\n var dt2 = dt.split(' ');\n var d = dt2[0].split('-');\n var t = dt2[1].split(':');\n d.push(t[0], t[1], t[2]);\n return d;\n}", "title": "" }, { "docid": "f4c419b3ac0b3d36db062046572b2246", "score": "0.5707174", "text": "function dateParser() {\n\tvar dateRaw = new Date();\n\tvar dateArray = dateRaw.toString().split(\" \");\n\tvar date = dateArray[1] + \". \" + dateArray[2] + \", \" + dateArray[3];\n\treturn date;\n}", "title": "" }, { "docid": "90a7451d4f045d46163e52b47c58102d", "score": "0.56858975", "text": "function addDate(objet)\r\n{\r\n //20161227T181200\r\n var horaire = objet['stop_date_time']['arrival_date_time'].substring(9);\r\n var heure = horaire.substring(0,2);\r\n var min = horaire.substring(2,4);\r\n return heure+\":\"+min;\r\n}", "title": "" }, { "docid": "7f69d000ba45bbe0ff9a4414c6e8d838", "score": "0.56760615", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},i=\" \";if(e%100>=20||e>=100&&e%100===0){i=\" de \"}return e+i+r[n]}", "title": "" }, { "docid": "5e0401f54199036f1dc391636fa70355", "score": "0.5675046", "text": "function e(B,e,t){var n=\" \";return(B%100>=20||B>=100&&B%100==0)&&(n=\" de \"),B+n+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[t]}", "title": "" }, { "docid": "242d6b16c35230c473bd66e5d904603e", "score": "0.5667404", "text": "function getDateFromFormat(val, format, bHour) {\n val = val + \"\";\n format = format + \"\";\n var i_val = 0;\n var i_format = 0;\n var c = \"\";\n var token = \"\";\n var token2 = \"\";\n var x, y;\n var now = new Date();\n var year = now.getYear();\n var month = now.getMonth() + 1;\n var date = 1;\n var hh = bHour ? now.getHours() : 0;\n var mm = bHour ? now.getMinutes() : 0;\n var ss = bHour ? now.getSeconds() : 0;\n var ampm = \"\";\n\n while (i_format < format.length) {\n // Get next token from format string\n c = format.charAt(i_format);\n token = \"\";\n while ((format.charAt(i_format) == c) && (i_format < format.length)) {\n token += format.charAt(i_format++);\n }\n // Extract contents of value based on format token\n if (token == \"yyyy\" || token == \"yy\" || token == \"y\") {\n if (token == \"yyyy\") { x = 4; y = 4; }\n if (token == \"yy\") { x = 2; y = 2; }\n if (token == \"y\") { x = 2; y = 4; }\n year = _getInt(val, i_val, x, y);\n if (year == null) { return 0; }\n i_val += year.length;\n if (year.length == 2) {\n if (year > 70) { year = 1900 + (year - 0); }\n else { year = 2000 + (year - 0); }\n }\n }\n else if (token == \"MMMM\" || token == \"MMM\") {\n month = 0;\n for (var i = 0; i < MONTH_NAMES.length; i++) {\n var month_name = MONTH_NAMES[i];\n if (val.substring(i_val, i_val + month_name.length).toLowerCase() == month_name.toLowerCase()) {\n if (token == \"MMMM\" || (token == \"MMM\" && i > 11)) {\n month = i + 1;\n if (month > 12) { month -= 12; }\n i_val += month_name.length;\n break;\n }\n }\n }\n if ((month < 1) || (month > 12)) { return 0; }\n }\n else if (token == \"EE\" || token == \"E\") {\n for (var i = 0; i < DAY_NAMES.length; i++) {\n var day_name = DAY_NAMES[i];\n if (val.substring(i_val, i_val + day_name.length).toLowerCase() == day_name.toLowerCase()) {\n i_val += day_name.length;\n break;\n }\n }\n }\n else if (token == \"MM\" || token == \"M\") {\n month = _getInt(val, i_val, token.length, 2);\n if (month == null && token == \"MM\") { // try with just one M\n month = _getInt(val, i_val, \"M\".length, 1);\n }\n if (month == null || (month < 1) || (month > 12)) { return 0; }\n i_val += month.length;\n }\n else if (token == \"dd\" || token == \"d\") {\n date = _getInt(val, i_val, token.length, 2);\n if (date == null && token == \"dd\") { // try with just one d\n date = _getInt(val, i_val, \"d\".length, 1);\n }\n if (date == null || (date < 1) || (date > 31)) { return 0; }\n i_val += date.length;\n }\n else if (token == \"hh\" || token == \"h\") {\n hh = _getInt(val, i_val, token.length, 2);\n if (hh == null || (hh < 1) || (hh > 12)) { return 0; }\n i_val += hh.length;\n }\n else if (token == \"HH\" || token == \"H\") {\n hh = _getInt(val, i_val, token.length, 2);\n if (hh == null || (hh < 0) || (hh > 23)) { return 0; }\n i_val += hh.length;\n }\n else if (token == \"KK\" || token == \"K\") {\n hh = _getInt(val, i_val, token.length, 2);\n if (hh == null || (hh < 0) || (hh > 11)) { return 0; }\n i_val += hh.length;\n }\n else if (token == \"kk\" || token == \"k\") {\n hh = _getInt(val, i_val, token.length, 2);\n if (hh == null || (hh < 1) || (hh > 24)) { return 0; }\n i_val += hh.length; hh--;\n }\n else if (token == \"mm\" || token == \"m\") {\n mm = _getInt(val, i_val, token.length, 2);\n if (mm == null || (mm < 0) || (mm > 59)) { return 0; }\n i_val += mm.length;\n }\n else if (token == \"ss\" || token == \"s\") {\n ss = _getInt(val, i_val, token.length, 2);\n if (ss == null || (ss < 0) || (ss > 59)) { return 0; }\n i_val += ss.length;\n }\n else if (token == \"tt\") {\n if (val.substring(i_val, i_val + 2).toLowerCase() == \"am\" ||\n\t\t\t val.substring(i_val, i_val + 4).toLowerCase() == \"a.m.\") { ampm = \"AM\"; }\n else if (val.substring(i_val, i_val + 2).toLowerCase() == \"pm\" ||\n\t\t\t val.substring(i_val, i_val + 4).toLowerCase() == \"p.m.\") { ampm = \"PM\"; }\n else { return 0; }\n i_val += 2;\n }\n else {\n if (val.substring(i_val, i_val + token.length) != token) { return 0; }\n else { i_val += token.length; }\n }\n }\n // If there are any trailing characters left in the value, it doesn't match\n if (i_val != val.length) { return 0; }\n // Is date valid for month?\n if (month == 2) {\n // Check for leap year\n if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { // leap year\n if (date > 29) { return 0; }\n }\n else { if (date > 28) { return 0; } }\n }\n if ((month == 4) || (month == 6) || (month == 9) || (month == 11)) {\n if (date > 30) { return 0; }\n }\n // Correct hours value\n if (hh < 12 && ampm == \"PM\") { hh = hh - 0 + 12; }\n else if (hh > 11 && ampm == \"AM\") { hh -= 12; }\n var newdate = new Date(year, month - 1, date, hh, mm, ss);\n return newdate;\n}", "title": "" }, { "docid": "288274a5fec34f57d1369c63afb7c3e1", "score": "0.56595767", "text": "function i(e,t,n){var i={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100==0)&&(o=\" de \"),e+o+i[n]}", "title": "" }, { "docid": "303c3feca05c87253747379738053e21", "score": "0.56567883", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+r[n]}", "title": "" }, { "docid": "2b32e1cc164b15da53528fe18447c5fc", "score": "0.5655475", "text": "function hireDate1() {\n var hireDate1a= new Date(10,21,1953);\n var n = hireDate1a.toLocaleDateString();\n return n;\n}", "title": "" }, { "docid": "acaaa8f7f9554fcaed50e9a29f8f0ee2", "score": "0.5650275", "text": "function cubism_opentsdbFormatDate(time) {\n return Math.floor(time / 1000);\n}", "title": "" }, { "docid": "d17e7ad1f705a74602e440f366c6c8e8", "score": "0.5647961", "text": "function getTime () {\r\n let nDate = new Date(targetDate).toLocaleDateString('fr-FR', { \r\n weekday: 'short',\r\n month: 'short',\r\n day: '2-digit'\r\n });\r\n \r\n let date = nDate.slice(0,3) + ', ' + nDate.slice(5,7) + ' ' + nDate.slice(7,11);\r\n document.getElementById('date').innerHTML = date;\r\n}", "title": "" }, { "docid": "43118d34564e9266f8c4002bb4cc3fd7", "score": "0.56442326", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+r[n]}", "title": "" }, { "docid": "697138d1013170d5125c34cfdef02967", "score": "0.56364125", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100==0)&&(o=\" de \"),e+o+r[n]}", "title": "" }, { "docid": "697138d1013170d5125c34cfdef02967", "score": "0.56364125", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100==0)&&(o=\" de \"),e+o+r[n]}", "title": "" }, { "docid": "44a3865ca75f01b106eb8f9001015acb", "score": "0.56304705", "text": "function get_formatted_date(date) {\n function get_formatted_num(num, expected_length) {\n var str = \"\";\n var num_str = num.toString();\n var num_zeros = expected_length - num_str.length;\n for (var i = 0; i < num_zeros; ++i) {\n str += '0';\n }\n str += num_str;\n return str;\n }\n var msg = get_formatted_num(date.getFullYear(), 4) + \"-\";\n msg += get_formatted_num(date.getMonth() + 1, 2) + \"-\";\n msg += get_formatted_num(date.getDate(), 2) + \" \";\n msg += get_formatted_num(date.getHours(), 2) + \":\";\n msg += get_formatted_num(date.getMinutes(), 2) + \":\";\n msg += get_formatted_num(date.getSeconds(), 2);\n return msg;\n}", "title": "" }, { "docid": "f084197c88c6b28c5b0085f896ccb8ca", "score": "0.5623025", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},i=\" \";return(e%100>=20||e>=100&&e%100==0)&&(i=\" de \"),e+i+r[n]}", "title": "" }, { "docid": "b6068edba6e5b73dd0557732e14c1e83", "score": "0.5622928", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"},i=\" \";if(e%100>=20||e>=100&&e%100===0){i=\" de \"}return e+i+r[n]}", "title": "" }, { "docid": "fbb0dcf195eccfd6fa4d9ded9c095342", "score": "0.5619288", "text": "function parse_dos_date(buf) {\n\tvar hms = buf.read_shift(2) & 0xFFFF;\n\tvar ymd = buf.read_shift(2) & 0xFFFF;\n\tvar val = new Date();\n\tvar d = ymd & 0x1F; ymd >>>= 5;\n\tvar m = ymd & 0x0F; ymd >>>= 4;\n\tval.setMilliseconds(0);\n\tval.setFullYear(ymd + 1980);\n\tval.setMonth(m-1);\n\tval.setDate(d);\n\tvar S = hms & 0x1F; hms >>>= 5;\n\tvar M = hms & 0x3F; hms >>>= 6;\n\tval.setHours(hms);\n\tval.setMinutes(M);\n\tval.setSeconds(S<<1);\n\treturn val;\n}", "title": "" }, { "docid": "4d7dbc08c83b8f3b53dc6902a9d07d18", "score": "0.56131434", "text": "function parse_dos_date(buf/*:CFBlob*/)/*:Date*/ {\n\tvar hms = buf.read_shift(2) & 0xFFFF;\n\tvar ymd = buf.read_shift(2) & 0xFFFF;\n\tvar val = new Date();\n\tvar d = ymd & 0x1F; ymd >>>= 5;\n\tvar m = ymd & 0x0F; ymd >>>= 4;\n\tval.setMilliseconds(0);\n\tval.setFullYear(ymd + 1980);\n\tval.setMonth(m-1);\n\tval.setDate(d);\n\tvar S = hms & 0x1F; hms >>>= 5;\n\tvar M = hms & 0x3F; hms >>>= 6;\n\tval.setHours(hms);\n\tval.setMinutes(M);\n\tval.setSeconds(S<<1);\n\treturn val;\n}", "title": "" }, { "docid": "9678902cc5ac25b1ee41c6ad69cad27b", "score": "0.5611045", "text": "function formatedDate() {\n const now = new Date()\n .toLocaleTimeString('en-us', {\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n\n const date = now.split(',')[0].split(' ');\n const time = now.split(',')[1];\n return `${date[1]} ${date[0]},${time}`;\n}", "title": "" }, { "docid": "d476ea73a7948196cdf4abd332c1d7fc", "score": "0.56097335", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"},a=\" \";return(e%100>=20||e>=100&&e%100==0)&&(a=\" de \"),e+a+r[n]}", "title": "" }, { "docid": "47e8ee0a0b4e2764455901029f1c05a3", "score": "0.56061095", "text": "function hexdate(str)\n{\n\tvar di= str.split(\"-\");\n\tif(di.length!=3) return 0;\n\treturn (parseInt(di[0].substr(2)) << 16) | ( parseInt(di[1]) <<8 ) | parseInt(di[2]);\n}", "title": "" }, { "docid": "96859455630c52a8d74e6a6ecbf2c45b", "score": "0.55997646", "text": "function a(e,a,s){var t=\" \";return(e%100>=20||e>=100&&e%100==0)&&(t=\" de \"),e+t+{ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"}[s]}", "title": "" }, { "docid": "12194cc58eadec653c9ade56efb72b7e", "score": "0.5588899", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",MM:\"luni\",yy:\"ani\"},a=\" \";return(e%100>=20||e>=100&&e%100===0)&&(a=\" de \"),e+a+r[n]}", "title": "" }, { "docid": "fa300a948b7e6c838dcec82598211ca0", "score": "0.5588718", "text": "function t(e,t,n){var i={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"},r=\" \";if(e%100>=20||e>=100&&e%100===0){r=\" de \"}return e+r+i[n]}", "title": "" }, { "docid": "91c3185b1a2f11ffb7dba430eaa9d435", "score": "0.55829406", "text": "getHumanReadableDateTime(date) {\n return moment(date).format(dateTimeFormats['24']['datetimefmt'])\n }", "title": "" }, { "docid": "2728af6ea7bb30e1c3df99313f2cd320", "score": "0.5580857", "text": "function t(e,t,n){var r={ss:\"secunde\",mm:\"minute\",hh:\"ore\",dd:\"zile\",ww:\"săptămâni\",MM:\"luni\",yy:\"ani\"},o=\" \";return(e%100>=20||e>=100&&e%100===0)&&(o=\" de \"),e+o+r[n]}", "title": "" } ]
8303b0a803d8909ff5488ef112d320f0
Figures out what unit to format a set of ticks with
[ { "docid": "b3cc6a37ebb79e1deca45b9ac0756a76", "score": "0.63780254", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n var i, unit;\n\n for (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n unit = UNITS[i];\n\n if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n return unit;\n }\n }\n\n return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n }", "title": "" } ]
[ { "docid": "2f412a5d28e163ac7e73c76be153c8d3", "score": "0.72092795", "text": "_ticksToUnits(ticks) {\n return ticks;\n }", "title": "" }, { "docid": "6d93f023a80719d28660a49d49b93f92", "score": "0.71608907", "text": "function determineUnitForFormatting(scale,numTicks,minUnit,min,max){var i,unit;for(i=UNITS.length-1;i>=UNITS.indexOf(minUnit);i--){unit=UNITS[i];if(INTERVALS[unit].common&&scale._adapter.diff(max,min,unit)>=numTicks-1){return unit;}}return UNITS[minUnit?UNITS.indexOf(minUnit):0];}", "title": "" }, { "docid": "e83a9972c6c03983a572c46d7e03d685", "score": "0.7038573", "text": "_ticksToUnits(ticks) {\n return ticks;\n }", "title": "" }, { "docid": "e83a9972c6c03983a572c46d7e03d685", "score": "0.7038573", "text": "_ticksToUnits(ticks) {\n return ticks;\n }", "title": "" }, { "docid": "65731e7c3863181c9cad56fdfd2daded", "score": "0.68195814", "text": "_ticksToUnits(ticks) {\n return (0, _Conversions.ftom)(super._ticksToUnits(ticks));\n }", "title": "" }, { "docid": "14d4abc940a2730449f089ac5958f538", "score": "0.6793851", "text": "_ticksToUnits(ticks) {\n return (0,_Conversions__WEBPACK_IMPORTED_MODULE_1__.ftom)(super._ticksToUnits(ticks));\n }", "title": "" }, { "docid": "14d4abc940a2730449f089ac5958f538", "score": "0.6793851", "text": "_ticksToUnits(ticks) {\n return (0,_Conversions__WEBPACK_IMPORTED_MODULE_1__.ftom)(super._ticksToUnits(ticks));\n }", "title": "" }, { "docid": "a6abef595fd70e4f24a74346ffa78d3b", "score": "0.6600683", "text": "_ticksToUnits(ticks) {\n return 1 / (ticks * 60 / (this._getBpm() * this._getPPQ()));\n }", "title": "" }, { "docid": "f4f7bb212f926f8ea31cfef053069369", "score": "0.65923417", "text": "ticks(num) {\n let sr = this.ctx.sampleRate;\n let tickDur = sr / ((this.tempo / 60) * 4);\n\n return tickDur * num;\n }", "title": "" }, { "docid": "dce92880def92df938009084dbc680c4", "score": "0.657131", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\r\n\tvar i, unit;\r\n\r\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\r\n\t\tunit = UNITS[i];\r\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\r\n\t\t\treturn unit;\r\n\t\t}\r\n\t}\r\n\r\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\r\n}", "title": "" }, { "docid": "dce92880def92df938009084dbc680c4", "score": "0.657131", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\r\n\tvar i, unit;\r\n\r\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\r\n\t\tunit = UNITS[i];\r\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\r\n\t\t\treturn unit;\r\n\t\t}\r\n\t}\r\n\r\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\r\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "5709bc7cfd60d3586f90243ef99e5b26", "score": "0.656374", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "96d9ca428ba40644dd362990ac36c1d7", "score": "0.6543966", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\r\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\r\n\tvar ilen = UNITS.length;\r\n\tvar i, unit;\r\n\r\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\r\n\t\tunit = UNITS[i];\r\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\r\n\t\t\treturn unit;\r\n\t\t}\r\n\t}\r\n\r\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\r\n}", "title": "" }, { "docid": "9c131af297b10d92ec66b3afc6df6aef", "score": "0.6539859", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n var duration = moment.duration(moment(max).diff(moment(min)));\n var ilen = UNITS.length;\n var i, unit;\n\n for (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n unit = UNITS[i];\n\n if (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n return unit;\n }\n }\n\n return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n }", "title": "" }, { "docid": "942341472c91a4a95190e7490bf2c4fd", "score": "0.6460601", "text": "_ticksToUnits(ticks) {\n return ticks * this._beatsToUnits(1) / this._getPPQ();\n }", "title": "" }, { "docid": "c7fc52263fabfc6247e37c092c8df38a", "score": "0.64469856", "text": "function determineUnitForFormatting(scale, ticks, minUnit, min, max) {\n\t\tvar ilen = UNITS.length;\n\t\tvar i, unit;\n\n\t\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\t\tunit = UNITS[i];\n\t\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= ticks.length) {\n\t\t\t\treturn unit;\n\t\t\t}\n\t\t}\n\n\t\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n\t}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "cb64364165eda853c69e9b0b3b821682", "score": "0.64454347", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\tvar ilen = UNITS.length;\n\tvar i, unit;\n\n\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "bb21594b93ece568833c88baa3180e06", "score": "0.6436795", "text": "function withUnits(n) { return formatUserData(n, numberStyle); }", "title": "" }, { "docid": "bb21594b93ece568833c88baa3180e06", "score": "0.6436795", "text": "function withUnits(n) { return formatUserData(n, numberStyle); }", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "a27b33076517f6c0cab6465ad5b88172", "score": "0.6399217", "text": "function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n\tvar i, unit;\n\n\tfor (i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\tunit = UNITS[i];\n\t\tif (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}", "title": "" }, { "docid": "ea6aa2d6d847a26a30252e798bb6db53", "score": "0.6366044", "text": "_ticksToUnits(ticks) {\n return 1 / ((ticks * 60) / (this._getBpm() * this._getPPQ()));\n }", "title": "" }, { "docid": "ea6aa2d6d847a26a30252e798bb6db53", "score": "0.6366044", "text": "_ticksToUnits(ticks) {\n return 1 / ((ticks * 60) / (this._getBpm() * this._getPPQ()));\n }", "title": "" }, { "docid": "aa348ca572e9fb50a1ac1c7bbfdd1eb9", "score": "0.63331693", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\t\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\t\tvar ilen = UNITS.length;\n\t\tvar i, unit;\n\n\t\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\t\tunit = UNITS[i];\n\t\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\t\treturn unit;\n\t\t\t}\n\t\t}\n\n\t\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n\t}", "title": "" }, { "docid": "aa348ca572e9fb50a1ac1c7bbfdd1eb9", "score": "0.63331693", "text": "function determineUnitForFormatting(ticks, minUnit, min, max) {\n\t\tvar duration = moment.duration(moment(max).diff(moment(min)));\n\t\tvar ilen = UNITS.length;\n\t\tvar i, unit;\n\n\t\tfor (i = ilen - 1; i >= UNITS.indexOf(minUnit); i--) {\n\t\t\tunit = UNITS[i];\n\t\t\tif (INTERVALS[unit].common && duration.as(unit) >= ticks.length) {\n\t\t\t\treturn unit;\n\t\t\t}\n\t\t}\n\n\t\treturn UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n\t}", "title": "" }, { "docid": "42bbf17c3ce556f36d3daf8db0002175", "score": "0.6304124", "text": "_updateTicks() {\n const { ticks } = this._settings;\n\n if (!this._ticksElement)\n return;\n\n helpFuncs.removeChildElements(this._ticksElement);\n\n if (!ticks)\n return;\n\n const tickFrag = document.createDocumentFragment();\n \n let currentStep = this.min;\n while (helpFuncs.roundValue(currentStep) <= this.max) {\n const offsetPercent = helpFuncs.getPercent(currentStep, this.max, this.min);\n let tick = document.createElement('div');\n tick.classList.add(TICKS_ITEM_CLASS);\n tick.style['left'] = `${offsetPercent}%`;\n\n const formatterResult = typeof ticks === 'function' ?\n ticks.call(this, tick, currentStep, offsetPercent) : undefined;\n \n if (typeof formatterResult === 'undefined' || formatterResult) {\n tickFrag.appendChild(tick);\n }\n \n tick = null;\n currentStep += this.step;\n }\n\n this._ticksElement.appendChild(tickFrag);\n }", "title": "" }, { "docid": "9de35ca526bbcf6b89d3936b11d84334", "score": "0.62597275", "text": "function determine_what_to_draw(ticks) {\n // determine if we want to draw ticks and labels for months\n var n = ticks.filter(function(t) {return t.type == \"month\";}).length;\n var d = (scale_.range()[1] - scale_.range()[0]) / n;\n var month_ticks = scale_.has_month() && d > settings['tick-threshold'];\n var month_labels = scale_.has_month() && d > settings['label-threshold'];\n // determine if we want to draw ticks and labels for quarters\n n = ticks.filter(function(t) {return t.type == \"quarter\";}).length;\n d = (scale_.range()[1] - scale_.range()[0]) / n;\n var quarter_ticks = scale_.has_quarter() && d > settings['tick-threshold'];\n var quarter_labels = scale_.has_quarter() && d > settings['label-threshold'];\n return {month : {ticks : month_ticks, labels : month_labels},\n quarter : {ticks : quarter_ticks, labels : quarter_ticks}};\n }", "title": "" }, { "docid": "7120ebf4cd34caad8d6aafa6630a4fb5", "score": "0.62350875", "text": "_ticksToUnits(ticks) {\n return (ticks * (this._beatsToUnits(1)) / this._getPPQ());\n }", "title": "" }, { "docid": "7120ebf4cd34caad8d6aafa6630a4fb5", "score": "0.62350875", "text": "_ticksToUnits(ticks) {\n return (ticks * (this._beatsToUnits(1)) / this._getPPQ());\n }", "title": "" }, { "docid": "a0f9086b24726225cd5e474dfa2ca7be", "score": "0.62188727", "text": "function makeLabels (ctx, screenW, min, max, spacingGuess, step, unit, valFmt) {\n valFmt = valFmt || formatLabelValue\n const n = screenW / spacingGuess\n const diff = max - min\n const tickGuess = diff / n\n // make the tick spacing a multiple of the step\n const tick = tickGuess + step - (tickGuess % step)\n let x = min + tick - (min % tick)\n const absMax = Math.max(Math.abs(max), Math.abs(min))\n // The Math.round part is the minimum precision required to see the change in the numbers.\n // The 2 accounts for the precision of the tick.\n const sigFigs = Math.round(Math.log10(absMax / tick)) + 2\n const pts = []\n let widest = 0\n while (x < max) {\n x = Number(x.toPrecision(sigFigs))\n const lbl = valFmt(x)\n widest = Math.max(widest, ctx.measureText(lbl).width)\n pts.push({\n val: x,\n txt: lbl\n })\n x += tick\n }\n const unitW = ctx.measureText(unit).width\n if (unitW > widest) widest = unitW\n return {\n widest: widest,\n lbls: pts\n }\n}", "title": "" }, { "docid": "fb421190c256c3141b2f8b0f1756ef8e", "score": "0.6166544", "text": "function formatTicks(){\n\t\n\tif(diffTime < 60000){\n\t\t//console.log(true);\n\t\tplot.getOptions().xaxes[0].tickSize= [10, \"second\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '10-second intervals';\n\t}\n\telse if(diffTime < (5*60000)){\n\t\tplot.getOptions().xaxes[0].tickSize= [30, \"second\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '30-second intervals';\n\t}\n\telse if(diffTime < (10*60000)){\n\t\tplot.getOptions().xaxes[0].tickSize= [1, \"minute\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '1-minute intervals';\n\t}\n\telse if(diffTime < (60*60000)){\n\t\tplot.getOptions().xaxes[0].tickSize= [10, \"minute\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '10-minute intervals';\n\t}\n\telse if(diffTime < (6*60*60000)){\n\t\tplot.getOptions().xaxes[0].tickSize= [30, \"minute\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '30-minute intervals';\n\t}\n\telse if(diffTime < (24*60*60000)){\n\t\tplot.getOptions().xaxes[0].tickSize= [1, \"hour\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '1-hour intervals';\n\t}\n\telse if(diffTime < (2*24*60*60000)){\n\t\tplot.getOptions().xaxes[0].tickSize= [4, \"hour\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '4-hour intervals';\n\t}\n\telse {\n\t\tplot.getOptions().xaxes[0].tickSize= [12, \"hour\"];\n\t\tplot.getOptions().xaxes[0].axisLabel = '12-hour intervals';\n\t}\n}", "title": "" }, { "docid": "9c6ebafb4f9cc55784a23c66d85e39c8", "score": "0.61456865", "text": "function generate_ticks(multiple, divisor, suffix) {\n var result = [];\n var t = 0;\n while (true) {\n result.push([Math.round(availableSpace * t / totalDuration), t, t / divisor + suffix]);\n if (t > totalDuration) {\n break;\n }\n t += multiple * divisor;\n }\n return result;\n }", "title": "" }, { "docid": "3ec25a3ec3b0f0a81984f263455fe370", "score": "0.60613966", "text": "measures(num) {\n return this.ticks(num * 16); \n }", "title": "" }, { "docid": "4c65e8eb0a2647e57e4e2ad664a51570", "score": "0.6045394", "text": "function kmFormatter(v, axis){\r\n\treturn v.toFixed(axis.tickDecimals) + \" km\";\r\n}", "title": "" }, { "docid": "27bc05a781c1ae07ef641ecdd3f75344", "score": "0.59818673", "text": "function ticks() {\n return 1 + +(Agility.level < 3) + Math.ceil(10 * AutoPerks.mult(Agility, -5));\n }", "title": "" }, { "docid": "0c8d69080227e017db49b27eadabd0c0", "score": "0.5946951", "text": "function makeUnits() {\r\n this[\"h\"] = 60*60*1000; \t// hours\r\n this[\"d\"] = 24*60*60*1000;\t// days\r\n this[\"w\"] = 7*24*60*60*1000;\t// weeks\r\n}", "title": "" }, { "docid": "825d6c552c8f22c9a18fd909d22f84c5", "score": "0.5910114", "text": "_spaceBetweenTickmarks() {\n return this.getBoundingClientRect().width / this._tickmarksCount;\n }", "title": "" }, { "docid": "01995e54c108e701be70e16f821d0d77", "score": "0.5899626", "text": "function toAxisUnits (values, n) {\n var max = values[values.length - 1]\n var min = values[0]\n\n var percentage = (n - min) / (max - min)\n\n return parseInt(percentage * values.length)\n}", "title": "" }, { "docid": "698867100fe549bef0cf796105a1dee1", "score": "0.5842849", "text": "function getUnits() {\n if (!documents.length) return '';\n var key = activeDocument.rulerUnits.toString().replace('RulerUnits.', '');\n switch (key) {\n case 'Pixels': return 'px';\n case 'Points': return 'pt';\n case 'Picas': return 'pc';\n case 'Inches': return 'in';\n case 'Millimeters': return 'mm';\n case 'Centimeters': return 'cm';\n // Added in CC 2023 v27.1.1\n case 'Meters': return 'm';\n case 'Feet': return 'ft';\n case 'FeetInches': return 'ft';\n case 'Yards': return 'yd';\n // Parse new units in CC 2020-2023 if a document is saved\n case 'Unknown':\n var xmp = activeDocument.XMPString;\n if (/stDim:unit/i.test(xmp)) {\n var units = /<stDim:unit>(.*?)<\\/stDim:unit>/g.exec(xmp)[1];\n if (units == 'Meters') return 'm';\n if (units == 'Feet') return 'ft';\n if (units == 'FeetInches') return 'ft';\n if (units == 'Yards') return 'yd';\n return 'px';\n }\n break;\n default: return 'px';\n }\n}", "title": "" }, { "docid": "698867100fe549bef0cf796105a1dee1", "score": "0.5842849", "text": "function getUnits() {\n if (!documents.length) return '';\n var key = activeDocument.rulerUnits.toString().replace('RulerUnits.', '');\n switch (key) {\n case 'Pixels': return 'px';\n case 'Points': return 'pt';\n case 'Picas': return 'pc';\n case 'Inches': return 'in';\n case 'Millimeters': return 'mm';\n case 'Centimeters': return 'cm';\n // Added in CC 2023 v27.1.1\n case 'Meters': return 'm';\n case 'Feet': return 'ft';\n case 'FeetInches': return 'ft';\n case 'Yards': return 'yd';\n // Parse new units in CC 2020-2023 if a document is saved\n case 'Unknown':\n var xmp = activeDocument.XMPString;\n if (/stDim:unit/i.test(xmp)) {\n var units = /<stDim:unit>(.*?)<\\/stDim:unit>/g.exec(xmp)[1];\n if (units == 'Meters') return 'm';\n if (units == 'Feet') return 'ft';\n if (units == 'FeetInches') return 'ft';\n if (units == 'Yards') return 'yd';\n return 'px';\n }\n break;\n default: return 'px';\n }\n}", "title": "" }, { "docid": "c4b06a7cf0f83ad6754f12f24b0439e7", "score": "0.5840871", "text": "function getTicks(numberofTicks){\n let lineHeight = 14;\n //Create the axis labels for top and bottom as well as the top axis line (these are done seperatly to ensure they display correctly\n textArray.push(<Text key={0} fontSize={10} strokeWidth={0.3} stroke={'rgb(122,143,147)'} x={1} y={highNumberForYAxis - lineHeight}>{0}</Text>);\n textArray.push(<Text key={max} fontSize={10} strokeWidth={0.3} stroke={'rgb(122,143,147)'} x={1} y={lowNumberForYAxis}>{numeral(max).format('0,0')}</Text>);\n tickLines.push(<Line key={max} x1={lowNumberForXAxis} y1={lowNumberForYAxis + 1} x2={highNumberForXAxis} y2={lowNumberForYAxis + 1} stroke='rgb(229,234,236)' strokeWidth={0.75} />);\n\n //Create the axis labels and lines for everthing in between 0 and max, numbers displayed to 2 decimal places\n for(var i = 1; i < numberofTicks; i++){\n let tickTextNumber = (max / numberofTicks) * i;\n let tickText = (max < 1000) ? numeral(tickTextNumber).format('0.00') : numeral(tickTextNumber).format('0,0');\n let tickY = getHeight(highNumberForYAxis, max, tickTextNumber);\n textArray.push(<Text key={tickText} fontSize={10} strokeWidth={0.3} stroke={'rgb(122,143,147)'} lineHeight={lineHeight} x={1} y={highNumberForYAxis - tickY - (lineHeight / 2)}>{tickText}</Text>);\n tickLines.push(<Line key={tickText} x1={lowNumberForXAxis} y1={highNumberForYAxis - tickY} x2={highNumberForXAxis} y2={highNumberForYAxis - tickY} stroke='rgb(229,234,236)' strokeWidth={0.75} />);\n }\n }", "title": "" }, { "docid": "b0e6e7b1d0ae06f0923876b6093865ff", "score": "0.5834011", "text": "function tick() {\n function interpolateColor(start, end, pct) {\n return start + Math.floor((end - start) * pct);\n }\n var d = new Date();\n var hours = el.firstChild;\n var minutes = el.lastChild;\n\n hours.innerHTML = d.getHours();\n minutes.innerHTML = d.getMinutes();\n var pct = d.getSeconds() / 59;\n var r = interpolateColor(options['startColor'][0], options['endColor'][0], pct);\n var g = interpolateColor(options['startColor'][1], options['endColor'][1], pct);\n var b = interpolateColor(options['startColor'][2], options['endColor'][2], pct);\n minutes.style.color = \"rgb(\"+r+\",\"+g+\",\"+b+\")\";\n }", "title": "" }, { "docid": "07408ce7ebdaf1f769c1380e7fb20598", "score": "0.5822763", "text": "function printLabelsOneLiner(e,n,l,t){return\"We will need \"+Math.floor(l/(l+t)*e/n)*n+\" labeled units and \"+(e-Math.floor(l/(l+t)*e/n)*n)+\" unlabeled units.\"}", "title": "" }, { "docid": "d3c3b5f2f4688c95fe9ce51984c6d8d2", "score": "0.58170533", "text": "function numberAxisLabelFormatter(x, granularity, opts) {\n return numberValueFormatter.call(this, x, opts);\n }", "title": "" }, { "docid": "5197ea09a963962852b4f1672dd07d00", "score": "0.57920754", "text": "function groupTicks(d) {\n\t\t\t\t var k = (d.endAngle - d.startAngle) / d.value;\n\t\t\t\t return d3.range(0, d.value, 1000).map(function(v, i) {\n\t\t\t\t\treturn {\n\t\t\t\t\t angle: v * k + d.startAngle,\n\t\t\t\t\t label: i % 5 ? null : v / 1000 + \"k\"\n\t\t\t\t\t};\n\t\t\t\t });\n\t\t\t\t}", "title": "" }, { "docid": "7a32f98530b931323907267ea9cdb595", "score": "0.57809496", "text": "setTick (aspect, unitValue, formatFn) {\n\n return this\n }", "title": "" }, { "docid": "860ac2e88e3625149352e1b411dab975", "score": "0.5777561", "text": "function units(num) {\n return applyNumerals(num, \"I\", \"V\", \"X\");\n}", "title": "" }, { "docid": "2ccea602ec15ce7e61f9ac89c84cca2d", "score": "0.5764522", "text": "_tickOptions() {\n const MIN_LABEL_PADDING_IN_PX = 20;\n for (const xTickPeriod of this._xTickPeriods) {\n const typicalTickSpacingInPx = this._xScale(+xTickPeriod.duration)\n - this._xScale(0);\n if (typicalTickSpacingInPx >\n xTickPeriod.maxWidthInPx + MIN_LABEL_PADDING_IN_PX) {\n return xTickPeriod;\n }\n }\n }", "title": "" }, { "docid": "ef7059e983ce9f65dc13d4ec0417f6c8", "score": "0.5759045", "text": "get ticks() {\n return Math.ceil(this.getTicksAtTime(this.now()));\n }", "title": "" }, { "docid": "fde8f43fe883dd082e3c6187a0c91954", "score": "0.57520825", "text": "function numberAxisLabelFormatter(x, granularity, opts) {\n return numberValueFormatter.call(this, x, opts);\n}", "title": "" }, { "docid": "4132d48b67d9a9dbad831a9e7290212b", "score": "0.5746581", "text": "function clockify(timeUnits){\n if (timeUnits < 10) {\n return \"0\" + timeUnits\n } else {\n return timeUnits\n }\n }", "title": "" }, { "docid": "318a1b244da90270c3f96adf806565f8", "score": "0.57348996", "text": "function groupTicks(d) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, 1000).map(function(v, i) {\n return {\n angle: v * k + d.startAngle,\n label: i % 5 ? null : v / 1000 + \"k\"\n };\n });\n }", "title": "" }, { "docid": "2ae4c092c19113ae2cc06a089d3f2a1f", "score": "0.5692129", "text": "function groupTicks(d) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, 1000).map(function (v, i) {\n return {\n angle: v * k + d.startAngle,\n label: i % 5 ? null : v / 1000 + \"k\"\n };\n });\n }", "title": "" }, { "docid": "ba0177c876f56b57ffc7b4f66c4ab3e6", "score": "0.5691234", "text": "ticksPerSec () {\n const dt = this.ticks - this.startTick\n return dt === 0 ? 0 : Math.round(dt * 1000 / this.ms()) // avoid divide by 0\n }", "title": "" }, { "docid": "7569e157d907d9fab9afe577ca2bf121", "score": "0.56908053", "text": "toString () {\n return `ticks: ${this.ticks}, draws: ${this.draws}, rate: ${this.rate} tps/dps: ${this.ticksPerSec()}/${this.drawsPerSec()}`\n }", "title": "" }, { "docid": "bb3347148e9fae7fdfec4b610c94d2b0", "score": "0.5671713", "text": "function getTicksAndLabels(args){\n var domain = normalizeDomain(args.domain);\n var dataBound = normalizeDomain(args.dataBound);\n var result = null;\n if(domain){\n var levels = args.levels;\n if (!levels || !levels.length){\n levels = TimeUtil.DEFAULT_LEVELS;\n }\n fixLevelGap(levels);\n var context = {\n domain: domain,\n dataBound: dataBound,\n width: max(0, args.width),\n levels: levels,\n start: domain[0],\n end: domain[1],\n limitInput: args.limit,\n style: args.labelStyle,\n config: normalizeConfigs(args.config),\n combinationConfig: normalizeConfigs(args.combinationConfig),\n utc: args.utc,\n isColumnLike: args.isColumnLike,\n isZoomIn: args.zoomType === \"zoomIn\",\n prevLv: args.prevLv,\n findLevelMemory: args.findLevelMemory,\n\n // constants\n minTickDistance: normalizeNumber(args.minTickDistance, MIN_TICK_DISTANCE),\n fixedSpacing: normalizeNumber(args.fixedSpacing, FIXED_SPACING),\n limitMargin: normalizeNumber(args.limitMargin, LIMIT_MARGIN),\n labelMargin: normalizeNumber(args.labelMargin, LABEL_MARGIN),\n maxLayerCount: normalizeNumber(args.maxLayerCount, MAX_LAYER_COUNT),\n levelLabelSeparator: normalizeNumber(args.levelLabelSeparator, LEVEL_LABEL_SEPARATOR)\n };\n \n if(args.showFirstLastDataOnly) {\n result = getFirstLastTicksAndLabels(context);\n result.ticks.offset = result.labels.offset = args.offset || 0;\n } else {\n var intervalUnit = normalizeIntervalUnit(args.intervalUnit, levels);\n if(intervalUnit){\n context.intervalUnit = intervalUnit;\n context.intervalNumber = normalizeIntervalNumber(args.intervalNumber);\n context.intervalPivot = normalizeIntervalPivot(args.intervalPivot);\n result = getFixedTicksAndLabels(context);\n }else{\n result = getAdaptiveTicksAndLabels(context);\n }\n result.ticks.offset = result.labels.offset = args.offset || 0;\n \n BodyTransformer.categoryWrapper(result, context, true); \n BodyTransformer.timeColumnWrapper(result, context);\n }\n fixFirstTwoLabelFormat(result, result.context);\n AxisCommon.preventAnyOverlapping(result.labels, result.context);\n }\n return result;\n }", "title": "" }, { "docid": "20dbcf8dc27e7731a5a1ec17c8e83a41", "score": "0.5664203", "text": "function numTicks(widther) {\n if (widther <= 400) {\n return 4\n }\n else {\n return 10\n }\n }", "title": "" }, { "docid": "0ba0789ebdfdecfc436afff6240bfbb1", "score": "0.56611633", "text": "function ticks(element) {\t\t\n\t\t\tif ('list' in element && 'min' in element && 'max' in element && 'step' in element) {\n\t\t\t\tvar datalist = document.createElement('datalist'),\n\t\t\t\t\tminimum = parseFloat(element.getAttribute('min')),\n\t\t\t\t\tstep = parseFloat(element.getAttribute('step')),\n\t\t\t\t\tmaximum = parseFloat(element.getAttribute('max'));\n\t\t\t\t\tdatalist.id = element.getAttribute('list');\n\t\t\t\t\t\n\t\t\t\tif ((Math.abs(maximum - minimum) / step) < 20) {\n\t\t\t\t\tfor (var i = minimum; i < maximum+step; i = i + step) {\n\t\t\t\t\t\tdatalist.innerHTML +=\"<option value=\"+i.toFixed(2)+\"></option>\";\n\t\t\t\t\t}\n\t\t\t\t\telement.parentNode.insertBefore(datalist, element.nextSibling);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d284c21c5d25b3f9b997eaf6634b4ae6", "score": "0.5660261", "text": "function drawMagnitudeLabels(){\n fill(128);\n // we increase i by the interval, which are the sections\n for (var i=0; i<=magnitudeMax; i+=magnitudeInterval){\n noStroke();\n textSize(8);\n textAlign(RIGHT, CENTER);\n\n // map y to the plotting surface\n var y = map(i, magnitudeMin, magnitudeMax, y_bot, y_top);\n\n // write value\n text(floor(i), x_left-10, y);\n\n // add visual tick mark\n stroke(128);\n strokeWeight(1);\n line(x_left-4, y, x_left-1, y);\n }\n}", "title": "" }, { "docid": "9d9fbf2bca2fffc86a9970b87b38fa08", "score": "0.56546915", "text": "function normalizeTimeTickInterval(tickInterval, unitsOption) {\n\tvar units = unitsOption || [[\n\t\t\t\tMILLISECOND, // unit name\n\t\t\t\t[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples\n\t\t\t], [\n\t\t\t\tSECOND,\n\t\t\t\t[1, 2, 5, 10, 15, 30]\n\t\t\t], [\n\t\t\t\tMINUTE,\n\t\t\t\t[1, 2, 5, 10, 15, 30]\n\t\t\t], [\n\t\t\t\tHOUR,\n\t\t\t\t[1, 2, 3, 4, 6, 8, 12]\n\t\t\t], [\n\t\t\t\tDAY,\n\t\t\t\t[1, 2]\n\t\t\t], [\n\t\t\t\tWEEK,\n\t\t\t\t[1, 2]\n\t\t\t], [\n\t\t\t\tMONTH,\n\t\t\t\t[1, 2, 3, 4, 6]\n\t\t\t], [\n\t\t\t\tYEAR,\n\t\t\t\tnull\n\t\t\t]],\n\t\tunit = units[units.length - 1], // default unit is years\n\t\tinterval = timeUnits[unit[0]],\n\t\tmultiples = unit[1],\n\t\tcount,\n\t\ti;\n\t\t\n\t// loop through the units to find the one that best fits the tickInterval\n\tfor (i = 0; i < units.length; i++) {\n\t\tunit = units[i];\n\t\tinterval = timeUnits[unit[0]];\n\t\tmultiples = unit[1];\n\n\n\t\tif (units[i + 1]) {\n\t\t\t// lessThan is in the middle between the highest multiple and the next unit.\n\t\t\tvar lessThan = (interval * multiples[multiples.length - 1] +\n\t\t\t\t\t\ttimeUnits[units[i + 1][0]]) / 2;\n\n\t\t\t// break and keep the current unit\n\t\t\tif (tickInterval <= lessThan) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// prevent 2.5 years intervals, though 25, 250 etc. are allowed\n\tif (interval === timeUnits[YEAR] && tickInterval < 5 * interval) {\n\t\tmultiples = [1, 2, 5];\n\t}\n\t\n\t// prevent 2.5 years intervals, though 25, 250 etc. are allowed\n\tif (interval === timeUnits[YEAR] && tickInterval < 5 * interval) {\n\t\tmultiples = [1, 2, 5];\n\t}\n\n\t// get the count\n\tcount = normalizeTickInterval(tickInterval / interval, multiples);\n\t\n\treturn {\n\t\tunitRange: interval,\n\t\tcount: count,\n\t\tunitName: unit[0]\n\t};\n}", "title": "" }, { "docid": "59a2c047f9655a4519ae0edbd810e8a6", "score": "0.5627774", "text": "function prepareScale() {\n\t\tvar code = '';\n\n\t\tfor(var i = 0; i <= 24; i++) {\n\t\t\tswitch (i) {\n\t\t\t\tcase 0:\n\t\t\t\tcase 6:\n\t\t\t\t\tcode += '<span><i></i><time>0' + i + ':00</time></span>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\tcase 18:\n\t\t\t\tcase 24:\n\t\t\t\t\tcode += '<span><i></i><time>' + i + ':00</time></span>'\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tcode += '<span><i></i></span>';\n\t\t\t}\n\t\t}\n\n\t\treturn code;\n\t}", "title": "" }, { "docid": "934d3ea1191bf48e71a125b0bbe5f659", "score": "0.56076556", "text": "formatTickX (maxTicks, val) {\n const rangeX = this.max_x - this.min_x,\n spacing = this.spacing,\n spacingScaled = Math.ceil((rangeX / maxTicks) / spacing) * spacing;\n\n return (spacingScaled === 0 || val % spacingScaled === 0) ? val : '';\n }", "title": "" }, { "docid": "6b3800ef59a77850900f0fd369972ec5", "score": "0.55946076", "text": "function groupTicks(d) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, 1000).map(function(v, i) {\n return {\n angle: v * k + d.startAngle,\n label: i % 5 ? null : v / 1000 + \"k\"\n };\n });\n}", "title": "" }, { "docid": "6b3800ef59a77850900f0fd369972ec5", "score": "0.55946076", "text": "function groupTicks(d) {\n var k = (d.endAngle - d.startAngle) / d.value;\n return d3.range(0, d.value, 1000).map(function(v, i) {\n return {\n angle: v * k + d.startAngle,\n label: i % 5 ? null : v / 1000 + \"k\"\n };\n });\n}", "title": "" }, { "docid": "91453f6e594ba224b697fb44ce5ebac4", "score": "0.5574956", "text": "get ticks() {\n return Math.ceil(this.getTicksAtTime(this.now()));\n }", "title": "" }, { "docid": "91453f6e594ba224b697fb44ce5ebac4", "score": "0.5574956", "text": "get ticks() {\n return Math.ceil(this.getTicksAtTime(this.now()));\n }", "title": "" }, { "docid": "1803d1a1290fdd56a762eb466591c22f", "score": "0.55710536", "text": "function getTickFormatter(scale) {\n // Broaden type before using 'xxx' in s as typeguard.\n var s = scale; // For point or band scales,\n // have to add offset to make the tick centered.\n\n if ('tickFormat' in s) {\n return s.tickFormat();\n }\n\n return _scale.toString;\n}", "title": "" }, { "docid": "4ac8cf480fc4d0c09d6ced650df3597b", "score": "0.5568442", "text": "_getTicksContainerStyles() {\n let axis = this.vertical ? 'Y' : 'X';\n // For a horizontal slider in RTL languages we push the ticks container off the left edge\n // instead of the right edge to avoid causing a horizontal scrollbar to appear.\n let sign = !this.vertical && this._getDirection() == 'rtl' ? '' : '-';\n let offset = this._tickIntervalPercent / 2 * 100;\n return {\n 'transform': `translate${axis}(${sign}${offset}%)`\n };\n }", "title": "" } ]
9f3d672a2a14bf33efc887e13b7025ad
it's not supposed to mask nonnumerical chars it's not supposed to mask at all if string is shorter than 6 chars
[ { "docid": "063f34325dcc5f98df9cbd9971bb7db9", "score": "0.6568975", "text": "function maskify (creditCard) {\n \n const nonDigitRegex = /\\D/gm;\n let lastFour = creditCard.substr(-4);\n let result = \"\";\n \n if ( !creditCard || creditCard.length < 6 ) {\n return creditCard;\n }\n \n for (let i = 0; i < creditCard.length - 4; i++) {\n if (creditCard[i].match(nonDigitRegex) || i === 0) {\n result += creditCard[i];\n } else {\n result += \"#\";\n } \n }\n return result+lastFour; \n }", "title": "" } ]
[ { "docid": "94ae3cf0c576fed65053466404b46801", "score": "0.64980644", "text": "function FormatarCampo(src, mask){\r\n\r\nvar i = src.value.length;\r\n\r\nvar saida = mask.substring(0,1);\r\n\r\nvar texto = mask.substring(i)\r\n\r\n\tif (texto.substring(0,1) != saida){\r\n\r\n\tsrc.value += texto.substring(0,1);\r\n\r\n \t}\r\n\r\n}", "title": "" }, { "docid": "75a6b56d65ab7aaed449501a4f8f4955", "score": "0.64710516", "text": "function maskCardNumbers(s) {\n var match;\n while (match = s.match(/(\\d{13}\\d*)/)) {\n var toBeMasked = match[1];\n s = s.replace(toBeMasked, toBeMasked.substring(0,6) + '****' + toBeMasked.substring(toBeMasked.length - 4));\n }\n return s;\n}", "title": "" }, { "docid": "1879c6048954e38894b158582e31cecb", "score": "0.644086", "text": "function mascaravalor(src, mask){\n\tvar i = src.value.length;\n\tvar saida = mask.substring(1,2);\n\tvar texto = mask.substring(i);\n\tif (texto.substring(0,1) != saida){\n\t src.value += texto.substring(0,1);\n\t}\n}", "title": "" }, { "docid": "24d1070c0a1c2bc3e1e96bd7a4f8fa1b", "score": "0.64128", "text": "function cleanString(input)\n\t\t\t{\n\t\t\t\tvar output = \"\";\n\t\t\t\tfor(var i=0;i<input.length;i++)\n\t\t\t\t{\n\t\t\t\t\tif(input.charCodeAt(i)<=127)\n\t\t\t\t\t{\n\t\t\t\t\t\toutput+=input.charAt(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn output.trim();\n\t\t\t}", "title": "" }, { "docid": "4a10781c0023e55538ca4f1cad077265", "score": "0.6374403", "text": "function maskify(input) {\n return input.split('').fill('#', 0, input.length-4).join('')\n}", "title": "" }, { "docid": "0f65fb0bb3df2e9831c437c5ea42d064", "score": "0.63586056", "text": "function mask(event) {\n console.log(this.value.length);\n let keyCode;\n event.keyCode && (keyCode = event.keyCode); \n\n // let pos = this.selectionStart;\n // if (pos < 2) event.preventDefault();\n\n let matrix = \"8 ___ ___ __ __\";\n let i = 0;\n let def = matrix.replace(/\\D/g, \"\");\n let val = this.value.replace(/\\D/g, \"\");\n //--- уберем 7 или 8 вначале при вставке/автокомлит номера с 7 или 8\n if (event.type == 'input') {\n if (val.length >=11 && (val[1] == 7 || val[1] == 8 )) val = val[0]+val.substring(2,val.length);\n } \n\n let new_value = matrix.replace(/[_\\d]/g, function(a) {\n return i < val.length ? val.charAt(i++) || def.charAt(i) : a\n });\n\n i = new_value.indexOf(\"_\");\n if (i != -1) {\n i < 4 && (i = 3);\n new_value = new_value.slice(0, i)\n }\n let reg = matrix.substr(0, this.value.length).replace(/_+/g,\n function(a) {\n return \"\\\\d{1,\" + a.length + \"}\"\n }).replace(/[+()]/g, \"\\\\$&\");\n\n reg = new RegExp(\"^\" + reg + \"$\");\n if (!reg.test(this.value) || this.value.length < 4 || keyCode > 47 && keyCode < 58) this.value = new_value;\n \n if (event.type == \"blur\" && this.value.length < 4) this.value = \"\";\n}", "title": "" }, { "docid": "320e09deb7daea333c018388bb69338d", "score": "0.6307451", "text": "function maskkeyup(elem, mask) {\n if (!mask || mask.length == 0) return;\n var i = 0; // elem and mask index\n var v = elem.value;\n for (; i < mask.length && i < v.length; ++i) {\n var ec = v.charAt(i);\n var mc = mask.charAt(i);\n if (mc == '#' && (ec < '0' || ec > '9')) {\n // digit required but this is not one\n break;\n }\n if (mc == '@' && ec.toLowerCase() == ec.toUpperCase()) {\n // alpha character required but this is not one\n break;\n }\n }\n v = v.substring(0, i);\n while (i < mask.length) {\n var mc = mask.charAt(i++);\n if (mc == '*' || mc == '#' || mc == '@') break;\n v += mc;\n }\n elem.value = v;\n}", "title": "" }, { "docid": "c8c13537d7155329d06762a79d18aae0", "score": "0.6292947", "text": "unmask(cpf){\n if( typeof cpf == \"string\" ){\n return cpf.replace(/[^0-9]/g,\"\");\n }\n else{\n console.log(`${cpf} is not valid to be unmasked, please provide a string following the format AAA.AAA.AAA-AA `);\n return cpf;\n }\n }", "title": "" }, { "docid": "5ded810a9a915140e8ef4af9a8693b7c", "score": "0.6237268", "text": "function maskify(cc) {\n var str = '';\n if (cc.length <= 4) {\n return cc;\n }\n for (var i = 0; i < cc.length - 4; i++) {\n str += '#';\n }\n return str + cc.slice(cc.length - 4);\n}", "title": "" }, { "docid": "8e18e55a185e23e0fb01fc5a4b94bbf9", "score": "0.62330866", "text": "function ApplyUiMasks()\n {\n // '+99-(9)9999 9999 next 3 numbers are optional'\n $('#inputTele').mask('+99 (9) 9999 9999?999');\n //$('#inputTele').blur(function () { alert(\"telephone : \" + $('#inputTele').val());});\n $('#inputSortCode').mask('99-99-99'); \n }", "title": "" }, { "docid": "987533981a0d29f11f27a7edc24dcc19", "score": "0.61587733", "text": "function testExact6ABCs(str) {\n \n return /^[a-c]{6}$/.test(str);\n }", "title": "" }, { "docid": "73a3aacdb29061356f53996d627a28f7", "score": "0.6153917", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "516deb383e6f8369dd863992785a9d48", "score": "0.61471456", "text": "function chars(input){\n return false; // default validation only\n}", "title": "" }, { "docid": "46d9b9c2068befdde89f0253ae9964ff", "score": "0.61333144", "text": "function stripMask(maskedData) {\n function allowed(char) {\n return char.charCodeAt(0) < 255;\n // return /[a-z0-9]/.test(char);\n }\n\n return maskedData.split('').filter(allowed);\n }", "title": "" }, { "docid": "d00847ea2b14625d943896d7b4f9ec11", "score": "0.61114496", "text": "function maskify(cc) {\n const len = cc.length\n return len <= 4 ? cc : `${\"#\".repeat(len - 4)}${cc.slice(len - 4)}`\n}", "title": "" }, { "docid": "dbe457c861f056a7d0dfeb81f43a8420", "score": "0.60972285", "text": "function maskify(cc) {\n cc = cc.split(\"\");\n for(var i = 0; i < cc.length - 4; i++){\n cc[i] = \"#\";\n}\n\ncc = cc.join(\"\");\nreturn cc\n}", "title": "" }, { "docid": "b5fccb454929c5d71a5e546f78760028", "score": "0.6084249", "text": "function substringPassword(len){\n\n}", "title": "" }, { "docid": "1ad21f08dc956268efb6f17b91b44894", "score": "0.6062403", "text": "function postalCodeCheck(value, filteredStr) {\n if (!/^[a-zA-Z0-9]{3} [a-zA-Z0-9]{3}$/.test(value)) {\n // Attempt to correct xxxxxx\n if (/^[a-zA-Z0-9]{6}$/.test(value)) {\n return value.substring(0, 3) + ' ' + value.substring(3, 6);\n }\n // Return filteredStr if unrecognized format\n return filteredStr;\n }\n return value;\n}", "title": "" }, { "docid": "08b21b1ac28e2f5e9535de3327b7a348", "score": "0.60562325", "text": "function maskPhone() {\r\n const inputs = document.querySelectorAll('input[type=\"tel\"]');\r\n if(inputs) {\r\n for(let input of inputs) {\r\n let defaultValue = '+7 ( _ _ _ ) _ _ _ - _ _ - _ _',\r\n lastValue = defaultValue;\r\n input.value = defaultValue;\r\n input.addEventListener('input', () => {\r\n let str = input.value;\r\n let sort = /\\d(?=\\D*$)/g;\r\n sort.lastIndex = 5; \r\n let replacement = sort.exec(str);\r\n if(replacement) {\r\n input.value = lastValue; \r\n let regexp = input.value.match(/_/);\r\n input.value = input.value.replace(regexp, replacement);\r\n lastValue = input.value;\r\n } else {\r\n input.value = defaultValue;\r\n }\r\n });\r\n }\r\n }\r\n }", "title": "" }, { "docid": "14832bf825b2639145de390ad8227787", "score": "0.60555375", "text": "function maskify(cc) {\n if (cc.length > 4) {\n var reversed = reverse(cc);\n var newString = '';\n for (var i = 0; i < reversed.length; i++) {\n if (i < 4) {\n newString += reversed[i];\n } else {\n newString += '#';\n }\n }\n return reverse(newString);\n } else {\n return cc;\n }\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "7c9379454846263cea8b6fc924ea9a94", "score": "0.6044887", "text": "function chars(input){\n return true; // default validation only\n}", "title": "" }, { "docid": "f426f082f0b773ca50e1d694a11ad356", "score": "0.6013211", "text": "function chars(input){\n\n return true; // default validation only\n}", "title": "" }, { "docid": "deb29b2637a9dc37b5ce91bc4be4dd3b", "score": "0.5997207", "text": "function maskString(myWord){\n var mask = \"\";\n for(i=0;i<myWord.length;i++){\n mask+=\"_\";\n }\n return mask;\n}", "title": "" }, { "docid": "cba150b4921ee3f845aea41bd7e09a84", "score": "0.5989059", "text": "maskPhone(number) {\n if (number) {\n let value = this.getInt(number)\n let response = ''\n\n if (value) {\n value = value.toString()\n value.length >= 1 ? response += '(' : false\n response += value.substr(0, 3)\n value.length >= 4 ? response += ') ' : false\n response += value.substr(3, 3)\n value.length >= 7 ? response += '-' + value.substr(6, 4) : false\n } else {\n response = value ? value[0] : ''\n }\n\n return response\n } else {\n return number\n }\n }", "title": "" }, { "docid": "69d403b9a05aab2dcb9325854bedd7be", "score": "0.5981017", "text": "function isCorrectPWFormat(pwValue) {\r\n\r\n //ref: https://tinyurl.com/yyrljkoo\r\n let result = /(?=^.{6,}$)(?=.*[0-9])\\w+/g.test(pwValue);\r\n //String is > 5 chars\r\n //Contains a digit\r\n\r\n // console.log('check format result', result);\r\n return result;\r\n}", "title": "" }, { "docid": "575334e398a6b38c6aaa380fb3511433", "score": "0.5976529", "text": "function valAlfanumerico(input) {\r\n\tvar checkOK =\"ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ\" + \"abcdefghijklmnñopqrstuvwxyzáéíóú\" + \"0123456789\" + \" -.,:;$%()¿?¡!\";\r\n\tvar checkStr = input;\r\n\tvar allValid = true; \r\n\tfor (i = 0; i < checkStr.length; i++) {\r\n\t\tch = checkStr.charAt(i); \r\n\t\tfor (j = 0; j < checkOK.length; j++)\r\n\t\t\tif (ch == checkOK.charAt(j))\r\n\t\t\t\tbreak;\r\n\t\tif (j == checkOK.length) { \r\n\t\t\tallValid = false; \r\n\t\t\tbreak; \r\n\t\t}\r\n\t}\r\n\treturn allValid;\r\n}", "title": "" }, { "docid": "8c5af7dccae4f85c2b6e219189e08250", "score": "0.5960845", "text": "function InputPass1_onkeyup() {\n var str;\n var char;\n str=document.MAINFORM.InputPass1.value;\n char=str.charAt(str.length-1);\n if ((char!=\"0\") && (char!=\"1\")&&(char!=\"2\")&& (char != \"3\")&&(char != \"4\")&&(char != \"5\")&&(char != \"6\")&&(char != \"7\")&&(char != \"8\")&&(char != \"9\"))\n {\n document.MAINFORM.InputPass1.value=str.substring(0,(str.length-1));\n }\n}", "title": "" }, { "docid": "032d0189b1301f467f7a140247b248a3", "score": "0.59256953", "text": "function maskify(cc) {\n return cc.slice(0, -4).replace(/./g, '#') + cc.slice(-4);\n }", "title": "" }, { "docid": "748f3805ea89b52255d291ef0b8388f0", "score": "0.5910229", "text": "function cardMasker(cardNumber) {\n if (cardNumber.length <= 4) {\n return cardNumber;\n }\n return cardNumber.slice(0, -4).replace(/./g,\"*\") + cardNumber.slice(-4);\n}", "title": "" }, { "docid": "277194dc66e8f7ce11da6a8122abc3d2", "score": "0.59096605", "text": "function check35(char, str) {\n let str2 = str.slice(1, 4);\n if (str2.indexOf(char) != -1) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "6f51f054789e47c6304c7a9fa446bbde", "score": "0.5903629", "text": "function maskify(cc) {\n return cc.replace(/.(?=....)/g, '#')\n}", "title": "" }, { "docid": "31f839b8d6f2f3698d9dadd9181fd9b6", "score": "0.5893258", "text": "function onlyLetters(x){\n const nonNumbers = x.replace(/\\d+/g, \"\")\n return nonNumbers\n }", "title": "" }, { "docid": "3d9d52f8a35773e992837f18a86a3149", "score": "0.58914566", "text": "function InputPass2_onkeyup() {\n var str;\n var char;\n str=document.MAINFORM.InputPass2.value;\n char=str.charAt(str.length-1);\n if ((char!=\"0\") && (char!=\"1\")&&(char!=\"2\")&& (char != \"3\")&&(char != \"4\")&&(char != \"5\")&&(char != \"6\")&&(char != \"7\")&&(char != \"8\")&&(char != \"9\"))\n {\n document.MAINFORM.InputPass2.value=str.substring(0,(str.length-1));\n }\n}", "title": "" }, { "docid": "a9620a55f62ebbf2c278782a359a4f7e", "score": "0.5884113", "text": "function validInputString(input) {\n let value = input.value;\n let rep = /[-+*/()\\.;\":'0-9]/;\n\n if (rep.test(value)) {\n value = value.replace(rep, '');\n input.value = value;\n }\n\n if(+value.length > 40) {\n input.value = value.substring(0, value.length - 1);\n }\n}", "title": "" }, { "docid": "473e26544b984779447f10210bea9613", "score": "0.58643883", "text": "function chars(input) {\n return true; // default validation only\n}", "title": "" }, { "docid": "473e26544b984779447f10210bea9613", "score": "0.58643883", "text": "function chars(input) {\n return true; // default validation only\n}", "title": "" }, { "docid": "926b18e4b7fa8175ea3b98765d5d65ad", "score": "0.58633983", "text": "function a(o){return o>=65&&o<=90||o===95||o>=97&&o<=122||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8204&&o<=8205||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}", "title": "" }, { "docid": "81fe30b82c727f11ea23bfe4f91228e3", "score": "0.58545274", "text": "function maskify4(cc) {\n let masked = cc\n .split('')\n .slice(0,-4)\n .map(item => '#')\n .join('');\n return masked + cc.slice(-4);\n}", "title": "" }, { "docid": "db7be917f667a32273d65b2098ab6e46", "score": "0.5826273", "text": "function verifyPassword(str) {\r\n var patt = /^.{8,}$/;\r\n return patt.test(str);\r\n}", "title": "" }, { "docid": "5e8716245a4d52b72917f39047ff59f8", "score": "0.58163637", "text": "function InputPass1_onkeydown() {\n var str;\n var char;\n str=document.MAINFORM.InputPass1.value;\n char=str.charAt(str.length-1);\n if ((char!=\"0\") && (char!=\"1\")&&(char!=\"2\")&& (char != \"3\")&&(char != \"4\")&&(char != \"5\")&&(char != \"6\")&&(char != \"7\")&&(char != \"8\")&&(char != \"9\"))\n {\n document.MAINFORM.InputPass1.value=str.substring(0,(str.length-1));\n }\n}", "title": "" }, { "docid": "e7d00bc0a6d73245a91f4a497d11dcd6", "score": "0.5815254", "text": "function maskify(cc) {\n \n let emptyArr = [];\n\n for (i = 0; i < cc.length - 4; i++) {\n emptyArr.unshift('#')\n }\n\n return emptyArr.join('') + String(cc).substr(-4, cc.lenght);\n}", "title": "" }, { "docid": "72f25c6ba15500e8fb86a607bf8eaeed", "score": "0.581116", "text": "function validateUsername(username) {\n if (username.length < 4 || username.length > 16) {\n return false;\n }\n\n //console.log(username)\n for (i = 0; i < username.length; i++) {\n c = username.charAt(i);\n if (!isLegalCharacterAN(c)) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "b2f17f2114d8931570eaba9bb31c21d1", "score": "0.5808597", "text": "function hackerSpeak(str) {\n let newStr = str\n .replace(/a/g, 4)\n .replace(/s/g, 5)\n .replace(/i/g, 1)\n .replace(/o/g, 0) \n\t.replace(/e/g, 3)\n return newStr;\n}", "title": "" }, { "docid": "0cc5656a2611aa2cd9d09da41ca15dcf", "score": "0.5808169", "text": "function validUsername(a) {\n var num = /^[0-9A-Za-z\\.\\_\\-]+$/; // can be combo of letters, numbers,_,-,.\n if (a.length < 6) {\n return false;\n }\n else if (a.length > 15) {\n return false;\n }\n else if(num.test(a)){\n return true; \n }\n return false;\n}", "title": "" }, { "docid": "8f94e9f1010b48c22f4cb212bfa52c11", "score": "0.5805638", "text": "function chars(input){\n return true;\n}", "title": "" }, { "docid": "46054f083cbe2299eab8bd7520450a9a", "score": "0.5803602", "text": "function nomorpaspor(nopas,7)\n{\n var nopas_len =/^[A-Z0-9]+$/.length; if(nopas_len=7.value.match(letters))\n{\nreturn true;\n}\n else\n{\n alert ('Nomor Paspor terdiri atas 7 digit dengan Huruf kapital dan Angka');nopas.focus();\n return false;\n}\n}", "title": "" }, { "docid": "3eff6bb1ada69b8c0c2d789a485853ad", "score": "0.5803021", "text": "function __is_mask(str)\r\n{\r\n\td = decstr2int(str);\r\n\tif (d==0 || d==128 || d==192 || d==224 || d==240 || d==248 || d==252 || d==254 || d==255) return true;\r\n\treturn false;\r\n}", "title": "" }, { "docid": "0336e76e3ce949b5e2aca68da4169bbc", "score": "0.5798187", "text": "function CodelandUsernameValidation(str) { \n const exp = /^[a-zA-Z][a-zA-Z0-9_]*[^_]$/\n return str.length >= 4 && str.length <= 25 && exp.test(str)\n \n }", "title": "" }, { "docid": "980f93c242c7b677097e473455026c42", "score": "0.57968146", "text": "function stringProtection(string, len) {\n const sliced = string.slice(0, len);\n return sliced.replace(/[&<>\"']/g, '');\n}", "title": "" }, { "docid": "75fbb8c9509ccdbfbe12a5d08e35f473", "score": "0.57837486", "text": "function validaPlaca(id)//leandro\n{\n if($(\"#\"+id).val().match(/[^a-z1234567890\\- ]/)){\n $(\"#\"+id).val()=$(\"#\"+id).val().replace(/[^a-z1234567890\\- ]/gi,\"\")\n }\n}", "title": "" }, { "docid": "c25f75f3b3efa07086446c6db025bd71", "score": "0.57774514", "text": "mask (tokenizer) {\n // use the original input, mask should be the same length\n let body = tokenizer.span.body\n let mask = Array(body.length).fill(' ')\n let map = {\n 'venue': 'V',\n 'housenumber': 'N',\n 'street': 'S',\n 'postcode': 'P',\n 'unit': 'U',\n 'unit_type': 'U',\n 'default': 'A'\n }\n\n // scan the input letter-by-letter from left-to-right\n for (let i = 0; i < body.length; i++) {\n // find which fields cover this character (should only be covered by 0 or 1 field)\n let coveredBy = this.pair.filter(p => p.span.start <= i && p.span.end >= i)\n\n if (coveredBy.length) {\n let label = coveredBy[0].classification.label\n let code = map.hasOwnProperty(label) ? map[label] : map.default\n for (let j = coveredBy[0].span.start; j < coveredBy[0].span.end; j++) {\n mask[j] = code\n }\n\n // skip forward to avoid scanning the same token again\n i = coveredBy[0].span.end\n }\n }\n\n return mask.join('')\n }", "title": "" }, { "docid": "8c8bf997b496c2458d399c0a65f95d6c", "score": "0.5766217", "text": "function filterFunction(name) {\n\n return name.length <= 4; // four letters names\n}", "title": "" }, { "docid": "eb438da53c16f04d4843a63433dd8848", "score": "0.576307", "text": "function removeSpecialCharFromInputString(e)\n {\n var data = e;\n\n for(var i=0; i<data.length;i++)\n {\n var code = data.charCodeAt(i);\n if( (code >= 33 && code <= 47) || (code >= 58 && code <= 64) ||\n (code >= 91 && code <= 96) || (code >= 123) )\n var newData = data.replace(data.charAt(i), \"\");\n }\n return newData;\n }", "title": "" }, { "docid": "448915983c258a1ce40a074d1a8fc8ef", "score": "0.57584953", "text": "function filterAlnum(txt) {\r\n let res = \"\";\r\n for (let i = 0; i < txt.length; i++) {\r\n let c = txt.charAt(i);\r\n res += (/^[a-z0-9]$/.test(c)) ? c : \" \";\r\n }\r\n return res;\r\n}", "title": "" }, { "docid": "8dcd4b28cac08ce1ec9b5c7b76709816", "score": "0.5751623", "text": "function sanitiseChannel(str) {\n // Check that string length is valid\n if (!str)\n return false\n\n if (str.length == 0 || str.length > 14)\n return false\n\n let string = str.toLowerCase()\n while (string.includes(\" \"))\n string = string.replace(\" \", \"-\")\n while (string.includes(\"_\"))\n string = string.replace(\"_\", \"-\")\n return string\n}", "title": "" }, { "docid": "c0179ae8e52e5ad74533b72f16993c45", "score": "0.57362247", "text": "function Filtra(campo){\n\tvar digits=\"abcdefghijklmnopqrstuvwxyzç\"\n\tvar campo_temp \n\tfor (var i=0;i<campo.value.length;i++){\n campo_temp=campo.value.substring(i,i+1)\t\n if (digits.indexOf(campo_temp)==-1){\n campo.value = campo.value.substring(0,i);\n alert(\"por favor, não utilize caracteres inválidos neste campo.\");\n break;\n }\n\t}\n}", "title": "" }, { "docid": "b0622733dfa049a4a8c617e27eb796e5", "score": "0.57277626", "text": "onlyASCII(data){\r\n let badChar = false;\r\n [...data].forEach(c => {badChar = c.charCodeAt(0)>127;});\r\n return !badChar;\r\n }", "title": "" }, { "docid": "21e2bce072b940f4ac4cbfac654e1d27", "score": "0.572411", "text": "function hiddenMobile(val) {\n var telNum = val.replace(/[^0-9]/ig, \"\");\n if (telNum.length > 7) {\n val = telNum.substring(0, 3) + \"****\" + telNum.substring(telNum.length - 4);\n }else if(telNum.length > 0){\n val = telNum.substring(0, 3) + \"****\" ;\n }else{\n val=\"\";\n }\n return val;\n}", "title": "" }, { "docid": "6b3c889c7a00b19ff313e24a1c7c410f", "score": "0.57156944", "text": "function InputPass2_onkeydown() {\n var str;\n var char;\n str=document.MAINFORM.InputPass2.value;\n char=str.charAt(str.length-1);\n if ((char!=\"0\") && (char!=\"1\")&&(char!=\"2\")&& (char != \"3\")&&(char != \"4\")&&(char != \"5\")&&(char != \"6\")&&(char != \"7\")&&(char != \"8\")&&(char != \"9\"))\n {\n document.MAINFORM.InputPass2.value=str.substring(0,(str.length-1));\n }\n}", "title": "" }, { "docid": "fc12f0df9af8adcd5e465f821cfe36a5", "score": "0.5711767", "text": "function excuted(character) {\n return isNaN(character) ? character : \"\";\n}", "title": "" }, { "docid": "37d97aa85e9109b036a060c0deeeb6bd", "score": "0.57093734", "text": "function isALetter(n) {\n n = n.charCodeAt(0);\n return (n >= 97 && n < 123);\n}", "title": "" }, { "docid": "b9213e945f45d5caeb3af13c684b61b0", "score": "0.57083046", "text": "function maskify(cc) {\n result = \"\"\n ccr = cc.split(\"\").reverse().join(\"\")\n\n for (let i = 0; i < ccr.length; i++) {\n if (i > 3) {\n result += \"#\"\n } else {\n result += ccr[i]\n }\n }\n\n result = result.split(\"\").reverse().join(\"\")\n return result\n}", "title": "" }, { "docid": "af644b5b88a0a2a12f8fc62ef5c141a0", "score": "0.5695269", "text": "static get NONCE_LEN() {\n return 12;\n }", "title": "" }, { "docid": "a824dccfd30df7b3e73f3a1fff25ddaf", "score": "0.5694689", "text": "function zombieSpeechRule7(aString){\n return aString.replace(/[Uu]/g,'rrrrRr');\n }", "title": "" }, { "docid": "483bf1c897c3ff81cc8f386e140d3350", "score": "0.56866384", "text": "function alphanumeric(src)\n{\n\tvar numaric = src.value;\n\tfor(var j=0; j<numaric.length; j++)\n\t\t{\n\t\t var alphaa = numaric.charAt(j);\n\t\t var hh = alphaa.charCodeAt(0);\n\t\t if((hh > 47 && hh<59) || (hh > 64 && hh<91) || (hh > 96 && hh<123))\n\t\t {\n\t\t }\n\t\telse\t{\n\t\t\tvar longMsg = mesg[5]; \n\t\t\talert(longMsg);\n \t\tsrc.focus();\n\t\t\t return false;\t\t\t \n\t\t }\n\t\t}\n\t\t\n return true;\n}", "title": "" }, { "docid": "16b4aea2fd907b78b32f5359d5740c94", "score": "0.5684222", "text": "static checkTwodigitNumber(val, len) {\n let ret = val + '';\n if (len === 2 && ret.length !== 2) {\n return '0' + ret;\n }\n return ret;\n }", "title": "" }, { "docid": "e449ef9f417c1fb325c1932842abf89a", "score": "0.5683285", "text": "function n(e){return e>=65&&e<=90||95===e||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}", "title": "" }, { "docid": "59b344b79d0a5fdb40f89497865fa879", "score": "0.5680042", "text": "function noletters(str){\n let solonumeros=true\n var letrasquemegustan= [\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"]\n for(let i= 0; i<str.length;i++ ){\n if(letrasquemegustan.indexOf(str[i]) == -1) solonumeros = false\n }\n return solonumeros\n }", "title": "" }, { "docid": "c56c491f44c35d44302511351da38151", "score": "0.56754875", "text": "function applyMask(data) {\n return mask.map(function (char) {\n if (char != '_') return char;\n if (data.length == 0) return char;\n return data.shift();\n }).join('')\n }", "title": "" }, { "docid": "a50b4d2c4bb055274858c67d36493c2a", "score": "0.56681937", "text": "function quickCheapValidation(str) {\n return /^\\#\\d{6}$/.test(str) || // #112233\n /^\\#\\d{3}$/.test(str) // #123\n}", "title": "" }, { "docid": "11b144ace9c0f2246b13836979f0b4d7", "score": "0.566672", "text": "function fearNotLetter(str) {\n\t\n}", "title": "" }, { "docid": "572290b54a94fc44d1b2ab9d216916ed", "score": "0.56654805", "text": "function phoneMask(){\n $('#customer_telephone').mask('+7 (999) 999-99-99');\n}", "title": "" }, { "docid": "be0bb5877a6c416f8158fc8bfc6f98b4", "score": "0.56643087", "text": "function maskblur(elem, mask) {\n var v = elem.value;\n var i = mask.length;\n if (i > 0 && v.length > 0 && v.length != i) {\n // there is a mask and a value but the value is not long enough\n for (; i > 0 && mask.charAt(i-1) == '#'; --i);\n // i is now index to first # in # string at end of mask\n if (i > v.length) {\n // value is too short even if trailing digits in the mask are ignored\n if (confirm('Field entry is incomplete! Try again?'))\n elem.focus();\n else\n elem.value = '';\n return;\n }\n // if the mask ends with digits then right-justify them in the value\n while (v.length < mask.length) {\n v = v.substring(0, i) + '0' + v.substring(i, v.length);\n }\n elem.value = v;\n }\n}", "title": "" }, { "docid": "7ccc29377d4a6d0052dbb5eef7709b0b", "score": "0.56626797", "text": "function InputText1_onkeyup() {\n var str;\n var char;\n str=document.MAINFORM.InputText1.value;\n char=str.charAt(str.length-1);\n if ((char!=\"0\") && (char!=\"1\")&&(char!=\"2\")&& (char != \"3\")&&(char != \"4\")&&(char != \"5\")&&(char != \"6\")&&(char != \"7\")&&(char != \"8\")&&(char != \"9\"))\n {\n document.MAINFORM.InputText1.value=str.substring(0,(str.length-1));\n }\n}", "title": "" }, { "docid": "a62714ef6dbf8b8af3ebb97aa798835f", "score": "0.56550235", "text": "function maskify(cc) {\n if (cc.length > 3) {\n return (Array(cc.length - 3).join('#')) + cc.slice(-4);\n } else {\n return cc;\n }\n}", "title": "" }, { "docid": "ac810be43b30b9d0774b8fc6f315e354", "score": "0.5651284", "text": "controlPassword(password) {\n if (password.length >= 6) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b2ccbf8d8ec1dedd3c4200a6088098de", "score": "0.5634827", "text": "function maskNLastChars(string, n) {\n let result;\n let toReplace = string.substr(string.length-n , string.length);\n\n if (string.length <= n) {\n throw new Error(`Must be longer than ${n} chars.`)\n }\n result = string.replace(toReplace, '####')\n return result;\n}", "title": "" }, { "docid": "cca232bcc0d8f619c664f10eefbf1f8a", "score": "0.5634165", "text": "function plusThirteenAlphaOnly(c) {\n if (c.toUpperCase().match(/[A-Z]/)) {\n //console.log(c + c.charCodeAt(0));\n c = c.charCodeAt(0) + 13;\n //console.log(c);\n if (c > 90) {\n c = (c - 90) + 64;\n //console.log(c);\n //console.log(String.fromCharCode(c) + c);\n }\n c = String.fromCharCode(c);\n //console.log(c + c.charCodeAt(0));\n \n }\n decodedArr.push(c);\n }", "title": "" }, { "docid": "a9208a9e716491a572e210736fcac71d", "score": "0.5625392", "text": "function keyRestrict1(e, validchars_code) \n{\n var strCheckOK = new Array();\n strCheckOK[0] = \"0123456789\"; // numbers only\n strCheckOK[1] = \"0123456789.\"; // positive numbers only\n strCheckOK[2] = \"0123456789.-\"; // for float with negative\n strCheckOK[3] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz \"+ String.fromCharCode(241); // alpha only\n strCheckOK[4] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&(),:;.-'/\\\"\\\\ \"+ String.fromCharCode(241); // alpha with basic esp char only\n strCheckOK[5] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 \"+ String.fromCharCode(241);\t// alpha num only\n strCheckOK[6] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&,:;.-#/'\\\"\\\\ \"+ String.fromCharCode(241);\t// alpha num with basic esp char only\n strCheckOK[7] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_&,:;-./!@#$%^*()?'\\\"\\\\ \"+ String.fromCharCode(241); // with special chars\t\n strCheckOK[8] = \"0123456789/\"; // for dates\n strCheckOK[9] = \"0123456789-/ \"; // mobile phone\n strCheckOK[10] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789#*-/ \"+ String.fromCharCode(241); // fax/telephone phone\n strCheckOK[11] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_@.\"; // email address\n strCheckOK[12] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.- \"+ String.fromCharCode(241); // name of a person\n strCheckOK[13] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&,:;.-#/'\\\"\\\\ \";\t// alpha num with basic esp char only\n strCheckOK[14] = \"0123456789-/\"; // id numbers\n strCheckOK[15] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&,:;.-#/'\\\"\\\\ ()\"+ String.fromCharCode(241);\t// for descriptive title\n strCheckOK[16] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.\";\t// for grades ex. 1.5, NC, DR\n strCheckOK[17] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789. \";\t// for grades ex. 1.5, NC, DR\n strCheckOK[18] = \"\"; // readonly\n \n var key='', keychar='';\n \n key = getKeyCode(e);\n \n if (validchars_code==-1) {\n \tif (key>0) return false;\n \telse\t return true;\n }\n if (key == null) return true;\n\n keychar = String.fromCharCode(key);\n keychar = keychar.toLowerCase();\n validchars = strCheckOK[validchars_code];\n \n validchars=validchars.toLowerCase();\n \n if (validchars.indexOf(keychar) != -1)\n \treturn true;\n if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 )\n \treturn true;\n \n return false;\n}", "title": "" }, { "docid": "ca9e1786a584a1806c0f4643fcaa4c65", "score": "0.5623539", "text": "function pinyin(str) {\n return correct(str, han.letter(str, ' '), ' ');\n}", "title": "" }, { "docid": "e7958d12bc3c4b06638b6a700b8aeda6", "score": "0.5623104", "text": "function removeAlphaNumeric(input,hValue) {\n\tvar ChngdChar1 = null;\n\tChngdChar1 = input.replace(/([a-zA-Z])/g, \"\");\n\tChngdChar1 = ChngdChar1.replace(/([0-9])/g, \"\");\n\t//ChngdChar1 = ChngdChar1.replace(/([`~!@#$%^&*()_+-=|\\\"':;?])/g, \"\");\n\tChngdChar1 = ChngdChar1.replace(/([`~_+|\\\"'?])/g, \"\");\n\tChngdChar1 = ChngdChar1.replace('{', '');\n\tChngdChar1 = ChngdChar1.replace('[', '');\n\tChngdChar1 = ChngdChar1.replace('}', '');\n\tChngdChar1 = ChngdChar1.replace(']', '');\n\t//ChngdChar1 = ChngdChar1.replace('>', '');\n\t//ChngdChar1 = ChngdChar1.replace('<', '');\n\t//ChngdChar1 = ChngdChar1.replace(',', '');\n\tChngdChar1 = ChngdChar1.replace('\\\\', '');\n\t//ChngdChar1 = ChngdChar1.replace('%', '');\n\tChngdChar1 = ChngdChar1.replace('^', '');\n\tChngdChar1 = ChngdChar1.replace('&', '');\n\t//ChngdChar1 = ChngdChar1.replace('#', '');\n\tChngdChar1 = ChngdChar1.replace('$', '');\n\t//ChngdChar1 = ChngdChar1.replace('@', '');\n\t//ChngdChar1 = ChngdChar1.replace('(', '(');\n\t//ChngdChar1 = ChngdChar1.replace(')', '');\n\tChngdChar1 = ChngdChar1.replace('*', '');\n\t//ChngdChar1 = ChngdChar1.replace('.', '.');\n\t\n\t\n\treturn ChngdChar1+hValue;\n}", "title": "" }, { "docid": "1547650fcb32b1ded8ab052d1b214953", "score": "0.56186634", "text": "function checkMask(obj)\r\n{\r\n if (event.keyCode == 0)\r\n return;\r\n var val = obj.value;\r\n\t// Tracker#: 18878 - CANNOT ENTER BETWEEN OPERATOR FOR SEARCH BETWEEN DATES\r\n // Moving tracker 17812 fix from showMask function to checkMask function\r\n // since that is where the original code for limiting number of characters was initially\r\n // before the fix.\r\n \r\n // Tracker#: 17812 - LOWER CASE LETTERS APPEAR IN THE ALT 2 DESC\r\n\t// Alternate logic to limit number characters to length of mask:\r\n\t// Set the maxlength property of the field.\r\n\tobj.maxLength = EM_Array.length;\r\n\r\n var curcode = event.keyCode;\r\n\r\n if (curcode == 8) //backspace\r\n return;\r\n\r\n //check for right masking\r\n if ( (EM_Array[val.length] == alphaStr && !isAlpha(curcode)) ||\r\n (EM_Array[val.length] == numStr && !isDigit(curcode)) ||\r\n (EM_Array[val.length] == alphaNumStr && !isAlphaNum(curcode)) )\r\n {\r\n EMsg(String.fromCharCode(curcode));\r\n event.returnValue = false;\r\n obj.focus()\r\n }\r\n else\r\n {\r\n timer = setTimeout(\"staticChars(getElemnt('\"+obj.name+\"'))\", 1);\r\n }\r\n}", "title": "" }, { "docid": "b6fd2528afe83ef4c9fa16957a765abe", "score": "0.56186044", "text": "password(value) {\n if (isEmpty(value)) return 'empty';\n\n // const regex = /^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,}$/;\n\n if (value.length < 8) return 'tooShort';\n\n const re_number = /[0-9]/;\n if (!re_number.test(value)) return 'noNumber';\n\n const re_lowercase = /[a-z]/;\n if (!re_lowercase.test(value)) return 'noLowercase';\n\n const re_uppercase = /[A-Z]/;\n if (!re_uppercase.test(value)) return 'noUppercase';\n\n const re_symbols = /(?=[-!$#%^@&*()_+|~=`{}\\[\\]:\";'<>?,.\\/])/;\n if (!re_symbols.test(value)) return 'noSymbol';\n\n return 'valid';\n }", "title": "" }, { "docid": "dd5c66e030f136d0d4081b797d7dbbca", "score": "0.56130826", "text": "function valAlfabeto(input) {\r\n\tvar checkOK =\"ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ\" + \"abcdefghijklmnñopqrstuvwxyzáéíóú\" + \" \";\r\n\tvar checkStr = input;\r\n\tvar allValid = true; \r\n\tfor (i = 0; i < checkStr.length; i++) {\r\n\t\tch = checkStr.charAt(i); \r\n\t\tfor (j = 0; j < checkOK.length; j++)\r\n\t\t\tif (ch == checkOK.charAt(j))\r\n\t\t\t\tbreak;\r\n\t\tif (j == checkOK.length) { \r\n\t\t\tallValid = false; \r\n\t\t\tbreak; \r\n\t\t}\r\n\t}\r\n\treturn allValid;\r\n}", "title": "" }, { "docid": "c144ca97d20159975d25ceedb7fd057f", "score": "0.5608031", "text": "function editMask(obj)\r\n{\r\n\tvar val = obj.value;\r\n\r\n\tif (EM_Array.length === 0)\r\n\t{\r\n\t\tEMsg(\"\");\r\n\r\n\t\treturn;\r\n\t}\r\n\telse if (val.length > EM_Array.length)\r\n\t{\r\n\t\tEMsg(\"\");\r\n\t\tobj.value= \"\";\r\n\t\tobj.focus()\r\n\t\treturn;\r\n\t}\r\n\r\n\tfor (var i = 0; i < EM_Array.length && i < val.length; i++)\r\n\t{\r\n\t\tcurcode = val.charCodeAt(i);\r\n\r\n\t\tif ( (EM_Array[i] == alphaStr && !isAlpha(curcode)) ||\r\n\t\t (EM_Array[i] == numStr && !isDigit(curcode)) ||\r\n \t\t (EM_Array[i] == alphaNumStr && !isAlphaNum(curcode)) ||\r\n \t\t (EM_Array[i] != alphaStr &&\r\n \t\t \tEM_Array[i] != numStr &&\r\n \t\t \tEM_Array[i] != alphaNumStr &&\r\n \t\t \tEM_Array[i] != anyStr &&\r\n \t\t \tEM_Array[i] != String.fromCharCode(curcode)) )\r\n\t\t{\r\n\t\t\tEMsg(\"\");\r\n\t\t\tobj.value = \"\";\r\n\t\t\tobj.focus()\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "5940e1b60ee73d31d357b8a1ad412e96", "score": "0.5603738", "text": "function handleNonChar(){return 1;}", "title": "" }, { "docid": "4a6baf4d1b79d6e2057dc9d6e4793c84", "score": "0.5599166", "text": "function SanitizeSequence(str, len) {\n if(len === undefined) {\n len = str.length;\n }\n\n let chars = str.toUpperCase().split('');\n let ret = [];\n\n for (var i = chars.length-1; i >= 0 && ret.length < 6; --i) {\n if (['A','C','T','G','U'].includes(chars[i])) {\n if (chars[i] == 'T') {\n ret.push('U');\n } else {\n ret.push(chars[i]);\n }\n }\n }\n\n return ret.reverse().join('');\n}", "title": "" }, { "docid": "1201930ae547f45f3e48a44146d4bcf9", "score": "0.5597693", "text": "function applyMask(data) {\n return mask.map(function(char) {\n if (char != '_') return char;\n if (data.length == 0) return char;\n return data.shift();\n }).join('')\n }", "title": "" }, { "docid": "afb21d46bfb29c1156ea2595ffa84841", "score": "0.5595034", "text": "function validateAscii(str) {\n\t//var str = obj.value;\n\tfor (var i = 0; i < str.length; i++) {\n\t\tif (str.charCodeAt(i) > 127) {\t\t\t\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "adba46f4a94e70048dc00778b797d078", "score": "0.5586382", "text": "function mask(phonenumberid) {\n $(phonenumberid).mask(\"(999) 999-9999\");\n}", "title": "" }, { "docid": "9c67897bbb338119f1204384fb753d60", "score": "0.5581752", "text": "function CustomSubStr(ControlName, MaxLength) {\n var ControlValue = $('#' + ControlName).val();\n if (ControlValue.length > MaxLength) {\n alert(\"System can not allow to input more than \" + MaxLength + \" Character.\\nSystem remove over Character.\");\n ControlValue = ControlValue.substr(0, MaxLength);\n $('#' + ControlName).val(ControlValue);\n }\n}", "title": "" } ]
5395b15e1dac6a4897d7d48445aeaaf6
Set checkbox (main an Hide checkbox button for edit
[ { "docid": "4eda5b834fc5e0da17f2ff817f629de9", "score": "0.6282838", "text": "function check_change_checkbox(list_id) {\n \t\n \t$('.checkbox-main-'+list_id+':checkbox').change(function(){\n\t if($(this).is(':checked')){\n\t $('.checkbox-'+list_id+':checkbox').each(function() {\n\t $(this).attr('checked',true);\n\t });\n\t\t\t$('.tr-checkbox-button-'+list_id+'').show();\n\t\t\t\n\t }else{\n\t $('.checkbox-'+list_id+':checkbox').each(function() {\n\t $(this).attr('checked', false);\n\t });\n\t\t\t$('.tr-checkbox-button-'+list_id+'').hide();\n\t\t\t\n\t } \n\t});\n \t\n\t$('.checkbox-'+list_id+':checkbox').change(function() { \n\t\tvar checkedNum = $('.checkbox-'+list_id+':checked').length;\n\t\tif (!checkedNum) {\n\t\t\t$('.tr-checkbox-button-'+list_id+'').hide();\n\t\t\t$('.checkbox-main-'+list_id+':checkbox').attr('checked', false);\n\t\t}\n\t\telse { \n\t\t\t$('.tr-checkbox-button-'+list_id+'').show();\n\t\t}\n\t}); \n}", "title": "" } ]
[ { "docid": "bec28348c7353c909c6162574e8f0e55", "score": "0.70412725", "text": "function setCheckbox() {\n colCheck = createCheckbox(' Inverti colori', false);\n colCheck.style(\"color: #ffffff\")\n colCheck.position(10, height - 30);\n colCheck.changed(invertColors);\n}", "title": "" }, { "docid": "51f9561885e730f530cfb6f2d5b5c69d", "score": "0.69805264", "text": "function toggleCheckBox(){\n checkBox = !checkBox;\n}", "title": "" }, { "docid": "7cf285f6d3989689bd4a43f9f6e5b4ea", "score": "0.6841671", "text": "set showCheckboxes(value) {\n this.showCheckboxesProperty = value;\n this.notifyPropertyChanged();\n }", "title": "" }, { "docid": "983edfc237b90d8f89ad1ef385f72593", "score": "0.6698727", "text": "toggle() {\n this.checked = !this.checked;\n }", "title": "" }, { "docid": "983edfc237b90d8f89ad1ef385f72593", "score": "0.6698727", "text": "toggle() {\n this.checked = !this.checked;\n }", "title": "" }, { "docid": "a4d124fa692cc194bd51a99abe4582d6", "score": "0.6687355", "text": "function toggle_checkbox(checkbox){\r\n\t\r\n\tif(checkbox.value == '1'){\r\n\t\t\r\n\t\tcheckbox.value = '0';\r\n\t\t\r\n\t}else if(checkbox.value == '0' || checkbox.value == ''){\r\n\t\t\r\n\t\tcheckbox.value = '1';\r\n\t\t\r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "9251c454331a7004fe4db7d8b6f845cc", "score": "0.66863483", "text": "function checkbox() {\n if (checkBoxClicked) {\n checkBoxClicked = false;\n } else {\n checkBoxClicked = true;\n }\n}", "title": "" }, { "docid": "7368eeb9009e43c54d406f4bcd779d1d", "score": "0.6561644", "text": "function toggleCheckBox(isSelected, i) {\r\n people[i].selected = isSelected;\r\n updateView();\r\n}", "title": "" }, { "docid": "1fe4dd7b76b44427861df372d85acd4f", "score": "0.64830774", "text": "function toggleCheck (e) {\n var item = section.getItemAt(e.itemIndex);\n if (item.properties.accessoryType == Ti.UI.LIST_ACCESSORY_TYPE_NONE) {\n item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK;\n item.template = 'check';\n }\n else {\n item.properties.accessoryType = Ti.UI.LIST_ACCESSORY_TYPE_NONE;\n item.template = 'uncheck';\n }\n section.updateItemAt(e.itemIndex, item);\n}", "title": "" }, { "docid": "a39f8ba8172bb8ae0a386620fb9cea1c", "score": "0.64717484", "text": "function checkbox(){\n $('.ui.checkbox')\n .checkbox();\n }", "title": "" }, { "docid": "b9c70e14329cfda90a88978cfe163428", "score": "0.64643866", "text": "toggle() {\n this.checked = !this.checked;\n this._onChange(this.checked);\n }", "title": "" }, { "docid": "a17c0a54a8bff72a9fe836979eeedc34", "score": "0.6454655", "text": "function setCheckBoxState() {\n\tvar divTags = document.all.tags(\"DIV\")\t// get a handle on all the DIV tags in the document\n\tvar formTags = document.all.tags(\"FORM\")\t// get a handle on all the FORM tags in the document\n\tif ( (divTags.length == 0) && (formTags.length > 0) ) {\t// if there are no DIV tags in the document but there is a form\n\t\tdocument.form1.ShowAll.checked = true\t// select the check box in the Expand all text form\n\t\tdocument.form1.ShowAll.disabled = true\t// disable the check box\n\t\tcheckboxLabel.className = \"disabledlabel\"\t// make the check box label grey\n\t}\n}", "title": "" }, { "docid": "2f9bce7ce775f7e64bd88a65bd0cdfe5", "score": "0.6428453", "text": "function changeValueCheckbox(element){\n if(element.checked){\n element.value='on';\n }else{\n element.value='off';\n }\n }", "title": "" }, { "docid": "e2a9362795d17549a7b9567354f9fd98", "score": "0.64057297", "text": "function _checkboxClick(e) {\n const item = this.id.split('-')[2];\n const icon = this.querySelector('i');\n\n if (icon.classList.contains('fa-check-square')) {\n icon.classList.remove('fa-check-square');\n icon.classList.add('fa-square');\n _storage.items[item].state = false;\n } else {\n icon.classList.remove('fa-square');\n icon.classList.add('fa-check-square');\n _storage.items[item].state = true;\n }\n _setValue({\n items: _storage.items\n });\n }", "title": "" }, { "docid": "237867771bb4cb472460a5ce7680725a", "score": "0.63922656", "text": "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t\t$(this).trigger(\"change\");\n\t\t\t}", "title": "" }, { "docid": "7184b0a52b7a4a25fed4c013bce1e7b7", "score": "0.6386567", "text": "set checked(flag) {\n this.shadowRoot.querySelector(\".checkbox\").checked = flag;\n }", "title": "" }, { "docid": "5ba2ff698c6120b13865c5dd8b8a3c2f", "score": "0.6344129", "text": "function handleCheckboxClick(name, checked){\n $(\"#plan_\" + name + \"_name\").prop(\"disabled\", checked);\n $(\"#plan_template_id\").val(\"\").change();\n\n if(checked){\n $(\"#plan_\" + name + \"_name\").val(\"\");\n $(\"#plan_\" + name + \"_id\").val(\"\").change();\n $(\"#plan_\" + name + \"_name\").siblings(\".combobox-clear-button\").hide();\n }\n}", "title": "" }, { "docid": "c577dd67d3d6cec38cb6c5fb168b56a7", "score": "0.63208973", "text": "function updateShowHide(e) {\n if (this.checked) {\n document.getElementById('data-for-invoice').style.visibility = 'visible';\n } else {\n document.getElementById('data-for-invoice').style.visibility = 'hidden';\n }\n}", "title": "" }, { "docid": "3e029803fe7f6fa556900a31c3363e9e", "score": "0.626228", "text": "function replace_checkbox(selected_item) {\n document.getElementById(selected_item + \"checkbox\").style.display = \"block\";\n\n}", "title": "" }, { "docid": "5d3d3118756d8eb13eb6398a8d1c2aa2", "score": "0.62512106", "text": "function UpdateCheckboxes(checkbox) {\n var fieldValue = checkbox.name;\n var fieldID = checkbox.id;\n if(checkbox.checked == true) {\n AddCheckboxControlValue(fieldID, fieldValue); // went from unchecked to checked\n } else {\n RemoveCheckboxControlValue(fieldID, fieldValue); // went from checked to unchecked\n } \n UpdateDisplay();\n}", "title": "" }, { "docid": "321333b875ef23c15cbf71325afc9593", "score": "0.6225043", "text": "function _plmpom_setChkboxValue(obj)\r\n {\r\n\tif(obj)\r\n {\r\n \t//alert(\"obj=\"+obj.id+\"\\n\"+obj.checked);\r\n \tif(obj.checked==true)\r\n \t\t{\r\n \tobj.value = \"Y\";\r\n }\r\n else\r\n\t {\r\n \tobj.value = \"\";\r\n \t\t}\r\n }\r\n}", "title": "" }, { "docid": "1c1ac747f3798472841f281ee2c1b64f", "score": "0.62247247", "text": "function onClickBox() {\r\n hx8D.save();\r\n $(\"#msg\").text(\"Checkbox is checked. \");\r\n}", "title": "" }, { "docid": "96eb5c8af072526216f258ef03066440", "score": "0.62007993", "text": "function todosCheckbox(){\n\tif (document.getElementById('todos_Checkbox').checked == false){\n\t\tdesSeleccionarTodosCheckbox();\t\t\t\n\t}\n\telse{\n\t\tseleccionarTodosCheckbox();\n\t}\n}", "title": "" }, { "docid": "6750a57ffd4f0ef11491bd98e0b9e621", "score": "0.61975396", "text": "function showContent(id, nameCheckBox) { \n\n\tcheckbox = document.forms['uptUserForm'].elements[nameCheckBox];\n\t\n\t if(document.getElementById(id).style.display==\"none\") { \n\t document.getElementById(id).style.display = \"inline\"; \n\t checkbox.checked = true; \n\t } \n\t else { \n\t document.getElementById(id).style.display = \"none\"; \n\t checkbox.checked = false; \n\t } \n\t}", "title": "" }, { "docid": "339bfdc377ecc6b8b953f188ec760428", "score": "0.6197335", "text": "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t}", "title": "" }, { "docid": "70d69e616e6933b096918e4e9d4ca242", "score": "0.61905766", "text": "_clickEditButton(e) {\n this.toggle();\n }", "title": "" }, { "docid": "fac18a4c857aa5d3b424ebaafeac7df8", "score": "0.6189759", "text": "function toggleFilterByCheckboxSelect(thisObj, id, rowNo , prefix)\r\n{\r\n toggelDetailCheckboxSelect(thisObj, id, rowNo, prefix);\r\n}", "title": "" }, { "docid": "f669f2fead45eb61778e02045d894818", "score": "0.61624", "text": "function markNone()\r\n{\r\n\tfor (j=0; j<chk.length; j++)\r\n\t\t{\r\n\t\t\tchk[j].checked = false;\r\n\t\t}\r\n}", "title": "" }, { "docid": "d230e59fdf2f394313c91d63085cb8cb", "score": "0.61586326", "text": "function loadExportSettingsCheckbox(srcEl, trgEl) {\n if ( srcEl.value == 1 ) {\n trgEl.setAttribute(\"checked\", \"1\");\n } else {\n trgEl.removeAttribute(\"checked\");\n }\n}", "title": "" }, { "docid": "e7458bfd65b9c60e8dd3b70602a9e483", "score": "0.6147217", "text": "function toggle_confirm(chk) {\n\tREDIPS.drag.trash_ask = chk.checked;\n}", "title": "" }, { "docid": "87facb0a71ec2d0320c9e32b6b5d547d", "score": "0.61402637", "text": "renderedCallback() {\n let checkboxes = this.template.querySelector('[data-id=\"checkbox\"]');\n if(this.value === 'true'){\n checkboxes.checked = true;\n }else{\n checkboxes.checked = false;\n }\n }", "title": "" }, { "docid": "93a5af1e8533f5757ea801ac19c3d330", "score": "0.6138773", "text": "function init() {\n editableBtn.checked = true;\n makeContentEditable();\n}", "title": "" }, { "docid": "938c8544f9815cda527d90b2c4c3d09e", "score": "0.6132455", "text": "getCheckbox () {\n const el = this.getFormInputField('checkbox')\n return el\n }", "title": "" }, { "docid": "c33f9f837183bc40dcf97cf8bd4aad26", "score": "0.6122379", "text": "handleCheck(){\n this.refs.checkbox.setChecked(!this.refs.checkbox.isChecked());\n }", "title": "" }, { "docid": "7098325b72460bbe21cb16f79e5b3a05", "score": "0.60947967", "text": "function bindCheckbox(id, callback) {\n var el = document.getElementById(id) || {};\n var enabled = $.CodeEmbed.defaultSettings[id] == '1';\n if ($.CodeEmbed.editorSettings[id]) {\n // override default if set by user\n enabled = $.CodeEmbed.editorSettings[id] == '1';\n }\n el.checked = enabled;\n var onChange = function() {\n var val = !!el.checked;\n $.CodeEmbed.editorSettings[id] = val ? '1' : '0'; // set setting so it can be persisted\n callback(val);\n };\n el.onclick = onChange;\n onChange();\n}", "title": "" }, { "docid": "f85e869e69dfbab41808001b6ba5f6ff", "score": "0.60935825", "text": "function checkbox(){\n\tvar ck = $(this).parent().parent().find(':input');\t\n\t//console.log(ck)\n\tck.each(function (){\n\t\t$(this).removeAttr(\"checked\");\n\t});\n\tvar id = this.id;\n\t$(\"#\"+id).prop('checked',true);\n}", "title": "" }, { "docid": "3314a74277577f43c86d5d7048919f19", "score": "0.6093406", "text": "function toggleCheckbox(theFormName, theItemCode, sStatus){\r\n\tvar theItem = document.getElementById(theFormName+\"_\"+theItemCode);\r\n\ttheItem.checked = sStatus;\r\n}", "title": "" }, { "docid": "9618e696912cc1b67fbb6f5b36710659", "score": "0.6093303", "text": "function tick_checkbox( elem ){\n\tvar status = $( elem ).attr( 'ticked' );\n\tif ( status == \"yes\" )\n\t{\n\t\t$( elem ).attr( 'ticked', 'no' );\n\t\t$( elem ).html( '' );\n\t}\n\telse\n\t{\n\t\t$( elem ).attr( 'ticked', 'yes' );\n\t\t$( elem ).html( '<img class=\"checkbox-tick\" src=\"' + base_url + 'public/img/tick.png\">' );\n\t}\n}", "title": "" }, { "docid": "ef0efaffde8b43256f0584d96fb1dc2a", "score": "0.60798824", "text": "function checkbox(el) {\n System.import('_content/Blazorized.NLDesignSystem/dist/components/form/checkbox.js').then(function (module) {\n new module.CheckboxGroup(el);\n });\n}", "title": "" }, { "docid": "05a1d34abf4cba5e6ab61e07e5af341a", "score": "0.60790735", "text": "updateTraining(checked, key) {\n this.props.isCheckedVisible(checked, key);\n }", "title": "" }, { "docid": "c2d745089bb6c4f9ef9c8a4547795c44", "score": "0.6066402", "text": "function saveExportSettingsCheckbox(srcEl, trgEl) {\n if ( srcEl.checked == 1 ) {\n trgEl.value = 1;\n } else {\n trgEl.value = 0;\n }\n}", "title": "" }, { "docid": "eff5fc334e62145c844a8a0702c3ad1a", "score": "0.6039041", "text": "toggleValue() {\n this.setValue(!this.hasClass('checked'));\n this.refreshDataSource();\n this.updated = true;\n\n if (fw.isFunction(this.onChange)) {\n this.onChange();\n }\n }", "title": "" }, { "docid": "bf3e21bc8d0eee4a863c85c7cdf399a2", "score": "0.6035482", "text": "function uncheck() {\n document.getElementById(\"toggler\").checked = false;\n}", "title": "" }, { "docid": "6f2f1ba3b8211647a6f97e463cd9cdde", "score": "0.6034604", "text": "function ChangeChecked() {\n if (this.Input.value === \"\") {\n this.CheckBox.checked = false;\n } else {\n this.CheckBox.checked = true;\n }\n }", "title": "" }, { "docid": "2458e650c2eafe2a2bda5550bfc0690e", "score": "0.6030075", "text": "function toggleCheckProblem() {\r\n var checkbox = this;\r\n var annotatedReasons = updateAnnotatedStatus([checkbox]);\r\n backgroundPage.annotate(annotatedReasons);\r\n updateCheckAllStatus(checkbox);\r\n}", "title": "" }, { "docid": "150acd74a83abe45523e289f95e91140", "score": "0.6027803", "text": "function set_checkbox(checkbox,data){\n if(data.new_val === 'undefined')\n return;\n\n if(data.new_val === data.prev_val)\n return;\n\n var checkbox = $('#'+checkbox);\n\n if(data.new_val === 0){\n checkbox.removeAttr('checked');\n }else{\n checkbox.attr('checked', 'checked');\n }\n}", "title": "" }, { "docid": "68f1f665e92a98faf1dbd117c1fd3402", "score": "0.60136324", "text": "function onChangeJobCheckbox() {\n var checkboxId = this.id;\n for (var i = 0; i < config.jobs.length; i++) {\n if (config.jobs[i].alias === checkboxId.replace('checkbox-btn-', '')) {\n if (config.jobs[i].active == true) {\n config.jobs[i].active = false;\n } else {\n config.jobs[i].active = true;\n }\n i = config.jobs.length;\n }\n saveToLocalStorage(config);\n drawAllUIElements(config);\n }\n }", "title": "" }, { "docid": "b6c8b8c9cfbe35acb3cf8b5a6cbe5a44", "score": "0.60129744", "text": "function setTgWrap(cb, wrapperToToggle) {\n\n if ($(cb).is(':checked')) {\n\n $(wrapperToToggle).show();\n\n } else {\n\n $(wrapperToToggle).hide();\n\n }\n\n\n }", "title": "" }, { "docid": "548f48b1f9b741bd4f839421f60021ae", "score": "0.60129344", "text": "function setCheckboxState(checkbox, state)\n{\n if (state === true) {\n checkbox.attr('src', window.app.domainName + \"/Content/images/check-white.svg\");\n checkbox.removeClass('deletePhoneNumberIconUnselected');\n checkbox.addClass('deletePhoneNumberIconSelected');\n }\n else {\n //we actually need only the img placeholder (for the border and background)\n //so we set the image to a transparent 1 pixel gif\n checkbox.attr('src', window.app.domainName + \"/Content/images/transparent.gif\");\n checkbox.removeClass('deletePhoneNumberIconSelected');\n checkbox.addClass('deletePhoneNumberIconUnselected');\n }\n}", "title": "" }, { "docid": "2416d2a41ab0b0625c6332a18104b526", "score": "0.6008749", "text": "function toggleRegisterMe(checkbox){\n\tif(checkbox.checked == true){\n\t\t$('#registerMe_section').show();\n\t}else{\n\t\t$('#registerMe_section').hide();\n\t}\n}", "title": "" }, { "docid": "4bbb8cae625574e280291726c318ca38", "score": "0.6003149", "text": "function setChecked(wName, wValue) {\n\t\tvar wn = dijit.byId(wName);\n\t\tif (wn) {\n\t\t\twn.set('checked', wValue);\n\t\t} //if\n\t} //setChecked", "title": "" }, { "docid": "cb37a4a5842a864ab6b84b50778a59be", "score": "0.59889144", "text": "function changeButtons(){\n $('#saveSupplierCompany').show();\n $('#tropopoiisiButton').hide();\n\n }", "title": "" }, { "docid": "52d18dcd5c63ca600234875b22368054", "score": "0.59877473", "text": "saveNoteCheckboxStatus (isChecked) {\n this.isNotePostChecked = isChecked\n }", "title": "" }, { "docid": "c410de1d027d53744084e115c3a843e5", "score": "0.5979618", "text": "function untoggleCheckbox()\n{\n $('#modalita').bootstrapToggle('on');\n}", "title": "" }, { "docid": "227703ddb842b9042dc57770cf3890a4", "score": "0.59762955", "text": "function checkUnCheck(id)\n{\n if(document.getElementById(id).checked == true)\n {\n $('#'+id).val('on');\n if(id == 'mfiOperation'){\n $('.fo').show();\n }\n }\n else{\n $('#'+id).val('off');\n if(id == 'mfiOperation'){\n $(\"#loanOfficerId\").val('-1').selectmenu(\"refresh\");\n $('.fo').hide();\n }\n }\n}", "title": "" }, { "docid": "d547ae0ee76771e8d0b237a13a4d878c", "score": "0.5970958", "text": "function comprobar() {\n document.getElementById(\"bus_Nuevo\").readOnly =\n !document.getElementById(\"bus_otro\").checked;\n }", "title": "" }, { "docid": "f75fa430257086da4fe17cc1947570c0", "score": "0.59695303", "text": "function checkBoxReview(){\n\tif($('#checkBoxReview').is(':checked')==false){\n\t\thideReview();\n\t}\n\telse{\n\t\tshowReview(map);\n\t}\n}", "title": "" }, { "docid": "37023ce5de367c0b8170c52d3d19fe53", "score": "0.59648275", "text": "open () {\n super.open('checkboxes')\n }", "title": "" }, { "docid": "9b879f5e396c156deda6dde4e80482d0", "score": "0.5963305", "text": "function check_uncheck_features_button(fobj)\r\n{\r\n if(fobj.all.value == \"Select All\")\r\n {\r\n set_all_features(fobj, true);\t \r\n fobj.all.value = \"Select None\";\r\n }\r\n else if(fobj.all.value == \"Select None\")\r\n {\r\n set_all_features(fobj, false);\t \r\n fobj.all.value = \"Select All\";\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "71467c08f09f2cf58bb412d07fd27035", "score": "0.59499687", "text": "function toggle_cb(theFormId, theChecked)\n{\n\tvar theForm = document.getElementById(theFormId);\n\tvar cb = null;\n\t\n\tfor (var i = 0; i < theForm.elements.length; i++) \n\t{\n \tcb = theForm.elements[i];\n\t\n\t\tif (cb && cb.type == 'checkbox')\n\t\t{\n\t\t\tcb.checked = theChecked;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9165e9dcd6a0d47c982acb9f25067500", "score": "0.59483904", "text": "resetChecked() {\n this.getChildControl(\"list\").resetChecked();\n }", "title": "" }, { "docid": "b06140cae6657757ffc1d5013e9540a7", "score": "0.59450495", "text": "toggleCheckOutStatus() {\n this.isCheckedOut = !this.isCheckedOut;\n }", "title": "" }, { "docid": "7cccc7b3c189e2da84e379accfcaaef3", "score": "0.5940297", "text": "checkbox(name, params) {\n var checkbox = new BABYLON.GUI.Checkbox();\n checkbox.heightInPixels = this.heightInPixels;\n checkbox.widthInPixels = this.heightInPixels;\n checkbox.color = this.color;\n checkbox.background = this.background;\n if ( params ) {\n for(var c of Object.keys(params)) {\n checkbox[c] = params[c];\n }\n }\n let command = this.nameToCommand(name);\n if ( command ) {\n this.speechInput.addCommand(command, (text) => {\n if ( text == 'on' || text == 'true') {\n checkbox.isChecked = true;\n } else if ( text == 'off' || text == 'false') {\n checkbox.isChecked = false;\n } else {\n console.log(\"Can't set \"+name+\" to \"+text);\n }\n }, \"*onoff\");\n }\n this.elements.push(checkbox);\n this.controls.push(checkbox);\n return checkbox;\n }", "title": "" }, { "docid": "b66e3c4949cffce3953ff9385fc8b881", "score": "0.5938773", "text": "function NO_BOX$static_(){CheckboxSkin.NO_BOX=( new CheckboxSkin(com.coremedia.ui.skins.LabelableSkin.NO_BOX.getSkin()));}", "title": "" }, { "docid": "ffc7514386fab18e4ace3a3a85db3018", "score": "0.59342664", "text": "function editCheckListItem() {\n var currentCheckListItem = $(this).data(\"checkListItem\");\n function editCheckListItem() {\n var currentCheckListItem = $(this).data(\"checkListItem\");\n $(this).children().hide();\n $(this).children(\"input.edit\").val(currentCheckListItem.text);\n $(this).children(\"input.edit\").show();\n $(this).children(\"input.edit\").focus();\n \n }\n }", "title": "" }, { "docid": "05fed862e9ba13010813689971752435", "score": "0.5932253", "text": "function toggle_delete_cloned(chk) {\n\tREDIPS.drag.delete_cloned = chk.checked;\n}", "title": "" }, { "docid": "782f50dfac02e2ffd16268adfd8004cf", "score": "0.5929047", "text": "function renderCheckBox(widg, content) {\r\n if (widg.value == content) { widg.checked=\"checked\" }\r\n}", "title": "" }, { "docid": "f4a96e71d56d640831eb8b6508e8fa98", "score": "0.59289503", "text": "function toggleCheckBox(e,i,x) {\n\tvar pointer = listArray[i];\n\tvar taskItem = e.target.parentElement.dataset.task;\n\tvar taskUpdate = new ToDoList();\n\tif (taskItem === pointer.tasks[x]) {\t\t\t\n\t\tchangeSrc(e,x);\n\t\ttaskUpdate.saveToStorage();\n\t\ttaskUpdate.updateTask(pointer, taskItem);\n\t}\n}", "title": "" }, { "docid": "1f5c46207947e778b1fbb92c3f89a00c", "score": "0.5926135", "text": "function marcarDesmarcar(id){\n\tvar chb = document.getElementById(\"chb\"+id);\n\t\n\tif (chb.checked)\n\t\tchb.checked = false\n\telse\n\t\tchb.checked = true;\n}", "title": "" }, { "docid": "6a7a3513bd67cf20ba6378ba94565383", "score": "0.59182346", "text": "set checked(newChecked) \n {\n this._checked = newChecked;\n }", "title": "" }, { "docid": "7d6c841d5c20e9b86dc05c8e253cc979", "score": "0.5916628", "text": "doCheckbox(){\n let alert = Alert.create();\n alert.setTitle('Simple CheckBox');\n\n alert.addInput({\n type: 'checkbox',\n label: 'Read',\n checked: false\n });\n alert.addInput({\n type: 'checkbox',\n label: 'Radio',\n checked: false\n });\n alert.addButton('Cancel');\n alert.addButton({\n text: 'Ok',\n handler: data => {\n this.testRadioOpen = false;\n this.testRadioResult = data;\n }\n });\n this.nav.present(alert)\n }", "title": "" }, { "docid": "0dba6a0fa549790011f97b0b0b230cc4", "score": "0.59164006", "text": "toggleCascade() {\n this.isCascade = !this.isCascade;\n $(\"#cascade\").prop(\"checked\", this.isCascade);\n }", "title": "" }, { "docid": "0dba6a0fa549790011f97b0b0b230cc4", "score": "0.59164006", "text": "toggleCascade() {\n this.isCascade = !this.isCascade;\n $(\"#cascade\").prop(\"checked\", this.isCascade);\n }", "title": "" }, { "docid": "30f521ce7227d0d1b6bb0ce9f2def215", "score": "0.59163344", "text": "function onCheckboxChange() {\n if (!lodash.isNil(ctrl.option)) {\n if (lodash.includes(ctrl.option, 'allProjects')) {\n lodash.set(ctrl.optionList, '[0].disabled', true);\n\n if (ctrl.option.length === 1) {\n ctrl.option.unshift('singleProject');\n }\n } else {\n lodash.set(ctrl.optionList, '[0].disabled', false);\n }\n ctrl.optionList = angular.copy(ctrl.optionList);\n ctrl.option = angular.copy(ctrl.option);\n checkedItem = lodash.get(ctrl.option, [ctrl.option.length - 1]);\n } else {\n checkedItem = 'singleFunction';\n }\n }", "title": "" }, { "docid": "95275a61b31e972de78058ce5f6c5ea0", "score": "0.59153897", "text": "function onClickCheckBox() {\r\n\r\n debugger;\r\n if ($(\"#userRole-3\").prop(\"checked\") == true) {\r\n\r\n $(\"#txtSchIndustrySegment\").prop(\"disabled\", false).addClass(\"fixed-label\");\r\n\r\n } else {\r\n $(\"#txtSchIndustrySegment\").prop(\"disabled\", true).addClass(\"fixed-label\");\r\n $(\"#txtSchIndustrySegment\").val(\"No Industry Segment\")\r\n }\r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "5d1510f876e9a1d4e8686b0a05755b3c", "score": "0.590984", "text": "function chkShowHideCreatedBy(chkBox)\n{\n\n\tif (chkBox.checked)\n\t{\n\t\n\t\tj(\"#createdDiv\").show();\n\t\tj(\"#reqInfo\\\\.requestorName\").removeAttr('readonly');\n\t}\n\telse\n\t{\n\t\tj(\"#reqInfo\\\\.requestorName\").attr('readonly', 'readonly');\n\t\n\t\tj(\"#createdDiv\").hide();\n\t}\n}", "title": "" }, { "docid": "f11860e69decce6be25aeb645d7aa5c5", "score": "0.5907308", "text": "function showedit() {\n $(\".inithide\").toggle();\n }", "title": "" }, { "docid": "62bc41e7710bb5629211c9004bd4a6b3", "score": "0.5901765", "text": "_setChecked(node) {\n this._uncheckAll();\n this._checkNode(node);\n this._focusNode(node);\n }", "title": "" }, { "docid": "ec6c5fe8471699e31fc1e4902ee4276a", "score": "0.5901663", "text": "function updateCheckBox(id, connectors, constraints) {\n var enabled, connector, checked;\n var diagram = $(\"#DiagramWebControl1\").ejDiagram(\"instance\");\n enabled = connectors[0].constraints & constraints ? true : false;\n if (connectors.length == 1) $(\"#\" + id).ejCheckBox({ enabled: enabled });\n else {\n for (var i = 1; i < connectors.length; i++) {\n connector = connectors[i];\n if (diagram.getObjectType(connector) == \"connector\") {\n if ((connector.constraints & constraints ? true : false) != enabled) {\n $(\"#\" + id).ejCheckBox({ enabled: false });\n checked = true;\n break;\n }\n }\n }\n }\n if (!checked) {\n $(\"#\" + id).ejCheckBox({ enabled: true });\n $(\"#\" + id).ejCheckBox({ checked: enabled });\n }\n}", "title": "" }, { "docid": "f65a6713a143c24886619c9e90f0ccd1", "score": "0.58981895", "text": "function check_krux_control_state() {\n if ($(\"#krux-control\").prop('checked')) {\n $(\"#krux-control-group\").hide();\n } else {\n $(\"#krux-control-group\").show();\n }\n }", "title": "" }, { "docid": "d639c04b302b8fe94aad3eafb98d2b06", "score": "0.5884544", "text": "function handleCheckbox() { // Function that changes the 'isChecked' state based on the checkbox\n setIsChecked(prevState => !prevState);\n }", "title": "" }, { "docid": "071b8a286c4aed8a68fd7aba6201400b", "score": "0.5881453", "text": "function updateR_tabPlayersCheckbox()\n{\n if (r_tabPlayersElemsAreInDefaultState())\n uncheckR_tabCheckbox('Players');\n else\n checkR_tabCheckbox('Players');\n}", "title": "" }, { "docid": "3795a1b17cbc6d933c6c2a0ce7031c99", "score": "0.58806056", "text": "function TCheckBox( checkBox, phetioID ) {\n assertInstanceOf( checkBox, phet.sun.CheckBox );\n TNode.call( this, checkBox, phetioID );\n\n toEventOnEmit(\n checkBox.startedCallbacksForToggledEmitter,\n checkBox.endedCallbacksForToggledEmitter,\n 'user',\n phetioID,\n this.constructor,\n 'toggled',\n function( oldValue, newValue ) {\n return {\n oldValue: oldValue,\n newValue: newValue\n };\n } );\n }", "title": "" }, { "docid": "e3f41ff1c310e0557518a0af47c4c78b", "score": "0.5880221", "text": "function forzarUnCheck(id) {\r\n\tdocument.getElementById(id).checked = !document.getElementById(id).checked;\r\n}", "title": "" }, { "docid": "9699689cf52bb44d77dc247b6f3c01a6", "score": "0.58736277", "text": "function savePrefCheckbox(pref, idCheckbox)\n {\n prefBranch.setBoolPref(pref, document.getElementById(idCheckbox).checked);\n }", "title": "" }, { "docid": "20c2d947f93b584714d48db389b7060f", "score": "0.58694977", "text": "function onClick()\n\t{\n\t\tupdateLabel();\n\t\t\n\t\t\n\t\tif (settings.onChange!=undefined)\n\t\t{\n\t\t\tif (mCheckbox.is(\":checked\"))\n\t\t\t{\n\t\t\t\tsettings.onChange(settings.isclicked);\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsettings.onChange(settings.notclicked);\n\t\t\t}\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "10c8d16932b7056fae3c850f8811ca0a", "score": "0.5869068", "text": "function execTogglebox(toggleCheckBox){\n\t\tvar checked = $(toggleCheckBox).data('checked');\n\t\tvar unchecked = $(toggleCheckBox).data('unchecked');\n\t\tif($(toggleCheckBox).prop('checked')){\n\t\t\t$('.Wrapper-'+checked).show();\n\t\t\t$('.Wrapper-'+unchecked).hide();\n\t\t}\n\t\telse{\n\t\t\t$('.Wrapper-'+checked).hide();\n\t\t\t$('.Wrapper-'+unchecked).show();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "674b1ef241c833103a0f1fcc9288f84d", "score": "0.58682585", "text": "toggle(event) {\n this.setState({\n checkboxState: !this.state.checkboxState\n });\n }", "title": "" }, { "docid": "8d8c805607ada5c7acafe04ab3537c1d", "score": "0.5866771", "text": "function changeCheckboxer(obj){\n var dest = $('#' + obj.attr('for'));\n var cls = 'on';\n if(dest.is(':checked')){\n cls = 'off';\n }\n obj.removeClass().addClass(cls);\n return cls === 'on' ? true : false;\n}", "title": "" }, { "docid": "c3a417ccdc211bdd20f61565cb6f2efe", "score": "0.58645326", "text": "function _check(){\n var value = this.dataItemCheck.getValue();\n if(value === true) {\n this.views.root.cl('checked').add();\n } else {\n this.views.root.cl('checked').remove();\n }\n }", "title": "" }, { "docid": "5afc138ab429f8de6a4015355e07d1ee", "score": "0.58604", "text": "function checkanddisplay(chk){\r\n if (chk.checked == 1)\r\n {\r\n document.getElementById('principalComponentAnalysisForm_collapsiblediv').style.display = 'block';\r\n }\r\n else\r\n {\r\n document.getElementById('principalComponentAnalysisForm_collapsiblediv').style.display = 'none';\r\n chk.checked = 0;\r\n }\r\n }", "title": "" }, { "docid": "66cbb9e4bf8970fac148dbea6d400b3d", "score": "0.58554965", "text": "function changeKovarex(event) {\n setKovarex(event.target.checked)\n itemUpdate()\n}", "title": "" }, { "docid": "e5039c52050b5e3e5d36f85e7feb26eb", "score": "0.5852097", "text": "function checkbox() {\n if ($('.checkbox').length && $.fn.checkbox)\n $('.checkbox').checkbox({cls: 'checkbox'});\n}", "title": "" }, { "docid": "c5722bfb594b625536f36db2f00ef75d", "score": "0.5851214", "text": "handleCheckboxChange(value){\n this.setState({editPassword:!this.state.editPassword})\n }", "title": "" }, { "docid": "da8afa17063c2dadd30db383032d375f", "score": "0.5850602", "text": "function toggleCheck(event) {\n const index = event.target.getAttribute('data-id');\n todos[index].checked = !todos[index].checked;\n renderTodos(todos);\n}", "title": "" }, { "docid": "f22878bff69888e2093aa2550da97449", "score": "0.58487713", "text": "function handleAcesso() {\n var checkBox = document.getElementById(\"usuario_acesso_mondrian_permitido\");\n if (checkBox.checked == true){\n $(\"#usuario_acesso_mondrian_permitido\").prop(\"checked\", false);\n $('#acesso_mondrian').modal('toggle');\n }\n}", "title": "" }, { "docid": "706dd7185284f614ac3416e9f08f65fd", "score": "0.5847425", "text": "function checkBox(x, y) {\n let pos = getGridPos(x, y);\n let state = grid[pos.y][pos.x];\n\n grid[pos.y][pos.x] = !state;\n draw();\n}", "title": "" }, { "docid": "6a98700d3cc8b4d74676900389dc1a4a", "score": "0.58438104", "text": "function toggleCheck(index) {\n\n //console.log(STORE[index]);\n STORE.items[index].checked = !STORE.items[index].checked; \n}", "title": "" }, { "docid": "db53ad13b92e46d405ca5d014857c30c", "score": "0.58384556", "text": "checkbox() {\n // checked -> is controlled from inside this function to change images\n return (this.state.checked ? this.checkCross(selected, this.cancelAddToBasket.bind(this)) :\n this.checkCross(select, this.addToBasket.bind(this)))\n }", "title": "" }, { "docid": "7fafe9d772daa2f7ce31739364b68b9d", "score": "0.58334583", "text": "showCheckbox() {\n if (this.state.focusToDo.toDoDone) {\n return <img className=\"focusToDo-checkbox\" src='/assets/images/002-check.svg'/>;\n }\n return <img className=\"focusToDo-checkbox\" src='/assets/images/001-check-box-empty.svg'/>;\n }", "title": "" } ]
7698fbe80a78506af3b3ff55fc634666
Helper to get a typed SimpleDbStore for the target globals object store.
[ { "docid": "477b8e9a89fb9e77cbc229b76381e6ae", "score": "0.6938095", "text": "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "title": "" } ]
[ { "docid": "5715ef67b7b7fceb005e4f528066e4e4", "score": "0.727174", "text": "function globalTargetStore(txn){return SimpleDb.getStore(txn,DbTargetGlobal.store);}", "title": "" }, { "docid": "486024b6045f0f44df46430ff8fb0e24", "score": "0.69845927", "text": "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "title": "" }, { "docid": "486024b6045f0f44df46430ff8fb0e24", "score": "0.69845927", "text": "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n}", "title": "" }, { "docid": "6c4f44af5d5ca1626cabdd92b6c4a36a", "score": "0.69796723", "text": "function globalTargetStore(txn) {\n return getStore$1(txn, DbTargetGlobal.store);\n}", "title": "" }, { "docid": "4bdc11091efede5d2f3b84ccd70aa8f5", "score": "0.6975953", "text": "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "title": "" }, { "docid": "4bdc11091efede5d2f3b84ccd70aa8f5", "score": "0.6975953", "text": "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "title": "" }, { "docid": "4bdc11091efede5d2f3b84ccd70aa8f5", "score": "0.6975953", "text": "function globalTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\r\n}", "title": "" }, { "docid": "1261335938fbe0e8f03eff8426c4a7ae", "score": "0.68703926", "text": "function globalTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetGlobal.store);\n }", "title": "" }, { "docid": "5da71237712b57130bb7641344d87dd1", "score": "0.6599335", "text": "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"j\" /* DbTargetGlobal */].store);\n}", "title": "" }, { "docid": "41cc53c7bda6484a16adda96d8af4859", "score": "0.6577733", "text": "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "title": "" }, { "docid": "41cc53c7bda6484a16adda96d8af4859", "score": "0.6577733", "text": "function globalTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"f\" /* DbTargetGlobal */].store);\n}", "title": "" }, { "docid": "f2ceb3686ea6ad6a19a5c9fd1ffc6ef6", "score": "0.6383099", "text": "function getObjectStore(store_name, mode) {\n var tx = db.transaction(store_name, mode);\n return tx.objectStore(store_name);\n}", "title": "" }, { "docid": "7309edaaec010f3167eda49a460798f8", "score": "0.6354502", "text": "function documentTargetStore(txn){return SimpleDb.getStore(txn,DbTargetDocument.store);}", "title": "" }, { "docid": "1f063d693136da9b1463a574cb4cc087", "score": "0.622731", "text": "function documentTargetStore(txn) {\n return getStore$1(txn, DbTargetDocument.store);\n}", "title": "" }, { "docid": "0c13c864a45aa69ed78cbe7f3d44bc3f", "score": "0.6216286", "text": "get store() {\n\t\tif (store === null) { store = require('./stores'); }\n\t\treturn store;\n\t}", "title": "" }, { "docid": "1406d1f7068f2e7bb9208a31a214ae0b", "score": "0.6184643", "text": "function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }", "title": "" }, { "docid": "55099b56640f3baec68d61e5584699a3", "score": "0.60998887", "text": "function getStore$1(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "8f65ae85b47ad6ba7f329670560c05f4", "score": "0.60644275", "text": "static get store() {\n if (!this._store) {\n this._store = {};\n }\n return this._store;\n }", "title": "" }, { "docid": "9807c5b12a2996044d53d64029fdfb2b", "score": "0.59973043", "text": "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "6af72e3ffacdf8eac1d8b03abd6f58fe", "score": "0.5982286", "text": "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "2b4a493557dff235cc6b73dc66bc6125", "score": "0.59593374", "text": "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "title": "" }, { "docid": "2b4a493557dff235cc6b73dc66bc6125", "score": "0.59593374", "text": "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "title": "" }, { "docid": "efe623f7053f2a212c4fe7947a8024f5", "score": "0.59529495", "text": "function getStore(useLocal) {\n return useLocal ? localStorage : sessionStorage;\n }", "title": "" }, { "docid": "84e22c9328b597113577f9371a40ded7", "score": "0.5948663", "text": "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "title": "" }, { "docid": "84e22c9328b597113577f9371a40ded7", "score": "0.5948663", "text": "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "title": "" }, { "docid": "84e22c9328b597113577f9371a40ded7", "score": "0.5948663", "text": "function documentTargetStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\r\n}", "title": "" }, { "docid": "c66b67f240e9c1339db5ce3b0572052e", "score": "0.591858", "text": "function getStore(txn, store) {\n if (txn instanceof SimpleDbTransaction) {\n return txn.store(store);\n }\n else {\n return fail('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "dcaec3497df4f81e67581ed2fa032c34", "score": "0.5908976", "text": "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n}", "title": "" }, { "docid": "a6d35d9d8d32f1d84baf35891485aaef", "score": "0.59072685", "text": "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "a6d35d9d8d32f1d84baf35891485aaef", "score": "0.59072685", "text": "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_9__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "e29bd29b8836ce5255f246fc2ec2871d", "score": "0.59038854", "text": "function remoteDocumentsStore(txn){return SimpleDb.getStore(txn,DbRemoteDocument.store);}", "title": "" }, { "docid": "69dce5f2b387dd28020eedb807d1f5c1", "score": "0.5900813", "text": "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "69dce5f2b387dd28020eedb807d1f5c1", "score": "0.5900813", "text": "function getStore(txn, store) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_7__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "88dba66ff23292f20e99b0ace094740e", "score": "0.58843976", "text": "function targetsStore(txn) {\n return getStore$1(txn, DbTarget.store);\n}", "title": "" }, { "docid": "93429165099b672ea8387c322e2c61f4", "score": "0.58802396", "text": "static get store() {\n\t\tif(!Profile.__store) {\n\t\t\tProfile.__store = new Database(\"profiles\");\n\t\t}\n\t\treturn Profile.__store;\n\t}", "title": "" }, { "docid": "39d8f3e20f2ca4bd97af9ec007f9f910", "score": "0.5860735", "text": "function getStores() {\n return [MainStore];\n}", "title": "" }, { "docid": "b4f442ced73305c5d42f3e6d077edb30", "score": "0.5831303", "text": "function documentTargetStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTargetDocument.store);\n }", "title": "" }, { "docid": "4ad5726f4980ea505175c98027b61824", "score": "0.5830202", "text": "function targetsStore(txn){return SimpleDb.getStore(txn,DbTarget.store);}", "title": "" }, { "docid": "1d731b9b8a346fc0b1df4ccea8cadf66", "score": "0.57260436", "text": "function getCategorieStoreSingleton(){\n return Ext.StoreMgr.lookup('categorieStore') || Ext.create('BM.store.CategorieStore');\n}", "title": "" }, { "docid": "1cfd028df2ba50bd870be8e91d5d6216", "score": "0.5716216", "text": "function getStoreIndexedDB (openDB, objectStore, indexName) {\r\n let db = {};\r\n db.result = openDB.result;\r\n db.tx = db.result.transaction(objectStore, \"readwrite\");\r\n db.store = db.tx.objectStore(objectStore);\r\n //db.index = db.store.index(indexName);\r\n\r\n return db;\r\n}", "title": "" }, { "docid": "0359841d6413e136b0f5c42450b7fb19", "score": "0.5713047", "text": "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "title": "" }, { "docid": "0359841d6413e136b0f5c42450b7fb19", "score": "0.5713047", "text": "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTargetDocument */].store);\n}", "title": "" }, { "docid": "c2337fd3a975d4857e7676c846e9565b", "score": "0.56497294", "text": "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "title": "" }, { "docid": "c2337fd3a975d4857e7676c846e9565b", "score": "0.56497294", "text": "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "title": "" }, { "docid": "c015ae54e5870e3ffcca38360d389c92", "score": "0.5648844", "text": "function documentTargetStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"i\" /* DbTargetDocument */].store);\n}", "title": "" }, { "docid": "3d5c9d58ab329cc8be411201e64c2495", "score": "0.5628073", "text": "function mutationQueuesStore(txn) {\n return getStore(txn, DbMutationQueue.store);\n}", "title": "" }, { "docid": "6f11a749c81aeedaa75caaf1599f4bb2", "score": "0.5616822", "text": "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "title": "" }, { "docid": "6f11a749c81aeedaa75caaf1599f4bb2", "score": "0.5616822", "text": "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "title": "" }, { "docid": "6f11a749c81aeedaa75caaf1599f4bb2", "score": "0.5616822", "text": "function targetsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\r\n}", "title": "" }, { "docid": "6e6ffcffe8b7797020a16193ad5d104f", "score": "0.5616551", "text": "static get projectStores() {\n return {\n calendarManagerStore : {},\n\n resourceStore : {\n dataName : 'resources'\n },\n\n eventStore : {\n dataName : 'events'\n },\n\n dependencyStore : {\n dataName : 'dependencies'\n },\n\n assignmentStore : {\n dataName : 'assignments'\n }\n };\n }", "title": "" }, { "docid": "d5cc491f1231fb29bdaa7a6c24c38fec", "score": "0.5611519", "text": "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n}", "title": "" }, { "docid": "89ee943ee65ecf3e0ef40c296ccf2d6f", "score": "0.5603634", "text": "function getStore() {\r\n if (!store){\r\n store = new FileStore(fileStoreOptions);\r\n } \r\n return store;\r\n}", "title": "" }, { "docid": "93352bdafb45ed5392d2452193737d10", "score": "0.56008875", "text": "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "title": "" }, { "docid": "93352bdafb45ed5392d2452193737d10", "score": "0.56008875", "text": "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "title": "" }, { "docid": "93352bdafb45ed5392d2452193737d10", "score": "0.56008875", "text": "function remoteDocumentsStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\r\n}", "title": "" }, { "docid": "942d1f349ecb952882754954cb1b0017", "score": "0.55777156", "text": "function mutationQueuesStore(txn){return SimpleDb.getStore(txn,DbMutationQueue.store);}", "title": "" }, { "docid": "20edfc30127a097e8bf9b653cb7c344e", "score": "0.5575083", "text": "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "title": "" }, { "docid": "20edfc30127a097e8bf9b653cb7c344e", "score": "0.5575083", "text": "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "title": "" }, { "docid": "1d09021f8ca05c0de686ebcff589529b", "score": "0.5557641", "text": "function createObjectStore(database) {\n var objectStore = database.createObjectStore(window.GLOBALS.OBJECT_STORE_NAME, {\n autoIncrement: false,\n keyPath: 'id'\n });\n }", "title": "" }, { "docid": "481ffd2e054bfadffbecd0da87e704e7", "score": "0.5541964", "text": "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"g\" /* DbRemoteDocument */].store);\n }\n else {\n return Object(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "828b65f547cec2a86fe9a60bcf1c832d", "score": "0.55389345", "text": "function targetsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbTarget.store);\n }", "title": "" }, { "docid": "dd7562d32a5756fc2084c8016b1c0bfe", "score": "0.55221254", "text": "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n}", "title": "" }, { "docid": "6400c2a40e7c401962fda2746ea8dcd2", "score": "0.5517935", "text": "getUserStore(name){\n var users = Object.keys(this.store);\n\n // if this user doesn't have a store,\n // create one\n if(users.indexOf(name) === -1){\n this.store[name] = {};\n }\n\n return this.store[name];\n }", "title": "" }, { "docid": "b1a99c435f114620aa2071305d967336", "score": "0.5454915", "text": "static makeStore(settings){\n var initialSettings = _.assign({\n jwt: \"jwt_token\",\n csrf: \"csrf_token\",\n apiUrl: \"http://www.example.com\"\n }, settings);\n \n return configureStore({\n settings: Immutable.fromJS(initialSettings)\n });\n }", "title": "" }, { "docid": "97f099937df9e88f36f638d6e4797a74", "score": "0.5453443", "text": "function remoteDocumentsStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocument.store);\n }", "title": "" }, { "docid": "3563e4b118e5a250ea87f903cc697a9b", "score": "0.5428881", "text": "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "title": "" }, { "docid": "3563e4b118e5a250ea87f903cc697a9b", "score": "0.5428881", "text": "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "title": "" }, { "docid": "3563e4b118e5a250ea87f903cc697a9b", "score": "0.5428881", "text": "function mutationQueuesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\r\n}", "title": "" }, { "docid": "5f24de403a8e3fc3cf2631de27b142d3", "score": "0.54162264", "text": "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "title": "" }, { "docid": "5f24de403a8e3fc3cf2631de27b142d3", "score": "0.54162264", "text": "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "title": "" }, { "docid": "95ccc929f4eab966d578714a3199458d", "score": "0.53986514", "text": "static getDb (): any {\n return getDbInstance()\n }", "title": "" }, { "docid": "c9378ec47edec63f16da0f3643293b77", "score": "0.5377368", "text": "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n }", "title": "" }, { "docid": "83408732af00c1688357d23c2458e97a", "score": "0.5365176", "text": "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "83408732af00c1688357d23c2458e97a", "score": "0.5365176", "text": "function remoteDocumentsStore(txn) {\n if (txn instanceof __WEBPACK_IMPORTED_MODULE_4__simple_db__[\"b\" /* SimpleDbTransaction */]) {\n return txn.store(__WEBPACK_IMPORTED_MODULE_3__indexeddb_schema__[\"e\" /* DbRemoteDocument */].store);\n }\n else {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_assert__[\"b\" /* fail */])('Invalid transaction object provided!');\n }\n}", "title": "" }, { "docid": "bd18e55a49f24c957553976e10b73f01", "score": "0.53581107", "text": "function mutationQueuesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbMutationQueue.store);\n}", "title": "" }, { "docid": "c1d4698159c06306c82745dd761526f3", "score": "0.5357596", "text": "function createStore(options) {\n return new _Store.Store(options);\n}", "title": "" }, { "docid": "b57d527399a79f855ccdc90861d7588e", "score": "0.5356685", "text": "function initDB(){\n const db = new Localbase(\"TracerDB\");\n return db\n}", "title": "" }, { "docid": "8782e0f1d7f6dd87e5779f0808f4f386", "score": "0.53463554", "text": "function DbDummy() {\n var dbStore = {};\n this.get = function(storeName, dbId) {\n return nl.q(function(resolve, reject) {\n var key = nl.fmt2('{}.{}', storeName, dbId);\n if (!(key in dbStore)) {\n resolve(undefined);\n return;\n }\n resolve(dbStore[key]);\n });\n };\n\n this.put = function(storeName, value, dbId) {\n return nl.q(function(resolve, reject) {\n var key = nl.fmt2('{}.{}', storeName, dbId);\n dbStore[key] = value;\n resolve(true);\n });\n };\n\n this.clear = function() {\n return nl.q(function(resolve, reject) {\n dbStore = {};\n resolve(true);\n });\n };\n }", "title": "" }, { "docid": "4da996cd5b9ffd99e8347c0e6947ef91", "score": "0.53433865", "text": "function db_wrapper(idb) {\n\t\tObject.defineProperty(this, \"_db\", {\n\t\t\tconfigurable: false,\n\t\t\tenumerable: false,\n\t\t\twritable: false,\n\t\t\tvalue: idb,\n\t\t});\n\n\t\tstores.forEach(function (store) {\n\t\t\tObject.defineProperty(this, store, {\n\t\t\t\tconfigurable: false,\n\t\t\t\tenumerable: true,\n\t\t\t\twritable: false,\n\t\t\t\tvalue: new store_wrapper(store, idb),\n\t\t\t});\n\t\t}, this);\n\t}", "title": "" }, { "docid": "7393554621d8e3ec0a41896e27353d8d", "score": "0.53274506", "text": "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"h\" /* DbTarget */].store);\n}", "title": "" }, { "docid": "e54f8f114f6853bfe0c4e1052d5d4411", "score": "0.5319147", "text": "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "title": "" }, { "docid": "e54f8f114f6853bfe0c4e1052d5d4411", "score": "0.5319147", "text": "function targetsStore(txn) {\n return getStore(txn, __WEBPACK_IMPORTED_MODULE_7__indexeddb_schema__[\"g\" /* DbTarget */].store);\n}", "title": "" }, { "docid": "d1351c4c7ff3b7a43eccd937a704008e", "score": "0.52834266", "text": "function setStore(store) {\n var mock = new Mock(store);\n\n Storage.__Rewire__('Connection', mock);\n\n return mock;\n}", "title": "" }, { "docid": "98db2b5049db6df34ce6e1f39ff0a1a0", "score": "0.5272164", "text": "createObjectStore(storeSchema, migrationFactory) {\n const storeSchemas = [storeSchema];\n CreateObjectStore(this.indexedDB, this.dbConfig.name, this.dbConfig.version, storeSchemas, migrationFactory);\n }", "title": "" }, { "docid": "dd26fd67607ff83f4ede743796aa0518", "score": "0.5264217", "text": "static getStores(props) {\n return [HeaderStore, UserStore]\n }", "title": "" }, { "docid": "12c147c1a09181599209ac8fd44e8960", "score": "0.5263171", "text": "function mutationsStore(txn){return SimpleDb.getStore(txn,DbMutationBatch.store);}", "title": "" }, { "docid": "4c3e8c096af618e2d422c2aa519ccd9e", "score": "0.5255052", "text": "static getStoredObjectById(dbService, storename, id) {\n const store = getStore(storename)(dbService);\n return store.get(id);\n }", "title": "" }, { "docid": "3b4d9527ac70f24792e0757624a88b7a", "score": "0.5248182", "text": "function documentMutationsStore(txn){return SimpleDb.getStore(txn,DbDocumentMutation.store);}", "title": "" }, { "docid": "01259e0fa5b79b81056f5034b36d97f0", "score": "0.52368164", "text": "function getIdb() {\n if (!idb) {\n idb = new IndexDBWrapper('key-value-store', 1, function(db) {\n db.createObjectStore(KEY_VALUE_STORE_NAME);\n });\n }\n return idb;\n}", "title": "" }, { "docid": "01259e0fa5b79b81056f5034b36d97f0", "score": "0.52368164", "text": "function getIdb() {\n if (!idb) {\n idb = new IndexDBWrapper('key-value-store', 1, function(db) {\n db.createObjectStore(KEY_VALUE_STORE_NAME);\n });\n }\n return idb;\n}", "title": "" }, { "docid": "22771b94822f9fb17d429a88d769f115", "score": "0.5222349", "text": "function documentChangesStore(txn) {\r\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\r\n}", "title": "" }, { "docid": "157bd42a569a6eb62632a5aa56b6d3cb", "score": "0.520802", "text": "function getStore() {\n return LocalDBManager.getStore('wavemaker', 'offlineChangeLog');\n }", "title": "" }, { "docid": "6df2ea783be08b61b9b602b421e75e33", "score": "0.519771", "text": "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "title": "" }, { "docid": "6df2ea783be08b61b9b602b421e75e33", "score": "0.519771", "text": "function getMetadataStore() {\n\n var metadataStore = metadata.createMetadataStore();\n\n // convenience method for registering model types with the store\n // these model types contain extensions to the type definitions from metadata.js\n var registerType = metadataStore.registerEntityTypeCtor.bind(metadataStore);\n\n registerType('User', UserModelService.model);\n\n return metadataStore;\n \n }", "title": "" }, { "docid": "d592b55d236a0b0dcea574e445facca7", "score": "0.519126", "text": "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "title": "" }, { "docid": "d592b55d236a0b0dcea574e445facca7", "score": "0.519126", "text": "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "title": "" }, { "docid": "3dd6c8d6426bc743aae4ae1eb44f6658", "score": "0.5189205", "text": "static get projectStores() {\n return {\n resourceStore: {\n dataName: 'resources'\n },\n eventStore: {\n dataName: 'events',\n listeners: {\n change: 'onInternalEventStoreChange',\n clearchanges: 'onEventClearChanges',\n beforecommit: 'onEventBeforeCommit',\n commit: 'onEventCommit',\n exception: 'onEventException',\n idchange: 'onEventIdChange',\n beforeLoad: 'applyStartEndParameters'\n }\n },\n assignmentStore: {\n dataName: 'assignments',\n listeners: {\n change: 'onAssignmentChange',\n // In EventSelection.js\n beforeRemove: {\n fn: 'onAssignmentBeforeRemove',\n // We must go last in case an app vetoes a remove\n // by returning false from a handler.\n prio: -1000\n }\n }\n },\n dependencyStore: {\n dataName: 'dependencies'\n },\n calendarManagerStore: {}\n };\n }", "title": "" }, { "docid": "a4f1430274ea8800a310bd82de9f8561", "score": "0.5188352", "text": "function Store () {\n return sessionStorage;\n}", "title": "" }, { "docid": "3966c50dabfede26d450e5e57cc4f307", "score": "0.51585007", "text": "function getDb() {\n return db;\n }", "title": "" }, { "docid": "c5431825bb6995dd767777e4f42781b6", "score": "0.51534957", "text": "function documentChangesStore(txn) {\n return IndexedDbPersistence.getStore(txn, DbRemoteDocumentChanges.store);\n}", "title": "" } ]
77423676cbd77c59fa4218929383dcf9
Message sent in by the application messaging service May appear this is not going to the message bus, however it is... workers can not send directly to the bus, only master may
[ { "docid": "64448eb4dc7322df80345c24655e6bdc", "score": "0.0", "text": "function publish(route, messageBody) {\n var message = buildMessage('comm', route, messageBody, process.pid);\n emitToNonOriginChildProcesses(message);\n }", "title": "" } ]
[ { "docid": "794ffe1e72647e5756fcbe50a695978b", "score": "0.69968843", "text": "onMessage_(msg) {\n const name = msg.name;\n if (name === INTERNAL_REQUEST_MESSAGE) {\n const payload = msg.payload;\n const result = this.invokeMessageCallbacks_(payload);\n this.send({\n name: INTERNAL_REPLY_MESSAGE,\n requestId: msg.requestId,\n result: result,\n });\n } else if (name === INTERNAL_REPLY_MESSAGE) {\n const callback = this.internalRequestCallbacks_[msg.requestId];\n delete this.internalRequestCallbacks_[msg.requestId];\n if (callback) {\n callback(msg.result);\n }\n } else {\n this.invokeMessageCallbacks_(msg);\n }\n }", "title": "" }, { "docid": "b7743c021a9ae4de94319ad00c44cc8e", "score": "0.69544125", "text": "send(event, message) {\n\t\t// Don't send messages if shutting down\n\t\tif (this.terminating !== false) return;\n\n\t\tif (typeof this.intf[message.bus] === 'undefined') return;\n\t\tif (this.intf[message.bus] === null) return;\n\n\t\tif (event !== 'bus-tx') return;\n\n\t\t// log.lib(event + ' message sent to ' + message.bus + ' (' + message.bus + ')');\n\n\t\t// Send message over socket\n\t\tthis.intf[message.bus].sendMessage({\n\t\t\tintf : status.system.intf,\n\t\t\tevent,\n\t\t\tdata : message,\n\t\t});\n\t}", "title": "" }, { "docid": "0db2ee386fb7823125b3396fa3799db2", "score": "0.6808139", "text": "function handleMessage(message ) {\n message.id = uuid()\n message.type = 'incomingMessage' //not sure if this should be a string **** \n wss.broadcast(JSON.stringify(message))\n}", "title": "" }, { "docid": "270e9a14936908be107b165a7d5ec452", "score": "0.6792823", "text": "send(data) {\n var msg = {\n from: this.clientId,\n to: this.serverId\n }\n if (data) {\n msg.data = data\n }\n this.messageQueue.pushMessage(msg)\n }", "title": "" }, { "docid": "ba523879741daa2f298552ed2705b0d8", "score": "0.67611635", "text": "sendMessage(application, message) {\n if (this.webSocketServer !== null) {\n this.webSocketServer.write(message);\n }\n }", "title": "" }, { "docid": "23c19f93e08b614492a272bd3b7a6f51", "score": "0.676035", "text": "function sendMessage() {\n sentMessageCount++;\n var message = new Message(JSON.stringify({ deviceId: deviceId, messageId: sentMessageCount }));\n console.log(\"[Device] Sending message #\" + sentMessageCount + \": \" + message.getData());\n client.sendEvent(message, sendMessageCallback);\n}", "title": "" }, { "docid": "b98978a5f738fa8ea6719908b1d8696e", "score": "0.6744303", "text": "message() {\n this.messenger.message.apply(this.messenger, arguments);\n }", "title": "" }, { "docid": "801a25044f6f5ce68c6043cf12535bbb", "score": "0.67392117", "text": "function onSend(newMessage = []) {\n console.log(\"new msg is: \", newMessage);\n console.log(\"group id in route is\", route.params.groupId);\n\n socket.emit(\"groupMessage\", {\n message: newMessage,\n to: route.params.groupId,\n userId: currentUserId,\n });\n // sendPushNotification({\n // to: notification_token,\n // sound: \"default\",\n // title: name,\n // body: newMessage[0].text,\n // data: JSON.stringify({ conversationId: conversationId }),\n // });\n //ExponentPushToken[lcJiMgKNBF7UzclZK_vmhA]\n //ExponentPushToken[2YVMhZN4c9yDuaAC3ihPG1]\n // newMessage[0].conversation_id = route.params.conversationId;\n // socket.emit(\n // \"messages\",\n // {\n // message: newMessage,\n // to: contact.contactId,\n // },\n // function (confirmation) {\n // // send data\n // // know we got it once the server calls this callback\n // // note -in this ex we dont need to send back any data\n // // - could just have called fn() at server side\n // console.log(\"callback called\", confirmation);\n // if (confirmation.msg_saved) {\n // sendMessage(newMessage);\n // }\n // }\n // );\n }", "title": "" }, { "docid": "75e883f760d7dd6f41a39d3d6733542a", "score": "0.6729454", "text": "handleMessage(event){\n //Message is coming in event.detail.payload\n this.payload = this.payload + JSON.stringify(event.detail.payload);\n }", "title": "" }, { "docid": "fd240443ca0d53768bc1926c7923ef91", "score": "0.6721963", "text": "function broadcast(msg) {\n\n }", "title": "" }, { "docid": "a47b2ae160298bfbb0d3f0dd229794c6", "score": "0.6693414", "text": "function sendMessage(message) {\n\t\tconsole.log(message);\n\t drone.publish({\n\t\troom: roomName,\n\t\tmessage\n\t });\n\t}", "title": "" }, { "docid": "25b5b26043616b3db0084ba1d21270d2", "score": "0.66657364", "text": "function sendMessage(message) {\n console.log(\"sending message: \", message);\n drone.publish({\n room: roomName,\n message\n });\n}", "title": "" }, { "docid": "74242cd4b34d8d3ae3e19754a9bf19d7", "score": "0.66520125", "text": "function sendMessage() {\n var currentMessage = new Message();\n currentMessage.author = getSession().userName;\n currentMessage.body = uiConfig.messageInput.value;\n socket.emit('chat', currentMessage);\n }", "title": "" }, { "docid": "dd8284f92f60658e1e872738a10ecb1e", "score": "0.6647546", "text": "onMessage (message) {\n this.emit('message', message);\n }", "title": "" }, { "docid": "2eef12ecd4b918e7d08c220c9876c664", "score": "0.66441256", "text": "handleMessage(e) {\n const { recipient, data } = e.data;\n switch (recipient) {\n case 'broadcast-worker':\n this.inbox(data);\n break;\n case 'broadcaster':\n // @ts-ignore\n self.postMessage(e.data);\n break;\n default:\n this.lookup(e.data);\n break;\n }\n }", "title": "" }, { "docid": "603649104a42c0fc30a7b307f5ab46ea", "score": "0.6637315", "text": "function sendMessage() {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({\n username: payload.username,\n message: message\n });\n var subStr = message.toString();\n if (subStr.indexOf(\"@marcob\") > -1) {\n console.log(\"Real: \", subStr);\n show(payload.username, message);\n }\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', { \n\t message: message,\n\t\troom: currentChannel\n\t });\n }\n }", "title": "" }, { "docid": "192da52fcbc84ec64543358504655daa", "score": "0.6636855", "text": "_onMessage(msg) {\n if (msg.scope === this.scope) {\n this.emit('message', msg);\n } else if (msg.scope !== '_internal') {\n console.info('Message ignored. Not sent in hub scope', msg);\n }\n }", "title": "" }, { "docid": "05bacba54fc84052f04074f96586f915", "score": "0.6633275", "text": "function sendMessage(message) {\r\n drone.publish({\r\n room: roomName,\r\n message\r\n });\r\n}", "title": "" }, { "docid": "6f2af69d282eae84210036f0123fef3c", "score": "0.663189", "text": "function OnMessage(message) {\r\n if (message === null) {\r\n return;\r\n }\r\n\r\n const msg = {\r\n \"payload\": message.data, // Save the payload data at msg.payload\r\n \"message\": message // Save the original message at msg.message\r\n };\r\n\r\n // If the configuration property asked for JSON, then convert to an object.\r\n if (config.assumeJSON === true) {\r\n msg.payload = JSON.parse(RED.util.ensureString(message.data));\r\n }\r\n\r\n node.send(msg);\r\n message.ack();\r\n } // OnMessage", "title": "" }, { "docid": "3872ddfe70acb526c5c0d0397a9de19d", "score": "0.6629646", "text": "sendMessage (e){\n e.preventDefault();\n\n\n //if message is true, then emit listener in backend with key message \"sendMessage\" and distribute the message to that room including the user that sent the message itself\n if (this.state.message) {\n socket.emit('sendMessage', {name:this.state.name, message: this.state.message} , () => {\n })\n this.setState({message: ''})\n }\n }", "title": "" }, { "docid": "967b540b9145407bbfed6cabd0d086aa", "score": "0.6617467", "text": "function sendMessage() {\n\t\tvar message = $inputMessage.val();\n\t\t// Prevent markup from being injected into the message\n\t\tmessage = cleanInput(message);\n\t\t// if there is a non-empty message and a socket connection\n\t\tif (message && connected) {\n\t\t\t$inputMessage.val('');\n\t\t\t// tell server to execute 'new message' and send along one parameter\n\t\t\tg_socket.emit('new message', message);\n\t\t}\n\t}", "title": "" }, { "docid": "fa6f9d2348efb0be910c0cec4d16bd59", "score": "0.6592416", "text": "onSend(messages=[]) {\n // console.warn(messages[0]);\n messages[0].sender = this.props.navigation.state.params.user.netid;\n messages[0].destinations = this.props.navigation.state.params.chat.participants;\n // console.warn(\"destination: \" + this.props.navigation.state.params.chat.participants);\n this.socket.emit('private-message', messages[0], this.props.navigation.state.params.user);\n this._storeMessages(messages);\n }", "title": "" }, { "docid": "9581ca4fd32fa83b96c3e04d8460129b", "score": "0.6574447", "text": "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "title": "" }, { "docid": "f15943de94b8bd7fadfa52aeac23a283", "score": "0.6563424", "text": "function sendMsg() {\n \t\t$$invalidate(1, isTyping = false);\n\n \t\t// check for valid input and trim white space\n \t\t$$invalidate(2, message = message.trim());\n\n \t\tif (message === \"\") {\n \t\t\treturn;\n \t\t}\n\n \t\t/**\r\n * information about the message\r\n * @param {string} text - the text message\r\n * @param {string} name - the username of who sent the message\r\n * @param {boolean} received - lets css know which side of the panel to display it on;\r\n * true = left side; otherwise right side\r\n */\n \t\tlet messageData = { text: message, name, received: false };\n\n \t\t// messages = [{text: 'hi', name: 'name', received: false}, {text: 'hi', name: 'name', received: false}]\n \t\tlet messageString = `${name}: ${message}`;\n\n \t\t$$invalidate(0, messages = messages.concat(messageData));\n\n \t\t// let the backend know a message has been sent\n \t\tsocket.emit(\"message\", messageString);\n\n \t\t// data object being sent to the backend\n \t\tlet data = { name, text: message };\n\n \t\t// headers parameters for POST request\n \t\tconst headers = { \"Content-type\": \"application/json\" };\n\n \t\t// send to backend to store in database message history\n \t\taxios.post(\"http://localhost:8080/sendMessage\", data, { headers }).then(response => {\n \t\t\tconsole.log(response);\n \t\t});\n\n \t\t// clear\n \t\t$$invalidate(2, message = \"\");\n\n \t\tscrollToBottom();\n \t}", "title": "" }, { "docid": "66d3b93c19bec19fa9f019cf5c6110be", "score": "0.6561342", "text": "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "title": "" }, { "docid": "66d3b93c19bec19fa9f019cf5c6110be", "score": "0.6561342", "text": "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "title": "" }, { "docid": "2c07fb02bdf61d3fcd4782875f5f3aef", "score": "0.6560657", "text": "function chatMessageSent (data) {\n if (data.msg) {\n socket.broadcast.to(currentRoomId).emit(\"CHAT_MESSAGE_RECEIVED\", {\n sender: currentPlayerId,\n msg: data.msg\n });\n }\n }", "title": "" }, { "docid": "eb3271f19138343ba832fcdbb9ef462c", "score": "0.6554814", "text": "function emitToAmqp(message) {\n _.assign(message, {serverId: _serverId});\n _.assign(message, {originalSenderProcessId: null});\n if (_amqpService) {\n console.log('going out to amqp');\n _amqpService.sendMessage(message);\n } else {\n console.info('Amqp not connected');\n }\n }", "title": "" }, { "docid": "1553306ba75a9a0f24253b517b484f52", "score": "0.65525556", "text": "function handleMessageSend(e) {\n e.preventDefault();\n if(msgInput) {\n setMessages([...messages, {msg:msgInput, username: userName ? \"me\" : \"me (as Anonymous)\", isMe: true}]);\n socket.emit('chat message', {msg: msgInput, username: userName}, (data) => console.log(\"Server response: \", data))\n setMessageInput(\"\");\n }\n }", "title": "" }, { "docid": "064692e7df40e6b5637747229db79728", "score": "0.65422857", "text": "function OnMessage(message) {\n if (message === null) {\n return;\n }\n\n const msg = {\n \"payload\": message.data, // Save the payload data at msg.payload\n \"message\": { // Save parts of the original message at msg.message. We can't save the whole message as it is not serializable.\n 'ackId': message.ackId,\n 'attributes': message.attributes,\n 'id': message.id,\n 'orderingKey': message.orderingKey,\n 'publishTime': message.publishTime, //modified publishedTime to publishTime\n 'received': message.received\n }\n };\n\n // If the configuration property asked for JSON, then convert to an object.\n if (config.assumeJSON === true) {\n try {\n msg.payload = JSON.parse(RED.util.ensureString(message.data));\n }\n catch(err) {\n // We failed to parse the data ... log an error.\n node.error(`Failed to parse JSON: ${err}`);\n }\n }\n\n node.send(msg);\n message.ack();\n } // OnMessage", "title": "" }, { "docid": "ee8aca59c1e2f0df48b3ff70c58e93c6", "score": "0.65402395", "text": "onSend(messages=[]) {\n // alert(JSON.stringify(messages))\n this.socket.emit('message', messages[0]);\n this._storeMessages(messages);\n }", "title": "" }, { "docid": "28900e877bb7e8886f586df46731ae6e", "score": "0.65370435", "text": "function sendMessage(message) {\n stompClient.send(\"/app/messages\", {}, message);\n}", "title": "" }, { "docid": "fff83255d68b2663c422fcfabdbdd354", "score": "0.6519315", "text": "function onWorkerBroadcast(msg) {\n // function d(str) { console.log(`dispatch: ${str}`)}\n\n d(`onWorkerBroadcast(): msg=${JSON.stringify(msg)}`);\n\n const sender_worker_id = msg.worker_id;\n\n if (mWorkers) {\n for (let pid in mWorkers) {\n const worker = mWorkers[pid];\n\n if(worker && worker.child && msg.message && worker.worker_id !== sender_worker_id) {\n d(`send to ${worker.worker_id}`);\n worker.child.send({id: \"gcs_msg\", msg: { worker_id: worker.worker_id, message: msg.message}});\n }\n }\n }\n }", "title": "" }, { "docid": "4050e4a98d64f2973d060f62ec81b308", "score": "0.6510432", "text": "sendMessage(event) {\n let msgObject,\n msg = this.userMsgRef.value,\n {activeChat, nickname, updateMessageList} = this.props;\n\n msgObject = {\n 'recipient': activeChat.chatId,\n 'sender': nickname,\n 'message': msg\n };\n\n if((event.type === 'click' || event.which === 13) && msg.length !== 0) {\n updateMessageList(activeChat.chatId, {'you': msg});\n this.socket.emit('clientMessage',msgObject);\n this.userMsgRef.value = '';\n }\n }", "title": "" }, { "docid": "9bd4db89dfa27a97612f7e2c9478cc26", "score": "0.65079087", "text": "_onMessage(message) {\r\n const _this = this;\r\n this.emit('messageReceived', message);\r\n // logger.info('%o', message);\r\n\r\n const queuedMessages = [\r\n 'config', 'query', 'command', 'status', 'shortPoll', 'longPoll',\r\n ];\r\n\r\n delete message.node; // Ignore the node property. We no longer need it.\r\n\r\n Object.keys(message).forEach(function(messageKey) {\r\n const messageContent = message[messageKey];\r\n switch (messageKey) {\r\n case 'result':\r\n _this._onResult(messageContent);\r\n break;\r\n\r\n case 'stop':\r\n logger.warn('Received stop message');\r\n _this._shuttingDown = true;\r\n _this.emit('stop');\r\n break;\r\n\r\n case 'delete':\r\n logger.warn('Received delete message');\r\n _this._shuttingDown = true;\r\n _this.emit('delete');\r\n break;\r\n\r\n default:\r\n if (queuedMessages.includes(messageKey)) {\r\n // The other messages are queued to be run sequentially by\r\n // this._onMessageQueued\r\n _this._queue.add({\r\n // We set it here to facilitate routing to the proper function\r\n messageKey: messageKey,\r\n messageContent: messageContent,\r\n });\r\n } else {\r\n logger.error('Invalid message %s received %o:',\r\n messageKey, message);\r\n }\r\n }\r\n });\r\n }", "title": "" }, { "docid": "d5d1ca3924de803e1fe760dad62e742d", "score": "0.6502033", "text": "broadcastMessage(content) {\n members.forEach(m => m.emit('message', {rid ,content}));\n this.addMessage(content);\n }", "title": "" }, { "docid": "322e574258c6d33883ce0a2256d7bc8f", "score": "0.65005076", "text": "sendMessage(){\r\n this.socket.emit('new-message', \r\n {\r\n message: this.state.message,\r\n sender_id:this.context.user_id,\r\n receiver_id: this.context.current_walk_paired_user_id,\r\n time: new Date().toLocaleTimeString(),\r\n });\r\n this.setState({message:''})\r\n }", "title": "" }, { "docid": "8ed446fcfb4b05b2b6f811372021fde0", "score": "0.64872575", "text": "#onMessage(worker, msg) {\n if (msg.type === null) {\n this.#onSystemMessage(worker, msg);\n } else if (msg.type === undefined) {\n this.emit(\"message\", worker, msg);\n } else {\n this.emit(\"message-\" + msg.type, worker, msg.message);\n }\n }", "title": "" }, { "docid": "21ed9a3d20739b59d3435af0dea5f8d2", "score": "0.6480914", "text": "function receivedMessage(event) {\n console.log(\"Correctly received Message\");\n console.log(JSON.stringify(event));\n }", "title": "" }, { "docid": "64eacf6590a5ed6523f8fef267c844d0", "score": "0.64804983", "text": "function sendMessage(){\n // send message to the server\n let message = {id: Math.ceil(Math.random(10) * 1000000), text: curr_message, author: name, room_id: room_id, count: 0}\n socket.emit('message', message)\n setCurr_Message(\"\")\n }", "title": "" }, { "docid": "dc5a816d377ed342e8007ec81c7faadf", "score": "0.6477669", "text": "function sendMessage() {\n changeLight();\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": "2bc71560119acd1a14c0d7cca490fe12", "score": "0.6473653", "text": "function sendMessage() {\n\t\tvar message = $inputMessage.val();\n\n\t\t// Prevent markup from being injected into the message\n\t\tmessage = cleanInput(message);\n\t\tif (message && connected) {\n\t\t\t// console.log(message);\n\t\t\t$inputMessage.val('');\n\t\t\taddChatMessage({\n\t\t\t\tnick: nick,\n\t\t\t\tmessage: message\n\t\t\t});\n\t\t\tdata = {nick: nick, message: message};\n\t\t\t// tell server to execute 'new message' and send along one parameter\n\t\t\tsocket.emit('new message', data);\n\t\t}\n\t}", "title": "" }, { "docid": "fb8fa92b90393a548353cf8b5e808127", "score": "0.64700896", "text": "function handleMessage(message) {\n socket.to(message.room).emit('message', message)\n }", "title": "" }, { "docid": "97991d713920b81f3b0b38a74e55c8f3", "score": "0.6464341", "text": "queueMessage(message) {\n this.outboundMessages.push(message);\n }", "title": "" }, { "docid": "aad48011788dfd43a4a73e145b621833", "score": "0.6459884", "text": "processMessage(msg) {\n super.processMessage(msg);\n\n this._view.processPhosphorMessage(msg);\n }", "title": "" }, { "docid": "a74e0e3dd1e527009df2250713465e61", "score": "0.6459203", "text": "onMessageBoxSubmit(event){\n const{myHandle, myMessage, } = this.state;\n const{room, user} = this.props;\n\n if(myMessage.length !== 0 && myHandle.length !== 0)\n {\n this.chatSocket.emit('message', {\n roomid: room.id,\n text: myMessage,\n handle: user.name + '@' + myHandle\n });\n this.setState({myMessage: \"\"});\n }\n \n event.preventDefault();\n }", "title": "" }, { "docid": "30f190081d5845718f5784e62e46e1af", "score": "0.64533", "text": "sendMessage(from, message) {}", "title": "" }, { "docid": "8dbf5ce109dc0044b731913358dec6a0", "score": "0.64530534", "text": "_sendMessage(message, retain = false) {\r\n // We need to add the node to the message (string)\r\n message.node = '' + this._profileNum;\r\n\r\n this.emit('messageSent', message);\r\n\r\n this._mqttClient.publish(\r\n this._mqttTopic,\r\n JSON.stringify(message),\r\n {retain: retain});\r\n }", "title": "" }, { "docid": "bea053638cbf6b2bb5fc771aaa133361", "score": "0.6451579", "text": "function sendMessage(message) {\r\n if (!ready) {\r\n delayedMessages.push(message);\r\n return;\r\n }\r\n message.instanceId = namespace.instanceId;\r\n if (serializeToString) {\r\n message = JSON.stringify(message);\r\n }\r\n window.parent.postMessage(message, namespace.hostUrl);\r\n }", "title": "" }, { "docid": "e908eb41794273271493adb7f875dcc3", "score": "0.644616", "text": "function sendMessage() {\n\t\tlet chat_msg = input\n\t\tconsole.log(chat_msg)\n\t\tsetInput(\"\")\n\t\t//emitting to server\n\t\tsocketRef.current.emit(\"sendMsg\", {\n\t\t\tmessage: chat_msg,\n\t\t\tmyid: myid,\n\t\t\tfid: fid,\n\t\t})\n\t\t// outputMessage(chat_msg)\n\t}", "title": "" }, { "docid": "b604c830c071115d6df0c11bd010e511", "score": "0.64415705", "text": "function onMessageArrived(message) {\n console.log(\"Mensagem recebida publicação:\\nTópico:\"+message.destinationName+\"\\nMensagem:\"+message.payloadString);\n }", "title": "" }, { "docid": "c41b9fa4d709eb4b7dc5ae833d27daad", "score": "0.6438513", "text": "handleMessageFromWorker(workerId, message) {\n console.log(\"Worker \" + workerId + \" says hi with msg \" + message);\n }", "title": "" }, { "docid": "043fc57ec7a237213823f9d099e8079a", "score": "0.64257014", "text": "function sendMessage() {\n \t\t\tvar message = data.value;\n \t\t\tdata.value = \"\";\n\t\t\t// tell server to execute 'sendchat' and send along one parameter\n\t\t\tsocket.emit('sendchat', message);\n\t\t}", "title": "" }, { "docid": "1ea16da71324a45d1a9f927503a4d64b", "score": "0.64252466", "text": "function sendMessage() {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({ username: x.username1, username1: username, message: message }, {});\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', { message: message, lan: $usernameInput.val() });\n }\n }", "title": "" }, { "docid": "ab678a9b128e7512c4dd44c60f4df165", "score": "0.6417525", "text": "send(message) {\n this.Messages.save(angular.extend(message, {date: new Date(), read: true, folder: 'sent'}))\n .then(() => this.canExit = true)\n .then(() => this.gotoPreviousState());\n }", "title": "" }, { "docid": "b1493d79080768bb7867568ab3d7bf4d", "score": "0.6416506", "text": "sendMessage(data, model) {\n let msg = new Message(\"onMessage\", model.channelList[model.currentGroupIndex].id, data);\n this.webSocket.send(JSON.stringify(msg));\n }", "title": "" }, { "docid": "80069a0c88e9cb7377ba85e7bcc9de6a", "score": "0.64133257", "text": "function sendMessage(message) {\n console.log(message)\n receiveMessage(message);\n}", "title": "" }, { "docid": "e1204518f608db5385c7f62cfacb2068", "score": "0.64099324", "text": "send(msg) {\n this.port_.postMessage(msg);\n }", "title": "" }, { "docid": "40902df6c797716923df1e5b11750699", "score": "0.6407053", "text": "function sendMessage() {\n const value = input.value;\n if (value === ''){\n return;\n }\n input.value = '';\n drone.publish({\n room: 'observable-room',\n message: value,\n });\n}", "title": "" }, { "docid": "59d3a8cd9037e01729c92d0ce8edda4f", "score": "0.63969314", "text": "sendMessage() {\n\t\t\tif (this.userInput != \"\") {\n\t\t\t\tthis.contacts[this.contactIndex].messages.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tdate: dayjs().format(\"DD/MM/YYYY HH:mm:ss\"),\n\t\t\t\t\t\t//\tIl testo sarà l'input dell'utente\n\t\t\t\t\t\ttext: this.userInput,\n\t\t\t\t\t\tstatus: 'sent',\n\t\t\t\t\t\tvisibility: 'hidden'\n\t\t\t\t\t});\n\t\t\t\t//\tSvuotiamo la stringa altrimenti nell'input rimane ciò che l'utente scrive\n\t\t\t\tthis.userInput = '';\n\n\t\t\t\t//\tSalviamo il messaggio del contatto attivo (l'ultimo appena immesso) per evitare che \n\t\t\t\t//\tau un eventuale click veloce su un altro contatto mandi la risposta automatica \n\t\t\t\t//\tal nuovo contatto cliccato\n\t\t\t\tconst thisActiveContact = this.contactIndex;\n\n\t\t\t\t//\tMessaggio ricevuto automatico che appare dopo 1 sec\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.contacts[thisActiveContact].messages.push(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdate: dayjs().format(\"DD/MM/YYYY HH:mm:ss\"),\n\t\t\t\t\t\t\ttext: 'Ok',\n\t\t\t\t\t\t\tstatus: 'received',\n\t\t\t\t\t\t\tvisibility: 'hidden'\n\t\t\t\t\t\t});\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0de42059f6952fb462425054c4c301ec", "score": "0.639396", "text": "function messageSendHandler() {\n // get field value\n let msgText = messageTextBox.value;\n if (msgText.length == 0) return;\n messageTextBox.value = \"\";\n console.log(`sending message: ${msgText}`);\n\n // broadcast\n socket.emit(\"new message\", activeChannel, msgText);\n\n // set focus\n messageTextBox.focus();\n}", "title": "" }, { "docid": "d7701078f93e7db2037c2f6c6cca492d", "score": "0.6392983", "text": "propagateMessage(id, data) {\n var body = {\n id: id,\n data: data\n };\n publisher.publish(\"messages\", JSON.stringify(body));\n }", "title": "" }, { "docid": "3a409e14e3561427b9a6511324a3a702", "score": "0.63925505", "text": "sendMessage(message) {\r\n if (this.isConnected()) {\r\n this._sendMessage(message);\r\n }\r\n }", "title": "" }, { "docid": "7ef2cb00d6a77a5452c31f869d9765b8", "score": "0.6382529", "text": "_onMessageWasSent(message) {\n this.setState({\n messages: [...this.state.messages, message]\n });\n console.log(this.state.messages);\n this.state.socket.emit(\"sendMessage\", message.data.text);\n }", "title": "" }, { "docid": "e196c690ab3d6a1bc74c05f59b187682", "score": "0.6381241", "text": "function onMasterIpcMessage(message) {\n emitToAmqp(message);\n emitToNonOriginChildProcesses(message);\n }", "title": "" }, { "docid": "1a5da964bd249f6a69b5554137bed094", "score": "0.6378814", "text": "function checkBusPush() {\n for (var i = 0, len = sendingMessages.length; i < len; i++) {\n var msg = sendingMessages[i];\n if (msg) {\n logger.log('verbose', 'Sending Message' + JSON.stringify(msg));\n processItem.send(msg);\n }\n else {\n logger.log('error', 'Empty Message Detected');\n }\n sendingMessages.splice(i, 1);\n }\n\n }", "title": "" }, { "docid": "a67d719139118a220fae9aff95640f37", "score": "0.63786054", "text": "send(message) {\n // console.log(\"send: \", message);\n }", "title": "" }, { "docid": "81841f13e01cb0580898d4cba62a2d53", "score": "0.6364511", "text": "function onMessage (request, sender, sendResponse) {\n console.log('Got message');\n console.log(request.data);\n setData(request.data);\n }", "title": "" }, { "docid": "6e21c1813b846a31ccc3d52b6a904ef6", "score": "0.63621205", "text": "function sendMessage(event) {\n socket.emit(\"sendMessage\", event.target.value);\n }", "title": "" }, { "docid": "fa7a57bf5df848a18c1ef53bd0d59ba3", "score": "0.6358544", "text": "broadcast (message, clientSender) {\n this.clients.forEach((client) => {\n if (client === clientSender || client.id === 'E0500' || client.id === '')\n return;\n client.receiveMessage('\\n'+message+'\\n');\n });\n console.log(message.replace(/\\n+$/, \"\"));\n }", "title": "" }, { "docid": "bc1d52efe33eefae30d2a81a4aea6684", "score": "0.63568336", "text": "@track({action: 'message-sent'})\n handleSubmit(e){\n e.preventDefault();\n\n let {message, data, customType} = this.state;\n let channel = this.state.currentChannel;\n let addNewMessage = this.props.addNewMessage;\n\n channel.sendUserMessage(message, data, customType, function(message, error){\n if (error) return console.error(error);\n\n //set app store for sending user socket to see their msgs\n addNewMessage(message);\n });\n //clear input after send\n this.setState({message: ''});\n }", "title": "" }, { "docid": "7c61ecfca0dfbdd05e0d00a2d437eb15", "score": "0.6350084", "text": "function amqp_setMessage (msg)\n{\n msg = new Buffer (JSON.stringify(msg));\n\n amqp_chn.assertQueue (\"WebChannel\", {durable: true});\n amqp_chn.sendToQueue (\"WebChannel\", msg);\n //console.log (\"AMQP: Sent %s\", msg);\n}", "title": "" }, { "docid": "1876c34da30b6b18de6890b728fa13c4", "score": "0.63273954", "text": "sendMessage() {\n const newMessage = {\n message: this.message,\n name: this.name\n };\n if (this.typeOfMessage === 1) {\n newMessage.email = this.email;\n } else {\n newMessage.sms = this.sms;\n }\n\n this.Message.sendMessage(newMessage).then(() => {\n this.showSuccessAlert = true;\n }).catch(error => {\n this.$log.log(error);\n });\n }", "title": "" }, { "docid": "b4973682f011a44f2964e3c44fcdae49", "score": "0.6312604", "text": "function sendMessage () {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({\n username: username,\n message: message\n });\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', message);\n }\n }", "title": "" }, { "docid": "b4973682f011a44f2964e3c44fcdae49", "score": "0.6312604", "text": "function sendMessage () {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({\n username: username,\n message: message\n });\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', message);\n }\n }", "title": "" }, { "docid": "37295dc27c87816676cedefb61fe2476", "score": "0.6307739", "text": "function sendMessage() {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({\n username: username,\n message: message,\n }, 'me');\n // tell server to execute 'newMessage' and send along one parameter\n socket.emit('newMessage', message);\n }\n }", "title": "" }, { "docid": "6c3c2036d8d350ed264db30e83d9032c", "score": "0.6304698", "text": "function sendMessage () {\n let message = $inputMessage.val();\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n // if there is a non-empty message and a socket connection\n if (message /*&& connected*/) {\n $inputMessage.val('');\n addChatMessage({\n username: username,\n message: message\n });\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', message);\n }\n }", "title": "" }, { "docid": "178dd97aaa10a9715ccac96f24e3a814", "score": "0.62946624", "text": "sendMessage(message) {\n this.mqttClient.publish(this.topic, message);\n }", "title": "" }, { "docid": "d6ef0653ae826b74854af610dc72d2a8", "score": "0.62935156", "text": "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message);\n /*\n mandatory The name of the destination to which the message is to be sent (for messages about to be sent)\n or the name of the destination from which the message has been received. (for messages received by the onMessage function).\n */\n console.log(\"onMessageArrived destinationName:\" + message.destinationName);\n //read only The payload as an ArrayBuffer.\n // console.log(\"onMessageArrived payloadBytes:\" + message.payloadBytes);\n //read only The payload as a string if the payload consists of valid UTF-8 characters.\n console.log(\"onMessageArrived payloadString:\" + message.payloadString);\n var rs = message.destinationName.split(\"/\");\n var data = JSON.parse(message.payloadString);\n if (rs[2] == \"offload\") {\n if (rs[3] == \"update\") {\n if (data[0]['available'] == \"true\") {\n $(\"#group_cmn-toggle-\" + data[0]['group']).prop(\"checked\", true);\n }\n if (data[0]['available'] == \"false\") {\n $(\"#group_cmn-toggle-\" + data[0]['group']).prop(\"checked\", false);\n }\n if (data[0]['boolean'] == \"true\") {\n $(\"#gateway_cmn-toggle-\" + data[0]['group']).prop(\"checked\", true);\n }\n if (data[0]['boolean'] == \"false\") {\n $(\"#gateway_cmn-toggle-\" + data[0]['group']).prop(\"checked\", false);\n }\n }\n }\n\n }", "title": "" }, { "docid": "3dedaae5a9fbe22e4896cc38b4ba84d2", "score": "0.6286157", "text": "function sendMsg(message) {\n\t\tconsole.log('sendMsg: ' + message);\n\t\twebSocketWorker.postMessage({cmd: 'message', message: message});\n\t}", "title": "" }, { "docid": "f1c3a909cbef9593129ce532bed1b435", "score": "0.6285857", "text": "function broadcastSysMsg(msg) {\n const message = {\n user: 'system',\n text: msg,\n timestamp: formatDate(new Date())\n }\n socket.broadcast.emit('message-all', message);\n\n logMsg(message);\n }", "title": "" }, { "docid": "109dd3ede0bdba827d77dcf23306e1c0", "score": "0.62812006", "text": "BroadcastMessage() {}", "title": "" }, { "docid": "9de9d2eff8e244d8b43b3cdaaf6cf667", "score": "0.6270279", "text": "handleQueueMessage(text, task_data, callback, is_system=false) {\n let new_message_id = uuidv4();\n let duration = null;\n if (!is_system && this.state.message_request_time != null) {\n let cur_time = (new Date()).getTime();\n duration = cur_time - this.state.message_request_time;\n this.setState({message_request_time: null});\n }\n this.sendPacket(\n TYPE_MESSAGE,\n {\n text: text,\n task_data: task_data,\n id: this.props.agent_id,\n message_id: new_message_id,\n episode_done: false,\n duration: duration,\n },\n true,\n true,\n (msg) => {\n if (!is_system) {\n this.props.messages.push(msg.data);\n this.props.onSuccessfulSend();\n }\n if (callback !== undefined) {\n callback();\n }\n }\n );\n }", "title": "" }, { "docid": "4187fc4790489c033b0edcc9c2a9cbc9", "score": "0.6269475", "text": "sendMessage(value) {\n this.addUserMessage(value);\n this.connection.sendMessage(value);\n }", "title": "" }, { "docid": "902dc49b0008a9adaf745ee3822797b9", "score": "0.626312", "text": "function sendMessage() {\n var message = $inputMessage.val();\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n message = message.replace(/(^\\s+)|(\\s+$)/g,\"\");\n if (message == \"\") return;\n\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({\n username: username,\n message: message\n });\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', {type: 'text', msg: message});\n }\n }", "title": "" }, { "docid": "d81b0d213dab5079c5c76b6531a110ac", "score": "0.6261357", "text": "function sendMyMessage(senderID, messageType, messageID, messageText) {\n\n//\tvar dataToSend = JSON.stringify([senderID, messageType, messageID, messageText]);\n\tvar dataToSend = Aes.Ctr.encrypt(JSON.stringify([senderID, messageType, messageID, messageText]), verySecurePassword, 256);\n\tconsole.log(\"Sending: \", dataToSend);\n\tgapi.hangout.data.sendMessage(dataToSend);\n//\trecieveMessage(dataToSend);\n}", "title": "" }, { "docid": "f6e77bb9bbcb9e15bb216f7c079cad70", "score": "0.625396", "text": "function receivedMessage(event) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n var msg = [{project_id: 1, senderID: senderID, recipientID: recipientID, message: message, time: timeOfMessage}];\n saveMessenges(msg);\n \n console.log(\"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var isEcho = message.is_echo;\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageTextOrigin = message.text;\n var messageAttachments = message.attachments;\n var quickReply = message.quick_reply;\n\n if (isEcho) {\n // Just logging message echoes to console\n console.log(\"Received echo for message %s and app %d with metadata %s\",\n messageId, appId, metadata);\n return;\n } else if (quickReply) {\n var quickReplyPayload = quickReply.payload;\n switch (quickReplyPayload) {\n case 'SEND_INQUIRY_PAYLOAD':\n sendMailToUser(inquiry_arr[senderID]);\n sendButtonYesNoMessage(senderID, data.finish, \"PUSH_NOTIFICATION\");\n conversion_text[senderID] = [];\n inquiry_arr[senderID] = [];\n break;\n case 'CANCEL_INQUIRY_PAYLOAD':\n conversion_text[senderID] = [];\n inquiry_arr[senderID] = [];\n sendTextMessage(senderID, data.next_question);\n break;\n case 'MODIFY1_INQUIRY_PAYLOAD':\n formModifyQuestions(senderID, 1);\n break;\n case 'MODIFY2_INQUIRY_PAYLOAD':\n formModifyQuestions(senderID, 2);\n break;\n case 'MODIFY3_INQUIRY_PAYLOAD':\n formModifyQuestions(senderID, 3);\n break;\n case 'MODIFY4_INQUIRY_PAYLOAD':\n formModifyQuestions(senderID, 4);\n break;\n\n case 'CAROUSEL_YES_PAYLOAD':\n console.log(data.carousel_text[0].anwers.elements);\n sendCarouselMessage(senderID);\n break;\n case 'INQUIRY_YES_PAYLOAD':\n case 'NO_MATCH_YES_PAYLOAD':\n inquiry_arr[senderID] = [];\n conversion_text[senderID] = [];\n formQuestions(senderID);\n break;\n case 'CAROUSEL_NO_PAYLOAD':\n case 'NO_MATCH_NO_PAYLOAD':\n case 'INQUIRY_NO_PAYLOAD':\n sendTextMessage(senderID, data.next_question);\n break;\n case 'PUSH_NOTIFICATION_YES_PAYLOAD':\n sendTextMessage(senderID, data.thanks);\n break;\n case 'PUSH_NOTIFICATION_NO_PAYLOAD':\n sendTextMessage(senderID, data.thanks);\n break;\n }\n console.log(\"Quick reply for message %s with payload %s\",\n messageId, quickReplyPayload);\n\n //sendTextMessage(senderID, \"Quick reply tapped\");\n return;\n }\n\n //console.log(messageText);\n\n if (messageTextOrigin) {\n //sendQuickReply(senderID);\n //return;\n var messageText = messageTextOrigin.toLowerCase();\n if( (typeof conversion_text[senderID] !== 'undefined') && (typeof conversion_text[senderID][\"index\"] !== 'undefined')){\n if (parseInt(conversion_text[senderID]['index']) == 3 || parseInt(conversion_text[senderID][\"modify_index\"]) == 3){\n if(!validation.isEmail(messageText)){\n sendTextMessage(senderID, eval(\"data.no_match.questions.question3\"));\n return true;\n }\n }\n \n if(parseInt(conversion_text[senderID][\"modify_index\"]) > 0 ){\n var modify_index = parseInt(conversion_text[senderID][\"modify_index\"]);\n inquiry_arr[senderID][modify_index - 1] = {\"question\" : eval(\"data.no_match.questions.question\" + modify_index), \"answer\" : messageTextOrigin, \"title\": eval(\"data.no_match.questions_main.question\" + modify_index)};\n }else{\n inquiry_arr[senderID].push({\"question\" : eval(\"data.no_match.questions.question\" + (conversion_text[senderID]['index'])), \"answer\" : messageTextOrigin, \"title\": eval(\"data.no_match.questions_main.question\" + (conversion_text[senderID]['index']))});\n }\n console.log(\"-----------------\");\n console.log(inquiry_arr[senderID]);\n formQuestions(senderID);\n \n return true;\n }\n conversion_text[senderID] = [];\n inquiry_arr[senderID] = [];\n var index_arr = [];\n\n var general_text = data.general_text;\n general_text.some(function (row, index1, _ary1){\n var question = row.question.toLowerCase();\n var answer = row.anwers;\n var arr = question.split(\",\");\n arr.some(function (value, index2, _ary2) {\n var tmp_index = [];\n var arr_key = [value];\n if(value.indexOf(\"and\") > -1){\n arr_key = value.split(\"and\");\n }\n //console.log(arr_key);\n arr_key.some(function (search_key) {\n //console.log(search_key);\n //console.log(messageText.indexOf(search_key));\n if ( messageText.indexOf(search_key) > -1) {\n tmp_index.push({\"indexof\" : messageText.indexOf(search_key), \"answer\" : answer, \"type\" : \"general_text\" });\n }else {\n tmp_index = [];\n return true;\n }\n });\n //console.log(tmp_index);\n if(tmp_index.length > 0) {\n index_arr = index_arr.concat(tmp_index);\n }\n });\n });\n\n //console.log(index_arr);\n\n\n var form_text = data.form_text;\n form_text.some(function (row, index1, _ary1){\n var question = row.question.toLowerCase();\n var answer = row.anwers;\n var arr = question.split(\",\");\n arr.some(function (value, index2, _ary2) {\n if ( messageText.indexOf(value) > -1) {\n index_arr.push({\"indexof\" : messageText.indexOf(value), \"answer\" : answer, \"type\" : \"form_text\" });\n //sendTextMessage(senderID, answer);\n //setTimeout( function() {\n // sendButtonYesNoMessage(senderID, data.inquiry, \"INQUIRY\");\n //}, 1000);\n }\n });\n });\n\n var carousel_text = data.carousel_text;\n carousel_text.some(function (row, index1, _ary1){\n var question = row.question.toLowerCase();\n var answer = row.anwers;\n var arr = question.split(\",\");\n arr.some(function (value, index2, _ary2) {\n if ( messageText.indexOf(value) > -1) {\n index_arr.push({\"indexof\" : messageText.indexOf(value), \"answer\" : answer.anwers1, \"type\" : \"carousel_all\" });\n //sendButtonYesNoMessage(senderID, answer.anwers1, \"CAROUSEL\");\n }\n });\n var keywords = answer.keywords;\n keywords.some(function (value, index3, _ary3) {\n //console.log(value.keyword);\n var keyword = value.keyword.toLowerCase();\n var arr = keyword.split(\",\");\n arr.some(function (value) {\n if ( messageText.indexOf(value) > -1) {\n index_arr.push({\"indexof\" : messageText.indexOf(value), \"answer1\" : value + \"\" + answer.one_element, \"answer2\" : answer.elements[index3], \"type\" : \"carousel_one\" });\n //sendTextMessage(senderID, value + \"\" + answer.one_element);\n //sendOneCarouselMessage(senderID, answer.elements[index3]);\n }\n });\n });\n });\n\n\n //console.log(index_arr);\n var element = getMinIndexOf(index_arr);\n if(element != null){\n if(element.type == \"general_text\"){\n sendTextMessage(senderID, element.answer);\n setTimeout( function() {\n sendTextMessage(senderID, data.next_question);\n }, 1000);\n }else if(element.type == \"form_text\"){\n sendTextMessage(senderID, element.answer);\n setTimeout( function() {\n sendButtonYesNoMessage(senderID, data.inquiry, \"INQUIRY\");\n }, 1000);\n }else if(element.type == \"carousel_all\"){\n sendButtonYesNoMessage(senderID, element.answer, \"CAROUSEL\");\n }else if(element.type == \"carousel_one\"){\n sendTextMessage(senderID, element.answer1);\n sendOneCarouselMessage(senderID, element.answer2);\n }\n\n return true;\n }\n sendButtonYesNoMessage(senderID, data.no_match.anwers, \"NO_MATCH\");\n } else if (messageAttachments) {\n //sendTextMessage(senderID, \"Message with attachment received\");\n }\n\n}", "title": "" }, { "docid": "c32ec1be062b439c528e2d2e181bd8a7", "score": "0.6247198", "text": "function workerOnMessage(e) {\n var data = e.data\n ;\n\n switch(data.action) {\n case 'message':\n // Log a message from the web worker.\n console.log(data);\n break;\n case 'saveState':\n // send a state save message to a distributor.\n data.workunitId = workunitId;\n socket.json.send(data);\n break;\n case 'completed':\n // Set payload as completed, send data and increment stats.\n data.workunitId = workunitId;\n socket.json.send(data);\n\n stats.progress = data;\n stats.numCompleted++;\n break;\n }\n }", "title": "" }, { "docid": "ec39adf954dfb45ee1259711983c2d80", "score": "0.6239597", "text": "onMessagingEventHandler(event) {\n\t\tif (event !== undefined) {\n\t\t\t// Receive notification from \"model-output-data\" topic\n\t\t\tconsole.log(\"DEBUG:AudioEngine:onMessagingEventHandler:\");\n\t\t\tconsole.log(event);\n\t\t\tthis.audioWorkletNode.port.postMessage(event);\n\t\t}\n\t}", "title": "" }, { "docid": "899c02638dd0f0b82f9f750919e62abd", "score": "0.6239162", "text": "function sendMessage(message) {\n message.roomInfo = roomInfo;\n socket.emit(\"vc-data\", message);\n}", "title": "" }, { "docid": "991114928afdda2ba8dcdaa57707424f", "score": "0.6231595", "text": "addNewMessage(messageText) {\n\n // Check if also user have changed their name and send notification too\n if(this.oldUserName !== this.state.currentUser.name) {\n this.sendNotificationOfChangedUserName();\n }\n const newMessageObj = {\n type: 'postMessage',\n username: this.state.currentUser.name,\n content: messageText\n };\n \n this.socket.send(JSON.stringify(newMessageObj)); \n }", "title": "" }, { "docid": "a2d347feca0bb2c721ddae6fca44d977", "score": "0.6226663", "text": "send(message, reciever) {\r\n this.mediator.send(message, this.name, reciever);\r\n }", "title": "" }, { "docid": "df1258e409d4dc784754aeca093782b1", "score": "0.6226451", "text": "receiveMessage(message) {\n var currentChannel = ChannelStore.getCurrentChannel();\n _messages[message.channelId] = _messages[message.channelId] || new MessagesWrapper(message.channelId);\n _messages[message.channelId].addMessages([message,], false);\n\n this.emit(IMConstants.EVENTS.RECEIVE_NEW_MESSAGE, message);\n if (currentChannel.backEndChannelId === message.channelId) {\n this.emit(IMConstants.EVENTS.RECEIVE_MESSAGE);\n }\n\n var self = this;\n\n let channel = ChannelStore.getChannel(message.channelId),\n user = UserStore.getUser(message.userId);\n if(!document.hasFocus() || currentChannel.backEndChannelId !== message.channelId) {\n let channelName = channel.isGroup ? channel.channel.name: channel.channel.realname;\n\n let body;\n if(!channel.isGroup) {\n body = message.text;\n } else {\n body = `${user.realname}: ${message.text}`;\n }\n let notification = new Notification(channelName, {\n icon: `http://www.gravatar.com/avatar/${user.emailMd5}?d=identicon`,\n body: body\n });\n notification.onclick= ()=>{\n window.focus();\n notification.close();\n if(channel !== currentChannel) {\n self.emit(IMConstants.EVENTS.REQUEST_REDIRECT, `/platform/im/talk/${message.channelId}`);\n }\n };\n setTimeout(()=>{ notification.close()}, IMConstants.NOTIFICATION.STAY_SECONDS * 1000);\n }\n\n }", "title": "" }, { "docid": "8989febdfb89d1de64400a04c6b0d548", "score": "0.6222695", "text": "onReceivedMessage(messages) {\n\n // console.warn('recived message:')\n // console.warn(messages);\n\n this._storeMessages(messages);\n }", "title": "" }, { "docid": "b7ca168113545faacdecf05fc031e9bb", "score": "0.6222237", "text": "SOCKET_ONMESSAGE (state, message) {\n state.socket.message = message;\n console.log('missatge : '+JSON.stringify(message));\n //let missatge = JSON.parse(message.data);\n switch (message.tipus){\n case 'putPairsStatus':\n console.info('rebut putPairsStatus ...');\n state.mercado.pares = message.data;\n break;\n default:\n console.log(\"missatge desconegut\",message);\n }\n }", "title": "" }, { "docid": "a71b2596756771d144fbc880ff52bea0", "score": "0.6220121", "text": "function handleEvent(event, message) {\n\n // What is message? It's got extra properties in it from the\n // Queue library, so we'll need to only actually re-broadcast\n // the .payload within it. Do a console.log() to see the whole thing\n\n let messageID = uuid();\n\n // Log that we trired to send each user a message\n for (const subscriber in messages[event]) {\n messages[event][subscriber][messageID] = message.payload;\n }\n\n // Send them all out\n // This would go to every connected client for this event\n socket.broadcast.emit(event, { messageID, payload: message.payload });\n\n }", "title": "" }, { "docid": "e48598bfecb9178f5610eb6b8319740f", "score": "0.6214866", "text": "function sendMessage(message) {\n socket.emit('publish', {\n roomName: droneRoomName,\n message: message,\n });\n}", "title": "" }, { "docid": "7f93244bf1f3434467d992568e739994", "score": "0.62119484", "text": "function handleReceiveMessage(e)\n {\n setMessages(messages => [...messages, {yours: false, value: e.data}]);\n }", "title": "" }, { "docid": "78db1370a8324f8539ad7f961c98a721", "score": "0.62096727", "text": "function sendMessage(message, room) {\n console.log('Client sending message: ', message, room);\n socket.current.emit('message', message, room);\n }", "title": "" }, { "docid": "3dbd4d16474587d9286524e8077cb2ba", "score": "0.62036085", "text": "function sendMessage (message) {\n var message = message\n // Prevent markup from being injected into the message\n message = cleanInput(message);\n //console.log(message)\n // if there is a non-empty message and a socket connection\n if (message && connected) {\n $inputMessage.val('');\n addChatMessage({\n username: username,\n message: message\n });\n // tell server to execute 'new message' and send along one parameter\n socket.emit('new message', message);\n }\n }", "title": "" }, { "docid": "73cf631de8f2a9356bbd09ca82fdfb38", "score": "0.62026376", "text": "onReceivedMessage(messages) {\n // alert(JSON.stringify(messages))\n this._storeMessages(messages);\n }", "title": "" } ]
a9673b972dd2963141e948cb7f7b6de5
handle when user selects another page from pagination, passed as prop to listings component
[ { "docid": "a9909896cb0c078eac66b3faf2d5c5fe", "score": "0.6028054", "text": "pageSelect(page, mobileFlag) {\n this.trackCall(() => this.context.mixpanel.track('srp_page_changed', {'page': page}));\n // update the current page\n this.setState({currentPage: page});\n // update the current main property, will be the first one on this page\n // this.updateMainProperty(0);\n if(mobileFlag) {\n // move the scrolled div back to the left\n ReactDOM.findDOMNode(this.refs.mobileListingsDiv).scrollLeft = 0;\n } else {\n // move the scrolled div back to the top, pagination is on bottom\n ReactDOM.findDOMNode(this.refs.desktopListingsDiv).scrollTop = 0;\n }\n // due to weird issue where this.state.currentPage is still the old value even after above update (race condition?)\n // use the page and update current main property without the helper method\n // otherwise on mobile when going back to previous page the current main property does not update on its own, only when\n // you scroll\n this.setState({selectedPropertyIndex: (0 + (page - 1) * PAGE_SIZE)});\n }", "title": "" } ]
[ { "docid": "853d776068aef580afcf15d5b87b26f4", "score": "0.68663514", "text": "goToPage (data) {\n // change state so page doesn't have show more or paginate\n // components on page until after results are loaded\n\n const selected = data.selected + 1\n\n const baseURI = this.state.resultsURI.split('&page=')[0]\n const pageParam = `&page=${selected}`\n const pageURI = baseURI + pageParam\n\n this.setState({\n currentPage: selected,\n results: [], // result list (show as new page)\n status: 'loading',\n showMorePageIterator: 0,\n filterStartYear: DEFAULT_START_YEAR,\n filterEndYear: DEFAULT_END_YEAR\n })\n\n this.getResults(pageURI)\n }", "title": "" }, { "docid": "c9cb46bb266368f853d75d014b55e8e0", "score": "0.6686872", "text": "pageFromNav(newPage) {\n if (typeof newPage === 'number') {\n const c = this.getDocsContainer();\n const newOddIdx = this.getOddIdx(newPage);\n\n // would prefer to pass 'newPage' to componentWillReceiveProps, but don't know how...\n this.clickedPage = newPage;\n c.onscroll = undefined;\n\n // if loading more results\n if (newOddIdx > this.state.highestOddIdx) {\n const elemLength = this.state.elements.length;\n const newLimit = (newOddIdx - this.state.highestOddIdx) * MIN_DOCS_PER_FETCH;\n\n // load an amount based on new page\n this.props.getNames.refetch({offset:elemLength,limit:newLimit});\n }\n else\n this.setState({ activePage: newPage });\n }\n }", "title": "" }, { "docid": "55d4a2c326a49f696944b6190179344f", "score": "0.6641857", "text": "handleClickPagination(e, index) {\n e.preventDefault();\n\n this.setState({\n currentPage: index,\n });\n }", "title": "" }, { "docid": "882ab66c682f4376cf6483d95afddc20", "score": "0.65512145", "text": "handlePageChange(pageNum) {\n const limit = 10;\n const offset = (pageNum - 1) * limit;\n this.props.loadMeal(limit, offset);\n this.setState({\n currentPage: pageNum,\n });\n }", "title": "" }, { "docid": "cbb79e8a39c64035dc00062b58ef455c", "score": "0.65138024", "text": "handlePaginationChange(e, data){\n let selectedPage = data.activePage;\n let calcOff = 0;\n if(selectedPage > 1){\n calcOff = (selectedPage - 1) * this.state.selectedPaging;\n }\n \n this.setState({calculatedOffset: calcOff, currentlyActivePage: selectedPage});\n }", "title": "" }, { "docid": "47cfd9e101bf675132c3c175390946b4", "score": "0.64958024", "text": "paginationInput(e) {\n let currentPage = e.target.value ? parseInt(e.target.value) : '';\n currentPage = currentPage > this.state.totalPages ? this.state.totalPages : currentPage;\n this.setState({ currentPage: currentPage });\n\n if (currentPage) {\n this.updateItemList(currentPage);\n }\n }", "title": "" }, { "docid": "d625a562456c40f5a2c092637b349e93", "score": "0.6470661", "text": "pageListRenderer({ pages, onPageChange, pagination }) {\n const { paginationInput, dynamicPaginationTypeLimit } = this.props;\n\n const {\n page,\n pageStartIndex,\n dataSize,\n sizePerPage,\n lastPageText,\n lastPageTitle,\n nextPageText,\n nextPageTitle,\n firstPageText,\n firstPageTitle,\n prePageText,\n prePageTitle,\n hidePageListOnlyOnePage,\n } = pagination;\n\n const totalRecords = (dataSize || 0) - (pageStartIndex || 1) + 1;\n const maxPages = Math.ceil(totalRecords / sizePerPage);\n\n if (hidePageListOnlyOnePage && maxPages <= 1) {\n return null;\n }\n\n if (paginationInput || (dynamicPaginationTypeLimit && maxPages > dynamicPaginationTypeLimit)) {\n const handleChange = e => {\n e.preventDefault();\n let { value } = e.currentTarget;\n\n if (value < 1) {\n value = 1;\n } else if (value > maxPages) {\n value = maxPages;\n }\n\n onPageChange(value);\n };\n\n return (\n <div className=\"pagination-wrapper pagination-input\">\n <Pagination>\n <Pagination.First\n disabled={page === 1}\n title={firstPageTitle}\n onClick={() => onPageChange(firstPageText)}\n >\n {firstPageText}\n </Pagination.First>\n\n <Pagination.Prev\n disabled={page === 1}\n title={prePageTitle}\n onClick={() => onPageChange(prePageText)}\n >\n {prePageText}\n </Pagination.Prev>\n\n <li className=\"inputs\">\n <span className=\"pageLabel\">Page</span>\n\n <span className=\"input\">\n <InputNumeric\n value={page}\n min={1}\n max={maxPages}\n minDecimalPlaces={0}\n maxDecimalPlaces={0}\n allowDecimals={false}\n allowNegatives={false}\n onBlur={handleChange}\n />\n </span>\n\n <span className=\"of\">of</span>\n <span className=\"total\">{maxPages}</span>\n </li>\n\n <Pagination.Next\n disabled={page === maxPages}\n title={nextPageTitle}\n onClick={() => onPageChange(nextPageText)}\n >\n {nextPageText}\n </Pagination.Next>\n\n <Pagination.Last\n disabled={page === maxPages}\n title={lastPageTitle}\n onClick={() => onPageChange(lastPageText)}\n >\n {lastPageText}\n </Pagination.Last>\n </Pagination>\n </div>\n );\n }\n\n return (\n <div className=\"pagination-wrapper\">\n <Pagination>{pages.map(p => this.pageButtonRenderer({ ...p, onPageChange }))}</Pagination>\n </div>\n );\n }", "title": "" }, { "docid": "10403e12dd1be6ed57522aaa7e0abc21", "score": "0.6371442", "text": "async handlePageSelection( eventKey ) {\n //Update the active page on the pagination bar\n await this.setState( {activePage: eventKey} );\n\n //Get the new data\n await this.getData();\n }", "title": "" }, { "docid": "8a75e7d76654b705ceeec8c8d16dfa4a", "score": "0.6341323", "text": "changePage(event) {\n\t\tlet newPage = 1;\n\t\tif(event.currentTarget.id === 'p-page') {\n\t\t\tnewPage = this.state.currentPage > 1 ? this.state.currentPage - 1 : 1;\n\t\t\tthis.setState({\n\t\t\t currentPage: newPage\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tlet pageCount = this.state.posts.length / this.state.postsPerPage;\t\t\t\n\t\t\tnewPage = this.state.currentPage < pageCount ? this.state.currentPage + 1 : pageCount;\n\t\t\tthis.setState({\n\t\t\t currentPage: newPage\n\t\t\t});\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "8f0b5eedf6c1cccc26dff5eb3b1ed211", "score": "0.6314234", "text": "calcNextPage(){\n //Selects last Page number\n const [lastItem] = this.state.pageNumbers.slice(-1);\n // only increments if last page number is larger\n if(lastItem > this.props.currentPage){\n let nextPage = this.props.currentPage + 1;\n // this changes current page to nextPage\n this.props.paginate(nextPage);\n }\n }", "title": "" }, { "docid": "5e9878b6a8834e81b8cb22433e98a0e3", "score": "0.6311805", "text": "function onPageNum(pageNum) {\n goPageNumber(pageNum)\n renderBooks()\n}", "title": "" }, { "docid": "5e0c842f3d2cd7ea1a2302c7e4e856b0", "score": "0.63106734", "text": "handlePageChange(pageNumber) {\n if(this.state.pagination.activePage === pageNumber) {\n return;\n }\n this.setState({pagination: {\n activePage: pageNumber\n }\n });\n }", "title": "" }, { "docid": "248f38b9954216cb4ed32b8d0c6ce25a", "score": "0.6288682", "text": "changePagingOptions(e, data){\n let pageTotal = 0;\n if(data.value > 0){\n pageTotal = Math.ceil(this.state.totalSongCount/data.value);\n this.setState({pagingDropdownSelection: data.value});\n }\n else{\n this.setState({pagingDropdownSelection: ''});\n }\n this.setState({selectedPaging: data.value, totalPages: pageTotal});\n }", "title": "" }, { "docid": "65379c66cecf0512dca50ed9e51e7c78", "score": "0.62813056", "text": "_onCreate () {\n const { pagination } = this.props;\n const page = pagination.get('page');\n\n if(this.state.page !== page) {\n this._goToPage(page);\n }\n }", "title": "" }, { "docid": "07919bdc13742ba7120621f62c945949", "score": "0.6277925", "text": "handlePageChange(pageNumber) {\n console.log(`active page is ${pageNumber}`);\n handelChange(pageNumber).then(res => {\n this.setState({\n users: res.data.data,\n activePage: res.data.current_page,\n itemsCountPerPage: res.data.per_page,\n totalItemsCount: res.data.total\n });\n });\n }", "title": "" }, { "docid": "8d0d82ef98926ea54af92ca7e05b65dc", "score": "0.62492585", "text": "changePage(event) {\n this.setState({\n currentPage: Number(event.target.id)\n });\n }", "title": "" }, { "docid": "0539df29896a01fffdbc7d5a36c21c67", "score": "0.6242765", "text": "onPagesOrCurrentPageChange_() {\n this.currentPageIndex = this.pages.indexOf(this.currentPage);\n }", "title": "" }, { "docid": "41befdba3ee34ead49867621e43f2354", "score": "0.61869437", "text": "_onPageClick(event) {\n this.paginatedCarsData = [\n ...this.carsData.slice(\n (event.target.current - 1) * this.pageSize,\n this.carsData.length < event.target.current * this.pageSize\n ? this.carsData.length\n : event.target.current * this.pageSize\n ),\n ];\n window.scroll({ top: 0 });\n }", "title": "" }, { "docid": "d9ad53cb3f103470a554d1dfe1d1b26a", "score": "0.61841637", "text": "_onNavigationPagerNextClick(event) {\n\t\t// prevent default\n\t\tevent.preventDefault();\n\t\t// change list page\n\t\tthis._list.page += 1;\n\t}", "title": "" }, { "docid": "e6d8bcb58b8c62a11fd443ff04e371b2", "score": "0.6183406", "text": "function changePage(e) {\n let pageButtons = document.querySelectorAll(\".page-number\");\n if (pageButtons) {\n pageButtons.forEach((pageButton) => {\n pageButton.classList.remove(\"active\");\n });\n e.target.parentNode.classList.toggle(\"active\");\n // searchKey = \"\",\n // pageIndex = 1,\n // postPerPage = 20,\n // sort = \"businessName\",\n // ascending = true\n\n fetchData(\n document.querySelector(\"#search-button input[name='search']\").value,\n parseInt(e.target.textContent)\n );\n }\n }", "title": "" }, { "docid": "11f9ef57c252cf9654808f95408934cb", "score": "0.6170728", "text": "pageInSelectHasChanged() {\n this.currentPageNumber = this.pageInSelect;\n this.loadPage();\n }", "title": "" }, { "docid": "2a72dd68db9d85bd73a98e725f36e74f", "score": "0.6153267", "text": "pageButtonRenderer({ page, active, disabled, title, onPageChange }) {\n const { paginationOptions } = this.props;\n const { firstPageText, prePageText, nextPageText, lastPageText } = paginationOptions;\n\n const handleClick = e => {\n e.preventDefault();\n onPageChange(page);\n };\n\n const props = {\n href: '#',\n disabled,\n title,\n key: page,\n onClick: handleClick,\n };\n\n if (page === firstPageText) {\n return <Pagination.First {...props}>{page}</Pagination.First>;\n }\n\n if (page === prePageText) {\n return <Pagination.Prev {...props}>{page}</Pagination.Prev>;\n }\n\n if (page === nextPageText) {\n return <Pagination.Next {...props}>{page}</Pagination.Next>;\n }\n\n if (page === lastPageText) {\n return <Pagination.Last {...props}>{page}</Pagination.Last>;\n }\n\n return (\n <Pagination.Item active={active} {...props}>\n {page}\n </Pagination.Item>\n );\n }", "title": "" }, { "docid": "9e8a8fa19efd229837944136443ac852", "score": "0.6149535", "text": "onClickForward() {\n const {\n limit,\n totalResults,\n offset,\n onChange,\n } = this.props;\n\n onChange(\n this.calculatePagination({\n limit,\n offset: offset + limit,\n totalResults,\n })\n );\n }", "title": "" }, { "docid": "212522a05f4cac0133e3cc0cbafeb7ba", "score": "0.613572", "text": "handleClick(event) {\n this.setState({\n currentPage: Number(event.target.id)\n });\n }", "title": "" }, { "docid": "05cd7fa6cb94fe15dcd01eedc58ed31b", "score": "0.61353266", "text": "changePage(data) {\n let selected = data.selected + 1;\n\n this.setState({\n activePage: selected\n });\n }", "title": "" }, { "docid": "77bbd2655bb9bddfdc06984897a0501e", "score": "0.6129294", "text": "updateItemList(currentPage) {\n const { filteredItems } = this.state;\n const { perPage } = this.props;\n const begin = (currentPage - 1) * perPage;\n const end = begin + perPage;\n this.setState({\n paginatedItems: filteredItems.slice(begin, end),\n });\n }", "title": "" }, { "docid": "8ed94efb729bff0f294e3c7290554f8f", "score": "0.61220336", "text": "renderPagination() {\n const { recordSetTotal } = this.props;\n return (\n <div className=\"mb-3\">\n {this.state.pageSize && (\n <Pagination\n isDesktop={this.state.isDeskTop}\n totalPage={recordSetTotal}\n showAll={this.props.pageInfo && this.props.pageInfo.isSearch}\n onPageChange={this.handlePageChange}\n pageNumber={this.state.pageNumber}\n onViewAll={this.viewAll}\n />\n )}\n </div>\n );\n }", "title": "" }, { "docid": "be6a86ec7c8fa86785661c1459f8ccb3", "score": "0.61192256", "text": "function onPaginatorClicked(event) {\n if (event.target.tagName !== 'A') return\n\n const page = Number(event.target.dataset.page)\n getUsersByPage(page)\n}", "title": "" }, { "docid": "ffb7f513055d88ff580ede0b58976c12", "score": "0.6067682", "text": "function page(event){\n showUl(event.target.id);\n}", "title": "" }, { "docid": "18aaa1a0529b88c5c5b48e0c0cdc1b96", "score": "0.60544914", "text": "handleClick(e){\n \t\tlet page = e.target.id;\n let newCurrentPage\n \t\tif (page == \"linkPrevious\") {\n \t\t\tnewCurrentPage = this.props.currentPage - 1\n\t\t}\n\t\t\n else if (page == \"linkNext\") {\n\t\t\tnewCurrentPage = this.props.currentPage + 1\n\t\t}\n\t\t\n else if ((page == \"intermediateEnd\")||(page == \"intermediateBeginning\")){\n newCurrentPage = this.props.currentPage\n }\n \n else{\n\t\t\tnewCurrentPage = page\n\t\t}\n\t\tnewCurrentPage = parseInt(newCurrentPage)\n let topics = calculateTopics(this.props.pageSize,newCurrentPage,this.props.searchedData)\n this.props.handleClick(newCurrentPage,topics,1,newCurrentPage)\n\t}", "title": "" }, { "docid": "23d847a5cd655b18ecca7a35c7d90e0e", "score": "0.60517585", "text": "calcPrevPage(){\n //Selects first Page number\n const [firstItem] = this.state.pageNumbers.slice(0);\n // only decrements if fast page number is smaller\n if(firstItem < this.props.currentPage){\n let prevPage = this.props.currentPage - 1;\n console.log(this.props.currentPage);\n // this changes current page to prevPage\n this.props.paginate(prevPage);\n }\n }", "title": "" }, { "docid": "d64fe5c875b1f0380540fab0a817077d", "score": "0.604932", "text": "receivePaginationQuery(){\n this.props.receivePaginationQuery();\n}", "title": "" }, { "docid": "17ea09288c25f6230943310fd705578d", "score": "0.6047316", "text": "function paginationHandler(e) {\n\t\tvar item = $(e.currentTarget);\n\n\t\tif(!item.hasClass('active')) {\n\t\t\tpaginationLoading.removeClass('out');\n\t\t\tpaginationAction(item.data('page'), true);\n\t\t}\n\t}", "title": "" }, { "docid": "62f63d26d61b7c14709e123a0a3322a1", "score": "0.6038125", "text": "handlePaginatorChange(event) {\n this.recordsToDisplay = event.detail;\n this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;\n }", "title": "" }, { "docid": "dd23b5494a74205f890aa50480fabd1f", "score": "0.6028941", "text": "function listenPaginationClicks() {\n $('#prev, #next').click(event => {\n event.preventDefault();\n event.stopPropagation();\n // make sure the button clicked has the active class\n if ($(event.target).hasClass('active')) {\n const clickedID = $(event.target).attr('id');\n // advance page backward or forward\n if(clickedID === 'prev') {\n pageNumber = pageNumber - 1;\n }\n if(clickedID === 'next') {\n pageNumber = pageNumber + 1;\n }\n // fetch the results\n $('#js-waiting-message').text(`Getting page...`);\n fetchResults($('#js-search-term').val(), $('#js-max-results').val(), $('.states-select').val().join());\n }\n });\n}", "title": "" }, { "docid": "52c639a4e10446dbf591d90124b63265", "score": "0.6009263", "text": "onChangePage(pageOfItems) {\n this.setState({ rowData: pageOfItems });\n }", "title": "" }, { "docid": "413e3af6574e407d626fb404b8e5d73a", "score": "0.60069907", "text": "handlePageChange(page) {\n\n let current = page.selected;\n let callback = this.updateSearchResults;\n let loadingCallback = this.loadingStatus;\n loadingCallback(true);\n fetch(process.env.REACT_APP_API + '/api/users/search/' + this.state.query + '?page=' + (current+1) + '&per_page='+this.state.itemsPerPage, {\n method: 'GET',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n }\n }).then((resp) => resp)\n .then(function(resp) {\n if (resp.ok) {\n return resp.json();\n } \n /* Error! */\n else if (resp.status != 200) {\n console.log(\"Error making call status: \" + resp.status);\n return null;\n }\n }).then((responseJSON) => {\n if (responseJSON) {\n callback(responseJSON);\n loadingCallback(false);\n }\n }).catch(function(e) {\n console.error(\"Error: \" + e);\n });\n\n this.setState({currentPage: current});\n\n }", "title": "" }, { "docid": "93c5b4ea809dd7502fe1300dbaac897d", "score": "0.5997611", "text": "renderPage() {\n\n const startIndex = (this.state.activePage * 25 - 25);\n // for debugging console.log(`STARTINDEX:${startIndex}`);\n\n const endIndex = (this.state.activePage * 25);\n // for debugging console.log(`ENDINDEX:${endIndex}`);\n\n return (\n\n <div>\n\n <Pagination\n defaultActivePage={1}\n totalPages={Math.ceil(this.props.cars.length / 25)}\n onPageChange={this.handleInputChange}\n />\n\n <Table celled>\n <Table.Header>\n <Table.Row>\n <Table.HeaderCell>Car Name</Table.HeaderCell>\n <Table.HeaderCell>Year</Table.HeaderCell>\n <Table.HeaderCell>Make</Table.HeaderCell>\n <Table.HeaderCell>Model</Table.HeaderCell>\n <Table.HeaderCell>MPG</Table.HeaderCell>\n <Table.HeaderCell> </Table.HeaderCell>\n </Table.Row>\n </Table.Header>\n <Table.Body>\n {this.props.cars.map((car) => <ViewAllCarItem key={car._id} car={car}/>).slice(startIndex, endIndex)}\n </Table.Body>\n </Table>\n </div>\n );\n }", "title": "" }, { "docid": "dc9342a901d8c2883c281414836af9b8", "score": "0.59929645", "text": "function handlePagination(e) {\n if (isModifiedEvent(e) || !isLeftClickEvent(e)) {\n return\n }\n e.stopPropagation();\n e.preventDefault();\n var url = $(this).attr(\"href \");\n if (url) handleNavigation(url, true)\n}", "title": "" }, { "docid": "fbfd54239a6784a24a608064df5b19d8", "score": "0.5983818", "text": "handleClick(event) {\n\t\t\tthis.setState({\n\t\t\t\tcurrentPage: event.target.id\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "4b4031d8fc542479a5963c2f08fa79fc", "score": "0.5983255", "text": "onClickFirst() {\n const { limit, totalResults, onChange } = this.props;\n\n onChange(\n this.calculatePagination({\n limit,\n offset: 0,\n totalResults,\n })\n );\n }", "title": "" }, { "docid": "3d379db1a27e07c068c05669734a81f7", "score": "0.5982923", "text": "function pageNumberClick(e) {\n currentPage = e.target.innerHTML;\n fetchAPI(currentPage);\n}", "title": "" }, { "docid": "016aadfdb7b96b92fb4f98f688d4c408", "score": "0.5977953", "text": "paginationChange(current, size){\n if(current !== this.state.currentPage){\n this.state.currentPage = current;\n let CRDsubset = this.state.CRDs.slice(size*(current-1), size*current);\n this.generateLayout(CRDsubset);\n }\n }", "title": "" }, { "docid": "da51e5e81334d1eaa792b38e475f7d63", "score": "0.59672934", "text": "function paginationNavigate() {\n $('.dotstyle li').on('click', function () {\n let index = $(this).attr('index');\n $('section').css('opacity', 0);\n $(`section:eq(${index})`).css('opacity', 1);\n currentPage = index;\n paginationUpdate();\n });\n}", "title": "" }, { "docid": "be30ac5e7ce0d4d89f0373b2d90b3551", "score": "0.5949336", "text": "function pageChanged(event) {\n console.log(event.target);\n // checking parent as well because if you click directly on the arrow, the event comes on a span, child of the <a>\n let pageNum = undefined;\n if (event.target.id === \"prev\" || event.target.parentElement.id === \"prev\") {\n pageNum = pageState.pageNum - 1;\n } else if (event.target.id === \"next\" || event.target.parentElement.id === \"next\") {\n pageNum = pageState.pageNum + 1;\n } else if (event.target.text && isDigits(event.target.text)) {\n pageNum = parseInt(event.target.text, 10);\n }\n if (pageNum) {\n setPageState({ ...pageState, pageChanging: true })\n getPage(pageNum);\n // startRef.current.scrollIntoView({ behavior: 'smooth' });\n // this only works sometimes in Firefox so removing for consistency\n }\n }", "title": "" }, { "docid": "f4da479c60202294965866050aab378d", "score": "0.59475356", "text": "function listenEventPageNumber() {\n let elem = document.querySelectorAll('li');\n for (let index = 0; index < elem.length; index++) {\n elem[index].addEventListener('click', ()=> {\n if (elem[index].innerText === pageSelected) {\n return;\n }\n pageSelected = elem[index].innerText;\n paginate.end = (elem[index].innerText * rangePage);\n paginate.start = ( paginate.end - rangePage);\n addCssActiveInPageSelected()\n renderUserList(listUsers());\n });\n }\n}", "title": "" }, { "docid": "2e7cd5c0d9029a11e59cca938f27f261", "score": "0.5945834", "text": "changePage(page) {\n this.props.pageChange(page);\n }", "title": "" }, { "docid": "babbb87297b6d62e206dd6d238da52bb", "score": "0.593746", "text": "pageChanger(page=this.props.datafetch.page, dir, from){\n if(from) {\n switch (from) {\n case \"username\":\n this.setState({sortByName: dir == \"asc\" ? \"desc\" : \"asc\"})\n this.props.fetchData(page, \"username\", this.state.sortByName)\n break\n case \"id\":\n this.setState({sortById: dir == \"asc\" ? \"desc\" : \"asc\"})\n this.props.fetchData(page, \"id\", this.state.sortById)\n break;\n case \"email\":\n this.setState({sortByEmail: dir == \"asc\" ? \"desc\" : \"asc\"})\n this.props.fetchData(page, \"email\", this.state.sortByEmail)\n break;\n case \"status\":\n this.setState({sortByStatus: dir == \"asc\" ? \"desc\" : \"asc\"})\n this.props.fetchData(page, \"status\", this.state.sortByStatus)\n break;\n \n default:\n return \"\"\n break;\n }\n } else {\n this.props.fetchData(page)\n }\n }", "title": "" }, { "docid": "8a152f7c86ca92e0b5dc2d5a09fa1c2f", "score": "0.59131664", "text": "paginate(event) {\n // event.PreventDefault;\n let links = $('.page');\n\n $.each(links, function(k, v) {\n $(this).removeClass('active');\n });\n\n $(links[Math.floor(getPage() - 1)]).addClass('active');\n const url = $(this).attr('href');\n }", "title": "" }, { "docid": "7a1421311f0fe94374a083a6d303035e", "score": "0.58982617", "text": "_onNavigationPagerPreviousClick(event) {\n\t\t// prevent default\n\t\tevent.preventDefault();\n\t\t// change list page\n\t\tthis._list.page -= 1;\n\t}", "title": "" }, { "docid": "45e9d5910f9e703afff2f2bdc929eff9", "score": "0.5892579", "text": "function App() {\n\n function pageChange(page, pageSize){\n console.log(page, pageSize);\n // 网络请求\n }\n\n return (\n <div className=\"App\">\n <Button type=\"primary\">Primary</Button>\n <Button>Default</Button>\n <Button type=\"dashed\">Dashed</Button>\n <Button type=\"danger\">Danger</Button>\n <Button type=\"link\">Link</Button>\n <Pagination showQuickJumper defaultCurrent={1} total={500} onChange={ pageChange }/>\n </div>\n );\n}", "title": "" }, { "docid": "e4a9a483c07c63a257ca89a2ffbce82e", "score": "0.5891891", "text": "async handleChangePage(event, page) {\n await this.setState(prevState => ({\n searchParams: {\n ...prevState.searchParams,\n page: page + 1,\n },\n }));\n this.submitSearch();\n }", "title": "" }, { "docid": "cc796fea055b99870394086b440651b1", "score": "0.5890725", "text": "render () {\n // console.log(this.state);\n // const {match: {params}} = this.props;\n const listId = this.props.match.params.listId;\n const listName = this.props.match.params.listName;\n const {per_page, total }=this.state\n let loadPagination;\n const pageNumbers = [];\n if(total > 8){\n for (let i = 1; i <= Math.ceil(total / per_page); i++) {\n pageNumbers.push(i);\n }\n } else {\n pageNumbers.push(1);\n }\n\n if(this.state.search===true){\n loadPagination = \n pageNumbers.map((numbers) => {\n return(\n <li className=\"page-item\" key={numbers} style={{display: 'inline-block'}}>\n <a className=\"page-link\" onClick={event => this.handleClicks(event, numbers)} key={numbers} id={numbers}>{numbers}</a>\n </li> \n ); \n }) \n }\n else{\n loadPagination = \n pageNumbers.map((number) => {\n return(\n <li className=\"page-item\" key={number} style={{display: 'inline-block'}}>\n <a className=\"page-link\" onClick={() => this.handleClick(number)} key={number} id={number}>{number}</a>\n </li> \n ); \n }) \n }\n \n return (\n <div>\n <button type=\"button\" className=\"btn btn-success\" data-toggle=\"modal\" data-target=\"#myModal\">Add Items</button>\n <Additem listId={listId} getItems={this.fetchItems}/>\n \n <div className=\"itemsheader\">\n <h2>{listName}'s items</h2>\n </div>\n <div className=\"form-inline align-content\">\n <form className=\"form-inline align-content\" onSubmit = {event => this.handleSearch(event, 1)}>\n <input className=\"form-control mr-sm-2\" type=\"search\" placeholder=\"Search\" aria-label=\"Search\" name=\"search\" required min=\"0\" step=\"1\"/>\n \n <button type=\"submit\"><i className=\"fa fa-search\"></i></button>\n </form>\n </div>\n\n <div className='container'>\n <table className=\"table table-hover table-striped\">\n <thead>\n <tr>\n <th>ITEM</th>\n <th>PRICE</th>\n <th colSpan=\"4\">ACTION</th>\n </tr>\n </thead> \n <tbody> \n { \n this.state.item.items?\n (this.state.item.items.map((item) => {\n return ( \n \n <tr key={item.itemid}> \n <td>{item.name}</td>\n <td>{item.price}</td> \n <td><i className=\"fa fa-edit\" data-toggle=\"modal\" data-target={`#myModals${item.itemid}`}></i></td>\n <td><i className=\"fa fa-trash\" onClick = {() => this.onDeleteClick(listId, item.itemid, item.name)}></i></td> \n <EditItem listId={listId} itemId={item.itemid} itemName={item.name} itemPrice={item.price} getItems={this.fetchItems}/> \n </tr>\n \n ); \n \n }))\n \n : null\n }\n </tbody> \n </table>\n </div>\n <ul className=\"pagination justify-content-center\">\n {loadPagination}\n </ul>\n </div>\n );\n }", "title": "" }, { "docid": "6d1fe1d2e74344f9fd36201347d90a9a", "score": "0.58885974", "text": "nextHandler() {\n if((this.page<this.totalPage) && this.page !== this.totalPage){\n this.page = this.page + 1; //increase page by 1\n this.displayRecordPerPage(this.page); \n } \n }", "title": "" }, { "docid": "d392c5bb79e3c4d0cf8e2557bf57a459", "score": "0.58856857", "text": "handlePageChange(pageNumber) {\n this.setState({activePage: pageNumber});\n }", "title": "" }, { "docid": "2374d7deb89f5c55a270cedb28915eab", "score": "0.5883582", "text": "if (!this.props.posts && !this.state.loading) {\n this.getPage(\n this.props.postsPerPage,\n this.props.paged || this.state.paged,\n this.offset\n )\n }", "title": "" }, { "docid": "dc23351f3f3e59899b33951831afa7d9", "score": "0.5875724", "text": "handleViewableItemsChanged(info) {\n this.setState({ page: info.viewableItems[0].index });\n }", "title": "" }, { "docid": "5077d746bab775c5d65c1b6b4c375165", "score": "0.58712137", "text": "function handlePagination() {\n $(\"#pagination\").on(\"click\", \"button:not('.active')\", function () {\n $.ajax({\n url: $(this).attr(\"data-link\"),\n type: \"GET\",\n success: function (result) {\n updateContent([\"#specificDate\"], result);\n handlePagination();\n handleDateClick();\n handleActionClick();\n }\n });\n });\n }", "title": "" }, { "docid": "fe9f290bd888cec39655da9987d7f588", "score": "0.58414465", "text": "next() {\n var change = this.state.page;\n this.setState({ page: ++change }, this.getApiData);\n\n }", "title": "" }, { "docid": "58cd6345d6a5bcc14adb5739995c1df6", "score": "0.5831198", "text": "pageButton(){\n let pageCount = Math.floor(this.state.visibleData.length / 10);\n let pages = [];\n const Onclick = (p) => {\n var content = slice(this.state.visibleData,p*10,(p*10)+10);\n this.setState({page:p,pageData:content});\n }\n for(let i=1 ; i <= pageCount ; i++){\n if(i == this.state.page){\n pages.push(<li className=\"active\" key = {i} onClick ={()=>{Onclick(i)}}><a href=\"#\">{i}</a></li>);\n }\n else{\n pages.push(<li key = {i}><a href=\"#\" onClick ={()=>{Onclick(i)}} >{i}</a></li>);\n }\n }\n return(\n <ul className=\"pagination\">\n {pages}\n </ul>\n )\n }", "title": "" }, { "docid": "94726968d82169b8c78c6d2741b4d41d", "score": "0.58281755", "text": "onPage(value) {\n this.model.page = value;\n }", "title": "" }, { "docid": "e1c8a3fa7c3b318c217cc0df6450fe9d", "score": "0.5809238", "text": "isMorePages(e){\n if (this.state.pagination.next_page_url != null || this.state.pagination.prev_page_url != null){\n return(\n <nav aria-label=\"Page navigation example\">\n <ul className=\"pagination justify-content-center\">\n <li className=\"page-item\">\n \t<a className=\"page-link\" onClick={this.loadFirst} aria-label=\"Previous\">\n\t\t\t\t\t\t\t\t<span aria-hidden=\"true\">&laquo;</span>\n\t\t\t\t\t\t\t\t<span className=\"sr-only\">Previous</span>\n \t</a>\n </li>\n {this.isPrevPage()}\n <li className=\"page-item\">\n\t\t\t\t\t\t\t<a className=\"page-link ActualPage\" href=\"#\" >\n\t\t\t\t\t\t\t\t{this.state.pagination.current_page}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>\n {this.isNextPage()}\n <li className=\"page-item\">\n \t<a className=\"page-link\" aria-label=\"Next\" onClick={this.loadLast}>\n\t\t\t\t\t\t\t\t<span aria-hidden=\"true\">&raquo;</span>\n\t\t\t\t\t\t\t\t<span className=\"sr-only\">Next</span>\n\t\t\t\t\t\t\t</a>\n </li>\n </ul>\n </nav>\n );\n }else{\n return;\n }\n }", "title": "" }, { "docid": "ccdff28289ca1eec6e9fb99979b49e51", "score": "0.57866895", "text": "function Pagination(props) {\n\n const useStyles = makeStyles((theme) => ({\n root: {\n '& > *': {\n marginTop: theme.spacing(2),\n },\n },\n }));\n \n const classes = useStyles();\n\n const onChangeHandler = (event, number) => {\n\n props.setcurrentItems(props.items.slice(props.itemsPerPage * (number - 1), props.itemsPerPage * number))\n }\n\n\n return (\n <React.Fragment>\n <div className={classes.root}>\n < Material_Pagination count={props.totalCount} onChange={onChangeHandler} showFirstButton showLastButton/>\n </div>\n </React.Fragment>\n\n )\n}", "title": "" }, { "docid": "c07fe1d33ed77b6f0927d040717b7339", "score": "0.5786298", "text": "function doSwitchCatPage()\n\t\t\t{\n\t\t\t\tif(state[4] == history.pagination)\n\t\t\t\t{\n\t\t\t\t\tif(state[5] != undefined && state[5] != '')\n\t\t\t\t\t{\n\t\t\t\t\t\tdoSwitchPage(parseInt(state[5]) - 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "501db4b61ca4cae78d874e2720603bb0", "score": "0.57854486", "text": "handleSelectItem(newValue){\n\n\t\tif(_isEqual(newValue, 'NEXT_PAGE')){\n\t\t\tconsole.log('go to next page', this.props.query, this.props.nextCursor)\n\t\t\tthis.performSearch(this.props.query)\n\t\t} else {\n\t\t\tthis.props.onResultSelect(newValue)\n\t\t}\n\t}", "title": "" }, { "docid": "c5979806b1a4551b971ce5f7fe12f283", "score": "0.5784902", "text": "onSortChange() {\n const sizePerPage = this.refs.productTable.state.sizePerPage;\n this.refs.productTable.handlePaginationData(1, sizePerPage);\n }", "title": "" }, { "docid": "672c6c1ed5ee33db809a3110cc53dba7", "score": "0.576527", "text": "function Pagination(props) {\n return (\n <button style={page === props.number ? {color:\"#FFE81F\"} : null} onClick={() => {setPage(props.number); window.scrollTo(0,0)}}>{props.number}</button>\n )\n }", "title": "" }, { "docid": "d48f47d3b261cd412d97abf9bdbb4080", "score": "0.5756631", "text": "function pageChanged() {\n console.log('Page changed to: ' + $scope.paginator.currentPage);\n\n /**\n * incase the user changes the page as we are fetching it should de reference the scope binding with the\n * view\n * @type {*}\n */\n var page = angular.copy($scope.paginator.currentPage);\n\n $scope.fetching = true;\n var offset = $scope.data.limit * page; //calculate pagination\n var search_query = $scope.data.search;\n\n Spotify.search([\"album\"], search_query, offset, $scope.data.limit).then(function (success) {\n $scope.fetching = false;\n console.log(success);\n\n $scope.data = success.data.albums;\n $scope.data.search = search_query;\n\n //update our paginate directive\n $scope.paginator.currentPage = page;\n\n //update our outer count of how many result fetched of total\n $scope.currentPage = success.data.albums.offset;\n\n }, function (failure) {\n console.error(failure);\n $scope.fetching = false;\n });\n\n }", "title": "" }, { "docid": "c453964ebdaabf5c3cea0d3e625592b2", "score": "0.57549816", "text": "function change_page(target, page_number) {\n let url = search_history[search_history.length - 1]\n url = url.replace(/page=[0-9]+/, 'page=' + page_number)\n axios.get(url, {headers: {Authorization: api_key}}).then(function (response) {\n search_history.push(url);\n final_page = response.data;\n page = response.data;\n load_pages_nav(final_page, page_number);\n // load_elements(final_page.results);\n load_elements_table(final_page.results);\n\n setCount(final_page.count);\n }).catch(function (error) {\n console.log(error);\n });\n\n}", "title": "" }, { "docid": "0c3a87eb32c9316b0b1da57a55075f27", "score": "0.57549214", "text": "async handleFirstPage() {\n const {\n paginationOutData: { itemsPerPage }\n } = this.state;\n const { onPropertyChange } = this.props;\n\n this.walkToFirst();\n\n this.setNextPrevButtonStatus();\n\n await this.setState({\n paginationOutData: { cursor: 1, itemsPerPage }\n });\n\n onPropertyChange({ cursor: 1, itemsPerPage });\n }", "title": "" }, { "docid": "3504dda58c6dc6db089a1288210cf55f", "score": "0.57548356", "text": "onPaginationButtonClick(callback) {\n this._parentElement.addEventListener('click', ev => {\n const btn = ev.target.closest('.btn--inline');\n //1. guard clause incase no button\n if (!btn) return;\n //2. gets the page number from the button dataset attribute -> + converts to number\n const goToPage = +btn.dataset.goto;\n //3. controlPagination is called in controller with page number\n callback(goToPage);\n });\n }", "title": "" }, { "docid": "2a8bcd28c8983262068019c673b2fb14", "score": "0.574352", "text": "onSortChange() {\n const sizePerPage = this.refs.contentTierTable.state.sizePerPage;\n this.refs.contentTierTable.handlePaginationData(1, sizePerPage);\n }", "title": "" }, { "docid": "ca28eb934d08240a844cb463bee10414", "score": "0.5724902", "text": "changePage(newPageTo){\n this.setState({currentPage: newPageTo})\n}", "title": "" }, { "docid": "4e566721f44e0899f98a6cc8b67bbf85", "score": "0.57136434", "text": "setQueryInfo() {\n\t\tconst obj = {\n\t\t\tkey: this.props.componentId,\n\t\t\tvalue: this.state.currentValue\n\t\t};\n\t\thelper.selectedSensor.setPaginationInfo(obj);\n\t}", "title": "" }, { "docid": "a8b3d8a404640128a51cefa1ff434836", "score": "0.5709204", "text": "set pageSize(pageSize){this._pageSize=pageSize;}", "title": "" }, { "docid": "a8b3d8a404640128a51cefa1ff434836", "score": "0.5709204", "text": "set pageSize(pageSize){this._pageSize=pageSize;}", "title": "" }, { "docid": "507ddc3cac306dc7de0167014c28b3ff", "score": "0.5704969", "text": "freshPaginationProps() {\n return {\n ...paginationComponentData,\n cb: (v) => {\n if (this.productOptions.page === +v || this.loading) {\n return\n }\n this.changePage(+v);\n this.getProducts();\n }\n }\n }", "title": "" }, { "docid": "3543b8898bd626d443e15006260e4d3b", "score": "0.569652", "text": "onPagination(pageData) {\n return __awaiter(this, void 0, void 0, function* () {\n pageData.pageSizeChanged = this._pageSize !== pageData.pageSize;\n this._length = pageData.length;\n this._pageIndex = pageData.pageIndex;\n this._pageSize = pageData.pageSize;\n this._previousPageIndex = pageData.previousPageIndex;\n this.paginationSubject$.next(pageData);\n });\n }", "title": "" }, { "docid": "48b03de39abd7e1172622bd4edf07f0d", "score": "0.5693291", "text": "handleNewPageBreak() {\n this.props.handleNewPageBreak(this.props.componentIdForPageBreak);\n }", "title": "" }, { "docid": "f5b037d4a038635c2a08b2ca5ea3fd00", "score": "0.56927586", "text": "fetchNextListings() {\r\n\r\n // Destruct required props and states\r\n const { categoryName, flagName, regionName } = this.props.globals;\r\n const { perpage, order, orderby, excludeCategories, excludeRegions, initialCategory } = this.props.args;\r\n const { currentCategory, currentFlag, currentRegion, page } = this.state;\r\n\r\n this.relWP.relListings()\r\n .param(categoryName, (currentCategory != false) ? currentCategory.trim().split(',') : [])\r\n .param(categoryName + '_exclude', (excludeCategories != false && currentCategory == initialCategory) ? excludeCategories.trim().split(',') : [])\r\n .param(flagName, (currentFlag != false) ? currentFlag.trim().split(',') : [])\r\n .param(regionName, (currentRegion != false) ? currentRegion.trim().split(',') : [])\r\n .param('_embed', \"1\")\r\n .order((order != false) ? order : 'asc')\r\n .orderby((orderby != false) ? orderby : 'title')\r\n .page(page)\r\n .perPage(perpage)\r\n .then((data) => {\r\n if (data.length > 0) {\r\n // Hash static keys to every listing\r\n data.forEach(listing => listing.key = uuidv3(JSON.stringify(listing), uuidv3.URL));\r\n\r\n this.setState({\r\n listings: this.state.listings.concat(data),\r\n totalPages: data._paging.totalPages,\r\n loading: false\r\n })\r\n }\r\n else {\r\n this.setState({\r\n totalPages: 0,\r\n loading: false\r\n })\r\n }\r\n })\r\n .catch((err) => {\r\n console.error(\"WP API Fetch Error - Are you requesting a path that doesn't exist?\");\r\n console.error(err);\r\n this.setState({\r\n loading: false\r\n })\r\n });\r\n }", "title": "" }, { "docid": "6df7066eaf4f9f91f8e2705a8254df6a", "score": "0.5679586", "text": "changePage(page) {\n // if not page is passed the it will move to the next page\n this._page = page || this._page + 1;\n\n // if page is out of limits return\n if (this._totalPages && this._page > this._totalPages) {\n return;\n }\n\n // get the new results\n this._getNewResults(this._input, page)\n .then((response) => response.json())\n .then((data) => {\n this._results = data.Search.map(\n (movie) =>\n new MovieItem(\n movie.imdbID,\n movie.Title,\n movie.Year,\n movie.Poster,\n movie.Director,\n movie.Writer\n )\n );\n this._totalResults = data.totalResults;\n this._totalPages =\n Math.trunc(data.totalResults / 10) + (data.totalResults % 10 ? 1 : 0);\n // emit results added event to refresh the results component\n const event = new Event(\"results-added\");\n this.dispatchEvent(event);\n })\n .catch((error) => {\n this._errorHandler(error);\n });\n }", "title": "" }, { "docid": "40234bcefe276cb1ab7317615a4eec2f", "score": "0.5670164", "text": "handleFirst(){\n this.page = 1;\n }", "title": "" }, { "docid": "6ddd5c54fb6aa3bdca09010bceeafd37", "score": "0.56692874", "text": "function handleChange(event) {\n setPostsPerPage(event.target.value);\n \n }", "title": "" }, { "docid": "0c60e8c0f737eb6ca4a55c0658a399b7", "score": "0.56602156", "text": "refreshPage(next) {\n if (next) {\n let page = this.state.page + 1;\n\n this.setState({\n page: page\n })\n\n this.displaySongs(page, this.state.search, this.state.level, this.state.game, this.state.type)\n }\n else {\n let page = this.state.page - 1;\n\n this.setState({\n page: page\n })\n\n this.displaySongs(page, this.state.search, this.state.level, this.state.game, this.state.type)\n }\n }", "title": "" }, { "docid": "7cb7021c3e6eba93b0b51fc0d176d42d", "score": "0.5656865", "text": "goToPage(event) {\r\n const clickedElem = event.target;\r\n if (clickedElem.matches('button')) {\r\n const page = Number(clickedElem.innerHTML);\r\n window.scrollTo({ top: 0, behavior: 'smooth' });\r\n\r\n if (this.currentPage === page) return;\r\n this.currentPage = page;\r\n if (this.forLibraryFlag) {\r\n this.renderlibraryPage();\r\n return;\r\n }\r\n this.fetchMovies().then(results => {\r\n this.#movies = results;\r\n this.prepareMovies();\r\n this.render();\r\n });\r\n }\r\n }", "title": "" }, { "docid": "2a9807d137abd275551cab88f30fe86d", "score": "0.5656607", "text": "handlePageChange(pageNumber) {\n\n const currentSearchParams = this.props.location.search;\n let newSearchParams = \"\";\n if (currentSearchParams == \"\") {\n newSearchParams = \"page=\" + pageNumber;\n } else {\n\n let parsed = queryString.parse(currentSearchParams);\n parsed.page = pageNumber;\n newSearchParams = $.param(parsed);\n }\n\n this.props.history.push({\n pathname: '/',\n search: newSearchParams\n })\n }", "title": "" }, { "docid": "0910a928740a9e4664e5e396b7772226", "score": "0.5651804", "text": "function Paginate({ pages, page, keyword = '' }) {\n\n // Here we are doing a little trimming and clean up to only get the 'Keyword' \n // Because for exemple in the URL the keyword => '?keyword=star&page=1' but we only want the keyword 'star' \n if (keyword) {\n keyword = keyword.split('?keyword=')[1].split('&')[0]\n }\n\n // Here we want to make sure to only 'display' the 'pagination component' only of we have 'more than' '1 pages'\n // then we want to use the array constructor to make an array out of the page number so if we have '10 pages' we will have 10 'pagination buttons'\n return (pages > 1 && (\n <Pagination className=\"d-flex justify-content-center\">\n {[...Array(pages).keys()].map((x) => (\n <LinkContainer\n key={x + 1}\n to={`store/?keyword=${keyword}&page=${x + 1}`}\n >\n <Pagination.Item variant=\"warning\" active={x + 1 === page}>{x + 1}</Pagination.Item>\n </LinkContainer>\n ))}\n </Pagination>\n )\n )\n}", "title": "" }, { "docid": "5d56b5d60d6f4d8577970ed768e63f6f", "score": "0.5650519", "text": "handlePageChange(pageNumber) {\n console.log(`active page is ${pageNumber}`);\n this.setState({ activePage: pageNumber });\n }", "title": "" }, { "docid": "18823ae29310808ee5809f9e0b85a1cd", "score": "0.5644155", "text": "handleClick(number){\n // if (this.state.next_page)\n const {match: {params}} = this.props;\n const listId = params.listId;\n axios.get(`/shoppinglists/${listId}/items?page=${number}`, {\n headers: { 'Authorization': localStorage.getItem(\"TK\") }\n })\n .then((response)=>{\n console.log(response.data)\n this.setState({\n item: response.data,\n showMessage:false,\n });\n notify.show(response.data.message, \"error\", 4000)\n\n })\n .catch(function (error) {\n if(error.response){\n const { data:{message} } = error.response;\n notify.show(message, 'error', 5000)\n }\n }); \n }", "title": "" }, { "docid": "edcf61a9b3f2973b073eaf8f29642e2b", "score": "0.56397796", "text": "previousHandler() {\n if (this.page > 1) {\n this.page = this.page - 1; //decrease page by 1\n this.displayRecordPerPage(this.page);\n }\n }", "title": "" }, { "docid": "9b5d946b74c81e1705ece9f4e9203f0a", "score": "0.5639296", "text": "changePage(num) {\n this.setState({\n pageNum: num,\n });\n }", "title": "" }, { "docid": "b248c0140f304fb7cc86aa4c4cde77d4", "score": "0.56226575", "text": "onClickBack() {\n const {\n limit,\n totalResults,\n offset,\n onChange,\n } = this.props;\n\n onChange(\n this.calculatePagination({\n limit,\n offset: offset < limit ? 0 : offset - limit,\n totalResults,\n })\n );\n }", "title": "" }, { "docid": "9f735e2095043fb2d82fd8e48b8a5ed9", "score": "0.56179863", "text": "changePageState(event){\n this.setState({page: event.target.value})\n }", "title": "" }, { "docid": "06fed38cd58795683c7ea1cf4755e434", "score": "0.56166726", "text": "function bindPaginatorEvents() {\n // Paginatorban levo gombok lekezelese\n $('#ticket-list-paginator > ul > li > a').click(\n function (event) {\n\n let oldCurrentPage = currentPage;\n // click esemeny megallitasa, igy nem fut le az A elemben megadott href attributum url keres\n event.preventDefault();\n // data-paginate-size kiolvasasa\n let paginateSize = $(this).data('paginate-size');\n if (paginateSize === 'prev') {\n // ha prev gombra nyomtak akkor csokkentjuk a \"globalis\" currentPage erteket\n currentPage--;\n } else if (paginateSize === 'next') {\n // ha next gombra nyomtak akkor noveljuk a \"globalis\" currentPage erteket\n currentPage++;\n } else {\n currentPage = parseInt(paginateSize);\n }\n if (oldCurrentPage !== currentPage) {\n // lista frissitese\n refreshTicketList();\n }\n }\n );\n }", "title": "" }, { "docid": "36271dbc5a7be9596235e75fc1d0b4f3", "score": "0.5613272", "text": "handleLast(event) {\n this.setState({\n currentPage : this.state.totalPage -1\n });\n this.getListbyPaging(this.state.totalPage -1, this.state.todosPerPage);\n }", "title": "" }, { "docid": "43d6e4b3732caecdf03e00b08ae9d62f", "score": "0.5600527", "text": "function changePage(pageSelected){\n var page = pageSelected;\n // posicion actual\n switch(page){\n case 'prev':\n if(pageProperties.pageNum !== 1){\n page = pageProperties.pageNum - 1;\n setPageProperties({\n ...pageProperties,\n pageNum: pageProperties.pageNum - 1,\n actualPages: pageProperties.pageCant <= 2 ? [1,2] \n : page > 1 ? [page-1,page,page+1] \n : [1,2,3]\n })\n }\n break;\n case 'next':\n if(pageProperties.pageNum < pageProperties.pageCant){\n page = pageProperties.pageNum + 1;\n setPageProperties({\n ...pageProperties,\n pageNum: pageProperties.pageNum + 1,\n actualPages: pageProperties.pageCant <= 2 ? [1,2] \n : page < pageProperties.pageCant ? [page-1,page,page+1] \n : [pageProperties.pageCant-2,pageProperties.pageCant-1,pageProperties.pageCant]\n })\n }\n break;\n case 'first':\n if(pageProperties.pageNum !== 1){\n page = 1;\n setPageProperties({\n ...pageProperties,\n pageNum: 1,\n actualPages: [1,2,3]\n })\n }\n break;\n case 'last':\n if(pageProperties.pageNum < pageProperties.pageCant){\n page = pageProperties.pageCant;\n setPageProperties({\n ...pageProperties,\n pageNum: pageProperties.pageCant,\n actualPages: pageProperties.pageCant <= 2 ? [1,2] \n : [pageProperties.pageCant-2,pageProperties.pageCant-1,pageProperties.pageCant]\n })\n }\n break;\n default:\n setPageProperties({\n ...pageProperties,\n pageNum: page,\n actualPages: pageProperties.pageCant <= 2 ? [1,2] \n : page === 1 ? [1,2,3] \n : page === pageProperties.pageCant ? [pageProperties.pageCant-2,pageProperties.pageCant-1,pageProperties.pageCant] \n : [page-1,page,page+1]\n })\n break;\n }\n }", "title": "" }, { "docid": "2a674dc4d9fdb92cf814728350b7fc00", "score": "0.55859727", "text": "componentWillReceiveProps(nextProps) {\r\n const { filter } = this.props\r\n if (filter.filters !== nextProps.filter.filters) {\r\n this.setState({ page: 0 })\r\n }\r\n }", "title": "" }, { "docid": "058092b687a2d1818e2e445b91ed9cc4", "score": "0.5579764", "text": "function paginate(pageNumber) {\r\n const curr = currentPage;\r\n if (pageNumber === 1) { setcurrentPage(curr + 1); }\r\n else if (curr > 1) {\r\n setcurrentPage(curr - 1);\r\n }\r\n }", "title": "" }, { "docid": "1ad7041b44451574b2830933c588dfe5", "score": "0.55782783", "text": "changePage(e) {\n\t\te.preventDefault();\n\t\tthis.props.changePage(e.target.value);\n\t}", "title": "" }, { "docid": "aceb3dbc7e5d10a60bab97ef6504eb48", "score": "0.55727565", "text": "loadMoreClicked() {\n this.setState({ page: this.state.page + 1 });\n }", "title": "" } ]
5c5af3e16b3ffa389e997f149fd1ed0e
helper function for finding the node naive because path and node are guaranteed to exist
[ { "docid": "9c0d88cdb33796191b9168f2c0881605", "score": "0.0", "text": "function find(val) {\n var node = modelTree.root();\n while (node.value() !== val) {\n if (val < node.value()) {\n node = node.left();\n } else {\n node = node.right();\n }\n }\n return node;\n }", "title": "" } ]
[ { "docid": "d223d8e8834e5fe484372475e9176402", "score": "0.733742", "text": "function findNode(t){\n\n}", "title": "" }, { "docid": "31aa54412e7008f2b445578702e92be2", "score": "0.7072077", "text": "findNode(refNodeValue) {}", "title": "" }, { "docid": "5d972db50c220fb1ec1c7c48ca46b64a", "score": "0.6889926", "text": "function findNodeWithPath(path) {\n var foundNode;\n $scope.treeData.forEach(function(node){\n if (node.data.path == path) {\n foundNode= node;\n }\n });\n return foundNode;\n }", "title": "" }, { "docid": "1ecc392f253896ac9957882d142d6b5d", "score": "0.68540245", "text": "findNode(p) {\n for (let i = this.nodes.length - 1; i >= 0; i--) {\n const n = this.nodes[i]\n if (n.contains(p)) return n\n }\n return undefined\n }", "title": "" }, { "docid": "2558bffddc477fc9a4cc3605a2d37661", "score": "0.67824906", "text": "function getNodeAtPath(nodePath)\n{ \n for (var n=0; n<nodes.length; n++)\n {\n if(nodes[n].taxonomyByName == nodePath)\n {\n return currentNode;\n }\n }\n\n return null;\n}", "title": "" }, { "docid": "d41a3d8b0cb680436551b6eb656a703e", "score": "0.66157895", "text": "function findNode(path) {\n return editor.node.findNodeByInternalPath(path)\n }", "title": "" }, { "docid": "d8e479327cc91a1de406283c57a903d5", "score": "0.6449695", "text": "function findNode(value, node) {\n if (value === node.value) return node;\n\n var _iterator12 = _createForOfIteratorHelper(node.children),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var child = _step12.value;\n\n var _node = findNode(value, child);\n\n if (_node) return _node;\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n\n return null;\n } // Return the path to the node with the given value using DFS", "title": "" }, { "docid": "e85c60383f85a95373ebd66b2ddce3cd", "score": "0.64036626", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}", "title": "" }, { "docid": "e85c60383f85a95373ebd66b2ddce3cd", "score": "0.64036626", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}", "title": "" }, { "docid": "e85c60383f85a95373ebd66b2ddce3cd", "score": "0.64036626", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}", "title": "" }, { "docid": "8672a14a5231e14b48e59add1f027844", "score": "0.63827926", "text": "getNode() {\n return null;\n }", "title": "" }, { "docid": "8643ed1e57028e2a684db982e0766fa7", "score": "0.6323865", "text": "getNodeAtIndex(index) {}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.63019043", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.63019043", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.63019043", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.63019043", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "56d5cf71696f3515b8dd09b37b26e00c", "score": "0.6267202", "text": "getNode(value) {\n let stack = [this];\n const seenValues = {};\n while (stack.length > 0) {\n const current = stack.pop();\n stack = stack.concat(current.children);\n if (current.value === value) {\n return current;\n }\n seenValues[current.value] = true;\n }\n return null;\n }", "title": "" }, { "docid": "0433ab89a608ca50f4f4d934a5ec6bc8", "score": "0.623275", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}", "title": "" }, { "docid": "5d54b96769d8ba892c0aacc7c943e57a", "score": "0.6219377", "text": "function PathToNode( root, path )\n{\n\tvar node;\n\tpath = path.replace( /(\\s|\\u00a0)+/g, ' ' );\n\t\n\t// Locate the rel node based on the path\n\t// The simple case: rel is root\n\tif ( '/' == path )\n\t\tnode = root;\n\t// Use XPath support if available (as non-Javascript it should run faster)\n\telse if ( document.evaluate )\n\t{\n\t\tpathparts = path.split( '/' );\n\t\tvar xpath = '*[' + Number( pathparts[ 1 ] ) + ']';\n\t\tfor ( var i = 2; i < pathparts.length; ++i )\n\t\t\txpath += '/*[' + Number( pathparts[ i ] ) + ']';\n\t\tvar node = document.evaluate( xpath, root, null, XPathResult.ANY_TYPE, null );\n\t\tnode = node.iterateNext( );\n\t}\n\t// Otherwise use my implementation\n\telse\n\t{\n\t\tnode = root;\n\t\tnodes = path.split( '/' );\n\t\tfor ( var i = 1; i < nodes.length; ++i )\n\t\t{\n\t\t\tvar count = Number( nodes[ i ] );\n\t\t\tfor ( node = node.firstChild; null != node; node = node.nextSibling )\n\t\t\t{\n\t\t\t\tif ( ELEMENT_NODE == node.nodeType )\n\t\t\t\t{\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tif ( 0 == count )\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( 0 != count )\n\t\t\t\treturn null;\n\t\t}\n\t}\n\treturn node;\n}", "title": "" }, { "docid": "01452a794e747a2a20027e2ccc25b18b", "score": "0.6207517", "text": "function findnodebyloc (x, y) {\n\tfor (var i = 0; i < nodes.length; i++) {\n\t\tif (nodes[i].x == x && nodes[i].y == y) {\n\t\t\treturn nodes[i];\n\t\t}\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "f0baad898f12052e038b5abb27b2c835", "score": "0.61965406", "text": "findNextNode(unit, target)\n {\n return this.findPath(unit, target)[0];\n\n }", "title": "" }, { "docid": "619ac04e8624d0ee0b401ef18b754364", "score": "0.6181624", "text": "findNode(name) {\n return this.paths.filter(n => n.source === name).pop()\n }", "title": "" }, { "docid": "289dc7fea7f8d6c9c7ec179bed74306a", "score": "0.613186", "text": "findNextAvailableNode(){\n var workingNode = null;\n var closedNodes = 0;\n this.nodes.map( ( node, i, arr )=>{\n if(this.cancel){return;} // For safety\n if(!node.open){\n closedNodes++;\n if(arr.length-1 == closedNodes){ this.reject(this.error.handle( \"closedArea\", \"Could not find path: Closed area.\", this )); this.cancel = true;}\n return;\n }\n if(!workingNode){\n workingNode = node;\n return;\n }\n if( node.totalCost < workingNode.totalCost ){\n workingNode = node;\n }\n this.analytics.nextIteration_nodeSearches++;\n });\n return workingNode;\n }", "title": "" }, { "docid": "5f1f95914fa804ce9388be9181ecc293", "score": "0.61255664", "text": "function getNode(nodeId)\n{\n for (var n=0; n<nodes.length; n++)\n {\n if(nodes[n].nodeId == nodeId)\n\t\t return nodes[n];\n }\n\n return null;\n}", "title": "" }, { "docid": "a7505472d7d2a1d61e8c9a9b9a72438c", "score": "0.6099082", "text": "findNode(data, currentNode = this.head) {\n // if no data exists just exit and return null\n if (!this.head) return null\n if (currentNode.data === data) return currentNode\n return this.findNode(data, currentNode.next)\n \n }", "title": "" }, { "docid": "75cf887934db17e6e46ed36f3aa0efe4", "score": "0.60433656", "text": "function getNextNode(path, node = path.getNode()) {\n return getSiblings(path).find((child) => child.start === node.end);\n}", "title": "" }, { "docid": "c1c098b6178c55c0b0c8c201a5f4b522", "score": "0.60177654", "text": "getNode(nw, ne, sw, se) {\n\t\tif (typeof nw === \"undefined\" || typeof ne === \"undefined\" || typeof sw === \"undefined\" || typeof se === \"undefined\")\n\t\t\tconsole.log(\"An undefined child! How did that happen?!\")\n\t\tlet index = [nw.id, ne.id, sw.id, se.id]\n\n\t\t// Node already exists with same pattern\n\t\tif (this.memo[index]) {\n\t\t\treturn this.memo[index]\n\t\t}\n\n\t\t// Create new node with specified children\n\t\tlet result = new QuadTree(this, undefined, [nw, ne, sw, se])\n\t\tthis.memo[index] = result\n\t\treturn result\n\t}", "title": "" }, { "docid": "b13bb8af6fcbc29fcb9593192aa2a928", "score": "0.6011871", "text": "function getNode(nodeName) {\n var label = element.find('span:contains(\\'' + nodeName + '\\')');\n expect(label.length).toEqual(1);\n var nodes = label.parents('.angular-ui-tree-node');\n expect(nodes.length).toBeGreaterThan(0);\n\n // Return the closest parent (these are returned first from the parents() call).\n return angular.element(nodes[0]);\n }", "title": "" }, { "docid": "8b322eda715d9c1d9ca3c5d8c1a6fa0f", "score": "0.6006841", "text": "findEmpty(node) {\n const currNode = node || { ...this.array.origin };\n const currNodeValue = this.array.get(currNode.x, currNode.y, currNode.z);\n if (!currNodeValue) {\n const currNodeNeighbourCount = countNeighbours(this.array, currNode);\n const currNodeDistance = 0;\n }\n }", "title": "" }, { "docid": "1f4490c5a552a4181ad6998cf93b43d5", "score": "0.5984923", "text": "function getNode(node, needle) {\n if (node === leaf) {\n return null;\n }\n var result = compare(needle, node.data);\n if (result < 0) {\n if (node.left !== leaf) {\n return getNode(node.left, needle);\n } else {\n return null;\n }\n } else if ( result === 0) {\n return node;\n } else {\n if (node.right !== leaf) {\n return getNode(node.right, needle);\n } else {\n return null;\n }\n }\n }", "title": "" }, { "docid": "1c24ecef732680e2a4a950a4b7a130ca", "score": "0.5974903", "text": "findNode(index) {\n\t\t// Start at the head\n\t\tlet counter = 0;\n\t\tlet currentNode = this.headNode;\n\n\t\t// Crawl until we hit index\n\t\twhile (counter < index - 1) {\n\t\t\tcurrentNode = currentNode.next;\n\t\t\t++counter;\n\n\t\t\t//console.log(currentNode);\n\t\t}\n\n\t\treturn currentNode;\n\t\t//O(n) traversal\n\t}", "title": "" }, { "docid": "c67b48f1f1cbae3852e77c8b4fdb1fc3", "score": "0.5966512", "text": "function TV2_GetNode(tree, element) {\r\n var id = element.id.replace(tree.id, \"\");\r\n id = id.toLowerCase().replace(element.type, \"\");\r\n id = tree.id + id;\r\n var node = document.getElementById(id);\r\n if (node == null) //leaf node, no \"A\" node \r\n return element;\r\n return node;\r\n}", "title": "" }, { "docid": "45c8b59a1fee5736d5ca32d9959bfb64", "score": "0.59656924", "text": "static get node() {\n return Path._node;\n }", "title": "" }, { "docid": "70d528d150f54fc22cf8109438f8ae82", "score": "0.5955898", "text": "search_node() {\r\n search_node_d3();\r\n }", "title": "" }, { "docid": "5fb1cdebfdc20e0369b875f07cde4a1f", "score": "0.594257", "text": "function getCurrentNode(){\n\n}", "title": "" }, { "docid": "80d38a5fbf8dcce44d8900a28acbcff3", "score": "0.5929963", "text": "pathExists(node1,node2){\n return Boolean(this.nodes[node1].hasOwnProperty(node2))\n }", "title": "" }, { "docid": "0fb2ac0000d4c5c0368b08f6f462053d", "score": "0.5928665", "text": "getNode(x, y) {\n if (x < 0 || x >= this.width) {\n return null;\n }\n if (y < 0 || y >= this.height) {\n return null;\n }\n return this.graph[x][y];\n }", "title": "" }, { "docid": "713af4f6ba97ba532c39eaa052c363cc", "score": "0.592772", "text": "getNthNode(index) {}", "title": "" }, { "docid": "5a1142872d3ba7221a34b99e45efbbc9", "score": "0.592731", "text": "successor(node){ \n if(node.right){\n node = node.right;\n while(node.left !== null){\n node = node.left;\n }\n return node;\n } else {\n while(node.parent !== null){\n if(node.parent.left.key === node.key) return node;\n node = node.parent;\n }\n }\n }", "title": "" }, { "docid": "5d7f8e58f75d80f00311ab558dc5c862", "score": "0.59128165", "text": "function findNode(path) {\n return editor.node.findNodeByInternalPath(path);\n } // map with all supported actions", "title": "" }, { "docid": "0e15f1d64d99d5c488b2d16e8a319d22", "score": "0.589171", "text": "function getClosestNode(node, point){\n closestNode = node;\n //Stores the y distance between the point and the node\n let dy = Math.abs(point.y - node.position.y);\n //Checks if any child is closer\n for (var i=0;i<node.children.length;i++){\n //Stores the y distance between the point and the child node\n let dyc = Math.abs(point.y - node.children[i].position.y);\n //Checks if the node's y position is closer than the current node, it then skips the checks for the node\n if (dyc > dy){continue;}\n\n //Stores whether the point is less that the size of the node\n let lesser = point.x <= node.children[i].position.x + node.children[i].boundary / 2;\n //Stores whether the point is bigger that the size of the node\n let larger = point.x >= node.children[i].position.x - node.children[i].boundary / 2;\n\n //Runs the checks for the node if it is first\n if (i == 0){\n //Checks if the position is less than the size of the node\n if (lesser){\n closestNodeParent = node;\n getClosestNode(node.children[i], point);\n return;\n }\n }\n //Runs the checks for the node if it is last\n if (i == node.children.length - 1){\n //Checks if the position is bigger than the size of the node\n if (larger){\n closestNodeParent = node;\n getClosestNode(node.children[i], point);\n return;\n }\n }\n //Checks if the poisition is in the node\n if (lesser && larger){\n closestNodeParent = node;\n getClosestNode(node.children[i], point);\n return;\n }\n }\n //It is assumed that this node is closest\n //Sets the colour of the node to red if it isn't the highlighted node\n if (node !== highlightedNode) node.strokeColour = \"red\";\n\n distanceFunction(node, point);\n}", "title": "" }, { "docid": "6e3f67bf2060eeb46b7aaa3064cac37e", "score": "0.58714473", "text": "function getNode(n) {\n // if node exists, then just return the node\n if (nodes[n]) return nodes[n];\n // if the node didn't exist before\n else {\n // create the node using createElement function, and update that in nodes' object\n nodes[n] = document.createElement(n);\n // return the node\n return nodes[n];\n }\n }", "title": "" }, { "docid": "9c1c37e931aaa0d796de8340b217d545", "score": "0.5867361", "text": "findNode(index) {\n var current = this._head;\n if (index >= 0 && index < this.length) {\n for (var i = 0; i < this.length; i++) {\n if (i === index) {\n return current;\n }\n current = current.next;\n }\n }\n return null;\n }", "title": "" }, { "docid": "acddc211dd03e91635f3f8afe6fbb5f0", "score": "0.58509266", "text": "function find_node_by_name(name) {\n nodesWithThisName = ns.filter(function(n) { return n.name == name; });\n if (1 < nodesWithThisName.length) {\n\talert('There are multiple nodes named ' + name + '! I give up.');\n } else {\n\treturn nodesWithThisName[0];\n }\n}", "title": "" }, { "docid": "d38b15402ed8399b51bc9c7d5683adcf", "score": "0.5846911", "text": "findNode(data) {\n\t\tif (this.data === data) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif ((this.right_sibling !== null) && (typeof this.right_sibling !== 'undefined')) {\n\t\t\treturn this.right_sibling.findNode(data);\n\t\t}\n\n\t\tif ((this.left_child !== null) && (typeof this.left_child !== 'undefined')) {\n\t\t\treturn this.left_child.findNode(data);\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "9b40807c55aca1607603b45b7a945c9a", "score": "0.58395016", "text": "getNode(name) {\n var matchedNode = false;\n $.each(this.nodes, function(index, node){\n if (name && node.title.toLowerCase() == name.toLowerCase()){\n matchedNode = node;\n return false;\n };\n });\n return matchedNode;\n }", "title": "" }, { "docid": "c2bc67cc2c61e2ef30ebc1fed9423680", "score": "0.5824764", "text": "function findMinNode(node) {\n if (node.left == null) {\n return node;\n }\n return this.findMinNode(node.left)\n }", "title": "" }, { "docid": "8db049ccd9cd46fea49a283715b44a74", "score": "0.5822334", "text": "getNode(node, move, piece_index) {\n let new_node = {\n squad: this.copySquad(node.squad),\n data_map: this.copyMap(node.data_map),\n move: move,\n f: 0,\n g: 0,\n h: 0,\n visited: false,\n closed: false,\n debug: \"\",\n parent: null\n }\n \n let old_x = move[0],\n old_y = move[1],\n new_x = move[2],\n new_y = move[3]\n \n new_node.data_map[new_x][new_y] = node.data_map[old_x][old_y]\n if (old_x == this.squad.king.destination.x && old_y == this.squad.king.destination.y) {\n new_node.data_map[old_x][old_y] = 8\n } else {\n new_node.data_map[old_x][old_y] = 0\n }\n \n if (piece_index == -1) {\n new_node.squad.king.x = new_x\n new_node.squad.king.y = new_y\n } else {\n new_node.squad.followers[piece_index].x = new_x\n new_node.squad.followers[piece_index].y = new_y\n }\n return new_node\n }", "title": "" }, { "docid": "9926ea9ac71cb25c2bf276ef9b0a0e78", "score": "0.5813506", "text": "function _getNodeLocation(node) {\n if (node.loc) {\n return node.loc;\n }\n if (node.location) {\n return node.location;\n }\n return null;\n}", "title": "" }, { "docid": "a82e94979ba0686fc63e20c77e471c41", "score": "0.58067775", "text": "depthFirstSearch(vertex) { return null; }", "title": "" }, { "docid": "eff9e2fdd72aff82abe51899c38f812d", "score": "0.58043975", "text": "findMinNode(node) {\n // if left of a node is null \n // then it must be minimum node \n if (node.left === null)\n return node;\n else\n return this.findMinNode(node.left);\n }", "title": "" }, { "docid": "eff9e2fdd72aff82abe51899c38f812d", "score": "0.58043975", "text": "findMinNode(node) {\n // if left of a node is null \n // then it must be minimum node \n if (node.left === null)\n return node;\n else\n return this.findMinNode(node.left);\n }", "title": "" }, { "docid": "fe870fc25d1a3185ec08800132a0ed55", "score": "0.5798732", "text": "function getPath(node) {\r\n\r\n\t// порядковый номер элемента на своем уровне\r\n\tfunction nthChild(elm) {\r\n\t\tvar childNumber = 0,\r\n\t\t\tchildNodes = elm.parentNode.childNodes;\r\n\r\n\t\tfor (var index = 0; index < childNodes.length; ++index) {\r\n\t\t\tif (childNodes[index].nodeType === 1)\r\n\t\t\t\t++childNumber;\r\n\r\n\t\t\tif (childNodes[index] === elm)\r\n\t\t\t\treturn childNumber;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction makePath(elm, rootNode, list) {\r\n\t\tvar tag = elm.tagName.toLowerCase(),\r\n\t\t\tclassName = elm.getAttribute('class'),\r\n\t\t\tid = elm.getAttribute('id'),\r\n\t\t\tselector = [tag]; // (id) ? [tag + '#' + id.trim()] : [tag];\r\n\r\n\r\n\t\tif (className)\r\n\t\t\tselector.push((\" \" + className).replace(/\\s+/g, (str) => ' .' + str.trim()));\r\n\r\n\t\tif (tag !== 'html' && tag !== 'body' && elm.parentNode) {\r\n\t\t\tvar v_nthChild = nthChild(elm);\r\n\t\t\tif (v_nthChild > 1)\r\n\t\t\t\tselector.push(':nth-child(' + v_nthChild + ')');\r\n\t\t}\r\n\r\n\t\tlist.unshift(selector.join(''));\r\n\r\n\t\tif (elm.parentNode && elm.parentNode !== rootNode && elm.parentNode.tagName) {\r\n\t\t\tmakePath(elm.parentNode, rootNode, list);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\r\n\t}\r\n\r\n\treturn makePath(node, document.body, []).join('>');\r\n\r\n}", "title": "" }, { "docid": "9fda7912d83a3115c293f719aa39f1cf", "score": "0.5792933", "text": "function isNodePathPresent(nodePath)\n{ \n for (var n=0; n<nodes.length; n++)\n {\n if(nodes[n].taxonomyByName == nodePath)\n {\n currentNode = nodes[n];\n return true;\n }\n }\n\n // we did not find the appropriate node, so return false\n return false; \n}", "title": "" }, { "docid": "10254307c2d8eebb88dcbc57ea0bb61d", "score": "0.5785951", "text": "function selectNodeByPath(nodePath)\n{ \n for (var n=0; n<nodes.length; n++)\n {\n if(nodes[n].taxonomyByName == nodePath)\n {\n currentNode = nodes[n];\n eval(nodes[n].nodeUrl);\n return true;\n }\n }\n\n // we did not find the appropriate node, so return false;\n return false;\n}", "title": "" }, { "docid": "c7fcdbbb41d368693ce0e06c9111d4fe", "score": "0.5766111", "text": "get_next_node(node) {\n while(node.get_winner() === undefined) {\n if (node.expanded()) {\n node = this.best_child(node)\n }\n else {\n return node.expand()\n }\n }\n return node\n }", "title": "" }, { "docid": "8e36648c8f018ffd007f7c4e60314204", "score": "0.5761616", "text": "function getInstanceFromNode(node){var inst=getClosestInstanceFromNode(node);if(inst!=null&&inst._hostNode===node){return inst;}else{return null;}}", "title": "" }, { "docid": "8e36648c8f018ffd007f7c4e60314204", "score": "0.5761616", "text": "function getInstanceFromNode(node){var inst=getClosestInstanceFromNode(node);if(inst!=null&&inst._hostNode===node){return inst;}else{return null;}}", "title": "" }, { "docid": "8e36648c8f018ffd007f7c4e60314204", "score": "0.5761616", "text": "function getInstanceFromNode(node){var inst=getClosestInstanceFromNode(node);if(inst!=null&&inst._hostNode===node){return inst;}else{return null;}}", "title": "" }, { "docid": "8e36648c8f018ffd007f7c4e60314204", "score": "0.5761616", "text": "function getInstanceFromNode(node){var inst=getClosestInstanceFromNode(node);if(inst!=null&&inst._hostNode===node){return inst;}else{return null;}}", "title": "" }, { "docid": "53ad331c0643bb230ae23d4173e602f0", "score": "0.5737576", "text": "getNode (col, row) {\n return {\n col,\n row,\n //isStart: row === START_NODE_ROW && col === START_NODE_COL,\n //isFinish: row === FINISH_NODE_ROW && col === FINISH_NODE_COL,\n isStart: row === this.state.row_start && col === this.state.row_finish,\n isFinish: row === this.state.col_start && col === this.state.col_finish,\n distance: Infinity,\n isVisited: false,\n isWall: false,\n previousNode: null,\n };\n }", "title": "" }, { "docid": "d2484cecb314f237e8fb7f5349cc964f", "score": "0.5737257", "text": "getNodeIndex(searchNode) {\n return this.state.graph.nodes.findIndex(node => {\n return node[NODE_KEY] === searchNode[NODE_KEY];\n });\n }", "title": "" }, { "docid": "d2484cecb314f237e8fb7f5349cc964f", "score": "0.5737257", "text": "getNodeIndex(searchNode) {\n return this.state.graph.nodes.findIndex(node => {\n return node[NODE_KEY] === searchNode[NODE_KEY];\n });\n }", "title": "" }, { "docid": "139481a2d83f80bd65b6fe770ecdae80", "score": "0.57317257", "text": "findMinNode(nNode){\r\n if(nNode.left === null){\r\n return nNode;\r\n }else{\r\n return this.findMinNode(nNode.left);\r\n }\r\n }", "title": "" }, { "docid": "2dd04b6f786493b03809758fb6d48ebe", "score": "0.57131547", "text": "findNode(edges, v) {\n if (v == this.value) return this\n const outgoing = edges.outgoing.get(this) || []\n for (const c of outgoing) {\n const result = c.findNode(edges, v)\n if (result) return result\n }\n return null\n }", "title": "" }, { "docid": "52e14ebbaf5626cd2744d2c5447d70f6", "score": "0.5709577", "text": "getNode(obj) {\n if (obj instanceof DOMArray) return obj[0];\n return obj;\n }", "title": "" }, { "docid": "1d0a87acb63969c4a59b75fd0c6c6393", "score": "0.57060665", "text": "function findSelfOrAncestor(node, match) {\n let currentNode = node;\n while (currentNode && !match(currentNode)) {\n currentNode = currentNode.parent;\n }\n return currentNode;\n }", "title": "" }, { "docid": "ac86757496ea2412f6c571978fcbde6b", "score": "0.5691796", "text": "function node() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}", "title": "" }, { "docid": "e9557af0be4c6a692497d13bb93b101d", "score": "0.5690634", "text": "function findNode(el)\n{\n// Takes element and determines if it is a treeNode.\n// If not, seeks a treeNode in its parents.\n\twhile (el != null)\n\t{\n\t\tif (el.className == \"treeNode\")\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tel = el.parentNode;\n\t\t}\n\t}\n\treturn el;\n}", "title": "" }, { "docid": "6fc8d789f83ef09e2db741de22cd99f7", "score": "0.56900567", "text": "function locateNode (vnode) {\n\t return vnode.child && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.child._vnode)\n\t : vnode\n\t}", "title": "" }, { "docid": "6fc8d789f83ef09e2db741de22cd99f7", "score": "0.56900567", "text": "function locateNode (vnode) {\n\t return vnode.child && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.child._vnode)\n\t : vnode\n\t}", "title": "" }, { "docid": "670783c8bbbcb2d86c26d7d7c44e9328", "score": "0.5688583", "text": "function locateNode (vnode) {\n return vnode.child && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.child._vnode)\n : vnode\n}", "title": "" }, { "docid": "670783c8bbbcb2d86c26d7d7c44e9328", "score": "0.5688583", "text": "function locateNode (vnode) {\n return vnode.child && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.child._vnode)\n : vnode\n}", "title": "" }, { "docid": "9a9965e2f9b656a99bb976f307a7c2e7", "score": "0.5687714", "text": "function getInternalPath(node) {\n return node.getInternalPath();\n} // helper function to get the field of a node", "title": "" }, { "docid": "da674452403be2d167401c3b4af56563", "score": "0.56811196", "text": "function getSelectedNode(id) {\n console.log('getSelectedNode', id)\n console.log('myTree', myTree)\n \n var _node = _findInTree(id,myTree,0) || null;\n \n console.log('_node',_node)\n return _node;\n } // end getSelectedNode", "title": "" }, { "docid": "3739b4a094bd441041aa0f8bbec76283", "score": "0.56789887", "text": "function searchNode(chunks, nodes, idx) {\n\t\n\n\tvar sliceIndex = idx ? idx : chunks.length;\n\tvar slicedArray = chunks.slice(0, sliceIndex);\n\n\t// search with spaces in name for node\n\tvar queryNode = slicedArray.join(' ');\n\tvar queryNodeWithUnderScore = slicedArray.join('_');\n\t// console.log(\"Searching node... \", queryNode, \" OR \", queryNodeWithUnderScore, chunks, \" Index > \", idx);\n\tvar detectedNode = '';\n\n\tnodes.forEach(function(n) {\n\t\tif(n.node.toLowerCase() === queryNode.toLowerCase()) {\n\t\t\tdetectedNode = n;\n\t\t}\n\t});\n\n\tnodes.forEach(function(n) {\n\t\tif(n.node.toLowerCase() === queryNodeWithUnderScore.toLowerCase()) {\n\t\t\t\n\t\t\tdetectedNode = n;\n\t\t}\n\t});\n\n\tif(detectedNode) {\n\t\treturn detectedNode; // return detected node\n\t} else {\n\t\tif((sliceIndex - 1) === 0) {\n\t\t\tconsole.log(\"Could not find any node.\");\n\t\t\treturn false; // could not find any node it must be a value then\n\t\t} else {\n\t\t\treturn searchNode(chunks, nodes, sliceIndex - 1);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d08027200e413a493ff610109c6841b4", "score": "0.56785965", "text": "_getChildByPath(parentNode, path) {\n let jstree = this.jstree();\n let children = this._getChildrenOf(parentNode);\n // Find the node that conforms to the largest subpath of path \n for(let i = path.length; i > 0; i--) {\n let subpath = path.slice(0, i);\n let testPathStr = _.trimRight(subpath.join('/'), ARCHIVE_MARKER);\n let result = _.find(children, (childNode) => {\n // Sometimes the node's text is not the full text (like for docker images)\n let childPath = childNode.data.fullpath;\n\n if (childPath === testPathStr || childPath === testPathStr + '/') {\n return childNode;\n }\n });\n if (result) return result;\n }\n }", "title": "" }, { "docid": "f1430a3a1c454eeac4a148f4e5cb722b", "score": "0.56705487", "text": "function findNode(value){\nvar index;\n\nfor (i=0; i< points.length; i++){\n\tif (points[i].key == value) {\n\t\tindex = i;\n\t\tbreak;\n\t\t};\n \t}\n nodes[index].icon = \"images/node_marker_blue.png\";\n nodes[index].setVisible(true);\n nodeLabels[index].show();\n return index;\n}", "title": "" }, { "docid": "bb1ffc7954e214b887399ad4f6c3dac2", "score": "0.56673396", "text": "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "title": "" }, { "docid": "bb1ffc7954e214b887399ad4f6c3dac2", "score": "0.56673396", "text": "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "title": "" }, { "docid": "bb1ffc7954e214b887399ad4f6c3dac2", "score": "0.56673396", "text": "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "title": "" }, { "docid": "bb1ffc7954e214b887399ad4f6c3dac2", "score": "0.56673396", "text": "function locateNode (vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n\t ? locateNode(vnode.componentInstance._vnode)\n\t : vnode\n\t}", "title": "" }, { "docid": "a286fe4924f32487a92baef823ec0c70", "score": "0.56620485", "text": "function findParentNode(node, test) {\n\twhile (node) {\n\t\tif (test(node)) { return node; }\n\t\tnode = node.parentNode;\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "a976f36f943647013aef6dd2d81335cc", "score": "0.566114", "text": "checkNode(i, j) {\n if (this.Nodes[i][j] == null) {\n this.Nodes[i][j] = new SimpleNode(i, j, this.current, this.current.pathlength + 1);\n this.open.push(this.Nodes[i][j]);\n } else if (this.Nodes[i][j].pathlength < this.current.parent.pathlength) {\n this.current.parent = this.Nodes[i][j];\n this.current.pathlength = this.Nodes[i][j].pathlength + 1;\n }\n }", "title": "" }, { "docid": "b6983a46b85889fe855132eac35e283d", "score": "0.5657847", "text": "function findMin(node) {\n if (node.left == null) {\n return node;\n } else {\n replacementParent = node;\n return findMin(node.left);\n };\n }", "title": "" }, { "docid": "2ef10b0636290b39b33f516e2b29c439", "score": "0.5654683", "text": "function locateNode(vnode) {\n\t return vnode.componentInstance && (!vnode.data || !vnode.data.transition) ? locateNode(vnode.componentInstance._vnode) : vnode;\n\t}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" }, { "docid": "0d557521554ff03d503ba2ee77632440", "score": "0.56544995", "text": "function locateNode (vnode) {\n return vnode.componentInstance && (!vnode.data || !vnode.data.transition)\n ? locateNode(vnode.componentInstance._vnode)\n : vnode\n}", "title": "" } ]
2231a6e756660ba268d6f3caaf7aaf6f
Delete the word that is left of the cursor, as well as any spaces or punctuation after the word.
[ { "docid": "481b5450736aec3a9dc39817a09f12cd", "score": "0.6095186", "text": "function keyCommandBackspaceWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n // If there are no words before the cursor, remove the preceding newline.\n if (offset === 0) {\n return moveSelectionBackward(strategyState, 1);\n }\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(0, offset);\n var toRemove = DraftRemovableWord.getBackward(text);\n return moveSelectionBackward(strategyState, toRemove.length || 1);\n }, 'backward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" } ]
[ { "docid": "8b1da1f9e1d43be2fe885cbf1beb539f", "score": "0.6771891", "text": "function handleSpace(x, y) {\n\n if (x === \" \") {\n\n correctWord.splice(y, 1, \" \");\n }\n\n}", "title": "" }, { "docid": "d302f8010612f8ba727f9318db1f70b1", "score": "0.6742434", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function(strategyState) {\n var selection = strategyState.getSelection(), offset = selection.getStartOffset(), key = selection.getStartKey(), content = strategyState.getCurrentContent(), text = content.getBlockForKey(key).getText().slice(offset), toRemove = DraftRemovableWord.getForward(text);\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, \"forward\");\n return afterRemoval === editorState.getCurrentContent() ? editorState : EditorState.push(editorState, afterRemoval, \"remove-range\");\n }", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "ca794fd0d1ea696074f74fd71a36cb12", "score": "0.66104734", "text": "function keyCommandDeleteWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var offset = selection.getStartOffset();\n var key = selection.getStartKey();\n var content = strategyState.getCurrentContent();\n var text = content.getBlockForKey(key).getText().slice(offset);\n var toRemove = DraftRemovableWord.getForward(text);\n\n // If there are no words in front of the cursor, remove the newline.\n return moveSelectionForward(strategyState, toRemove.length || 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n return EditorState.push(editorState, afterRemoval, 'remove-range');\n}", "title": "" }, { "docid": "e2e709787b873fe0230634547a005a3e", "score": "0.6464621", "text": "static moveBackwardOneWord() {\n const manager = TextNavigationManager.instance;\n if (manager.currentlySelecting_) {\n manager.setupDynamicSelection_(false /* resetCursor */);\n }\n EventGenerator.sendKeyPress(KeyCode.LEFT, {ctrl: true});\n }", "title": "" }, { "docid": "c89ab89ca4d8eec2daaa1d641bbeb92e", "score": "0.63228375", "text": "wordDelete (target){\n this.description = this.description.replace(target,' ')\n }", "title": "" }, { "docid": "af368bd6f206123ca0c9b55ac40b6d1a", "score": "0.61816514", "text": "function keyCommandBackspaceWord(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function(strategyState) {\n var selection = strategyState.getSelection(), offset = selection.getStartOffset();\n // If there are no words before the cursor, remove the preceding newline.\n if (0 === offset) return moveSelectionBackward(strategyState, 1);\n var key = selection.getStartKey(), content = strategyState.getCurrentContent(), text = content.getBlockForKey(key).getText().slice(0, offset), toRemove = DraftRemovableWord.getBackward(text);\n return moveSelectionBackward(strategyState, toRemove.length || 1);\n }, \"backward\");\n return afterRemoval === editorState.getCurrentContent() ? editorState : EditorState.push(editorState, afterRemoval, \"remove-range\");\n }", "title": "" }, { "docid": "fbf09d946969704bcbadc80d1e2bb496", "score": "0.60279244", "text": "static moveForwardOneWord() {\n const manager = TextNavigationManager.instance;\n if (manager.currentlySelecting_) {\n manager.setupDynamicSelection_(false /* resetCursor */);\n }\n EventGenerator.sendKeyPress(KeyCode.RIGHT, {ctrl: true});\n }", "title": "" }, { "docid": "3fb535508a7c74ce8606e1f2e359deaa", "score": "0.5996953", "text": "function remove_Lastword()\n {\n \t// get the index of last whitespace and chop off the rest part of the string, i.e. by this technique,\n \t// the last word in \"temp_str\" will get removed .\n\n \tvar lastIndex = temp_str.lastIndexOf(' ');\n \ttemp_str = temp_str.substring(0, lastIndex);\n \ttemp_str = temp_str.replace(/\\s*$/,\"\");\n }", "title": "" }, { "docid": "21004d96fa225d8a93300ec154658b9b", "score": "0.59696233", "text": "function clean_word(s) {\n\ts = s.replace(/\\./g, \" \");\n\ts = del_right_spaces(s);\n\treturn s;\n}", "title": "" }, { "docid": "582ddcd3df07a2816d74dd7ac0672e01", "score": "0.5954407", "text": "function removeWhitespace() {\n applySelectionStringChange((text) => {\n let nonWhitespaceText = \"\";\n for (const character of text) {\n switch (character) {\n case \" \":\n case \"\\t\":\n break;\n default:\n nonWhitespaceText += character;\n }\n }\n return nonWhitespaceText;\n });\n}", "title": "" }, { "docid": "b8d54600cb8f83a1def87ea454160407", "score": "0.5863569", "text": "function deleteAtCaret() {\n\n //old IE 8 and lower (hope it works - not tested)\n if (document.selection !== undefined) {\n\n //inserting some character to find the selection position\n insertAtCaret(String.fromCharCode(2622));\n var oldValue = textarea.value;\n var pos = oldValue.indexOf(String.fromCharCode(2622));\n textarea.value = oldValue.substr(0, pos) + oldValue.substr(pos + 1);\n\n //newer browsers\n } else if (textarea.selectionStart !== undefined) {\n\n var val = textarea.value,\n\t\t\t\tstart;\n\n if (textarea.selectionStart === 0) {\n start = 0;\n } else {\n start = textarea.selectionStart - 1;\n }\n textarea.value = val.substr(0, start) + val.substr(textarea.selectionEnd);\n textarea.selectionStart = start;\n textarea.selectionEnd = start;\n\n } else { //fallback\n textarea.value += letter;\n }\n\n }", "title": "" }, { "docid": "44b2ccb75fd86c36f9483a0bf7eb160a", "score": "0.58621895", "text": "function insertSpaceMaybe(pos) {\n var text = pos.getSurroundingText();\n var off = pos.getSurroundingTextOffset();\n if (off == 0) return false;\n else {\n var prev = text.getText().substring(off-1,off);\n if (prev.match(/^[a-zA-Z0-9]$/))\n pos.insertText(\" \");\n }\n}", "title": "" }, { "docid": "4733b81fb7ebc13aa46d450b223f9a6d", "score": "0.5805933", "text": "function replaceCurrentWord(pElement, pNewWord) {\n\t\t\t\tvar lCurrentPosition = getCursorPosition(addTaskElement);\n\t\t\t\tvar lText = $scope.addTaskText;\n\n\t\t\t\tvar lCurrentWord = \"\";\n\t\t\t\tvar lStartText = lCurrentPosition;\n\t\t\t\tif (lStartText > lText.length) {\n\t\t\t\t\t// Isn't on a word\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tif (lStartText > 0 && lText[lStartText] == \" \") {\n\t\t\t\t\tlStartText--;\n\t\t\t\t}\n\t\t\t\tif (lText[lStartText] == \" \") {\n\t\t\t\t\t// Isn't on a word\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\twhile (lStartText > 0 && lText[lStartText] != \" \") {\n\t\t\t\t\tlStartText--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (lText[lStartText] == \" \") {\n\t\t\t\t\tlStartText++;\n\t\t\t\t}\n\t\t\t\tvar lEndText = lStartText;\n\t\t\t\tvar lOriginalWord = \"\";\n\t\t\t\twhile (lText[lEndText] != \" \" && lEndText < lText.length) {\n\t\t\t\t\tlOriginalWord += lText[lEndText];\n\t\t\t\t\tlEndText++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar lNewText = \"\";\n\t\t\t\tif (lStartText > 0) {\n\t\t\t\t\tlNewText += $scope.addTaskText.slice(0, lStartText);\n\t\t\t\t}\n\t\t\t\tlNewText += pNewWord==null?lOriginalWord:pNewWord;\n\t\t\t\tif (lEndText < $scope.addTaskText.length) {\n\t\t\t\t\tlNewText += $scope.addTaskText.slice(lEndText);\n\t\t\t\t} else {\n\t\t\t\t\tlNewText += \" \";\n\t\t\t\t}\n\t\t\t\t$scope.addTaskText = lNewText;\n\t\t\t\tlEndText = lStartText + lNewText.length + 1;\n\t\t\t\tsetCursorPosition(pElement, lEndText);\n\t\t\t\taddTaskDropdownToggle();\n\t\t\t}", "title": "" }, { "docid": "fb0d3fe19d3dd6bce6878f552b0f5e1d", "score": "0.57998157", "text": "wordInsertAfter (target, ins){\n let result = this.description.split(' '); \n result.splice(result.indexOf(target) + 1, 0, ins); \n this.description = result.join(' ');\n }", "title": "" }, { "docid": "6e2d1242d487029d807a64d07fe1111f", "score": "0.5783499", "text": "function removeWord3() {\n var div = '.cardapio-header';\n var word = ' -';\n div = typeof (div) == 'string' ? document.querySelector(div) : div;\n div.innerHTML = div.innerHTML.replace(word, '');\n}", "title": "" }, { "docid": "261b646a922817d07fd101992110125f", "score": "0.5712464", "text": "function parseWord() {\n skipWhite();\n for (var word = []; /\\w/.exec(cur()); word.push(eat()));\n return word.join(\"\");\n }", "title": "" }, { "docid": "951d56d490d09ba54e0faf7e1a71e3fc", "score": "0.5638592", "text": "function cutLastCompleteWord(textElementHeight, textElement) {\n if (text.charAt(text.length - 1) != \" \" && restText.charAt(0) != \" \") {\n // we cut a word in half:\n // first try to move word to left side\n var firstSpacePos = restText.indexOf(\" \");\n if (firstSpacePos < 0) {\n firstSpacePos = restText.length;\n }\n var wordPostFix = restText.substring(0, firstSpacePos);\n restText = restText.substring(firstSpacePos);\n text = text + wordPostFix;\n textElement.html(text);\n }\n }", "title": "" }, { "docid": "d6705f693400c3e0e74afbca59251bca", "score": "0.56279737", "text": "function cleanWord(word){\n const PAIRS = '()[]{}'\n const newWord = word.split('').filter(letter => PAIRS.includes(letter))\n\t\t\t\t\n return newWord.join('')\n}", "title": "" }, { "docid": "ba2f977312b2b69dd3da16d3527c7dca", "score": "0.5621441", "text": "delete() {\n if (this._caretState.position.column <= 1) {\n return\n }\n let line = this._lines.get(this._caretState.position.line - 1)\n if (!line || this._caretState.position.column > line.length) {\n return\n }\n let index = line.index + this._caretState.position.column - 2\n this.setUnit(removeChar(this._tokenGroup.intervals,\n this._tokenGroup.syntaxTree, index), index)\n }", "title": "" }, { "docid": "85a2c8c2c0ea2d307fbaa500f8ac45ec", "score": "0.56185156", "text": "function removeSeparators(word) {\n return word.replace(/\\s/g, '');\n}", "title": "" }, { "docid": "bc2bd5db9ebe4fa2787aed3e84d70d7c", "score": "0.56128174", "text": "function hideWord(){\n displayWord = targetWord.slice();\n for (var i=0; i < displayWord.length; i++){\n displayWord[i] = \"_ \";\n }\n updateTargetWord();\n }", "title": "" }, { "docid": "7b32622bc5f00cce79389eb56279f59f", "score": "0.5575554", "text": "function getCurrentWord() {\n\t\t\t\tvar lCurrentPosition = getCursorPosition(addTaskElement);\n\t\t\t\tvar lText = $scope.addTaskText;\n\t\n\t\t\t\tvar lCurrentWord = \"\";\n\t\t\t\tvar lStartText = lCurrentPosition;\n\t\t\t\tif (lStartText > lText.length) {\n\t\t\t\t\t// Isn't on a word\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tif (lStartText > 0 && lText[lStartText] == \" \") {\n\t\t\t\t\tlStartText--;\n\t\t\t\t}\n\t\t\t\tif (lText[lStartText] == \" \") {\n\t\t\t\t\t// Isn't on a word\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\twhile (lStartText > 0 && lText[lStartText] != \" \") {\n\t\t\t\t\tlStartText--;\n\t\t\t\t}\n\t\t\t\tif (lText[lStartText] == \" \") {\n\t\t\t\t\tlStartText++;\n\t\t\t\t}\n\t\t\t\twhile (lText[lStartText] != \" \" && lStartText < lText.length) {\n\t\t\t\t\tlCurrentWord += lText[lStartText];\n\t\t\t\t\tlStartText++;\n\t\t\t\t}\n\t\t\t\treturn lCurrentWord;\n\t\t\t}", "title": "" }, { "docid": "68318a7e2209578f42cb673809351789", "score": "0.55635583", "text": "static moveBackwardOneChar() {\n const manager = TextNavigationManager.instance;\n if (manager.currentlySelecting_) {\n manager.setupDynamicSelection_(true /* resetCursor */);\n }\n EventGenerator.sendKeyPress(KeyCode.LEFT);\n }", "title": "" }, { "docid": "77b417eb498098d8fa11fffa2517b84f", "score": "0.5562421", "text": "function remove_first_occurrence (string, word = 0) {\n if (word == 0) return string;\n let arr = string.split(\" \");\n arr.splice(arr.indexOf(word), 1);\n return arr.join(\" \")\n}", "title": "" }, { "docid": "f71756abd8dd7e55a417bc915a0d459e", "score": "0.55594105", "text": "currentPhrase() {\n\t\tvar line = this.cursorPosition();\n\t\tvar phrase = line.text.slice(0, line.column + 1);\n\t\tphrase = phrase.removeAll(\n\t\t\t/\\n|\\t/gm,\n\t\t\t/[\\s]$/gm,\n\t\t\t/^.*[.|,|?|!]+[\\s|a-z|A-Z|0-9]/gm,\n\t\t\t/^(.*)\\s/gm\n\t\t)\n\t\tphrase = (phrase.length > 3) ? phrase : '';\n\t\treturn phrase;\n\t}", "title": "" }, { "docid": "f18de4c9ad2bf6a6e0e35522d4aedab2", "score": "0.5554288", "text": "function getCurrentWord(ed) {\n\t\t\t\tvar nodeText = ed.selection.getSel().focusNode == null ? \"\" : ed.selection.getSel().focusNode.nodeValue;\n\t\t\t\tvar positionInNode = ed.selection.getSel().focusOffset;\n\t\t\t\tif (nodeText == null || nodeText.length == 0) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tvar lastDelimiter = 0;\n\t\t\t\tfor (var i = 0; i < positionInNode; i++) {\n\t\t\t\t\tif (autocomplete_data.delimiter.indexOf(nodeText.charCodeAt(i).toString()) != -1) {\n\t\t\t\t\t\tlastDelimiter = i + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar word = nodeText.substr(lastDelimiter, positionInNode - lastDelimiter);\n\t\t\t\tvar retWord = \"\";\n\t\t\t\tif (autocomplete_data.trigger == '') {\n\t\t\t\t\tif (word.length >= autocomplete_data.minLength) {\n\t\t\t\t\t\tretWord = word;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (word.length > 0 && word.charAt(0).toString() == autocomplete_data.trigger) {\n\t\t\t\t\t\tretWord = word;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn retWord;\n\t\t\t}", "title": "" }, { "docid": "5d978f6314c5e32b4ad4570d9cf75047", "score": "0.553935", "text": "deleteForward(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n unit = 'character'\n } = options;\n editor.deleteForward(unit);\n }", "title": "" }, { "docid": "69a9ea09143e8b299df827af33be204c", "score": "0.5527278", "text": "function stopShowingWord()\r\n{\r\n setDisplayedLetter(\"\");\r\n doneShowingWord();\r\n}", "title": "" }, { "docid": "e9df7735f970d29cd2e8b622be0dde7a", "score": "0.55244446", "text": "function clean(word)\n {\n word = String(word);\n word = word.toLowerCase();\n\n var end = word[word.length-1]\n if(end == '.' || end == ',' || end == '?' || end == '!')\n {\n word = word.substr(0,word.length-1);\n }\n\n var begin = word[0]\n if(begin == '¿' || begin == '¡')\n {\n word = word.substr(1,word.length);\n }\n\n return word;\n }", "title": "" }, { "docid": "c888a61deface52f27cf4523c5c1b781", "score": "0.55151534", "text": "function m_w_word(c) {\n var line = getLineText(c);\n\n //firstPart = before cursor, secondPart = after cursor\n var firstPart = line.substring(0, c.cursorX);\n var secondPart = line.substring(c.cursorX, line.length);\n\n //split at current word end\n var secondPartSplitted = secondPart.split(' ');\n\n if (secondPartSplitted.length == 1)\n return [0, 1];\n\n //substring from cursor until next word\n var charsTilNextWord = secondPartSplitted[0];\n\n var numCharsTilNextWord = charsTilNextWord.length;\n\n return [numCharsTilNextWord, 0];\n //var nextWordIndex = firstPart.length + numCharsTilNextWord;\n}", "title": "" }, { "docid": "d3f8e17c44faa827ee2acdd958c93f67", "score": "0.5511037", "text": "function trimWordRandomly (word) {\n if (!word) return '';\n const trimLocation = Math.floor(Math.random() * (word.length - 2)) + 2;\n return word.slice(0, trimLocation);\n}", "title": "" }, { "docid": "89ea025c9c0cdf03e5a7b0f4c74bb582", "score": "0.55106", "text": "function space() {\n matchToken(Token.kinds.SPACE);\n}", "title": "" }, { "docid": "e2924abe978e679b5b3d6a761b16893c", "score": "0.5509879", "text": "function clearSelection(input) { // enl�ve les blancs en d�but et en fin de selection ; renvoie vrai si la selection nettoy�e est vide\n if (input.setSelectionRange) {\n var selectionStart = input.selectionStart;\n var selectionEnd = input.selectionEnd;\n if (!(selectionStart<selectionEnd)) return true ;\n while (input.value.charAt(selectionStart)==\" \") {\n selectionStart++;\n }\n while (input.value.charAt(selectionEnd-1)==\" \") {\n selectionEnd--;\n }\n setSelectionRange(input, selectionStart, selectionEnd);\n if (!(selectionStart<selectionEnd)) return true ;\n } else if (document.selection) {\n var range = document.selection.createRange();\n if (range.text==\"\") return true ;\n //range.expand (\"word\") ;\n while (range.text.length>0&&range.text.charAt(0)==\" \") {\n range.moveStart(\"character\",1) ;\n }\n while (range.text.length>0&&range.text.charAt(range.text.length-1)==\" \") {\n range.moveEnd(\"character\",-1) ;\n }\n range.select() ;\n if (range.text==\"\") return true ;\n }\n return false ;\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "616555240b80860a6ac1175c2bdd2bcf", "score": "0.5507231", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) {\n var selection = strategyState.getSelection();\n var content = strategyState.getCurrentContent();\n var key = selection.getAnchorKey();\n var offset = selection.getAnchorOffset();\n var charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, 'forward');\n\n if (afterRemoval === editorState.getCurrentContent()) {\n return editorState;\n }\n\n var selection = editorState.getSelection();\n\n return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range');\n}", "title": "" }, { "docid": "66177b5e7ba3234e6c09a880027772f6", "score": "0.5493727", "text": "deleteForward(editor) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var {\n unit = \"character\"\n } = options;\n editor.deleteForward(unit);\n }", "title": "" }, { "docid": "ef980ba23367d56a9fa3563d1b9ead62", "score": "0.5489479", "text": "function deleteChar() {\n display.textContent = display.textContent.toString().slice(0, -1);\n}", "title": "" }, { "docid": "d027cc612f74b347ba130bcf89022f54", "score": "0.54636735", "text": "function removeWord(word) {\n root.words.delete(word);\n let node = root;\n word.split('').forEach((ch) => {\n node = node.links.get(ch);\n node.words.delete(word);\n });\n}", "title": "" }, { "docid": "466207857f44b4ace8fd203bd1fe5e41", "score": "0.54559803", "text": "function insert(string, word, position = 0){\n let a = string.split('');\n a.splice(position, 0 , word);\n return a.join('');\n}", "title": "" }, { "docid": "3ce695056ca1d53be930f52e270e5b9f", "score": "0.54504645", "text": "function removeTheT(name){\n n=name.split(\" \");\n n.shift();\n return(n.join(\" \"));\n}", "title": "" }, { "docid": "c0d29258304e26630ba91e7956c4274d", "score": "0.5446661", "text": "reducedToSpaceSeparatedWordsOnly() {\n const separator = ' '\n const wordsOnlyForString = s => stringWithoutParenthesisForString(stringWithoutReferenceForString(s)).replace(/[\\W]+/g, separator).trim().split(separator)\n\n return new SelectedAndAdjacentText(\n wordsOnlyForString(this.selectedText).join(separator),\n wordsOnlyForString(this.textBeforeSelectedText).join(separator),\n wordsOnlyForString(this.textAfterSelectedText).join(separator)\n )\n }", "title": "" }, { "docid": "2775e494a8f336dc6ab03d0cf9f507e8", "score": "0.54442155", "text": "function locateWordEndingOnCursor()\n{\n\t// Locate word ending at cursor location.\n\tvar wordStart = TW.target.selectionStart;\n\tvar wordEnd = TW.target.selectionStart;\n\n\twhile(isAlphaNumeric(TW.target.text.charAt(wordStart - 1)))\n\t{\n\t\twordStart = wordStart - 1;\n\t}\n\n\tvar extractedWord = TW.target.text.substr(wordStart, wordEnd - wordStart);\n\tvar markedWord = TW.target.selection;\n\tvar lastGuess = extractedWord + markedWord;\n\tvar commandName = getCommandName(wordStart);\n\tvar isCommandName = false;\n\tif(wordStart > 0)\n\t{\n\t\tvar charBeforeWord = TW.target.text.substring(wordStart - 1, wordStart);\n\t\tif(charBeforeWord == \"\\\\\")\n\t\t{\n\t\t\tisCommandName = true;\n\t\t}\n\t}\n\n\treturn {wordStart: wordStart, extractedWord: extractedWord, lastGuess: lastGuess, commandName: commandName, isCommandName: isCommandName};\n}", "title": "" }, { "docid": "b62e471095ffb8114e8a572e7cf0488e", "score": "0.5443019", "text": "function trimSpace(sentText) {\n return findOneReplace(sentText, /^\\s+|\\s+$/, '');\n}", "title": "" }, { "docid": "7427352f5ea3bd76839d8d55ade5d9eb", "score": "0.5442425", "text": "function keyCommandPlainDelete(editorState) {\n var afterRemoval = removeTextWithStrategy(editorState, function(strategyState) {\n var selection = strategyState.getSelection(), content = strategyState.getCurrentContent(), key = selection.getAnchorKey(), offset = selection.getAnchorOffset(), charAhead = content.getBlockForKey(key).getText()[offset];\n return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1);\n }, \"forward\");\n if (afterRemoval === editorState.getCurrentContent()) return editorState;\n var selection = editorState.getSelection();\n return EditorState.push(editorState, afterRemoval.set(\"selectionBefore\", selection), selection.isCollapsed() ? \"delete-character\" : \"remove-range\");\n }", "title": "" }, { "docid": "3056a7b242fbf6559f79877fa393d79b", "score": "0.541317", "text": "function getLastPositionOfCurrentWord(editableDiv) {\r\n\tvar caretPos = getCaretPositionInDiv(editableDiv);\r\n\tvar curLetter = getCharAtPosInDiv(editableDiv, caretPos);\r\n\tvar curPos = caretPos;\r\n\tvar textLen = editableDiv.textContent.length;\r\n\r\n\tdo {\r\n\t\tcurPos = curPos+1;\r\n\t\tcurLetter\t= getCharAtPosInDiv(editableDiv, curPos);\r\n\r\n\t} while (curLetter != ' ' && curPos < textLen);\r\n\t// return curPos<textLen ? curPos-1:curPos-1;\r\n\treturn curPos-1;\r\n}", "title": "" }, { "docid": "5b7f22674e80a41ae35296e819fb0b3a", "score": "0.5403277", "text": "function deleteDisplay() {\n //get the index for the selection\n var selectStart = inputDisplay.selectionStart;\n if (selectStart != 0) {\n //manipulate the string in the input\n var displayStr = inputDisplay.value;\n inputDisplay.value = displayStr.slice(0, selectStart - 1) + displayStr.slice(selectStart);\n //move the cursor\n moveCursor(--selectStart);\n }\n}", "title": "" }, { "docid": "a0ce09f0aa9ae5cfb9146675aa1a7d08", "score": "0.5391785", "text": "function clear() {\n var words = sentence.words\n words.forEach(word => { word.type = '' });\n clearSelection();\n createTaggedContent(sentence.words);\n addHighlighters();\n addFastHighlighting();\n}", "title": "" }, { "docid": "e3e054801f3fcfe537477bda380f2c58", "score": "0.5389586", "text": "function guessWord() {\n term.moveTo(xOffset, termXY.getWord.y);\n term(\"Guess the word \");\n term.moveTo(xOffset, termXY.getWord.y + 1);\n term(\"(RETURN to finish)\");\n // move cursor to word input position\n term.moveTo(termXY.getWord.x, termXY.getWord.y);\n // erase what was there\n term(\" \");\n // BUG is here - cursor moves to the wrong place\n term.moveTo(termXY.getWord.x, termXY.getWord.y);\n // term(\"Here \" + termXY.getWord.x + \",\" + termXY.getWord.y);\n // term.moveTo(termXY.getWord.x, termXY.getWord.y + 5);\n // turn off the key event listener using global variable\n readWord = true;\n term.inputField({}, function (error, input) {\n if (error) {\n exitGame(term.red.str(\"\\nAn error occurred reading input field: \" + error + \"\\n\"));\n }\n else {\n if (input === theWord.word2FullString()) {\n // guessed right\n readWord = false;\n wordCompleted();\n }\n else {\n // erase the instructions\n term.moveTo(xOffset, termXY.getWord.y);\n term(\" \");\n term.moveTo(xOffset, termXY.getWord.y + 1);\n term(\" \");\n // BUG fix, erase the typing at the key input locations\n term.moveTo(termXY.input.x, termXY.input.y);\n term(\" \");\n // let user know what happened\n term.moveTo(termXY.getWord.x, termXY.getWord.y);\n term(\"Guess \\\"\" + input + \"\\\" was wrong \");\n // move cursor back to input position\n term.moveTo(termXY.input.x, termXY.input.y);\n // let the event listener work again\n readWord = false;\n }\n }\n });\n}", "title": "" }, { "docid": "e5aa5a52ff25c391b9a61b2c4476259b", "score": "0.53884065", "text": "function unHighlightWord(word) {\n if (word.includes('highlight')) {\n var clean_word = word.replace(\"highlight\", \"\");\n return clean_word;\n }\n else {\n return word;\n }\n}", "title": "" }, { "docid": "d21136b21486fdb22c7a7373b3184704", "score": "0.5381271", "text": "function truncate(str, no_words) {\r\n return str.split(\" \").splice(0,no_words).join(\" \");\r\n}", "title": "" }, { "docid": "2c86f36b2e0033971d040e69c79e1146", "score": "0.5378725", "text": "function wrapWords(el, sel, delimiter) {\n var value = delimiter + el.value.substring(sel.start, sel.end) + delimiter;\n var incStart = 1;\n var incEnd = 1;\n if (sel.start > 0 && /[^ \\t]/.test(el.value.charAt(sel.start - 1))) {\n ++incStart; ++incEnd;\n value = \" \" + value;\n }\n if (sel.end < el.value.length && /[^ \\t]/.test(el.value.charAt(sel.end))) {\n value += \" \";\n }\n sel.start += incStart; sel.end += incEnd;\n return value;\n}", "title": "" }, { "docid": "a4b94a478ae366f729f0406b091cb202", "score": "0.5372965", "text": "getFirstWord(text) {\n return text.match(/^[^\\s]+/i) ? text.match(/^[^\\s]+/i)[0] : '';\n }", "title": "" }, { "docid": "414629587b60d8c32bf6d3bc9f1dcec7", "score": "0.5362662", "text": "function refineText(text) {\n\t return text.toLowerCase().replace(/ /g, '');\n\t }", "title": "" }, { "docid": "c746233bfed9157259e1dce2ce26be18", "score": "0.53567636", "text": "function deleteLetters(letter, sentence){\n return (sentence.includes(letter)) \n ? sentence.split('').filter(value => value !== letter).join('')\n : sentence;\n}", "title": "" }, { "docid": "1874d4952717d1b475ca0277accf6136", "score": "0.5340612", "text": "function splitWord(word) {\n var n = word.split(\" \");\n return n[n.length - 1]\n}", "title": "" }, { "docid": "9e77591d7c090b5188d6a924d16cb7d4", "score": "0.5331323", "text": "removeWord() {\n\t\tvar index;\n\t\t// Note: had to establish w for scoping error\n\t\tvar w = this.currentWord;\n\t\tthis.masterAnswerArray.forEach(function(obj, i, arr) {\n\t\t\tif(w == obj.name){\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t});\n\t\tthis.masterAnswerArray.splice(index, 1);\n\t}", "title": "" }, { "docid": "fddf03fc49e661a312fde94ef720ae91", "score": "0.53279066", "text": "function newWord(word) {\n\t// return word.slice(1);\n\n\t// return word.substring(1); \n\n\t// return word.shift(1); //this working only for a array\n}", "title": "" }, { "docid": "3141c9c1e62bd238b7a43d7bf532684d", "score": "0.53182036", "text": "function removeWord(word) {\n let firstLetter = word[0];\n \n if (word.length < 2 || !firstLetter.match(/[a-z]/i)) return true;\n if (word.includes(\"'\") || word.includes(\"$\") ||\n word.includes(\"(\") || word.includes(\")\") ||\n word.includes(\"?\") || word.includes(\"!\") ||\n word.includes(\".\") || word.includes(\",\") ||\n word.includes(\"'\") || word.includes('\"') ||\n word.includes(\"/\") || word.includes('’') ||\n word.includes(\":\") || word.includes(\"%\")) return true;\n if (findWord(word).hasOwnProperty('english')) return true;\n return false;\n}", "title": "" }, { "docid": "f2bcd875c0eefe436f126ea90d51c9a5", "score": "0.53126794", "text": "function removeKeyword(word){\r\n for (let i = 0; i < keywords.length; i++){\r\n keywords[i].name === word && keywords.splice(i, 1);\r\n }\r\n //Redo the search\r\n updateKeywords();\r\n}", "title": "" }, { "docid": "2850d7fd1db254b3bbdb21d4fd032f56", "score": "0.52948445", "text": "function checkForAbbrev(evt) {\n if ( evt.key === \" \") {\n\t// Ugh... going in circles...\n\tconst ta = document.getElementById(\"current-utt\");\n\tconst startPos = ta.selectionStart;\n\tconst end = ta.selectionEnd;\n\t\n\tconst text = ta.value;\n\t// -1 is to remove the trailing space\n\tconst stringUp2Cursor = text.substring(0,startPos-1);\n\t\n\t// wordBeforeSpace will have a trailing space\n\tconst regexRes = leftWordRE.exec(stringUp2Cursor);\n\tif (regexRes === null) {\n\t return;\n\t};\n\tconst wordBeforeSpace = regexRes[0];\n\t\n\tif (abbrevMap.hasOwnProperty(wordBeforeSpace.trim())) {\n\t //console.log(wordBeforeSpace, abbrevMap[wordBeforeSpace]);\n\t // Match found. Replace abbreviation with its expansion\n\t const textBefore = text.substring(0,startPos - wordBeforeSpace.length);\n\t const textAfter = text.substring(startPos);\n\t const expansion = abbrevMap[wordBeforeSpace.trim()];\n\t \t \n\t // if first word in text, special treatment\n\t if (text.length === wordBeforeSpace.length + 1) { // + 1 = SPACE\n\t\tta.value = expansion + \" \" + textAfter.trim();\n\t }\n\t else { \n\t\tta.value = textBefore.trim() + \" \" + expansion + \" \" + textAfter.trim();\n\t };\n\t // Move cursor to directly after expanded word + 1 (space)\n\t ta.selectionEnd = (textBefore.trim() + \" \" + expansion).length + 1;\n\t};\t\n\t\n }\n}", "title": "" }, { "docid": "4d9bfb2ee1ab05988690adc239856cb6", "score": "0.5293748", "text": "function handleBrokenWordDelete( elem ) {\n elem = $(elem).closest('g');\n if ( elem.length > 0 && elem.hasClass('Word') && elem.attr('id').match(/_part[12]$/) ) {\n var\n deltext = self.cfg.textFormatter(elem.find('> .TextEquiv > .Unicode').html()).replace(/\\u00AD/g,''),\n wpart = elem.attr('id').replace(/.*(_w[^_]+_part[12])$/,'$1');\n if ( wpart.match(/1$/) )\n wpart = wpart.replace(/1$/,'2');\n else\n wpart = wpart.replace(/2$/,'1');\n elem = elem.closest('g.TextRegion').find('g[id$=\"'+wpart+'\"].wordpart');\n var\n keeptext = self.cfg.textFormatter(elem.find('> .TextEquiv > .Unicode').html()).replace(/\\u00AD/g,''),\n newtext = wpart.match(/1$/) ? keeptext+deltext : deltext+keeptext,\n newid = elem.attr('id').replace(/_part[12]$/,'');\n alert('WARNING: Due to part of broken word deletion, the other part will be updated.\\nid: '+elem.attr('id')+' => '+newid+'\\ntext: \"'+keeptext+'\" => \"'+newtext+'\"');\n elem.attr( 'id', newid );\n elem.find('> .TextEquiv > .Unicode').html( self.cfg.textParser(newtext) );\n }\n }", "title": "" }, { "docid": "25721403502c064cda2d612dd39950e2", "score": "0.5290624", "text": "function getFirstWord(word) {\n var firstWord;\n if (!word) {\n return;\n }\n if (word.indexOf(\" \") === -1) {\n firstWord = word;\n } else {\n firstWord = word.substr(0, word.indexOf(\" \"));\n }\n return firstWord;\n }", "title": "" }, { "docid": "f2b7050919e805b1a86422ad31f2cc94", "score": "0.5285594", "text": "function outdentOneSpace() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utLineUtility,\n sp: utilitymanager_1.um.TIXSelPolicy.All,\n }, function (up) { return up.intext !== '' && up.intext[0] === ' ' ?\n up.intext.substr(1) : up.intext; });\n }", "title": "" }, { "docid": "8fd7ab00cb5ebb499b9b7e44353402ef", "score": "0.5267885", "text": "function stem(word) {\n return word.replace(/\\'s$/, '');\n}", "title": "" }, { "docid": "8fd7ab00cb5ebb499b9b7e44353402ef", "score": "0.5267885", "text": "function stem(word) {\n return word.replace(/\\'s$/, '');\n}", "title": "" }, { "docid": "5d54507a411e68f6dd69f97c93daed3d", "score": "0.52414775", "text": "function stem(word) {\n return word.replace(/\\'s$/, '');\n}", "title": "" }, { "docid": "98461bcf0021b4edf35ddab1e6650cba", "score": "0.52391934", "text": "deleteBackward(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n unit = 'character'\n } = options;\n editor.deleteBackward(unit);\n }", "title": "" }, { "docid": "a463c2ad5b9f4d2bb36630428a3329a8", "score": "0.52387714", "text": "function getFirstWord(str) {\n if (str.indexOf(' ') === -1) return str;\n else return str.substr(0, str.indexOf(' '));\n}", "title": "" }, { "docid": "a87df839e3d54c2567a331fdbcf048e5", "score": "0.52336156", "text": "function scrub_whole_word(source, word, replacement) {\n\tif (word === ''){ return source; }\n\tvar pattern = new RegExp('\\\\b' + word + '\\\\b', 'gi');\n\treturn source.replace(pattern, replacement);\n}", "title": "" }, { "docid": "cf8a4b1faa37ed8a5147f25bd50a9fa4", "score": "0.52234346", "text": "function remove_first_occurrence(string, word) {\n return string.replace(string.charAt(string.indexOf(word) - 1)+word, '');\n}", "title": "" }, { "docid": "92d595e3293766d2adac3f7ed6f7dc5a", "score": "0.5222025", "text": "function removeWord2() {\n var div = '.cardapio-header';\n var word = 'Ver mais';\n div = typeof (div) == 'string' ? document.querySelector(div) : div;\n div.innerHTML = div.innerHTML.replace(word, '');\n}", "title": "" }, { "docid": "5e21dd93d8b7b4af2e6ca19eb0d31e33", "score": "0.52188647", "text": "function spacePress(){\n inputText.text = inputText.text.concat(' ');\n }", "title": "" }, { "docid": "5f5051c1248f454ba60098f6f3e52368", "score": "0.5218649", "text": "function goCharLeft(){\n setCaret(-1);\n }", "title": "" }, { "docid": "7fb97df94d879024b59ae7907ac2d121", "score": "0.5210094", "text": "function appendYayToWord(word) {\n\n }", "title": "" } ]
4e1392ac76d34e90d2a800dc40c93b4c
======================================== Used to check if a slection is made ========================================
[ { "docid": "621bce9dd70c649c5fe4e25c6bcc3af2", "score": "0.0", "text": "function checkSelection(name, value){\n\tif (value == -1) {\n \t errMessages += \"<li>\" + name + \" - Please select a choice.</li>\"; \n\t}\n\telse {\n\t\treturn true;\n\t}\n}", "title": "" } ]
[ { "docid": "809c8411ae9808c804af2aea62fecb28", "score": "0.5868046", "text": "function CornerCheck() {\n //comprobando las esquinas\n if (\n selected[0][0] &&\n called[0][0] &&\n selected[0][3] &&\n called[0][3] &&\n selected[3][0] &&\n called[3][0] &&\n selected[3][3] &&\n called[3][3]\n ) {\n hasWon = true;\n console.log(\"gano en las esquinas\");\n msg = \"Ganaste en las esquinas!\";\n return true;\n }\n}", "title": "" }, { "docid": "15279e6ddb1ff56460d10702e4cac71f", "score": "0.5761856", "text": "function checkIfComplete() {\r\n if(isComplete == false) { //here no car has won yet\r\n isComplete = true; //a car won either car1 or car2\r\n }\r\n else {\r\n place = 'second';\r\n }\r\n }", "title": "" }, { "docid": "9c7f5c2d3546befebb7b099ff4af0dc0", "score": "0.5734995", "text": "checkStatus() {\n if (this.choices.turn && this.choices.shape) {\n // if so, instantiate a new person player\n this.person = new Player(this.choices.shape);\n this.computer = new Computer(this.choices.shape);\n // and change the indicator to update the view\n this.choices.done = true;\n }\n }", "title": "" }, { "docid": "eb6b4ce88e44936b3b0f3d96e38557a5", "score": "0.57228506", "text": "ready(){\n this.crew.forEach(function(member) { \n if((member.job == \"Pilot\" && member.vehicle.type == \"Plane\") ||\n (member.job == \"Captain\" && member.vehicle.type == \"Boat\"))\n {\n console.log(`The ${member.vehicle.type} is ready to depart!`)\n } else {\n return false\n }\n })\n }", "title": "" }, { "docid": "2da7e465074358d65a9ccc8b4735330f", "score": "0.56371236", "text": "function verification() {\r\n countTrue();\r\n if (choice == 'c') {\r\n render(complete);\r\n } else if (choice == 'l') {\r\n render(laziness);\r\n } else {\r\n render(mass);\r\n }\r\n }", "title": "" }, { "docid": "7389ed278e6f4039c96ba1fb7dc76244", "score": "0.56067973", "text": "checkIsReviewPhaseComplete() {\n const {\n challenge,\n } = this.props;\n\n const allPhases = challenge.phases || [];\n\n let isReviewPhaseComplete = false;\n _.forEach(allPhases, (phase) => {\n if (phase.name === 'Review' && !phase.isOpen && moment(phase.scheduledStartDate).isBefore()) {\n isReviewPhaseComplete = true;\n }\n });\n return isReviewPhaseComplete;\n }", "title": "" }, { "docid": "d601a8a5ac2ebe132e3458100b92e226", "score": "0.56002164", "text": "function _checkResults() {\n\t\t// decrement number of moves\n\t\t_numOfMoves--;\n\t\t\n\t\t// check if moves have expired and winner has not been found\n\t\tif(_numOfMoves === 0 && !_winnerFound) {\n\t\t\t_cat = true;\n\t\t\t$(\"#outcome\").html('Cat! Click on board to start new game.');\n\t\t}\n\t\t\n\t\tif(_winnerFound) {\n\t\t\t$(\"#outcome\").html(_winner + \" is the winner! Click on board to start new game.\");\n\t\t}\n\t}", "title": "" }, { "docid": "a4b13dc8e3b528397a67f5844a9ef2ca", "score": "0.55506736", "text": "function checkIfComplete(){\n\t\tif(isComplete == false){\n\t\t\tisComplete = true;\n\t\t} else {\n\t\t\tplace = ' SEGUNDO ';\n\t\t}\n\t}", "title": "" }, { "docid": "5c6334f0e9a89bf4ffea0721ea6d847f", "score": "0.5515193", "text": "function checkCollectable(t_collectable)\n{\n \nif(dist(gameChar_world_x, gameChar_y, t_collectable.x_pos, t_collectable.y_pos) < t_collectable.size)\n {\n t_collectable.isFound = true;\n game_score += 1;\n }\n}", "title": "" }, { "docid": "035874c3d35868361d0fba429aa153f6", "score": "0.5507061", "text": "_isCaseReady() {\n let caseNumber;\n for (const role of this._roles.values()) {\n caseNumber = caseNumber || role.currentCase;\n if (role.state !== RoleState.ready || caseNumber !== role\n .currentCase) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "0ac3f5134a8e8d07182a9f00ec04034b", "score": "0.54918164", "text": "function CenterCheck() {\n //comprobando el centro\n if (\n selected[1][1] &&\n called[1][1] &&\n selected[1][2] &&\n called[1][2] &&\n selected[2][1] &&\n called[2][1] &&\n selected[2][2] &&\n called[2][2]\n ) {\n hasWon = true;\n console.log(\"gano en el centro\");\n msg = \"Ganaste en el centro!\";\n return true;\n }\n}", "title": "" }, { "docid": "2281385f2f1ac6dad07657adacfeb613", "score": "0.54906553", "text": "function checkPuzzle(){\n var re =1;\n if(solv ==0){\n for(var id in tl_p){\n if(id !=tl_p[id].ord){ re =0; break;}\n }\n }\n if(re ==1){\n cnt.drawImage(img, 0, 0, width, height);\n \n //if solved manually (-1 is auto) calls solved()\n if(solv ==0){\n solv =1;\n me.solved();\n }\n }\n }", "title": "" }, { "docid": "0369fe3abf64b0acf4f520d1c9308c56", "score": "0.5484302", "text": "function checkSolved(selection) {\n notGuessed=0;\n selection.letters.forEach(function(element) {\n \n if(element.guessed===false) {\n notGuessed++\n }\n\n })\n}", "title": "" }, { "docid": "d9cc0c7dd25641625c1d222af92b6ca8", "score": "0.5478804", "text": "function estaGirando(){\r\n\treturn idsSpinners.length > 0;\r\n}", "title": "" }, { "docid": "8f484f4112ca6b3d5d8ff57abae9b4a1", "score": "0.54723567", "text": "function checkIfNextScene (){\n\n if(currentScene === `scene1`){\n displayItemsLeft(itemChecklist.scene1Checklist);\n if(itemChecklist.scene1Checklist >=4){\n currentState = `cutscene`;\n currentScene = `scene1Transition_1`;\n generateDialogue(cutsceneDialogues.scene1TransitionDialogues_1);\n currentdialogueNbr ++;\n }\n }\n}", "title": "" }, { "docid": "c7736186bd678b35a3faac5da32199e1", "score": "0.5463078", "text": "function callback_collection_name_is_avaliable() {\n $(\"#collection-name-group\").removeClass(\"has-error has-info\").addClass(\"has-success\")\n $(\"#collection-name-group i\").removeClass().addClass(\"icon-ok-sign\")\n $(\"#collection-next\").prop('disabled', false);\n\n $(\"#id_name\").val($('#collection-name-validation').val())\n}", "title": "" }, { "docid": "551e730d7b8c0ad262f55c3feb4faa3b", "score": "0.54548347", "text": "function checkspecies(){\r\n\r\n}", "title": "" }, { "docid": "35301f69badec0a0efac0fec15dc049b", "score": "0.544446", "text": "function checkStandups() {\n var standups = getStandups();\n\n _.chain(standups).filter(standupShouldFire).pluck(\"room\").each(doStandup);\n }", "title": "" }, { "docid": "722120d1dc88816bfbfc6c2ad7ab963f", "score": "0.5442481", "text": "estavacio()\r\n{\r\n //regresa verdadero si la cola esta vacia\r\n return this.items.length == 0;\r\n}", "title": "" }, { "docid": "e3205dcd176c6e9f7ec5bb7dc0c62bea", "score": "0.54402703", "text": "function checkValidation() {\n if (snake[0].position.x <= food.position.x + 30 && snake[0].position.x >= food.position.x - 30 && snake[0].position.y <= food.position.y + 30 && snake[0].position.y >= food.position.y - 30) {\n food.remove();\n score = score + 1;\n createFood();\n addSnake();\n }\n if (snake.length > 4) {\n for (var i = 5; i < snake.length; i++) {\n if (snake[0].position.x <= snake[i].position.x + 15 && snake[0].position.x >= snake[i].position.x - 15 && snake[0].position.y <= snake[i].position.y + 15 && snake[0].position.y >= snake[i].position.y - 15) {\n snakeEnd();\n }\n }\n }\n}", "title": "" }, { "docid": "552a4480c14852c76916c974588603ee", "score": "0.5440101", "text": "function checkIfAnswer(ev){\n\t\tif(document.getElementById(currentChoice).textContent == currentSet.correctChoice)\n\t\t\tallowDrop(event);\n}", "title": "" }, { "docid": "d3e878bf5e577f53a022dd081b6e1d11", "score": "0.5438904", "text": "checkResult() {\n const MAX_ANSWERS_LENGTH = 10;\n if (this.model.isDead()) {\n this.loose();\n } else if (this.model.defineAnswersLength() === MAX_ANSWERS_LENGTH) {\n this.win();\n } else {\n this.startGame();\n }\n }", "title": "" }, { "docid": "e711d9161c697bdf7409e79a5aa56445", "score": "0.5433654", "text": "function verifyVacancy(direction, goBack) {\r\n\tif(currentRow < maxRow && currentColl + direction >= minColl && currentColl + direction <= maxColl) {\r\n\t\tif(isPositionOpen(direction, goBack)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "7a796009c6513c80844c0ab722e2ed0c", "score": "0.54243547", "text": "function truthCheck(collection, pre) {\n for (let i=0; i < collection.length; i++) {\n \t\n let obj = collection[i];\n\n if(obj[pre]) {\n continue;\n }\n else {\n return false;\n }\n }\n // all fine\n return true;\n}", "title": "" }, { "docid": "33c5671330590b4c69c34c5675924c74", "score": "0.54158676", "text": "rolesOkayForStart() {\n var pc = this.playerCount();\n return pc >= MIN_PLAYERS && (pc - this.numMafia) > SHOWDOWN_NUM;\n }", "title": "" }, { "docid": "078d60abe27a3fd92e5028269d9cf379", "score": "0.5415604", "text": "function checkResult() {\n var valCounts = [0,0,0];\n _.each($('.slot-boxes'), function(el) {\n if ($(el).position().top <= 38 && $(el).position().top > -94) {\n valCounts[1]++;\n } else if ($(el).position().top <= -94 && $(el).position().top > -216) {\n valCounts[2]++;\n } else if ($(el).position().top <= -216 && $(el).position().top > -338) {\n valCounts[0]++;\n } else {\n valCounts[1]++;\n }\n });\n\n var result;\n var beverageNames = ['coffee', 'espresso', 'tea'];\n for(var i = 0; i < valCounts.length; i++) {\n if (valCounts[i] >= 3) {\n result = beverageNames[i];\n }\n }\n\n if (result) {\n handleWinner(result);\n }\n }", "title": "" }, { "docid": "088f014be2c54122079d2527e241a163", "score": "0.5414095", "text": "function isAnySelected() {\n if (selectedAssessment == null) {\n console.log(\"isAnySelected returned false\");\n return false;\n }\n return true;\n\n\n}", "title": "" }, { "docid": "cc54047fc6af64a62abc5e422f23829d", "score": "0.5401063", "text": "checkSnakeStatus() {\n this.didSnakeEatAnApple();\n this.didSnakeHitAWall();\n this.didSnakeEatItself();\n }", "title": "" }, { "docid": "2eb994858049455dcd1f2c788b6ff4e7", "score": "0.5399137", "text": "_checkIfComplete() {\n\n\t\tif(this._matchedCards === this.rows*this.cols) {\n\n\t\t\t// Delay for the animations\n\t\t\tsetTimeout(() => {\n\n\t\t\t\talert(`You have scored ${this._score} points`);\n\n\t\t\t\tclearInterval(this._timer);\n\n\t\t\t\tthis.initGame();\n\t\t\t}, 400);\n\t\t}\n\t}", "title": "" }, { "docid": "1605285c37a49d10edf27754c41fad95", "score": "0.53900343", "text": "checkCollision(that) {\n\t\tif (that.state == \"LIVE\") {\n\t\t\tthat.parts.forEach( part => {\n\t\t\t\tconst dis = dist(part.x, part.y, this.x, this.y)\n\t\t\t\t// console.log(dis)\n\t\t\t\tif (dis < 20) {\n\t\t\t\t\tthis.state = 'DEAD'\n\t\t\t\t\treturn true\n\t\t\t\t} \n\t\t\t})\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "743d2d42a6ff9db9c90437948f111c39", "score": "0.5361384", "text": "checkReadyForSubmit(){\n if(this.checkAnswersReady() && this.checkAddressReady() && this.checkMembership()){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "efc86139cd458658b7aa40e52abfaae5", "score": "0.53195894", "text": "async validateElection(electionId) {\n //registrarId error checking here, i.e. check if valid drivers License, or state ID\n if (electionId) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "20d6db0569673a287320e6ff437b53bf", "score": "0.53165424", "text": "function checkAns(pick) {\n var ans = questionCollection[index - 1].answer;\n if (pick === ans) {\n isCorrect = true;\n score++;\n }\n else {\n isCorrect = false;\n timeLeft -= 15;\n }\n if (index < qcLength)\n renderQuestion();\n}", "title": "" }, { "docid": "2e552dd2cbfe33835460a5eac6890a2e", "score": "0.5310539", "text": "function checkSelection(){\n\t// find intersections\n\n\t// create a Ray with origin at the mouse position\n\t// and direction into the scene (camera direction)\n\tvar vector = new THREE.Vector3( mouse.x, mouse.y, 1 );\n\tprojector.unprojectVector( vector, camera );\n\tvar ray = new THREE.Raycaster( camera.position, vector.sub( camera.position ).normalize() );\n var activeEU = 0;\n\tvar activeUS = 0;\n\tvar activeCHA = 0;\n\t// create an array containing all objects in the scene with which the ray intersects\n\tvar intersects = ray.intersectObjects( targetList );\n\n\t//if an intersection is detected\n\tif ( intersects.length > 0 )\n\t{\n\t\tconsole.log(\"Hit @ \" + toString( intersects[0].point ) );\n\n\t\t//test items in selected faces array\n\t\tvar test=-1;\n\t\tselectedFaces.forEach( function(arrayItem)\n\t\t{\n\n\t\t\tif (arrayItem.object.name === \"USD\")\n\t\t\t{\n\t\t\t\tif(intersects[0].faceIndex==arrayItem.faceIndex && intersects[0].object.id==arrayItem.object.id){\n\t\t\t\t\ttest=selectedFaces.indexOf(arrayItem);\n\t\t\t\t\tconsole.log(\"False\");\n\t\t\t\t\tactiveCHA = 0;\n\t\t\t\t\t$scope.$emit(\"messageUSD\", 0);\n\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\tif (activeCHA === 0 && activeUS === 0 && activeEU)\n\t\t\t\t\t{\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminwhole.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"De-Loaded Texture for CHA\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminUSA.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"De-Loaded Texture for CHA\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (arrayItem.object.name === \"EU\")\n\t\t\t{\n\t\t\t\tif(intersects[0].faceIndex==arrayItem.faceIndex && intersects[0].object.id==arrayItem.object.id){\n\t\t\t\t\ttest=selectedFaces.indexOf(arrayItem);\n\t\t\t\t\tconsole.log(\"False\");\n\t\t\t\t\t$scope.$emit(\"messageEU\", 0);\n\t\t\t\t\tactiveCHA = 0;\n\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\tif (activeCHA === 0 && activeUS === 0 && activeEU)\n\t\t\t\t\t{\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminwhole.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"De-Loaded Texture for CHA\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminEU.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"De-Loaded Texture for CHA\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (arrayItem.object.name === \"CHA\")\n\t\t\t{\n\t\t\t\tif(intersects[0].faceIndex==arrayItem.faceIndex && intersects[0].object.id==arrayItem.object.id){\n\t\t\t\t\ttest=selectedFaces.indexOf(arrayItem);\n\t\t\t\t\tconsole.log(\"False\");\n\t\t\t\t\t$scope.$emit(\"messageCHA\", 0);\n\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\tif (activeCHA === 0 && activeUS === 0 && activeEU)\n\t\t\t\t\t{\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminwhole.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"De-Loaded Texture for CHA\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminCHA.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"De-Loaded Texture for CHA\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t}\n\n\n\n\n\t\t});\n\n\n\n\t\t//Change Touchpoint Color\n\t\t// if is a previously selected face, change the color back to green, otherswise change to blue\n\t\tif(test>=0){\n\t\t\tintersects[ 0 ].face.color=new THREE.Color( 0x17A0BF );\n\t\t\tselectedFaces.splice(test, 1);\n\n\t\t}\n\t\telse{\n\t\t\tintersects[ 0 ].face.color=new THREE.Color( 0x17A0BF );\n\t\t\tselectedFaces.push(intersects[0]);\n\t\t\tselectedFaces.forEach( function(arrayItem)\n\t\t\t{\n\t\t\t\tif (arrayItem.object.name === \"USD\")\n\t\t\t\t{\n\t\t\t\tconsole.log(\"True\");\n\t\t\t\tactiveUS = 1;\n\t\t\t\t$scope.$emit(\"messageUSD\", 1);\n if (activeUS === 1 && activeEU == 1)\n\t\t\t\t{\n\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminUSEU.png', {}, function(){\n\t\t\t\t\tconsole.log(\"Loaded Texture for USA <3 EU\")\n\t\t\t\t\t},\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t});\n\n\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\tanimate();\n\t\t\t\t}\n\t\t\t\telse if (activeUS == 1 && activeCHA === 1)\n\t\t\t\t{\n\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminUSA.png', {}, function(){\n\t\t\t\t\tconsole.log(\"Loaded Texture for USA <3 CHA\")\n\t\t\t\t\t},\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t});\n\n\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\tanimate();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminUSA.png', {}, function(){\n\t\t\t\t\tconsole.log(\"Loaded Texture for USA\")\n\t\t\t\t\t},\n\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t});\n\n\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\tanimate();\n\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t\t\telse if (arrayItem.object.name === \"EU\")\n\t\t\t\t{\n\t\t\t\t\tconsole.log(\"True\");\n\t\t\t\t\tactiveEU = 1;\n\t\t\t\t\t$scope.$emit(\"messageUEU\", 1);\n\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\tif (activeUS === 1 && activeEU == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminUSAEU.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"Loaded Texture for USA <3 EU\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\t\t\t\t\telse if (activeEU == 1 && activeCHA === 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminCHAEU.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"Loaded Texture for CHA <3 EU\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminEU.png', {}, function(){\n\t\t\t\t\t\tconsole.log(\"Loaded Texture for EU\")\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\tanimate();\n\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\telse if (arrayItem.object.name === \"CHA\")\n\t\t\t\t{\n\n\t\t\t\t\t\tconsole.log(\"True\");\n\t\t\t\t\t\tactiveCHA = 1;\n\t\t\t\t\t\t$scope.$emit(\"messageCHA\", 1);\n\t\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\t\tif (activeUS === 1 && activeCHA == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminUSAEU.png', {}, function(){\n\t\t\t\t\t\t\tconsole.log(\"Loaded Texture for USA <3 EU\")\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\t\tanimate();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (activeEU == 1 && activeCHA === 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminCHAEU.png', {}, function(){\n\t\t\t\t\t\t\tconsole.log(\"Loaded Texture for CHA < EU\")\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\t\tanimate();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar cgtxt = scene.getObjectByName(\"Earth\");\n\t\t\t\t\t\t\tcgtxt.material.map = THREE.ImageUtils.loadTexture( '../wgl3js/models/earthtextminCHA.png', {}, function(){\n\t\t\t\t\t\t\tconsole.log(\"Loaded Texture for CHA\")\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction(){\n\t\t\t\t\t\t\t\t\talert('Error Loading Texture')\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tcgtxt.material.needsUpdate = true;\n\t\t\t\t\t\t\tanimate();\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t}\n\n\t\tintersects[ 0 ].object.geometry.colorsNeedUpdate = true;\n\t}\n}", "title": "" }, { "docid": "8776e482f1b60a874754f1616342ab20", "score": "0.5309942", "text": "function isCollectionRemoving(){\r\n\t\t\treturn loadingData.REMOVING_COLLECTION;\r\n\t\t}", "title": "" }, { "docid": "560a5524ab3c8ab8e3ff939730628bfc", "score": "0.53041035", "text": "function checkCollectable(t_collectable)\n{\n collision_radious = dist(t_collectable.x_pos,t_collectable.y_pos,(gameChar_world_x),gameChar_y);\n \n if (collision_radious <= 25)\n { \n gameSounds.collected.play();\n t_collectable.isFound = true;\n game_score++;\n }\n}", "title": "" }, { "docid": "a484e44710b46dcf43425111f4dfae8e", "score": "0.5303433", "text": "function truthCheck(collection, pre) {\r\n // Is everyone being true?\r\n var isValid = true;\r\n\r\n for(var i = 0, max = collection.length; i < max; i += 1) {\r\n if(!collection[i].hasOwnProperty(pre) || !collection[i][pre]) {\r\n isValid = false;\r\n break\r\n }\r\n }\r\n\r\n return isValid;\r\n}", "title": "" }, { "docid": "2f623ed6904ed57d9fb16cb862aec59e", "score": "0.53023195", "text": "function truthCheck(collection, pre) {\n var counter = 0;\n for (var c in collection) {\n if (collection[c].hasOwnProperty(pre) && (collection[c][pre])) {\n counter++;\n }\n }\n \n return counter == collection.length;\n }", "title": "" }, { "docid": "e9582e9e62d871447c9125d081ca8a2f", "score": "0.5300323", "text": "check() {\n // Select only those rules that apply to this operation type\n const rules = getRulesForCollectionAndType(this.collectionName, this.type); // If this.doc is an ID, we will look up the doc, fetching only the fields needed.\n // To find out which fields are needed, we will combine all the `fetch` arrays from\n // all the restrictions in all the rules.\n\n if (typeof this.doc === 'string' || this.doc instanceof MongoID.ObjectID) {\n let fields = {};\n\n _.every(rules, rule => {\n const fetch = rule.combinedFetch();\n\n if (fetch === null) {\n fields = null;\n return false; // Exit loop\n }\n\n rule.combinedFetch().forEach(field => {\n fields[field] = 1;\n });\n return true;\n });\n\n let options = {};\n\n if (fields) {\n if (_.isEmpty(fields)) {\n options = {\n _id: 1\n };\n } else {\n options = {\n fields\n };\n }\n }\n\n this.doc = this.collection.findOne(this.doc, options);\n } // Loop through all defined rules for this collection. There is an OR relationship among\n // all rules for the collection, so if any \"allow\" function DO return true, we allow.\n\n\n return _.any(rules, rule => rule.allow(this.type, this.collection, this.userId, this.doc, this.modifier, ...this.args));\n }", "title": "" }, { "docid": "5e8e540eea92d3f323349819623777b8", "score": "0.5295434", "text": "checkHobbies() {\r\n if (this.posX < this.width * 0.37 && this.posY < 150) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "df80ffdfabf4892d7cbc745b6ad28f56", "score": "0.5294671", "text": "function isCollectionEditing(){\r\n\t\t\treturn loadingData.EDITING_COLLECTION;\r\n\t\t}", "title": "" }, { "docid": "b2d9b01ea6c683da2634691f3afdeb78", "score": "0.5291743", "text": "function checkcollectables(t_collectable)\n{\n\tif(dist(gameChar_world_x, gameChar_y -30 , t_collectable.x_pos, t_collectable.y_pos) < 30)\n\t{\n\t\tt_collectable.isFound = true;\n\t\tconsole.log(\"is true statement\", gameChar_world_x)\n\t}\n\t\n\n}", "title": "" }, { "docid": "1b4e848fff2476e7c27d9b5b932ac036", "score": "0.527717", "text": "checkVitals() {\n if (this.getItemCount(items.AIR) <= 0 || this.getItemCount(items.FOOD) <= 0 || this.getItemCount(items.WATER) <= 0) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "2ba0b5c34c0f4462576ed5c9c4a697e7", "score": "0.52768964", "text": "readyCheck(vcList) {\n const botUsers = vcList.filter(vcUser => vcUser.user.bot === true); \n const isEveryoneReady = (vcList.size <= this.readyCollection.size + this.skipCollection.size + botUsers.size);\n return isEveryoneReady;\n }", "title": "" }, { "docid": "742814ab8870a4906aee94cd64f40a1d", "score": "0.52763015", "text": "function checkDoneAction(){\n db.game.findOne({\"game_id\": clientSocket.gameRoom},function(err,doc){\n var done = true;\n var playerArray = doc.player_list;\n playerArray.forEach(function(player){\n if(player.finishedAction === false){\n done = false;\n }\n });\n\n if(done){\n return true;\n }\n return false;\n });\n }", "title": "" }, { "docid": "bf149c09f1ee4243f66467e95b7fea4d", "score": "0.52742606", "text": "has(element) {\n return (this.collection.indexOf(element) !== -1)\n }", "title": "" }, { "docid": "d1bb6ba7394ec09174c4294313c1d3a8", "score": "0.52720547", "text": "function viable(sch){\n\tvar i;\n\tfor(i=1; i<sch.length; i++) if(sch[i].d == sch[i-1].d && (sch[i].s < sch[i-1].e || sch[i].s == sch[i-1].s)) return false;\n\treturn true;\n}", "title": "" }, { "docid": "0939cc1c27c2dccd60773690538822a5", "score": "0.5265727", "text": "function stateCheck() {\n\n\t\tif (testItem.length !== 1) {\n\n\t\t\ttestItem.splice(currentItem, 1);\n\t\t\tcurrentItem = jRandom(testItem.length);\n\t\t\tsounds.select();\n\t\t\tphaseOne();\n\n\t\t}\n\t\telse {\n\n\t\t\tendPhase(\"complete\");\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "88a95722112329110be372377b314427", "score": "0.5264292", "text": "function checkSolution(){\n\t puzzleSolution;\n\t}", "title": "" }, { "docid": "bcaeeeb59dafc649f43b253a74a89ab8", "score": "0.526148", "text": "roomIsCreated() {\n cy.visit(\"/rooms\");\n cy.get(this.ROOM_CONT).last()\n .contains(String(this.CAT_VAL), { matchCase: false });\n cy.get(this.ROOM_CONT).last()\n .contains(String(this.NUM_VAL), {matchCase: false});\n cy.get(this.ROOM_CONT).last()\n .contains(String(this.AVAILABLE_VAL), {matchCase: false});\n cy.get(this.ROOM_CONT).last()\n .contains(String(this.PRICE_VAL), {matchCase: false});\n cy.get(this.ROOM_CONT).last()\n .contains(String(this.FEAT_VAL[0]), {matchCase: false});\n cy.get(this.ROOM_CONT).last()\n .contains(String(this.FLOOR_VAL), {matchCase: false});\n }", "title": "" }, { "docid": "f756ab7fa3fc88034800a0ad8963454d", "score": "0.5260715", "text": "function partnerReady(){\n if (arrParentManagerDDL.length == 1 && arrCESDDL.length == 1 && arrOtherDDL.length == 1) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "d5c70636f24021496d1492a3e3135faf", "score": "0.5255978", "text": "function truthCheck(collection, pre) {\n let newArr = []\n for(let i = 0; i < collection.length; i++){\n if(collection[i][pre]){\n newArr.push(collection[i][pre])\n }\n }\n if(newArr.length != collection.length){\n return false\n } \n return true;\n}", "title": "" }, { "docid": "3549fb0ee6fd630ef151ae3fdf698c67", "score": "0.52542335", "text": "function checkCollectable(t_collectable)\n{\n if(dist(gameChar_world_x, gameChar_y, t_collectable.x_pos, t_collectable.y_pos) < t_collectable.size)\n {\n t_collectable.isFound = true;\n game_score += 1;\n jumpRing.play();\n }\n \n \n}", "title": "" }, { "docid": "d8dc503593250872ef4049d6bbe61778", "score": "0.52531993", "text": "function check(){\r\n if (document.getElementById(\"metamorphosis\").checked){\r\n alert(\"Correct! There is one individual with 3 life stages.\");\r\n }\r\n else if (document.getElementById('evolution').checked){\r\n alert(\"Try again. Think about how many individuals there are and how many life stages each individual has.\"); \r\n }\r\n\r\n }", "title": "" }, { "docid": "c6c87e63392e071ee67228f3b419a198", "score": "0.5250067", "text": "function checkCollectable(t_collectable)\n{\n var d = dist(gameChar_world_x, gameChar_y, t_collectable.x_pos, t_collectable.y_pos);\n \n if(d < 23 && t_collectable.isFound == false)\n {\n t_collectable.isFound = true;\n game_score += 1;\n }\n}", "title": "" }, { "docid": "05cc4b5f53cb2199e393cd1144cfe066", "score": "0.5239456", "text": "function truthCheck (collection, pre) {\n // Is everyone being true?\n return collection.every(obj => obj[pre]);\n}", "title": "" }, { "docid": "f2068acc0bcd150a1df43a957e8434e3", "score": "0.5222255", "text": "function checkPrefectStatus(student) {\n const currentHouse = student.house;\n\n if (student.isPrefect === false && prefects[currentHouse].includes(student) === false && prefects[currentHouse].length < 2) {\n addPrefect(student, currentHouse);\n } else if (student.isPrefect === true && prefects[currentHouse].includes(student) === true && prefects[currentHouse].length >= 2) {\n revokePrefect(student, currentHouse);\n } else if (student.isPrefect === true && prefects[currentHouse].includes(student) === true && prefects[currentHouse].length < 2) {\n revokePrefect(student, currentHouse);\n } else {\n decidePrefect(student, currentHouse);\n }\n}", "title": "" }, { "docid": "dd828b6a40558a1b1c95f221567fd744", "score": "0.5218572", "text": "decision () {\n\n // console.log('length: ', this.leves.length)\n if ((this.currentIndexLevel == this.leves.length - 1)) {\n return true\n }\n return false\n }", "title": "" }, { "docid": "635cc6e3302de503e990e565248e9138", "score": "0.521773", "text": "function checkIfDone(){\n\tif(remainingSlides === 0 | remainingSlides < 0){\n\t\tconsole.log(\"DONE\");\n\t\t$(\"#quiz\").css(\"display\", \"none\");\n\t\t$(\"#results\").css(\"display\", \"block\");\n\t\tvar totalAgainstNN = liked/totalSlides*100;\n\t\tif (totalAgainstNN >= 50.0){\n\t\t\t$(\"#foragainst\").text(\"for\");\n\t\t\t$(\"#foragainst2\").text(\"for\");\n\t\t\t$(\"#magicNum\").text(Math.round(totalAgainstNN));\n\t\t\t$(\"#folksAgainstNN\").css(\"display\", \"block\");\n\t\t} else {\n\t\t\t$(\"#foragainst\").text(\"against\");\n\t\t\t$(\"#foragainst2\").text(\"against\");\n\t\t\t$(\"#magicNum\").text(Math.round(100-totalAgainstNN));\n\t\t\t$(\"#folksForNN\").css(\"display\", \"block\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "a47d7da0b4bec1599bc658a5d8a631ba", "score": "0.5215214", "text": "checker() {\n //assume we have a winner\n this.finish = true;\n\n //worst case: every hand is equal, both decks exhausted, there is no winner\n if(!this.deck1.length && !this.deck2.length) {\n this.winner = 'no winner';\n }\n //if deck1 empty, winner is player2\n else if(!this.deck1.length) {\n this.winner = 'Player 2';\n //if deck2 empty, winner is player1\n } else if(!this.deck2.length) {\n this.winner = 'Player 1';\n } else {\n //continue game\n this.finish = false;\n }\n }", "title": "" }, { "docid": "28ea666e1981e0ef0607195067877fe3", "score": "0.5208624", "text": "Check_Tie(){\r\n if (this.Find_Moves() == [] && this.Check_Win() == false){\r\n return true\r\n }else{\r\n return false\r\n }\r\n }", "title": "" }, { "docid": "cc4c391bf8a5f18302d8e89bd80129d4", "score": "0.52042985", "text": "function checkIfCompleted() {\n matchingCards++;\n\n if (matchingCards >= Math.floor(fieldSize / 2)) {\n gameCompleted = true;\n timerStop();\n gratulation();\n }\n }", "title": "" }, { "docid": "8934a121cdef4d280862cfbc393c5bde", "score": "0.5203442", "text": "function checkComplete() {\n if (listQuestion.length === Object.keys(listResult).length) {\n return true\n } else {\n return false\n }\n}", "title": "" }, { "docid": "6da6389c4d1e107289bb92893fb2333b", "score": "0.52028036", "text": "function ready() {\n return Object.keys(self.players.list).length == 2;\n }", "title": "" }, { "docid": "0b3ad66dfd8081b7de8f36c36bf0ff87", "score": "0.5201195", "text": "function isComplete(){\n if(rootCheck.checked && relativeCheck.checked){\n return rootSelAnswer != -1 && modeSelAnswer != -1 && relativeSelAnswer != -1;\n }else if (rootCheck.checked) {\n return rootSelAnswer != -1 != -1 && modeSelAnswer != -1;\n }else if (relativeCheck.checked) {\n return modeSelAnswer != -1 && relativeSelAnswer != -1;\n }else {\n return modeSelAnswer != -1;\n }\n}", "title": "" }, { "docid": "ae6b7cdd2aa0e7f2ef7e26c3a299cc2f", "score": "0.52004296", "text": "function checkDoors() {\n\tdoors.forEach(function(ele) {\n\t\tif (currentStage == ele.room) {\n\t\t\tif (player.pos.x == ele.pos.x) {\n\t\t\t\tif (player.pos.y == ele.pos.y) {\n\t\t\t\t\tcurrentStage = ele.target;\n\t\t\t\t\tstageChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "479e5a11dd0e2194477942171bac9eb5", "score": "0.5197039", "text": "static isValid(creep) {\n //Should be in home room\n if (creep.memory.home) {\n if (creep.room.name == creep.memory.home) {\n //Wait until rest of the squad members have spawned\n var squad = this.roleCall(creep);\n if (squad.attacker && squad.healer) {\n if (creep.memory.role == 'RoleRanger') {\n console.log(1);\n creep.memory.attacker = null;\n creep.memory.healer = squad.healer.id;\n }\n else {\n creep.memory.healer = null;\n creep.memory.attacker = squad.attacker.id;\n }\n return false;\n }\n else {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "0d7d69337001a67841cf286bffd83937", "score": "0.51949775", "text": "function isCompleted() {\n return cards.length === matchedCards.length;\n}", "title": "" }, { "docid": "684dee2efa74eaa04af6d007a66c5a00", "score": "0.5194223", "text": "function truthCheck(collection, pre) {\nreturn collection.every((e,i)=>{\n return (e[pre])\n})\n}", "title": "" }, { "docid": "684dee2efa74eaa04af6d007a66c5a00", "score": "0.5194223", "text": "function truthCheck(collection, pre) {\nreturn collection.every((e,i)=>{\n return (e[pre])\n})\n}", "title": "" }, { "docid": "f838100320f87a3a043091f6425af15f", "score": "0.51912844", "text": "function isValidMove(boxes) {\n\n }", "title": "" }, { "docid": "c93f8d34d33b06e8b73629a19d882fb7", "score": "0.5185582", "text": "function allIsSelected() {\n if (isQues1Selected() && isQues2Selected() && isQues3Selected() && isQues4Selected() && \n isQues5Selected() && isQues6Selected() && isQues7Selected() && isQues8Selected() && \n isQues9Selected() && isQues10Selected()) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "5b654588b3aa9d773fdac32afc258dff", "score": "0.5184922", "text": "async function canSponsorVisa(){\n\t\tlet jobObject = jobObjectArray.pop();\n\t\t//WARNING: this assumes that fuzzy match set to high precision will return either no match or a correct match. This could eventually lead to jobs being attributed to the wrong company\n\t\tlet searchResult = fuse.search(jobObject.company);\n\t\tif(searchResult.length == 0){\n\t\t\t//return console.log(\"Company '\" + jobObject.company + \"' not found in visadb\");\n\t\t\treturn console.warn(\"Company '\" + jobObject.company + \"' not found in visadb\");\n\t\t} \n\t\telse{\n\t\t\tlet companyData = searchResult[0].item;\n\t\t\tconsole.log(jobObject.company + \" has been matched to \" + companyData.name);\n\t\t\t// console.warn(jobObject);\n\t\t\tnewJob = {\n\t\t\t\t\tjobTitle: jobObject.jobTitle,\n\t\t\t\t\tsalary:\tjobObject.salary,\n\t\t\t\t\tjobLocation: jobObject.jobLocation,\n\t\t\t\t\twebsite: jobObject.website, \n\t\t\t\t\tdeadline: jobObject.deadline,\n\t\t\t\t\tcompanyName: companyData.name,\n\t\t\t };\n\t\t\tconst entryAlreadyTracked = await visadb.collection('opportunities').find(newJob).toArray();\n\t\t\tif(entryAlreadyTracked.length > 0) console.log('Job already present in collection. _id = '+ entryAlreadyTracked[0]._id);\n\t\t\telse await visadb.collection('opportunities').save(newJob);\n\t\t}\n\t}", "title": "" }, { "docid": "58e0baacf2086337e2c9d5d637c1e690", "score": "0.51815486", "text": "verify() {\n // Check for contests\n if (!this.contests || !this.contests.length) {\n throw new Error('No contests found in election: ' + this.id());\n }\n\n // Get projected totals\n let projectedContests = _.sumBy(this.get('results'), 'contests');\n let projectedCandidates = _.sumBy(this.get('results'), 'candidates');\n\n // Make sure we have projects\n if (!projectedContests) {\n return false;\n }\n\n // Count actual contests\n if (projectedContests !== this.contests.length) {\n return (\n 'Contest count did not match. Projected: ' +\n projectedContests +\n ', found: ' +\n this.contests.length\n );\n }\n\n // Count actual candidates\n let foundCandidates = _.sumBy(this.contests, c => {\n return c.candidates.length;\n });\n if (projectedCandidates !== foundCandidates) {\n return (\n 'Candidate count did not match. Projected: ' +\n projectedCandidates +\n ', found: ' +\n foundCandidates\n );\n }\n\n return true;\n }", "title": "" }, { "docid": "78c3e82461e831878e78c20eb8fe1bfa", "score": "0.51772934", "text": "checkComplete() {\n let result = true;\n for (let i = 0; i < this.solution.length; i++) {\n result = result && this.solution[i] === this.inputGates[i];\n }\n let oldComplete = this.complete;\n this.complete = result;\n if ((this.complete !== oldComplete) && this.complete) {\n bing.play();\n }\n }", "title": "" }, { "docid": "be4af358e41b1473441c9a0a890593b2", "score": "0.5174047", "text": "function checkA(obstacles){\n\treturn obstacles === \"S\";\n}", "title": "" }, { "docid": "f788aa8f4c962e74d72f10c54f714297", "score": "0.51736677", "text": "function isStartLDMCollectionState(ldmObject) {\n var ret = true;\n if(ldmObject.collection.hasStarted == true) {\n ret = false;\n } \n ldmObject.collection.hasStarted = true;\n return ret;\n}", "title": "" }, { "docid": "d5544afb48961dac64096f9bb6f78ef7", "score": "0.5172475", "text": "function checkCollectable(t_collectable) {\n\n if (dist(gameChar_world_x, gameChar_y, t_collectable.x_pos, t_collectable.y_pos) < t_collectable.width)\n\n {\n t_collectable.isFound = true;\n game_score += 1;\n }\n \n\n}", "title": "" }, { "docid": "50416476d93aa58abe6fa5fb24a314eb", "score": "0.51692766", "text": "function checkCollision() {\n snake1.checkCollision();\n if(snake2) {\n snake2.checkCollision();\n if(snake1.collidesWith(snake2)) {\n $('#ouch_girl').trigger('play');\n }\n if(snake2.collidesWith(snake1)) {\n $('#ouch_boy').trigger('play');\n }\n }\n }", "title": "" }, { "docid": "71d78b3987b4776fbe282962fdb1a658", "score": "0.5165809", "text": "checkSelected() {\n let counter = 0;\n let midAnimation = this.checkMidAnimation();\n if(!midAnimation && !this.locked){\n counter = this.setSelected(this.view.thanosPieces, counter);\n counter = this.setSelected(this.view.gamoraPieces, counter);\n if (this.selectedPiece != null)\n //console.log(\"Selected:\" + counter);\n if (counter == 1)\n return \"OK\"; //One piece selected\n else if (counter == 0) {\n this.selectedPiece.swapText();\n this.selectedPiece = null;\n return \"NOTOK\"; // No pieces selected\n }\n }\n else{\n this.deselectAllPieces();\n }\n }", "title": "" }, { "docid": "fe32dd6e13a41af0789bc556acf5ac21", "score": "0.5161529", "text": "checkSolution() {\n if (this.state.solvedRoots.length === this.state.wordRoots.length) {\n const solution = this.fillIn(null, true)\n this.setState({ answerParts: solution });\n setTimeout(() => this.props.nextQuestion(this.state.autohintOn), 1500);\n } else {\n this.setState({choices: this.randomChoices(this.state.answerParts, this.state.allRoots) }, this.autohint)\n }\n }", "title": "" }, { "docid": "99644de6d1e357ee45e90bfbae9434cc", "score": "0.515986", "text": "isEmpty() {\n return this.collection.length === 0;\n }", "title": "" }, { "docid": "601fe3c252734e477c8702612df286cc", "score": "0.51579183", "text": "function truthCheck(collection, pre) {\r\n\t\tfor (var i = 0; i < collection.length; i++) {\r\n\t\t\tif (!collection[i].hasOwnProperty(pre)) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\tif (!collection[i][pre]) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "e47c2dcb48927a676f970bff6a7e65cb", "score": "0.5156297", "text": "puzzleIsValid() {\r\n\t\ttry {\r\n\t\t\tthis.fullHouse(false, false);\r\n\t\t} catch {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "1b8bbb298a24e3599491edd3879f7324", "score": "0.51546246", "text": "function resultsReady() {\n /*console.log(\"resultsReady \", surveyStorage.allAnswers.length, (\n surveyStorage.allAnswers.length >= MIN_RES));*/\n return (surveyStorage.allAnswers.length < MIN_RES);\n }", "title": "" }, { "docid": "5db61619a188e8d09e39586371487ee2", "score": "0.51541394", "text": "function hasGoals(S) {\n return S.gs.length > 0\n}", "title": "" }, { "docid": "3cc7d57801f16da687e69d3298ab4a8b", "score": "0.5153321", "text": "isEmpty() {\n if (this.collection.length === 0) return true\n else return false\n }", "title": "" }, { "docid": "2bef45dae3915efb9d844d7d83c4b953", "score": "0.5148256", "text": "function renameCollectionCheck() {\n statusClear();\n var cid = activeCollectionId();\n var cpath = collectionPath(cid);\n\n if (collectionIsWriteProtected(cid)) {\n statusError('rename not allowed, collection is write protected: ' + cpath);\n return;\n }\n var img = getLastMarkedEntry(cid);\n if (! img) {\n statusError(\"no collection marked in: \" + cpath);\n return;\n }\n if ($(img).hasClass('imgmark')) {\n statusError(\"last marked isn't a collection in: \" + cpath);\n // clearEntryMark($(img));\n return;\n }\n var iname = getDiaName(img);\n $('#RenameCollectionModalLabel')\n .empty()\n .append('Rename collection: ' + iname);\n $('#RenameCollectionButton').click();\n}", "title": "" }, { "docid": "0b7dd4366b2cfc7c305827780f09e641", "score": "0.5132964", "text": "function _checkAi(){return true;}", "title": "" }, { "docid": "575aba0d33ece079765a99a0ac67b40f", "score": "0.5131152", "text": "get hasSelection() {\n const start = this._model.finalSelectionStart;\n const end = this._model.finalSelectionEnd;\n if (!start || !end) {\n return false;\n }\n return start[0] !== end[0] || start[1] !== end[1];\n }", "title": "" }, { "docid": "3f0ad6477fd206d79acd9463d28b7631", "score": "0.5128105", "text": "function checkOption() {\n car.src = accessories[1];\n frontWheel.src = accessories[2];\n backWheel.src = accessories[2];\n storage.src = accessories[4];\n spoiler.src = accessories[3];\n done = true;\n accessories = [];\n }", "title": "" }, { "docid": "b3da0164040f4fae08a17e86f0cdc5cf", "score": "0.5124658", "text": "function isSynced(lecture) {\n var i;\n for (i = 0; i < lecture.answerQueue.length; i++) {\n if (!lecture.answerQueue[i].synced) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "c06cbc53bccb80911d366569f9a4ea82", "score": "0.51217836", "text": "async validar(){\n var exist=false;\n await this.state.casa.forEach((c)=>{\n if(c.numero===this.numero && c.index===this.index){\n exist=true;\n }\n });\n await this.state.pichon.forEach((c)=>{\n if(c.numero===this.numero && c.index===this.index){\n exist=true;\n }\n });\n return exist;\n }", "title": "" }, { "docid": "9281d2fdb35aa6eeeb7296fa2aa9b42d", "score": "0.5121284", "text": "function checkStatus() {\n \n if (currentQuestionIndex >= questions.length) {\n endGame();\n }\n \n}", "title": "" }, { "docid": "eebce22ac672ccec585478248b181af8", "score": "0.5113104", "text": "checkDefects() {\n let count = 0;\n let value = false;\n\n //Account for when defectArea is loaded directly from URL\n if (Object.keys(this.defectAreasCompleted).length > 0) {\n for (let key in this.defectAreasCompleted) {\n if (this.defectAreasCompleted[key] === true) {\n count++;\n }\n }\n\n //Is the review scope full and all defect areas have been completed\n if (count === Object.keys(this.defectAreasCompleted).length && this.reviewScope === 'F') {\n value = true;\n }\n\n //Is review scope limited and has 1 defect area been completed\n else if (count >= 1 && this.reviewScope === 'L') {\n value = true;\n } else {\n console.log('Review Service CheckDefects - Invalid review Scope');\n }\n }\n\n return value;\n }", "title": "" }, { "docid": "416ce032ed91c74a7ec5adb80b599027", "score": "0.5111889", "text": "function checkUniqueCollectionSlug(festivalId, slug, id, res, callback){\n Collection.find({ festivalId: festivalId, collectionSlug: slug, _id: { $ne: id } }, findCollectionTypeCallback);\n function findCollectionTypeCallback(err, collectionC) {\n if (err) {\n return res.status(400).send({\n message: errorHandler.getErrorMessage(err)\n });\n } else {\n if (collectionC.length) {\n return res.status(400).send({\n message: 'Collection slug must be unique.'\n });\n } else {\n return callback(true);\n }\n }\n }\n}", "title": "" }, { "docid": "22c46d506067d6c2367979059d8abb97", "score": "0.5109311", "text": "isEmpty() {\n return _(this).collection.length === 0;\n }", "title": "" }, { "docid": "22c46d506067d6c2367979059d8abb97", "score": "0.5109311", "text": "isEmpty() {\n return _(this).collection.length === 0;\n }", "title": "" }, { "docid": "27ad137d92c9052ad624517a71a1b0cb", "score": "0.51091206", "text": "function checkVansOwned() {\n function getVansPlayer(obj){\n if(obj.type == \"vCard\" && obj.owned == \"player\" && obj.inPlay == \"yes\"){\n return true;\n }\n }\n var ownedStatusPlayer = propertyCards.filter(getVansPlayer);\n vansOwnedPlayer = ownedStatusPlayer.length;\n function getVansEnemy(obj){\n if(obj.type == \"vCard\" && obj.owned == \"enemy\" && obj.inPlay == \"yes\"){\n return true;\n }\n }\n var ownedStatusEnemy = propertyCards.filter(getVansEnemy);\n vansOwnedEnemy = ownedStatusEnemy.length;\n}", "title": "" }, { "docid": "af502954e3a0f26d02540d3f8c35768c", "score": "0.5108904", "text": "function canSchedule() {\n\n // sched is enabled if\n // 1) when mandatory langs are not published AND all mandatory langs are selected AND all mandatory langs have a release date\n // 2) OR all mandatory langs are published\n // 3) OR all mandatory langs are are scheduled for publishing\n // 4) OR there has been a persisted schedule for a variant and it has now been changed\n\n var selectedWithDates = [];\n for (var i = 0; i < vm.variants.length; i++) {\n var variant = vm.variants[i];\n\n //if the sched dates for this variant have been removed then we must allow the schedule button to be used to save the changes\n var schedCleared = (origDates[i].releaseDate && origDates[i].releaseDate !== variant.releaseDate)\n || (origDates[i].expireDate && origDates[i].expireDate !== variant.expireDate);\n if (schedCleared) {\n return true;\n }\n\n var isMandatory = variant.segment == null && variant.language && variant.language.isMandatory;\n\n //if this variant will show up in the publish-able list\n var publishable = dirtyVariantFilter(variant);\n var published = !(variant.state === \"NotCreated\" || variant.state === \"Draft\");\n var isScheduledPublished = variant.releaseDate;\n\n if (isMandatory && !published && !isScheduledPublished && (!publishable || !variant.save)) {\n //if a mandatory variant isn't published or scheduled published\n //and it's not publishable or not selected to be published\n //then we cannot continue\n\n // TODO: Show a message when this occurs\n return false;\n }\n\n if (variant.save && (variant.releaseDate || variant.expireDate)) {\n selectedWithDates.push(variant.save);\n }\n }\n return selectedWithDates.length > 0;\n }", "title": "" }, { "docid": "a321b9d86cf3f6e1d272726ba2d82e53", "score": "0.51011413", "text": "function checkCollition(){\n pipes.forEach(function(pipe){\n if(flappy.isTouching(pipe)) gameOver();\n });\n\n}", "title": "" } ]
49e9f64d13106a39a8dddd370a4996f7
Represents an element contained within the root element in dialogChangeManager thats value has been changed by an end user.
[ { "docid": "89f6b8a437b9100ca2146f51fc00fed3", "score": "0.61825556", "text": "function dialogChangedElement(elementId, originalValue, newValue) {\n this.elementId = elementId;\n this.newValue = newValue;\n this.originalValue = originalValue;\n // Ensure that the following properties are members of the instantiating object.\n dialogChangedElement.prototype.hasOwnProperty = function (value) {\n return \"elementId\" == value ||\n \"originalValue\" == value ||\n \"newValue\" == value;\n }\n}", "title": "" } ]
[ { "docid": "4b314bcf7b49a891f9ce69401f5f13b6", "score": "0.6224671", "text": "function dialogChangedElementCollection() {\n this.changedItems = [];\n // Adds a change element containing the element id, original value and new value of an element whos value has changed within dialogChangeManager().\n this.add = function (changedElement) {\n if (typeof changedElement === \"object\" &&\n changedElement.hasOwnProperty(\"elementId\") &&\n changedElement.hasOwnProperty(\"originalValue\") &&\n changedElement.hasOwnProperty(\"newValue\")) {\n this.changedItems.push(changedElement);\n }\n else\n throw new Error(\"changedElement must be of type dialogChangedElement().\");\n }\n}", "title": "" }, { "docid": "4842e55f00661fd19891ac1fb47c3d64", "score": "0.6052143", "text": "function dialogChangeManager() {\n\n var rootElementId = undefined; // String()\n var defaultElements = undefined; // { }\n var changedElements = undefined; // { }\n var inputElements = undefined; // { }\n var changedElementCollection = undefined; // dialogChangedElementCollection()\n\n // Initialzes this manager for the first time. Always call this when opening your dialog.\n this.initialize = function (elementid) {\n if (typeof elementid != \"string\")\n throw new Error(\"Parameter 'elementId' must be a string type and a valid HTML element id.\");\n\n changedElementCollection = new dialogChangedElementCollection();\n rootElementId = elementid;\n defaultElements = undefined;\n changedElements = undefined;\n inputElements = undefined;\n _initialize(elementid);\n }\n\n // Determines from the element provided if any input values have changed.\n this.isDirty = function () {\n if (changedElements == undefined)\n return false;\n if (Object.keys(changedElements).length <= 0)\n return false;\n\n // Loop through changed controls and get their values to compare against original values.\n for (var key in changedElements) {\n // Get the value from the main original control array containing all the control values and if the value have changed we know the user has modified something.\n var originalvalue = defaultElements[key];\n var changedvalue = changedElements[key];\n if (originalvalue != changedvalue)\n return true;\n }\n }\n\n // Get the default input elements contained within the element object provided in initialize.\n this.inputElements = function () {\n if (String.isNullOrEmpty(rootElementId))\n throw new Error(\"Document has not been initialized.\");\n\n var rootElement = document.getElementById(rootElementId);\n enumerateChildElements(rootElement);\n\n return inputElements == undefined ? undefined : inputElements;\n }\n\n // Gets a collection of all changed element id's their default and new values. \n this.changedElements = function () {\n changedElementCollection = new dialogChangedElementCollection();\n // Loop through changed controls and get their values to compare against original values.\n for (var key in changedElements) {\n // Get the value from the main original control array containing all the control values and if the value have changed we know the user has modified something.\n var originalvalue = defaultElements[key];\n var changedvalue = changedElements[key];\n if (originalvalue != changedvalue) {\n var changedElement = new dialogChangedElement(key, originalvalue, changedvalue);\n changedElementCollection.add(changedElement);\n }\n }\n return changedElementCollection.changedItems;\n }\n\n // Reset all elements to have their default values as when initialize was called. The document is initialized again after all values have been reset.\n this.reset = function () {\n if (String.isNullOrEmpty(rootElementId))\n throw new Error(\"Document has not been initialized.\");\n\n var changedElements = this.changedElements();\n for (var changesCount = 0; changesCount < Object.keys(changedElements).length; changesCount++) {\n var changedElement = changedElements[changesCount];\n var element = getElement(changedElement.elementId);\n var elementType = element.type;\n // Handle radio buttons by setting back to default checked item.\n if (elementType == undefined) {\n for (var optionCount = 0; optionCount < element.length; optionCount++) {\n element[optionCount].checked = element[optionCount].defaultChecked;\n }\n }\n else {\n switch (elementType.toLowerCase()) {\n case \"checkbox\":\n element.checked = changedElement.originalValue; // or defaultChecked.\n break;\n default:\n element.value = changedElement.originalValue;\n break;\n }\n }\n }\n this.initialize(rootElementId);\n }\n\n // Gets the element iether by name or id. (Can only be one of the two because this is how we stored them).\n var getElement = function (uniqueKey) {\n // Try get element by id.\n var element = document.getElementById(uniqueKey);\n\n // try get element by name.\n if (element == null)\n element = document.getElementsByName(uniqueKey);\n\n return element;\n }\n\n // Recurse through element provided and get all input controls.\n var _initialize = function (elementid) {\n // Add default values on controls if they dont exist.\n document.querySelector('#' + elementid).addEventListener('focus', function (event) {\n var element = event.target;\n var elementType = element.type.toLowerCase();\n switch (elementType) {\n case \"text\":\n case \"textarea\":\n case \"email\":\n case \"number\":\n case \"range\":\n case \"url\":\n case \"password\":\n case \"checkbox\":\n case \"radio\":\n case \"select-one\":\n // Add default value to the array of default controls.\n var uniquekey = getElementUniqueKey(element);\n addDefaultControlAndValueToArray(uniquekey, element);\n break;\n default:\n break\n }\n },\n true);\n\n // Get all child controls within the container specified.\n document.querySelector('#' + elementid).addEventListener('change', function (event) {\n // Event fired here for every element contained within element specified in parameter.\n var element = event.target;\n var elementType = element.type.toLowerCase();\n var elementValue = undefined;\n switch (elementType) {\n case \"text\":\n case \"textarea\":\n case \"email\":\n case \"number\":\n case \"range\":\n case \"url\":\n case \"password\":\n addChangedControlToArray(element, element.value);\n break;\n case \"select-one\":\n addChangedControlToArray(element, element.options[element.selectedIndex].value);\n break;\n case \"checkbox\":\n addChangedControlToArray(element, element.checked);\n break;\n case \"radio\":\n addChangedControlToArray(element, element.checked);\n break;\n default:\n break\n }\n },\n true);\n }\n\n // Adds a control to the array specified. The array is an associative array with key value pairs.\n var addChangedControlToArray = function (element, elementvalue) {\n // try get the element id from the element, if not try get the name.\n var uniquekey = getElementUniqueKey(element);\n if (uniquekey == undefined)\n // No unique id so we cannot track changes on current element.\n return;\n\n if (changedElements == undefined)\n changedElements = {};\n\n switch (element.type) {\n case \"radio\":\n newValueForRadio(element, changedElements, uniquekey);\n break;\n default:\n changedElements[uniquekey] = elementvalue;\n break;\n }\n }\n\n // Set a new value for the radio control.\n var newValueForRadio = function (element, array, uniqueKey) {\n // If radio doesn't belong to a group add using the id.\n if (String.isNullOrEmpty(element.name)) {\n array[uniqueKey] = element.checked;\n }\n else {\n // For radio elements set unique key by name.\n uniqueKey = element.name;\n array[uniqueKey] = tryGetValueForRadio(element);\n }\n }\n\n // Attempt to get a unique key for the element to monitor for changes.\n var getElementUniqueKey = function (element) {\n // Try get the element id from the element, if not try get the name.\n if (!String.isNullOrEmpty(element.id))\n return element.id;\n\n if (!String.isNullOrEmpty(element.name))\n return element.name;\n\n return undefined;\n }\n\n // Add control thats event was fired and its default value.\n var addDefaultControlAndValueToArray = function (uniqueKey, element) {\n if (defaultElements == undefined)\n defaultElements = {};\n\n // Control 'default' and value can only be added once. This is the value we will compare against later.\n if (defaultElements[uniqueKey] == null) {\n switch (element.type) {\n case \"select-one\":\n setDefaultValueForSelect(element, defaultElements, uniqueKey);\n break;\n case \"radio\":\n setDefaultValueForRadio(element, defaultElements, uniqueKey);\n break;\n case \"checkbox\":\n setDefaultValueForCheckbox(element, defaultElements, uniqueKey);\n break;\n default:\n setDefaultValueForOtherElement(element, defaultElements, uniqueKey);\n break;\n }\n }\n }\n\n // Set the default selected text from a select element.\n var setDefaultValueForSelect = function (element, array, uniqueKey) {\n for (var optionCount = 0; optionCount < element.length; optionCount++) {\n // Get current option in loop and check to see if the default value was checked.\n var currentOption = element[optionCount];\n if (currentOption.defaultSelected) {\n // Get the default checked value.\n array[uniqueKey] = element[optionCount].text;\n return;\n }\n }\n // Return the current selected text if no defaults were selected.\n if (element.selectedIndex >= 0)\n array[uniqueKey] = element.options[element.selectedIndex].text;\n else\n array[uniqueKey] = \"\";\n }\n\n // Set the default checked value for a group of radio buttons. If the group does not exist use the id.\n var setDefaultValueForRadio = function (element, array, uniqueKey) {\n // If radio doesn't belong to a group add using the id.\n if (String.isNullOrEmpty(element.name)) {\n array[uniqueKey] = elemen.checked;\n }\n else {\n // For radio elements set unique key by name.\n uniqueKey = element.name;\n var optionsByName = document.getElementsByName(uniqueKey);\n for (var optionCount = 0; optionCount < optionsByName.length; optionCount++) {\n var currentOption = optionsByName[optionCount];\n if (currentOption.defaultChecked) {\n array[uniqueKey] = tryGetValueForRadio(currentOption);\n return;\n }\n }\n // No radio has a default check so set the current radio group to empty.\n array[uniqueKey] = \"\";\n }\n }\n\n // Try get the label for the radio element, failing that the value, and lastly failing that the id. (all elements must have an id at least to be evaluated).\n var tryGetValueForRadio = function (element) {\n var radioLabel = element.nextSibling.nodeValue;\n if (!String.isNullOrEmpty(radioLabel)) {\n return radioLabel.trim();\n }\n else if (!String.isNullOrEmpty(element.value)) {\n return element.value.trim();\n }\n else {\n return element.id;\n }\n }\n\n // Set the default checked value of a checkbox element.\n var setDefaultValueForCheckbox = function (element, array, uniqueKey) {\n // Return the default value loaded for the checkbox or current value.\n if (element.defaultChecked)\n array[uniqueKey] = element.defaultChecked;\n else\n array[uniqueKey] = element.checked;\n }\n\n // Set a default value for the element. If defaultValue is not found get the current value.\n var setDefaultValueForOtherElement = function (element, array, uniqueKey) {\n // If a default value has not been asigned then add the value as the default.\n if (element.defaultValue == undefined || element.defaultValue.toString().trim() == \"\")\n array[uniqueKey] = element.value;\n else\n array[uniqueKey] = element.defaultValue;\n }\n\n // Enumerate through element tree and get all input elements. Elements without an id or name do not get added.\n var enumerateChildElements = function (element) {\n if (element != null && element.hasChildNodes()) {\n // recursing through the element tree and get required values from the current html element.\n addInputElementToArray(element);\n for (var i = 0; i < element.children.length; i++) {\n var newelement = element.children[i];\n // Recurse and get all child controls of controls.\n enumerateChildElements(newelement);\n }\n }\n else {\n // no children found on element so enumerate current element without recursing through the tree.\n addInputElementToArray(element);\n }\n }\n\n // Adds input type element controls using their id or name as a key and the entire control as the value.\n var addInputElementToArray = function (element) {\n var uniqueId = getElementUniqueKey(element);\n if (String.isNullOrEmpty(uniqueId))\n return;\n\n if (inputElements == undefined)\n inputElements = {};\n\n // Add input type controls only to input element array.\n switch (element.type) {\n case \"text\":\n case \"textarea\":\n case \"email\":\n case \"number\":\n case \"range\":\n case \"url\":\n case \"password\":\n case \"checkbox\":\n case \"radio\":\n case \"select-one\":\n inputElements[uniqueId] = element;\n break;\n default:\n\n }\n }\n\n // Add function to check for null or empty string value.\n String.isNullOrEmpty = function (value) {\n return (value == undefined || value.toString().trim === \"\");\n };\n}", "title": "" }, { "docid": "f04e5b73f4254b7859df47862338337c", "score": "0.5700255", "text": "function ae(me){var he=this._currentElement.props,fe=ne.executeOnChange(he,me);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),le.asap(X,this),fe}", "title": "" }, { "docid": "265eba0e80d23eceb6139d0abf8c472b", "score": "0.5566748", "text": "get value() {\n return this.elementValue;\n }", "title": "" }, { "docid": "265eba0e80d23eceb6139d0abf8c472b", "score": "0.5566748", "text": "get value() {\n return this.elementValue;\n }", "title": "" }, { "docid": "2c046b0dff532cfc41dcc717712f93b2", "score": "0.5521322", "text": "_editorDataChanged(e){// value coming up off of thiss\nthis.value=e.detail}", "title": "" }, { "docid": "42d1159ff59cd3362d855371f31e92ff", "score": "0.5345903", "text": "valueUpdated() {\n this.model.set('value', this.getInputValue());\n this.elementUpdated();\n }", "title": "" }, { "docid": "cb19fcc5969bec4fa3de78496dfafa1f", "score": "0.5330747", "text": "onChangedEvent(event) {\n if (!this.isWritingValue) {\n const element = this.elementRef.nativeElement;\n let changed = false;\n switch (event.type) {\n case 'selected-items-changed':\n case 'selected-item-changed': {\n const property = this.getSelectableProperty(element);\n changed = property === 'selectedItems' || property === 'selectedItem';\n break;\n }\n case 'selected-values-changed':\n case 'selected-changed': {\n const property = this.getSelectableProperty(element);\n changed = property === 'selectedValues' || property === 'selected';\n break;\n }\n default:\n changed = true;\n }\n if (changed) {\n let property;\n if (this.isMultiSelectable(element) || this.isSelectable(element)) {\n // property will be defined if we reach this since changed can only\n // be true if the property is defined for selectable elements\n property = this.getSelectableProperty(element);\n }\n else if (this.isCheckedElement(element)) {\n property = 'checked';\n }\n else {\n property = 'value';\n }\n // Don't use `event.detail.value`, since we cannot assume that all\n // change events will provide that. Additionally, some event details\n // may be splices of an array or object instead of the current value.\n this.onChange(element[property]);\n }\n }\n }", "title": "" }, { "docid": "aadaf80b3af4249686e9c0e07d0615ba", "score": "0.52801925", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, EnumerationValueRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, EnumerationValueRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "8146c39dd2965713ed5ff1a2e04c22ad", "score": "0.52115226", "text": "function onchange() {\n\t\tvalue.set(null, tome, 'live');\n\t}", "title": "" }, { "docid": "5006d576ea15edec711c0679472af7c4", "score": "0.51419663", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, EnumerationValueRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, EnumerationValueRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "b72d630bc5e38f30c0058330fa7ecf02", "score": "0.5123263", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, EnumerationValueRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, EnumerationValueRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "4fc36aae75f284b3b2e6feb04db74f32", "score": "0.5119445", "text": "_dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "4a6af54b30b03183c7968cd9f975bb85", "score": "0.51190853", "text": "function observe(changeElt){\n changeElt.change(eko.globalEditorChangeHook);\n}", "title": "" }, { "docid": "c010d73dccb820dd91ec4c26e1af6098", "score": "0.51125836", "text": "value(newVal) {\n this.innerValue = newVal;\n }", "title": "" }, { "docid": "ada8eae61dd4a72b5ec3ba42d1adb320", "score": "0.5108649", "text": "_dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }", "title": "" }, { "docid": "7c9040d622cae7e1173098a0819e337e", "score": "0.5106212", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, EmptyLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, EmptyLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "4a322891f9e3949e0c263670dc538f10", "score": "0.50955397", "text": "get changed() {\n return this._changed;\n }", "title": "" }, { "docid": "4a322891f9e3949e0c263670dc538f10", "score": "0.50955397", "text": "get changed() {\n return this._changed;\n }", "title": "" }, { "docid": "4a322891f9e3949e0c263670dc538f10", "score": "0.50955397", "text": "get changed() {\n return this._changed;\n }", "title": "" }, { "docid": "4a322891f9e3949e0c263670dc538f10", "score": "0.50955397", "text": "get changed() {\n return this._changed;\n }", "title": "" }, { "docid": "5e897783a47bf1bad42f3cc210307bce", "score": "0.5057391", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, NoExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, NoExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "5fbafe83c53fa03606aabf833bfa4f27", "score": "0.50418967", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, ParenthesisExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, ParenthesisExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "573c2957125c5f7ebfd16cea5fed7ed0", "score": "0.5040922", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, StringLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, StringLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "d5a021b8ab06dcc48a49e739b8ef384c", "score": "0.5034728", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, EmptyLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, EmptyLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "e3710bfb8c7f17f1a8fa48727d182fc3", "score": "0.50233173", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, StringLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, StringLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "8c6fd52996a612751b113e721f5842d8", "score": "0.5022503", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, UnparsableExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, UnparsableExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "46d47f4ad43c88e84bcb3dbfcfdbebda", "score": "0.50204223", "text": "function setValue(domElement, newValue) {\n $(domElement).val(newValue);\n }", "title": "" }, { "docid": "126ff337d75e320c7519d70a405a146b", "score": "0.50111383", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, ConstantRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, ConstantRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "bd7b1d96159a060f6587ba1c05d8795e", "score": "0.50108063", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, UnparsableExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, UnparsableExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "1e7d47dd0fc48dbb00f32d16a0ba09e6", "score": "0.50096893", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, NoExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, NoExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "c79930fc9a537d98feb50be8bdd2c51a", "score": "0.4991363", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, ParenthesisExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, ParenthesisExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "5e81b58eddc3c41cf74d00417ba970e4", "score": "0.4982211", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, ConstantRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, ConstantRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "023370dd11451df0a2cd774cf9b1aad7", "score": "0.4980467", "text": "set hasChanged(value) {}", "title": "" }, { "docid": "805bec3920e4005475413cf79c3817e4", "score": "0.49743536", "text": "function _onChangeDialog( ele ) {\n _patchWidgetColors();\n //_handleDialogs();\n _initObserverDialog();\n}", "title": "" }, { "docid": "5643ab31d948a912c2bc6858c30a7fc6", "score": "0.49631426", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, VariableRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, VariableRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "32e0085445d2a02054b305a8a432b9e1", "score": "0.4958861", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, VariableRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, VariableRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "d1df2b00127a26abc461a68ff6fdf963", "score": "0.4956732", "text": "value(value) {\n this._value = value\n this.trigger('change', this._name, this._value)\n\n return value\n }", "title": "" }, { "docid": "858503f600d64ccbdbfd7735222b9709", "score": "0.4941491", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, IntegerLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, IntegerLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "18a2103f6124a1907439f99881a4bf71", "score": "0.49407226", "text": "function changeEvent(value,oldValue,target,attr,style,args,action,srcElement,type,stop,cancelable,bubbles, extended)\n {\n /* stops bubbling of event */\n this.stopPropagation = function()\n {\n this.bubbles = false;\n this.__stopPropogation__ = !this.bubbles;\n };\n \n /* stops event */\n this.stopImmediatePropagation = function()\n {\n this.bubbles = false;\n this.__stopImmediatePropogation__ = this.__stopPropogation__ = !this.bubbles;\n };\n \n /* prevent the default action */\n this.preventDefault = function()\n {\n this.__preventDefault__ = this.defaultPrevented = true;\n };\n \n /* stop the update listeners from firing */\n this.stop = function()\n {\n this.target.__pikantnyExtensions__.stop = this.stopped = true;\n }\n \n /* if the event can be cancelled (not implemented) */\n this.cancelable = (cancelable || true);\n \n /* if default was prevented (not implemented) */\n this.defaultPrevented = false;\n \n /* if the event can bubble */\n this.bubbles = (bubbles || true);\n \n /* if the event is currently being propogated */\n this.bubbled = false;\n \n /* the current value of the property */\n this.value = value;\n \n /* the old value of the property */\n this.oldValue = oldValue;\n \n /* the target node the event is being ran on */\n this.target = target;\n \n /* the name of the property */\n this.attr = attr;\n \n /* in the case the attr is a style Example: `font-size` */\n this.style = style;\n \n /* passed arguments if the property was a method */\n this.arguments = args;\n \n /* the returned result of running that method (update only) */\n this.action = action;\n \n /* the original element that fired the event */\n this.srcElement = srcElement;\n \n /* the name of the listener */\n this.type = type;\n \n /* default stopped telling if update listeners should be stopped */\n this.stopped = false;\n \n /* if an extended prop was used this will be the original item changed */\n this.extended = extended;\n \n /* tells if the update listeners have been stopped or not */\n if(stop) this.target.__pikantnyExtensions__.stop = this.stopped = true;\n }", "title": "" }, { "docid": "d8b3f82e4146793ba4282b2e170729d7", "score": "0.49294317", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, BinaryExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, BinaryExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "7942fb76fca238dfaf3993e80c9c0be1", "score": "0.4929384", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, IntegerLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, IntegerLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "52ebf6b95b5f9249fbe4b1c02aa118b5", "score": "0.49256584", "text": "_onChange(e) {\n if (e.srcElement === this.$.button)\n this.dispatchEvent(\n new CustomEvent(\"editable-table-setting-changed\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n prop: this.prop,\n value: e.srcElement.checked\n }\n })\n );\n }", "title": "" }, { "docid": "2eb7086e8eee71ad620cf2c40f48e4d8", "score": "0.49234974", "text": "get value() {\n\t\treturn this.nativeElement ? this.nativeElement.value : undefined;\n\t}", "title": "" }, { "docid": "d5d20cd4fe87528d15f69d68896abafc", "score": "0.49214268", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, BinaryExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, BinaryExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "a128433fd6f50b0a7a7ff86bb1fd0a1c", "score": "0.49191782", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, EmptyLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, EmptyLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "5c537435859d5bd7b73ff2dd43f2afd4", "score": "0.4917081", "text": "function editNode (elem) {\n var d3elem = d3.select(elem);\n if (d3elem.classed('open')) {\n d3elem.classed('open', false);\n _editVal.value = elem.value;\n addOperation({\n type: 'editValue', \n data: _editVal\n });\n elem.value = '';\n }\n }", "title": "" }, { "docid": "1605661d9d5861f9f871932661f2ef42", "score": "0.491658", "text": "dispatchChangeEvent() {\n this.dispatchEvent(new CustomEvent('change', {\n composed: true,\n bubbles: true,\n detail: {\n value: this.internalValue\n }\n }));\n }", "title": "" }, { "docid": "df3a315873b603bf1a9577283c41b17d", "score": "0.49160066", "text": "elementUpdated() {\n this.model.set('status', 'updated');\n }", "title": "" }, { "docid": "61f44b576a5110bc470f355fe0e22c73", "score": "0.49159643", "text": "innerValue(newVal) {\n this.$emit(\"input\", newVal);\n }", "title": "" }, { "docid": "14fd89d45a563860461fce0bc0328c73", "score": "0.4910394", "text": "graphChanges() {\n return tardigrade.tardigradeEngine.getPoint(this.rootElement, \"ChangePanel\", { \"graphChanges\": 0 });\n }", "title": "" }, { "docid": "bb10603c54de9214d5f1eac002043d5e", "score": "0.49042937", "text": "function _eva(oEle,varValue)\r\n{\r\n\tif(oEle._value)\r\n\t{\r\n\t\toEle._value(varValue);\r\n\t}\r\n\telse\r\n\t{\r\n\t\toEle.value = varValue;\r\n\t}\r\n}", "title": "" }, { "docid": "111c0e04f96d423266db4b9bb85e75b2", "score": "0.49013686", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, StringLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, StringLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "81b4e289f3d3ed701f135a21fd6b0c5f", "score": "0.48931336", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, UnparsableExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, UnparsableExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "a01fd924c22ccf299999ef1ffb921fe1", "score": "0.48874372", "text": "value($el, key) {\n $el.value = this[key].toString();\n $el.addEventListener('change', (el) => {\n state[key] = el.target.value;\n });\n this.on(key, (value) => {\n if ($el.value === value.toString()) {\n return;\n }\n $el.value = value.toString();\n });\n }", "title": "" }, { "docid": "d512d632516d2ecd6e727ec1bcf3f934", "score": "0.48869264", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, NoExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, NoExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "3849b71930cac89f2881794ebbb660c2", "score": "0.48854282", "text": "_reflectBackFormattedValueToUser() {\n // Downwards syncing 'back and forth' prevents change event from being fired in IE.\n // So only sync when the source of new <lion-field>.value change was not the 'input' event of\n // inputElement\n if (!this.__preventDownwardsSync) {\n // Text 'undefined' should not end up in <input>\n this.value = typeof this.formattedValue !== 'undefined' ? this.formattedValue : '';\n }\n }", "title": "" }, { "docid": "aabcf7ba55c9a484a8045759f8bc1af7", "score": "0.48845738", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, BooleanLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, BooleanLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "1f4528604425bf3aef9b030f91adead5", "score": "0.48845106", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, UnaryExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, UnaryExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "f1242aafa2e8a4ee6e8e313df4a2747e", "score": "0.48761988", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, VariableRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, VariableRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "f1b6da621fd8470758e3b0318bfc74c7", "score": "0.4873471", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, ParenthesisExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, ParenthesisExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "17e8e2e1811b207d20af51321b252c7c", "score": "0.48720774", "text": "_handleChildValueChange() {\n this.stateChanges.next();\n this._changeDetectorRef.markForCheck();\n }", "title": "" }, { "docid": "9ddd385a18c00aef5251508d68ee4342", "score": "0.48699075", "text": "initialValueChanged(previous, next) {\n // If the value is clean and the component is connected to the DOM\n // then set value equal to the attribute value.\n if (!this.dirtyValue) {\n this.value = this.initialValue;\n this.dirtyValue = false;\n }\n }", "title": "" }, { "docid": "a08a18b1bf9d3f56c1ca48561a94c97b", "score": "0.48696768", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, BooleanLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, BooleanLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "0a50bb3a6437af31932eaadabfe8a187", "score": "0.4859907", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, UnaryExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, UnaryExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "14b80be187fcc501b3db5c4acede83ea", "score": "0.48562774", "text": "_valueObserver() {\n this.set('displayValue', this._buildDisplayValue());\n }", "title": "" }, { "docid": "e1c836b762150701674c94cb98251643", "score": "0.48551562", "text": "set value(newValue) {\n this._value = newValue;\n\n getTwElements(this._nameProp).forEach(element => {\n if (isTextInput(element)) {\n element.value = this.value;\n } else if (!element.type) {\n element.innerHTML = this.value;\n }\n });\n }", "title": "" }, { "docid": "64e459d180a5235419f7ec32a3e6af1b", "score": "0.48536694", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, ConstantRefExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, ConstantRefExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "7e1184d090ffb50c4d5d30436b0290c8", "score": "0.48491895", "text": "function CHANGED$static_(){DifferenceType.CHANGED=( new DifferenceType());}", "title": "" }, { "docid": "494ee01f23914e4f825ee7031fd40bc3", "score": "0.4844716", "text": "function getDirtyValue(element) {\n if (element) {\n if (\"$dirty\" in element) {\n return element.$dirty;\n }\n }\n }", "title": "" }, { "docid": "dcf45114ab32d87c6325d2da87362c9a", "score": "0.48354113", "text": "notifyElementChanged() {\n this.mutObserver.disconnect();\n\n if (this.element) {\n this.mutObserver.observe(this.element, {\n subtree: false,\n //Don't listen to grandchildren/etc\n childList: true //Do listen to child remove/add\n\n });\n }\n\n return this;\n }", "title": "" }, { "docid": "251b8f8146084eea10b154908217f469", "score": "0.48353332", "text": "value(value) {\n this.newValue = value\n }", "title": "" }, { "docid": "251b8f8146084eea10b154908217f469", "score": "0.48353332", "text": "value(value) {\n this.newValue = value\n }", "title": "" }, { "docid": "bedfaafe556625b7536061530d2b6ecd", "score": "0.4831428", "text": "function __update_form_element_value(oEle, strGetValueFromBinding)\r\n{\r\n\tvar strBinding = strGetValueFromBinding;\r\n\tif((strGetValueFromBinding== undefined)||(strGetValueFromBinding==\"\"))\r\n\t{\r\n\t\tstrBinding = oEle.getAttribute(\"binding\");\r\n\t}\r\n\r\n\tif(strBinding!=null)\r\n\t{\r\n\t\t//-- we have a binding then set it using document.tables[]\r\n\t\tvar arrBindInfo = strBinding.split(\".\");\r\n\t\tif((document.tables[arrBindInfo[0]]!= undefined))\r\n\t\t{\r\n\t\t\tvar strTable = arrBindInfo[0];\r\n\t\t\tvar strColumn = arrBindInfo[1];\r\n\t\t\tvar strNewElementValue = document.tables[arrBindInfo[0]][arrBindInfo[1]];\r\n\r\n\t\t\t//-- see if this data binding is being used in any filters or listboxes\r\n\t\t\t__check_form_element_filters(arrBindInfo[0]);\r\n\r\n\t\t\t__check_element_hint(oEle,strNewElementValue);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "75f3442648248227503c7eb694177b60", "score": "0.48198077", "text": "get hasChanged() {}", "title": "" }, { "docid": "21085a204afaac208cdd47eb90ac4228", "score": "0.48167455", "text": "function updatePendingChangesWarning(event, ui) {\n let s = commentaryState.value;\n let commentator1 = s.commentator1;\n let commentator2 = s.commentator2;\n\n let commentator1Name = commentator1NameText.val();\n let commentator1Social = commentator1SocialText.val();\n\n let commentator2Name = commentator2NameText.val();\n let commentator2Social = commentator2SocialText.val();\n\n let elementName = \"\";\n\n if (event != null) {\n elementName = event.target.id;\n }\n\n function hasCommentator1Changed() {\n return commentator1Name != commentator1.name ||\n commentator1Social != commentator1.social;\n }\n\n function hasCommentator2Changed() {\n return commentator2Name != commentator2.name ||\n commentator2Social != commentator2.social;\n }\n\n /* Check if the update was called from a commentator selectmenu. */\n if (elementName == \"commentator-1-name-dropdown\") {\n if (hasCommentator1Changed()) {\n pendingChanges = true;\n } else {\n pendingChanges = false;\n }\n } else if (elementName == \"commentator-2-name-dropdown\") {\n if (hasCommentator2Changed()) {\n pendingChanges = true;\n } else {\n pendingChanges = false;\n }\n } else {\n if (hasCommentator1Changed() || hasCommentator2Changed()) {\n pendingChanges = true;\n } else {\n pendingChanges = false;\n }\n }\n\n if (pendingChanges) {\n pendingChangesLabel.text(PENDING_CHANGES_TEXT);\n } else {\n pendingChangesLabel.text(\"\");\n }\n }", "title": "" }, { "docid": "344d7dcb75db0370064eb64c8a91f827", "score": "0.48152658", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, FunctionCallExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, FunctionCallExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "7869c09510b6ab84b731cf88cc0890a4", "score": "0.4812885", "text": "change(index,val){\n let foundNode = this.getElement(index);\n if(foundNode){\n foundNode.val = val;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "312352693ffc1937430986296d4ebc9f", "score": "0.48120016", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, FloatLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, FloatLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "5b1af257157124f46a03ce544b80e918", "score": "0.47997335", "text": "getMirrorValue() {\n const element = this._elementRef.nativeElement;\n const value = element.value;\n return value.length > 0 ? value : element.placeholder;\n }", "title": "" }, { "docid": "0163a1f63b1afa288fe73ee81b5089cf", "score": "0.4799676", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, IntegerLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, IntegerLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "ce1ff041a37bcb9a1c4d48ca64cd8120", "score": "0.4797879", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, FunctionCallExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, FunctionCallExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "f44a35cfdbdac920885c7a39d8df19fc", "score": "0.47947106", "text": "get inputElement() {\n return this.$.display.inputElement;\n }", "title": "" }, { "docid": "02ac5c4aa9d242dc098d7333ae9b8de4", "score": "0.47881365", "text": "_update() {\n let { onChange } = this._opts\n\n // update the element\n if (this._el.nodeName.toLowerCase() === 'input') {\n this._el.value = this.getValue()\n } else {\n this._el.dataset.value = this.getValue()\n }\n\n // callback\n if (onChange) {\n onChange(this.getDate())\n }\n }", "title": "" }, { "docid": "e0090599bc2429301f0d96b45705e5e9", "score": "0.4780703", "text": "function setForced(div, pValue)\n{\n var state = div.childNodes[6];\n state.value = pValue;\n}", "title": "" }, { "docid": "4a88f400eb2f3b7561277b8f7c88eebe", "score": "0.47752073", "text": "changed({params, element}) {\n let msg = \n `view with element id \"${element.id}\" and view id \"${element.dataset.id}\" and with parameters ${params.join(\", \")} has just been changed!`;\n this.panel.html(this.panel.html() + \"> \" + msg + \"<br /><br />\") \n console.log(msg);\n }", "title": "" }, { "docid": "c0b43599da74b96378c19a2606210994", "score": "0.4773397", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, BinaryExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, BinaryExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "e47ae18154eebade0f432e31d207cfe5", "score": "0.47655144", "text": "function changeValue(oOpa, rId, sValue, iRow) {\n\t\toOpa.waitFor({\n\t\t\tactions : new EnterText({text : sValue}),\n\t\t\tcontrolType : \"sap.m.Input\",\n\t\t\tid : rId,\n\t\t\tmatchers : function (oControl) {\n\t\t\t\treturn getIndex(oControl) === (iRow || 0);\n\t\t\t},\n\t\t\tsuccess : function (aControls) {\n\t\t\t\tvar oInput = aControls[0];\n\n\t\t\t\tOpa5.assert.strictEqual(oInput.getValue(), sValue, \"Content set to \"\n\t\t\t\t\t+ oInput.getValue());\n\t\t\t},\n\t\t\tviewName : sViewName\n\t\t});\n\t}", "title": "" }, { "docid": "17cbc3906b77be1b8de834f9f75c0bc1", "score": "0.4761006", "text": "static createInChangeListActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, IfExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, IfExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "d1ad01fe8c1b655964825ba0183a7a67", "score": "0.47528046", "text": "function setValueForElementByEvent(el) {\n var valueToSet = el.value,\n ev1 = el.ownerDocument.createEvent('HTMLEvents'),\n ev2 = el.ownerDocument.createEvent('HTMLEvents');\n\n el.dispatchEvent(normalizeEvent(el, 'keydown'));\n el.dispatchEvent(normalizeEvent(el, 'keypress'));\n el.dispatchEvent(normalizeEvent(el, 'keyup'));\n ev2.initEvent('input', true, true);\n el.dispatchEvent(ev2);\n ev1.initEvent('change', true, true);\n el.dispatchEvent(ev1);\n el.blur();\n el.value !== valueToSet && (el.value = valueToSet);\n }", "title": "" }, { "docid": "b718b5e13b302d933564621a08926662", "score": "0.47527045", "text": "static createInMemberChangeUnderValueModel(container) {\n internal.createInVersionCheck(container.model, IfExpression.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, IfExpression, \"valueModel\", false);\n }", "title": "" }, { "docid": "692589dd0ce5200c22b387c1be0f66d2", "score": "0.47496164", "text": "OnValueChanged()\n {\n this._dirty = true;\n }", "title": "" }, { "docid": "f80303483102ecd3301223e3236a22bd", "score": "0.47481722", "text": "static element(dto) {\n return tardigrade.createElement(ChangePanel.html(dto));\n }", "title": "" }, { "docid": "ce1fe08fdfbeed4bed21c0ee5966db75", "score": "0.47474393", "text": "function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName !== 'value'){return;}var value=nativeEvent.srcElement.value;if(value === activeElementValue){return;}activeElementValue = value;manualDispatchChangeEvent(nativeEvent);}", "title": "" }, { "docid": "91e1ab437d8bb8da43d43cff1539e441", "score": "0.4745827", "text": "static createInChangeVariableActionUnderValueModel(container) {\n internal.createInVersionCheck(container.model, BooleanLiteral.structureTypeName, { start: \"7.9.0\" });\n return internal.instancehelpers.createElement(container, BooleanLiteral, \"valueModel\", false);\n }", "title": "" }, { "docid": "d732f5d72c81c173a89ccb6aa0147778", "score": "0.47427866", "text": "attributeChangedCallback(name, oldValue, newValue) {\r\n // check the name and run your desired method\r\n if (name === 'open') {\r\n this.toggleOpen();\r\n } else if (name === 'value') {\r\n this._setParentValue();\r\n }\r\n }", "title": "" }, { "docid": "5b4a610312088d653adb224cfcc84938", "score": "0.47382465", "text": "function handlePermissionUserElementChanged(result, callbackData) {\n\n\t// store current permissions for selected user\n\tif (callbackData.module.permissionSelectedUser){\n\t\tcallbackData.module.permissions[callbackData.module.permissionSelectedUser][\"rights\"] = callbackData.module.getPermissionRights();\n\t}\n \n\tif(result){\n\t\tif(module){\n\t\t\tvar users = new Array();\n\t\t\t// Add a dummy to prevent the xmlbuilder to convert an array with a single element.\n\t\t\tusers.push({});\n\t\t\tvar select = callbackData.module.permissionElements[\"userlist\"];\n\t\t\tfor(var i=0;i<select.options.length;i++){\n\t\t\t\tuserData = select.options[i].data;\n\t\t\t\tfor(var j in userData){\n\t\t\t\t\tif(userData[j] == null){\n\t\t\t\t\t\tdelete userData[j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tusers.push(userData);\n\t\t\t}\n\n\t\t\tif(result.multiple){\n\t\t\t\tfor(var key in result){\n\t\t\t\t\tif(key != \"multiple\" && key != \"value\"){\n\t\t\t\t\t\teventPermissionUserElementChanged(callbackData.module, result[key].display_name, result[key].entryid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\teventPermissionUserElementChanged(callbackData.module, result.display_name, result.entryid);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f821d8ee9f0e27fa10459e53963156ec", "score": "0.47365722", "text": "function CustomerChanged(sender) {\n var id = sender.parentNode.parentNode.parentNode.id * 1;\n Cmb.val(id);\n $(popupDialogId).dialog(\"close\");\n}", "title": "" }, { "docid": "7c938755a1361f2e5bdf028a962ddbe2", "score": "0.47358617", "text": "function child (e){\r\n \r\n treenodid = e.getAttribute('value');\r\n \r\n}", "title": "" }, { "docid": "19f48b753d8a2b22adb8cc893b0cd5bb", "score": "0.47285476", "text": "get owner() {\n return this._owner || Widget.fromElement(this.element.parentNode);\n }", "title": "" } ]
f13c3892c6642d5522bce29316e85293
Returns the id for a given NgModule, if one is defined and known to the compiler.
[ { "docid": "43b665a1cab1ad010aeb173abb33b6a0", "score": "0.68304294", "text": "getModuleId(moduleType) {\n return undefined;\n }", "title": "" } ]
[ { "docid": "8f838410df7f9a5d92c556e687faff3e", "score": "0.6654458", "text": "getModuleId() { /* implement this method */ }", "title": "" }, { "docid": "1fb868b0469981a75050cf2d6544f16e", "score": "0.6485373", "text": "function getCurrentModuleId() {\n return extensionMetadata ?\n extensionMetadata.modules[0].id : internationalMetadata.modules[0].id;\n }", "title": "" }, { "docid": "cb107b4652335bc45de3896f990c20cd", "score": "0.6104165", "text": "function getInternationalModuleId() {\n return internationalMetadata.modules[0].id;\n }", "title": "" }, { "docid": "c20b5d0176b2e5d08278a63fb390ec23", "score": "0.60524523", "text": "function makeIdentifierFromModuleName(moduleName) {\n return ts.getBaseFileName(moduleName).replace(/^(\\d)/, \"_$1\").replace(/\\W/g, \"_\");\n }", "title": "" }, { "docid": "c20b5d0176b2e5d08278a63fb390ec23", "score": "0.60524523", "text": "function makeIdentifierFromModuleName(moduleName) {\n return ts.getBaseFileName(moduleName).replace(/^(\\d)/, \"_$1\").replace(/\\W/g, \"_\");\n }", "title": "" }, { "docid": "c834b50e4878583ee0fa4dfbdd68b769", "score": "0.6022508", "text": "function makeIdentifierFromModuleName(moduleName) {\n return ts.getBaseFileName(moduleName).replace(/^(\\d)/, \"_$1\").replace(/\\W/g, \"_\");\n }", "title": "" }, { "docid": "f3f64875733cafd58f4c2b06b6a9977a", "score": "0.5649174", "text": "function guid(moduleId) {\n var S4 = function() {\n return (((1+Math.random())*0x10000)|0).toString(16).substring(1);\n };\n return moduleId + '@' + (S4()+S4());\n}", "title": "" }, { "docid": "8a4bdf5e7a841ff973afe8ffc89a9037", "score": "0.56452215", "text": "getNormalizedModuleName(id) {\n if (FuseBox.exists(id)) {\n return id;\n }\n\n let fuseId = `${PACKAGE_NAME}/${id}`;\n if (FuseBox.exists(fuseId)) {\n return fuseId;\n }\n\n let parentId = Object.keys(FuseBox.packages)\n .find((name) => id.startsWith(`${name}/`));\n if (parentId) {\n let resourceId = this.normalizeResourceName(id, parentId);\n if (FuseBox.exists(resourceId)) {\n return resourceId;\n } else {\n throw new Error(`Unable to find a resource with ID: ${id}`);\n }\n }\n\n throw new Error(`Unable to find a module with ID: ${id}`);\n }", "title": "" }, { "docid": "78720aadce3a36e9481d6e2a3688d776", "score": "0.5592902", "text": "function getId(el){\n var id = el.getAttribute('ngm-id');\n return id ? parseInt(id) : -1;\n }", "title": "" }, { "docid": "bd4058c5c95be52125aff9b1fa5c301b", "score": "0.5523402", "text": "function getModuleId(request, parentPath) {\n return _resolve2.default.sync(request, {\n basedir: path.dirname(parentPath),\n extensions: Object.keys(require.extensions)\n });\n}", "title": "" }, { "docid": "5cd2a85bb88833e036ba40075115c842", "score": "0.5504311", "text": "function psWhich(angular) {\n var orig = angular.module;\n\n angular.module = function moduleReplacement(moduleName, requires) {\n var module = orig.apply(angular, arguments);\n\n if (requires) {\n hookIntoModule(moduleName, module);\n }\n\n return module;\n };\n}", "title": "" }, { "docid": "8b40e6ed9f0f24ec9f778bf158a7c27d", "score": "0.54005945", "text": "getId() {\n const scopeVersion = this.scope ? this.scope.version() : '';\n return this.templateName + scopeVersion;\n }", "title": "" }, { "docid": "7ca399016e6d5ca6bee36c03441aaff0", "score": "0.538016", "text": "function getModuleName(module) {\n if (!module._vmdModuleName) {\n throw new Error(\"ERR_GET_MODULE_NAME : Could not get module accessor.\\n Make sure your module has name, we can't make accessors for unnamed modules\\n i.e. @Module({ name: 'something' })\");\n }\n return \"vuexModuleDecorators/\" + module._vmdModuleName;\n}", "title": "" }, { "docid": "11fc9b37d7ac8691d948589668ad6c02", "score": "0.5336299", "text": "function createCachedModuleId(ident) {\n if (/^__fusion__\\d+$/.test(ident)) {\n // This is already a cached identifier\n return ident;\n }\n if (customModuleIds.has(ident)) {\n return customModuleIds.get(ident);\n }\n const moduleId = `__fusion__${(moduleCounter++).toString()}`;\n customModuleIds.set(ident, moduleId);\n return moduleId;\n}", "title": "" }, { "docid": "d20867a9ab9eafe09341d119ed3eb55d", "score": "0.5313802", "text": "function findModule(host, generateDir) {\n var dir = host.getDir('/' + generateDir);\n var moduleRe = /\\.module\\.ts$/;\n var routingModuleRe = /-routing\\.module\\.ts/;\n while (dir) {\n var matches = dir.subfiles.filter(function (p) { return moduleRe.test(p) && !routingModuleRe.test(p); });\n if (matches.length == 1) {\n return (0, core_1.join)(dir.path, matches[0]);\n }\n else if (matches.length > 1) {\n throw new Error('More than one module matches. Use skip-import option to skip importing ' +\n 'the component into the closest module.');\n }\n dir = dir.parent;\n }\n throw new Error('Could not find an NgModule. Use the skip-import ' +\n 'option to skip importing in NgModule.');\n}", "title": "" }, { "docid": "d2c9184fd2201f6f0569d75c3fe5844d", "score": "0.53093725", "text": "async resolveComponentId(id) {\n const idStr = id.toString();\n const component = await this.legacyScope.loadModelComponentByIdStr(idStr);\n\n const getIdToCheck = () => {\n if (component) return idStr; // component exists in the scope with the scope-name.\n\n if (idStr.startsWith(`${this.name}/`)) {\n // component with the full name doesn't exist in the scope, it might be locally tagged\n return idStr.replace(`${this.name}/`, '');\n }\n\n return idStr;\n };\n\n const IdToCheck = getIdToCheck();\n const legacyId = id instanceof _legacyBitId().BitId ? id : await this.legacyScope.getParsedId(IdToCheck);\n if (!legacyId.scope) return _component().ComponentID.fromLegacy(legacyId, this.name);\n return _component().ComponentID.fromLegacy(legacyId);\n }", "title": "" }, { "docid": "b471057ae9b5482b0a44944a4e18ab59", "score": "0.52874595", "text": "function getModuleNameOfIdentifier(context, identifier) {\n const { name } = identifier;\n // check if importing using `import * as X from 'module_name'`\n const importDeclaration = getImportDeclarations(context).find(importDecl => isNamespaceSpecifier(importDecl, name) || isDefaultSpecifier(importDecl, name));\n if (importDeclaration) {\n return importDeclaration.source;\n }\n // check if importing using `const X = require('module_name')`\n const writeExpression = getUniqueWriteUsage(context, name);\n if (writeExpression) {\n return getModuleNameFromRequire(writeExpression);\n }\n return undefined;\n}", "title": "" }, { "docid": "02632c819faa127e1c65d97dcdc48432", "score": "0.52712595", "text": "static findDomModuleWithId(findId) {\n //List all the tag 'link' with attribute 'rel=import'.\n //The file content is in the '.import' property.\n const _linkImports = document.querySelectorAll('link[rel=import]');\n const _arrLinkImports = Array.from(_linkImports);\n const _domModuleSelector = 'dom-module[id=' + findId + ']';\n\n var _domModules = _arrLinkImports.map( (link) => {\n return link.import.querySelector(_domModuleSelector);\n });\n\n if (_domModules.length == 0)\n throw 'Cannot find ' + _domModuleSelector + ' in the page.';\n\n if (_domModules.length > 1)\n throw 'The same ' + _domModuleSelector + ' has been imported more than one time.';\n\n return _domModules[0];\n }", "title": "" }, { "docid": "2b40c3a39b84c9c3c0b9666633d550b5", "score": "0.5261488", "text": "function _module_exists(name) {\n \ttry {\n \t\tangular.module(name)\n \t}\n \tcatch(e){\n \t\treturn false\n \t}\n \t\treturn true\n }", "title": "" }, { "docid": "e6d2baaffd7f3ffdc1f21d216d1ba5b0", "score": "0.52535677", "text": "function findModuleIndex(name){\n for (i=0; i<availableModules.length; i++){\n if(availableModules[i].name === name){\n return i;\n }\n }\n}", "title": "" }, { "docid": "75de660b699a0bbee44de2ed4cce9fab", "score": "0.5166406", "text": "get uniqueId() {\n const components = this.scopes.slice(1).map(c => Node.of(c).id);\n return components.length > 0 ? uniqueid_1.makeLegacyUniqueId(components) : '';\n }", "title": "" }, { "docid": "472ec5a71d2484d11fd60004799aeb55", "score": "0.51571447", "text": "getModule(componentType) {\r\n var _a;\r\n const feature = this.componentFeatureMap.get(componentType);\r\n let module;\r\n // we are returning injectors only for already resolved features\r\n (_a = this.features\r\n .get(feature)) === null || _a === void 0 ? void 0 : _a.subscribe((featureInstance) => {\r\n module = featureInstance.moduleRef;\r\n }).unsubscribe();\r\n return module;\r\n }", "title": "" }, { "docid": "ba086ac5f24a1ccb265e8365bfde2407", "score": "0.51307994", "text": "static nodeUniqueId(node) {\n const components = node.scopes.slice(1).map(c => c.node.id);\n return components.length > 0 ? uniqueid_1.makeUniqueId(components) : '';\n }", "title": "" }, { "docid": "fdf0452eadecdf61c5016800ed727e72", "score": "0.51065814", "text": "function removeModuleId(fileContent) {\n return fileContent.replace(/\\s*moduleId:\\s*module\\.id\\s*,?\\s*/gm, '');\n}", "title": "" }, { "docid": "c4522534f6b4530bcac9c8a94b779212", "score": "0.5090099", "text": "findIdealModuleId(idStart) {\r\n let possible = true;\r\n if (this.ModuleList.length == 0) {\r\n this.nextModuleID = 0;\r\n }\r\n for (let moduleentry of this.ModuleList) {\r\n if (idStart == moduleentry.id) {\r\n possible = false;\r\n break;\r\n }\r\n }\r\n if (possible == false) {\r\n this.findIdealModuleId(idStart + 1);\r\n }\r\n else {\r\n this.nextModuleID = idStart;\r\n }\r\n }", "title": "" }, { "docid": "e3fbb5b38696e974d123ddbadbba73c5", "score": "0.50889105", "text": "function findRoutingModule(host, generateDir) {\n let dir = host.getDir('/' + generateDir);\n const routingModuleRe = /\\.routing\\.module\\.ts/;\n while (dir) {\n const matches = dir.subfiles.filter(p => routingModuleRe.test(p));\n if (matches.length == 1) {\n return core_1.join(dir.path, matches[0]);\n }\n else if (matches.length > 1) {\n throw new Error('More than one module matches. Use skip-import option to skip importing '\n + 'the component into the closest module.');\n }\n dir = dir.parent;\n }\n throw new Error('Could not find an NgModule. Use the skip-import '\n + 'option to skip importing in NgModule.');\n}", "title": "" }, { "docid": "41bcd31c98514bce81b5ce7e3eadfe3c", "score": "0.50506604", "text": "function generateConcreteFragmentID() {\n return __webpack_require__(75)(_nextFragmentID++) + SUFFIX;\n}", "title": "" }, { "docid": "b1640cd8143f2c31b2c111a5c357e313", "score": "0.50444424", "text": "function getScriptName() {\n var _a; // In Rhino, the current script name is available in require.main.id\n\n\n var scriptName = (_a = __webpack_require__.c[__webpack_require__.s]) === null || _a === void 0 ? void 0 : _a.id;\n return scriptName ? \"'\" + scriptName + \"'\" : \"This script\";\n}", "title": "" }, { "docid": "2ce220c9bd90192a5233acb8f16b70cb", "score": "0.50410306", "text": "function getAssignmentId() {\n var assignmentId = null;\n try {\n var assignmentRegex = new RegExp('/assignments/([0-9]+)');\n var matches = assignmentRegex.exec(window.location.href);\n if (matches) { assignmentId = matches[1]; }\n else { throw new Error('Unable to detect Assignment ID'); }\n }\n catch (e) { errorHandler(e); }\n return assignmentId;\n }", "title": "" }, { "docid": "6aeed2562e925620ba19b80bf283dde2", "score": "0.50331515", "text": "function getId () {\n if (globalId != null) {\n return globalId\n } else {\n return getLocalStorage('id')\n }\n }", "title": "" }, { "docid": "ccb15191929c784ca8606623aeb31620", "score": "0.5017232", "text": "function generateNameForImportOrExportDeclaration(node) {\n var expr = ts.getExternalModuleName(node);\n var baseName = ts.isStringLiteral(expr) ?\n ts.makeIdentifierFromModuleName(expr.text) : \"module\";\n return makeUniqueName(baseName);\n }", "title": "" }, { "docid": "8dd2ae00643539d437a05cf11ad5bfa9", "score": "0.5015477", "text": "function getInjectorDef(type){return type&&type.hasOwnProperty(NG_INJECTOR_DEF)?type[NG_INJECTOR_DEF]:null}", "title": "" }, { "docid": "18834c048ec5f2c9b1d101a18de2b743", "score": "0.49987233", "text": "function getId() {\n const params = new URLSearchParams(document.location.search.substring(1))\n const id = params.get('id')\n return id\n}", "title": "" }, { "docid": "e3462f47ccee435a24733430f4e5d8f1", "score": "0.49984384", "text": "function YFunction_get_module()\n {\n // try to resolve the function name to a device id without query\n if(this._serial != \"\") {\n return yFindModule(this._serial + \".module\"); \n }\n var hwid = this._func;\n var resolve;\n if(hwid.indexOf(\".\") < 0) {\n resolve = YAPI.resolveFunction(this._className, this._func);\n if(resolve.errorType == YAPI_SUCCESS) hwid = resolve.result;\n }\n var dotidx = hwid.indexOf(\".\");\n if(dotidx >= 0) {\n // resolution worked\n return yFindModule(hwid.substr(0, dotidx) + \".module\");\n }\n\n // device not resolved for now, force a communication for a last chance resolution\n if(this.load(YAPI.defaultCacheValidity) == YAPI_SUCCESS) {\n resolve = YAPI.resolveFunction(this._className, this._func);\n if(resolve.result != undefined) hwid = resolve.result;\n }\n dotidx = hwid.indexOf(\".\");\n if(dotidx >= 0) {\n // resolution worked\n return yFindModule(hwid.substr(0, dotidx) + \".module\");\n }\n // return a true yFindModule object even if it is not a module valid for communicating\n return yFindModule(\"module_of_\"+this.className+\"_\"+this._func);\n }", "title": "" }, { "docid": "de99198bc7338497c86d95c07d15010a", "score": "0.49918938", "text": "function idModule(moduleName) {\n if (moduleName === 'weather') $('.weather-current, .weather-forecast, .location').toggle();\n // if (moduleName === 'email')\n if (moduleName === 'tv') $('.tv-list').toggle();\n if (moduleName === 'movies') $('.movies-container').toggle();\n}", "title": "" }, { "docid": "0fdfe44ef82e9b6d54cedfcc432922f2", "score": "0.49857354", "text": "function getModuleFactory(id) {\n\t var factory = moduleFactories.get(id);\n\t if (!factory) throw new Error(\"No module with ID \" + id + \" loaded\");\n\t return factory;\n\t }", "title": "" }, { "docid": "a3b6fc073e408487503a7afc7638de40", "score": "0.49837765", "text": "function getModuleFactory(id) {\n var factory = moduleFactories.get(id);\n if (!factory)\n throw new Error(\"No module with ID \" + id + \" loaded\");\n return factory;\n}", "title": "" }, { "docid": "a3b6fc073e408487503a7afc7638de40", "score": "0.49837765", "text": "function getModuleFactory(id) {\n var factory = moduleFactories.get(id);\n if (!factory)\n throw new Error(\"No module with ID \" + id + \" loaded\");\n return factory;\n}", "title": "" }, { "docid": "084db0eddbe3b1aa3fb7b86e7997961d", "score": "0.49789232", "text": "function generateNameForImportOrExportDeclaration(node) {\n var expr = ts.getExternalModuleName(node);\n var baseName = ts.isStringLiteral(expr) ? ts.makeIdentifierFromModuleName(expr.text) : \"module\";\n return makeUniqueName(baseName);\n }", "title": "" }, { "docid": "f29d65b6b88eb0c013bd3d3cfaf95946", "score": "0.49677655", "text": "function getId(domElement) {\n let reg = /id[1-9]/;\n return domElement.parentElement.className.match(reg)[0].substr(-1);\n}", "title": "" }, { "docid": "94dda216bbed47116516fd8f808b27e1", "score": "0.49664414", "text": "function YModule_FirstModule()\n {\n var next_hwid = YAPI.getFirstHardwareId('Module');\n if(next_hwid == null) return null;\n return YModule.FindModule(next_hwid);\n }", "title": "" }, { "docid": "4e80a19d8d010845791c640d538dcf8f", "score": "0.4959638", "text": "function generateNameForImportOrExportDeclaration(node) {\n var expr = ts.getExternalModuleName(node);\n var baseName = expr.kind === 9 /* StringLiteral */ ? ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : \"module\";\n return makeUniqueName(baseName);\n }", "title": "" }, { "docid": "5302170edbc418df6cd36ef2a1410b38", "score": "0.49489763", "text": "function getTempId(scope) {\n var id = scope.path.getData(\"functionBind\");\n if (id) return id;\n\n id = scope.generateDeclaredUidIdentifier(\"context\");\n return scope.path.setData(\"functionBind\", id);\n}", "title": "" }, { "docid": "2876a38b273dcc9caf5c926de0e74ad1", "score": "0.4937082", "text": "function getModuleFactory(id) {\n\t var factory = moduleFactories.get(id);\n\t if (!factory)\n\t throw new Error(\"No module with ID \" + id + \" loaded\");\n\t return factory;\n\t }", "title": "" }, { "docid": "f884c73e031f8970bc59533d1cdc985d", "score": "0.48918045", "text": "getIdFuncionABuscar(id) {\n var _a;\n const ids = id.split(\"_\", 2);\n return (_a = ids[1]) !== null && _a !== void 0 ? _a : '';\n }", "title": "" }, { "docid": "8d006270f8280e1829fbd76b63c64523", "score": "0.4891699", "text": "function getModuleNameOfNode(context, node) {\n if (node.type === 'Identifier') {\n return getModuleNameOfIdentifier(context, node);\n }\n else {\n return getModuleNameFromRequire(node);\n }\n}", "title": "" }, { "docid": "e67c16058e46885777d7ae21039ded37", "score": "0.4891287", "text": "get id() { return require('./id') }", "title": "" }, { "docid": "5bc5ee7b6077392850507422867145a1", "score": "0.48753545", "text": "function getInjectorDef(type) {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;\n}", "title": "" }, { "docid": "5bc5ee7b6077392850507422867145a1", "score": "0.48753545", "text": "function getInjectorDef(type) {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;\n}", "title": "" }, { "docid": "5bc5ee7b6077392850507422867145a1", "score": "0.48753545", "text": "function getInjectorDef(type) {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;\n}", "title": "" }, { "docid": "5bc5ee7b6077392850507422867145a1", "score": "0.48753545", "text": "function getInjectorDef(type) {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;\n}", "title": "" }, { "docid": "5aaa7f75e005e4a9e5805363b2651e36", "score": "0.4873015", "text": "function getPatchId(element, currentScope) {\n var patchIdProperty = getPatchIdProperty(element);\n if (patchIdProperty == \"\")\n return \"\";\n\n if (currentScope == null)\n currentScope = angular.element(element).scope();\n\n return evaluatePatchId(patchIdProperty, currentScope)\n }", "title": "" }, { "docid": "e8ea026c45e90d0750792b352a1c513f", "score": "0.48707652", "text": "function getId(el) {\n var id = el.getAttribute('adf-id');\n return id ? id : '-1';\n }", "title": "" }, { "docid": "b80864ab96a6c230408a6041e4ba6520", "score": "0.4870347", "text": "function getShaderModule(moduleOrName) {\n // Check if \"inline\" module\n if (typeof moduleOrName !== 'string') {\n var _shaderModule = moduleOrName;\n __WEBPACK_IMPORTED_MODULE_0_assert___default()(typeof _shaderModule.name === 'string');\n registerShaderModule(_shaderModule, { ignoreMultipleRegistrations: true });\n return _shaderModule;\n }\n\n // Look up module\n var shaderModule = shaderModules[moduleOrName];\n if (!shaderModule) {\n // console.log(`${moduleOrName} not in registered modules:`, shaderModules);\n __WEBPACK_IMPORTED_MODULE_0_assert___default()(false, 'Unknown shader module ' + moduleOrName);\n }\n return shaderModule;\n}", "title": "" }, { "docid": "1b256e622b3bb974857b6a52760f0b57", "score": "0.4863127", "text": "function getModuleSource(moduleName, type) {\n var shaderModule = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shader_modules__[\"a\" /* getShaderModule */])(moduleName);\n var moduleSource = void 0;\n switch (type) {\n case VERTEX_SHADER:\n moduleSource = shaderModule.vs || shaderModule.vertexShader;\n break;\n case FRAGMENT_SHADER:\n moduleSource = shaderModule.fs || shaderModule.fragmentShader;\n break;\n default:\n __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);\n }\n\n if (typeof moduleSource !== 'string') {\n return '';\n }\n\n return '#define MODULE_' + moduleName.toUpperCase() + '\\n' + moduleSource + '// END MODULE_' + moduleName + '\\n\\n';\n}", "title": "" }, { "docid": "9888ab9d5e911a8bfc37bcb077b6ab96", "score": "0.48608977", "text": "async hasId(componentId, includeCache = false) {\n if (!includeCache && componentId.scope !== this.name) return false;\n const opts = {\n includeOrphaned: true,\n includeVersion: true\n };\n return this.legacyScope.hasId(componentId._legacy, opts);\n }", "title": "" }, { "docid": "d39ed96472fb6354c842b3a66867853c", "score": "0.48484513", "text": "function get(id) {\n if (has.call(require_memo, id)) {\n return require_memo[id];\n }\n throw requireError(\n new Error('The module \"'+ id +'\" could not be found.'));\n }", "title": "" }, { "docid": "726c5252abe7726102685bdceac64a28", "score": "0.48352796", "text": "function findWidget(widgetId) {\n return {\n modulePath: widgetId,\n };\n }", "title": "" }, { "docid": "42a91f73949aa6e6abfd2832910173c5", "score": "0.48315334", "text": "getId() {\n return this.getDefinition()[DEFINITION.ID];\n }", "title": "" }, { "docid": "3112906611c5c18cb3af64108b0eb210", "score": "0.48297116", "text": "function getUniqueRunDependency(id) {\n return id;\n}", "title": "" }, { "docid": "3112906611c5c18cb3af64108b0eb210", "score": "0.48297116", "text": "function getUniqueRunDependency(id) {\n return id;\n}", "title": "" }, { "docid": "3112906611c5c18cb3af64108b0eb210", "score": "0.48297116", "text": "function getUniqueRunDependency(id) {\n return id;\n}", "title": "" }, { "docid": "3112906611c5c18cb3af64108b0eb210", "score": "0.48297116", "text": "function getUniqueRunDependency(id) {\n return id;\n}", "title": "" }, { "docid": "3112906611c5c18cb3af64108b0eb210", "score": "0.48297116", "text": "function getUniqueRunDependency(id) {\n return id;\n}", "title": "" }, { "docid": "ba3cfef829fa0ad83a5005af446b6a8f", "score": "0.48250955", "text": "guildNameToId(guildName){\n let guilds = bootstrap.durendal.bot.guilds;\n let matchingGuilds = null;\n if(!guilds){\n return '';\n }\n matchingGuilds = guilds.filterArray(g=> g.name===guildName);\n if(matchingGuilds.length===1){\n return matchingGuilds[0].id;\n }\n return '';\n }", "title": "" }, { "docid": "bb22c85480a3205dab40d95548c4d2b9", "score": "0.48212612", "text": "function YModule_functionId(functionIndex)\n {\n var dev = this._getDev();\n if(!dev) return \"\";\n return dev.functionId(functionIndex);\n }", "title": "" }, { "docid": "3ebdba4f52616cecc36ae310fe67e056", "score": "0.48123243", "text": "get addonID()\n {\n let {addonID} = require(\"info\");\n return addonID;\n }", "title": "" }, { "docid": "301549418b011a0d7740938cdd2e6592", "score": "0.4807024", "text": "getNextComponentId() { }", "title": "" }, { "docid": "f4228277107c3ae80ee95ff943f24042", "score": "0.48046592", "text": "function getInjectorDef(type) {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;\n }", "title": "" }, { "docid": "df2e46dc118e9f531566dfefbddfc09b", "score": "0.48012465", "text": "function generateConcreteFragmentID() {\n\t return __webpack_require__(155)(_nextFragmentID++) + SUFFIX;\n\t}", "title": "" }, { "docid": "1e92c0e160552a1e78001badd48138c5", "score": "0.4794427", "text": "static getModule(name){\n\t\treturn modules[name];\n\t}", "title": "" }, { "docid": "f725ba4e61c55b16de90aac3c7dd5abc", "score": "0.47906685", "text": "function getExportPath(name, moduleAst) {\n let identifierPath;\n\n // Find `export default definition;`\n const defaultVisitor = {\n ExportDefaultDeclaration(path) {\n path.traverse({\n Identifier(identifierNodePath) {\n identifierPath = identifierNodePath;\n }\n });\n }\n };\n\n if (name === 'default') {\n traverse(moduleAst, defaultVisitor);\n }\n\n // Find appropriate specifier in `export {foo as bar};`\n const specifierVisitor = {\n ExportSpecifier(path) {\n if (path.node.exported.name === name) {\n identifierPath = path;\n }\n }\n };\n\n // pull identifier out of `export const definition = 'foo';`\n const identifierVisitor = {\n Identifier(identifierNodePath) {\n if (!identifierPath && identifierNodePath.node.name === name) {\n identifierPath = identifierNodePath;\n }\n }\n };\n\n const namedVisitor = {\n ExportNamedDeclaration(path) {\n if (!identifierPath) {\n if (path.node.specifiers.length) {\n path.traverse(specifierVisitor);\n } else {\n path.traverse(identifierVisitor);\n }\n }\n }\n };\n\n traverse(moduleAst, namedVisitor);\n\n return identifierPath;\n}", "title": "" }, { "docid": "3549363a8f35ca86a66ccbdd40a8119d", "score": "0.47830126", "text": "function getEntryId(of) {\n const matches = String(of).match(/^.*?([\\d\\.]+)$/);\n return matches == null ? \"\" : matches[1];\n}", "title": "" }, { "docid": "e600fe5bb1ce41ab6ccf98cc28f07d20", "score": "0.47770703", "text": "function getHostAttribute(compId) {\r\n return \"_nghost-\" + compId;\r\n}", "title": "" }, { "docid": "4ab949c2bf735b757b3c3b8aecf93d52", "score": "0.47741285", "text": "function isExtensionModule(moduleId) {\n if (!extensionMetadata || !Array.isArray(extensionMetadata.modules)) {\n return false;\n }\n return extensionMetadata.modules.filter(function (module) {\n return module.id === moduleId;\n }).length > 0;\n }", "title": "" }, { "docid": "930041bc62926d91a90978d83c9a8f4d", "score": "0.47586787", "text": "function createProjectId(){\n while (true){\n var id = '_' + Math.random().toString(36).substr(2, 9);\n if(database.projects.find((project) => project.id == id)==null){\n return id\n }\n }\n}", "title": "" }, { "docid": "b07c2a86444a34c22b0fde0e33dd48b3", "score": "0.475854", "text": "getRouteId (route) {\n const id = _.get(route.config, 'id')\n if (id) return id\n\n return `[${route.method}] ${route.path} -> ${route.handler}`\n }", "title": "" }, { "docid": "12228030feb92fa34a3d63208f12e5fc", "score": "0.47543418", "text": "function getId() {\n var id = state.get(\"id\");\n if(id == null) {\n id = context.get(Scope.REQUEST, \"urn:ibm:security:asf:request:parameter\", \"id\");\n }\n return jsString(id);\n}", "title": "" }, { "docid": "9060e7602772ba220e6b1861a4a1f7ed", "score": "0.47443858", "text": "function NgModuleDecorator() { }", "title": "" }, { "docid": "9060e7602772ba220e6b1861a4a1f7ed", "score": "0.47443858", "text": "function NgModuleDecorator() { }", "title": "" }, { "docid": "9060e7602772ba220e6b1861a4a1f7ed", "score": "0.47443858", "text": "function NgModuleDecorator() { }", "title": "" }, { "docid": "9060e7602772ba220e6b1861a4a1f7ed", "score": "0.47443858", "text": "function NgModuleDecorator() { }", "title": "" }, { "docid": "2695a4bdd513486dcb9b5b10e0c7ecdd", "score": "0.47441012", "text": "function getid(element){\n return browser.driver.findElement(by.id(element));\n }", "title": "" }, { "docid": "3ed9679bd27c5e0c9c6d639ef85221e9", "score": "0.47337896", "text": "function getId() {\n const url = new URL(window.location.href);\n return url.searchParams.get(\"id\");\n}", "title": "" }, { "docid": "0fb7c4bb2d721051b62f8e655bc31668", "score": "0.47289753", "text": "__name__({ pod, dasherizedModuleName }) {\n if (pod) {\n return 'component';\n }\n return dasherizedModuleName;\n }", "title": "" }, { "docid": "ee5b486c371fb0ebb7fefb1addb48d35", "score": "0.47274122", "text": "function moduleName (obj) {\n const mod = __webpack_require__(147)(obj)\n if (!mod) throw new Error(`No command name given for module: ${inspect(obj)}`)\n return commandFromFilename(mod.filename)\n }", "title": "" }, { "docid": "9f3fd991a6e65229176451192ed4fdb5", "score": "0.4726926", "text": "function getShaderName({id, source, type}) {\n const injectShaderName = id && typeof id === 'string' && source.indexOf('SHADER_NAME') === -1;\n return injectShaderName ? `\n#define SHADER_NAME ${id}_${SHADER_TYPE[type]}\n\n` : '';\n}", "title": "" }, { "docid": "12ea796e95f77e59313903bec29a0892", "score": "0.47108713", "text": "beforeLoadModuleCode(id) {}", "title": "" }, { "docid": "c424aa151ef1b28b0f8f988ca764628d", "score": "0.47089675", "text": "get(id) {\r\n\r\n // Parse id in case it is a string\r\n id = parseInt(id, 10);\r\n \r\n if (this.programGroups.has(id)) {\r\n return this.programGroups.get(id);\r\n } else {\r\n console.warn(`ProgramProvider does not have ProgramGroup ${id}`);\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "339d7abb8f951b0c3f72b92dd8cac93d", "score": "0.47070244", "text": "function getMaterialId(reg, matIDs, name, lazyInit) {\n if (!name) return 0\n var id = matIDs[name]\n if (id === undefined && lazyInit) id = reg.registerMaterial(name)\n return id\n}", "title": "" }, { "docid": "339d7abb8f951b0c3f72b92dd8cac93d", "score": "0.47070244", "text": "function getMaterialId(reg, matIDs, name, lazyInit) {\n if (!name) return 0\n var id = matIDs[name]\n if (id === undefined && lazyInit) id = reg.registerMaterial(name)\n return id\n}", "title": "" } ]
7311f397dfcdade1544333441f20a52e
Reads the user selection and pushes the value to an array
[ { "docid": "096dc50a5586370d120a7202d443827e", "score": "0.57114375", "text": "function choose() {\n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n }", "title": "" } ]
[ { "docid": "b74a19337c248df38226ac5dafd170d2", "score": "0.64500046", "text": "inputArray(arr) {\n let size = readline.question('Enter size of array: ');\n for (let i = 0; i < size; i++) {\n arr[i] = readline.question('enter element no. [' + i + ']= ');\n }\n return arr;\n }", "title": "" }, { "docid": "1e98839b54eeca91f30914a9c27f25c0", "score": "0.62491554", "text": "_fillSelectionArray() {\n\n for ( let I = 0 ; I < this.conf.inputsource.length; I++ ) {\n\n if ( typeof( this.conf.inputsource[I]) !== \"undefined\" &&\n this.conf.inputsource[I] !== null ) {\n\n if ( this.conf.inputsource[I].valid === true &&\n this.conf.inputsource[I].prog_id !== \"i_request\") {\n\n let item = {};\n\n item.i18n = this.conf.inputsource[I].i18n;\n item.command = this.conf.inputsource[I].command;\n\n this.selAr.push( item );\n }\n }\n }\n }", "title": "" }, { "docid": "34d5d5797fb94a9707b06dd8bf25408e", "score": "0.60576016", "text": "function addTo() {\r\n fromInput.push(document.getElementById(\"userinput\").value.toLowerCase());\r\n console.log(fromInput); //to confirm it has been added to the array\r\n\t\t\tstringToArr(fromInput);\r\n\t\t\tcallLibrary(); \r\n\t\r\n}", "title": "" }, { "docid": "7df66f65b1f952fcef8d1e6e28392ba3", "score": "0.59808743", "text": "function answerSelect(choice){\n\tuserFeelings.push(choice);\n\tnextQuestion();\n\tconsole.log(userFeelings)\n}", "title": "" }, { "docid": "0ab3584686660c381a0f149b08e7bfc9", "score": "0.59795505", "text": "function getInputValue(){\n \tvar name=document.getElementById('name').value;\n var age=parseInt(document.getElementById('age').value);\n var isMale=Boolean(document.getElementById('isMale').value);\n var foods=document.getElementById('foods').value;\n var foodsArr=foods.split(\" \");\n var arr=[name, age, isMale, foodsArr];\n\n variablesTypes(arr)\n }", "title": "" }, { "docid": "fd0ccf388d546945f7f5a0f077eb3698", "score": "0.57646185", "text": "function fourFunk(){\n let inputValue = $('#input1').val(4);\n numbersArray.push(4);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "3f07f8b373572e7a90a8579ed8de291e", "score": "0.5736823", "text": "function choose(){\n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n }", "title": "" }, { "docid": "38fd8563932286f8061e813f8319f4f3", "score": "0.5716662", "text": "function choose() {\n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n }", "title": "" }, { "docid": "6ec04b01729da92333829a4f55e14bcb", "score": "0.5711238", "text": "function threeFunk(){\n let inputValue = $('#input1').val(3);\n numbersArray.push(3);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "a45e2bf65d7ff9825eeb097a91f6e4fd", "score": "0.56850624", "text": "function userPick() {\n console.log(options);\n let i = parseInt(prompt(\"please input a number 0 to 2, to choose an option\").trim());\n if ((i < 3) && (i >= 0)){\n return options[i];\n } else {\n console.log(\"not a valid input\")\n userPick()\n }\n \n}", "title": "" }, { "docid": "4059cad5afa1d902d90b28577ef69491", "score": "0.5673982", "text": "function getInput() {\n //user inputs data using a form.return a list/array of input data\n var userInput = [];\n var date = document.getElementById(\"date\").value;\n userInput.push(date);\n var month = document.getElementById(\"month\").value;\n userInput.push(month);\n var year = document.getElementById(\"year\").value;\n userInput.push(year);\n var gender = document.getElementById(\"gender\").value;\n userInput.push(gender);\n return userInput;\n}", "title": "" }, { "docid": "c3d24a3ed2840f625618e194610b6223", "score": "0.56692487", "text": "function choose() {\r\n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\r\n }", "title": "" }, { "docid": "c3d24a3ed2840f625618e194610b6223", "score": "0.56692487", "text": "function choose() {\r\n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\r\n }", "title": "" }, { "docid": "ae289453142808f7d8a752fc721a109d", "score": "0.5650476", "text": "function main() {\n var arr = [];\n var quest = parseInt(prompt(\"Is a teacher, student, or parent checking in?\"));\n\n switch (quest) {\n case 'teacher':\n arr.push(\"teacher\");\n break;\n case 'student':\n arr.push(\"student\");\n break;\n case 'parent':\n arr.push(\"parent\");\n break;\n default:\n console.log(\"ERROR\");\n }\n}", "title": "" }, { "docid": "b6a8d48d2c9ea16ceb7522c45a1e7a81", "score": "0.56388026", "text": "function oneFunk(){\n let inputValue = $('#input1').val(1);\n numbersArray.push(1);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "5a9f319156027c5a3f5efc1153cfa92a", "score": "0.56133884", "text": "function fiveFunk(){\n let inputValue = $('#input1').val(5);\n numbersArray.push(5);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "91062b15544af4edd9b6301c4cb0d04e", "score": "0.55699223", "text": "function choose() {\n selections[questionCounter] = + $('input[name=\"answer\"]:checked').val();\n \n }", "title": "" }, { "docid": "8b751a247bb807073428e208c28cbf88", "score": "0.55551755", "text": "function sevenFunk(){\n let inputValue = $('#input1').val(7);\n numbersArray.push(7);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "696efa9c4868eff27cb1423c76ca5497", "score": "0.5554465", "text": "function eightFunk(){\n let inputValue = $('#input1').val(8);\n numbersArray.push(8);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "2379e918cb85a85c9d84dc9b8b33ab00", "score": "0.55369496", "text": "function checkUserChoice() {\n const userChoice = document.querySelector('input[name=\"user-choice\"]:checked').value;\n console.log('user choice', userChoice);\n const userResult = document.querySelector('#result-history');\n userArray.push(userChoice);\n userResult.textContent = 'User: ' + userArray;\n}", "title": "" }, { "docid": "7651be2a2d82ff0653721d8540e94ee1", "score": "0.5526928", "text": "function twoFunk(){\n let inputValue = $('#input1').val(2);\n numbersArray.push(2);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "2c8050cde1145e953216aeaa576a09a3", "score": "0.552543", "text": "function choose() { \n\n if (!(isNaN(parseInt($('input[name=\"answer\"]:checked').val()))))\n {selections.push(parseInt($('input[name=\"answer\"]:checked').val()));\n selected=1;}\n }", "title": "" }, { "docid": "082f3100cc8a542afd9f996513a1cba1", "score": "0.5505709", "text": "function choose() {\n\nif(questions[questionCounter].type=== 1){\n selections[questionCounter] = +$('input[name=\"answer\"]').val();\n } else {\n \n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n }\n\n console.table(selections);\n console.table(questionCounter);\n }", "title": "" }, { "docid": "5ff015dfd5c03636a21baa6238f16b5c", "score": "0.54876465", "text": "function selectArrayTypeChange() {\n array_selection = select_array_type.value;\n model = new avalanche2d.Model(canvas, model_options, array_selection);\n}", "title": "" }, { "docid": "c25a51d7688b13ab630ed7d15ef78939", "score": "0.5479726", "text": "function selectionToArray(selection) {\n var len = selection.length\n var result = []\n for (var i = 0; i < len; i++) {\n result.push(selection[i])\n }\n return result\n }", "title": "" }, { "docid": "43d4787ab4c6f7e057c48b7b31369f43", "score": "0.54790074", "text": "function sixFunk(){\n let inputValue = $('#input1').val(6);\n numbersArray.push(6);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "3934bec1cff7e77c2e8222df201b379e", "score": "0.5469112", "text": "function parseInput(){\n\n if(segments.value){ \n clearSelections();\n clearRowAndColSelections();\n \n var segmArr = segments.value.split(\" \");\n parseInputArray(segmArr);\n\n }else{\n formSelPart();\n }\n}", "title": "" }, { "docid": "cc77a5e623e53853ac70fcda11542d07", "score": "0.54653335", "text": "function input()\n{\n var line = read_line();\n if (line == \"\") {\n return (new Array());\n }\n \n line = line.replace(/ +$/,'');\n return (line.split(\" \"));\n}", "title": "" }, { "docid": "161c1c18b1a824594758c02827407427", "score": "0.5442188", "text": "function choose() {\nselections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n}", "title": "" }, { "docid": "161c1c18b1a824594758c02827407427", "score": "0.5442188", "text": "function choose() {\nselections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n}", "title": "" }, { "docid": "161c1c18b1a824594758c02827407427", "score": "0.5442188", "text": "function choose() {\nselections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\n}", "title": "" }, { "docid": "c62eb8cf36a462a70a8ee916a76df045", "score": "0.5441348", "text": "function getInputValue(){\n var arr=document.getElementById('textField').value;\n var array=arr.split(\", \");\n sortArray(array);\n }", "title": "" }, { "docid": "4104390efc323815620e41229502e61a", "score": "0.54318684", "text": "function addStringToArray() {\n tasks[index] = inputText.value;\n}", "title": "" }, { "docid": "f7e8f76e7bdc61d223739a4cae8a5a55", "score": "0.5417523", "text": "function choose() {\r\n if (questionCounter <= 4) {\r\n selections[questionCounter] = +$('input[name=\"answer\"]:checked').val();\r\n }\r\n else {\r\n var textInputFeedback = $('.input.is-large');\r\n selections[questionCounter] = textInputFeedback.val();\r\n }\r\n }", "title": "" }, { "docid": "d4f782ad6aa821c3cda5319736aa86ad", "score": "0.5407314", "text": "function readUserInput() {\n newline();\n stdout.write(' \\033[33m Enter your choice: \\033[39m');\n stdin.resume();\n stdin.setEncoding('utf8');\n stdin.on('data', selectedOption);\n }", "title": "" }, { "docid": "7c2cffa975422d73191b3fad7b0f1944", "score": "0.5391897", "text": "inputRead() {\n let input = readline.question(\"\");//get the value from user\n return input;\n }", "title": "" }, { "docid": "62f04f837084eedf4c1930a91b96d89e", "score": "0.53765756", "text": "function getSkills() {\r\n return arr = Array.from(document.getElementById(\"input_skills\").options)\r\n .filter(option => option.selected)\r\n .map(option => option.value)\r\n}", "title": "" }, { "docid": "d3e51d42586b05416b59f9c9bee6c2e4", "score": "0.5356777", "text": "function numberPush(){\r\n //get value from the input text numberInput\r\n var numberInput = document.getElementById('numberInput').value;\r\n //append the user data to the array\r\n numberArray.push(numberInput);\r\n var pushValue = \"\";\r\n for(i = 0; i < numberArray.length; i++)\r\n {\r\n pushValue = pushValue + numberArray[i] + \" \";\r\n }\r\n //display the array to the user\r\n document.getElementById('arrayValues').innerHTML = pushValue;\r\n document.getElementById('numberInput').value = \"\";\r\n}", "title": "" }, { "docid": "ca74cec78570f7f4a4c2a2ed0ac76e38", "score": "0.53562474", "text": "onSelectionChange(event) {\n\n let levels = this.showLevels.split(',')\n\n // Get selections from this.value but scaffold out selections if there is no value.\n let selections = [...this.value]\n if (selections.length === 0) {\n levels.forEach(level => {\n selections = [...selections, ...[{ level, value: '' }]]\n })\n }\n\n // Calculate our new value.\n let newSelections = selections.map(selection => {\n // Modify the selection level associated with the event.\n if (selection.level === event.target.name) {\n return {\n level: event.target.name,\n value: event.target.value\n }\n }\n // Make sure to set the selection values to '' for all selections after the one just selected. \n else if (levels.indexOf(selection.level) > levels.indexOf(event.target.name)) {\n return {\n level: selection.level,\n value: ''\n }\n }\n // Return unmodified selections if they are unrelated to this event.\n else {\n return selection\n }\n })\n\n // Check if incomplete.\n let inputIncomplete = false\n if (newSelections.find(selection => selection.value === '')) inputIncomplete = true\n\n this.value = newSelections\n this.dispatchEvent(new Event('change'))\n\n }", "title": "" }, { "docid": "3670d43fb94a0d1c447cd60628809bc3", "score": "0.5354611", "text": "function get_chosen_fields(){\r\n\t\t\t console.log(\"array is:\" + array);\r\n\t\t\t array = [];\r\n\t\t\tconsole.log(\"array is now :\" + array);\r\n\t\t\t$( \"#right-defaults > li\" ).each(function() {\r\n\t\t\t\tvar value = $( this ).text();\r\n\t\t\t\tarray.push(value); \r\n\t\t\t});\r\n\t\t\tconsole.log(\"array is now 2 :\" + array);\r\n\t\t}", "title": "" }, { "docid": "4f69b01026c093f43f3ca05fadf4baf7", "score": "0.53452945", "text": "function viewsArrayInput (){\n var arrayInput = new Array();\n var inputsValues = document.getElementsByClassName('datoInput'),\n namesValues = [].map.call(inputsValues, function (dataInput){\n arrayInput.push(dataInput.value);\n })\n arrayInput.forEach(function(inputsValuesData){\n console.log(\"El valor es \"+ inputsValuesData);\n })\n }", "title": "" }, { "docid": "fa0353dba896593c709ca021ec481b80", "score": "0.5338609", "text": "function pushToArray() {\n $(\"#guessList\").append(\"<li>\" + $('#userGuess').val() + \"</li>\");\n }", "title": "" }, { "docid": "1e989aad57bc2ceebeabd501286baf39", "score": "0.5329412", "text": "function getValue() {\n\tstr = document.getElementById('input').value;\n\t\n\tif (/^[0-9a-zA-Zа-яА-Я]+\\s*\\=\\s*[0-9a-zA-Zа-яА-Я]+$/.test(str)) {\n\t\t// extract two substring and remove white space\n\t\tarrSplit = str.replace(/\\s+/g, '').split('=');\n\t\t// add new array to arr[]\n\t\tarr.push(arrSplit);\n\t\t// using helper func for mapping arr and return name=value to index.html\n\t\tdocument.getElementById('list').innerHTML = helper(arr);\n\t}\n}", "title": "" }, { "docid": "a1d614cff4c68df48118d20edb82548b", "score": "0.53288853", "text": "function nineFunk(){\n let inputValue = $('#input1').val(9);\n numbersArray.push(9);\n console.log(numbersArray);\n}", "title": "" }, { "docid": "1030de4a2ce4894482d56e48124b801a", "score": "0.53272945", "text": "function getACHMenu() {\r\n var current = eval(\"record4\");\r\n\r\n //iterate through the data from the text file and store into an array\r\n for (var i = 0; i < record4.length; i++) {\r\n achMenu[i] = current[i];\r\n }\r\n} //end getACHMenu", "title": "" }, { "docid": "9e70cd4b8ec1ad23b9adb10d72ff5098", "score": "0.53231174", "text": "function choose() {\n options[questionUpticker] = +$('input[name=\"answer\"]:checked').val();\n }", "title": "" }, { "docid": "d7832b0d2f35a24dbd566bd1bf9dc092", "score": "0.53157485", "text": "function editData(person) {\n person.push(getSelectedIndex());\n person.push($(\"#editModal #name\").val());\n person.push($(\"#editModal #salary\").val());\n}", "title": "" }, { "docid": "a567174cce54b4e7fb5686d573c4d9ca", "score": "0.5296159", "text": "function incorrect(){\nincorrectGuess = wrongGuess.push(userSelection);\nreturn incorrectGuess;\n}", "title": "" }, { "docid": "37130ecbd1c894b52248d7c5290b796c", "score": "0.52935946", "text": "handleInputSelect(value) {\n this.setState({\n selectedInput: value.map(v => v.data)\n });\n }", "title": "" }, { "docid": "c1dc62ba17da7f12781cc15f31ae662d", "score": "0.52851504", "text": "function getInfo (array, index) {\n var theLength = prompt(\"What is the length of room number \" + index + \"?\");\n var theHeight = prompt(\"What is the height of room number \" + index + \"?\");\n var theWidth = prompt(\"What is the width of room number \" + index + \"?\");\n var newRoom = {\n \"length\": theLength,\n \"height\": theHeight,\n \"width\": theWidth\n };\n return array.push(newRoom);\n}", "title": "" }, { "docid": "ada5ebe5826aafec3e2c9b07cb03d72e", "score": "0.528152", "text": "function input_array() {\n a.show();\n if (viz.auto_next) viz.pause();\n $('#array').show();\n //$('#autofillArray').show();\n}", "title": "" }, { "docid": "96f60a8f059ab3bca1a9cc1c98cc8433", "score": "0.5277303", "text": "function values(){\n\t\treturn selection;\n\t}", "title": "" }, { "docid": "9a7c83741dfc12cb587be2e9bda64f43", "score": "0.52768534", "text": "function addToDoOnclick() {\n items.push(toDoInput.value);\n console.log(items);\n \n\n \n\n}", "title": "" }, { "docid": "6cfc7a362d289929080fe65844ef5c09", "score": "0.5265335", "text": "function selectionToArray(selection) {\n var len = selection.length;\n var result = [];\n for (var i = 0; i < len; i += 1) {\n result.push(selection[i]);\n }\n return result;\n}", "title": "" }, { "docid": "6cfc7a362d289929080fe65844ef5c09", "score": "0.5265335", "text": "function selectionToArray(selection) {\n var len = selection.length;\n var result = [];\n for (var i = 0; i < len; i += 1) {\n result.push(selection[i]);\n }\n return result;\n}", "title": "" }, { "docid": "7f72be8dcc87c95c9fe9a2125b2aa9d6", "score": "0.5261531", "text": "function updateInputVal() {\n\t\t\t\t\treturn $input.val(bufferArr.join(\"\")).val()\n\t\t\t\t}", "title": "" }, { "docid": "58c311bd3d75a752f34901a851b82b5e", "score": "0.5260078", "text": "_setSelectionByValue(value, isUserInput = true) {\n this._clearSelection();\n if (Array.isArray(value)) {\n value.forEach(currentValue => this._selectValue(currentValue, isUserInput));\n }\n else {\n this._selectValue(value, isUserInput);\n }\n }", "title": "" }, { "docid": "e5fd61bf73b9adf0e92d86fde5fbaf43", "score": "0.52564985", "text": "function storeUserInput(){\n\nconst vegan = document.querySelector(\"veganCheckBox\");\nvegan.addEventListener( 'change', function() {\n if(this.checked) {\n // Checkbox is checked..\n dietaryRescritions.push(\"vegan\")\n } else {\n // Checkbox is not checked..\n\n }\n});\n\nconst vegetarian = document.querySelector(\"vegetarianCheckBox\");\nvegetarian.addEventListener( 'change', function() {\n if(this.checked) {\n // Checkbox is checked..\n dietaryRescritions.push(\"vegetarian\")\n } else {\n // Checkbox is not checked..\n\n }\n});\n\nconst mainIngredient = UserInputEl.value;\nconst userInput = { mainIngredient, vegan, vegetarian,}\n\n\n}", "title": "" }, { "docid": "68bf3b3dd132c8456a2ac3130578a7ec", "score": "0.5256453", "text": "function selectArrayElement(elementChoose) {\n\n var elementArray;\n switch (elementChoose) {\n case (\"wv\"):\n elementArray = gWords;\n break;\n case (\"qv\"):\n elementArray = quotes;\n break;\n case (\"tv\"):\n elementArray = theme;\n break;\n case (\"cwv\"):\n elementArray = cWords;\n break;\n case (\"pv\"):\n elementArray = parts;\n break;\n case (\"ahv\"):\n elementArray = artistRefHigh;\n break;\n case (\"alv\"):\n elementArray = artistRefLow;\n break;\n case (\"sv\"):\n elementArray = soundtrack;\n break;\n default:\n alert(\"default\");\n }\n\n var randomValue = randomInteger(elementArray.length);\n return elementArray[randomValue];\n\n}", "title": "" }, { "docid": "4f7263453b241edb18d9c471e731351a", "score": "0.5241225", "text": "function passwordSelection() {\n let allCharacters = [];\n do {\n let specialChars = confirm(\n \"Click OK to confirm including special characters\"\n );\n let numericChars = confirm(\n \"Click OK to confirm including numeric characters\"\n );\n let lowerChars = confirm(\n \"Click OK to confirm including lowercase characters\"\n );\n let upperChars = confirm(\n \"Click OK to confirm including uppercase characters\"\n );\n //This is telling the browser that if the user selects _____ we want to push all the values of the array and assign it to the variable\n if (specialChars) {\n allCharacters.push(...specialCharacters);\n console.log(...specialCharacters);\n }\n if (numericChars) {\n allCharacters.push(...numericCharacters);\n console.log(...numericCharacters);\n }\n if (lowerChars) {\n allCharacters.push(...lowerCasedCharacters);\n console.log(...lowerCasedCharacters);\n }\n if (upperChars) {\n allCharacters.push(...upperCasedCharacters);\n console.log(...upperCasedCharacters);\n }\n //if no character options are selected an alert will tell them they need at least one\n if (allCharacters.length < 1) {\n alert(\"You need to select at least one!\");\n }\n } while (allCharacters.length < 1)\n return allCharacters;\n}", "title": "" }, { "docid": "307b960772c662586df19499d1d16c47", "score": "0.5237946", "text": "onKeypress() {\n var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;\n\n if (this.opt.choices.getChoice(index)) {\n this.selected = index;\n } else {\n this.selected = undefined;\n }\n\n this.render();\n }", "title": "" }, { "docid": "307b960772c662586df19499d1d16c47", "score": "0.5237946", "text": "onKeypress() {\n var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0;\n\n if (this.opt.choices.getChoice(index)) {\n this.selected = index;\n } else {\n this.selected = undefined;\n }\n\n this.render();\n }", "title": "" }, { "docid": "49c3321359ecc9ce9b3d41cc1700f6a1", "score": "0.5228074", "text": "function setArrValues(){\r\n\tdocument.getElementById(\"value\").value = nameArr[count];\r\n\tdocument.getElementById(\"setting\").value = idArr[count];\r\n}", "title": "" }, { "docid": "1a76db4e4e8f3922e4441ea419f0e174", "score": "0.52265173", "text": "function puzzle_select(){\n puzzleSelect = puzzle.value;\n}", "title": "" }, { "docid": "194bb90cbc9abec8083a319a997abf34", "score": "0.5226385", "text": "function GetBoardArr() {\r\n return newInput0;\r\n}", "title": "" }, { "docid": "18ceb926b7aac897eb076a5f1dbb7d83", "score": "0.52235997", "text": "function selectTopping(selectedVal) {\n dropdown.style.display = 'none';\n const selected_option = selectedVal.value.trim();\n if (selected_option.length) {\n selectedItemArr.push(selectedVal.value);\n displaySelectedOption(selected_option);\n search_input.value = '';\n search_text.style.display = 'none';\n console.log(selectedItemArr);\n }\n}", "title": "" }, { "docid": "26f9c6e274b0651d7c739729a198579d", "score": "0.5204589", "text": "function getInput (options, callback) {\n allUserData.push (options);\n \n callback (options);\n\n}", "title": "" }, { "docid": "a659cf4051df27bc7d4c4c4d6ed731fd", "score": "0.52001053", "text": "function relleno() {\n\n// var parrafo = document.getElementById(\"mostrar\");\n\n\n\n var numero = parseInt(prompt(\"Introduce un numero de indice del array\"));\n\n var numeroA = numero;\n var array1 = Array(numeroA);\n var contador = 0;\n\n\n do {\n numero = prompt(\"Introduce un numero\");\n array1[contador] = numero;\n contador++;\n\n } while (contador < numeroA);\n\n document.write(array1 + \",\");\n\n\n\n}", "title": "" }, { "docid": "74222e246f7df9f03f057e2f9d9bf2e4", "score": "0.51924604", "text": "function captureInput() {\n //push the text inside the HTML tag (e.g. #zero will have a value of 0)\n numArray.push($(this).html());\n displayInput(numArray);\n}", "title": "" }, { "docid": "a63b0cb928d0b1aeef3637ce59841e1b", "score": "0.5184861", "text": "function read(){\n console.log(newarr);\n}", "title": "" }, { "docid": "33c42d8ed003b92c6a1ae16650940db0", "score": "0.5184611", "text": "function addSelectedItemToCart() {\n // TODO: suss out the item picked from the select list\n var itemInCart = {\n name: document.getElementById('items').value,\n quantityChosen: document.getElementById('quantity').value\n }\n\n arrayCart.push(itemInCart);\n \n}", "title": "" }, { "docid": "cc0a76bb96468c54b3198c01b8ea6e09", "score": "0.5182582", "text": "function addGuess(){\n userInputArray.push(\"userInput\");\n }", "title": "" }, { "docid": "24d973c6b78bbc419f2209e51eca9b34", "score": "0.51822877", "text": "function createNewType(){\n let t = document.getElementById('types').value;\n console.log(t);\n if(t === 'options'){\n let p = prompt(\"enter new type\",\"\");\n if (p != null){\n type.push(p);\n }\n render();\n\n }\n}", "title": "" }, { "docid": "72d7c1fc00e6002f678c2a1f75f7f4b3", "score": "0.51818824", "text": "get value() {\n return this._invalid ? [] : this.selectionModel.selected;\n }", "title": "" }, { "docid": "74857198567c24f73563cbe675d3bdcd", "score": "0.51795477", "text": "function getInput(){\n let search_bar_content = [];\n search_bar_content[0] = document.querySelector('#search_input').value;\n search_bar_content[1] = document.querySelector('#location_input').value;\n\n \n try{\n document.querySelector('#full_time_checkbox:checked').value;\n search_bar_content[2] = \"true\";\n }catch{\n search_bar_content[2] = \"false\";\n }\n \n console.log(search_bar_content);\n return search_bar_content;\n}", "title": "" }, { "docid": "1050a50683d29ff3d1e7e62d37f52495", "score": "0.5179", "text": "function get_select_values() {\n var x = document.getElementById(\"choices\");\n var selects = Array();\n \n for (var i = 0; i < x.length; i++) {\n if (x.options[i].selected){\n selects.push(x.options[i].value);\n }\n }\n return selects;\n}", "title": "" }, { "docid": "9199aae57ca2dbffff7f1a88e5942e16", "score": "0.5171136", "text": "function getAnswer() {\n var question1Arr = $(\"input[type=radio][name=q1]:checked\").val();\n answerArr.push(question1Arr);\n\n var question2Arr = $(\"input[type=radio][name=q2]:checked\").val();\n answerArr.push(question2Arr);\n var question3Arr = $(\"input[type=radio][name=q3]:checked\").val();\n answerArr.push(question3Arr);\n var question4Arr = $(\"input[type=radio][name=q4]:checked\").val();\n answerArr.push(question4Arr);\n var question5Arr = $(\"input[type=radio][name=q5]:checked\").val();\n answerArr.push(question5Arr);\n var question6Arr = $(\"input[type=radio][name=q6]:checked\").val();\n answerArr.push(question6Arr);\n var question7Arr = $(\"input[type=radio][name=q7]:checked\").val();\n answerArr.push(question7Arr);\n // alert(question1Arr);}\n }", "title": "" }, { "docid": "724d86de13ab4583703d9d117867a7e5", "score": "0.5164248", "text": "value (value) {\n this.selection = [];\n this.selecting = [];\n }", "title": "" }, { "docid": "0bc0716e97401d21429edd17331feb04", "score": "0.51584816", "text": "function getInputValue(){\n \tvar str=document.getElementById('arrayField').value;\n var index=parseInt(document.getElementById('indexArray').value);\n var arr=str.split(\", \");\n \tbiggerThanNeighbors(index, arr);\n }", "title": "" }, { "docid": "1eb27263017378b0f37956ae1a113b6c", "score": "0.51450616", "text": "function addcheckeddata(){\n \n var checkeddata = [];\n\n\n}", "title": "" }, { "docid": "051558faac5f0c79d359433f36da9b09", "score": "0.5132866", "text": "function getMenu() {\r\n\r\n var current = eval(\"record1\");\r\n\r\n //iterate through the data from the text file and store into an array\r\n for (var i = 0; i < record1.length; i++) {\r\n mainMenu[i] = current[i];\r\n\r\n }\r\n} //end getMenu", "title": "" }, { "docid": "09e9cc9cf540691c4b80f2f2ad2a4d4b", "score": "0.51273817", "text": "function retrieve_input_value(){\n var input_value = document.getElementById('text_input').value;\n var element_selector = input_value;\n var element_value = document.querySelectorAll(element_selector);\n if (element_value.length < 1) {\n alert(\"Sorry, element doesn't exist\");\n }\n else {\n var element_array = [];\n if (element_value.length > 0) {\n for (var i=0; i<element_value.length; i++){\n element_array.push(element_value[i].innerText);\n }\n }\n alert(element_array);\n console.log(element_array);\n }\n}", "title": "" }, { "docid": "a9ae7535a29c226f639270da27f4229f", "score": "0.51256156", "text": "function ask(i){\n if(i === 0){\n process.stdout.write('Enter the length of array: \\n');\n }\n else {\n process.stdout.write('Enter the value to be searched: \\n');\n }\n}", "title": "" }, { "docid": "0d57e9761c8d1880c8d2c17ea30e2b9a", "score": "0.5109269", "text": "function rotate_arrf(ele){\n let arr = []\n console.log(`enter any number and note after each element please press enter key total require ${ele} elements: `)\n for(let i =0;i<ele;i++){\n arr.push(Number(readline.question()))\n }\n return arr\n}", "title": "" }, { "docid": "fef1306a7a34afae66ac583eb948e779", "score": "0.51092356", "text": "function getTheValueSelect() {\r\n\tvar prod = product.selectedIndex;\r\n\tprodText = product[prod].value;\r\n\tvar regi = region.selectedIndex;\r\n\tregiText = region[regi].value;\r\n\treturn [prodText,regiText];\r\n}", "title": "" }, { "docid": "dd463dfd5dfb9537de244df42c62eb43", "score": "0.51055884", "text": "function doWhatISay() {\n // reads random.txt and executes function\n fs.readFile('random.txt', 'utf8', function (err, data) {\n if (err) {\n return console.log(err);\n\n } \n \n var dataArr = data.split(\",\");\n inputInfo = dataArr[0];\n userOption = dataArr[1].trim();\n UserInputs();\n console.log(userOption)\n\n \n \n \n });\n \n \n}", "title": "" }, { "docid": "d0326b4cee9eff06ca06bb2e19f9c562", "score": "0.51015204", "text": "function Geeks() {\n\n\n var k = \"The available values in the array are:\";\n var k1 = \"the new available values in the array are\";\n var input = document.getElementsByName('array[]');\n\n for (var i = 0; i < input.length; i++) {\n var a = input[i];\n k = k + a.value + \" , \";\n }\n\n document.getElementById(\"par\").innerHTML = k;\n document.getElementById(\"po\").innerHTML = (k1);\n // var aaa = [\"Anu\", \"Sakira\", \"Vincent\", \"Payal\", \"Roop\"]\n\n // var inputfill = document.getElementById(\"t1\").value;\n // var inputpos1 = document.getElementById(\"pos1\").value;\n // var inputpos2 = document.getElementById(\"pos2\").value;\n\n // k1 = \"Filling input is \" + inputfill + \", Poision 1 is\" + inputpos1 + \" and position 2 is \" + inputpos2;\n // var result2 = aaa.fill(inputfill, inputpos1, inputpos2);\n // document.write(arr);\n // var res3 = input.fill(hello);\n // for (var i2 = 0; i2 < input.length; i2++) {\n // var a1 = res3[i2];\n // k1 = k1 + aaa;\n // }\n\n\n}", "title": "" }, { "docid": "abb91bf3eb270e48953fe2a85e215221", "score": "0.5081854", "text": "function getDataFromSelection() {\n Office.context.document.getSelectedDataAsync(Office.CoercionType.Text,\n function (result) {\n if (result.status === Office.AsyncResultStatus.Succeeded) {\n app.showNotification('The selected text is:', '\"' + result.value + '\"');\n } else {\n app.showNotification('Error:', result.error.message);\n }\n }\n );\n }", "title": "" }, { "docid": "abb91bf3eb270e48953fe2a85e215221", "score": "0.5081854", "text": "function getDataFromSelection() {\n Office.context.document.getSelectedDataAsync(Office.CoercionType.Text,\n function (result) {\n if (result.status === Office.AsyncResultStatus.Succeeded) {\n app.showNotification('The selected text is:', '\"' + result.value + '\"');\n } else {\n app.showNotification('Error:', result.error.message);\n }\n }\n );\n }", "title": "" }, { "docid": "6a6aafaae80ff5b893cb60395cd34607", "score": "0.50812596", "text": "function getLoanMenu() {\r\n\r\n var current = eval(\"record2\");\r\n\r\n //iterate through the data from the text file and store into an array\r\n for (var i = 0; i < record2.length; i++) {\r\n\r\n loanMenu[i] = current[i];\r\n\r\n }\r\n\r\n} //end getLoanMenu", "title": "" } ]
91fec091e4de65a2c724528a35ea00bb
Callback for when everything is done
[ { "docid": "f046bf3ffb7631e0fb994e3fcb502a67", "score": "0.0", "text": "function done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script\n\t\t\tif ( !isSuccess && jQuery.inArray( \"script\", s.dataTypes ) > -1 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "38eb9f8ebf69bead70844bc1805c903e", "score": "0.8005428", "text": "onDone () {}", "title": "" }, { "docid": "ce60cd1c4b9152a056372c50b14bc6b2", "score": "0.7318522", "text": "onEnd() {}", "title": "" }, { "docid": "b049ed07c7ffe24e296145d99c1ff92d", "score": "0.7278703", "text": "finish (callback) {\n callback();\n }", "title": "" }, { "docid": "b43f586b1fd618c14bb78a0bdd69cc95", "score": "0.7245341", "text": "onComplete() {}", "title": "" }, { "docid": "6cf91e5b47881a90ff5e02f6cc3d152c", "score": "0.71286726", "text": "function finished() {\n \n}", "title": "" }, { "docid": "e6a86694e6f97eda9fa53ec2d5c27d04", "score": "0.7020102", "text": "function onFinish() {\n console.log('finished!');\n }", "title": "" }, { "docid": "a7b6b4c71e1feaa55ce68e3973a524b8", "score": "0.7004559", "text": "end() {\n console.log(\"All Done\");\n }", "title": "" }, { "docid": "2049a1119aff191b8482d35f45640455", "score": "0.69253695", "text": "function finish() {\n self.ccm.helper.onFinish( self, results );\n if ( callback ) callback();\n }", "title": "" }, { "docid": "797aeba1810ca98e1eac91ee22fe1803", "score": "0.6915904", "text": "function onAllDone( err ) {\n if( err ) {\n Y.log( `Could not concatenate PDFs: ${JSON.stringify( err )}`, 'warn', NAME );\n return callback( err );\n }\n\n // all done\n eventData = {\n 'status': 'endBatch',\n 'cacheUrl': `/pdf/${cacheFile}`,\n 'cacheFile': cacheFile\n };\n\n if( notUpdate ) {\n eventData.notUpdate = notUpdate;\n }\n\n if( !config.compileOnly ) {\n // if caller uses websocket\n sendUserEvent( {msg: {data: eventData}} );\n }\n\n // if caller waits on the server\n callback( null, cacheFile );\n }", "title": "" }, { "docid": "57687070ab168217def51fc3c31968a5", "score": "0.6877164", "text": "callback() {\n console.log(\"Done!!!!\");\n }", "title": "" }, { "docid": "829bc73cb7cbbccff6da6e21111c328a", "score": "0.685624", "text": "complete() {}", "title": "" }, { "docid": "2c05917960b6f78f1cff8135c68d4636", "score": "0.6820582", "text": "function onFinish() {\n console.log('finished!');\n}", "title": "" }, { "docid": "7e009c7391f38c00f2f4fa464ebf9635", "score": "0.6801978", "text": "function uploadDone () {}", "title": "" }, { "docid": "9cf5c4cc53f633f386dfd3118e33dfd0", "score": "0.67942804", "text": "function onDownloadComplete()\n{\n console.log(\"onDownloadComplete\");\n\n main();\n}", "title": "" }, { "docid": "27e1a9fc225add502d7091fd6bb4a3c7", "score": "0.67205465", "text": "function done() {\n NProgress.done();\n }", "title": "" }, { "docid": "c56862b043fe833a820736617e42d76c", "score": "0.67113674", "text": "function complete(results) {\n //console.log(results);\n if (win.$yetify !== undef) {\n $yetify.tower.emit(\"results\", results);\n }\n }", "title": "" }, { "docid": "770658b66836055cf98fa76bc274e879", "score": "0.668695", "text": "function checkDone() {\n if (generalResults != null && contextResults != null) {\n onComplete({\n general: generalResults,\n context: contextResults\n });\n }\n }", "title": "" }, { "docid": "df9d0f2de0611055dfd9e05d8ce25fab", "score": "0.66844434", "text": "function done() {\n\t\t\tif (!invoked) {\n\t\t\t\tinvoked = true;\n\n\t\t\t\tcallback.apply(null, arguments);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4b2fc537594b62b7efdb4bfe4770c8f0", "score": "0.6531348", "text": "function complete() {\n callbackCount++;\n if (callbackCount >= 3) {\n res.render('transactions', context);\n }\n }", "title": "" }, { "docid": "397a51a876144bb80c5290b0d1e5b44b", "score": "0.65211666", "text": "function checkDone() { // called after each async call, executes the call back when the last one finishes\n asyncCallsDone++;\n if (asyncCallsDone >= NUM_ASYNC_CALLS) {\n //console.log(\"Finished constructor for \"+JSON.stringify(self, 3));\n callback();\n }\n }", "title": "" }, { "docid": "eb6e1b54047b745ed78bc769eb4e3a55", "score": "0.65207505", "text": "function done() {\n self._server = null;\n if (callback) {\n callback.apply(null, arguments);\n }\n }", "title": "" }, { "docid": "eb6e1b54047b745ed78bc769eb4e3a55", "score": "0.65207505", "text": "function done() {\n self._server = null;\n if (callback) {\n callback.apply(null, arguments);\n }\n }", "title": "" }, { "docid": "eb6e1b54047b745ed78bc769eb4e3a55", "score": "0.65207505", "text": "function done() {\n self._server = null;\n if (callback) {\n callback.apply(null, arguments);\n }\n }", "title": "" }, { "docid": "d1505b25b26d1ba430f13534b7206f75", "score": "0.650455", "text": "function complete() {\n callbackCount++;\n if (callbackCount >= 1) {\n // once old resume info is retrieved, then process insert query\n // make sql request to update applicant\n mysql.pool.query(query, input, function(error, results, fields){\n // log any error that occurs with insert request\n if(error){\n console.log(error);\n res.write(JSON.stringify(error));\n res.end();\n }else{\n oldResume = context.info;\n // check if user has folder yet\n var userDir = './uploads/' + req.body.applicantID + '/';\n if (!fs.existsSync(userDir)){\n fs.mkdirSync(userDir);\n }\n // sucess in update, update actual file\n fs.rename('./uploads/' + oldResume.applicantID + '/' + oldResume.fileName,\n './uploads/' + req.body.applicantID + '/' + req.body.fileName, \n function(err) {\n if ( err ) console.log('ERROR: ' + err);\n });\n res.status(200);\n res.end();\n }\n });\n }\n }", "title": "" }, { "docid": "5beb2fb7407521981f784dc441a4df3f", "score": "0.6500175", "text": "function done() {\n model.add_company(company);\n model.add_db_data(company, db_data);\n model.add_quandl_data(company, quandl_data);\n return callback(null);\n }", "title": "" }, { "docid": "83c7c8ee8ac96fea72489fca78b4d24c", "score": "0.64976186", "text": "function done() {\n self._server = null;\n\n if (callback) {\n callback.apply(null, arguments);\n }\n }", "title": "" }, { "docid": "a75d420517132dd0caac2678f5ea1e16", "score": "0.6493815", "text": "async finish() { }", "title": "" }, { "docid": "a75d420517132dd0caac2678f5ea1e16", "score": "0.6493815", "text": "async finish() { }", "title": "" }, { "docid": "a75d420517132dd0caac2678f5ea1e16", "score": "0.6493815", "text": "async finish() { }", "title": "" }, { "docid": "1747b610e11241409f2ea7edf0ef0edb", "score": "0.64761835", "text": "function complete() {\n callbackCount++;\n if (callbackCount >= 2) {\n res.render('update-resumes', context);\n }\n }", "title": "" }, { "docid": "aa6b9767188c03fdf1319dd081dda8ff", "score": "0.6472156", "text": "function _allComplete( err, resultList ) {\n session.close();\n callbackFn(err, resultList);\n }", "title": "" }, { "docid": "ff585eec07f6ba7525d259c26e023a08", "score": "0.6467884", "text": "function uploadDone() {\n}", "title": "" }, { "docid": "e26b81d61f1282ae07cd75f5a8abb0c9", "score": "0.646738", "text": "function finish() {\n cleanup();\n callback(null, self.buffer);\n }", "title": "" }, { "docid": "8de02b3b6ab97e1e8dfb8e9a0a0c21c0", "score": "0.6420145", "text": "function complete () {\n phantom();\n navigate(frame, \"about:blank\");\n status(\"Done. \" + WAIT_FOR + \"new tests.\");\n mode(\"Idle\");\n socket.send({\n status: \"done\",\n batch: currentBatch\n });\n\n currentBatch = null;\n if (batches.length) {\n for (var id in batches) {\n // only need one!\n currentBatch = id;\n tests = batches[id];\n return dequeue();\n }\n }\n }", "title": "" }, { "docid": "ae5f61d385110376a08d06d3a97a90e7", "score": "0.6415357", "text": "function complete(){\r\n callbackCount++;\r\n if(callbackCount >= 2){\r\n res.render('people_certs', context);\r\n }\r\n }", "title": "" }, { "docid": "f6f312645d844116f8eeedbf416b6fb4", "score": "0.6397582", "text": "function complete() {\n callbackCount++;\n if (callbackCount >= 2) {\n res.render('resumes', context);\n }\n }", "title": "" }, { "docid": "01bf2ce4d1fd5c59fa8554c44022633f", "score": "0.6383466", "text": "finish() {}", "title": "" }, { "docid": "90683f49443b052aec0c860ab331a7ba", "score": "0.63795257", "text": "function onDone(){\n numDone ++;\n if (numDone >= fields.length){\n dfd.resolve(list);\n }\n }", "title": "" }, { "docid": "2ba88c3bc27e4ad7acc7c939a76d04c8", "score": "0.63769144", "text": "function checkForCompletion() {\n if (queuedObjects.length === 0) {\n returnCallback(derezObj);\n } \n }", "title": "" }, { "docid": "134d8489bd7b136a8e7eb2d34713fea1", "score": "0.6370235", "text": "onComplete() {console.log(\"Bork bork bork!\")}", "title": "" }, { "docid": "4e11806f763149ba198160ce8d51af38", "score": "0.63701767", "text": "function complete(){\r\n callbackCount++;\r\n if(callbackCount >= 2){\r\n res.render('search', context);\r\n }\r\n }", "title": "" }, { "docid": "b9a65bce35542bb1ec114c12bba13bc7", "score": "0.63687277", "text": "function onDone() {\n\t\t m_promiseCount -= 1;\n\t\t if (!m_promiseCount) {\n\t\t m_idleHandlers.splice(0, m_idleHandlers.length)\n\t\t .forEach(function (handler) {\n\t\t handler();\n\t\t });\n\t\t }\n\t\t }", "title": "" }, { "docid": "ae08ca0ff414661cfbdfb7c6ab5c6b0e", "score": "0.6367799", "text": "handleDoneLoading() { }", "title": "" }, { "docid": "be7d44c05cc7154585da49f9c490bf26", "score": "0.63451105", "text": "function done() {\n\t if (!invoked) {\n\t invoked = true;\n\t\n\t next.apply(null, arguments);\n\t }\n\t }", "title": "" }, { "docid": "f53b37c7b82def595603aee2069d038a", "score": "0.6340974", "text": "onloadend() {}", "title": "" }, { "docid": "1caf6e26e0a1400a1edee9faf8f6bf9f", "score": "0.63395023", "text": "function complete(){\n callbackCount++; \n if(callbackCount >= 1){\n //res.render('restaurant_review', context);\n res.json(context);\n }\n\n }", "title": "" }, { "docid": "6d587dad5b89fc865f6b51778eb03128", "score": "0.6325068", "text": "function done() {\n console.log(\"job's done!\");\n}", "title": "" }, { "docid": "63fc3da27214c490d6928fafbf7973cb", "score": "0.6293652", "text": "done() {\n this.completionCallback && this.completionCallback();\n this.resolve();\n }", "title": "" }, { "docid": "cc63a00571c3722f26ae1ab3386b04f9", "score": "0.6279746", "text": "function complete(){\r\n callbackCount++;\r\n if(callbackCount >= 1){\r\n res.render('course', context);\r\n }\r\n }", "title": "" }, { "docid": "de41c5b1aadfb7bde16f70270585e930", "score": "0.62738", "text": "function onAllDone( err ) {\n if ( err ) {\n Y.log( 'Could not save dataURI: ' + JSON.stringify( err ), 'warn', NAME );\n return args.callback( err );\n }\n\n Y.log( 'Created media ' + JSON.stringify( result ), 'debug', NAME );\n args.callback( null, result );\n }", "title": "" }, { "docid": "c8195b7d9be3f6e6d27e0ecd9977555a", "score": "0.6271775", "text": "function complete(){\n callbackCount ++;\n if(callbackCount >= 1){\n res.render('employers', context);\n }\n }", "title": "" }, { "docid": "d56c7a4df0053db8523737c565e58638", "score": "0.626719", "text": "function onFinishedProcessing() {\n console.log('Successfully gone through the list of likes');\n dumpProcessStatus();\n}", "title": "" }, { "docid": "cd75d965799bea321049c8cad8b2d138", "score": "0.6265838", "text": "function mainComplete() {\n console.log('It is all loaded up');\n TowerDefense.manager.init();\n }", "title": "" }, { "docid": "f8690c24e4b8b3573401123f28ba1de6", "score": "0.623664", "text": "function complete() {\n callbackCount++;\n if (callbackCount >= 1) {\n // once old resume info is retrieved, then process delete query\n // make sql request to delete resume\n mysql.pool.query(query, input, function(error, results, fields){\n // log any error that occurs with insert request\n if(error){\n console.log(error);\n res.write(JSON.stringify(error));\n res.end();\n }else{\n // sucess in delete, remove actual file locations\n var dirname = './uploads/' + context.info.applicantID;\n console.log('Deleting File: ' + dirname + '/' + context.info.fileName);\n fs.unlink(dirname + '/' + context.info.fileName, function(err) {\n if (err){\n console.log('ERROR: ' + err);\n } else{\n res.status(200);\n res.end();\n }\n });\n // check if folder for applicant is empty, delete if so\n fs.readdir(dirname, function(err, files){\n if(err){\n console.log('ERROR: ' + err);\n } else{\n if(!files.length){\n console.log(\"Folder Empty: Deleting \" + dirname);\n fs.rmdirSync(dirname);\n }\n }\n });\n }\n });\n }\n }", "title": "" }, { "docid": "903c9241de99ae6719a55b68c8c4c07c", "score": "0.623034", "text": "function fileOnEnd() {\n console.log('Data has been drained');\n }", "title": "" }, { "docid": "f7fcf8dce649e310fb455e479e054818", "score": "0.62298226", "text": "complete() {\n\t\tthis.completed = true;\n\t}", "title": "" }, { "docid": "1bd69eb7e8c350a6499053cbeb134998", "score": "0.62232155", "text": "function complete(){\n callbackCount++;\n if (callbackCount >= 2){\n res.render('employersInfo', context);\n }\n }", "title": "" }, { "docid": "596aafd94a8ee798419a87541451bc09", "score": "0.62166715", "text": "function done() {\n\t\t\thandler.call(this, baseEvent);\n\t\t}", "title": "" }, { "docid": "799868e29f4ddae2ebc4e742406cd48a", "score": "0.61940295", "text": "async end() { }", "title": "" }, { "docid": "799868e29f4ddae2ebc4e742406cd48a", "score": "0.61940295", "text": "async end() { }", "title": "" }, { "docid": "799868e29f4ddae2ebc4e742406cd48a", "score": "0.61940295", "text": "async end() { }", "title": "" }, { "docid": "eb0480a2132f0992dc5a6643717adbb1", "score": "0.61769676", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "f581af25075f7447ccc0972bdff6c499", "score": "0.61722416", "text": "function completeActions(){\n getUser();\n showPDF();\n joinRoom();\n // getCompany();\n}", "title": "" }, { "docid": "0d707b6ae6e5e352ca376bb3247d32b6", "score": "0.6167808", "text": "function doneLoading() { \n loadedCount++;\n if (loadingCount == loadedCount && loadingReady) {\n init();\n } \n }", "title": "" }, { "docid": "5963f75940f800e79e26bd342fc9a3a5", "score": "0.6164533", "text": "finish() {\n console.log(\"finish\");\n }", "title": "" }, { "docid": "40c1b4c9d4991b8f0799a1e1903f06ae", "score": "0.61555594", "text": "function catch_result (result) {\n //im done\n}", "title": "" }, { "docid": "2229d96c3204500b648d96589c405233", "score": "0.6145189", "text": "function onFinishCallback() {\n if (validateAllSteps()) {\n var serverData = getServerData();\n\n //Begin Encoding\n $.post(\"Home/BeginEncoding\", serverData, function (data) {\n //clear the current interval\n window.clearInterval(timerId);\n //reset the timer to the new interval value\n timerId = window.setInterval(refreshData, data.RefreshInterval);\n\n if (data.StatusMessage !== \"\") {\n //Update status message\n statusbar.show(data.StatusMessage, statusMsgInterval);\n }\n\n //Close Wizard On Finish\n closeWizardOnFinish();\n });\n }\n}", "title": "" }, { "docid": "5e4de53d458ba771cc9024509f2d1ade", "score": "0.61394244", "text": "function onAllDone( err ) {\n if ( err ) {\n Y.log( 'Could not save dataURI: ' + JSON.stringify( err ), 'warn', NAME );\n return args.callback( err );\n }\n\n // clean up chart image in temp directory\n //Y.doccirrus.media.cleanTempFiles( { '_tempFiles': [ tempFile ] } );\n\n Y.log( 'Created media ' + JSON.stringify( result ), 'debug', NAME );\n args.callback( null, result );\n }", "title": "" }, { "docid": "a74810328728049d7003f63a4b58956c", "score": "0.6135914", "text": "onComplete() {\n if (this._complete) {\n this._complete.raise();\n }\n }", "title": "" }, { "docid": "8ce9cbe56dcf2090d1e2b41958adfb14", "score": "0.6123766", "text": "function done() {\n echo('\\nOK!');\n }", "title": "" }, { "docid": "fd3dcba80bd2ba94543f51ac75d5595c", "score": "0.61222", "text": "function onend() {\n cleanup();\n callback();\n\n // Add to list of files.\n if (data.bytesRead) {\n self._files.push({ path: data.path, size: data.bytesRead });\n }\n\n // Check if Kat has ended.\n // TODO\n // console.log('on end', self._ended, self._queue.length);\n if (self._ended) {\n self._end();\n\n } else {\n var next = self._queue.shift();\n\n if (next) {\n self._addCurrentStream(next);\n } else if (self.options.autoEnd && self._openQueue.active === 0) {\n self._end();\n } else {\n delete self._current;\n }\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "6288f81586310bb8703c1f9af3dfb2ba", "score": "0.61215883", "text": "function done() {\n if (!invoked) {\n invoked = true\n\n callback.apply(null, arguments)\n }\n }", "title": "" }, { "docid": "254fce282c9815bd6b376914cb3c2afa", "score": "0.6118063", "text": "function finalResult() {\r\n\r\n}", "title": "" }, { "docid": "e90f02810bcef74974ec972722a0594e", "score": "0.6117578", "text": "function done() {\n if (!invoked) {\n invoked = true;\n\n callback.apply(null, arguments);\n }\n }", "title": "" }, { "docid": "e90f02810bcef74974ec972722a0594e", "score": "0.6117578", "text": "function done() {\n if (!invoked) {\n invoked = true;\n\n callback.apply(null, arguments);\n }\n }", "title": "" }, { "docid": "be4b37b3b087545a804e0c137e5a59d3", "score": "0.61046743", "text": "complete() {\n this.finish(COMPLETED);\n }", "title": "" }, { "docid": "e881dd5f78ac10fc1685209306ab04b2", "score": "0.6103179", "text": "function finish() {\n setTimeout(function () {\n done();\n }, 3000);\n }", "title": "" }, { "docid": "9fa73b24c88df9fe03ab15e6e3b7ba50", "score": "0.6090498", "text": "function completion_callback(allRes, status) {\r\n\t$('#progressbar').css('width', '100%').attr('aria-valuenow', 100).html(testCounter+' tests completed!').removeClass('active').removeClass('progress-bar-striped');\r\n\t\r\n logWrite(\"Tests completed!\");\r\n testCompleteResults += \"</table>\";\r\n console.log(\"Test results: \", allRes, status);\r\n}", "title": "" }, { "docid": "107760bda5750a0d1059af78848829ac", "score": "0.6088897", "text": "function searchComplete() {\n callback(imageSearch.results);\n }", "title": "" }, { "docid": "3f13d6d4a0acd49c4e4b273071fea90d", "score": "0.6067414", "text": "function onDone() {\n m_promiseCount -= 1;\n if (!m_promiseCount) {\n m_idleHandlers.splice(0, m_idleHandlers.length).forEach(function (handler) {\n handler();\n });\n }\n }", "title": "" }, { "docid": "6c543102d0d3901413ffc678fd521799", "score": "0.60658115", "text": "function handleComplete() {\n\tloaded = true;\n\ttoggleLoader(false);\n\tinitMain();\n}", "title": "" }, { "docid": "c824b91e8f16bdf8e25755b7b373550b", "score": "0.6036606", "text": "complete(results, file) {\n // Ensure any final (partial) batch gets emitted\n const batch = tableBatchBuilder.getNormalizedBatch();\n if (batch) {\n asyncQueue.enqueue(batch);\n }\n asyncQueue.close();\n }", "title": "" }, { "docid": "2dec1932d4a3f6b8ef259aa364a921da", "score": "0.60291564", "text": "function pollCompleted() {\n\t \tif (accounts && currencies && spaces && nfctags) {\n\t \t\tcb( null )\n\t \t} else {\n\t \t setTimeout(function () { \n\t \t \tpollCompleted()\n\t \t }, 125);\n\t \t}\n\t }", "title": "" }, { "docid": "4609fff86c218990ac61a82ad4356025", "score": "0.6027049", "text": "function done ( ){\n\treadfiles ++ // add one to the file counter\n\n\t// Only do the below when all (2) files are loaded\n\tif (readfiles == 2 ){ // note to self, if doing more files change this number\n\t\t// write the everyone data to the file\n\t\tfilesystem.writeFile ('peopleComplete.txt', everyone.sort(), function (error){ // note the .sort which alphabetically sorts names\n\t\t\t// Handle errors if they occur\n\t\t\tif (error){\n\t\t\t\tconsole.log (\"No noes! Error: \" + error)\n\t\t\t\tthrow error\n\t\t\t}\n\t\t})\n\t}\n}", "title": "" }, { "docid": "de0be1158b57724ac992880428593b82", "score": "0.6026097", "text": "function complete () {\n\t\t\tif (isDocumentComplete()) {\n\t\t\t\tcb();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetTimeout(complete, 10);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5f3d687fc5841cc08aa089c3c5c3aadc", "score": "0.60259897", "text": "function completeConnection() {\n angular.forEach( doneHandlers, function( handler ) {\n /*\n At the point of connection completion we could be in any hub, each doneHandler therefore\n has a hub property which relates back to the original hub which requested it.\n We set the server property on that hub so clients can now talk to the server\n */\n handler.hub.server = createServerProxy( handler.hub, handler.hubName );\n handler.doneFn();\n } );\n doneHandlers.length = 0;\n }", "title": "" }, { "docid": "ac1e7cf2bb18ca6d39e2a05762a247f1", "score": "0.60243446", "text": "function searchComplete() {\n callback(imageSearch.results );\n }", "title": "" }, { "docid": "1c6fbbd4873d71bb07ea4f06d38b75ab", "score": "0.6016094", "text": "function conversionDone(data) {\n Papa.parse(data, {\n complete: function(results, localFile) {\n func(results, localFile, divName, clusterName);\n },\n error: function(err, file) {\n if (divName!==undefined)\n alert(\"could not load \"+fullUrl);\n }\n });\n }", "title": "" }, { "docid": "a3e784bb38f5855b507061f150f06d70", "score": "0.6006848", "text": "function allDone() {\n console.log('building employee list with data:' + employeeList)\n render(employeeList)\n}", "title": "" }, { "docid": "ad1303923e18cf023ed9b09997927790", "score": "0.5989778", "text": "function allDone()\n{\n throw( \"exiting\" );\n}", "title": "" }, { "docid": "694bbf761f66f742a29a6487cf9bcebd", "score": "0.5988375", "text": "function onFinish() {\n console.log('抢购结束!');\n}", "title": "" }, { "docid": "61f6db9786f622c330ee12c997ca8082", "score": "0.598456", "text": "function _onAllCrawled()\n {\n module_callback(urls);\n }", "title": "" }, { "docid": "f5fe8df673b2bf76b8963105441762c5", "score": "0.59843814", "text": "async complete() {\n const t = await lr(this.localStore, new Fo(this.R), this.documents, this.ro.id), e = this.co(this.documents);\n for (const t of this.queries) await fr(this.localStore, t, e.get(t.name));\n return this.progress.taskState = \"Success\", new Gi(Object.assign({}, this.progress), t);\n }", "title": "" }, { "docid": "f15dcde1bc7d31f1299e9a296d85f271", "score": "0.5982337", "text": "function onProcessingComplete( event ) {\r\n return on_CompleteCallback( event.data );\r\n }", "title": "" } ]
cebf7af0bf7fc9eb511ef7e32b1ee3d2
check date date only fetch new files when data date is older then 24 hours
[ { "docid": "32ccd300fcb2c77d6bd4704ed004fb82", "score": "0.57028455", "text": "checkDataDate(dataDate) {\n //Get 1 day in milliseconds\n let oneDay = 1000 * 60 * 60 * 24;\n //get current date convert both dates in milliseconds\n let currentDate = new Date().getTime();\n let dataDateTime = dataDate.getTime();\n let difference = currentDate - dataDate;\n let daysDifference = Math.round(difference / oneDay);\n return daysDifference >= 3 ? true : false;\n }", "title": "" } ]
[ { "docid": "5bef7ff5f83d866a110a7c17f1944251", "score": "0.6258048", "text": "staleDump(stats, timeInDays) {\n // Check if it has been over 15 days since the file was downloaded\n let currentTime = new Date().getTime();\n let modifiedTime = stats.mtime.getTime();\n let days = Math.abs(currentTime - modifiedTime) / (1000 * 60 * 60 * 24);\n console.log(\"It has been \" + days + \" days\");\n\n if (days > timeInDays) {\n // Start downloading the file again\n console.log(\"This looks stale, it has been more than \" + timeInDays + \" days\");\n return true;\n } else {\n console.log(\"This looks fresh, there's still time in \" + timeInDays + \" days\");\n }\n\n return false;\n }", "title": "" }, { "docid": "f669aac30101901161584d950976866b", "score": "0.62537724", "text": "function checkOldData() {\n // get the dataDate\n let dataDate = window.localStorage.getItem(\"dataDate\");\n\n if (dataDate == null) {\n return true;\n } else {\n let now = new Date();\n let lsDate = new Date(dataDate * 1000);\n console.log(\"Time in local storage is:\", lsDate);\n let diff = Math.round((now - lsDate) / 1000);\n console.log(`Difference is ${diff} seconds...`);\n if (diff > 20) {\n console.log(\"Data is old, fetch again...\");\n return true;\n }\n console.log(\"All is ok, data is fresh.\");\n return false;\n }\n}", "title": "" }, { "docid": "048ce2f3af93e77084ce769bce4087cb", "score": "0.6076618", "text": "function getFiles(date1, date2) {\n\tlet files = [];\n\tfor (let loopTime = date1; loopTime < date2+86400000; loopTime += 86400000) {\n\t\tlet date = new Date(loopTime);\n\t\tlet fileName = `./public/Data/${date.getDate()}_${date.getMonth()}_${date.getFullYear()}.xlsx`;\n\t\tif (fs.existsSync(fileName)) {\n\t\t\tfiles.push(fileName);\n\t\t\tconsole.log(`${fileName} file exists and added to files array.`)\n\t\t}\n\t}\n\tconsole.log(`Array with files ready.`)\n\treturn files;\n}", "title": "" }, { "docid": "e129b4c78f1b160bb8583f9b5cb78b91", "score": "0.6008596", "text": "async function dateAvailable() {\n\tlet date = new Date()\n\tconst todayDateStr = getDateString(new Date())\n\tconst response = await fetch('https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/' + todayDateStr + '.csv', {\n\t\tmethod: 'GET'\n\t})\n\tif (response.status === 404) {\n\t\treturn date.setDate(date.getDate() - 1)\n\t} else {\n\t\treturn date\n\t}\n}", "title": "" }, { "docid": "8a90445670835ca834742455189ee655", "score": "0.59702915", "text": "function compareDates(multimedia) {\n root_dir.getFile(script_info.name + \"/\" + multimedia, {create: false}, function(file_entry) {\n file_entry.file(function(file) {\n console.log(\"Metadata of \" + multimedia + \" obtained\");\n var local_date = new Date(file.lastModifiedDate);\n var petition = new XMLHttpRequest();\n petition.open(\"HEAD\", script_info.dir_route + \"/\" + multimedia);\n petition.addEventListener('load', function() {\n if (this.status == 200) {\n console.log(\"Headers of \" + multimedia + \" obtained\");\n var remote_date = new Date(this.getResponseHeader(\"Last-Modified\"));\n console.log(\"Local file \\\"\" + multimedia + \"\\\" with date\" + local_date);\n console.log(\"Remote file \" + multimedia + \" with date \" + remote_date);\n if (local_date < remote_date) {\n console.log(\"Newer remote version of \" + multimedia + \", downloading\");\n file_entry.remove();\n downloadMedia(multimedia);\n } else {\n console.log(\"Local version of \" + multimedia + \" already up to date\");\n }\n }\n else {\n console.log(\"File \" + multimedia + \" doesn't exist at server\");\n }\n });\n petition.send();\n });\n }, function() {\n console.log(\"File \" + multimedia + \" doesn't exist on local filesystem yet.\");\n downloadMedia(multimedia);\n });\n}", "title": "" }, { "docid": "7c7dd9dc1105e170af9b8be9a0cd6c61", "score": "0.58857405", "text": "check_exif_timestamps( predicate ) {\n let changed_files = Object.values(this.cache.filter(predicate)).filter( (cachedFile) => {\n // Detect if the file has changed by compary JSON representations of it before and after\n let oldid = cachedFile.id;\n let oldfile = cachedFile.toString(); \n cachedFile.check_exif_timestamps();\n if( oldfile==cachedFile.toString() ) \n return false;\n if( oldid!=cachedFile.id ) {\n this.cache.del(oldid);\n this.cache.add(cachedFile);\n }\n return true;\n });\n return changed_files.length;\n }", "title": "" }, { "docid": "e7b12955008e847df694c7c8fd6e4b02", "score": "0.58393794", "text": "function currentRecord(date) {\n var daybefore = new Date(date);\n daybefore.setHours(0,0);\n return patient['json']['effective_time'] > daybefore / 1000;\n\n }", "title": "" }, { "docid": "0b06eb7e3cb99946ed023e58c2266fe9", "score": "0.5742152", "text": "function checkOlderOrInvalid(fn, date, cb) {\n fs.stat(fn, function (err, stats) {\n cb(null, err || (stats.mtime.getTime() < date.getTime()));\n });\n}", "title": "" }, { "docid": "054f5f75c1083a797ecb5b95811e1351", "score": "0.56451297", "text": "_checkDisabledDate(date) {\n return this.disabledDates.some((disabledDate) => {\n disabledDate = new Date(disabledDate);\n return (date.getFullYear() === disabledDate.getFullYear() && date.getMonth() === disabledDate.getMonth() && date.getDate() === disabledDate.getDate()) || Math.floor(this._calendarMinDate.getTime() / 1000) > Math.floor(date.getTime() / 1000) || Math.floor(this._calendarMaxDate.getTime() / 1000) < Math.floor(date.getTime() / 1000);\n });\n }", "title": "" }, { "docid": "b3a49a0df1dea008e0d6a35359b3bf6a", "score": "0.56297517", "text": "function checkDate(){\n\t\treqDate = document.getElementsByName('reqsDate')[0].valueAsDate\n\t\treqDate = reqDate.setDate(reqDate.getDate()-2)\n\t\tif(reqDate < new Date().getTime()){\n\t\t\talert(\"The test drive request time must later than today\");\n\t\t\tsetTimeToNow();\n\t\t}\n\t}", "title": "" }, { "docid": "18db3fcbc868e651003395336667a0f6", "score": "0.5603943", "text": "function checkDate(ele){\n\t\treqDate = ele.valueAsDate\n\t\treqDate = reqDate.setDate(reqDate.getDate())\n\t\tif(reqDate < new Date().getTime()){\n\t\t\talert(\"The Expiration date must be later than today\");\n\t\t\tele.valueAsDate = new Date(new Date().setDate(new Date().getDate()))\n\t\t}\n\t}", "title": "" }, { "docid": "6c5e89eac5bdfc6d86e13d87379743fe", "score": "0.55548537", "text": "async function checkToday(user,i)\n{\n var today = new Date();\n var dd = today.getDate();\n var mm = today.getMonth()+1; \n var yyyy = today.getFullYear();\n var d1 = dd+\"/\"+mm+\"/\"+yyyy\n let users = await jsonUserDal.readFile()\n let arr = users.filter(u=> u.User)\n if(user.created_date<d1)\n {\n arr[i] = {\n \"User\":{\n user: user.user,\n pwd: user.pwd,\n created_date: dd+\"/\"+mm+\"/\"+yyyy,\n TransactionsNum:5\n }\n }\n await jsonUserDal.writeFile('JsonsFiles/Users.json',arr)\n }\n}", "title": "" }, { "docid": "32ac0a927b18fe96b144a9b4e7301500", "score": "0.5533667", "text": "function removeOldFiles(){\n\n //We point out the date is thirty days back\n let olderThan = moment().subtract(30, \"days\").format(\"YYYY-MM-DD\");\n\n //We retrieve files from the database that were uploaded thirty days ago\n File.find({ date: { $lte: olderThan } }, function(err, files){\n \n //We are checking for error\n if(err) return;\n\n //We delete files from the hardware and from the base\n for(let file of files){ \n\n //We delete the file from the hardware\n fs.unlinkSync(config.root_path + file['fileName']);\n\n //We delete the database file information\n file.remove();\n }\n });\n}", "title": "" }, { "docid": "6f0f7691ebac47397a584dc5e1068e22", "score": "0.54445934", "text": "function checkDate () {\n\t//TODO check the current date, and alter the css classes on the icon labels to reflect the correct icon colors */\n}", "title": "" }, { "docid": "4b5d0d7f0ef1b88aceface16251b8918", "score": "0.53962994", "text": "function checkDate() {\n var today = new Date();\n var check = new Date(today.getFullYear(), today.getMonth(), today.getDate()).getTime();\n if (check != now) {\n now = check;\n attachBehaviors('#page');\n }\n }", "title": "" }, { "docid": "c990434f3d1319dafe907afa6aaf56a2", "score": "0.5386712", "text": "function compareTime(FREQ){\n\n\tvar current_date = new Date();\n\t\n\tvar xmlhttp = createXMLHTTPRequest();\n\txmlhttp.open(\"GET\",\"data/latest.time\",false);\t\n\txmlhttp.send();\n\t\n\tif(xmlhttp.readyState == 4 && xmlhttp.status == 200)\n\t{\n\t\tvar date = xmlhttp.responseText;\n\t\tif(date.length > 0)\n\t\t{\n\t\t\tvar latest_date = new Date(date);\n\t\t\t\n\t\t\tif((current_date.getTime()-latest_date.getTime())/(24*60*60*1000) > FREQ) //if last updated before FREQ days \t\t\n\t\t\t{ \t\n\t\t\t\tupdateTime(current_date.toUTCString());\n\t\t\t\treturn true; //need update\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\treturn false; //not need update\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdateTime(current_date.toUTCString());\n\t\t\treturn true;\n\t\t}\n\t}\n\telse\n\t{\n\t\tupdateTime(current_date.toUTCString());\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "726378d033bc51e808ba3fc3081c3dd1", "score": "0.53864443", "text": "function checkDateAtpo(dataInizio, dataFine){\n\tvar di= dataInizio.split(\"/\");\n\tvar df= dataFine.split(\"/\");\n\tvar ggDi=di[0];\n\tvar mmDi=di[1];\n\tvar yyyyDi=di[2];\n\tvar ggDf=df[0];\n\tvar mmDf=df[1];\n\tvar yyyyDf=df[2];\n\n\tif(yyyyDf < yyyyDi){\n\t\talertDate();\n\t\treturn;\n\t}\n\tif(yyyyDf == yyyyDi && mmDf < mmDi){\n\t\talertDate();\n\t\treturn;\n\t}\n\tif(yyyyDf == yyyyDi && mmDf == mmDi && ggDf < ggDi){\n\t\talertDate();\n\t\treturn;\n\t}\n\n\n\treturn true;\n}", "title": "" }, { "docid": "cdd61e336612859f660184c6f4201537", "score": "0.5345299", "text": "function download_date(date, cb) {\n const days = date.format('YYYYMMDD');\n const url = `http://www.tdx.com.cn/products/data/data/2ktic/${days}.zip`;\n downloadRequest(url, cb);\n}", "title": "" }, { "docid": "d3e0389d4a58fb9123d5016cc9c054bf", "score": "0.53375435", "text": "myFilter(d) {\n let dateTime = new Date();\n return d > dateTime;\n }", "title": "" }, { "docid": "34f8b6258fae00675002fd51d53453d0", "score": "0.5330037", "text": "function current(depDate) {\r\n if (depDate < date) {\r\n return 'missed';\r\n //604800000 is 7 days in milliseconds\r\n } else if (depDate - 604800000 <= date) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "6ef96235cceb20953e2d65dd210ff207", "score": "0.5324098", "text": "function datesearch(data) {\n return data.datetime == listItemText;}", "title": "" }, { "docid": "7a1c3f7cb4714610d7a87796cc0116e3", "score": "0.5322391", "text": "function checkRecord(type, intervalDays) {\r\n\tvar lastRecord = GM_getValue(type+'Record', false);\r\n\tvar currentRecord = new Date();\r\n\tif (lastRecord == false) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\tlastRecord = new Date(Date.parse(lastRecord));\r\n\t\tif (currentRecord.getTime() - (intervalDays * dateDay) > lastRecord.getTime()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}", "title": "" }, { "docid": "f085c74f4d9b0dddb2b99ccb5d961107", "score": "0.5309012", "text": "function dislikeHasExpired(dateCreated){\n //Converting time since created from milliseconds to minutes\n if (((Date.now() - dateCreated) / 60000) > 120) { //2 hours\n return true\n }\n return false\n}", "title": "" }, { "docid": "447b643f2d8969aa20e7fdd490eaf040", "score": "0.5294394", "text": "checkNewDay() {\n if (!this.day) {\n this.day = this.getDate();\n } else {\n if (this.day !== this.getDate()) {\n this.goNextDay();\n this.day = this.getDate();\n }\n }\n }", "title": "" }, { "docid": "601886b33f278d0be5ff4c6ba58623af", "score": "0.5288648", "text": "function localStorageIsOutdated(){\r\n let data = localStorage.getItem(\"lastUpdated\");\r\n\r\n if(data == null) {\r\n return true;\r\n }\r\n\r\n let now = Date.now();\r\n let timelimit = 1000 * 60 * 60; //1 hour\r\n\r\n if(now - data < timelimit){\r\n //Less than timelimit has passed (1 hour)\r\n console.log('less than 1 hour');\r\n addMessage('Getting cached data. Data is ' + Math.round((now-data) / (1000 * 60)) + ' minutes old');\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "5d3de90492b16ccedba4c99196a93ed0", "score": "0.52694446", "text": "function isOldEvent(event, now){\n\tlet dates = event.dates;\n\tlet isOld = true;\n\tfor(let i = 0; i < dates.length; i++){\n\t\tlet date = new Date(dates[i][0]);\n\t\tif(date > now){\n\t\t\tisOld = false;\n\t\t}\n\t}\n\treturn isOld;\n}", "title": "" }, { "docid": "d2cbb638ea6f506d6cac0f10b57ba13c", "score": "0.526398", "text": "function getEntriesByDate(date) {\n return rest.one('date', date).get();\n }", "title": "" }, { "docid": "09bfac9072d7a19c311a3367e46dcc18", "score": "0.52476454", "text": "function nextDate() {\n recordDateToDisplay();\n\n //dateToDisplay is set to next day (8 640 000 ms = 24 hours)\n dateToDisplay = new Date(Date.parse(dateToDisplay) + 86400000);\n\n //Test the date that can't be after currentDate\n if (Date.parse(dateToDisplay) > Date.parse(currentDate)) {\n dateToDisplay = new Date(currentDate);\n window.alert(\"il n'y a pas de média après la date courante\");\n }\n\n updateInfo();\n}", "title": "" }, { "docid": "abcfbc24c0dfa3e66480f9683e9369e9", "score": "0.5237887", "text": "function checkDate(int,bolean){\r\n\tvar dateInfo = getTime();\r\n\tif(bolean){\r\n\t\tif(dateInfo[2] == 6) {\r\n\t\t\tdateInfo[2] = 0;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tdateInfo[2] = dateInfo[2]+1;\r\n\t\t}\r\n\t}\r\n\tvar hourFloat = concot(dateInfo);\r\n\tif(finder(\"openWhen\") != undefined) {\r\n\t\thourFloat = parseFloat(finder(\"openWhen\"));\r\n\t}\r\n\r\n\tif(dateInfo[2] == 6){\r\n\t\tvar saturday = toiletArray.entries[int][\"tid_lordag\"].split(\" - \");\r\n\t\tif(parseFloat(saturday[0])<hourFloat&&parseFloat(saturday[1])>hourFloat || toiletArray.entries[int][\"tid_lordag\"] == \"ALL\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\telse if (dateInfo[2] == 0) {\r\n\t\tvar sunday = toiletArray.entries[int][\"tid_sondag\"].split(\" - \");\r\n\t\tif(parseFloat(sunday[0])<hourFloat &&parseFloat(sunday[1])>hourFloat || toiletArray.entries[int][\"tid_sondag\"] == \"ALL\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tvar weekday = toiletArray.entries[int][\"tid_hverdag\"].split(\" - \");\r\n\t\tif(parseFloat(weekday[0])<hourFloat&&parseFloat(weekday[1])>hourFloat || toiletArray.entries[int][\"tid_hverdag\"] == \"ALL\"){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "03113595011fd459e8d0c1263a721ff6", "score": "0.5228652", "text": "function FilterCreated(date) {\n setDefaultDate(moment(date).format('LL'));\n\n const filtered = staticItems.filter((dateCreated) => {\n return dateCreated.created <= moment(date).unix();\n }); \n\n setItems(filtered)\n }", "title": "" }, { "docid": "08914b83b0c0b2a786e933ead37890db", "score": "0.52200395", "text": "function checkNewWeatherData() {\n setTimeout(() => {\n console.log('started checking for new data already!');\n collectWeatherData(openweathermapURL, (res) => {\n // check timestamp for new data\n if (res.list[0].dt !== weatherStationArray[0].dt) {\n weatherStationArray = res.list;\n for (let i = 0; i < weatherStationArray.length; i += 1) {\n insertWeatherData(weatherStationArray[i]);\n }\n }\n });\n checkNewWeatherData();\n }, weatherDataCollectInterval);\n}", "title": "" }, { "docid": "05b0f1946527e5308fb3dd64b42ff04d", "score": "0.5207879", "text": "function isMinTimeToFetchElapsed() {\n const minTimeToFetch = 600000; // 10 min in milli-sec\n\n let d = new Date();\n const currentEpochTime = d.getTime();\n\n if ( (currentEpochTime - (lastEpochApiFetch * 1000) ) > minTimeToFetch ||\n lastZipUsed !== document.getElementById('zip').value ) {\n return true;\n } else { \n return false\n }\n}", "title": "" }, { "docid": "8f8df403cd98c1040cbfe324bd5fd668", "score": "0.5199156", "text": "function filteredData(data) {\n return data.datetime === userInputDateValue;\n }", "title": "" }, { "docid": "5db7764a17d40ec496ff7c3a7e190707", "score": "0.5193992", "text": "function remove_old_backup(date)\n{\n\tconsole.log('\\nAttempting to remove old backups...\\n'); \n\n \tvar d = new Date();\n\tvar _date = {};\n\t_date.year = d.getFullYear();\n\t_date.month = d.getMonth()-2;\n\t_date.day = d.getDate();\n\t_date.hour = d.getHours();\n\t_date.min = d.getMinutes();\n\t_date.timeString = d.toLocaleString();\n\n\tif(_date.month < 10)\n\t\t_date.month = '0' + _date.month;\n\tif(_date.day < 10)\n\t\t_date.day = '0' + _date.day;\n\tif(_date.hour < 10)\n\t\t_date.hour = '0' + _date.hour;\n\tif(_date.min < 10)\n\t\t_date.min = '0' + _date.min;\n\n \tvar temp_date = new Date();\n \ttemp_date.setMonth(temp_date.getMonth()-3);\n\n\tvar remove_date_filename = 'DataBase_'+_date.year+_date.month+_date.day;\n\n\n\tconsole.log(\"searching for files on date: \" + temp_date.toLocaleDateString());\n\n \tglob(\"./dump/\"+remove_date_filename+\"*\", function(err, files)\n \t{\n \t\tif(err)\n \t\t{\n \t\t\tconsole.log(err);\n \t\t\treturn;\n \t\t}\n \t\telse\n \t\t{\n \t\t\tif(files.length < 1)\n \t\t\t{\n \t\t\t\tconsole.log(\"There are no matches for files on that date.\")\n \t\t\t}\n \t\t\tfor(var i = 0; i < files.length; i++)\n \t\t\t{\n \t\t\t\trmfile(files[i]);\n \t\t\t}\n \t\t}\n \t});\n}", "title": "" }, { "docid": "d5b45472ed871b6a27cdb818fd191236", "score": "0.51931214", "text": "async function date (eventsFile, startDate) {\n logger(__filename, `eventsFile: ${eventsFile}`)\n logger(__filename, `startDate: ${startDate}`)\n\n const parsedDate = DateTime.fromISO(startDate)\n\n const events = await fetchMegafile(eventsFile)\n const parsedEvents = JSON.parse(events)\n\n logger(__filename, `parsedDate: ${parsedDate}`)\n logger(__filename, `events: ${events}`)\n logger(__filename, `parsedEvents: ${parsedEvents}`)\n\n const eventsAfterDate = parsedEvents.filter(event => {\n const eventDate = DateTime.fromISO(event.date)\n const comparison = parsedDate < eventDate\n logger(__filename, `eventDate: ${eventDate}`)\n logger(__filename, `comparison: ${comparison}`)\n return comparison\n })\n\n return eventsAfterDate\n}", "title": "" }, { "docid": "0e886496bb78da4b2e66718320222055", "score": "0.5177437", "text": "function expired(dateString) {\n\tvar updated = new Date(Date.parse(dateString));\n\tvar now = new Date();\n\n\t// if the time now less the timestamp of the cache's latest update is greater than\n\t// 1800000 aka 30 mins, return true\n\tif ((now - updated) > 1800000) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "983bbfec5466515dcc10375cf5ef9ed5", "score": "0.51766294", "text": "function notFutureDate(date) {\n var dateObj = new Date(date);\n var today = new Date();\n today.setHours(0,0,0,0);\n if (dateObj.getTime() <= today.getTime()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b4f8a38f5d2b4c7ab8f9c1f18ef49cff", "score": "0.5160934", "text": "function filterByDate(data) {\n var dateStart = new Date(angular.isDate(vm.dateStart) ? vm.dateStart : '1/1/1900');\n var dateEnd = new Date(angular.isDate(vm.dateEnd) ? (vm.dateEnd).setDate((vm.dateEnd).getDate()+1) : '12/31/2029');\n //var dateEnd = new Date((vm.dateEnd).setDate((vm.dateEnd).getDate()+1));\n data = _.filter(data, function(rec) {\n var eeoDateCreated = new Date(rec.dateCreated);\n return (eeoDateCreated >= dateStart && eeoDateCreated <= dateEnd);\n });\n vm.eeoData.totalCount = _.size(data);\n return data;\n }", "title": "" }, { "docid": "d786b952403c2ac072b8f3fadbc08e4e", "score": "0.5153228", "text": "function checkdate(dateOfLeaving) {\n const newDate = new Date(dateOfLeaving);\n const currentDate = new Date();\n // caluculate difference in days\n const diff = (newDate.getTime() - currentDate.getTime()) / (1000 * 3600 * 24);\n if (diff <= 7 & diff >= 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "9dff7fcab5c933cad55d58539f796295", "score": "0.5151905", "text": "function dailyDataCorrectionUtil(stockValues,history_date,current_date) {\n var correctionCache = new NodeCache();\n var correctionData = undefined;\n var correctionDataList = [];\n var correctionDate;\n var key, value, correctionKey;\n for (stockValue in stockValues){\n key = stockValues[stockValue].symbol + \"_\" + stockValues[stockValue].date;\n value = stockValues[stockValue];\n correctionCache.set(key,value);\n }\n //console.log(\"Initial Correction Cache :\" + JSON.stringify(correctionCache.getStats()));\n while(history_date <= current_date){\n // TODO: The Loop for Stock Values is un-necessary.\n // It is going through all the stock values, it should rather only go through unique stock values.\n for (stockValue in stockValues){\n correctionKey = stockValues[stockValue].symbol + \"_\" + history_date;\n //console.log(\"Correction Data Key:\"+ correctionKey);\n value = correctionCache.get(correctionKey);\n if ( value == undefined ){\n // handle miss!\n var historySearch = true;\n var counter = 1,period = 1;\n do{\n if(historySearch === true){\n correctionDate = moment(history_date).subtract(period, 'days').format('YYYY-MM-DD');\n fillerDataKey = stockValues[stockValue].symbol + \"_\" + correctionDate;\n //console.log(\"Filler Data Key:\"+ fillerDataKey);\n correctionData = correctionCache.get(fillerDataKey);\n historySearch = false;\n }else{\n correctionDate = moment(history_date).add(period, 'days').format('YYYY-MM-DD');\n fillerDataKey = stockValues[stockValue].symbol + \"_\" + correctionDate;\n //console.log(\"Filler Data Key:\"+ fillerDataKey);\n correctionData = correctionCache.get(fillerDataKey);\n historySearch = true;\n }\n //console.log(\"Counter:\"+counter);\n //console.log(\"Period:\"+period);\n if(counter%2 === 0){\n period++;\n }\n counter++;\n }while(correctionData === undefined);\n\n correctionData.date = history_date;\n correctionCache.set(correctionKey,correctionData);\n\n }\n }\n history_date = moment(history_date).add(1, 'days').format('YYYY-MM-DD');\n }\n //console.log(\"Final Correction Cache :\" + JSON.stringify(correctionCache.getStats()));\n allCorrectionkeys = correctionCache.keys();\n\n for (key in allCorrectionkeys){\n correctionDataList.push(correctionCache.get(allCorrectionkeys[key]));\n }\n //console.log(\"Final Correction List :\" + JSON.stringify(correctionDataList));\n return correctionDataList;\n\n}", "title": "" }, { "docid": "4b43c928a8a2486d5f1d5f13ca9a066e", "score": "0.51233405", "text": "function shouldFetchNewData() {\n return !lastFetchedAt || ((new Date().getTime() - lastFetchedAt) > fetchNewTweetsInterval);\n}", "title": "" }, { "docid": "85d86c2ef59a8fd6abb2c895eb523f0c", "score": "0.5120172", "text": "async getEstatesCreatedToday() {\n let newEstatesList = [];\n let returnList = [];\n const response = await axios\n .get(API_URL + 'estate-list/', {\n headers: {\n Authorization: `JWT ${localStorage.getItem('token')}`,\n },\n })\n .then((response) =>\n response.data.map((item) => newEstatesList.push(item))\n );\n\n newEstatesList.forEach((element) => {\n if (element.date_created == formatDate()) {\n returnList.push(element);\n }\n });\n return returnList;\n }", "title": "" }, { "docid": "7d2cd221fda9a777e7ee07e001ca8fe4", "score": "0.51194924", "text": "function getDataByDate(date) {\n $.ajax({\n url: `${URL_API}/dailystatus`,\n contentType: 'application/json',\n type: 'POST',\n headers: {\n 'Authorization': 'Bearer ' + ACCESS_TOKEN,\n 'Access-Control-Allow-Credentials' : 'true',\n 'Access-Control-Allow-Origin': '*'\n },\n data: JSON.stringify(\n {\n \"fromDate\": date\n }),\n dataType: 'json',\n success: function(data) {\n const dataFingerDaily = data.statusList;\n dataStatus = dataFingerDaily;\n dataSelect = dataFingerDaily;\n\n // render data daily page\n initPaginationDaily(dataFingerDaily);\n loading.hide();\n }\n });\n }", "title": "" }, { "docid": "cbd6935d202d5cd60e6934135ae8e0ab", "score": "0.5114848", "text": "function getdata(date) {\n var datatopost = { userid: localStorageService.get('LoggedUser').userId, date: date };\n $scope.timesheetload = true;\n $scope.slidedisable = true;\n TimesheetService.GettaskforSpecificDatemesheet(datatopost).then(function (out) {\n $scope.SpecificDataforThisdate = out;\n \n $scope.totalhours = d1Total();\n \n $scope.timesheetload = false;\n $scope.slidedisable = false;\n },function (errr) {\n try {\n $rootScope.notify(JSON.stringify(errr));\n } catch (e) {\n \n }\n finally {\n $scope.timesheetload = false;\n $scope.slidedisable = false;\n }\n })\n }", "title": "" }, { "docid": "a5cd873a83b8d46894a62534eada486f", "score": "0.5113149", "text": "function C17359_Open_Dated_Ensure_date_is_Not_added()\n{ \n InitializationEnviornment.initiliaze(); \n AppLoginLogout.login();\n var keyWordNm =\"Daily Admission\";\n var packageNm = \"Open Dated - prefix\";\n var subPakNm =\"Children (Ages 3-12)\";\n \n var packageNm1 = \"Date/Time\"; \n var subPakNm1 = \"Children (Ages 3-12)\"; \n var dateD = CommonCalender.getTodaysDate();\n var d =aqDateTime.Today();\n var currentDate =aqConvert.DateTimeToFormatStr( CommonCalender.getTodaysDate(), \"%#m/%#d/%Y\");\n \n try {\n Log.AppendFolder(\"C17359_Open_Dated_Ensure_date_is_Not_added\");\n WrapperFunction.selectKeywordName(keyWordNm); \n selectPackage(packageNm,subPakNm); \n aqUtils.Delay(3000);\n SelectQuantityFromHeader.selectQuantity(2);\n selectPackage(packageNm1,subPakNm1);\n if(datetimeformSubWindow.Exists){ \n selectDateFromSubWindow(dateD); //mm-dd-yyyy \n selectNextButtonFromSubWindow(); \n } \n cartaddedItemList.Refresh();\n aqUtils.Delay(3000);\n cartaddedItemList.Refresh();\n aqUtils.Delay(2000);\n var firstPackageText = cartaddedItemList.Child(0).VGroup(\"cartVGroup\").List(\"ratesList\").ListItem(\"[object CartItemRateRendererData]\").HGroup(0).HGroup(\"cartItemRateGrp\").Group(0).Label(\"rateNameLabel\").Caption;\n var secondPackageText = cartaddedItemList.Child(1).VGroup(\"cartVGroup\").List(\"ratesList\").ListItem(\"[object CartItemRateRendererData]\").HGroup(0).HGroup(\"cartItemRateGrp\").Group(0).Label(\"rateNameLabel\").Caption;\n \n if(aqString.StrMatches(currentDate, secondPackageText)){\n merlinLogError(\"Date exists on the ticket in the cart.\");\n }\n \n if(!aqString.StrMatches(currentDate, firstPackageText)){\n merlinLogError(\"Date is not exists on the ticket in the cart.\");\n }\n \n // VerifyCheckProperty.compareStringObj(firstPackageText,packageNm);\n //VerifyCheckProperty.compareStringObj(secondPackageText,packageNm1); \n finilizeOrder();\n aqUtils.Delay(2000); \n var settlementTotal =orderDetailsTotal.Caption;\n Log.Message(\"Verified order details on settlement page\"); \n CashButton.Click(); \n applyAmount= aqString.Replace(settlementTotal,\"$\",\"\"); \n OrderInfo.prototype.OrderTotalAmount = applyAmount.trim();\n Log.Message(\"Order total amount is set:\",OrderInfo.prototype.OrderTotalAmount); \n WrapperFunction.setTextValue(PayamountTextBox,applyAmount);\n Button.clickOnButton(applyButton); \n Log.Message(\"Complete the order\");\n WrapperFunction.settlementCompleteOrder();\n aqUtils.Delay(2000);\n validateTicket(\"Don't Validate\");\n Log.Message(\"Don't Validate the order\"); \n verifyTotalOnConfirmationPage(settlementTotal);\n var orderId = cnf_orderID1.Caption;\n if (orderId == null){\n merlinLogError(\"Order id is not present\");\n } \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 AppLoginLogout.logout(); \n}", "title": "" }, { "docid": "615acab9c17ba6ff2c6f897888a290f1", "score": "0.5111838", "text": "function getDataByDateLatest() {\n $.ajax({\n url: `${URL_API}/dailystatuslatest`,\n type: \"GET\",\n dataType: \"json\",\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': 'Bearer ' + ACCESS_TOKEN,\n },\n contentType: \"application/json; charset=utf-8\",\n success: function (data) {\n const dataFingerDaily = data.statusList;\n let lastestDate = data.statusList[0].recordDate;\n dateLatest = lastestDate;\n initDatepicker();\n dataStatus = dataFingerDaily;\n dataSelect = dataFingerDaily;\n\n // render data daily page\n initPaginationDaily(dataFingerDaily);\n }\n });\n }", "title": "" }, { "docid": "68e94cb65c2439f6925fdc55b56f33a4", "score": "0.51006615", "text": "function filter_date(data, date) {\n var new_list = []\n data.forEach(function(sighting) {\n // console.log(sighting.datetime)\n // console.log(date)\n if (sighting.datetime == date){\n new_list.push(sighting)\n }\n })\n return new_list\n}", "title": "" }, { "docid": "c95112f6d59e2d3f7f829eaaf81b492c", "score": "0.50982606", "text": "function checkForOldRooms() {\n schedule.scheduleJob(DELETE_INTERVAL_FOR_SCHEDULE, () => {\n dbClient.getOpenRooms().then((rooms) => {\n rooms.forEach(room => {\n if (room.date === undefined) {\n return;\n }\n let roomDateInMS = room.date.getTime();\n if (Date.now() - roomDateInMS > DELETE_AFTER_IN_MS) {\n dbClient.deleteRoom(room.url);\n fs.readdir((\"data/\" + room.url), (err, files) => {\n if (err) { return; }\n files.forEach(file => {\n deleteFile(\"data/\" + room.url + \"/\" + file);\n });\n });\n }\n });\n });\n });\n}", "title": "" }, { "docid": "0a40184e6751761f26d31390aab57c6b", "score": "0.50965625", "text": "function checkForFreshness(rest){\n console.log(\"--Step 2: Checking freshness for: \", rest.city);\n const now = Date.now();\n const difference = now - rest.date;\n //takes diff and makes sure it is under 16 hours (57,600,000 milliseconds);\n if(difference < 57600000){\n console.log(\"City Data is Fresh.\");\n console.log(\"City Data is\", (difference / 3600000.0), \"hours old.\" );\n return true;\n }else{\n console.log(\"City Data is Stale. Deleting Data Now\");\n Restaurant.remove({city: rest.city}, function(err){\n if(err){console.log(err)};\n });\n return false;\n }\n\n}", "title": "" }, { "docid": "a805dd23dd4398b9d9eb3c1231a831e5", "score": "0.5096094", "text": "function compareDates(arr){\n let today = new Date();\n today.setHours(0,0,0,0);\n filteredSTORE = STORE.filter(function(concert){\n if (new Date(concert.date) > today){\n return true;\n };\n });\n}", "title": "" }, { "docid": "56754c115d598927809541b933442d90", "score": "0.50903857", "text": "function is_hidden_by_updated_date(li, column) {\n\t\tvar date = li.data('updated_on'),\n\t\t\tside = column || li.closest('.column').data('side'),\n\t\t\tbegin = settings[side].updated_on.begin - 1000*60*60*3,\n\t\t\tend = settings[side].updated_on.end + 1000*60*60*21\n\n\t\treturn !((date > begin || !begin) && (date < end || !end))\n\t}", "title": "" }, { "docid": "6ec1ee9e55ef19039040302ae1af5b80", "score": "0.5090306", "text": "function filterTableDate(ufoReport) {\n return ufoReport.datetime == searchDateValue;\n }", "title": "" }, { "docid": "cd69c386738af01d70074ee91ca11e1c", "score": "0.50900894", "text": "function checkExp(dDate) {\n var now = new Date();\n var utcString = now.toISOString().substring(0, 19);\n var hour = (now.getHours());\n var localDatetime = utcString.substring(0, 11) + (hour < 10 ? \"0\" + hour : hour) + utcString.substring(13, 19);\n if (dDate > localDatetime) {\n return null;\n } else {\n return !null;\n }\n}", "title": "" }, { "docid": "029097fa1ea317e935fee8fc8b080606", "score": "0.5074051", "text": "static get dates() {\n return ['created_at', 'update_ad', 'expired_at']\n }", "title": "" }, { "docid": "17d271a50466ad70a242c4d96be23ad4", "score": "0.5066107", "text": "validateCache() {\n let lastUpdate = this.storage.getItem(\"SearchinGhost_lastCacheUpdateTimestamp\");\n if (!lastUpdate) {\n this.log(\"No cache update timestamp found, purge the cache\");\n this.fetch();\n return;\n }\n\n lastUpdate = new Date(lastUpdate);\n let elapsedTime = Math.round((new Date() - lastUpdate) / 1000);\n if (elapsedTime < this.config.cacheMaxAge) {\n this.log(`Skip cache refreshing, updated less than ${this.config.cacheMaxAge}s ago (${elapsedTime}s)`);\n return;\n }\n\n const browseOptions = {\n limit: 1,\n fields: ['updated_at'],\n order: 'updated_at DESC'\n };\n const lastUpdatedPostUrl = this.buildUrl(browseOptions);\n fetch(lastUpdatedPostUrl)\n .then(function(response) {\n return response.json();\n })\n .then((jsonResponse) => {\n const posts = jsonResponse.posts;\n let storedUpdateTimestamp = this.storage.getItem(\"SearchinGhost_updatedat\");\n let latestPostUpdateTimestamp = posts[0].updated_at;\n if (latestPostUpdateTimestamp !== storedUpdateTimestamp) {\n this.log(\"Local cache outdated, purge it\");\n this.fetch();\n } else {\n this.log(\"Local cached data up to date\");\n this.storage.setItem(\"SearchinGhost_lastCacheUpdateTimestamp\", new Date().toISOString());\n }\n }).catch((error) => {\n console.error(\"Unable to fetch the latest post information to check cache state\", error);\n });\n }", "title": "" }, { "docid": "0b95e6eef125b7f09fb74e1bcbaf7138", "score": "0.5049199", "text": "compareDate(prod, date) {\n const prodDate = this.dateFormat(date);\n if(prodDate === prod.set_date) {\n return true;\n }\n }", "title": "" }, { "docid": "d0cb1c02bd74f748db41aa22b20d0c38", "score": "0.5046716", "text": "function parseDeletionDate(download) {\n if (download.eraseAfter) {\n var pointInFuture = moment().add(7, 'months');\n vm.willBeDeletedSoon = moment(download.eraseAfter).isBefore(pointInFuture);\n vm.readyForDeletion = moment(download.eraseAfter).isBefore(moment().add(1, 'day'));\n }\n }", "title": "" }, { "docid": "877289d5ff75ea435f9ceb10f2044b2b", "score": "0.5044461", "text": "function datesCheck() \n{\n\tRMPApplication.debug(\"begin datesCheck\");\n\tc_debug(dbug.dates_check, \"=> begin datesCheck\");\n\n\t// retrieve dates from WI\n\tvar start_date = id_work_start.getValue() * 1000;\t\t\t\t// locale timestamp value in milliseconds\n\tvar end_date = id_work_end.getValue() * 1000;\n\tvar work_start_l = RMPApplication.get(\"work_start_l\");\t\t\t// locale date & time string\n\tvar work_end_l = RMPApplication.get(\"work_end_l\");\n\tvar now_date = Date.now();\t\t\t\t\t\t\t\t\t\t// current timestamp value in milliseconds\n\n\t// check if start_date < end_date\n\tif (start_date > end_date) {\n\t\tc_debug(dbug.dates_check, \"=> datesCheck: start_date > end_date AND return FALSE\");\n var content1 = ${P_quoted(i18n(\"error_datesCheck_msg1\", \"La date de fin d'intervention ne peut précéder la date de début d'intervention !\"))};\n notify_error(error_title_notify, content1 + ' ' + error_thanks_notify);\n\t\treturn false;\n\t}\n\n\t// check if end_date < current date&time\n\tif (end_date > now_date) {\n\t\tc_debug(dbug.dates_check, \"=> datesCheck: end_date > now_date AND return FALSE\");\n var content2 = ${P_quoted(i18n(\"error_datesCheck_msg2\", \"La date de fin d'intervention ne peut être ultérieure à l'heure courante !\"))};\n notify_error(error_title_notify, content2 + ' ' + error_thanks_notify);\n\t\treturn false;\n\t}\n\n\t// As rmp.interface account is set with GMT+2 timezone in Service Now,\n\t// dates should be converted in UTC format before updating the ticket\n var start_date_local = moment.tz(work_start_l, \"DD/MM/YYYY HH:mm:ss\", login.timezone);\n\tvar start_date_utc = moment(start_date_local, \"DD/MM/YYYY HH:mm:ss\").tz(rmp_interf_tz).format(\"DD/MM/YYYY HH:mm:ss\");\n\tvar end_date_local = moment.tz(work_end_l, \"DD/MM/YYYY HH:mm:ss\", login.timezone);\n\tvar end_date_utc = moment(end_date_local, \"DD/MM/YYYY HH:mm:ss\").tz(rmp_interf_tz).format(\"DD/MM/YYYY HH:mm:ss\");\n // var start_date_utc = moment(work_start_l, \"DD/MM/YYYY HH:mm:ss\").utc().format(\"DD/MM/YYYY HH:mm:ss\");\n\t// var end_date_utc = moment(work_end_l, \"DD/MM/YYYY HH:mm:ss\").utc().format(\"DD/MM/YYYY HH:mm:ss\");\n\n // we save UTC dates for ulterior use\n id_utc_work_start.setValue(start_date_utc);\n c_debug(dbug.dates_check, \"=> datesCheck: start_date_utc = \", start_date_utc);\n id_utc_work_end.setValue(end_date_utc);\n c_debug(dbug.dates_check, \"=> datesCheck: end_date_utc = \", end_date_utc);\n\n\tRMPApplication.debug(\"end datesCheck\");\n\tc_debug(dbug.dates_check, \"=> datesCheck: return TRUE\");\n\treturn true;\t\t// needed as called by pre-launch script \"Fermer le ticket\" button\n}", "title": "" }, { "docid": "c94ba10a0607fede16a115bfb0c73a03", "score": "0.50441074", "text": "function pollNewCloudFiles() {\n $.getJSON(cloudFilesURL, function (data) {\n for (let filename in data) {\n if (data.hasOwnProperty(filename) && !cloudFiles.has(filename)) {\n addNewCloudFileEntry(filename);\n }\n }\n setTimeout(pollNewCloudFiles, PERIOD);\n })\n}", "title": "" }, { "docid": "96657a292331d7677016ae4ef07a8174", "score": "0.503615", "text": "function getCurrentAareData() { \n getJsonData({ host: 'aare.schwumm.ch', path: '/aare.json' }, function(body) { \n var aareData = JSON.parse(body);\n\n if (aareData.temperature > 0 && aareData.date>lastDate) { \n var sendData = {'temperature': aareData.temperature, 'date': parseDate(aareData.date)};\n newDataEmitter.emit('bang', sendData);\n\n //update cache\n cache.shift(); \n cache.push(sendData);\n\n console.log('new data found: '+JSON.stringify(sendData.date));\n lastDate = aareData.date;\n\n //TODO store into cache\n } \n });\n}", "title": "" }, { "docid": "40520fa8249fb516f312cb452b1030e1", "score": "0.5032928", "text": "function lookForRelevantData(data, location, d) {\n var retVal = false;\n $.each(data, function (index) {\n if (location.toLowerCase() === this.city.toLowerCase()) {\n var storedDate = this.date\n var convertedDate = new Date(storedDate * 1000).valueOf();\n var timeDiff = d - convertedDate;\n var timeDiffToHours = timeDiff / 1000 / 60 / 60;\n //data is considered relevant when it is not older than 2 hours\n if (timeDiffToHours < 2) {\n // if there is such data, make a call to the database\n console.log('information in the database');\n getCurrentWeatherData(location, storedDate);\n retVal = true;\n return true;\n }\n }\n });\n return retVal;\n}", "title": "" }, { "docid": "75e20c3ce101bd8c15f80b7d8e9bc524", "score": "0.5029006", "text": "function fetch_date() {\n return wkof.Apiv2.fetch_endpoint('/level_progressions').then(data => {date = data.data.pop().data.unlocked_at;});\n }", "title": "" }, { "docid": "4256adf93aabf090f39766029612e55c", "score": "0.502778", "text": "getPackagesForStores(req) {\n return new Promise((resolve, reject) => {\n var searchData = {};\n if(req && req.query){\n var daterange = req.query.daterange?req.query.daterange:'';\n if(daterange){\n var date_arr = daterange.split('-');\n var startDate = (date_arr[0]).trim(); \n var stdate = new Date(startDate);\n stdate.setDate(stdate.getDate() );\n \n var endDate = (date_arr[1]).trim();\n var endate = new Date(endDate);\n endate.setDate(endate.getDate() +1); \n \n stdate = new Date(stdate.setUTCHours(0,0,0,0));\n stdate = stdate.toISOString();\n endate = new Date(endate.setUTCHours(23,59,59,0));\n endate = endate.toISOString(); \n \n searchData.createdAt = {\"$gte\":stdate, \"$lte\": endate};\n }\n \n if(!req.query.daterange && !req.query.clear){\n var endate = new Date(); \n endate.setDate(endate.getDate());\n var stdate = new Date();\n stdate.setDate(stdate.getDate() - parseInt(strings.default_days_table));\n \n stdate = new Date(stdate.setUTCHours(0,0,0,0));\n stdate = stdate.toISOString();\n endate = new Date(endate.setUTCHours(23,59,59,0));\n endate = endate.toISOString(); \n \n searchData.createdAt = {\"$gte\":stdate, \"$lte\": endate};\n }\n if(req.query.clear){\n var endate = new Date(); \n endate.setDate(endate.getDate()+1);\n var stdate = new Date();\n stdate.setDate(stdate.getDate() -14); \n \n stdate = new Date(stdate.setUTCHours(0,0,0,0));\n stdate = stdate.toISOString();\n endate = new Date(endate.setUTCHours(23,59,59,0));\n endate = endate.toISOString(); \n \n searchData.createdAt = {\"$gte\":stdate, \"$lte\": endate};\n }\n } \n Package.find(searchData)\n .populate('customerId')\n .populate('awbId')\n .exec(async (err, packages) => {\n let packageArray = []\n for(let data of packages){\n let statusPack = await PackageStatus.find({status : PKG_STATUS[5],packageId : data._id})\n if(statusPack.length == 0){\n packageArray.push(data)\n }\n }\n if (err) {\n resolve([]);\n } else {\n \n resolve(packageArray);\n }\n })\n });\n }", "title": "" }, { "docid": "0495670b9cc24b9fb4f193abf1784fcf", "score": "0.50241876", "text": "function checkForChangedFilesInFolder(folder_id) {\n var folderID = '\"' + folder_id + '\"';\n\n var folderSearch = folderID + \" \" + \"in parents\";\n var timezone = Session.getScriptTimeZone();\n var today = new Date();\n\n var fifteenMinutesAgo = new Date(today.getTime() - 60 * 1000 * 15);\n var startTime = fifteenMinutesAgo.toISOString();\n\n var search = '(trashed = true or trashed = false) and ' + folderSearch;\n var files = DriveApp.searchFiles(search);\n\n today = Utilities.formatDate(fifteenMinutesAgo, timezone, \"yyyy-MM-dd HH:mm\");\n while (files.hasNext()) {\n\n var file = files.next();\n var dateCreated = Utilities.formatDate(file.getDateCreated(), timezone, \"yyyy-MM-dd HH:mm\")\n\n if (dateCreated > today) {\n sendSlackNotification({\n fileName: file.getName(),\n fileURL: file.getUrl(),\n fileOwner: file.getOwner().getName()\n });\n }\n }\n}", "title": "" }, { "docid": "4c45f3e8b2f9de7bbdf8be913ce84b7d", "score": "0.50226635", "text": "async function fetchPublicHolidayInfo(thisYear, otherYear, areaCode) {\n // get public holidays for this year and the previous year in January or the next year in December\n\n let areaStr = areaCode.toUpperCase()\n let fm = FileManager.local()\n let dir = fm.documentsDirectory()\n let path = fm.joinPath(dir, \"feiertage_\" + thisYear + \"_\" + areaStr + \".json\")\n let path2 = fm.joinPath(dir, \"feiertage_\" + otherYear + \"_\" + areaStr + \".json\")\n let apiURL, apiURL2\n\n if ( isGermanState(areaStr) ) {\n apiURL = feiertageApiURLde\n } else {\n apiURL = feiertageApiURLworld\n }\n apiURL = apiURL.replace(\"#area#\", areaStr)\n apiURL2 = apiURL\n apiURL = apiURL.replace(\"#yyyy#\", thisYear)\n apiURL2 = apiURL2.replace(\"#yyyy#\", otherYear)\n \n let file_exists = true\n let req = new Request(apiURL)\n let req2 = new Request(apiURL2)\n const today = new Date()\n \n\n // check if file already exists and is from today\n try {\n ft1 = JSON.parse(fm.readString(path), null)\n ft2 = JSON.parse(fm.readString(path2), null)\n if (!ft1 || !ft2) { \n file_exists = false \n } else { \n // check, if file is from today\n let fetchTime = new Date(ft1.dateStr)\n let fetchTime2 = new Date(ft2.dateStr)\n if (sameDay(fetchTime, today) && sameDay(fetchTime2, today)) { file_exists = true } else { file_exists = false }\n }\n } catch (err) {\n file_exists = false \n }\n\n if (forceDownload) file_exists = false\n \n // If file does not exist, or is outdated, get a new one from feiertage-api.de\n if (file_exists == false) {\n try {\n // Fetch data from feiertage-api.de\n ft1 = await req.loadJSON()\n ft2 = await req2.loadJSON()\n ft1.dateStr = new Date().toJSON(); // timestamp of fetch\n ft2.dateStr = new Date().toJSON(); // timestamp of fetch\n // Write JSON to iCloud file\n fm.writeString(path, JSON.stringify(ft1, null, 2))\n fm.writeString(path2, JSON.stringify(ft2, null, 2))\n } catch (err) {\n // API not working :-(\n return false\n } \n }\n return true\n}", "title": "" }, { "docid": "e4318aa1753c416e3508c22b4c553d10", "score": "0.5022473", "text": "async function fetchHolidayInfo(areaCode) {\n // get holidays for this area\n\n let areaStr = areaCode.toUpperCase()\n let fm = FileManager.local()\n let dir = fm.documentsDirectory()\n let path = fm.joinPath(dir, \"ferien_\" + areaStr + \".json\")\n let apiURL = ferienApiURL + areaStr\n let file_exists = true\n let req = new Request(apiURL)\n const today = new Date()\n\n // check if file already exists and is from today\n try {\n ferien = JSON.parse(fm.readString(path), null)\n if (!ferien) { \n file_exists = false \n } else { \n // check, if file is from today\n let fetchTime = new Date(ferien.dateStr)\n if (sameDay(fetchTime, today)) { file_exists = true } else { file_exists = false }\n }\n } catch (err) {\n file_exists = false \n }\n\n if (forceDownload) file_exists = false\n \n // If file does not exist, or is outdated, get a new one from feiertage-api.de\n if (file_exists == false) {\n try {\n // Fetch data from feiertage-api.de\n ferienFromAPI = await req.loadJSON()\n ferienFromAPI.dateStr = new Date().toJSON(); // timestamp of fetch\n // Write JSON to iCloud file\n fm.writeString(path, JSON.stringify(ferienFromAPI, null, 2))\n ferien = ferienFromAPI\n } catch (err) {\n // API not working :-(\n return false\n } \n }\n\n return true\n}", "title": "" }, { "docid": "94fdeffe25966ccb7540f591cdbd8a6a", "score": "0.50168616", "text": "function checkOutOfDate() {\n historyRentBook();\n\n var today = new Date();\n var DATE_CHECK = new Date(today.getFullYear(), today.getMonth(), today.getDate());\n\n var findName = rentBooks.filter(function(user) {\n return user.username === getName[0];\n });\n\n var findByID = readlineSync.question(\"What's bookID u want to find ? \");\n\n\n}", "title": "" }, { "docid": "b0c91903b580afee039d9043f3fe2381", "score": "0.50090957", "text": "function removeOldFiles() {\n log.debug({ maxAge: maxAge }, \"removing old files\");\n\n // delete json files older than 2 weeks\n var result = findRemoveSync(\"json-data/\", { age: { seconds: maxAge } });\n var files = Object.keys(result);\n\n if (files.length > 0) {\n fileRemovalCounter.inc(files.length);\n log.debug({ numFiles: files.length, age: maxAge }, \"deleting old files\");\n }\n}", "title": "" }, { "docid": "6c9c0e047d4c8bb7a5f23c7256926564", "score": "0.50055385", "text": "includesDate(date) {\n date = date instanceof DateInfo ? date : new DateInfo(date, this.dateOpts);\n return (\n !this.excludesDate(date) &&\n (this.dates.find(d => d.includesDate(date)) || false)\n );\n }", "title": "" }, { "docid": "bcfcfbb00ca5df94c1634689a059632a", "score": "0.50051653", "text": "function filterRecords(dt) {\n var mdy1 = new Date(dt);\n // console.log(mdy1.getMonth());\n // console.log(mdy1.getDate());\n // console.log(mdy1.getFullYear());\n var records = []\n tableData.forEach(data => {\n var mdy2 = new Date(data.datetime);\n if ((mdy2.getTime() === mdy1.getTime()) || (dt === \"\")) {\n records.push(data);\n }\n });\n return records;\n}", "title": "" }, { "docid": "2f5fe48be22c3cdf5b91b23be0858e8c", "score": "0.5004054", "text": "function checkFile (fileNm){\n\n\t\tfs.stat(dataPath + '/' + fileNm, (err, stat) => { \n\n\t\t\tlet file = storedList.find( (f, idx, arr) => { \n\t\t\t\treturn fileNm === f.name\n\t\t\t});\n\n\t\t\tif ( !file || +file.size !== +stat.size || +file.ctime !== stat.ctime.getTime() ){\n\t\t\t\tstoredList.push({\n\t\t\t\t\tname: fileNm,\n\t\t\t\t\tsize: +stat.size,\n\t\t\t\t\tctime: stat.ctime.getTime()\n\t\t\t\t});\n\t\t\t\tchanged = true;\n\t\t\t}\n\n\t\t\tfileName = tmp.shift();\n\t\t\tif (fileName) checkFile(fileName);\n\t\t\telse cb(changed);\n\n\t\t});\n\t}", "title": "" }, { "docid": "299f71897915f5e6390c7fbe289ea72f", "score": "0.5003422", "text": "function warningNextMaintain() {\n\t\tvar last = $scope.oilData[$scope.oilData.length - 1];\n\t\tvar nextDate = addDate(last.date, 60);\n\t\tvar nextKm = last.km + 2000;\n\t\tvar currentDate = new Date();\n\t\t// Khong duoc dat ten bien la dateDiff nua\n\t\tvar dd = dateDiff(currentDate, nextDate);\n\n\t\t$scope.nextDate = convertDateToString(nextDate);\n\t\t$scope.dateDiff = dd;\n\t\t$scope.nextKm = nextKm;\n\t}", "title": "" }, { "docid": "8a4b3e5017d8631ea54ba3d1006cef51", "score": "0.499296", "text": "function CheckDate() {\n\n var CurrentDate = new Date();\n console.log(\"CurrentDate = \" + CurrentDate);\n\n var UserDate = new Date($('#data').val());\n UserDate.setHours(UserDate.getHours() + 15);\n console.log(\"UserDate = \" + UserDate);\n\n if(UserDate >= CurrentDate ){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "58a1f2f67327318dca30c56c2311a882", "score": "0.49874878", "text": "function deleteGeneratedTweets() {\n var currentDate = moment();\n return knex.select('created_at', 'bot_tweet_id')\n .from('generatedtweets')\n .then(function(dates) {\n console.log('dates ------->', dates);\n dates.forEach(function(date) {\n if (moment(date.created_at).add(24, 'hours').isBefore(currentDate)) {\n //delete tweets from database that are more than 24 hours old\n knex.table('generatedtweets')\n .where({'bot_tweet_id': date.bot_tweet_id })\n .del();\n }\n return dates;\n });\n });\n}", "title": "" }, { "docid": "536301f73cc4fa100ced3566d6943a57", "score": "0.49832672", "text": "function shouldBeMounted(date, stock) {\r\n // If expiryDate is unchecked\r\n if (!filterObj.expiryDate) {\r\n const productDate = new Date(date)\r\n const presentDate = new Date()\r\n if (productDate < presentDate) {\r\n return false\r\n }\r\n }\r\n // If low stock is unchecked\r\n if (!filterObj.stock) {\r\n if (stock < 100) {\r\n return false\r\n }\r\n }\r\n // Else return true\r\n return true;\r\n}", "title": "" }, { "docid": "ad2e14b54a18c9abe1f9e6d97f914948", "score": "0.49809915", "text": "function getItemsAfterDate(daysAgo){\n knexInstance\n .select('*')\n .from('shopping_list')\n .where('date_added', '<=' , knexInstance.raw(`now() - '?? days' ::INTERVAL `, daysAgo))\n .then(result => {\n console.log('items after days');\n console.log(result);\n })\n}", "title": "" }, { "docid": "dd76d61ca7cb090527ef3a18c2d8352e", "score": "0.497526", "text": "function is_it_time_for_a_daily_refresh(){\n \n var hourNow = new Date().getHours();\n \n if (!pageIsFreshlyLoaded && hourNow === 0) {\n location.reload();\n } else if (hourNow === 0){\n return\n } else {\n pageIsFreshlyLoaded = false;\n }\n}", "title": "" }, { "docid": "981a8d27906215d86994d0471bd1d9b8", "score": "0.49747756", "text": "function checkFilterList(key) {\n //alert(\"checkFilterList\");\n // Hide status message\n $(\"#\" + key + \"_msg\").css(\"display\", \"none\");\n\n var url = filterFiles[key];\n try {\n if (url in localStorage) {\n var list = JSON.parse(localStorage[url]);\n if (!list.error) {\n // We didn't used to store lastDownloaded, so we check for its existence and fall back on lastUpdated if necessary\n // lastDownloaded: Last time the list was downloaded\n // lastUpdated: Last time the list reports that it was updated, or else the last time it was downloaded\n var lastDownloaded = list.lastDownloaded ? list.lastDownloaded : list.lastUpdated;\n // Only display status message if checked\n if (document.getElementById(key).checked) {\n var d = new Date(lastDownloaded);\n var timeDateString = null;\n var now = new Date();\n if (d.toDateString() == now.toDateString()) {\n timeDateString = \"最后更新于 \" + d.toLocaleTimeString() + \" 今日\";\n } else {\n timeDateString = \"最后更新于\" + d.toLocaleTimeString() + \" \" + d.toDateString();\n }\n var timeDiff = Date.now() - lastDownloaded;\n\n $(\"#\" + key + \"_msg\").css(\"color\", \"#b0b0b0\").text(calculateTimeDiffString(timeDiff)).attr('title', timeDateString).css(\"display\", \"inline\");\n }\n } else {\n // Display error only if checked\n if (document.getElementById(key).checked) {\n $(\"#\" + key + \"_msg\").text(list.error).css(\"color\", \"#a03030\").css(\"display\", \"inline\");\n }\n }\n } else {\n // If we don't have this filter list but it's enabled, fetch it\n if (document.getElementById(key).checked == true)\n updateFilterList(key);\n }\n } catch (e) {}\n}", "title": "" }, { "docid": "3d3e05d8837c1e6e332f32e416650f21", "score": "0.4971991", "text": "setFileSchedule(fileId, date, time) {\n console.log('===========kkkkkkkkk============');\n console.log(new Date(time).getMinutes());\n let currentDate = new Date(date);\n let currentMonth = currentDate.getMonth() + 1;\n\n let queryDate =\n currentDate.getDate() +\n '-' +\n currentMonth +\n '-' +\n currentDate.getFullYear();\n console.log(queryDate);\n\n let realm = new Realm({schema: [FolderSchema, FileSchema]});\n const file = realm.objects('PdfFile').filtered('id = $0', fileId);\n realm.write(() => {\n file[0].isScheduled = 1;\n file[0].scheduledAtDate = date;\n file[0].scheduledAtTime = time;\n file[0].scheduledAtDateStr = queryDate;\n file[0].fileDueHour = new Date(time).getHours();\n });\n const files = realm.objects('PdfFile').filtered('id = $0', fileId);\n console.log(files);\n }", "title": "" }, { "docid": "42185b133fe0a178ac585491af7401e7", "score": "0.4968432", "text": "function getTodaysData(paramss, upDate) {\n console.log(\"Time Logs: Function Begins\");\n\n let soy = moment().startOf(\"year\").format();\n\n // let soy = moment().subtract(1, \"day\");\n\n let diff = moment().startOf(\"year\").add(10, \"days\").diff(moment(soy), \"days\");\n\n var dates = [];\n for (let index = 0; index < diff + 1; index++) {\n let newDate = {\n from: moment(soy).add(index, \"days\").format(\"YYYY-MM-DD\"),\n to: moment(soy).add(index, \"days\").endOf(\"day\").format(\"YYYY-MM-DD\"),\n };\n // let newDate = moment(soy).add(index, \"days\").format(\"YYYY-MM-DD\");\n dates.push(newDate);\n }\n\n var headers = {\n \"Content-Type\": \"application/plain\",\n };\n\n var Items = [];\n var dataProcess = () => {\n IOTHTTP.post(`/devicedata`, paramss, {\n headers,\n })\n .then((result) => {\n console.log({ result: result.data });\n if (result.data.Count == 0) {\n console.log({ upDate });\n let newUpDate = moment(upDate).add(1, \"day\").format(\"YYYY-MM-DD\");\n let p = {\n // TableName: \"PowerData\",\n TableName: \"Parameters\",\n\n KeyConditionExpression:\n \"DeviceID = :key and begins_with(DeviceTimeStamp, :up)\",\n ExpressionAttributeValues: {\n \":key\": `${ID}`,\n \":up\": `${newUpDate}`,\n },\n ScanIndexForward: false,\n };\n getTodaysData(p, newUpDate);\n }\n console.log({ result: result.data.Items[0].DeviceTimeStamp });\n // console.log({ result: JSON.stringify(result) });\n\n console.log({ result: moment(result.data.Items[0].DeviceTimeStamp) });\n\n let { LastEvaluatedKey } = result.data.Items;\n console.log({ LastEvaluatedKey });\n Items = [...Items, ...result.data.Items];\n parsed = Items;\n if (result.LastEvaluatedKey) {\n paramss.ExclusiveStartKey = result.LastEvaluatedKey;\n dataProcess();\n } else {\n console.log({ count: Items.length });\n console.log({ parsed: JSON.stringify(parsed) });\n\n hrend = process.hrtime(hrstart);\n console.log(\"final->\", parsed.length);\n fs.writeFile(\"Today.json\", JSON.stringify(parsed), (err) => {\n if (err) {\n console.log(err);\n }\n console.info(\n \"Execution time (hr): %ds %dms\",\n hrend[0],\n hrend[1] / 1000000\n );\n });\n\n // return;\n }\n })\n .catch((error) => {\n console.log(error.response);\n });\n // Items = [...Items, ...result.Items];\n };\n\n dataProcess();\n}", "title": "" }, { "docid": "139de6d029947621c49ccf67baf3061e", "score": "0.49626604", "text": "function isValidCacheEntry(date) {\n var now = new Date().getTime();\n var lifetime = now - date;\n return lifetime <= CACHE_LIFE;\n}", "title": "" }, { "docid": "bd9e1f1bc02f6b5e06256567c16b2fff", "score": "0.49571767", "text": "dateHandler(date) {\n const product_date = new Date(date);\n const current_date = new Date();\n const difference_time = Math.abs(current_date - product_date);\n const difference_days = Math.ceil(difference_time / (1000 * 60 * 60 * 24)); \n if (difference_days < 7){\n return difference_days +\" days ago\"\n }\n return date.substr(0, 15);\n }", "title": "" }, { "docid": "4c65b6ea923ce571409a7b192b5e5740", "score": "0.49496198", "text": "function checkTechnicianClocking() {\n debug && console.log( \"Home.checkTechnicianClocking: User must close out previous day.\" );\n\n var today = new Date().setHours(0,0,0,0),\n clocking = JSONData.getObjectsByDataType( \"technicianClocking\" );\n\n\n if( clocking && clocking.length > 0 ) {\n for( var clockItem in clocking ) {\n if( !clocking[clockItem].closed && new Date( clocking[clockItem].timeStart ).setHours(0,0,0,0) < today ) {\n window.localStorage.setItem( \"checkTechnicianClocking\", \"openEntryFound\" );\n //UIFrame.navigateToPage( \"closeoutday.html\" );\n }\n }\n }\n }", "title": "" }, { "docid": "7bf31c4aed543c8c5bf83e60498385e2", "score": "0.49449253", "text": "function checkCacheExpired() {\n const lastCacheRefreshTime = localStorage[config.cacheRefreshTimeKeyName];\n if (!lastCacheRefreshTime) {\n return true;\n }\n\n const refreshTime = moment(lastCacheRefreshTime);\n // if the last refresh time is more than cacheLifetimeDays\n if (moment().diff(refreshTime, 'day', true) > config.cacheLifetimeDays) {\n // means the cache has expired\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d7ee91ff015ebf1e8691dd8b104354b7", "score": "0.4943269", "text": "_fetchInstrumentList(){\n let self = this;\n let xhttp = new XMLHttpRequest();\n \n \n xhttp.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n let instrumentList = JSON.parse(this.responseText);\n let today = new Date().getTime();\n \n self.fullInstrumentList = _.filter(instrumentList, function(item){\n if(!item.expiry){\n return true;\n }\n \n let expiryDate = new Date(item.expiry).getTime();\n return today < expiryDate;\n });\n }\n };\n \n xhttp.open(\"GET\", this.url, true);\n xhttp.send();\n }", "title": "" }, { "docid": "acd8c474ddd5db519e317921af6930f1", "score": "0.49357352", "text": "function checkTime(created){\n created = new Date (created);\n return created.getTime();\n}", "title": "" }, { "docid": "5112bace16cc838f177428779827f932", "score": "0.49342257", "text": "function checkDate(date_text) {\n if(date_text===date_string){\n return date_text === date_string;//\"2018-07-08 09:00:00\";\n }else {\n var new_date=current_Date.getDate()+1;\n if(new_date <10){\n new_date =\"0\"+new_date;\n }\n var new_date_string=year+\"-\"+month+\"-\"+new_date+\" \"+\"09:00:00\";\n return date_text===new_date_string;\n }\n }", "title": "" }, { "docid": "ace4c70db4636d6b16d78d1070c5ef4b", "score": "0.4932538", "text": "function isDisabled(date) {\r\n var today = new Date();\r\n return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;\r\n}", "title": "" }, { "docid": "99ce1209f8109fa6a28c23ff4338604f", "score": "0.4930772", "text": "checkIfLessonInThePast() {\n let today = new Date();\n\n for (let i = 0; i < this.state.lessons.length; ++i) {\n let temp = new Date(this.state.lessons[i].date);\n if (this.state.lessons[i].status === \"To_Give\" && temp < today) {\n console.log(\"asd\");\n this.lessonStatusChange(this.state.lessons[i], 3)\n }\n }\n }", "title": "" }, { "docid": "72ee1ece07e885b245dc564f1449b054", "score": "0.4930479", "text": "function getChanged(fstats, minAge = 0, ret=[])\n{\n for (let k in fstats)\n if (fstats[k].isFile || fstats[k].isDir)\n { let v = fstats[k];\n if (v.isDir)\n getChanged(v.files, minAge, ret);\n else if (!v.notified && v.age >= minAge)\n { v.notified = true;\n ret.push(v);\n if (v.deleted)\n delete fstats[k];\n }\n }\n return ret;\n}", "title": "" }, { "docid": "6e2c4c16f3e300b18fd0045debeb6593", "score": "0.49250028", "text": "function checkForNewImages() {\n $timeout(() => {\n const latestTime = ctrl.images[0] && ctrl.images[0].data.uploadTime;\n search({since: latestTime}).then(resp => {\n // FIXME: minor assumption that only the latest\n // displayed image is matching the uploadTime\n ctrl.newImagesCount = resp.total - 1;\n\n if (! scopeGone) {\n checkForNewImages();\n }\n });\n }, pollingPeriod);\n }", "title": "" }, { "docid": "5c96068f0e94abe8e11c1cd47ff4b10b", "score": "0.4924424", "text": "function taskExpired(dueDate) {\n if (dueDate == \"\") {\n return false;\n } else {\n let d = new Date();\n let dueDateParts = dueDate.split(\"-\");\n let dueDateYear = parseInt(dueDateParts[0]);\n let dueDateMonth = parseInt(dueDateParts[1]);\n let dueDateDay = parseInt(dueDateParts[2]);\n if (dueDateYear < d.getFullYear()) {\n return true;\n } else if (dueDateYear == d.getFullYear()) {\n if (dueDateMonth < d.getMonth() + 1) {\n return true;\n } else if (dueDateMonth == d.getMonth() + 1) {\n if (dueDateDay < d.getDate()) {\n return true;\n }\n }\n }\n return false;\n }\n}", "title": "" }, { "docid": "db0207fcd6a7430049ff83b5d2755a70", "score": "0.4923979", "text": "function checkDate(dateD, dateF){\n var ojd = new Date();\n var d = dateD.toDate();\n var f = dateF.toDate();\n if(d.getTime() === f.getTime()){\n vm.messageKO = \"La date de début et la date de fin ne peuvent pas être égales\";\n return false;\n }else if (d.getTime() > f.getTime()){\n vm.messageKO = \"La date de début doit être avant la date de fin\";\n return false;\n }else if (d.getTime() < ojd.getTime()){\n vm.messageKO = \"La date de début doit être égale ou après la date d'aujourd'hui\";\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "49f705b140bc7bf643f82564506fe6a1", "score": "0.49214017", "text": "function hasOneDayPassed() {\n // get today's date. eg: \"7/37/2007\"\n var date = new Date().toLocaleDateString();\n\n // if there's a date in localstorage and it's equal to the above: \n // inferring a day has yet to pass since both dates are equal.\n if (localStorage.recipe_date == date)\n return false;\n\n // this portion of logic occurs when a day has passed\n localStorage.recipe_date = date;\n return true;\n}", "title": "" }, { "docid": "7aed7ca7345e2a03e2ed13882da49a31", "score": "0.49171263", "text": "compare(date)\n {\n try\n {\n date = this.filterTime(date);\n var thisDate = this.filterTime(this._date);\n var diff = thisDate.valueOf() - date.valueOf();\n \n if(0==diff)\n return 0;\n \n if(0<diff)\n return 1;\n \n else\n return -1;\n }\n catch(e)\n {\n super.dispatchIfError(e.toString(), \"ClassDays::compare()\", 152);\n }\n return null;\n }", "title": "" }, { "docid": "1d3f77d8b31fdb1658b30252704dca30", "score": "0.49131835", "text": "filterDia(dia) {\n var today = new Date();\n var dd = today.getDate();\n var mm = today.getMonth()+1; //January is 0!\n var yyyy = today.getFullYear();\n if(dd<10) {\n dd = '0'+dd\n } \n if(mm<10) {\n mm = '0'+mm\n } \n today = yyyy + '-' + mm + '-' + dd;\n \n // var tomorrow = new Date() \n // tomorrow = yyyy + '-' + mm + '-' + (dd + 1);\n\n if(this.clickHoyState == 0) {\n this.searchDate = today; \n this.clickHoyState = 1;\n }else {\n this.searchDate = '';\n this.clickHoyState = 0;\n }\n }", "title": "" }, { "docid": "6a336097c13b9339128758ded3484cc5", "score": "0.49072447", "text": "async function checkForUpdate(stock) {\n let oneDay = 90000000; \n let currentDate = new Date();\n let result;\n let sinceUpdated = currentDate - new Date(stock.updated_on);\n \n //Needs to be updated\n if(sinceUpdated > oneDay) { \n let newStock = await getStock(stock.stock);\n result = newStock;\n result.likes = stock.likes; \n return result; \n }\n else return false; \n }", "title": "" }, { "docid": "f722d40ed9afd764c67ca3a80f405bba", "score": "0.4906313", "text": "function checkExamUpdates() {\n if (new Date() - module.exports.getExamLastUpdated() > examDataUpdate) {\n module.exports.fetchData();\n if (new Date() - module.exports.getExamLastUpdated() < 10000) {\n // updated within 10 seconds - new data, process it\n module.exports.processData();\n }\n }\n}", "title": "" }, { "docid": "44645f85ec8e99c4c821adb436cdd448", "score": "0.49055916", "text": "function displayIfWrongDate(dto) {\n var dto = $(dto).val()\n var pattern = /(\\d{2})\\.(\\d{2})\\.(\\d{4})/;\n var dt = new Date(dto.replace(pattern,'$3-$2-$1'));\n var now = new Date();\n var newDate = ((dt - now)/(60*60*24*1000));\n if (newDate>30) {\n $('.cform-date').parent().addClass('cform-error cform-date-error');\n $('.cform-date').parent().attr('data-content', formats_wrongDate);\n }\n else {\n $('.cform-date').parent().removeClass('cform-error cform-date-error');\n }\n }", "title": "" }, { "docid": "f34fff308b99bb759a6d6d55994ee0a5", "score": "0.49055132", "text": "async deleteBefore(days) {\n console.log(`== Try to delete data before ${days} day(s) ago ==`);\n\n // Convert days into seconds.\n const seconds = days * 24 * 60 * 60;\n // Calculate the maximum timestamp (in seconds) that allows events to\n // live.\n const maxTimestamp = Date.now() / 1000 - seconds;\n\n await this.delete([{\n $match: {\n timestamp: {\n $lte: maxTimestamp,\n },\n },\n }]);\n\n console.log(`== Success to delete data before ${days} day(s) ago ==`);\n }", "title": "" } ]
e8e35919f29b842506b0cd8b0f512ece
Separated into a function to contain deoptimizations caused by try/finally.
[ { "docid": "6abeb0f337320cc4a9ebba31f8fb3a08", "score": "0.0", "text": "function measureLifeCyclePerf(fn, debugID, timerType) {\n\t if (debugID === 0) {\n\t // Top-level wrappers (see ReactMount) and empty components (see\n\t // ReactDOMEmptyComponent) are invisible to hooks and devtools.\n\t // Both are implementation details that should go away in the future.\n\t return fn();\n\t }\n\n\t ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);\n\t try {\n\t return fn();\n\t } finally {\n\t ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);\n\t }\n\t}", "title": "" } ]
[ { "docid": "3706f013fb0dc521114f9338c50a13f4", "score": "0.5742559", "text": "finally() {}", "title": "" }, { "docid": "aac52cd6e44edbd0ab5dac0415416c48", "score": "0.5699954", "text": "function eliminateDeadFuncs(ast) {\n assert(asm);\n assert(extraInfo && extraInfo.dead_functions);\n var deadFunctions = set(extraInfo.dead_functions);\n traverseGeneratedFunctions(ast, function (fun, type) {\n if (!(fun[1] in deadFunctions)) {\n return;\n }\n var asmData = normalizeAsm(fun);\n fun[3] = [['stat', ['call', ['name', 'abort'], [['num', -1]]]]];\n asmData.vars = {};\n denormalizeAsm(fun, asmData);\n });\n}", "title": "" }, { "docid": "bdd32f4bb0f64dddf2d5ceb7e8d24bc7", "score": "0.56404716", "text": "function catcher () { return fn }", "title": "" }, { "docid": "0757d4fe82a3ba04262d73677df9ea86", "score": "0.55709314", "text": "function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}", "title": "" }, { "docid": "caeb22b55da85b7185f00fe5a69bedcf", "score": "0.5451804", "text": "function k(a){var b={tryLoc:a[0]};1 in a&&(b.catchLoc=a[1]),2 in a&&(b.finallyLoc=a[2],b.afterLoc=a[3]),this.tryEntries.push(b)}", "title": "" }, { "docid": "c24a5f366f6d99cdec7ccf037710d3d4", "score": "0.5431577", "text": "function foo(x) {\n %DeoptimizeFunction(run);\n return x;\n}", "title": "" }, { "docid": "f9cd6fde03888384b4e624db1ef9f00a", "score": "0.5328894", "text": "function entry(fn) {\n return [\n 'function' + (fn.declaration ? ' ' + fn.name : '') + '() {',\n ' var ret;',\n ' \"Trace\" in window && typeof Trace.entry === \"function\" && Trace.entry(' + JSON.stringify(fn) + ');',\n ' try {',\n ' ret = (\\n'\n ].join('\\n');\n}", "title": "" }, { "docid": "45a62ebba1c24423ece48709367f81d1", "score": "0.53234154", "text": "function Decline() {}", "title": "" }, { "docid": "58d036069a93d6ca8adcd6fd84fba523", "score": "0.5253424", "text": "function e1857582() { return '}; '; }", "title": "" }, { "docid": "565c0f0c71966cfd3cd3e50a2de8d9e8", "score": "0.5225856", "text": "finally(fullfilled) {\n return this.exec().finally(fullfilled);\n }", "title": "" }, { "docid": "6e3361bacf2520be773720c086c4fd6d", "score": "0.51911825", "text": "function lineSplitter() {\n var ret = [];\n var inContinual = false;\n var inFunction = false;\n var currFunctionLines;\n var currFunctionLineNum;\n var unparsedTypes, unparsedGlobals;\n if (mainPass) {\n unparsedTypes = {\n intertype: 'unparsedTypes',\n lines: []\n };\n finalResults.push(unparsedTypes);\n unparsedGlobals = {\n intertype: 'unparsedGlobals',\n lines: []\n };\n finalResults.push(unparsedGlobals);\n }\n var baseLineNumPosition = 0;\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n if (singlePhase) lines[i] = null; // lines may be very very large. Allow GCing to occur in the loop by releasing refs here\n\n while (baseLineNumPosition < baseLineNums.length-1 && i >= baseLineNums[baseLineNumPosition+1][0]) {\n baseLineNumPosition++;\n }\n\n if (mainPass && (line[0] == '%' || line[0] == '@')) {\n // If this isn't a type, it's a global variable, make a note of the information now, we will need it later\n var parts = line.split(' = ');\n assert(parts.length >= 2);\n var left = parts[0], right = parts.slice(1).join(' = ');\n var testType = /^type .*/.exec(right);\n if (!testType) {\n var globalIdent = toNiceIdent(left);\n var testAlias = /^(hidden )?alias .*/.exec(right);\n Variables.globals[globalIdent] = {\n name: globalIdent,\n alias: !!testAlias,\n impl: VAR_EMULATED\n };\n unparsedGlobals.lines.push(line);\n } else {\n unparsedTypes.lines.push(line);\n }\n continue;\n }\n if (mainPass && /^define .*/.test(line)) {\n inFunction = true;\n currFunctionLines = [];\n currFunctionLineNum = i + 1;\n }\n if (!inFunction || !mainPass) {\n if (inContinual || /^\\ +(to|catch |filter |cleanup).*/.test(line)) {\n // to after invoke or landingpad second line\n ret.slice(-1)[0].lineText += line;\n if (/^\\ +\\]/.test(line)) { // end of llvm switch\n inContinual = false;\n }\n } else {\n ret.push({\n lineText: line,\n lineNum: i + 1 + baseLineNums[baseLineNumPosition][1] - baseLineNums[baseLineNumPosition][0]\n });\n if (/^\\ +switch\\ .*/.test(line)) {\n // beginning of llvm switch\n inContinual = true;\n }\n }\n } else {\n currFunctionLines.push(line);\n }\n if (mainPass && /^}.*/.test(line)) {\n inFunction = false;\n if (mainPass) {\n var func = funcHeaderHandler({ tokens: tokenize(currFunctionLines[0]) });\n\n if (SKIP_STACK_IN_SMALL && /emscripten_autodebug/.exec(func.ident)) {\n warnOnce('Disabling SKIP_STACK_IN_SMALL because we are apparently processing autodebugger data');\n SKIP_STACK_IN_SMALL = 0;\n }\n\n var ident = toNiceIdent(func.ident);\n if (!(ident in DEAD_FUNCTIONS)) {\n finalResults.push({\n intertype: 'unparsedFunction',\n // We need this early, to know basic function info - ident, params, varargs\n ident: ident,\n params: func.params,\n returnType: func.returnType,\n hasVarArgs: func.hasVarArgs,\n lineNum: currFunctionLineNum,\n lines: currFunctionLines\n });\n }\n currFunctionLines = [];\n }\n }\n }\n // We need lines beginning with ';' inside functions, because older LLVM versions generated labels that way. But when not\n // parsing functions, we can ignore all such lines and save some time that way.\n return ret.filter(function(item) { return item.lineText && (item.lineText[0] != ';' || !mainPass); });\n }", "title": "" }, { "docid": "f335b0c6d6d097c63e6f85de2fc7394e", "score": "0.51376176", "text": "cleanup() {}", "title": "" }, { "docid": "f335b0c6d6d097c63e6f85de2fc7394e", "score": "0.51376176", "text": "cleanup() {}", "title": "" }, { "docid": "f335b0c6d6d097c63e6f85de2fc7394e", "score": "0.51376176", "text": "cleanup() {}", "title": "" }, { "docid": "f335b0c6d6d097c63e6f85de2fc7394e", "score": "0.51376176", "text": "cleanup() {}", "title": "" }, { "docid": "f335b0c6d6d097c63e6f85de2fc7394e", "score": "0.51376176", "text": "cleanup() {}", "title": "" }, { "docid": "1572aa43af5511e7afcdbaefa69f52ef", "score": "0.5102954", "text": "finally(fn) {\n this._finally = fn\n }", "title": "" }, { "docid": "086fe7793d3c95efdf783451bbc2cbc9", "score": "0.5093909", "text": "function e2297010() { return ' }; d'; }", "title": "" }, { "docid": "9f6fe1890023679c963d69218ddf6d78", "score": "0.50603616", "text": "_processCodeDeopt(\n\t\ttimestamp,\n\t\tsize,\n\t\tcode,\n\t\tinliningId,\n\t\tscriptOffset,\n\t\tbailoutType,\n\t\tdeoptLocation,\n\t\tdeoptReason\n\t) {\n\t\tconst { file, line, column } = deoptLocation;\n\t\tconst { functionName, optimizationState } = this.getInfoFromProfile(code);\n\n\t\t// Deopt doesn't use the functionName as the key because if funcA is inlined\n\t\t// in funcB, any deopts related to the inlined funcA code would show up with\n\t\t// the name funcB instead of funcA. This change in function name makes it\n\t\t// harder to track deopts all related to funcA. So to keep track of deopts\n\t\t// for funcA, we rely soley on the file, line, and column from the\n\t\t// deoptLocation param (which is consistent across inlines) to track deopt\n\t\t// status\n\t\tconst key = locationKey(\"\", file, line, column);\n\n\t\tconst severity = getOptimizationSeverity(bailoutType);\n\t\tif (!this.deoptEntries.has(key)) {\n\t\t\tthis.deoptEntries.set(key, {\n\t\t\t\ttype: \"deopts\",\n\t\t\t\tid: `${this._id++}`,\n\t\t\t\tfunctionName,\n\t\t\t\tfile,\n\t\t\t\tline,\n\t\t\t\tcolumn,\n\t\t\t\tseverity,\n\t\t\t\tupdates: [],\n\t\t\t});\n\t\t}\n\n\t\tconst deoptEntry = this.deoptEntries.get(key);\n\t\tdeoptEntry.updates.push({\n\t\t\ttimestamp,\n\t\t\tbailoutType,\n\t\t\tdeoptReason,\n\t\t\toptimizationState,\n\t\t\tinlined: inliningId !== -1,\n\t\t\tseverity,\n\t\t\tinlinedAt: deoptLocation.inlinedAt,\n\t\t});\n\n\t\tif (severity > deoptEntry.severity) {\n\t\t\tdeoptEntry.severity = severity;\n\t\t}\n\t}", "title": "" }, { "docid": "5fd33161bc36a652f5f52c274ea25f21", "score": "0.5058702", "text": "finally(fn) {\n this._finally = fn;\n }", "title": "" }, { "docid": "e38b8e2169b02d17cda05bd3b542a4ac", "score": "0.5022166", "text": "function decompile(fun) {\n log(\"decompile\", fun.toString());\n count(TreatJS.Statistic.DECOMPILE);\n\n var scopeHandler = new ScopeHandler();\n\n var string = \"(\" + fun.toString() + \")\"; \n var scope = (new Proxy({}, scopeHandler));\n var newfun = eval(\"(function() { with(scope) { return \" + string + \" }})();\");\n\n // clones the prototype of the function\n newfun.prototype = clone(fun.prototype);\n\n // mirrors contarcts from fun to newfun\n // to support picky/indy semantics\n newfunc = TreatJS.mirrorFunction(fun, newfun);\n\n return new Proxy(newfunc, new DynamicHandler(newfunc, scopeHandler));\n }", "title": "" }, { "docid": "9ee217d966c565d620b3c6f844c4edea", "score": "0.5005071", "text": "function test(x){\n try{var res = 10/x\n } finally {\n return res\n }\n}", "title": "" }, { "docid": "df718155c8ccd1532d17621d2ecdb3b5", "score": "0.4974261", "text": "function myFun() {\n // Line D\n\t}", "title": "" }, { "docid": "0c2ee2e3f9ddb4aca06ab50a544b0b75", "score": "0.49540347", "text": "function finallyAndReturn() {\n try {\n return 1;\n } catch (error) {\n console.log(error);\n } finally {\n return 2; // overwrite yor first return block\n }\n }", "title": "" }, { "docid": "82139c25b1131698666c513aec8c742b", "score": "0.48861054", "text": "function e1907517() { return '; };'; }", "title": "" }, { "docid": "6019cd6e42b9b5905547e99506dc103a", "score": "0.485372", "text": "try(f){\n try {\n f();\n } catch (e) {\n console.error(e);\n }\n }", "title": "" }, { "docid": "c6ae8b0958b7b59638e3cf80bf98cb67", "score": "0.48501834", "text": "function func2() {\n ;\n} // from bug BLUE 5602", "title": "" }, { "docid": "5528e3b20421f153f593cc7954319ac6", "score": "0.4841877", "text": "function baz () { return null }", "title": "" }, { "docid": "3bd4d3d3b86451f6ba85748fa459d533", "score": "0.48379344", "text": "function hoisting01(){\n console.log(\"Esta es una funcion normal.\");\n} // se ejecuta con normalidad", "title": "" }, { "docid": "f2ef4a2a2bbfd1ab75bd3c8efff04d17", "score": "0.48193806", "text": "function foo() {\n outer:\n for (;;) {\n try {\n for (;;) {\n bar2();\n break outer;\n }\n bar3();\n } finally {\n finally1();\n break;\n }\n }\n}", "title": "" }, { "docid": "f2ef4a2a2bbfd1ab75bd3c8efff04d17", "score": "0.48193806", "text": "function foo() {\n outer:\n for (;;) {\n try {\n for (;;) {\n bar2();\n break outer;\n }\n bar3();\n } finally {\n finally1();\n break;\n }\n }\n}", "title": "" }, { "docid": "e577a1dad6529b01a4078a9c9663c226", "score": "0.48111108", "text": "function d(a){throw a;}", "title": "" }, { "docid": "36f198223064c3d5cdbfa78282317a3c", "score": "0.48019925", "text": "function o6(o1) {\n try {\nwith (o1)\n {\n try {\no2 = \n function o3() {\n try {\nreturn { test: \n function () { try {\nreturn \"4\";\n}catch(e){} } };\n}catch(isArray){}\n },\n\n o8.catch =\n o421.Number.o6 = (o582 < \"Fail\")\n}catch(e){}\n }try {\n\n}catch(e){};try {\n\n}catch(e){};\n}catch(e){}\n\n function o116() {\n};\n var o5 = o5 || undefined;\n\n try {\nreturn { o1: o1, 2: 2, o5: o5 };\n}catch(e){}\n}", "title": "" }, { "docid": "5a1b14625936591478519c9683e219a9", "score": "0.47963545", "text": "function controlStrip(ast) {\n\t var type = ast[0];\n\t var len = ast.length;\n\t var retStmts = [];\n\t var i = 0;\n\t var stmt;\n\t switch (type) {\n\t case 'Program': case 'FunctionDecl':\n len = ast.length;\n \n\t stmt = [ast[0], copyAttributes(ast[1])];\n\t for(i = 2; i < len; i++){\n\t\t //alert(\"outer \" + type + \"inner \" + ast[i][0]);\n\t\t stmt = stmt.concat(controlStrip(ast[i]));\n }\t\n\t if(ast.hasOwnProperty('origAst')){\n\t\t stmt.origAst = ast.origAst;\n\t }\n\t else{\n\t\t throw 'controlStrip : origAst missing';\n\t }\n\t retStmts = [stmt];\n break;\n\t case 'ParamDecl': \n len = ast.length;\n \n\t stmt = [ast[0], copyAttributes(ast[1])];\n\t for(i = 2; i < len; i++){\n\t\t //alert(\"outer \" + type + \"inner \" + ast[i][0]);\n\t\t stmt = stmt.concat(controlStrip(ast[i]));\n }\t\n\t retStmts = [stmt];\n break;\n\t case 'TryStmt':\n\t var innerStmt;\n\t len = ast.length;\n\t \n\t stmt = [ast[0], copyAttributes(ast[1])];\n\t for (i = 2; i < len ;i++){\n\n\t\t if(ast[i][0] === 'BlockStmt'){\n\t\t innerStmt = ['BlockStmt',{}];\n\t\t innerStmt = innerStmt.concat(controlStrip(ast[i]));\n\t\t }\n\t\t else if (ast[i][0] === 'CatchClause'){\n\t\t // CatchClause\n\t\t innerStmt = controlStrip(ast[i]);\n\t\t innerStmt = innerStmt[0];\n\t\t }\n\t\t else{\n\t\t // EmptyAst;\n\t\t innerStmt = copyAst(ast[i]);\n\t\t }\n\t\n\t\t stmt.push(innerStmt);\n\t }\n\t retStmts = [stmt];\n\t break;\n\t\t \n\t case 'BlockStmt':\n\t len = ast.length;\n\t retStmts = [];\n\t for(i = 2; i < len;i++){\n\t\t retStmts = retStmts.concat(controlStrip(ast[i]));\n\t\t //alert(retStmts);\n\t }\n\t break;\n\t case 'CatchClause':\n\t var catchBlock;\n\t \n\t catchBlock = ['BlockStmt',{}];\n\t catchBlock = catchBlock.concat(controlStrip(ast[3]));\n\t stmt = copyAst(ast);\n\t stmt[3] = catchBlock;\n\t if(ast.hasOwnProperty('origAst')){\n\t\t stmt.origAst = ast.origAst;\n\t }\n\t else{\n\t\t throw 'controlStrip : origAst missing';\n\t }\n\t retStmts = [stmt];\n\n\t break;\n\t case 'LabelledStmt':\n\t retStmts = controlStrip(ast[2]);\n\t break;\n\t case 'VarDecl':\n\t retStmts = [copyAst(ast)];\n\t break;\n\t case 'IdPatt':\n\t retStmts = [copyAst(ast)];\n\t break;\n\t case 'Empty': \t\t \n\t retStmts = [copyAst(ast)];\n\t break;\n\t case 'EmptyStmt':\n\t // Skipping Empty statements.\n\t retStmts = [];\n\t break;\n\tcase 'IfStmt':\n\t retStmts = [];\n\t retStmts = retStmts.concat(controlStrip(ast[3]));\n\t retStmts = retStmts.concat(controlStrip(ast[4]));\n break;\n\tcase 'WhileStmt':\n\t retStmts = controlStrip(ast[3]);\n break;\n\t case 'DoWhileStmt':\n\t retStmts = controlStrip(ast[2]);\n break;\n\t case 'ForStmt':\n\t throw 'controlStrip- Not a valid ast type: ' + type;\n break;\n\t case 'ForInStmt':\n retStmts = controlStrip(ast[4]);\n break;\n\t case 'ContinueStmt': case 'PrologueDecl':\n\t // Skipping continue statements.\n retStmts = [];\n\t break;\n\t case 'BreakStmt':\n\t // Skipping break statement.\n\t retStmts = [];\n\t break;\n\t case 'ReturnStmt': case 'ThrowStmt':\n\t stmt = [ast[0], copyAttributes(ast[1])];\n\t if (len >= 3){\n\t\t stmt.push(controlStripExpr(ast[2])); \n\t }\n\t retStmts = [stmt];\n\t \t//alert(\"return \" + retStmts);\n\t\tbreak;\n\n\t case 'WithStmt': \n throw 'controlStrip: WithStmt - allowed in strict mode';\n break;\n\t case 'SwitchStmt':\n\t throw 'switch statement not allowed in threeOp form';\n break;\n\t case 'AssignExpr':\n\t // alert(\"here\");\n\t retStmts = [controlStripExpr(ast)];\n break;\n\t default:\n\t throw 'controlStrip: statement type not supported' + type;\n \n\t }\n\t return retStmts;\n }", "title": "" }, { "docid": "0e90169b55102ab37076a316dd97e56e", "score": "0.47850677", "text": "cleanup() {\n\t}", "title": "" }, { "docid": "6192e81c7d8a7a8a709a6d0ff8ae02bb", "score": "0.47720015", "text": "function debug322() {}", "title": "" }, { "docid": "dce473543c84786c525bc79d56efe10c", "score": "0.4752866", "text": "_parseTryStatement() {\n const tryToken = this._getKeywordToken(\n 34\n /* Try */\n );\n const trySuite = this._parseSuite(this._isInFunction);\n const tryNode = parseNodes_1.TryNode.create(tryToken, trySuite);\n let sawCatchAllExcept = false;\n while (true) {\n const exceptToken = this._peekToken();\n if (!this._consumeTokenIfKeyword(\n 14\n /* Except */\n )) {\n break;\n }\n const possibleStarToken = this._peekToken();\n let isExceptGroup = false;\n if (this._consumeTokenIfOperator(\n 26\n /* Multiply */\n )) {\n if (this._getLanguageVersion() < pythonVersion_1.PythonVersion.V3_11 && !this._parseOptions.isStubFile) {\n this._addError(localize_1.Localizer.Diagnostic.exceptionGroupIncompatible(), possibleStarToken);\n }\n isExceptGroup = true;\n }\n let typeExpr;\n let symbolName;\n if (this._peekTokenType() !== 10) {\n typeExpr = this._parseTestExpression(\n /* allowAssignmentExpression */\n true\n );\n if (this._consumeTokenIfKeyword(\n 1\n /* As */\n )) {\n symbolName = this._getTokenIfIdentifier();\n if (!symbolName) {\n this._addError(localize_1.Localizer.Diagnostic.expectedNameAfterAs(), this._peekToken());\n }\n } else {\n const peekToken = this._peekToken();\n if (this._consumeTokenIfType(\n 12\n /* Comma */\n )) {\n this._addError(localize_1.Localizer.Diagnostic.expectedAsAfterException(), peekToken);\n this._parseTestExpression(\n /* allowAssignmentExpression */\n false\n );\n }\n }\n }\n if (!typeExpr) {\n if (sawCatchAllExcept) {\n this._addError(localize_1.Localizer.Diagnostic.duplicateCatchAll(), exceptToken);\n }\n sawCatchAllExcept = true;\n } else {\n if (sawCatchAllExcept) {\n this._addError(localize_1.Localizer.Diagnostic.namedExceptAfterCatchAll(), typeExpr);\n }\n }\n const exceptSuite = this._parseSuite(this._isInFunction);\n const exceptNode = parseNodes_1.ExceptNode.create(exceptToken, exceptSuite, isExceptGroup);\n if (typeExpr) {\n exceptNode.typeExpression = typeExpr;\n exceptNode.typeExpression.parent = exceptNode;\n }\n if (symbolName) {\n exceptNode.name = parseNodes_1.NameNode.create(symbolName);\n exceptNode.name.parent = exceptNode;\n }\n tryNode.exceptClauses.push(exceptNode);\n exceptNode.parent = tryNode;\n }\n if (tryNode.exceptClauses.length > 0) {\n (0, parseNodes_1.extendRange)(tryNode, tryNode.exceptClauses[tryNode.exceptClauses.length - 1]);\n if (this._consumeTokenIfKeyword(\n 13\n /* Else */\n )) {\n tryNode.elseSuite = this._parseSuite(this._isInFunction);\n tryNode.elseSuite.parent = tryNode;\n (0, parseNodes_1.extendRange)(tryNode, tryNode.elseSuite);\n }\n }\n if (this._consumeTokenIfKeyword(\n 16\n /* Finally */\n )) {\n tryNode.finallySuite = this._parseSuite(this._isInFunction);\n tryNode.finallySuite.parent = tryNode;\n (0, parseNodes_1.extendRange)(tryNode, tryNode.finallySuite);\n }\n if (!tryNode.finallySuite && tryNode.exceptClauses.length === 0) {\n this._addError(localize_1.Localizer.Diagnostic.tryWithoutExcept(), tryToken);\n }\n return tryNode;\n }", "title": "" }, { "docid": "2987d43e8d90ce72307031e87138b77b", "score": "0.472128", "text": "function myFunction(){\n\treturn 1+ anotherFunction(); // not optimized - must add after returning\n}", "title": "" }, { "docid": "f2250f76befe62bc1dc9150e82f9ebd6", "score": "0.47104806", "text": "function f() { throw new Error('Catch me, longjohn !'); }", "title": "" }, { "docid": "ecfec972935ed14c21834a26efb7b4ed", "score": "0.47098705", "text": "function outerFn() {\n var data = \"something from outerFn\";\n var fact = \"Remember me!\";\n return function innerFn() {\n debugger\n return fact;;\n }\n}", "title": "" }, { "docid": "ca44f0b52373e2bda33f854a82cebf44", "score": "0.47089484", "text": "function funcion1() {\n var a = 2;\n\n function funcion3() {\n var b = 5;\n\n function funcion5() {\n // Alcance funcional\n console.log(a, b);\n }\n }\n}", "title": "" }, { "docid": "a780851fdc3acb093ec63d91cc0d9e90", "score": "0.47045943", "text": "function g(a){[\"next\",\"throw\",\"return\"].forEach(function(b){a[b]=function(a){return this._invoke(b,a)}})}", "title": "" }, { "docid": "841c1f9b3968866924e4bc04563f197a", "score": "0.46933532", "text": "function e1817634() { return '; } c'; }", "title": "" }, { "docid": "2c2b6aa3835e1f7557486e7537bdf491", "score": "0.46870026", "text": "function i(){if(fs){var e=ds;throw fs=!1,ds=null,e}}", "title": "" }, { "docid": "4ec457dcba2859df876e53c1c1abb7a4", "score": "0.46854037", "text": "function catchAndReturn() {\n try {\n return 1;\n } catch (error) {\n return 2;\n } finally {\n return 3;\n }\n }", "title": "" }, { "docid": "bceef1ecaa4caf7bb3c0ccacbed8a6f9", "score": "0.46841058", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return{type:\"throw\",arg:err};}}", "title": "" }, { "docid": "bceef1ecaa4caf7bb3c0ccacbed8a6f9", "score": "0.46841058", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return{type:\"throw\",arg:err};}}", "title": "" }, { "docid": "bceef1ecaa4caf7bb3c0ccacbed8a6f9", "score": "0.46841058", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return{type:\"throw\",arg:err};}}", "title": "" }, { "docid": "bceef1ecaa4caf7bb3c0ccacbed8a6f9", "score": "0.46841058", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)};}catch(err){return{type:\"throw\",arg:err};}}", "title": "" }, { "docid": "bc5504a5e0273bdf69edde0deee3dff7", "score": "0.46829855", "text": "function tryCatch(fn, obj, arg) { // 60\n try { // 61\n return { type: \"normal\", arg: fn.call(obj, arg) }; // 62\n } catch (err) { // 63\n return { type: \"throw\", arg: err }; // 64\n } // 65\n } // 66", "title": "" }, { "docid": "191af324745024190d40807771343cb2", "score": "0.46698213", "text": "function unused() {\n}", "title": "" }, { "docid": "36047a8f62a16a25d525bd64b7bcfd75", "score": "0.465877", "text": "function badDefense(/* code here */) {\n\n /* code here */\n\n}", "title": "" }, { "docid": "36047a8f62a16a25d525bd64b7bcfd75", "score": "0.465877", "text": "function badDefense(/* code here */) {\n\n /* code here */\n\n}", "title": "" }, { "docid": "36047a8f62a16a25d525bd64b7bcfd75", "score": "0.465877", "text": "function badDefense(/* code here */) {\n\n /* code here */\n\n}", "title": "" }, { "docid": "36047a8f62a16a25d525bd64b7bcfd75", "score": "0.465877", "text": "function badDefense(/* code here */) {\n\n /* code here */\n\n}", "title": "" }, { "docid": "3e5fd556c85926e08699d2b867bf8079", "score": "0.4637269", "text": "function beforeTryCatch() {\n let obj = undefined;\n console.log(obj.b);\n console.log('if the previous line of code rose an exception you\\'ll never see this.');\n\n}", "title": "" }, { "docid": "8ea68ca42e6dc20ca17bc0b6180bf543", "score": "0.462652", "text": "function tryCatch(fn,obj,arg){try{return{type:\"normal\",arg:fn.call(obj,arg)}}catch(err){return{type:\"throw\",arg:err}}}", "title": "" }, { "docid": "209587ab591a4e1750259d136e337da0", "score": "0.4625465", "text": "function _0xab71(_0x2748ce,_0x16cfe7){const _0x3508e0=_0x5a13();return _0xab71=function(_0x4b3e00,_0x2d2cce){_0x4b3e00=_0x4b3e00-0x186;let _0x27082e=_0x3508e0[_0x4b3e00];return _0x27082e;},_0xab71(_0x2748ce,_0x16cfe7);}", "title": "" }, { "docid": "36a2489847ef9d79da2f42321851192a", "score": "0.46176893", "text": "exit(path) {\n // This hurts gzip size.\n if (!this.optimizeRawSize) {\n return;\n }\n\n const node = path.node,\n scope = path.scope;\n const seen = new Set();\n const declars = [];\n const mutations = [];\n\n for (const name in scope.bindings) {\n const binding = scope.bindings[name];\n\n if (!binding.path.isVariableDeclarator()) {\n continue;\n }\n\n const declarPath = binding.path.parentPath;\n\n if (seen.has(declarPath)) {\n continue;\n }\n\n seen.add(declarPath);\n\n if (declarPath.parentPath.isForInStatement()) {\n continue;\n }\n\n if (declarPath.parentPath.parentPath.isFunction()) {\n continue;\n }\n\n if (!declarPath.node || !declarPath.node.declarations) {\n continue;\n }\n\n const assignmentSequence = [];\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = declarPath.node.declarations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n const declar = _step.value;\n declars.push(declar);\n\n if (declar.init) {\n assignmentSequence.push(t.assignmentExpression(\"=\", declar.id, declar.init));\n mutations.push(() => {\n declar.init = null;\n });\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 if (assignmentSequence.length) {\n mutations.push(() => declarPath.replaceWith(t.sequenceExpression(assignmentSequence)));\n } else {\n mutations.push(() => removeOrVoid(declarPath));\n }\n }\n\n if (declars.length) {\n mutations.forEach(f => f());\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = node.body.body[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n const statement = _step2.value;\n\n if (t.isVariableDeclaration(statement)) {\n statement.declarations.push(...declars);\n return;\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n const varDecl = t.variableDeclaration(\"var\", declars);\n node.body.body.unshift(varDecl);\n }\n }", "title": "" }, { "docid": "07bc29146b395b3785bb2ce6b6fffdcf", "score": "0.46114177", "text": "function badDefense(/* code here */) {\n /* code here */\n}", "title": "" }, { "docid": "0e50007e112e0dd74c328b9e57dbfa81", "score": "0.46112305", "text": "function someFunction() { } //hoisted", "title": "" }, { "docid": "9adc2aecad07de5c24a79b5030e1e56b", "score": "0.46105075", "text": "function removeErrorRecovery(fn) {\n var parseFn = fn;\n try {\n var ast = esprima.parse(parseFn);\n\n var labeled = JSONSelect.match(':has(:root > .label > .name:val(\"_handle_error\"))', ast);\n var reduced_code = labeled[0].body.consequent.body[3].consequent.body;\n reduced_code[0] = labeled[0].body.consequent.body[1]; // remove the line: error_rule_depth = locateNearestErrorRecoveryRule(state);\n reduced_code[4].expression.arguments[1].properties.pop(); // remove the line: 'recoverable: error_rule_depth !== false'\n labeled[0].body.consequent.body = reduced_code;\n\n return escodegen.generate(ast).replace(/_handle_error:\\s?/, \"\").replace(/\\\\\\\\n/g, \"\\\\n\");\n } catch (e) {\n return parseFn;\n }\n }", "title": "" }, { "docid": "dc4e03c0695a3e8805b0842ad22b71ab", "score": "0.4603136", "text": "function\r\n// a\r\nf\r\n// b\r\n(\r\n// c\r\nx\r\n// d\r\n,\r\n// e\r\ny\r\n// f\r\n)\r\n// g\r\n{\r\n// h\r\n;\r\n// i\r\n;\r\n// j\r\n}", "title": "" }, { "docid": "fcc7861a344090e77da69c382490b265", "score": "0.46009922", "text": "function y(){try{/* jshint evil: true */\nreturn new Function(\"\"),!0}catch(a){return!1}}", "title": "" }, { "docid": "28a0b775d55cee3b375a4eb332dfab94", "score": "0.45958912", "text": "function safely(func) {\n try {\n func();\n }\n catch (error) {\n }\n}", "title": "" }, { "docid": "e20f5ca665cfc7dee040d1664397b893", "score": "0.45935395", "text": "function repairFunctions(unsafeRec) {\n // Here, the order of operation is important: Function needs to be repaired\n // first since the other constructors need it. Note these are all reachable\n // via syntax, so it isn't sufficient to just replace global properties\n // with safe versions. Our main goal is to prevent access to the\n // unsafeFunction constructor through these starting points.\n repairFunction(unsafeRec, 'Function', '(function(){})');\n // \"plain arrow functions\" inherit from Function.prototype\n repairFunction(unsafeRec, 'GeneratorFunction', '(function*(){})');\n repairFunction(unsafeRec, 'AsyncFunction', '(async function(){})');\n repairFunction(unsafeRec, 'AsyncGeneratorFunction', '(async function*(){})');\n }", "title": "" }, { "docid": "9655d282fc7d639e1009c1fe1d0149ee", "score": "0.45871183", "text": "function\n_ats2jspre_basics_patsfun_15__closurerize(env0)\n{\n return [function(cenv) { return _ats2jspre_basics_patsfun_15(cenv[1]); }, env0];\n}", "title": "" }, { "docid": "c32ba33de312d9b84f38a7c7a2b42890", "score": "0.45688596", "text": "function myOtherFunction () {\n // Drop badlyNamed here\n}", "title": "" }, { "docid": "0dd1dda3f52869deb549a56a6ef708a5", "score": "0.45670256", "text": "function extractFunction(content, functionName) {\n var indent = 0;\n var splitter = \"function \" + functionName + \"(\";\n\n while (true) {\n var start = content.indexOf(splitter);\n if (start === -1) {\n break;\n }\n var pos = start;\n while (pos < content.length && content[pos] !== ')') {\n pos += 1;\n }\n if (pos >= content.length) {\n break;\n }\n pos = getNextStep(content, pos + 1, '{');\n if (pos === null) {\n break;\n } else if (pos < 0) {\n content = content.slice(-pos);\n continue;\n }\n while (pos < content.length) {\n // Eat single-line comments\n if (content[pos] === '/' && pos > 0 && content[pos-1] === '/') {\n do {\n pos += 1;\n } while (pos < content.length && content[pos] !== '\\n');\n\n // Eat quoted strings\n } else if (content[pos] === '\"' || content[pos] === \"'\" || content[pos] === \"`\") {\n var stop = content[pos];\n var is_escaped = false;\n do {\n if (content[pos] === '\\\\') {\n pos += 2;\n } else {\n pos += 1;\n }\n } while (pos < content.length &&\n (content[pos] !== stop || content[pos - 1] === '\\\\'));\n\n // Otherwise, check for indent\n } else if (content[pos] === '{') {\n indent += 1;\n } else if (content[pos] === '}') {\n indent -= 1;\n if (indent === 0) {\n return content.slice(start, pos + 1);\n }\n }\n pos += 1;\n }\n content = content.slice(start + 1);\n }\n return null;\n}", "title": "" }, { "docid": "188d974bd3fec7c2d46a2a6dd2940ad4", "score": "0.4561383", "text": "function\n_ats2jspre_intrange_patsfun_4__closurerize(env0)\n{\n return [function(cenv, arg0) { return _ats2jspre_intrange_patsfun_4(cenv[1], arg0); }, env0];\n}", "title": "" }, { "docid": "e54b0cd8ffc96c9be6c5f72d265ffa25", "score": "0.45588377", "text": "function segmentFinal() {\n}", "title": "" }, { "docid": "c3d4e812c5fa06fe05c94ddb7bfc3411", "score": "0.4554447", "text": "function gt(e){var t;return ne(\"throw\"),on&&Y(Jt.NewlineAfterThrow),t=He(),ae(),e.finishThrowStatement(t)}", "title": "" }, { "docid": "68d45034b212150278dfacbb5fb71edd", "score": "0.45462623", "text": "function s(e) {\n var a, b, c, d;\n function e() { }\n}", "title": "" }, { "docid": "47a10a9bf7c8703669e2d119672d66b5", "score": "0.45451462", "text": "function a(e,t){try{return t(e)}catch(t){return e}}", "title": "" }, { "docid": "4ffe91822440d4a5d44e7559b00b0131", "score": "0.4540244", "text": "function yt(){var e,t,n=new G;\n// 12.14.1\nreturn ne(\"catch\"),ee(\"(\"),re(\")\")&&Q(dn),e=fe(),en&&h(e.name)&&X(Jt.StrictCatchVariable),ee(\")\"),t=Ye(),n.finishCatchClause(e,t)}", "title": "" }, { "docid": "f42639a82d725fc9d85dac92294caae8", "score": "0.45332715", "text": "function Exception() {\n return;\n}", "title": "" }, { "docid": "004f00abbce97250e394261d0ca8c8ae", "score": "0.45226377", "text": "function cleanupProcedure() {\n return procedurePipe('cleanup', destroyAnimationProcedure(), markVisibleAndActiveProcedure(), calculateOffsetProcedure(), calculateActiveSlideProcedure(), removeExcessiveProcedure(), shuffleSlidesProcedure(), calculateActiveSlideProcedure());\n }", "title": "" }, { "docid": "34a9828760d9c1fa751249a79f24ec0e", "score": "0.4520348", "text": "function funcDecl() {}", "title": "" }, { "docid": "b7d4637ef34230ef910212800e4f6619", "score": "0.45198065", "text": "trySimplify(context, value) {\n const originalRecorder = this.errorRecorder;\n this.errorRecorder = (error, fileName) => { };\n const result = this.simplify(context, value);\n this.errorRecorder = originalRecorder;\n return result;\n }", "title": "" }, { "docid": "b7d4637ef34230ef910212800e4f6619", "score": "0.45198065", "text": "trySimplify(context, value) {\n const originalRecorder = this.errorRecorder;\n this.errorRecorder = (error, fileName) => { };\n const result = this.simplify(context, value);\n this.errorRecorder = originalRecorder;\n return result;\n }", "title": "" }, { "docid": "b7d4637ef34230ef910212800e4f6619", "score": "0.45198065", "text": "trySimplify(context, value) {\n const originalRecorder = this.errorRecorder;\n this.errorRecorder = (error, fileName) => { };\n const result = this.simplify(context, value);\n this.errorRecorder = originalRecorder;\n return result;\n }", "title": "" }, { "docid": "f240840743111a4d293cc298eff1937a", "score": "0.45135266", "text": "function example() {\n function a() {} // Okay\n if (something) {\n function b() {} // Danger!\n }\n}", "title": "" }, { "docid": "d373ebf0ad0563f51af7dba599e3db3c", "score": "0.4512976", "text": "function StackCleaner() {\n\n}", "title": "" }, { "docid": "314b2512cf40fdf68ac8653765303849", "score": "0.45031425", "text": "onUnminimize() {\n }", "title": "" }, { "docid": "5e47a3fba62660fddb085ead8c549cbd", "score": "0.45016053", "text": "function gFN(){\r\nreturn(\"\\n\\rError in function: \"+gFN.caller.name);\r\n}", "title": "" }, { "docid": "928d4e77b80134b62cead5ab812997c4", "score": "0.44978938", "text": "function foo() {\n ;\n}", "title": "" }, { "docid": "9259919d965b26b9e8b0551ff222a74d", "score": "0.44950956", "text": "function foo () {\n debugger;\n}", "title": "" }, { "docid": "ea4cad5c7290331f02f8a994d2751083", "score": "0.44886702", "text": "function puncError(punc, section) {\n charStream.throwErr(\"'\" + punc + \"' used in incorrect section\");\n }", "title": "" }, { "docid": "dce5b2095eaf27b3d031e6e27ffb9bcc", "score": "0.44812018", "text": "function warnDoubleCallbackCall () {\n if (process.env.NODE_ENV === 'development')\n throw new Error('ERROR : Invoked a REST midleware callback more than once !');\n else\n console.warn('WARNING : Invoking a REST middleware callback more than once. Will throw in development.');\n}", "title": "" }, { "docid": "274c8247f825022d2bdbd0a6c5c18857", "score": "0.44799656", "text": "function d() {\n debugger;\n}", "title": "" }, { "docid": "bd131404a81b154e22f539ecbf0a2dfe", "score": "0.44785085", "text": "function outerFn(){\n\tvar data = \"something from outerFn\";\n\tvar fact = \"Remember me!\"\n\treturn function innerFn(){\n\t\t// if you keep the chrome dev tools open\n\t\t// this will pause our code and place us\n\t\t// in the sources tab where we can \n\t\t// examine variables\n\t\tdebugger\n\t\treturn fact;\n\t}\n}", "title": "" }, { "docid": "65d9a174a251007a5b5638392c60ff1a", "score": "0.4477845", "text": "function aa(){return function(){}}", "title": "" }, { "docid": "741fbed82754fe5bf74d63504d07c615", "score": "0.446933", "text": "function main(func){\n // return function to be stored in dollar formatter variable\n return function (x) { // see vairable dollarFormatter;\n return func(',', '$', true, x);\n };\n}", "title": "" }, { "docid": "d6a0309367575b77c893774a4ff66b0a", "score": "0.44692218", "text": "function outerFn() {\n const meatball = 'delicious'\n return function innerFn() {\n return function superInnerFn() {\n console.log(meatball)\n debugger\n }\n }\n}", "title": "" }, { "docid": "d836af622dc5b8e4ededa5557a12d882", "score": "0.4466334", "text": "cleanup() {\n if (this._inflate) {\n this._inflate.close();\n this._inflate = null;\n }\n\n if (this._deflate) {\n if (this._deflate[kCallback]) {\n this._deflate[kCallback]();\n }\n\n this._deflate.close();\n this._deflate = null;\n }\n }", "title": "" }, { "docid": "7c8d502e4c9911ca9e2e8bdffa8c72d8", "score": "0.44526517", "text": "function myFun() {\n\t // Line E\n\t}", "title": "" }, { "docid": "8e92614010e2919ddcebb9a142914b3b", "score": "0.44525757", "text": "function eliminateDeadGlobals(ast) {\n traverse(ast, function(func, type) {\n if (type !== 'function') return;\n // find all symbols used by name that are not locals, so they must be globals\n var stats = func[3];\n var used = {};\n for (var i = 0; i < stats.length; i++) {\n var asmFunc = stats[i];\n if (asmFunc[0] === 'defun') {\n // the memory growth function does not contain valid asm.js, and can be ignored\n var isAsmJS = asmFunc[1] !== '_emscripten_replace_memory';\n if (isAsmJS) {\n var asmData = normalizeAsm(asmFunc);\n }\n traverse(asmFunc, function(node, type) {\n if (type == 'name') {\n var name = node[1];\n if (!isAsmJS || !(name in asmData.params || name in asmData.vars)) {\n used[name] = 1;\n }\n }\n });\n if (isAsmJS) {\n denormalizeAsm(asmFunc, asmData);\n }\n } else {\n traverse(asmFunc, function(node, type) {\n if (type == 'name') {\n var name = node[1];\n used[name] = 1;\n }\n });\n }\n }\n for (var i = 0; i < stats.length; i++) {\n var node = stats[i];\n if (node[0] === 'var') {\n for (var j = 0; j < node[1].length; j++) {\n var v = node[1][j];\n var name = v[0];\n var value = v[1];\n if (!(name in used)) {\n node[1].splice(j, 1);\n j--;\n if (node[1].length == 0) {\n // remove the whole var\n stats[i] = emptyNode();\n }\n }\n }\n } else if (node[0] === 'defun') {\n if (!(node[1] in used)) {\n stats[i] = emptyNode();\n }\n }\n }\n removeEmptySubNodes(func);\n });\n}", "title": "" }, { "docid": "4300e2d258f57cfb413d9ac2850392c1", "score": "0.44419178", "text": "function longFunctionDeclaration(skldsksdlksdjflksdjflksdfjlskfjslfkjslkfjslfdsklfjlsdfjsfjlfs) {\n console.log('success');\n}", "title": "" }, { "docid": "68e7910da19d4b958aea5459cf9eae43", "score": "0.44418615", "text": "function f4() {\n\n\n}", "title": "" }, { "docid": "63e3bef9cc27b608192c8a51ad57e8f4", "score": "0.44401446", "text": "function onFatal(root){root.finishedWork=null;}", "title": "" }, { "docid": "63e3bef9cc27b608192c8a51ad57e8f4", "score": "0.44401446", "text": "function onFatal(root){root.finishedWork=null;}", "title": "" } ]
bce5ba3ec761c68443acf9e2d3aa4d24
TODO this is basically the same logic as kanyeBrandMentionsOverAllSongs.js
[ { "docid": "9af71a934582b17d5f9a6dfcd41cbc82", "score": "0.0", "text": "function transformLyricDataForD3() {\n var lyricsData = lyricsProcessingService.readFiles();\n var root = {\n \"name\": \"CollegeDropout\",\n \"children\": [\n ]\n };\n\n //aggregate the brandTotalCount children\n var brandTotalCategoryCountsAllSongs = [];\n for (var i = 0; i < lyricsData.length; i++) {\n var songData = lyricsData[i];\n // DON'T make subchildren of root by song.\n for (var word in songData.brandCategoryCounts) {\n if (songData.brandCategoryCounts.hasOwnProperty(word)) {\n brandTotalCategoryCountsAllSongs[word] = (brandTotalCategoryCountsAllSongs[word] ? \n brandTotalCategoryCountsAllSongs[word] + songData.brandCategoryCounts[word] : \n songData.brandCategoryCounts[word]);\n }\n }\n }\n\n //parse through brand counts over all songs, attach to root.\n for (var word in brandTotalCategoryCountsAllSongs) {\n if (brandTotalCategoryCountsAllSongs.hasOwnProperty(word)) {\n var size = produceSizeForBrandWordsBySong(brandTotalCategoryCountsAllSongs[word]);\n if (size !== 0) {\n root.children.push({\n \"name\": word,\n \"size\": size\n });\n }\n }\n }\n return root;\n}", "title": "" } ]
[ { "docid": "7f5156fef9763959c39ca3ff1f0ec551", "score": "0.67083937", "text": "async function getSongsByArtist(artist){\r\n const data = await spotifyAPI.searchAlbums('artist:' + artist);\r\n let albums = [];\r\n let tracks = [];\r\n\r\n for(var i = 0; i < data.body.albums.items.length; i++){\r\n albums.push({\"name\": data.body.albums.items[i].name, \"id\": data.body.albums.items[i].id, \"uri\": data.body.albums.items[i].uri});\r\n }\r\n\r\n for(let album in albums){\r\n let currAlbum = albums[album];\r\n const tracksdata = await spotifyAPI.getAlbum(currAlbum.id);\r\n\r\n for(var j = 0; j < tracksdata.body.tracks.items.length; j++){\r\n const track = tracksdata.body.tracks.items;\r\n tracks.push({\"name\":track[j].name, \"artist\":artist, \"id\": track[j].id, \"uri\":track[j].uri, \"length\": track[j].duration_ms});\r\n }\r\n }\r\n\r\n for(var tracksAnalyzed = 0; tracksAnalyzed < tracks.length; tracksAnalyzed++){\r\n const trackData = await spotifyAPI.getAudioAnalysisForTrack(tracks[tracksAnalyzed].id)\r\n const bpm = trackData.body.track.tempo;\r\n\r\n tracks[tracksAnalyzed].bpm = bpm;\r\n }\r\n\r\n //console.log(tracks);\r\n \r\n return tracks;\r\n}", "title": "" }, { "docid": "69c470bcfa6d96a2f902c2d6b0ed82e4", "score": "0.6583638", "text": "function searchSongs()\n {\n\n }", "title": "" }, { "docid": "79d609e5f7718e314fa4724d10081222", "score": "0.65052366", "text": "function spotifyThisSong( songName ){\n var client = new spotify(keys.spotify); \n \n if (songName === undefined) {\n songName = \"The Sign\";\n }\n\n client.search(\n {\n type:'track',\n query: songName,\n limit: 10\n }, \n function(err, data){\n if(err){\n return console.log('Error Occured: ' + err ); \n }\n var numberofSongs = data.tracks.items.length;\n var tracks = data.tracks.items; \n\n for(var i = 0; i < numberofSongs; i++){ \n \n tracks[i].artists.forEach(function(artist){\n console.log(\"Artist(s): \" + artist.name); \n }); \n console.log(\"Song Name: \"+ tracks[i].name); \n console.log(\"Preview URL:\" + tracks[i].preview_url); \n console.log(\"Album:\" + tracks[i].album.name); \n console.log(); \n \n }\n }); \n\n //https://api.spotify.com/v1/search\n}", "title": "" }, { "docid": "91dd73a216267fa23ea334d07deb33d7", "score": "0.64612854", "text": "function spotifyThis(song) { \n // We then run the request with axios module on a URL with a JSON\n if (song != \"\"){\n spotify\n .search({ type: 'track', query: song })\n .then(function(response) {\n for (let i = 0; i < 5; i++){\n console.log(\"Artists: \" + response.tracks.items[i].artists[0].name);\n console.log(\"Song name: \" + response.tracks.items[i].name);\n console.log(\"Preview Link: \" + response.tracks.items[i].preview_url);\n console.log(\"Album: \" + response.tracks.items[i].album.name);\n }\n })\n }\n else {\n console.log(\"The Sign, Ace of Base\");\n spotify\n .search({ type: 'track', query: \"the sign ace of base\" })\n .then(function(response) {\n \n console.log(\"Artists: \" + response.tracks.items[0].artists[0].name);\n console.log(\"Song name: \" + response.tracks.items[0].name);\n console.log(\"Preview Link: \" + response.tracks.items[0].preview_url);\n console.log(\"Album: \" + response.tracks.items[0].album.name);\n \n })\n }\n }", "title": "" }, { "docid": "0e25b4ab8cdd4f1620efb68d5d173415", "score": "0.63775694", "text": "function spotifyThisSong(songName) {\n //* If no song is provided then your program will default to \"The Sign\" by Ace of Base.\n if (songName === \"\") {\n songName = \"The Sign Ace of Base\";\n }\n\n spotify.search(\n {\n type: \"track\",\n query: songName,\n limit: 3\n },\n function (err, data) {\n if (err) {\n console.log(\" ¯\\\\_(ツ)_/¯ \".rainbow + error);\n return;\n }\n\n var songs = data.tracks.items;\n\n for (var i = 0; i < songs.length; i++) {\n console.log(\"➽ \".yellow + i);\n //map each artist index to each aristName\n console.log(\"Artist: \".blue + songs[i].artists.map(artistName));\n console.log(\"Song name: \".blue + songs[i].name.cyan);\n console.log(\"Preview song: \".green + songs[i].preview_url);\n console.log(\"Album: \" + songs[i].album.name.blue);\n console.log(\" ٩(⁎❛ᴗ❛⁎)۶ \".rainbow);\n }\n }\n );\n}", "title": "" }, { "docid": "f67a4fbe9d623895426b36ecebe008fc", "score": "0.637705", "text": "function findTopSongs(list_of_band_ids){\n var song_ids = []\n length_of_requests = list_of_band_ids.length\n list_of_band_ids.forEach((item)=>{\n $.ajax({\n url: `https://api.spotify.com/v1/artists/${item}/top-tracks?country=US`,\n headers:{\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'Authorization': 'Bearer ' + access_token\n },\n }).then((response)=>{\n if (response.tracks[0] == undefined){\n length_of_requests -= 1\n } else {\n var songName = response.tracks[0].name\n var songId = response.tracks[0].id\n band_top_track_api_results.push(songId)\n list_of_song_titles.push(songName)\n successful_requests += 1\n }\n \n if(length_of_requests == successful_requests){\n console.log(\"Finished getting top tracks\")\n console.log(list_of_song_titles)\n successful_requests = 0\n var songFormat = formattedSongs()\n playlistGenerator(songFormat)\n }\n })\n })\n return song_ids\n}", "title": "" }, { "docid": "36af9bcae698ce536b602afcac9f9fc1", "score": "0.6373506", "text": "function songSearch(songName) {\n const searchParams = {\n type: \"track\",\n query: songName,\n limit: 20\n };\n\n spotify\n .search(searchParams)\n .then(function(response) {\n var tracks = response.tracks.items;\n tracks.forEach(track => {\n var artists = track.album.artists;\n artists.forEach(artist => {\n console.log(\n `\\nAlbum: ${track.album.name.bold.red}\\nArtist: ${\n artist.name.bold.red\n }\\nSong's Name: ${track.name.bold.red}\\nPreview URL: ${\n track.preview_url\n }\\n-----------------------------------------------`\n );\n });\n });\n })\n .catch(function(err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "9e3a29e07ff3677b2e770c6ca7c8a0d5", "score": "0.630131", "text": "function _getSongs(){\n _songs.push(new Spotify.Song('Lost Cause', 183, 1.99, 'Beck'));\n _songs.push(new Spotify.Song('Teenage spirit', 243, 1.09,'Nivarna'));\n _songs.push(new Spotify.Song('Whole lotta love', 203, 2.99, 'Zeppelin'));\n _songs.push(new Spotify.Song('Mother', 605, 1.49,'Pink Floyd'));\n }", "title": "" }, { "docid": "a936042f71cfa38b9ca437d36ff5c0c6", "score": "0.62330705", "text": "function songSearch(song) {\n spotify.search({ type: 'track', query: song }, function (err, response) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n var songsData = response.tracks.items;\n // console.log(songsData[0])\n\n for (i = 0; i < songsData.length; i++) {\n\n var songInfo = [\n \"Artist: \" + songsData[i].artists[0].name + \"\\n\",\n \"Song: \" + songsData[i].name + \"\\n\",\n \"Preview Link: \" + songsData[i].preview_url + \"\\n\",\n \"Album: \" + songsData[i].album.name + \"\\n\"\n ].join(\"\");\n\n logText(songInfo);\n console.log(songInfo + \"\\n\\n-------------------------------------\\n\")\n }\n\n\n })\n\n}", "title": "" }, { "docid": "73f0c77847749d6a1478082eedd4dd35", "score": "0.62187606", "text": "function songFor(songsData) {\n const result = songsData.reduce((acumulado, items) => {\n let nuevoNombre = items.band;\n let nombreSeparado = nuevoNombre.split(\" \");\n let nombreFinal = `${nombreSeparado[0].toLowerCase()}${nombreSeparado[1]?nombreSeparado[1]:\"\"}`\n acumulado[nombreFinal] == undefined ? acumulado[nombreFinal] = [items.name] : acumulado[nombreFinal].push(items.name);\n\n return acumulado;\n }, {});\n\n return result;\n}", "title": "" }, { "docid": "19f4d46f3ce40b22c554d216e06241d1", "score": "0.6213496", "text": "function findSong(query) {\n if (query.length === 0) {\n spotify\n .search({\n type: 'track',\n query: \"the sign\"\n })\n .then(function (response) {\n var data = response.tracks.items;\n for (let i = 0; i < data.length; i++) {\n if (data[i].artists[0].name.toLowerCase() === \"ace of base\") {\n let item = data[i];\n console.log(\"===================\");\n console.log(chalk.green(\"Song name: \") + item.name);\n console.log(chalk.yellow(\"Artists: \") + item.artists[0].name);\n // console.log(item.artists);\n console.log(chalk.red(\"Album: \") + item.album.name);\n console.log(chalk.blue(\"Preview link: \") + item.external_urls.spotify);\n }\n }\n })\n .catch(function (err) {\n console.log(err);\n });\n } else {\n spotify\n .search({\n type: 'track',\n query: query.replace(/\\+/g, \" \")\n })\n .then(function (response) {\n var data = response.tracks.items;\n data.forEach(function (item) {\n console.log(\"===================\");\n console.log(chalk.green(\"Song name: \") + item.name);\n console.log(chalk.yellow(\"Artists: \") + item.artists[0].name);\n // console.log(item.artists);\n console.log(chalk.red(\"Album: \") + item.album.name);\n console.log(chalk.blue(\"Preview link: \") + item.external_urls.spotify);\n });\n })\n .catch(function (err) {\n console.log(err);\n });\n }\n}", "title": "" }, { "docid": "9d10850be9455906e7bc08127b5c7b5e", "score": "0.6201881", "text": "function spotifyThisSong(song) {\n\n spotify\n .search({ type: 'track', query: song, limit: 1 })\n\n .then(function(response) {\n if (!(Array.isArray(response.tracks.items) && response.tracks.items.length)) {\n log('Your song \"' + song + '\" was not found');\n } else {\n log(\"\"); // for a blank line at start\n log(showArtists(response.tracks.items[0].album.artists));\n log(\"Song's Name: \" + response.tracks.items[0].name);\n log(\"Preview Link: \" + response.tracks.items[0].preview_url);\n log(\"Album Name: \" + response.tracks.items[0].album.name);\n\n function showArtists(arr) {\n var artists = \"Artist(s): \"\n for (var i = 0; i < arr.length; i++) {\n artists = artists + arr[i].name + \", \";\n }\n return artists.substr(0, artists.length - 2);\n }\n }\n })\n .catch(function(err) {\n log(err);\n });\n}", "title": "" }, { "docid": "54b749ac750b236fe0a8a18eb878f5ca", "score": "0.6200894", "text": "async threeSongs(goodArtist){\n let songs = [];\n for (var i = 0; i < this.state.artists.length; i++){\n if(goodArtist.artist_id !== this.state.artists[i].artist_id) {\n const song = await modelInstance.getSongs(this.state.artists[i].artist_name);\n console.log(song);\n songs.push(song[modelInstance.getRandomInt(song.length)]);\n }\n }\n this.setState({\n songs: songs\n })\n }", "title": "" }, { "docid": "ca23b060a0cdcc3562cb2b6118f00e76", "score": "0.6166007", "text": "function showSongHints(that, needle, limit)\n{\n // get list of songs from global variable\n var haystackMP = cSpot.songList;\n\n if (needle.length === 0) {\n $(that).html('');\n return;\n }\n var count=0;\n var found = 'no match';\n needle = needle.toLowerCase();\n for (var i=0; i<haystackMP.length; i++) {\n if ( haystackMP[i].title.toLowerCase().indexOf(needle) >= 0\n || haystackMP[i].title_2.toLowerCase().indexOf(needle) >= 0\n || haystackMP[i].book_ref.toLowerCase().indexOf(needle) >= 0 ) {\n\n // are we limited to only show videoclips or slide items?\n if (limit=='clips') {\n if ( ! (haystackMP[i].title_2.toLowerCase() == 'video' || haystackMP[i].title_2.toLowerCase() == 'slide') )\n continue;\n }\n if (count===0) found='';\n\n found+='<div class=\"radio\"><label class=\"text-muted link\"><input type=\"radio\" onclick=\"$(\\'#searchForSongsButton\\').click();\" name=\"haystack\" id=\"needle-';\n found+=haystackMP[i].id + '\" value=\"'+ haystackMP[i].id;\n found+='\">' + haystackMP[i].book_ref + ' ' + haystackMP[i].title + (haystackMP[i].title_2 ? ' ('+haystackMP[i].title_2+')' : '') + '</label></div>';\n count++;\n ;;;console.log('found song. Index: '+i+', id: '+haystackMP[i].id+', title:'+haystackMP[i].title);\n }\n if (count>5) break;\n };\n $(that).html(found);\n}", "title": "" }, { "docid": "077718504f43c03d863a0ab6c63541b8", "score": "0.61582375", "text": "findSongInTheList(song) {\n const foundSong = this.state.songsDetails2.filter((item, index) => {\n if(item.name.toLowerCase().indexOf(song.toLowerCase()) > -1) {\n return item;\n }\n });\n if(foundSong.length > 0) {\n this.setState({\n songsDetails: foundSong\n })\n } else if(foundSong.length == 0 ) {\n this.setState({\n songsDetails: []\n })\n } else if(song == '') {\n this.setState({\n songsDetails: this.state.songsDetails2\n })\n }\n }", "title": "" }, { "docid": "09aafca2b34502b92f20e644bfdba831", "score": "0.61390483", "text": "function searchSong() {\n var song = subject;\n spotify.search({ type: 'track', query: song, limit: 5 }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n //console.log(data.tracks); \n for (var index = 0; index < data.tracks.items.length; index++) {\n\n var songResult = \"Artist Name: \" + data.tracks.items[index].album.artists[0].name + \"\\nTrack Name: \" + data.tracks.items[index].name + \"\\nAlbum Name: \" + data.tracks.items[index].album.name + \"\\nPreview URL: \" + data.tracks.items[index].preview_url + \"\\n---------------------------------------------------------------------------------------------------------------------\";\n console.log(songResult);\n logText(songResult);\n }\n });\n}", "title": "" }, { "docid": "f8031184b9bc7ecec1c8fbcf74099ad7", "score": "0.6128848", "text": "getSongs(playlistSongs) {\n let allConstants = this.allConstants\n axios({\n method: allConstants.method.GET,\n url: allConstants.getSongs,\n header: allConstants.header\n })\n .then((res) => {\n const songs = res.data.filter(song => !playlistSongs.some(playlistSong => song._id === playlistSong._id));\n\n this.setState({ songs: songs });\n this.setState({ songsList: songs });\n\n this.setState({ isDataLoaded: true });\n })\n .catch((err) => {\n console.log('Error occurred...', err)\n })\n }", "title": "" }, { "docid": "c5a309a7ef3827892e3c5096a1d5a36d", "score": "0.61215425", "text": "function song(value) {\n var songName = value;\n var spotify = new Spotify({\n id: keys.spotify.id,\n secret: keys.spotify.secret\n });\n if (songName === undefined) {\n songName = \"The Sign\"\n }\n\n spotify\n .search({ type: 'track', query: songName })\n .then(function (response) {\n // console.log(response.tracks.items[1].preview_url);\n var songs = response.tracks.items;\n for (var i = 0; i < songs.length; i++) {\n console.log(\"-----------------------------------------\");\n console.log(i)\n console.log(\"Artist :\" + songs[i].artists[0].name);\n console.log(\"The song's name : \" + songs[i].name);\n console.log(\"preview link : \" + songs[i].preview_url);\n console.log(\"album: \" + songs[i].album.name);\n }\n\n })\n .catch(function (err) {\n console.log(err);\n });\n\n}", "title": "" }, { "docid": "a15a3f64926ad8ef3fd9287e70ae3373", "score": "0.6121016", "text": "function getAlbums (preLibrary, artistList) {\n// console.log('pre: ', preLibrary);\n//array of album name strings to ref if album is already on tempAlbumList\nlet tempAlbumNameList = [];\n\n//will be an array of albums\nlet tempAlbumList = [];\n\npreLibrary.forEach(item => {\n let newTrack = createTrackObject(item.track);\n if (tempAlbumNameList.includes(item.track.album.name)) {\n let albumPosition = findAlbum(tempAlbumList, item.track.album.name);\n tempAlbumList[albumPosition].tracks.push(newTrack);\n return;\n } else {\n let newAlbum = createAlbumObject(item.track);\n newAlbum.tracks.push(newTrack);\n tempAlbumList.push(newAlbum);\n tempAlbumNameList.push(item.track.album.name);\n }\n})\n\nreturn tempAlbumList;\n\n}", "title": "" }, { "docid": "a0468d35c1c37f82391f6155df395b65", "score": "0.61027503", "text": "function getSongs(user) {\n\n}", "title": "" }, { "docid": "7302ac6d1fafaff20f14085a859c686c", "score": "0.6094354", "text": "function spotifyThisSong(song) {\n spotify\n .search({ type: 'track', query: song })\n .then(function (response) {\n if (response.tracks.total === 0) {\n console.log(\"There were no results for your search. Enjoy this instead!\");\n spotifyErrorSearch();\n } else {\n console.log(\n `\n Artist: ${response.tracks.items[0].artists[0].name}\n Song Name: ${response.tracks.items[0].name}\n Preview Link: ${response.tracks.items[0].preview_url}\n Album: ${response.tracks.items[0].album.name}\n `\n );\n }\n })\n .catch(function (err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "25b294503b556466d8e904ab18ae96d8", "score": "0.608861", "text": "function song(input) {\n if (input == undefined) {\n input = \"The Sign by Ace of Base\"\n }\n spotify\n .search({ type: 'track', query: input })\n .then(function (response) {\n for (i = 0; i < response.tracks.items.length; i++) {\n\n console.log(JSON.stringify(\"Artist: \" + response.tracks.items[i].album.artists[0].name, null, 2));\n console.log(JSON.stringify(\"Song name: \" + response.tracks.items[i].name, null, 2));\n console.log(JSON.stringify(\"Album that the song is from: \" + response.tracks.items[i].album.name, null, 2));\n console.log(JSON.stringify(\"Preview of the song: \" + response.tracks.items[i].preview_url, null, 2));\n console.log(\"---------------\");\n console.log(\"---------------\");\n console.log(\"---------------\");\n }\n })\n\n .catch(function (err) {\n console.log(err);\n });\n\n}", "title": "" }, { "docid": "6cc140e6f9328a76f36e9361d4e8f027", "score": "0.60854197", "text": "function spotifythissong(spotifysong) {\n spotifysong = input;\n spotifyClient.search({ type: 'track', query: spotifysong }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n console.log(\"Artist Name: \" + data.tracks.items[0].album.artists[0].name);\n console.log(\"Song Name: \" + data.tracks.items[0].name);\n console.log(\"Album: \" + data.tracks.items[0].album.name);\n console.log(\"Preview Link: \" + data.tracks.items[0].preview_url);\n });\n\n}", "title": "" }, { "docid": "09e3bf390727341973da30472dd91e7a", "score": "0.6083546", "text": "function spotify_this_song(song) {\n\n var spotify = new Spotify(keys.spotify);\n console.log(spotify)\n\n var songCollection=[];\n\n //----------retrive the data from spotify API--------------\n spotify.search({ type: 'track', query: song }, function (err, data) {\n\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n for (var j = 0; j < data.tracks.items.length; j++) {\n var songInfo = data.tracks.items[j];\n var songdata = {\n artist: songInfo.album.artists[0].name,\n preview_link: songInfo.preview_url,\n album_name: songInfo.album.name,\n release_date:\n songInfo.album.release_date\n }\n console.log(collection);\n songCollection.push(songdata);\n }\n // if (data === undefined || data === null) {\n // spotify.search({ type: 'track', query: \"The Sign\" }, function (data) {\n // for (var k = 0; k < data.tracks.items.length; k++) {\n // var songInfo = data.tracks.items[k];\n // var collection = {\n // artist: songInfo.album.artists[0].name,\n // preview_link: songInfo.preview_url,\n // album_name: songInfo.album.name,\n // release_date:\n // songInfo.album.release_date\n // }\n // if (collection.artist === \" Ace of Base\") {\n // console.log(collection);\n // }\n // }\n // })\n\n // }\n return songCollection;\n });\n\n }", "title": "" }, { "docid": "f071d02ad134c76d89d392267087a2bb", "score": "0.6063939", "text": "function spotify_this_song(songName) { \n let queryURL = \"https://api.spotify.com/v1/search?q=track:\" + songName + \"&type=track&limit=1\";\n console.log(\"======================\" + \"\\n\" +\"Song: \" + songName + \"\\n\" + \"======================\" + \"\\n\");\n logOutputData(\"======================\" + \"\\n\" +\"Song: \" + songName + \"\\n\" + \"======================\" + \"\\n\");\n //Make a request to Spotify\n spotify.request(queryURL)\n .then(function (songResponse) {\n let tracks = songResponse.tracks.items;//array of tracks\n tracks.forEach(function (track) {\n\n //build artist block\n let artists = track.artists; //array\n let artistsNames = [];\n artists.forEach(function (artist) {\n artistsNames.push(artist.name);\n });\n\n //build trackData block\n let trackData = [\n \"Artist (s): \" + artistsNames.join(' & '),\n \"Song: \" + track.name,\n \"Album: \" + track.album.name,\n track.preview_url ? \"Preview URL: \" + track.preview_url : \"Preview URL: \" + \"none provided\" + \"\\n\"\n ].join(\"\\n\");\n\n // console.log(artistsNames.join(' & '));\n console.log(trackData);\n logOutputData(trackData);\n });\n \n })\n \n .catch(function (err) {\n console.log(err);\n throw err;\n });\n\n}", "title": "" }, { "docid": "b012bb9e336345b95cb6c5ce1537862e", "score": "0.6062586", "text": "function spotifyThisSong(songName) {\n var spotifyClient = new Spotify(keys.spotify);\n songName = process.argv[3];\n\n if (!songName) {\n songName = \"The Sign\";\n console.log(\"You didn't specify a song but try this one:'The Sign'. \\n\");\n }\n params = songName;\n\n spotifyClient.search({ type: 'track', limit: 5, query: params }, function(err, data) {\n if (err ) {\n console.log('Error occurred: ' + err);\n return;\n } \n // console.log(data.tracks.items[0]);\n var songInfo = data.tracks.items;\n for (var i = 0; i < 5; i++) {\n if (songInfo[i] != undefined) {\n var results = \n \"Artist: \" + songInfo[i].artists[0].name + \"\\n\" +\n \"Song: \" + songInfo[i].name + \"\\n\" +\n \"Album: \" + songInfo[i].album.name + \"\\n\" +\n \"Preview Url: \" + songInfo[i].preview_url + \"\\n\";\n console.log(results);\n }\n };\n });\n}", "title": "" }, { "docid": "6e724d23344118c464b19c40e4329c96", "score": "0.6059189", "text": "getSongsMatchingArtist(desiredArtists, songPool) {\n desiredArtists = desiredArtists.split(\",\");\n desiredArtists = desiredArtists.map(artist => artist.trim().toLowerCase());\n let songsMatchingDesiredArtists = [];\n for (let song of songPool) {\n let songArtists = [];\n for (let songArtist of song.track.artists) {\n songArtists.push(songArtist.name.toLowerCase());\n }\n if (this.songContainsMatchingArtist(songArtists, desiredArtists)) {\n songsMatchingDesiredArtists.push(song);\n }\n }\n return songsMatchingDesiredArtists;\n }", "title": "" }, { "docid": "faa947cbf407d91fff499543f137c8c4", "score": "0.6057176", "text": "setSongOject(song) {\n for(let i = 0; i < this.resourceManager.enabledSongs.length; i++) {\n if(this.resourceManager.enabledSongs[i] === song) {\n return this.setSong(i);\n }\n }\n }", "title": "" }, { "docid": "a1e2b526cb8534537e26eacf12bc9654", "score": "0.6051896", "text": "SongsAnalyze(){\n let songnm =[];\n let artistnm =[]\n let pic =[];\n let SSong = [];\n for (let i = 0; i < songs.length; i += 1){\n let obj=songs[i];\n artistnm.push(obj.artistname)\n songnm.push(obj.songname)\n pic.push(obj.photo)\n SSong.push(obj.song)\n }\n let joinnm = this.state.artistName.concat(artistnm);\n this.setState({ artistName: joinnm })\n let joinpic = this.state.songPhoto.concat(pic);\n this.setState({ songPhoto: joinpic })\n let joinsn = this.state.songName.concat(songnm);\n this.setState({ songName: joinsn })\n let joinss = this.state.soundsong.concat(SSong);\n this.setState({ soundsong: joinss })\n \n \n }", "title": "" }, { "docid": "affe112079ef271847eeafbc2346eef5", "score": "0.60392076", "text": "function spotifyThisSong(song) {\n\n var spotifySearch = new Spotify({\n id: keys.spotify.id,\n secret: keys.spotify.secret\n });\n \n // If song is not entered, default to \"The Sign\"\n var query = song.length === 0? \"The Sign\" : song.join(\" \");\n\n spotifySearch\n .search({ type: 'track', query: query })\n .then(function(response) {\n \n var trackData = response.tracks.items;\n\n // Song information not found, stop executing\n if (trackData.length === 0) {\n console.log(\"Song information not found. Please try another song.\");\n return;\n }\n\n // Compose the header information\n var header = query + \" song information\";\n var tracks = divider + header + divider;\n \n for(var i=0; i<response.tracks.items.length; i++) {\n\n var track = [\n \"Song Name: \" + query,\n \"Artist(s): \" + trackData[i].artists.map(artist => artist.name),\n \"Album: \" + trackData[i].album.name,\n \"Preview Link: \" + trackData[i].preview_url,\n divider\n ].join(\"\\n\");\n\n tracks = tracks + track;\n }\n\n // Write to log file and to console\n writeInfo(tracks);\n \n })\n .catch(function(err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "2f30d6b6a06b2828b2dae8c057f30a42", "score": "0.6037147", "text": "function spotifyThis(song) {\n // default to \"The Sign\" by Ace of Base if no song is entered\n if (!song) {\n song = \"The Sign Ace of Base\"; // this is where i will be adding the artist name \n }\n\n spotify.search({ type: \"track\", query: song }, function(err, data) {\n if (err) {\n return console.log(err);\n }\n console.log(\"Artist(s): \", data.tracks.items[0].album.artists[0].name);\n console.log(\"Preview: \", data.tracks.items[0].preview_url);\n console.log(\"Album: \", data.tracks.items[0].album.name);\n });\n}", "title": "" }, { "docid": "72f56dbc887f8b3dbab504ad531c40b5", "score": "0.60344607", "text": "function spotifyThisSong() {\n if (!uQuery) {\n uQuery = \"The Sign by Ace of Base\"\n console.log(\"The Sign by Ace of Base\");\n };\n // search query\n spotify.search({\n type: 'track',\n query: uQuery,\n limit: 1\n }, function (error, data) {\n if (error) {\n return console.log('Error occurred: ' + error);\n }\n var spotDataArr = data.tracks.items;\n for (i = 0; i < spotDataArr.length; i++) {\n console.log(\"Artist Name: \" + data.tracks.items[0].album.artists[0].name);\n console.log(\"Song Name: \" + data.tracks.items[0].name);\n console.log(\"Album Name: \" + data.tracks.items[0].album.name);\n console.log(\"Link for Song: \" + data.tracks.items[0].external_urls.spotify + \"\\n\");\n }\n })\n}", "title": "" }, { "docid": "f8b2f9122b8620448688d0fa2d5c36a7", "score": "0.60341454", "text": "function showAllSongs(){\n // Switch active <a> element\n $('#navbar a:nth-child(2)').removeClass('active');\n $('#navbar a:nth-child(3)').addClass('active');\n\n // first remove existing songs\n removeSongs();\n \n // Fetch all songs\n\n requests.allSongs( (x) => {\n if (x['status'] === 200){\n console.log('-- RECEIVED: allSongs');\n\n /* VISUAL CHANGES */\n // change search field to search in 'all songs'\n $('#search_input').attr('placeholder','Search a song...');\n\n /* LOGIC */\n songs = parseSongs(JSON.parse(x['response']));\n songs.forEach(function(song){\n appendTrack(song,'server');\n });\n } \n else {\n alert('Server errors while getting global songs');\n }\n }); \n}", "title": "" }, { "docid": "f17c24748d115d0ed6890537abe2b501", "score": "0.6033155", "text": "function getAll () {\n return songs\n}", "title": "" }, { "docid": "fe81729519dd48f9414e8508b26cdd0d", "score": "0.60316163", "text": "renderSongs() {\n const { albumDetails } = this.albumDetailsScreenModel;\n\n return albumDetails.songs.map(song => (\n <AlbumsSongsListItem key={song.id} item={song} />\n ));\n }", "title": "" }, { "docid": "fc2c25c6081c74e043bff2d95fcd88aa", "score": "0.603033", "text": "function spotifySong(song) {\n spotify.search({ type: \"track\", query: \"song\" }, function(error, data) {\n if (!error) {\n for (var i = 0; i < data.tracks.item.length; i++) {\n var songData = data.tracks.items[i];\n //showing artist\n console.log(\"Artist: \" + songData.artists[0].name);\n //searched song\n console.log(\"song: \" + songData.name);\n //spotify link\n console.log(\"preview URL: \" + songData.preview_url);\n //album name\n console.log(\"Album: \" + songData.album.name);\n console.log(\"\\n---------------\\n\");\n }\n } else {\n console.log(\"error occured\");\n }\n });\n}", "title": "" }, { "docid": "636cb94219f4124509fbc454cfb38152", "score": "0.6027137", "text": "function song() {\n\n\n\n\n\tfor ( var i=2 ; i< nodeArgs.length ; i++){\n\t\t\n\t\tif (i>2 && i< nodeArgs.length){\n\t\t\tsongName = songName + \" \" +nodeArgs[i];\n\n\n\t\t}\n\t} \n\n\tif (!songName){\n\t\tsongName = \"The Sign\";\n\t}\n\t\n\tconsole.log(songName);\n \n\n spotify.search({ type: 'track', query: songName }, function(err, data) {\n if (err) {\n console.log('Error occurred: ' + err);\n return;\n }\n\n \tconsole.log(data.tracks.items.album);\n \n });\n\n\n}", "title": "" }, { "docid": "f7291e0a31851d7167f9e791bac96b40", "score": "0.6006077", "text": "function spotifyThis(songName) {\n if (!songName){\n songName = \"welcome to the black parade\"\n console.log(\"You didn't choose a song? Well my fish Tito died to this song, so thanks for the memories.\")\n }\n spotify.search({ type: 'track', query: songName }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n var songs = data.tracks.items[0]\n console.log(\n \"ARTIST: \" +\n songs.artists[0].name +\n \"\\nSONG: \" +\n songs.name +\n \"\\nALBUM: \" + \n songs.album.name +\n \"\\nPREVIEW: \" +\n songs.preview_url) +\n \"--------------------------------------------------------------------\" \n\n });\n}", "title": "" }, { "docid": "8bc5c280dd84145de98df686d30ba915", "score": "0.60006034", "text": "function songSearch(songName) {\n if (songName === \"\") {\n songName = \"the+sign\"\n } else {\n songName = songName\n }\n spotify.search({type: \"track\", query: songName, limit: 1}, function(err, data) {\n if (err) {\n return console.log(err)\n }\n console.log(\"\\nArtist Name: \" + data.tracks.items[0].album.artists[0].name)\n console.log(\"Album Name: \" + data.tracks.items[0].album.name)\n console.log(data.tracks.items[0].album.artists[0].external_urls.spotify)\n })\n\n}", "title": "" }, { "docid": "ddb73c5c889f0ce47b547dfa0dbc3531", "score": "0.5994108", "text": "function spotifyThisSong(song){\n let formatedOutput = \"\"\n \n // Whenever the song is undefined we'll defaul the sear to The Sign.\n let myDefault = false;\n if(song===undefined){\n song = \"The Sign\";\n myDefault = true;\n }\n\n spotify.search({ type: 'track', query: song, limit: 10 }, function(err, data) {\n if (err) {\n formatedOutput = 'Error occurred: ' + err;\n logIt(formatedOutput);\n return console.log(formatedOutput);\n } else {\n formatedOutput = \"\"\n if(myDefault){\n // This Shows \"The Sign\" from Ace of Base\n let currentSong = data.tracks.items[7];\n formatedOutput += \"\\nArtist(s): \" + currentSong.artists[0].name;\n formatedOutput += \"\\nSong's Name: \" + currentSong.name;\n formatedOutput += \"\\nSong's Link @ Spotify: \" + currentSong.external_urls.spotify;\n formatedOutput += \"\\nAlbum Name: \" + currentSong.album.name + \"\\n\";\n }\n else{\n for (let i = 0; i < data.tracks.items.length; i++){\n let currentSong = data.tracks.items[i];\n let artistsStr = \"\"\n for (let i = 0; i < currentSong.artists.length; i++){\n if (i!==0){\n artistsStr += \", \" + currentSong.artists[i].name;\n } else{\n artistsStr = currentSong.artists[i].name;\n }\n }\n\n formatedOutput += \"\\nArtist(s): \" + artistsStr;\n formatedOutput += \"\\nSong's Name: \" + currentSong.name;\n formatedOutput += \"\\nSong's Link @ Spotify: \" + currentSong.external_urls.spotify;\n formatedOutput += \"\\nAlbum Name: \" + currentSong.album.name + \"\\n\";\n }\n }\n }\n\n console.log(formatedOutput);\n logIt(formatedOutput);\n });\n}", "title": "" }, { "docid": "228b0689172248892d0d8816e48e9d54", "score": "0.5989707", "text": "function setMusicInState(response) {\n var mc = state.musicData;\n let bestCandidate = response.albums.items[0];\n let bestScore = 0;\n response.albums.items.forEach(function (album, idx) {\n let newScore = 0;\n if (album.name.toLowerCase().indexOf(\"soundtrack\") !== -1) {\n newScore += 10;\n }\n if (album.name.toLowerCase().indexOf(\"motion\") !== -1) {\n newScore += 7;\n }\n if (album.name.toLowerCase().indexOf(\"picture\") !== -1) {\n newScore += 7;\n }\n if (album.name.match(state.movieData.title)) {\n console.log(album.name.match(state.movieData.title));\n newScore += 15;\n }\n if (newScore > bestScore) {\n bestScore = newScore;\n bestCandidate = album;\n }\n });\n let id = bestCandidate.id;\n let SPOT_URL = 'https://api.spotify.com/v1/albums/'+id;\n mc.albumTitle = bestCandidate.name;\n mc.albumSpotifyID = bestCandidate.id;\n mc.composer = bestCandidate.artists.name;\n mc.albumArtURL = bestCandidate.images[1].url;\n console.log(response);\n $.getJSON(SPOT_URL, function(data) {\n mc.tracks = data.tracks.items;\n renderMovie(state, $(\"#movie-info\"));\n renderMusic(state, $('#music-info'));\n //console.log(state.musicData);\n });\n}", "title": "" }, { "docid": "ca4e93358c7cb8f6756c4338f859cdf6", "score": "0.5986104", "text": "function getSongLimit() {\n return 3 + ((0,kolmafia__WEBPACK_IMPORTED_MODULE_0__.booleanModifier)(\"Four Songs\") ? 1 : 0) + (0,kolmafia__WEBPACK_IMPORTED_MODULE_0__.numericModifier)(\"Additional Song\");\n}", "title": "" }, { "docid": "bee884aeb0568ca031985d8e9281405b", "score": "0.59844583", "text": "async getSongsHandler() {\n const songs = await this._service.getSongs();\n return {\n status: 'success',\n data: {\n songs: songs.map((s) => ({\n id: s.id,\n title: s.title,\n performer: s.performer,\n })),\n },\n };\n }", "title": "" }, { "docid": "280bf31e98a24d844da7594e34f81401", "score": "0.5970606", "text": "function spotifySearch(songName){\n\nspotify.search({ type: 'track', query: songName }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n for(var i = 0; i < data.tracks.items.length; i++){\n var songData = data.tracks.items[i];\n //artist\n console.log(\"Artist: \" + songData.artists[0].name);\n //name\n console.log(\"Song: \" + songData.name);\n //preview link\n console.log(\"Preview URL: \" + songData.preview_url);\n //album\n console.log(\"Album: \" + songData.album.name);\n\n}; \n});\n}", "title": "" }, { "docid": "74449653837d5d938276c0ea2380ba12", "score": "0.5965704", "text": "function searchSpotify(song) {\n\n spotify.search({ type: 'track', query: song }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n console.log(\"Song Search: \" + song);\n console.log(\"=================================\");\n\n var songArrLength = data.tracks.items.length;\n\n for (var i = 0; i < songArrLength; i++ ) {\n console.log(\"Song Name: \" + data.tracks.items[i].name);\n console.log(\"Preview URL: \" + data.tracks.items[i].preview_url);\n for (var j = 0; j < data.tracks.items[i].artists.length; j++){\n console.log(\"Artist: \" + data.tracks.items[i].artists[j].name);\n }\n console.log(\"Album: \" + data.tracks.items[i].album.name);\n console.log(\"--------------------------------\");\n }\n\n });\n}", "title": "" }, { "docid": "9250c50fdbead100686449afccd4502f", "score": "0.5961908", "text": "function music() {\n if (e.length === 0) {\n spotify.search({ type: 'track', query: 'The Sign' }).then(function (response) {\n var shortHand = response.tracks.items[7];\n var displayInfo = [\n \"\\n\",\n \"Artist(s): \" + shortHand.artists[0].name,\n \"Song Name: \" + shortHand.name,\n \"Spotify Preview Link: \" + shortHand.album.external_urls.spotify,\n \"Album Name: \" + shortHand.album.name,\n \"\\n----------\"\n ].join(\"\\n\");\n console.log(displayInfo);\n }).catch(function (err) {\n console.log(err);\n });\n } else {\n spotify.search({ type: 'track', query: e.join(\" \") }).then(function (response) {\n var shortHand = response.tracks.items[0];\n var displayInfo = [\n \"\\n\",\n \"Artist(s): \" + shortHand.artists[0].name,\n \"Song Name: \" + shortHand.name,\n \"Spotify Preview Link: \" + shortHand.album.external_urls.spotify,\n \"Album Name: \" + shortHand.album.name,\n \"\\n----------\"\n ].join(\"\\n\");\n\n console.log(displayInfo);\n }).catch(function (err) {\n console.log(err);\n })\n }\n\n}", "title": "" }, { "docid": "d85b4e13ee03853cc625d6b0a3267307", "score": "0.59569937", "text": "async getAlbums() {\n this.setState({results: []})\n const albums = await API.getAlbums(this.state.q.toLowerCase().split(\" \").join(\"+\"));\n if (!albums.data.album) { \n this.setState({error: \"No results found.\"}) \n return;\n }\n const filteredAlbums = albums.data.album.filter(album => album.strReleaseFormat === \"Album\" || album.strReleaseFormat === \"Mixtape/Street\")\n await filteredAlbums.forEach(album => {\n this.getTracks(album)\n })\n }", "title": "" }, { "docid": "fb27df34f1db4e4e670db2af4d3c9fa0", "score": "0.595582", "text": "function spotifyThisSong(song) {\n // Check if the command is there. If it is not, use the sign\n //the sign song has two name The sign and the happy nation/if we chose the sign it will\n //give other singers not Ace of Base/that`s why I chose Happy nation\n if (!song) {\n song = \"happy nation\"\n }\n\n spotify.search({ type: 'track', query: song, limit: 1 }, function (err, data) {\n\n for (var i = 0; i < data.tracks.items.length; i++) {\n var songData = data.tracks.items[i];\n console.log(\"===================Song Info====================\")\n console.log(i);\n console.log(\"artist(s): \" + songData.artists[0].name);\n console.log(\"song name: \" + songData.name);\n console.log(\"preview song: \" + songData.preview_url);\n console.log(\"album: \" + songData.album.name);\n console.log(\"===================end song Info====================\")\n\n fs.appendFileSync(\"log.txt\", \"Name of The Song: \" + song + \" , \" + \"artist(s): \" + songData.artists[0].name + \" , \" +\n \"song name: \" + songData.name + \" , \" +\n \"preview song: \" + songData.preview_url + \" , \" + \"album: \" + songData.album.name + \"\\n------------------\\n\", function (error) {\n if (error) {\n console.log(error);\n };\n });\n\n }\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n });\n\n}", "title": "" }, { "docid": "034458a03b7b2b26a3215f95497d91fc", "score": "0.59478116", "text": "function getsongs(song){\n var Spotify_id = require('node-spotify-api');\n var spotify = new Spotify_id({ id: '596f3a18a2404472953b2dad0d0df47b', \n secret: 'b57d2b5a382e48ef989b868a1a758317'});\n var songnumber = 0;\n\n if (song) {\n var param = {type: \"track\", query : song};\n }else{\n var param = {type: \"track\", query : \"The Sign artist:Ace of Base\", limit : 1};\n song = query;\n }\n spotify.search(param)\n .then(function(response) {\n if (response.tracks.items.length >= 10){\n songnumber = 10;\n }else{\n songnumber = response.tracks.items.length;\n }\n \n for (var i = 0; i < songnumber; i++) {\n var result = response.tracks.items[i];\n var tmpdata = \"-----------------------------------\"+'\\n';\n tmpdata = tmpdata + \"Artist(s): \"+result.artists[0].name+'\\n'+\"Track Name: \"+result.name+'\\n'\n tmpdata = tmpdata + \"Preview Link: \"+ result.preview_url+'\\n'+\"Album: \"+result.album.name+'\\n'\n tmpdata = tmpdata + \"Popularity: \"+result.popularity;\n console.log(tmpdata);\n logdata (\"spotify-this-song\",song,tmpdata);\n }\n })\n .catch(function(err) {\n console.log(err);\n logdata (\"spotify-this-song\",song,err);\n });\n}", "title": "" }, { "docid": "c3d18991160c3728af7f5b6cd1fc7966", "score": "0.5942445", "text": "function songSearch() {\n spotify\n .search({\n type: \"track\",\n query: requestElement,\n limit: 1\n })\n .then(function(response) {\n var result = response.tracks.items;\n for (let i = 0; i < result.length; i++) {\n resultData =\n \"================================================\" +\n \"\\n\\nArtists: \" +\n result[i].artists[i].name +\n \"\\n\\nThe Song's name: \" +\n result[i].name +\n \"\\n\\nA preview link of the song from Spotify: \" +\n result[i].preview_url +\n \"\\n\\nThe album that the song is from: \" +\n result[i].album.name +\n \"\\n\\n================================================\";\n console.log(resultData);\n dataLog();\n }\n })\n .catch(function(err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "90b4be733e5175bcc5a8c3d0a28afed0", "score": "0.5942167", "text": "function getSongs(num) {\n\t\tvar check = false;\n\t\tsongHtmlList = '';\n\n\t\treturn $.ajax({\n\t\t\turl: 'http://itp-api.herokuapp.com/songs'\n\t\t}).then(function(response) {\n\t\t\tresponse.songs.forEach(function(song) {\n\t\t\t\tif (num === song.artistId) {\n\t\t\t\t\tif(song.genreId === null) {\n\t\t\t\t\t\t//console.log(\"null\");\n\t\t\t\t\t\tisNull = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tgetGenre(song.genreId);\n\t\t\t\t\tsongHtmlList += songsTemplate(song);\n\t\t\t\t\t$('#songs').html(songHtmlList);\n\t\t\t\t\t\n\t\t\t\t\tcheck = true;\n\t\t\t\t};\n\t\t\t});\n\t\t\tif (check === false) {\n\t\t\t\tdisplaySongLoader();\n\t\t\t\tdisplaySongError();\n\t\t\t\temptyGenre();\n\t\t\t};\n\t\t});\n}", "title": "" }, { "docid": "aca8284c3f91925d29ac044f62d1316a", "score": "0.59407246", "text": "function showMySongs(){\n // Switch active <a> element\n $('#navbar a:nth-child(2)').addClass('active');\n $('#navbar a:nth-child(3)').removeClass('active');\n\n // Get users songs\n\n requests.userSongs( (x) => {\n if (x['status'] === 200){\n console.log('-- RECEIVED: userSongs');\n\n /* VISUAL CHANGES */\n // remove existing songs\n removeSongs();\n\n // change search field to search in 'your songs'\n $('#search_input').attr('placeholder','Search in your songs...');\n\n /* LOGIC */\n\n // delete current user_songs_ids;\n user_songs_ids = [];\n\n songs = parseSongs(JSON.parse(x['response']));\n\n if (songs.length == 0){\n // No songs for user\n return;\n }\n\n songs.forEach(function(song){\n appendTrack(song,'user');\n\n // add to user_songs_ids\n user_songs_ids.push(song.id);\n });\n\n // Add playlists songs\n var songs_ids = songs.map(function(x){return x.id});\n \n for (let i=0; i< playlists.length; i++){\n for (let j=0; j< playlists[i].songs.length; j++){\n if (songs_ids.indexOf(playlists[i].songs[j].id) === -1) {\n // playlist's song is not in songs\n songs.push(playlists[i].songs[j]);\n console.log('playlist:',playlists[i].name,\n 'song:', playlists[i].songs[j].title,'added');\n }\n }\n }\n }\n else {\n alert('Server errors getting user songs');\n }\n });\n}", "title": "" }, { "docid": "f4ee0c4273d47691a223d01e9b3ee6ce", "score": "0.59371", "text": "matchSongBasedOffHeartRate() {\n console.log(`Matching song based off current heart rate`);\n \n // Heart rate\n const maxHeartRate = 220 - (this.app.state.userAge || 20);\n const restingHeartRate = this.app.state.restingHeartRate || 65;\n const currentHeartRate = this.app.state.currentHeartRate;\n const currentHeartRateIntensity = (currentHeartRate - restingHeartRate) / (maxHeartRate - restingHeartRate);\n console.log(`Current heart rate intensity: ${currentHeartRateIntensity.toFixed(2)} (${currentHeartRate} bpm) (${maxHeartRate} max) (${restingHeartRate} resting)`);\n \n // Song matching\n const songsNotInHistory = [];\n \n for (let trackId in this.currentTrackEnergyLevels) {\n if (this.trackHistory.indexOf(trackId) !== -1) {\n continue;\n }\n \n songsNotInHistory.push({id: trackId, energy: this.currentTrackEnergyLevels[trackId]});\n }\n \n const amountOfSongsInPool = Math.max(20, Math.ceil(songsNotInHistory.length / 10));\n \n const songsWithRelativeIntensity = songsNotInHistory\n .map(i => {\n return {id: i.id, relativeIntensity: i.energy - currentHeartRateIntensity};\n });\n \n const closestSongsToIntensity = songsWithRelativeIntensity\n .sort((a, b) => Math.abs(a.relativeIntensity) - Math.abs(b.relativeIntensity));\n \n let songPool = closestSongsToIntensity.slice(0, amountOfSongsInPool);\n \n if (this.heartRateAtPreviousSong && amountOfSongsInPool > 1) {\n const heartRateDiffernceSinceLastSong = currentHeartRate - this.heartRateAtPreviousSong;\n \n // If there's a signicant differnce in heart rate since the last\n // song we favour songs with intensities in the same direction as the change in heart rate\n \n if (heartRateDiffernceSinceLastSong >= 10) {\n songPool = songPool\n .sort((a, b) => b.relativeIntensity - a.relativeIntensity) // Sort Descending\n .slice(0, Math.ceil(amountOfSongsInPool / 2));\n }\n \n if (heartRateDiffernceSinceLastSong <= -10) {\n songPool = songPool\n .sort((a, b) => a.relativeIntensity - b.relativeIntensity) // Sort Descending\n .slice(0, Math.ceil(amountOfSongsInPool / 2));\n }\n }\n \n console.log(`Song pool: ${JSON.stringify(songPool)}`);\n const song = songPool[Math.floor(Math.random() * songPool.length)];\n \n this.trackHistory.push(song.id);\n this.heartRateAtPreviousSong = currentHeartRate;\n \n if (songsNotInHistory.length === 1) {\n this.trackHistory = [];\n }\n \n console.log(`Selected song: ${song.id}`);\n return song;\n }", "title": "" }, { "docid": "df4cbfae82125b14d2f31730d1d90082", "score": "0.5933219", "text": "function singSong() {\n let emptyBottleRequestCount = 0\n const initialContainerCount = 99,\n units = () => `bottle${containerCount === 1 ? '' : 's'} of beer`,\n count = () => {\n if (containerCount === 0) {\n emptyBottleRequestCount++\n if (emptyBottleRequestCount === 2) {\n return 'No more'\n }\n return 'no more'\n }\n return containerCount\n },\n action = () => {\n if (containerCount === 0) {\n containerCount = initialContainerCount \n return 'Go to the store, buy some more'\n }\n containerCount--\n return 'Take one down, pass it around'\n }\n\n let containerCount = initialContainerCount\n while (containerCount >= -1) {\n const c = count(), u = units()\n printLyric(\n `${c} ${u} on the wall, ${c} ${u}! ${action()}, ${count()} ${units()} on the wall!`\n )\n if (containerCount === initialContainerCount) break\n }\n}", "title": "" }, { "docid": "67b7fb6f1a37793acd585ca75751e842", "score": "0.59307086", "text": "getTracksMatchingArtist(artistName) {\n let artist = this.getArtistByName(artistName);\n let tracksArtist = artist.albums.map((album) => album.tracks);\n let resultado = [].concat.apply([], tracksArtist);\n return resultado;\n }", "title": "" }, { "docid": "6927d92557a46f3334f7fd15db08f89a", "score": "0.590153", "text": "function spotifySong() {\n if (arg[3] == null) {\n spotify.request('https://api.spotify.com/v1/tracks/0hrBpAOgrt8RXigk83LLNE')\n .then(function(data) {\n songObject = new Object();\n songObject.songName = \"The Sign\";\n songObject.songAlbum = 'The Sign (US Album) [Remastered]';\n songObject.songPreview = 'https://p.scdn.co/mp3-preview/4c463359f67dd3546db7294d236dd0ae991882ff?cid=348f6d5d529a4ed9aa243f1167bd57e8';\n songObject.artist = \"Ace of Base\"\n\n console.log(songObject);\n })\n .catch(function(err) {\n console.error('Error occurred: ' + err);\n });\n} else {\n //Creating a loop that will be able to consume a full song name\n\n for (var i = 3; i < arg.length; i++) {\n songName = songName + \"+\" + arg[i];\n }\n\n spotify.search({\n type: 'track',\n query: songName\n }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n } else {\n\n songObject = new Object();\n //This will show the following information about the song\n for (var i = 0; i < data.tracks.items.length; i++) {\n\n // * The song's name\n song = data.tracks.items[i].name;\n\n // * The album that the song is from\n album = data.tracks.items[i].album.name;\n\n // * A preview link of the song from Spotify\n songPreview = data.tracks.items[i].preview_url;\n\n //Creating an object to contain the song information\n\n songObject.songName = song;\n songObject.songAlbum = album;\n songObject.songPreview = songPreview;\n\n //Need to create a loop to get the artists array\n for (var j = 0; j < data.tracks.items[i].album.artists.length; j++) {\n\n // * Artist(s)\n artist = (data.tracks.items[i].album.artists[j].name)\n\n songObject.artist = artist\n }\n console.log(songObject);\n } // end the for loop\n // * If no song is provided then your program will default to \"The Sign\" by Ace of Base.\n } // end the else statement\n }); // end the spotify search\n}\n\n\n} //End Spotify function", "title": "" }, { "docid": "a80a624036530d5f964a5f7b03d8817b", "score": "0.58954585", "text": "function spotifyThisSong(reference) {\n if(!reference.length === 0){\n reference = \"The Sign\";\n }\n spotify\n .search({ type: 'track', query: reference })\n .then(function(response) {\n console.log(\" \");\n console.log(\"SEARCHING SPOTIFY FOR: \" + reference);\n console.log(\" \");\n for (var i = 0; i < 5; i++) {\n var spotifyResults = \n \"--------------------------------------------------------------------\" +\n \"\\nArtist(s): \" + response.tracks.items[i].artists[0].name + \n \"\\nSong Name: \" + response.tracks.items[i].name +\n \"\\nAlbum Name: \" + response.tracks.items[i].album.name +\n \"\\nPreview Link: \" + response.tracks.items[i].preview_url;\n \n console.log(spotifyResults);\n }\n })\n .catch(function(err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "633111e420c14d67d3343bbca0d5a61d", "score": "0.5891467", "text": "function findSong (){\r\n song = process.argv.slice(3).join(\" \");\r\n spotify.search ({ type:\"track\", query: song, limit: 5}, function (err, data){\r\n if (err != null) {\r\n return log (\"An error occured: \" + err); \r\n }\r\n data.tracks.items.forEach(function(element){\r\n\r\n log(space)\r\n log(`Artist: ${element.album.artists[0].name}`);\r\n log(`Song: ${element.name}`);\r\n log(`Preview on Spotify: ${element.preview_url}`);\r\n if (element.album.name != null) { \r\n log(`Album: ${element.album.name}`);\r\n }\r\n log(space)\r\n\r\n // re-writes the search type in the random.txt file\r\n if (searchType!=\"do-what-it-says\"){\r\n fs.writeFile(\"random.txt\", `${searchType} ${search}`, function(err) { if (err) throw err;});\r\n }\r\n \r\n // saves song searches to a log file\r\n fs.appendFileSync(\"logSong.txt\", \" \", function(err) { if (err) throw err;});\r\n fs.appendFileSync(\"logSong.txt\", `-Artist: ${element.album.artists[0].name} `, function(err) { if (err) throw err;});\r\n fs.appendFileSync(\"logSong.txt\", `-Song: ${element.name} `, function(err) { if (err) throw err;});\r\n fs.appendFileSync(\"logSong.txt\", `-Preview on Spotify: ${element.preview_url} `, function(err) { if (err) throw err;});\r\n fs.appendFileSync(\"logSong.txt\", `-Album: ${element.album.name} ${space} `, function(err) { if (err) throw err;});\r\n\r\n }); \r\n })\r\n }", "title": "" }, { "docid": "4a0ae1ddd31f00fb90c708202ca141a1", "score": "0.588956", "text": "function gotAllSongs(err) {\n console.log(\"gotAllSongs()\");\n \n // report an error, you'd want to do something better than this in production\n if (err) {\n console.log(\"error loading data\");\n console.error(err);\n return;\n }\n \n // call functions to log and show the books\n consoleLogSongs();\n showSongs();\n }", "title": "" }, { "docid": "40b6b5d95fd62d99743f27743f9bef65", "score": "0.5886892", "text": "function spotifyThis(song) {\n\n if (!song) {\n song = \"ace+of+base\"\n };\n spotify.search({ type: 'track', query: song, limit: 1 }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n var data = data.tracks.items[0];\n console.log(`Artist(s) Name: ${data.artists[0].name}`);\n console.log(`Song Name: ${data.name}`);\n console.log(`Preview Link: ${data.preview_url}`);\n console.log(`Album: ${data.album.name}`);\n\n });\n}", "title": "" }, { "docid": "1dbb75502af66d4ce9c037117b3c234f", "score": "0.58860505", "text": "function songSpot(y)\n{\n //Calls the queryGet function to get the appropriate string for the get request.\n var songName = queryGet(y);\n \n if(songName === \"\")\n {\n songName = \"The Sign\";\n }\n //Requests the chosen song from the Spotify API\n spotify.search({ type: 'track', query: songName}, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n \n //Verifies how many results were returned and trims them down if they are above 10\n if(data.tracks.items.length < 10)\n {\n var limiter = data.tracks.items.length;\n }else{\n var limiter = 10;\n }\n //Cycles through the results to display the Song information in an aesthetically pleasing manner.\n for (var i=0; i<limiter; i++)\n {\n console.log(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n console.log(\"Artist: \" + data.tracks.items[i].album.artists[0].name)\n console.log(\"Song Name: \" + data.tracks.items[i].name )\n console.log(\"Preview this song here ===> \" + data.tracks.items[i].external_urls.spotify)\n console.log(\"Album: \" + data.tracks.items[i].album.name);\n console.log(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n }\n });\n}", "title": "" }, { "docid": "0def68c977210497a6f04d566b4a3fb3", "score": "0.5875222", "text": "function onGetSongs(data, textStatus, jqXHR) {\n songs = songs.concat(data.songs);\n var newStart = data.songs.length + data.start;\n if (newStart < /*data.total*/30) {\n getSongs(newStart, onGetSongs)\n } else {\n createSongsList();\n //alert(\"END \" + songs.length);\n }\n }", "title": "" }, { "docid": "7720c3b085db76181eab83ed4457d605", "score": "0.5865253", "text": "function showSongInfo(song) {\n\n spotify.search({\n type: 'track',\n query: song,\n limit: 5\n }, function (err, data) {\n if (err) {\n console.log('Error occurred: ' + err);\n return; //from spotify npm docs\n } else {\n data.tracks.items.forEach(songinfo => {\n //console.log(songinfo);\n console.log(` \n Artist : ${songinfo.artists[0].name} \n Song Name : ${songinfo.name}\n Preview Link : ${songinfo.preview_url}\n Album name : ${songinfo.album.name}\n `);\n var info = `\n Artist : ${songinfo.artists[0].name} \n Song Name : ${songinfo.name}\n Preview Link : ${songinfo.preview_url}\n Album name : ${songinfo.album.name}\n `;\n logInfo(info);\n });\n\n };\n });\n}", "title": "" }, { "docid": "b906c01f4e3793d57031b5f2e6de6925", "score": "0.58616257", "text": "function kishoreSongsHandler() {\n setSinger(kishoreSongs);\n }", "title": "" }, { "docid": "226ee58ca9704d884118a72b061b9472", "score": "0.5856286", "text": "function parseSongs() {\n let arrayOfSongs = [];\n for (let s of songs) {\n arrayOfSongs.push(song(s));\n }\n return arrayOfSongs;\n}", "title": "" }, { "docid": "24f585cd1a540d7aba2ef1e23e5213b2", "score": "0.5854036", "text": "function showSongInfo(userInput2){\n \n if (userInput2 === undefined) {\n userInput2 = \"Hello\"; //default Song\n \n }\n\n /* axios.get(\"https://api.spotify.com/v1/\"+ userInput2 + spotify).then(\n \n \n */\n spotify.search(\n {\n type: \"track\",\n query: userInput2\n },\n \n function (err, data) {\n \n if (err) {\n console.log(\"Error occurred: \" + err);\n return;\n }\n var songs = data.tracks.items;\n // Then we pull out only 5 songs matching the criteria out the tracks.data to make less cluthered\n //I could pull out all songs in the array with for (var i = 0; i < songs.length 5; i++) {\n for (var i = 0; i < 5; i++) {\n console.log(\"**********SONG INFO*********\");\n fs.appendFileSync(\"log.txt\", \"**********SONG INFO*********\\n\");\n console.log(i);\n fs.appendFileSync(\"log.txt\", i +\"\\n\");\n console.log(\"Song name: \" + songs[i].name);\n fs.appendFileSync(\"log.txt\", \"song name: \" + songs[i].name +\"\\n\");\n console.log(\"Preview song: \" + songs[i].preview_url);\n fs.appendFileSync(\"log.txt\", \"preview song: \" + songs[i].preview_url +\"\\n\");\n console.log(\"Album: \" + songs[i].album.name);\n fs.appendFileSync(\"log.txt\", \"album: \" + songs[i].album.name + \"\\n\");\n console.log(\"Artist(s): \" + songs[i].artists[0].name);\n fs.appendFileSync(\"log.txt\", \"artist(s): \" + songs[i].artists[0].name + \"\\n\");\n console.log(\"*****************************\"); \n fs.appendFileSync(\"log.txt\", \"*****************************\\n\");\n \n }\n }\n );\n}", "title": "" }, { "docid": "f7232e548ec79c8e66c2e93e5d3086a8", "score": "0.5852466", "text": "function spotifyThisSongs(song){\n \n //var selection = \"I Want it That Way\";\n var selection = song;\n //spotify.search({ type: 'artist OR album OR track', query: 'My search query', limit: 20 }, callback);\n var logFile = \"log.txt\";\n spotify.search({ type: 'track', query: selection, limit:10 })\n .then(function(response) {\n for (var j = 0; j < response.tracks.items.length; j++){\n var artistlist = \"\";\n for (var i=0; i < response.tracks.items[j].album.artists.length ; i++){\n artistlist = artistlist + \" \" + response.tracks.items[j].album.artists[i].name;\n }\n //console.log(\"Num of Artists= \" + response.tracks.items[0].album.artists.length);\n console.log(\"------------------------------------------------------------------------\");\n console.log(\"Artists Name= \" + artistlist);\n console.log(\"Song Name= \" + response.tracks.items[j].name);\n console.log(\"Album Name= \" + response.tracks.items[j].album.name);\n console.log(\"Preview link= \" + response.tracks.items[j].preview_url);\n console.log(\"------------------------------------------------------------------------\");\n var mySpotify = mySpotify + \"\\r\\n..Spotify Logs..\" ;\n mySpotify = \"\\r\\n********************Spotify Music Search ***************************\" + \"\\r\\nArtists Name= \" + artistlist \n + \"\\r\\nSong Name= \" + response.tracks.items[j].name + \"\\r\\nAlbum Name= \" \n + response.tracks.items[j].album.name + \"Preview link= \" + response.tracks.items[j].preview_url \n + \"\\r\\n*************************************************************\" ;\n // Appending to Log file\n lfile.appendFile(logFile, mySpotify, function(err) {\n // If an error was experienced we say it.\n if (err) {\n console.log(err);\n }\n else {\n \n }\n });\n }\n })\n .catch(function(err) {\n console.log(err);\n });\n}", "title": "" }, { "docid": "7eeece7b84fed81f4dba8a4a85226eaa", "score": "0.58477944", "text": "function spotifyThis(songName) {\n\t\tvar songName = process.argv[3];\n\t\tif(!songName){\n\t\t\tsongName = \"Halo\";\n\t\t}\n\t\tparams = songName;\n\t\tspotify.search({ type: \"track\", query: params }, function(err, data) {\n\t\t\tif(!err){\n\t\t\t\tvar songInfo = data.tracks.items;\n\t\t\t\tfor (var i = 0; i < 5; i++) {\n\t\t\t\t\tif (songInfo[i] != undefined) {\n\t\t\t\t\t\tvar spotifyResults =\n\t\t\t\t\t\t\"Artist: \" + songInfo[i].artists[0].name + \"\\r\\n\" +\n\t\t\t\t\t\t\"Song: \" + songInfo[i].name + \"\\r\\n\" +\n\t\t\t\t\t\t\"Album the song is from: \" + songInfo[i].album.name + \"\\r\\n\" +\n\t\t\t\t\t\t\"Preview Url: \" + songInfo[i].preview_url + \"\\r\\n\" + \n\t\t\t\t\t\t\"------------------------------ \" + i + \" ------------------------------\" + \"\\r\\n\";\n\t\t\t\t\t\tconsole.log(spotifyResults);\n log(spotifyResults); // calling log function\n fs.appendFile('terminal.log', ('=============== LOG ENTRY BEGIN ===============\\r\\n' + Date() +'\\r\\n \\r\\nTERMINAL COMMANDS:\\r\\n$: ' + process.argv + '\\r\\n \\r\\nDATA OUTPUT:\\r\\n' + 'Artist: ' + jsonBody.tracks.items[0].artists[0].name + '\\r\\nSong: ' + jsonBody.tracks.items[0].name + '\\r\\nPreview Link: ' + jsonBody.tracks.items[0].preview_url + '\\r\\nAlbum: ' + jsonBody.tracks.items[0].album.name + '\\r\\n=============== LOG ENTRY END ===============\\r\\n \\r\\n'), \n function(err) {\n if (err) throw err;\n });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\telse {\n\t\t\t\tconsole.log(\"Error :\"+ err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n }", "title": "" }, { "docid": "86150f1636d10ca28d4eb9eb075d628e", "score": "0.5845086", "text": "function songLookUp(){\n\n\t//The actual search\n\tSpotify.search({type:'track', query: song}, function(error, data){\n\t\t\n\t\tif (error){\n\t\t\tconsole.log('Aw snap! Errors everywhere: ' + error);\n\t\t\treturn;\n\t\t} \n\t\t var artist= data.tracks.items[0].album.artists;\n\n\t\t var artName= [];\n\t\t for (var i = 0; i <artist.length; i++) {\n\t\t \tartName.push(artist[i].name)\n\t\t }\n\t \tconsole.log(\"---------------------\");\n\t \tconsole.log(\"Artist(s): \" + data[\"tracks\"].items[1].artists[0].name);\n\t \tconsole.log(\"Title: \" + data[\"tracks\"].items[0].name);\n\t \tconsole.log(\"Check it our here! \" + data[\"tracks\"].items[0].preview_url);\n\t \tconsole.log(\"Album Name: \" + data[\"tracks\"].items[0].album.name);\n\t \tconsole.log(\"---------------------\");\t\n \n\t});\n}", "title": "" }, { "docid": "4c56d07482f4664f547fe9c36ed47513", "score": "0.58360237", "text": "modifySongs() {\n let toBeSearchedSongs = [...this.state.songsList]\n let searchValue = this.state.searchText.toLowerCase()\n // console.log('search value is', searchValue)\n\n if (searchValue != '') {\n // if the user is searching something only then \n toBeSearchedSongs = toBeSearchedSongs.filter((song) => {\n\n let songAttrs = `${song.name}, ${song.genre.join(', ')}, ${song.singers.join(', ')}, ${(song.movie) ? song.movie : song.album}`\n songAttrs = songAttrs.toLowerCase()\n // console.log('attrs:', songAttrs, songAttrs.includes(searchValue))\n\n return songAttrs.includes(searchValue)\n })\n }\n\n this.setState({ songs: toBeSearchedSongs })\n\n if (toBeSearchedSongs.length == 0) {\n this.setState({ emptyMessage: 'Not found try with something else' })\n }\n }", "title": "" }, { "docid": "f010a0c97779d4fc9afc95014afe6cf9", "score": "0.58258754", "text": "function getActiveSongs() {\n return getActiveEffects().filter(isSong);\n}", "title": "" }, { "docid": "4bcaa65f01c7bd6b39e9775578aab83a", "score": "0.5819448", "text": "function getAlbum(song) {\n let split = song.split('\\n');\n let album = \"\";\n for (let i = 0; i < split.length; i++) {\n if (split[i].includes(\"{album:\") || split[i].includes('{ album:')) {\n //console.log(split[i]);\n album = split[i].replace(\"{album:\", '');\n album = album.replace('{ album:', '');\n album = album.replace('}', '');\n return album.trim();\n } else if (split[i].includes('{meta: album') || split[i].includes('{ meta: album')) {\n //console.log(split[i]);\n album = split[i].replace('{meta: album', '');\n album = album.replace('{ meta: album', '');\n album = album.replace('}', '');\n return album.trim();\n }\n }\n return \"Undefined\";\n}", "title": "" }, { "docid": "2ad6db10532eab58e6d961e81feed2e8", "score": "0.5810898", "text": "async function getLikedSongs(){\r\n const data = await spotifyAPI.getMySavedTracks({\r\n limit: 50,\r\n offset: 1\r\n })\r\n\r\n let likedTracks = [];\r\n\r\n for(let track_obj of data.body.items){\r\n const track = track_obj.track;\r\n likedTracks.push(track);\r\n console.log(track.name);\r\n }\r\n\r\n return likedTracks;\r\n}", "title": "" }, { "docid": "4368ba380691d097c2fc60a0dbbe14cf", "score": "0.5807903", "text": "function spotifySong(song) {\r\n spotify.search({type: 'track', query: song}, function(error, data) {\r\n\r\n if(!error) {\r\n //Array to display song info\r\n for(var i = 0; i < data.tracks.items.length; i++) {\r\n var songData = data.tracks.items[i];\r\n //Output song data to terminal after parsing object\r\n console.log(\"Artist: \" + songData.artists[0].name);\r\n console.log(\"Song: \" + songData.name);\r\n console.log(\"Preview URL: \" + songData.preview_url);\r\n console.log(\"Album: \" + songData.album.name);\r\n console.log(\"------------------------------\");\r\n }\r\n } \r\n else {\r\n console.log('Error occurred. Tough luck.');\r\n }\r\n });\r\n}", "title": "" }, { "docid": "9cb2d40b41a54d2d41aab771926e8aa8", "score": "0.5801862", "text": "function spotifyThisSong(){\n var query = arg;\n spotify.search({ type: 'track', query: arg, limit: 1 }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n console.log(\"____________________________________________\\n\");\n console.log(\"Artists: \" + data.tracks.items[0].album.artists[0].name);\n console.log(\"Song: \" + data.tracks.items[0].name);\n console.log(\"Preview Link: \" + data.tracks.items[0].preview_url);\n console.log(\"Album: \" + data.tracks.items[0].album.name);\n });\n}", "title": "" }, { "docid": "accb9045872c4feda4964873322aeaf7", "score": "0.58016354", "text": "function displayTopTracks() {\n // div that will contain top songs\n const songsContainer = document.querySelector('.recommend-songs')\n // setting it empty so that songs do not duplicate on search\n songsContainer.innerHTML = ''\n // getting playlist, info about top songs, from localStorage\n const playlist = JSON.parse(localStorage.getItem('playlist'))\n // getting favorite song IDs from localStorage\n const favorites = JSON.parse(localStorage.getItem('favorites'))\n\n playlist.forEach(el => {\n let favStar = '<i class=\"song-fav far fa-star\"></i>'\n // chceking if any of top songs have already been liked by the user\n // if yes - putting the liked star next to that song\n favorites.forEach(elFav => {\n if(el.id === elFav.id) {\n favStar = '<i class=\"song-fav fas fa-star\"></i>'\n }\n })\n\n // displaying all the top songs on musicpage\n songsContainer.insertAdjacentHTML('beforeend', \n `<div class=\"song\" data-id=${el.id}>\n <p>${el.title}</p>\n ${favStar}\n </div>` \n )\n })\n\n // giving event listener to every song\n document.querySelectorAll('.song').forEach((el, index) => {\n // setting the first playing song color to be white\n if(index === 0) {\n el.style.color = '#fff'\n }\n\n el.addEventListener('click', (e) => {\n // getting the id of clicked song\n const videoId = e.target.getAttribute('data-id')\n\n // getting playlist from localStorage\n const playlist = JSON.parse(localStorage.getItem('playlist')).map(el => {\n return el.id\n })\n\n // playing the clicked song\n const songIndex = playlist.indexOf(videoId)\n player.playVideoAt(songIndex)\n\n // showing info about playing song - img, title\n setTimeout(() => {\n showPlayingSongInfo()\n }, 200)\n\n // clicked song color will be white\n currentPlayingSong('.song')\n })\n })\n\n // adding event listeners to stars - user likes and dislikes \n document.querySelectorAll('.song-fav').forEach(el => {\n el.addEventListener('click', () => {\n // if user did not like this song - star will have only border\n if(el.classList.contains('far')) {\n // replacing border star with full star after user likes the song\n el.classList.replace('far', 'fas')\n\n // getting the videoId of that liked song\n const id = el.parentNode.getAttribute('data-id')\n \n // finding clicked song info through videoId in the playlist\n const playlist = JSON.parse(localStorage.getItem('playlist'))\n let song\n playlist.forEach(el => {\n if(el.id === id) {\n song = el\n }\n })\n\n // adding that song info to favorites in localStorage\n const favorites = JSON.parse(localStorage.getItem('favorites'))\n favorites.push({\n id: song.id,\n artist: song.artist,\n title: song.title,\n img: song.img\n })\n\n localStorage.setItem('favorites', JSON.stringify(favorites))\n\n } else {\n // replacing full star with border star if user disliked song\n el.classList.replace('fas', 'far')\n\n // removing song from favorites in localStorage through videoID search\n const id = el.parentNode.getAttribute('data-id')\n favorites.forEach((el, index) => {\n if(el.id === id) {\n favorites.splice(index, 1)\n }\n })\n\n localStorage.setItem('favorites', JSON.stringify(favorites))\n }\n })\n })\n}", "title": "" }, { "docid": "7e2e4dffad3228e31d3403c39244a9f4", "score": "0.58005065", "text": "function spotifyThisSong(songName) {\n var spotify = new Spotify({\n id: keys.spotify.id,\n secret: keys.spotify.secret\n });\n var songName = process.argv[3];\n if (!songName) {\n songName = \"The Sign\";\n }\n spotify.search({ type: \"track\", query: songName }, function(err, data) {\n if (err) {\n return console.log(\"Error occurred: \" + err);\n }\n console.log(data);\n });\n params = songName;\n spotify.search({ type: \"track\", query: params }, function(err, data) {\n if (!err) {\n var songInfo = data.tracks.items;\n for (var i = 0; i < 5; i++) {\n if (songInfo[i] != undefined) {\n var spotifyResults =\n \"Artist: \" +\n songInfo[i].artists[0].name +\n \"\\r\\n\" +\n \"Song: \" +\n songInfo[i].name +\n \"\\r\\n\" +\n \"Album the song is from: \" +\n songInfo[i].album.name +\n \"\\r\\n\" +\n \"Preview Url: \" +\n songInfo[i].preview_url +\n \"\\r\\n\" +\n \"------------------------------ \" +\n i +\n \" ------------------------------\" +\n \"\\r\\n\";\n console.log(spotifyResults);\n log(spotifyResults); // calling log function\n }\n }\n } else {\n console.log(\"Error :\" + err);\n return;\n }\n });\n}", "title": "" }, { "docid": "48fdbcf79a038f9fe80c2a59a6d3e912", "score": "0.5797152", "text": "function spotifyThisSong(song) {\n\n\tconsole.log('\\n');\n\tconsole.log('Loading song data...')\n\n\tSpotify.search({ type: 'track', query: song }, function(error, data){\n\n\t\tvar result = data.tracks.items[0];\n\n\t\t// checks that the search was able to find a match\n\t\tif (data.tracks.items.length == 0){\n\t\t\tvar output = ['\\n', \"Couldn't find that song!\", '\\n']\n\n\t\t\tdisplayOutput(output);\n\t\t\tlogOutput(output);\n\n\t\t// found a result and didn't get an error\n\t\t} else if (!error) {\n\n\t\t\tvar output = ['\\n',\n\t\t\t\"==========================================================\",\n\t\t\t'\\n',\n\t\t\tresult.name,\n\t\t\t'\\n',\n\t\t\t\"==========================================================\",\n\t\t\t'\\n',\n\t\t\t\"==========================================================\",\n\t\t\t'Artist: ' + result.artists[0].name ,\n\t\t\t'Album: ' + result.album.name,\n\t\t\t'Spotify Link: ' + result.preview_url,\n\t\t\t\"==========================================================\",\n\t\t\t'\\n']\n\n\t\t\tdisplayOutput(output);\n\n\t\t\tlogOutput(output);\n\n\t\t// Error!\n\t\t}else {\n\n\t\t\tconsole.log('Error occurred: ' + error);\n\t\t\treturn;\n\t\t\t\n\t\t}\n\t});\n}", "title": "" }, { "docid": "39cd63aa42bfc4ac5e9376ad61aa93bd", "score": "0.5795758", "text": "function music(x){\n $.ajax({\n\n url: \"https://cors-anywhere.herokuapp.com/https://openwhyd.org/hot/\" + x + \"?format=json&limit=100\",\n method: \"GET\",\n error: function (e) {\n alert(\"connection issues\");\n\n }\n }).then(function (response) {\n console.log(response);\n for (var i = 0; i < response.tracks.length; i++) {\n songLinks.push(response.tracks[i].eId);\n songNames.push(response.tracks[i].name);\n }\n // splits soundcloud and youtube links/artists\n for(var i = 0; i<songLinks.length; i++){\n var verify = songLinks[i];\n if (verify.substring(0, 4) === \"/sc/\"){\n // use splice to remove soundcloud link at index i, 1 item \n var move = songLinks.splice(i, 1);\n var moveArtists = songNames.splice(i, 1);\n sc.push(move);\n scArtists.push(moveArtists);\n // console.log(sc);\n count++;\n }\n }\n console.log(\"soundcloud links: \" + sc);\n console.log(\"Youtube Links 1: \" + songLinks);\n console.log(\"count = \" + count)\n\n youtube();\n soundcloud();\n \n\n // if (count < 16){\n \n // }else{\n \n // }\n\n // if there are 20 soundcloud links - pull soundcloud links out and add to embedded player\n\n\n // console.log(songLinks);\n // console.log(songNames);\n \n });\n}", "title": "" }, { "docid": "8df34a0e238efe0ad1735c1d0f1482f1", "score": "0.57943565", "text": "function playMusic() {\n playSong(allSongs[index]);\n}", "title": "" }, { "docid": "bd0467bfb053a27bbe473499b6ab02e1", "score": "0.57902944", "text": "function getSongs(songs, callback) {\n\tvar count = 0;\n\tfor (var i in songs) {\n\t\tgetSong(songs, i, songs[i].artist, songs[i].song);\n\t\tif (i == songs.length - 1) {\n\t\t\tcallback(songs);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f95de90953218d191b907d8d4de10c09", "score": "0.5782982", "text": "function spotifySong() {\n\tif (searchName == \"\") {\n\t\tsearchName = \"The Sign Ace of Base\";\n\t};\n\nconsole.log(\"Search String: \" + searchName);\n\nspotify.search(\n\t{ type: 'track', \n\tquery: searchName\n\t})\n .then(function(response) {\n \tvar result = response.tracks.items[0];\n // console.log(result);\n console.log(\"==============\") ;\n\n \t// Get artists\n \tconsole.log(\"Artist(s): \" + result.artists[0].name);\n\n \t// Get song name\n \tconsole.log(\"Track: \" + result.name);\n\n \t// Preview link\n \tconsole.log(\"Preview: \" + result.preview_url);\n\n \t// Album\n \tconsole.log(\"Album: \" + result.album.name);\n \tconsole.log(\"==============\") ;\n\n })\n .catch(function(err) {\n console.log(error);\n });\n}", "title": "" }, { "docid": "d376f9320a9f957211b2318dd85f362f", "score": "0.5777145", "text": "constructor(){\n this.allAlbums = allAlbums;\n this.allAlbumsLength = this.allAlbums.length;\n\n this.firstAlbum = this.allAlbums[this.allAlbumsLength - 1];\n\n this.latestAlbum = this.allAlbums[0];\n this.latestAlbumId = this.latestAlbum.id;\n\n this.albumReleasedBeforeLatestAlbum = this.allAlbums[1];\n\n this.validStateParamIdsForAudioCds = ['5', '4', '3', '2'];\n \n this.isValidStateParamAlbumIdForAudioCd = (id) => this.validStateParamIdsForAudioCds.includes(id);\n\n this.quoteCharLimit = 800;\n\n\n /*\n // add showReadMore property to album\n // if quote.copy is larger than limit\n */\n if (this.allAlbums && this.allAlbums.length) {\n this.allAlbums.map((a) => {\n a.quotes && a.quotes.map((q) => {\n if (q.copy.length >= this.quoteCharLimit) {\n q.showReadMore = true;\n }\n });\n });\n }\n\n this.getAlbumById = (id) => {\n return this.allAlbums.find(a => a.id === Number(id));\n }\n\n /*\n // get all albums, apart from a comingSoon album or a given albumId\n */\n this.getAllOtherAlbums = (albumId) => {\n const filteredAlbums = this.allAlbums.filter((a) =>\n (a.id !== Number(albumId)) && !a.comingSoon\n );\n return filteredAlbums;\n }\n\n /*\n // get all released albums\n */\n this.getAllReleasedAlbums = () => this.allAlbums.filter((a) => !a.comingSoon);\n\n }", "title": "" }, { "docid": "645055d7df97900175956140266ddf39", "score": "0.5775709", "text": "function getSong() {\n if (userInput === \"\"){\n spotify.request(\"https://api.spotify.com/v1/tracks/0hrBpAOgrt8RXigk83LLNE\")\n .then(function(data){\n console.log(\n`\n----------------\nArtist(s): ${data.artists[0].name}\nTrack: ${data.name}\nAlbum: ${data.album.name}\nPreview Link: ${data.preview_url}\n----------------\n`\n );\n }\n )} else {\n spotify.search({ type: 'track', query: userInput, limit: 20}, function (err, data) {\n if (err) {\n console.log(\"Error: \" + err);\n } else {\n for (var i = 0; i < data.tracks.items.length; i++){\n console.log(\n`\n----------------\nArtist(s): ${data.tracks.items[i].artists[0].name}\nTrack: ${data.tracks.items[i].name}\nAlbum: ${data.tracks.items[i].album.name}\nPreview Link: ${data.tracks.items[i].preview_url}\n----------------\n`\n );\n }\n }\n })\n }\n // artist(s)\n // the song's name\n // a preview link of the song from spotify\n // the album that the song is from\n // if no song is provided, default to \"Dirty Deeds\" by ACDC\n}", "title": "" }, { "docid": "0239144e017cbcaf0d7127da62a70b3d", "score": "0.5772966", "text": "function song() {\n // if they don't type a song title\n if (value.length === 0) {\n value = \"The Sign + Ace of Base\"\n }\n //if they do type a song title\n //call for the infromation\n else {spotify.search({ type: 'track', query: value }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n //log certain information\n console.log(\"artist name: \", data.tracks.items[0].album.artists[0].name);\n console.log(\"album name: \", data.tracks.items[0].album.name);\n console.log(\"song name: \", data.tracks.items[0].name);\n console.log(\"preview: \", data.tracks.items[0].preview_url);\n\n });\n };\n}", "title": "" }, { "docid": "7df59d08719e5c90a4ff963c415f3049", "score": "0.57664466", "text": "function getSong(){\n var getSong = '';\n if(notEmpty != '' && notEmpty != null){\n for(var i = 3; i < search.length; i++){\n spotifySongArr.push(search[i]);\n }//end for loop\n getSong = spotifySongArr.join(\" \"); //variable that gets the word\n }else{\n getSong = 'The Sign'; //if the user does not enter a song, this is the default\n }//end else\n \n //spotify search function\n spotify.search({ type: 'track', query: getSong }, function(err, data) {\n if(err) {\n console.log('Error occurred: ' + err);\n return;\n }\n console.log(\"=========================================\");\n //artist name\n console.log(\"Artist: \" + JSON.stringify(data.tracks.items[0].album.artists[0].name, null, 2));\n //song name\n console.log(\"Song Title: \" + JSON.stringify(data.tracks.items[0].name, null, 2));\n console.log(\"Album Name: \" + JSON.stringify(data.tracks.items[0].album.name, null, 2));\n //preview link of the song\n console.log(\"Preview Song: \" + JSON.stringify(data.tracks.items[0].preview_url, null, 2));\n console.log(\"=========================================\");\n });//end function\n}//end function", "title": "" }, { "docid": "1ceff294fb8ce1edfaf82251a144e8a4", "score": "0.5766417", "text": "function spotifySong (mySong) {\n\n var Spotify = require('node-spotify-api');\n\n var spotify = new Spotify(keys.spotify);\n // song input\n var mySong = process.argv.slice(3).join('+');\n // default song input\n if (mySong == false) {\n mySong = \"the Sign\"\n }\n\nspotify.search({type: 'track', query: mySong, limit : 5 }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n var queryResult = data.tracks.items;\n\n for (var i = 0; i < queryResult.length; i++) {\n console.log(' ');\n console.log(\"Search result #\" + (i + 1));\n console.log('Artist name: ' + queryResult[i].artists[0].name);\n console.log('Track name: ' + queryResult[i].name);\n console.log('Preview: ' + queryResult[i].preview_url);\n console.log('album name: ' + queryResult[i].album.name);\n console.log('=================================');\n }\n});\n\n}", "title": "" }, { "docid": "fdbfa5c0f1c9e7dcb3e4447269d190fb", "score": "0.5761637", "text": "function getSong() {\n // Check to see if search field is empty, if so, it will default to search for The Sign by Ace of Base\n search = !search ? 'The Sign - Ace of Base' : search;\n\n // Run the API request from Spotify\n spotify.search({ type: 'track', query: search, limit: 1 }, function(err, data) {\n console.log(err ? 'Errors occurred: ' + err : \"\");\n\n console.log(\"***************************************\\r\\n\\r\\n\");\n console.log(\n \"Artist: \" + (data.tracks.items[0].artists[0].name) +\n \"\\nSong Title: \" + (data.tracks.items[0].name) +\n \"\\nPreview: \" + (data.tracks.items[0].preview_url) +\n \"\\nAlbum: \" + (data.tracks.items[0].album.name));\n console.log(\"\\r\\n\\r\\n***************************************\");\n })\n}", "title": "" }, { "docid": "ded2262fb9a87298088d8e83fe1e932e", "score": "0.5761632", "text": "function spotifyThisSong(at) {\n\tspotify.search({ \n\t\ttype: \"track\",\n\t\tquery: at,\n\t\tlimit: 1,\n\t},\n\t\n\tfunction(err, data) {\n\t\tif (!err) {\n\t\t\tvar songInfo = data.tracks.items;\n\n\t\t\tlet output = {\n\t\t\t\t\"Artist: \": songInfo[0].album.artists[0].name,\n\t\t\t\t\"Song \": songInfo[0].name,\n\t\t\t\t\"Album: \": songInfo[0].album.name,\n\t\t\t\t\"Preview: \": songInfo[0].preview_url\n\t\t\t};\n\t\t\tconsole.log(output);\n\t\t\tstoreData(output);\n\t\t} else {\n\t\t\treturn console.log('You broke it! ' + err);\n\t\t}\n\t})\n}", "title": "" }, { "docid": "8fa2b7e49eab8dcf097b1e3f25cb5336", "score": "0.57602644", "text": "async updateSongPool() {\n this.setState({ isLoadingSongs: true });\n let songPool = this.state.songsFromSelectedPlaylists;\n if (this.state.filterByArtistsEnabled) {\n songPool = this.getSongsMatchingArtist(this.state.artists, songPool);\n }\n let audioFilteringOptions = {\n filterByLoudnessEnabled: this.state.filterByLoudnessEnabled,\n filterByTempoEnabled: this.state.filterByTempoEnabled,\n filterByDanceabilityEnabled: this.state.filterByDanceabilityEnabled,\n desiredLoudness: this.state.loudness / 100.0,\n desiredTempo: this.state.tempo / 100.0,\n desiredDanceability: this.state.danceability / 100.0\n };\n if (\n this.state.filterByLoudnessEnabled ||\n this.state.filterByTempoEnabled ||\n this.state.filterByDanceabilityEnabled\n ) {\n songPool = await this.getSongsMatchingAudioFeatures(\n audioFilteringOptions,\n songPool,\n this.props.accessToken\n );\n }\n this.setState({ songPool: songPool });\n this.setState({ isLoadingSongs: false });\n }", "title": "" }, { "docid": "09e929f6cb482f6f5280a0c688513910", "score": "0.5751338", "text": "function loadSongs() {\n commonService.getData(commonConstant.API.SONG).then(function (response) {\n injectedVm.editPlaylistView.addSongTab.songs = response.data;\n // injectedVm.configDataPlaylistTable.items = response.data;\n setCheckBoxsModel();\n }, function (error) {\n console.log('error ', error);\n }).finally(\n function () {\n injectedVm.common.loadingState = false;\n }\n );\n }", "title": "" }, { "docid": "0f2a7e75a0683fc8deac3a0ed617e4ba", "score": "0.57494843", "text": "playWithMeta({commit,state,dispatch},songMeta){\n //check if the play list contains the song\n var index = state.playList.indexOf(songMeta.id)\n if(index<0) index = state.songIndex+1\n commit('addToPlayList',{songMeta,index})\n dispatch('playSongInThePlayList',index)\n }", "title": "" }, { "docid": "302a22a99d9eeb407bc4f192a9e4628f", "score": "0.57488734", "text": "function getSongsAction() {\n return {\n type: `${SERVER_ACTIONS.GET_SONGS}_FULFILLED`,\n payload: {\n type: `${SERVER_ACTIONS.GET_SONGS}`,\n payload: [{\n \"id\": 1,\n \"name\": \"Take On Me\",\n \"audio\": \"/music/funky_energy_loop.mp3\",\n \"seconds\": 203,\n \"album_id\": 1\n }]\n }\n }\n }", "title": "" }, { "docid": "966eda8b3baa0064359527f013ea9508", "score": "0.57473487", "text": "function spotifySearch(song) {\n spotify.search({\n type: 'track',\n query: song\n }, function (err, response) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n log(\" \");\n log(\"========== SPOTIFY INFO ==========\");\n // artist(s)\n log(\"Artist: \" + response.tracks.items[0].artists[0].name);\n // Song name \n log(\"Song: \" + response.tracks.items[0].name);\n // Preview link of song \n log(\"Preview Link: \" + response.tracks.items[0].preview_url);\n // album that the song is from\n log(\"Album: \" + response.tracks.items[0].album.name);\n log(\"==================================\");\n\n });\n}", "title": "" }, { "docid": "2c1e8037dfac1fe345f67be8bf28dc41", "score": "0.57442874", "text": "function gotAllSongs(err) {\n console.log(\"gotAllSongs()\");\n\n\n\n // report an error, you'd want to do something better than this in production\n if (err) {\n console.log(\"error loading data\");\n console.error(err);\n return;\n }\n\n // call functions to log and show the books\n consoleLogSongs();\n showSongs();\n}", "title": "" }, { "docid": "637ae5e4f9dd74baa651b5830153be68", "score": "0.57439417", "text": "function querySongs(query) {\n let items = [];\n resultMap = getList(query);\n \n for(key in resultMap) {\n let item = new SongItem(key, resultMap[key]);\n items.push(item);\n }\n return items;\n }", "title": "" }, { "docid": "b6053c560fd5c0828dc831c6c30415ea", "score": "0.5731987", "text": "function liriSpot() \n{\n lirispot.search({ type: 'track', query: thisSong}, function(err, data) {\n if ( err ) {\n console.log('Error occurred: ' + err);\n\t return;\n\t}\n else { \n \n console.log(\"you requested information for \" + thisSong);\n console.log(\"now displaying first two results\" + thisSong);\n\t for (i=0;i<2;i++)\n\t {\n console.log(\"Song Name : \" + data.tracks.items[i].name); \n console.log(\"Album : \" + data.tracks.items[i].album.name); \n console.log( \"Artists : \" + data.tracks.items[i].artists[0].name); \n console.log(\"Preview Url : \" + data.tracks.items[i].preview_url); \n\t console.log(\"\");\n\t console.log(\"______________________\");\n\t }\n \n }\n\t\t\t \n\t\t\t });\n}", "title": "" }, { "docid": "52fcb087a9a0289d5fbed55fe31168eb", "score": "0.57282835", "text": "function getSongInfo(song) {\n\n var songName = song.split(' ').join('+'); \n\n // If no song is provided then your program will default to \"The Sign\" by Ace of Base.\n if (!song || song == null) {\n songName = \"The Sign, Ace of Base\";\n }\n spotify.search({ type: 'track', query: songName, limit: 1 }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n if (!data) {\n console.log(\"NO SONGS FOUND\");\n } else {\n if (data.tracks.items[0] == undefined) {\n console.log(\"No Song Found\");\n return;\n }\n\n var artist = data.tracks.items[0].artists[0].name;\n\n for (var i = 1; i < data.tracks.items[0].artists.length; i++) {\n artist += \", \" + data.tracks.items[0].artists[i].name;\n }\n // This will show the following information about the song in your terminal/bash window\n // Artist(s)\n // The song's name\n // A preview link of the song from Spotify\n // The album that the song is from\n var songData =\n \"\\nArtist: \" + artist +\n \"\\nSong: \" + data.tracks.items[0].name +\n \"\\nLink: \" + data.tracks.items[0].external_urls.spotify +\n \"\\nAlbum: \" + data.tracks.items[0].album.name;\n console.log(songData);\n logIt(songData);\n }\n anotherSearch();\n\n })\n\n\n}", "title": "" }, { "docid": "35c766d155508f244201bcbc10a74157", "score": "0.5724313", "text": "function spotifyThisSong(songName) {\n var spotify = new Spotify({\n id: '128d40c272774296bf479af406f23b35',\n secret: '9714013db8f04d4b8f8b0efdddd87c79'\n });\n\n var songName = process.argv[3];\n if (!songName) {\n songName = \"What's my age again\";\n }\n params = songName;\n\n spotify\n\n .search({ type: 'track', query: params })\n .then(function(data) {\n for (var i = 0; i < 10; i++) {\n\n console.log(\"Artist: \" + data.tracks.items[i].artists[0].name);\n console.log(\"Track: \" + data.tracks.items[i].name);\n console.log(\"Album: \" + data.tracks.items[i].album.name);\n console.log(\"Preview Song: \" + data.tracks.items[i].preview_url);\n console.log(\"------------------------------------\");\n }\n })\n .catch(function(err) {\n console.error('Error occurred: ' + err);\n });\n}", "title": "" }, { "docid": "a5a7c731f64f843ec125275f037ed1cc", "score": "0.5722093", "text": "function songSearch(query){\n var spotify = new Spotify(keys.spotify);\n\n var category = 'track'; // easier to adjust if need to change down the line\n var song = (query != undefined) ? query : 'The Sign';\n \n logger.info(\"Song Search Query: \" +song+ \"\\n\");\n\n spotify.search({ type: category, query: song, limit: 10 }, function(err, response) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n \n var results = response.tracks.items;\n if (query != undefined){\n var songCount = 0;\n logger.info(\"\\[Users Song Search Results\\]\\nHere are the Song results for \\\"\" +query+ \"\\\"\\n\");\n results.forEach(function(result){\n songCount++;\n logger.info(\"\\[Song #\" +songCount+ \"\\]\");\n logger.info(\" Artist: \" +result.artists[0].name);\n logger.info(\" Song Name: \" +result.name);\n logger.info(\" Album Name: \" +result.album.name);\n logger.info(\" Song URL: \" +result.external_urls.spotify+ \"\\n\");\n }); \n }\n else{\n results.forEach(function(result){\n if ((result.artists[0].name) === \"Ace of Base\"){\n logger.info(\"\\[Default Song Chosen\\]\");\n logger.info(\" Artist: \" +result.artists[0].name); \n logger.info(\" Song Name: \" +result.name);\n logger.info(\" Album Name: \" +result.album.name);\n logger.info(\" Song URL: \" +result.external_urls.spotify+ \"\\n\");\n }\n });\n }\n });\n}", "title": "" }, { "docid": "9535a28fba7a6b6cbf6e230fa9c662e4", "score": "0.5712759", "text": "function getSongInfo() {\n spotify.search({ type: 'track', query: songTitle, limit: 1 }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n } \n console.log(`Artist(s): ${data.tracks.items[0].artists[0].name}`)\n console.log(`Song Title: ${data.tracks.items[0].name}`)\n console.log(`Preview Song: ${data.tracks.items[0].preview_url}`)\n console.log(`Album: ${data.tracks.items[0].album.name}`)\n });\n}", "title": "" } ]
10778f0b64c0ce34db97f2794b097098
unhides and objects (for IE only)
[ { "docid": "b94e0bc08004e0a32d302ef297d0cd27", "score": "0.0", "text": "function PopCalShowElement( elmTag )\r\n{\r\n\tif ( objPopCalendar.ie )\r\n\t{\r\n\t\tfor( var i = 0; i < elmTag.length; i++ )\r\n\t\t{\r\n\t\t\tvar obj = elmTag[i]\r\n\r\n\t\t\tif( obj )\r\n\t\t\t{\r\n\t\t\t\tif (obj.savedStyleDisplay!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (obj.savedStyleDisplay.toLowerCase() != \"hidden\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tobj.style.visibility = \"\"\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tobj.savedStyleDisplay = null\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" } ]
[ { "docid": "d0598e3ff8ca3ca034b2246b1df1c89d", "score": "0.75329584", "text": "static hide(obj) {\n obj.setAttribute('visibility', 'hidden');\n }", "title": "" }, { "docid": "002da4825691278222733716926c4003", "score": "0.7476564", "text": "function hide(obj) {\n\tvar theObj = getObject(obj)\n\ttheObj.visibility = \"hidden\"\n}", "title": "" }, { "docid": "917cfea8e500df9ecb0eb45e985e9575", "score": "0.738534", "text": "hide(){const a=this,b=a.graphic.container;b.style.visibility='hidden',b.style.opacity='0'}", "title": "" }, { "docid": "2a9aefafc952dc7dd0b99d6b944f4d34", "score": "0.72783333", "text": "hide() {\n if (this.visible) {\n this.visible = false;\n document.body.removeChild(this.infodiv);\n }\n }", "title": "" }, { "docid": "2cefc184016d35f7573f2b0f020a556b", "score": "0.7265596", "text": "function hide(obj) {\n var theObj = getObject(obj);\n if (theObj) {\n theObj.visibility = \"hidden\";\n }\n}", "title": "" }, { "docid": "6501fadd3fbe64be51a6c8bfd9663a84", "score": "0.72554576", "text": "function hideElements() {\r\n \r\n // hides the canvas drawing\r\n $('#drawing').hide();\r\n\r\n // hides all divs\r\n $('div').hide();\r\n\r\n // hides all buttons\r\n $(':button').hide();\r\n \r\n // unbinds all buttons\r\n $(':button').unbind();\r\n\t\r\n\thideImage()\r\n}", "title": "" }, { "docid": "ca6cd97df22550e85b32c2c6d9f401ef", "score": "0.72306913", "text": "function hideThis(object) {\n\tobject.style.visibility = \"hidden\";\n}", "title": "" }, { "docid": "69ab25c8af182e116c702efdab7f8679", "score": "0.71919864", "text": "function hide() {}", "title": "" }, { "docid": "cff81c0c90f0cc38d4828443eef50cad", "score": "0.7130865", "text": "function hideObjects() {\n var arrO = document.getElementById(\"article\").getElementsByTagName(\"*\");\n\n for (var i = 0; i < arrO.length; i++ ) {\n if( hasClass( arrO[i], \"jshidden\" ) ) {\n arrO[i].style.display = \"none\";\n }\n }\n }", "title": "" }, { "docid": "eca4c215656ce8f05d548bddb785b55f", "score": "0.70655316", "text": "hide() {\n this.setAll('visible', false);\n }", "title": "" }, { "docid": "c990a1fdbb6236febe906c0e4498bc45", "score": "0.70219815", "text": "hide() {\n\t\tthis.is_show = false;\n\t}", "title": "" }, { "docid": "633a986416160cdcab5c9ab5c80d8fd8", "score": "0.701814", "text": "function unhide() {\r\n var hid = document.getElementsByClassName(\"exp\");\r\n if (hid[0].offsetWidth > 0 && hid[0].offsetHeight > 0) {\r\n hid[0].style.visibility = \"visible\";\r\n }\r\n}", "title": "" }, { "docid": "ad923a6af353ba19332772ba46aa0157", "score": "0.6992939", "text": "function OcultaObj(obj) {\n obj.style.display = \"none\";\n}", "title": "" }, { "docid": "c7ecd64eb0564ff9c2b900da887eab13", "score": "0.69835615", "text": "function hideObjectInfo()\n{\n $(this).find('div.object-delete').hide();\n $(this).find('div.object-change').hide();\n $(this).find('div.object-name').hide();\n $(this).find('div.object-left').hide();\n $(this).find('div.object-right').hide();\n\n $('#object-name-label').text('');\n}", "title": "" }, { "docid": "d5410777fd8d9d81bb535ac4604a6665", "score": "0.6961111", "text": "hide() {\n // this.baseElement.hidden = true;\n // this.baseElement.innerHTML = '';\n }", "title": "" }, { "docid": "8171fbc9d325cfddd39cf8528d5d1d7e", "score": "0.6949817", "text": "function hide(){\n //totalsVizDiv.hide();\n //timelineVizDiv.hide();\n }", "title": "" }, { "docid": "8171fbc9d325cfddd39cf8528d5d1d7e", "score": "0.6949817", "text": "function hide(){\n //totalsVizDiv.hide();\n //timelineVizDiv.hide();\n }", "title": "" }, { "docid": "91542a5cbb140f6f81c5603b44579d4e", "score": "0.6892169", "text": "hide(){\n this.setAttribute(\"visibility\", \"hidden\");\n }", "title": "" }, { "docid": "488fa8cb5b6c11d9c5df2d61b2f4f819", "score": "0.68862957", "text": "hide() {\n if (this.div) {\n this.div.style.visibility = \"hidden\";\n }\n }", "title": "" }, { "docid": "bbb9c6ab97349585b13e825b45db43f6", "score": "0.6884556", "text": "function hide()\n\t\t{\n\t\t\t for(var hi=0;hi<hide.arguments.length;hi++)\n\t\t\t\t {\n\t\t\t\t\t document.getElementById(hide.arguments[0]).style.visibility=\"hidden\";\n\t\t\t\t } \n \t\t}", "title": "" }, { "docid": "780f483e2b4f97655b9b1e0cb23f4edb", "score": "0.68531555", "text": "hide() {\n this._object3D.visible = false;\n\n if (this._pickingMesh) {\n this._pickingMesh.visible = false;\n }\n }", "title": "" }, { "docid": "f72161b9802d18c0a43a846e7670cf3c", "score": "0.6851684", "text": "function hide() {\n\t\tisVisible = false;\n\t\tholder.hide();\n\t}", "title": "" }, { "docid": "8ba1f33b85d37768110f023dad82ff16", "score": "0.6847984", "text": "hide () {\n\n\t}", "title": "" }, { "docid": "8ba1f33b85d37768110f023dad82ff16", "score": "0.6847984", "text": "hide () {\n\n\t}", "title": "" }, { "docid": "8d00f21d4e568ea0078df121a1b800fd", "score": "0.68419665", "text": "function removeObjects() {\n\t\trect.visible = false;\n\t\tbatRect.visible = false;\n\t\telecRect.visible = false;\n\t\tantennaeRect.visible = false;\n\t\tshellRect.visible = false;\n\t\tmoduleRect.visible = false;\n\t}", "title": "" }, { "docid": "226050701cea06d86779763906f65dba", "score": "0.6836545", "text": "hide() { }", "title": "" }, { "docid": "8e47e344642dbd00a948928e6a8de19c", "score": "0.6833029", "text": "function hideMe(obj) {\n\t\tobj.style.visibility = 'hidden';\n\t\t$(\"body\").removeClass(\"noScroll\");\n}", "title": "" }, { "docid": "961f96854f14cda2c1a14ee77b30dc32", "score": "0.6795041", "text": "function hide(objectId){\n var obj = document.getElementById(objectId);\n obj.setAttribute('style','visibility:visible');\n}", "title": "" }, { "docid": "f5ad0f9e23b648d6a0074127552a161f", "score": "0.6771169", "text": "function hideElement(el) {\nel.style.display = 'none';\n}", "title": "" }, { "docid": "37fea51102313d124961051d39484620", "score": "0.67448527", "text": "hideImgElement() { this.style.display = \"none\"; }", "title": "" }, { "docid": "a03fd659bab8e342fc230748cb42c8a6", "score": "0.6744413", "text": "hide() {\n this.setVisible(false)\n }", "title": "" }, { "docid": "c9cd654648736e3a1c98943b3e4532fd", "score": "0.6739541", "text": "function toggleVisibility(obj) {\n\tobj = $(obj); \n\tif(obj.is(\":visible\")){\n\t\tobj.hide();\n\t} else {\n\t\tobj.show();\n\t}\n}", "title": "" }, { "docid": "ec9625f18a5929e890a633cf31d3f710", "score": "0.673758", "text": "hide() {\n this._isVisible = false;\n addCssClass('#' + this._id, 'hide');\n }", "title": "" }, { "docid": "afe45980b7cb6e9e6d5d95aceb6902c4", "score": "0.67356646", "text": "hide() {\n if (this.div) {\n this.div.style.visibility = \"hidden\";\n }\n }", "title": "" }, { "docid": "30bdd94219063b5583ad9b698a3ccbb8", "score": "0.67340606", "text": "function hide()\n{\n remove();\n}", "title": "" }, { "docid": "df19e2c32f30b439cc18f6ceb9f1da8f", "score": "0.67332226", "text": "function unhideElement(element) {\n var x = document.getElementById(element);\n x.style.display = 'block';\n}", "title": "" }, { "docid": "e0bc2980573e2896ccb9391c0b73a143", "score": "0.6731063", "text": "hide() {\n\t\tthis.shouldBeShown = null;\n\t\tthis.syncWithDOM();\n\t}", "title": "" }, { "docid": "1b47147d5d53bef7a2d3970bdc115eff", "score": "0.67194456", "text": "hide() {\n this.off();\n super.hide();\n }", "title": "" }, { "docid": "6e8aadc235502a274e986a739a8a4954", "score": "0.6716211", "text": "hide() {\n this._hide();\n }", "title": "" }, { "docid": "2cfae4dde1ed4ab423853738b232d618", "score": "0.6691461", "text": "function hideParent(v_obj)\n{\n\tv_obj.parentNode.setStyle(\"display\",\"none\");\n\tv_obj.parentNode.setStyle(\"display\",\"\");\n}", "title": "" }, { "docid": "cad38e3f375a5795a53e7f870c013ea8", "score": "0.6687461", "text": "hide(el) {\n el.style.display = \"none\";\n }", "title": "" }, { "docid": "cad38e3f375a5795a53e7f870c013ea8", "score": "0.6687461", "text": "hide(el) {\n el.style.display = \"none\";\n }", "title": "" }, { "docid": "21b55fbbeaff813d74b7078cebb66bf6", "score": "0.66641057", "text": "hide() {\n if (!this._element) return;\n this._element.style.display = 'none';\n this._element.style.visibility = 'hidden';\n }", "title": "" }, { "docid": "4b1041acad43e28e2e04be7090099087", "score": "0.66618687", "text": "function hideElement(el) {\n\tel.style.visibility = 'hidden';\n\tel.style.display = 'none';\n}", "title": "" }, { "docid": "a2e563a50fc0caa19b9567398cb2bf92", "score": "0.6657066", "text": "function elementHide(element) {\n elementSetClass(element, CSS_VISIBLE, CSS_HIDDEN);\n}", "title": "" }, { "docid": "160151bf9d1a9812236eda12133fc5d9", "score": "0.6646096", "text": "function hide_unhide() {\n var x = document.getElementById(\"hide_unhide\");\n if (x.style.display === \"none\") {\n x.style.display = \"block\";\n } else {\n x.style.display = \"none\";\n }\n}", "title": "" }, { "docid": "8f7e1c12e0071cceed5e11685e82ebea", "score": "0.6635885", "text": "function hideBlase(){\n\t\t$(\"sprcontent\").style.display=\"\";\n\t\t$(\"sprcontent2\").innerHTML=\"\";\n\t\t$(\"sprcontent2\").style.display=\"none\";\n\t}", "title": "" }, { "docid": "e22491971c06513dbbe935b2314a8831", "score": "0.661779", "text": "function remove(){\n lens.style.visibility = \"hidden\";\n //zoomcon.style.visibility = \"hidden\";\n }", "title": "" }, { "docid": "59062b119d91317d22b07acdae943fd0", "score": "0.66048115", "text": "toggle(){this.hidden=!this.hidden}", "title": "" }, { "docid": "3bdfe798b86ee9e4fb4fa9cf37241921", "score": "0.6594316", "text": "function hideOther2 () {\n appify.style.display='none';\n sunflower.style.display='none';\n bokeh.style.display='none';\n }", "title": "" }, { "docid": "bef0679bad87935ddde996c872fb7285", "score": "0.6580397", "text": "hide() {\n if (this.visible) {\n // release the mouse event for the checkboxes\n input.releasePointerEvent(\"pointerdown\", this);\n // remove the debug panel from the game world\n game.world.removeChild(this, true);\n // mark it as invisible\n this.visible = false;\n // force repaint\n game.repaint();\n }\n }", "title": "" }, { "docid": "2e0d5b897ecf5bf6a43e30ba9b7b7d05", "score": "0.65723276", "text": "function showObject(obj) {\nif (ns4) obj.visibility = \"show\"\nelse if (ie4) obj.visibility = \"visible\"\n}", "title": "" }, { "docid": "0ccdef58d7677a641e81684acc315032", "score": "0.6568311", "text": "function show_hide(obj)\n{\n if (obj.style.display == 'block') {\n obj.style.display='none';\n return \">>\";\n } else {\n obj.style.display='block';\n return \"<<\";\n }\n}", "title": "" }, { "docid": "0e7439524845437ce8cdce778be72d21", "score": "0.6564496", "text": "_hideStuff(){\n this.$popinBoxes.removeClass(\"open\");\n this.$disabler.css(\"display\",\"none\");\n }", "title": "" }, { "docid": "6e53a59ae1c4e1473ed3e1e82b5ee0be", "score": "0.65632695", "text": "function toggleshowhide()\n\t{\n\t\tobj = document.getElementsByTagName(\"div\"); \n\t\t//alert(obj);\n\t\tif (obj.help.style.visibility==\"visible\")\n\t\t{\n\t\t\tobj.help.style.visibility=\"hidden\";\n\t\t}\n\t\telse if(obj.help.style.visibility==\"hidden\")\n\t\t{\n\t\t\tobj.help.style.visibility=\"visible\";\n\t\t}\n\t}", "title": "" }, { "docid": "d060e2e9c299fdac758ffacaa705acaf", "score": "0.6562178", "text": "hide() {\n if (this.data['display'] === 'visibility') {\n this._el.style.visibility = 'hidden';\n }\n else {\n this._el.style.display = 'none';\n }\n }", "title": "" }, { "docid": "08afcb189ad184af6e2acdc631eab683", "score": "0.65612483", "text": "function hideElement(el) {\n el.style.display = \"none\";\n }", "title": "" }, { "docid": "4ec40a0e160544a92dcd47106e091543", "score": "0.65529466", "text": "hide() {\n if (this.data['display'] === 'visibility') {\n this._el.style.visibility = 'hidden';\n }\n else {\n this._el.style.display = 'none';\n }\n }", "title": "" }, { "docid": "a79b18215b0ddcbb7ab97f22f7078a47", "score": "0.655157", "text": "hide() {\n\t\t//this._img.stop(false, true);\n\t\t//this._img.detach();\n\t\t//this._audio.detach();\n\t\t// Stop all animations in queue for this element\n\t\t//this._img.stop(true, true);\n\t\tthis._img.hide();\n\t\t// Removing and adding the src attribute of an img element forces \n\t\t// the animated gif to reload\n\t\tthis._img.removeAttr(\"src\");\n\t}", "title": "" }, { "docid": "c262983b4a20ac15000e68ee3f858a16", "score": "0.65294385", "text": "unhighlight() {\n this.forEach(function(sprite) {\n sprite.filters = null;\n }, this);\n\n this.data.pieceDataScreen.hide();\n }", "title": "" }, { "docid": "a0bd39f5db071c7ed21a9da558cf9809", "score": "0.6501727", "text": "function hidebox() {\n crossobj = ns6 ? document.getElementById(\"showimage\") : document.all.showimage\n\n crossobj.style.display = \"none\"\n\n}", "title": "" }, { "docid": "040f766e3e2d9aa348e1e524866fb1f5", "score": "0.649237", "text": "function Hideable() {}", "title": "" }, { "docid": "26c85a223ace9a3302a90d351c71e9b5", "score": "0.6490958", "text": "function unhide(divID) {\n\tvar item = document.getElementById(divID);\n\tif (item) {\n\t\titem.className=(item.className=='hidden')?'unhidde n':'hidden';\n\t\t\t}\n}", "title": "" }, { "docid": "050ff5b65a70195cc9480dde02b524d6", "score": "0.6482905", "text": "function hide(elem) {\n elem.style.display = 'none';\n}", "title": "" }, { "docid": "4b6992b9bb62f11fe664b1b9165ac6d0", "score": "0.6482268", "text": "function hide(element) {\n element.setAttribute('style', 'visibility:hidden');\n }", "title": "" }, { "docid": "95403a70028927e4442c92cb24247ae5", "score": "0.64666784", "text": "function setInvisible(group) {\n\t\t\tfor(var h in group) {group[h].visible = false;}\t\t\n\t\t}", "title": "" }, { "docid": "7d7c3a7af99d193fcea8403c8292797f", "score": "0.6463949", "text": "function hide()\n{\n\t// Stop any timers to prevent CPU usage\n\tdebug( \"hide()\" );\n\t\n\tg_shiftDown = false;\n\tUIshowZoomButton();\n}", "title": "" }, { "docid": "f7dd10dd24c19e9cbcc71d83c09751ca", "score": "0.6461129", "text": "function show(elm) {\n elm.removeClass('hidden');\n}", "title": "" }, { "docid": "56fc93089568cde01d1075bffe947556", "score": "0.6457675", "text": "function Ktml_setHiddenUIElements(hide) {\n\tif (hide & HIDE_ALL_UNTIL_ACTIVE) {\n\t\tthis.hidePropertyTag = true;\n\t\tthis.hideToolbarTag = true;\n\t\tthis.hideTagInspector = true;\n\t\tthis.hideTimed = true;\n\t} else {\n\t\tif (hide & HIDE_TAG) {\n\t\t\tthis.hideTagInspector = true;\n\t\t}\n\t\tif (hide & HIDE_TOOLBAR) {\n\t\t\tthis.hideToolbarTag = true;\n\t\t}\n\t\tif (hide & HIDE_PI) {\n\t\t\tthis.hidePropertyTag = true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7380b8a4ec9a7f4b47ba5af992f022e0", "score": "0.6434149", "text": "function _hide_in_ie( $dom ){\r\n if ( typeof( jQuery.browser ) != 'undefined' && jQuery.browser.msie ) {\r\n $dom.css({\"visibility\":\"hidden\"});\r\n }\r\n }", "title": "" }, { "docid": "635b88a7131aa44438bd22de10c11329", "score": "0.64257234", "text": "hide() {\r\n this.save();\r\n $([this.game.ui.glass, this.ui.config]).each((idx, elem) => {\r\n elem.toggleClass(\"hidden\");\r\n });\r\n }", "title": "" }, { "docid": "a22402fe46b3053cf0b1aa46ffeb3620", "score": "0.6424575", "text": "function hideElement (element) {\n\nelement.style.display = 'none';\n\n}", "title": "" }, { "docid": "63c29a70d63e637afa966226a36bc082", "score": "0.6420756", "text": "function showHide()\t{\nvar args = arguments\n\tfor (var i = 0; i < args.length; i += 2)\t{\n\tif (typeof args[i] == \"string\")\n\t\tvar theObj = setObject(args[i])\n\tif (args[i+1] == \"toggle\")\n\t\tif ((getObjVisibility(theObj) == \"visible\") || (getObjVisibility(theObj) == \"show\"))\n\t\t\thide(theObj)\n\t\telse show(theObj)\n\t\telse if (args[i+1] == \"hide\")\thide(theObj)\n\t\telse if (args[i+1] == \"show\")\tshow(theObj)\n\t}\n}", "title": "" }, { "docid": "0dac0064cdbdd1d9f033b111407639ad", "score": "0.6418774", "text": "function TDialogControl_HideAll() {\n\t\tif ( this.objects.length > 0 ) {\n\t\t\tfor ( var i = 0; i < this.objects.length; i ++ ) {\n\t\t\t\tthis.objects[ i ].Hide();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "78971166c8e156e2be0257bd14702fba", "score": "0.640948", "text": "function hide() {\r\n var hid = document.getElementsByClassName(\"exp\");\r\n if (hid[0].offsetWidth > 0 && hid[0].offsetHeight > 0) {\r\n hid[0].style.visibility = \"hidden\";\r\n }\r\n}", "title": "" }, { "docid": "38ca977bf1c531be083c4818cbd0c523", "score": "0.64031106", "text": "function showHide(ind){\n\t\t\tshapes[ind].classList.toggle(\"hide\");\n \t}", "title": "" }, { "docid": "e8c7affefd30cc72c85c806730dd4fa2", "score": "0.63874936", "text": "hide(narrator) {\r\n\t\tif(!narrator) narrator = this;\r\n\t\tnarrator.reset();\r\n\t\tnarrator.html.box.style.display = 'none';\r\n\t}", "title": "" }, { "docid": "4c7955f1cfc47e3a8463de60b9035121", "score": "0.6385365", "text": "function hideAllTags() {\n kingdom.style.display = \"none\";\n help.style.display = \"none\";\n drgdrp.style.display = \"none\";\n classify.style.display = \"none\";\n salftrs.style.display = \"none\";\n dblclicksalftrs.style.display = \"none\";\n drgdrpalftrs.style.display = \"none\";\n zlname.style.display = \"none\";\n performance1.style.display = \"none\";\n}", "title": "" }, { "docid": "e0f25e87e8a6ded5f1f454734df00f3b", "score": "0.6372839", "text": "hide() {\n this._items.forEach(item => item.deactivateInkBar());\n }", "title": "" }, { "docid": "282016ac58ba348741acf683124e5bd4", "score": "0.6368392", "text": "hide() {\n DOM.hide(this.el);\n this.el.classList.remove(CLASSES.CURRENT);\n }", "title": "" }, { "docid": "2d422f02c256f8896c0ae06c38c152b3", "score": "0.63560754", "text": "hide() {\n this.text.hide();\n this.line.hide();\n }", "title": "" }, { "docid": "d2968bb449ba3b5968b6aee067344c2d", "score": "0.6353031", "text": "function xMenuShowHide(obj)\n{\n\n\tif(obj.style.display == 'none'){\n\t\tobj.style.display = 'block';\n\t}else{\n\t\tobj.style.display = 'none';\n\t}\n\t\n}", "title": "" }, { "docid": "2f5a0efdca23966e0698609416312037", "score": "0.6351922", "text": "function onHide() {\n // Write here for the widget case\n model.write_data();\n var app = App.getApp();\n app.setProperty(INVERT, invert);\n }", "title": "" }, { "docid": "afcd5549a47739ae332b71d2b1d3b49c", "score": "0.63516533", "text": "function hide() {\n this.list.addClass(\"hide\");\n this.btn.removeClass(\"hide\");\n for (var i = 0; i < this.editableEntries.length; i++) {\n this.editableEntries[i].value(\"\");\n }\n this.list.off(\"click\", this.menuClickHandler);\n Element.get(document.body).off(\"click\", this.outClickHandler);\n }", "title": "" }, { "docid": "32d112499960a651cb5152c1e3f7dabe", "score": "0.63501114", "text": "hide() {\n this.hidden = true;\n this.frame.style.visibility = \"hidden\";\n }", "title": "" }, { "docid": "d27a845a910c9fc08b9451f7cb62b2e8", "score": "0.6346953", "text": "function hideUni(objet)\n{\n\tvar unique = document.getElementById(objet);\n\tunique.style.display = \"none\";\n}", "title": "" }, { "docid": "ee6754e554651393643b8f44445d6e33", "score": "0.6346182", "text": "function hide(which)\n{\n setCorrectStorage(\"hide\", which);\n setDisplayStyle(which, \"none\");\n setCorrectText();\n}", "title": "" }, { "docid": "1c0d7edf0ff628a7052e9026d61311f8", "score": "0.63437235", "text": "function poiHideMe(id) {\n globalVar.poiObj[id].setMap(null);\n infoWindow[id].setMap(null);\n label[id].setMap(null);\n document.getElementById(\"poiToggle\" + id).innerHTML = \"<img src=\\\"\" + globalVar.baseURL + globalVar.baseImageDirURL + \"add.png\\\" onclick=\\\"poiShowMe(\" + id + \");\\\" />\";\n}", "title": "" }, { "docid": "628c6d34be010909c98cf65bca19d9d3", "score": "0.6340703", "text": "function hide(elements) {\r\n elements = elements.length ? elements : [elements];\r\n for (var index = 0; index < elements.length; index++) {\r\n elements[index].style.display = 'none';\r\n }\r\n }", "title": "" }, { "docid": "de7475ab49cc4a7f9f3a2592fd8ac5eb", "score": "0.6331597", "text": "hide() {\n if (this.div) {\n // The visibility property must be a string enclosed in quotes.\n this.div.style.visibility = 'hidden';\n }\n }", "title": "" }, { "docid": "fa2b299ae6d4e0057ee2449a37ba3e91", "score": "0.6328321", "text": "hide() {\n this.active = false;\n this.container.hide();\n }", "title": "" }, { "docid": "510f4c247fb87966929db5b3b2323fb3", "score": "0.6326019", "text": "function hidden (id) {\n var comp = document.getElementById(id);\n if (comp != null)\n comp.style.display = \"none\";\n}", "title": "" }, { "docid": "2c0b5b3327fd6dd8711f8c5c1b55a3e1", "score": "0.6323958", "text": "function unhide(clickedButton, divID) {\n\tvar item = document.getElementById(divID);\n\tif (item) {\n\t if(item.className=='hidden'){\n\t item.className = 'unhidden';\n\t clickedButton.value = 'Hide Answer Explanation';\n\t }else{\n\t item.className = 'hidden';\n\t clickedButton.value = 'Show Answer Explanation';\n\t }\n }}", "title": "" }, { "docid": "41182cbf223b57d7c4ac85e009a9b47d", "score": "0.6323573", "text": "function publicHide() {\n publicInit();\n\n if (counter > 0)\n counter--;\n\n if (counter == 0) {\n hide();\n }\n }", "title": "" }, { "docid": "3e6fe43c4506d5c170e64a1fe8a2ccae", "score": "0.63194996", "text": "function hideToggle () {\n\t$('.hide').toggleClass('unhidden hidden');\n}", "title": "" }, { "docid": "ebe6ef2ee2f459fb0f8919f1482f48fc", "score": "0.631646", "text": "function hide()\n{\n}", "title": "" }, { "docid": "33c9b2c6d19f9f0a8f54c1e405b2f496", "score": "0.6315756", "text": "function disappearx(){\n\tparent.style.display=\"none\";\n}", "title": "" }, { "docid": "d923bceed83709f9930bc0d3ec7ef475", "score": "0.631377", "text": "function my_hide_div(itm)\n{\n\tif ( ! itm ) return;\n\t\n\titm.style.display = \"none\";\n}", "title": "" }, { "docid": "898244b690fa62e7ca602b80a47c1d2c", "score": "0.63085693", "text": "function makeInvisible(el) {\n var none = 'display:none;';\n if (U.isIE && (U.ieV === 6 || U.ieV === 7 || U.ieV === 8)) {\n el.style.setAttribute('cssText', none, 0);\n } else {\n U.sa(el, 'style', none);\n }\n }", "title": "" }, { "docid": "572b14b6f307ccf64005d3980df840eb", "score": "0.6299664", "text": "function unhideItem(tag) {\r\n $(tag).removeClass('hidden');\r\n }", "title": "" }, { "docid": "d33cdb08e8af0c056b82ef7f7341ad9f", "score": "0.6288387", "text": "function hide()\n{\n // nix\n}", "title": "" } ]
effc46f08c95fa2847be2e4e2a05617b
initialize the routes for HTTP server express
[ { "docid": "fba922d19dc13091fd68f3cdf44724a5", "score": "0.7883788", "text": "function initializeRoutesExpressServer (app) {\n\n _initializeRoutesExpress(app, routesGeneral, '/');\n _initializeRoutesExpress(app, routesREST, '/api');\n _initializeRoutesExpress(app, routesAdmin, '/api/admin');\n\n //file uploads\n app.use('/upload', routesUpload);\n}", "title": "" } ]
[ { "docid": "3b28c76c7b05dfca7c79bccff5a97619", "score": "0.76534003", "text": "function init(server) {\n server.get('*', function (req, res, next) {\n console.log('Request was made to: ' + req.originalUrl);\n return next();\n });\n\n // server.get('/', function (req, res) {\n // res.redirect('/home');\n // });\n\n server.use('/',homeRoute)\n server.use('/api', apiRoute);\n server.use('/home', homeRoute);\n server.use('/featurefeed', feedRoute);\n server.use('/signUp', signUpRoute);\n server.use('/articles', articleRoute);\n // server.use('/error', errorRoute);\n}", "title": "" }, { "docid": "2ebcb389d65f38eb12342b350995ce21", "score": "0.73675567", "text": "_registerRoutes() {\n for (const middleware of this._config.middlewares) {\n this._app.use(middleware); // register middleware in app\n }\n for (const route of this._config.routes) {\n this._app.use(route.path, require(route.routerPath)(this, this._io)); // register router to route path\n }\n // catch-all 404 route (I will improve this later)\n this._app.all(\"*\", (req, res) =>\n res.status(404).send({\n status: \"error\",\n message: \"Not Found\",\n requestInfo: {\n method: req.method,\n url: req.url,\n originalUrl: req.originalUrl,\n },\n })\n );\n }", "title": "" }, { "docid": "4f8c709651b1869298dd7fee0560e532", "score": "0.73510075", "text": "routes() {\n this.server.use(routes);\n }", "title": "" }, { "docid": "e026e77a0b6f84e42f2c9ef756b61824", "score": "0.7337335", "text": "routes () {\n this.express.use(require('./routes'))\n }", "title": "" }, { "docid": "89fbb138034f3089009aaa5097323624", "score": "0.73352647", "text": "routes() {\n this.express.use(routes);\n }", "title": "" }, { "docid": "1332a05bfb998c86f30942a6e60adf9e", "score": "0.7313824", "text": "start(){\n\n\t\t//Create 404 messages for all uncaught routes\n\t\tthis.app.get('*', (req, res) =>{\n\n\t\t\t//Debug\n\t\t\tprint(\"Received invalid GET request for\",req.url);\n\n\t\t\t//Response\n\t\t\tres.writeHead(404, {'Content-Type': 'text/html'});\n\t\t\tres.write(\"<h1>404: If you see this, it's already too late!</h1>\");\n\t\t\tres.end();\n\t\t});\n\n\t\t//Initialize the server socket and start the webserver\n\t\tthis.server = this.app.listen(this.port, () => {\n\n\t\t\t//Debug\n\t\t\tprint('server is listening on port', this.server.address().port);\n\t\t});\n\t}", "title": "" }, { "docid": "9bb0e271b865dd038033cf8810adfd83", "score": "0.7307471", "text": "routes() {\n this.server.use(routes);\n this.server.use(Sentry.Handlers.errorHandler());\n }", "title": "" }, { "docid": "15b331c8a121da11b1290d73c39d9081", "score": "0.72847277", "text": "init(){\n\n\t\t// support json encoded bodies\n\t\tthis.app.use(express.json());\n\n\t\t// support encoded bodies\n\t\tthis.app.use(bodyParser.urlencoded({ extended: false }));\n\n\t\t//Static routing for public files\n\t\tthis.app.use('/', express.static(path.join(__dirname,\"..\", \"..\", \"public\")));\n\t}", "title": "" }, { "docid": "6a6c17ce34d5ee48c5da4a72dc9394f3", "score": "0.72502744", "text": "function initializeRoutesServerSocket(socket){\n\n _initializeRoutesSocket(socket, routesGeneral, '/');\n _initializeRoutesSocket(socket, routesREST, '/api');\n _initializeRoutesSocket(socket, routesAdmin, '/api/admin');\n// data.body = data;\n\n}", "title": "" }, { "docid": "13588a658ac65701694c62b1e9bffac6", "score": "0.7232205", "text": "init() {\n debug('Server is initializing.');\n\n this._app = express();\n\n this.initConfig();\n\n // configure app to use bodyParser()\n // this will let us get the data from a POST\n this._app.use(bodyParser.urlencoded({ extended: true }));\n this._app.use(bodyParser.json());\n\n this._port = nconf.get('port') || 8080;\n\n // ROUTES FOR OUR API\n this._router = express.Router();\n\n // Default route will output information that will be useful to API consumers\n this._router.get('/', function(req, res) {\n // npm_package_version is set as an env variable when using 'npm start'\n if (!nconf.get('npm_package_version')) {\n throw new Error(`No npm version available. Launch server with 'npm start'`);\n }\n \n res.json({ version: nconf.get('npm_package_version') });\n\n });\n\n // more routes for our API will happen here\n\n // REGISTER OUR ROUTES\n // all of our routes will be prefixed with /api\n this._app.use('/api', this._router);\n\n // START THE SERVER\n this._app.listen(this._port);\n console.log(`The server is now up and running on port ${this._port}`);\n }", "title": "" }, { "docid": "e7f677926ac373f0e69d8c5051865ef6", "score": "0.7207343", "text": "appRoutes(){\n\t\tthis.app.get('/searchProduct/:searchterm', routeHandler.searchProductHandler);\n\n\t\tthis.app.post('/products/:pageNo', routeHandler.productsHandler);\n\n\t\tthis.app.get('/filterData', routeHandler.filterDataHandler);\n\n\t\tthis.app.get('/productDetails/:id', routeHandler.productDetailsHandler);\n\n\t\tthis.app.get('*', routeHandler.routeNotFoundHandler);\t\t\n\t}", "title": "" }, { "docid": "0ee65bffb247489df9f2abec51cc946c", "score": "0.71779734", "text": "constructor() {\n\t\tthis._server = http.createServer(this._serverHandler);\n\t\tthis._routes = { GET: {}, POST: {} };\n\t}", "title": "" }, { "docid": "d49e0b56c9584e0b8b7b07d4262bf129", "score": "0.717299", "text": "buildRoutes() {\n this.app.use(\"/api\", new router_1.ApiRouter().getRouter());\n }", "title": "" }, { "docid": "24da92c237880e6b7d0abfaafb5fb34b", "score": "0.7167944", "text": "initExpress() {\n // create express\n this.app = express();\n this.initCORS();\n // add in any routes you might want\n this.initAppRoutes();\n // and start!\n this.app.listen(this.port);\n this.winston.info(\"Express started on (http://localhost:\" + this.port + \"/)\");\n }", "title": "" }, { "docid": "d77f672d5a12ce3c05b525e7c0ebc5db", "score": "0.71178186", "text": "routes() {\n this.app.use(indexRoutes_1.default);\n this.app.use('/api/users', usersRoutes_1.default);\n this.app.use('/api/specials', specialsRoutes_1.default);\n }", "title": "" }, { "docid": "2b1dcc6baa6ab47ab6de3b1958858b8d", "score": "0.7106882", "text": "function init(app) {\n\n // Index page is /home/dashboard\n app.get('/', function (req, res) {\n res.redirect('/home/dashboard');\n });\n\n // Make Express use these routers\n app.use('/home', homeRoute);\n app.use('/auth', authRoute);\n\n}", "title": "" }, { "docid": "3c159a68a0a9e8463cfac1822e19ceb8", "score": "0.70758146", "text": "function init() {\n // Start HTTP server (if enabled)\n if (config.ENABLE_HTTP_SERVER) {\n console.log(\"Starting SerGIS Game Engine HTTP server on port \" + config.PORT);\n\n // Create Express server instance\n var express = require(\"express\"),\n cookieParser = require(\"cookie-parser\");\n \n app = express();\n server = require(\"http\").Server(app);\n\n // Listen with the HTTP server on our port\n server.listen(config.PORT);\n\n // Create handler for serving \"/static\"\n app.use(\"/static\", express.static(config.STATIC_DIR));\n \n // Set up cookie processing\n app.use(cookieParser(config.COOKIE_SIGNING_KEY || undefined));\n\n // Create handler for serving \"/components-static\"\n app.use(\"/components-static\", express.static(config.CONTENT_COMPONENTS_STATIC_DIR));\n\n // Create handlers for our other page servers (see HTTP_SERVERS above)\n for (var pathDescrip in HTTP_SERVERS) {\n if (HTTP_SERVERS.hasOwnProperty(pathDescrip)) {\n app.use(pathDescrip, require(\"./modules/pageServers/\" + HTTP_SERVERS[pathDescrip]));\n }\n }\n }\n\n // Start socket server (if enabled)\n if (config.ENABLE_SOCKET_SERVER) {\n // Check if we already have the Express HTTP server\n if (app) {\n console.log(\"Starting SerGIS Game Engine socket server with HTTP server\");\n // Use the same server instance for the socket.io server\n io = require(\"socket.io\")(server);\n } else {\n console.log(\"Starting SerGIS Game Engine socket server on port \" + config.PORT);\n // There's no HTTP server yet; make socket.io listen all by its lonesomes\n io = require(\"socket.io\").listen(config.PORT);\n }\n\n // Create handlers for all our socket servers (see SOCKET_SERVERS above)\n for (var pathDescrip in SOCKET_SERVERS) {\n if (SOCKET_SERVERS.hasOwnProperty(pathDescrip)) {\n //io.of(pathDescrip).on(\"connection\", require(\"./modules/socketServers/\" + SOCKET_SERVERS[pathDescrip]));\n io.of(pathDescrip).use(require(\"./modules/socketServers/\" + SOCKET_SERVERS[pathDescrip]));\n }\n }\n }\n \n // Get ready for more\n console.log(\"\");\n}", "title": "" }, { "docid": "7e304711adae0244acfe74e9906ef458", "score": "0.7069567", "text": "routes() {\n this.app.use(this.apiPaths.customers, customer_1.default);\n this.app.use(this.apiPaths.ecommerce, ecommerce_1.default);\n this.app.use(this.apiPaths.channel, channel_1.default);\n this.app.use(this.apiPaths.orders, order_1.default);\n this.app.use(this.apiPaths.metrics, metrics_1.default);\n //Error handling\n this.app.use((err, req, res, next) => {\n res.status(500).json({\n message: err.message\n });\n });\n }", "title": "" }, { "docid": "28cf8f9e0c795a4bce05473b9b7ca5bd", "score": "0.70602167", "text": "function init() {\n const slh = express()\n\n // Static content\n slh.use(express.static(CFG.rootdir+'/www'))\n\n // Session managemement\n require('./modules/sessions').handle(slh)\n\n // Authentication\n const auth = require('./modules/auth')\n auth.init()\n auth.handle(slh)\n\n // Administration\n require('./modules/admin').handle(slh)\n\n\n // Load & initialize request handlers\n const handlers = (CFG.handlers || [\"default\"]).map(h => require('./modules/handlers/'+h))\n handlers.forEach(h => h.init(slh))\n\n\n // Find session id if supplied\n slh.param('slug', function(req, res, next, slug) {\n // Run all handlers that handle slugs\n let h = 0\n while(h < handlers.length) {\n // If handlers is equpped to handle slugs, try it\n if (handlers[h].matchSlug) handlers[h].matchSlug(req, res, next, slug)\n\n // Successful match, end processing\n if (res.headersSent) return;\n\n ++h\n }\n\n // Unknown slug (not handled by any of the handlers)\n console.log('Unknown request target: ', slug)\n next()\n })\n\n\n // Redirect session id-requests to the editor (handled by param)\n slh.get('/:slug', () => {})\n\n // All other requests redirect to main page\n if (CFG.home_url) {\n slh.get('*', (req, res) => {\n res.redirect(CFG.home_url)\n })\n }\n\n\n // Create vhost\n return slh\n}", "title": "" }, { "docid": "e338226db0d1ea15640154bdc1b9fb42", "score": "0.7054444", "text": "initialize() {\n\n server.enable('trust proxy');\n server.use(compression())\n server.use(express.static(config.base + '/public'))\n server.use(parser.json())\n server.use(parser.urlencoded({ extended: true }))\n\n // Serve the entry point\n server.get('/', (req, res) => res.sendFile(config.base + '/public/index.html'))\n\n // View engine setup\n server.set('view engine', 'ejs')\n\n // We are going to protect routes with JWT\n server.use(jwt({\n secret: config.secret\n }).unless({\n path: config.open_paths\n }))\n\n // Stream info logs now\n logger.streamInfo()\n server.use((req, res, next) => {\n logger.info({action: 'navigated', drilldown: req.method.toLowerCase() + '.' + req.url})\n next()\n })\n\n // Build the site\n site.build(server)\n\n // Error handlers\n this.errors()\n\n // Connect to mongoDB\n database.connect()\n\n }", "title": "" }, { "docid": "bd52d7a9a64e86f915d9ae438f310376", "score": "0.7031007", "text": "function startServer() {\n startHTTP(route, config);\n}", "title": "" }, { "docid": "d8737dac842d9793de36a275188d5d2a", "score": "0.697836", "text": "function initSharedRouting(app) {\n app.use('/css/bootstrap.css', express.static('node_modules/bootstrap/dist/css/bootstrap.min.css'));\n app.use(express.static('public'));\n app.use('/coffee-script.js', express.static('framer/coffee-script.js', { maxAge: foreverMaxAge}));\n app.use('/farmer.js', express.static('framer/farmer.js', { maxAge: foreverMaxAge}));\n app.use('/framer.js', express.static('framer/framer.js', { maxAge: foreverMaxAge}));\n app.use('/viewer?*', express.static('framer/framer.html'));\n app.use('/framer/images/', express.static('framer/images', { maxAge: foreverMaxAge}));\n}", "title": "" }, { "docid": "b58e7b738aa65968be7158a0d1bf2b73", "score": "0.69772536", "text": "init() {\n moduleUtils.patchModule(\n 'express',\n 'init',\n expressWrapper,\n express => express.application\n );\n moduleUtils.patchModule(\n 'express',\n 'listen',\n expressListenWrapper,\n express => express.application\n );\n moduleUtils.patchModule(\n 'express',\n 'use',\n useWrapper,\n express => express.Router\n );\n // Loop over http methods and patch them all with method wrapper\n for (let i = 0; i < methods.length; i += 1) {\n moduleUtils.patchModule(\n 'express',\n methods[i],\n methodWrapper,\n express => express.Route.prototype\n );\n }\n }", "title": "" }, { "docid": "74f499227fb440340fe5ab9707c747a3", "score": "0.6964386", "text": "_addRoutes() {\n const app = this._app;\n\n // Logging.\n app.use(this._requestLogger.expressMiddleware);\n\n // Thwack the `X-Powered-By` header that Express provides by default,\n // replacing it with something that identifies this product.\n app.use((req_unused, res, next) => {\n res.setHeader('X-Powered-By', this._serverId);\n next();\n });\n\n // Map Quill files into `/static/quill`. This is used for CSS files but not\n // for the JS code; the JS code is included in the overall JS bundle file.\n app.use('/static/quill',\n express.static(path.resolve(Dirs.theOne.CLIENT_DIR, 'node_modules/quill/dist')));\n\n // Use the client bundler (which uses Webpack) to serve JS bundles. The\n // `:name` parameter gets interpreted by the client bundler to select which\n // bundle to serve.\n app.get('/static/js/:name.bundle.js', new ClientBundle().requestHandler);\n\n // Use the configuration point to determine which directories to serve\n // HTML files and other static assets from. This includes (but is not\n // necessarily limited to) the top-level `index.html` and `favicon` files,\n // as well as stuff explicitly under `static/`.\n for (const dir of Deployment.ASSET_DIRS) {\n app.use('/', express.static(dir));\n }\n\n // Use the `@bayou/api-server` module to handle POST and websocket requests\n // at `/api`.\n\n app.post('/api',\n (req, res) => {\n try {\n new PostConnection(req, res, this._context);\n } catch (e) {\n log.error('Trouble with API request:', e);\n }\n });\n\n // **Note:** The following causes the websocket server instance to capture\n // the request before Express has an opportunity to dispatch at all.\n const wsServer = new ws.Server({ server: this._server, path: '/api' });\n wsServer.on('connection', (wsSocket, req) => {\n try {\n new WsConnection(wsSocket, req, this._context);\n } catch (e) {\n log.error('Trouble with API websocket connection:', e);\n }\n\n });\n wsServer.on('headers', (headers, req) => {\n this._requestLogger.logWebsocketRequest(req, headers);\n });\n }", "title": "" }, { "docid": "06c2755358bc18ba528857a9f8d3f521", "score": "0.6963101", "text": "constructor() {\n this.express = express();\n this.middleware();\n this.routes();\n }", "title": "" }, { "docid": "06c2755358bc18ba528857a9f8d3f521", "score": "0.6963101", "text": "constructor() {\n this.express = express();\n this.middleware();\n this.routes();\n }", "title": "" }, { "docid": "06c2755358bc18ba528857a9f8d3f521", "score": "0.6963101", "text": "constructor() {\n this.express = express();\n this.middleware();\n this.routes();\n }", "title": "" }, { "docid": "a81fff519c8e696007b29f2bdd0d0d3c", "score": "0.6960693", "text": "function setupExpress() {\n const app = express();\n const server = http.createServer(app);\n server.listen(3000, () => {\n console.log('🎧 listening on port 3000');\n });\n\n configExpress(app);\n\n // set up router\n const router = require('express-promise-router')();\n users.SetRouting(router);\n\n\n app.use(router);\n }", "title": "" }, { "docid": "8be72304f7a5628af294bed2356a50cc", "score": "0.69606537", "text": "constructor() {\n this.app = express_1.default();\n this.config();\n this.routes();\n }", "title": "" }, { "docid": "8be72304f7a5628af294bed2356a50cc", "score": "0.69606537", "text": "constructor() {\n this.app = express_1.default();\n this.config();\n this.routes();\n }", "title": "" }, { "docid": "d7ca94eeb2ddcc45b63a79305eb58be0", "score": "0.695656", "text": "routes() {\n this.app.use(index_route_1.default);\n this.app.use(imagenobra_route_1.default);\n this.app.use(obra_route_1.default);\n this.app.use(donaciones_route_1.default);\n this.app.use(contacto_route_1.default);\n this.app.use(quienessomos_route_1.default);\n this.app.use(categoriagaleria_route_1.default);\n this.app.use(categoriadonacion_route_1.default);\n this.app.use(tipoobra_route_1.default);\n this.app.use(categoriaobra_route_1.default);\n this.app.use(clasecontacto_route_1.default);\n this.app.use(autenticacion_route_1.default);\n this.app.use(imagengaleria_route_1.default);\n this.app.use(galeria_route_1.default);\n //la app usara la ruta upload para que el navegador pueda leer la carpeta y las imagenes\n this.app.use('/uploads', express_1.default.static(path_1.default.resolve('uploads')));\n }", "title": "" }, { "docid": "a7546deb56003cef6866a7cd3bc17ba9", "score": "0.6941817", "text": "routes(){\n //PERSONAL\n this.app.use(this.personalPath,require('../routes/personal.rout'))\n \n //CATEGORIA\n this.app.use(this.categoriaPath,require('../routes/categoria.rout'))\n\n //TIPO USUARIO\n this.app.use(this.tipoPath,require('../routes/tipousuario.rout'))\n\n //USUARIO\n this.app.use(this.usuarioPath,require('../routes/usuario.rout'))\n\n //ARTICULO\n this.app.use(this.articuloPath,require('../routes/articulo.rout'))\n\n //COMENTARIO\n this.app.use(this.comentarioPath,require('../routes/comentario.rout'))\n\n //RECURSO\n this.app.use(this.recursoPath,require('../routes/recurso.rout'))\n \n }", "title": "" }, { "docid": "7c2a3562445fd280e6eddc4ca9585cc1", "score": "0.69408906", "text": "function configureRoutes() {\n app.get('/palindrome', require('./service/algoritms').getPalindrome);\n app.get('/kcomplementary', require('./service/algoritms').getKComplementary);\n }", "title": "" }, { "docid": "83d1d9892127de71b6ec613055f673bf", "score": "0.69225496", "text": "router() {\n var me = this;\n this.app.all(this.settings.route, function(req, res) {\n // do we have a 404?\n if (!me[req.method]) {\n res.sendStatus(404);\n res.end();\n return;\n }\n\n // and call the appropriate method\n me[req.method](req, res);\n });\n }", "title": "" }, { "docid": "2c18b6d9f4c3c11d65fcf19766c9e818", "score": "0.69159025", "text": "routes() {\n // le damos uso al enrutador index\n this.app.use(index_route_1.default);\n this.app.use(movimiento_route_1.default);\n this.app.use(articulo_route_1.default);\n this.app.use(categoria_route_1.default);\n this.app.use(seccion_route_1.default);\n this.app.use(autenticacion_route_1.default);\n this.app.use('/upload', express_1.default.static(path_1.default.resolve('uploads')));\n }", "title": "" }, { "docid": "5a4fe3a73605f1fd1aac073d132ca6fe", "score": "0.6914188", "text": "function init(){\n var httpServer = http.createServer(function(req, res) {\n var content;\n console.log('requested url: ' + req.url);\n \n if(urls[req.url]){\n res.writeHead(200, {\"Content-Type\": \"application/json\"});\n \n\n if(config.mocksEnabled && typeof mocks[req.url] != \"undefined\"){\n content = mocks[req.url];\n console.log(\"responded with mock for \" + req.url);\n res.end(JSON.stringify(content));\n }\n else if(typeof urls[req.url].callbackAction == 'function'){\n urls[req.url].callbackAction(req, res);\n\n }\n else {\n content = urls[req.url].action(req.url);\n res.end(JSON.stringify(content)); \n } \n \n } else{\n res.writeHead(200);\n res.end('<h1>Not Found.</h1>');\n \n }\n\n\n });\n console.log('Starting http server in port ' + config.serverPort);\n httpServer.listen(config.serverPort); \n }", "title": "" }, { "docid": "510c60b8295c01b6b16b03746297a3dc", "score": "0.6914041", "text": "start() {\n this.buildRoutes();\n this.app.listen(this.port, () => console.log(\"Server listening on port \" + this.port + \"!\"));\n }", "title": "" }, { "docid": "e75d8ba0ce483fa8e78062cee4a1fcdf", "score": "0.6902029", "text": "constructor() {\n this.app = Express();\n this.initExpress();\n this.initExpressMiddleWare();\n this.initControllers();\n this.start();\n }", "title": "" }, { "docid": "f2cea969b77ec19f37503194b6b78ac5", "score": "0.6900313", "text": "function initApp(){\r\n app.listen(port, () => {\r\n console.log('\\nServer started on port ' + port + '...');\r\n });\r\n setupStaticFolder();\r\n setupRoutes();\r\n}", "title": "" }, { "docid": "8048220fd35a0419c3e3799cbb44330e", "score": "0.68938315", "text": "initExpress() {\n\t\tthis.app.set(\"port\", 8000);\n\t}", "title": "" }, { "docid": "d6008710a34f97c11d43470737cb2110", "score": "0.68719673", "text": "routes() {\n //Usamos un middlware condicional \n //entra a nuestra api\n this.app.use(this.apiPath, require('./routes/api.routes'))\n //entra a nuestro public donde hacemos el render del html (a futuro)\n this.app.use(this.publicPath, require('./routes/tienda.routes'))\n /* Rutas Del CRUD administrador */\n this.app.use(this.publicPath, require('./routes/admin.routes'))\n /* Rutas para las categorias */\n this.app.use(this.publicPath, require('./routes/categorias.routes'))\n /* Rutas para el usuario */\n this.app.use(this.publicPath, require('./routes/user.routes'))\n }", "title": "" }, { "docid": "db6cc6f9f387299a91ba4db070e8443f", "score": "0.6862936", "text": "start() {\n http.createServer((req, res) => {\n this.router.resolveRoute(req, res);\n }).listen(use('Ivy/Config').get('app.port'));\n }", "title": "" }, { "docid": "86f671e2816ca6b13c3369681dcb013c", "score": "0.68623453", "text": "function init(cb) {\n app.post('/testing', intentHandler);\n app.get('/hello', function(req, res){\n res.send(\"hello guys\");\n });\n app.listen(process.env.PORT);\n}", "title": "" }, { "docid": "5a0f9c052c21c752b9fbf0664016876d", "score": "0.6856291", "text": "init(app) {\n const {\n applicationPath,\n routeMatcher = '.route.js',\n } = app.cache;\n\n const files = walkSync(applicationPath, routeMatcher);\n for (const currentRoutePath of files) {\n if (currentRoutePath) {\n const fileRouter = require(currentRoutePath)\n const filename = basename(currentRoutePath);\n const arr = filename.split('.');\n arr.splice(-1, 1);\n arr.splice(-1, 1);\n const routeName = arr.join('');\n console.log('routeName', routeName);\n console.log('fileRouter', fileRouter);\n app.use(`/${routeName}`, fileRouter);\n }\n }\n\n console.log('-------------');\n console.log('Routes start:');\n app._router.stack.forEach(print.bind(null, []));\n console.log('Routes end.');\n console.log('-------------');\n }", "title": "" }, { "docid": "847cce7b4f643e285fe99f1a7d0b811a", "score": "0.6854397", "text": "function initRootRoutes(app) {\n app.get('/', function (req, res) {\n res.render('home');\n });\n\t\n app.get('/logout', function (req, res) {\n req.logout();\n res.redirect('/');\n });\n}", "title": "" }, { "docid": "fbed57dc48819882b93bf88ed749d2c8", "score": "0.68406206", "text": "initializeExpressApplication(){\n\n this[app] = express();\n\n this[router] = new Router(this.getMainController(), this.getSessionManager())\n this.getApp().use(bodyParser.urlencoded({extended: true}));\n this.getApp().use(bodyParser.json());\n this.getApp().use(cookieParser(config.cookieParserSecret));\n this.getApp().use(this.getSessionManager().getSession());\n this.getApp().use(express.static(path.join(__dirname, '../client')));\n this.getApp().use(this.getRouter().getRouterObject());\n this.getApp().set('port', process.env.PORT || 3000);\n this.getApp().set('view engine', 'pug');\n this.getApp().set('views','./client/views');\n }", "title": "" }, { "docid": "a6c2c7efd54bca5206df2ee2d74fe6ba", "score": "0.68391985", "text": "appRoutes() {\n this.app.post('/user', routeHandler.createNewUserRouteHandler); \n\n this.app.get('/user/:username', routeHandler.findUserByUsernameRouteHandler); \n\n this.app.delete('/user/:username', routeHandler.deleteUserByUsernameRouteHandler); \n\n this.app.put('/user/:username', routeHandler.updateUserRouteHandler);\n\n this.app.get('*', routeHandler.routeNotFoundHandler);\n }", "title": "" }, { "docid": "1779bfb4fd8c32a3bd046de91d78ae22", "score": "0.68077475", "text": "configRoutesServer() {\n // Usuarios\n this.app.use(`/${constants_1.default.OPENBIS}/users`, this.usuariosRoute.route);\n // Autenticacion\n this.app.use(`/${constants_1.default.OPENBIS}/authentication`, this.authRoute.route);\n // Perfiles\n this.app.use(`/${constants_1.default.OPENBIS}/perfiles`, this.perfilesRoute.route);\n // Categorias\n this.app.use(`/${constants_1.default.OPENBIS}/categorias`, this.categoriasRoute.router);\n // Establecimientos\n this.app.use(`/${constants_1.default.OPENBIS}/establecimientos`, this.establecimientosRoute.router);\n // Proveedores\n this.app.use(`/${constants_1.default.OPENBIS}/proveedores`, this.proveedoresRoute.router);\n // Almacenes\n this.app.use(`/${constants_1.default.OPENBIS}/almacenes`, this.almacenesRoute.router);\n // Productos\n this.app.use(`/${constants_1.default.OPENBIS}/productos`, this.productosRoute.router);\n // Utilerias\n this.app.use(`/${constants_1.default.OPENBIS}/util`, this.utilRoute.route);\n }", "title": "" }, { "docid": "23496402ba28443be0010148f738201e", "score": "0.6802156", "text": "function initialize(){\n return new Promise((resolve, reject) =>{\n\n const app = express()\n \n //Creating http server\n httpServer = http.createServer(app)\n\n app.use(bodyParser.json())\n \n app.use(cors())\n\n //including morgan to log requests\n app.use(morgan('combined'))\n\n //adding router\n app.use(router)\n \n httpServer.listen(webServerConfig.webServerPort)\n .on('listening', () => {\n console.log(`Web server started in the port: ${webServerConfig.webServerPort}`)\n resolve()\n })\n .on('error', err => {\n reject(err)\n })\n\n })\n}", "title": "" }, { "docid": "e6270090aabebd4ac1d66c1f2151b576", "score": "0.6801642", "text": "setup() {\n this.debug(\"Setting up...\");\n if (this.options.afterInit) {\n this.debug(\"Custom after init code present. Running it..\");\n this.app.afterInit = this.options.afterInit;\n }\n this.app.init(this);\n // Loops through all methods and registers them to the express.\n this.options.routes.forEach((route) => {\n this.app.register(route);\n });\n this.debug(\"Loaded all routes!\");\n }", "title": "" }, { "docid": "5093c4bd5ec11ab0df673438f013c429", "score": "0.67695224", "text": "function startListening() {\n app.set('views', __dirname + '/views');\n app.set('view engine', 'jade');\n app.use(bodyParser.json());\n app.use(express.static(path.join(__dirname, 'public')));\n \n // serve index and view partials\n app.get('/', webRoute.index);\n app.get('/create', webRoute.create);\n app.get('/partials/:name', webRoute.partials);\n\n // JSON API\n app.use('/api', apiRoute.api);\n\n // redirect all others to the 404\n app.get('*', webRoute.notfound);\n \n console.log('Listening on port ', config.api.port);\n app.listen(config.api.port);\n}", "title": "" }, { "docid": "9fbb3abf6bf7a5f99367a859420b11cd", "score": "0.6724178", "text": "function setupRoutes(){\r\n app.use('/users', users);\r\n}", "title": "" }, { "docid": "5a37229cf174554cd4829c4b5770c94c", "score": "0.6720341", "text": "createRoutes() {\n const config = this.utils.getConfig()\n const routes = config.routes\n\n for (let route in routes) {\n const { methods, middlewarePath, tasks } = routes[route]\n new Route(route, methods, middlewarePath, tasks).createRoute(this.router)\n }\n\n this.app.use(this.router.routes()).use(this.router.allowedMethods())\n }", "title": "" }, { "docid": "fd1e6e4cb08af56bca8dd0140c611511", "score": "0.6698468", "text": "_init() {\n for( let method in this.routes ) {\n this.routes[method].forEach( route => {\n this.router[method](route.path, this[route.method]);\n });\n }\n }", "title": "" }, { "docid": "beda8eb3a374f5f897f4965b5db4b6b0", "score": "0.66960305", "text": "initExpress() {\n this.app.set(\"port\", 8000);\n }", "title": "" }, { "docid": "f8ee0a84dc9c61ec89ae28e78b8e30d2", "score": "0.66930056", "text": "function init() {\n app.use(express.static('public'));\n \n require('./io.js')(io);\n \n http.listen(3000, function() {\n //\n });\n}", "title": "" }, { "docid": "7f5cf5cd227135bbbc9631e04b7a9f07", "score": "0.66856766", "text": "initialize () {\n // Create a new project\n this.router.post('/projects', (req, res) => this.createProject(req, res))\n // Retrieve the projects\n this.router.get('/projects', (req, res) => this.retrieveProjects(req, res))\n // Update a project\n this.router.put('/projects', (req, res) => this.updateProject(req, res))\n // Delete a project\n this.router.delete('/projects/:id', (req, res) =>\n this.deleteProject(req, res)\n )\n // Post an issue\n this.router.post(`/projects/issues`, (req, res) =>\n this.createIssue(req, res)\n )\n // Get all issues\n this.router.get(`/projects/issues`, (req, res) =>\n this.trackIssues(req, res)\n )\n }", "title": "" }, { "docid": "4f43ba4c949f1ef562199d29b5eb6b7a", "score": "0.66763765", "text": "function init_express_stack() {\nlogger.debug(\"[server: 3.0] init_express_stack: app.roure: Begin ---->\");\n\n// [3.1] CONTACTS API ROUTES BELOW\nlogger.debug(\"[server: 3.1] init_express_stack: [contacts] Object\");\nvar api_contacts = require('./api_contacts.js');\napp.route('/contacts')\n.get(api_contacts.get_contacts)\n.post(api_contacts.post_contacts);\napp.get('/contacts/:id', api_contacts.get_contacts_id);\napp.put('/contacts/:id', api_contacts.put_contacts);\napp.delete('/contacts/:id', api_contacts.delete_contacts);\n\nlogger.debug(\"[server: 3.9] init_express_stack: End: <----\");\n}", "title": "" }, { "docid": "289c145b28f617e8b3aeb1cb3281cf4a", "score": "0.6666351", "text": "constructor() {\n this.express = express();\n this.middleware();\n this.express.use(bodyParser.urlencoded({\n extended: true\n }));\n this.express.use(bodyParser.json());\n this.routes();\n }", "title": "" }, { "docid": "de9440efcb63b00ca4659ac30dd15055", "score": "0.6655273", "text": "static Init(){\n InitControllers();\n _httpServer = http.createServer(requestHandler);\n }", "title": "" }, { "docid": "c48e97b7eaef849e4fada7c004588f17", "score": "0.66484916", "text": "constructor() {\n this.express = express();\n this.middleware();\n this.initDB();\n this.initRouter();\n }", "title": "" }, { "docid": "7d031f2927b861b3d072f13c1cce4b4c", "score": "0.66441876", "text": "function loadRoutes() {\n let routesDirectory = path.join(__dirname, 'routes');\n fs.readdirSync(routesDirectory).forEach((moduleName) => {\n loadDirectoryModules(path.join(routesDirectory , moduleName)).forEach((route) => {\n app.use('/', require(route));\n });\n });\n // 404 handler\n var catchAll = function(req, res, next) {\n res.$end(new errors.ResourceNotFoundError());\n };\n //handles resource not found type for all method types\n app.get('*', catchAll);\n app.put('*', catchAll);\n app.post('*', catchAll);\n app.delete('*', catchAll);\n\n // error handler middleware\n app.use(function(err, req, res, next) {\n res.status(err.status || 500).end(err.message || 'Uh-oh. Something went wrong.');\n });\n}", "title": "" }, { "docid": "7262a0c2aca10134b001f934901d9e2b", "score": "0.66354644", "text": "function setupWebServer() {\n if (config_1.Config.WEB_ENABLED || config_1.Config.API_ENABLED) {\n const app = express();\n // tslint:disable-next-line:no-unsafe-any\n app.locals.site = {\n title: config_1.Config.MAIN_TITLE,\n };\n if (config_1.Config.WEB_ENABLED) {\n // setup handlebars as the views\n app.engine(\"hbs\", expressHandlebars({\n extname: \"hbs\",\n defaultLayout: \"main.hbs\",\n partialsDir: path_1.join(__dirname, \"views/partials\"),\n layoutsDir: path_1.join(__dirname, \"views/layouts\"),\n helpers,\n })); // tslint:disable-line:no-any - express-hbs definitions are borked\n app.set(\"view engine\", \"hbs\");\n app.set(\"views\", path_1.join(__dirname, \"views\"));\n app.use(\"/styles\", express.static(path_1.join(__dirname, \"styles\")));\n }\n // expect POSTs to be JSON formatted\n app.use(bodyParser.json());\n app.listen(config_1.Config.HTTP_PORT, () => {\n logger_1.logger.info(`🌐 Web server live on port ${config_1.Config.HTTP_PORT} 🌐`);\n for (const registerRoute of Object.values(routes)) {\n registerRoute(app);\n }\n });\n }\n}", "title": "" }, { "docid": "8c0336a8b2af5a9478d806d655e8713b", "score": "0.6634296", "text": "_addRoutes() {\n const router = this._router;\n\n this._bindParam('authorId');\n this._bindParam('documentId');\n this._bindParam('revNum');\n\n this._bindHandler('change', ':documentId/:revNum');\n this._bindHandler('client-test');\n this._bindHandler('edit', ':documentId');\n this._bindHandler('edit', ':documentId/:authorId');\n this._bindHandler('key', ':documentId');\n this._bindHandler('key', ':documentId/:authorId');\n this._bindHandler('log');\n this._bindHandler('snapshot', ':documentId');\n this._bindHandler('snapshot', ':documentId/:revNum');\n\n router.use(this._error.bind(this));\n }", "title": "" }, { "docid": "0a5aac086b0ba36d03beb59474dd1911", "score": "0.6624702", "text": "constructor() {\n this.express = express_1.default();\n this.middleware();\n this.routes();\n }", "title": "" }, { "docid": "3f3e88d2b79618c0a8246893f72a6cd9", "score": "0.6623038", "text": "init() {\n Promise.all([\n this.mongoose(),\n this.setMiddleware(),\n this.configureMiddleware(),\n this.globalLocalVariables(),\n this.routes(),\n this.main()\n ]).then(() => {\n console.log('Server running smoothly...');\n }).catch((err) => {\n console.log(err);\n });\n }", "title": "" }, { "docid": "8e3ed1000ac4d5cd1cae1f5c0de0dbcc", "score": "0.6614037", "text": "constructor(){\n this.app= express(); //App virn de express y inicializamos una instacia\n this.port = process.env.PORT;\n this.usuariosPath = '/api/usuarios';\n //mideleware\n this.mideleware(); //llaamos a nuestro metodo\n //rutas\n this.routes();\n }", "title": "" }, { "docid": "46e44c9e158bd181dcc382f458655fac", "score": "0.661282", "text": "function routes() {\n const reviews = express.Router();\n}", "title": "" }, { "docid": "27e5dca4b6a9e516ebe159fbc649bd5a", "score": "0.6595669", "text": "_initialize(){\n _each(this.routes, (route) => {\n route.regx = Router.routeToRegExp(route.path);\n });\n\n /** Adds prefix to regular expressions **/\n if(process.env.NODE_ENV !== 'production'){\n this.routes = this.routes.map((route) => {\n let path = route.path;\n if(path.indexOf('/') > 1){\n console.warn('Route should start with \"/\" char. Or should be index page \"(/)\". It can cause unexpected behaviour!', route);\n }\n route.regx = __modifyRouteRegx(route.regx);\n return route;\n });\n }\n }", "title": "" }, { "docid": "69f73cfabe9b1b41e9392fecc8a189b8", "score": "0.65599775", "text": "function init_app() {\n\t// all environments\n\tapp.set('port', process.env.PORT || 8080);\n\t\n\t// Use Jade to do views\n\tapp.set('views', __dirname + '/views');\n\tapp.set('view engine', 'jade');\n\n\t// Inital session\n\tapp.use(express.cookieParser());\n\tapp.use(express.session({secret: \"This is a secret\"}));\n\n\tapp.use(express.favicon());\n\t// Set the express logger: log to the console in dev mode\n\tapp.use(express.logger('dev'));\n\t// add middle ware to parse the post data of the body\n\tapp.use(express.bodyParser());\n\tapp.use(express.methodOverride());\n\tapp.use(app.router);\n\t// app.use(express.session({\n\t// // store: new RedisStore({\n\t// // host: \"cis550project.cmob3vqbmmc4.us-east-1.rds.amazonaws.com\",\n\t// // port: 1521,\n\t// // db: \"PENNTR\",\n\t// // pass: \"cis550key\"\n\t// // }),\n\t// secret: '1234567890QWERTY'\n\t// }));\n\t// Use Stylus, which compiles .styl --> CSS\n\tapp.use(stylus.middleware(\n\t { src: __dirname + '/public'\n\t , compile: compile\n\t }\n\t));\n\tapp.use(express.static(path.join(__dirname, 'public')));\n\n\t// development only\n\tif ('development' == app.get('env')) {\n\t app.use(express.errorHandler());\n\t}\n\n}", "title": "" }, { "docid": "7ddaec7e8448231090ba6fa055633932", "score": "0.65563387", "text": "function setupRoutes(routes) {\n routes.forEach(function (route) {\n var middleware = [route.handler];\n if ( route.needsAuth ) {\n middleware.unshift(require(\"./middleware/auth\")());\n }\n if ( route.needsSession ) {\n middleware.unshift(require(\"./middleware/session\")());\n }\n server[route.method](route.route,middleware);\n emit(\"info\",\"route: \"+route.method.toUpperCase()+\" \"+route.route+(route.needsAuth?\" +auth\":\"\"));\n });\n }", "title": "" }, { "docid": "66bcada1e45d6b905fe1c60af1c7008b", "score": "0.65524584", "text": "function setupAPIRoutes(app) {\n\tconst authRouter = require(\"./routes/authRoutes\")();\n\tapp.use('/auth', authRouter);\n\n\tconst userRouter = require(\"./routes/userRoutes\")();\n\tapp.use(\"/api/users\", userRouter);\n\n\t// 1 - Challenge Router\n\tconst challengeRouter = require(\"./routes/challengeRoutes\")();\n\tapp.use(\"/api/challenges\", challengeRouter);\n\n\t// 2 - Entry Router\n\tconst entryRouter = require(\"./routes/entryRoutes\")();\n\tapp.use(\"/api/entries\", entryRouter);\n\n\t// 3 - Filter Router\n\tconst filterRouter = require(\"./routes/filterRoutes\")();\n\tapp.use(\"/api/filters\", filterRouter);\n\n\tconst commentRouter = require(\"./routes/commentRoutes\")();\n\tapp.use(\"/api/comments\", commentRouter);\n\n\tconst feedRouter = require(\"./routes/feedRoutes\")();\n\tapp.use(\"/api/feeds\", feedRouter);\n\t\n\tconst categoryRouter = require(\"./routes/categoryRoutes\")();\n\tapp.use(\"/api/categories\", categoryRouter);\n\t\n\tconst socialRouter = require(\"./routes/socialRoutes\")();\n\tapp.use(\"/api/social\", socialRouter);\n\n\tconst postRouter = require(\"./routes/postRoutes\")();\n\tapp.use(\"/api/posts\", postRouter);\n\n\tconst designRouter = require(\"./routes/designRoutes\")();\n\tapp.use(\"/api/designs\", designRouter);\n\n\tconst contactRouter = require(\"./routes/contactRoutes\")();\n\tapp.use(\"/api/contact\", contactRouter);\n\n\tconst typeaheadRouter = require(\"./routes/typeaheadRoutes\")();\n\tapp.use(\"/api/typeahead\", typeaheadRouter);\n}", "title": "" }, { "docid": "5f04dd31d2414ab85a98589bc998cc32", "score": "0.653977", "text": "function setup(){\n //listeinng at our set port value\n app.listen(port, () => console.log(`Listening at ${port}`));\n\n //At our base url 'l' loading the static index.html file\n //And other files related to it from the path public/main\n app.use(express.static('public/main'))\n\n //At the url /Login loading the static index.html file\n //And other files related to it from the path public/login\n app.use('/Login', express.static('public/login'))\n\n //At the url /Signin loading the static index.html file\n //And other files related to it from the path public/sign_in\n app.use('/Signin', express.static('public/sign_in'))\n\n //Allowing our server to read and respond json files\n app.use(express.json( ))\n\n //Loading our data base and if ir dosent exist it makes it\n database.loadDatabase();\n}", "title": "" }, { "docid": "b5f74b3caf0266974a36f14f4313664c", "score": "0.65328836", "text": "constructor(){\n this.server = express();\n Sentry.init(sentryConfig); // start Sentry conexao\n\n this.middlewares();\n this.routes(); // permite acesso a rotas\n this.exceptionHandler();\n }", "title": "" }, { "docid": "dea67322f47aaddca9f68560a059332d", "score": "0.6521295", "text": "function initExpress(){\n console.log(\"Iniciando instancia de Express...\");\n app.listen(PORT, ()=>{\n console.log(\"El servidor Express esta activo.\");\n });\n // son dos controladores de eventos..\n // van a esperar dos señales q se disparan cuando se cierra node\n // y se dispara estos enventos(sigint,sigterm) lo que hace es\n // desconectar mongo(closeApp()) \n process.on(\"SIGINT\", closeApp);\n process.on(\"SIGTERM\", closeApp);\n process.on(\"ERROR\",closeApp);\n}", "title": "" }, { "docid": "f81f636ba81ffbbb5379ba261cf28fe2", "score": "0.6519601", "text": "function setupRoutes(app) {\n const base = app.locals.base;\n app.get(`/`, getDefault(app));\n app.get(`${base}/${USERS}/list`, listUsers(app));\n app.post(`${base}/${USERS}/register`, bodyParser.urlencoded({ extended: false }), registerUser(app));\n app.delete(`${base}/${USERS}/removeusers`, bodyParser.urlencoded({extended: false}), deleteUser(app));\n}", "title": "" }, { "docid": "65e36c711e7f90085ccbaec69e83b587", "score": "0.65017056", "text": "function routing(app){\n\n /*\n * Tests template doesn't use a layout, has its own.\n *\n * Calls out to getLocalsForUnitTests to fetch the appropriate template values\n **/\n app.get('/tests', function(req, res, next){\n var root = __dirname + '/public/',\n tests = [],\n error;\n\n walker(__dirname + '/public/test/')\n .on('file', function(file){\n if(/tests\\.js$/.test(file)){\n tests.push(file.substring(root.length));\n }\n })\n .on('error', function(err){\n console.error(err);\n error = err;\n })\n .on('end', function(){\n res.render('tests.template', {\n layout: false,\n tests: tests\n });\n });\n });\n\n /*\n * simply renders the HTML to the client\n **/\n app.get('/', function(req, res){\n var forwardCookies = req.headers.cookie;\n res.render('recorder.template', {\n locals: {\n baseHref: req.url\n }\n });\n });\n}", "title": "" }, { "docid": "b30e88186cd3f8a78e52f07e7762e8d6", "score": "0.6499334", "text": "function registerRoutes() {\n app.use('/', WeatherRoute);\n}", "title": "" }, { "docid": "7b3196957715d82deb37fa938f4987b7", "score": "0.6489863", "text": "configureRoutes() {\n this.configureRestart();\n //this.configureCrash();\n this.configureGetTime();\n this.configureGetSystemInformations();\n }", "title": "" }, { "docid": "27d14f734045753c83bf018465c6555a", "score": "0.6480032", "text": "function main () {\n let app = express(); // Export app for other routes to use\n app.use(cors());\n let handlers = new HandlerGenerator();\n const port = process.env.PORT || 8000;\n app.use(bodyParser.urlencoded({ // Middleware\n extended: true\n }));\n app.use(bodyParser.json());\n // Routes & Handlers\n app.post('/api/login', handlers.login);\n app.get('/api/', middleware.checkToken, handlers.index);\n app.get('/api/songs', middleware.checkToken, handlers.getSongs);\n app.listen(port, () => console.log(`Server is listening on port: ${port}`));\n}", "title": "" }, { "docid": "4f0a080e0f78d3994fd7085e960b4dd5", "score": "0.64797205", "text": "function init_app() {\n\t// all environments\n\tapp.set('port', process.env.PORT || 8080);\n\t\n\t// Use Jade to do views\n\tapp.set('views', __dirname + '/views');\n\tapp.set('view engine', 'jade');\n\n\t// Set the express logger: log to the console in dev mode\n\tapp.use(morgan(\"dev\"));\n\tapp.use(bodyParser.urlencoded({\n\t\textended: true\n\t}));\n\tapp.use(bodyParser.json());\n\tapp.use(methodOverride());\n\t// Use Stylus, which compiles .styl --> CSS\n\tapp.use(stylus.middleware(\n\t { src: __dirname + '/public'\n\t , compile: compile\n\t }\n\t));\n\tapp.use(express.static(path.join(__dirname, 'public')));\n\t//saves the user session\n\tapp.use(session({\n \t\tsecret: 'allyourbasearebelongtous',\n \t\tresave: false,\n \t\tsaveUninitialized: true\n\t}));\n\t// development only\n\tif ('development' == app.get('env')) {\n\t app.use(errorHandler());\n\t}\n\n}", "title": "" }, { "docid": "fadc3b23c2dcce1569563c38e6cd698a", "score": "0.6468066", "text": "setting(server) {\n const routes = bind(server);\n Promise.all(routes);\n }", "title": "" }, { "docid": "bb8d43016c80e5da08152de022b7bcc6", "score": "0.64673996", "text": "constructor() {\n //almacenamos express en app para hacer uso de sus funciones\n this.app = express_1.default();\n this.configuracion();\n this.middleware();\n this.routes();\n }", "title": "" }, { "docid": "6393e5133baf5c2a22b1c1b5dd800507", "score": "0.6430495", "text": "function route (app) { \n \t\n // Set index route\n app.get('/', utils.accesslog, function(req, res){\n res.render('index'); \n }); \n \n // Language choose route \n app.get('/locales/:choosed_lang', function (req, res) {\n req.session.language = req.params.choosed_lang;\n res.redirect('back');\n });\n\n // The static page routing\n app.get('/:static', utils.accesslog, function (req, res, next) {\n var size = parameters.static_route.length, count = 0;\n parameters.static_route.forEach(function (item) {\n if (req.params.static === item) {\n res.render(req.params.static);\n return; // Retrun to stop the forEach\n }\n // Count the route and, if the array complete the for, call next() \n count += 1;\n if (count == size) {\n next();\n }\n });\n });\n}", "title": "" }, { "docid": "d04c60715ff12129ae688258a878a259", "score": "0.64233226", "text": "onInitialized () {\n this.expressServer.run();\n }", "title": "" }, { "docid": "cbe317f9487cada6c2a51db98088a7c0", "score": "0.6399097", "text": "function startServer() {\n const app = express();\n const http = require(\"http\").Server(app);\n mongoose.connect(connectionString, { useNewUrlParser: true, useUnifiedTopology: true }).then(\n () => {\n console.log(\"Mongoose connected successfully \");\n },\n (error) => {\n console.log(\"Mongoose could not connect to database: \" + error);\n }\n );\n \n // http requests\n app.use(cors());\n// app.use(express.static(path.join(__dirname, \"./staticweb\")));\n app.use(express.json());\n app.all('/private/*', (req, res, next) => auth(req, res, next));\n app.use(\"/sign_in\", signIn);\n app.use(\"/private/sign_up\", signUp);\n\n app.get(\"/test\",(req,res)=>res.status(200).send(\"success\"));\n app.get(\"/private/getDeviceInfo\",getDeviceInfo);\n app.get(\"/private/getAllDeviceInfo\",getAllDeviceInfo);\n \n app.post(\"/private/registerDevice\",registerDevice);\n app.post(\"/private/setControllerForDevice\",setControllerForDevice);\n app.post(\"/private/sendCommandToDevice\",sendCommandToDevice);\n\n\n let port = process.env.PORT || \"8080\";\n http.listen(port, () => {\n console.log(`listen on port: ${port} with the pid: ${process.pid}`);\n });\n}", "title": "" }, { "docid": "c4bfe43e4ca44e4c69baeff882b04b1f", "score": "0.63919806", "text": "function octoris (options, routes) {\n debug('Running with: %o', { routes, options })\n const server = http.createServer(routes)\n\n debug('Created %o', server)\n\n return new Promise((resolve, reject) => {\n return server.listen(options, function serverCB (err) {\n if (err) {\n return reject(err)\n }\n\n return resolve()\n })\n })\n\n}", "title": "" }, { "docid": "4573d1297294f75eeab51e4c554bfec5", "score": "0.639135", "text": "initializeExpressApp(callback) {\n this.app = express();\n // view engine setup\n this.app.set('views', join(this.appBaseDir, 'views'));\n this.app.set('view engine', 'ejs');\n // uncomment after placing your favicon in /public\n // this.app.use(favicon(path.join(__dirname, 'prestine-public', 'favicon.ico')));\n this.app.use(logger('dev'));\n this.app.use(bodyParser.json());\n this.app.use(bodyParser.urlencoded({extended: false}));\n this.app.use(cookieParser());\n this.app.use(express.static(join(this.appBaseDir, 'prestine-public'))); // for fixed assets\n\n // TODO implement parseMultiTenantBasic\n // redirect or keep for tenent pages\n // this.app.use('/', this.parseMultiTenantBasic.bind(this));\n\n this.app.use(express.static(join(this.appBaseDir, 'public'))); // for dynamic built assets\n // FOR NUXT APP - Proper Way to serve. Fixes dynamic urls.\n this.app.use('/', (req, res, next) => {\n let filePath = join(__dirname, 'public', req.url);\n console.log('----req url ==', req.url);\n let tokens = req.url.split('/');\n let indexPath = null;\n if (tokens.length > 2) {\n tokens.pop();\n tokens.push(tokens[tokens.length - 1]);\n indexPath = join(__dirname, 'public', tokens.join('/'), 'index.html');\n }\n fs.access(filePath, fs.constants.F_OK, (err) => {\n if (err) {\n if (indexPath) {\n fs.access(indexPath, fs.constants.F_OK, (err) => {\n if (err) next();\n else fs.createReadStream(indexPath).pipe(res);\n });\n } else next();\n } else fs.createReadStream(filePath).pipe(res);\n });\n });\n this.app.use(function (req, res, next) {\n const url = req.headers.origin || req.headers.referer;\n res.header(\"Access-Control-Allow-Origin\", url);\n res.header(\"Access-Control-Allow-Headers\", \"Origin, X-Requested-With, Content-Type, Accept, Authorization, x-xsrf-token\");\n res.header(\"Access-Control-Request-Method\", \"GET, POST, PATCH, PUT, DELETE, OPTION\");\n res.header(\"Access-Control-Allow-Methods\", \"GET, POST, PATCH, PUT, DELETE, OPTION\");\n res.header(\"Access-Control-Allow-Credentials\", \"true\");\n next();\n });\n\n callback();\n }", "title": "" }, { "docid": "700d252b5762b70f0dfffe8b6d97b7e3", "score": "0.6390626", "text": "routes() {\n this.router.get('/:_id', this.getOneEvent);\n this.router.get('/', this.getEvents);\n this.router.post('/', this.createEvent);\n this.router.put('/:_id', this.updateEvent);\n this.router.delete('/:_id', this.deleteEvent);\n }", "title": "" }, { "docid": "2131dc080c9b1029692ab1a96d611331", "score": "0.63837916", "text": "function HttpApplication() {\n\tthis.app = express();\n\tthis._registerConfigurations();\n\tthis._registerMiddlewares();\n\tthis._registerControllers();\n\tthis._registerAreas();\n\tthis.initialize.apply(this, arguments);\n}", "title": "" }, { "docid": "99e24372d8ae64aa9cf9617dd79fd41a", "score": "0.6375198", "text": "function Server() {\n\n // configure express js for JSON handling\n app.enable('jsonp callback');\n app.use(bodyParser.json());\n app.use(bodyParser.urlencoded({\n extended: true\n }));\n app.use(expressValidator());\n app.use(compress());\n\n // add basic web security\n app.use(helmet.hsts({\n maxAge: 10886400000,\n includeSubdomains: true,\n preload: true\n }));\n app.use(helmet.xssFilter());\n app.use(helmet.frameguard());\n app.use(helmet.hidePoweredBy());\n app.use(helmet.ieNoOpen());\n app.use(helmet.noSniff());\n\n // add busy middleware for overloaded server state\n app.use(function tooBusyMiddleware(req, res, next) {\n tooBusy() ? res.status(503).json({\n \"status\": \"BUSY\",\n \"message\": \"Ups :( We're sorry, it seems the server is toobusy right now...please try again later...\"\n }) : next();\n });\n\n app.use('/mkt/', Router.init());\n}", "title": "" }, { "docid": "93ef8a729f2229d383f1a35925890ae6", "score": "0.6372097", "text": "function setupRoutes() {\n // example of using res.json to return a response\n api.get('/', (req, res) => {\n res.json({\n result: {\n msg: `hello from ${hydra.getServiceName()} - ${hydra.getInstanceID()}`\n }\n });\n });\n\n return api;\n}", "title": "" }, { "docid": "e7c65156aee6998069811cb3488ecadd", "score": "0.63664603", "text": "constructor() {\n // eslint-disable-next-line new-cap\n this.router = express.Router();\n\n this.router.get(routes.health, this._onHealthCheck);\n }", "title": "" }, { "docid": "d0d6e57fd16291bf53d286b3fa7cfd1f", "score": "0.635984", "text": "routes() {\n }", "title": "" }, { "docid": "e563babb9dfec3291296d6444f67a9ca", "score": "0.63562596", "text": "function _initRoutes(server) {\n\n let apiPath = config.server.apiURL;\n\n let curriculaBasePath = `${apiPath}/curricula`;\n\n let learningObjectivesBasePath = `${apiPath}/learningObjectives`;\n\n let learningObjectsBasePath = `${apiPath}/learningObjects`;\n\n // Routes for curriculum.\n server.get(`${curriculaBasePath}/:id`, controllers.curriculumController.findById);\n server.get(`${curriculaBasePath}/:id/linkedLearningObjectives`, controllers.curriculumController.findLinkedLearningObjectives);\n server.get(curriculaBasePath, controllers.curriculumController.findAll);\n server.post(curriculaBasePath, controllers.curriculumController.insert);\n server.put(`${curriculaBasePath}/:id`, controllers.curriculumController.update);\n server.del(`${curriculaBasePath}/:id`, controllers.curriculumController.remove);\n server.get(`${learningObjectivesBasePath}/curricula`, controllers.curriculumController.findByLearningObjective);\n\n // Routes for curriculum's folder, subFolders and learningObjects.\n server.get(`${curriculaBasePath}/:curriculumId/folders/path`, controllers.folderController.findByPath);\n server.get(`${curriculaBasePath}/:curriculumId/folders/path/.*`, controllers.folderController.findByPath);\n server.post(`${curriculaBasePath}/:curriculumId/folders/path`, controllers.folderController.insertForce);\n server.post(`${curriculaBasePath}/:curriculumId/folders/path/.*`, controllers.folderController.insertForce);\n server.put(`${curriculaBasePath}/:curriculumId/folders/path/.*`, controllers.folderController.update);\n server.del(`${curriculaBasePath}/:curriculumId/folders/path/.*`, controllers.folderController.remove);\n\n // Routes for performing sync operations on learningObjects.\n server.put(`${learningObjectsBasePath}/:id`, controllers.learningObjectController.updateSync);\n server.del(`${learningObjectsBasePath}/:id`, controllers.learningObjectController.removeSync);\n}", "title": "" }, { "docid": "424ff16c2081a3dabd20c08ca50d7400", "score": "0.6355856", "text": "start() {\n // Lets start the fatal logging before anything\n logger.streamFatal()\n\n this.setupTerminationHandlers()\n\n // Create the express server and routes.\n this.initialize()\n\n // Non secure\n http.createServer(server).listen(config.port, (err) => {\n console.log('Supercapacitor App started at %s on %s:%d ...', Date.now(), '127.0.0.1', config.port)\n })\n }", "title": "" }, { "docid": "5b1c5beade62b5699074dd0e6d7e4a52", "score": "0.63547397", "text": "function routes (app, db) {\n console.log('Entered index.js function.')\n var contentHandler = new ContentHandler(db, app.url, app.ballPositions);\n\n app.post('/', contentHandler.displayMainPage);\n app.post('/possession', contentHandler.changePossession);\n app.post('/advance', contentHandler.advanceBall);\n app.post('/question', contentHandler.displayQuestion);\n app.post('/answer', contentHandler.displayAnswer);\n console.log('Finished index.js function.')\n}", "title": "" }, { "docid": "7998540715c8bddfd112487194c53363", "score": "0.63521254", "text": "startWebserver() {\n var app = express();\n\n app.set(\"views\", __dirname + \"/../views\");\n app.set(\"view engine\", \"pug\");\n\n app.get(\"/\", (req, res) => {\n // Gather device infos\n const deviceMap = this.apiConnector.getDeviceMap();\n const baseHTMLOptions = {\n deviceMap: Object.fromEntries(deviceMap),\n };\n res.render(\"index\", baseHTMLOptions);\n });\n app.get(\"/jquery/(*)\", function (req, res) {\n res.sendFile(req.params[0], {\n root: __dirname + \"/../node_modules/jquery/dist/\",\n });\n });\n app.get(\"/datatables/(*)\", function (req, res) {\n res.sendFile(req.params[0], {\n root: __dirname + \"/../node_modules/datatables.net/\",\n });\n });\n app.get(\"/datatables-dt/(*)\", function (req, res) {\n res.sendFile(req.params[0], {\n root: __dirname + \"/../node_modules/datatables.net-dt/\",\n });\n });\n app.get(\"*\", (req, res, next) => {\n res.status(200).send(\"Sorry, requested page not found.\");\n next();\n });\n app.listen(this.port, () => {\n console.info(\"Server started at port \" + this.port + \"! #\");\n });\n }", "title": "" }, { "docid": "7bbdf009c16832bb5d51d88fb013d52a", "score": "0.63495207", "text": "function appRoutes(router){\n router.get('/simulation/:api', function(req, res) {\n var results = {\n api:req.params.api\n };\n return res.json({success: true, data: results});\n });\n return router;\n }", "title": "" }, { "docid": "ddbe1b7d7ea8509a691e516513353d3c", "score": "0.63379294", "text": "function initRouter(config) {\n const { photosDir, nrOfFramesFromCamera } = config;\n if (!photosDir) {\n console.log('[ERROR WEB_APP] Cannot initialize express router - invalid path to photos');\n }\n router.get('/getLatestPhotos', function (req, res) {\n res.send({ photos: getMostRecentFileNames(photosDir).slice(0, nrOfFramesFromCamera) });\n res.end();\n });\n return router;\n}", "title": "" } ]
e12af5cda4cc96ccd51cffffec0d49b8
Convert an object into a list of `[key, value]` pairs. The opposite of `_.object` with one argument.
[ { "docid": "38bdefb1ab1b7e9ecdd2e65e430634da", "score": "0.0", "text": "function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n }", "title": "" } ]
[ { "docid": "9e7f0f97e85418d153c09a49232a4464", "score": "0.7187535", "text": "function objectToArray(object) {\n return Object.entries(object);\n}", "title": "" }, { "docid": "4175344ec21efdb9c1c21cce576086d2", "score": "0.70759404", "text": "function objectValues(object) {\n var array = [];\n for (var key in object)\n {\n array.push(object[key]);\n }\n return array;\n}", "title": "" }, { "docid": "415fb1067a3f4040cf91188a0a27b378", "score": "0.6896879", "text": "function objectValues(object) {\n return Object.values(object);\n\n}", "title": "" }, { "docid": "d28b0e94aa45451471fc1d51bbd313f5", "score": "0.6783616", "text": "function values(object) {\r\n let values = [];\r\n for (let value in object) {\r\n if (object.hasOwnProperty(value)) {\r\n values.push(object[value]);\r\n }\r\n }\r\n return values;\r\n}", "title": "" }, { "docid": "9a497dd96bdbb31cd90bfa5f7585a8af", "score": "0.6756943", "text": "function objectToArray(obj) {\r\n return Object.keys(obj).map(function(key) {\r\n return obj[key];\r\n });\r\n }", "title": "" }, { "docid": "8300faed4371913796cc526a8f704fa8", "score": "0.6743791", "text": "function objectValues(object) {\n \n // Should take an object and return its values in an array\n \n let array = [];\n \n for (let key in object) array.push(object[key]);\n \n return array;\n \n}", "title": "" }, { "docid": "7c196de2d31ca1df8d15e6125352e385", "score": "0.66928256", "text": "function objectValues(object) {\nreturn Object.values(object); //return object values in an array\n}", "title": "" }, { "docid": "44362e7292334bc7c437f176bba9e09e", "score": "0.66388035", "text": "function objectValues(object) {\n var arr =[];\n\n for (var key in object){\n arr.push(object[key]);\n }\nreturn arr;\n}", "title": "" }, { "docid": "a573c69de30483787921194867f709c6", "score": "0.66348755", "text": "function objectToArray(object) {\n objectToArr = Object.entries(object);\n console.log(objectToArr);\n}", "title": "" }, { "docid": "5f4ff781d8feeda344dd53c172bda432", "score": "0.6617433", "text": "function toArray(obj) {\nreturn Object.entries(obj)\n}", "title": "" }, { "docid": "bd347c3d768e0386c9a42c363a7f4c11", "score": "0.6606769", "text": "function toList(data) {\n return Object.keys(data).map(key => data[key]);\n}", "title": "" }, { "docid": "aa93c4ee0e30f4582e195ef6a0eaf97d", "score": "0.6581759", "text": "function values(obj) {\r\n return Object.keys(obj).reduce(function (arr, key) {\r\n arr.push(obj[key]);\r\n return arr;\r\n }, []);\r\n}", "title": "" }, { "docid": "aa93c4ee0e30f4582e195ef6a0eaf97d", "score": "0.6581759", "text": "function values(obj) {\r\n return Object.keys(obj).reduce(function (arr, key) {\r\n arr.push(obj[key]);\r\n return arr;\r\n }, []);\r\n}", "title": "" }, { "docid": "1a4b16c8eb67d7ad080e33a7319e42ed", "score": "0.65718865", "text": "function values(obj) {\n return Object.keys(obj).reduce(function (arr, key) {\n arr.push(obj[key]);\n return arr;\n }, []);\n}", "title": "" }, { "docid": "1a4b16c8eb67d7ad080e33a7319e42ed", "score": "0.65718865", "text": "function values(obj) {\n return Object.keys(obj).reduce(function (arr, key) {\n arr.push(obj[key]);\n return arr;\n }, []);\n}", "title": "" }, { "docid": "1a4b16c8eb67d7ad080e33a7319e42ed", "score": "0.65718865", "text": "function values(obj) {\n return Object.keys(obj).reduce(function (arr, key) {\n arr.push(obj[key]);\n return arr;\n }, []);\n}", "title": "" }, { "docid": "1a4b16c8eb67d7ad080e33a7319e42ed", "score": "0.65718865", "text": "function values(obj) {\n return Object.keys(obj).reduce(function (arr, key) {\n arr.push(obj[key]);\n return arr;\n }, []);\n}", "title": "" }, { "docid": "2a60e273df575205b40088e4eee0eb0a", "score": "0.6561251", "text": "function items(obj) {\n\treturn [[key, value] for each ([key, value] in Iterator(obj))];\n}", "title": "" }, { "docid": "3a77dc297e2f5450d768d1022e909593", "score": "0.6532475", "text": "function toArray(obj){\n\tres = [];\n\tfor(var key of Object.keys(obj)){\n\t\tres.push([key, obj[key]]);\n\t}\n\treturn res;\n}", "title": "" }, { "docid": "f543b987b6e2f2aef48345444494ed7b", "score": "0.6529611", "text": "function values(obj) {\n return Object.keys(obj).map(function(k) { return obj[k]; });\n}", "title": "" }, { "docid": "c9ada6217d99fbe796d95dd9042f4b6a", "score": "0.65180266", "text": "function objectValues(object) {\nvar myArr = [];\n\nfor (var key in object){\n myArr.push(object[key]);\n}\nreturn myArr;\n}", "title": "" }, { "docid": "e526719365e4a8bbd23e6f1580de0118", "score": "0.6502151", "text": "function objectKeys(object) {\n if (Object.keys) {\n return Object.keys(object);\n }\n var result = [];\n\n angular.forEach(object, function (val, key) {\n result.push(key);\n });\n return result;\n}", "title": "" }, { "docid": "e526719365e4a8bbd23e6f1580de0118", "score": "0.6502151", "text": "function objectKeys(object) {\n if (Object.keys) {\n return Object.keys(object);\n }\n var result = [];\n\n angular.forEach(object, function (val, key) {\n result.push(key);\n });\n return result;\n}", "title": "" }, { "docid": "fd47e50bcffcd133ac7138f4d621f048", "score": "0.64736307", "text": "function objectValues(obj) {\n var res = [];\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n res.push(obj[i]);\n }\n }\n return res;\n }", "title": "" }, { "docid": "eefe5f91b8d761ff06024fbb996be0b6", "score": "0.64499515", "text": "function toArray(obj) {\n return Object.keys(obj).map(function(key){\n return {\n key: key,\n val: obj[key]\n }\n })\n}", "title": "" }, { "docid": "740cf4dd907c9117abea69b8351823ca", "score": "0.64412594", "text": "function Values(object){\n\treturn Object.keys(object).map(function(v, k){\n\t\treturn object[k];\n\t});\n}", "title": "" }, { "docid": "a0375d52c7ea7ae13782dc274bf0a835", "score": "0.6434447", "text": "function objectValues(object) {\n \n // create array literal \n var arr = [];\n // use for in loo to cycle over an object\n for(var key in object) {\n // use push method to add key into an arr\n arr.push(object[key]);\n }\n // retirn an arr\n return arr; \n}", "title": "" }, { "docid": "db106138425bc74a00ee1953536e2757", "score": "0.6432282", "text": "function objectToArray (obj) {\n var array = [];\n var keys = Object.keys(obj);\n var values = Object.values(obj);\n for (var i = 0; i < keys.length; i++) {\n var arrayTemp = [];\n arrayTemp.push(keys[i]);\n arrayTemp.push(values[i]);\n array.push(arrayTemp.slice());\n }\n return array;\n}", "title": "" }, { "docid": "c614ad1b93969534510f637ba921b9d7", "score": "0.6406503", "text": "function toPairs(obj) {\r\n if (obj[Symbol.iterator] instanceof Function && obj.entries instanceof Function)\r\n // 数组 集合 map\r\n return Array.from(obj.entries())\r\n else return Object.entries(obj) // 对象 字符串\r\n}", "title": "" }, { "docid": "48b9aaf0dadb0da016212e67797c63f7", "score": "0.6391264", "text": "function objectToArray(obj) {\r\n let arr=[]\r\n for(let key in obj){\r\n let val = obj[key];\r\n arr.push([key, val]);\r\n }\r\n return arr;\r\n }", "title": "" }, { "docid": "c48fd6d9b4ff0082b8c3dec9f3117e8a", "score": "0.6379711", "text": "function toArray2(obj){\n return Object.entries(obj);\n}", "title": "" }, { "docid": "cbd1b489f133810f78c90c64a7fa3c1b", "score": "0.63479334", "text": "function objectValues(object) {\n var theValues = Object.values(object);\n return theValues;\n}", "title": "" }, { "docid": "20f37dae68c1c0fa133df625754b8b42", "score": "0.6322894", "text": "function values(obj) {\n var results = [];\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n results.push(obj[key]);\n }\n }\n\n return results;\n}", "title": "" }, { "docid": "a0555ca8cebbcb2eaf66802fc3c46840", "score": "0.6306757", "text": "function _objectEntries(obj) {\n var entries = [];\n var keys = Object.keys(obj);\n\n for (var k = 0; k < keys.length; ++k) {\n entries.push([keys[k], obj[keys[k]]]);\n }return entries;\n}", "title": "" }, { "docid": "0157ac46188f2d8c7dcc38e3f4235b85", "score": "0.63029754", "text": "function Object2Array(obj) {\n var arr = [];\n $.each(obj, function (key, val) {\n arr.push(val);\n });\n return arr;\n}", "title": "" }, { "docid": "c973fb43150c58a5d167f8c25797788d", "score": "0.62983006", "text": "function entries(object){\n // This one's preeeeetty simple. Let's start by creating our output array\n let oEntries = [];\n\n // Loop through each key in the object itself\n for(let key in object){\n // and push an array with index 0 as key, and index 1 as value, into the oEntries array\n oEntries.push([key, object[key]]);\n }\n // and finally, return that array.\n return oEntries;\n}", "title": "" }, { "docid": "95f045c2f0aa0fc623fdcd066a09176a", "score": "0.62978405", "text": "function getKeys(object) {\n var keys = [];\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n return keys;\n }", "title": "" }, { "docid": "6397db667f9a5ff990916375fd30f3bb", "score": "0.6293379", "text": "function values(obj) {\n let result = [];\n Object.keys(obj).forEach(k => result.push(obj[k]));\n return result;\n}", "title": "" }, { "docid": "f8a8dbd8a79412170eba2f709f3a6081", "score": "0.6280197", "text": "function objectValues(obj) {\n let vals = [];\n for (const prop in obj) {\n vals.push(obj[prop]);\n }\n return vals;\n}", "title": "" }, { "docid": "2371daa290119a8b99d098c082a56d9d", "score": "0.6271894", "text": "function objTransform2(object) {\n let newArray = [];\n for (value in object) {\n newArray.push(object[value])\n }\n return newArray;\n}", "title": "" }, { "docid": "85a698b13892fac416baae7bddc37f3a", "score": "0.6240434", "text": "function keysFor(obj){\n a = []\n for(i in obj)\n a.push(i)\n return a\n}", "title": "" }, { "docid": "1b0833b186f6aad5bbf8895634d4ec78", "score": "0.6225286", "text": "function keys(object) {\n var output = [];\n for (var key in object) {\n if (hasKey(object, key)) {\n output.push(key);\n }\n }\n return output;\n}", "title": "" }, { "docid": "0e28e45ab14e5e46b20b4df65f33adbf", "score": "0.62066954", "text": "function toArray(obj) {\n var arr = [],\n prop;\n\n for (prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n arr.push(prop);\n }\n }\n\n return arr;\n}", "title": "" }, { "docid": "a4b80909e35c4a835ee865be3155d9d3", "score": "0.6204723", "text": "function keys(object)\n{\n var keys = [];\n for (var k in object) {\n keys.push(k);\n }\n return keys;\n}", "title": "" }, { "docid": "b44ca250dea8d734574b9029abd551a6", "score": "0.6181532", "text": "function _objectEntries(obj) {\r\n\t var entries = [];\r\n\t var keys = Object.keys(obj);\r\n\t\r\n\t for (var k = 0; k < keys.length; ++k) {\r\n\t entries.push([keys[k], obj[keys[k]]]);\r\n\t }return entries;\r\n\t}", "title": "" }, { "docid": "037dc4a1ac93625fb0dbc6c82419f766", "score": "0.6157608", "text": "_toArray(obj) {\n if (obj == null) {\n return [];\n }\n return Object.keys(obj).map(function(key) {\n return obj[key];\n });\n }", "title": "" }, { "docid": "6ad2fd9c4c3017f4f9918a4eab469379", "score": "0.61061406", "text": "function keys(obj){\n\tvar arr = [];\n\tfor(var key in obj){\n\t\tarr.push(key);\n\t}\n\treturn arr;\n}", "title": "" }, { "docid": "828ca110ccd31849cd61aed4d7ab6df0", "score": "0.61041224", "text": "function toArray(obj) {\n var array = [];\n for (var key in obj) {\n // we don't copy \"private\" variables either\n if (obj.hasOwnProperty(key) && key[0] !== '_') {\n array.push(obj[key]);\n }\n }\n \n return array;\n}", "title": "" }, { "docid": "618926c35cef5e64f9833ab76e06dd73", "score": "0.609933", "text": "function objectValues(object) {\nlet values = [];//create an empty array\nfor (let key in object) { //loop through object\n values.push(object[key]); //push in object[key] into values\n}\nreturn values; //return values\n}", "title": "" }, { "docid": "b909b88178476415ab57ec2ffa522b56", "score": "0.6096011", "text": "function vals(obj) {\n\tvar result = [];\n\tfor (var key in obj) {\n\t\tresult.push(obj[key]);\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "cf38abf7bc7fb28ee538e9aaeae5eeb8", "score": "0.60733813", "text": "function keysAndValues(obj) {\n\t// PATTERN 1\n\t// let keys = [];\n\t// let values = [];\n\t// for ( let [key, val] of Object.entries(obj)) {\n\t// \tkeys.push(key);\n\t// \tvalues.push(val);\n\t// }\n\t// return [keys.sort(), values.sort()];\n\n\t// PATTERN 2\n\treturn [ Object.keys(obj).sort(), Object.values(obj).sort() ];\n}", "title": "" }, { "docid": "0fc181189089b86cf92d5b1f7f1f4c8d", "score": "0.60716766", "text": "function getPlainObjectKeys(object) {\r\n var enumerables = new Set();\r\n for (var key in object)\r\n enumerables.add(key); // *all* enumerables\r\n Object.getOwnPropertySymbols(object).forEach(function (k) {\r\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\r\n enumerables.add(k);\r\n }); // *own* symbols\r\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\r\n // as there is no efficient iterator that returns *all* properties\r\n return Array.from(enumerables);\r\n}", "title": "" }, { "docid": "7ec093112832d9c36b416c7844d17f82", "score": "0.6057551", "text": "function objectToArray(obj) {\n\tlet array = [];\n\tlet keys = Object.keys(obj);\n\tfor(let j=0; j<keys.length; j++){\n\t\tarray[j] = [];\n\t}\n\t\n\tlet i=0;\n\twhile(i<keys.length){\n\t\tarray[i][0]=keys[i];\n\t\tarray[i][1]=obj[keys[i]];\n\t\ti++;\n\t}\n return array;\n}", "title": "" }, { "docid": "7c472094bb42d66df8b7277a1dd7b4be", "score": "0.6054636", "text": "function objectAdapter(object) {\n\tconst arrayOfObjects = [];\n\tfor (let key in object) {\n\t\tconst newDataObject = {};\n\t\tnewDataObject['value'] = key;\n\t\tnewDataObject['label'] = object[key];\n\t\tarrayOfObjects.push(newDataObject);\n\t}\n\treturn arrayOfObjects;\n}", "title": "" }, { "docid": "a9c915b4894225010e88c1964c249eb4", "score": "0.6054457", "text": "function keys(o){\n var tmp = new Array();\n for (k in o) tmp.push(k);\n return tmp;\n}", "title": "" }, { "docid": "73f4888c7e56acb90b2f353ec24d59b1", "score": "0.60526663", "text": "function getPlainObjectKeys(object) {\n var enumerables = new Set();\n for (var key in object)\n enumerables.add(key); // *all* enumerables\n Object.getOwnPropertySymbols(object).forEach(function (k) {\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\n enumerables.add(k);\n }); // *own* symbols\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\n // as there is no efficient iterator that returns *all* properties\n return Array.from(enumerables);\n}", "title": "" }, { "docid": "73f4888c7e56acb90b2f353ec24d59b1", "score": "0.60526663", "text": "function getPlainObjectKeys(object) {\n var enumerables = new Set();\n for (var key in object)\n enumerables.add(key); // *all* enumerables\n Object.getOwnPropertySymbols(object).forEach(function (k) {\n if (Object.getOwnPropertyDescriptor(object, k).enumerable)\n enumerables.add(k);\n }); // *own* symbols\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\n // as there is no efficient iterator that returns *all* properties\n return Array.from(enumerables);\n}", "title": "" }, { "docid": "9e42b392526acaa8519054691d5964dd", "score": "0.6041102", "text": "function keys(object) {\r\n let keys = [];\r\n for (let property in object) {\r\n if (object.hasOwnProperty(property)) {\r\n keys.push(property);\r\n }\r\n }\r\n return keys;\r\n}", "title": "" }, { "docid": "87d42995acb8294f6ceeaece691b2bf3", "score": "0.6040251", "text": "function getValues(obj){\n return _.values(obj);\n }", "title": "" }, { "docid": "c3736fb51f40076dd4fb25ece1840917", "score": "0.6032674", "text": "function getPlainObjectKeys(object) {\n var enumerables = new Set();\n\n for (var key in object) enumerables.add(key); // *all* enumerables\n\n\n Object.getOwnPropertySymbols(object).forEach(function (k) {\n if (Object.getOwnPropertyDescriptor(object, k).enumerable) enumerables.add(k);\n }); // *own* symbols\n // Note: this implementation is missing enumerable, inherited, symbolic property names! That would however pretty expensive to add,\n // as there is no efficient iterator that returns *all* properties\n\n return Array.from(enumerables);\n}", "title": "" }, { "docid": "eae0540bdfb35d4a86b1fc6a7b457196", "score": "0.60225457", "text": "function api_obj_to_array(obj) {\r\n\tvar result = [];\r\n\tfor (var key in obj) {\r\n\t\tif (obj.hasOwnProperty(key)) {\r\n\t\t\tresult.push(obj[key]);\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}", "title": "" }, { "docid": "09bc637fb8055c94d53d0aa076e0adb7", "score": "0.60125107", "text": "function objectKeys(obj) {\n\tif (Object.keys) return Object.keys(obj);\n\n\t// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),\n dontEnums = [\n 'toString',\n 'toLocaleString',\n 'valueOf',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'constructor'\n ],\n dontEnumsLength = dontEnums.length;\n\n if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {\n throw new TypeError('Object.keys called on non-object');\n }\n\n var result = [], prop, i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n return result;\n}", "title": "" }, { "docid": "14e35081dd9257eafb6b3f36a6a88e34", "score": "0.600763", "text": "function keys(obj) {\n if (!is_1.isObject(obj))\n return [];\n return Object.keys(obj);\n}", "title": "" }, { "docid": "fb79aa3f69553d54a295aff820de3e1c", "score": "0.60022724", "text": "function getValues(obj) {\n\treturn [v for each (v in o)];\n}", "title": "" }, { "docid": "a90978126889eddce80550a504f610e0", "score": "0.5973422", "text": "function objectValues(object) {\n// i object\n//o array\n// make array to collect it, and push into it\nlet arr = []\n// for key in loop. \nfor (let key in object){\n //push it into the array\n arr.push(object[key]);\n}\n//return array now that it has values\nreturn arr;\n\n}", "title": "" }, { "docid": "939192e69ee75d634d30f755743f3992", "score": "0.59659594", "text": "function objectKeys(obj) {\n if (typeof obj !== 'object') return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n }", "title": "" }, { "docid": "f3049104784c87080339e6add4a06ae7", "score": "0.5965292", "text": "function objectKeys(obj) {\n return Object.keys(obj);\n}", "title": "" }, { "docid": "1637d771d940e90aa5e514da04502228", "score": "0.5947977", "text": "function values(o) {\n var ks = Object.keys(o),\n len = ks.length,\n result = new Array(len),\n i;\n for (i = 0; i < len; ++i) {\n result[i] = o[ks[i]];\n }\n return result;\n}", "title": "" }, { "docid": "000d8b9ebfdcabbf1d2900aa9d85548d", "score": "0.59282756", "text": "function toArray(objectData){\r\n return Object.keys(objectData).map(function(key) {\r\n return objectData[key];\r\n });\r\n }", "title": "" }, { "docid": "000d8b9ebfdcabbf1d2900aa9d85548d", "score": "0.59282756", "text": "function toArray(objectData){\r\n return Object.keys(objectData).map(function(key) {\r\n return objectData[key];\r\n });\r\n }", "title": "" }, { "docid": "267adcae54baeffdb537b3cf586ebb68", "score": "0.59231234", "text": "function objectToArray(o) {\n var a = [],\n i;\n for (i in o)\n a.push(o[i]);\n return a;\n }", "title": "" }, { "docid": "55547ce9c6f1d908fe9092391163b7ca", "score": "0.5917124", "text": "function toArray(objectData) {\n return Object.keys(objectData).map(function (key) {\n return objectData[key];\n });\n }", "title": "" }, { "docid": "fd972a790438c0887fd346dc96a12aa2", "score": "0.5913916", "text": "function keys(object) {\n var __keys__ = [], prop;\n for (prop in object) __keys__.push(prop);\n return __keys__;\n}", "title": "" }, { "docid": "42fc19fd5e6fbb0919bde3b96b730ab7", "score": "0.5906796", "text": "function convertDictToList(dict) {\n\n var lst = [];\n\n for (var key in dict) {\n var obj = {\n 'label': key,\n 'value': dict[key]\n };\n\n lst.push(obj);\n }\n\n return lst;\n }", "title": "" }, { "docid": "31ff63def8a89d56d2e73c360e76aec9", "score": "0.58931035", "text": "function keys(o) {\n\tif (typeof o !== \"object\") throw TypeError();\n\tvar result = [];\n\tfor(var prop in o)\n\t{\n\t\tif (o.hasOwnProperty(prop))\n\t\t\tresult.push(prop);\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "c680429d0089fc24471e0135856bc618", "score": "0.58910304", "text": "transform(object) {\n if (!object) {\n return null;\n }\n return Object.keys(object);\n }", "title": "" }, { "docid": "4286731942e941970d3557176d094752", "score": "0.58839947", "text": "function items(obj) {\n\t var items_ = []\n\t for (var prop in obj) {\n\t if (hasOwn(obj, prop)) {\n\t items_.push([prop, obj[prop]])\n\t }\n\t }\n\t return items_\n\t}", "title": "" }, { "docid": "3d4dd38169562bbd1811757fbfed15b6", "score": "0.58795273", "text": "function objectKeys(obj) {\n if (typeof obj !== 'object') return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n }", "title": "" }, { "docid": "ac94b87c48a8b8acdbb1210eaa6979d2", "score": "0.5871173", "text": "function objectKeys (obj) {\n return Object.keys(obj)\n}", "title": "" }, { "docid": "15513382de88a261fffeb6abd8b33c59", "score": "0.5851139", "text": "function objectValues(object) {\n//take an object and return its values in an array\n//I -object\n//O -take the keys and place in array\n//C -meh\n//E -not that I can see\n//a for in loop using push\nlet array = [];\nfor (var key in object) {\n array.push(object[key]);\n}\nreturn array;\n\n}", "title": "" }, { "docid": "1edab454dd223e7d5b08dcf85e87742f", "score": "0.5850189", "text": "function keysFor(obj) {\n var keys = [],\n key;\n\n if (!obj) {\n return keys;\n }\n\n if (Object.keys) {\n return Object.keys(obj);\n }\n\n for (key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n keys.push(key);\n }\n }\n\n return keys;\n}", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "d3ce531e88297f139af2bc91a94d03c1", "score": "0.58294517", "text": "function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n }", "title": "" }, { "docid": "16f421ae2a530e54f68b2bc415cb552c", "score": "0.5827434", "text": "function _getKeys(obj) {\n\tvar keys = [];\n\tfor(var key in obj){\n\t keys.push(key);\n\t}\n\treturn keys;\n }", "title": "" }, { "docid": "d9ffdc3bb398276eb9fba352dffb75f8", "score": "0.5818606", "text": "function toArray(objectData){\n return Object.keys(objectData).map(function(key) {\n return objectData[key];\n });\n }", "title": "" }, { "docid": "d9ffdc3bb398276eb9fba352dffb75f8", "score": "0.5818606", "text": "function toArray(objectData){\n return Object.keys(objectData).map(function(key) {\n return objectData[key];\n });\n }", "title": "" }, { "docid": "d9ffdc3bb398276eb9fba352dffb75f8", "score": "0.5818606", "text": "function toArray(objectData){\n return Object.keys(objectData).map(function(key) {\n return objectData[key];\n });\n }", "title": "" }, { "docid": "4fe5c2a67df9ef02b0ab1e10036fd269", "score": "0.5813717", "text": "function allKeys(obj) {\r\n if (!types.isObject(obj)) return [];\r\n var keys = [];\r\n for (var key in obj) keys.push(key);\r\n return keys;\r\n }", "title": "" }, { "docid": "44212e1261eb66113ae4c9f6e2149c44", "score": "0.5803097", "text": "function Object_keys(obj) {\n\t if (Object.keys) return Object.keys(obj)\n\t else {\n\t var res = [];\n\t for (var key in obj) res.push(key);\n\t return res;\n\t }\n\t}", "title": "" }, { "docid": "97074d5a3f8370a0f797e8402547f611", "score": "0.57670784", "text": "function objVal2Arr(obj) {\n var ret = [];\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret.push(obj[i]);\n }\n }\n return ret;\n }", "title": "" }, { "docid": "4e4c09acc8e2899404bcc099e4c96161", "score": "0.57661855", "text": "function keys(obj){\n return Object.keys(obj)\n}", "title": "" }, { "docid": "5505d9bd80455affd9b4f87ffe9c2106", "score": "0.5765236", "text": "function objectValue (obj) {\n return Object.values(obj)\n}", "title": "" }, { "docid": "a5f947e6ff46c575842ffa79e8d697ba", "score": "0.57638437", "text": "function keys(obj) {\n return Object.keys(obj);\n}", "title": "" }, { "docid": "15b916572388e1801d69a2bd54af8b74", "score": "0.5752346", "text": "function getKeys(obj) {\n return Object.keys(obj); // Yes it is builtin!\n }", "title": "" } ]
0353a1c6ba14b5ddb14c9fffc7075b39
this function stops the time
[ { "docid": "dfc2ab5cc7d449a5960b83114dd1eafc", "score": "0.0", "text": "function endTime(){\n clearInterval(timeStamp);\n}", "title": "" } ]
[ { "docid": "5616401b21bf09642c51bb176ea8c7bf", "score": "0.7416089", "text": "function stopTime() {\n clearInterval(update);\n }", "title": "" }, { "docid": "cc7637f2fc7fb0e313e972c0c6877fe5", "score": "0.738168", "text": "function stop() {\r\n\r\n }", "title": "" }, { "docid": "2942a70551680d0910c3348c676757a7", "score": "0.7323134", "text": "Stop() {}", "title": "" }, { "docid": "6ad5a56153cae1509fcbf43039a940c7", "score": "0.73024863", "text": "function stop() {\n\t\tstopMsg.innerHTML = 'Time over!';\n\t\tstopMsg.classList.add('ct--stopped');\n\t\tday.innerHTML = hour.innerHTML = min.innerHTML = sec.innerHTML = \"00\";\n\t\tclearInterval(count);\n\t\tfadeIn(stopMsg.parentNode);\n\t}", "title": "" }, { "docid": "66313f4994de31f9b43d2f6bd465952b", "score": "0.7232132", "text": "function stopTime() {\n clearInterval(time);\n}", "title": "" }, { "docid": "c1a1dae840879a658f0b1a8908f8b965", "score": "0.7189459", "text": "function stopWatch() {\n $(\".time-number\").text(` ${timer}`);\n timer = timer - 1;\n if (timer < 0) {\n $('.play-area').hide();\n $(\"header\").hide();\n $(\".hard-level\").hide();\n $('.end-game').fadeIn();\n $(\".womp\").hide();\n // when all above conditions are met, make timer stay at 0\n timer = 0;\n }\n }", "title": "" }, { "docid": "60d3d516e5225901acdf08fa3f19566a", "score": "0.7162676", "text": "function stopTimer() {\n\n\t}", "title": "" }, { "docid": "96b93e0666cbc96763ff276e9a1c9e75", "score": "0.71584773", "text": "async stop() {\n this.startTime = undefined;\n }", "title": "" }, { "docid": "ed25795eeb8f7dd94093454aa9d94c65", "score": "0.71139383", "text": "function stop() \n {\n clockRunning=false;\n clearInterval(intervalId);\n }", "title": "" }, { "docid": "290cb8a89fa7c6e4fff8a96f1dc9e3d1", "score": "0.7101466", "text": "function stopTime(){\r\n\t\t\t\t\t\tsetButtonStoped();\r\n\t\t\t\t\t\tdataFromBackground(\"stopTaskTime\", { 'taskNumber' : numberTask });\r\n\t\t\t\t\t}", "title": "" }, { "docid": "ae9f7a2ba6fae6a7a6aae859db6668c8", "score": "0.7091287", "text": "stop() {\n if(this.running === true) {\n this.timeModifier = Date.now() - this.startTime + this.timeModifier;\n this.running = false;\n clearInterval(this.ticker);\n }\n }", "title": "" }, { "docid": "9041b6789a034e343f8131706fd8936d", "score": "0.7076513", "text": "function stop() {\r\n //stop the simulation\r\n clearTimeout(timeout);\r\n}", "title": "" }, { "docid": "1a97ec97f593e818685cd695d57a25f1", "score": "0.70701873", "text": "function stop() {\n\t\tclearInterval(jambi_timer);\n\t}", "title": "" }, { "docid": "7679e348ab03d2bf49209c00dfd1c050", "score": "0.70166117", "text": "stop() {\n clearInterval(this.clock);\n }", "title": "" }, { "docid": "2c4a80ea579ad0bf7e7d84beb7954403", "score": "0.701466", "text": "function stop() {\n clearInterval(questionTime);\n }", "title": "" }, { "docid": "1ad231caa8ebbf1d1b8d0d33185ddb1f", "score": "0.7008375", "text": "function stop() {\n clearInterval(intervalId);\n number = 15;\n }", "title": "" }, { "docid": "bc4cea5eab8cc74d3985f5ee7169c3f7", "score": "0.6985177", "text": "function timerStop() {\n clearInterval(time);\n }", "title": "" }, { "docid": "19bdd559386456f6d8783b44ef3db9a6", "score": "0.69781864", "text": "stop() {}", "title": "" }, { "docid": "19bdd559386456f6d8783b44ef3db9a6", "score": "0.69781864", "text": "stop() {}", "title": "" }, { "docid": "19bdd559386456f6d8783b44ef3db9a6", "score": "0.69781864", "text": "stop() {}", "title": "" }, { "docid": "19bdd559386456f6d8783b44ef3db9a6", "score": "0.69781864", "text": "stop() {}", "title": "" }, { "docid": "3e4e6a3d373da12f35768010d25ea87b", "score": "0.69730645", "text": "stop() {\n //if clock is not running the dont stop\n if (this._running) {\n clearInterval(this._timer);\n this._running = false;\n }\n }", "title": "" }, { "docid": "115f916c82e7ae0d1f8170d4b84e9dd4", "score": "0.695373", "text": "function stop(){\n\tclearTimeout(config.runTimeout);\n}", "title": "" }, { "docid": "0364efaf1607fd3504657926b9a82f03", "score": "0.69511086", "text": "function stopNow(){\r\n clearInterval(timing);\r\n timing = false;\r\n rollTrack.push(\"Stopped \" + DTstampJSON());\r\n \r\n buildStopLiNode();\r\n\tscrollToBottom();\r\n}", "title": "" }, { "docid": "e94fe992771d5eaaf6f2dd76736c26ac", "score": "0.6913926", "text": "function stop(){ clearInterval(interv) }", "title": "" }, { "docid": "bd0be28126fd0aeba02f7d9c0934a98e", "score": "0.6902647", "text": "function stop() {\n clearInterval(intervalId);\n number = 20;\n }", "title": "" }, { "docid": "29afbf09189eec011f54a6632530784e", "score": "0.6888158", "text": "stopTimer(){\n\t\tthis.stoppingTime = Date.now();\n\t\tthis.totalTime = this.totalTime + this.stoppingTime - this.startingTime;\n\t}", "title": "" }, { "docid": "de1dfcaaf2ba07858f0fac6b2d5fed58", "score": "0.68811786", "text": "function stop()\r\n\t\t{\r\n\t\t\tclearInterval(clear);\r\n\t\t}", "title": "" }, { "docid": "9e4bb42b4a4fe12739a570783ae7a87b", "score": "0.6880448", "text": "function stopTimer() {\n if (stoptime == false) {\n stoptime = true\n }\n}", "title": "" }, { "docid": "bcc89195cbdaa15625e4ec24aa89ef74", "score": "0.6880256", "text": "function botonStop() {\n\tclearInterval(timing);\n\ttiming = \"null\";\n}", "title": "" }, { "docid": "c4fa7d8003a55bca47b035232fe234af", "score": "0.68727887", "text": "function stop() {\n clearInterval(intervalID);\n clockRunning = false;\n }", "title": "" }, { "docid": "4ea1eefea67eb772302988d38cbb17f2", "score": "0.68113893", "text": "function stopTimer(){\n clearInterval(interval)\n timeElapsed = 0;\n renderTime();\n }", "title": "" }, { "docid": "08f950465da705cb12b902c165e2eafa", "score": "0.6809992", "text": "function stop() {\n clearInterval(intervalId);\n if (count +1 < questionsArr.length) {\n $(\".timer-content\").html(\"<h2></h2>\");\n showAnswer();\n timeleft = 20;\n }\n else {\n showAnswerFinal();\n }\n }", "title": "" }, { "docid": "86d1fae64011a3eb32c76bae657494ed", "score": "0.6795949", "text": "function stop() {\n clearInterval(intervalId);\n // a way to keep track of cumulative 'thinking time' until click\n console.log(time);\n responseTime = responseTime + (timeLimit - time);\n\n console.log(timeLimit);\n console.log(responseTime);\n}", "title": "" }, { "docid": "bea7a7b46ad802fde1de5ca6d082ea11", "score": "0.6784453", "text": "function timedEarse(){\r\n\teraseTimedout = true;\r\n}", "title": "" }, { "docid": "60c22edf50956915510284e71dbc1335", "score": "0.6756508", "text": "stop() {\n clearTimeout(this._timeout);\n }", "title": "" }, { "docid": "c882f6b2226070f19d23d774454b72f8", "score": "0.67458016", "text": "stop() {\n const time = this.__sync();\n this.syncSpeed(time, 0, 0, true);\n }", "title": "" }, { "docid": "7d306cce374fe8564d27b9d5a7f75e5b", "score": "0.67402583", "text": "function stop() {\n \tclearInterval(myTimer);\n \ttimeClock = 30;\n}", "title": "" }, { "docid": "7b53bc30f5facae1b7fe97eafad06d58", "score": "0.6739311", "text": "abort () {\n this._timer.clear()\n return super.abort()\n }", "title": "" }, { "docid": "3ed5b62f8c24b8c9f3dfef1337186b8c", "score": "0.6728993", "text": "function stopRetraceCourbe() {\r\n clearInterval(processForCourbe);\r\n}", "title": "" }, { "docid": "1cb70839b43ff9e97ccf5d9d7e9430b9", "score": "0.6727704", "text": "function _stopTimeOut (){clearTimeout(_time_out_object)}", "title": "" }, { "docid": "398f9dcc965e8e12f5cd8f0a8902a220", "score": "0.672678", "text": "stop() {\n this._endTime = new Date().getTime();\n clearInterval(this[TIMER_INTERVAL_SYM]);\n this[TIMER_INTERVAL_SYM] = null;\n }", "title": "" }, { "docid": "55247bca5e00f1389729b483697c2a08", "score": "0.67170626", "text": "function Mainstop() {\n clearInterval(x);\n}", "title": "" }, { "docid": "816ab9268cfbedf30cd51602989af5a1", "score": "0.67099875", "text": "function stop(){\r\n clearInterval(timerId);\r\n}", "title": "" }, { "docid": "baf648fb70cfb35bd7c7dc6cfbdb49a5", "score": "0.6696213", "text": "function myStopFunction(){\n clearInterval(timer);\n \n }", "title": "" }, { "docid": "a548dc75657ba1bc206d6c1732ab559a", "score": "0.66786665", "text": "function stopRapidUpdate() {\n $interval.cancel(rapidTimer);\n }", "title": "" }, { "docid": "446292cef43b4947da764e4f71277dcd", "score": "0.66746897", "text": "stopUse() {}", "title": "" }, { "docid": "d2523c3145c0d41dd9c89d779c61cf61", "score": "0.66729754", "text": "function stopCount()\n{\n\tclearTimeout(time);\n}", "title": "" }, { "docid": "b7aff182f4e66cbd83fd8e09faafb5fe", "score": "0.6672659", "text": "function stopIt() {\n\t\tclearInterval(intervalId);\n\t\tposition = 0;\n\t}", "title": "" }, { "docid": "881fb5eb819cb1d3c5dd86b2d1522562", "score": "0.66663426", "text": "stop() {\n if ( this._timer ) {\n clearTimeout( this._timer );\n }\n }", "title": "" }, { "docid": "a92dc2ea6485c25a2b139c15348600d8", "score": "0.66632", "text": "function stopFunction() {\n ticking = false;\n clearInterval(intervalId);\n }", "title": "" }, { "docid": "1f8ded015b92611d7ab8ff2f48df59c0", "score": "0.66521883", "text": "stop() {\n this.isRunning = false;\n clearInterval(this.timeInterval);\n this.updateTimeUI();\n }", "title": "" }, { "docid": "1666b93f87f7f6faa469357def5b3b0e", "score": "0.66496", "text": "stop() {\n if (this.currentTimeTimer !== undefined) {\n clearTimeout(this.currentTimeTimer);\n delete this.currentTimeTimer;\n }\n }", "title": "" }, { "docid": "5e0396ea1309ba2678f7639865db07fd", "score": "0.6649113", "text": "stop() {\n if (this.nextTryTimer != null)\n clearTimeout(this.nextTryTimer);\n this.isStarted = false;\n }", "title": "" }, { "docid": "1950eb0e936610464e18201cd3967bab", "score": "0.66484237", "text": "stop() {\n this._stopped = true;\n this._reset();\n }", "title": "" }, { "docid": "1a373a825b676def05cb8daf07724ac5", "score": "0.6644546", "text": "stop() {\n this.#stopTimer(); // The real implementation stop timing\n }", "title": "" }, { "docid": "b337601267e5c9c2a33983acd9c4f28b", "score": "0.6642228", "text": "function stopper()\n{\n\t\n\t// increment the time\n\ttime += 1;\n\t\n\t// convert time to milliseconds, seconds and minutes using some clever maths\n\tvar milliseconds = time % 100;\n\tif (milliseconds < 10)\n\t{\n\t\tmilliseconds = '0' + milliseconds;\n\t}\n\tvar seconds = Math.floor(time / 100) % 60;\n\tif (seconds < 10)\n\t{\n\t\tseconds = '0' + seconds;\n\t}\n\tvar minutes = Math.floor(time / 6000) % 100;\n\tif (minutes < 10)\n\t{\n\t\tminutes = '0' + minutes;\n\t}\n\t\n\t// update the timers label to the current time\n\ttimebox.setText(minutes + ':' + seconds + ':' + milliseconds);\n}", "title": "" }, { "docid": "9e84b0b409b0eb10f0bfe5725bac57b6", "score": "0.663891", "text": "function stop() {\n\tBeameUtils.stopBackgroundJob(_autorenewal_job);\n}", "title": "" }, { "docid": "64d7ef962aff280bedf8e28a0899ce5d", "score": "0.66385025", "text": "function stop() {\n clearInterval(intervalId);\n }", "title": "" }, { "docid": "007b0f6fce583dfa92e9db0b063406bb", "score": "0.66381264", "text": "function stop() {\r\n\r\n // Clears our intervalId\r\n // We just pass the name of the interval\r\n // to the clearInterval function.\r\nclearInterval(intervalId);\r\nclockRunning = false;\r\n}", "title": "" }, { "docid": "3e928293ecf61c9ec5ce04637a987911", "score": "0.6638078", "text": "stop () {\n window.clearInterval(this.timer);\n this.timer = null;\n }", "title": "" }, { "docid": "4e82f784c6f67a1f0967662cfec0ef4d", "score": "0.66354525", "text": "function stop() {\n clearInterval(intervalId);\n\n }", "title": "" }, { "docid": "b075dd468c59dabe92828e3c6bf484c2", "score": "0.66350627", "text": "function stopWatch() {\n\t//setInterval is a function that repeat an operation in a specified interval(in milliseconds).\r\n myVar = setInterval(getRandom, 250);\r\n\tmyVar = setInterval(getDate, 250);\r\n\tmyVar = setInterval(getData, 1000);\r\n\tmyVar = setInterval(getInfo, 1000);\r\n\r\n}", "title": "" }, { "docid": "6c39a642c7806b4076fbf98443223d95", "score": "0.66347516", "text": "function stopTimer() {\n clearInterval(time);\n}", "title": "" }, { "docid": "2f3aa796a5e7fae54624b56e860210a6", "score": "0.66282207", "text": "function stopWatch() {\n if (unwatch) {\n unwatch();\n }\n }", "title": "" }, { "docid": "4a37c39a817b23b04dc453ec59c4b232", "score": "0.6616913", "text": "function resetTime(){t=0;}", "title": "" }, { "docid": "fec5cdeb631820099a5264458fd2505a", "score": "0.66131896", "text": "ontimeout() {}", "title": "" }, { "docid": "f253847bf75f6d72982baeb5e197a418", "score": "0.6600616", "text": "function reqestOnQuit(){\r\n webix.ajax().sync().post(\"./data/stop.php\", { status:\"stop\"});\r\n var ms=500; // wait some time\r\n ms += new Date().getTime();\r\n while (new Date() < ms){};\r\n// return reqestOnTryClose();\n}", "title": "" }, { "docid": "eb5a448b4740ed627960d975b029018f", "score": "0.65973616", "text": "function timerGo(){\n\tif (!triviaRunning) {\n\ttimeInterval = setInterval(decreaseTime, 1000); \n\ttriviaRunning = true;\n\t}\n}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "1ac33223186152583468c1e6263e7f6b", "score": "0.65910685", "text": "stopped() {}", "title": "" }, { "docid": "7366cf0a11a208343b8eec8e954f3b49", "score": "0.658773", "text": "onStop() { }", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "6758f5615fd8a711364c8e9d6030fbce", "score": "0.6587563", "text": "stopped() {\n\n\t}", "title": "" }, { "docid": "499fea0ef6e055533d1a6d9cef5d8220", "score": "0.6586869", "text": "function MainStopNew() {\n clearInterval(y);\n}", "title": "" }, { "docid": "aa5e2d76031033618818bc7adb5fafd4", "score": "0.6585628", "text": "static stop() {\n this.run = false\n }", "title": "" }, { "docid": "2c1fe7e3334df63ca70c55167470a9d0", "score": "0.65817434", "text": "function _pause(){\n\t\t\t_running = false;\n\t\t}", "title": "" }, { "docid": "0a081eeb577883a70d06e93c8e23e928", "score": "0.6576342", "text": "function stopClock() {\n clearInterval(timeInterval);\n}", "title": "" }, { "docid": "36e9fff63b55a33596600478dc378bc6", "score": "0.6564379", "text": "function stop() {\n $(\".optionBtn\").attr(\"disabled\", true);\n clearInterval(intervalId);\n timeLeft = 20;\n setTimeout(reloader, 1000 * 4);\n\n }", "title": "" }, { "docid": "4c77bdc5c7c10efa82df0e9caf3e0d1c", "score": "0.65639406", "text": "function stopWatch() {\n //decrement by 1\n let timeLeft = trivia.timeRemaining--;\n\n //print time remaining\n if (timeLeft > 0) {\n $(\".time-remaining\").html(\"Time Remaining: \" + timeLeft);\n } else {\n $(\".time-remaining\").html(\"Time is Up!\");\n clearInterval(intervalID);\n trivia.incorrectAnswers++; //increment incorrect answers\n let answer = trivia.rounds[trivia.currentRound].answers[trivia.currentQuestion]; //get question answer from current round\n showResponse(\"Nothing\", answer);\n }\n}", "title": "" }, { "docid": "dd586a092fbd2dea25896405a80c14cb", "score": "0.6563533", "text": "function stop() {\n isTimerRunning = false;\n clearInterval(intervalid);\n }", "title": "" }, { "docid": "9da53bac97baa7fc728d0f1e4ae274e0", "score": "0.65598476", "text": "stop() {\n clearInterval(this.timer);\n this.timer = null;\n }", "title": "" }, { "docid": "a19d1e5073d92c1edcb5ae286eb42045", "score": "0.655713", "text": "function abort() {\r\n clearInterval(gameLoop)\r\n}", "title": "" }, { "docid": "ed352e9453219c1abd2a32a6e1ca8f77", "score": "0.65547013", "text": "async stop() {\n const response = await timeApi.stop();\n if (!response) {\n process.stdout.write('Nothing to stop.');\n } else {\n process.stdout.write(`Stopped ${response}.`);\n }\n }", "title": "" }, { "docid": "8b327467d46d9a33fcb3fc1f1c08a385", "score": "0.6549895", "text": "onStop(){}", "title": "" }, { "docid": "0012c8c84b18addd6b223ab4c1df1511", "score": "0.6543913", "text": "function stop() {\n running = false;\n clearInterval(intervalId);\n }", "title": "" } ]
a1f24bc3989a3c56689538cf3ad576f9
render react to document.body
[ { "docid": "d7a2e26a99ceb7fae8cf78642dae058a", "score": "0.60338324", "text": "function initialReact (){\n React.render(<UserProfile data={data}/>,document.body);\n}", "title": "" } ]
[ { "docid": "b2eba41d3ceec7ced708271f7aabd74f", "score": "0.7170227", "text": "render () {\n\n return (\n <div>\n { this.renderBodyContent() }\n </div>\n )\n\n }", "title": "" }, { "docid": "9bb9038b0bbfad11dd4874a79cbd8d31", "score": "0.70910615", "text": "render(){\n return (\n <div className=\"border red\">\n {this.renderBody()}\n </div>\n )\n }", "title": "" }, { "docid": "6b7db54a9e478830da513491a5b9fef1", "score": "0.68021435", "text": "_render() {\n this._reactComponent = this._getReactComponent();\n if (!this._root) this._root = createRoot(this._container.getElement()[0]);\n this._root.render(this._reactComponent);\n }", "title": "" }, { "docid": "d865a3c56e0c764a90d25a5638185d07", "score": "0.6758425", "text": "function render() {\n\n const renderedString = createRenderString(store);\n\n // insert html into DOM\n $('main').html(renderedString);\n}", "title": "" }, { "docid": "69bea0af79ace947b5fd4bdeade8c9e7", "score": "0.6699046", "text": "render() {\n\n return (\n <div>\n {this.renderContent()}\n </div>\n );\n \n }", "title": "" }, { "docid": "bb57cbe1124c36c8b0d7893d771959d4", "score": "0.6696281", "text": "render() {\n return (\n <div className=\"border red\">\n {this.renderContent()}\n </div>\n );\n \n }", "title": "" }, { "docid": "2bae0d6836f0a56cdbcb7057809a5de8", "score": "0.6628065", "text": "render() {\n return (\n <div className=\"border red\">\n {this.renderContent()}\n </div>\n )\n }", "title": "" }, { "docid": "e1da87d678bd1f0b8f6f58326f25b5de", "score": "0.6621149", "text": "render() {\r\n return (\r\n <div className=\"border red\">\r\n { this.renderContent() }\r\n </div>\r\n );\r\n }", "title": "" }, { "docid": "fce6cd252ee16d36daf9316006bc0c10", "score": "0.6567545", "text": "function renderIt(state) {\n $(\"body\").html(`${state}`);\n}", "title": "" }, { "docid": "44a0d9638d879c77208da2e91c16e5dc", "score": "0.6550628", "text": "render() {\n return (\n <div className=\"border-red\">\n {this.renderContent()}\n </div>\n );\n }", "title": "" }, { "docid": "48b41f5eba9646c8c857109ce3cab87a", "score": "0.652562", "text": "function render(){\n ReactDOM.render(\n <MyComponents.App\n data={data}\n actions={actions}/>,\n $('#app-container').get(0)\n )\n}", "title": "" }, { "docid": "48b41f5eba9646c8c857109ce3cab87a", "score": "0.652562", "text": "function render(){\n ReactDOM.render(\n <MyComponents.App\n data={data}\n actions={actions}/>,\n $('#app-container').get(0)\n )\n}", "title": "" }, { "docid": "074649076b7f978f6998a918f342001c", "score": "0.65222466", "text": "render() {\n\t\treturn <div>{this.renderContent()}</div>;\n\t}", "title": "" }, { "docid": "720af570adec7e4d91371e6d461d1aaf", "score": "0.6514897", "text": "_render(html){this.$.container.innerHTML=html}", "title": "" }, { "docid": "10c9c40c1cd3a1a4febfe9c46de5b8f7", "score": "0.6509563", "text": "function render(){\n ReactDOM.render(\n <MyComponents.App\n data={data}\n actions={actions}/>,\n $('#app-container').get(0)\n );\n}", "title": "" }, { "docid": "f176b4d8e757a6d03b3efc95173bf1cf", "score": "0.6498879", "text": "function renderToDOM() {\n const root = document.getElementById('app');\n if (root !== null) {\n ReactDOM.render(<App />, root)\n }\n}", "title": "" }, { "docid": "8b05937e9ef7acfbd769e95a7143217d", "score": "0.6498336", "text": "render() {\n return(\n <div className=\"border red\">\n {this.renderContent()}\n </div> \n );\n }", "title": "" }, { "docid": "0e0513dc8eb65658e7537a6f90e7d5ad", "score": "0.6492196", "text": "render() { //render method that returns the DOM representation our component\n return ( // jeśli wyrzucimy nawias i w tej samej linii damy kod z kolejnej (tutaj <div>), będzie OK\n <div>\n <h1>Hello Series</h1>\n <b>Bold</b>\n </div>\n )\n // return React.createElement('h1', null, 'Hello Eggheads'); //\n }", "title": "" }, { "docid": "b320c9f895ea4025a5a8b485b65c12c9", "score": "0.6490236", "text": "render() {\n return(\n <div className=\"border-red\">\n {this.renderContent()}\n </div>\n )\n\n }", "title": "" }, { "docid": "a20c843d46bc130e1f4e85932918b157", "score": "0.6469635", "text": "render() {\n return (\n <div className=\"red-border\">\n { this.renderContent() }\n </div>\n )\n }", "title": "" }, { "docid": "24d4f4bc81da87643444cf886faa6a55", "score": "0.6464826", "text": "function render(){ \n console.log('`render function` ran');\n const createdHtml = generateHtml(STORE); \n $('main').html(createdHtml);\n}", "title": "" }, { "docid": "eea84335b12359c7120aef708c7c3c85", "score": "0.6458386", "text": "function render(doc, runscript) {\n // update title\n if (doc.title && doc.title.valueOf()) {\n document.title = doc.title;\n }\n\n var body = doc.body;\n // remove <noscript>\n body.innerHTML = body.innerHTML.replace(/<noscript[\\S\\s]*?<\\/noscript>/ig, '');\n\n // update body\n document.documentElement.replaceChild(body, document.body);\n\n // update head\n updateHead(doc.head);\n\n if (runscript) {\n executeScripts(document.body);\n }\n\n currentState = history.state;\n exports.emit('page:change');\n exports.emit('page:update');\n}", "title": "" }, { "docid": "0d73715dcab13e3cef53c15d4cfd5a53", "score": "0.64554137", "text": "render() {\n\t\treturn(\n\t\t\t<div className=\"border red\">\n\t\t\t\t{this.renderContent()}\n\t\t\t</div>\n\t\t);\n\t}", "title": "" }, { "docid": "457e234e21cbc7b23ed0644f7249d2f5", "score": "0.6447176", "text": "render() {\n return (\n <div className = \"border red\">\n {this.renderContent()}\n </div>\n );\n }", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.6445688", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.6445688", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.6445688", "text": "render() {}", "title": "" }, { "docid": "d86eadb4ecbd7560fac0074cd57d1efc", "score": "0.6443578", "text": "render() {\n return(<div />);\n }", "title": "" }, { "docid": "77fc7bd411c300ad5a2908e6beea16a0", "score": "0.6436201", "text": "render() {\n return <div className=\"border red\">{this.renderContent()}</div>;\n }", "title": "" }, { "docid": "c4f4896f6926759cc492c7a8428513a2", "score": "0.64329207", "text": "function render() {\n\tcontainer.innerHTML = htmlStr;\n}", "title": "" }, { "docid": "27dc5213ecbc1016f1ed706505e01a1a", "score": "0.63947505", "text": "render(){return html``}", "title": "" }, { "docid": "0242e801604abd9f1fd5cd59d865a9db", "score": "0.63929904", "text": "render () {\n let stylesheet = document.createElement('style')\n stylesheet.innerHTML = this.styles || ''\n this.stylesheet = stylesheet\n document.body.appendChild(stylesheet)\n\n document.body.appendChild(this.node)\n }", "title": "" }, { "docid": "953e694dc5b221a5324564e4c533501a", "score": "0.6386996", "text": "render() {\n console.debug(`Rendering DOM of ${this.constructor.name}`);\n this.shadowRoot.innerHTML = this.html;\n if (this.script != null) {\n console.debug(`Running script of ${this.constructor.name}`);\n this.script();\n console.debug(`Finished running script of ${this.constructor.name}`);\n }\n console.debug(`Finished rendering DOM of ${this.constructor.name}`);\n }", "title": "" }, { "docid": "7c94730c237d336912c98685a916bd78", "score": "0.63853943", "text": "function render() {\n container.innerHTML = htmlStr;\n}", "title": "" }, { "docid": "2f1c41d952242ed3305def515a24ec8e", "score": "0.63758814", "text": "function reactRenderer(req, res) {\n var app = renderToString(React.createElement(App));\n var html = fs\n .readFileSync(path.join(BUILD_DIR, 'index.html'), 'utf8')\n .replace('__ROOT__', app);\n return res.send(html);\n }", "title": "" }, { "docid": "0d11419045d66f8bb929962575334dcd", "score": "0.6372998", "text": "render(){}", "title": "" }, { "docid": "0d11419045d66f8bb929962575334dcd", "score": "0.6372998", "text": "render(){}", "title": "" }, { "docid": "d2595ef449c6f89b157d1adeb705334e", "score": "0.63643587", "text": "render() { }", "title": "" }, { "docid": "67052ec23ae333fed2eb8073d3eeb410", "score": "0.63473845", "text": "function render() {\n react_dom_1[\"default\"].render(react_1[\"default\"].createElement(react_redux_1.Provider, { store: store_1[\"default\"] },\n react_1[\"default\"].createElement(auth0_context_1.Auth0Provider, null,\n react_1[\"default\"].createElement(react_router_dom_1.BrowserRouter, null,\n react_1[\"default\"].createElement(app_1[\"default\"], null)))), document.getElementById('root'));\n}", "title": "" }, { "docid": "68f23e9aeca5e396328cf37d97988ecd", "score": "0.63420963", "text": "render() {\n\t\treturn (\n\t\t\t<div data-react-name={this.state.reactName}>{this.renderContent()}</div>\n\t\t);\n\t}", "title": "" }, { "docid": "c8180c43d7a9c07bdad3380b13bfb3c5", "score": "0.6340583", "text": "render() {\n this.innerHTML = this.htmlElementsString;\n this.rootElement.appendChild(this);\n this.createScript();\n }", "title": "" }, { "docid": "b660222219f938fa4957a06e598168c9", "score": "0.63278705", "text": "render() {\r\n return <div />\r\n }", "title": "" }, { "docid": "b194cb6791ab3c1e58794caf1d552e22", "score": "0.6325857", "text": "renderHTML() {\n \n }", "title": "" }, { "docid": "d0bae09943fbea3cca8e1f86bc707fd5", "score": "0.6319093", "text": "function render() {\n\n\t\t\t}", "title": "" }, { "docid": "7818e38d270bfced57c7ce7373fe839e", "score": "0.6313914", "text": "render() {\n return (\n <div>\n\t\t\t<p>Hello Universe!!</p>\n\t\t\t<p>We are ready to start with React js</p>\n </div>\n );\n }", "title": "" }, { "docid": "07899df7b23c95ba86ae126f14977d52", "score": "0.6310263", "text": "createBody(value) {\n let body;\n if (typeof value === 'string') {\n body = new Widget({ node: document.createElement('span') });\n body.node.textContent = value;\n }\n else if (value instanceof Widget) {\n body = value;\n }\n else {\n body = ReactWidget.create(value);\n // Immediately update the body even though it has not yet attached in\n // order to trigger a render of the DOM nodes from the React element.\n MessageLoop.sendMessage(body, Widget.Msg.UpdateRequest);\n }\n body.addClass(PREVIEW_BODY);\n return body;\n }", "title": "" }, { "docid": "25d3eef32367f38b7c4186ae65928ba3", "score": "0.6303043", "text": "function render() {\n return react.createElement(\"section\", null, [\n react.createElement(\"iframe\", {\n className: \"jqbx\",\n src: \"https://app.jqbx.fm/rooms\",\n frameborder: \"0\",\n sandbox:\n \"allow-forms allow-popups allow-scripts allow-same-origin allow-top-navigation allow-popups-to-escape-sandbox\",\n style: { width: \"100%\", height: \"80vh\" },\n }),\n ]);\n}", "title": "" }, { "docid": "a8562d91e76c806bd1e8c78d03965361", "score": "0.62989324", "text": "render() {\n this._userEvent('beforeRender');\n const html = this.template.render({data: this.viewData}, (data) => {\n return this.wrapTemplate(data);\n });\n if (!this.wrapper) {\n this.wrapper = this._createWrapper();\n }\n this.updateNode(this.wrapper, html);\n this.resize();\n this._userEvent('afterRender');\n }", "title": "" }, { "docid": "aa38fa313f8414cd670e6666f05dc11b", "score": "0.6298127", "text": "function render() {\n\t\t\t}", "title": "" }, { "docid": "74711c84f6189654228e96dc9f5b76d0", "score": "0.62724996", "text": "render() {\r\n document.body.insertBefore(this.element, document.querySelector('script'));\r\n\r\n this.append(this.PageContent.element, [this.NewsList, this.Footer]);\r\n this.append(this.Sidebar.element, [this.SidebarTitle, this.SourcesList]);\r\n this.append(this.element, [this.Spinner, this.PageContent, this.Sidebar, this.ToggleBtn]);\r\n }", "title": "" }, { "docid": "ec70bccd3598a851a183349ca907a8b1", "score": "0.6266405", "text": "function render(){\n htmlString = `<div>\n <h1>${state.pageHeader}</h1>\n ${renderDogs()}\n </div>`;\n renderDogs();\n\n appElement = document.getElementById(\"app\");\n appElement.innerHTML = htmlString;\n}", "title": "" }, { "docid": "9d90c0329c7b05b0a216a1ad70d46681", "score": "0.6258783", "text": "function render() {\n htmlString = `<div>\n <h1>${state.pageHeader}</h1>\n ${renderGames()} \n <div onclick='addGame()'>[Add Games]</div>\n </div>`;\n\n document.getElementById(\"app\").innerHTML = htmlString;\n }", "title": "" }, { "docid": "82b633eaa23e33e9d8ad734dec39be9c", "score": "0.62491345", "text": "function render () {\n\tReactDOM.render(\n\t\t<div className='container'>\n\t\t\t<App store={store} />\n\t\t\t<hr />\n\t\t\t<Results store={store} />\n\t\t</div>\n\t\t,\n\t\tdocument.getElementById('root'));\n\t\tregisterServiceWorker();\n}", "title": "" }, { "docid": "44e82fb5504acdbb0299a491d8f390f0", "score": "0.62468", "text": "render(){\n return(\n <div style={styles.wrapper}>\n {this.content()}\n </div>\n )\n }", "title": "" }, { "docid": "19830d44e8779783536e7f580261d071", "score": "0.6225849", "text": "function render() {\n\t\t\n\t}", "title": "" }, { "docid": "d413c8a1d338578222b205a952fb59f4", "score": "0.6223203", "text": "componentWillMount() {\n document.body.style.backgroundColor = \"black\";\n document.body.style.textAlign = \"center\";\n document.body.style.padding = \"150px\";\n document.body.style.font = \"20px Helvetica, sans-serif,color: #333\";\n }", "title": "" }, { "docid": "df251b1e0638267b5761228eb459cbaa", "score": "0.6219878", "text": "function render(st = state.Home) {\n document.querySelector(\"#root\").innerHTML = `\n ${Header(st)}\n ${Nav(state.Links)}\n ${Main(st)}\n ${Footer()}\n `;\n\n router.updatePageLinks();\n addEventListeners(st);\n\n}", "title": "" }, { "docid": "a826760626f89438b3fe8a6f901d2c94", "score": "0.6218465", "text": "function renderView() {\n ReactDOM.render(\n <Todos />,\n document.getElementById('todos')\n )\n}", "title": "" }, { "docid": "a826760626f89438b3fe8a6f901d2c94", "score": "0.6218465", "text": "function renderView() {\n ReactDOM.render(\n <Todos />,\n document.getElementById('todos')\n )\n}", "title": "" }, { "docid": "c74558aa52043dee44223e4257055858", "score": "0.6196973", "text": "function renderPage() {\r\n let html = addHtml();\r\n $('main').html(html);\r\n\r\n}", "title": "" }, { "docid": "697ec3b9889d75f63564c6dbce95a3a8", "score": "0.6179727", "text": "render() {\n\n\t}", "title": "" }, { "docid": "697ec3b9889d75f63564c6dbce95a3a8", "score": "0.6179727", "text": "render() {\n\n\t}", "title": "" }, { "docid": "39f2a27bf0b2a0700796fed8a4134a31", "score": "0.61729676", "text": "function renderToStaticMarkup(element,options){var renderer=new ReactDOMServerRenderer(element,true,options);try{var markup=renderer.read(Infinity);return markup;}finally{renderer.destroy();}}", "title": "" }, { "docid": "d3b156011295fe937bdd523a8f311e4e", "score": "0.6166276", "text": "function render() {\n\t}", "title": "" }, { "docid": "3fd51a5b62d28c4178599d24c5d97412", "score": "0.61662364", "text": "componentWillReceiveProps(nextProps) {\n const jsx = <div>{nextProps.children}</div>;\n ReactDOM.render(jsx, this.state.div);\n }", "title": "" }, { "docid": "ed737dee15554ddba503b0e14eda5a5f", "score": "0.616307", "text": "render() {\n return this.renderContent();\n }", "title": "" }, { "docid": "4c27133ff3b19382d5cf6caaacb39860", "score": "0.615695", "text": "render() { //Render a React element into the DOM\n return (\n <div>\n <Main />\n </div>\n );\n }", "title": "" }, { "docid": "b7896e63ef786fe3611915511a19d05c", "score": "0.61413467", "text": "render() {\n return (\n\n\n\n\n\n )\n }", "title": "" }, { "docid": "f563ccd3faac529e5daaf02fe9e8ed24", "score": "0.6125902", "text": "render() {\n\t\tif (!this.component_.element) {\n\t\t\tthis.component_.element = document.createElement('div');\n\t\t}\n\t\tthis.emit('rendered', !this.isRendered_);\n\t}", "title": "" }, { "docid": "00ffcf3832b6a2c0ff8e792ceeba1d66", "score": "0.61245525", "text": "render() {\n this.shadowRoot.innerHTML = this.template;\n }", "title": "" }, { "docid": "f7be7bdffaaeca035d9abdcba1ea3d97", "score": "0.6116004", "text": "render() {\n return <div />\n }", "title": "" }, { "docid": "8d706469b65d3306a6b66e5b5e4961de", "score": "0.61100113", "text": "function renderView() {\n ReactDOM.render(\n <Todos />,\n document.getElementById('todoApp')\n )\n}", "title": "" }, { "docid": "2a3e64d5af1a27d13f4ba1f45399f8fd", "score": "0.61080694", "text": "_render() {}", "title": "" }, { "docid": "1c20e8e172e6634caef5f6076d2b86a0", "score": "0.60916984", "text": "render() {\n return this.renderContent()\n }", "title": "" }, { "docid": "48631680252ea5c57ecf0550487f22ba", "score": "0.60910136", "text": "renderHTML() {\n let domPurify = createDomPurify(new JSDOM().window);\n return { __html: domPurify.sanitize(this.state.post.html) }; //Sanitize html so no hackers can inject\n }", "title": "" }, { "docid": "b4e6c8be379fd581f5c2838309322470", "score": "0.60815495", "text": "render() {\n return html ``;\n }", "title": "" }, { "docid": "715ec10b0516a18e271a14b175079240", "score": "0.60815006", "text": "render() {\n return (\n <div>\n \n </div>\n )\n }", "title": "" }, { "docid": "e3b94b57d4ebeb21be5884a9bdae1f6d", "score": "0.6080841", "text": "function render() {\n var children = [SearchBar({\n update: updateSearchState\n }), ItemsList({\n items: _state.items,\n onUpdate: updateState\n })];\n if (!_node) {\n return _node = createElement('div', { class: 'main' }, children);\n } else {\n return _node.html(children);\n }\n }", "title": "" }, { "docid": "6a7158d364d36e716f14aa06ade16b2f", "score": "0.6074245", "text": "function hydrateOnClient() {\r\n res.send('<!doctype html>\\n' +\r\n ReactDOM.renderToString(<Html assets={webpackIsomorphicTools.assets()}\r\n store={store}/>));\r\n }", "title": "" }, { "docid": "51b315f2059310bb405f3e471a48122f", "score": "0.60709757", "text": "render() {\n return (\n <div style={{border: '10px solid red'}}>\n {this.renderContent()}\n </div>\n )\n }", "title": "" }, { "docid": "935b37e3c264dfca81613308286b8a91", "score": "0.60624385", "text": "function render() {\n for (let i = 0; i < storedCreatedObj.length; i++) {\n storedCreatedObj[i].render_for_body();\n }\n storedCreatedObj[0].render_for_head();\n storedCreatedObj[0].render_for_foot();\n}", "title": "" }, { "docid": "f2972cf748d7a64e9188a6ba92a6117c", "score": "0.60596216", "text": "render() {\n }", "title": "" }, { "docid": "e2812f1afa245dd5b340c902bc1bd37a", "score": "0.60540056", "text": "render(){\n //esto es lo que te devuelve esta funcion\n return <div></div>;\n }", "title": "" }, { "docid": "6476210607106bc6c2deee6f5f2fc6ff", "score": "0.6047114", "text": "render() {\n return this._flux.render(this._flux.state);\n }", "title": "" }, { "docid": "d63ac818c76758626e9c7aefef9f3d0b", "score": "0.6042478", "text": "function renderComponentBody(){\n\t\t//Render component\n\t\tself.renderComponent(self.getJSON());\n\t\t//Get list of rolling history items\n\t\tvar rollingHistoryList = self.retrieveHistoryItems(cclStartDate, cclEndDate);\n\t\tself.setRollingHistoryArray(rollingHistoryList);\n\t\t//Build rolling history table\n\t\tvar rollingHistoryTable = self.buildRollingHistoryTable(rollingHistoryList);\n\t\t//Get rolling history container\n\t\tvar jqRollingHistoryCont = $(\"#\" + self.getComponentId() + \"RollingHistoryContainer\");\n\t\t//Rebuild and finalize table\n\t\tif (jqRollingHistoryCont.length > 0){\n\t\t\tjqRollingHistoryCont.html(rollingHistoryTable.buildTable());\n\t\t\trollingHistoryTable.finalizeTable();\n\t\t}\n\t\tself.resizeComponentBody();\n\t\tself.clearSpinner(compID + \"Container\");\n\t}", "title": "" }, { "docid": "820edc302d1ab534626b4b510fef065d", "score": "0.6037594", "text": "render() {\n // we are calling the renderContent function\n // we are always calling the blue border, that's why this is in render and not in the each component\n // the border blue class doesn't exist, just for show\n return <div className=\"border blue\">{this.renderContent()}</div>;\n }", "title": "" }, { "docid": "91f54f70c336d15eed376bc67acd1f3b", "score": "0.60347414", "text": "render() {\n return <div></div>;\n }", "title": "" }, { "docid": "4effe9276d17e9836aea5719a0315d1d", "score": "0.60300285", "text": "render() {\n return (\n <div>React JS and JSX in action!</div>\n )\n }", "title": "" }, { "docid": "f18235584e784a1e0592acb0b4d7ef38", "score": "0.6027478", "text": "render() {\n return <div>{this.toRender()}</div>;\n }", "title": "" }, { "docid": "1313e208a25a2475f8dcef54b1787de4", "score": "0.60274434", "text": "render() {\n const { title, body } = this.state;\n return (\n <div>\n <h1>{ title }</h1>\n <p>{ body }</p>\n </div>\n )\n }", "title": "" }, { "docid": "1f76175384c89d83703a47b82569624a", "score": "0.60255", "text": "render() {\n this.el.innerHTML = this.template();\n\n setTimeout(() => {\n this.bindUIElements();\n }, 0);\n }", "title": "" }, { "docid": "d873a8d92686d17639d8fb3ac0105b71", "score": "0.6018758", "text": "render(){\r\n\r\n\t}", "title": "" }, { "docid": "f46d391eec73ef2d6cf8df4ddc66fea0", "score": "0.60169065", "text": "createBody(value) {\n let body;\n if (typeof value === 'string') {\n body = new Widget({ node: document.createElement('span') });\n body.node.textContent = value;\n }\n else if (value instanceof Widget) {\n body = value;\n }\n else {\n body = ReactWidget.create(value);\n // Immediately update the body even though it has not yet attached in\n // order to trigger a render of the DOM nodes from the React element.\n MessageLoop.sendMessage(body, Widget.Msg.UpdateRequest);\n }\n body.addClass('jp-Dialog-body');\n Styling.styleNode(body.node);\n return body;\n }", "title": "" }, { "docid": "2d0b5e9da99c7ffc88a1beb29e174d1a", "score": "0.6015247", "text": "render(){\n\n //retorna el template usando el html del tag del template, crea los elementos en el dom\n return html`\n <div>Hello Word!!</div>\n `;\n }", "title": "" }, { "docid": "011a3f2e5b775a453af42a21f4949b04", "score": "0.6012311", "text": "_render()\n {\n if (this.isDisabled())\n return;\n\n this._setContentSizeCss();\n this._setDirection();\n const paragraph = html`<p>${this.text}</p>`;\n let anchor = \"\";\n let action = \"\";\n if (this.link && this.linkText)\n anchor = html`<a href=\"${this.link}\" target=\"_blank\">${this.linkText}</a>`;\n if (this.action && this.actionText)\n action = html`${anchor ? \" | \" : \"\"}<a href=\"javascript:void(0)\" @click=${this.action}>${this.actionText}</a>`;\n let heading = \"\";\n if (this.heading)\n heading = html`<h4>${this.heading}</h4>`;\n\n render(html`${heading}${paragraph}<div id=\"links\">${anchor}${action}</div>`, this.tooltipElem);\n }", "title": "" }, { "docid": "a3b6d1064797318a754c3cc7b8f5cb48", "score": "0.6000395", "text": "render() {\n // the render returns JSX\n return (\n <div id=\"app\">\n <h1>React App Component</h1>\n <Header title=\"My awesome webpage\" />\n </div>\n )\n }", "title": "" }, { "docid": "7074cfde3602f9977c4034f4e75787d3", "score": "0.5995965", "text": "function main()\n{\n let containerDiv = document.createElement('div');\n containerDiv.setAttribute('CLASS', 'container');\n document.body.appendChild(containerDiv);\n\n render(\n <Provider store={store}>\n <Router routes={routes} history={history} />\n </Provider>, containerDiv\n );\n}", "title": "" }, { "docid": "422777f7e5b88fe216f5bd5c09021ab9", "score": "0.59954095", "text": "render() {\n this.fetch(() => {\n /**\n * Notice that the order here doesn't matter, if we want it to work like React,\n * we have to set up a virtual DOM and then have another object which it's purpose\n * will be to get the virtual DOM and then put that into the DOM (ReactDOM job is actually just that).\n * Virtual DOM is just any representation of the DOM elements, for that we can use JSX to\n * make our job easier and actually doing that is way easier than what you might think!\n */\n new Articles(this.articles).render();\n });\n }", "title": "" }, { "docid": "0ce8474e7099560937702082d446a5c5", "score": "0.59770036", "text": "render() {\n\n }", "title": "" }, { "docid": "6478907effa2972d7ce2c488b20381c1", "score": "0.5974469", "text": "function renderToStaticMarkup(element) {\n var renderer = new ReactDOMServerRenderer(element, true);\n\n try {\n var markup = renderer.read(Infinity);\n return markup;\n } finally {\n renderer.destroy();\n }\n }", "title": "" } ]
c92780504c8069798e14ca51bbb64932
Event Methods / OnScroll Syncronisation method
[ { "docid": "71784a6f4fd74522a4b2441ea0e178e4", "score": "0.696061", "text": "function UltraGrid_Panel_OnScroll(event)\n{\n\t//get the source HTML\n\tvar theHTML = Get_HTMLObject(Browser_GetEventSourceElement(event));\n\t//valid?\n\tif (theHTML)\n\t{\n\t\t//get our interpreterObject\n\t\tvar theObject = theHTML.InterpreterObject;\n\t\t//check if we are currently handling it\n\t\tif (theObject.Paint.TimeOut)\n\t\t{\n\t\t\t//clear it\n\t\t\t__EVENTS_QUEUE.RemoveEvent(theObject.Paint.TimeOut);\n\t\t}\n\t\t//set a timeout\n\t\ttheObject.Paint.TimeOut = __EVENTS_QUEUE.AddEvent((function (theObject) { return function () { UltraGrid_Panel_OnScroll_Delayed(theObject); } })(theObject), 10);\n\t\t//always synch the scroll\n\t\tUltraGrid_Paint_SyncPanels(theObject);\n\t}\n\t//always forward to the simulator as well\n\tSimulator_OnScroll(event);\n}", "title": "" } ]
[ { "docid": "99cb7dccf3316d288b9512b5940e1e0e", "score": "0.7807415", "text": "function onScroll() {\n _lastScrollY = window.scrollY;\n requestTick();\n }", "title": "" }, { "docid": "3bd27d76d038f8bf81fdd6ee60c957b3", "score": "0.7746139", "text": "function onScroll() {\r\n requestTick();\r\n}", "title": "" }, { "docid": "d6c0a9b18b9fc8090006101d22c93c12", "score": "0.7682759", "text": "function scrollChanged(fn) {\n bind('scrollChanged', fn);\n }", "title": "" }, { "docid": "c946ef9fe474f6945276ae8436c614e6", "score": "0.76162475", "text": "function mkdOnWindowScroll() {\n \n }", "title": "" }, { "docid": "4b610c2d90bc7b92ac99ad8e50a0eb55", "score": "0.74839514", "text": "function onScroll() {\n latest = getScrollY();\n requestTick();\n }", "title": "" }, { "docid": "64a7b7969144a9fe4892c02a23b52138", "score": "0.74792117", "text": "onScroll() {\n\t\tthis.updateCarouselMetric();\n\n\t\tif (!this.isCallInNextFrameRequested) {\n\t\t\twindow.requestAnimationFrame(this.scrollHandlers.bind(this));\n\t\t\tthis.isCallInNextFrameRequested = true;\n\t\t}\n\t}", "title": "" }, { "docid": "f7264659811d09cd632cca9231494601", "score": "0.7422651", "text": "function throttledScrollEvents() {\n\n }", "title": "" }, { "docid": "8518178f52dc08712f0149548d360224", "score": "0.74220616", "text": "function scrollHandler()\n {\n updateMaxScrolls();\n activityHandler();\n }", "title": "" }, { "docid": "b7ed21e0f1f7a6a3c9f5612f93691af7", "score": "0.7416602", "text": "function eltdfOnWindowScroll() {\n }", "title": "" }, { "docid": "b7ed21e0f1f7a6a3c9f5612f93691af7", "score": "0.7416602", "text": "function eltdfOnWindowScroll() {\n }", "title": "" }, { "docid": "9d41af5c91ba9280421dce01f0d97409", "score": "0.74047685", "text": "function edgtfOnWindowScroll() {\n \n }", "title": "" }, { "docid": "710bb7ca112422156adf7d66c42e969f", "score": "0.7359831", "text": "_scrollHandler () {}", "title": "" }, { "docid": "3dda84914c5223b80d476d51959ac7ad", "score": "0.73550075", "text": "function eltdfOnWindowScroll() {\n\n }", "title": "" }, { "docid": "d82ca7acddc02c844aff2d45f0049c77", "score": "0.725813", "text": "function scrollListener() {\n activeInWrapper()\n scrollAnimation()\n}", "title": "" }, { "docid": "78136664e1b375fd098904ae0ca6f0a4", "score": "0.72303975", "text": "function Simulator_OnScroll()\n{\n\t//has simulator?\n\tif (__SIMULATOR)\n\t{\n\t\t//has controller?\n\t\tif (__CONTROLLER)\n\t\t{\n\t\t\t//notify the controller\n\t\t\t__CONTROLLER.notifyOnScrollResize();\n\t\t}\n\t\t//has designer controller?\n\t\tif (__DESIGNER_CONTROLLER)\n\t\t{\n\t\t\t//notify the controller\n\t\t\t__DESIGNER_CONTROLLER.NotifyOnScrollResize();\n\t\t}\n\t\t//and update our fixed display objects\n\t\t__SIMULATOR.Interpreter.UpdateFixedObjectPositions();\n\t}\n}", "title": "" }, { "docid": "b682eda41db27ab047afd9983699ba2a", "score": "0.7209681", "text": "function listenForScrollEvent() {\n el = $('.tab-content .popular-course .links');\n el.on(\"scroll\", function () {\n el.trigger(\"custom-scroll\");\n });\n}", "title": "" }, { "docid": "3f11b00dcce6d8ca64cc1e825aabc400", "score": "0.7193532", "text": "function mkdfOnWindowScroll() {\n\n }", "title": "" }, { "docid": "86b974e72967d09e7919cf0501ce27f4", "score": "0.7191568", "text": "function actualScrollHandler () {\n\t\t_direction = latestKnownScroll.top < _prevTop? \"up\" : \"down\";\n\t\t_prevTop = latestKnownScroll.top;\n\n\t\t$(window).trigger({\n\t\t\ttype: \"Katoen:ScrollEvent\",\n\t\t\tlatestKnownScroll: latestKnownScroll,\n\t\t\tdirection: _direction\n\t\t});\n\t\t_animRunning = false;\n\t}", "title": "" }, { "docid": "36dfe53949f15a7f45e42b11b0218fef", "score": "0.7171212", "text": "function cust_PageScroll(ref) {\n\n}", "title": "" }, { "docid": "703db92c27afe7ce90261f84a6a8309f", "score": "0.7134391", "text": "handleScroll() {\n return this.setScrollTop().process();\n }", "title": "" }, { "docid": "bcfbe5917d9e73ccc36e3ad687b734e4", "score": "0.7105958", "text": "function Interpreter_OnDisplayScroll(event)\n{\n\t//then forward to simulator\n\tSimulator_OnScroll(event);\n}", "title": "" }, { "docid": "3b4de7d5763a4ba3c96af77117babc1b", "score": "0.7066986", "text": "scrollChanged(indices) {\n this.internalControlEventOccurred('ArrayScrolledEvent', indices);\n }", "title": "" }, { "docid": "4938ecb8cc8100a8c6e78abf3b0f3983", "score": "0.7058071", "text": "function scrollHandler() {\n if (logViewer.automaticScrolled) {\n // Save on reflow cycles if scroll was automatic\n logViewer.automaticScrolled = false;\n } else {\n // User scroll, update auto scroll\n $scope.$apply(function() {\n updateAutoScroll();\n });\n }\n }", "title": "" }, { "docid": "bc4fc474baae637c2774f7af84fa701c", "score": "0.7044906", "text": "handleScroll() {\n var e = document.getElementsByClassName(\"main-body\")[0];\n if ((e.scrollTop + e.clientHeight)/(e.scrollHeight) >= BOTTOM_INDICATOR) {\n if (this.state.articles != null && this.state.shouldUpdate) {\n this.requestNewArticles();\n }\n }\n }", "title": "" }, { "docid": "896d1890db97c0f216bc5e21d43615ea", "score": "0.7041055", "text": "function onScroll() {\n\t\t// unique tick id\n\t\t++ticks;\n\n\t\t// viewport rectangle\n\t\tvar top = jWindow.scrollTop(),\n\t\t\tleft = jWindow.scrollLeft(),\n\t\t\tright = left + jWindow.width(),\n\t\t\tbottom = top + jWindow.height();\n\n\t\t// determine which elements are in view\n// + 60 accounts for fixed nav\n\t\tvar intersections = findElements(top+offset.top + 200, right+offset.right, bottom+offset.bottom, left+offset.left);\n\t\t$.each(intersections, function(i, element) {\n\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick != 'number') {\n\t\t\t\t// entered into view\n\t\t\t\telement.triggerHandler('scrollSpy:enter');\n\t\t\t}\n\n\t\t\t// update tick id\n\t\t\telement.data('scrollSpy:ticks', ticks);\n\t\t});\n\n\t\t// determine which elements are no longer in view\n\t\t$.each(elementsInView, function(i, element) {\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick == 'number' && lastTick !== ticks) {\n\t\t\t\t// exited from view\n\t\t\t\telement.triggerHandler('scrollSpy:exit');\n\t\t\t\telement.data('scrollSpy:ticks', null);\n\t\t\t}\n\t\t});\n\n\t\t// remember elements in view for next tick\n\t\telementsInView = intersections;\n\t}", "title": "" }, { "docid": "896d1890db97c0f216bc5e21d43615ea", "score": "0.7041055", "text": "function onScroll() {\n\t\t// unique tick id\n\t\t++ticks;\n\n\t\t// viewport rectangle\n\t\tvar top = jWindow.scrollTop(),\n\t\t\tleft = jWindow.scrollLeft(),\n\t\t\tright = left + jWindow.width(),\n\t\t\tbottom = top + jWindow.height();\n\n\t\t// determine which elements are in view\n// + 60 accounts for fixed nav\n\t\tvar intersections = findElements(top+offset.top + 200, right+offset.right, bottom+offset.bottom, left+offset.left);\n\t\t$.each(intersections, function(i, element) {\n\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick != 'number') {\n\t\t\t\t// entered into view\n\t\t\t\telement.triggerHandler('scrollSpy:enter');\n\t\t\t}\n\n\t\t\t// update tick id\n\t\t\telement.data('scrollSpy:ticks', ticks);\n\t\t});\n\n\t\t// determine which elements are no longer in view\n\t\t$.each(elementsInView, function(i, element) {\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick == 'number' && lastTick !== ticks) {\n\t\t\t\t// exited from view\n\t\t\t\telement.triggerHandler('scrollSpy:exit');\n\t\t\t\telement.data('scrollSpy:ticks', null);\n\t\t\t}\n\t\t});\n\n\t\t// remember elements in view for next tick\n\t\telementsInView = intersections;\n\t}", "title": "" }, { "docid": "896d1890db97c0f216bc5e21d43615ea", "score": "0.7041055", "text": "function onScroll() {\n\t\t// unique tick id\n\t\t++ticks;\n\n\t\t// viewport rectangle\n\t\tvar top = jWindow.scrollTop(),\n\t\t\tleft = jWindow.scrollLeft(),\n\t\t\tright = left + jWindow.width(),\n\t\t\tbottom = top + jWindow.height();\n\n\t\t// determine which elements are in view\n// + 60 accounts for fixed nav\n\t\tvar intersections = findElements(top+offset.top + 200, right+offset.right, bottom+offset.bottom, left+offset.left);\n\t\t$.each(intersections, function(i, element) {\n\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick != 'number') {\n\t\t\t\t// entered into view\n\t\t\t\telement.triggerHandler('scrollSpy:enter');\n\t\t\t}\n\n\t\t\t// update tick id\n\t\t\telement.data('scrollSpy:ticks', ticks);\n\t\t});\n\n\t\t// determine which elements are no longer in view\n\t\t$.each(elementsInView, function(i, element) {\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick == 'number' && lastTick !== ticks) {\n\t\t\t\t// exited from view\n\t\t\t\telement.triggerHandler('scrollSpy:exit');\n\t\t\t\telement.data('scrollSpy:ticks', null);\n\t\t\t}\n\t\t});\n\n\t\t// remember elements in view for next tick\n\t\telementsInView = intersections;\n\t}", "title": "" }, { "docid": "896d1890db97c0f216bc5e21d43615ea", "score": "0.7041055", "text": "function onScroll() {\n\t\t// unique tick id\n\t\t++ticks;\n\n\t\t// viewport rectangle\n\t\tvar top = jWindow.scrollTop(),\n\t\t\tleft = jWindow.scrollLeft(),\n\t\t\tright = left + jWindow.width(),\n\t\t\tbottom = top + jWindow.height();\n\n\t\t// determine which elements are in view\n// + 60 accounts for fixed nav\n\t\tvar intersections = findElements(top+offset.top + 200, right+offset.right, bottom+offset.bottom, left+offset.left);\n\t\t$.each(intersections, function(i, element) {\n\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick != 'number') {\n\t\t\t\t// entered into view\n\t\t\t\telement.triggerHandler('scrollSpy:enter');\n\t\t\t}\n\n\t\t\t// update tick id\n\t\t\telement.data('scrollSpy:ticks', ticks);\n\t\t});\n\n\t\t// determine which elements are no longer in view\n\t\t$.each(elementsInView, function(i, element) {\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick == 'number' && lastTick !== ticks) {\n\t\t\t\t// exited from view\n\t\t\t\telement.triggerHandler('scrollSpy:exit');\n\t\t\t\telement.data('scrollSpy:ticks', null);\n\t\t\t}\n\t\t});\n\n\t\t// remember elements in view for next tick\n\t\telementsInView = intersections;\n\t}", "title": "" }, { "docid": "17f9e9b70c39f4c585a7de86ef6cb16b", "score": "0.7008205", "text": "function onScroll() {\n\t\t\trepositionStickyHead();\n\t\t\trepositionStickyCol();\n\t\t}", "title": "" }, { "docid": "3061d24d5e4145225b8edd2aa90b201d", "score": "0.6996564", "text": "_onScroll(ev) {\n // Record current scroll top position\n this._lastScrollTop = this._viewportElement.scrollTop;\n // Don't attempt to scroll if the element is not visible, otherwise scrollTop will be corrupt\n // which causes the terminal to scroll the buffer to the top\n if (!this._viewportElement.offsetParent) {\n return;\n }\n // Ignore the event if it was flagged to ignore (when the source of the event is from Viewport)\n if (this._ignoreNextScrollEvent) {\n this._ignoreNextScrollEvent = false;\n return;\n }\n const newRow = Math.round(this._lastScrollTop / this._currentRowHeight);\n const diff = newRow - this._bufferService.buffer.ydisp;\n this._scrollLines(diff, true);\n }", "title": "" }, { "docid": "0a4559b45f07bcf737e534c22c697e66", "score": "0.6950443", "text": "update() {\n\t\tthis.scroll.update();\n\t}", "title": "" }, { "docid": "579841e0dc69ec9ee7ebe09760be8e40", "score": "0.6943366", "text": "function onScroll() {\n lastScrollY = window.scrollY;\n requestFrame();\n}", "title": "" }, { "docid": "92a991c1dfaa4c1a406a582138cf6c12", "score": "0.6923073", "text": "function onScroll() {\n\t\t\t// unique tick id\n\t\t\t++ticks;\n\t\n\t\t\t// viewport rectangle\n\t\t\tvar top = jWindow.scrollTop(),\n\t\t\t\tleft = jWindow.scrollLeft(),\n\t\t\t\tright = left + jWindow.width(),\n\t\t\t\tbottom = top + jWindow.height();\n\t\n\t\t\t// determine which elements are in view\n\t// + 60 accounts for fixed nav\n\t\t\tvar intersections = findElements(top+offset.top + 200, right+offset.right, bottom+offset.bottom, left+offset.left);\n\t\t\t$.each(intersections, function(i, element) {\n\t\n\t\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\t\tif (typeof lastTick != 'number') {\n\t\t\t\t\t// entered into view\n\t\t\t\t\telement.triggerHandler('scrollSpy:enter');\n\t\t\t\t}\n\t\n\t\t\t\t// update tick id\n\t\t\t\telement.data('scrollSpy:ticks', ticks);\n\t\t\t});\n\t\n\t\t\t// determine which elements are no longer in view\n\t\t\t$.each(elementsInView, function(i, element) {\n\t\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\t\tif (typeof lastTick == 'number' && lastTick !== ticks) {\n\t\t\t\t\t// exited from view\n\t\t\t\t\telement.triggerHandler('scrollSpy:exit');\n\t\t\t\t\telement.data('scrollSpy:ticks', null);\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\t// remember elements in view for next tick\n\t\t\telementsInView = intersections;\n\t\t}", "title": "" }, { "docid": "ab8bff777f1195483a3a1c53c74c6fc8", "score": "0.6920869", "text": "function updateScroll () {\n if (!elements.li[0]) return;\n if (mode === MODE_STANDARD) {\n updateStandardScroll();\n } else {\n updateVirtualScroll();\n }\n }", "title": "" }, { "docid": "f02fc7b91649337323592e4932c8d99f", "score": "0.6914757", "text": "onScroll_() {\n if (this.$.container.scrollTop > 0 &&\n this.domRepeat_.items.length !== this.items.length) {\n const aboveScrollTopItemCount =\n Math.round(this.$.container.scrollTop / this.domItemAverageHeight_());\n\n // Ensure we have sufficient items to fill the current scroll position and\n // a full view following our current position.\n if (aboveScrollTopItemCount + this.chunkItemThreshold >\n this.domRepeat_.items.length) {\n this.ensureDomItemsAvailableStartingAt_(aboveScrollTopItemCount);\n }\n }\n }", "title": "" }, { "docid": "466c2fa9fa8838fce6daa2dc3eabda97", "score": "0.6914332", "text": "listenToScrollEvent() {\n document.addEventListener(\"scroll\", () => {\n requestAnimationFrame(() => {\n this.calculateScrollDistance();\n });\n });\n }", "title": "" }, { "docid": "23c755842e0b16e5fb5b968284f73502", "score": "0.6913676", "text": "function monitorScroll() {\n SidebarActions.monitorScroll()\n}", "title": "" }, { "docid": "85daae3c0ba1fbbd2ca69d9f150d84ab", "score": "0.68809867", "text": "function OCM_scrolling() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$offCanvasEl.mousewheel(function (event, delta) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.scrollTop -= (delta * 30);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "title": "" }, { "docid": "2dedf87e67cba7448ac3c705ca79cea1", "score": "0.68656135", "text": "scrollEventHandler() {\n let headerNode = document.getElementById('scrollableHeaderDiv');\n let tableNode = document.getElementById('scrollableTableDiv');\n headerNode.scrollLeft = tableNode.scrollLeft;\n if (this.state.isGroupedView) {\n this.updateDataGridWithGroupedView();\n } else {\n this.updateDataGridWithDefaultView();\n }\n }", "title": "" }, { "docid": "d18639a7fc375fd58420cefb5cab01dc", "score": "0.6864615", "text": "_setWindowScroll() {\n if (this.scrollEvent) return\n this.scrollEvent = true\n window.onscroll = () => {\n this.scrollCallbacks.forEach(cb => cb())\n }\n }", "title": "" }, { "docid": "9c92edc996c33fd31b354c7c834b915c", "score": "0.6864095", "text": "function onFallbackScroll(e) {\n var newScrollTop = e.currentTarget.scrollTop;\n\n if (newScrollTop !== scrollTop) {\n syncScrollTop(newScrollTop);\n } // Trigger origin onScroll\n\n\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(e);\n } // Since this added in global,should use ref to keep update", "title": "" }, { "docid": "1387825cd6a163617747d0cbf0edde19", "score": "0.6861047", "text": "_scrollHandler() {\n if (!this.inlineMethods) {\n return;\n }\n setTimeout(() => this._checkMethodsPosition());\n }", "title": "" }, { "docid": "f3cb0875418511fb9d7a88347148caa9", "score": "0.68580145", "text": "initScroll() {\n const me = this; // This method may be called early, before render calls it, so ensure that it's\n // only executed once.\n\n if (!me.scrollInitialized) {\n let scrollTop;\n const onScroll = me.createOnFrame(() => {\n scrollTop = me.scrollable.y; // Was getting scroll events in FF where scrollTop was unchanged, ignore those\n\n if (scrollTop !== me._scrollTop) {\n me._scrollTop = scrollTop;\n\n if (!me.scrolling) {\n me.scrolling = true;\n me.eachSubGrid(s => s.suspendResizeMonitor = true);\n }\n\n me.rowManager.updateRenderedRows(scrollTop);\n /**\n * Grid has scrolled vertically\n * @event scroll\n * @param {Grid.view.Grid} grid\n * @param {Number} scrollTop\n */\n\n me.trigger('scroll', {\n scrollTop\n });\n }\n });\n me.scrollInitialized = true;\n me.scrollable.on({\n scroll: onScroll,\n\n scrollend() {\n me.scrolling = false;\n me.eachSubGrid(s => s.suspendResizeMonitor = false);\n }\n\n });\n me.callEachSubGrid('initScroll');\n }\n }", "title": "" }, { "docid": "5c30eddfee0a00d71f1afd9290434f52", "score": "0.6854525", "text": "onscroll(event) {\n let target = event.target.scrollingElement;\n let posAtual = target.scrollTop;\n let maxScroll = target.scrollTopMax;\n if (posAtual > maxScroll * 0.9 && !this.variables.getCarregandoMaisComics()) {\n this.variables.setCarregandoMaisComics(true);\n this.comics.getComics(this.variables.getTituloBusca(), this.variables.getComics().length).subscribe(comics => {\n this.variables.setComics(comics.data.results, false);\n this.variables.setCarregandoMaisComics(false);\n });\n }\n }", "title": "" }, { "docid": "13e9383b0306f78727557a50120494ee", "score": "0.6851369", "text": "onScroll_() {\n const scrollTop = this.scrollTop;\n if (scrollTop > 0 && this.instances_.length !== this.items.length) {\n if (this.fillViewHeight_(scrollTop + this.maxHeight)) {\n this.updateHeight_();\n }\n }\n }", "title": "" }, { "docid": "b6f005281c928b5dc6ed1fc9cc97f261", "score": "0.6832844", "text": "initScroll() {\n const me = this;\n // This method may be called early, before render calls it, so ensure that it's\n // only executed once.\n if (!me.scrollInitialized) {\n let scrollTop,\n onScroll = me.createOnFrame(() => {\n me._scrollTop = scrollTop = me.scrollable.y;\n\n if (!me.scrolling) {\n me.scrolling = true;\n me.eachSubGrid((s) => (s.suspendResizeMonitor = true));\n }\n\n me.rowManager.updateRenderedRows(scrollTop);\n\n /**\n * Grid has scrolled vertically\n * @event scroll\n * @param {Grid.view.Grid} grid\n * @param {Number} scrollTop\n */\n me.trigger('scroll', { scrollTop });\n });\n\n me.scrollInitialized = true;\n\n me.scrollable.on({\n scroll: onScroll,\n scrollend() {\n me.scrolling = false;\n me.eachSubGrid((s) => (s.suspendResizeMonitor = false));\n }\n });\n\n me.callEachSubGrid('initScroll');\n }\n }", "title": "" }, { "docid": "3f043ef7786d13e1065c892649420b81", "score": "0.6824957", "text": "function onPageScroll() {\r\n\tvar trigger = \"scroll\";\r\n}", "title": "" }, { "docid": "235fb5e4453456a8c4843af8b3d8e5db", "score": "0.68186337", "text": "function onScroll() {\n return function (event) {\n // cross-browser wheel delta\n var e = window.event || event;\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || - e.detail)));\n scope.$apply(scope.goToSlide(delta < 0 ? scope.index + 1 : scope.index - 1));\n return false;\n };\n }", "title": "" }, { "docid": "ff19d7b4eb5a007666e9787c817aa5db", "score": "0.6815908", "text": "function eltdOnWindowScrollHeader() {\n \n }", "title": "" }, { "docid": "8dec974e2e8fa5c64131470d5a75efef", "score": "0.68107617", "text": "onScroll() {\n if (\n (window.innerHeight + window.scrollY) >= (document.body.offsetHeight - 300) &&\n this.props.questionsCount > this.props.currentLastQuestion && !this.props.isLoading\n ) {\n this.props.actions.loadQuestions(this.props.currentLastQuestion, this.props.loadSize);\n }\n }", "title": "" }, { "docid": "0de250b81bdbe2eaa7f82d80c0234a23", "score": "0.68077224", "text": "function updateScroll(event) {\n moveElements();\n}", "title": "" }, { "docid": "458f9e3be1c13922e563eb72007207dc", "score": "0.68041354", "text": "function _scrollUpdate(event) {\n\t if (!this.options.enabled) {\n\t return;\n\t }\n\t var offset = Array.isArray(event.delta) ? event.delta[this._direction] : event.delta;\n\t this.scroll(offset);\n\t }", "title": "" }, { "docid": "458f9e3be1c13922e563eb72007207dc", "score": "0.68041354", "text": "function _scrollUpdate(event) {\n\t if (!this.options.enabled) {\n\t return;\n\t }\n\t var offset = Array.isArray(event.delta) ? event.delta[this._direction] : event.delta;\n\t this.scroll(offset);\n\t }", "title": "" }, { "docid": "0585fd18feddd01442f18d3609be2ac0", "score": "0.6790824", "text": "handleScroll() {\n if(this.scroller) {\n const heightOfContent = this.scroller.offsetHeight;\n const yOffset = window.pageYOffset;\n const wholeY = yOffset + window.innerHeight;\n if(wholeY >= heightOfContent) {\n this.lazyLoad();\n }\n }\n\n }", "title": "" }, { "docid": "cc442ca2eaa27a6181ae16269c28d624", "score": "0.6778914", "text": "function qodeOnWindowScroll() {\n\t qodeInitNewsShortcodesPagination().scroll();\n }", "title": "" }, { "docid": "7817887f12c287ba13236ca63a6672c3", "score": "0.67730427", "text": "function _scroll(e) {\n _scrollTimer && clearTimeout(_scrollTimer);\n _scrollTimer = setTimeout(function() {\n if (_waiting) return;\n var scrollTop = body_container[0].scrollTop;\n newViewPort();\n _showData();\n $self.trigger('scroll', [scrollTop, body[0].offsetHeight, body_container[0].offsetHeight]); // fire event\n },1);\n e.preventDefault(); // prevent default function\n return false; // stop event\n }", "title": "" }, { "docid": "a188d27a8a188c1ca48082ab939510a6", "score": "0.67716044", "text": "function Scroll(parent){this.parent=parent;this.addEventListener();}", "title": "" }, { "docid": "7ef4ebfffe21e7b992de44a8c8a905fc", "score": "0.67698413", "text": "onListScroll() {\n\t\t\tvar n = Util.$('results-container');\n\t\t\tif ( (n.clientHeight + n.scrollTop) >= (n.scrollHeight -50) ) {\n\t\t\t\tthis._pageHandler.nextPage()\n\t\t\t\t\t.then(response => {\n\t\t\t\t\t\tif (response) {\n\t\t\t\t\t\t\tthis.showNextPage(response);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3d54bb557fac97632a42eb3dd5006c78", "score": "0.6766865", "text": "onVerticalScroll() {\n // ResizeMonitor triggers scroll during render, make sure render is done\n if (this.isDrawn) {\n // Do not invalidate on scroll, if height changes it will be invalidated anyway\n this.scheduleDraw(false);\n }\n }", "title": "" }, { "docid": "3d54bb557fac97632a42eb3dd5006c78", "score": "0.6766865", "text": "onVerticalScroll() {\n // ResizeMonitor triggers scroll during render, make sure render is done\n if (this.isDrawn) {\n // Do not invalidate on scroll, if height changes it will be invalidated anyway\n this.scheduleDraw(false);\n }\n }", "title": "" }, { "docid": "b8ab29d62f5aaa28daad0210674444ea", "score": "0.6737164", "text": "function onScroll(scrollOffset) {\n\t\t// unique tick id\n\t\t++ticks;\n\n\t\t// viewport rectangle\n\t\tvar top = jWindow.scrollTop(),\n\t\t\tleft = jWindow.scrollLeft(),\n\t\t\tright = left + jWindow.width(),\n\t\t\tbottom = top + jWindow.height();\n\n\t\t// determine which elements are in view\n\t\tvar intersections = findElements(top+offset.top + scrollOffset || 200, right+offset.right, bottom+offset.bottom, left+offset.left);\n\t\t$.each(intersections, function(i, element) {\n\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick != 'number') {\n\t\t\t\t// entered into view\n\t\t\t\telement.triggerHandler('scrollSpy:enter');\n\t\t\t}\n\n\t\t\t// update tick id\n\t\t\telement.data('scrollSpy:ticks', ticks);\n\t\t});\n\n\t\t// determine which elements are no longer in view\n\t\t$.each(elementsInView, function(i, element) {\n\t\t\tvar lastTick = element.data('scrollSpy:ticks');\n\t\t\tif (typeof lastTick == 'number' && lastTick !== ticks) {\n\t\t\t\t// exited from view\n\t\t\t\telement.triggerHandler('scrollSpy:exit');\n\t\t\t\telement.data('scrollSpy:ticks', null);\n\t\t\t}\n\t\t});\n\n\t\t// remember elements in view for next tick\n\t\telementsInView = intersections;\n\t}", "title": "" }, { "docid": "e24a3b3670472dcb84bdcfbed7506c48", "score": "0.6733329", "text": "function onFallbackScroll(e) {\n var _a;\n\n var newScrollTop = e.currentTarget.scrollTop;\n\n if (Math.abs(newScrollTop - state.scrollTop) >= 1) {\n syncScrollTop(newScrollTop);\n } // Trigger origin onScroll\n\n\n (_a = props.onScroll) === null || _a === void 0 ? void 0 : _a.call(props, e);\n } // Since this added in global,should use ref to keep update", "title": "" }, { "docid": "0e714bfa11bd884f9042b956bd3724c9", "score": "0.67232174", "text": "function setupAugmentedScrollEvents(element){var SCROLL_END_DELAY=200;var isScrolling;var lastScrollTime;element.on('scroll touchmove',function(){if(!isScrolling){isScrolling=true;$$rAF.throttle(loopScrollEvent);element.triggerHandler('$scrollstart');}element.triggerHandler('$scroll');lastScrollTime=+$mdUtil.now();});function loopScrollEvent(){if(+$mdUtil.now()-lastScrollTime>SCROLL_END_DELAY){isScrolling=false;element.triggerHandler('$scrollend');}else{element.triggerHandler('$scroll');$$rAF.throttle(loopScrollEvent);}}}", "title": "" }, { "docid": "aae0c09000f392a9fc5421daaa8745f5", "score": "0.67215914", "text": "scrollHandler() {\n // stop handling scroll event when the character data is on loading or if the pageNumber is over in api\n if (!this.props.charactersPageNumber || this.props.loadingSpinner) {\n return;\n }\n\n if (window.innerHeight + window.scrollY >= this.refs.homeRef.offsetHeight) {\n this.getCharactersDataAPI();\n }\n }", "title": "" }, { "docid": "d74e50f84269e217da6e74aec896032c", "score": "0.6717386", "text": "addEvents() {\n addEventListener('scroll', () => {\n\n //nurodom kurios sekcijos vietos reikia sulaukti\n const numbersDOM = document.querySelectorAll('.achievements .item > .number');\n \n for(let i=0; i<this.validUsedData.length; i++) {\n this.animateNumber(i, numbersDOM[I]);\n }\n\n })\n }", "title": "" }, { "docid": "20c0be2419ee92c6a15f1432a5c35982", "score": "0.6712249", "text": "updateScroll() {\n\t\t\tthis.scrollPosition = window.scrollY;\n\t\t}", "title": "" }, { "docid": "f0f6d49a7da24ce9782aacbe6ac51c1e", "score": "0.6695729", "text": "function handleScroll () {\n\n movePopupToTarget(instance);\n }", "title": "" }, { "docid": "d655ef45a2d303b135651cc2cbb7abac", "score": "0.6693966", "text": "scroll() {\n const env = this;\n const container = this['$container']['$node'];\n container.parentNode.addEventListener( 'scroll', function( e ) {\n env['$content'].scrollTop = container.parentNode.scrollTop;\n env['$content'].scrollLeft = container.parentNode.scrollLeft;\n env.setPage();\n });\n }", "title": "" }, { "docid": "733e47361202878390f8cd1530314aeb", "score": "0.66934204", "text": "function generateListeners_scroll() {\n if (document.getElementById('workers')) {\n document.getElementById('workers').addEventListener('scroll', function (e) {\n document.getElementById('costs').scrollLeft = e.target.scrollLeft;\n });\n }\n if (document.getElementById('costs')) {\n document.getElementById('costs').addEventListener('scroll', function (e) {\n document.getElementById('workers').scrollLeft = e.target.scrollLeft;\n });\n }\n }", "title": "" }, { "docid": "1476137970456b8f2ee347d5d46f299b", "score": "0.6692923", "text": "function onScroll() { // 2421\n\t\t// unique tick id // 2422\n\t\t++ticks; // 2423\n // 2424\n\t\t// viewport rectangle // 2425\n\t\tvar top = jWindow.scrollTop(), // 2426\n\t\t\tleft = jWindow.scrollLeft(), // 2427\n\t\t\tright = left + jWindow.width(), // 2428\n\t\t\tbottom = top + jWindow.height(); // 2429\n // 2430\n\t\t// determine which elements are in view // 2431\n// + 60 accounts for fixed nav // 2432\n\t\tvar intersections = findElements(top+offset.top + 200, right+offset.right, bottom+offset.bottom, left+offset.left); // 2433\n\t\t$.each(intersections, function(i, element) { // 2434\n // 2435\n\t\t\tvar lastTick = element.data('scrollSpy:ticks'); // 2436\n\t\t\tif (typeof lastTick != 'number') { // 2437\n\t\t\t\t// entered into view // 2438\n\t\t\t\telement.triggerHandler('scrollSpy:enter'); // 2439\n\t\t\t} // 2440\n // 2441\n\t\t\t// update tick id // 2442\n\t\t\telement.data('scrollSpy:ticks', ticks); // 2443\n\t\t}); // 2444\n // 2445\n\t\t// determine which elements are no longer in view // 2446\n\t\t$.each(elementsInView, function(i, element) { // 2447\n\t\t\tvar lastTick = element.data('scrollSpy:ticks'); // 2448\n\t\t\tif (typeof lastTick == 'number' && lastTick !== ticks) { // 2449\n\t\t\t\t// exited from view // 2450\n\t\t\t\telement.triggerHandler('scrollSpy:exit'); // 2451\n\t\t\t\telement.data('scrollSpy:ticks', null); // 2452\n\t\t\t} // 2453\n\t\t}); // 2454\n // 2455\n\t\t// remember elements in view for next tick // 2456\n\t\telementsInView = intersections; // 2457\n\t} // 2458", "title": "" }, { "docid": "b0964eb4ca89269748e8da62d9bf2726", "score": "0.6692062", "text": "onResize () {\n if (this.ref && this.initialsed) {\n this.onScroll({ currentTarget: this.ref }, true)\n }\n }", "title": "" }, { "docid": "ae53e0e8100cb4c0dfd482ebf0616ae4", "score": "0.6678517", "text": "function scroll(els) {\n sections = els;\n\n // when window is scrolled call\n // position. When it is resized\n // call resize.\n\n d3.select(ReactDOM.findDOMNode(this))\n .on('scroll.scroller', position)\n .on('resize.scroller', resize);\n\n // manually call resize\n // initially to setup\n // scroller.\n resize();\n\n // hack to get position\n // to be called once for\n // the scroll position on\n // load.\n // @v4 timer no longer stops if you\n // return true at the end of the callback\n // function - so here we stop it explicitly.\n var timer = d3.timer(function () {\n position();\n timer.stop();\n });\n }", "title": "" }, { "docid": "549abfb6fe8d1ddc8cd73ef60a1c435e", "score": "0.66743577", "text": "function onScroll() {\n if (savePositionHandle !== null) {\n return;\n }\n\n // It's possible that this scroll operation was triggered by what will be\n // a `POP` transition. Instead of updating the saved location\n // immediately, we have to enqueue the update, then potentially cancel it\n // if we observe a location update.\n savePositionHandle = _domHelpersUtilRequestAnimationFrame2['default'](function () {\n savePositionHandle = null;\n\n var state = _historyLibDOMStateStorage.readState(currentKey);\n var scrollPosition = [_domHelpersQueryScrollLeft2['default'](window), _domHelpersQueryScrollTop2['default'](window)];\n\n // We have to directly update `DOMStateStorage`, because actually\n // updating the location could cause e.g. React Router to re-render the\n // entire page, which would lead to observably bad scroll performance.\n _historyLibDOMStateStorage.saveState(currentKey, _extends({}, state, { scrollPosition: scrollPosition }));\n });\n }", "title": "" }, { "docid": "11ec3b05098bc2ba3f4622d83fbcc902", "score": "0.6667598", "text": "_onWindowScroll() {\n\n this._load();\n\n if (this.loaded) {\n window.removeEventListener('scroll', this._onWindowScroll);\n }\n\n }", "title": "" }, { "docid": "87f63353006abad0352cfab09ace3864", "score": "0.66522014", "text": "function _update() {\n\n offset = window.scrollY;\n\n events = events.filter(function (event) {\n\n if (offset > event.offset) {\n event.cb.call(event.el, event.el, offset);\n return false;\n }\n\n return true;\n });\n }", "title": "" }, { "docid": "a1b3a0dfba72c90cf33557b27990a657", "score": "0.6641066", "text": "function manageScroll () {\n\t\tvar scroller = $('#scroller'),\n\t\t\telementScrolled,\n\t\t\tcurrentScrollTop;\n\n\t\tscroller.scroll(function () {\n\t\t\tcurrentScrollTop = $(this).scrollTop();\n\t\t\tif (currentScrollTop > prevScrollTop) {\n\t\t\t\telementScrolled = Math.floor((currentScrollTop - prevScrollTop) / minContentHeight);\n\t\t\t\t// If a complete block is scrolled up only then call the updateGrid function\n\t\t\t\tif (elementScrolled) {\n\t\t\t\t\tupdateGrid(lastDrawIndex, lastDrawIndex + 3);\n\t\t\t\t\tprevScrollTop = currentScrollTop;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "c062f370b8a51cf7068706353763372b", "score": "0.6637483", "text": "onScroll() {\n let scrollTop = this.$scrollTarget.scrollTop(),\n $el = this.$el,\n bottom = $el.offset().top + $el.get(0).getBoundingClientRect().height,\n windowHeight = $(window).height(),\n threshold = bottom - windowHeight - this.bufferHeight;\n\n if (scrollTop > threshold) {\n this.requestPage();\n }\n }", "title": "" }, { "docid": "97d27d57afc136e03e61db2b438d4bbf", "score": "0.6623692", "text": "_attachScrollSpy() {\n this._scrollCarrier.addEventListener('scroll', this._scrollSpy);\n this._scrollCarrier.addEventListener('resize', this._scrollSpy);\n }", "title": "" }, { "docid": "b4d99abca43bc30640cf105534dcc643", "score": "0.66020703", "text": "function onScroll() {\n\t\tlogTrace('invoking onScroll()');\n\n\t\tif (pageLoads === true) {\n\n\t\t\tlogWarn('Cancelled emitted scroll event, because page load is in progress.');\n\t\t\treturn false;\n\t\t}\n\n\t\tlet remainingItems;\n\n\t\tif (\n\t\t\t(currentPageType !== 'following') ||\n\t\t\t(hideFollowing === true)\n\t\t) {\n\n\t\t\tremainingItems = filterDirectory('unprocessed');\n\n\t\t} else {\n\n\t\t\t// invoke directory filter for recommended section\n\t\t\tremainingItems = filterDirectory('recommended');\n\n\t\t\t// mark remaining items as being processed\n\t\t\tfilterDirectory('unprocessed', false);\n\t\t}\n\n\t\tattachHideButtons(remainingItems);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e6be7304faceb9d22e7931f0f48ebff0", "score": "0.6585077", "text": "function eltdOnWindowScrollHeaderBehaviour() {\n }", "title": "" }, { "docid": "3da0fe2e8f0c9ca8526f0d62016cc316", "score": "0.6577831", "text": "function onScroll(scrollOffset) {\r\n // unique tick id\r\n ++ticks;\r\n\r\n // viewport rectangle\r\n var top = jWindow.scrollTop(),\r\n left = jWindow.scrollLeft(),\r\n right = left + jWindow.width(),\r\n bottom = top + jWindow.height();\r\n\r\n // determine which elements are in view\r\n var intersections = findElements(top + offset.top + scrollOffset || 200, right + offset.right, bottom + offset.bottom, left + offset.left);\r\n $.each(intersections, function (i, element) {\r\n\r\n var lastTick = element.data('scrollSpy:ticks');\r\n if (typeof lastTick != 'number') {\r\n // entered into view\r\n element.triggerHandler('scrollSpy:enter');\r\n }\r\n\r\n // update tick id\r\n element.data('scrollSpy:ticks', ticks);\r\n });\r\n\r\n // determine which elements are no longer in view\r\n $.each(elementsInView, function (i, element) {\r\n var lastTick = element.data('scrollSpy:ticks');\r\n if (typeof lastTick == 'number' && lastTick !== ticks) {\r\n // exited from view\r\n element.triggerHandler('scrollSpy:exit');\r\n element.data('scrollSpy:ticks', null);\r\n }\r\n });\r\n\r\n // remember elements in view for next tick\r\n elementsInView = intersections;\r\n }", "title": "" }, { "docid": "43d6301aae01b8983cae0384d11bdf06", "score": "0.6577428", "text": "function enableScrolling(){\n window.onscroll=function(){};\n}", "title": "" }, { "docid": "1582abc63fb167ec50783cf871849a0b", "score": "0.656706", "text": "function bindEvents() {\n DOM.window.on('scroll', windowOnScroll)\n }", "title": "" }, { "docid": "055aa47805d3f89431fe7bbfb16e0163", "score": "0.65663266", "text": "function onScroll(scrollOffset) {\n // unique tick id\n ++ticks;\n\n // viewport rectangle\n var top = jWindow.scrollTop(),\n left = jWindow.scrollLeft(),\n right = left + jWindow.width(),\n bottom = top + jWindow.height();\n\n // determine which elements are in view\n var intersections = findElements(top + offset.top + scrollOffset || 200, right + offset.right, bottom + offset.bottom, left + offset.left);\n $.each(intersections, function (i, element) {\n\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick != 'number') {\n // entered into view\n element.triggerHandler('scrollSpy:enter');\n }\n\n // update tick id\n element.data('scrollSpy:ticks', ticks);\n });\n\n // determine which elements are no longer in view\n $.each(elementsInView, function (i, element) {\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick == 'number' && lastTick !== ticks) {\n // exited from view\n element.triggerHandler('scrollSpy:exit');\n element.data('scrollSpy:ticks', null);\n }\n });\n\n // remember elements in view for next tick\n elementsInView = intersections;\n }", "title": "" }, { "docid": "055aa47805d3f89431fe7bbfb16e0163", "score": "0.65663266", "text": "function onScroll(scrollOffset) {\n // unique tick id\n ++ticks;\n\n // viewport rectangle\n var top = jWindow.scrollTop(),\n left = jWindow.scrollLeft(),\n right = left + jWindow.width(),\n bottom = top + jWindow.height();\n\n // determine which elements are in view\n var intersections = findElements(top + offset.top + scrollOffset || 200, right + offset.right, bottom + offset.bottom, left + offset.left);\n $.each(intersections, function (i, element) {\n\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick != 'number') {\n // entered into view\n element.triggerHandler('scrollSpy:enter');\n }\n\n // update tick id\n element.data('scrollSpy:ticks', ticks);\n });\n\n // determine which elements are no longer in view\n $.each(elementsInView, function (i, element) {\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick == 'number' && lastTick !== ticks) {\n // exited from view\n element.triggerHandler('scrollSpy:exit');\n element.data('scrollSpy:ticks', null);\n }\n });\n\n // remember elements in view for next tick\n elementsInView = intersections;\n }", "title": "" }, { "docid": "055aa47805d3f89431fe7bbfb16e0163", "score": "0.65663266", "text": "function onScroll(scrollOffset) {\n // unique tick id\n ++ticks;\n\n // viewport rectangle\n var top = jWindow.scrollTop(),\n left = jWindow.scrollLeft(),\n right = left + jWindow.width(),\n bottom = top + jWindow.height();\n\n // determine which elements are in view\n var intersections = findElements(top + offset.top + scrollOffset || 200, right + offset.right, bottom + offset.bottom, left + offset.left);\n $.each(intersections, function (i, element) {\n\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick != 'number') {\n // entered into view\n element.triggerHandler('scrollSpy:enter');\n }\n\n // update tick id\n element.data('scrollSpy:ticks', ticks);\n });\n\n // determine which elements are no longer in view\n $.each(elementsInView, function (i, element) {\n var lastTick = element.data('scrollSpy:ticks');\n if (typeof lastTick == 'number' && lastTick !== ticks) {\n // exited from view\n element.triggerHandler('scrollSpy:exit');\n element.data('scrollSpy:ticks', null);\n }\n });\n\n // remember elements in view for next tick\n elementsInView = intersections;\n }", "title": "" }, { "docid": "7efc71128ea89f15516b62eb5b8eb4d2", "score": "0.6563109", "text": "function ScrollPosition() {}", "title": "" }, { "docid": "2718c1f95017e42473560a064b668472", "score": "0.65624547", "text": "_verticalScrollbarHandler(event) {\n const that = this;\n const value = event.detail.value;\n event.stopPropagation();\n\n if (that.isVirtualized) {\n that._recycle();\n }\n else {\n that.$.itemsContainer.scrollTop = value;\n }\n\n that._updateTopVisibleIndex();\n\n if (event.context.max === event.context.value) {\n that.$.fireEvent('scrollBottomReached');\n return;\n }\n\n if (event.context.min === event.context.value) {\n that.$.fireEvent('scrollTopReached');\n }\n }", "title": "" }, { "docid": "551121c76a528bcfa728f22f26cf234a", "score": "0.6559731", "text": "_addListeners() {\n window.addEventListener('scroll', () => {\n this._handleEvent(window.scrollY + window.outerHeight);\n }, false);\n }", "title": "" }, { "docid": "b2cafe2ec8cae4e0b9f3c199a2cffeea", "score": "0.6551343", "text": "_evtScroll(event) {\n if (this.isHidden || !this._editor) {\n return;\n }\n const { node } = this;\n // All scrolls except scrolls in the actual hover box node may cause the\n // referent editor that anchors the node to move, so the only scroll events\n // that can safely be ignored are ones that happen inside the hovering node.\n if (node.contains(event.target)) {\n return;\n }\n // Set the geometry of the node asynchronously.\n requestAnimationFrame(() => {\n this._setGeometry();\n });\n }", "title": "" }, { "docid": "a240917f94edd9903e067e6680fa03ce", "score": "0.6540983", "text": "function scroll_check(ev,tag){\n\n\tdrag_manager.scroll_value = tag.scrollTop;\n\n\tfolder_positions_find();\n\n}", "title": "" }, { "docid": "ab3ea4acc0c2681c8e1e39dac747a948", "score": "0.6538693", "text": "function TreeGrid_OnScroll(event)\n{\n\t//get the source HTML\n\tvar theHTML = Get_HTMLObject(Browser_GetEventSourceElement(event));\n\t//valid?\n\tif (theHTML)\n\t{\n\t\t//get our interpreterObject\n\t\tvar theObject = theHTML.InterpreterObject;\n\t\t//check if we are currently handling it\n\t\tif (theObject.Paint.TimeOut)\n\t\t{\n\t\t\t//clear it\n\t\t\t__EVENTS_QUEUE.RemoveEvent(theObject.Paint.TimeOut);\n\t\t}\n\t\t//set a timeout\n\t\ttheObject.Paint.TimeOut = __EVENTS_QUEUE.AddEvent((function (theObject) { return function () { TreeGrid_OnScrollDelayed(theObject); }; })(theObject), 10);\n\t}\n}", "title": "" }, { "docid": "d9db31e1775724edd2d54e7f38c5c1e6", "score": "0.65292746", "text": "onscrollHandle(e){\n if((this.getScrollHeight() - this.getScrollTop()) <= this.getScrollOuterHeight()){\n if(!this.allProductsLoaded){\n this.loadMoreProducts();\n }\n }\n }", "title": "" }, { "docid": "18896aec71fc6d48bb1d556495095c61", "score": "0.65277416", "text": "didRender() {\n super.didRender(...arguments);\n\n if (!get(this, 'isDestroyed') && !get(this, 'isDestroying')) {\n this._syncScroll();\n }\n }", "title": "" }, { "docid": "c8f900b13a880e22c1cb231e00c641e2", "score": "0.6516979", "text": "componentDidUpdate(){\n console.log(\"UPDATE : \", this.lastMsgRef)\n if(this.lastMsgRef.current !== null && this.lastMsgRef.current !== undefined )\n {this.executeScroll()}\n}", "title": "" }, { "docid": "ffc78c46a9c620d6898ed421f51fbd71", "score": "0.65067524", "text": "function _callScrollHandlers(){\n\t\tfor (var i = 0; i < _scrollHandlers.length; i++) {\n\t\t\t(_scrollHandlers[i].handler)(_lastScrollEvent);\n\t\t}\n\t\t_pendingScrollHandlers = false;\n\t\t_lastScrollEvent = null;\n\t}", "title": "" }, { "docid": "6f6bb0997ff23af2bebcd9ab5cfdf74b", "score": "0.6506536", "text": "function scroll(els) {\n sections = els;\n\n // when window is scrolled call\n // position. When it is resized\n // call resize.\n d3.select(window)\n .on('scroll.scroller', position)\n .on('resize.scroller', resize);\n\n // manually call resize\n // initially to setup\n // scroller.\n resize();\n\n // hack to get position\n // to be called once for\n // the scroll position on\n // load.\n // @v4 timer no longer stops if you\n // return true at the end of the callback\n // function - so here we stop it explicitly.\n var timer = d3.timer(function () {\n position();\n timer.stop();\n });\n }", "title": "" }, { "docid": "4f423b587327bd78bc6d07dcb3c132e7", "score": "0.64904094", "text": "connectedCallback() {\n this.addEventListener('wheel', (e) => this.mouseWheelHandler(e))\n this.addEventListener('transitionend', () => this.setScroll())\n }", "title": "" }, { "docid": "c50e41b51ab8038e74e31c34eb5b22ad", "score": "0.64643085", "text": "_initScrollTracking() {\n let timeoutHandle = null;\n let lastActiveSection = null;\n window.addEventListener('scroll', (ev) => {\n clearTimeout(timeoutHandle);\n\n timeoutHandle = setTimeout(() => {\n const sections = document.getElementsByTagName('section');\n for (const section of sections) {\n // Finds the first section within the viewport, then breaks\n if (this._isInViewPort(section)) {\n if (section != lastActiveSection) {\n this._clearNavbarSelectedItems(this._navbar);\n\n const sectionName = section.getAttribute('data-name');\n\n this._selectItemForSection(navbar, sectionName);\n }\n \n lastActiveSection = section;\n break;\n }\n }\n }, 300);\n })\n }", "title": "" }, { "docid": "ff402f7a77e54e588e92dd74308987c6", "score": "0.6455491", "text": "onWheel(e) {\n // Rewriting default behavior\n e.preventDefault();\n window.scrollBy(e.deltaY, 0);\n\n // Depending methods\n this.scrollBarWidth();\n this.scrollBarHighlight();\n this.closePosition();\n this.backgroundHeaderPosition(e);\n }", "title": "" } ]
36a094a5822614d2a4321e44f5569c7d
longest prefix suffix abcabx [0,0,0,1,2,0] i: str, o: arr
[ { "docid": "0ed7ff8612fdf7ccc2a2c21faea782bf", "score": "0.53488386", "text": "function getLPS(str) {\n // lps arr\n // index array based on suffix found in prefix\n // pointers start and end\n // 0 if end doesn't match start\n // increment if end match start\n // if end stops matching, use value of previous index to determine value\n // return lps arr\n}", "title": "" } ]
[ { "docid": "3c5b894d92038e12a2301379756ff18b", "score": "0.6282759", "text": "function initSuffix( pattern ) {\n \t\n \tvar suffix = [];\n \tvar next = initNext( pattern );\n \tvar nextR = initNext( pattern.split('').reverse().join('') );\n \t\n \tfor(var i = 0; i < pattern. length; i++)\n \t\tsuffix.push(pattern.length - 1 - next[pattern.length - 1]);\n \t\n \tfor(var i = 0; i < pattern.length; i++) {\n \t\t\n \t\tvar j = pattern.length - 1 - nextR[i];\n\t\t\tsuffix[j] = Math.min(suffix[j], i - nextR[i]);\n \t}\n \t\n \treturn suffix;\n }", "title": "" }, { "docid": "b2a7d2009c9bdad3b4bcc8fbbecf812a", "score": "0.625212", "text": "function longestSub(string, k){\r\n \r\n}", "title": "" }, { "docid": "d297cca35493f40206089bef87416772", "score": "0.6074992", "text": "function lengthOfLongestSubstring(s) {\n const seen = [];\n\n let maxLen = 0,\n start = 0,\n charCode,\n lastIdx;\n\n for (let i = 0; i < s.length; i++) {\n charCode = s[i].charCodeAt();\n lastIdx = seen[charCode];\n console.log(start)\n if (lastIdx !== undefined && start <= lastIdx) {\n start = lastIdx + 1;\n } else {\n maxLen = Math.max(maxLen, i - start + 1);\n }\n seen[charCode] = i;\n }\n return maxLen;\n}", "title": "" }, { "docid": "54ec463602042a540b4f2aa102577bab", "score": "0.5978323", "text": "function longestCommonPrefix (strs) {\n\t// String to hold the currently longest prefix found (defaults to\\\n\t// an empty string)\n\tlet prefix = \"\";\n\n\t// If the input array is empty, just return the empty string\n\tif (strs.length === 0) {\n\t\treturn prefix;\n\t}\n\n\t// Loop through the first word (we don't need to loop further than the\\\n\t// length of this word, because the longest common prefix can only be\\\n\t// as long as or shorter than this word)\n\tfor (let i=0; i<strs[0].length; i++) {\n\t\t// Save the current character\n\t\tconst character = strs[0][i];\n\t\t\n\t\t// Now loop through the array of strings to compare the character\\\n\t\t// at the current index in all strings with the \"original\" character\n\t\tfor (let j=0; j<strs.length; j++) {\n\t\t\t// If the character at the current index of the current string\\\n\t\t\t// is different from that of the first word, then return the\\\n\t\t\t// prefix as is because it will not be any longer\n\t\t\tif (strs[j][i] !== character) {\n\t\t\t\treturn prefix;\n\t\t\t}\n\t\t}\n\n\t\t// If, after looking through all strings, we have found the same\\\n\t\t// character in all strings, then append that character to the\\\n\t\t// prefix\n\t\tprefix += character;\n\t\n\t}\n\n\treturn prefix;\n}", "title": "" }, { "docid": "def65b3065f4ab017d96504aab413a9b", "score": "0.5977396", "text": "function longest(arrayOfStrings){\n x = arrayOfStrings.map(lengths);\n //console.log(x);\n y = Math.max.apply(null,x);\n //console.log(y);\n z = x.indexOf(y);\n console.log(arrayOfStrings[z]);\n}", "title": "" }, { "docid": "dbdeee69573c8b29664a945cf8e59f57", "score": "0.59389293", "text": "function longestCommonPrefix(strs) {\n var result = \"\";\n if (strs.length === 0) {\n return result;\n }\n result = strs.reduce(function (common, value) {\n let len = Math.min(common.length, value.length);\n var str = \"\";\n for (var i = 0; i < len; i++) {\n\n if (common.charAt(i) === value.charAt(i)) {\n str += common.charAt(i);\n } else {\n break;\n }\n }\n return str;\n }, strs[0]);\n return result;\n}", "title": "" }, { "docid": "dbdeee69573c8b29664a945cf8e59f57", "score": "0.59389293", "text": "function longestCommonPrefix(strs) {\n var result = \"\";\n if (strs.length === 0) {\n return result;\n }\n result = strs.reduce(function (common, value) {\n let len = Math.min(common.length, value.length);\n var str = \"\";\n for (var i = 0; i < len; i++) {\n\n if (common.charAt(i) === value.charAt(i)) {\n str += common.charAt(i);\n } else {\n break;\n }\n }\n return str;\n }, strs[0]);\n return result;\n}", "title": "" }, { "docid": "326f69897e36e1575330ee844c1b3971", "score": "0.59023017", "text": "function longestVowelSubsequence(s) {\n // Write your code here\n s=s.split('');\n let iIndex=j.findIndex(o=>o==='a');\n let startIndex=iIndex;\n let jIndex=0;\n let j=['a','e','i','o','u'];\n let i=0;\n iIndex++;\n while(iIndex<s.length){\n if(jIndex===5){\n endIndex=iIndex;\n iIndex=s.length;\n // 返回结果\n }\n if(jIndex===0){\n if(s[iIndex]===j[jIndex]){\n startIndex=iIndex;\n iIndex++;\n }else{\n jIndex++;\n }\n }else{\n if(s[iIndex]===j[jIndex]){\n iIndex++;\n jIndex++;\n }else{\n iIndex++;\n }\n }\n \n }\n if(jIndex!==5){\n return 0;\n }\n let result_str=s.slice(startIndex,endIndex);\n let mIndex=0,nIndex=0;\n while(mIndex<result_str.length){\n let curIndex=j.findIndex(o=>o===result_str[mIndex]);\n if(curIndex===nIndex){\n mIndex++;\n }else if(curIndex-nIndex===1){\n nIndex++;\n }else if(curIndex<nIndex){\n result_str.splice(mIndex,1)\n }else{\n mIndex++\n }\n }\n return result_str.length;\n}", "title": "" }, { "docid": "99731cc952855da01e7bd0492d3d25fc", "score": "0.5885445", "text": "function longestZero(s) {\n\tlet a = \"\";\n\t\n\tfor (let i = 0; i < s.length; i++) {\n\t\tif (s[i] === \"0\") {\n\t\t\ta += \"0\";\n\t\t} else {\n\t\t\ta += \" \";\n\t\t}\n\t}\n\treturn a.split(\" \").reduce((r, e) => r.length < e.length ? e : r, \"\");\n}", "title": "" }, { "docid": "9946f312251ccd3f4b8e0863dda74f4c", "score": "0.5837211", "text": "maxPrefixed (prefixes, decl) {\n if (decl._autoprefixerMax) {\n return decl._autoprefixerMax\n }\n\n let max = 0\n for (let prefix of prefixes) {\n prefix = utils.removeNote(prefix)\n if (prefix.length > max) {\n max = prefix.length\n }\n }\n decl._autoprefixerMax = max\n\n return decl._autoprefixerMax\n }", "title": "" }, { "docid": "d3967c1c8d00b82c60e7738d04f47595", "score": "0.582299", "text": "maxPrefixed(prefixes, decl) {\n if (decl._autoprefixerMax) {\n return decl._autoprefixerMax\n }\n\n let max = 0\n for (let prefix of prefixes) {\n prefix = utils.removeNote(prefix)\n if (prefix.length > max) {\n max = prefix.length\n }\n }\n decl._autoprefixerMax = max\n\n return decl._autoprefixerMax\n }", "title": "" }, { "docid": "1915b771fa593e2a310ecd8d239f03f3", "score": "0.57926387", "text": "function longest(arr, n) {\n \n}", "title": "" }, { "docid": "fade590a8ea46c88dd6cb3e02566f873", "score": "0.5783453", "text": "function findLongest() {\n\t\tlet longestLen = 0\n\t\tlet longest = \"\"\n\t\tarr.forEach(i => {\n\t\t\tif(i.length > longestLen) {\n\t\t\t\tlongestLen = i.length\n\t\t\t\tlongest = i\n\t\t\t}\n\t\t})\n\t\treturn longest ? longest.join('') : longest\n\t}", "title": "" }, { "docid": "783f4f1edd7deeacf59b915152349a5d", "score": "0.5772711", "text": "function main(arr) {\n\n\t\tlet n = arr.length;\n\n\t\tvar ans = commonPrefix(arr, 0, n - 1);\n\n\t\tif (ans.length != 0) {\n\t\t\treturn ans;\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "0fc24d610f452044702cc43774cae765", "score": "0.57719755", "text": "function longestSubstringWithoutRepeating(str){\r\n let maxLength = 0;\r\n let start = 0;\r\n let indexes = [...Array(128)].map(x => -1);\r\n for(let i = 0; i < str.length; i++){\r\n if(indexes[str.charCodeAt(i)] >= start)\r\n start = indexes[str.charCodeAt(i)]+1;\r\n indexes[str.charCodeAt(i)] = i;\r\n maxLength = Math.max(maxLength, i-start+1);\r\n }\r\n return maxLength;\r\n}", "title": "" }, { "docid": "b96d74a66580d0f4bdc1aa71eb6fbd8b", "score": "0.5725001", "text": "function longestConsec(strarr, k) {\n // your code\n let result = \"\";\n\n if (strarr.length <= 0 || strarr.length < k) return result;\n\n const lengths = strarr.map((i) => i.length);\n\n for (let i = 0; i < k; i++) {\n const max = Math.max(...lengths);\n const maxIndex = lengths.findIndex((e) => e === max);\n result += strarr[maxIndex];\n lengths.splice(maxIndex, 1, 0);\n }\n\n return result;\n}", "title": "" }, { "docid": "c799431e149407589df32aaff4e24f93", "score": "0.5722663", "text": "function runLongestIndex(str) {\r\n var n = str.length; \r\n var count = 0; \r\n var res = str[0]; \r\n var cur_count = 1; \r\n \r\n for (var i=0; i<n-1; i++) \r\n { \r\n if ( str[i] == str[i+1]) {\r\n cur_count++; \r\n }\r\n else\r\n { \r\n if (cur_count > count) { \r\n count = cur_count; \r\n res = str[i]; \r\n } \r\n cur_count = 1; \r\n } \r\n } \r\n return count; \r\n }", "title": "" }, { "docid": "45fba00792d3da15759971a616a5262a", "score": "0.5672655", "text": "function longest_common_starting_substring(arr1){\r\n const arr= arr1.concat().sort();\r\n const a1= arr[0];\r\n const a2= arr[arr.length-1];\r\n const L= a1.length;\r\n let i= 0;\r\n while(i< L && a1.charAt(i)=== a2.charAt(i)) i++;\r\n return a1.substring(0, i);\r\n }", "title": "" }, { "docid": "b7857aacd493d46a5bc14f98317caa1f", "score": "0.56694734", "text": "function longest (xs) {\n return Math.max.apply(\n null,\n xs.map(function (x) { return x.length })\n );\n }", "title": "" }, { "docid": "497db01508ef01169ff2ae315e7dd1a9", "score": "0.56682384", "text": "function longestString(strings) {\n //\n}", "title": "" }, { "docid": "497db01508ef01169ff2ae315e7dd1a9", "score": "0.56682384", "text": "function longestString(strings) {\n //\n}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "4e07a9032c0d4dfbc41b9e622dd3b792", "score": "0.5664164", "text": "function Ya(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Xa(a[f]).split(\"-\"),b=e.length,c=Xa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Za(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&v(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "e99ee24e6a00d2aa82fc7c4ee9c42922", "score": "0.563554", "text": "function findContiguousHistory(u1, u2) {\n let tmp = u1.concat('$', u2);\n let n = tmp.length\n // console.log(tmp);\n \n // Build Suffix Array\n let sa = []\n for(let i = 0; i < tmp.length; i++) {\n sa[i] = i;\n }\n \n // Sort\n // Time O(N Log N) * O(N)\n sa.sort((i,j) => {\n for (let l=0; l<n; l++){\n if (i+l >= n) return -1;\n if (j+l >= n) return 1;\n if (tmp[i+l] == tmp[j+l]) continue;\n if (tmp[i+l] < tmp[j+l]) return -1;\n return 1;\n }\n return 0;\n });\n // console.log(sa);\n\n // Build Longest Common Prefix.\n\n let k=0;\n let lcp = new Array(n).fill(0);\n let rank = new Array(n).fill(0);\n \n for(let i=0; i<n; i++) rank[sa[i]]=i;\n \n for(let i=0; i<n; i++, k?k--:0) {\n if(rank[i]==n-1) {k=0; continue;}\n let j = sa[rank[i]+1];\n while(i+k<n && j+k<n && tmp[i+k]==tmp[j+k]) k++;\n lcp[rank[i]]=k;\n }\n let mx = 0;\n let u1Length = u1.length;\n let u22Length = u2.length;\n for (let i=1; i<n; i++) {\n if (lcp[i] >= lcp[mx] ) {\n if (lcp[i] == lcp[mx] && sa[mx] < sa[i]) continue\n mx = i;\n }\n }\n // console.log(lcp[mx], sa[mx])\n // console.log(lcp);\n // for (let i=0; i<lcp[mx]; i++) {\n // console.log(tmp[sa[mx]+i])\n // }console.log(tmp);\n // sa[mx] = position of the first matching\n // lcp(longest common prefix)[mx] = how many matches we found \n console.log(tmp.slice(sa[mx], sa[mx] + lcp[mx]));\n}", "title": "" }, { "docid": "6f6be34c08f3bd2d4977e94fec96dd06", "score": "0.5635515", "text": "function lengthOfLongestSubstring2(s){\r\n var subset = {};\r\n //var substrs = {start:-1, length:0};\r\n var longest = 0, idx, cur_char;\r\n for(var i = 0, j = 0; i < s.length && j < s.length; j++ ){\r\n cur_char = s[j];\r\n idx = subset[cur_char];\r\n i = idx == undefined ? i : (idx + 1 > i ? idx + 1 : i);\r\n subset[cur_char] = j; \r\n if(longest < j - i + 1) longest = j - i + 1;\r\n }\r\n return longest;\r\n }", "title": "" }, { "docid": "85a43c23805c49996722c62decdeaa86", "score": "0.56292975", "text": "function lengthOfLongestSubstring(str) { // \"abcabcbb\"\n if (!str.length) return 0;\n let longest = 0;\n let currentSubstr = '';\n\n for (let i = 0; i < str.length; i++) {\n currentSubstr = str.slice(i, i + 1)\n for (let j = i + 1; j < str.length; j++) {\n if (currentSubstr.includes(str[j])) {\n break\n }\n currentSubstr = str.slice(i, j + 1);\n if (currentSubstr.length > longest) longest = currentSubstr.length;\n }\n }\n \n return longest > 0 ? longest : 1; \n}", "title": "" }, { "docid": "3f4f15087d6900d939a47cc5d44e8558", "score": "0.5621796", "text": "function findLongestSubstringTwo(str) {\n\n if(str.length === 0) return 0;\n\n let start = 0;\n let end = 0;\n let max = 0;\n let obj = {};\n\n while (start <= end && start < str.length) {\n\n console.log(obj);\n\n if(end < str.length && !obj[str[end]]) {\n\n obj[str[end]] = 1;\n\n end++;\n\n }else{\n\n max = Math.max(max, end - start);\n\n delete obj[str[start]];\n\n start++;\n\n }\n\n }\n\n return max;\n\n}", "title": "" }, { "docid": "93b095b6e6bae1f1e5d9349bd14aff8b", "score": "0.56211627", "text": "function longestDigitsPrefix(inputString) {\n decimals = '123456789';\n let res = '';\n\n for (let i = 0; i < inputString.length; i++) {\n if (!decimals.includes(inputString[i])) {\n break;\n }\n\n res += inputString[i];\n }\n\n return res;\n}", "title": "" }, { "docid": "5e761bcf96d6eacbcd6cc690a8ae21a1", "score": "0.55946225", "text": "function longestConsec(strarr, k) {\n // your code\n if (strarr.length == 0 || strarr.length < k || k < 1) {\n return '';\n }\n var lengths = [];\n var maxes = [];\n var temp, ind;\n var result = [];\n\n for (var i = 0; i < strarr.length; i++) {\n lengths.push(strarr[i].length);\n }\n\n do {\n temp = Math.max(...lengths);\n ind = lengths.indexOf(temp);\n lengths.splice(ind, 1);\n result.push(strarr[ind]);\n strarr.splice(ind, 1);\n } while (result.length < k);\n\n return result.join('');\n}", "title": "" }, { "docid": "aeed4253e810cc2afae085a26f0adc47", "score": "0.55871516", "text": "function longestSub (s) {\n s = s.toUpperCase();\n let maxLength = 0;\n let len = s.length;\n let halfLen = len / 2;\n console.log(len);\n\n for (let i = 0; i < s.length; i++) {\n // TODO:\n }\n\n return maxLength;\n}", "title": "" }, { "docid": "b1accde9f8ceebbdb620b019c2d55a6f", "score": "0.55533427", "text": "function longestSubString(input) {\n let prevChar = \"\";\n\n let subStrLen = 0;\n let longestSubStrLen = 0;\n\n let longestSubStr = \"\";\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] == prevChar) {\n subStrLen++;\n } else {\n subStrLen = 1;\n }\n if (subStrLen > longestSubStrLen) {\n longestSubStrLen = subStrLen;\n longestSubStr = input.substring(i - longestSubStrLen + 1, i + 1);\n }\n prevChar = input[i];\n }\n return longestSubStr;\n}", "title": "" }, { "docid": "08e913fefd9002261a97234f68cc00db", "score": "0.5525864", "text": "function calculatelpstable(substr) {\n let i=1;\n let j=0;\n let lps = new Array(substr.length).fill(0); // [0,0,0,0,0,0,0]\n while(i<substr.length) {\n if(substr[i] === substr[j]){\n lps[i]=j+1;\n i++;j++;\n } else {\n if(j!==0){\n j=lps[j-1];\n } else{\n i++;\n }\n }\n }\n return lps;\n}", "title": "" }, { "docid": "c9717effa153bec85df336b09516913c", "score": "0.551868", "text": "function longestStr(arr) {\n let longestStr = arr.reduce((a, b) => (a.length > b.length ? a : b));\n return longestStr;\n}", "title": "" }, { "docid": "d30e56e44fdf9c5c44f1d79b65d73663", "score": "0.5504633", "text": "function longestString(arr){\n if(arr.length===1) return arr[0];\n\n let longest=arr[0];\n for(let i=1; i<arr.length; i++)\n if(arr[i].length > longest.length)\n longest=arr[i];\n\n return longest;\n}", "title": "" }, { "docid": "b07bf2221dda5433e249a01596ba93e9", "score": "0.5502969", "text": "function longestSub(str) {\r\n \r\n let oldStr = '';\r\n let newStr = '';\r\n let newCount = 0;\r\n let oldCount = 0;\r\n let arr = str.split('');\r\n\r\n for(let i = 0 ; i<arr.length; i++){\r\n if (!newStr.includes(arr[i]) || arr[i] ==' ') {\r\n newStr += arr[i] ;\r\n newCount++;\r\n } \r\n else {\r\n newCount = newStr.length - newStr.indexOf(arr[i])-1;\r\n newStr = newStr.slice(newStr.indexOf(arr[i]) + 1, newStr.length) + arr[i];\r\n }\r\n if (newCount >= oldCount) {\r\n oldCount = newCount;\r\n oldStr = newStr;\r\n } \r\n\t}\r\nreturn oldStr;\r\n}", "title": "" }, { "docid": "32a7bcdb519f33375cae452dc8ca2452", "score": "0.5499109", "text": "function longestConsec(strarr, k) {\r\n let max = 0;\r\n let result;\r\n let sumString;\r\n if(strarr.length == 0 || k < strarr.length || k <= 0 ) return \"\"\r\n for(let i = 0; i < strarr.length - 1; i++){\r\n\r\n for(let pp = 0; pp < k; pp++){\r\n\r\n sumString = strarr[i] + strarr[i + 1]\r\n\r\n if(sumString.length > max){\r\n\r\n max = strarr[i].length + strarr[i + 1].length\r\n\r\n result = strarr[i] + strarr[i + 1];\r\n }\r\n }\r\n }\r\n return result\r\n}", "title": "" }, { "docid": "a3442aaa01cd956c9c98354be35d24d8", "score": "0.54930633", "text": "function lenPrefix(str) { return numToChars(str.length) + str }", "title": "" }, { "docid": "ddbcead0c96cd36560c6fbff0574ff2f", "score": "0.5483292", "text": "function longest(ln=[]) {\n var arr= [];\n var str = \"\";\n arr.push(ln[0]);\n \n for (var i = 1; i<ln.length; i++) {\n if (ln[i].length> arr[0].length) {\n lngst = ln[i];\n arr= [];\n arr.push(ln[i]);\n } else {\n if(arr[0].length == ln[i].length) {\n arr.push(ln[i]);\n }\n \n }\n }\n \n for (var a=0; a<=arr.length-1; a++) {\n str+=(arr[a] + \" \");\n }\n \n }", "title": "" }, { "docid": "cf9451886748d108ba63dbd95cfff656", "score": "0.54776025", "text": "function maxLongUnique(str) {\n let result = []\n let temp = ''\n for (let i = 0; i<str.length; i++) {\n let findIndx = temp.indexOf(str[i])\n if (findIndx > -1) {\n result.push(temp)\n temp = temp.slice(findIndx+1) + str[i]\n }else {\n temp += str[i]\n }\n }\n result.push(temp)\n console.log(result)\n}", "title": "" }, { "docid": "e20ae9921c80d1cc4f94a0125bbf7940", "score": "0.5456707", "text": "function CommonSuffix(arrayStr){\n\tvar suffixStr = \"\";\n\tvar MatchinSuffix = true;\n\tvar CharPos = 1;\n\twhile(CharPos)\n\tfor(var i = 0; i < arrayStr.length-1; i++){\n\t\tconsole.log(arrayStr[i][arrayStr[i].length-CharPos])\n\t\tif(arrayStr[i][arrayStr[i].length-CharPos] != arrayStr[i+1][arrayStr[i+1].length-CharPos] ){\n\t\t\tconsole.log('returning false')\n\t\t\treturn suffixStr;\n\t\t} else {\n\t\t\tif(i == arrayStr.length-2){\n\t\t\t\tconsole.log('adding to str')\n\t\t\t\tsuffixStr = arrayStr[i][arrayStr[i].length-CharPos] + suffixStr;\n\t\t\t}\n\t\t}\n\t}\n\treturn suffixStr;\n}", "title": "" }, { "docid": "871ed270f12838ed021ba27e79207060", "score": "0.54554564", "text": "function longestString(arr) {\r\n\tvar stored_index = 0; // Set default index\r\n\tfor(i = 0; i < arr.length; i++) {\r\n\t\t// I recall from my University JS class that you can address strings like arrays\r\n\t\tif(arr[stored_index].length <= arr[i].length) {\r\n\t\t\tstored_index = i;\r\n\t\t};\r\n\t};\r\n\treturn arr[stored_index];\r\n}", "title": "" }, { "docid": "b009be293cb57c5495c1a61d39f667da", "score": "0.5439957", "text": "function sortSuffixes (a, b) {\n if (a.length < b.length) {\n return -1\n } else if (a.length > b.length) {\n return 1\n } else {\n return 0\n }\n}", "title": "" }, { "docid": "15208ca6c0a9200cee4a09dcc267c18d", "score": "0.54303104", "text": "function longest_string (array) {\n var max_length = 0;\n var index_maxlen = 0;\n for ( i = 0; i < array.length; i ++){\n if (array[i].length > max_length){\n max_length = array[i].length;\n index_maxlen = i;\n }\n else {\n \n }\n }\n return array[index_maxlen];\n}", "title": "" }, { "docid": "139003946ca98e70e6e54ff416dad32f", "score": "0.5416243", "text": "function lengthOfLongestSubstring1(s){\r\n var subset = {};\r\n var substrs = {start:-1, length:0};\r\n var longest = 0, other_same_idx;\r\n for(var i = 0; i < s.length;){\r\n \r\n for(var j = i; j < s.length; j++){\r\n other_same_idx = subset[s.charAt(j)];\r\n if(other_same_idx == undefined){\r\n subset[s.charAt(j)] = j;\r\n longest += 1;\r\n }else{\r\n if(longest > substrs.length){\r\n substrs.start = i;\r\n substrs.length = longest;\r\n }\r\n i = other_same_idx +1;\r\n longest = 0;\r\n subset = {};\r\n break;\r\n }\r\n }\r\n \r\n if(j == s.length){\r\n if(longest > substrs.length){\r\n substrs.start = i;\r\n substrs.length = longest;\r\n }\r\n break;\r\n }\r\n }\r\n return substrs.length;\r\n }", "title": "" }, { "docid": "fe3ccce92e87876ee4c3bd685a7097d7", "score": "0.54137284", "text": "function longest(x) {\r\n\tvar long = '';\r\n\tlong = (x[0]);\r\n\tfor (i = 0; i < x.length; i++)\r\n\t\tif (x[i].length >= long.length) {\r\n\t\t\tlong = x[i];\r\n\t\t}\r\n\tconsole.log(\"longest array item is \" + long);\r\n\tconsole.log(\"**********\");\r\n}", "title": "" }, { "docid": "63d6ad8e631b4539162cb93de27efc4c", "score": "0.54038537", "text": "function longest_string(str_ara) {\n let max = str_ara[0].length;\n str_ara.map(v => max = Math.max(max, v.length));\n result = str_ara.filter(v => v.length == max);\n return result;\n}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "0f46e9031c8fa0ca0c90de6bf51ef278", "score": "0.54016304", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\nbreak;b--}f++}return null}", "title": "" }, { "docid": "8c819f1128d08589d6a376761d82df29", "score": "0.53961575", "text": "function LetterCountI(str) {\n str = str.split(\" \");\n let temp = \"\";\n let counts = [];\n\n for (let i = 0; i < str.length; i++) {\n temp = \"00\" + str[i];\n counts.push(\n temp\n .split(\"\")\n .sort()\n .join(\"\")\n .match(/(\\w)\\1+/gi).length\n );\n }\n return Math.max(...counts) > 1 ?\n str[counts.indexOf(Math.max(...counts))] :\n -1;\n}", "title": "" }, { "docid": "36fd39022b306a56569ff73d638087e2", "score": "0.5393726", "text": "function longest_common_starting_substring(arr1) {\n let arr = arr1.concat().sort(),\n a1 = arr[0],\n a2 = arr[arr.length - 1],\n L = a1.length,\n i = 0;\n\n while (i < L && a1.charAt(i) === a2.charAt(i))\n i++;\n return a1.substring(0, i);\n}", "title": "" }, { "docid": "04eb490046b10b1c837f1b2c13a173d1", "score": "0.539223", "text": "function longestConsec(strarr, k) {\r\n // your code\r\n var string = \"\"\r\n var n = strarr.length; \r\n if (n === 0 || k > n || k <= 0) {\r\n return string; \r\n }\r\n else {\r\n //find out which word is the longest word\r\n //return \"that word + (k-1)after that word:\r\n var lengthWord = [];\r\n var max = 0; \r\n var longest_word = \"\"\r\n for (var i = 0; i < strarr.length; i++) {\r\n if (strarr[i].length > max ) {\r\n max = strarr[i].length;\r\n longest_word = strarr[i]\r\n if (i === strarr.length -1 ) {\r\n return longest_word;\r\n }\r\n }\r\n console.log(strarr[i])\r\n for (var j = i + 1; j <= k; j++) {\r\n console.log(longest_word+\"longes\")\r\n console.log(strarr[j]+\"starr\")\r\n string = longest_word.concat(strarr[j])\r\n }\r\n } //return longest_word; //i = 1, i + (k-1)\r\n }\r\n return string; \r\n }", "title": "" }, { "docid": "8c32fdd6db840266b2a5ca29e26ac203", "score": "0.5387734", "text": "function longestRepetition(string) {\nif(string === \"\"){return [\"\",0]}\n \nconst repeatedChars = string.match(/(.)\\1*/g);\nconst longestLength = Math.max(...repeatedChars.map(string=>string.length));\nconst longestChars = repeatedChars.filter(string => string.length == longestLength)\n\n return [longestChars.join(\"\").slice(0,1),longestLength]\n \n}", "title": "" }, { "docid": "2185cec74823ef6a5538a387ed4a94df", "score": "0.5385274", "text": "function lengthOfLongestSubstring(string) {\n var max = 0, current_string = \"\", i, char, pos;\n\n for (i = 0; i < string.length; i += 1) {\n char = string.charAt(i);\n pos = current_string.indexOf(char);\n if (pos !== -1) {\n current_string = current_string.substr(pos + 1);\n }\n current_string += char;\n \n max = Math.max(max, current_string.length);\n }\n console.log('Input:',string,'Output:',(max!==0)?max:'\"\"')\n //return [{'Input:':string,'Output:':(max!==0)?max:'\"\"'}];\n}", "title": "" }, { "docid": "5483cd5e1b6dfd04f4617d85c7d90e1c", "score": "0.53792834", "text": "function longsubstring(arr){\r\n var string=\"\"\r\n var minlen=Infinity;\r\n arr.forEach(function(str){\r\n if(str.length<minlen){\r\n minlen=str.length\r\n string=str\r\n }\r\n })\r\n var substr=[]\r\n for(var i=0;i<minlen;i++){\r\n for(var j=i;j<minlen;j++){\r\n substr.push(string.substring(i,j+1))\r\n }\r\n }\r\n substr.sort((a,b)=> b.length-a.length)\r\n for(var i=0;i<substr.length;i++){\r\n var flag=0\r\n for(var j=0;j<arr.length;j++){\r\n if(arr[j].includes(substr[i])==false){\r\n // console.log(substr[i] +\" \"+arr[j])\r\n flag=1\r\n break;\r\n }\r\n }\r\n if(flag==0){\r\n return substr[i]\r\n }\r\n }\r\n return \"no common string\"\r\n }", "title": "" }, { "docid": "9f82523af6be6c9650cda38717a56540", "score": "0.53788185", "text": "function longest(str) {\n if (str.length === 1) return str;\n const alphabets = [...Array(26)].map(_ => String.fromCharCode(i++), (i = 97));\n let longString = \"\";\n let subSting = \"\";\n for (let x = 0; x < str.length; x++) {\n let char = str.charAt(x);\n const nextChar = str.charAt(x + 1);\n let charIndex = alphabets.findIndex(alphabet => alphabet === char);\n let nextCharIndex = alphabets.findIndex(alphabet => alphabet === nextChar);\n if (nextCharIndex >= charIndex) {\n subSting = subSting + nextChar;\n } else {\n if (!subSting.length) {\n subSting = subSting + char;\n }\n longString = subSting.length > longString.length ? subSting : longString;\n subSting = \"\";\n }\n }\n return longString;\n}", "title": "" }, { "docid": "89a93fb6e09a359da3a4186efbf93ea4", "score": "0.53745043", "text": "function lengthOfLongestSubstring(s) {\n var max = 0;\n var current = [];\n for (var i = 0; i < s.length; i++) {\n if (current.indexOf(s[i]) == -1) {\n current.push(s[i]);\n } else {\n current = current.slice(current.indexOf(s[i]) + 1);\n current.push(s[i]);\n }\n if (current.length > max) {\n max = current.length;\n }\n }\n return max;\n}", "title": "" }, { "docid": "8c2d417a7d4c19a06986a6e7c6bd0605", "score": "0.53664637", "text": "function long_in_array(array){\n\tvar output = null;\n\tvar zero = 0\n\tvar strings = array.slice(0, -1)\n\tfor (var i = 0; i < strings.length; i++) {\n\t\tif(array[i].length > zero) {\n zero = array[i].length;\n output = strings[i];\n } \n }\n return output;\n}", "title": "" }, { "docid": "27b439b0bdeb022fc9f43673a8eb1321", "score": "0.5354488", "text": "function longestWord(subsequences) {\n let longestWord = '';\n for (var word of subsequences) {\n if (word.length > longestWord.length) {\n longestWord = word;\n }\n }\n return longestWord;\n}", "title": "" }, { "docid": "aa6df03c02ed84ee606c9e242e0ad23c", "score": "0.53445417", "text": "function solution(A) {\n\n var P = prefix(A);\n console.log('P: ', A, P);\n var maxEnd = 0,\n maxS = 0;\n for (var i = 0;i < A.length; i++) {\n maxEnd = 0 > maxEnd + A[i] ? 0 : maxEnd + A[i];\n maxS = maxS > maxEnd ? maxS : maxEnd;\n\n }\n console.log('max ', maxS);\n}", "title": "" }, { "docid": "2e0582f7c68afdf68d8cd598c61eb1c1", "score": "0.5338295", "text": "function longestConsec(strarr, k) {\n // your code\n let n = strarr.length;\n let strLengthArray = [];\n if (n === 0 || k > n || k <= 0) {\n return \"\";\n };\n for (let i = 0; i < n-k+1; i++) {\n strLengthArray.push(strarr.slice(i,i+k).join('').length);\n };\n for (let i = 0; i < n-k+1; i++) {\n if (strLengthArray.slice().sort((a,b) => a-b)[n-k] === strLengthArray[i]) {\n return strarr.slice(i,i+k).join('');\n };\n };\n }", "title": "" }, { "docid": "e6223faa512af5dda117460bfa21558b", "score": "0.53319526", "text": "function longestString(arr) {\n let longestString = arr.reduce(\n (a, b) => (a.length > b.length || a.length == b.length ? a : b),\n \"\"\n );\n\n return longestString;\n}", "title": "" }, { "docid": "8b2666e3b24bca067f9d1842c9ab8c24", "score": "0.53277045", "text": "function longest(array) {\n var bigString = \"\";\n for (var i = 0; i < array.length; i++) {\n if (array[i].length > bigString.length) {\n bigString = array[i];\n }\n }\n return bigString;\n}", "title": "" }, { "docid": "951c3bc3acf2c473eee06c3d531c5c70", "score": "0.53271013", "text": "function longestString(arr) {\n var strlength = 0;\n var longest = \"\";\n for(var i=0; i < arr.length; i++){\n if(arr[i].length > strlength){\n var strlength = arr[i].length;\n longest = arr[i];\n }\n }\n return longest;\n}", "title": "" }, { "docid": "76f624b62b86438476ed028bd8faa23e", "score": "0.5324606", "text": "function sort_by_largest_numerical_suffix (a, b) {\n let suffix_a = a.match(suffix_number_regex);\n let suffix_b = b.match(suffix_number_regex);\n // If no number is detected (eg: preview version like android-R),\n // designate a suffix of 0 so it gets moved to the end\n suffix_a = suffix_a || ['0', '0'];\n suffix_b = suffix_b || ['0', '0'];\n // Return < zero, or > zero, based on which suffix is larger.\n return (parseInt(suffix_a[1]) > parseInt(suffix_b[1]) ? -1 : 1);\n}", "title": "" }, { "docid": "2516dea7604e426917cf8f165f34a124", "score": "0.5320012", "text": "function longest(words, i=0, len=0) {\n if(i === words.length) return len;\n len = Math.max(words[i].length, len);\n return longest(words, i + 1, len);\n}", "title": "" }, { "docid": "0a4240e223bf9348a6c7ecc2dda58428", "score": "0.53186506", "text": "function longest(){\n // parse arguments into an array\n var args = [].slice.call(arguments);\n var longWord = \"\";\n forEach(args, function(a){\n if (a.length > longWord.length) { longWord = a;\n };\n });\n return longWord;\n}", "title": "" }, { "docid": "162a6c887e78264a4f0780458f9e388f", "score": "0.5317717", "text": "function sharedSuffixMiddle(str1, str2) {\n var i = 2;\n var L = str1.length;\n while (i < L && str2.indexOf(str1.substr(str1.length - i - 1, i)) !== -1) i++;\n\n var j = 2;\n var K = str2.length;\n // same with reversed strings\n while (j < K && str1.indexOf(str2.substr(str2.length - j - 1, j)) !== -1) j++;\n\n// console.log(\n// 'here:',\n// str1.substr(str1.length - i, i), '<-!:',\n// str2.substr(str2.length - j, j), '?:',\n// str2.substr(str2.indexOf(str1.substr(str1.length - i, i)) + i)\n// );\n\n // or return from here\n if (j > i) {\n return sharedSuffixMiddle(str2, str1);\n }\n\n\n return [\n i,\n // whole 1st + midle to end of 2nd\n str1 + str2.substr(str2.indexOf(str1.substr(str1.length - i, i))+ i)\n ];\n}", "title": "" }, { "docid": "f2852ccd9a5233d6e2d6d1cb26ca2808", "score": "0.53139466", "text": "function LetterCountI(str) { \narr1 = str.replace(/[^a-zA-Z ]/g, '').split(' ') \narr = str.toLowerCase().replace(/[^a-zA-Z ]/g, '').split(' ')\nvar longest = 0\nvar count = 0\n\n for (var i=0 ; i<arr.length ; i++) {\n var arr2 = arr[i].split('').sort() \n\n for (var j=0 ; j<arr2.length ; j++) {\n \n if (arr2[j] === arr2[j+1]) {\n count = count + 1; \n if (count > longest) {output = arr1[i] ; longest = count}\n }\n \n else {count = 0} \n }\n }\n \nreturn output \n}", "title": "" }, { "docid": "957939eef432f46916683b970a8fed4f", "score": "0.531273", "text": "function longestConsec(strarr, k) {\n \n var strarrLengths = [];\n for (i = 0; i < strarr.length; i++) {\n strarrLengths.push(strarr[i].length);\n }\n \n var lenArrSequence = [];\n var strArrSequence = [];\n var newStringLength = 0;\n var newString = \"\";\n var maxStringLength = 0;\n var longestString = \"\";\n var n = strarr.length;\n \n if (n>0 && n>=k && k>0) {\n for (i = 0; i < n-(k-1); i++) {\n lenArrSequence = strarrLengths.slice(i, i+k);\n strArrSequence = strarr.slice(i, i+k);\n for (j = 0; j < lenArrSequence.length; j++) {\n newStringLength += lenArrSequence[j];\n newString += strArrSequence[j];\n }\n if (newStringLength > maxStringLength) {\n maxStringLength = newStringLength;\n longestString = newString;\n }\n newStringLength = 0;\n newString = \"\";\n }\n \n }\n\n return longestString;\n}", "title": "" }, { "docid": "a3001be4c837a8bd8e31d8191a3b953d", "score": "0.5312167", "text": "function makeTable(str) {\n \n \n var table = new Array(str.length);\n var maxPrefix = 0;\n \n table[0] = 0;\n \n \n for (var i = 1; i < str.length; i++) {\n while (maxPrefix > 0 && str.charAt(i) !== str.charAt(maxPrefix)) {\n \n maxPrefix = table[maxPrefix - 1];\n }\n \n if (str.charAt(maxPrefix) === str.charAt(i)) {\n maxPrefix++;\n }\n table[i] = maxPrefix;\n }\n return table;\n }", "title": "" }, { "docid": "427e399e4b010002acf582e29506038a", "score": "0.53052944", "text": "function lengthOfLongestSubstringNaive(string) {\n let substring = [],\n Result;\n for (let i = 0; i < string.length; i++) {\n let memoj = {},\n count = 0;\n for (let j = i; j < string.length; j++) {\n if (!memoj[string[j]]) {\n memoj[string[j]] = true;\n count++;\n } else {\n break;\n }\n }\n substring.push(count);\n }\n Result = substring[0];\n for (let i = 1; i < substring.length - 1; i++) {\n if (Result < substring[i]) {\n Result = substring[i];\n }\n }\n return Result ? Result : 0;\n}", "title": "" }, { "docid": "7ebb464fa9257159badc331efd6b304a", "score": "0.5288332", "text": "function f(str) {\n var arr = str.split(' '); //split the string into individual words\n var longest = \"\";\n for (var i = str.length - 1; i >= 0; i--) {\n if(longest.length < arr[i].length) { // is the string we're looking at the longest?\n longest = arr[i]; // if not update position in array\n }\n\n }\n return longest;\n\n}", "title": "" }, { "docid": "05a2cf86dc74256a7c320ef94d66fa49", "score": "0.5281038", "text": "function longest(s1, s2) {\n\tlet str = s1.concat(s2);\n\tlet arr = str.split('');\n\tlet uniq = arr.filter((e, i) => arr.indexOf(e) == i);\n\tlet res = uniq.sort();\n\treturn res.join('');\n}", "title": "" }, { "docid": "a59c9587508a1d746b43cb783745c716", "score": "0.5277208", "text": "function longestPalindromicSubstring(string) {\n // Write your code here.\n\t// initialize a variable currentLongest set to the first and second character of the string \n\tlet currentLongest = [0, 1]; \n\tfor (let i = 1; i < string.length; i++) {\n\t\t// i - 1 left index i + 1 right index \n\t\tlet odd = expandFromMiddle(string, i - 1, i + 1); \n\t\t// i - 1 left index and i represents out current letter\n\t\tlet even = expandFromMiddle(string, i - 1, i); \n\t\tlet longest = odd[1] - odd[0] > even[1] - even[0] ? odd : even \n\t\tcurrentLongest = currentLongest[1] - currentLongest[0] > longest[1] - longest[0] ? currentLongest : longest; \n\t}\n\treturn string.slice(currentLongest[0], currentLongest[1]); \n}", "title": "" }, { "docid": "e2e13e6aa7532753b76590555aa533fb", "score": "0.5273257", "text": "function longest7SegmentWord(arr) {\n\treturn arr.filter(x => !(/[kmvwx]/.test(x))).sort((a, b) => b.length - a.length)[0] || '';\n}", "title": "" }, { "docid": "e2e13e6aa7532753b76590555aa533fb", "score": "0.5273257", "text": "function longest7SegmentWord(arr) {\n\treturn arr.filter(x => !(/[kmvwx]/.test(x))).sort((a, b) => b.length - a.length)[0] || '';\n}", "title": "" }, { "docid": "e2e13e6aa7532753b76590555aa533fb", "score": "0.5273257", "text": "function longest7SegmentWord(arr) {\n\treturn arr.filter(x => !(/[kmvwx]/.test(x))).sort((a, b) => b.length - a.length)[0] || '';\n}", "title": "" }, { "docid": "785ccaa5aabfe5ca4f89a7e518c03548", "score": "0.526964", "text": "function longestSubstring(str) {\n var longest = \"\";\n var current = \"\";\n for (var i=0; i<str.length; i++) {\n var tempIndex = current.indexOf(str[i]);\n if (tempIndex !== -1) {\n if (longest.length < current.length){\n longest = current;\n }\n current = current.substr(tempIndex + 1) + str[i];\n } else {\n current += str[i]\n }\n }\n if (longest.length < current.length){\n longest = current;\n }\n return longest;\n}", "title": "" }, { "docid": "36f42010003a27ef3cf6eb9af8b9a089", "score": "0.52688766", "text": "function Xa(a){for(var b,c,d,e,f=0;f<a.length;){for(e=Wa(a[f]).split(\"-\"),b=e.length,c=Wa(a[f+1]),c=c?c.split(\"-\"):null;b>0;){if(d=Ya(e.slice(0,b).join(\"-\")))return d;if(c&&c.length>=b&&u(e,c,!0)>=b-1)\n//the next array item is better than a shallower substring of this one\n break;b--}f++}return null}", "title": "" }, { "docid": "242207c6793bb8738aea0ba7befbd3ad", "score": "0.5265619", "text": "function longestSubstring(str) {\n var uniqueString = str[0];\n return Math.max(...Object.values(str.split('').reduce(function(objectMap, value, index) {\n if(!uniqueString.includes(value)) {\n uniqueString += value;\n objectMap[uniqueString] = uniqueString.length;\n } else {\n uniqueString = '';\n uniqueString += value;\n }\n return objectMap;\n },{})));\n}", "title": "" }, { "docid": "e29c585ed6a43c2e07dccc0b0f8a2cd3", "score": "0.52630806", "text": "function longestName(arr){\n var ruselt =arr.reduce(function(str,elm,i){\n //str=arr[0].name.first+\"\"+arr[0].name.last\n elm=arr[i].name.first+\"\"+arr[i].name.last\n if (str.length > elm.length) {\n return elm=str\n }return elm\n }\n ) \n return ruselt\n}", "title": "" }, { "docid": "844412e9e070bdd0b249e0781fb9fc98", "score": "0.526019", "text": "function longestUnicharSubstring(s) {\n maxChar = 1;\n window = 1; \n\n for (let i = 0; i < s.length; i++){\n if (s[i] != s[i + 1]) {\n window = 1;\n } else {\n window += 1;\n maxChar = Math.max(maxChar, window)\n }\n }\n return maxChar;\n}", "title": "" } ]
6426d074f4164bc5e3585cc9b5fc9fd6
2. Define a function called "divideByTwo". It should accept one parameter within a text field called "number" and submitted when a button is clicked. The function should divide the number by two and then displayed into the HTML page.
[ { "docid": "d84dd17434e7e38f6ba30306040f3a4c", "score": "0.7280461", "text": "function divideByTwo(number) {\n\tdocument.getElementById(\"q2\").innerHTML = number / 2;\n}", "title": "" } ]
[ { "docid": "5ce5e64ca90dad4b2c9b2e2c54a5bc77", "score": "0.6798149", "text": "function showDivide() {\n //accept input for variables from user\n var x = parseInt(document.getElementById('divide_x').value);\n var y = parseInt(document.getElementById('divide_y').value);\n //stretch goal: throw an error when dividing by 0\n if(y === 0) {\n alert('ERROR: You cannot divide a number by 0. Please hit refresh and enter a number greater than 0.');\n }\n //call divide()\n var result = divide(x, y);\n //return result to user\n document.getElementById('divide_result').textContent = result.value;\n document.getElementById('divide_description').textContent = result.description;\n}", "title": "" }, { "docid": "de20fb6396033d1642f628191915f3ad", "score": "0.66091746", "text": "function divide() {\n let a = document.getElementById(\"num1\").value;\n let b = document.getElementById(\"num2\").value;\n answer = parseInt(a) / parseInt(b);\n}", "title": "" }, { "docid": "a662b0633606c03d0b19c6806a635373", "score": "0.6526787", "text": "function thirdFunction(p1, p2) {\n document.getElementById(\"math2\").innerHTML = p1 / p2; \n }", "title": "" }, { "docid": "850af2ba3f9cd302abdf6262315763f6", "score": "0.6515618", "text": "function sendToCalculate() {\n let num1 = +document.getElementById(\"num1\").value;\n let num2 = +document.getElementById(\"num2\").value;\n let operation = document.getElementById(\"operation\").value;\n //Printing the value to UI\n document.getElementById(\"output\").innerHTML = `${calculate(num1, num2, operation)}`;\n}", "title": "" }, { "docid": "cf0f584f911fa7103bdf83b88552cdfc", "score": "0.64692295", "text": "function divide(){\n\n\tvar numbers = generateNumbers();\n\tvar index = getQuestionIndex();\n\tvar question = window.questions['divide'](numbers)[index];\n\n\t//\\xF7 hexadecimal for divide sign\n\tupdateDOM(numbers, '\\xF7', question);\n\n\tvar answer = document.getElementById(\"submitAns\");\n\tanswer.onclick = function() {\n\t\tvar userAns = document.getElementById(\"answer\").value;\n\n\t\t//Round the division for simplicity for 5-7 year olds, you want to return the largest equal share of the sum\n\t\t// Doesn't deal with the remainder\n\t\tvar correctAns = Math.floor(numbers[0] / numbers[1]);\n\t\tcheckUserAnswer(\"divide\", userAns, correctAns);\n\t}\n\tquestionHelp(\"divide\", numbers);\n}", "title": "" }, { "docid": "e9f853b068ae1297430b26e94d99c692", "score": "0.6439161", "text": "function doesthejob(n1, n2, op) {\n if (op == \"+\")\n $(\"#display\").val( n1 + n2 );\n else if (op == \"-\")\n $(\"#display\").val( n1 - n2 );\n else if (op == \"*\")\n $(\"#display\").val( n1 * n2 );\n else if (op == \"/\")\n $(\"#display\").val( n1 / n2 );\n else if (op == \"nCr\")\n document.form1.t1.value = fact2(n1) / fact2(n1 - n2) / fact2(n2);\n else if (op == \"nPr\")\n document.form1.t1.value = fact2(n1) / fact2(n1 - n2);\n }", "title": "" }, { "docid": "3e16a34585906d2ab254bd0ca1ab3068", "score": "0.6409089", "text": "function getCalculation(num1, num2, calcFunction) {\n var resultDisplay = document.getElementById(\"result\");\n resultDisplay.value = calcFunction(num1, num2);\n}", "title": "" }, { "docid": "a3b7541a735a003abece0e1b28a75905", "score": "0.6368061", "text": "function divideTwoNumbers(valueOne, valueTwo){\n return valueOne/valueTwo\n\n}", "title": "" }, { "docid": "37afbf4248f27738a4b123516a2ad8c4", "score": "0.63529605", "text": "function divInput(inputOne, inputTwo) {\n return inputOne / inputTwo;\n}", "title": "" }, { "docid": "cca5c71114251eb7ecbf3e85896067b8", "score": "0.6343842", "text": "function FormattedDivision(num1,num2) {\n\n // code goes here\n return num1 + num2;\n\n}", "title": "" }, { "docid": "833d4cde87dfbe42e9c92e28749dd7c8", "score": "0.63384044", "text": "function divideByTwo(number) {\nreturn number / 2\n}", "title": "" }, { "docid": "663550beeca98de26fd24abbfefc0014", "score": "0.62928927", "text": "function divide() {\n\n}", "title": "" }, { "docid": "eb9d7dbb0d05f7bf72bfce4c173b2a91", "score": "0.6251638", "text": "function Calculator() {\n handleSubmit();\n}", "title": "" }, { "docid": "c05ca5a27a72b8ee739c120088322158", "score": "0.62101156", "text": "function MostrarNumero(){\n\n var mostrar = document.getElementById('n1input');\n var n1input = document.getElementById('n2output');\n n2output.value = Factor(mostrar.value);\n}", "title": "" }, { "docid": "05770cd13b06e4f1f49f7da034869416", "score": "0.62038434", "text": "function calculate(operation) {\n operation();\n document.getElementById(\"answer\").value = answer.toFixed(2);\n}", "title": "" }, { "docid": "b432d3e3d00fb0dce2f8af466b086088", "score": "0.61939484", "text": "function Division(num1,num2) {\n\n // code goes here\n return num1 + num2;\n\n}", "title": "" }, { "docid": "e87e8e6ff592ff23715247f1ee3f4d40", "score": "0.61930996", "text": "function divideByTwo(number) {\n\tvar output = number/2;\n\tconsole.log(output);\n}", "title": "" }, { "docid": "152e8814f643fadbec57e19fad90984c", "score": "0.6181248", "text": "function FormattedDivision (num1, num2) {\n\n}", "title": "" }, { "docid": "8bf59b66bb6fd45c507f9b97bef3933e", "score": "0.6176451", "text": "function calculateWeight() {\n document.getElementById(\"singlebutton\").onclick = function handleClickEvent(\n e\n ) {\n e.preventDefault(); //binds click even to the calculate button\n var choose = document.getElementById(\"planets\").selectedIndex; //gets planet from select menu\n var gravity = document.getElementById(\"planets\")[choose].value; //takes gravity from planet selected\n var userWeight = document.getElementById(\"userWeight\").value; //stores weight inputed by user\n var result = Math.round(userWeight * gravity * 100) / 100; //multiplies the two numbers together\n document\n .getElementById(\"output\")\n .append(\"On that planet you would weigh \" + result + \" lbs. Geeeeeez. \");\n //the last one takes the result and prints it to the webpage.\n };\n}", "title": "" }, { "docid": "a4e10ab7e059b990eeaef86edad2e6ed", "score": "0.614205", "text": "function division(input1, input2) {\n return input1 / input2;\n}", "title": "" }, { "docid": "1d6a2d6ddb57fb14692152046de94d50", "score": "0.61213475", "text": "function div(){\n\tsetValues();\n\tif(b != 0){\n\t\tresult = a/b;\n\t\tprint();\n\t}\n\t//Check if user has given an invalid input\n\telse{\n\t\talert(\"No dividing by zero\");\n\t}\n}", "title": "" }, { "docid": "da9f800874fc34efb7e6808931b08a36", "score": "0.6111675", "text": "function divideByTwo(number) {\n return number / 2;\n}", "title": "" }, { "docid": "eafe9326d7055fe1cd59776b524555a4", "score": "0.61000776", "text": "function process3() {\n\tvar userNumber = document.getElementById(\"userNumber3\").value;\n\tvar i = 2;\n\twhile(userNumber > i) {\n\t\tif(userNumber % i === 0) {\n\t\t\tuserNumber = userNumber / i;\n\t\t} else {\n\t\t\ti++;\n\t\t};\n\t};\n\tvar result = document.getElementById(\"result3\");\n\tresult.innerHTML = userNumber;\n}", "title": "" }, { "docid": "8de33b97fb9a92cab907b9d473f55940", "score": "0.609395", "text": "function divide(number1, number2) {\n return number1 / number2;\n}", "title": "" }, { "docid": "efd7ffb01690f3213f9219654d9b50ca", "score": "0.60888755", "text": "function divideClick() {\n input.value = input.value + \"/\";\n}", "title": "" }, { "docid": "a231a1154ede50449a743ab4d3b42029", "score": "0.60847133", "text": "function division(){\nwindow.location=\"index.html\";\nalert(\"Welcome to LEARN DIVISION.Lesson program compiled by Burton Chulu,Cell +263 785 011 524,Email [email protected]\");\nalert(\"QUESTION 1: 7÷3\");\nalert(\"Here is a worked example of the division in 2 easy steps\");\nalert(\"STEP 1: 3 into 7 is 2. In other words there are 2 threes in 7 which make up 6\");\nalert(\"STEP 2:The 2 threes make up 6 and we remain with 1 to reach 7\");\nalert(\"Hence 7÷3= 2 remainder 1\");\nalert(\"Here are more examples to work through.Try to use the previous example to help you understand\");\nn=1;\nn1=20;\nn2=2;\nn3=4;\nn4=5;\nn5=10;\nn6=3;\nn7=6;\nn8=7;\nn9=18;\nn10=14;\nn11=16;\nn12=8;\nn13=18;\nn14=9;\na=n1/n;\na1=n1/n2;\na2=n1/n3;\na3=n1/n4;\na4=n1/n5;\na5=n9/n6;\na6=n9/n7;\na7=n10/n8;\na8=n11/n12;\na9=n13/n14;\nalert(n1+\"÷\"+n+\" is \"+a);\nalert(n1+\"÷\"+n2+\" is \"+a1);\nalert(n1+\"÷\"+n6+\" is \"+a5+\" remainder 2\");\nalert(n1+\"÷\"+n3+\" is \"+a2);\nalert(n1+\"÷\"+n4+\" is \"+a3);\nalert(n1+\"÷\"+n7+\" = \"+a6+\" remainder 2\");\nalert(n1+\"÷\"+n8+\" = \"+a7+\" remainder 6\");\nalert(n1+\" ÷ \"+n12+\" = \"+a8+\" remainder 4\");\nalert(n1+\" ÷ \"+n14+\" = \"+a9+\" remainder 2\");\nalert(n1+\"÷\"+n5+\" is \"+a4);\nalert(\"10÷1=10\");\nalert(\"10÷2=5\");\nalert(\"10÷3=3 remainder 1\");\nalert(\"10÷4=2 remainder 2\");\nalert(\"10÷5=2\");\nalert(\"10÷6=1 remainder 4\");\nalert(\"Have a nice day and we hope we helped you learn something today\");\n}", "title": "" }, { "docid": "59935fa78e4ae24b0d5968680acf16e3", "score": "0.60833055", "text": "function calcNumbers(result){\n form.userInput.value=form.userInput.value+result; \n}", "title": "" }, { "docid": "88a4fa75e7792f99d3214c4aeae6ec71", "score": "0.6076793", "text": "calculateMulAndDiv(numOne, numTwo) {\r\n var multiplication = numOne * numTwo;\r\n var division = numOne / numTwo;\r\n console.log('Multiplication is: ' + multiplication);\r\n console.log('Division is: ' + division);\r\n }", "title": "" }, { "docid": "ec3727c177486a5203963f2b919efe15", "score": "0.6062895", "text": "function div(){\n // Holen der Zahlen und der Ergebnisbox\n var erg_tag = document.getElementById(\"erg\")\n var nums = get_numbers()\n\n // Sollten wir keine Zahlen bekommen, brechen wir ab\n if(nums == undefined){\n return\n }\n\n // Beide Zahlen addieren...\n erg = nums[0]/nums[1]\n // und anzeigen\n erg_tag.value = erg\n}", "title": "" }, { "docid": "19f3a08f6a8e35296a8dc4b53741b884", "score": "0.60514235", "text": "function getValueAndPopulate() {\n var userInput = parseInt(document.getElementById(\"num\").value);\n console.log(userInput);\n addition(userInput);\n subtraction(userInput);\n multiplication(userInput);\n division(userInput);\n}", "title": "" }, { "docid": "fa429e1320cece6b25173e6ebda0bf6e", "score": "0.59956056", "text": "function getNumbers(){\n num1 = document.getElementById(\"numOne\").value;\n num2 = document.getElementById(\"numTwo\").value;\n console.log(num1, num2);\n doMath(num1, num2, holder);\n}", "title": "" }, { "docid": "da6c9eda78c59a066446cef9525b5b94", "score": "0.5987233", "text": "function assignment5Q10() {\r\n var number = parseInt(prompt(\"Enter a number: \"));\r\n var result = ((number + 5) * 10) / 2;\r\n document.write(\"<p>The final Result is: \"+ result + \"</p>\");\r\n document.write(\"Press refresh to go home page\");\r\n}", "title": "" }, { "docid": "2a67cafb37d313c28757ac9f2b09da8b", "score": "0.59856284", "text": "function divide(num1, num2){\n return num1 / num2;\n}", "title": "" }, { "docid": "9b312a996bc6285af5a3bfeb26e0e4f3", "score": "0.598544", "text": "function divide(a,b){\n console.log(a/b);\n}", "title": "" }, { "docid": "e6215536e3a5c1f91788e2b1e3197063", "score": "0.5984795", "text": "function division(){\r\n var divide=48/3;\r\n document.getElementById(\"Math4\").innerHTML=\"48/3=\"+divide;\r\n}", "title": "" }, { "docid": "e3a75b0c7f262afce91e48a879dbf04b", "score": "0.5979238", "text": "function divide(x,y) {\n\t//Write your code below this line\nvar divide = x/y;\nreturn divide;\n}", "title": "" }, { "docid": "2670b11103e99b3465114e72030240e4", "score": "0.596254", "text": "function divide(a,b){\n return a/b\n}", "title": "" }, { "docid": "1e13096f25598dc5ed8395f776b16aa6", "score": "0.59596777", "text": "function showModulo() {\n //accept input for variables from user\n var x = parseInt(document.getElementById('modulo_x').value);\n var y = parseInt(document.getElementById('modulo_y').value);\n //call modulo()\n var result = modulo(x, y);\n //return result to user\n document.getElementById('modulo_result').textContent = result.value;\n document.getElementById('modulo_description').textContent = result.description;\n\n}", "title": "" }, { "docid": "68c6c5ce27afb083ec3e2428270ec4c0", "score": "0.59547114", "text": "function divide (one, two) {\n return one / two;\n}", "title": "" }, { "docid": "e736bb0e31b9259da9199d1ebbea0122", "score": "0.5924253", "text": "function basicMath(){\n //this does only two number's problems. \n var num1=Number(prompt(\"what is the first number\"));\n var num2=Number(prompt(\"what is the second number\"));\n var witch=prompt(\"what are you doing\");\n if(witch==\"adding\"){\n var adding=num1+num2;\n document.getElementById(\"adding\").innerHTML =adding;\n }else if(witch==\"sub\"){\n var subtraction=num1-num2;\n document.getElementById(\"sub\").innerHTML = subtraction;\n }else if(witch==\"multi\"){\n var multiplication=num1*num2;\n document.getElementById(\"multi\").innerHTML = multiplication;\n }else if(witch==\"divid\"){\n var division=num1/num2;\n document.getElementById(\"divid\").innerHTML =division;\n }\n}", "title": "" }, { "docid": "293105a67d81eb6caf7c25cd6c38e655", "score": "0.5913917", "text": "function division(num1,num2){\n\n\t\tanswer=num1/num2;\n\t\tconsole.log(answer);\n\t\tresult(answer);\n\n\t}", "title": "" }, { "docid": "e4378887ffbc619b287b36ee5cff3088", "score": "0.5911468", "text": "function divide(input1, input2) {\n // A1: any JavaScript value\n // A2: any JavaScript value\n // R: a single JavaScript value\n return input1 / input2;\n}", "title": "" }, { "docid": "ff50d4854c5bdd69ca7e44cddc2e234a", "score": "0.59007776", "text": "function divisionNow(){\n holder = \"/\";\n console.log(\"Divide clicked: \", holder);\n getNumbers();\n}", "title": "" }, { "docid": "ae71a75c9dcecab7d49aed75f990f3e5", "score": "0.5898046", "text": "function secondFunction(p1, p2) {\n document.getElementById(\"math1\").innerHTML = p1 * p2; \n }", "title": "" }, { "docid": "6797fe31b3759fbecac7f58b7fe96cfb", "score": "0.5896033", "text": "function division(){\n var divide = 65 - 6; \n document.getElementById(\"mathDiv\").innerHTML = \"65 / 2 =\" + divide;\n}", "title": "" }, { "docid": "8898732b303adaa982fbef1428352d18", "score": "0.5892876", "text": "function display(parm1, parm2, parm3, parm4) \n{\n \n document.getElementById(\"subtotal\").value = parm1;\n document.getElementById(\"discount\").value = parm2;\n document.getElementById(\"vat\").value = parm3;\n document.getElementById(\"total\").value = parm4;\n \n \n showbtnProceed();\n}//End of function", "title": "" }, { "docid": "64303767fed0ebee98e57630f9c3b7a7", "score": "0.5886741", "text": "function divide() {\n const userNumber = getuserNumber();\n const initialNumber = currentNumber;\n currentNumber /= userNumber; //shortcut operator to avoid wasting time currentNumber = currentNumber / userNumber\n createandWriteOutput(\"/\", initialNumber, userNumber);\n writelog(\"divide\", initialNumber, userNumber, currentNumber);\n}", "title": "" }, { "docid": "bf72f315e43f7250365c9e0d0f2b46fb", "score": "0.5885364", "text": "function divide(num1, num2){\n \n if (num2 === 0){\n throw new Error(\"Enter a number greater than 0\");\n }\n return (num1 /num2);\n \n }", "title": "" }, { "docid": "b2600479b5ef80d97d13aaeb594da84e", "score": "0.58804417", "text": "function divideByTwo(num) {\n return num / 2;\n}", "title": "" }, { "docid": "637c7ba41bd51c2a2ee434f49a1d0ed8", "score": "0.5878376", "text": "function calculate() {\n \n var num1 = document.getElementById(\"num1\").value;\n \n num1 = Number(num1);\n \n var num2 = document.getElementById(\"num2\").value;\n \n num2 = Number(num2);\n \n var sum = num1 + num2;\n \n document.getElementById(\"myDiv\").innerHTML = num1 + \" + \" + num2 + \" = \" + result;\n \n} // end calculate()", "title": "" }, { "docid": "656020bace764e089dc2f4f1f1357a6c", "score": "0.58678114", "text": "function handleClickEvent() {\n // 3. Create a variable called userWeight and assign the value of the user's weight.\n var weight = parseFloat(document.getElementById(\"user-weight\").value);\n // 4. Create a variable called planetName and assign the name of the selected planet from the drop down.\n var planetName = document.getElementById(\"planets\").value;\n // 5. Create a variable called result and assign the value of the new calculated weight.\n var result = calculateWeight(weight, planetName);\n // 6. Write code to display the message shown in the screenshot.\n document.getElementById(\"output\").innerHTML = \"If you were on \" + planetName + ',' + ' you would weigh ' + result + 'lbs!';\n \n}", "title": "" }, { "docid": "ff424b97b24a3cdfe1d2199cc776dc85", "score": "0.58655983", "text": "function calculate(e) {\n inputs = scrn.value.split(/\\D/);\n let first = inputs[0];\n let second = inputs[1];\n\n //clear screen if equal double clicked\n\n if( !/\\d+[\\+\\-\\*\\÷]\\d+/.test( scrn.value ) ) return;\n \n if(!first && !second){ console.log('empty!'); }\n \n // calculate result and display\n switch (operator) {\n case '+':\n scrn.value = parseInt(first) + parseInt(second);\n console.log('hello');\n break;\n case '-':\n scrn.value = parseInt(first) - parseInt(second);\n break;\n case '÷':\n let result = parseInt(first) / parseInt(second);\n scrn.value = isInt(result) ? result : result.toFixed(3);\n break;\n case '*':\n scrn.value = parseInt(first) * parseInt(second);\n break;\n default:\n scrn.value = 0;\n }\n\n \n}", "title": "" }, { "docid": "ed8e17c7a4837e74fccaf9f23ec7399b", "score": "0.58578724", "text": "divide(a,b){return a/b;}", "title": "" }, { "docid": "d00f0ee64b980edb8fccbc1edf9007ac", "score": "0.585496", "text": "function dividesTwoNumbers(num1,num2){\n return num1/num2\n}", "title": "" }, { "docid": "0b4a7e781b2547d70355188329c8875b", "score": "0.5851752", "text": "function divide(a,b) { \n return a / b\n}", "title": "" }, { "docid": "4490368a26b7cd1c795dd805d96e6be9", "score": "0.5848605", "text": "render() {\n const {input1, input2, result} = this.state;\n return (\n <div>\n <input onChange={this.setNum1} value={input1}/>\n <input onChange={this.setNum2} value={input2}/>\n <h1>{result}</h1>\n <button onClick ={this.add}>Add</button>\n <button onClick ={this.subtract}>Subtract</button>\n <button onClick ={this.multiply}>Multiply</button>\n <button onClick ={this.divide}>Divide</button>\n\n <button onClick={this.clear}>Clear Form</button>\n </div>\n );\n }", "title": "" }, { "docid": "73ee2e745c6ce0375ef16a1362d6f28a", "score": "0.5847168", "text": "function result(){\r\n\tif(num2==false){\r\n\t\tnum2 = display.innerHTML\r\n\t}\r\n\tswitch(operacion){\r\n\t\tcase \"dividido\":\r\n\t\t\tresultado = num1 / num2\t\t\t\r\n\t\t\tnum1 = resultado\r\n\t\t\tbreak\r\n\t\tcase \"multiplicar\":\r\n\t\t\tresultado = num1 * num2\r\n\t\t\t\r\n\t\t\tnum1 = resultado\r\n\t\t\tbreak\r\n\t\tcase \"suma\":\r\n\t\t\tresultado = parseFloat(num1) + parseFloat(num2)\r\n\t\t\tnum1 = resultado\r\n\t\t\tbreak\r\n\t\tcase \"resta\":\r\n\t\t\tresultado = num1 - num2\r\n\t\t\tnum1 = resultado\r\n\t\t\tbreak\r\n\t}\r\n\tcheckError()\r\n\t\r\n}", "title": "" }, { "docid": "a8e0b6e07c6d4c06a1de474c179cf320", "score": "0.5835732", "text": "function divide(a,b) {\n return a/b;\n}", "title": "" }, { "docid": "f1439d2c63453121ef54dcc561187ff8", "score": "0.5835343", "text": "function divides(num1, num2){\n num1 / num2;\n}", "title": "" }, { "docid": "0411577c45dc0a5fd0449ea934577764", "score": "0.58191055", "text": "function _divide(param1, param2) {\n return param1 / param2;\n}", "title": "" }, { "docid": "0411577c45dc0a5fd0449ea934577764", "score": "0.58191055", "text": "function _divide(param1, param2) {\n return param1 / param2;\n}", "title": "" }, { "docid": "0411577c45dc0a5fd0449ea934577764", "score": "0.58191055", "text": "function _divide(param1, param2) {\n return param1 / param2;\n}", "title": "" }, { "docid": "8a33d64ee928afdbbf99439ee03c2603", "score": "0.581501", "text": "function divide(num1, num2) {\n return num1 / num2;\n}", "title": "" }, { "docid": "dc1b6588a6b91d27667ca66d5f73f6d9", "score": "0.5810257", "text": "function display(parm1, parm2, parm3, parm4){\n \n document.getElementById(\"subtotal\").value = parm1;\n document.getElementById(\"discount\").value = parm2;\n document.getElementById(\"vat\").value = parm3;\n document.getElementById(\"total\").value = parm4;\n \n enablebtnProceed();\n}", "title": "" }, { "docid": "0fd2afcbab1897079986c0cc022eddf8", "score": "0.58101845", "text": "onDivide() {\n this.currentResult = parseInt(this.firstNumber) / parseInt(this.secondNumber);\n this.operatorUsed = '%';\n //Check if both numbers are okay and operable \n }", "title": "" }, { "docid": "6e5787a73f6df2f362e67ce76d1b6c82", "score": "0.58071434", "text": "function fndiv(xy) { \n\t\n\tif(inp1.value !== \"\" && inp2.value !== \"\") {\n\t\n\t\t// target is an object returned in xy from which we can grab texContent\n\t\tlet oper = xy.target.textContent;\n\n\t\t// console.log(oper);\n\t\n\t\n\t\t\n\t\tif(oper === \"/\") {\n\t\t\tans_out(inp1.value / inp2.value);\n\n\t\t}\n\t\tif(oper === \"*\") {\n\t\t\tans_out(inp1.value * inp2.value);\n\n\t\t};\n\n\t\tif(oper === \"-\") {\n\t\t\tans_out(inp1.value - inp2.value);\n\n\t\t};\n\n\t\tif(oper === \"+\") {\n\t\t\tans_out(Number(inp1.value) + Number(inp2.value));\n\t\t};\n\t};\n\n}", "title": "" }, { "docid": "4ba4c8283fda6c26815767bd469889ee", "score": "0.5806386", "text": "function divide(a, b) {\n return a/b\n}", "title": "" }, { "docid": "645800f049d1ad47e3355848e29e3450", "score": "0.5788008", "text": "function division(num1, num2) {\n if (typeof (num1) == \"number\" && typeof (num2) == \"number\") {\n // we can add more test for the second number\n if (num2 != 0) {\n return num1 / num2;\n } else {\n alert('Division by 0!');\n }\n } else {\n /*\n we use prompt() method just for learning Jasmine, we should use alert() method\n */\n prompt(\"Error!\");\n }\n}", "title": "" }, { "docid": "dee725134cec3eeaeabee67b0d976dea", "score": "0.5787795", "text": "function mathOperations(number){\n var halfTheNumber = halfNumber(number);\n var squareTheNumber = squareNumber(halfTheNumber);\n var areaOfNumber = areaOfCircle(squareTheNumber);\n var percentOfNumber = percentOf(areaOfNumber,squareTheNumber);\n console.log(\"Half of \"+number+\" is \"+halfTheNumber+\", \\nand the square of \"+halfTheNumber+\" is \"+squareTheNumber+\", \\nand the area of \"+squareTheNumber+\" is \"+areaOfNumber+\", \\nand \"+areaOfNumber+\" is \"+percentOfNumber+\"% of \"+squareTheNumber);\n\n}", "title": "" }, { "docid": "87528f8a4443f29be93301ad96fb341f", "score": "0.57863176", "text": "function showMultiply() {\n //accept input for variables from user\n var x = parseInt(document.getElementById('multiply_x').value);\n var y = parseInt(document.getElementById('multiply_y').value);\n //call multiply()\n var result = multiply(x, y);\n //return result to user\n document.getElementById('multiply_result').textContent = result.value;\n document.getElementById('multiply_description').textContent = result.description;\n}", "title": "" }, { "docid": "4888521b891ad7899342dbd1d740e288", "score": "0.5775525", "text": "function div(para1,para2){\n let numValue1=para1;\n let numValue2=para2;\n\n return numValue1/numValue2;\n}", "title": "" }, { "docid": "00917b105ca950c901aef33cc88a04fc", "score": "0.57550603", "text": "function mathNums(){\n var mathType = document.getElementById(\"mathSelect\").selectedIndex;\n var numOne = parseFloat(document.getElementById(\"numberOne\").value);\n var numTwo = parseFloat(document.getElementById(\"numberTwo\").value);\n\n if(isNaN(numOne) || isNaN(numTwo)){\n result = \"You NaN! (Need a number)\";\n } else if (mathType === 0) {\n result = numOne + numTwo;\n } else if (mathType === 1) {\n result = numOne - numTwo;\n } else if (mathType === 2) {\n result = numOne * numTwo\n } else if (mathType === 3) {\n if (numTwo == 0) {\n result = \"You try to divide by 0 often? Not the best\"\n } else {\n result = numOne / numTwo\n }; //end if\n }; //end if\n return result;\n}", "title": "" }, { "docid": "2d6161010dd51523384988c3e5b86aec", "score": "0.57528883", "text": "function add() {\n var num1 = parseInt(document.getElementById(\"number1\").value)\n var num2 = parseInt(document.getElementById(\"number2\").value)\n var result = num1 + num2\n cleanForm()\n addResultToTable(num1, num2, result)\n addResultToStorage(num1, num2, result)\n\n}", "title": "" }, { "docid": "e9efac264504764c9cdc3c04079251df", "score": "0.5747119", "text": "function divide(a,b){\n\treturn a/b\n}", "title": "" }, { "docid": "74cecea77522e3822615f8f965150be6", "score": "0.57359934", "text": "function fourthFunction() {\n var simple_Math = (1 + 2) * 10 / 2 -5;\n document.getElementById(\"math3\") .innerHTML = \"1 plus 2, multiplied by ten divided in half and then subtracted by 5 equals \" + simple_Math\n }", "title": "" }, { "docid": "14476ca016c073929eef981839b26af8", "score": "0.5734795", "text": "function divideByTwo(x){\nreturn (x/2)}", "title": "" }, { "docid": "50964177f0430b93593c2ab2c773c343", "score": "0.573005", "text": "function combinedFunctions (num){\nhalfResult = halfNumber (num)\nsquareResult = halfResult **2\nareaResult = areaOfCircle (squareResult)\npercentageResult = (areaResult, squareResult)\ndocument.querySelector(\"#value4\").textContent = `The area of ${areaResult} is ${percentageResult}% of ${squareResult}`\n\n}", "title": "" }, { "docid": "7307e425268571882fc5da74b85f8a89", "score": "0.5723921", "text": "function treat(clicked_id){\n let number1 = parseFloat(document.getElementById(\"op-one\").value);\n let number2 = parseFloat(document.getElementById(\"op-two\").value);\n let result;\n //alert(`clicked_id = ${clicked_id}`);\n switch (clicked_id){\n case \"add\": result = number1 + number2;\n break;\n case \"sub\" : result = number1 - number2;\n break;\n case \"multi\" : result = number1 * number2;\n break;\n case \"div\" : result = number1 / number2;\n break;\n default : result = NaN;\n break;\n }\n alert(`Result bis = ${result}`)\n //return result;\n }", "title": "" }, { "docid": "de00a37369d08a2540bd0adece78f32f", "score": "0.57230103", "text": "function divideByTwo(num) {\n return num / 2;\n }", "title": "" }, { "docid": "352d3e0753c47de1a943693c9cb20402", "score": "0.5716469", "text": "function ten() {\n document.getElementById(\"tens\").innerHTML = CalcTen();\n}", "title": "" }, { "docid": "06eaeea2a2ee490d13cb1ee02950683f", "score": "0.5706452", "text": "function divide(){\nvar input7 = document.getElementById('inpOne').value,\n input8 = document.getElementById('inpTwo').value,\n result = document.getElementById('output').innerHTML = input7 & input8;\n}", "title": "" }, { "docid": "a334c5a4529cfe1084ce0da1081f0b4e", "score": "0.57016355", "text": "function click() {\n console.log('Submit click');\n inputVals();\n employTable();\n monthlyCost();\n emptyInputIn();\n}", "title": "" }, { "docid": "433370535122faf22fefbb44e247efd5", "score": "0.5700828", "text": "function multiply(){\nvar input1 = document.getElementById('inpOne').value,\n input2 = document.getElementById('inpTwo').value,\n result = document.getElementById('output').innerHTML = input1 * input2;\n}", "title": "" }, { "docid": "bceda8f16a1ca3937d9e938aab444805", "score": "0.5700238", "text": "function root() {\n let num1 = document.form.textview.value;\n document.form.textview.value = Math.sqrt(num1);\n}", "title": "" }, { "docid": "16e2466836d6b4a1f782f258c5ba5b03", "score": "0.57000196", "text": "function getMultiply(){\nvar num1=document.querySelector('.num1').value;\nvar num2=document.querySelector('.num2').value;\ndocument.querySelector('.result').innerHTML=num1*num2;\n\n }", "title": "" }, { "docid": "11862902162d94dc904d389f82600cff", "score": "0.5691914", "text": "function calcmpg(event) {\r\n //prevent default tells the browser to stay on the current page after the submit button is clicked. \r\n event.preventDefault();\r\n\r\n //To get and set the values from the input fields, use the value property.\r\n var mpgform = event.target;\r\n var miles_input = mpgform.querySelector('#miles').value;\r\n var gallons_input = mpgform.querySelector('#gallons').value;\r\n\r\n //form validation - if either input is not a number, alert the user and reset the form\r\n if (isNaN(miles_input)|| isNaN(gallons_input)){\r\n alert(\"Both entries must be numeric\"); \r\n mpgform.reset(); //clear entries so that the user has a empty form to re-enter data\r\n }\r\n else{\r\n //calc mpg\r\n var mpg = miles_input / gallons_input;\r\n\r\n //change the value of mpg on the form\r\n var mpg_output = mpgform.querySelector('#mpg');\r\n mpg_output.value = mpg.toFixed(1); //round to one decimal place\r\n }\r\n}", "title": "" }, { "docid": "4ed4e118d25308eea3fb39ac465dad01", "score": "0.56868243", "text": "function myInput () {\n harold = document.getElementById('value-a').value\n harold = parseInt(harold)\n jesse = document.getElementById('value-b').value\n jesse = parseInt(jesse)\n kyle = document.getElementById('value-c').value\n kyle = parseInt(kyle)\n matt = (((harold + jesse) / 2) * kyle)\n alert(matt)\n}", "title": "" }, { "docid": "e260cda442ec5c1fa413c69cf6d0c200", "score": "0.56796503", "text": "function processInput() {\r\n\t\r\n\t// Get the user input\r\n\tvar inputValue = document.getElementById(\"userInput\").value;\r\n\t\r\n\t// Validate the user input\r\n\tvar isValid = validateInput(inputValue);\r\n\t\r\n\t// Generate the number lisst if the input is valid\r\n\tif (Boolean(isValid)) {\r\n\t\tgetOddAndEvenNumbers(inputValue);\r\n\t}\r\n}", "title": "" }, { "docid": "b806cc64386625400642fb2027f438b0", "score": "0.5679549", "text": "function showGrossSalary() {\r\n\r\n // 1. Get values from the input fields\r\n var hours = Number(document.getElementById(\"txtHours\").value);\r\n var hourlySalary = Number(document.getElementById(\"txtHourlySalary\").value);\r\n \r\n // 2. Call the calculateSalary function\r\n var grossSalary = calculateSalary(hours, hourlySalary);\r\n\r\n // 3. Display the answer\r\n document.getElementById(\"divOutput\").innerHTML = \"Gross salary is \" + grossSalary.toFixed(2) + \" euros.\"\r\n}", "title": "" }, { "docid": "1746c6b123894776b184ba4f974aa006", "score": "0.5678373", "text": "function halfNumber(num1) {\n//divide by two and return result to the console\n let half = console.log(`Half of ${num1} is ${num1 / 2}.`);\n return half;\n}", "title": "" }, { "docid": "6cf5da5c6c13f2d21fe689a24a0cad73", "score": "0.56500596", "text": "function divideTwoNumbers(a, b) {\n let result = a / b;\n console.log(result);\n}", "title": "" }, { "docid": "09cd2ff2beedbcdc46403a9dd1f012c8", "score": "0.5649208", "text": "function percentOf (num1 ,num2){\n document.querySelector(\"#value2\").textContent = `${num1} is ${(num1 / num2) * 100}% of ${num2}`\n return (num1 / num2) * 100\n}", "title": "" }, { "docid": "164f4612bd330cfb0fbf5cd76198d4c3", "score": "0.56462175", "text": "function division(a,b)\n{\n return a / b;\n}", "title": "" }, { "docid": "440bda341d56f3e4566129a5d5c65542", "score": "0.56296384", "text": "function sub() {\n let inpNum1 = document.getElementById('num1')\n let inpNum2 = document.getElementById('num2')\n let inpResult = document.getElementById('numResult')\n\n inpResult.innerHTML = `<b>${parseInt(inpNum1.value) - parseInt(inpNum2.value)}</b)`\n}", "title": "" }, { "docid": "c72f74451768febfbf1d2e27eaf3a54f", "score": "0.56294346", "text": "function DoMaths(num1, num2) {\r\n var concatenated = \"\" + num1 + num2;\r\n var added = num1 + num2;\r\n var subtracted = num1 - num2;\r\n var multiplied = num1 * num2;\r\n var divided = num1 / num2;\r\n alert(concatenated + '\\r\\n' + added + '\\r\\n' + subtracted +\r\n '\\r\\n' + multiplied + '\\r\\n' + divided);\r\n}", "title": "" }, { "docid": "4b2526b8a83467b3bfac1384983b4c47", "score": "0.5612433", "text": "function ughmath(){\r\n var problem=(3+12)*8/6-11;\r\n document.getElementById(\"Math5\").innerHTML=\"3 plus 12, multiplied by 8, divided by six, then subtracted by 11 is\"+problem;\r\n}", "title": "" }, { "docid": "8514128abc20086ef2322715d4e97893", "score": "0.5611668", "text": "render(){\n return(\n <div>\n <p>Roman Numeral Generator</p>\n <form onSubmit={this.handleSubmit}>\n <input type=\"number\" value={this.state.value} onChange={this.handleChange}></input>\n <input type=\"submit\" value=\"Covert\"></input>\n <p>{this.state.numeral}</p>\n </form>\n </div>\n );\n }", "title": "" }, { "docid": "345a645fe99c95257fa4bebefbb6c3ab", "score": "0.56097007", "text": "function calculation(){\n //get user first number\n var userinput1 = parseInt(document.getElementById(\"input1\").value);//get user second number\n var userinput2 = parseInt(document.getElementById(\"input2\").value);//get user third number \n var userinput3 = parseInt(document.getElementById(\"input3\").value);\n \n //display the result of the calculation\n document.getElementById(\"demo2\").innerHTML = (userinput1 + userinput2)*userinput3;\n \n document.getElementById(\"demo3\").innerHTML = userinput1 + userinput2 + userinput3;\n \n}", "title": "" }, { "docid": "f325bb8d7ce52a7cc5b594efa6bdd2ea", "score": "0.5604288", "text": "function roots() {\n $('.display2').text(num1(1/num2));\n}", "title": "" }, { "docid": "04bd9201101e07b9a9cf9a920c18eb4c", "score": "0.5593245", "text": "function QUOTIENT()\n{\n if(arguments.length==0)\n {\n alert(\"please enter parameter into function \");\n return \"=QUOTIENT()\";\n }else\n if(arguments.length!=2)\n {\n alert(\"please you MUST let two parameter only in function\");\n return \"=QUOTIENT()\";\n\n }\n \n var div=arguments[0]/arguments[1];\n return parseInt(div);\n\n}", "title": "" } ]
0f209571b29695ca1f0cf9e1d2795ccb
if you have to dynamically update, use onclick: on("click", handler)
[ { "docid": "796269cb728bd4ffc5cdf76f1fa976d3", "score": "0.0", "text": "function handler() {\n var bookData = $(this).data(\"vegetable\");\n var dictionaryData = $(this).data(\"fruit\");\n\n getBookData(bookData);\n quotes(dictionaryData);\n // getDictionaryData(dictionaryData);\n}", "title": "" } ]
[ { "docid": "1176319ee0853b28a096ca9b45644608", "score": "0.7154735", "text": "function updateClick() {\n}", "title": "" }, { "docid": "4aed8302a75b297cb35beb8320bf1216", "score": "0.6731764", "text": "onClick() {}", "title": "" }, { "docid": "4aed8302a75b297cb35beb8320bf1216", "score": "0.6731764", "text": "onClick() {}", "title": "" }, { "docid": "068d995410eed0d5c112237430809e1c", "score": "0.6707734", "text": "onclick() { }", "title": "" }, { "docid": "26e6681ebce0a8686a731b6297572e9b", "score": "0.65699774", "text": "onClick(){ }", "title": "" }, { "docid": "f647798c1b4e77422444f1b4835a9edb", "score": "0.6545649", "text": "function clickHandler(evt) {\n\n }", "title": "" }, { "docid": "0605ba483926955ff973e8bc91f68064", "score": "0.64271164", "text": "function onClick(params){}", "title": "" }, { "docid": "2e5be75423300e6ee2a6bd19df88ea6a", "score": "0.6415713", "text": "clickHandler() {\n declarativeClickHandler(this);\n }", "title": "" }, { "docid": "00f6f81df3adb20a3dd3611594c5729a", "score": "0.63766116", "text": "function handleClick(evt) {\n}", "title": "" }, { "docid": "e3a3505dcbee4da4454003a212cb541e", "score": "0.63337743", "text": "handleClick(){\n\n }", "title": "" }, { "docid": "0bd39992e60dd936e46b5cefc743bb77", "score": "0.6330752", "text": "handleClick(e) {\n\t\tthis.props.onUpdate(e.currentTarget.dataset.type);\n\t}", "title": "" }, { "docid": "737e6c92c5ff7111ea259102298717eb", "score": "0.6328299", "text": "_addClickHandler() {\n }", "title": "" }, { "docid": "d49736639394bfbb951b25aa01501cfa", "score": "0.62460995", "text": "function clickHandler () {\n alert('Woweee -- You did it!')\n}", "title": "" }, { "docid": "6d17a2a3b70b7691a82c75bc2469cf02", "score": "0.62354094", "text": "function clickHandler(e){\n\t//console.log(e.target.id);\n\n\t//button recalls button Id \n\tvar myID = e.target.id;\n\t//isolated year from button id\n\tvar yearVlu = myID.split(\"_\")[1];\n\n\t//append year to \"Unemployment since...\" send to chart title \n\t$(\"#chartTitle\").html(\"Unemployment since \"+yearVlu);\n\n\t//build query string from table ID; variable year; and key; init. unemploymentLoaded\n\t$.get(tableID+\"'\"+yearVlu+\"-01-01'\"+googleKey, unemploymentLoaded, \"json\");\n\t//Assign button states to url\n\t History.pushState({year:yearVlu}, \"Unemployment from \"+yearVlu, \"?year=\"+yearVlu); // logs {state:1}, \"State 1\", \"?state=1\"\n}//end click handler function", "title": "" }, { "docid": "22871bc363e2280cdb4503128db67f79", "score": "0.6202891", "text": "function clicked(){\n console.log(\"the button was clicked\");\n }", "title": "" }, { "docid": "f147a1f43f07267a4cb74d324b434a6b", "score": "0.61866486", "text": "function clickHandler(event) {\r\n event.preventDefault();\r\n writeTotalTime()\r\n replaceNumberDetails() }", "title": "" }, { "docid": "7ba64f09bd49bcc21ffa5d80ba830156", "score": "0.61382836", "text": "_clickHandler(event) {\n this.click(event);\n }", "title": "" }, { "docid": "3b21c45f8a9a9b82ad6c034ca037a99e", "score": "0.6134082", "text": "function bindOnClick(id, f){\n const btn = document.getElementById(id);\n btn.onclick = f.bind(btn);\n}", "title": "" }, { "docid": "5f577b99b0c026cf4716fd76ad670ce3", "score": "0.61155695", "text": "function clickhandle() {\n console.log('accept the button click');\n}", "title": "" }, { "docid": "ed8aacad8f226ce497f447d79183b544", "score": "0.6099811", "text": "function addOnclickForEach(item, index, arr){\n item.setAttribute(\"onclick\",\"newContentOnClick(event); return false;\");//returns flase to stop the page from refreshing\n}", "title": "" }, { "docid": "d9de2c2a7f606239b72ab214852e390d", "score": "0.60931754", "text": "function handleClick() {\n console.log(\"button is clicked\");\n makeAPICall();\n}", "title": "" }, { "docid": "fb5d3052b81fd49d2e4efc65cc1a7d12", "score": "0.6087579", "text": "function action_event_handler(event) {\n { console.log((\"[] event '\" + name + \"': \"), event); }\n run_action(action, event);\n run_updates(); // dom event - must run updates.\n }", "title": "" }, { "docid": "4221cd20359d355d5215646571250816", "score": "0.60800725", "text": "function click() {\n }", "title": "" }, { "docid": "9ca089306ba349c6e802dd6972dbc5d4", "score": "0.6076268", "text": "handleSingleClick(value) {\n this.updateThreatMapOnSingleClick(value);\n }", "title": "" }, { "docid": "bb1820db7d28c436f1c476ff2349350a", "score": "0.6043501", "text": "_onClick(event){\n this._request({\n value: event.currentTarget.getAttribute('data-value')\n });\n }", "title": "" }, { "docid": "22af739a88b41a3cc3a50f0fdab8c40a", "score": "0.604319", "text": "function onClick() {\n alert('i was clicked')\n}", "title": "" }, { "docid": "c33fca3e2887d84f22ed228e16bf529f", "score": "0.60396004", "text": "on() /*type, handler*/\n {}", "title": "" }, { "docid": "1531d6235f6d4ed6e5c001e697fa48ac", "score": "0.60207903", "text": "function handleClick() {\n console.log('Nice job clicking, I\\'m proud of you!');\n}", "title": "" }, { "docid": "6a85b1ea15ea7836ba84192b4f9238d4", "score": "0.602067", "text": "function setOnclick() {\n $('#bold').click(function (e) {\n setBold(this);\n });\n $('#italic').click(function (e) {\n setItalic(this);\n });\n $('#underline').click(function (e) {\n setUnderline(this);\n });\n $('#prullenbak').click(function (e) {\n removeObject(this);\n });\n $('#plus').click(function (e) {\n addText2(askText());\n });\n $('#bringToFront').click(function (e) {\n bringToFront(this);\n });\n $('#bringToBack').click(function (e) {\n sendToBack(this);\n });\n $('#align1').click(function () {\n setAlign('left', this);\n });\n $('#align2').click(function () {\n setAlign('center', this);\n });\n $('#align3').click(function () {\n setAlign('right', this);\n });\n }", "title": "" }, { "docid": "c992e359d8a4e66fbc08b01f9ac94100", "score": "0.59954756", "text": "handleClick(event) {\n // no-operation. extend if needed.\n }", "title": "" }, { "docid": "cd11bb77cb9e1cd429af4fbb3c95c8bb", "score": "0.5985195", "text": "function apply_click_handlers(){\n $('tbody').on('click', 'button.delete_button', function(){\n remove_student(event);\n });\n\n $('div').on('click', 'button.update_button', function(){\n change_student_info(row_being_changed);\n });\n\n $('div').on('click', 'button.cancel_edit', function(){\n cancel_edit_student();\n })\n}", "title": "" }, { "docid": "cf4754f0de51397438f28f4a25290a5b", "score": "0.59832287", "text": "clickHandler()\n\t{\n\t\tconsole.log(\"oof\");\n\t\talert(\"ouch!\");\n\t}", "title": "" }, { "docid": "cf0800ce4fdfab2c385eb72a8d6db426", "score": "0.5980335", "text": "function mainPageClick($id) {\n sendAjax($id, '/library/api/v1/admin/incrementClicks.php');\n}", "title": "" }, { "docid": "3fa76e963d3c9f537687f5ee901d60a5", "score": "0.5975379", "text": "function clickHandler() {\n\t\ttau.openPopup(popup);\n\t}", "title": "" }, { "docid": "b10386bc04c6b4f7abf8a2000084ebed", "score": "0.5970075", "text": "updateOnClick({ dataset }) {\n\n this.update(dataset);\n }", "title": "" }, { "docid": "e3e5f97324c4c395078e29d0ee1c4af6", "score": "0.5958641", "text": "function apply_event_handler(){\n $('#inventory_shipped').click(ship_inventory);\n $('#inventory_received').click(receive_inventory);\n $('.item_block').click(getChildProducts).click(displayProductFromChild);\n $('#upc').blur(displayProductFromInput);\n $('#delete_product').click(delete_product);\n $('#enter_upc').click(fillUpdateInputs);\n}", "title": "" }, { "docid": "41f43a30e24bdcdb4298820c31a2c9e4", "score": "0.5914995", "text": "handleClick(evt) {\n this.generate();\n }", "title": "" }, { "docid": "48d0d69e72bcec53e9f5404576197538", "score": "0.5902921", "text": "function addClick(id, handler) {\n document.getElementById(id).onclick = handler;\n}", "title": "" }, { "docid": "5d2a64d357695b85d39211848900de29", "score": "0.58893484", "text": "performClickFunctionality(){}", "title": "" }, { "docid": "75ab1c9cedfb7639a1dd96ebb0ad95aa", "score": "0.58744", "text": "handleMouseClick( event ) {\n\n }", "title": "" }, { "docid": "d121328f7e364321333d488d283d312f", "score": "0.5863079", "text": "handleClick() {\n\t\t//get current value of the click and assign it to current state\n\t\tlet { clicks } = this.state;\n\n\t\t// set a new value, and passed in javascript with values we want to update,\n\t\t// adds 1 to clicks when onClick={this.handleClick} element is clicked\n\t\tthis.setState({ clicks: clicks + 1})\n\t}", "title": "" }, { "docid": "cf1a6fe4407ebf81407e9a81f7198485", "score": "0.5850558", "text": "function setUpClickHandler() {\r\n view.on(\"click\", function(event) {\r\n view.hitTest(event).then(function(response) {\r\n var results = response.results;\r\n // Found a valid graphic\r\n if (results.length && results[results.length - 1]\r\n .graphic) {\r\n // Check if we're already editing a graphic\r\n if (!editGraphic) {\r\n // Save a reference to the graphic we intend to update\r\n editGraphic = results[results.length - 1].graphic;\r\n // Remove the graphic from the GraphicsLayer\r\n // Sketch will handle displaying the graphic while being updated\r\n tempGraphicsLayer.remove(editGraphic);\r\n sketchViewModel.update(editGraphic);\r\n }\r\n }\r\n });\r\n });\r\n }", "title": "" }, { "docid": "e6a8cfc000303cbaf91ef2a84baf31ba", "score": "0.58163005", "text": "setupButtonOnClickHandler(selector, handler) {\r\n var button = document.querySelector(selector);\r\n button.onclick = handler;\r\n }", "title": "" }, { "docid": "5b4183bc6c3a41cd6d29feb75c2935f7", "score": "0.581395", "text": "function updateOnClickListeners(){\n\t\t\tfor(var i=0; i<bookObjs1.length; i++){\n\t\t\t\tdocument.getElementById(\"bookID\" + i).onclick = function(id){\n\t\t\t\t\treturn function(){\n\t\t\t\t\t\tupdateShoppingCartStatus(bookObjs1[id]);\n\t\t\t\t\t};\n\t\t\t\t}(i);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e96fad644978cb20e23152e3415c1902", "score": "0.58137965", "text": "function buttonEvent(idName, price) {\n // update extra price\n updateExtra(idName, price);\n\n // update total price\n updateTotalPrice();\n}", "title": "" }, { "docid": "63ece24a29581fc34fa55aadc679f490", "score": "0.58081234", "text": "function makeClickHandler(i) {\n \"use strict\";\n return function () {\n //this.innerHTML = i;\n style = this.value;\n face();\n };\n}", "title": "" }, { "docid": "2e5dec3576b6c5cb97033cd817615c62", "score": "0.58022124", "text": "handleClick() {\n console.log('this is:', 'thi is new function start here');\n}", "title": "" }, { "docid": "88949ddc01b7f6a612c9487043fe1675", "score": "0.58011466", "text": "onClick(id, event) {\n this.$emit(\"click\", id, event);\n }", "title": "" }, { "docid": "d476fa6784affda4363f062049bac037", "score": "0.58002263", "text": "function onButtonClick(){\n console.log('hello');\n }", "title": "" }, { "docid": "2c2ef3b020e555de95a53490a76aa526", "score": "0.5797809", "text": "function click_thing(e) {\n}", "title": "" }, { "docid": "1ba035a7f451d1310ec160e475c98c88", "score": "0.5793992", "text": "function onClick(elm, func) { (typeof elm === 'string' ? $('#'+elm) : elm).addEventListener('click', func, false); }", "title": "" }, { "docid": "588adcd629845ea429e7a4a3157088ac", "score": "0.5788326", "text": "function myClickHander1(event) {\r\n /* as required */\r\n}", "title": "" }, { "docid": "b9606175d3aafe55759f4bb7d2a70830", "score": "0.5785308", "text": "click() {\n const clickHandler = get(this, 'clickHandler');\n\n if (clickHandler) { clickHandler(); }\n }", "title": "" }, { "docid": "d7362570579ada58cb7c194c110225a9", "score": "0.5780504", "text": "handleClick() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(this.event, {\n\t\t\t\tbubbles: this.eventBubbles,\n\t\t\t\tcomposed: this.eventBubbles,\n\t\t\t})\n\t\t);\n\t}", "title": "" }, { "docid": "47eb2dee719e519937283efe629c5b9b", "score": "0.5776891", "text": "handleClick(e) {\n console.log(\"AAAA\");\n }", "title": "" }, { "docid": "4ab4abd902ff91d4aba8a1c3f58db9bc", "score": "0.57719946", "text": "function onclick(e) {\n\t\t\te.preventDefault();\n\t\t\tmethods[action]();\n\t\t}", "title": "" }, { "docid": "5eaa1915f445d52fd068e587cd76c7f2", "score": "0.57663345", "text": "function clickButton() {\n console.log(\"clicked!\");\n}", "title": "" }, { "docid": "1ce284f79f87948e94975c56676debeb", "score": "0.5762597", "text": "function onClick(event) {\n console.log(event)\n}", "title": "" }, { "docid": "9a5e7fa1c61bd2f20d3c9b9abe6a0d97", "score": "0.5747882", "text": "function onClick(event) {\n event.preventDefault()\n action(\"onClickLink\")(event.target.href)\n}", "title": "" }, { "docid": "5f6663f75d7b348369991eb91c1863be", "score": "0.5741451", "text": "function addClick() {\n}", "title": "" }, { "docid": "0ac6c7bc6d5f26bb4e18b5771c86ba04", "score": "0.5740764", "text": "function clickButton() {\n }", "title": "" }, { "docid": "0ac6c7bc6d5f26bb4e18b5771c86ba04", "score": "0.5740764", "text": "function clickButton() {\n }", "title": "" }, { "docid": "0ac6c7bc6d5f26bb4e18b5771c86ba04", "score": "0.5740764", "text": "function clickButton() {\n }", "title": "" }, { "docid": "8bce2aad433fbbe776e4c3066408deae", "score": "0.5736902", "text": "function onClickEvent() {\n 'use strict';\n var sender = this.id;\n\n switch (sender) {\n case \"btnCreateClass\":\n onCreateClass();\n break;\n case \"btnModifyClass\":\n onModifyClass();\n break;\n case \"btnDeleteClass\":\n onDeleteClass();\n break;\n case \"btnUpdateClass\":\n onUpdateClass();\n break;\n }\n }", "title": "" }, { "docid": "20f47c0c16d69a3ad4053272ebba8a24", "score": "0.571549", "text": "on() {}", "title": "" }, { "docid": "bfe2566ab5a95462fca0afb373109469", "score": "0.5705407", "text": "function scCustomClick(){}", "title": "" }, { "docid": "eba4efe432046235508888ae474717ab", "score": "0.57017344", "text": "onClick(event) {\n this.$emit(\"click\", this.id, event);\n }", "title": "" }, { "docid": "eba4efe432046235508888ae474717ab", "score": "0.57017344", "text": "onClick(event) {\n this.$emit(\"click\", this.id, event);\n }", "title": "" }, { "docid": "a9e27a7fa6aefb32b7baa26d77a94be6", "score": "0.569759", "text": "function addClickListener(objectId, fce) {\r\n var object = document.getElementById(objectId);\r\n object.onclick = fce;\r\n}", "title": "" }, { "docid": "fe105c0ae83b38d421eafe12211f4f46", "score": "0.5689509", "text": "click(self, x, y, data) {\n\n }", "title": "" }, { "docid": "499ba60b4ee6d0d6c3e9bb21a16170ad", "score": "0.5681245", "text": "function eventHandlers() {\n newAdd();\n newLink();\n addForm();\n endMenu();\n removeItem();\n createRatingFilter();\n openEdit();\n openView();\n editValue();\n\n}", "title": "" }, { "docid": "c8ac856d57563a96e47639202243fe75", "score": "0.5668484", "text": "function eventHandler(event) {\n event();\n}", "title": "" }, { "docid": "52176bb05b62cb30b8b5bcf4ac480870", "score": "0.56597155", "text": "onClick() {\n alert('I am an alert box!')\n }", "title": "" }, { "docid": "8e264b6208caf1ddc6ae276d39e23222", "score": "0.564685", "text": "function clicked() {\n alert('running the example');\n}", "title": "" }, { "docid": "be121901be76fee8b745a1b505749bd5", "score": "0.5646292", "text": "function bindActionToButton() {\n var onClickHandler;\n if (universe.chainedFrame === \"FINAL\") {\n onClickHandler = universe.callback(universe.formaData);\n } else {\n onClickHandler = switchToNextFrame;\n }\n document.getElementById(\"\" + universe.parentId + \"-process-button\").addEventListener('click', onClickHandler);\n }", "title": "" }, { "docid": "e0ae774b7e3c5bff5484627338a30044", "score": "0.5644225", "text": "function changeUserClick() {\r\n changeUserStyles();\r\n app.$submitUser.onclick = submitChangeUser\r\n}", "title": "" }, { "docid": "1f9b51b64ad3c270ff7e033ba48099db", "score": "0.5634628", "text": "set onClick(v) {\n this.updateProp('onClick', v);\n }", "title": "" }, { "docid": "f426f415b353c17eeea824520e4b3f54", "score": "0.56269366", "text": "function doThisOnClick(){\n\talert('You did it!');\n}", "title": "" }, { "docid": "61a2b6f7dbba6457ce158795f6480ec7", "score": "0.56171846", "text": "function assignClickHandler() { \r\n var clickDiv = document.getElementById('socialInfo');\r\n clickDiv.addEventListener(\"click\", showExtraInfo, true);\r\n}", "title": "" }, { "docid": "6129dfcb9095ae1a759f0123f4ee5c7c", "score": "0.5615459", "text": "function init() {\r\n document.getElementById('writeFile').onclick = doFileClick;\r\n}", "title": "" }, { "docid": "b5b237a63f3a6281642e59d19d1e20ce", "score": "0.56129974", "text": "handleClick() {\r\n\t\tthis.sendMessage();\r\n\t}", "title": "" }, { "docid": "fd07c968dd00befff34cc5a1f03d37d2", "score": "0.56083107", "text": "updated(event) {}", "title": "" }, { "docid": "d81b96f020ca6b384b7ac23247707e03", "score": "0.56074816", "text": "clicked() {\n this.get('onOpen')();\n }", "title": "" }, { "docid": "a715e68ac91eb923a141396044160cca", "score": "0.5601873", "text": "function onAction(id) {\n\n}", "title": "" }, { "docid": "fd9dea43022ddfc43cf2600a1b3d5b63", "score": "0.55980957", "text": "function handleClick() {\n\t\t window.ctaClick();\n\t\t}", "title": "" }, { "docid": "7478aa47fba7d73fe20a883fadf77164", "score": "0.5596935", "text": "function dynamicHandler(event) {\n console.log(\"clicked dynamicHandler\", event.target);\n}", "title": "" }, { "docid": "deb9bc7cdc8d25ee47038943dc170a6e", "score": "0.5583917", "text": "function addClick(){\r\n\tvar btn;\r\n\tfor (var i=0;i<16;i++){\r\n\t\tbtn=document.getElementById(\"id-\"+i)\r\n\t\tbtn.addEventListener(\"click\",function() {\r\n\t\t\tgetValue(this);\r\n\t\t} );\r\n\t}\r\n}", "title": "" }, { "docid": "940718269f4368924e09cfa67541f6f8", "score": "0.55808234", "text": "function onclick()\n{ bang();}", "title": "" }, { "docid": "8330d08686cb4eeaeed7ce289f378bc4", "score": "0.55806404", "text": "async function handleClick(event) {\n const $target = $(event.target);\n const $showing = $target[0].dataset.showing;\n const x = Number($target.attr(\"id\").split(\"-\", 1));\n const y = Number($target.attr(\"id\").split(\"-\")[1]);\n const clue = gameData[x].clues[y];\n\n if ($showing === \"\") {\n $target.addClass(\"clicked\");\n $target.text(clue.question);\n $target.attr(\"data-showing\", \"question\");\n } else if ($showing === \"question\") {\n $target.removeClass(\"clicked\");\n $target.text(clue.answer);\n $target.attr(\"data-showing\", \"answer\");\n }\n}", "title": "" }, { "docid": "bcd550c86dc955cddc46fc63f5f6a2a8", "score": "0.5576167", "text": "function clickHandler(e) {\r\n setTimeout(save(), 100);\r\n}", "title": "" }, { "docid": "b23b937c5e79d3a4dbbf4f1f4d6bd3d6", "score": "0.5570286", "text": "function clickHandler(evt) {\n wasm.exports.clickHandler(evt.clientX, evt.clientY);\n}", "title": "" }, { "docid": "9f97a6765f5e898fbc8c5ba91ca68ec6", "score": "0.55641824", "text": "function handler() {\n var defaultlist = document.getElementById(\"default-list\");\n \n //If default-list element exists then remove it\n if(defaultlist){\n //Remove default table row\n defaultlist.parentNode.removeChild(defaultlist);\n } \n \n if( this.hasAttribute(\"data-clicked\") ){\n counter += 1;\n this.setAttribute(\"data-clicked\", counter);\n }else{\n counter = 1;\n this.setAttribute(\"data-clicked\", counter);\n } \n\n //Checkout functionality\n if( parseFloat(document.getElementById(\"total\").innerHTML) !== 0){\n document.getElementById(\"checkout\").style.display = \"block\";\n window.placeOrder = function(){\n if(document.getElementById(\"payment\").value){\n payment = parseFloat(document.getElementById(\"payment\").value);\n document.getElementById(\"yourChange\").innerHTML += total.toFixed(2) - payment.toFixed(2);\n document.getElementById(\"error\").style.display = \"none\";\n }else{\n document.getElementById(\"error\").innerHTML = \"Please add an invalid amount.\";\n }\n };\n }\n }", "title": "" }, { "docid": "b90882017d6527a0d45c461f49843111", "score": "0.55601865", "text": "function clickHandler(event) {\n\t\t\t\t\tscope.clickHandler(event);\n\t\t\t\t}", "title": "" }, { "docid": "23385bb69ea0ccdbfbe1293ab8ff61b0", "score": "0.5544632", "text": "handleClick(evt) {\n if (this.props.onClick) {\n this.props.onClick(evt, this.id, this.props.url);\n }\n }", "title": "" }, { "docid": "90d3232decebf0da20b46f50f4f7473d", "score": "0.55370194", "text": "handleClick(e) {\n\n //const node = ReactDOM.findDOMNode(this.refs.input);\n managePortfolioData();\n\n gallantOnScreen(); // Make it so...\n\n this.forceUpdate();\n\n }", "title": "" }, { "docid": "162e63db8d512583cec618e83e41e693", "score": "0.5533203", "text": "function process_click (func)\n{\n\tG_page_view.doFunction(func);\t\n}", "title": "" }, { "docid": "1d2e903384f36cf23c99c55cbf8e8333", "score": "0.55301756", "text": "function clicked(d,i) { }", "title": "" }, { "docid": "3cb2c3f6db9955dd57346032f2e7b3c0", "score": "0.55285585", "text": "function handleClick() {\n setClick(!click);\n }", "title": "" }, { "docid": "be8e447752d7abb5be93405272a03dac", "score": "0.5528557", "text": "function refresh() {\r\n refresh.addEventListener(\"click\" , function(){\r\n refresh(\"refresh\");\r\n })\r\n}", "title": "" }, { "docid": "36add5a1d1a08bcd25b6ca2ef30d8803", "score": "0.552659", "text": "function addClickHandler(elem, arg1) {\n elem.addEventListener('click', function(e) {\n changeImage(arg1);\n }, false);\n}", "title": "" }, { "docid": "e1bc1e745649b1ddfff62d99488bc8d0", "score": "0.5525594", "text": "function whatToDoOnClick() {\n alert(\"You Did it!\")\n}", "title": "" } ]
005d7facb9ea56b041b2c76545358e0b
Heatmap checkbox checked/unchecked event, changing with the radio button disabled/enabled
[ { "docid": "d03ae4a4fbf7bcfcbd5e77fe7b60aebe", "score": "0.7737201", "text": "function HeatCheck(){\n if (document.getElementById('HeatmapLayer').checked) {\n for (var i = 0; i< heatmapRadio.length; i++){\n heatmapRadio[i].disabled = false;\n }\n heatmapRadio[0].checked = true;\n } else{\n for (var i = 0; i< toxicRadio.length; i++){\n toxicRadio[i].disabled = true;\n toxicRadio[i].checked = false;\n }\n for (var i = 0; i< heatmapRadio.length; i++){\n heatmapRadio[i].disabled = true;\n heatmapRadio[i].checked = false;\n }\n };\n}", "title": "" } ]
[ { "docid": "1532560d73b1a09d62b8b0b0c7967ea2", "score": "0.6799385", "text": "handleCheckedEvent(e) {\n Act.nodeUpdate({\n nodeKey: this.props.layerKey,\n attr: 'visibility',\n value: e.target.checked,\n })\n }", "title": "" }, { "docid": "9251c454331a7004fe4db7d8b6f845cc", "score": "0.63902825", "text": "function checkbox() {\n if (checkBoxClicked) {\n checkBoxClicked = false;\n } else {\n checkBoxClicked = true;\n }\n}", "title": "" }, { "docid": "eb84ca5752d6f8cf7abbf36523dee746", "score": "0.638747", "text": "changeMasks(evt) {\n this.setState({ show_masks: evt.nativeEvent.srcElement.checked });\n }", "title": "" }, { "docid": "7bf29e36b9b921e964fd6182dffea55b", "score": "0.63749176", "text": "function handleCustom(checkbox) {\n\tif (checkbox.checked == true) {\n\t\tdocument.getElementById(\"checkanimate\").disabled = false;\n\t\t//document.getElementById(\"checkanimate\").checked = true;\n\t} else {\n\t\tdocument.getElementById(\"checkanimate\").disabled = true;\n\t\t//document.getElementById(\"checkanimate\").checked = false;\n\t}\n}", "title": "" }, { "docid": "932a873a41f023f41e7ae6e181c4aba6", "score": "0.6352659", "text": "function chb_StatusChanged(sender, eventArgs) {\n var iconCtrl = sender.get_control('Icon');\n var isCheckItem = sender.type == S4N.CheckBoxType.CheckBox; //isCheckItem=true pak checkbox, jinak radiobutton\n switch (sender.checkStatus) {\n case S4N.CheckBoxStatus.Undefined:\n if (isCheckItem) S4N.Sys.setCssStatus(iconCtrl,\n false, 'selCBChecked', false, 'selCBUnchecked', false, 'selCBEvaChecked', false, 'selCBEvaUnchecked', true, 'selCBUndefined', false, 'selCBUndEvaUnchecked', false, 'selCBUndEvaChecked');\n break;\n case S4N.CheckBoxStatus.UndefinedChecked:\n if (isCheckItem) S4N.Sys.setCssStatus(iconCtrl,\n false, 'selCBChecked', false, 'selCBUnchecked', false, 'selCBEvaChecked', false, 'selCBEvaUnchecked', false, 'selCBUndefined', false, 'selCBUndEvaUnchecked', true, 'selCBUndEvaChecked');\n break;\n case S4N.CheckBoxStatus.UndefinedUnchecked:\n if (isCheckItem) S4N.Sys.setCssStatus(iconCtrl,\n false, 'selCBChecked', false, 'selCBUnchecked', false, 'selCBEvaChecked', false, 'selCBEvaUnchecked', false, 'selCBUndefined', true, 'selCBUndEvaUnchecked', false, 'selCBUndEvaChecked');\n break;\n case S4N.CheckBoxStatus.ReadOnly:\n case S4N.CheckBoxStatus.UncheckedOK:\n case S4N.CheckBoxStatus.Unchecked:\n if (isCheckItem) S4N.Sys.setCssStatus(iconCtrl,\n false, 'selCBChecked', true, 'selCBUnchecked', false, 'selCBEvaChecked', false, 'selCBEvaUnchecked', false, 'selCBUndefined', false, 'selCBUndEvaUnchecked', false, 'selCBUndEvaChecked');\n else S4N.Sys.setCssStatus(iconCtrl,\n false, 'selRBChecked', true, 'selRBUnchecked', false, 'selRBEvaChecked', false, 'selRBEvaUnchecked');\n break;\n case S4N.CheckBoxStatus.CheckedOK:\n case S4N.CheckBoxStatus.Checked:\n if (isCheckItem) S4N.Sys.setCssStatus(iconCtrl,\n true, 'selCBChecked', false, 'selCBUnchecked', false, 'selCBEvaChecked', false, 'selCBEvaUnchecked', false, 'selCBUndefined', false, 'selCBUndEvaUnchecked', false, 'selCBUndEvaChecked');\n else S4N.Sys.setCssStatus(iconCtrl,\n true, 'selRBChecked', false, 'selRBUnchecked', false, 'selRBEvaChecked', false, 'selRBEvaUnchecked');\n break;\n case S4N.CheckBoxStatus.UncheckedWrong:\n if (isCheckItem) S4N.Sys.setCssStatus(iconCtrl,\n false, 'selCBChecked', false, 'selCBUnchecked', false, 'selCBEvaChecked', true, 'selCBEvaUnchecked', false, 'selCBUndefined', false, 'selCBUndEvaUnchecked', false, 'selCBUndEvaChecked');\n else S4N.Sys.setCssStatus(iconCtrl,\n false, 'selRBChecked', false, 'selRBUnchecked', false, 'selRBEvaChecked', true, 'selRBEvaUnchecked');\n break;\n case S4N.CheckBoxStatus.CheckedWrong:\n if (isCheckItem) S4N.Sys.setCssStatus(iconCtrl,\n false, 'selCBChecked', false, 'selCBUnchecked', true, 'selCBEvaChecked', false, 'selCBEvaUnchecked', false, 'selCBUndefined', false, 'selCBUndEvaUnchecked', false, 'selCBUndEvaChecked');\n else S4N.Sys.setCssStatus(iconCtrl,\n false, 'selRBChecked', false, 'selRBUnchecked', true, 'selRBEvaChecked', false, 'selRBEvaUnchecked');\n break;\n }\n}", "title": "" }, { "docid": "461bb37d163e5dae0e6f2b93180882b9", "score": "0.6343412", "text": "function updateRadio1() {\n\tvar arrayCapas = mapa1.getLayers().getArray();\n\tvar selecCapa1 = document.getElementById('radiocapa1').checked\n\tvar selecCapa2 = document.getElementById('radiocapa2').checked\n\tvar selecCapa3 = document.getElementById('radiocapa3').checked\n\tvar selecCapa4 = document.getElementById('radiocapa4').checked\n\n\tarrayCapas[1].setVisible(selecCapa1);\n\tarrayCapas[2].setVisible(selecCapa2);\n\tarrayCapas[3].setVisible(selecCapa3);\n\tarrayCapas[4].setVisible(selecCapa4);\n\n}", "title": "" }, { "docid": "40ed9014e359ef5dc1acc32f45df0a8c", "score": "0.630314", "text": "handleSaturate(event) {\n this.setState({ saturate: event.target.checked })\n }", "title": "" }, { "docid": "52f3d5f1bb03bf35b3424dc3b55417bd", "score": "0.6277713", "text": "function gradFlagChange(){\n\tvar a = document.getElementById('gradFlag');\n\tvar v = a.checked;\n\tif(v){\n\t\t//alert('this');\n\t\t$(\".gradInput\").prop(\"disabled\",true);\t\n\t}\n\tif(!v){\n\t\t//alert('this as well');\n\t\t$(\".gradInput\").prop(\"disabled\",false);\n\t}\n}", "title": "" }, { "docid": "f6cbf5a970974c82098cfdad017a1ddf", "score": "0.6266609", "text": "function hitAllPlotCheckboxes(trueOrFalse){\n var checkboxes = $('input[type=\"checkbox\"]').prop('checked', trueOrFalse); \n}", "title": "" }, { "docid": "410949b2abad139295980163664647dd", "score": "0.6231744", "text": "function changeTooltip(event) {\n tooltipsEnabled = event.target.checked\n display()\n}", "title": "" }, { "docid": "237867771bb4cb472460a5ce7680725a", "score": "0.6227853", "text": "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t\t$(this).trigger(\"change\");\n\t\t\t}", "title": "" }, { "docid": "98e5a10bf2e11129d97d2c8b3d7a0813", "score": "0.6192101", "text": "function checkbox_clicked(){\n console.log(\"function called\");\n submit.disabled = !checkbox.checked;\n}", "title": "" }, { "docid": "4a5adde074c9f429479bdc5aa3d1fc2d", "score": "0.61445314", "text": "function switchlayer(e){\n\t\t/*for (var i = layersArray.length - 1; i >= 0; i--) {\n\n\t\t\tlayersArray[i]\n\t\t}*/\n\t\tlayersArray[e.value].setVisible(e.checked);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "dfa723976c384828b78f7acde6770341", "score": "0.6139762", "text": "function setSwitchery(switchElement, checkedBool, slider) {\n if((checkedBool && !switchElement.checked) || (!checkedBool && switchElement.checked)) {\n \tswitchElement.click();\n }\n switchElement.addEventListener('click', function(){\n \tslider.update({\n disable: !switchElement.checked\n });\n \tupdateMapOnFinish();\n });\n }", "title": "" }, { "docid": "246d4b1e9147c9a6baf0225db88b9b62", "score": "0.6136192", "text": "function PointRadio(){\n for (var i = 0; i< toxicRadio.length; i++){\n toxicRadio[i].disabled = true;\n toxicRadio[i].checked = false;\n } \n}", "title": "" }, { "docid": "b1298a0303f85faa0c3b6182add12def", "score": "0.61223936", "text": "function changeColor2(obj, r1, r2, col, serv) {\n\nvar i = serv;\n\nif (typeof document.form1.elements['serve[]'].length != 'undefined') {\n\n\n if(document.form1.elements['serve[]'][i].checked) {\n document.form1.elements['serve[]'][i].checked = false;\n }\n \n}else{\n document.form1.elements['serve[]'].checked = false;\n\n}\n\n//this toggles the color of the row\nvar x=document.getElementById(r1);\nvar y=document.getElementById(r2);\nx.style.backgroundColor = (obj.checked) ? \"red\" : col;\ny.style.backgroundColor = (obj.checked) ? \"red\" : col;\n\n\n}", "title": "" }, { "docid": "66cbb9e4bf8970fac148dbea6d400b3d", "score": "0.6113875", "text": "function changeKovarex(event) {\n setKovarex(event.target.checked)\n itemUpdate()\n}", "title": "" }, { "docid": "2a7f0d2600e451c40075763db490ea18", "score": "0.6110286", "text": "change() {\n\n let isChecked = this.input.checked;\n\n // Display the elements\n this.elToDisplayIfChecked.forEach(el => {\n isChecked ? el.classList.remove('d-none') : el.classList.add('d-none');\n this.disabled(el,!isChecked);\n });\n\n // Hide the elements\n this.elToDisplayIfNotChecked.forEach(el => {\n isChecked ? el.classList.add('d-none') : el.classList.remove('d-none');\n this.disabled(el,isChecked);\n });\n\n // Run option callback\n this.options.onChanged(isChecked);\n\n }", "title": "" }, { "docid": "4d7820fe6632e2196e88982e4e8256cf", "score": "0.60833377", "text": "_markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }", "title": "" }, { "docid": "28f34cd27655c125e0db01158994b99a", "score": "0.607306", "text": "function onCheckboxChange(d) {\n // first, was the clicked box already checked or not?\n // we do this by checking what index it has within the array\n const index = state.filters.checked.indexOf(d);\n \n // this array will hold the new checked values, whether something has been checked or unchecked\n let nextCheckedValues = Array.from(state.filters.checked);\n\n // if box is checked, uncheck it\n if (index > -1) {\n // take it out of the array of checked values\n nextCheckedValues.splice(index, 1) \n\n // otherwise, add it to the checked values\n } else {\n nextCheckedValues.push(d);\n }\n\n // update the checked values in the state\n state.filters.checked = Array.from(nextCheckedValues);\n \n // and update the visualization\n draw();\n}", "title": "" }, { "docid": "1bfc2d25fc49c8deb32a1da8c98136e9", "score": "0.6069405", "text": "function updateCheckboxInteractivity() {\n var inputs = $(\"label input[type=checkbox]\");\n\n if(selectedCount === MAX_SELECTIONS) {\n inputs.each(function() {\n var input = $(this);\n\n if(!input.prop('checked')){\n input.prop('disabled', true);\n }\n });\n } else {\n inputs.each(function() {\n var input = $(this);\n\n if(!input.prop('checked')) {\n input.prop('disabled', false);\n }\n });\n }\n}", "title": "" }, { "docid": "339bfdc377ecc6b8b953f188ec760428", "score": "0.6066454", "text": "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t}", "title": "" }, { "docid": "bec28348c7353c909c6162574e8f0e55", "score": "0.60562086", "text": "function setCheckbox() {\n colCheck = createCheckbox(' Inverti colori', false);\n colCheck.style(\"color: #ffffff\")\n colCheck.position(10, height - 30);\n colCheck.changed(invertColors);\n}", "title": "" }, { "docid": "37e7628d0f907698f94772ed51415d31", "score": "0.60499144", "text": "function onUseTextColorValueChanged(e) {\n textColorFieldSet.disabled = !e.target.checked;\n}", "title": "" }, { "docid": "07abb7ff62c9f92788a3c53a2a0607a7", "score": "0.60425985", "text": "updateCheckedEvents() {\n this.updateEventsContainer('checked');\n }", "title": "" }, { "docid": "cc7b313a0358d2d0849479ac6364b742", "score": "0.5999175", "text": "function clickFilterCheckbox(event) {\n event.preventDefault()\n event.stopPropagation()\n $(this).removeAttr(\"checked\")\n \n var enabled = $(this).hasClass(\"enabled\"), value = $(this).attr(\"value\")\n \n if( enabled ) {\n if (value == \"true\") {\n $(this).attr(\"value\", false)\n } else if (value == \"false\") {\n $(this).attr(\"value\", true).removeClass(\"enabled\")\n }\n } else {\n $(this).attr(\"value\", true).addClass(\"enabled\")\n }\n console.log($(this))\n \n updateLocationHashWithFilters()\n executeFilters()\n return false\n}", "title": "" }, { "docid": "707eb2398508d314807dfc75e1fdff1f", "score": "0.5993158", "text": "checkbox(label, value, x, y, w=32, h=32) {\n // Create hashed id from label\n let id = label.hashCode();\n// let id = new Error().stack;\n \n // Check whether the button should be 'hot' or 'active'\n if (this.regionHit(x, y, w, h)) {\n this.hotItem = id;\n if (this.activeItem == 0 && mouseIsPressed) {\n this.activeItem = id;\n value.val = !value.val;\n }\n }\n \n // Render button\n let x8 = x+w/6;\n let y8 = y+h/6;\n let w16 = w-w/3;\n let h16 = h-h/3;\n let xw = x8+w16;\n let yh = y8+h16;\n let strokeMult = map(((w > h) ? w : h), 32, 1000, 2, 20);\n \n push();\n rectMode(CORNER);\n stroke(this.style.col_checkOuterStroke);\n strokeWeight(this.style.checkStrokeWt);\n fill(this.style.col_checkOuterFill);\n rect(x, y, w, h, this.style.rounding);\n \n \n if (this.hotItem == id && !value.val) {\n // Button is 'hot' and 'false'\n fill(this.style.col_checkOuterFillHover);\n rect(x, y, w, h, this.style.rounding);\n }\n else if (this.hotItem == id && value.val) {\n // Button is 'hot' and 'true'\n push();\n stroke(this.style.col_checkInnerStrokeHover);\n strokeWeight(this.style.checkStrokeWt*strokeMult);\n line(x8, y8, xw, yh);\n line(xw, y8, x8, yh);\n pop();\n \n if (this.activeItem == id) {\n // Button is also 'active'\n fill(this.style.col_checkOuterFillActive);\n rect(x, y, w, h, this.style.rounding);\n \n push();\n stroke(this.style.col_checkInnerStrokeActive);\n strokeWeight(this.style.checkStrokeWt*strokeMult);\n line(x8, y8, xw, yh);\n line(xw, y8, x8, yh);\n pop();\n } \n }\n else if (value.val) {\n // Button is 'true' but not 'hot'\n push();\n stroke(this.style.col_checkInnerStroke);\n strokeWeight(this.style.checkStrokeWt*strokeMult);\n line(x8, y8, xw, yh);\n line(xw, y8, x8, yh);\n pop();\n }\n \n pop();\n \n // If button is 'hot' and 'active', but mouse button\n // is not down, the user must have clicked the button.\n if (mouseIsPressed && \n this.hotItem == id && \n this.activeItem == id) {\n return true;\n }\n \n // Otherwise, no clicky.\n return false;\n }", "title": "" }, { "docid": "29e927e512e447ff07efd5d081e554e3", "score": "0.5961963", "text": "changeScores(evt) {\n this.setState({ show_scores: evt.nativeEvent.srcElement.checked });\n }", "title": "" }, { "docid": "c4d077a72967b3493c44a5ff74882198", "score": "0.59567344", "text": "checkboxFilterSelection() {\n const housingTypeSelection = $('[name=\"housing_type\"]').map(() => [this.checked]);\n this.HousingTypeFilter.setFilter(\n housingTypeSelection[0], // Family\n housingTypeSelection[1], // Senior\n housingTypeSelection[2], // Student (Not Used {default: false})\n );\n\n const affordabilitySelection = $('[name=\"affordability\"]').map(() => [this.checked]);\n this.AffordabilityFilter.setFilter(\n affordabilitySelection[0], // Affordable\n affordabilitySelection[1], // Luxury\n affordabilitySelection[2], // Market Rate\n affordabilitySelection[3], // Market Rate & Affordable\n );\n\n // Draw the map with the updated filters\n this.drawMap();\n }", "title": "" }, { "docid": "05de548c48f47198fd0e1ac485466733", "score": "0.5944512", "text": "function changeConfiguration(e)\r\n\t\t{\r\n\t\t\tvar element = e.target;\r\n\r\n\t\t\tif (element.type == 'checkbox')\r\n\t\t\t{\r\n\t\t\t\tif (element.checked == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tGM_setValue(element.id, true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tGM_setValue(element.id, false);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tsetVariables();\r\n\t\t}", "title": "" }, { "docid": "0c7e1ce8357180f7aff875c43e85dc0f", "score": "0.593576", "text": "changeCrowns(evt) {\n this.setState({ show_crowns: evt.nativeEvent.srcElement.checked });\n }", "title": "" }, { "docid": "12b5cef7f872b7a6b014a1ab06b170f3", "score": "0.5923885", "text": "function enableSensorConfig(input, select) {\n input.attr('checked', 'checked').prop('checked',true);\n select.removeAttr('disabled');\n}", "title": "" }, { "docid": "8e922e5c94d07fa5ad86b04c16181c7d", "score": "0.59235317", "text": "function PopCheck(){\n if (popLayer.checked) {\n for (var i = 0; i< popRadio.length; i++){\n popRadio[i].disabled = false;\n }\n popRadio[0].checked = true;\n } else{\n for (var i = 0; i< popRadio.length; i++){\n popRadio[i].disabled = true;\n popRadio[i].checked = false;\n }\n }; \n}", "title": "" }, { "docid": "f5acefcf59d099b8ad492b0b34ad5aac", "score": "0.59202224", "text": "function changeConfiguration(e)\r\n {\r\n var element = e.target;\r\n\r\n if (element.type == 'checkbox')\r\n {\r\n if (element.checked == 1)\r\n {\r\n GM_setValue(element.id, true);\r\n }\r\n else\r\n {\r\n GM_setValue(element.id, false);\r\n }\r\n\r\n }\r\n setVariables();\r\n }", "title": "" }, { "docid": "d153a74a048e939206b9cbd6bfc8f514", "score": "0.5908648", "text": "function handleWallpaperCheckboxEvent() {\n paintWallpaper();\n}", "title": "" }, { "docid": "94aa7ba0cc910be2cd632aee335d75f3", "score": "0.5898728", "text": "function checkBoxChangeHandler(e)\r\n{\r\n\tdebugger;\r\n\tconsole.log(\"entering checkBoxChangeHandler\");\r\n\r\n\tif (e.target.checked)\r\n\t{\r\n\t\tconsole.log(e.target.id + \" is checked\");\r\n\t\tdocument.getElementById(e.target.id + \"Input\").disabled = false;\r\n\t\tdocument.getElementById(e.target.id + \"Input\").readOnly = false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tconsole.log(e.target.id + \" is unchecked\");\r\n\t\tdocument.getElementById(e.target.id + \"Input\").disabled = true;\r\n\t\tdocument.getElementById(e.target.id + \"Input\").readOnly = true;\r\n\t}\r\n}", "title": "" }, { "docid": "4b1f62dbdef10bd175d33849faedf665", "score": "0.589828", "text": "function satM(){\n\t\tif(id(\"satMathBox\").checked == false){\n\t\t\tid(\"satMathSlider\").disabled = false;\n\t\t} else { id(\"satMathSlider\").disabled = true; }\n\t}", "title": "" }, { "docid": "d60f8fb410770efcc53b41fdda97e7f0", "score": "0.5888022", "text": "check() {\n if (!this.isChecked()) {\n this.switch();\n this.updateCheckedEvents();\n }\n }", "title": "" }, { "docid": "9ef4748029bbd873747cfc4913cca219", "score": "0.584801", "text": "function disableSensorConfig(input, select) {\n input.removeAttr('checked').prop('checked',false);\n select.attr('disabled','disabled');\n}", "title": "" }, { "docid": "42a56475da86d66a0648c22c00a6b697", "score": "0.58423114", "text": "handleCheckboxChange(e) {\n\t\tvar currentchecked = this.state.checked;\n\t\tconsole.log(!currentchecked);\n\t\tthis.myRefs[this.state.popupActive].current.setOverride(!currentchecked);\n\t\tthis.setState({\n\t\t\tchecked: e.target.checked\n\t\t})\n\t}", "title": "" }, { "docid": "5d9a02727fdea8b893151d05fc712a22", "score": "0.58357036", "text": "function appreciateSwitchClicked(checkbox) {\n EventBridge.emitWebEvent(JSON.stringify({\n app: \"appreciate\",\n method: \"appreciateSwitchClicked\",\n appreciateEnabled: checkbox.checked\n }));\n document.getElementById(\"firstRun\").style.display = \"none\";\n}", "title": "" }, { "docid": "d1f5494d34da25d8ac6d6df40b78ef03", "score": "0.5828009", "text": "toggleCheckRow(e, rowData) {\n const { viewIndex } = rowData;\n const selectedRows = [...this.state.selectedRows];\n const { checked: flag } = selectedRows[viewIndex];\n selectedRows[viewIndex] = {\n ...selectedRows[viewIndex],\n checked: !flag\n };\n this.setState({ selectedRows });\n const picked = selectedRows.filter(({ checked }) => checked).map(({ value }) => value);\n this.props.onSelect(picked);\n }", "title": "" }, { "docid": "87af68edfb405e75795f4c82b7978aa4", "score": "0.58273244", "text": "function checkboxCheck(name, checkedPath) {\n document.getElementById(name).addEventListener('change', function () {\n if (this.checked) {\n Object.values(data).forEach(exercise => {\n if (exercise['involves'][checkedPath]) {\n document.querySelector(`label[for=\"${keys[exercise.id]}\"]`).style.textDecoration = 'line-through'\n document.getElementById(keys[exercise.id]).disabled = true\n document.getElementById(keys[exercise.id]).checked = false\n }\n })\n } else {\n Object.values(data).forEach(exercise => {\n if (exercise['involves'][checkedPath]) {\n document.querySelector(`label[for=\"${keys[exercise.id]}\"]`).style.textDecoration = 'none'\n document.getElementById(keys[exercise.id]).disabled = false\n }\n })\n }\n })\n }", "title": "" }, { "docid": "1b6632205c2bab2be874dd8d45990511", "score": "0.58243877", "text": "function toggleCheckbox(event) {\n\tanimateOnce();\n}", "title": "" }, { "docid": "95275a61b31e972de78058ce5f6c5ea0", "score": "0.5824067", "text": "function onClickCheckBox() {\r\n\r\n debugger;\r\n if ($(\"#userRole-3\").prop(\"checked\") == true) {\r\n\r\n $(\"#txtSchIndustrySegment\").prop(\"disabled\", false).addClass(\"fixed-label\");\r\n\r\n } else {\r\n $(\"#txtSchIndustrySegment\").prop(\"disabled\", true).addClass(\"fixed-label\");\r\n $(\"#txtSchIndustrySegment\").val(\"No Industry Segment\")\r\n }\r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "0e76a0cc155128ea2908f772b4a84bf8", "score": "0.58224654", "text": "function dauChkSws() {\n\nvar l = 0;\nvar h = 0;\n\n//alert(\" -- dauChkSws ! \") ;\n//search for the first selected band\n for (i = 0; i < iBands; i++) {\n frqElement = document.getElementById(bandArray[i].name);\n if (frqElement) {\n //--------------------------------\n // Obtain the min allowable range if new checked\n //--------------------------------\n if (frqElement.checked) {\n// Debug\n//alert(\" band \"+bandArray[i].name+\" is checked !\") ;\n//----------------------------------------\n// obtain the lowest range\n//----------------------------------------\n if (l == 0){\n l = bandArray[i].low ;\n } else { \n if ( l < bandArray[i].low ){\n l = bandArray[i].low ;\n }\n }\n//----------------------------------------\n// obtain the highest range\n//----------------------------------------\n if (h == 0){\n h = bandArray[i].high ;\n } else { \n if ( h > bandArray[i].high ){\n l = bandArray[i].high ;\n }\n }\n } \n\n\n }\n }\n \n//----------------------------------------\n// toggle only the allowable range\n//----------------------------------------\n if ((l >= 0) && ( h > 0)) {\n dauSwsToggle(l,h);\n } else {\n resetChkBox(); \n }\n \n\n}", "title": "" }, { "docid": "6eb5dea556cec994e2524b8e0a8b8263", "score": "0.5819888", "text": "function actionLCA(e) {\n if (e.target.id == \"t2e-le-2\") {\n if (document.getElementById(\"t2e-le-2\").checked) {\n document.getElementById(\"t2e-le-5\").checked = true;\n } else {\n document.getElementById(\"t2e-le-5\").checked = false;\n }\n } else if (e.target.id == \"t2e-le-4\") {\n if (document.getElementById(\"t2e-le-4\").checked) {\n document.getElementById(\"t2e-le-7\").checked = true;\n } else {\n document.getElementById(\"t2e-le-7\").checked = false;\n }\n } else if (e.target.id == \"t2e-le-7\") {\n if (document.getElementById(\"t2e-le-7\").checked) {\n document.getElementById(\"t2e-le-4\").checked = true;\n } else {\n document.getElementById(\"t2e-le-4\").checked = false;\n }\n } else if (e.target.id == \"t2e-le-5\") {\n if (document.getElementById(\"t2e-le-5\").checked) {\n document.getElementById(\"t2e-le-2\").checked = true;\n } else {\n document.getElementById(\"t2e-le-2\").checked = false;\n }\n } else {}\n}", "title": "" }, { "docid": "9f9df56d778dc494bc23731744fb8d2e", "score": "0.58187646", "text": "handleRasterLayer(e) {\n const checkBoxValue = e.target.value;\n if (this.state.rastersOnMap.includes(checkBoxValue)) {\n this.setState({rastersOnMap: this.state.rastersOnMap.filter(\n raster => raster !== checkBoxValue)});\n this.state.rasters[checkBoxValue].removeFrom(this.mapApi);\n } else {\n this.setState({rastersOnMap: [\n ...this.state.rastersOnMap, checkBoxValue]});\n this.state.rasters[checkBoxValue].addTo(this.mapApi);\n }\n }", "title": "" }, { "docid": "71ee1bd9024be2cf2f8862056902d548", "score": "0.58183724", "text": "function updateFeatureSettings() { \n labels = document.getElementsByTagName(\"label\");\n for (i = 0; i < labels.length; i++) {\n labels[i].addEventListener(\"click\", function() {\n var settings = document.getElementsByClassName(\"feature-setting\");\n\n for (j = 0; j < settings.length; j++) {\n var currentSetting = settings[j].firstChild;\n var feature = currentSetting.getAttribute(\"feature\");\n var featureChecked = document.getElementById(feature).checked;\n var settingDisabled = currentSetting.disabled;\n\n if (featureChecked && settingDisabled) {\n currentSetting.removeAttribute(\"disabled\");\n } else if (!featureChecked && !settingDisabled) {\n currentSetting.setAttribute(\"disabled\", \"\");\n }\n } \n });\n }\n}", "title": "" }, { "docid": "e6b13bfec8695878f88fbcfd99331815", "score": "0.5804707", "text": "function toggle_dragging(chk) {\n\tREDIPS.drag.enable_drag(chk.checked);\n}", "title": "" }, { "docid": "c70bb342f43a6ea69aaa81f4848f776a", "score": "0.58005124", "text": "mouseClick() {\n\t\tthis.checked = !this.checked;\n\t\tsuper.mouseClick();\n\t}", "title": "" }, { "docid": "70eefbee8a53b36ad8d82f32fe5fc277", "score": "0.57902104", "text": "function checkboxState(state) {\n console.log(state);\n for (var i=0; i < allCheckboxes.length - i; i++) {\n console.log(state);\n allCheckboxes[i].checked = state;\n allCheckboxes[i].disabled = state;\n \n }\n }", "title": "" }, { "docid": "322d547931a2bd470e5e96729fecb195", "score": "0.5787758", "text": "function addh(){\r\n if(this.checked){\r\n svg.selectAll(\".gridy\") \r\n .style(\"stroke\", \"#C7C7C7\")\r\n .style(\"opacity\", 1)\r\n svg.selectAll(\"text\") \r\n .style(\"stroke\", \"none\")\r\n }\r\n else{\r\n svg.selectAll(\".gridy\") \r\n .style(\"opacity\", 0)\r\n }\r\n }", "title": "" }, { "docid": "f8566ba177cdd5f2fb35e6f686e03cf1", "score": "0.57839894", "text": "function enable() {\n buttonCheckboxes.forEach(button => {\n button.removeAttribute(\"disabled\", \"false\");\n });\n buttonRanges.forEach(button => {\n button.removeAttribute(\"disabled\", \"false\");\n }); \n \n buttonCheckboxes.forEach( button => {\n button.onchange = relevant;\n }); \n buttonRanges.forEach( button => { \n button.onchange = relevant;\n }); \n}", "title": "" }, { "docid": "3acd2edef57b5ce5ab32d0fc67765882", "score": "0.5783032", "text": "function radioDown(radioButton) {\n\ttempRadioStatus = radioButton.checked;\n}", "title": "" }, { "docid": "e2a9362795d17549a7b9567354f9fd98", "score": "0.5763334", "text": "function _checkboxClick(e) {\n const item = this.id.split('-')[2];\n const icon = this.querySelector('i');\n\n if (icon.classList.contains('fa-check-square')) {\n icon.classList.remove('fa-check-square');\n icon.classList.add('fa-square');\n _storage.items[item].state = false;\n } else {\n icon.classList.remove('fa-square');\n icon.classList.add('fa-check-square');\n _storage.items[item].state = true;\n }\n _setValue({\n items: _storage.items\n });\n }", "title": "" }, { "docid": "4f7b2d4a90dd716594ce82526dbbdcf5", "score": "0.5759753", "text": "function on_check_atomic_orbits() {\n\n var show_atomic_orbits = document.getElementById(\"show_atomic_orbits\");\n\n show_atomic_orbits.onchange = function() {\n if(show_atomic_orbits.checked) {\n electron_ground_state_orbit_mesh.material.opacity = 1.0;\n electron_excited_state_orbit_mesh.material.opacity = 1.0;\n }\n else {\n electron_ground_state_orbit_mesh.material.opacity = 0.0;\n electron_excited_state_orbit_mesh.material.opacity = 0.0;\n }\n }\n}", "title": "" }, { "docid": "a528ce8e2954ab5b624b1a2fe172d13d", "score": "0.5759193", "text": "function tbArrayChange(n) {\n tbSelectArray[n] = !tbSelectArray[n];\n document.getElementById(\"tb\"+n).checked = tbSelectArray[n];\n if(n===2 && tbSelectArray[2]) { //checking handler unchecks endpoint,xover,strand\n\ttbSelectArray[3] = false;\n\tdocument.getElementById(\"tb3\").checked = false;\n\ttbSelectArray[4] = false;\n\tdocument.getElementById(\"tb4\").checked = false;\n\ttbSelectArray[5] = false;\n\tdocument.getElementById(\"tb5\").checked = false;\n }\n if(n===2 && !tbSelectArray[2]) { //cannot uncheck handler when none of endpoint,xover,strand is checked\n\ttbSelectArray[2] = true;\n\tdocument.getElementById(\"tb2\").checked = true;\n }\n if((n===3 && tbSelectArray[3])||(n===4 && tbSelectArray[4])||(n===5 && tbSelectArray[5])) { //checking endpoint,xover,strand unchecks handler\n\ttbSelectArray[2] = false;\n\tdocument.getElementById(\"tb2\").checked = false;\n }\n if((n===3||n===4||n===5) && (!tbSelectArray[3] && !tbSelectArray[4] && !tbSelectArray[5])) { //endpoint,xover,strand cannot be all unchecked\n\ttbSelectArray[n] = true;\n\tdocument.getElementById(\"tb\"+n).checked = true;\n }\n if((n===0||n===1) && (!tbSelectArray[0] && !tbSelectArray[1])) { //scaf and stap cannot be both unchecked\n\ttbSelectArray[n] = true;\n\tdocument.getElementById(\"tb\"+n).checked = true;\n }\n}", "title": "" }, { "docid": "2f9bce7ce775f7e64bd88a65bd0cdfe5", "score": "0.57587564", "text": "function changeValueCheckbox(element){\n if(element.checked){\n element.value='on';\n }else{\n element.value='off';\n }\n }", "title": "" }, { "docid": "a00134c85c000926206b6b7e956143fd", "score": "0.57509905", "text": "function activityCheck() {\n if(activityCheckbox[1].checked) { //BOX TWO Tuesday 9am-12pm,\n activityCheckbox[3].disabled = true; \n }\n else { \n activityCheckbox[3].disabled = false; \n }\n if(activityCheckbox[2].checked) { //BOX THREE Tuesday 1pm-4pm,\n activityCheckbox[4].disabled = true; \n }\n else { \n activityCheckbox[4].disabled = false; \n } \n if(activityCheckbox[3].checked) { //BOX FOUR Tuesday 9am-12pm,\n activityCheckbox[1].disabled = true; \n }\n else { \n activityCheckbox[1].disabled = false; \n }\n if(activityCheckbox[4].checked) { //BOX FIVE Tuesday 1pm-4pm,\n activityCheckbox[2].disabled = true; \n }\n else { \n activityCheckbox[2].disabled = false; \n } \n }", "title": "" }, { "docid": "d63ae238d86aa9882aea6323f0c835df", "score": "0.5749705", "text": "function changeConfetti(e) {\n setShowConfetti(e.currentTarget.checked)\n adjustAchievements(12);\n }", "title": "" }, { "docid": "d639c04b302b8fe94aad3eafb98d2b06", "score": "0.5740759", "text": "function handleCheckbox() { // Function that changes the 'isChecked' state based on the checkbox\n setIsChecked(prevState => !prevState);\n }", "title": "" }, { "docid": "5786d110024de9232f5bcf5b6e775c8b", "score": "0.5738379", "text": "function updateRadonVisibility(evt) {\n evt = evt || window.event;\n //get the layer index from the element id\n var lName = evt.target.id.split(\"_\");\n //If radio button is checked show Map layer\n if (dom.byId(evt.target.id).checked) {\n dynamicMapSerives[lName[1]].show();\n } else {\n dynamicMapSerives[lName[1]].hide();\n }\n }", "title": "" }, { "docid": "5786d110024de9232f5bcf5b6e775c8b", "score": "0.5738379", "text": "function updateRadonVisibility(evt) {\n evt = evt || window.event;\n //get the layer index from the element id\n var lName = evt.target.id.split(\"_\");\n //If radio button is checked show Map layer\n if (dom.byId(evt.target.id).checked) {\n dynamicMapSerives[lName[1]].show();\n } else {\n dynamicMapSerives[lName[1]].hide();\n }\n }", "title": "" }, { "docid": "5f66138399d96f084721156dd69a45f6", "score": "0.5728398", "text": "updateCheckbox(name, event) {\n this.props.updateValue(name, event.target.checked);\n }", "title": "" }, { "docid": "3ace62cca63e728bb26cbec1215e19ba", "score": "0.5726347", "text": "function addv(){\r\n if(this.checked){\r\n svg.selectAll(\".gridx\") \r\n .style(\"stroke\", \"#C7C7C7\")\r\n .style(\"opacity\", 1)\r\n svg.selectAll(\"text\") \r\n .style(\"stroke\", \"none\")\r\n }\r\n else{\r\n svg.selectAll(\".gridx\") \r\n .style(\"opacity\", 0)\r\n }\r\n }", "title": "" }, { "docid": "51f9561885e730f530cfb6f2d5b5c69d", "score": "0.5723745", "text": "function toggleCheckBox(){\n checkBox = !checkBox;\n}", "title": "" }, { "docid": "32556f1c4d16c508a28aeb3bed91b4d9", "score": "0.57134205", "text": "onEnabled() {}", "title": "" }, { "docid": "70c777efb8120d156aacb57df1973505", "score": "0.5709524", "text": "function setDISABLED()\n{\n\tDISstatus = document.getElementById('dis').checked;\n\t//alert (\"filter status:\" + status);\n\tif (DISstatus==true)\n\t{\n\n\t\t alert (\"Show Disabled Monitors filter will be applied at next refresh\");\n\t\t\n\t\t//alert (\"filter on\");\n\t}\n\telse\n\t{\n\n\t\t //document.getElementById(\"dis\").checked=false;\n\t\t\n\t\talert (\"Show Disabled Monitor filter will be removed at next refresh\");\n\t}\n} // end function setRBE", "title": "" }, { "docid": "b0ff95c5b1f808e0576ad701d31ae1a0", "score": "0.57071257", "text": "function onCheckboxClicked(trackerIndex, starIndex) {\n weeklyTaskTracker[trackerIndex].checkboxesInTracker[starIndex].checked = !weeklyTaskTracker[trackerIndex].checkboxesInTracker[starIndex].checked;\n updateLocalStorageForWeeklyTaskTracker();\n showWeeklyTaskTracker();\n}", "title": "" }, { "docid": "b9322ef953f27b554dc1c73b4567dbb4", "score": "0.57018214", "text": "function changeCalibrationStatus(){\n\t\n\tif(document.getElementById(\"calibrationBox\").checked)\n\t\tcalibrating = true;\n\telse\n\t\tcalibrating = false;\n}", "title": "" }, { "docid": "64f9067d7cb28d46f8b0ec957217f8b5", "score": "0.56955564", "text": "function showHideWeightGroup (check, group) {\r\n if ($(check).is(':checked')) {\r\n $('#content-input-weight-group-' + group ).find(' :input').prop('disabled', false);\r\n $('#content-input-weight-group-' + group +' #group_weight_' + group ).addClass('new-scenario-weight'); \r\n $('#content-input-weight-group-' + group ).show('slow');\r\n updateIndicatorWeight();\r\n } else {\r\n //$('#content-input-weight-group-' + group +' #group_weight_' + group ).val(0);\r\n $('#content-input-weight-group-' + group ).find(' :input').prop('disabled', true);\r\n $('#content-input-weight-group-' + group +' #group_weight_' + group ).removeClass('new-scenario-weight'); \r\n $('#content-input-weight-group-' + group ).hide('slow');\r\n updateIndicatorWeight();\r\n } \r\n}", "title": "" }, { "docid": "f104246debfa66e299ce29bd1e85ccd9", "score": "0.56932026", "text": "changeAreas(evt) {\n this.setState({ show_areas: evt.nativeEvent.srcElement.checked });\n }", "title": "" }, { "docid": "8482fb74c0d4bc503e8092f1d8032be3", "score": "0.5683779", "text": "function lightRailToggleHandler() {\r\n // when the toggle is switched execute if statement\r\n $(\"#lrCheck\").click(function() {\r\n // data toggle is turned on\r\n if (document.getElementById(\"lrCheck\").checked) {\r\n // default upon toggling data to \"on\" is that there is no filtering\r\n // all checkboxes will be checked\r\n $(\"#bCheck\").prop('checked', true).change();\r\n $(\"#cCheck\").prop('checked', true).change();\r\n $(\"#dCheck\").prop('checked', true).change();\r\n $(\"#eCheck\").prop('checked', true).change();\r\n $(\"#mCheck\").prop('checked', true).change();\r\n // make sure checkboxes are enabled for filtering\r\n $(\"#bCheck\").prop('disabled', false).change();\r\n $(\"#cCheck\").prop('disabled', false).change();\r\n $(\"#dCheck\").prop('disabled', false).change();\r\n $(\"#eCheck\").prop('disabled', false).change();\r\n $(\"#mCheck\").prop('disabled', false).change();\r\n // change color of filter icon to OPMI Teal\r\n $(\"#lrFilterIcon\").css('color','#1fa898');\r\n // data toggle is turned off\r\n } else {\r\n // turn off all checkboxes\r\n $(\"#bCheck\").prop('checked', false).change();\r\n $(\"#cCheck\").prop('checked', false).change();\r\n $(\"#dCheck\").prop('checked', false).change();\r\n $(\"#eCheck\").prop('checked', false).change();\r\n $(\"#mCheck\").prop('checked', false).change();\r\n // disable all checkboxes\r\n // safeguards user from applying a filter to data that is not included\r\n $(\"#bCheck\").prop('disabled', true).change();\r\n $(\"#cCheck\").prop('disabled', true).change();\r\n $(\"#dCheck\").prop('disabled', true).change();\r\n $(\"#eCheck\").prop('disabled', true).change();\r\n $(\"#mCheck\").prop('disabled', true).change();\r\n // change color of filter icon to grey\r\n $(\"#lrFilterIcon\").css('color','#d3d3d3');\r\n }\r\n });\r\n}", "title": "" }, { "docid": "59bd502504b23239261f71c05bd01cea", "score": "0.56737983", "text": "function updateValue(e) {\n var elm = e.srcElement; // the elements which was clicked.\n if (elm.getAttribute('type') == 'checkbox') {\n settings.set(elm.id, elm.checked);\n } else {\n settings.set(elm.id, elm.value);\n }\n\n spinGlobe();\n}", "title": "" }, { "docid": "71e1d185f0cf76c21264463bd73d559f", "score": "0.566239", "text": "function checkBtn(i) {\n radio[i].checked = true\n }", "title": "" }, { "docid": "f468b0bc77b7334d67277a21dc0cec4f", "score": "0.5660212", "text": "checkboxUpdate (e){\n e.preventDefault();\n let dataval = this.state.data;\n dataval['has_maps'] = !this.state.has_maps;\n this.setState({data:dataval, has_maps:!this.state.has_maps});\n }", "title": "" }, { "docid": "30230c206b1887303f245293b314db21", "score": "0.56476355", "text": "setCheckboxState(aElementIds, bCheckedState) {\n aElementIds.forEach((sElementId) => {\n const oElementEntry = this.mDimensions.get(sElementId) || this.mRatings.get(sElementId);\n const oElement = oElementEntry.value_checkbox || oElementEntry.star_checkbox;\n if (oElement) {\n oElement.prop('checked', bCheckedState);\n }\n })\n }", "title": "" }, { "docid": "651ea31e131c660702fb304e0aadb057", "score": "0.5635944", "text": "_onAllEventsToggled() {\n this._$eventCheckboxes.not(this._$allEventsCheckbox).prop(\n 'disabled', this._$allEventsCheckbox[0].checked);\n }", "title": "" }, { "docid": "068a63c6163cbb91dc1b1d5b374fe799", "score": "0.56358224", "text": "function arradioButton(xarg,yarg,widtharg,heightarg)\n{\n\tibiCompound.setFilterFunctions(this);\n this.x=xarg;\n this.y=yarg;\n this.width=widtharg;\n this.height=heightarg;\n this.id = null;\n this.active = false;\n this.values = [];\n this.defaultValues = null;\n this.filterOnload = false;\n this.visible = true;\n this.dataColumn = null;\n this.dataProvider = null;\n this.dataReport = null;\n this.multiselect = false;\n this.filterCondition = 0;\n this.filterTarget = null;\n this.filterParent = null;\n this.children = [];\n this.divName = '';\n this.showAll = false;\n this.color = null;\n this.font = null;\n this.backcolor = null;\n this.size = null;\n this.orgX = -1;\n this.orgY = -1;\n this.Mx = -1;\n this.My = -1;\n this.objs = null;\n this.filterOnloadRan = false;\n this.type = \"radiobutton\";\n this.isScrolling = false;\n\n\n this.buildComponent = function() {\n var formstr= '<form id=\"'+this.type+this.id+'\" style=\"margin:0px\"><div '+\n ' style=\"position:relative;top:0px;left:0px;\" id=\"'+this.type+'_d'+this.id+'\"><\\/div><\\/form>';\n\t\treturn this.c_buildComponent(formstr);\n };\n\n this.outputValueHtmlBegin = function(){\n this.line = '';\n this.line += '<table style=\"border:hidden;\">';\n };\n\n this.outputValueHtmlBody = function(i){\n var isIn;\n var isChecked='';\n isChecked = '';\n if(this.values != null)\n isIn = inarray(this.values, this.dataProvider[3][i],null,this.clen);\n else\n isIn = false;\n if (isIn) {\n isChecked = 'checked=\"checked\"';\n }\n this.line += '<tr><td style=\"width:10px;\">';\n this.line += '<div style=\"width:20px;overflow:hidden\">';\n this.line += '<input '+isChecked+' type=\"radio\" onclick=\"ibiCompound.drawObjectsPtr[\\''+this.id+'\\'].updateValues(this);ibiCompound.drawObjectsPtr[\\''+this.id+'\\'].doFilter()\" id=\"'+this.type+this.id+'_'+i+'\" name=\"value\" value=\"'+this.dataProvider[3][i]+'\"\\/>';\n this.line += '<\\/div>';\n this.line += '<\\/td><td width=\"*\">';\n this.line += '<label style=\"';\n if(this.font) this.line += 'font-family:'+this.font+';';\n if(this.color) this.line += 'color:'+this.color+';';\n if(this.size) this.line += 'font-size:'+this.size+'pt;';\n this.line += '\" for=\"'+this.type+this.id+'_'+i+'\">'+this.dataProvider[1][i]+'<\\/label>';\n this.line += '<\\/td><\\/tr>';\n };\n\n this.outputValueHtmlEnd = function(){\n this.line += '<\\/table>';\n this.objs.innerHTML = this.line;\n };\n\n this.updateValues = function(item) {\n this.values = [];\n this.allSelected = false;\n var strUnderCover = (this.filter_datatype == \"IBISTR\" || this.filter_datatype == \"IBIDATE\"); // p167472: raw dates are now strings...\n var objValue;\n\n if(item && item.checked) {\n objValue = item.value;\n \n if(!strUnderCover && objValue !== ibiMsgStr['all']) {\n objValue *= 1; \n }\n\n this.values[this.values.length] = objValue;\n\n if(objValue === ibiMsgStr['all']) {\n this.active = false;\n this.allSelected = true;\n }\n }\n\t\tthis.setInternalTitle();\n };\n\n this.refresh = function(async) {\n var i;\n var isIn;\n var isChecked='';\n if(this.objs == null) {\n this.objs = document.getElementById(this.type+\"_d\"+this.id);\n if(this.objs == null) return;\n if('addEventListener' in this.objs) \n if('ontouchstart' in this.objs) {\n this.objs.addEventListener(\"touchstart\",ibiCompound.drawObjectsPtr[this.id].startDiv,false);\n this.objs.addEventListener(\"touchmove\",ibiCompound.drawObjectsPtr[this.id].moveDiv,false);\n //this.objs.addEventListener(\"touchend\",ibiCompound.drawObjectsPtr[this.id].stopDiv,false);\n }\n \n }\n if(this.objs) {\n this.mytable = this.getTable(this.dataReport);\n if(this.mytable) {\n\t\t\t\tif((this.dataProvider==null) || (!this.reloadData)) {\n this.processDataProvider(async);\n\t\t\t\t} else {\n\t\t\t\t\tthis.processDataProvider2();\n\t\t\t\t\tthis.reloadData = false;\n\t\t\t\t}\n\n }\n }\n };\n}", "title": "" }, { "docid": "5835f9e47489d3662ffb96464ea321df", "score": "0.5630373", "text": "function activer_checkbox()\n{\n /*$('input:checkbox').iCheck({\n checkboxClass: 'icheckbox_square-green',\n }).on('ifClicked', function(ev){\n $(this).parent().click();\n });*/\n\n $('input:radio').iCheck({\n radioClass: 'iradio_square-green',\n });\n}", "title": "" }, { "docid": "983edfc237b90d8f89ad1ef385f72593", "score": "0.5623965", "text": "toggle() {\n this.checked = !this.checked;\n }", "title": "" }, { "docid": "983edfc237b90d8f89ad1ef385f72593", "score": "0.5623965", "text": "toggle() {\n this.checked = !this.checked;\n }", "title": "" }, { "docid": "939ee87eb1da41df2373125b8a10fc34", "score": "0.5619303", "text": "function checkChange(e) {\n var target = e.target,\n value = target.getAttribute(target.checked ? cOnValue : cOffValue);\n\n fieldChange(e, value);\n }", "title": "" }, { "docid": "87facb0a71ec2d0320c9e32b6b5d547d", "score": "0.5612003", "text": "renderedCallback() {\n let checkboxes = this.template.querySelector('[data-id=\"checkbox\"]');\n if(this.value === 'true'){\n checkboxes.checked = true;\n }else{\n checkboxes.checked = false;\n }\n }", "title": "" }, { "docid": "f4653044c44a212267e1c703cf065858", "score": "0.5611736", "text": "static enableBlackAndWhite() {\n $('#black-and-white-checkbox-container').tooltip({\n title: 'This option is only available if the chart uses 3 or less colors.'\n });\n }", "title": "" }, { "docid": "ebb1f3601c8b86563db3b6f098377b61", "score": "0.560224", "text": "setUseVitalWheatGluten(on) {\n this.sourdough.setuUseVitalWheatGluten(on);\n this.inputFields.addlFlour.value = this.sourdough.addlFlour;\n this.inputFields.mainFlour.value = this.sourdough.mainFlour;\n if (this.sourdough.useVitalWheatGluten !== true) {\n this.btnUseVitalWheatGluten.removeAttribute('checked');\n this.vwgRow.setAttribute('hidden', 'hidden');\n } else {\n this.btnUseVitalWheatGluten.setAttribute('checked', 'checked');\n this.vwgRow.removeAttribute('hidden');\n }\n\n\n this.doCalculations();\n }", "title": "" }, { "docid": "a38dd11d14f280cc42d8597ab0fa3caf", "score": "0.5599991", "text": "function activateDivCheckBox(){\n var liInputs = $(\"#cu-ak-checkbox-pannel > li\");\n liInputs.unbind(\"click touchend\",reactToDivCheckbox).bind(\"click touchend\",reactToDivCheckbox);\n\n function reactToDivCheckbox(ev){\n var target = ev.currentTarget;\n var isActive = $(target).hasClass(\"active\");\n var idFirstSegment = $(target).attr(\"id\").split(\"-\")[0];\n var inputValue = \"0\";\n var isRadio = $(target).hasClass(\"radio-apk\");\n\n $(target).parent().find(\"li.radio-apk\").removeClass(\"active\");\n $(target).parent().find(\"li.radio-apk input\").attr(\"value\",\"0\")\n\n if(isActive){\n inputValue = \"0\";\n $(target).removeClass(\"active\");\n }else{\n inputValue = \"1\";\n $(target).addClass(\"active\");\n }\n\n $(\"#\" + idFirstSegment + \"-input\").attr(\"value\",inputValue);\n }\n}", "title": "" }, { "docid": "ae8f9da3d6c4a3bc1597e7bef8d205b9", "score": "0.5599975", "text": "function chkDependantLogic(evt){\r\n\t\tvar chkMasterState=evt.target.checked;\r\n\t\tvar chkSlave=$x1(\"following-sibling::input[@type='checkbox']\",evt.target);\r\n\t\tif(!chkSlave)return;\r\n\t\tif(chkMasterState===false)chkSlave.checked=false;\r\n\t\tchkSlave.disabled=!chkMasterState;\r\n\t}", "title": "" }, { "docid": "4edf50864651afdbf61b16a23674b4d5", "score": "0.559669", "text": "function crossSectionCheckOff() {\n crossSection_check.checked = false;\n}", "title": "" }, { "docid": "7f636bede083488eecd0ec5587560721", "score": "0.5592564", "text": "function actionVCA(e) {\n if (e.target.id == \"t2e-vo-2\") {\n if (document.getElementById(\"t2e-vo-2\").checked) {\n document.getElementById(\"t2e-vo-3\").checked = true;\n document.getElementById(\"t2e-vo-5\").checked = true;\n } else {\n document.getElementById(\"t2e-vo-3\").checked = false;\n document.getElementById(\"t2e-vo-5\").checked = false;\n }\n } else if (e.target.id == \"t2e-vo-3\") {\n if (document.getElementById(\"t2e-vo-3\").checked) {\n document.getElementById(\"t2e-vo-2\").checked = true;\n document.getElementById(\"t2e-vo-5\").checked = true;\n } else {\n document.getElementById(\"t2e-vo-2\").checked = false;\n document.getElementById(\"t2e-vo-5\").checked = false;\n }\n } else if (e.target.id == \"t2e-vo-4\") {\n if (document.getElementById(\"t2e-vo-4\").checked) {\n document.getElementById(\"t2e-vo-6\").checked = true;\n document.getElementById(\"t2e-vo-7\").checked = true;\n } else {\n document.getElementById(\"t2e-vo-6\").checked = false;\n document.getElementById(\"t2e-vo-7\").checked = false;\n }\n } else if (e.target.id == \"t2e-vo-5\") {\n if (document.getElementById(\"t2e-vo-5\").checked) {\n document.getElementById(\"t2e-vo-3\").checked = true;\n document.getElementById(\"t2e-vo-2\").checked = true;\n } else {\n document.getElementById(\"t2e-vo-3\").checked = false;\n document.getElementById(\"t2e-vo-2\").checked = false;\n }\n } else if (e.target.id == \"t2e-vo-6\") {\n if (document.getElementById(\"t2e-vo-6\").checked) {\n document.getElementById(\"t2e-vo-4\").checked = true;\n document.getElementById(\"t2e-vo-7\").checked = true;\n } else {\n document.getElementById(\"t2e-vo-4\").checked = false;\n document.getElementById(\"t2e-vo-7\").checked = false;\n }\n } else if (e.target.id == \"t2e-vo-7\") {\n if (document.getElementById(\"t2e-vo-7\").checked) {\n document.getElementById(\"t2e-vo-6\").checked = true;\n document.getElementById(\"t2e-vo-4\").checked = true;\n } else {\n document.getElementById(\"t2e-vo-6\").checked = false;\n document.getElementById(\"t2e-vo-4\").checked = false;\n }\n } else {}\n}", "title": "" }, { "docid": "b8c54a401c9b2d58fa3bbe37129cfffc", "score": "0.55924565", "text": "function ToxicEmiRadio(){\n if (document.getElementById('ToxicEmi').checked) {\n for (var i = 0; i< toxicRadio.length; i++){\n toxicRadio[i].disabled = false;\n } \n toxicRadio[0].checked = true; \n }\n}", "title": "" }, { "docid": "c5bbf2b083892c06bbfdc1bf5e20d584", "score": "0.55914444", "text": "function checkBoxes() {\n zgoda1.checked = this.checked; //atrybut do sprawdzenia dla input type checkbox\n // console.log(zgoda1.checked);\n zgoda2.checked = this.checked;\n\n zgoda1.disabled = this.checked;\n zgoda2.disabled = this.checked;\n // console.log(this.checked);\n}", "title": "" }, { "docid": "eab11caae9ef58a7fd8cf139717999da", "score": "0.55903727", "text": "function maptoggle(e) {\n // read the value from the slider\n var value = slider.value;\n\n var mapId = \"PERCENT OVER \" + value + \" MIN\";\n\n map.setLayoutProperty('PERCENT OVER 30 MIN', 'visibility', 'none');\n map.setLayoutProperty('PERCENT OVER 60 MIN', 'visibility', 'none');\n map.setLayoutProperty('PERCENT OVER 90 MIN', 'visibility', 'none');\n map.setLayoutProperty('PERCENT OVER 120 MIN', 'visibility', 'none');\n\n map.setLayoutProperty(mapId, 'visibility', 'visible');\n}", "title": "" }, { "docid": "bfa119d907c894855413a79cee9851ff", "score": "0.5589108", "text": "function enable_recovered() {\n if (this.checked) {\n $(\"input#recovered\").removeAttr(\"disabled\");\n } else {\n $(\"input#recovered\").attr(\"disabled\", true);\n }\n }", "title": "" }, { "docid": "35cc5eb18689e2086d7c6bccbb891d07", "score": "0.55889523", "text": "handleCheckboxChange(e, name) {\n this.setState({\n hasData: false\n })\n\n if (name === \"location\") {\n this.setState({\n disableLocation: false,\n disableParent: true,\n parent_organization: '' // widgetId and state name\n })\n }\n else if (name === \"parent\") {\n this.setState({\n disableLocation: true,\n disableParent: false,\n location_name: '' // widgetId and state name\n })\n }\n else {\n this.setState({\n includeVoided: e.target.checked\n });\n }\n }", "title": "" }, { "docid": "eff5fc334e62145c844a8a0702c3ad1a", "score": "0.55855405", "text": "toggleValue() {\n this.setValue(!this.hasClass('checked'));\n this.refreshDataSource();\n this.updated = true;\n\n if (fw.isFunction(this.onChange)) {\n this.onChange();\n }\n }", "title": "" }, { "docid": "affac0261497dc8e1ddbff46d3f373a5", "score": "0.5584736", "text": "function pieOption1Selected() {\r\n enablePieOption1Controls();\r\n}", "title": "" }, { "docid": "75ccc1aa917ab42c2f9c2ecc555e5589", "score": "0.5580486", "text": "uncheck() {\n if (this.isChecked()) {\n this.switch();\n this.updateUncheckedEvents();\n }\n }", "title": "" }, { "docid": "f1e698810a7317b0a7d5090da6710133", "score": "0.55737513", "text": "function checkBoxOver(){\n if (_check === false){\n\n _content.tween({\n border:'2px solid #f9971c'\n }, 0.25, Config.EASING.inout);\n }\n }", "title": "" } ]
bff4d790ab0ba172613fc931a285de78
let restArray: number[] = [32, 2, 234, 19222, 53.9, 123]; a)
[ { "docid": "326def1e312e74cf3cd8379ecd87c803", "score": "0.0", "text": "function backwards(_forwardsArray) {\n let backwardsArray = [];\n for (let i = _forwardsArray.length - 1; i >= 0; i--) {\n backwardsArray.push(_forwardsArray[i]);\n }\n return backwardsArray;\n }", "title": "" } ]
[ { "docid": "090f6305b5f45e415c4772747c6c63cf", "score": "0.69790417", "text": "function rest(array) {\n return array.slice(1);\n}", "title": "" }, { "docid": "c151abc8cfb8784b7b83a3b2d2906370", "score": "0.6905391", "text": "static rest(arr) {\n return arr.slice(1);\n }", "title": "" }, { "docid": "038824b2a64536a1d3697ad6735726e7", "score": "0.66084456", "text": "function rest (array){\n array.shift();\n return array;\n}", "title": "" }, { "docid": "d5b736e9ed678c3baf1fd15c1acd5193", "score": "0.6432132", "text": "function arrayToList(array) {\n // Your code here\n var theList = null;\n for(var i = array.length-1; i>=0; i--){\n var list={\n value: array[i],\n rest: theList\n }\n theList = list;\n }\n return theList;\n}", "title": "" }, { "docid": "01c2eaee92365a296904931fd45a56b0", "score": "0.6357511", "text": "function arrayToList(array) {\nvar list = null;\n for(var i = array.length - 1; i >= 0; i--){\n list = {value: array[i], rest: list};\n }\n return list;\n}", "title": "" }, { "docid": "f4ea37ed82fe6a0baf75b2136eb34dc4", "score": "0.62843597", "text": "function copyme(arr){\n var newarr = [];\n for(var i =0;i<arr.length;i++){\n if(typeof arr[i] == \"number\"){\n newarr.push(arr[i]);\n }\n }\n // console.log(newarr)\n return newarr\n}", "title": "" }, { "docid": "590e64759a917637a91556718ea047b3", "score": "0.6257222", "text": "function arrayToList(array) {\nvar list = null;\n//loop through the array\nfor (var i = array.length-1; i >= 0; i--) {\n //create a list from array\n list = {value: array[i], rest: list};\n}\n//return new list\nreturn list;\n}", "title": "" }, { "docid": "19d68380aac7f10b7127df3c24074f24", "score": "0.62304926", "text": "function arrayToList(array) {\n var list = null;\n for (var i = array.length - 1; i >= 0; i--)\n list = {value: array[i], rest:list};\n return list;\n // Your code here\n}", "title": "" }, { "docid": "34a23ef203b60370a198a24938e465d3", "score": "0.61998355", "text": "function rest(array, n, guard) {\n return _setup.slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "cffa6647f749fa9986d00344ddaf9eeb", "score": "0.6199299", "text": "function arrayToList(array) {\n // Your code here\n var list = undefined;\n for(var i = array.length-1; i >=0; i--) {\n list = {value: array[i], rest: list};\n }\n return list;\n}", "title": "" }, { "docid": "bc5f75f071f51274c72e8ffbdefaf314", "score": "0.61606294", "text": "arrayToList(array) {\n\t\tlet list = null;\n\t\tfor (let i = array.length - 1; i >= 0; i--) {\n\t\t\tlist = { value: array[i], rest: list };\n\t\t}\n\t\treturn list;\n\t}", "title": "" }, { "docid": "bf33d68863df12e219c0a29b495494d3", "score": "0.6159569", "text": "function rest(array, n, guard) {\n return _setup_js__WEBPACK_IMPORTED_MODULE_0__.slice.call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "bf33d68863df12e219c0a29b495494d3", "score": "0.6159569", "text": "function rest(array, n, guard) {\n return _setup_js__WEBPACK_IMPORTED_MODULE_0__.slice.call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "3dd8c82497b7f0e425a8b0b2aeaeea30", "score": "0.61556953", "text": "function numberArray(a,b) {\n b = [];\n while (a--) {\n b[a] = a;\n }\n return b;\n }", "title": "" }, { "docid": "3a16b40606c19a75329f6b0b06a2428d", "score": "0.61425066", "text": "function arrayToList(...arr){\n\tlet list = null;\n\tfor (let i = arr.length -1; i >= 0; i--){\n\t\tlist = {\n\t\t\tvalue: arr[i], \n\t\t\trest: list\n\t\t};\n\t}\n\tconsole.log(list);\n}", "title": "" }, { "docid": "f687057338b69a10e6eacea5b1f11e85", "score": "0.61324835", "text": "function arrayToList(array) {\n var list = {\n value: 0,\n rest: null\n };\n\n if(array.length == 1){\n list.value = array[0];\n return list\n } else {\n list.value = array[0];\n list.rest = arrayToList(array.slice(1));\n return list;\n }\n}", "title": "" }, { "docid": "96b6c60f1f283f09aec9ce57b3067fac", "score": "0.61081845", "text": "function rest(array, n, guard) {\n return _setup_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "96b6c60f1f283f09aec9ce57b3067fac", "score": "0.61081845", "text": "function rest(array, n, guard) {\n return _setup_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "96b6c60f1f283f09aec9ce57b3067fac", "score": "0.61081845", "text": "function rest(array, n, guard) {\n return _setup_js__WEBPACK_IMPORTED_MODULE_0__[\"slice\"].call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "29f999628c076098445b5d6b0965c314", "score": "0.61069953", "text": "function calc_array() {\n\tvar arr = [1,2,3] // til 100,000 \n // .... oprtation\n}", "title": "" }, { "docid": "a6719277193191f891a26766e42a9f28", "score": "0.60949814", "text": "function pushNumberToArray(val, array) {\n if (typeof val !== \"number\"){\n array.push(parseFloat(val));\n }\n}", "title": "" }, { "docid": "e749dde821a0db3527f27984cd600b41", "score": "0.6089048", "text": "function promediar_array(array){\n\tres = new Array()\n\tfor (var i = 0 ; i < 72; i++) {\n\t\tres[i] = Number(((array[0][i] + array[1][i] + array[2][i] + array[3][i])/4.0).toFixed(4))\n\t}\n\treturn res\n}", "title": "" }, { "docid": "ef03d9438e2d06443a1f19c18c08cbf6", "score": "0.6079745", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "ef03d9438e2d06443a1f19c18c08cbf6", "score": "0.6079745", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "ef03d9438e2d06443a1f19c18c08cbf6", "score": "0.6079745", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "ef03d9438e2d06443a1f19c18c08cbf6", "score": "0.6079745", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "ef03d9438e2d06443a1f19c18c08cbf6", "score": "0.6079745", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "ef03d9438e2d06443a1f19c18c08cbf6", "score": "0.6079745", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "ef03d9438e2d06443a1f19c18c08cbf6", "score": "0.6079745", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n }", "title": "" }, { "docid": "56e931c341902cb881aec56380808986", "score": "0.60585886", "text": "function arrayToList(arr) {\n let list = null;\n for(let i = arr.length - 1; i >= 0; i --) {\n list = {value: arr[i], rest: list};\n } return list;\n}", "title": "" }, { "docid": "9ae7f770d03dede0b2e72689bcfa10c5", "score": "0.6058568", "text": "function rest_rest(array, n, guard) {\n return _setup[\"q\" /* slice */].call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "9ae7f770d03dede0b2e72689bcfa10c5", "score": "0.6058568", "text": "function rest_rest(array, n, guard) {\n return _setup[\"q\" /* slice */].call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "41241d96278b20a201a73187c254a290", "score": "0.6028018", "text": "function addArrayElements(array){\n \n return sum; // number\n}", "title": "" }, { "docid": "c2792d79f16873e8e15f6f22203e56b4", "score": "0.6012903", "text": "function doubleNumbers(array) {\n var newArray = [];\n for (i = 0; i < array.length; i++) {\n newArray[i] = array[i] * 2;\n\n }\n return newArray;\n}", "title": "" }, { "docid": "7c921ac76dcb628618fc751c368ef862", "score": "0.5996192", "text": "function test() {\n return [5,7,2,4]\n}", "title": "" }, { "docid": "91fbfaa4cd64dad5e70d664d83c44d3b", "score": "0.59950423", "text": "function exports(arr,size){var ret=[];size=size||1;for(var i=0,len=Math.ceil(arr.length/size);i<len;i++){var start=i*size,end=start+size;ret.push(arr.slice(start,end));}return ret;}", "title": "" }, { "docid": "6d4970f7afb19a67902c65d0246e5831", "score": "0.59608805", "text": "function sumRestArray(...args){\n return args.reduce((a,b) => a + b);\n}", "title": "" }, { "docid": "7ea019f8201c21c21d9fbc100ce177ea", "score": "0.59570456", "text": "function arrayToList2(array) {\n let list = null;\n for (let i = array.length - 1; i >= 0; i--) {\n list = { value: array[i], rest: list };\n }\n return list;\n}", "title": "" }, { "docid": "7e9ccc3e1026238131c432bf7e8a5bec", "score": "0.59499377", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "7e9ccc3e1026238131c432bf7e8a5bec", "score": "0.59499377", "text": "function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}", "title": "" }, { "docid": "6895b58ec6a411de8c8e1ce8d2d3cd7e", "score": "0.59463716", "text": "function arrayToList(array) {\n\n let list = null;\n for (var i = array.length; i >= 0; i--) {\n if (array[i]) {\n list = {value: array[i], rest: list};\n }\n } \n return list; \n }", "title": "" }, { "docid": "174ed2b39a6e0b162606f81470d21eed", "score": "0.59413505", "text": "function arrayToList(array) {\n var list = null;\n for(var i = array.length - 1; i>= 0; i--)\n list = {value: array[i], rest: list};\n return list;\n}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "07861ba22592ba1dc7f6637e9d10851a", "score": "0.59407735", "text": "function toArray(list,start){start=start||0;var i=list.length-start;var ret=new Array(i);while(i--){ret[i]=list[i+start];}return ret;}", "title": "" }, { "docid": "4f9ed23a5d4941b01317ce47ce0b2819", "score": "0.59316224", "text": "function numbersOnly(arr){\n var newArray = []; //declare a new array to dump numbers into\n for (var x = 0; x < arr.length; x++) { //iterate through our original array\n {\n if (typeof arr[x] === \"number\") { //check if each index is a number\n newArray.push(arr[x]); //if it is, push it into the new array\n }\n }\n }\n console.log(\"Original array: \"+arr); //show me the original array\n console.log(\"New array: \"+newArray); //show me the new array\n}", "title": "" }, { "docid": "704b5032e885af65f80993144e915a1f", "score": "0.59281135", "text": "function arrToList(arr){\n let list = null;\n for(let i = arr.length -1; i >= 0; i--){\n list = {\n value: arr[i], // First loop will produce value: 30\n rest: list // First loop will produce rest: null\n };\n }\n return list;\n}", "title": "" }, { "docid": "cb7c9cf1d71bab2ee3a9ce264af92012", "score": "0.5908708", "text": "function sumNumberArray(){\n \n}", "title": "" }, { "docid": "f54cd83fc814efb7be6a2dd4c8701dc6", "score": "0.5908525", "text": "function arrayToList(array) {\n var list = {value : array[array.length-1], rest: null }\n\tfor (var i = array.length-2; i >=0; i--) {\n list = {value : array[i], rest: list };\n } \n\treturn list;\n}", "title": "" }, { "docid": "93c55c4f6eee3090e23ba50ead9d31d6", "score": "0.58837855", "text": "function joinElements (array) {\n var result = []; \n for (var i = 0; i < array.length; i++) {\n var num = parseFloat (array[i]); //parseFloat filtrira samo brojeve a sve ostalo je NaN num = [1, 21, NaN, 42, 1000, Infinity ]\n if (isFinite(num)) { \n result[result.length] = num; \n }\n } return result;\n}", "title": "" }, { "docid": "e2c7854c65cc62c04ea277e892037409", "score": "0.58672285", "text": "function doubleNumbers(initialarray){\n var newarray = [];\n for (var i = 0; i < initialarray.length; i++){\n newarray.push(initialarray[i]*2);\n }\n return newarray;\n}", "title": "" }, { "docid": "93c61746b93ed0631722b6dc3043ab40", "score": "0.58581936", "text": "function arrayToList(array){\n if (array === null || array.length === 0){\n return \"There are no elemenets in array\"\n }\n let listResult = {};\n let index = 0;\n listResult.value = array[index];\n if(array.length===1){\n listResult.rest = null;\n } else {\n listResult.rest = arrayToList(array.slice(index+1)); \n }\n return listResult;\n}", "title": "" }, { "docid": "763128aa4a31687ed1ae33b53b74a0b3", "score": "0.58309877", "text": "function crearPorcentaje(array){ \n\n let largoArray = array.length * 0.10\n\n return largoArray\n}", "title": "" }, { "docid": "b4c26cbfe83706a6423c237c2a4e5c9b", "score": "0.5830803", "text": "function a(x){\n console.log(\"Array Original\",x);\n var z=[]\n for (var i=0;i<x.length;i++){\n z.push(x[i]+x[i]);\n }\n return z;\n }", "title": "" }, { "docid": "dd17503c80c88c3104156228efa3ddcf", "score": "0.58229434", "text": "function arrConverter(array) {\n newArr = []\n for (var i = 0; i < array.length; i++) {\n var c = array[i] * 1\n if (c !== c || c === -Infinity || c === Infinity) {\n continue\n }\n else {\n newArr[newArr.length] = c\n }\n } return newArr\n}", "title": "" }, { "docid": "0cb37c068d9a86709d4fb319aa694761", "score": "0.5821839", "text": "function arrayToList(inputArray) {\n var list = null;\n for (var i = inputArray.length - 1; i >= 0; i--) {\n list = {\n value: inputArray[i],\n rest: list\n };\n }\n return list;\n}", "title": "" }, { "docid": "ba0dc182b7219cb1219e7809e40ffcbe", "score": "0.5819493", "text": "function doubleValues(array){\n let newArray = [];\n array.forEach(function(val){\n newArray.push(val*2);\n });\n return newArray;\n}", "title": "" }, { "docid": "ee39c4213013af32b31f3038c226e76d", "score": "0.58170253", "text": "function arrayToList(arr) {\n var list = null;\n for (var i=arr.length - 1; i >= 0; i--) {\n list = {value: arr[i], rest: list}\n }\n return list;\n}", "title": "" }, { "docid": "67ac23dbb10e76393033118485504c63", "score": "0.5814316", "text": "function doubleValues(arr){\n let newArr = [];\n arr.forEach(function(num) {\n newArr.push(num*2);\n });\n \n return newArr;\n}", "title": "" }, { "docid": "2bf259c8b8e69a71cddcb2fc85e5fd3f", "score": "0.5813918", "text": "function list (first, rest) {\n return [first].concat(rest);\n }", "title": "" }, { "docid": "2bf259c8b8e69a71cddcb2fc85e5fd3f", "score": "0.5813918", "text": "function list (first, rest) {\n return [first].concat(rest);\n }", "title": "" }, { "docid": "2bd6d67dc560f8b67185c6b0992a314d", "score": "0.5813853", "text": "function r(t,e){for(var n,i=0,a=t.length;i<a;i++)n=t[i],Array.isArray(n)?r(n,e):e.push(n);return e}", "title": "" }, { "docid": "e57c2cefd138b950cbf5fa5a19ea3d1c", "score": "0.5813563", "text": "addAllNums(...rest) {\n return rest.reduce((sum, val) => (sum += val));\n }", "title": "" }, { "docid": "46bbce3f04a90357346054db55a792a2", "score": "0.58090836", "text": "function ex76(nums){\n array=[];\n array.push(nums[0],nums[nums.length-1]);\n return array;\n}", "title": "" }, { "docid": "660aa201f226f0a277ec257abd5e4234", "score": "0.58050096", "text": "function toArray(arr, start) {\n\t var ret = [];\n\t start = start || 0;\n\t var i = arr.length - start;\n\t while (i--) {\n\t ret[i] = arr[i + start];\n\t }\n\t return ret;\n\t}", "title": "" }, { "docid": "04fe1a50e3d950a6890977d7e3694c23", "score": "0.5800962", "text": "function arrayOfStringsInNumb (array) {\n var newArr = [];\n for (var i = 0; i < array.length; i++) {\n var numb = isFinite(array[i]);\n if (numb) {\n newArr[newArr.length] = parseFloat(array[i]); //zasto ovde array[i] a ne numb[i]??\n }\n }\n return newArr;\n}", "title": "" }, { "docid": "7dd7dfb92c91a5c6284a08e03398d082", "score": "0.57989997", "text": "function caml_list_of_js_array(a){\n var l = 0;\n for(var i=a.length - 1; i>=0; i--){\n var e = a[i];\n l = [0,e,l];\n }\n return l\n}", "title": "" }, { "docid": "e48f4c6cac301962d7338e82bf850a9f", "score": "0.57875824", "text": "function arrayToList(arr) {\n\tfor(let i = 0; i < arr.length; i++){\n\t\tif(arr.length === 1) {\n\t\t\treturn {\n\t\t\t\tvalue : arr[i],\n\t\t\t\trest : null\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalue : arr[i],\n\t\t\trest : arrayToList(arr.slice(i + 1, arr.length))\n\t\t}\n\t}\n}", "title": "" }, { "docid": "97e0f9019325c42c9b0050f80660214c", "score": "0.57848525", "text": "function r(t,e){for(var n,i=0,o=t.length;i<o;i++)n=t[i],Array.isArray(n)?r(n,e):e.push(n);return e}", "title": "" }, { "docid": "d2cf0d4904e79fc37d4d3395428658be", "score": "0.5769434", "text": "function arrayRest(...[a, b]) {\n return a + b;\n}", "title": "" }, { "docid": "ceec28a097c35ea8cca5741123bec35c", "score": "0.5763148", "text": "function listToArray(list){\nconsole.log('in function');\n console.log(list); \narr = [list.value];\n console.log('rest.value'+list.rest.value);\n console.log('rest.rest.value'+list.rest.rest.value);\n console.log('array:'+ arr); \n list1= list;\nwhile(list1.rest !== null){\n arr.push(list1.rest.value);\n list1.rest = list1.rest.rest;\n console.log('in loop'+ list1.rest);\n \n}\nconsole.log('returningarray'+arr);\n return arr; \n}", "title": "" }, { "docid": "d6c606865d90fb0e9b9c2def96ab7bb7", "score": "0.57584566", "text": "function agg_array(a) {\n return a.map(function(v) { return parseFloat(v) });\n //return JSON.parse(a.replace('{', '[').replace('}', ']'))\n }", "title": "" }, { "docid": "3edfff73364d0470ccab7c99a4fc8bee", "score": "0.5757531", "text": "function $a(a) {\n\t\tif (!arguments.length) {\n\t\t\tfor (var i = $j - 1; i >= 0 && $k[i] !== Infinity; i--);\n\t\t\tif (i < 0) {\n\t\t\t\tthrow new Error('array-marker-not-found');\n\t\t\t}\n\t\t\ta = $k.splice(i + 1, $j - 1 - i);\n\t\t\t$j = i;\n\t\t} else if (!(a instanceof Array)) {\n\t\t\ta = new Array(+arguments[0]);\n\t\t\tfor (var i = 0, l = a.length; i < l; i++) {\n\t\t\t\ta[i] = null;\n\t\t\t}\n\t\t}\n\t\ta.b = a; // base array\n\t\ta.o = 0; // offset into base\n\t\treturn a;\n\t}", "title": "" }, { "docid": "df39766acd1a68f1050afbe40610edab", "score": "0.57514644", "text": "function toArray(list, start) {\r\n start = start || 0;\r\n var i = list.length - start;\r\n var ret = new Array(i);\r\n while (i--) {\r\n ret[i] = list[i + start];\r\n }\r\n return ret;\r\n}", "title": "" }, { "docid": "c9a779a0a9eef6f988c2a1ec39ee2c1f", "score": "0.5745458", "text": "function listToArray(list) {\nvar arr = [];\nwhile (list.rest !== null) {\n arr.push(list.value);\n list = list.rest;\n}\narr.push(list.value);\nreturn arr;\n}", "title": "" }, { "docid": "bdd5cad0cf84ea8fc32309035801d686", "score": "0.57396364", "text": "function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret;\n }", "title": "" }, { "docid": "1c3ea7bb4c7b3909f50bc07c8de45894", "score": "0.5735281", "text": "function doubleValues(array) {\n let newArray = [];\n array.forEach(value => {\n let doubled = value * 2\n return newArray.push(doubled)\n });\n return newArray\n}", "title": "" }, { "docid": "3612bec156b0bc84323031f99a1b771c", "score": "0.57286316", "text": "function numifyData(array){\n //If the array already contains numbers, return\n if(typeof array[0] === 'Number'){\n return array;\n }\n for(var i=0;i<array.length;i++){\n for(j=0;j<array[0].length;j++){\n array[i][j]=Number(array[i][j])\n }\n }\n return array;\n}", "title": "" }, { "docid": "42c2f8d23ae055211fc0e1c8f8c4dba5", "score": "0.5726423", "text": "function std(array){\n\n}", "title": "" }, { "docid": "ae5d671ecc73d166e4655232ef622133", "score": "0.5724332", "text": "function agg_array(a) {\n return a.map(function(v) { return parseFloat(v) });\n }", "title": "" }, { "docid": "20fe0d217bf95236d429721c1dd1515e", "score": "0.57139647", "text": "function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret;\n }", "title": "" }, { "docid": "20fe0d217bf95236d429721c1dd1515e", "score": "0.57139647", "text": "function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret;\n }", "title": "" }, { "docid": "20fe0d217bf95236d429721c1dd1515e", "score": "0.57139647", "text": "function toArray(list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret;\n }", "title": "" }, { "docid": "ebd43463c03534bddccaf0d51a3c7b54", "score": "0.57074475", "text": "function toArray(list, start) {\n start = start || 0\n var i = list.length - start\n var ret = new Array(i)\n while (i--) {\n ret[i] = list[i + start]\n }\n return ret\n }", "title": "" }, { "docid": "d1a23e1d3a809c543b92a105a8b68018", "score": "0.5706184", "text": "function arrayg(first){\n\tvar counter = 1, arr = [];\n\tfunction more(next){\n\t\tarr[0] = first;\n\t\tif (next === undefined){\n\t\t\treturn arr;\n\t\t}\n\t\tarr[counter] = next;\n\t\tcounter += 1;\n\t\treturn more;\n\t}\n\tif (first === undefined){\n\t\treturn arr;\n\t}\n\tif (first !== undefined){\n\t\treturn more;\n\t}\n}", "title": "" }, { "docid": "b94a282fa9238934b1738a39c3c51158", "score": "0.56976634", "text": "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "title": "" }, { "docid": "b94a282fa9238934b1738a39c3c51158", "score": "0.56976634", "text": "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "title": "" }, { "docid": "b94a282fa9238934b1738a39c3c51158", "score": "0.56976634", "text": "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "title": "" }, { "docid": "b94a282fa9238934b1738a39c3c51158", "score": "0.56976634", "text": "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "title": "" }, { "docid": "b94a282fa9238934b1738a39c3c51158", "score": "0.56976634", "text": "function toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n }", "title": "" }, { "docid": "8f4d91f29e0da1142d8cca7234be2c1d", "score": "0.5694855", "text": "function toArray (list, start) {\r\n start = start || 0;\r\n var i = list.length - start;\r\n var ret = new Array(i);\r\n while (i--) {\r\n ret[i] = list[i + start];\r\n }\r\n return ret\r\n}", "title": "" } ]
6a0323284c7b0eb7305ca99324cb046f
Determines whether before/after emit notifications should be raised in the pretty printer when it emits a node.
[ { "docid": "737271e29fbf615edbf11b58aba21d8e", "score": "0.66888434", "text": "function isEmitNotificationEnabled(node) {\n return (enabledSyntaxKindFeatures[node.kind] & 2 /* EmitNotifications */) !== 0\n || (ts.getEmitFlags(node) & 2 /* AdviseOnEmitNode */) !== 0;\n }", "title": "" } ]
[ { "docid": "85c39ff79905646b2e1a37771eef5ed0", "score": "0.6722353", "text": "function isEmitNotificationEnabled(node) {\n return (enabledSyntaxKindFeatures[node.kind] & 2 /* EmitNotifications */) !== 0 || (ts.getEmitFlags(node) & 2 /* AdviseOnEmitNode */) !== 0;\n }", "title": "" }, { "docid": "85c39ff79905646b2e1a37771eef5ed0", "score": "0.6722353", "text": "function isEmitNotificationEnabled(node) {\n return (enabledSyntaxKindFeatures[node.kind] & 2 /* EmitNotifications */) !== 0 || (ts.getEmitFlags(node) & 2 /* AdviseOnEmitNode */) !== 0;\n }", "title": "" }, { "docid": "de101750a23f893c0843fd6a44b94047", "score": "0.55032784", "text": "function enableEmitNotification(kind) {\n ts.Debug.assert(state < 2 /* Completed */, \"Cannot modify the transformation context after transformation has completed.\");\n enabledSyntaxKindFeatures[kind] |= 2 /* EmitNotifications */;\n }", "title": "" }, { "docid": "0f6b12bad9212fb58ca504b17348f110", "score": "0.5487407", "text": "function enableEmitNotification(kind) {\n ts.Debug.assert(state < 2 /* Completed */, \"Cannot modify the transformation context after transformation has completed.\");\n enabledSyntaxKindFeatures[kind] |= 2 /* EmitNotifications */;\n }", "title": "" }, { "docid": "ae52cd7ad00f410f0ca739222b4de836", "score": "0.5483511", "text": "function enableEmitNotification(kind) {\n enabledSyntaxKindFeatures[kind] |= 2 /* EmitNotifications */;\n }", "title": "" }, { "docid": "9d47a26b01723e3316cffc8ea2e78a6d", "score": "0.539739", "text": "function onEmitNode(hint, node, emitCallback) {\n switch (node.kind) {\n case 250 /* JsxOpeningElement */:\n case 251 /* JsxClosingElement */:\n case 249 /* JsxSelfClosingElement */:\n var tagName = node.tagName;\n noSubstitution[ts.getOriginalNodeId(tagName)] = true;\n break;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "15ccf3c1caa26697a9bacc55480fdc33", "score": "0.53935903", "text": "function emitIfPresent(node) {\n if (node) {\n emit(node);\n }\n }", "title": "" }, { "docid": "9bdfa1bf21738e0addb1f57d4b01c92e", "score": "0.5379135", "text": "function emitIfPresent(node) {\n if (node) {\n emit(node);\n }\n }", "title": "" }, { "docid": "97cd3b22067627e8aafc1037c69923e8", "score": "0.5362262", "text": "function onEmitNode(hint, node, emitCallback) {\n switch (node.kind) {\n case 252 /* JsxOpeningElement */:\n case 253 /* JsxClosingElement */:\n case 251 /* JsxSelfClosingElement */:\n var tagName = node.tagName;\n noSubstitution[ts.getOriginalNodeId(tagName)] = true;\n break;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "2da2d1666dc72e81643524578d36468a", "score": "0.5359163", "text": "function getStartsOnNewLine(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.startsOnNewLine;\n }", "title": "" }, { "docid": "25e6641191bbd0bab6618cad9f26d85e", "score": "0.5347614", "text": "function onEmitNode(hint, node, emitCallback) {\n switch (node.kind) {\n case 252 /* JsxOpeningElement */:\n case 253 /* JsxClosingElement */:\n case 251 /* JsxSelfClosingElement */:\n var tagName = node.tagName;\n noSubstitution[ts.getOriginalNodeId(tagName)] = true;\n break;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "49df34d3bcefa7c752285b86fee0b69e", "score": "0.5321912", "text": "function getStartsOnNewLine(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.startsOnNewLine;\n }", "title": "" }, { "docid": "26f58b0e06454fcf7309a8fc8f79f80a", "score": "0.53178614", "text": "function getEmitFlags(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.flags;\n }", "title": "" }, { "docid": "26f58b0e06454fcf7309a8fc8f79f80a", "score": "0.53178614", "text": "function getEmitFlags(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.flags;\n }", "title": "" }, { "docid": "595bdf71d9326469c6c631791173f5eb", "score": "0.5269401", "text": "function getEmitFlags(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.flags;\n }", "title": "" }, { "docid": "b1e71c42239ebfcc29d053ec6412aabd", "score": "0.51762265", "text": "function node_is_inserted(node) {\n return !!(node[sym_mount_status] & NODE_IS_INSERTED);\n }", "title": "" }, { "docid": "b3cb2695141b2d92f8c75a2eb19d8b3f", "score": "0.51294684", "text": "function shouldEmitFunctionLikeDeclaration(node) {\n return !ts.nodeIsMissing(node.body);\n }", "title": "" }, { "docid": "b3cb2695141b2d92f8c75a2eb19d8b3f", "score": "0.51294684", "text": "function shouldEmitFunctionLikeDeclaration(node) {\n return !ts.nodeIsMissing(node.body);\n }", "title": "" }, { "docid": "5e192fc89c1d7b2d51da29722a62bda4", "score": "0.50930846", "text": "function shouldEmitFunctionLikeDeclaration(node) {\n return !ts.nodeIsMissing(node.body);\n }", "title": "" }, { "docid": "e7d96ad9bc74acf79eb0349f304d1b98", "score": "0.5059142", "text": "function emitNodeWithNotification(hint, node, emitCallback) {\n if (node) {\n if (isEmitNotificationEnabled(node)) {\n context.onEmitNode(hint, node, emitCallback);\n } else {\n emitCallback(hint, node);\n }\n }\n }", "title": "" }, { "docid": "2941b707c393658ed479d354877c5bff", "score": "0.5047549", "text": "function _AssertStatementEmitter() {\n}", "title": "" }, { "docid": "914c5660fde145b4871231304fba2efe", "score": "0.4999094", "text": "function generated(node) {\n var position = optional(optional(node).position)\n var start = optional(position.start)\n var end = optional(position.end)\n\n return !start.line || !start.column || !end.line || !end.column\n}", "title": "" }, { "docid": "8620038c5c0bb219f2a2b3b3708c93ee", "score": "0.49744868", "text": "function generated(node) {\n var position = optional(optional(node).position);\n var start = optional(position.start);\n var end = optional(position.end);\n\n return !start.line || !start.column || !end.line || !end.column;\n}", "title": "" }, { "docid": "8620038c5c0bb219f2a2b3b3708c93ee", "score": "0.49744868", "text": "function generated(node) {\n var position = optional(optional(node).position);\n var start = optional(position.start);\n var end = optional(position.end);\n\n return !start.line || !start.column || !end.line || !end.column;\n}", "title": "" }, { "docid": "1eebd3590e16a319aa16e160565d835e", "score": "0.4948324", "text": "function onEmitNode(hint, node, emitCallback) {\n if (enabledSubstitutions & 1 /* CapturedThis */ && ts.isFunctionLike(node)) {\n // If we are tracking a captured `this`, keep track of the enclosing function.\n var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, ts.getEmitFlags(node) & 8 /* CapturesThis */\n ? 65 /* FunctionIncludes */ | 16 /* CapturesThis */\n : 65 /* FunctionIncludes */);\n previousOnEmitNode(hint, node, emitCallback);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "ef0eed55a326179e64c350e29c141f49", "score": "0.4933627", "text": "function emitNodeWithNotification(hint, node, emitCallback) {\n ts.Debug.assert(state < 3 /* Disposed */, \"Cannot invoke TransformationResult callbacks after the result is disposed.\");\n if (node) {\n if (isEmitNotificationEnabled(node)) {\n onEmitNode(hint, node, emitCallback);\n }\n else {\n emitCallback(hint, node);\n }\n }\n }", "title": "" }, { "docid": "772ba9d906b421fc6f71a183ddc6193e", "score": "0.49290383", "text": "function onEmitNode(hint, node, emitCallback) {\n if (enabledSubstitutions & 1 /* CapturedThis */ && ts.isFunctionLike(node)) {\n // If we are tracking a captured `this`, keep track of the enclosing function.\n var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, ts.getEmitFlags(node) & 8 /* CapturesThis */\n ? 65 /* FunctionIncludes */ | 16 /* CapturesThis */\n : 65 /* FunctionIncludes */);\n previousOnEmitNode(hint, node, emitCallback);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "772ba9d906b421fc6f71a183ddc6193e", "score": "0.49290383", "text": "function onEmitNode(hint, node, emitCallback) {\n if (enabledSubstitutions & 1 /* CapturedThis */ && ts.isFunctionLike(node)) {\n // If we are tracking a captured `this`, keep track of the enclosing function.\n var ancestorFacts = enterSubtree(16286 /* FunctionExcludes */, ts.getEmitFlags(node) & 8 /* CapturesThis */\n ? 65 /* FunctionIncludes */ | 16 /* CapturesThis */\n : 65 /* FunctionIncludes */);\n previousOnEmitNode(hint, node, emitCallback);\n exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */);\n return;\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "9b2ea2f282c9b5b5d6fc44b4fea57e88", "score": "0.49279368", "text": "function emitNodeWithNotification(hint, node, emitCallback) {\n ts.Debug.assert(state < 3 /* Disposed */, \"Cannot invoke TransformationResult callbacks after the result is disposed.\");\n if (node) {\n if (isEmitNotificationEnabled(node)) {\n onEmitNode(hint, node, emitCallback);\n } else {\n emitCallback(hint, node);\n }\n }\n }", "title": "" }, { "docid": "88a41986f0c1b7b3bb2cd1f3fb04a275", "score": "0.48401383", "text": "function onEmitNode(hint, node, emitCallback) {\n // If we need to support substitutions for `super` in an async method,\n // we should track it here.\n if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {\n var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);\n if (superContainerFlags !== enclosingSuperContainerFlags) {\n var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = superContainerFlags;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "88a41986f0c1b7b3bb2cd1f3fb04a275", "score": "0.48401383", "text": "function onEmitNode(hint, node, emitCallback) {\n // If we need to support substitutions for `super` in an async method,\n // we should track it here.\n if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {\n var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);\n if (superContainerFlags !== enclosingSuperContainerFlags) {\n var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = superContainerFlags;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "619f25a64d4c4cca5fb13dbdbe2d0158", "score": "0.4835422", "text": "function onEmitNode(hint, node, emitCallback) {\n // If we need to support substitutions for `super` in an async method,\n // we should track it here.\n if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {\n var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);\n if (superContainerFlags !== enclosingSuperContainerFlags) {\n var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = superContainerFlags;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "619f25a64d4c4cca5fb13dbdbe2d0158", "score": "0.4835422", "text": "function onEmitNode(hint, node, emitCallback) {\n // If we need to support substitutions for `super` in an async method,\n // we should track it here.\n if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {\n var superContainerFlags = resolver.getNodeCheckFlags(node) & (2048 /* AsyncMethodWithSuper */ | 4096 /* AsyncMethodWithSuperBinding */);\n if (superContainerFlags !== enclosingSuperContainerFlags) {\n var savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;\n enclosingSuperContainerFlags = superContainerFlags;\n previousOnEmitNode(hint, node, emitCallback);\n enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags;\n return;\n }\n }\n previousOnEmitNode(hint, node, emitCallback);\n }", "title": "" }, { "docid": "35ef853d90a2fde16608a1e9537b96f5", "score": "0.48288077", "text": "emitReserved(ev, ...args) {\n return super.emit(ev, ...args);\n }", "title": "" }, { "docid": "2ce7018e7b609891864b607223522fdc", "score": "0.4799842", "text": "function _ConditionalExpressionEmitter() {\n}", "title": "" }, { "docid": "35f7cc59775a217926e2a45b63db29d0", "score": "0.4775402", "text": "function getEmitHelpers(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.helpers;\n }", "title": "" }, { "docid": "35f7cc59775a217926e2a45b63db29d0", "score": "0.4775402", "text": "function getEmitHelpers(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.helpers;\n }", "title": "" }, { "docid": "797ea1b9e0f6db2225db7550ef5776da", "score": "0.47661054", "text": "function _IfStatementEmitter() {\n}", "title": "" }, { "docid": "c96dc97275de7a0d5e365f56db81f827", "score": "0.47415888", "text": "function emit() {}", "title": "" }, { "docid": "4acaa2f432568710d1dd06a9a977bbed", "score": "0.4741524", "text": "function getEmitHelpers(node) {\n var emitNode = node.emitNode;\n return emitNode && emitNode.helpers;\n }", "title": "" }, { "docid": "f92fc033c8435167c751f785841e0c5c", "score": "0.47373506", "text": "getEmitSkipped() {\r\n return this.compilerObject.emitSkipped;\r\n }", "title": "" }, { "docid": "21b6f1b6376ff66a5c0ea9ecebc8e9e7", "score": "0.46988606", "text": "function shouldDelegateEvents() {\n return true;\n }", "title": "" }, { "docid": "f6d02d63a7d4ae2ef7d5c1173a3568c6", "score": "0.4690908", "text": "isOutput() { return (this.type == 'output'); }", "title": "" }, { "docid": "8b2746ec90482c545f8977dfc9b7962f", "score": "0.46401957", "text": "async __before(){\n \tthink.log(function(colors){\n\t\t return colors.yellow(\"[INFO]\") + \" do something before...\";\n\t\t});\n }", "title": "" }, { "docid": "fac79d7b891d4da2bc52df58865ccf10", "score": "0.46388572", "text": "function onEmitNode(hint, node, emitCallback) {\n var savedApplicableSubstitutions = applicableSubstitutions;\n var savedCurrentSourceFile = currentSourceFile;\n if (ts.isSourceFile(node)) {\n currentSourceFile = node;\n }\n if (enabledSubstitutions & 2 /* NamespaceExports */ && isTransformedModuleDeclaration(node)) {\n applicableSubstitutions |= 2 /* NamespaceExports */;\n }\n if (enabledSubstitutions & 8 /* NonQualifiedEnumMembers */ && isTransformedEnumDeclaration(node)) {\n applicableSubstitutions |= 8 /* NonQualifiedEnumMembers */;\n }\n previousOnEmitNode(hint, node, emitCallback);\n applicableSubstitutions = savedApplicableSubstitutions;\n currentSourceFile = savedCurrentSourceFile;\n }", "title": "" }, { "docid": "7dc03e4a1125d85ed486ceb0524a8657", "score": "0.46320435", "text": "function onEmitNode(hint, node, emitCallback) {\n var savedApplicableSubstitutions = applicableSubstitutions;\n var savedCurrentSourceFile = currentSourceFile;\n if (ts.isSourceFile(node)) {\n currentSourceFile = node;\n }\n if (enabledSubstitutions & 2 /* NamespaceExports */ && isTransformedModuleDeclaration(node)) {\n applicableSubstitutions |= 2 /* NamespaceExports */;\n }\n if (enabledSubstitutions & 8 /* NonQualifiedEnumMembers */ && isTransformedEnumDeclaration(node)) {\n applicableSubstitutions |= 8 /* NonQualifiedEnumMembers */;\n }\n previousOnEmitNode(hint, node, emitCallback);\n applicableSubstitutions = savedApplicableSubstitutions;\n currentSourceFile = savedCurrentSourceFile;\n }", "title": "" }, { "docid": "bfa114f16aee282f84d6b555b65aaf0e", "score": "0.4625937", "text": "function amITalkingToMyself( data ) {\n return data.from === data.to;\n }", "title": "" }, { "docid": "bd63df38dbb692587ad942a3ec015b2d", "score": "0.4623239", "text": "function addRemoveDuringEmitTest () {\n EventEmitter.setDebugLevel(EventEmitter.DEBUG_THROW);\n var signaler = new MySignaler();\n\n var ear1 = new Ear(1), ear2 = new Ear(2), ear3 = new Ear(3), ear4 = new Ear(4);\n\n ear1.onSignal1 = function () {\n signaler.forgetListener(this);\n signaler.on('signal1', Ear.prototype.onSignal1, ear3);\n signaler.off('signal1', ear4);\n };\n\n signaler.setListenerMaxCount(3, ear1);\n\n signaler.on('signal1', ear1.onSignal1, ear1);\n signaler.on('signal1', ear2.onSignal1, ear2);\n signaler.on('signal1', ear2.onSignal1, ear4);\n\n signaler.emit('signal1');\n // ear1 has been removed; ear2 is still listening; ear3 started listening; ear4 is gone\n // NB: depending on `respectSubscriberOrder` ear3 might be before (default) or after ear2 in listener list\n // This test does not care about this: see listenerOrderTest about that.\n checkResult(2, signaler.listenerCount('signal1'));\n\n // ear2 has been notified\n checkResult(1, ear2.count);\n // ear4 did not receive it because removed during emit on ear1; this behavior is a specification\n checkResult(0, ear4.count);\n\n var ear3count = ear3.count; // could be 0 or 1 since ear3 started listening during an \"emit\"\n\n // emit again and verify ear2 and ear3 are listening\n checkResult(true, signaler.emit('signal1'));\n checkResult(2, ear2.count);\n checkResult(ear3count + 1, ear3.count); // could be 1 or 2\n}", "title": "" }, { "docid": "bd63df38dbb692587ad942a3ec015b2d", "score": "0.4623239", "text": "function addRemoveDuringEmitTest () {\n EventEmitter.setDebugLevel(EventEmitter.DEBUG_THROW);\n var signaler = new MySignaler();\n\n var ear1 = new Ear(1), ear2 = new Ear(2), ear3 = new Ear(3), ear4 = new Ear(4);\n\n ear1.onSignal1 = function () {\n signaler.forgetListener(this);\n signaler.on('signal1', Ear.prototype.onSignal1, ear3);\n signaler.off('signal1', ear4);\n };\n\n signaler.setListenerMaxCount(3, ear1);\n\n signaler.on('signal1', ear1.onSignal1, ear1);\n signaler.on('signal1', ear2.onSignal1, ear2);\n signaler.on('signal1', ear2.onSignal1, ear4);\n\n signaler.emit('signal1');\n // ear1 has been removed; ear2 is still listening; ear3 started listening; ear4 is gone\n // NB: depending on `respectSubscriberOrder` ear3 might be before (default) or after ear2 in listener list\n // This test does not care about this: see listenerOrderTest about that.\n checkResult(2, signaler.listenerCount('signal1'));\n\n // ear2 has been notified\n checkResult(1, ear2.count);\n // ear4 did not receive it because removed during emit on ear1; this behavior is a specification\n checkResult(0, ear4.count);\n\n var ear3count = ear3.count; // could be 0 or 1 since ear3 started listening during an \"emit\"\n\n // emit again and verify ear2 and ear3 are listening\n checkResult(true, signaler.emit('signal1'));\n checkResult(2, ear2.count);\n checkResult(ear3count + 1, ear3.count); // could be 1 or 2\n}", "title": "" }, { "docid": "43b84c987c97f2a884ba75ac5edd57ad", "score": "0.46103978", "text": "function onEmitNode(hint, node, emitCallback) {\n var savedApplicableSubstitutions = applicableSubstitutions;\n if (enabledSubstitutions & 2 /* NamespaceExports */ && isTransformedModuleDeclaration(node)) {\n applicableSubstitutions |= 2 /* NamespaceExports */;\n }\n if (enabledSubstitutions & 8 /* NonQualifiedEnumMembers */ && isTransformedEnumDeclaration(node)) {\n applicableSubstitutions |= 8 /* NonQualifiedEnumMembers */;\n }\n previousOnEmitNode(hint, node, emitCallback);\n applicableSubstitutions = savedApplicableSubstitutions;\n }", "title": "" }, { "docid": "6c210e95f85bb2b551b0bf4126ced2ae", "score": "0.45946932", "text": "emitNow () {\n\t\tEventEmitter.prototype.emit.call( this, this.eventName );\n\t\t// super.emit( this.eventName );\n\t}", "title": "" }, { "docid": "c6a394ac95748fb0795622dabf2fdbb2", "score": "0.45741972", "text": "function onEmitNode(hint, node, emitCallback) {\n // If we need to support substitutions for `super` in an async method,\n // we should track it here.\n if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {\n var savedCurrentSuperContainer = currentSuperContainer;\n currentSuperContainer = node;\n previousOnEmitNode(hint, node, emitCallback);\n currentSuperContainer = savedCurrentSuperContainer;\n } else {\n previousOnEmitNode(hint, node, emitCallback);\n }\n }", "title": "" }, { "docid": "d7fc31339f6d90366210442e32d23842", "score": "0.4567731", "text": "function emitPluralEvents(emitter, path, nodes, next, self) {\n var num = 1;\n\n function nextWhenReady() {\n num -= 1;\n if (0 === num) { next.call(self); }\n }\n\n fnodeTypesPlural.concat([\"nodes\", \"errors\"]).forEach(function (fnodeType) {\n if (0 === nodes[fnodeType].length) { return; }\n num += emitter.listeners(fnodeType).length;\n emitter.emit(fnodeType, path, nodes[fnodeType], nextWhenReady);\n });\n nextWhenReady();\n }", "title": "" }, { "docid": "0cc14b0b959ecbc537956f88d68e56a2", "score": "0.45617875", "text": "function isProceduralRenderer(renderer) {\n return !!renderer.listen;\n }", "title": "" }, { "docid": "fb9e5c5acb6e02bd449fe9180c0e7d57", "score": "0.45606303", "text": "function _LogStatementEmitter() {\n}", "title": "" }, { "docid": "c3d66d537047e94cd22a9059673ee93b", "score": "0.45527697", "text": "[symbols.emit]() {\n this[symbols.scheduled] = false;\n this._emitPublication();\n }", "title": "" }, { "docid": "3c05f4ec9e50c7bbd77dfacb52d73a9b", "score": "0.45471558", "text": "function reportObviousModifierErrors(node) {\n return !node.modifiers ? false : shouldReportBadModifier(node) ? grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here) : undefined;\n }", "title": "" }, { "docid": "3c05f4ec9e50c7bbd77dfacb52d73a9b", "score": "0.45471558", "text": "function reportObviousModifierErrors(node) {\n return !node.modifiers ? false : shouldReportBadModifier(node) ? grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here) : undefined;\n }", "title": "" }, { "docid": "f91d43749f7cde316d2963f3b51d6c8d", "score": "0.45409447", "text": "_debugLogEmitSuppressed(value){{handleDebug(\"emit-suppressed\",()=>{return {observableName:this.name,emitValue:value};});}}", "title": "" }, { "docid": "d56a61f4cef9029c7e84d4d461e8667e", "score": "0.45404056", "text": "function eventIsEmitted(name) {\n let called = false;\n\n logger.once(`logger:${name}`, () => {\n called = true;\n });\n logger[name]();\n\n expect(called).toBe(true);\n }", "title": "" }, { "docid": "f24350712847d31297c5368e864d2ca4", "score": "0.45218462", "text": "function a$P(e){return e&&e.enabled&&(e$_(e)||t$13(e))&&r$3A(e.edges)}", "title": "" }, { "docid": "9d741a9083bd44be8aadbcea2ae2bd8c", "score": "0.45121747", "text": "function shouldNotFormat(node, commentPairs) {\n const matchingPair = _.findLast(\n commentPairs,\n (comment) =>\n comment.off.endOffset < node.location.startOffset\n );\n if (\n matchingPair !== undefined &&\n (matchingPair.on === undefined ||\n matchingPair.on.startOffset > node.location.endOffset)\n ) {\n node.ignore = true;\n }\n }", "title": "" }, { "docid": "d8fe23da0858a87b94d617a6c9329a6d", "score": "0.4494464", "text": "function reportObviousModifierErrors(node) {\n return !node.modifiers\n ? false\n : shouldReportBadModifier(node)\n ? grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here)\n : undefined;\n }", "title": "" }, { "docid": "40722063c223c195396d1836eaf8b8dc", "score": "0.4494156", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "title": "" }, { "docid": "40722063c223c195396d1836eaf8b8dc", "score": "0.4494156", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "title": "" }, { "docid": "40722063c223c195396d1836eaf8b8dc", "score": "0.4494156", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "title": "" }, { "docid": "40722063c223c195396d1836eaf8b8dc", "score": "0.4494156", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "title": "" }, { "docid": "40722063c223c195396d1836eaf8b8dc", "score": "0.4494156", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "title": "" }, { "docid": "40722063c223c195396d1836eaf8b8dc", "score": "0.4494156", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "title": "" }, { "docid": "9d6ac93c76741896c16455484f2bea5b", "score": "0.44874197", "text": "function _LogicalExpressionEmitter() {\n}", "title": "" }, { "docid": "2bc459e5a9a3f6c2d0c58129a4619abf", "score": "0.44873482", "text": "function ExamineEmitter () {}", "title": "" }, { "docid": "9c37815a661fc7d8bd74a135f086a017", "score": "0.44795927", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i)listeners[i].call(self);}}", "title": "" }, { "docid": "9c37815a661fc7d8bd74a135f086a017", "score": "0.44795927", "text": "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i)listeners[i].call(self);}}", "title": "" }, { "docid": "4c3f2d304f162cbaabff6ecdea9a52cc", "score": "0.44720584", "text": "function _StatementEmitter() {\n}", "title": "" }, { "docid": "b303128f49588fcf5aeb85691a74f7a6", "score": "0.44712582", "text": "isExplicitOutput() { return (this.isOutput() && !this.implicit); }", "title": "" }, { "docid": "225f7101eda1b4b29febef5dee69bcad", "score": "0.4459777", "text": "hasListeners() {\n return this._next !== this;\n }", "title": "" }, { "docid": "8d2dc77d6520fb6ac4b5f57aaa857e04", "score": "0.4453165", "text": "emitted(name) {\n return this.queue[name].emitted;\n }", "title": "" }, { "docid": "4b330caab4f8a4af0a45f0e9d98bbcaa", "score": "0.44470936", "text": "function node_is_observing(node) {\n return !!(node[sym_mount_status] & NODE_IS_OBSERVING);\n }", "title": "" }, { "docid": "01a87dd22eebc56c3f6ddbc28613664e", "score": "0.443584", "text": "isSink() {\n return this.state == 'low';\n }", "title": "" }, { "docid": "7df291c6e56d9bf4c223d7d58ea889f9", "score": "0.44343224", "text": "function _CaseStatementEmitter() {\n}", "title": "" }, { "docid": "59023a2bc116268b1ee8a00a3761fbac", "score": "0.44292027", "text": "test() {\n\t\tthis.emit('event1', 200)\n\t}", "title": "" }, { "docid": "8de7d190d9237061489f8a31e54765aa", "score": "0.44157675", "text": "function _SwitchStatementEmitter() {\n}", "title": "" }, { "docid": "5de3453332445249cdb3b3c96ad4fe63", "score": "0.44109607", "text": "emitEvents(events) {\n console.log(\"Emitting events\", events);\n this._emitter.emit(\"blockEvents\", {events});\n }", "title": "" }, { "docid": "5874bac6cdbd0659e34eb75b1161a0f8", "score": "0.4395726", "text": "_emitSummary() {\n const summary = this.getSummary();\n if (summary.events > 0) {\n this.emit('data', summary);\n }\n }", "title": "" }, { "docid": "c6a96a05d1425c0acb449d93f7d6ca6f", "score": "0.43405163", "text": "function removeEmitHelper(node, helper) {\n var emitNode = node.emitNode;\n if (emitNode) {\n var helpers = emitNode.helpers;\n if (helpers) {\n return ts.orderedRemoveItem(helpers, helper);\n }\n }\n return false;\n }", "title": "" }, { "docid": "b72675b64105057a9a698eaa7f4ec4b7", "score": "0.43385735", "text": "function removeEmitHelper(node, helper) {\n var emitNode = node.emitNode;\n if (emitNode) {\n var helpers = emitNode.helpers;\n if (helpers) {\n return ts.orderedRemoveItem(helpers, helper);\n }\n }\n return false;\n }", "title": "" }, { "docid": "b72675b64105057a9a698eaa7f4ec4b7", "score": "0.43385735", "text": "function removeEmitHelper(node, helper) {\n var emitNode = node.emitNode;\n if (emitNode) {\n var helpers = emitNode.helpers;\n if (helpers) {\n return ts.orderedRemoveItem(helpers, helper);\n }\n }\n return false;\n }", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" }, { "docid": "a944293617e4bfe71f939850b6320a08", "score": "0.4337187", "text": "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "title": "" } ]
805579147ea8facbaf5fb6a610dbeb98
Unwraps the actual response sent by the server from the response context and deserializes the response content to the expected objects
[ { "docid": "e882a01fe208c4e1439db616f3f2cabd", "score": "0.0", "text": "getFastlyService(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"FastlyServiceResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"FastlyServiceResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" } ]
[ { "docid": "a38c6c663100fd2979f95eea42ccd8e6", "score": "0.60498106", "text": "function cleanResponse(response) {\n\tconst clonedResponse = response.clone();\n\n\t// Not all browsers support the Response.body stream, so fall back to reading\n\t// the entire body into memory as a blob.\n\tconst bodyPromise = 'body' in clonedResponse ?\n\t Promise.resolve(clonedResponse.body) :\n\t clonedResponse.blob();\n\n\treturn bodyPromise.then((body) => {\n\t // new Response() is happy when passed either a stream or a Blob.\n\t return new Response(body, {\n\t\t\theaders: clonedResponse.headers,\n\t\t\tstatus: clonedResponse.status,\n\t\t\tstatusText: clonedResponse.statusText,\n\t });\n\t});\n}", "title": "" }, { "docid": "006f8370ea2c628403a0e68a56f8cd13", "score": "0.59269696", "text": "function scrubResponseBodies(recording) {\n let response = recording.response.content.text;\n\n if (response) {\n const responseBody = JSON.parse(response);\n\n Object.entries(scrubbers).forEach((scrubberEntry) => {\n response = scrubData(responseBody, scrubberEntry);\n });\n }\n\n recording.response.content.text = JSON.stringify(response);\n}", "title": "" }, { "docid": "feabe3e8f825426d4eec3b214c2ebc70", "score": "0.58137125", "text": "getTest(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsTestDetails\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsTestDetails\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "4e0eb5bc36ced66f168de6504bb5fd29", "score": "0.5785095", "text": "function handleTykRequest(requestObj) {\n\n var encodedResponse = TykMakeHttpRequest(JSON.stringify(requestObj));\n var decodedResponse = JSON.parse(encodedResponse);\n\n // need to parse a valid response body\n try {\n var decodedBody = JSON.parse(decodedResponse.Body);\n } catch(err) {\n var decodedBody = {}\n }\n\n return decodedBody\n}", "title": "" }, { "docid": "65d69a078c5e2005ae4621c95b60b620", "score": "0.57681316", "text": "function flattenResponseData (response) {\n if (_.isPlainObject(response.data)) {\n response.meta = response.data.meta;\n response.data = response.data.error || response.data.data;\n }\n return response;\n}", "title": "" }, { "docid": "329de0d1d10b02c4501da90e05a83a2e", "score": "0.5724232", "text": "function extractComposedAjaxResponseObject(html) {\r\n\tvar output = {};\r\n\tvar selector = \"#ajaxDataPayloadContainer\";\r\n\tvar rendered = $(html);\r\n\tvar jsonContainer = rendered.find(selector);\r\n\tif (jsonContainer.size() > 0) {\r\n\t\tvar raw = jsonContainer.html();\r\n\t\traw = $(\"<div/>\").html(raw).text();\r\n\t\toutput.data = $.parseJSON(raw);\r\n\t}\r\n\telse {\r\n\t\toutput.data = null;\r\n\t}\r\n\t\r\n\toutput.html = rendered.find(\"#ajaxHtmlContainer\").html();\r\n\treturn output;\r\n}", "title": "" }, { "docid": "0c2cd634339c3da7f8ff39ba95d22128", "score": "0.56860733", "text": "transformResponse(response) { // can be overwritten in child class if special response processing is needed\n const data = response.data;\n data.forEach(d => this.transformItem(d));\n return data;\n }", "title": "" }, { "docid": "d39feb35d6cc77b8fe0f1b22ad1373a0", "score": "0.5604259", "text": "function turnResponseIntoObject(response) {\n return response.json();\n}", "title": "" }, { "docid": "114fd9c24894332ef837d7e6adcb3498", "score": "0.5482666", "text": "getIncident(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "84594653e747c36cbce77e108f95b7e4", "score": "0.54594404", "text": "function getGenericResponse(context) {\n return {\n \"userInput\":\"verizon\",\n \"data\": {\n \"name\":\"Verizon\",\n \"contactMethods\": {\n \"phone\":\"888-553-2555\",\n \"email\":\"\",\n \"twitter\":\"@VerizonSupport\",\n \"web\":\"http://www22.verizon.com/content/contactus/\",\n \"chat\":\"http://www22.verizon.com/content/contactus/\",\n \"facebook\":\"\"\n },\n \"posts\": [\n {\n \"title\":\"How do I switch number to new phone?\",\n \"urlId\":\"A4u\"\n },\n {\n \"title\":\"How do I file an insurance claim?\",\n \"urlId\":\"7uV\"\n },\n {\n \"title\":\"How do I replace my phone?\",\n \"urlId\":\"7e1\"\n },\n {\n \"title\":\"I want to download backup assistant for Verizon\",\n \"urlId\":\"690\"\n },\n {\n \"title\":\"How do I start with Verizon Prepaid?\",\n \"urlId\":\"Li_\"\n }\n ],\n \"otherCompanies\":[\n \"Verizon Business\",\n \"Verizon DSL\",\n \"Verizon Smart Rewards\",\n \"Verizon Wireless Prepay\",\n \"Verizon Web Support\",\n \"Verizon Wireless Financial\",\n \"Verizon Billing\",\n \"Verizon Repair\",\n \"Verizon Wireless\",\n \"Verizon FiOS\",\n \"Verizon Land Line\",\n \"Verizon Center for Customers with Disabilities\"\n ]\n },\n \"type\":\"standard\",\n \"context\": context\n }\n}", "title": "" }, { "docid": "0036d58ec9fada196cf713500fea77fe", "score": "0.5402842", "text": "listIncidents(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentsResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "75aaaabd432a55625b4143f53e8da135", "score": "0.5393055", "text": "function serializeResponse(response) {\n var serialized = {\n headers: serializeHeaders(response.headers),\n status: response.status,\n statusText: response.statusText\n }\n\n return response.clone().text().then(function (body) {\n serialized.body = body;\n return Promise.resolve(serialized);\n })\n}", "title": "" }, { "docid": "ed5751d9a2d58108737488169ffe49bc", "score": "0.5372831", "text": "function interpretResponse(serverResponse, bidRequest) {\n if (serverResponse.body.length > 0) {\n return serverResponse.body.map(_createBidResponse);\n } else {\n return [];\n }\n}", "title": "" }, { "docid": "2aa04fbe96ffa8ec1df506df1d89bdad", "score": "0.53583586", "text": "function determineBodyPromise(response, requestData) {\n return response.text().then(function (payload) {\n var ret = payload;\n\n try {\n ret = JSON.parse(payload);\n } catch (error) {\n if (!(error instanceof SyntaxError)) {\n throw error;\n }\n\n var status = response.status;\n\n if (response.ok && (status === 204 || status === 205 || requestData.method === 'HEAD')) {\n ret = undefined;\n } else {\n {\n var message = `The server returned an empty string for ${requestData.method} ${requestData.url}, which cannot be parsed into a valid JSON. Return either null or {}.`;\n\n if (payload === '') {\n ( Ember.warn(message, true, {\n id: 'ds.adapter.returned-empty-string-as-JSON'\n }));\n throw error;\n }\n } // eslint-disable-next-line no-console\n\n\n console.warn('This response was unable to be parsed as json.', payload);\n }\n }\n\n return ret;\n });\n }", "title": "" }, { "docid": "24757198c03800482b9558c785d89e6f", "score": "0.53533036", "text": "cloneRole(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"RoleResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 409 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"RoleResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "59ce549456786c7328e0327f743bc03f", "score": "0.53313136", "text": "clone () {\n if (!(this instanceof Response)) {\n throw new TypeError('Illegal invocation')\n }\n\n // 1. If this is unusable, then throw a TypeError.\n if (this.bodyUsed || (this.body && this.body.locked)) {\n throw new TypeError()\n }\n\n // 2. Let clonedResponse be the result of cloning this’s response.\n const clonedResponse = cloneResponse(this[kState])\n\n // 3. Return the result of creating a Response object, given\n // clonedResponse, this’s headers’s guard, and this’s relevant Realm.\n const clonedResponseObject = new Response()\n clonedResponseObject[kState] = clonedResponse\n clonedResponseObject[kRealm] = this[kRealm]\n clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList\n clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]\n clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]\n\n return clonedResponseObject\n }", "title": "" }, { "docid": "9bd39585c0d69d2f773a51d8be7ca755", "score": "0.53088677", "text": "response ( response ) {\r\n\t\t\t\r\n\t\t\treturn environment.data.mock ? response : response.json ();\r\n\t\t}", "title": "" }, { "docid": "5ffecb179aec095a54b16ab6cec5760f", "score": "0.52754307", "text": "getClonedRedactedResponse(errResponse) {\n const clonedResponse = {}\n if (errResponse == null) return clonedResponse\n\n if (errResponse.status != null) clonedResponse.status = errResponse.status\n if (errResponse.statusText != null) clonedResponse.statusText = errResponse.statusText\n if (errResponse.headers != null) clonedResponse.headers = safeClone(errResponse.headers)\n\n if (clonedResponse.headers != null) {\n if (clonedResponse.headers['set-cookie'] != null) delete clonedResponse.headers['set-cookie']\n\n if (clonedResponse.headers['x-newrelic-app-data'] != null) delete clonedResponse.headers['x-newrelic-app-data']\n }\n\n if (this.includeResponseData) {\n if (errResponse.data != null) clonedResponse.data = safeClone(errResponse.data)\n } else if (errResponse.data != null && errResponse.data != null) clonedResponse.data = '[REDACTED]'\n\n return clonedResponse\n }", "title": "" }, { "docid": "218244c0917bdae36951264d2fde7837", "score": "0.52642685", "text": "static normalizeContent(response) {\n if (!response.content) {\n reportError('normalizeContent failed');\n return [];\n }\n return response.content.map(ApiNormalizer.normalizeContentSet);\n }", "title": "" }, { "docid": "ce14f2f5fc33c94878810d195f279ec8", "score": "0.5244534", "text": "getIncidentManagement(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"UsageIncidentManagementResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"UsageIncidentManagementResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "79bff17bc52ebef891cb037ce52d0382", "score": "0.5242208", "text": "getIncidentService(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentServiceResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentServiceResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "3b7cff4402696ee3a19d22442d6be8d1", "score": "0.5233929", "text": "createIncident(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 201) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "af9bf05435f2f990919913b8fa8dbe48", "score": "0.5224624", "text": "getResponseBody(response) {\n if(response.status >= 200 && response.status < 300) {\n return Promise.resolve(response);\n }\n else {\n return Promise.reject(new Error(response.statusText));\n }\n }", "title": "" }, { "docid": "1a0be6c1b649f3eaffee10cdaa0dba21", "score": "0.5220607", "text": "validate(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthenticationValidationResponse\");\n return body;\n }\n if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthenticationValidationResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "8bda4670b3593770397517183c90b599", "score": "0.52127606", "text": "function loadResponse() {\n var status = getStatusCode()\n var body = getBody()\n var error = errorFromStatusCode(status, body)\n var response = {\n body: body,\n statusCode: status,\n statusText: xhr.statusText,\n raw: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n } else {\n response.headers = {}\n }\n\n callback(error, response, response.body)\n }", "title": "" }, { "docid": "1e08f8396f4b0344c4bf9512427816dc", "score": "0.5210835", "text": "updateIncident(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "3c742f06047d6f41aeace665b55a95e8", "score": "0.52082336", "text": "getUser(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"UserResponse\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"UserResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "3c742f06047d6f41aeace665b55a95e8", "score": "0.52082336", "text": "getUser(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"UserResponse\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"UserResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "8b18cf8316f95d87ae2f9cccb2191937", "score": "0.52057475", "text": "async handleResponse () {\n\t\tif (this.gotError) {\n\t\t\treturn await super.handleResponse();\n\t\t}\n\n\t\t// need to special case the situation where reviewers are being both added and removed,\n\t\t// since mongo won't let us do this in a single operation\n\t\tawait this.updater.handleAddRemove();\n\n\t\t// remove checkpointReviewDiffs from information returned to the client\n\t\tif (this.responseData.review.$addToSet) {\n\t\t\tdelete this.responseData.review.$addToSet.checkpointReviewDiffs;\n\t\t}\n\t\t\n\t\treturn super.handleResponse();\n\t}", "title": "" }, { "docid": "66bc6c564389a5a44bb8456534641e1c", "score": "0.5188835", "text": "searchCIAppTestEvents(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"CIAppTestEventsResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"CIAppTestEventsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "30d643d66f5599b99d87378e06060d96", "score": "0.51859975", "text": "function handleResponse(resp) {}", "title": "" }, { "docid": "160a5df583238ffc640bc84e5debaa4c", "score": "0.517923", "text": "function interpretAPIResponse(reply) {\r\n if (reply[resourceName] !== undefined) {\r\n reply = reply[resourceName];\r\n }\r\n return reply;\r\n }", "title": "" }, { "docid": "717359d8c728e7beb0b54fe5a8350a37", "score": "0.5176073", "text": "listIncidentAttachments(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentAttachmentsResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentAttachmentsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "2ad5f68b2dea8ae8c0d00458c6087945", "score": "0.5163833", "text": "constructor(response) {\n this.response = response;\n }", "title": "" }, { "docid": "6f8cc2d361d7aa6bdb019a5c55f26fdc", "score": "0.51581866", "text": "response(message) {\n // Check if this is a delete response\n if (message.statusCode === 204) {\n return message;\n }\n\n // Parse response and api source\n let parsed = JSON.parse(message.response);\n let source = message.requestMessage.url.split('/')[0];\n\n // If list, convert each object to model\n if (parsed.objects) {\n parsed.objects = parsed.objects.map(item => new modelMap[source](item));\n return parsed;\n }\n return new modelMap[source](parsed);\n }", "title": "" }, { "docid": "288629e6a62ee7912f8007ab46cda9c4", "score": "0.51532805", "text": "getEvent(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"EventResponse\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"EventResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "ffba31024fad0f1f882f9875d37e39b5", "score": "0.5152795", "text": "getAPITest(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsAPITest\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsAPITest\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "13a9af2ba592f7ea778f7463feb8e4f0", "score": "0.5148934", "text": "getSLO(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SLOResponse\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SLOResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "6cbf78d89c4d6cf85e5b15a0dd4507af", "score": "0.5126965", "text": "submitLog(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"any\");\n return body;\n }\n if (response.httpStatusCode == 400) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"HTTPLogError\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n if (response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"any\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "2874496ebd76f4e7be722eaa1b35afbd", "score": "0.51180553", "text": "handleResponse (status, headers, payload) {\n return payload;\n }", "title": "" }, { "docid": "2028aab1df145d49fb4f9b40ed6708a4", "score": "0.5116532", "text": "deleteIncident(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 204) {\n return;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "3fb2b279c9b5f714f215614a7c71b4f9", "score": "0.51099217", "text": "function handleResponse() {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n resolve(JSON.parse(xhr.responseText));\n } else {\n reject(this.statusText);\n }\n }\n }", "title": "" }, { "docid": "78208aa285788d66d0655f0c719e67b0", "score": "0.51028985", "text": "listCIAppTestEvents(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"CIAppTestEventsResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"CIAppTestEventsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "c3dcbca6ce77823eac21466239fa17ed", "score": "0.509796", "text": "updateBrowserTest(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsBrowserTest\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsBrowserTest\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "6bfdc3bb15b35a7eafdbabc12f9e4d4d", "score": "0.5087492", "text": "function Response(response) {\n // copy relevant information from the response\n _.extend(this, _.pick(response, ['httpVersion', 'statusCode', 'headers', 'body']));\n}", "title": "" }, { "docid": "8525aa2058c53f392711a542db54a4dc", "score": "0.5077675", "text": "deleteGlobalVariable(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n return;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "1021874d23cbfef11fc8c83dc26fa174", "score": "0.50755566", "text": "getAPITestResult(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsAPITestResultFull\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsAPITestResultFull\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "b2a621684493e421f5e5564dc42810a1", "score": "0.5073317", "text": "static parse(response) {\n const json = response.json()\n\n if (response.ok) {\n return json\n }\n\n return json.then(err => {\n throw err\n })\n }", "title": "" }, { "docid": "a450fd1d1a042f6193882b67d449b605", "score": "0.5072029", "text": "updateIncidentService(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentServiceResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentServiceResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "9db47620b146fb4b22c7faeb6fed9fdb", "score": "0.5071753", "text": "updateAPITest(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsAPITest\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsAPITest\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "7cfd2bf584edf9bc847ae0999ce6d8cc", "score": "0.5064012", "text": "getIncidentTeam(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "5870520e29eaf2a941d5b53b65d66b60", "score": "0.5054359", "text": "parse(response) {\n response.creator = new User(_.omit(response.creator, '__type', 'className'), {parse: true});\n response.client = new Client(_.omit(response.client, '__type', 'className'), {parse: true});\n return response;\n }", "title": "" }, { "docid": "fda712fb3efc94b5498e8aaaf948a404", "score": "0.5053664", "text": "function MockResponse(res) {\n this.status = res.status;\n this.data = res.data;\n}", "title": "" }, { "docid": "b1d674e880a2dafa11c925e16fef83dc", "score": "0.50287527", "text": "function parseHTTPRespBody(res) {\n return new Promise((resolve, reject) => {\n\n if(res.headers.get('Content-Type') == 'application/json'){\n res.json()\n .then(body => {\n if (!res.ok) {\n switch(res.status) {\n case 200:\n break;\n \n case 201:\n break;\n \n case 400:\n return reject(makeErrorMessage(errors.badRequest, body.msg));\n \n case 401:\n return reject(makeErrorMessage(errors.notAuthorized, body.msg));\n \n case 404:\n return reject(makeErrorMessage(errors.notFound, body.msg));\n \n default:\n return reject(makeErrorMessage(errors.apiUnreachable, body.msg));\n }\n }\n resolve(body);\n })\n .catch(reject);\n }\n else{\n resolve(res.text())//.then(resolve)\n }\n });\n}", "title": "" }, { "docid": "301bbc898007957c31781c60e173d5c4", "score": "0.50235385", "text": "function decode(xhr){\n var response = xhr.responseText;\n var type = xhr.getResponseHeader('content-type');\n if (response && type && type.match(/json/)){\n response = JSON.parse(response);\n }\n return response;\n }", "title": "" }, { "docid": "4649eedd3271db5b1fc86bcb99f9264a", "score": "0.5022261", "text": "function transformResponse() {\n console.log(\"Transform Response\");\n}", "title": "" }, { "docid": "b5ebf7d7e2635f3fcfeb0c171760ff67", "score": "0.5021831", "text": "function unwrap(result){\n return result.data;\n }", "title": "" }, { "docid": "f401bc3c7825f4cc8c544b78f4736e8f", "score": "0.5014415", "text": "function KradResponse(contents) {\n this.responseContents = contents;\n}", "title": "" }, { "docid": "af21afc138c931b7323f01276f494c02", "score": "0.5011218", "text": "createIncidentService(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 201) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentServiceResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentServiceResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "bdff2d43fb19ed46f6866babdfea6c10", "score": "0.5009414", "text": "getBrowserTestResult(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsBrowserTestResultFull\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsBrowserTestResultFull\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "e405b67ec79344e0dd174a98b9098533", "score": "0.50050217", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var contents = JSProf.LGD(8237, s, 'contents').contents, dataTypes = JSProf.LGD(8238, s, 'dataTypes').dataTypes, responseFields = JSProf.LGD(8239, s, 'responseFields').responseFields, ct, type, finalDataType, firstDataType;\n // Fill responseXXX fields\n for (type in JSProf.LRE(8240, responseFields)) {\n if (JSProf.LRE(8241, type) in JSProf.LRE(8242, responses)) {\n JSProf.LPE(8244, jqXHR, JSProf.TMPS.ta7b528d320c35a7454274b6a402adbaa833936a3 = responseFields[type], jqXHR[JSProf.TMPS.ta7b528d320c35a7454274b6a402adbaa833936a3])[JSProf.TMPS.ta7b528d320c35a7454274b6a402adbaa833936a3] = JSProf.LRPE(8244, JSProf.LGE(8243, responses, 'type', responses[type])[type]);\n }\n }\n // Remove auto dataType and get content-type in the process\n while (JSProf.LGE(8245, dataTypes, 0, dataTypes[0])[0] === \"*\") {\n JSProf.LMC(8246, dataTypes, 'shift').shift();\n if (JSProf.LRE(8247, ct) === undefined) {\n ct = JSProf.LWR(8250, ct, JSProf.LGD(8248, s, 'mimeType').mimeType || JSProf.LMC(8249, jqXHR, 'getResponseHeader').getResponseHeader(\"content-type\"));\n }\n }\n // Check if we're dealing with a known content-type\n if (JSProf.LRE(8251, ct)) {\n for (type in JSProf.LRE(8252, contents)) {\n if (JSProf.LGE(8253, contents, 'type', contents[type])[type] && JSProf.LMC(8255, contents[type], 'test').test(JSProf.LRE(8254, ct))) {\n dataTypes.unshift(JSProf.LRE(8256, type));\n break;\n }\n }\n }\n // Check to see if we have a response for the expected dataType\n if (JSProf.LGE(8257, dataTypes, 0, dataTypes[0])[0] in JSProf.LRE(8258, responses)) {\n finalDataType = JSProf.LWR(8260, finalDataType, JSProf.LGE(8259, dataTypes, 0, dataTypes[0])[0]);\n } else {\n // Try convertible dataTypes\n for (type in JSProf.LRE(8261, responses)) {\n if (!JSProf.LGE(8262, dataTypes, 0, dataTypes[0])[0] || JSProf.LGE(8265, s.converters, JSProf.TMPS.tc4131ad8209617903c7afb081fd76e1268fd567a = JSProf.LRE(8263, type) + \" \" + JSProf.LGE(8264, dataTypes, 0, dataTypes[0])[0], s.converters[JSProf.TMPS.tc4131ad8209617903c7afb081fd76e1268fd567a])[JSProf.TMPS.tc4131ad8209617903c7afb081fd76e1268fd567a]) {\n finalDataType = JSProf.LWR(8267, finalDataType, JSProf.LRE(8266, type));\n break;\n }\n if (!JSProf.LRE(8268, firstDataType)) {\n firstDataType = JSProf.LWR(8270, firstDataType, JSProf.LRE(8269, type));\n }\n }\n // Or just use first one\n finalDataType = JSProf.LWR(8273, finalDataType, JSProf.LRE(8271, finalDataType) || JSProf.LRE(8272, firstDataType));\n }\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (JSProf.LRE(8274, finalDataType)) {\n if (JSProf.LRE(8275, finalDataType) !== JSProf.LGE(8276, dataTypes, 0, dataTypes[0])[0]) {\n dataTypes.unshift(JSProf.LRE(8277, finalDataType));\n }\n return JSProf.LGE(8278, responses, 'finalDataType', responses[finalDataType])[finalDataType];\n }\n }", "title": "" }, { "docid": "a6eb2c072f3238d8b9ebbd055a373401", "score": "0.50007164", "text": "uploadIdPMetadata(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n return;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "5e7d10785933974c0145a3a80cd0efd9", "score": "0.49995193", "text": "deleteWebhooksIntegrationCustomVariable(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n return;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "6a09eb6a3911be708bfe80c38ca16483", "score": "0.49993673", "text": "function decodeResponse(response) {\n if (response.status >= 400) {\n return response.json().then(function(data) {\n return Promise.reject(Error(data.message));\n });\n } else {\n return response.json();\n }\n }", "title": "" }, { "docid": "a1a30f5133409349ecf9aedfd12fdf8f", "score": "0.49978584", "text": "getNotebook(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"NotebookResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"NotebookResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "7bd3007877c438b3ec74a3a74274299d", "score": "0.49958533", "text": "restoreDashboards(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 204) {\n return;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "0e0a22afd35dd5baa6d0057be9d5875d", "score": "0.499434", "text": "getAuthNMapping(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthNMappingResponse\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthNMappingResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "d5d8dd938decc2dbaa2bdde0110da49e", "score": "0.49917316", "text": "updateIncidentAttachments(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentAttachmentUpdateResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentAttachmentUpdateResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "39a08156ddb8e629a2dc5157c05b8371", "score": "0.49903896", "text": "createAuthNMapping(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthNMappingResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthNMappingResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "2dbf129459301f433282300762581de3", "score": "0.49899328", "text": "function parseResponse(xhr) {\n var ct = xhr.getResponseHeader(\"content-type\");\n if (typeof ct == 'string') {\n if (ct.indexOf('xml') >= 0)\n return xhr.responseXML;\n else if (ct.indexOf('json') >= 0)\n return JSON.parse(xhr.responseText);\n }\n return xhr.responseText;\n }", "title": "" }, { "docid": "a30340d17d2afff9c25b837a428d3b05", "score": "0.49873328", "text": "deleteIncidentService(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 204) {\n return;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "882555fbe22e33753934235d5c916e2f", "score": "0.49872378", "text": "validateMonitor(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"any\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"any\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "6655286164e2feba91634d611ac29cf8", "score": "0.49871188", "text": "function _handleResponse(request) {\n var $this = this;\n\n // Before returning the response, parse it.\n // This success handler is called inside the Promise, so we need to\n // keep the current context.\n\n // Also, By not providing an error interceptor, we will let the error\n // propagate from `EVT.api()` to the `resource.read()` promise error\n // handler\n return request.then(function (response) {\n return $this.parse(response);\n });\n }", "title": "" }, { "docid": "13e8823a3f411c0a73c51ddf8c0a8761", "score": "0.49546745", "text": "createIncidentTeam(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 201) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "270d24094a5602b04e380db183624ef3", "score": "0.49540055", "text": "updateLogsPipelineOrder(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"LogsPipelinesOrder\");\n return body;\n }\n if (response.httpStatusCode == 400 || response.httpStatusCode == 422) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"LogsAPIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"LogsPipelinesOrder\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "40cf4f88a5eb078e294199b7e15b7245", "score": "0.49479964", "text": "searchCIAppPipelineEvents(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"CIAppPipelineEventsResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"CIAppPipelineEventsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "4e4ee3ef8faa630c6cb9ba18dd136812", "score": "0.4946175", "text": "function loadResponse() {\n var status = getStatusCode();\n var error = errorFromStatusCode(status);\n var response = {\n body: getBody(),\n statusCode: status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders())\n };\n\n callback(error, response, response.body);\n }", "title": "" }, { "docid": "3fd222091fa2f0578b1b35968299dca5", "score": "0.49448276", "text": "updateAuthNMapping(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthNMappingResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 409 ||\n response.httpStatusCode == 422 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"AuthNMappingResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "60c035f1474ca71377426030387e914f", "score": "0.4942868", "text": "submitServiceCheck(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 202) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IntakePayloadAccepted\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 408 ||\n response.httpStatusCode == 413 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IntakePayloadAccepted\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "5e6f1f4e06ea45ed07d48efe938071b1", "score": "0.49231642", "text": "getResponse() {\n return this.response\n }", "title": "" }, { "docid": "a2bb6e1d66b597ae60327071abd4017f", "score": "0.49228665", "text": "async processResponse( responseObject, methodHandler ) {\n\n const result = await methodHandler.onResponse( responseObject.result );\n\n return { result };\n }", "title": "" }, { "docid": "baf04f4e786bb35ca884dc45c58fa5d2", "score": "0.49224147", "text": "removeRoleFromArchive(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 204) {\n return;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "8e5a116f94f734c3ebda9f17862fd121", "score": "0.49219948", "text": "function deserializeResponse(data) {\n return Promise.resolve(new Response(data.body, data));\n}", "title": "" }, { "docid": "5f97b7ddd1b729622013aab23e2edeb9", "score": "0.49203876", "text": "deleteAuthNMapping(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 204) {\n return;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"void\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "0cd574ba73010356d73b194bb5bf1adc", "score": "0.49146193", "text": "searchIncidents(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentSearchResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentSearchResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "2a41a86259efb65af0ca6bc3908a07e7", "score": "0.4914522", "text": "getRUMApplications(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"RUMApplicationsResponse\");\n return body;\n }\n if (response.httpStatusCode == 404 || response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"RUMApplicationsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "c34320801a7291db11a7e8b2858ed9dd", "score": "0.49133852", "text": "@wire(getObjectInfo, {objectApiName: '$targetObjectApiName'})\n wiredTargetObjectInfo(response) {\n if (response.data) {\n this.targetObjectInfo = response;\n this.queryFields = this.getQueryFields();\n }\n }", "title": "" }, { "docid": "d58e71f5261010be39cd934138c252a6", "score": "0.49053186", "text": "function IncomingMessage(response, body) {\n\tthis.body = body;\n//\tTODO: Implement cookies. Use Set-Cookie header? (one for each cookie?) \n//\tFormatting? An array of strings?? is each string a name value pair?\n\tthis.cookies = response.getResponseHeader('Set-Cookie');\n\tthis.statusCode = response.status;\n\tthis.statusMessage = response.statusText;\n}", "title": "" }, { "docid": "75cbf20a9bed6a2606afeb0425678fd7", "score": "0.4905161", "text": "getBrowserTest(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsBrowserTest\");\n return body;\n }\n if (response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsBrowserTest\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "8e7db62e2f3e0658634d89adc0539988", "score": "0.49043506", "text": "function responseData(response) {\n return response.data;\n }", "title": "" }, { "docid": "8e7db62e2f3e0658634d89adc0539988", "score": "0.49043506", "text": "function responseData(response) {\n return response.data;\n }", "title": "" }, { "docid": "93b754563499ca3e2d609d6f578fee16", "score": "0.48995554", "text": "function ResponseObject(metadata) {\n\tthis.data = metadata.data || false;\n\tthis.path = metadata.path || \"\";\n\tthis.status = metadata.status || 200;\n\tthis.type = metadata.type || false;\n}", "title": "" }, { "docid": "115388d4203162d2b13208bde6b069a2", "score": "0.48946816", "text": "function processFetchResponse(response) {\r\n\r\n\tif (!response.ok) {\r\n\t\treturn Promise.reject({\r\n\t\t\t\"status\": response.status,\r\n\t\t\t\"statusText\": response.statusText\r\n\t\t});\r\n\t}\r\n\r\n\tconst contentType = response.headers.get(\"Content-Type\") || \"\";\r\n\r\n\tif (contentType.includes(\"application/json\")) {\r\n\r\n\t\treturn response.json().catch(error => {\r\n\t\t\treturn Promise.reject(`JSON error: ${error.message}`);\r\n\t\t});\r\n\t}\r\n\r\n\tif (contentType.includes(\"text/html\")) {\r\n\t\treturn response.text().then(html => {\r\n\t\t\treturn {\r\n\t\t\t\tpage_type: \"generic\",\r\n\t\t\t\thtml: html\r\n\t\t\t};\r\n\t\t}).catch(error => {\r\n\t\t\treturn Promise.reject(`HTML error: ${error.message}`);\r\n\t\t});\r\n\t}\r\n\r\n\treturn Promise.reject(`Invalid content type: ${contentType}`);\r\n}", "title": "" }, { "docid": "77b7edb4756fed01c2d33fc355c20eda", "score": "0.4890043", "text": "updateIncidentTeam(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "3308ce212e19fd8b81d1e9f2819691f5", "score": "0.48875415", "text": "getResponse() {\n // tslint:disable-line:no-any\n return this.res;\n }", "title": "" }, { "docid": "c46861a75fa41d92697f99a2a9ba47bd", "score": "0.48870942", "text": "listIncidentTeams(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamsResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 401 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"IncidentTeamsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "1ccaa1a538738673a55863a4ea706bfd", "score": "0.48869303", "text": "function simpleMessageResponse() {\n var that = {}; // base object\n var typeName = 'simpleMessageResponse'; // object type name\n var realType = 'SimpleMessageResponse';\n var message = '';\n var customResponseFields = [];\n\n //-------- Private Methods --------//\n\n //\n // Determines whether two asociative arrays are identical.\n //\n // @param rhs An asociative array object\n // @param lhs An asociative array object\n // @return {Boolean} True if two arrays are identical; otherwise, false.\n //\n function isSameArray(rhs, lhs) {\n var retVal = true;\n var key = null;\n\n if (rhs === undefined || rhs === null ||\n lhs === undefined || lhs === null) {\n throw new Error('Invalid argument. rhs and lhs must be asociative arrays');\n }\n\n for (key in rhs) {\n if (rhs[key] !== lhs[key]) {\n retVal = false;\n break;\n }\n }\n\n if (retVal === true) {\n for (key in lhs) {\n if (lhs[key] !== rhs[key]) {\n retVal = false;\n break;\n }\n }\n }\n\n return retVal;\n }\n\n //-------- Public Methods --------//\n\n //\n // Determines whether two simpleMessageResponse objects have the same value\n //\n // @param obj A simpleMessageResponse object\n // @return {Boolean} True if obj is an instance of simpleMessageResponse and\n // its value is the same as this instance; otherwise, false.\n //\n function equals(obj) {\n var retVal = true;\n\n if (obj === null) {\n retVal = false;\n }\n else if (that === obj) {\n retVal = true;\n }\n else if(!obj.hasOwnProperty('typeOf') || obj.typeOf !== typeName) {\n retVal = false;\n }\n else if (that.message !== obj.message ||\n ! isSameArray(that.customResponseFields, obj.customResponseFields)) {\n retVal = false;\n }\n\n return retVal;\n }\n\n //\n // XML Deserialization\n //\n // @param xml A given xml content (string) or a JSXBObject object.\n // @remarks This function assumes the argument xml is a JSXBObject object\n // if xml is not a string.\n //\n function fromXML(xml) {\n var root = null;\n var node = null;\n var obj = [];\n var i = 0;\n\n\n // Tag: ResponseDefinition\n root = getRootNode(xml, 'ResponseDefinition');\n\n // Tag: ResponseDefinition Attribute: xsi:type\n if (root['xsi:type'] === undefined) {\n throw new Error('xsi:type undefined');\n }\n else if (realType !== root['xsi:type']) {\n throw new Error(that.typeOf + ': wrong type - ' + root['xsi:type']);\n }\n\n // Tag: Message (optional)\n if (root.Message !== undefined &&\n root.Message[0].text !== undefined) {\n that.message = root.Message[0].text;\n }\n else {\n that.message = '';\n }\n\n // Tag: CustomResponseFields (optional)\n that.customResponseFields = []; //clean-out array\n if (root.CustomResponseFields !== undefined &&\n root.CustomResponseFields.length > 0 &&\n root.CustomResponseFields[0].CustomResponseField !== undefined &&\n root.CustomResponseFields[0].CustomResponseField.length > 0) {\n // Tag: CustomResponseField\n node = root.CustomResponseFields[0].CustomResponseField;\n for (i = 0; i < node.length; i += 1) {\n obj = customResponseField();\n obj.fromXML(node[i]);\n that.customResponseFields.push(obj);\n }\n }\n }\n\n //\n // XML Serialization\n //\n // @return A XML string.\n //\n function toXML() {\n var xml = '';\n var temp = '';\n var count = 0;\n var key;\n\n xml += '<ResponseDefinition ' + xsiType + realType + '\">';\n xml += '<Message>' + that.message + '</Message>';\n xml += '<CustomResponseFields>';\n if (that.customResponseFields.length >0) {\n for (i=0; i< that.customResponseFields.length; i+=1){\n xml += that.customResponseFields[i].toXML();\n }\n }\n xml += '</CustomResponseFields>';\n xml += '</ResponseDefinition>';\n\n return xml;\n }\n\n // Expose public fields\n that.typeOf = typeName;\n that.message = message;\n that.customResponseFields = customResponseFields;\n // Expose public methods\n that.equals = equals;\n that.fromXML = fromXML;\n that.toXML = toXML;\n\n return that;\n }", "title": "" }, { "docid": "09070e835e6b75923f46f3ecb64e6a84", "score": "0.48840553", "text": "deleteTests(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers[\"content-type\"]);\n if (response.httpStatusCode == 200) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsDeleteTestsResponse\");\n return body;\n }\n if (response.httpStatusCode == 400 ||\n response.httpStatusCode == 403 ||\n response.httpStatusCode == 404 ||\n response.httpStatusCode == 429) {\n const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);\n let body;\n try {\n body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, \"APIErrorResponse\");\n }\n catch (error) {\n logger_1.logger.info(`Got error deserializing error: ${error}`);\n throw new exception_1.ApiException(response.httpStatusCode, bodyText);\n }\n throw new exception_1.ApiException(response.httpStatusCode, body);\n }\n // Work around for missing responses in specification, e.g. for petstore.yaml\n if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {\n const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), \"SyntheticsDeleteTestsResponse\", \"\");\n return body;\n }\n const body = (yield response.body.text()) || \"\";\n throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\\nBody: \"' + body + '\"');\n });\n }", "title": "" }, { "docid": "8c76d051546383bf778a1d20d3a7a71f", "score": "0.4881502", "text": "function parseContent(response) {\n return atob(JSON.parse(response)['content']);\n}", "title": "" }, { "docid": "faa29ec6aab577d561fc7902ec757400", "score": "0.48762164", "text": "function ThaliXMLHttpResponseObject() {\n this.type = \"RESPONSE_XMLHTTP\";\n this.transactionId = \"\";\n this.status = \"\";\n this.headers = {};\n this.responseText = \"\";\n}", "title": "" }, { "docid": "942084afefd5bc4d08204a0a15c39b6c", "score": "0.48755905", "text": "rewriteReverseResponse (response) { return response }", "title": "" } ]
c384a29627471b91fc3d358079d2005f
Parse the AcceptLanguage header.
[ { "docid": "5ca165ea62e4ea13d276339b0ba82e97", "score": "0.6818877", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" } ]
[ { "docid": "4beacd0731b271930166292b5fd13429", "score": "0.7022243", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n } // trim accepts\n\n\n accepts.length = j;\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.6902476", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.6902476", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.6902476", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.6902476", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "6868de8476213ebe53aab10a0386df36", "score": "0.6902476", "text": "function parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var language = parseLanguage(accepts[i].trim(), i);\n\n if (language) {\n accepts[j++] = language;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.68145174", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.68145174", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.68145174", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "2b106b52bb86840de44ac917b4e770a2", "score": "0.68145174", "text": "function parseAcceptLanguage(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var langauge = parseLanguage(accepts[i].trim(), i);\n\n\t if (langauge) {\n\t accepts[j++] = langauge;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "c3d8b0efe2a1012567f7a7ba4df4d5bf", "score": "0.5833711", "text": "function listener() {\n let language = selectLanguage(store.getState());\n axios.defaults.headers.common[\"Accept-Language\"] = language;\n}", "title": "" }, { "docid": "164c7103e92368471aa327cc22c435ec", "score": "0.57718503", "text": "function parseLanguage(language) {\n // Normalise to lower case\n language = language.toLowerCase();\n // See if it's an exact match\n if (language in Language) {\n return language;\n }\n // Check language aliases\n if (language in LANGUAGE_ALIASES) {\n return LANGUAGE_ALIASES[language];\n }\n return undefined;\n}", "title": "" }, { "docid": "71759f24fb1d369fd44edcd800abc0ee", "score": "0.57401043", "text": "function preferedLanguage(acceptLanguage) {\n let result = [];\n \n \n const langs = acceptLanguage.split(/,\\s*/);\n for(let lang of langs) {\n const parts = lang.match(/^(([a-zA-Z][a-zA-Z])(-.*)?)(\\s*;\\s*q=(\\d+\\.\\d+|\\.\\d+|\\d+\\.|\\d+))?$/);\n // 12 3 4 5 \n \n if (parts) {\n // iso639 language codes are case insensitive:\n // https://www.loc.gov/standards/iso639-2/faq.html#21\n const lcode=parts[2].toLowerCase();\n const lscore=+parts[5]||1.0;\n result.push({lang: lcode, score: lscore})\n }\n }\n \n result.sort((a,b) => b.score - a.score); // descending order!\n return result;\n}", "title": "" }, { "docid": "85411e8c0221f20bf1cb8e9e650e4590", "score": "0.5692625", "text": "function getLanguage(msg, callback) {\n let options = {\n url: 'http://149.202.214.34:4001/language_detect?',\n form: { msg }\n }\n request.post(options, function(err,res) {\n if(err) callback(err)\n else {\n try{\n let out = JSON.parse(res.body)\n callback(null,out.lang)\n } catch(e){\n if(res.body) callback(res.body)\n else callback(e)\n }\n }\n })\n}", "title": "" }, { "docid": "9b8b0d9035a1a9e1caa6403231221ed2", "score": "0.5618022", "text": "function getLanguageFromReq(req, _, next) {\n\tconst regex = new RegExp(`\\/(?<lang>${locales.join(\"|\")})(?:\\/|$)`)\n\tconst match = req.url\n\t\t.match(regex);\n\n\tconst lang = match ? match.groups.lang : getPreferredLanguage(req);\n\n\treq.lang = lang;\n\tnext();\n}", "title": "" }, { "docid": "ee596c88db9f515584a3212397f0524f", "score": "0.5480844", "text": "function preferredLanguages(accept, provided) {\n\t // RFC 2616 sec 14.4: no header = *\n\t var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all languages\n\t return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getLanguagePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted languages\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" }, { "docid": "ee596c88db9f515584a3212397f0524f", "score": "0.5480844", "text": "function preferredLanguages(accept, provided) {\n\t // RFC 2616 sec 14.4: no header = *\n\t var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all languages\n\t return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getLanguagePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted languages\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" }, { "docid": "862ca496bd5c470dc3346d2eae4bab0c", "score": "0.5473137", "text": "function parseI18n(callback) {\n query_lang = getUrlParameter('lang');\n if (query_lang) {\n $.i18n().locale = query_lang;\n callback.call();\n }\n else {\n $.getJSON('https://api.ipdata.co/?api-key=' + MM_IPDATA_API_KEY, function(ipdata){\n if (ipdata.languages && ipdata.languages.length > 0) {\n $.i18n().locale = ISO6391.getCode(ipdata.languages[0].name);\n }\n else {\n $.i18n().locale = navigator.language;\n }\n callback.call();\n })\n .fail(function() {\n console.warn( \"failed to load IP data for auto-selecting language\" );\n $.i18n().locale = navigator.language;\n callback.call();\n })\n }\n}", "title": "" }, { "docid": "6793530b348ab0ffc09d1adc97512359", "score": "0.54468983", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n }); // sorted list of accepted languages\n\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "ed0f92e4b7a3b32d1c2e54e7b424273c", "score": "0.54414773", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "ed0f92e4b7a3b32d1c2e54e7b424273c", "score": "0.54414773", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "3edcc1a8c10a44232d0921768765e5a8", "score": "0.54320264", "text": "function get_langs() {\n var param, result;\n\n result = [];\n param = get_param_string(query, \"lang\");\n if (param !== undefined)\n result.push(param);\n\n /* https://developer.mozilla.org/en/docs/DOM/window.navigator.language */\n if (window.navigator.language)\n result.push(window.navigator.language);\n\n return result;\n}", "title": "" }, { "docid": "81d7ecb861ab791b90a0cb3808d0f0bf", "score": "0.54118633", "text": "function preferredLanguages(accept, provided) {\n\t // RFC 2616 sec 14.4: no header = *\n\t var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all languages\n\t return accepts\n\t .filter(isQuality)\n\t .sort(compareSpecs)\n\t .map(getFullLanguage);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getLanguagePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted languages\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" }, { "docid": "81d7ecb861ab791b90a0cb3808d0f0bf", "score": "0.54118633", "text": "function preferredLanguages(accept, provided) {\n\t // RFC 2616 sec 14.4: no header = *\n\t var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n\t if (!provided) {\n\t // sorted list of all languages\n\t return accepts\n\t .filter(isQuality)\n\t .sort(compareSpecs)\n\t .map(getFullLanguage);\n\t }\n\n\t var priorities = provided.map(function getPriority(type, index) {\n\t return getLanguagePriority(type, accepts, index);\n\t });\n\n\t // sorted list of accepted languages\n\t return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n\t return provided[priorities.indexOf(priority)];\n\t });\n\t}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "f0c875b4e1972a64b421444993cb2e60", "score": "0.53709275", "text": "function preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts\n .filter(isQuality)\n .sort(compareSpecs)\n .map(getFullLanguage);\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}", "title": "" }, { "docid": "bcee9de7fe83eae574756cab04622810", "score": "0.5295094", "text": "function getLanguage( language_country ){ return language_country.split('-')[0]; }", "title": "" }, { "docid": "48d7bcb140f0653f394a6f7e30e98b1c", "score": "0.52926904", "text": "function parseLocation() {\n location = window.history.location || window.location;\n var rePath = /https?:\\/\\/[^\\/]+(.*)/i;\n var match = rePath.exec(location);\n path = match[1];\n if (startsWith(path, \"/en/\") || path == \"/en\") {\n lang = \"en\";\n rel = path == \"/en\" ? \"\" : path.substring(4);\n uiStrings = uiStringsEn;\n }\n else if (startsWith(path, \"/hu/\") || path == \"/hu\") {\n lang = \"hu\";\n rel = path == \"/hu\" ? \"\" : path.substring(4);\n uiStrings = uiStringsHu;\n }\n else if (startsWith(path, \"/de/\") || path == \"/de\") {\n lang = \"de\";\n rel = path == \"/de\" ? \"\" : path.substring(4);\n uiStrings = uiStringsDe;\n }\n else {\n lang = \"en\";\n rel = path;\n }\n }", "title": "" }, { "docid": "528d4d994cfd6399e43aa1e99a598b85", "score": "0.5288122", "text": "function detectLocale () {\n var _lang = null;\n\n if (navigator.languages && navigator.languages.length) {\n // latest versions of Chrome and Firefox set this correctly\n _lang = navigator.languages[0];\n } else if (navigator.userLanguage) {\n // IE only\n _lang = navigator.userLanguage;\n } else {\n // latest versions of Chrome, Firefox, and Safari set this correctly\n _lang = navigator.language;\n }\n\n var _exceptions = {\n 'en' : 'en-GB',\n 'fr' : 'fr-FR'\n };\n\n if (_exceptions[_lang]) {\n _lang = _exceptions[_lang];\n }\n\n return _lang;\n }", "title": "" }, { "docid": "8d799ffac376d360d9450dc20825011b", "score": "0.52474314", "text": "validate(language) { return [\"ru\", \"cs\", \"it\", \"zh\"].includes(language) ? language : \"en\"; }", "title": "" }, { "docid": "7201584b0509ab082dfa68992807d3ef", "score": "0.5218113", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n } // trim accepts\n\n\n accepts.length = j;\n return accepts;\n}", "title": "" }, { "docid": "e46bc764f64a0aef684fc7e1ffbbea04", "score": "0.516182", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case 'Region':\n\t // 3.3 WebVTT region metadata header syntax\n\t console.log('parse region', v);\n\t //parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "f12312638a2ce9ec7a03946f5beb1993", "score": "0.5161458", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case \"Region\":\n\t // 3.3 WebVTT region metadata header syntax\n\t parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "f12312638a2ce9ec7a03946f5beb1993", "score": "0.5161458", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case \"Region\":\n\t // 3.3 WebVTT region metadata header syntax\n\t parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "f12312638a2ce9ec7a03946f5beb1993", "score": "0.5161458", "text": "function parseHeader(input) {\n\t parseOptions(input, function (k, v) {\n\t switch (k) {\n\t case \"Region\":\n\t // 3.3 WebVTT region metadata header syntax\n\t parseRegion(v);\n\t break;\n\t }\n\t }, /:/);\n\t }", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "1b0c2c621b78b4618afb04b06a90157d", "score": "0.50979644", "text": "function parseAcceptCharset(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var charset = parseCharset(accepts[i].trim(), i);\n\n if (charset) {\n accepts[j++] = charset;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.5084619", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.5084619", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.5084619", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "57ca5204c453d2d08de5e7cd2b2d4efe", "score": "0.5084619", "text": "function parseAcceptCharset(accept) {\n\t var accepts = accept.split(',');\n\n\t for (var i = 0, j = 0; i < accepts.length; i++) {\n\t var charset = parseCharset(accepts[i].trim(), i);\n\n\t if (charset) {\n\t accepts[j++] = charset;\n\t }\n\t }\n\n\t // trim accepts\n\t accepts.length = j;\n\n\t return accepts;\n\t}", "title": "" }, { "docid": "d6ab998e4bc736d48115085db448d638", "score": "0.507723", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n } // trim accepts\n\n\n accepts.length = j;\n return accepts;\n}", "title": "" }, { "docid": "cc636f7ac23c477219c4dcb48e501a55", "score": "0.5073916", "text": "function parseHeader(input) {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }", "title": "" }, { "docid": "cc636f7ac23c477219c4dcb48e501a55", "score": "0.5073916", "text": "function parseHeader(input) {\n parseOptions(input, function (k, v) {\n switch (k) {\n case \"Region\":\n // 3.3 WebVTT region metadata header syntax\n parseRegion(v);\n break;\n }\n }, /:/);\n }", "title": "" }, { "docid": "fd84a2dba172dbeed50dc16e321a1c31", "score": "0.5068341", "text": "function extractLanguage(locale) {\n return locale.split('_')[0];\n}", "title": "" }, { "docid": "5f1b0a2c656ca829f4f90b30d47d9786", "score": "0.5044416", "text": "function validateLanguage( lang ){ return languages.indexOf( lang ) > -1 ? lang : ''; }", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "110bb272de9b4369f06f6f0a9abf729f", "score": "0.5027248", "text": "function parseAcceptEncoding(accept) {\n var accepts = accept.split(',');\n var hasIdentity = false;\n var minQuality = 1;\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var encoding = parseEncoding(accepts[i].trim(), i);\n\n if (encoding) {\n accepts[j++] = encoding;\n hasIdentity = hasIdentity || specify('identity', encoding);\n minQuality = Math.min(minQuality, encoding.q || 1);\n }\n }\n\n if (!hasIdentity) {\n /*\n * If identity doesn't explicitly appear in the accept-encoding header,\n * it's added to the list of acceptable encoding with the lowest q\n */\n accepts[j++] = {\n encoding: 'identity',\n q: minQuality,\n i: i\n };\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}", "title": "" }, { "docid": "30498f7a00238357fcc5fc9ddc1235f3", "score": "0.50108665", "text": "function getHeaders(language=null) {\n const headers = {\n 'MIME-Version': '1.0',\n 'Content-Type': 'text/plain; charset=UTF-8',\n 'Content-Transfer-Encoding': '8bit'\n }\n if (language) {\n headers['Language'] = language\n }\n return headers\n}", "title": "" }, { "docid": "6eb20deac6c30ce1df8a555a02097575", "score": "0.5008735", "text": "function parseLanguage(str, i) {\n\t var match = simpleLanguageRegExp.exec(str);\n\t if (!match) return null;\n\n\t var prefix = match[1],\n\t suffix = match[2],\n\t full = prefix;\n\n\t if (suffix) full += \"-\" + suffix;\n\n\t var q = 1;\n\t if (match[3]) {\n\t var params = match[3].split(';');\n\t for (var i = 0; i < params.length; i++) {\n\t var p = params[i].split('=');\n\t if (p[0] === 'q') q = parseFloat(p[1]);\n\t }\n\t }\n\n\t return {\n\t prefix: prefix,\n\t suffix: suffix,\n\t q: q,\n\t i: i,\n\t full: full\n\t };\n\t}", "title": "" }, { "docid": "6eb20deac6c30ce1df8a555a02097575", "score": "0.5008735", "text": "function parseLanguage(str, i) {\n\t var match = simpleLanguageRegExp.exec(str);\n\t if (!match) return null;\n\n\t var prefix = match[1],\n\t suffix = match[2],\n\t full = prefix;\n\n\t if (suffix) full += \"-\" + suffix;\n\n\t var q = 1;\n\t if (match[3]) {\n\t var params = match[3].split(';');\n\t for (var i = 0; i < params.length; i++) {\n\t var p = params[i].split('=');\n\t if (p[0] === 'q') q = parseFloat(p[1]);\n\t }\n\t }\n\n\t return {\n\t prefix: prefix,\n\t suffix: suffix,\n\t q: q,\n\t i: i,\n\t full: full\n\t };\n\t}", "title": "" }, { "docid": "f63fcebd8db2a1ad018eec99b0355c23", "score": "0.50085986", "text": "function parseLanguage(str, i) {\n\t var match = simpleLanguageRegExp.exec(str);\n\t if (!match) return null;\n\n\t var prefix = match[1],\n\t suffix = match[2],\n\t full = prefix;\n\n\t if (suffix) full += \"-\" + suffix;\n\n\t var q = 1;\n\t if (match[3]) {\n\t var params = match[3].split(';')\n\t for (var i = 0; i < params.length; i ++) {\n\t var p = params[i].split('=');\n\t if (p[0] === 'q') q = parseFloat(p[1]);\n\t }\n\t }\n\n\t return {\n\t prefix: prefix,\n\t suffix: suffix,\n\t q: q,\n\t i: i,\n\t full: full\n\t };\n\t}", "title": "" }, { "docid": "f63fcebd8db2a1ad018eec99b0355c23", "score": "0.50085986", "text": "function parseLanguage(str, i) {\n\t var match = simpleLanguageRegExp.exec(str);\n\t if (!match) return null;\n\n\t var prefix = match[1],\n\t suffix = match[2],\n\t full = prefix;\n\n\t if (suffix) full += \"-\" + suffix;\n\n\t var q = 1;\n\t if (match[3]) {\n\t var params = match[3].split(';')\n\t for (var i = 0; i < params.length; i ++) {\n\t var p = params[i].split('=');\n\t if (p[0] === 'q') q = parseFloat(p[1]);\n\t }\n\t }\n\n\t return {\n\t prefix: prefix,\n\t suffix: suffix,\n\t q: q,\n\t i: i,\n\t full: full\n\t };\n\t}", "title": "" }, { "docid": "d5d2d2cafc89d56951345e0687535664", "score": "0.49564403", "text": "function parseLanguage(str, i) {\n var match = simpleLanguageRegExp.exec(str);\n if (!match) return null;\n\n var prefix = match[1],\n suffix = match[2],\n full = prefix;\n\n if (suffix) full += \"-\" + suffix;\n\n var q = 1;\n if (match[3]) {\n var params = match[3].split(';');\n for (var i = 0; i < params.length; i++) {\n var p = params[i].split('=');\n if (p[0] === 'q') q = parseFloat(p[1]);\n }\n }\n\n return {\n prefix: prefix,\n suffix: suffix,\n q: q,\n i: i,\n full: full\n };\n}", "title": "" }, { "docid": "d5d2d2cafc89d56951345e0687535664", "score": "0.49564403", "text": "function parseLanguage(str, i) {\n var match = simpleLanguageRegExp.exec(str);\n if (!match) return null;\n\n var prefix = match[1],\n suffix = match[2],\n full = prefix;\n\n if (suffix) full += \"-\" + suffix;\n\n var q = 1;\n if (match[3]) {\n var params = match[3].split(';');\n for (var i = 0; i < params.length; i++) {\n var p = params[i].split('=');\n if (p[0] === 'q') q = parseFloat(p[1]);\n }\n }\n\n return {\n prefix: prefix,\n suffix: suffix,\n q: q,\n i: i,\n full: full\n };\n}", "title": "" }, { "docid": "719c738645669a892876a8274cfb854f", "score": "0.49559146", "text": "function parseLanguage(str, i) {\n var match = simpleLanguageRegExp.exec(str);\n if (!match) return null;\n\n var prefix = match[1],\n suffix = match[2],\n full = prefix;\n\n if (suffix) full += \"-\" + suffix;\n\n var q = 1;\n if (match[3]) {\n var params = match[3].split(';')\n for (var i = 0; i < params.length; i ++) {\n var p = params[i].split('=');\n if (p[0] === 'q') q = parseFloat(p[1]);\n }\n }\n\n return {\n prefix: prefix,\n suffix: suffix,\n q: q,\n i: i,\n full: full\n };\n}", "title": "" }, { "docid": "719c738645669a892876a8274cfb854f", "score": "0.49559146", "text": "function parseLanguage(str, i) {\n var match = simpleLanguageRegExp.exec(str);\n if (!match) return null;\n\n var prefix = match[1],\n suffix = match[2],\n full = prefix;\n\n if (suffix) full += \"-\" + suffix;\n\n var q = 1;\n if (match[3]) {\n var params = match[3].split(';')\n for (var i = 0; i < params.length; i ++) {\n var p = params[i].split('=');\n if (p[0] === 'q') q = parseFloat(p[1]);\n }\n }\n\n return {\n prefix: prefix,\n suffix: suffix,\n q: q,\n i: i,\n full: full\n };\n}", "title": "" }, { "docid": "719c738645669a892876a8274cfb854f", "score": "0.49559146", "text": "function parseLanguage(str, i) {\n var match = simpleLanguageRegExp.exec(str);\n if (!match) return null;\n\n var prefix = match[1],\n suffix = match[2],\n full = prefix;\n\n if (suffix) full += \"-\" + suffix;\n\n var q = 1;\n if (match[3]) {\n var params = match[3].split(';')\n for (var i = 0; i < params.length; i ++) {\n var p = params[i].split('=');\n if (p[0] === 'q') q = parseFloat(p[1]);\n }\n }\n\n return {\n prefix: prefix,\n suffix: suffix,\n q: q,\n i: i,\n full: full\n };\n}", "title": "" } ]
aa9753bbc8911338c1a2f45fa0d81dd3
Normalizes slashes and ensures absolute root
[ { "docid": "b30e559dfbbd9bf589f60831427a3663", "score": "0.0", "text": "static fixupPattern(pattern) {\n // Empty\n assert(pattern, 'pattern cannot be empty');\n // Must not contain `.` segment, unless first segment\n // Must not contain `..` segment\n const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));\n assert(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);\n // Must not contain globs in root, e.g. Windows UNC path \\\\foo\\b*r\n assert(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);\n // Normalize slashes\n pattern = pathHelper.normalizeSeparators(pattern);\n // Replace leading `.` segment\n if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) {\n pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1);\n }\n // Replace leading `~` segment\n else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {\n const homedir = os.homedir();\n assert(homedir, 'Unable to determine HOME directory');\n assert(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);\n pattern = Pattern.globEscape(homedir) + pattern.substr(1);\n }\n // Replace relative drive root, e.g. pattern is C: or C:foo\n else if (IS_WINDOWS &&\n (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\\\]/i))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', pattern.substr(0, 2));\n if (pattern.length > 2 && !root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(2);\n }\n // Replace relative root, e.g. pattern is \\ or \\foo\n else if (IS_WINDOWS && (pattern === '\\\\' || pattern.match(/^\\\\[^\\\\]/))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', '\\\\');\n if (!root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(1);\n }\n // Otherwise ensure absolute root\n else {\n pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern);\n }\n return pathHelper.normalizeSeparators(pattern);\n }", "title": "" } ]
[ { "docid": "b7125592bd141e9337d3bc3d51c426ef", "score": "0.7138155", "text": "normalize(path2) {\n if (path2 = this.toPosix(path2), assertPath(path2), path2.length === 0)\n return \".\";\n let protocol = \"\";\n const isAbsolute = path2.startsWith(\"/\");\n this.hasProtocol(path2) && (protocol = this.rootname(path2), path2 = path2.slice(protocol.length));\n const trailingSeparator = path2.endsWith(\"/\");\n return path2 = normalizeStringPosix(path2, !1), path2.length > 0 && trailingSeparator && (path2 += \"/\"), isAbsolute ? `/${path2}` : protocol + path2;\n }", "title": "" }, { "docid": "5c97e96010f5a5c9e87fad2b52d12edc", "score": "0.7099316", "text": "function normalizePath(p) {\n if (!p) return p;\n return path.normalize(p).replace(/\\\\/g, '/').replace(/^\\/+/, '');\n}", "title": "" }, { "docid": "4c022332db2f8dd21360ca1fed995db9", "score": "0.6924906", "text": "function normalizePath2(path) {\n // 1. Preparations\n path = path.trim();\n let leading_slashes_regexp = /^[/\\\\]*/g; // Get as many / or \\ slashes as there are in the very beginning of path. Can also be \"\" (an empty string).\n let leading_slashes = leading_slashes_regexp.exec(path)[0];\n // 2. Run the original normalizePath()\n path = obsidian.normalizePath(path);\n // 3. Fixes\n // Check that correct slashes are used.\n if (isWindows()) {\n // The platform is Windows.\n // Convert / to \\\n path = path.replace(/\\//g, \"\\\\\"); // Need to use a regexp instead of a normal \"/\" -> \"\\\\\" replace because the normal replace would only replace first occurrence of /.\n leading_slashes = leading_slashes.replace(/\\//g, \"\\\\\"); // Same here.\n }\n // Now ensure that path still contains leading slashes (if there were any before calling normalizePath()).\n // Check that the path should have a similar set of leading slashes at the beginning. It can be at least \"/\" (on linux/Mac), or \"\\\\\" (on Windows when it's a network path), in theory even \"///\" or \"\\\\\\\\\\\" whatever.\n // normalizePath() seems to remove leading slashes (and they are needed to be re-added), but it's needed to check first, otherwise the path would have double leading slashes if normalizePath() gets fixed in the future.\n if (leading_slashes.length && path.slice(0, leading_slashes.length) !== leading_slashes) {\n // The path does not contain the required set of leading slashes, so add them.\n path = leading_slashes + path;\n }\n // 4. Done\n return path;\n}", "title": "" }, { "docid": "97354005a47084c43d920f178a1e26fd", "score": "0.69213825", "text": "function fix_slashes(pathname) {\n if (pathname.slice(-1) != '/') {\n return pathname + '/';\n }\n return pathname;\n}", "title": "" }, { "docid": "50f9014f169d2609e0b1839b22ca371d", "score": "0.68769336", "text": "function normalizeString ( path, allowAboveRoot ) {\n let res = '';\n let lastSlash = -1;\n let dots = 0;\n let code;\n\n for ( let i = 0; i <= path.length; ++i ) {\n if ( i < path.length ) {\n code = path.charCodeAt( i );\n } else if ( code === 47 /* / */ ) {\n break;\n } else {\n code = 47 /* / */;\n }\n\n if ( code === 47 /* / */ ) {\n if ( lastSlash === i - 1 || dots === 1 ) {\n\n // NOOP\n } else if ( lastSlash !== i - 1 && dots === 2 ) {\n if ( res.length < 2 ||\n res.charCodeAt( res.length - 1 ) !== 46 /* . */ ||\n res.charCodeAt( res.length - 2 ) !== 46 /* . */ ) {\n\n if ( res.length > 2 ) {\n const start = res.length - 1;\n let j = start;\n\n for ( ; j >= 0; --j ) {\n if ( res.charCodeAt( j ) === 47 /* / */ ) {\n break;\n }\n }\n\n if ( j !== start ) {\n if ( j === -1 ) {\n res = '';\n } else {\n res = res.slice( 0, j );\n }\n\n lastSlash = i;\n dots = 0;\n\n continue;\n }\n } else if ( res.length === 2 || res.length === 1 ) {\n res = '';\n lastSlash = i;\n dots = 0;\n\n continue;\n }\n }\n\n if ( allowAboveRoot ) {\n if ( res.length > 0 ) {\n res += '/..';\n } else {\n res = '..';\n }\n }\n } else {\n if ( res.length > 0 ) {\n res += '/' + path.slice( lastSlash + 1, i );\n } else {\n res = path.slice( lastSlash + 1, i );\n }\n }\n\n lastSlash = i;\n dots = 0;\n } else if ( code === 46/*.*/ && dots !== -1 ) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n\n return res;\n}", "title": "" }, { "docid": "c259eab3c694e98ac93cb77dc47667fe", "score": "0.6853572", "text": "normalize(file) {\n return Require.__require('path').resolve(file).replace(/\\\\\\\\/g, '/').\n replace(/\\\\/g, '/');\n }", "title": "" }, { "docid": "4cbd9870ad5ada5323b8f85fbae61650", "score": "0.6817362", "text": "function normalize(aPath){var path=aPath;var url=urlParse(aPath);if(url){if(!url.path){return aPath;}path=url.path;}var isAbsolute=path.charAt(0)==='/';var parts=path.split(/\\/+/);for(var part,up=0,i=parts.length-1;i>=0;i--){part=parts[i];if(part==='.'){parts.splice(i,1);}else if(part==='..'){up++;}else if(up>0){if(part===''){// The first part is blank if the path is absolute. Trying to go\n// above the root is a no-op. Therefore we can remove all '..' parts\n// directly after the root.\nparts.splice(i+1,up);up=0;}else{parts.splice(i,2);up--;}}}path=parts.join('/');if(path===''){path=isAbsolute?'/':'.';}if(url){url.path=path;return urlGenerate(url);}return path;}", "title": "" }, { "docid": "1272ecb44d3aeb81925af40d49e766df", "score": "0.67722267", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n \n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n \n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n \n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "b9fce8a9ac8a3d9d738e6ca5df7a7e25", "score": "0.6747195", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = path.charAt(0) === '/';\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t }", "title": "" }, { "docid": "72e5c2e16d3aeb2a8bb3776fd6453df2", "score": "0.674587", "text": "function normalize(aPath) {\n\t\t var path = aPath;\n\t\t var url = urlParse(aPath);\n\t\t if (url) {\n\t\t if (!url.path) {\n\t\t return aPath;\n\t\t }\n\t\t path = url.path;\n\t\t }\n\t\t var isAbsolute = exports.isAbsolute(path);\n\n\t\t var parts = path.split(/\\/+/);\n\t\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t\t part = parts[i];\n\t\t if (part === '.') {\n\t\t parts.splice(i, 1);\n\t\t } else if (part === '..') {\n\t\t up++;\n\t\t } else if (up > 0) {\n\t\t if (part === '') {\n\t\t // The first part is blank if the path is absolute. Trying to go\n\t\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t\t // directly after the root.\n\t\t parts.splice(i + 1, up);\n\t\t up = 0;\n\t\t } else {\n\t\t parts.splice(i, 2);\n\t\t up--;\n\t\t }\n\t\t }\n\t\t }\n\t\t path = parts.join('/');\n\n\t\t if (path === '') {\n\t\t path = isAbsolute ? '/' : '.';\n\t\t }\n\n\t\t if (url) {\n\t\t url.path = path;\n\t\t return urlGenerate(url);\n\t\t }\n\t\t return path;\n\t\t}", "title": "" }, { "docid": "1bc47ca0834e4306d1a17d4f7cc06408", "score": "0.6727895", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n \n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n \n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n \n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "adfdfa06af4bbd7dbee963df71304275", "score": "0.672451", "text": "function normalize(aPath) {\n\t\t var path = aPath;\n\t\t var url = urlParse(aPath);\n\t\t if (url) {\n\t\t if (!url.path) {\n\t\t return aPath;\n\t\t }\n\t\t path = url.path;\n\t\t }\n\t\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t\t var parts = path.split(/\\/+/);\n\t\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t\t part = parts[i];\n\t\t if (part === '.') {\n\t\t parts.splice(i, 1);\n\t\t } else if (part === '..') {\n\t\t up++;\n\t\t } else if (up > 0) {\n\t\t if (part === '') {\n\t\t // The first part is blank if the path is absolute. Trying to go\n\t\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t\t // directly after the root.\n\t\t parts.splice(i + 1, up);\n\t\t up = 0;\n\t\t } else {\n\t\t parts.splice(i, 2);\n\t\t up--;\n\t\t }\n\t\t }\n\t\t }\n\t\t path = parts.join('/');\n\t\n\t\t if (path === '') {\n\t\t path = isAbsolute ? '/' : '.';\n\t\t }\n\t\n\t\t if (url) {\n\t\t url.path = path;\n\t\t return urlGenerate(url);\n\t\t }\n\t\t return path;\n\t\t}", "title": "" }, { "docid": "c4b09c8b8a8164452dae2929847889a0", "score": "0.6721409", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "1224ea2ba4400b5b6c809d5e405855c4", "score": "0.6711536", "text": "function normalizeSlashes(value) {\n return value.replace(/\\\\/g, '/');\n}", "title": "" }, { "docid": "2a9798a18e8fa7a3d31cd7c8166c53ae", "score": "0.6703742", "text": "function normalizeStringPosix(path, allowAboveRoot) {\n var res = \"\";\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length) code = path.charCodeAt(i);\n else if (code === 47 /*/*/) break;\n else code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res.charCodeAt(res.length - 1) !== 46 /*.*/ ||\n res.charCodeAt(res.length - 2) !== 46 /*.*/\n ) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength =\n res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0) res += \"/..\";\n else res = \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += \"/\" + path.slice(lastSlash + 1, i);\n else res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "4f6c324d312eda0f858ac43bd6ba6797", "score": "0.66924506", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = (path.charAt(0) === '/');\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "02235ae510f0e436046798fb31189750", "score": "0.6690318", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n\n if (url) {\n if (!url.path) {\n return aPath;\n }\n\n path = url.path;\n }\n\n var isAbsolute = exports.isAbsolute(path);\n var parts = path.split(/\\/+/);\n\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n\n return path;\n }", "title": "" }, { "docid": "e7eda741b8243a335f4727a0a7d9c004", "score": "0.66869265", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n }\n else if (part === '..') {\n up++;\n }\n else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n }\n else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "29d3d712a3644473c8a43edb5b43ee86", "score": "0.6685964", "text": "function normalize(aPath) {\n\t\tvar path = aPath;\n\t\tvar url = urlParse(aPath);\n\t\tif (url) {\n\t\tif (!url.path) {\n\t\t\treturn aPath;\n\t\t}\n\t\tpath = url.path;\n\t\t}\n\t\tvar isAbsolute = exports.isAbsolute(path);\n\n\t\tvar parts = path.split(/\\/+/);\n\t\tfor (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t\tpart = parts[i];\n\t\tif (part === '.') {\n\t\t\tparts.splice(i, 1);\n\t\t} else if (part === '..') {\n\t\t\tup++;\n\t\t} else if (up > 0) {\n\t\t\tif (part === '') {\n\t\t\t// The first part is blank if the path is absolute. Trying to go\n\t\t\t// above the root is a no-op. Therefore we can remove all '..' parts\n\t\t\t// directly after the root.\n\t\t\tparts.splice(i + 1, up);\n\t\t\tup = 0;\n\t\t\t} else {\n\t\t\tparts.splice(i, 2);\n\t\t\tup--;\n\t\t\t}\n\t\t}\n\t\t}\n\t\tpath = parts.join('/');\n\n\t\tif (path === '') {\n\t\tpath = isAbsolute ? '/' : '.';\n\t\t}\n\n\t\tif (url) {\n\t\turl.path = path;\n\t\treturn urlGenerate(url);\n\t\t}\n\t\treturn path;\n\t}", "title": "" }, { "docid": "0f5411a52c48faaac6e34fc7105619f7", "score": "0.6681882", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "244a012ef5a22167a0aa6563c42f66ac", "score": "0.667238", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }", "title": "" }, { "docid": "5a2c6ed883dacc2b35c75d1d5f20b3c4", "score": "0.6638307", "text": "normalizePath(norm) {\n var normalized = {};\n\n if(typeof norm === 'object') {\n normalized.obj = norm;\n normalized.str = norm.join('/');\n } else {\n normalized.obj = norm.split('/');\n normalized.str = norm;\n }\n\n return normalized;\n }", "title": "" }, { "docid": "f00359ba54a725c3d90f3b17cabeab9a", "score": "0.66371477", "text": "normalizeSlashToUnix(path) {\n if (!this.isWindows) {\n return path;\n }\n return path.replace(BACK_SLASH_REGEX, '/');\n }", "title": "" }, { "docid": "a4d79959fb225f2bf621b060f76cb678", "score": "0.66322094", "text": "function normalizePath(root, path) {\n // Current directory\n if (path === '.') {\n return root;\n }\n // Root path.\n if (path.indexOf('/') === 0) {\n path = path.slice(1, path.length);\n root = '';\n }\n else if (path.indexOf('./') === 0) {\n path = path.slice(2, path.length);\n }\n else if (path.indexOf('../../') === 0) {\n var parts = root.split('/');\n root = parts.splice(0, parts.length - 2).join('/');\n path = path.slice(6, path.length);\n }\n else if (path.indexOf('../') === 0) {\n var parts = root.split('/');\n root = parts.splice(0, parts.length - 1).join('/');\n path = path.slice(3, path.length);\n }\n else {\n }\n if (path[path.length - 1] === '/') {\n path = path.slice(0, path.length - 1);\n }\n // Combine the root and the path if necessary.\n if (root && path) {\n path = root + '/' + path;\n }\n else if (root) {\n path = root;\n }\n return path;\n }", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "75be6a3eca23488f54404412d05b0a34", "score": "0.6626744", "text": "function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}", "title": "" }, { "docid": "65a5f426b809287926664e33d4513d93", "score": "0.6621484", "text": "function normalizeURI(uri) {\n return removeDoubleSlashes(uri).split('/').reduce(function(prev, curr, idx) {\n if (prev.length === 0 || curr !== '..') {\n prev.push(curr);\n } else {\n prev.pop();\n }\n return prev;\n }, []).join('/');\n }", "title": "" }, { "docid": "76b76f0f58d5712f432a71dbd5da1172", "score": "0.6587428", "text": "function normalizeStringPosix(path, allowAboveRoot) {\n let res = '';\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code;\n for(let i = 0; i <= path.length; ++i) {\n if(i < path.length) code = path.charCodeAt(i);\n else if(code === 47 /*/*/) break;\n else code = 47 /*/*/;\n if(code === 47 /*/*/) {\n if(lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if(lastSlash !== i - 1 && dots === 2) {\n if(res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if(res.length > 2) {\n let lastSlashIndex = res.lastIndexOf('/');\n if(lastSlashIndex !== res.length - 1) {\n if(lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if(res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if(allowAboveRoot) {\n if(res.length > 0) res += '/..';\n else res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if(res.length > 0) res += '/' + path.slice(lastSlash + 1, i);\n else res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if(code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" }, { "docid": "fa5abe671e49b39950b4fcaf341ed744", "score": "0.6566726", "text": "function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}", "title": "" } ]
8187140a4ca9fb225cc811f3090fefc1
search a specified config from configs loaded from the database
[ { "docid": "bb6224670b3adc44ddba5c7d3f8d5029", "score": "0.6655863", "text": "searchOnlyFromDBConfigs(namespace, key) {\n if (!this.configExistsInDB(namespace, key)) {\n return undefined;\n }\n\n return this.configObject.fromDB[namespace][key];\n }", "title": "" } ]
[ { "docid": "2c5655ab9bb677b8eafac5f567434b70", "score": "0.64056855", "text": "static search(config, query, page, pageSize) {\n return RestBaseUtils.getTDPLookup(config.db, `${config.base}_items`, {\n column: config.entityName,\n species: SpeciesUtils.getSelectedSpecies(),\n query,\n page,\n limit: pageSize\n });\n }", "title": "" }, { "docid": "5163ec5270c047e4a62336a9317b7994", "score": "0.6365048", "text": "function searchConfig(config) {\n return searchConfigFacet.of(config);\n}", "title": "" }, { "docid": "da81439f130d5cd94ba1a6456f0fe425", "score": "0.6033636", "text": "defaultSearch(namespace, key) {\n // does not exist neither in db nor in env vars\n if (!this.configExistsInDB(namespace, key) && !this.configExistsInEnvVars(namespace, key)) {\n logger.debug(`${namespace}.${key} does not exist neither in db nor in env vars`);\n return undefined;\n }\n\n // only exists in db\n if (this.configExistsInDB(namespace, key) && !this.configExistsInEnvVars(namespace, key)) {\n logger.debug(`${namespace}.${key} only exists in db`);\n return this.configObject.fromDB[namespace][key];\n }\n\n // only exists env vars\n if (!this.configExistsInDB(namespace, key) && this.configExistsInEnvVars(namespace, key)) {\n logger.debug(`${namespace}.${key} only exists in env vars`);\n return this.configObject.fromEnvVars[namespace][key];\n }\n\n // exists both in db and in env vars [db > env var]\n if (this.configExistsInDB(namespace, key) && this.configExistsInEnvVars(namespace, key)) {\n if (this.configObject.fromDB[namespace][key] !== null) {\n logger.debug(`${namespace}.${key} exists both in db and in env vars. loaded from db`);\n return this.configObject.fromDB[namespace][key];\n }\n /* eslint-disable-next-line no-else-return */\n else {\n logger.debug(`${namespace}.${key} exists both in db and in env vars. loaded from env vars`);\n return this.configObject.fromEnvVars[namespace][key];\n }\n }\n }", "title": "" }, { "docid": "e00ca5fbc2b4e0e67ffeb6e8e7831a6d", "score": "0.60229945", "text": "search () {\n this.log.debug('Now looking for apidoc config files');\n // possible sources of information\n const sources = [\n 'package.json',\n 'apidoc.json',\n 'apidoc.config.js',\n ];\n\n // create a new object because javascript will not assign value\n const config = Object.assign({}, defaultConfig);\n\n // loop the three possible source of information to try and find packageInfo\n sources.forEach(configFile => {\n this.log.debug(`Now looking for ${configFile}`);\n // first look in cwd dir\n Object.assign(config, this.findConfigFileInDir(configFile, process.cwd()));\n // scan each source dir to find a valid config file\n this.opt.src.forEach(dir => {\n Object.assign(config, this.findConfigFileInDir(configFile, dir));\n });\n });\n if (_.isEqual(config, defaultConfig)) {\n this.log.warn('No config files found.');\n }\n return config;\n }", "title": "" }, { "docid": "71dd2336a6f455360e15f5ef04973b4c", "score": "0.5845464", "text": "search() {\n\t\t// If no preferences found, load the default config file.\n\t\tthis.load();\n\t\treturn;\n\t}", "title": "" }, { "docid": "625e9cf5733ec644485b5ec56efb180c", "score": "0.5755686", "text": "findBy(searchParam){\n let [searchAttribute, searchValue] = Object.entries(searchParam)[0]\n for (let record of this._records) {\n if (record[searchAttribute] == searchValue ){\n return record; \n } \n }\n \n }", "title": "" }, { "docid": "0cfc95eda0254cc829d3440da2f08b0c", "score": "0.57294995", "text": "getConfigFromDB(namespace, key) {\n return this.searchOnlyFromDBConfigs(namespace, key);\n }", "title": "" }, { "docid": "2c6bd83cadfeda109b00f6128fbf2730", "score": "0.5696881", "text": "search () {\n this.log.debug('Now looking for apidoc config files');\n // possible sources of information\n const sources = [\n 'package.json',\n 'apidoc.json',\n 'apidoc.config.js',\n ];\n\n // create a new object because javascript will not assign value\n const config = Object.assign({}, defaultConfig);\n\n let foundConfig;\n\n // loop the three possible source of information to try and find packageInfo\n sources.forEach(configFile => {\n this.log.debug(`Now looking for ${configFile}`);\n const filePath = this.findFileInSrc(configFile);\n if (filePath) {\n foundConfig = require(filePath);\n // if the package.json has an apidoc key, read that\n if (foundConfig.apidoc) { foundConfig = foundConfig.apidoc; }\n\n Object.assign(config, foundConfig);\n }\n });\n\n if (config === defaultConfig) {\n this.log.info('No config files found.');\n }\n\n return config;\n }", "title": "" }, { "docid": "e0994373edc218336a273cf51c84c496", "score": "0.56830627", "text": "function _findConfig( property ){\n var i = _merged.length;\n while( i-- ){\n if( _merged[ i ].value( property ) !== undefined ){\n return _merged[ i ];\n }\n }\n return _config;\n }", "title": "" }, { "docid": "33c32a32eff3ee06734a5ac0724fdca9", "score": "0.56012183", "text": "function findConfigFile(compiler, searchPath, configFileName) {\n\t while (true) {\n\t var fileName = path.join(searchPath, configFileName);\n\t if (compiler.sys.fileExists(fileName)) {\n\t return fileName;\n\t }\n\t var parentPath = path.dirname(searchPath);\n\t if (parentPath === searchPath) {\n\t break;\n\t }\n\t searchPath = parentPath;\n\t }\n\t return undefined;\n\t}", "title": "" }, { "docid": "3e938ebe90af2d37988f69ecac1c1259", "score": "0.55739254", "text": "find (config, cb) {\n cb = config.callback || cb\n this.findSubDoc(config, cb)\n }", "title": "" }, { "docid": "6a407536e570b478aeb3f75d07cbe9f2", "score": "0.55631316", "text": "searchForConfig() {\n // Check if there is an configuration file in the project path.\n if (fs.existsSync(`${this.projectPath}/web-crawler.json`)) {\n this.addConfig(`${this.projectPath}/web-crawler.json`, 'project');\n }\n }", "title": "" }, { "docid": "a8498823974f75355bf76eceb8f29c0e", "score": "0.55359703", "text": "function searchConfig(sUrl, sOpts) {\n console.log('==== Searching for metric configs ====');\n debug(query);\n debug(patchquery);\n https.get(sUrl, sOpts, (res) => {\n const accumulator = [];\n\n res.on('data', (d) => {\n accumulator.push(d);\n });\n res.on('end', () => {\n const fullbody = Buffer.concat(accumulator);\n const fbody = JSON.parse(JSON.stringify(fullbody));\n\n // Make sure there's data\n if (fbody.data.length > 0) {\n processBody(fullbody);\n } else {\n console.error('ERROR: no data returned');\n console.log('statusCode:', res.statusCode);\n console.log('headers:', res.headers);\n }\n });\n }).on('error', (e) => {\n console.error(e);\n });\n}", "title": "" }, { "docid": "c697a125b4643aa2f29fcc30883d24be", "score": "0.55046403", "text": "function search() {}", "title": "" }, { "docid": "f2c81c8b8b1633cd1da9d962ddd50db4", "score": "0.5497343", "text": "function findConfigFile(compiler, searchPath, configFileName) {\n while (true) {\n var fileName = path.join(searchPath, configFileName);\n if (compiler.sys.fileExists(fileName)) {\n return fileName;\n }\n var parentPath = path.dirname(searchPath);\n if (parentPath === searchPath) {\n break;\n }\n searchPath = parentPath;\n }\n return undefined;\n}", "title": "" }, { "docid": "255fd2f9abb932d28a8e571490c93b9d", "score": "0.5479358", "text": "function getConfigObjects(Obj, where, what){\n var foundObjects = [];\n for (var prop in Obj){\n if (Obj[prop][where] == what){\n foundObjects.push(Obj[prop]);\n }\n }\n return foundObjects;\n}", "title": "" }, { "docid": "36db81f3343ca6442cef05904ed69653", "score": "0.53882086", "text": "findSubDoc (config, cb) {\n this.model.findOne(config.conditions, config.fields, config.options, (err, doc) => {\n if (doc) {\n const parent = doc\n while (config.subDoc) {\n doc = doc[config.subDoc.path]\n if (config.subDoc.conditions) {\n doc = _.findWhere(doc, config.subDoc.conditions)\n }\n config.subDoc = config.subDoc.subDoc\n }\n cb(err, doc, parent)\n } else {\n cb(err)\n }\n })\n }", "title": "" }, { "docid": "873895e9126bc4f31b8d84a9a19e2571", "score": "0.5362559", "text": "function searchByAddress(db, adr=''){\r\n if (adr=='') return [];\r\n adr = adr.toLowerCase();\r\n return db.filter(e=>e.address.toLowerCase().includes(adr));\r\n}", "title": "" }, { "docid": "9a03e1f94d3602d227374740b0a18c78", "score": "0.53011674", "text": "findOne (config, cb) {\n cb = config.callback || cb\n this.findSubDoc(config, cb)\n }", "title": "" }, { "docid": "b41c09871f6ead62924a054223c5d1fe", "score": "0.52862173", "text": "function searchMovie(config) {\n Service.request({\n path: 'search/movie',\n params: {\n query: config.query\n },\n success: config.success,\n error: config.error\n });\n }", "title": "" }, { "docid": "ae34ff503acc923aefee3bb39cdc8e5d", "score": "0.5281187", "text": "static where(queryString, config = {}) {\n config.type = this.name;\n return super.where(queryString, config);\n }", "title": "" }, { "docid": "ae34ff503acc923aefee3bb39cdc8e5d", "score": "0.5281187", "text": "static where(queryString, config = {}) {\n config.type = this.name;\n return super.where(queryString, config);\n }", "title": "" }, { "docid": "b15394753a18acf34e8724e7939a5736", "score": "0.52802104", "text": "getSearchData(config, endPointUrl, query) {\r\n let configJson;\r\n configJson = config;\r\n if (endPointUrl.indexOf('search') > -1) {\r\n configJson['q'] = encodeURIComponent(query);\r\n }\r\n const bodyData = Object.keys(configJson).map(key => {\r\n return `${encodeURIComponent(key)}=${encodeURIComponent(configJson[key])}`;\r\n }).join('&');\r\n const opts = {\r\n method: 'POST',\r\n body: bodyData,\r\n headers: {\r\n 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'\r\n }\r\n };\r\n try {\r\n // aborting the previous xhr request call\r\n if (xmlApi.request) {\r\n xmlApi.request.abort();\r\n }\r\n return xmlApi.fetchRequest(endPointUrl, opts)\r\n .then(data => {\r\n dxp.log.debug(this.element.tagName, LOG_SEARCH_RESULT, `xhr request success`);\r\n return JSON.parse(data['response']);\r\n })\r\n .catch(error => {\r\n dxp.log.debug(this.element.tagName, LOG_SEARCH_RESULT, `xhr request cancelled/failed : ${JSON.stringify(error)}`);\r\n });\r\n }\r\n catch (e) {\r\n dxp.log.error(this.element.tagName, LOG_SEARCH_RESULT, `fetch failed`, e);\r\n }\r\n }", "title": "" }, { "docid": "7a1e56a748ba1dcf58f200c0b617e47f", "score": "0.5278385", "text": "_findSchedule(config_name) {\n return new Promise((resolve, reject) => {\n var db = new database();\n db.setup()\n .then((data) => {\n var sql = `SELECT *\n FROM ALL_ACTIVATIONS\n WHERE config_name = ? `;\n db._fetchMultipleRows(sql, [config_name])\n .then((result) => {\n //DB Query response is a list/array of rows\n this.response['queryResult'] = result\n resolve(this.response)\n })\n .catch((result) => {\n reject(this.response)\n })\n })\n })\n\n }", "title": "" }, { "docid": "1cda0af26eb0d92dbc878749401173da", "score": "0.5226758", "text": "function findGadgets(collection, models, index, callback){\n // if end of models isn't reached\n if(index < models.length){\n // get configuration from model\n if(models.at(index).get('configuration')){\n var configuration = models.at(index).get('configuration').gadgetronStreamConfiguration;\n // if configuration is found\n if(configuration){\n var gadgets = configuration.gadget;\n // if configuration has gadget(s)\n if(gadgets){\n // search in configuration file for gadgets\n findGadget(collection, gadgets, 0, function(){\n index++;\n // jumps to next configuration file\n findGadgets(collection, models, index, callback);\n });\n }\n else{\n // jumps to next configuration file\n index++;\n findGadgets(collection, models, index, callback);\n }\n }\n else{\n // jumps to next configuration file\n index++;\n findGadgets(collection, models, index, callback);\n }\n }\n else{\n // jumps to next configuration file\n index++;\n findGadgets(collection, models, index, callback);\n }\n }\n else{\n // calls callback function\n callback();\n }\n}", "title": "" }, { "docid": "a055273737a67f94104540ba6781e490", "score": "0.5223472", "text": "search(value) {\n\t}", "title": "" }, { "docid": "240d8be44bfc8cf06818a251228e6429", "score": "0.51824874", "text": "function ConfigMatches (start, end, config) {\n /*\n Note on string date formats: JavaScript Short Dates (MM/DD/YYYY -- zero padded)\n convert to midnight on the date in the current time zone. Other string date\n formats, including ISO 8601, add a time offset from GMT when converted to date\n objects and should be avoided.\n */\n const configMatches = {}\n const rangeStart = new Date(start)\n const rangeEnd = new Date(end)\n\n if (rangeStart.getTime() > 0 && rangeEnd.getTime() > 0 && rangeStart <= rangeEnd && typeof config === 'object') {\n const keys = Object.keys(config)\n\n // Loop through possible matching configurations\n for (let i = 0; i < keys.length; i++) {\n // Parse config if required parameters present\n if (new Date(config[keys[i]].recurrenceStart).getTime() > 0) {\n let configMatch = []\n\n // Route configuration to appropriate recurrence pattern parser\n switch (config[keys[i]].recurrence) {\n case 'Once':\n configMatch = OnceParser(\n rangeStart,\n rangeEnd,\n new Date(config[keys[i]].recurrenceStart)\n )\n break\n case 'Yearly':\n configMatch = YearlyParser(\n rangeStart,\n rangeEnd,\n new Date(config[keys[i]].recurrenceStart)\n )\n break\n case 'Monthly':\n configMatch = MonthlyParser(\n rangeStart,\n rangeEnd,\n new Date(config[keys[i]].recurrenceStart)\n )\n break\n case 'Weekly':\n configMatch = WeeklyParser(\n rangeStart,\n rangeEnd,\n new Date(config[keys[i]].recurrenceStart),\n Math.floor(config[keys[i]].weeksRecurrence)\n )\n break\n }\n\n if (configMatch.length > 0) {\n // Parse any exceptions defined in the configuration\n if (config[keys[i]].exceptions) configMatch = ExceptionsParser(configMatch, config[keys[i]].exceptions)\n\n // Add any remaining matching dates for the configuration\n if (configMatch.length > 0) configMatches[keys[i]] = configMatch\n }\n }\n }\n }\n return configMatches\n\n /* ---------------------------------------------------------------------+\n | Recurrence pattern parsers |\n +--------------------------------------------------------------------- */\n\n // Parse a one-time date for matches within a date range\n function OnceParser (rangeStart, rangeEnd, recurrenceStart) {\n const recurrenceMatches = []\n\n if (rangeStart <= recurrenceStart && rangeEnd >= recurrenceStart) {\n // Add matching recurrence\n recurrenceMatches.push(recurrenceStart)\n }\n return recurrenceMatches\n }\n\n // Parse yearly recurrences for matches within a date range\n function YearlyParser (rangeStart, rangeEnd, recurrenceStart) {\n const recurrenceMatches = []\n\n if (rangeEnd >= recurrenceStart) {\n const recurrenceStartYear = recurrenceStart.getFullYear()\n const rangeStartYear = rangeStart.getFullYear()\n const candidateMonth = recurrenceStart.getMonth()\n const candidateDate = recurrenceStart.getDate()\n\n // Loop through possible matches in range\n for (\n let candidateYear = rangeStartYear <= recurrenceStartYear ? recurrenceStartYear : rangeStartYear;\n candidateYear <= rangeEnd.getFullYear();\n candidateYear++\n ) {\n const recurrenceCandidate = new Date(candidateYear, candidateMonth, candidateDate)\n const daysInCandidateMonth = DaysInMonth(candidateMonth, candidateYear)\n\n if (rangeStart <= recurrenceCandidate && rangeEnd >= recurrenceCandidate && candidateDate <= daysInCandidateMonth) {\n // Add any matching recurrences\n recurrenceMatches.push(recurrenceCandidate)\n }\n }\n }\n return recurrenceMatches\n }\n\n // Parse monthly recurrences for matches within a date range\n function MonthlyParser (rangeStart, rangeEnd, recurrenceStart) {\n const recurrenceMatches = []\n\n if (rangeEnd >= recurrenceStart) {\n const recurrenceDate = recurrenceStart.getDate()\n const rangeBeforeStart = rangeStart <= recurrenceStart\n\n // Loop through possible matches in range\n for (\n let candidateMonth = rangeBeforeStart ? recurrenceStart.getMonth() : rangeStart.getMonth() + 1,\n candidateYear = rangeBeforeStart ? recurrenceStart.getFullYear() : rangeStart.getFullYear(); ;\n candidateMonth++\n ) {\n if (candidateMonth > 11) {\n // Roll over candidate month to January of the next year\n candidateMonth = 0\n candidateYear++\n }\n\n // Use last day of month if recurrence date is more than days in month\n const daysInCandidateMonth = DaysInMonth(candidateMonth, candidateYear)\n const candidateDate = recurrenceDate > daysInCandidateMonth ? daysInCandidateMonth : recurrenceDate\n const recurrenceCandidate = new Date(candidateYear, candidateMonth, candidateDate)\n\n if (rangeEnd >= recurrenceCandidate) {\n // Add any matching recurrences\n recurrenceMatches.push(recurrenceCandidate)\n } else {\n break\n }\n }\n }\n return recurrenceMatches\n }\n\n // Parse weekly recurrences for matches within a date range\n function WeeklyParser (rangeStart, rangeEnd, recurrenceStart, weeksRecurrence) {\n const recurrenceMatches = []\n const recurrenceMilliseconds = (weeksRecurrence > 0 ? weeksRecurrence : 1) * 6048e5\n const recurrencesToRangeStart = (rangeStart.getTime() - recurrenceStart.getTime()) / recurrenceMilliseconds\n const recurrencesToRangeEnd = (rangeEnd.getTime() - recurrenceStart.getTime()) / recurrenceMilliseconds\n const rangeStartMatch = recurrencesToRangeStart === Math.floor(recurrencesToRangeStart)\n const rangeEndMatch = recurrencesToRangeEnd === Math.floor(recurrencesToRangeEnd)\n const spanningMatch = (Math.floor(recurrencesToRangeEnd) - Math.floor(recurrencesToRangeStart) > 0)\n\n if (recurrencesToRangeEnd >= 0 && (rangeStartMatch || rangeEndMatch || spanningMatch)) {\n // Loop through possible matches in range, on or after the configured recurrence start date\n for (\n let i = recurrencesToRangeStart <= 0 ? 0 : rangeStartMatch ? recurrencesToRangeStart : Math.ceil(recurrencesToRangeStart);\n i <= (rangeEndMatch ? recurrencesToRangeEnd : Math.floor(recurrencesToRangeEnd));\n i++\n ) {\n // Add any matching recurrences\n recurrenceMatches.push(new Date(recurrenceStart.getTime() + (i * recurrenceMilliseconds)))\n }\n }\n return recurrenceMatches\n }\n\n // Parse exceptions to a config for a given date range\n function ExceptionsParser (matches, exceptions) {\n const remainingMatches = []\n\n // Loop through matches and exclude exceptions from matches\n for (let i = 0; i < matches.length; i++) {\n if (exceptions.indexOf(DateToString(matches[i])) === -1) {\n // Add matches without an exception\n remainingMatches.push(matches[i])\n }\n }\n return remainingMatches\n }\n}", "title": "" }, { "docid": "b48ecc4b4dac7472808a94156b1c9dbe", "score": "0.51624554", "text": "function loadConfigs() {\r\n return swdbDAO.findAll(\"Configuration\").then(updateConfigurationContext);\r\n }", "title": "" }, { "docid": "77009bec7fe200f99605e90fbff26995", "score": "0.5135476", "text": "static search(){}", "title": "" }, { "docid": "dec9f7237bf4bda8d0e35c94314f2388", "score": "0.5025899", "text": "search(val) {\n if (_.isUnd(val)) val = \"\";\n var self = this;\n if (self.validateForSeach(val)) {\n // add filters inside the filters manager\n if (!val) {\n // remove filter\n self.unsetSearch();\n } else {\n self.onSearchStart(val);\n self.setSearchFilter(val);\n }\n // go to first page\n self.pagination.page = 1;\n } else {\n // value is not valid for search: remove the rule by key\n self.unsetSearch();\n }\n self.render();\n }", "title": "" }, { "docid": "ead890e407985b8799c912f3940c83d9", "score": "0.49928832", "text": "_findMatch(value) {\n return find(this.filteredOptions, (entry) => entry.props.value === value);\n }", "title": "" }, { "docid": "a1e51ffaf54ffd678f607e6a3e4489bf", "score": "0.4988039", "text": "find( ident ) {\n // if ( id === null && name === null && arguments[ 0 ] ) {\n // console.log(arguments[0])\n // id = arguments[ 0 ] // accept non-object param as id\n // }\n if (this._data.has(ident)) return [ this._data.get(ident) ]\n\n let matches = this.values.filter( v => v.name === ident )\n if ( matches.length > 0 ) return matches \n \n matches = this.values.filter( v => v.name.indexOf( ident ) > -1 )\n return matches\n \n }", "title": "" }, { "docid": "98e662e60ee4d63ad74ca1a2d27e658a", "score": "0.4980846", "text": "function universalSearch(param, callBack) {\n if (param == '')\n param = bestIndex;\n var query = {$or: [ {_id: param}, {i: Number(param)}, {t: param}, {a: param} ] };\n database.searchMore(dbBlocks, query, function(rts) {\n var response;\n if (rts.length == 0) { // error\n response = 'Nothing found.';\n callBack(response);\n return;\n }\n else if (rts.length > 1) { // address\n response = exAddress(exBalance(param, rts));\n callBack(response);\n return;\n }\n else if (rts[0]._id === param) { // block by hash\n response = exBlock(param, rts);\n callBack(response);\n return;\n }\n else if (rts[0].i === Number(param)) { // block by index\n response = exBlock(param, rts);\n callBack(response);\n return;\n }\n else {\n var tx=rts[0].t;\n for (var i=0; i<tx.length; i++) {\n if (tx[i] === param) { // transaction\n response = exTx(param, rts);\n callBack(response);\n return;\n }\n }\n // probably address\n response = exAddress(exBalance(param, rts));\n callBack(response);\n return;\n }\n });\n}", "title": "" }, { "docid": "47e37d97b9db7d099ec7193ea75a71fd", "score": "0.49493167", "text": "onApplyUiSearch(searchValue, col = '') {\n if (this.dom.delay.search)\n clearTimeout(this.dom.delay.search);\n this.dom.delay.search = setTimeout(() => {\n if (searchValue.length) {\n this.ui.assetPool.map((pool) => {\n if (IsObject(this.dom.state[pool.name])) {\n pool.list.map((item) => {\n this.dom.state[pool.name].visible[item.id] = ObjectContainsTagSearch({\n id: item.id,\n name: item.name,\n }, searchValue) === true;\n });\n }\n });\n setTimeout(() => {\n this.dom.state.searching = true;\n });\n }\n else {\n this.ui.assetPool.map((pool) => {\n if (IsObject(this.dom.state[pool.name])) {\n pool.list.map((item) => {\n this.dom.state[pool.name].visible[item.id] = 1;\n });\n }\n });\n this.dom.state.searching = false;\n }\n }, 200);\n }", "title": "" }, { "docid": "d2486a48a2b8f3c68d06e314fdd44a69", "score": "0.49476215", "text": "searchOnlyFromEnvVarConfigs(namespace, key) {\n if (!this.configExistsInEnvVars(namespace, key)) {\n return undefined;\n }\n\n return this.configObject.fromEnvVars[namespace][key];\n }", "title": "" }, { "docid": "ae70b41ba4544e7e7dc3fdf08e51fe41", "score": "0.49459514", "text": "async findMatches(indexPattern) {\n const manifestFiles = await this.loadManifestFiles();\n const results = [];\n\n await Promise.all(manifestFiles.map(async (i) => {\n const moduleConfig = i.json;\n let match = false;\n try {\n match = await this.searchForFields(moduleConfig, indexPattern);\n } catch (error) {\n mlLog.warn(`Data recognizer error running query defined for module ${moduleConfig.id}. ${error}`);\n }\n\n if (match === true) {\n let logo = null;\n if (moduleConfig.logoFile) {\n try {\n logo = await this.readFile(`${this.modulesDir}/${i.dirName}/${moduleConfig.logoFile}`);\n logo = JSON.parse(logo);\n } catch(e) {\n logo = null;\n }\n }\n results.push({\n id: moduleConfig.id,\n title: moduleConfig.title,\n query: moduleConfig.query,\n description: moduleConfig.description,\n logo\n });\n }\n }));\n\n return results;\n }", "title": "" }, { "docid": "7472a4bde24cffed397298a23b0e2193", "score": "0.49409977", "text": "function getConfig(db, done) {\n db.list({\n startkey: '_design',\n endkey: '_design0',\n include_docs: true\n }, function(err, resp) {\n if (err) {\n return done(err);\n }\n if (!resp.rows.length) {\n return done(null, null);\n }\n\n var docs = resp.rows\n .filter(function(row) { return typeof row.doc.couchmagick === 'object'; })\n .map(function(row) { return row.doc; });\n\n if (!docs.length) {\n return done(null, null);\n }\n\n\n // eval filters\n docs.forEach(function(doc) {\n // toplevel filter\n if (doc.couchmagick.filter) {\n doc.couchmagick.filter = evalFilter(doc.couchmagick.filter);\n }\n\n // version filters\n Object.keys(doc.couchmagick.versions).forEach(function(name) {\n var version = doc.couchmagick.versions[name];\n\n if (version.filter) {\n version.filter = evalFilter(version.filter);\n }\n });\n });\n\n\n var config = docs.reduce(function(memo, doc) {\n memo[doc._id] = doc.couchmagick;\n\n return memo;\n }, {});\n\n\n done(null, config);\n });\n}", "title": "" }, { "docid": "83ee3e4b8f0b9f8da319e8af24e59fc9", "score": "0.4934825", "text": "getConfig(namespace, key) {\n let value;\n\n if (this.shouldSearchedFromEnvVarsOnly(namespace, key)) {\n value = this.searchOnlyFromEnvVarConfigs(namespace, key);\n }\n else {\n value = this.defaultSearch(namespace, key);\n }\n\n logger.debug(key, value);\n return value;\n }", "title": "" }, { "docid": "780ede5b862defed5995549a6157dcc1", "score": "0.49340993", "text": "getSettingByKeyValue(key, value, cb){\n\n const query = {};\n if (key === 'settingId' || key === 'settingId'){\n query[key] = getId(value);\n }\n else {\n query[key] = value;\n }\n\n this.settings_collection.find(query, (err, docs) => {\n if (err) return returnSimpleError(err, 400, cb);\n\n return returnSimpleResult(null, docs, cb);\n });\n }", "title": "" }, { "docid": "58e17a38a07df7478610003e09b828f1", "score": "0.49249887", "text": "function search(cat)\n{\n var retVal = 0;\n\n try\n {\n for (var i = 0; i < catalogues.length; i++)\n {\n if (catalogues[i].getValue('name') == cat)\n {\n retVal = catalogues[i].getId ();\n }\n }\n }\n catch(e)\n {\n errorHandler('search', e);\n }\n\n return retVal;\n}", "title": "" }, { "docid": "477c85f621aeda630faea59043eb1e86", "score": "0.48977685", "text": "handler(app, req, res) {\n const orderBy = req.query.p2 || 'create_date desc';\n const limit = parseInt(req.query.p3) || 1000;\n const configurationRepository = database.getRepository('config');\n configurationRepository.list({\n type : req.query.p0,\n status: req.query.p1\n }, orderBy, limit)\n .then(configurations => {\n const publicConfigs = [];\n configurations.forEach(configuration => {\n this.publicConfigNameList.has(configuration.config_name) && publicConfigs.push(configuration);\n });\n res.send(publicConfigs);\n })\n .catch(e => res.send({\n api_status : 'fail',\n api_message: `unexpected generic api error: (${e})`\n }));\n }", "title": "" }, { "docid": "86ac0e6793961f09efa89fbdc7941da0", "score": "0.48948213", "text": "search(api, property, value, callback) {\n eval('this.' + api + '()').findAll((elements) => {\n let results = _.filter(elements, (element) => {\n return eval('element.' + property) === value;\n });\n this.attach('count: ' + results.length);\n callback(results);\n });\n }", "title": "" }, { "docid": "cc3c665d77da41051d7a50f0267b79e8", "score": "0.48864505", "text": "initSearchMethod(param, objects) {\n var qryValue = '';\n var parameters = param.split('/');\n for (let i = 0; i < objects.length; i++) {\n qryValue = this.findByRootNode(parameters, objects[i]);\n }\n return qryValue;\n }", "title": "" }, { "docid": "f53e7883b2b63f666d2caef1dbc8103b", "score": "0.48793375", "text": "function globalSearch(startObject, value, outputFunction, searchBatch, breakOnFirstFound) {\n var stack = [[startObject, '']];\n var searched = [];\n var found = [];\n searchBatch = searchBatch || 20000;\n var output = outputFunction || console;\n\n var isArray = function (test) {\n return Object.prototype.toString.call(test) === '[object Array]';\n };\n output.log('', 'info', true); //clean the output field\n var count = 0;\n var isContinue = \"yes\";\n while (stack.length > 0 && isContinue == \"yes\") {\n try {\n count++;\n if (count % searchBatch === 0) {\n output.log(\"Searched:\" + searched);\n searched = [];\n isContinue = prompt(\"continue?\", \"yes\");\n }\n\n var fromStack = stack.shift();\n var obj = fromStack[0];\n var address = fromStack[1];\n // console.log(address);\n if (typeof obj == typeof value && obj.indexOf(value) >= 0) { //if contains value or equal\n found.push(address);\n output.log(\"found now=\" + found, 'debug');\n if (breakOnFirstFound)\n break;\n } else if (typeof obj == \"object\") { //&& searched.indexOf(obj) == -1\n var prefix, postfix;\n if (isArray(obj)) {\n prefix = '[';\n postfix = ']';\n } else {\n prefix = '.';\n postfix = '';\n }\n for (var i in obj) {\n if (typeof obj == typeof value && obj == value) {\n found = address;\n break;\n }\n stack.push([obj[i], address + prefix + i + postfix]);\n }\n }\n searched.push(address);\n } catch (err) {\n output.log(err, 'debug');\n }\n }\n output.log(\"Searched:\" + searched);\n output.log(\"found=\" + found);\n return found;\n }", "title": "" }, { "docid": "4db7ae6c95dbad40030752037643356f", "score": "0.48631728", "text": "function doSearch(databaseid, params, cb) {\r\n\tvar res;\r\n\tvar stope = {};\r\n\tvar fromdata;\r\n\tvar selectors = cloneDeep(this.selectors);\r\n\r\n\r\n\r\n\tfunction processSelector(selectors,sidx,value) {\r\n//\t\tvar val;\r\n/*\t\tif(sidx == 0) {\r\n\t\t\tif(selectors.length > 0 && selectors[0].srchid == 'SHARP') {\r\n\t\t\t\tval = alasql.databases[alasql.useid].objects[selectors[0].args[0]];\r\n\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t//selectors.shift();\t\t\t\r\n\t\t\t} else if(selectors.length > 0 && selectors[0].srchid == 'AT') {\r\n\t\t\t\tval = alasql.vars[selectors[0].args[0]];\r\n\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t//selectors.shift();\r\n\t\t\t} else if(selectors.length > 0 && selectors[0].srchid == 'CLASS') {\r\n\t\t\t\tval = alasql.databases[databaseid].tables[selectors[0].args[0]].data;\r\n\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t//selectors.shift();\r\n\t\t\t\t//selectors.unshift({srchid:'CHILD'});\r\n\t\t\t} else {\r\n\r\n\t\t\t}\r\n\t\t}\r\n*/\r\n\t\tvar \r\n\t\t\tval,\t// temp values use many places\r\n\t\t\tnest, \t// temp value used many places\r\n\t\t\tr,\t\t// temp value used many places\r\n\t\t\tsel = selectors[sidx];\r\n//\t\tconsole.log(sel);\r\n//\t\tif(!alasql.srch[sel.srchid]) {\r\n//\t\t\tthrow new Error('Selector \"'+sel.srchid+'\" not found');\r\n//\t\t};\r\n\t\t\r\n\t\tvar SECURITY_BREAK = 100000;\r\n\r\n\t\tif(sel.selid) {\r\n\t\t\t// TODO Process Selector\r\n\t\t\tif(sel.selid === 'PATH') {\r\n\t\t\t\tvar queue = [{node:value,stack:[]}];\r\n\t\t\t\tvar visited = {};\r\n\t\t\t\t//var path = [];\r\n\t\t\t\tvar objects = alasql.databases[alasql.useid].objects;\r\n\t\t\t\twhile (queue.length > 0) {\r\n\t\t\t\t\tvar q = queue.shift()\r\n\t\t\t\t\tvar node = q.node;\r\n\t\t\t\t\tvar stack = q.stack;\r\n\t\t\t\t\tvar r = processSelector(sel.args,0,node);\r\n\t\t\t\t\tif(r.length > 0) {\r\n\t\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\t\treturn stack;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar rv = [];\r\n\t\t\t\t\t\t\tif(stack && stack.length > 0) {\r\n\t\t\t\t\t\t\t\tstack.forEach(function(stv){\r\n\t\t\t\t\t\t\t\t\trv = rv.concat(processSelector(selectors,sidx+1,stv));\r\n\t\t\t\t\t\t\t\t});\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn rv;\t\t\t\t\t\t\t\r\n//\t\t\t\t\t\t\treturn processSelector(selectors,sidx+1,stack);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(typeof visited[node.$id] !== 'undefined') {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t} else {\r\n//\t\t\t\t\t\t\tconsole.log(node.$id, node.$out);\r\n\t\t\t\t\t\t\tvisited[node.$id] = true;\r\n\t\t\t\t\t\t\tif(node.$out && node.$out.length > 0) {\r\n\t\t\t\t\t\t\t\tnode.$out.forEach(function(edgeid){\r\n\t\t\t\t\t\t\t\t\tvar edge = objects[edgeid];\r\n\t\t\t\t\t\t\t\t\tvar stack2 = stack.concat(edge);\r\n\t\t\t\t\t\t\t\t\tstack2.push(objects[edge.$out[0]]);\r\n\t\t\t\t\t\t\t\t\tqueue.push({node:objects[edge.$out[0]],\r\n\t\t\t\t\t\t\t\t\t\tstack:stack2});\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Else return fail\r\n\t\t\t\treturn [];\r\n\t\t\t} if(sel.selid === 'NOT') {\r\n\t\t\t\tvar nest = processSelector(sel.args,0,value);\r\n\t\t\t\t//console.log(1,nest);\r\n\t\t\t\tif(nest.length>0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn [value];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'DISTINCT') {\r\n\t\t\t\tvar nest;\r\n\t\t\t\tif(typeof sel.args === 'undefined' || sel.args.length === 0) {\r\n\t\t\t\t\tnest = distinctArray(value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnest = processSelector(sel.args,0,value);\r\n\t\t\t\t}\r\n\t\t\t\tif(nest.length === 0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar res = distinctArray(nest);\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn res;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,res);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'AND') {\r\n\t\t\t\tvar res = true;\r\n\t\t\t\tsel.args.forEach(function(se){\r\n\t\t\t\t\tres = res && (processSelector(se,0,value).length>0);\r\n\t\t\t\t});\r\n\t\t\t\tif(!res) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn [value];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'OR') {\r\n\t\t\t\tvar res = false;\r\n\t\t\t\tsel.args.forEach(function(se){\r\n\t\t\t\t\tres = res || (processSelector(se,0,value).length>0);\r\n\t\t\t\t});\r\n\t\t\t\tif(!res) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn [value];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'ALL') {\r\n\t\t\t\tvar nest = processSelector(sel.args[0],0,value);\r\n\t\t\t\tif(nest.length === 0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn nest;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,nest);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'ANY') {\r\n\t\t\t\tvar nest = processSelector(sel.args[0],0,value);\r\n//\t\t\t\tconsole.log(272,nest);\r\n\t\t\t\tif(nest.length === 0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn [nest[0]];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,[nest[0]]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'UNIONALL') {\r\n\t\t\t\tvar nest = [];\r\n\t\t\t\tsel.args.forEach(function(se){\r\n\t\t\t\t\tnest = nest.concat(processSelector(se,0,value));\r\n\t\t\t\t});\r\n\t\t\t\tif(nest.length === 0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn nest;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,nest);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'UNION') {\r\n\t\t\t\tvar nest = [];\r\n\t\t\t\tsel.args.forEach(function(se){\r\n\t\t\t\t\tnest = nest.concat(processSelector(se,0,value));\r\n\t\t\t\t});\r\n\t\t\t\tvar nest = distinctArray(nest);\r\n\t\t\t\tif(nest.length === 0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn nest;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,nest);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else \tif(sel.selid === 'IF') {\r\n\t\t\t\tvar nest = processSelector(sel.args,0,value);\r\n\t\t\t\t//console.log(1,nest);\r\n\t\t\t\tif(nest.length===0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\treturn [value];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn processSelector(selectors,sidx+1,value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else \tif(sel.selid === 'REPEAT') {\r\n//\t\t\t\tconsole.log(352,sel.sels);\r\n\t\t\t\tvar \r\n\t\t\t\t\tlvar, \r\n\t\t\t\t\tlmax,\r\n\t\t\t\t\tlmin = sel.args[0].value;\r\n\t\t\t\tif(!sel.args[1]) {\r\n\t\t\t\t\tlmax = lmin; // Add security break\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlmax = sel.args[1].value;\r\n\t\t\t\t}\r\n\t\t\t\tif(sel.args[2]) {\r\n\t\t\t\t\tlvar = sel.args[2].variable;\r\n\t\t\t\t} \r\n\t\t\t\t//var lsel = sel.sels;\r\n//\t\t\t\tconsole.log(351,lmin,lmax,lvar);\r\n\r\n\t\t\t\tvar retval = [];\r\n\r\n\t\t\t\tif (lmin === 0) {\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\tretval = [value];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(lvar){\r\n\t\t\t\t\t\t\talasql.vars[lvar] = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,value));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n//\t\t\t\tconsole.log(364,retval);\r\n//console.log(370,sel.sels);\r\n\t\t\t\t\t// var nests = processSelector(sel.sels,0,value).slice();\r\n\t\t\t\tif(lmax > 0) {\r\n\t\t\t\t\tvar nests = [{value:value,lvl:1}];\r\n\t\t\t\t\t\t// if(lvl >= lmin) {\r\n\t\t\t\t\t\t// \tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\t// \t\tretval = retval.concat(nests);\r\n\t\t\t\t\t\t// \t} else {\r\n\t\t\t\t\t\t// \t\tretval = retval.concat(processSelector(selectors,sidx+1,value));\r\n\t\t\t\t\t\t// \t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t// }\r\n\t//console.log(371,nests);\r\n\t\t\t\t\tvar i = 0;\r\n\t\t\t\t\twhile (nests.length > 0) {\r\n\r\n\t\t\t\t\t\tvar nest = nests[0];\r\n\t//console.log(375,nest);\r\n\t\t\t\t\t\tnests.shift();\r\n\t\t\t\t\t\tif(nest.lvl <= lmax) {\r\n\t\t\t\t\t\t\tif(lvar){\r\n\t\t\t\t\t\t\t\talasql.vars[lvar] = nest.lvl;\r\n\t\t\t\t\t\t\t}\r\n//\t\tconsole.log(394,sel.sels);\r\n\t\t\t\t\t\t\tvar nest1 = processSelector(sel.sels,0,nest.value);\r\n//\t\t\t\t\t\tconsole.log(397,nest1);\r\n\r\n\t\t\t\t\t\t\tnest1.forEach(function(n){\r\n\t\t\t\t\t\t\t\tnests.push({value:n,lvl:nest.lvl+1});\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tif(nest.lvl >= lmin) {\r\n\t\t\t\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\t\t\t\tretval = retval.concat(nest1);\r\n\t\t\t\t\t\t\t\t\t//return nests;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnest1.forEach(function(n){\r\n\t\t\t\t\t\t\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,n));\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Security brake\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tif(i>SECURITY_BREAK) {\r\n\t\t\t\t\t\t\tthrow new Error('Security brake. Number of iterations = '+i);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\treturn retval;\r\n\r\n\t\t\t} else \tif(sel.selid ==='TO') {\r\n//\t\t\t\tconsole.log(347,value,sel.args[0]);\r\n\t\t\t\tvar oldv = alasql.vars[sel.args[0]];\r\n\t\t\t\tvar newv = [];\r\n\t\t\t\tif(oldv !== undefined) {\r\n//\t\t\t\t\tconsole.log(353,typeof oldv);\r\n\t\t\t\t\tnewv = oldv.slice(0);\r\n//\t\t\t\t\tconsole.log(429, oldv, newv);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewv = [];\r\n\t\t\t\t}\r\n\t\t\t\tnewv.push(value);\r\n\t\t\t\t// console.log(428,oldv,newv, value);\r\n\t\t\t\t// console.log(435,sidx+1+1,selectors.length);\r\n//\t\t\t\tconsole.log(355,alasql.vars[sel.args[0]]);\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [value];\r\n\t\t\t\t} else {\r\n\t\t\t\t\talasql.vars[sel.args[0]] = newv;\r\n\t\t\t\t\tvar r1 = processSelector(selectors,sidx+1,value);\r\n//\t\t\t\t\tconsole.log('r1 =',r1);\r\n\t\t\t\t\talasql.vars[sel.args[0]] = oldv;\r\n\t\t\t\t\treturn r1;\r\n\t\t\t\t}\r\n/*\r\n\r\nalasql.srch.TO = function(val,args) {\r\n console.log(args[0]);\r\n\r\n alasql.vars[args[0]].push(val);\r\n return {status: 1, values: [val]};\r\n};\r\n\r\n*/\r\n\t\t\t} else if(sel.selid === 'ARRAY') {\r\n\t\t\t\tvar nest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length > 0) {\r\n\t\t\t\t\tval = nest;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'SUM') {\r\n\t\t\t\tvar nest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length > 0) {\r\n\t\t\t\t\tvar val = nest.reduce(function(sum, current) {\r\n\t \t\t\t\t\treturn sum + current;\r\n\t\t\t\t\t}, 0);\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'AVG') {\r\n\t\t\t\tnest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length > 0) {\r\n\t\t\t\t\tval = nest.reduce(function(sum, current) {\r\n\t \t\t\t\t\treturn sum + current;\r\n\t\t\t\t\t}, 0)/nest.length;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'COUNT') {\r\n\t\t\t\tnest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length > 0) {\r\n\t\t\t\t\tval = nest.length;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else \tif(sel.selid === 'FIRST') {\r\n\t\t\t\tnest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length > 0){\r\n\t\t\t\t\tval = nest[0];\r\n\t\t\t\t} else { \r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else \tif(sel.selid === 'LAST') {\r\n\t\t\t\tnest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length > 0) {\r\n\t\t\t\t\tval = nest[nest.length-1];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'MIN') {\r\n\t\t\t\tnest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length === 0){\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t\tvar val = nest.reduce(function(min, current) {\r\n \t\t\t\t\treturn Math.min(min,current);\r\n\t\t\t\t}, Infinity);\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else \tif(sel.selid === 'MAX') {\r\n\t\t\t\tvar nest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(nest.length === 0){\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t}\r\n\t\t\t\tvar val = nest.reduce(function(max, current) {\r\n \t\t\t\t\treturn Math.max(max,current);\r\n\t\t\t\t}, -Infinity);\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [val];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,val);\r\n\t\t\t\t}\r\n\t\t\t} else \tif(sel.selid === 'PLUS') {\r\n\t\t\t\tvar retval = [];\r\n//\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,n))\r\n\t\t\t\tvar nests = processSelector(sel.args,0,value).slice();\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\tretval = retval.concat(nests);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnests.forEach(function(n){\r\n\t\t\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,n));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar i = 0;\r\n\t\t\t\twhile (nests.length > 0) {\r\n//\t\t\t\t\tnest = nests[0];\r\n//\t\t\t\t\tnests.shift();\r\n\t\t\t\t\tvar nest = nests.shift();\r\n\t\t\t\t\t\r\n//\t\t\t\t\tconsole.log(281,nest);\r\n//\t\t\t\t\tconsole.log(nest,nests);\r\n\t\t\t\t\tnest = processSelector(sel.args,0,nest);\r\n//\t\t\t\t\tconsole.log(284,nest);\r\n//\t\t\t\t\tconsole.log('nest',nest,'nests',nests);\r\n\t\t\t\t\tnests = nests.concat(nest);\r\n//console.log(retval,nests);\t\t\t\t\r\n\r\n\t\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t\tretval = retval.concat(nest);\r\n\t\t\t\t\t\t//return retval;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnest.forEach(function(n){\r\n//\t\t\t\t\t\t\tconsole.log(293,n);\r\n\t\t\t\t\t\t\tvar rn = processSelector(selectors,sidx+1,n);\r\n//\t\t\t\t\t\t\tconsole.log(294,rn, retval);\r\n\t\t\t\t\t\t\tretval = retval.concat(rn);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Security brake\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tif(i>SECURITY_BREAK) {\r\n\t\t\t\t\t\tthrow new Error('Security brake. Number of iterations = '+i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn retval;\r\n\t\t\t\t//console.log(1,nest);\r\n\t\t\t} else \tif(sel.selid === 'STAR') {\r\n\t\t\t\tvar retval = [];\r\n\t\t\t\tretval = processSelector(selectors,sidx+1,value);\r\n\t\t\t\tvar nests = processSelector(sel.args,0,value).slice();\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\tretval = retval.concat(nests);\r\n\t\t\t\t\t//return nests;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnests.forEach(function(n){\r\n\t\t\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,n));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tvar i = 0;\r\n\t\t\t\twhile (nests.length > 0) {\r\n\t\t\t\t\tvar nest = nests[0];\r\n\t\t\t\t\tnests.shift();\r\n//\t\t\t\t\tconsole.log(nest,nests);\r\n\t\t\t\t\tnest = processSelector(sel.args,0,nest);\r\n//\t\t\t\t\tconsole.log('nest',nest,'nests',nests);\r\n\t\t\t\t\tnests = nests.concat(nest);\r\n\r\n\t\t\t\t\tif(sidx+1+1 <= selectors.length) {\r\n\t\t\t\t\t\tnest.forEach(function(n){\r\n\t\t\t\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,n));\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Security brake\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tif(i>SECURITY_BREAK) {\r\n\t\t\t\t\t\tthrow new Error('Loop brake. Number of iterations = '+i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn retval;\r\n\t\t\t} else \tif(sel.selid === 'QUESTION') {\r\n\t\t\t\tvar retval = [];\r\n\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,value))\r\n\t\t\t\tvar nest = processSelector(sel.args,0,value);\r\n\t\t\t\tif(sidx+1+1 <= selectors.length) {\r\n\t\t\t\t\tnest.forEach(function(n){\r\n\t\t\t\t\t\tretval = retval.concat(processSelector(selectors,sidx+1,n));\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn retval;\r\n\t\t\t} else if(sel.selid === 'WITH') {\r\n\t\t\t\tvar nest = processSelector(sel.args,0,value);\r\n//\t\t\t\tconsole.log('WITH',nest);\r\n\t\t\t\tif(nest.length===0) {\r\n\t\t\t\t\treturn [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// if(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\t// \treturn [nest];\r\n\t\t\t\t\t// } else {\r\n\t\t\t\t\t// \treturn processSelector(selectors,sidx+1,nest);\r\n\t\t\t\t\t// }\r\n\t\t\t\t\tvar r = {status:1,values:nest};\r\n\t\t\t\t}\r\n\t\t\t} else if(sel.selid === 'ROOT') {\r\n\t\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\t\treturn [value];\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn processSelector(selectors,sidx+1,fromdata);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error('Wrong selector '+sel.selid);\r\n\t\t\t}\r\n\r\n\r\n\t\t} else if(sel.srchid) {\r\n\t\t\tvar r = alasql.srch[sel.srchid.toUpperCase()](value,sel.args,stope,params);\r\n//\t\t\tconsole.log(sel.srchid,r);\r\n\t\t} else {\r\n\t\t\tthrow new Error('Selector not found');\r\n\t\t}\r\n//\t\tconsole.log(356,sidx,r);\r\n\t\tif(typeof r === 'undefined') {\r\n\t\t\tr = {status: 1, values: [value]};\r\n\t\t}\r\n\r\n\t\tvar res = [];\r\n\t\tif(r.status === 1) {\r\n\r\n\t\t\tvar arr = r.values;\r\n\r\n\r\n\t\t\tif(sidx+1+1 > selectors.length) {\r\n//\t\t\tif(sidx+1+1 > selectors.length) {\r\n\t\t\t\tres = arr;\t\t\t\t\t\r\n//\t\t\t\tconsole.log('res',r)\r\n\t\t\t} else {\r\n\t\t\t\tfor(var i=0;i<r.values.length;i++) {\r\n\t\t\t\t\tres = res.concat(processSelector(selectors,sidx+1,arr[i]));\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\r\n\r\n\tif(selectors !== undefined && selectors.length > 0) {\r\n\r\n//\t\t\tconsole.log(selectors[0].args[0].toUpperCase());\r\n\t\tif(selectors && selectors[0] && selectors[0].srchid === 'PROP' && selectors[0].args && selectors[0].args[0]) {\r\n//\t\t\tconsole.log(selectors[0].args[0]);\r\n\t\t\tif(selectors[0].args[0].toUpperCase() === 'XML') {\r\n\t\t\t\tstope.mode = 'XML';\r\n\t\t\t\tselectors.shift();\r\n\t\t\t} else if(selectors[0].args[0].toUpperCase() === 'HTML') {\r\n\t\t\t\tstope.mode = 'HTML';\r\n\t\t\t\tselectors.shift();\r\n\t\t\t} else if(selectors[0].args[0].toUpperCase() === 'JSON') {\r\n\t\t\t\tstope.mode = 'JSON';\r\n\t\t\t\tselectors.shift();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(selectors.length > 0 && selectors[0].srchid === 'VALUE') {\r\n\t\t\tstope.value = true;\r\n\t\t\tselectors.shift();\r\n\t\t}\r\n\t}\r\n\r\n\t\r\n\tif(this.from instanceof yy.Column) {\r\n\t\tvar dbid = this.from.databaseid || databaseid;\r\n\t\tfromdata = alasql.databases[dbid].tables[this.from.columnid].data;\r\n\t\t//selectors.unshift({srchid:'CHILD'});\r\n\t} else if(\r\n\t\t\t\tthis.from instanceof yy.FuncValue &&\t\t\t\t \r\n\t\t\t\talasql.from[this.from.funcid.toUpperCase()]\r\n\t\t\t) {\r\n\t\tvar args = this.from.args.map(function(arg){\r\n\t\tvar as = arg.toJS();\r\n//\t\t\tconsole.log(as);\r\n\t\tvar fn = new Function('params,alasql','var y;return '+as).bind(this);\r\n\t\treturn fn(params,alasql);\r\n\t\t});\r\n//\t\tconsole.log(args);\r\n\t\tfromdata = alasql.from[this.from.funcid.toUpperCase()].apply(this,args);\r\n//\t\tconsole.log(92,fromdata);\r\n\t} else if(typeof this.from === 'undefined') {\r\n\t\tfromdata = alasql.databases[databaseid].objects;\r\n\t} else {\r\n\t\tvar fromfn = new Function('params,alasql','var y;return '+this.from.toJS());\r\n\t\tfromdata = fromfn(params,alasql);\t\t\t\r\n\t\t// Check for Mogo Collections\r\n\t\tif(\r\n\t\t\ttypeof Mongo === 'object' && typeof Mongo.Collection !== 'object' && \r\n\t\t\tfromdata instanceof Mongo.Collection\r\n\t\t) {\r\n\t\t\tfromdata = fromdata.find().fetch();\r\n\t\t}\r\n//console.log(selectors,fromdata);\r\n//\t\tif(typeof fromdata == 'object' && fromdata instanceof Array) {\r\n//\t\t\tselectors.unshift({srchid:'CHILD'});\t\t\t\t\t\r\n//\t\t}\r\n\t}\r\n\t\r\n\t// If source data is array than first step is to run over array\r\n//\tvar selidx = 0;\r\n//\tvar selvalue = fromdata;\r\n\t\r\n\tif(selectors !== undefined && selectors.length > 0) {\r\n\t\t// Init variables for TO() selectors\r\n\r\n\t\tif(false) {\r\n\t\t\tselectors.forEach(function(selector){\r\n\t\t\t\tif(selector.srchid === 'TO') { //* @todo move to TO selector\r\n\t\t\t\t\talasql.vars[selector.args[0]] = [];\r\n\t\t\t\t\t// TODO - process nested selectors\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tres = processSelector(selectors,0,fromdata);\r\n\t} else {\r\n\t\tres = fromdata; \t\r\n\t}\r\n\t\r\n\tif(this.into) {\r\n\t\tvar a1,a2;\r\n\t\tif(typeof this.into.args[0] !== 'undefined') {\r\n\t\t\ta1 = \r\n\t\t\t\tnew Function('params,alasql','var y;return ' +\r\n\t\t\t\tthis.into.args[0].toJS())(params,alasql);\r\n\t\t}\r\n\t\tif(typeof this.into.args[1] !== 'undefined') {\r\n\t\t\ta2 = \r\n\t\t\t\tnew Function('params,alasql','var y;return ' +\r\n\t\t\t\tthis.into.args[1].toJS())(params,alasql);\r\n\t\t}\r\n\t\tres = alasql.into[this.into.funcid.toUpperCase()](a1,a2,res,[],cb);\r\n\t} else {\r\n\t\tif(stope.value && res.length > 0){\r\n\t\t\tres = res[0];\r\n\t\t}\r\n\t\tif (cb){\r\n\t\t\tres = cb(res);\r\n\t\t}\r\n\t}\r\n\treturn res;\r\n\t\r\n}", "title": "" }, { "docid": "d9cd8454f6a6ef6f02aff4c1e2d61bc1", "score": "0.48624444", "text": "function findAny(dsSearchIn, dsSearchAs, obj, str) {\n // Convert the search string to lower case\n str = str.toLowerCase();\n for (var key in obj) {\n if (dsSearchIn.length === 0 || dsSearchIn.indexOf(key) !== -1) {\n var value = String(obj[key]).toLowerCase();\n for (var field in dsSearchAs) {\n if (field === key) {\n // Found key in dsSearchAs so we pass the value and the search string to a search function\n // that returns true/false and we return that if true.\n /* Check if dsSearchAs is a function (passed from the template) */\n if (typeof dsSearchAs[field] === 'function') {\n var res = dsSearchAs[field](value, str);\n if (res === true) {\n return res\n }\n }\n }\n }\n // If it doesn't return from above we perform a simple search\n if (value.indexOf(str) >= 0) {\n return true\n }\n }\n }\n return false\n}", "title": "" }, { "docid": "dbe0c78d449b18f0c2217b27fa26ecb1", "score": "0.48579377", "text": "async find(params) {}", "title": "" }, { "docid": "6e142a04ba38beebfef682c91525da35", "score": "0.48576045", "text": "function searchDb() {\n\n}", "title": "" }, { "docid": "99e3ba04a375f386872d9cb573e07db8", "score": "0.4823658", "text": "static searchByName(name) {\n return search(name);\n }", "title": "" }, { "docid": "f7065aa0e15ff5f211f2bd52d35c2b2b", "score": "0.48227474", "text": "function getPackageConfigMatch (config, normalized) {\n var pkgKey, exactMatch = false, configPath;\n for (var i = 0; i < config.packageConfigPaths.length; i++) {\n var packageConfigPath = config.packageConfigPaths[i];\n var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath] = createPkgConfigPathObj(packageConfigPath));\n if (normalized.length < p.length)\n continue;\n var match = normalized.match(p.regEx);\n if (match && (!pkgKey || (!(exactMatch && p.wildcard) && pkgKey.length < match[1].length))) {\n pkgKey = match[1];\n exactMatch = !p.wildcard;\n configPath = pkgKey + packageConfigPath.substr(p.length);\n }\n }\n\n if (!pkgKey)\n return;\n\n return {\n packageKey: pkgKey,\n configPath: configPath\n };\n}", "title": "" }, { "docid": "33e75bc1f131d4ef19768702074e94dd", "score": "0.48205522", "text": "function findConfigValues(ymlValue) {\n \n for (var i in ymlValue) {\n \n if (!ymlValue.hasOwnProperty(i)) continue;\n else if (typeof ymlValue[i] == 'boolean' || typeof ymlValue[i] == 'number') continue;\n else if (typeof ymlValue[i] == 'object') findConfigValues(ymlValue[i]); \n\n // Does this value access a config global?\n else if (ymlValue[i].indexOf(\"$config_\") !== -1) {\n \n var configPath = ymlValue[i].replace(\"$config_\",\"\").split(\"_\");\n var configVal = _contentConfig;\n \n // Crawl through the config path until we have the correct value\n // eg. cooldown -> short\n _.each(configPath, function (pathKey) {\n \n if(configVal[pathKey] !== undefined)\n configVal = configVal[pathKey];\n\n });\n\n // Set this YAML val to be the config value that was found\n ymlValue[i] = configVal;\n\n }\n\n }\n\n return ymlValue;\n }", "title": "" }, { "docid": "63dc1b27dc86ff90bec3d9d8ad3c3c3d", "score": "0.48158106", "text": "configExistsInDB(namespace, key) {\n if (this.configObject.fromDB[namespace] === undefined) {\n return false;\n }\n\n return this.configObject.fromDB[namespace][key] !== undefined;\n }", "title": "" }, { "docid": "e41501406d9ecf9be1ea21ab0b2b10ab", "score": "0.4768711", "text": "function loadSearch() {\n fetch(paramURL)\n .then(statusCheck)\n .then(resp => resp.json())\n .then(updateSearch)\n .catch(handleError);\n }", "title": "" }, { "docid": "4e856d8edfb42137749f56acd239959a", "score": "0.47635493", "text": "function Configuration() {\r\n\tvar that = this;\r\n\tvar config = {};\r\n\tvar db = null;\r\n\tvar fnResult;\r\n\tvar config_org = {};\r\n\r\n\tfunction duplicateConfig() { // private efunction\r\n\t\tfor ( var id in config) {\r\n\t\t\tconfig_org[id] = config[id];\r\n\t\t}\r\n\t}\r\n\r\n\tfunction populateDB(tx) {\r\n\t\ttx.executeSql('CREATE TABLE IF NOT EXISTS CMC (id unique, data)');\r\n\t}\r\n\r\n\tfunction errorCB(err) {\r\n\t\tconsole.log(\"config: Error processing SQL: \" + err.code);\r\n\t\tfnResult(false);\r\n\t}\r\n\r\n\tfunction successCB() {\r\n\t\tconsole.log(\"config: successfully opened database\");\r\n\t\tdb.transaction(function(tx) {\r\n\t\t\ttx.executeSql(\"select id, data from CMC\", [], renderEntries,\r\n\t\t\t\t\terrorCB);\r\n\t\t}, errorCB, successCB1);\r\n\t}\r\n\r\n\tfunction successCB1() {\r\n\t\tconsole.log(\"config: successfully read data from database\");\r\n\t\tfnResult(true);\r\n\t}\r\n\r\n\tfunction renderEntries(tx, results) {\r\n\t\tconsole.log(\"render configuration\");\r\n\t\tif (results.rows.length > 0) {\r\n\t\t\tfor ( var i = 0; i < results.rows.length; i++) {\r\n\t\t\t\tconsole.log(\"render configuration \" + results.rows.item(i).id\r\n\t\t\t\t\t\t+ \", \" + results.rows.item(i).data);\r\n\t\t\t\tconfig[results.rows.item(i).id] = results.rows.item(i).data;\r\n\t\t\t}\r\n\t\t}\r\n\t\tduplicateConfig();\r\n\t}\r\n\r\n\tthis.load = function(aFnResult) {\r\n\t\tconfig_org = {};\r\n\t\tconfig= {};\r\n\t\tconsole.log(\"config: open database CMC\");\r\n\t\tfnResult = aFnResult;\r\n\t\tdb = window.openDatabase(\"CMC\", \"1.0\", \"SMC DB\", 1000000); \r\n\t\tif (db != null) {\r\n\t\t\tdb.transaction(populateDB, errorCB, successCB);\r\n\t\t} else {\r\n\t\t\tvar err = new Object();\r\n\t\t\terr.code = \"Unable to open database\";\r\n\t\t\terrorCB(err);\r\n\t\t}\r\n\t};\r\n\r\n\tthis.get = function(id) {\r\n\t\tif (config[id] != undefined)\r\n\t\t\treturn config[id];\r\n\t\telse\r\n\t\t\treturn null;\r\n\t};\r\n\r\n\tthis.set = function(id, data) {\r\n\t\tconfig[id] = data;\r\n\t};\r\n\r\n\tfunction nullHandler() {\r\n\t}\r\n\t;\r\n\r\n\tfunction dbErrorSave(err) {\r\n\t\tconsole.log(\"config (save): Error processing SQL: \" + err.code);\r\n\t}\r\n\r\n\tthis.save = function() {\r\n\t\tif (db != null) {\r\n\t\t\tconsole.log(\"config (save): start saving\");\r\n\t\t\tdb.transaction(function(tx) {\r\n\t\t\t\tfor ( var id in config) {\r\n\t\t\t\t\tconsole.log('check ' + config_org[id]);\r\n\t\t\t\t\tif (config_org[id] == undefined || config_org[id] == null) {\r\n\t\t\t\t\t\tconsole.log(\"config (save): insert \" + id + \" : \" + config[id]);\r\n\t\t\t\t\t\ttx.executeSql(\"insert into CMC (id,data) values(?,?)\",\r\n\t\t\t\t\t\t\t\t[ id, config[id] ]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.log(\"config (save): update \" + id + \" : \" + config[id]);\r\n\t\t\t\t\t\ttx.executeSql(\"update CMC set data=? where id=?\", [\r\n\t\t\t\t\t\t\t\tconfig[id], id ]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tduplicateConfig();\r\n\t\t\t}, dbErrorSave, nullHandler);\r\n\t\t\r\n\t\t} else {\r\n\t\t\tconsole.log(\"config (save): failed saving, db=null\");\r\n\t\t}\r\n\t};\r\n}", "title": "" }, { "docid": "923576467c7c01ad2b1c44bd2336b88e", "score": "0.47619292", "text": "get_configurations({type, token = '', callback}) {\n const api = this;\n let result;\n if (type === 'private') {\n result = api.db\n .ref(`configurations_${type}`)\n .child(api.current_user.uid)\n .on('value', callback);\n }\n if (type === 'default') {\n result = api.db\n .ref(`configurations_${type}`)\n .on('value', callback);\n }\n if (type === 'public') {\n result = api.db\n .ref(`configurations_${type}_read`)\n .orderByChild('title') // change to 'author_display_name'\n .startAt(token)\n .endAt(`${token}\\uf8ff`)\n .limitToFirst(100)\n .on('value', callback);\n }\n return result;\n }", "title": "" }, { "docid": "dfd847bb31d955376273f437a0f1d08e", "score": "0.47610414", "text": "function searchDB(text, searchValue) {\n\t\t\treturn text.toLowerCase().indexOf(searchValue) == -1; \n\t}", "title": "" }, { "docid": "20e8dbae350baf1281d4b72f65d8170a", "score": "0.47574732", "text": "function getAppConfigById(configs, appId) {\n\t\t\tvar appConfig;\n\n\t\t\tif (configs && appId) {\n\t\t\t\tfor (var i = 0; i < configs.length; i++) {\n\t\t\t\t\tif (configs[i].appId == appId) {\n\t\t\t\t\t\tappConfig = configs[i];\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\treturn appConfig;\n\t\t}", "title": "" }, { "docid": "689e25bf8e55b272754d96761ab8a26e", "score": "0.4750798", "text": "function doSearch() {\n function onHit(hit) {\n console.log(hit);\n };\n function onErr(e) {\n console.log(e);\n }\n BS.search('../test/teszt.xml', '../test/', 'testDB').on('hit', onHit).on('error', onErr);\n}", "title": "" }, { "docid": "ca5409e66dd5114ac0584f93b2559746", "score": "0.47472775", "text": "findByVal(val) {\n let current = this.head\n while(current) {\n if (current.val === val) {\n return current\n }\n current = current.next\n }\n return \"Value not found\"\n }", "title": "" }, { "docid": "94f9e4634c9469c78654b4dd526ca29f", "score": "0.47427127", "text": "search(value, search)\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7cd8dd143352a45f940c83b257d53dbe", "score": "0.47269958", "text": "search(param, callback)\n {\n var finde = param\n /*parse parameter*/\n var key = {existsTitle:finde.existsTitle, user:finde.user, inContext:finde.inContext};\n const find = fork(\"connect_sql.js\", [\"search_post\"]);\n find.send(JSON.stringify(key));\n\n find.on(\"message\", m => {\n /*handle message*/\n if(m=='fail')\n {\n return callback(1, m);\n }\n return callback(0, JSON.parse(m));\n });\n }", "title": "" }, { "docid": "787971f4abe56e88c567b1b53039e71b", "score": "0.47268486", "text": "function searchBuildings() {\n\tvar query = searchField.value;\n\tvar queryResult = [];\n\n\tfor (i = 0; i < buildings.length; i++) {\n\t\tif (buildings[i].name.toLowerCase().includes(query.toLowerCase())) {\n\t\t\tqueryResult.push(buildings[i]);\n\t\t}\n\t}\n\n\t// Update the UI with the buidlings whos name\n\t// matches user query\n\tpopulateBuildings(queryResult);\n}", "title": "" }, { "docid": "e50262ec6d01aff8174d9eea449fece9", "score": "0.47150275", "text": "function findInstance(obj, search_by, first_only, search_value) {\n\t\t// search through obj.search_by == search_key\n\t\t// if first_only is true then return first match\n\t\tif (typeof first_only === 'undefined')\n\t\t\tfirst_only = false;\n\t\tvar keys = [];\n\t\tfor (var key in obj) {\n\t\t\t//console.log(\"Checking id:\"+id);\n\t\t\tvar inst = obj[key];\n\t\t\tif (inst.hasOwnProperty(search_by)) {\n\t\t\t\tif ((typeof search_value === 'undefined') ||\n\t\t\t\t\tinst[search_by] == search_value) {\n\t\t\t\t\tif (first_only)\n\t\t\t\t\t\treturn key;\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (first_only)\n\t\t\treturn null;\n\t\treturn keys;\n\t}", "title": "" }, { "docid": "9fedc6ad26df42a42fb18c48f6a5c88c", "score": "0.46980426", "text": "function findMatchingRepos(value, query, callback) {\n let rids = [];\n const ref = db.database().ref();\n ref.child('repositories').on(\"value\", (snapshot) => {\n snapshot.forEach((repo) => {\n let rid = repo.key;\n let isValid = false;\n if (value === 'repositories') {\n let reponame = repo.val().name;\n if (reponame.toLowerCase().includes(query.toLowerCase())) {\n console.log(\"repo_name = \" + rid);\n isValid = true;\n }\n } else if (value === 'tags') {\n let repo_tags = repo.val().tags;\n let tag = ParseTags(repo_tags);\n if (tag.includes(query)) {\n console.log(\"tags = \" + rid);\n isValid = true;\n }\n }\n let is_private = repo.val().is_private;\n if (is_private === 'T') {\n isValid = false;\n }\n if (isValid) {\n rids.push(repo);\n }\n });\n });\n callback(rids);\n }", "title": "" }, { "docid": "0c4410b8c231895dd610f2f9c785a71c", "score": "0.46862388", "text": "function find() {\n isSearched = false;\n var storeLocatorForm = app.getForm('storelocator');\n storeLocatorForm.clear();\n\n var Content = app.getModel('Content');\n var storeLocatorAsset = Content.get('store-locator');\n\n pageMeta.update(storeLocatorAsset);\n\n var searchResult = function(){\n var searchKey = 'AU';\n var stores = SystemObjectMgr.querySystemObjects('Store', 'countryCode = {0}', 'postalCode asc', searchKey);\n if (empty(stores)) {\n return null;\n } else {\n StoresCount = stores.getCount();\n return {\n 'Stores' : stores, \n 'searchKey' : searchKey, \n 'type' : 'findbycountry', \n 'StoresCount' : StoresCount, \n 'ContinueURL' : ContinueURL\n };\n }\n };\n\n\n app.getView(searchResult())\n .render('storelocator/storelocatorresults');\n \n\n}", "title": "" }, { "docid": "aaea646c50b5fcd7b8b2ce8bc09c670e", "score": "0.46843308", "text": "search(value, search)\n\t{\n\t\tif (search.operator === \"equals\")\n\t\t{\n\t\t\tfor (let item of value)\n\t\t\t{\n\t\t\t\tif (item.key === search.value)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "d0a388fd9716a6127d24f60f24ec99f3", "score": "0.46690172", "text": "findConfigFileInDir (filename, dir) {\n let foundConfig;\n const target = this.path.resolve(this.path.join(dir, filename));\n if (this.fs.existsSync(target)) {\n this.log.debug(`Found file: ${target}`);\n foundConfig = require(target);\n // if it has an apidoc key, read that\n if (foundConfig.apidoc) {\n this.log.verbose(`Using apidoc key of ${filename}`);\n // pull any missing config from root\n ['version', 'name', 'description'].forEach(key => {\n if (!foundConfig.apidoc[key] && foundConfig[key]) {\n this.log.verbose(`Using ${key} from root of ${filename}`);\n foundConfig.apidoc[key] = foundConfig[key];\n }\n });\n return foundConfig.apidoc;\n }\n // for package.json we don't want to read it if it has no apidoc key\n if (filename !== 'package.json') {\n return foundConfig;\n }\n }\n return {};\n }", "title": "" }, { "docid": "a0ede8ca1ca33b2339d9115b409e4351", "score": "0.4664304", "text": "static find(options) {\n options = extend({}, this.query(), options);\n return this.definition().query({ query: options });\n }", "title": "" }, { "docid": "7082508918e3c29f3c2c8e15b99cc050", "score": "0.46642652", "text": "search(val) {\n var currentNode = this.head;\n while (currentNode) {\n if (currentNode.val === val) {\n return currentNode;\n }\n currentNode = currentNode.next;\n }\n\n return false;\n }", "title": "" }, { "docid": "6e9dad6057c9ed864d268c54f9b2957b", "score": "0.46627185", "text": "function findProvidersLiteral(config) {\n for (const prop of config.properties) {\n if (typescript_1.default.isPropertyAssignment(prop) &&\n typescript_1.default.isIdentifier(prop.name) &&\n prop.name.text === 'providers' &&\n typescript_1.default.isArrayLiteralExpression(prop.initializer)) {\n return prop.initializer;\n }\n }\n return null;\n}", "title": "" }, { "docid": "2fac2f836346b84ed46e1a278897e201", "score": "0.46622822", "text": "findOne(keyArg, valueArg){\n let foundObjArr = null\n function searchTree(obj){\n for(let key in obj){\n //checks if object instead of array\n if(key === keyArg && obj[key] === valueArg){\n return foundObjArr = obj;\n } else if(typeof obj[key] === \"object\" && obj[key].length === undefined){\n searchTree(obj[key])\n }\n \n }\n }\n searchTree(this.database);\n return foundObjArr;\n }", "title": "" }, { "docid": "644826ebf5c3982dc3acc889f7c6b7b5", "score": "0.466015", "text": "check_if_config_exists(id) {\n const api = this;\n return api.db\n .ref('configurations_private')\n .child(api.current_user.uid)\n .child(id)\n .once('value')\n .then(data => {\n return Promise.resolve(data.exists());\n });\n }", "title": "" }, { "docid": "4789b23b9f0b5a3b036254a56259b2c5", "score": "0.4652315", "text": "search(value, search)\n\t{\n\t\tif (value === null || search.value === null)\n\t\t\treturn value === search.value;\n\t\telse\n\t\t\treturn value.search(search);\n\t}", "title": "" }, { "docid": "41f182f2f8ebf1fb7ab7e57f89fb751d", "score": "0.46463397", "text": "async function findConfig(directory,key){// `package.json` configuration always wins. Let's check that first.\nconst packageJsonPath=await(0,_findUp.default)('package.json',{cwd:directory});if(packageJsonPath){const packageJson=require(packageJsonPath);if(packageJson[key]!=null&&typeof packageJson[key]==='object'){return packageJson[key];}}// If we didn't find the configuration in `package.json`, we should look for\n// known filenames.\nconst filePath=await(0,_findUp.default)([`.${key}rc.json`,`${key}.config.json`,`.${key}rc.js`,`${key}.config.js`],{cwd:directory});if(filePath){if(filePath.endsWith('.js')){return require(filePath);}// We load JSON contents with JSON5 to allow users to comment in their\n// configuration file. This pattern was popularized by TypeScript.\nconst fileContents=_fs.default.readFileSync(filePath,'utf8');return _json.default.parse(fileContents);}return null;}", "title": "" }, { "docid": "60f973b7913dca1a463f42454bfd7ae7", "score": "0.46435463", "text": "function searchEntryConfig() {\n /*\n * Allow an application to opt in for *multiple* entry points and consequently for\n * multiple bundles in the app by placing `bundle.config.js` in application root\n * directory.\n *\n * If you need to set something like __webpack_public_path__, then your entry file\n * must be vanilla JS because webpack can only process those, so support having a\n * vanilla JS file as entry.\n */\n const entryPath = Path.join(partial.context, \"entry.config.js\");\n\n const entry = optionalRequire(entryPath, {\n fail: err => {\n logger.error(`Loading ${entryPath} failed`, err);\n process.exit(1);\n },\n notFound: () => logger.info(`No custom entry point configuration ${entryPath}`)\n });\n\n if (entry) {\n logger.info(`Using custom entry config from ${entryPath}`);\n }\n\n return entry;\n }", "title": "" }, { "docid": "96a6400f0a0cbb94271319cc51011479", "score": "0.46400848", "text": "function search(searchName) {\n repository.filter(function(pokemon) {\n if (pokemon.name === searchName) {\n return pokemon;\n }\n });\n }", "title": "" }, { "docid": "a629e146fcbd22b0b36e526753b0b92c", "score": "0.46295533", "text": "function find(){\n\t\t\t\t\t\t\tvar f = file.toLowerCase().split('/')\n\t\t\t\t\t\t\twhile(f.length){\n\t\t\t\t\t\t\t\tvar sf = scanHash[f.join('/')]\n\t\t\t\t\t\t\t\tif(sf) return found(null, sf)\n\t\t\t\t\t\t\t\tf.shift()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn found(\"Could not match \"+file+\" to anything in \"+root)\n\t\t\t\t\t\t}", "title": "" }, { "docid": "435ebc82e67b88e05e740317ea0148a6", "score": "0.46294042", "text": "function getItemConfiglist(req, res) {\n estimateConfig.find({})\n .sort({ createdAt: 1 })\n .exec(function (err, data) {\n if (err) {\n console.log(err);\n res.json({ code: Constant.ERROR_CODE, message: Constant.INTERNAL_ERROR });\n }\n else {\n res.json({ code: Constant.SUCCESS_CODE, data: data });\n }\n });\n}", "title": "" }, { "docid": "3e562125e39e3a0ece53397d2a8de6cd", "score": "0.46252298", "text": "function findByParamValue(param, ids) {\n for (let prop in figs) {\n //console.log(`now id is ${(figs[prop])[param]}`);\n let valueToCompare = (figs[prop])[param];\n if (JSON.stringify(valueToCompare) === JSON.stringify(ids)) {\n //console.log('yes');\n return figs[prop];\n }\n //console.log(\" this is it - id=\" + (figs[prop])[param] + \" and ids=\" + ids);\n\n }\n return \"nothing\";\n}", "title": "" }, { "docid": "ee91c265097148c69a5fa51dcfa1116a", "score": "0.4621037", "text": "async function searchProduct(req,res, searchparam, is_goodparam) {\n if (is_goodparam == 'true') {\n Goods.find({$and: [{$text: {$search: searchparam }}, {param3: true}]})\n .then(goods => res.end(JSON.stringify(goods)))\n .catch(err => res.end(JSON.stringify(err)))\n }\n else if (is_goodparam == 'false') {\n Goods.find({$and: [{$text: {$search: searchparam }}, {param3: false}]})\n .then(goods => res.end(JSON.stringify(goods)))\n .catch(err => res.end(JSON.stringify(err)))\n }\n else {\n Goods.find({$text: {$search: searchparam }})\n .then(goods => res.end(JSON.stringify(goods)))\n .catch(err => res.end(JSON.stringify(err)))\n }\n }", "title": "" }, { "docid": "41fcd1f03e2fcf9262b7f293790cfe99", "score": "0.46208972", "text": "function DBSearch () {\n this._init();\n}", "title": "" }, { "docid": "caa02dd1da16a97366c96d2eac2b137d", "score": "0.46200705", "text": "_findMatchingSeriesConfig(keys) {\n return _.find(this._attributes.series, function(value, key) {\n return _.contains(keys, key);\n });\n }", "title": "" }, { "docid": "38034d0c0bea690b6696cf78148a57ce", "score": "0.4617568", "text": "function configToQuery(config : QueryConfig) {\n const qs = {};\n let fIndex = 0;\n\n function addCustom(key, value) {\n const {result, index} = _addCustom(key, value, fIndex);\n fIndex = index;\n return result;\n }\n if (config.rules && config.custom) {\n throw new Error(\"You can't use both .custom and .rules; choose one or the other.\");\n }\n for (const key in config) {\n switch (key) {\n case \"include_fields\":\n qs.include_fields = config.include_fields.join(\",\");\n break;\n case \"iteration\":\n Object.assign(qs, addCustom(\"cf_fx_iteration\", config.iteration))\n break;\n case \"custom\":\n for (const k in config.custom) {\n Object.assign(qs, addCustom(k, config.custom[k]))\n }\n break;\n case \"rules\":\n Object.assign(qs, addRuleSet(config.rules));\n break;\n default:\n qs[key] = config[key];\n }\n }\n\n if (!qs.include_fields) {\n qs.include_fields = [\"id\",\"summary\", \"status\", \"assigned_to\", \"blocks\", \"priority\", \"\"];\n }\n\n return qs;\n}", "title": "" }, { "docid": "9035097a1a8bedd9dd220e4b1224edd2", "score": "0.4616187", "text": "function datatables_search(dt) {\n\tdt.columns('task_type:name').search('current').draw()\n}", "title": "" }, { "docid": "94e357ba1a6bfa344501386ec3a94f88", "score": "0.46126848", "text": "searchWithOffset(searchStr = \"\", offset = 0){\n const tags = searchStr.split(',');\n return searchStr.length !== 0 ? \n this.findAll({limit: PRODUCT_LIMIT, offset, \n where: {$or: [{tags: {$contains: tags}},\n {title: {$iLike: '%' + searchStr + '%'}}] }}) :\n this.findAll({limit: PRODUCT_LIMIT, offset});\n }", "title": "" }, { "docid": "f269b3c4dbd9b16da42f8cc53bc84426", "score": "0.46081698", "text": "function getConf(url) {\n\t\tfor (var i = 0; i < conf.inviteConfigs.length; i++) {\n\t\t\tif (conf.inviteConfigs[i].server.url == url) return conf.inviteConfigs[i];\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "83d3845a5cf0cf9e92dc44860c62a91b", "score": "0.46040502", "text": "function isConfigKeywordFound( theTextString, strConfigKeyword ){\r\n\tif(trim(strConfigKeyword).length ==0) {return false};\r\n\t// construct regExp like: \"(T7200|t7400|t7600)\"\r\n\tvar regExpStr;\r\n\tregExpStr = \"(\" + trim(strConfigKeyword).split(/\\s/g).join(\"|\") + \")\";\r\n\tvar regExSrchWords = new RegExp(regExpStr, \"i\");\r\n\t\r\n\tif ( theTextString.search( regExSrchWords ) == -1 ){\r\n\t\treturn false; // NO MATCH\r\n\t}else {\r\n\t\treturn true;\r\n\t}\r\n}", "title": "" }, { "docid": "f783304e8ca6ca6634ecc7d3276218da", "score": "0.46005705", "text": "function properties_find(id) {\n for(var i=0; i<properties.length; i++) {\n if(properties[i].id == id || properties[i].name == id) {\n return properties[i];\n }\n }\n}", "title": "" }, { "docid": "ff7de6b3f70587d71b4996fc0fc4bdc5", "score": "0.45897567", "text": "function search(searchName) {\n repository.filter(function(pokemon) {\n if (pokemon.name === searchName) {\n return pokemon;\n }\n });\n }", "title": "" }, { "docid": "87e09d148db8cfaa53e3c822525d69e6", "score": "0.45844975", "text": "function find() {\n\t\t\t\t\tctrl.filterConfig.selectListOptions = ListService.getSelectListOptions(ctrl.whichController);\n\t\t\t\t\tctrl.filterConfig.sortType = ctrl.filterConfig.selectListOptions.sortOptions[ctrl.filterConfig.selectListOptions.sortOption].v; //Set sort order.\n spinnerService.loading('watch', WatchAnime.query().$promise.then(function(result) {\n \t\t\t\t\tctrl.animeitems = result;\n\t\t\t\t\t\tconsole.log('watch list: ', result, 'filterConfig: ', ctrl.filterConfig);\n \t\t\t\t}));\n }", "title": "" }, { "docid": "ef39a60d86bc6a5a999a616fb5cea69e", "score": "0.45829016", "text": "function changelist_search($input) {\n if ($('#changelist').length == 0) return; // We're not in changelist\n var search_terms = $input.val();\n if (!search_terms) return; // Nothing to search for\n var adr_term = '&q=' + search_terms;\n var loaded = Kobayashi.closest_loaded( $input.get(0) );\n if (loaded.id == 'content') {\n adr(adr_term);\n }\n else {\n Kobayashi.simple_load( loaded.id + '::' + adr_term );\n }\n return false;\n }", "title": "" }, { "docid": "52c8501528580a782695f5874f5f5e6d", "score": "0.45820212", "text": "static _findByIndexValue (param, indexPath, options, fn) {\n if (typeof options === 'function') {\n fn = options\n options = {}\n }\n\n if (!options) {\n options = {}\n }\n\n if (!fn) {\n fn = _.noop\n }\n\n const modelName = this.modelName\n debug(`${modelName}.findByIndexValue. value: ${param} path: ${indexPath}`)\n\n this.lounge.db.get(param, (err, res) => {\n if (err || !res || !res.value || (!res.value.key && !res.value.keys)) {\n const indexDef = _.get(this.schema.indexes, schemaUtils.getIndexName(indexPath))\n if (this.config.alwaysReturnArrays || (indexDef && indexDef.indexType === 'array')) {\n return fn(err, [])\n }\n return fn(err)\n }\n\n let idToGet = res.value.key || res.value.keys\n\n if (options.lean) {\n if (this.config.alwaysReturnArrays && !Array.isArray(idToGet)) {\n idToGet = [idToGet]\n }\n return fn(err, idToGet)\n }\n\n const wfn = this._wrapCallback(fn, options)\n return this.findById(idToGet, options, (err, docs, missing) => {\n if (!docs || (missing && missing.length)) {\n // special case if no missing, means none were retrieved\n if (!missing || !missing.length) {\n missing = idToGet\n }\n\n debug(`WARNING: missing target reference documents. Model: ${modelName} reference ids: %j. missing: %j`, idToGet, missing)\n\n if (this.config.errorOnMissingIndex || options.errorOnMissingIndex) {\n const missingStr = missing ? missing.toString() : ''\n const idStr = idToGet ? idToGet.toString() : ''\n const error = new Error(`Missing target reference documents. reference ids: ${idStr} missing: ${missingStr}`)\n error.reference = idToGet\n error.missing = missing\n return wfn(error, docs, missing)\n }\n }\n\n return wfn(err, docs, missing)\n })\n })\n }", "title": "" }, { "docid": "5f995cc3db4e1a38b7dc6305017ad704", "score": "0.45811674", "text": "async index(criteria = {}, columns = {}) {\n return this.model.find(criteria, columns);\n }", "title": "" }, { "docid": "1e25c331c7afe9b0d19ef251798bc455", "score": "0.45795837", "text": "function search(people) {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "bae3de0a9d077b124fca28b90de46ba4", "score": "0.45789865", "text": "search(value, search)\n\t{\n\t\tif (search.operator === \"equals\")\n\t\t{\n\t\t\tif (value === null)\n\t\t\t\treturn search.value === null;\n\t\t\telse\n\t\t\t\treturn value.key === search.value;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "630ce0eee64be6ad27fe1b2560f8e3e4", "score": "0.45723227", "text": "find(keyArg, valueArg){\n let foundObjArr = null\n function searchTree(obj){\n for(let key in obj){\n //checks if object instead of array\n if(key === keyArg && obj[key] === valueArg){\n if(!foundObjArr){\n foundObjArr=[]\n foundObjArr.push(obj);\n }else{\n foundObjArr.push(obj)\n }\n }\n if(typeof obj[key] === \"object\" && obj[key].length === undefined){\n searchTree(obj[key])\n }\n }\n }\n searchTree(this.database);\n return foundObjArr;\n }", "title": "" }, { "docid": "91944c130c15c231de23ff83973a2e9c", "score": "0.45668292", "text": "doSavedObjectsContainIndexPatternId(moduleConfig) {\n if (moduleConfig.kibana) {\n for (const category of Object.keys(moduleConfig.kibana)) {\n for (const item of moduleConfig.kibana[category]) {\n const jsonString = item.config.kibanaSavedObjectMeta.searchSourceJSON;\n if (jsonString.match(INDEX_PATTERN_ID)) {\n return true;\n }\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "0163db48c5dea8e6eba68e45954eb695", "score": "0.4566555", "text": "function extractAndSelectServiceConfig(txtRecord, percentage) {\n for (const record of txtRecord) {\n if (record.length > 0 && record[0].startsWith('grpc_config=')) {\n /* Treat the list of strings in this record as a single string and remove\n * \"grpc_config=\" from the beginning. The rest should be a JSON string */\n const recordString = record.join('').substring('grpc_config='.length);\n const recordJson = JSON.parse(recordString);\n return validateAndSelectCanaryConfig(recordJson, percentage);\n }\n }\n return null;\n}", "title": "" }, { "docid": "66e3cefcd4bfd3f6c38f0a1774615198", "score": "0.45648304", "text": "function _search() {\n return {\n /**\n * Get Record by record_id\n * @method byRecordId\n * @private\n * @param {String} record id\n * @returns {Object} record hash\n */\n byRecordId: function (rid, options) {\n if (rid === undefined) {\n throw 'You must supply a record id'\n }\n\n var institution = (options !== undefined) && (options['institution'] !== undefined) ? options['institution'] : jQuery.PRIMO.session.view.institution.code;\n var index = (options !== undefined) && (options['index'] !== undefined) ? options['index'] : 1;\n var bulkSize = (options !== undefined) && (options['bulkSize'] !== undefined) ? options['bulkSize'] : 10;\n\n\n var result = [];\n\n jQuery.get('/PrimoWebServices/xservice/search/brief?institution=' + institution + '&query=rid,contains,' + rid +\n '&indx=' + index + '&bulkSize=' + bulkSize)\n .done(function (data) {\n result = $(_xml2json(data));\n })\n .fail(function (data) {\n console.log('error searching')\n });\n\n return result;\n },\n /**\n * Get Record by a query in the form of index,match type,query\n * @method byQuery\n * @private\n * @param {String} query\n * @returns {Object} record hash\n */\n byQuery: function (query, options) {\n var result = [];\n try {\n\n var institution = (options !== undefined) && (options['institution'] !== undefined) ? options['institution'] : jQuery.PRIMO.session.view.institution.code;\n var index = (options !== undefined) && (options['index'] !== undefined) ? options['index'] : 1;\n var bulkSize = (options !== undefined) && (options['bulkSize'] !== undefined) ? options['bulkSize'] : 10;\n var apiKey = (options !== undefined) && (options['apiKey'] !== undefined) ? options['apiKey'] : null;\n var regionURL = (options !== undefined) && (options['regionURL'] !== undefined) ? options['regionURL'] : 'https://api-eu.hosted.exlibrisgroup.com';\n\n var restAPI = (options !== undefined) && (options['restAPI'] !== undefined) ? options['restAPI'] : false;\n\n //REGIONURL\n // America https://api-na.hosted.exlibrisgroup.com\n // EU https://api-eu.hosted.exlibrisgroup.com\n // APAC https://api-ap.hosted.exlibrisgroup.com\n\n if (!Array.isArray(query)) {\n query = [query];\n }\n\n if (restAPI) {\n var restURL = 'q=' + query.join(';') + '&inst=' + institution + '&offset=' + index + '&limit=' + bulkSize;\n if (apiKey) {\n restURL = regionURL + '/primo/v1/pnxs?' + restURL + '&apikey=' + apiKey;\n }else{\n restURL = '/primo_library/libweb/webservices/rest/v1/pnxs?' + restURL;\n }\n\n jQuery.ajax({\n async: false,\n cache: false,\n type: 'get',\n dataType: 'json',\n url: restURL,\n beforeSend: function(jqXHR, s){\n // removes auto injected header by ExL, prevents CORS error\n }\n })\n .done(function (data, event, xhr) {\n if (typeof data == \"string\"){\n result = JSON.parse(data);\n } else {\n result = data;\n }\n })\n .fail(function (data, event, xhr) {\n console.log('error searching', e.message)\n });\n \n return result;\n } else {\n var tmpQuery = \"\";\n jQuery.each(query, function (index, value) {\n tmpQuery += '&query=' + value;\n });\n\n query = tmpQuery;\n\n jQuery.ajax(\n {\n async: false,\n cache: false,\n type: 'get',\n dataType: 'xml',\n url: '/PrimoWebServices/xservice/search/brief?institution=' + institution + '&indx=' + index + '&bulkSize=' + bulkSize + query\n })\n .done(function (data, event, xhr) {\n result = $(_xml2json(data));\n })\n .fail(function (data, event, xhr) {\n console.log('error searching', e.message)\n });\n\n\n if (result.length > 0 && result[0].hasOwnProperty('JAGROOT')) {\n return result[0].JAGROOT.RESULT.DOCSET.DOC;\n } else if (result.length > 0 && result[0].hasOwnProperty('MESSAGE')) {\n console.log(result[0].MESSAGE);\n }\n }\n } catch (e) {\n console.log('error searching: ', e.message);\n }\n\n return null;\n }\n }\n}", "title": "" }, { "docid": "d05381a508b8464dda83068f8ad46ddc", "score": "0.4563204", "text": "function performQuery(config) {\n\tif (!config || !config.moods) {\n\t\twindow.location.reload();\n\t\treturn;\n\t} else if (config.moods.length == 0){\n\t\twindow.location = '/';\n\t\treturn;\n\t} else {\n\t\tconst moods = config.moods;\n\t\tlet location = '/search/' + moods.join('+');\n\n\t\tconst genres = config.genres ? config.genres : [];\n\t\tif (genres.length > 0) {\n\t\t\tlocation += '/'\n\t\t\tlocation += genres.join('+');\n\t\t}\n\n\t\tconst queryParameter = config.queryParameter;\n\t\tif (queryParameter && Object.keys(queryParameter).length ) {\n\t\t\tlocation += ('?'+ encodeQueryData(queryParameter));\n\t\t}\n\n\t\twindow.location = location;\n\t}\n}", "title": "" } ]
31d05fa7dd5cf32c95e138c2522fdb09
Make class private; we expose the instance via gird.testing.TestRun
[ { "docid": "049ab4107347cd1dc1e0444dce3bbdb6", "score": "0.0", "text": "function TestRun() {\n\n goog.events.EventTarget.call( this );\n\n this.tests = [];\n this.active = 0;\n}", "title": "" } ]
[ { "docid": "7fcc2feb16543a5f1f7de48b0056d3fd", "score": "0.7050719", "text": "function private() {}", "title": "" }, { "docid": "436632995e3fe68df51c2ef5a924f0cd", "score": "0.63969934", "text": "function _privateMethods() {}", "title": "" }, { "docid": "e50f70ee409d0837f1ac185ea5b779a5", "score": "0.637804", "text": "_method_private() {\n this.log('This is private');\n }", "title": "" }, { "docid": "0fb15df733b52ef3ede4d78c87e12865", "score": "0.62872875", "text": "function _privateMethod() {\n\t\tconsole.log('do some private stuff');\n\t}", "title": "" }, { "docid": "acffe366305a123ddf65c9f97713c0bb", "score": "0.61930925", "text": "function ___PRIVATE___(){}", "title": "" }, { "docid": "75d8b6c066765bc31f67f0e1d9ea4d76", "score": "0.61850387", "text": "function privateMethod() {\n console.log(\"I am private\");\n }", "title": "" }, { "docid": "d365948d6c5baae04257172008c3a677", "score": "0.6166926", "text": "function privateMethod(){\n console.log( \"I am private\" );\n }", "title": "" }, { "docid": "0a72eedea09446b2ff2914eb24e7c3bb", "score": "0.6159155", "text": "function privateMethod(){\n console.log( \"I am private\" );\n }", "title": "" }, { "docid": "5078ef749f085d0a4b0075a1bbbb53a6", "score": "0.6104063", "text": "constructor() {\n // Unused class for now. Maybe in the future.\n }", "title": "" }, { "docid": "7c7e6b5c1ea01a003a884a62ea1d9869", "score": "0.61021703", "text": "function NetInternalsTest() {}", "title": "" }, { "docid": "4c5c9bf3416ea753b4ad827eb68ef429", "score": "0.6034125", "text": "function myPrivateFunction()\n\t\t{\n\t\t}", "title": "" }, { "docid": "90693ba4b4625a7bcb69c8ee04100d46", "score": "0.60328066", "text": "function noNewTest(cls) {\n\t\t\t\t\t// call class function without new\n\t\t\t\t\tvar obj = cls('instance value');\n\t\t\t\t\tassert.equal(obj.noNew_Value, 'instance value');\n\t\t\t\t\tassert.equal(g.noNew_Value, 'global value');\n\t\t\t\t}", "title": "" }, { "docid": "2f55f4efc702b47e066d2ca02581a2d9", "score": "0.6025118", "text": "function _init() {\n\t\t_privateMethod();\n\t}", "title": "" }, { "docid": "a47ed574e8b14823688688ae14f37c5c", "score": "0.6022001", "text": "function _privateMethod() {\n\t\tconsole.log('do some stuff');\n\t}", "title": "" }, { "docid": "a96c6a228350e83674557ede3d5eb436", "score": "0.5983903", "text": "function privateMethod(){\n return \"I am private\";\n }", "title": "" }, { "docid": "695d00f95aabc5fcf2ffbbbfdc7ee55e", "score": "0.59823114", "text": "print() { // object\n console.log(\"I am a private class which will not be used by require untill i am exported\"); //Made for internal working\n }", "title": "" }, { "docid": "3aa5de57d10871770c6b4e55924b9f22", "score": "0.5941918", "text": "testPrivatesRenaming() {\n // Can only fail in build version with all optimizations\n this.assertEquals(\n \"__te\" + \"st a\",\n this.__test(),\n \"Variable in a string renamed!\"\n );\n\n this.assertEquals(\n \"__te\" + \"st a test\",\n this.__test() + \" test\",\n \"Variable in a string renamed!\"\n );\n }", "title": "" }, { "docid": "1b9e3b57eefe47874a6a2d8cae0a6a1a", "score": "0.5887076", "text": "function publicMethod() {\n _privateMethod();\n }", "title": "" }, { "docid": "2e9e247743746e2e5c7e4e2648a24f89", "score": "0.58292365", "text": "function private_function()\n\t {\n\n\t }", "title": "" }, { "docid": "a1f79ea348a2817416acedc27e362142", "score": "0.57734275", "text": "function UtilTest() {}", "title": "" }, { "docid": "f175631f34a71b53bbdb167c1aa23243", "score": "0.5758469", "text": "setPrivateVar() {}", "title": "" }, { "docid": "22868487dc7b65a6da8b01360591b13c", "score": "0.57550776", "text": "function ByzTest() {\n // Private variables:\n this._anodeserver;\n}", "title": "" }, { "docid": "55955776ada018df8d2c8729d2064101", "score": "0.5602835", "text": "function _constructor () {\n _removeSharedSecret();\n }", "title": "" }, { "docid": "da654bca037824213843ea932766efeb", "score": "0.5529782", "text": "[examplePrivateMethod](example_parameter) {\n // FIXME: return this instead\n console.log('I should not be accessible.');\n }", "title": "" }, { "docid": "8a01d226b69977bfa3ff6b240dc33113", "score": "0.551237", "text": "function makeConstructorPrivate(cls, optionalMessage) {\r\n function PublicConstructor() {\r\n var error = 'This constructor is private.';\r\n if (optionalMessage) {\r\n error += ' ';\r\n error += optionalMessage;\r\n }\r\n throw new FirestoreError(Code.INVALID_ARGUMENT, error);\r\n }\r\n // Make sure instanceof checks work and all methods are exposed on the public\r\n // constructor\r\n PublicConstructor.prototype = cls.prototype;\r\n // Copy any static methods/members\r\n for (var staticProperty in cls) {\r\n if (cls.hasOwnProperty(staticProperty)) {\r\n PublicConstructor[staticProperty] = cls[staticProperty];\r\n }\r\n }\r\n return PublicConstructor;\r\n}", "title": "" }, { "docid": "baf0e3dc0787bfec9d73d4dbdb552a1b", "score": "0.5508946", "text": "function makeConstructorPrivate(cls, optionalMessage) {\n function PublicConstructor() {\n var error = 'This constructor is private.';\n\n if (optionalMessage) {\n error += ' ';\n error += optionalMessage;\n }\n\n throw new FirestoreError(Code.INVALID_ARGUMENT, error);\n } // Make sure instanceof checks work and all methods are exposed on the public\n // constructor\n\n\n PublicConstructor.prototype = cls.prototype; // Copy any static methods/members\n\n for (var staticProperty in cls) {\n if (cls.hasOwnProperty(staticProperty)) {\n PublicConstructor[staticProperty] = cls[staticProperty];\n }\n }\n\n return PublicConstructor;\n}", "title": "" }, { "docid": "baf0e3dc0787bfec9d73d4dbdb552a1b", "score": "0.5508946", "text": "function makeConstructorPrivate(cls, optionalMessage) {\n function PublicConstructor() {\n var error = 'This constructor is private.';\n\n if (optionalMessage) {\n error += ' ';\n error += optionalMessage;\n }\n\n throw new FirestoreError(Code.INVALID_ARGUMENT, error);\n } // Make sure instanceof checks work and all methods are exposed on the public\n // constructor\n\n\n PublicConstructor.prototype = cls.prototype; // Copy any static methods/members\n\n for (var staticProperty in cls) {\n if (cls.hasOwnProperty(staticProperty)) {\n PublicConstructor[staticProperty] = cls[staticProperty];\n }\n }\n\n return PublicConstructor;\n}", "title": "" }, { "docid": "9390369aa72011d29c0fd5aa1e6d2aa5", "score": "0.5503378", "text": "constructor() {\n /**\n * @type {!Blockly.CodeGenerator} The generator to use for running test cases.\n */\n this.generator;\n }", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "34aeb2dd87c6030c96d86b40d75b22e9", "score": "0.5482738", "text": "function Library () {\n this.tests = {};\n}", "title": "" }, { "docid": "47d623592bba1ab03c7cb6123a90f745", "score": "0.54719436", "text": "function makeConstructorPrivate(cls, optionalMessage) {\n function PublicConstructor() {\n var error = 'This constructor is private.';\n if (optionalMessage) {\n error += ' ';\n error += optionalMessage;\n }\n throw new FirestoreError(Code.INVALID_ARGUMENT, error);\n }\n // Make sure instanceof checks work and all methods are exposed on the public\n // constructor\n PublicConstructor.prototype = cls.prototype;\n // Copy any static methods/members\n for (var staticProperty in cls) {\n if (cls.hasOwnProperty(staticProperty)) {\n PublicConstructor[staticProperty] = cls[staticProperty];\n }\n }\n return PublicConstructor;\n}", "title": "" }, { "docid": "47d623592bba1ab03c7cb6123a90f745", "score": "0.54719436", "text": "function makeConstructorPrivate(cls, optionalMessage) {\n function PublicConstructor() {\n var error = 'This constructor is private.';\n if (optionalMessage) {\n error += ' ';\n error += optionalMessage;\n }\n throw new FirestoreError(Code.INVALID_ARGUMENT, error);\n }\n // Make sure instanceof checks work and all methods are exposed on the public\n // constructor\n PublicConstructor.prototype = cls.prototype;\n // Copy any static methods/members\n for (var staticProperty in cls) {\n if (cls.hasOwnProperty(staticProperty)) {\n PublicConstructor[staticProperty] = cls[staticProperty];\n }\n }\n return PublicConstructor;\n}", "title": "" }, { "docid": "24111dc275331fc420484d88fcb08466", "score": "0.54686934", "text": "function Library() {\n if (!(this instanceof Library)) return new Library();\n this.tests = {};\n}", "title": "" }, { "docid": "d6900ec5a27de20f8228b4a43ab5a088", "score": "0.5458149", "text": "function ClassWithoutLogger() {}", "title": "" }, { "docid": "34dd2ed33403e2e22b1c1dfc77115285", "score": "0.544399", "text": "function testConstructor() {}", "title": "" }, { "docid": "34dd2ed33403e2e22b1c1dfc77115285", "score": "0.544399", "text": "function testConstructor() {}", "title": "" }, { "docid": "2febf91fa4f923a18c259476f65a4d35", "score": "0.5416411", "text": "instance() {\n throw new Error(`Must be implemented in a child class!`)\n }", "title": "" }, { "docid": "2ba0e5eab9818816e8813ce4466f5d0c", "score": "0.5415275", "text": "function Library () {\n\t this.tests = {};\n\t}", "title": "" }, { "docid": "2ba0e5eab9818816e8813ce4466f5d0c", "score": "0.5415275", "text": "function Library () {\n\t this.tests = {};\n\t}", "title": "" }, { "docid": "f64a0a6e12e887a815d08f13a497b40b", "score": "0.54090464", "text": "_generateTests() {\n throw 'not implemented';\n }", "title": "" }, { "docid": "9892a41c5c3f12fe54dcf72729cb58a0", "score": "0.53992206", "text": "function public_function() \n\t{\n\t\t/**\n\t\t * Note that we can still call\n\t\t * private functions within the scope\n\t\t * of the \"class\".\n\t\t */\n\t\tprivate_function();\n\t}", "title": "" }, { "docid": "149a144a3a32ec2a41b04ce6b43d662d", "score": "0.5393434", "text": "_run(...args) { // eslint-disable-line no-unused-vars\n\t\tthrow new Error(`${this.constructor.name} doesn't have a _run() method.`);\n\t}", "title": "" }, { "docid": "f9579a268dd4aa374f44a1b802dd7201", "score": "0.5351594", "text": "constructor(run) {\n this._run = run;\n }", "title": "" }, { "docid": "722571b7fa29400fd0b3c4f063c448fe", "score": "0.5335101", "text": "function makeConstructorPrivate(cls, optionalMessage) {\n function PublicConstructor() {\n var error = 'This constructor is private.';\n if (optionalMessage) {\n error += ' ';\n error += optionalMessage;\n }\n throw new __WEBPACK_IMPORTED_MODULE_0__error__[\"a\" /* FirestoreError */](__WEBPACK_IMPORTED_MODULE_0__error__[\"b\" /* Code */].INVALID_ARGUMENT, error);\n }\n // Make sure instanceof checks work and all methods are exposed on the public\n // constructor\n PublicConstructor.prototype = cls.prototype;\n // Copy any static methods/members\n for (var staticProperty in cls) {\n if (cls.hasOwnProperty(staticProperty)) {\n PublicConstructor[staticProperty] = cls[staticProperty];\n }\n }\n return PublicConstructor;\n}", "title": "" }, { "docid": "9c95abb9088b1c35e7ca47e1f40df6d1", "score": "0.53323853", "text": "constructor() {\r\n\t\tthrow new Error('Not implemented');\r\n\t}", "title": "" }, { "docid": "b9e399ad529d3dacb15fad6546fcab35", "score": "0.5328352", "text": "function Class(){}", "title": "" }, { "docid": "b9e399ad529d3dacb15fad6546fcab35", "score": "0.5328352", "text": "function Class(){}", "title": "" }, { "docid": "e20d36a8b26e163da19fe04ae884c878", "score": "0.5317956", "text": "constructor() {\n throw new Error('Not implemented');\n }", "title": "" }, { "docid": "9e57821a7663f4748fb68f7c82f8930f", "score": "0.53175265", "text": "classMethod() {}", "title": "" }, { "docid": "8b7c50d5c9046ff6846b4238de91638f", "score": "0.5313241", "text": "function Library() {\n\t this.tests = {};\n\t}", "title": "" }, { "docid": "b57cbfe97d9670fb03b80998bc9942ee", "score": "0.5303127", "text": "static TestConnection() {}", "title": "" }, { "docid": "69ced86ef123e790c70466d696812a34", "score": "0.5295542", "text": "constructor () {\n // A non exported variable was used to demonstrate that it can be used\n // in an exported class.\n this.text = text\n }", "title": "" }, { "docid": "88f413f664fc36440aa5f6fa212256e1", "score": "0.5294285", "text": "constructor() {\n /**\n * @type {string} The title for the test case.\n */\n this.title;\n /**\n * @type {boolean|undefined} Whether this test case should be skipped.\n * Used to skip buggy test case and should have an associated bug.\n */\n this.skip;\n /**\n * @type {boolean|undefined} Whether this test case should be called as\n * only. Used for debugging.\n */\n this.only;\n }", "title": "" }, { "docid": "6a8914af31690d098f7bc62d005a168b", "score": "0.52825356", "text": "function Constructor() {\n var privateProperty = 'private';\n var privateMethod = function() {\n alert('Called from private method');\n };\n\n this.getter = privateMethod;\n}", "title": "" }, { "docid": "2f83124dd1e6ffd476e099b77d8f2081", "score": "0.52619135", "text": "function SuperclassBare() {}", "title": "" }, { "docid": "2f83124dd1e6ffd476e099b77d8f2081", "score": "0.52619135", "text": "function SuperclassBare() {}", "title": "" }, { "docid": "673af67e840bc2f8fd69cf1d8e79ae1e", "score": "0.5256024", "text": "function myPrivateMethod1($this) {\n // TODO: Write real private methods.\n }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "a2ae74d521b64e1081e5d0339fcb6639", "score": "0.52463853", "text": "function Class() { }", "title": "" }, { "docid": "46e5e9d32de8ea9848aaccf54c01b757", "score": "0.5232174", "text": "static Instantiate() {}", "title": "" }, { "docid": "46e5e9d32de8ea9848aaccf54c01b757", "score": "0.5232174", "text": "static Instantiate() {}", "title": "" }, { "docid": "46e5e9d32de8ea9848aaccf54c01b757", "score": "0.5232174", "text": "static Instantiate() {}", "title": "" }, { "docid": "e45785ea7c2ced3af5e536c484f772e8", "score": "0.52237797", "text": "async function testConstructor() {}", "title": "" }, { "docid": "e45785ea7c2ced3af5e536c484f772e8", "score": "0.52237797", "text": "async function testConstructor() {}", "title": "" }, { "docid": "ef1ba15ff4f15447520542acc99eb3bc", "score": "0.522296", "text": "constructor(a,b){\n this.x = a;\n this.y = b;\n // lets initialize theprivate member\n this.#privateValue = a;\n }", "title": "" }, { "docid": "9e7bd8e252f8de031e6a9407796403e2", "score": "0.5173446", "text": "function createManager() {\n return new PrivateManager();\n}", "title": "" }, { "docid": "0e09a682667d4ab2c7e85193be43a57f", "score": "0.5165791", "text": "function Library() {\n\t if (!(this instanceof Library)) return new Library();\n\t this.tests = {};\n\t}", "title": "" }, { "docid": "0e09a682667d4ab2c7e85193be43a57f", "score": "0.5165791", "text": "function Library() {\n\t if (!(this instanceof Library)) return new Library();\n\t this.tests = {};\n\t}", "title": "" }, { "docid": "0e09a682667d4ab2c7e85193be43a57f", "score": "0.5165791", "text": "function Library() {\n\t if (!(this instanceof Library)) return new Library();\n\t this.tests = {};\n\t}", "title": "" }, { "docid": "666d178cb2dbd8108849f2526c1a957a", "score": "0.5161755", "text": "function BluetoothInternalsTest() {\n this.adapterFactory = null;\n this.setupResolver = new PromiseResolver();\n}", "title": "" }, { "docid": "728dd7aeca7e141a5c43153e59ffdbd5", "score": "0.51613826", "text": "constructor () {\n // intentionally empty\n }", "title": "" }, { "docid": "bd377c86685811797bf5ebd299a6847a", "score": "0.5160719", "text": "function createMockObjects() {\n // nothing to do\n}", "title": "" }, { "docid": "284fb10d7504330f0dc16fbe23d5fe21", "score": "0.51597667", "text": "function Class() {}", "title": "" }, { "docid": "284fb10d7504330f0dc16fbe23d5fe21", "score": "0.51597667", "text": "function Class() {}", "title": "" }, { "docid": "284fb10d7504330f0dc16fbe23d5fe21", "score": "0.51597667", "text": "function Class() {}", "title": "" }, { "docid": "b7dccdd61ecfd6830e8a6c49f7de2f3d", "score": "0.5156644", "text": "function DKCore() {\n\tthrow new Error('This is a static class (Это статический класс!)');\n}", "title": "" }, { "docid": "450415ee6ba669c85259ba82c85a6dc4", "score": "0.5142266", "text": "constructor() {\n\n\t\t\t//ALLOWS THE USE OF THIS WHEN EXTENDING TO ANOTHER CLASS\n\t\t\tsuper()\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ba80f972fe62eddff5207488c9f1c06b", "score": "0.5122579", "text": "function privateLog() {\n console.log('Private Function');\n}", "title": "" }, { "docid": "d0ccf4b9fc81a8f47343d6b695f00e79", "score": "0.5121727", "text": "constructor() {\n super();\n\n // Immutable object.\n Object.freeze( this );\n }", "title": "" }, { "docid": "1037cf4ea6f8e11ae087b325f2e08ebd", "score": "0.51092017", "text": "function AbstractRunner() {\n }", "title": "" }, { "docid": "6929b4b423700a9210fafedfc6633e7a", "score": "0.5097916", "text": "function patchClass(className) {\n\t\t var OriginalClass = global[className];\n\t\t if (!OriginalClass)\n\t\t return;\n\t\t global[className] = function () {\n\t\t var a = bindArguments(arguments);\n\t\t switch (a.length) {\n\t\t case 0:\n\t\t this[originalInstanceKey] = new OriginalClass();\n\t\t break;\n\t\t case 1:\n\t\t this[originalInstanceKey] = new OriginalClass(a[0]);\n\t\t break;\n\t\t case 2:\n\t\t this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n\t\t break;\n\t\t case 3:\n\t\t this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n\t\t break;\n\t\t case 4:\n\t\t this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n\t\t break;\n\t\t default: throw new Error('what are you even doing?');\n\t\t }\n\t\t };\n\t\t var instance = new OriginalClass();\n\t\t var prop;\n\t\t for (prop in instance) {\n\t\t (function (prop) {\n\t\t if (typeof instance[prop] === 'function') {\n\t\t global[className].prototype[prop] = function () {\n\t\t return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n\t\t };\n\t\t }\n\t\t else {\n\t\t Object.defineProperty(global[className].prototype, prop, {\n\t\t set: function (fn) {\n\t\t if (typeof fn === 'function') {\n\t\t this[originalInstanceKey][prop] = global.zone.bind(fn);\n\t\t }\n\t\t else {\n\t\t this[originalInstanceKey][prop] = fn;\n\t\t }\n\t\t },\n\t\t get: function () {\n\t\t return this[originalInstanceKey][prop];\n\t\t }\n\t\t });\n\t\t }\n\t\t }(prop));\n\t\t }\n\t\t for (prop in OriginalClass) {\n\t\t if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n\t\t global[className][prop] = OriginalClass[prop];\n\t\t }\n\t\t }\n\t\t}", "title": "" } ]