Best JavaScript code snippet using tracetest
index.js
Source:index.js
1const data = [2 {3 "alias": "leaders",4 "data": {5 "title": "ÐолÑÑе вÑего коммиÑов",6 "subtitle": "СпÑÐ¸Ð½Ñ â 213",7 "emoji": "ð",8 "users": [9 {"id": 3, "name": "ÐаÑÑÑ Ðовалева", "avatar": "3.jpg", "valueText": "32"},10 {"id": 9, "name": "СеÑгей ÐеÑежной", "avatar": "9.jpg", "valueText": "27"},11 {"id": 7, "name": "ÐмиÑÑий ÐндÑиÑнов", "avatar": "7.jpg", "valueText": "22"},12 {"id": 6, "name": "ÐндÑей ÐокÑоÑÑов", "avatar": "6.jpg", "valueText": "20"},13 {"id": 8, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ðванков", "avatar": "8.jpg", "valueText": "19"}14 ]15 }16 },17 {18 "alias": "leaders",19 "data": {20 "title": "СамÑй болÑÑой коммиÑ",21 "subtitle": "СпÑÐ¸Ð½Ñ â 213",22 "emoji": "ð®",23 "users": [24 {"id": 12, "name": "ÐлекÑей ЯÑоÑевиÑ", "avatar": "12.jpg", "valueText": "4001 ÑÑÑока"},25 {"id": 5, "name": "ÐлекÑÐ°Ð½Ð´Ñ ÐиколаиÑев", "avatar": "5.jpg", "valueText": "3845 ÑÑÑок"},26 {"id": 8, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ðванков", "avatar": "8.jpg", "valueText": "3640 ÑÑÑок"},27 {"id": 10, "name": "Яна ÐеÑникова", "avatar": "10.jpg", "valueText": "3453 ÑÑÑоки"},28 {"id": 4, "name": "Ðадим ÐаÑев", "avatar": "4.jpg", "valueText": "2852 ÑÑÑоки"}29 ]30 }31 },32 {33 "alias": "vote",34 "data": {35 "title": "СамÑй ð внимаÑелÑнÑй ÑазÑабоÑÑик",36 "subtitle": "СпÑÐ¸Ð½Ñ â 213",37 "emoji": "ð",38 "selectedUserId": 4,39 "users": [40 {"id": 1, "name": "Ðвгений ÐеменÑÑев", "avatar": "1.jpg", "valueText": "22 голоÑа"},41 {"id": 4, "name": "Ðадим ÐаÑев", "avatar": "4.jpg", "valueText": "19 голоÑов"},42 {"id": 10, "name": "Яна ÐеÑникова", "avatar": "10.jpg", "valueText": "17 голоÑов"},43 {"id": 12, "name": "ÐлекÑей ЯÑоÑевиÑ", "avatar": "12.jpg", "valueText": "16 голоÑов"},44 {"id": 11, "name": "ЮÑий ФÑолов", "avatar": "11.jpg", "valueText": "11 голоÑов"},45 {"id": 2, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ð¨Ð»ÐµÐ¹ÐºÐ¾", "avatar": "2.jpg", "valueText": "10 голоÑов"},46 {"id": 5, "name": "ÐлекÑÐ°Ð½Ð´Ñ ÐиколаиÑев", "avatar": "5.jpg", "valueText": "9 голоÑов"},47 {"id": 6, "name": "ÐндÑей ÐокÑоÑÑов", "avatar": "6.jpg", "valueText": "8 голоÑов"},48 {"id": 8, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ðванков", "avatar": "8.jpg", "valueText": "7 голоÑов"},49 {"id": 7, "name": "ÐмиÑÑий ÐндÑиÑнов", "avatar": "7.jpg", "valueText": "6 голоÑов"},50 {"id": 3, "name": "ÐаÑÑÑ Ðовалева", "avatar": "3.jpg", "valueText": "5 голоÑов"},51 {"id": 9, "name": "СеÑгей ÐеÑежной", "avatar": "9.jpg", "valueText": "4 голоÑа"}52 ]53 }54 },55 {56 "alias": "leaders",57 "data": {58 "title": "СамÑй ð внимаÑелÑнÑй ÑазÑабоÑÑик",59 "subtitle": "СпÑÐ¸Ð½Ñ â 213",60 "emoji": "ð",61 "selectedUserId": 11,62 "users": [63 {"id": 1, "name": "Ðвгений ÐеменÑÑев", "avatar": "1.jpg", "valueText": "22 голоÑа"},64 {"id": 4, "name": "Ðадим ÐаÑев", "avatar": "4.jpg", "valueText": "19 голоÑов"},65 {"id": 10, "name": "Яна ÐеÑникова", "avatar": "10.jpg", "valueText": "17 голоÑов"},66 {"id": 12, "name": "ÐлекÑей ЯÑоÑевиÑ", "avatar": "12.jpg", "valueText": "16 голоÑов"},67 {"id": 11, "name": "ЮÑий ФÑолов", "avatar": "11.jpg", "valueText": "15 голоÑов"},68 {"id": 2, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ð¨Ð»ÐµÐ¹ÐºÐ¾", "avatar": "2.jpg", "valueText": "14 голоÑов"},69 {"id": 5, "name": "ÐлекÑÐ°Ð½Ð´Ñ ÐиколаиÑев", "avatar": "5.jpg", "valueText": "12 голоÑов"},70 {"id": 6, "name": "ÐндÑей ÐокÑоÑÑов", "avatar": "6.jpg", "valueText": "9 голоÑов"},71 {"id": 8, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ðванков", "avatar": "8.jpg", "valueText": "8 голоÑов"},72 {"id": 7, "name": "ÐмиÑÑий ÐндÑиÑнов", "avatar": "7.jpg", "valueText": "6 голоÑов"},73 {"id": 3, "name": "ÐаÑÑÑ Ðовалева", "avatar": "3.jpg", "valueText": "5 голоÑов"},74 {"id": 9, "name": "СеÑгей ÐеÑежной", "avatar": "9.jpg", "valueText": "4 голоÑа"}75 ]76 }77 },78 {79 "alias": "vote",80 "data": {81 "title": "СамÑй ðª команднÑй ÑазÑабоÑÑик",82 "subtitle": "СпÑÐ¸Ð½Ñ â 213",83 "emoji": "ðª",84 "offset": 8,85 "users": [86 {"id": 2, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ð¨Ð»ÐµÐ¹ÐºÐ¾", "avatar": "2.jpg", "valueText": "24 голоÑа"},87 {"id": 3, "name": "ÐаÑÑÑ Ðовалева", "avatar": "3.jpg", "valueText": "21 голоÑ"},88 {"id": 6, "name": "ÐндÑей ÐокÑоÑÑов", "avatar": "6.jpg", "valueText": "19 голоÑов"},89 {"id": 7, "name": "ÐмиÑÑий ÐндÑиÑнов", "avatar": "7.jpg", "valueText": "18 голоÑов"},90 {"id": 1, "name": "Ðвгений ÐеменÑÑев", "avatar": "1.jpg", "valueText": "16 голоÑов"},91 {"id": 9, "name": "СеÑгей ÐеÑежной", "avatar": "9.jpg", "valueText": "14 голоÑов"},92 {"id": 8, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ðванков", "avatar": "8.jpg", "valueText": "13 голоÑов"},93 {"id": 11, "name": "ЮÑий ФÑолов", "avatar": "11.jpg", "valueText": "11 голоÑов"},94 {"id": 10, "name": "Яна ÐеÑникова", "avatar": "10.jpg", "valueText": "9 голоÑов"},95 {"id": 12, "name": "ÐлекÑей ЯÑоÑевиÑ", "avatar": "12.jpg", "valueText": "7 голоÑов"},96 {"id": 5, "name": "ÐлекÑÐ°Ð½Ð´Ñ ÐиколаиÑев", "avatar": "5.jpg", "valueText": "6 голоÑов"},97 {"id": 4, "name": "Ðадим ÐаÑев", "avatar": "4.jpg", "valueText": "5 голоÑов"}98 ]99 }100 },101 {102 "alias": "leaders",103 "data": {104 "title": "СамÑй ðª команднÑй ÑазÑабоÑÑик",105 "subtitle": "СпÑÐ¸Ð½Ñ â 213",106 "emoji": "ðª",107 "selectedUserId": 6,108 "users": [109 {"id": 2, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ð¨Ð»ÐµÐ¹ÐºÐ¾", "avatar": "2.jpg", "valueText": "24 голоÑа"},110 {"id": 3, "name": "ÐаÑÑÑ Ðовалева", "avatar": "3.jpg", "valueText": "21 голоÑ"},111 {"id": 6, "name": "ÐндÑей ÐокÑоÑÑов", "avatar": "6.jpg", "valueText": "19 голоÑов"},112 {"id": 7, "name": "ÐмиÑÑий ÐндÑиÑнов", "avatar": "7.jpg", "valueText": "18 голоÑов"},113 {"id": 1, "name": "Ðвгений ÐеменÑÑев", "avatar": "1.jpg", "valueText": "16 голоÑов"},114 {"id": 9, "name": "СеÑгей ÐеÑежной", "avatar": "9.jpg", "valueText": "14 голоÑов"},115 {"id": 8, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ðванков", "avatar": "8.jpg", "valueText": "13 голоÑов"},116 {"id": 11, "name": "ЮÑий ФÑолов", "avatar": "11.jpg", "valueText": "11 голоÑов"},117 {"id": 10, "name": "Яна ÐеÑникова", "avatar": "10.jpg", "valueText": "9 голоÑов"},118 {"id": 12, "name": "ÐлекÑей ЯÑоÑевиÑ", "avatar": "12.jpg", "valueText": "7 голоÑов"},119 {"id": 5, "name": "ÐлекÑÐ°Ð½Ð´Ñ ÐиколаиÑев", "avatar": "5.jpg", "valueText": "6 голоÑов"},120 {"id": 4, "name": "Ðадим ÐаÑев", "avatar": "4.jpg", "valueText": "5 голоÑов"}121 ]122 }123 },124 {125 "alias": "chart",126 "data": {127 "title": "ÐоммиÑÑ",128 "subtitle": "СпÑÐ¸Ð½Ñ â 213",129 "values": [130 {"title": "203", "value": 108},131 {"title": "204", "value": 160},132 {"title": "205", "value": 126},133 {"title": "206", "value": 134},134 {"title": "207", "value": 112},135 {"title": "208", "value": 152},136 {"title": "209", "value": 128},137 {"title": "210", "value": 164},138 {"title": "211", "value": 118},139 {"title": "212", "value": 140},140 {"title": "213", "value": 182, "active": true},141 {"title": "214", "value": 0},142 {"title": "215", "value": 0},143 {"title": "216", "value": 0},144 {"title": "217", "value": 0},145 {"title": "218", "value": 0}146 ],147 "users": [148 {"id": 3, "name": "ÐаÑÑÑ Ðовалева", "avatar": "3.jpg", "valueText": "32"},149 {"id": 9, "name": "СеÑгей ÐеÑежной", "avatar": "9.jpg", "valueText": "27"},150 {"id": 7, "name": "ÐмиÑÑий ÐндÑиÑнов", "avatar": "7.jpg", "valueText": "22"}151 ]152 }153 },154 {155 "alias": "chart",156 "data": {157 "title": "СÑÑоки кода",158 "subtitle": "СпÑÐ¸Ð½Ñ â 213",159 "values": [160 {"title": "203", "value": 47798},161 {"title": "204", "value": 68590},162 {"title": "205", "value": 55472},163 {"title": "206", "value": 63073},164 {"title": "207", "value": 51917},165 {"title": "208", "value": 65852},166 {"title": "209", "value": 60693},167 {"title": "210", "value": 70631},168 {"title": "211", "value": 57299},169 {"title": "212", "value": 62839},170 {"title": "213", "value": 74156, "active": true},171 {"title": "214", "value": 0},172 {"title": "215", "value": 0},173 {"title": "216", "value": 0},174 {"title": "217", "value": 0},175 {"title": "218", "value": 0}176 ],177 "users": [178 {"id": 12, "name": "ÐлекÑей ЯÑоÑевиÑ", "avatar": "12.jpg", "valueText": "8739"},179 {"id": 8, "name": "ÐлекÑÐ°Ð½Ð´Ñ Ðванков", "avatar": "8.jpg", "valueText": "7538"},180 {"id": 10, "name": "Яна ÐеÑникова", "avatar": "10.jpg", "valueText": "6845"}181 ]182 }183 },184 {185 "alias": "diagram",186 "data": {187 "title": "Ð Ð°Ð·Ð¼ÐµÑ ÐºÐ¾Ð¼Ð¼Ð¸Ñов",188 "subtitle": "СпÑÐ¸Ð½Ñ â 213",189 "totalText": "182 коммиÑа",190 "differenceText": "+42 Ñ Ð¿ÑоÑлого ÑпÑинÑа",191 "categories": [192 {"title": "> 1001 ÑÑÑоки", "valueText": "30 коммиÑов", "differenceText": "+8 коммиÑов"},193 {"title": "501 â 1000 ÑÑÑок", "valueText": "32 коммиÑа", "differenceText": "+6 коммиÑов"},194 {"title": "101 â 500 ÑÑÑок", "valueText": "58 коммиÑов", "differenceText": "+16 коммиÑов"},195 {"title": "1 â 100 ÑÑÑок", "valueText": "62 коммиÑа", "differenceText": "+12 коммиÑов"}196 ]197 }198 },199 {200 "alias": "activity",201 "data": {202 "title": "ÐоммиÑÑ, 1 неделÑ",203 "subtitle": "СпÑÐ¸Ð½Ñ â 213",204 "data": {205 "mon": [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],206 "tue": [0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 0, 4, 0, 0, 0, 0, 1, 0, 3, 0, 0, 2, 1, 0],207 "wed": [1, 0, 0, 0, 1, 0, 5, 0, 0, 4, 0, 0, 0, 5, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1],208 "thu": [0, 1, 0, 1, 0, 0, 0, 0, 6, 0, 1, 0, 0, 1, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0],209 "fri": [0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 5, 0, 4, 0, 0, 3, 0, 0, 0, 0, 1, 0, 0],210 "sat": [0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],211 "sun": [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]212 }213 }214 },215 {216 "alias": "activity",217 "data": {218 "title": "ÐоммиÑÑ, 2 неделÑ",219 "subtitle": "СпÑÐ¸Ð½Ñ â 213",220 "data": {221 "mon": [0, 1, 1, 1, 0, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 2],222 "tue": [0, 1, 2, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0],223 "wed": [0, 0, 0, 0, 2, 0, 1, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 0, 0],224 "thu": [0, 0, 2, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 2, 0, 3, 0, 1, 1, 0, 0, 0],225 "fri": [0, 0, 0, 1, 1, 0, 2, 0, 4, 0, 0, 0, 2, 0, 3, 2, 0, 0, 0, 0, 1, 1, 0, 1],226 "sat": [1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 2, 2, 0, 2, 0, 0],227 "sun": [0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1]228 }229 }230 }231];232233const resetFavicon = () => {234 const icons = document.querySelectorAll('link[rel*=\'icon\']');235 icons.forEach(icon => {236 icon.href = icon.href.replace('dark', 'light');237 });238}239240const init = () => {241 const params = new URL(window.location).searchParams;242243 if (params.has('theme')) {244 document.body.classList.add(`theme_${params.get('theme')}`);245246 if (params.get('theme') === 'light') {247 resetFavicon();248 }249 } else {250 document.body.classList.add(`theme_dark`);251 }252253 const slide = Number.parseInt(params.get('slide')) || 0;254 document.title = data[slide].data.title;255 document.body.innerHTML += window.renderTemplate(data[slide].alias, data[slide].data);256257 window.addEventListener('resize', () => {258 document.body.innerHTML = window.renderTemplate(data[slide].alias, data[slide].data);259 });260}261
...
us-states.js
Source:us-states.js
1const USStateFieldOptions = [2 {3 valueKey: "",4 valueText: "â¾ Select a state"5 },6 {7 valueKey: "AL",8 valueText: "Alabama"9 },10 {11 valueKey: "AK",12 valueText: "Alaska"13 },14 {15 valueKey: "AS",16 valueText: "American Samoa"17 },18 {19 valueKey: "AZ",20 valueText: "Arizona"21 },22 {23 valueKey: "AR",24 valueText: "Arkansas"25 },26 {27 valueKey: "AF",28 valueText: "Armed Forces Africa"29 },30 {31 valueKey: "AA",32 valueText: "Armed Forces Americas"33 },34 {35 valueKey: "AC",36 valueText: "Armed Forces Canada"37 },38 {39 valueKey: "AE",40 valueText: "Armed Forces Europe"41 },42 {43 valueKey: "AM",44 valueText: "Armed Forces Middle East"45 },46 {47 valueKey: "AP",48 valueText: "Armed Forces Pacific"49 },50 {51 valueKey: "CA",52 valueText: "California"53 },54 {55 valueKey: "CO",56 valueText: "Colorado"57 },58 {59 valueKey: "CT",60 valueText: "Connecticut"61 },62 {63 valueKey: "DE",64 valueText: "Delaware"65 },66 {67 valueKey: "DC",68 valueText: "District Of Columbia"69 },70 {71 valueKey: "FM",72 valueText: "Federated States Of Micronesia"73 },74 {75 valueKey: "FL",76 valueText: "Florida"77 },78 {79 valueKey: "GA",80 valueText: "Georgia"81 },82 {83 valueKey: "GU",84 valueText: "Guam"85 },86 {87 valueKey: "HI",88 valueText: "Hawaii"89 },90 {91 valueKey: "ID",92 valueText: "Idaho"93 },94 {95 valueKey: "IL",96 valueText: "Illinois"97 },98 {99 valueKey: "IN",100 valueText: "Indiana"101 },102 {103 valueKey: "IA",104 valueText: "Iowa"105 },106 {107 valueKey: "KS",108 valueText: "Kansas"109 },110 {111 valueKey: "KY",112 valueText: "Kentucky"113 },114 {115 valueKey: "LA",116 valueText: "Louisiana"117 },118 {119 valueKey: "ME",120 valueText: "Maine"121 },122 {123 valueKey: "MH",124 valueText: "Marshall Islands"125 },126 {127 valueKey: "MD",128 valueText: "Maryland"129 },130 {131 valueKey: "MA",132 valueText: "Massachusetts"133 },134 {135 valueKey: "MI",136 valueText: "Michigan"137 },138 {139 valueKey: "MN",140 valueText: "Minnesota"141 },142 {143 valueKey: "MS",144 valueText: "Mississippi"145 },146 {147 valueKey: "MO",148 valueText: "Missouri"149 },150 {151 valueKey: "MT",152 valueText: "Montana"153 },154 {155 valueKey: "NE",156 valueText: "Nebraska"157 },158 {159 valueKey: "NV",160 valueText: "Nevada"161 },162 {163 valueKey: "NH",164 valueText: "New Hampshire"165 },166 {167 valueKey: "NJ",168 valueText: "New Jersey"169 },170 {171 valueKey: "NM",172 valueText: "New Mexico"173 },174 {175 valueKey: "NY",176 valueText: "New York"177 },178 {179 valueKey: "NC",180 valueText: "North Carolina"181 },182 {183 valueKey: "ND",184 valueText: "North Dakota"185 },186 {187 valueKey: "MP",188 valueText: "Northern Mariana Islands"189 },190 {191 valueKey: "OH",192 valueText: "Ohio"193 },194 {195 valueKey: "OK",196 valueText: "Oklahoma"197 },198 {199 valueKey: "OR",200 valueText: "Oregon"201 },202 {203 valueKey: "PW",204 valueText: "Palau"205 },206 {207 valueKey: "PA",208 valueText: "Pennsylvania"209 },210 {211 valueKey: "PR",212 valueText: "Puerto Rico"213 },214 {215 valueKey: "RI",216 valueText: "Rhode Island"217 },218 {219 valueKey: "SC",220 valueText: "South Carolina"221 },222 {223 valueKey: "SD",224 valueText: "South Dakota"225 },226 {227 valueKey: "TN",228 valueText: "Tennessee"229 },230 {231 valueKey: "TX",232 valueText: "Texas"233 },234 {235 valueKey: "UT",236 valueText: "Utah"237 },238 {239 valueKey: "VT",240 valueText: "Vermont"241 },242 {243 valueKey: "VI",244 valueText: "Virgin Islands"245 },246 {247 valueKey: "VA",248 valueText: "Virginia"249 },250 {251 valueKey: "WA",252 valueText: "Washington"253 },254 {255 valueKey: "WV",256 valueText: "West Virginia"257 },258 {259 valueKey: "WI",260 valueText: "Wisconsin"261 },262 {263 valueKey: "WY",264 valueText: "Wyoming"265 }266];...
monitorera.js
Source:monitorera.js
1var exerciseRepo = new ExerciseRepo();2$(function() {3 var exerciseId = $('#sponsorAdminExerciseID').val() || 0;4 html.accordion('.accordion');5 $('#btn-save').click(function() {6 var inputs = [];7 inputs.push({ id: $('[name^="input0[]"]').data('id'), components: html.getElementValues($('[name^="input0[]"]')) });8 inputs.push({ id: $('[name^="input1[]"]').data('id'), components: html.getElementValues($('[name^="input1[]"]')) });9 inputs.push({ id: $('[name^="input2[]"]').data('id'), components: html.getElementValues($('[name^="input2[]"]')) });10 inputs.push({ id: $('[name^="input3[]"]').data('id'), components: html.getElementValues($('[name^="input3[]"]')) });11 healthwatch.grp(exerciseRepo).saveManagerExercise({12 inputs: inputs,13 sponsorAdmin: { id: $('#sponsorAdminID').val() || 0 },14 exerciseVariantLanguage: { id: $('#exerciseVariantLangID').val() || 0 },15 id: exerciseId,16 },17 function(message) {18 $('#message').text(message).fadeIn(1000).fadeOut(1000);19 },20 function(message) {21 $('#message').text(message).fadeIn(1000).fadeOut(1000);22 }23 );24 });25 healthwatch.grp(exerciseRepo).readManagerExercise(26 exerciseId,27 function(exercise) {28 if (exercise === null) {29 exercise = {30 inputs: [31 { components: [{ valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }] },32 { components: [{ valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }] },33 { components: [{ valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }] },34 { components: [{ valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }, { valueText: '' }] },35 ]36 };37 } else {38 $('.accordion h3').click();39 }40 var str = '';41 for (var i = 0; i < exercise.inputs.length; i++) {42 var input = exercise.inputs[i];43 for (j = 0; j < input.components.length;) {44 $('#tbl' + (i)).append("<tr>\45 <td><input type='text' name='input" + (i) + "[]' value='" + input.components[(j)].valueText + "' id='inputComponent" + (j) + "' /></td>\46 <td><input type='text' name='input" + (i) + "[]' value='" + input.components[(j + 1)].valueText + "' id='inputComponent" + (j + 1) + "' /></td>\47 <td><input type='text' name='input" + (i) + "[]' value='" + input.components[(j + 2)].valueText + "' id='inputComponent" + (j + 2) + "'/></td>\48 </tr>");49 j += 3;50 }51 }52 },53 function(message) {}54 );55});56function addInput(tbl, input) {57 var fields = $("#" + tbl + " input:text").length / 3;58 $('#' + tbl).append("\59 <tr>\60 <td><input type='text' name='input" + input + "[]' value='' id='inputComponent" + "' /></td>\61 <td><input type='text' name='input" + input + "[]' value='' id='inputComponent" + "' /></td>\62 <td><input type='text' name='input" + input + "[]' value='' id='inputComponent" + "'/></td>\63 </tr>");64 $("." + tbl + " input[name=text" + fields + "1]").focus();...
Using AI Code Generation
1console.log(tracetest.ValueText(10));2console.log(tracetest.ValueText(20));3console.log(tracetest.ValueText(30));4console.log(tracetest.ValueText(10));5console.log(tracetest.ValueText(20));6console.log(tracetest.ValueText(30));7console.log(tracetest.ValueText(10));8console.log(tracetest.ValueText(20));9console.log(tracetest.ValueText(30));10console.log(tracetest.ValueText(10));11console.log(tracetest.ValueText(20));12console.log(tracetest.ValueText(30));13console.log(tracetest.ValueText(10));14console.log(tracetest.ValueText(20));15console.log(tracetest.ValueText(30));
Using AI Code Generation
1var tracetest = require('./tracetest');2tracetest.ValueText(100);3exports.ValueText = function (value) {4 console.log(value);5};6module.exports = {7 ValueText: function (value) {8 console.log(value);9 }10};11var tracetest = require('./tracetest');12tracetest.ValueText(100);13module.exports = {14 ValueText: function (value) {15 console.log(value);16 }17};18var tracetest = require('./tracetest');19tracetest.ValueText(100);20module.exports = {21 ValueText: function (value) {22 console.log(value);23 }24};25var tracetest = require('./tracetest');26tracetest.ValueText(100);27module.exports = {28 ValueText: function (value) {29 console.log(value);30 }31};32var tracetest = require('./tracetest');33tracetest.ValueText(100);34module.exports = {35 ValueText: function (value) {36 console.log(value);37 }38};39var tracetest = require('./tracetest');40tracetest.ValueText(100);41module.exports = {42 ValueText: function (value) {43 console.log(value);44 }45};46var tracetest = require('./tracetest');47tracetest.ValueText(
Using AI Code Generation
1var trace = require('./tracetest');2var trace1 = new trace();3trace1.ValueText('test');4var trace2 = require('./tracetest2');5trace2.ValueText('test2');6var trace3 = require('./tracetest3');7trace3.ValueText('test3');8var trace = require('./tracetest2');9var trace1 = new trace();10trace1.ValueText('test');11var trace3 = require('./tracetest3');12trace3.ValueText('test3');13var trace2 = require('./tracetest');14trace2.ValueText('test2');15var trace3 = require('./tracetest3');16var trace1 = new trace3();17trace1.ValueText('test');18var trace2 = require('./tracetest');19trace2.ValueText('test2');20var trace3 = require('./tracetest2');21trace3.ValueText('test3');22var trace = require('./tracetest');23var trace1 = new trace();24trace1.ValueText('test');25var trace2 = require('./tracetest2');26trace2.ValueText('test2');27var trace3 = require('./tracetest3');28trace3.ValueText('test3');
Using AI Code Generation
1var tracetest = require('tracetest');2var result = tracetest.ValueText(10, 20);3console.log(result);4var tracetest = {};5tracetest.ValueText = function (a, b) {6 var c = a + b;7 return c;8}9module.exports = tracetest;10var result = tracetest.ValueText(10, 20);11at Object. (C:\Users\user1\Desktop\NodeJS\NodeJS\test\test.js:3:16)12at Module._compile (module.js:556:32)13at Object.Module._extensions..js (module.js:565:10)14at Module.load (module.js:473:32)15at tryModuleLoad (module.js:432:12)16at Function.Module._load (module.js:424:3)17at Function.Module.runMain (module.js:590:10)18at startup (bootstrap_node.js:194:16)
Using AI Code Generation
1var tracetesting = require('tracetesting');2var value = tracetesting.ValueText('Hello World');3console.log(value);4var tracetesting = require('tracetesting');5var value = tracetesting.ValueText('Hello World');6console.log(value);7var tracetesting = require('tracetesting');8var value = tracetesting.ValueText('Hello World');9console.log(value);10var tracetesting = require('tracetesting');11var value = tracetesting.ValueText('Hello World');12console.log(value);13var tracetesting = require('tracetesting');14var value = tracetesting.ValueText('Hello World');15console.log(value);16var tracetesting = require('tracetesting');
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!