Best JavaScript code snippet using wpt
SAED_Data.js
Source:SAED_Data.js
1var SAED_Tables = {2 Sample_5_12 : { // 年齡5æ²0åæè³11æ²11åæ3 OC : [ // 年齡5æ²0åæè³11æ²11åæ OC æ´é«è½å4 {lower_bound: 0, upper_bound: 2, percentile: "< 1", std_score: 1},5 {lower_bound: 3, upper_bound: 5, percentile: "< 1", std_score: 2},6 {lower_bound: 6, upper_bound: 6, percentile: " 1", std_score: 3},7 {lower_bound: 7, upper_bound: 8, percentile: " 2", std_score: 4},8 {lower_bound: 9, upper_bound: 10, percentile: " 5", std_score: 5},9 {lower_bound: 11, upper_bound: 11, percentile: " 9", std_score: 6},10 {lower_bound: 12, upper_bound: 14, percentile: " 16", std_score: 7},11 {lower_bound: 15, upper_bound: 16, percentile: " 25", std_score: 8},12 {lower_bound: 17, upper_bound: 18, percentile: " 37", std_score: 9},13 {lower_bound: 19, upper_bound: 20, percentile: " 50", std_score: 10},14 {lower_bound: 21, upper_bound: 22, percentile: " 63", std_score: 11},15 {lower_bound: 23, upper_bound: 24, percentile: " 75", std_score: 12},16 {lower_bound: 25, upper_bound: 25, percentile: " 84", std_score: 13},17 {lower_bound: 26, upper_bound: 26, percentile: " 91", std_score: 14},18 {lower_bound: 27, upper_bound: 27, percentile: " 95", std_score: 15},19 {lower_bound: 28, upper_bound: 28, percentile: " 98", std_score: 16}20 ],21 IL : [ // 年齡5æ²0åæè³11æ²11åæ IL ç¡è½åå¸ç¿22 {lower_bound: 0, upper_bound: 0, percentile: " 9", std_score: 6},23 {lower_bound: 1, upper_bound: 1, percentile: " 25", std_score: 8},24 {lower_bound: 2, upper_bound: 3, percentile: " 37", std_score: 9},25 {lower_bound: 4, upper_bound: 5, percentile: " 50", std_score: 10},26 {lower_bound: 6, upper_bound: 8, percentile: " 63", std_score: 11},27 {lower_bound: 9, upper_bound: 12, percentile: " 75", std_score: 12},28 {lower_bound: 13, upper_bound: 16, percentile: " 84", std_score: 13},29 {lower_bound: 17, upper_bound: 20, percentile: " 91", std_score: 14},30 {lower_bound: 21, upper_bound: 22, percentile: " 95", std_score: 15},31 {lower_bound: 23, upper_bound: 23, percentile: " 98", std_score: 16},32 {lower_bound: 24, upper_bound: 24, percentile: " 99", std_score: 17}33 ],34 RP : [ // 年齡5æ²0åæè³11æ²11åæ RP 人ééä¿åé¡35 {lower_bound: 0, upper_bound: 0, percentile: " 16", std_score: 7},36 {lower_bound: 1, upper_bound: 2, percentile: " 50", std_score: 10},37 {lower_bound: 3, upper_bound: 3, percentile: " 63", std_score: 11},38 {lower_bound: 4, upper_bound: 6, percentile: " 75", std_score: 12},39 {lower_bound: 7, upper_bound: 8, percentile: " 84", std_score: 13},40 {lower_bound: 9, upper_bound: 10, percentile: " 91", std_score: 14},41 {lower_bound: 11, upper_bound: 12, percentile: " 95", std_score: 15},42 {lower_bound: 13, upper_bound: 13, percentile: " 98", std_score: 16},43 {lower_bound: 14, upper_bound: 14, percentile: " 99", std_score: 17},44 {lower_bound: 15, upper_bound: 15, percentile: ">99", std_score: 18},45 {lower_bound: 16, upper_bound: 16, percentile: ">99", std_score: 19}46 ],47 IB : [ // 年齡5æ²0åæè³11æ²11åæ IB ä¸ç¶è¡çº48 {lower_bound: 0, upper_bound: 0, percentile: " 16", std_score: 7},49 {lower_bound: 1, upper_bound: 1, percentile: " 37", std_score: 9},50 {lower_bound: 2, upper_bound: 3, percentile: " 50", std_score: 10},51 {lower_bound: 4, upper_bound: 5, percentile: " 63", std_score: 11},52 {lower_bound: 6, upper_bound: 8, percentile: " 75", std_score: 12},53 {lower_bound: 9, upper_bound: 12, percentile: " 84", std_score: 13},54 {lower_bound: 13, upper_bound: 15, percentile: " 91", std_score: 14},55 {lower_bound: 16, upper_bound: 18, percentile: " 95", std_score: 15},56 {lower_bound: 19, upper_bound: 20, percentile: " 98", std_score: 16},57 {lower_bound: 21, upper_bound: 23, percentile: " 99", std_score: 17},58 {lower_bound: 24, upper_bound: 27, percentile: ">99", std_score: 18},59 {lower_bound: 28, upper_bound: 29, percentile: ">99", std_score: 19}60 ],61 UD : [ // 年齡5æ²0åæè³11æ²11åæ UD ä¸éæ¨ææ²®åª62 {lower_bound: 0, upper_bound: 0, percentile: " 16", std_score: 7},63 {lower_bound: 1, upper_bound: 1, percentile: " 37", std_score: 9},64 {lower_bound: 2, upper_bound: 2, percentile: " 50", std_score: 10},65 {lower_bound: 3, upper_bound: 3, percentile: " 63", std_score: 11},66 {lower_bound: 4, upper_bound: 5, percentile: " 75", std_score: 12},67 {lower_bound: 6, upper_bound: 7, percentile: " 84", std_score: 13},68 {lower_bound: 8, upper_bound: 9, percentile: " 91", std_score: 14},69 {lower_bound: 10, upper_bound: 10, percentile: " 95", std_score: 15},70 {lower_bound: 11, upper_bound: 13, percentile: " 98", std_score: 16},71 {lower_bound: 14, upper_bound: 15, percentile: " 99", std_score: 17},72 {lower_bound: 16, upper_bound: 16, percentile: ">99", std_score: 18},73 {lower_bound: 17, upper_bound: 18, percentile: ">99", std_score: 19}74 ],75 PF : [ // 年齡5æ²0åæè³11æ²11åæ PF ççççæ害æ76 {lower_bound: 0, upper_bound: 0, percentile: " 16", std_score: 7},77 {lower_bound: 1, upper_bound: 1, percentile: " 37", std_score: 9},78 {lower_bound: 2, upper_bound: 2, percentile: " 50", std_score: 10},79 {lower_bound: 3, upper_bound: 3, percentile: " 63", std_score: 11},80 {lower_bound: 4, upper_bound: 4, percentile: " 75", std_score: 12},81 {lower_bound: 5, upper_bound: 6, percentile: " 84", std_score: 13},82 {lower_bound: 7, upper_bound: 8, percentile: " 91", std_score: 14},83 {lower_bound: 9, upper_bound: 9, percentile: " 95", std_score: 15},84 {lower_bound: 10, upper_bound: 12, percentile: " 98", std_score: 16},85 {lower_bound: 13, upper_bound: 16, percentile: " 99", std_score: 17},86 {lower_bound: 17, upper_bound: 20, percentile: ">99", std_score: 18},87 {lower_bound: 21, upper_bound: 22, percentile: ">99", std_score: 19}88 ],89 SM : [ // 年齡5æ²0åæè³11æ²11åæ SM 社æ失調90 ]91 },92 Sample_12_15 : { // 年齡12æ²0åæè³14æ²11åæ93 OC : [ // 年齡12æ²0åæè³14æ²11åæ OC æ´é«è½å94 {lower_bound: 0, upper_bound: 5, percentile: "< 1", std_score: 1},95 {lower_bound: 6, upper_bound: 7, percentile: " 1", std_score: 3},96 {lower_bound: 8, upper_bound: 9, percentile: " 2", std_score: 4},97 {lower_bound: 10, upper_bound: 10, percentile: " 5", std_score: 5},98 {lower_bound: 11, upper_bound: 11, percentile: " 9", std_score: 6},99 {lower_bound: 12, upper_bound: 13, percentile: " 16", std_score: 7},100 {lower_bound: 14, upper_bound: 14, percentile: " 25", std_score: 8},101 {lower_bound: 15, upper_bound: 16, percentile: " 37", std_score: 9},102 {lower_bound: 17, upper_bound: 18, percentile: " 50", std_score: 10},103 {lower_bound: 19, upper_bound: 20, percentile: " 63", std_score: 11},104 {lower_bound: 21, upper_bound: 22, percentile: " 75", std_score: 12},105 {lower_bound: 23, upper_bound: 24, percentile: " 84", std_score: 13},106 {lower_bound: 25, upper_bound: 25, percentile: " 91", std_score: 14},107 {lower_bound: 26, upper_bound: 26, percentile: " 95", std_score: 15},108 {lower_bound: 27, upper_bound: 27, percentile: " 98", std_score: 16},109 {lower_bound: 28, upper_bound: 28, percentile: " 99", std_score: 17}110 ],111 IL : [ // 年齡12æ²0åæè³14æ²11åæ IL ç¡è½åå¸ç¿112 {lower_bound: 0, upper_bound: 0, percentile: " 5", std_score: 5},113 {lower_bound: 1, upper_bound: 1, percentile: " 16", std_score: 7},114 {lower_bound: 2, upper_bound: 3, percentile: " 25", std_score: 8},115 {lower_bound: 4, upper_bound: 5, percentile: " 37", std_score: 9},116 {lower_bound: 6, upper_bound: 7, percentile: " 50", std_score: 10},117 {lower_bound: 8, upper_bound: 10, percentile: " 63", std_score: 11},118 {lower_bound: 11, upper_bound: 14, percentile: " 75", std_score: 12},119 {lower_bound: 15, upper_bound: 16, percentile: " 84", std_score: 13},120 {lower_bound: 17, upper_bound: 19, percentile: " 91", std_score: 14},121 {lower_bound: 20, upper_bound: 21, percentile: " 95", std_score: 15},122 {lower_bound: 22, upper_bound: 23, percentile: " 98", std_score: 16},123 {lower_bound: 24, upper_bound: 24, percentile: " 99", std_score: 17}124 ],125 RP : [ // 年齡12æ²0åæè³14æ²11åæ RP 人ééä¿åé¡126 {lower_bound: 0, upper_bound: 0, percentile: " 16", std_score: 7},127 {lower_bound: 1, upper_bound: 1, percentile: " 37", std_score: 9},128 {lower_bound: 2, upper_bound: 2, percentile: " 50", std_score: 10},129 {lower_bound: 3, upper_bound: 4, percentile: " 63", std_score: 11},130 {lower_bound: 5, upper_bound: 5, percentile: " 75", std_score: 12},131 {lower_bound: 6, upper_bound: 7, percentile: " 84", std_score: 13},132 {lower_bound: 8, upper_bound: 10, percentile: " 91", std_score: 14},133 {lower_bound: 11, upper_bound: 11, percentile: " 95", std_score: 15},134 {lower_bound: 12, upper_bound: 13, percentile: " 98", std_score: 16},135 {lower_bound: 14, upper_bound: 15, percentile: " 99", std_score: 17},136 {lower_bound: 16, upper_bound: 16, percentile: ">99", std_score: 18},137 {lower_bound: 17, upper_bound: 17, percentile: ">99", std_score: 19}138 ],139 IB : [ // 年齡12æ²0åæè³14æ²11åæ IB ä¸ç¶è¡çº140 {lower_bound: 0, upper_bound: 0, percentile: " 9", std_score: 6},141 {lower_bound: 1, upper_bound: 1, percentile: " 25", std_score: 8},142 {lower_bound: 2, upper_bound: 2, percentile: " 37", std_score: 9},143 {lower_bound: 3, upper_bound: 3, percentile: " 50", std_score: 10},144 {lower_bound: 4, upper_bound: 5, percentile: " 63", std_score: 11},145 {lower_bound: 6, upper_bound: 9, percentile: " 75", std_score: 12},146 {lower_bound: 10, upper_bound: 13, percentile: " 84", std_score: 13},147 {lower_bound: 14, upper_bound: 17, percentile: " 91", std_score: 14},148 {lower_bound: 18, upper_bound: 19, percentile: " 95", std_score: 15},149 {lower_bound: 20, upper_bound: 22, percentile: " 98", std_score: 16},150 {lower_bound: 23, upper_bound: 26, percentile: " 99", std_score: 17},151 {lower_bound: 27, upper_bound: 28, percentile: ">99", std_score: 18},152 {lower_bound: 29, upper_bound: 29, percentile: ">99", std_score: 19}153 ],154 UD : [ // 年齡12æ²0åæè³14æ²11åæ UD ä¸éæ¨ææ²®åª155 {lower_bound: 0, upper_bound: 0, percentile: " 9", std_score: 6},156 {lower_bound: 1, upper_bound: 1, percentile: " 25", std_score: 8},157 {lower_bound: 2, upper_bound: 2, percentile: " 37", std_score: 9},158 {lower_bound: 3, upper_bound: 3, percentile: " 50", std_score: 10},159 {lower_bound: 4, upper_bound: 4, percentile: " 63", std_score: 11},160 {lower_bound: 5, upper_bound: 6, percentile: " 75", std_score: 12},161 {lower_bound: 7, upper_bound: 9, percentile: " 84", std_score: 13},162 {lower_bound: 10, upper_bound: 10, percentile: " 91", std_score: 14},163 {lower_bound: 11, upper_bound: 13, percentile: " 95", std_score: 15},164 {lower_bound: 14, upper_bound: 15, percentile: " 98", std_score: 16},165 {lower_bound: 19, upper_bound: 19, percentile: " 99", std_score: 17},166 {lower_bound: 20, upper_bound: 20, percentile: ">99", std_score: 18}167 ],168 PF : [ // 年齡12æ²0åæè³14æ²11åæ PF ççççæ害æ169 {lower_bound: 0, upper_bound: 0, percentile: " 9", std_score: 6},170 {lower_bound: 1, upper_bound: 1, percentile: " 25", std_score: 8},171 {lower_bound: 2, upper_bound: 2, percentile: " 37", std_score: 9},172 {lower_bound: 3, upper_bound: 3, percentile: " 50", std_score: 10},173 {lower_bound: 4, upper_bound: 4, percentile: " 63", std_score: 11},174 {lower_bound: 5, upper_bound: 5, percentile: " 75", std_score: 12},175 {lower_bound: 6, upper_bound: 7, percentile: " 84", std_score: 13},176 {lower_bound: 8, upper_bound: 10, percentile: " 91", std_score: 14},177 {lower_bound: 11, upper_bound: 12, percentile: " 95", std_score: 15},178 {lower_bound: 13, upper_bound: 14, percentile: " 98", std_score: 16},179 {lower_bound: 15, upper_bound: 16, percentile: " 99", std_score: 17},180 {lower_bound: 17, upper_bound: 19, percentile: ">99", std_score: 18},181 {lower_bound: 20, upper_bound: 20, percentile: ">99", std_score: 19}182 ],183 SM : [ // 年齡12æ²0åæè³14æ²11åæ SM 社æ失調184 {lower_bound: 0, upper_bound: 0, percentile: " 37", std_score: 9},185 {lower_bound: 1, upper_bound: 1, percentile: " 75", std_score: 12},186 {lower_bound: 2, upper_bound: 2, percentile: " 84", std_score: 13},187 {lower_bound: 3, upper_bound: 4, percentile: " 91", std_score: 14},188 {lower_bound: 5, upper_bound: 7, percentile: " 95", std_score: 15},189 {lower_bound: 8, upper_bound: 9, percentile: " 98", std_score: 16},190 {lower_bound: 10, upper_bound: 15, percentile: " 99", std_score: 17},191 {lower_bound: 17, upper_bound: 17, percentile: ">99", std_score: 18}192 ]193 },194 Sample_15_18 : { // 年齡15æ²0åæè³18æ²11åæ195 OC : [ // 年齡15æ²0åæè³18æ²11åæ OC æ´é«è½å196 {lower_bound: 0, upper_bound: 0, percentile: "< 1", std_score: 1},197 {lower_bound: 1, upper_bound: 4, percentile: "< 1", std_score: 2},198 {lower_bound: 5, upper_bound: 7, percentile: " 1", std_score: 3},199 {lower_bound: 8, upper_bound: 9, percentile: " 2", std_score: 4},200 {lower_bound: 10, upper_bound: 11, percentile: " 5", std_score: 5},201 {lower_bound: 12, upper_bound: 13, percentile: " 9", std_score: 6},202 {lower_bound: 14, upper_bound: 15, percentile: " 16", std_score: 7},203 {lower_bound: 16, upper_bound: 16, percentile: " 25", std_score: 8},204 {lower_bound: 17, upper_bound: 18, percentile: " 37", std_score: 9},205 {lower_bound: 19, upper_bound: 19, percentile: " 50", std_score: 10},206 {lower_bound: 20, upper_bound: 20, percentile: " 63", std_score: 11},207 {lower_bound: 21, upper_bound: 22, percentile: " 75", std_score: 12},208 {lower_bound: 23, upper_bound: 23, percentile: " 84", std_score: 13},209 {lower_bound: 24, upper_bound: 24, percentile: " 91", std_score: 14},210 {lower_bound: 25, upper_bound: 26, percentile: " 95", std_score: 15},211 {lower_bound: 27, upper_bound: 27, percentile: " 98", std_score: 16},212 {lower_bound: 28, upper_bound: 28, percentile: " 99", std_score: 17}213 ],214 IL : [ // 年齡15æ²0åæè³18æ²11åæ IL ç¡è½åå¸ç¿215 {lower_bound: 0, upper_bound: 0, percentile: " 5", std_score: 5},216 {lower_bound: 1, upper_bound: 1, percentile: " 9", std_score: 6},217 {lower_bound: 2, upper_bound: 2, percentile: " 16", std_score: 7},218 {lower_bound: 3, upper_bound: 3, percentile: " 25", std_score: 8},219 {lower_bound: 4, upper_bound: 5, percentile: " 37", std_score: 9},220 {lower_bound: 6, upper_bound: 6, percentile: " 50", std_score: 10},221 {lower_bound: 7, upper_bound: 8, percentile: " 63", std_score: 11},222 {lower_bound: 9, upper_bound: 10, percentile: " 75", std_score: 12},223 {lower_bound: 11, upper_bound: 12, percentile: " 84", std_score: 13},224 {lower_bound: 13, upper_bound: 16, percentile: " 91", std_score: 14},225 {lower_bound: 17, upper_bound: 19, percentile: " 95", std_score: 15},226 {lower_bound: 20, upper_bound: 20, percentile: " 98", std_score: 16},227 {lower_bound: 21, upper_bound: 23, percentile: " 99", std_score: 17},228 {lower_bound: 24, upper_bound: 24, percentile: ">99", std_score: 19}229 ],230 RP : [ // 年齡15æ²0åæè³18æ²11åæ RP 人ééä¿åé¡231 {lower_bound: 0, upper_bound: 0, percentile: " 16", std_score: 7},232 {lower_bound: 1, upper_bound: 1, percentile: " 50", std_score: 10},233 {lower_bound: 2, upper_bound: 2, percentile: " 63", std_score: 11},234 {lower_bound: 3, upper_bound: 4, percentile: " 75", std_score: 12},235 {lower_bound: 5, upper_bound: 5, percentile: " 84", std_score: 13},236 {lower_bound: 6, upper_bound: 8, percentile: " 91", std_score: 14},237 {lower_bound: 9, upper_bound: 10, percentile: " 95", std_score: 15},238 {lower_bound: 11, upper_bound: 12, percentile: " 98", std_score: 16},239 {lower_bound: 13, upper_bound: 13, percentile: " 99", std_score: 17},240 {lower_bound: 14, upper_bound: 14, percentile: ">99", std_score: 19}241 ],242 IB : [ // 年齡15æ²0åæè³18æ²11åæ IB ä¸ç¶è¡çº243 {lower_bound: 0, upper_bound: 0, percentile: " 16", std_score: 7},244 {lower_bound: 1, upper_bound: 1, percentile: " 37", std_score: 9},245 {lower_bound: 2, upper_bound: 2, percentile: " 50", std_score: 10},246 {lower_bound: 3, upper_bound: 3, percentile: " 63", std_score: 11},247 {lower_bound: 4, upper_bound: 5, percentile: " 75", std_score: 12},248 {lower_bound: 6, upper_bound: 7, percentile: " 84", std_score: 13},249 {lower_bound: 8, upper_bound: 9, percentile: " 91", std_score: 14},250 {lower_bound: 10, upper_bound: 13, percentile: " 95", std_score: 15},251 {lower_bound: 14, upper_bound: 18, percentile: " 98", std_score: 16},252 {lower_bound: 19, upper_bound: 24, percentile: " 99", std_score: 17},253 {lower_bound: 25, upper_bound: 29, percentile: ">99", std_score: 18},254 {lower_bound: 30, upper_bound: 30, percentile: ">99", std_score: 19}255 ],256 UD : [ // 年齡15æ²0åæè³18æ²11åæ UD ä¸éæ¨ææ²®åª257 {lower_bound: 0, upper_bound: 0, percentile: " 9", std_score: 6},258 {lower_bound: 1, upper_bound: 1, percentile: " 25", std_score: 8},259 {lower_bound: 2, upper_bound: 2, percentile: " 37", std_score: 9},260 {lower_bound: 3, upper_bound: 3, percentile: " 50", std_score: 10},261 {lower_bound: 4, upper_bound: 5, percentile: " 63", std_score: 11},262 {lower_bound: 6, upper_bound: 6, percentile: " 75", std_score: 12},263 {lower_bound: 7, upper_bound: 8, percentile: " 84", std_score: 13},264 {lower_bound: 9, upper_bound: 10, percentile: " 91", std_score: 14},265 {lower_bound: 11, upper_bound: 12, percentile: " 95", std_score: 15},266 {lower_bound: 13, upper_bound: 15, percentile: " 98", std_score: 16},267 {lower_bound: 16, upper_bound: 17, percentile: " 99", std_score: 17},268 {lower_bound: 18, upper_bound: 18, percentile: ">99", std_score: 19}269 ],270 PF : [ // 年齡15æ²0åæè³18æ²11åæ PF ççççæ害æ271 {lower_bound: 0, upper_bound: 0, percentile: " 9", std_score: 6},272 {lower_bound: 1, upper_bound: 1, percentile: " 25", std_score: 8},273 {lower_bound: 2, upper_bound: 2, percentile: " 37", std_score: 9},274 {lower_bound: 3, upper_bound: 3, percentile: " 50", std_score: 10},275 {lower_bound: 4, upper_bound: 4, percentile: " 63", std_score: 11},276 {lower_bound: 5, upper_bound: 5, percentile: " 75", std_score: 12},277 {lower_bound: 6, upper_bound: 7, percentile: " 84", std_score: 13},278 {lower_bound: 8, upper_bound: 8, percentile: " 91", std_score: 14},279 {lower_bound: 9, upper_bound: 9, percentile: " 95", std_score: 15},280 {lower_bound: 10, upper_bound: 10, percentile: " 98", std_score: 16},281 {lower_bound: 11, upper_bound: 11, percentile: " 99", std_score: 17},282 {lower_bound: 12, upper_bound: 16, percentile: ">99", std_score: 18},283 {lower_bound: 17, upper_bound: 17, percentile: ">99", std_score: 19}284 ],285 SM : [ // 年齡15æ²0åæè³18æ²11åæ SM 社æ失調286 {lower_bound: 0, upper_bound: 0, percentile: " 37", std_score: 9},287 {lower_bound: 1, upper_bound: 1, percentile: " 75", std_score: 12},288 {lower_bound: 2, upper_bound: 2, percentile: " 91", std_score: 14},289 {lower_bound: 3, upper_bound: 4, percentile: " 95", std_score: 15},290 {lower_bound: 5, upper_bound: 6, percentile: " 98", std_score: 16},291 {lower_bound: 7, upper_bound: 7, percentile: " 99", std_score: 17},292 {lower_bound: 9, upper_bound: 9, percentile: ">99", std_score: 18},293 {lower_bound: 12, upper_bound: 12, percentile: ">99", std_score: 19}294 ]295 },296 Quotient : [ // æ¨æºåæ¸ç¸½åèæ
ç·éç¤é表åæ¸å°ç
§è¡¨297 {score: 86, percentile: ">99", quotient: 149},298 {score: 85, percentile: ">99", quotient: 144},299 {score: 84, percentile: ">99", quotient: 143},300 {score: 83, percentile: ">99", quotient: 143},301 {score: 82, percentile: ">99", quotient: 142},302 {score: 81, percentile: ">99", quotient: 141},303 {score: 80, percentile: ">99", quotient: 139},304 {score: 79, percentile: " 99", quotient: 137},305 {score: 78, percentile: " 99", quotient: 135},306 {score: 77, percentile: " 99", quotient: 133},307 {score: 76, percentile: " 99", quotient: 132},308 {score: 75, percentile: " 98", quotient: 131},309 {score: 74, percentile: " 98", quotient: 130},310 {score: 73, percentile: " 97", quotient: 128},311 {score: 72, percentile: " 97", quotient: 126},312 {score: 71, percentile: " 95", quotient: 124},313 {score: 70, percentile: " 94", quotient: 123},314 {score: 69, percentile: " 93", quotient: 122},315 {score: 68, percentile: " 92", quotient: 121},316 {score: 67, percentile: " 91", quotient: 120},317 {score: 66, percentile: " 90", quotient: 118},318 {score: 65, percentile: " 88", quotient: 117},319 {score: 64, percentile: " 86", quotient: 115},320 {score: 63, percentile: " 83", quotient: 114},321 {score: 62, percentile: " 82", quotient: 113},322 {score: 61, percentile: " 79", quotient: 112},323 {score: 60, percentile: " 77", quotient: 110},324 {score: 59, percentile: " 74", quotient: 109},325 {score: 58, percentile: " 71", quotient: 108},326 {score: 57, percentile: " 69", quotient: 107},327 {score: 56, percentile: " 66", quotient: 106},328 {score: 55, percentile: " 62", quotient: 104},329 {score: 54, percentile: " 59", quotient: 103},330 {score: 53, percentile: " 56", quotient: 102},331 {score: 52, percentile: " 52", quotient: 100},332 {score: 51, percentile: " 49", quotient: 99},333 {score: 50, percentile: " 45", quotient: 97},334 {score: 49, percentile: " 42", quotient: 96},335 {score: 48, percentile: " 39", quotient: 95},336 {score: 47, percentile: " 36", quotient: 94},337 {score: 46, percentile: " 33", quotient: 93},338 {score: 45, percentile: " 30", quotient: 91},339 {score: 44, percentile: " 26", quotient: 90},340 {score: 43, percentile: " 22", quotient: 88},341 {score: 42, percentile: " 19", quotient: 86},342 {score: 41, percentile: " 16", quotient: 84},343 {score: 40, percentile: " 13", quotient: 82},344 {score: 39, percentile: " 10", quotient: 80},345 {score: 38, percentile: " 7", quotient: 77},346 {score: 37, percentile: " 5", quotient: 75},347 {score: 36, percentile: " 4", quotient: 69}348 ]349};350function SAED_NormalScoring(table, type, score){351 var max = 0;352 var min = 100;353 354 var objTable;355 if(table == 1 || table == "1") objTable = SAED_Tables.Sample_5_12;356 if(table == 2 || table == "2") objTable = SAED_Tables.Sample_12_15;357 if(table == 3 || table == "3") objTable = SAED_Tables.Sample_15_18;358 359 var objType;360 if(type == "OC") objType = objTable.OC;361 if(type == "IL") objType = objTable.IL;362 if(type == "RP") objType = objTable.RP;363 if(type == "IB") objType = objTable.IB;364 if(type == "UD") objType = objTable.UD;365 if(type == "PF") objType = objTable.PF;366 if(type == "SM") objType = objTable.SM;367 368 if(objType.length == 0){369 return {370 percentile: 0,371 std_score: 0372 };373 }374 375 for(var i = 0; i < objType.length; i++){376 if(objType[i].upper_bound > max) max = objType[i].upper_bound;377 if(objType[i].lower_bound < min) min = objType[i].lower_bound;378 379 if(score >= objType[i].lower_bound && score <= objType[i].upper_bound){380 return {381 percentile: objType[i].percentile,382 std_score: objType[i].std_score383 };384 }385 }386 387 if(score > max) return SAED_NormalScoring(table, type, max);388 if(score < min) return SAED_NormalScoring(table, type, min);389}390function SAED_QuotientScoring(score){391 var objType = SAED_Tables.Quotient;392 var max = 0;393 var min = 100;394 for(var i = 0; i < objType.length; i++){395 if(objType[i].score > max) max = objType[i].score;396 if(objType[i].score < min) min = objType[i].score;397 398 if(score == objType[i].score){399 return {400 percentile: objType[i].percentile,401 quotient: objType[i].quotient402 };403 }404 }405 406 if(score > max) return SAED_QuotientScoring(max);407 if(score < min) return SAED_QuotientScoring(min);...
scoring-ranges-reducer.test.js
Source:scoring-ranges-reducer.test.js
1/*2 * Copyright (C) 2021 - present Instructure, Inc.3 *4 * This file is part of Canvas.5 *6 * Canvas is free software: you can redistribute it and/or modify it under7 * the terms of the GNU Affero General Public License as published by the Free8 * Software Foundation, version 3 of the License.9 *10 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR12 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more13 * details.14 *15 * You should have received a copy of the GNU Affero General Public License along16 * with this program. If not, see <http://www.gnu.org/licenses/>.17 */18import Immutable, {List, Map} from 'immutable'19import Path from '../assignment-path'20import reducer from '../scoring-ranges-reducer'21import * as actions from '../actions'22const saveData = data => {23 return {24 data: {25 scoring_ranges: data26 }27 }28}29function reduce(state, type, payload) {30 return reducer(Immutable.fromJS(state), {type, payload})31}32function initialState() {33 return [34 {35 lower_bound: '0.8484',36 upper_bound: '1.00',37 assignment_sets: [{assignment_set_associations: []}]38 },39 {40 lower_bound: '0.4242',41 upper_bound: '0.8484',42 assignment_sets: [{assignment_set_associations: []}]43 },44 {45 lower_bound: '0',46 upper_bound: '0.4242',47 assignment_sets: [{assignment_set_associations: []}]48 }49 ]50}51describe('scoringRangeReducer', () => {52 it('returns an empty list by default', () => {53 expect(reducer()).toEqual(List())54 })55 it('loads default scoring ranges on get if none found', () => {56 const newState = reduce([], actions.LOAD_RULE_FOR_ASSIGNMENT, {data: null})57 expect(newState.size).toBe(3)58 expect(newState.getIn([3, 'upper_bound'])).not.toBe('42.42')59 })60 it('sets state on save', () => {61 const newState = reduce([], actions.SAVE_RULE, saveData(initialState()))62 expect(newState).toEqual(Immutable.fromJS(initialState()))63 })64 it('sorts ranges', () => {65 const newState = reduce(66 [],67 actions.SAVE_RULE,68 saveData([69 {lower_bound: '0.05', upper_bound: '0.10'},70 {lower_bound: '0.25', upper_bound: '0.30'},71 {lower_bound: '0.15', upper_bound: '0.20'}72 ])73 )74 expect(newState).toEqual(75 Immutable.fromJS([76 {lower_bound: '0.25', upper_bound: '0.30'},77 {lower_bound: '0.15', upper_bound: '0.20'},78 {lower_bound: '0.05', upper_bound: '0.10'}79 ])80 )81 })82 it('sets lower and upper bounds when boundary changes', () => {83 let newState = reduce(initialState(), actions.SET_SCORE_AT_INDEX, {index: 0, score: '0.60'})84 newState = newState.map(range =>85 Map({lower_bound: range.get('lower_bound'), upper_bound: range.get('upper_bound')})86 )87 expect(newState).toEqual(88 Immutable.fromJS([89 {lower_bound: '0.60', upper_bound: '1.00'},90 {lower_bound: '0.4242', upper_bound: '0.60'},91 {lower_bound: '0', upper_bound: '0.4242'}92 ])93 )94 })95 it('ignores setting boundaries on the last range', () => {96 let newState = reduce(initialState(), actions.SET_SCORE_AT_INDEX, {index: 2, score: '0.60'})97 newState = newState.map(range =>98 Map({lower_bound: range.get('lower_bound'), upper_bound: range.get('upper_bound')})99 )100 expect(newState).toEqual(101 Immutable.fromJS([102 {lower_bound: '0.8484', upper_bound: '1.00'},103 {lower_bound: '0.4242', upper_bound: '0.8484'},104 {lower_bound: '0', upper_bound: '0.4242'}105 ])106 )107 })108 it('allows setting bound to 0 on the middle range', () => {109 let newState = reduce(initialState(), actions.SET_SCORE_AT_INDEX, {index: 1, score: '0'})110 newState = newState.map(range =>111 Map({lower_bound: range.get('lower_bound'), upper_bound: range.get('upper_bound')})112 )113 expect(newState).toEqual(114 Immutable.fromJS([115 {lower_bound: '0.8484', upper_bound: '1.00'},116 {lower_bound: '0', upper_bound: '0.8484'},117 {lower_bound: '0', upper_bound: '0'}118 ])119 )120 })121 it('sets errors if present', () => {122 const newState = reduce(initialState(), actions.SET_ERROR_AT_SCORE_INDEX, {123 index: 0,124 error: 'rats'125 })126 expect(newState.getIn([0, 'error'])).toBe('rats')127 })128 it('adds items to scoring range assigment set', () => {129 const newState = reduce(initialState(), actions.ADD_ASSIGNMENTS_TO_RANGE_SET, {130 index: 0,131 assignmentSetIndex: 0,132 assignment_set_associations: [{assignment_id: 1}, {assignment_id: 2}]133 })134 expect(135 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 0, 'assignment_id'])136 ).toBe(1)137 expect(138 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 1, 'assignment_id'])139 ).toBe(2)140 })141 it('merges assignment sets together', () => {142 const state = initialState()143 state[0].assignment_sets = [144 {assignment_set_associations: [{assignment_id: '1'}]},145 {assignment_set_associations: [{assignment_id: '2'}]}146 ]147 const newState = reduce(state, actions.MERGE_ASSIGNMENT_SETS, {index: 0, leftSetIndex: 0})148 const newSets = newState.getIn([0, 'assignment_sets'])149 expect(newSets.size).toBe(1)150 expect(newSets.getIn([0, 'assignment_set_associations', 0, 'assignment_id'])).toBe('1')151 expect(newSets.getIn([0, 'assignment_set_associations', 1, 'assignment_id'])).toBe('2')152 })153 it('removes duplicates when merging assignment sets', () => {154 const state = initialState()155 state[0].assignment_sets = [156 {assignment_set_associations: [{assignment_id: '2'}, {assignment_id: '1'}]},157 {assignment_set_associations: [{assignment_id: '2'}]}158 ]159 const newState = reduce(state, actions.MERGE_ASSIGNMENT_SETS, {index: 0, leftSetIndex: 0})160 const newSets = newState.getIn([0, 'assignment_sets'])161 expect(newSets.size).toBe(1)162 expect(newSets.getIn([0, 'assignment_set_associations']).size).toBe(2)163 expect(newSets.getIn([0, 'assignment_set_associations', 0, 'assignment_id'])).toBe('2')164 expect(newSets.getIn([0, 'assignment_set_associations', 1, 'assignment_id'])).toBe('1')165 })166 it('removes cyoe assignment ids when merging assignment sets', () => {167 const state = initialState()168 state[0].assignment_sets = [169 {assignment_set_associations: [{assignment_id: '1', id: 5}]},170 {assignment_set_associations: [{assignment_id: '2', id: 3}]}171 ]172 const newState = reduce(state, actions.MERGE_ASSIGNMENT_SETS, {index: 0, leftSetIndex: 0})173 const newSets = newState.getIn([0, 'assignment_sets'])174 expect(newSets.size).toBe(1)175 expect(newSets.getIn([0, 'assignment_set_associations']).size).toBe(2)176 expect(newSets.getIn([0, 'assignment_set_associations', 1, 'id'])).toBe(undefined)177 })178 it('splits assignment sets apart', () => {179 const state = initialState()180 state[0].assignment_sets = [181 {assignment_set_associations: [{assignment_id: '1'}, {assignment_id: '2'}]}182 ]183 const newState = reduce(state, actions.SPLIT_ASSIGNMENT_SET, {184 index: 0,185 assignmentSetIndex: 0,186 splitIndex: 1187 })188 const newSets = newState.getIn([0, 'assignment_sets'])189 expect(newSets.size).toBe(2)190 expect(newSets.getIn([0, 'assignment_set_associations', 0, 'assignment_id'])).toBe('1')191 expect(newSets.getIn([1, 'assignment_set_associations', 0, 'assignment_id'])).toBe('2')192 })193 it('removes cyoe assignment ids when splitting assignment sets apart', () => {194 const state = initialState()195 state[0].assignment_sets = [196 {197 assignment_set_associations: [198 {assignment_id: '1', id: 4},199 {assignment_id: '2', id: 3}200 ]201 }202 ]203 const newState = reduce(state, actions.SPLIT_ASSIGNMENT_SET, {204 index: 0,205 assignmentSetIndex: 0,206 splitIndex: 1207 })208 const newSets = newState.getIn([0, 'assignment_sets'])209 expect(newSets.size).toBe(2)210 expect(newSets.getIn([1, 'assignment_set_associations', 0, 'id'])).toBe(undefined)211 })212 it('removes a single assignment from scoring range set', () => {213 const state = initialState()214 state[0].assignment_sets[0].assignment_set_associations.push({assignment_id: '1'})215 state[0].assignment_sets[0].assignment_set_associations.push({assignment_id: '2'})216 const newState = reduce(state, actions.REMOVE_ASSIGNMENT, {path: new Path(0, 0, 0)})217 expect(newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations']).size).toBe(1)218 expect(219 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 0, 'assignment_id'])220 ).toBe('2')221 })222 it('updates assignment index', () => {223 const state = initialState()224 state[0].assignment_sets[0].assignment_set_associations.push({assignment_id: '1'})225 state[0].assignment_sets[0].assignment_set_associations.push({assignment_id: '2'})226 state[0].assignment_sets[0].assignment_set_associations.push({assignment_id: '3'})227 const newState = reduce(state, actions.UPDATE_ASSIGNMENT_INDEX, {228 path: new Path(0, 0, 2),229 assignmentIndex: 0230 })231 expect(newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations']).size).toBe(3)232 expect(233 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 0, 'assignment_id'])234 ).toBe('1')235 expect(236 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 1, 'assignment_id'])237 ).toBe('3')238 expect(239 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 2, 'assignment_id'])240 ).toBe('2')241 })242 it('inserts assignment at index', () => {243 const state = initialState()244 state[0].assignment_sets[0].assignment_set_associations.push({assignment_id: '1'})245 state[0].assignment_sets[0].assignment_set_associations.push({assignment_id: '2'})246 const newState = reduce(state, actions.INSERT_ASSIGNMENT, {247 path: new Path(0, 0, 0),248 assignment: '3'249 })250 expect(newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations']).size).toBe(3)251 expect(252 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 0, 'assignment_id'])253 ).toBe('1')254 expect(255 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 1, 'assignment_id'])256 ).toBe('3')257 expect(258 newState.getIn([0, 'assignment_sets', 0, 'assignment_set_associations', 2, 'assignment_id'])259 ).toBe('2')260 })...
SAPB_Data.js
Source:SAPB_Data.js
1var SAPB_Tables = { // ãæ§æ ¼åè¡çºé表ã常模åç
§2 E0 : { // åå°å¥³ç3 RP : [ // 人ééä¿4 {lower_bound: 0, upper_bound: 37, level: 0},5 {lower_bound: 38, upper_bound: 41, level: 1},6 {lower_bound: 42, upper_bound: 46, level: 2},7 {lower_bound: 47, upper_bound: 999, level: 3}8 ],9 BC : [ // è¡çºè¦ç¯10 {lower_bound: 0, upper_bound: 43, level: 0},11 {lower_bound: 44, upper_bound: 48, level: 1},12 {lower_bound: 49, upper_bound: 53, level: 2},13 {lower_bound: 54, upper_bound: 999, level: 3}14 ],15 DM : [ // æ鬱æ
ç·16 {lower_bound: 0, upper_bound: 43, level: 0},17 {lower_bound: 44, upper_bound: 49, level: 1},18 {lower_bound: 50, upper_bound: 54, level: 2},19 {lower_bound: 55, upper_bound: 999, level: 3}20 ],21 AX : [ // ç¦æ
®æ
ç·22 {lower_bound: 0, upper_bound: 22, level: 0},23 {lower_bound: 23, upper_bound: 25, level: 1},24 {lower_bound: 26, upper_bound: 27, level: 2},25 {lower_bound: 28, upper_bound: 999, level: 3}26 ],27 AH : [ // åç¸ç¿ç28 {lower_bound: 0, upper_bound: 19, level: 0},29 {lower_bound: 20, upper_bound: 21, level: 1},30 {lower_bound: 22, upper_bound: 23, level: 2},31 {lower_bound: 24, upper_bound: 999, level: 3}32 ]33 },34 E1 : { // åå°ç·ç35 RP : [ // 人ééä¿36 {lower_bound: 0, upper_bound: 51, level: 0},37 {lower_bound: 52, upper_bound: 58, level: 1},38 {lower_bound: 59, upper_bound: 64, level: 2},39 {lower_bound: 65, upper_bound: 999, level: 3}40 ],41 BC : [ // è¡çºè¦ç¯42 {lower_bound: 0, upper_bound: 62, level: 0},43 {lower_bound: 63, upper_bound: 70, level: 1},44 {lower_bound: 71, upper_bound: 77, level: 2},45 {lower_bound: 78, upper_bound: 999, level: 3}46 ],47 DM : [ // æ鬱æ
ç·48 {lower_bound: 0, upper_bound: 42, level: 0},49 {lower_bound: 43, upper_bound: 48, level: 1},50 {lower_bound: 49, upper_bound: 53, level: 2},51 {lower_bound: 54, upper_bound: 999, level: 3}52 ],53 AX : [ // ç¦æ
®æ
ç·54 {lower_bound: 0, upper_bound: 20, level: 0},55 {lower_bound: 21, upper_bound: 22, level: 1},56 {lower_bound: 23, upper_bound: 24, level: 2},57 {lower_bound: 25, upper_bound: 999, level: 3}58 ],59 AH : [ // åç¸ç¿ç60 {lower_bound: 0, upper_bound: 20, level: 0},61 {lower_bound: 21, upper_bound: 22, level: 1},62 {lower_bound: 23, upper_bound: 24, level: 2},63 {lower_bound: 25, upper_bound: 999, level: 3}64 ]65 },66 J0 : { // åä¸å¥³ç67 RP : [ // 人ééä¿68 {lower_bound: 0, upper_bound: 34, level: 0},69 {lower_bound: 35, upper_bound: 38, level: 1},70 {lower_bound: 39, upper_bound: 42, level: 2},71 {lower_bound: 43, upper_bound: 999, level: 3}72 ],73 BC : [ // è¡çºè¦ç¯74 {lower_bound: 0, upper_bound: 47, level: 0},75 {lower_bound: 48, upper_bound: 53, level: 1},76 {lower_bound: 54, upper_bound: 58, level: 2},77 {lower_bound: 59, upper_bound: 999, level: 3}78 ],79 DM : [ // æ鬱æ
ç·80 {lower_bound: 0, upper_bound: 50, level: 0},81 {lower_bound: 51, upper_bound: 56, level: 1},82 {lower_bound: 57, upper_bound: 62, level: 2},83 {lower_bound: 63, upper_bound: 999, level: 3}84 ],85 AX : [ // ç¦æ
®æ
ç·86 {lower_bound: 0, upper_bound: 25, level: 0},87 {lower_bound: 26, upper_bound: 28, level: 1},88 {lower_bound: 29, upper_bound: 31, level: 2},89 {lower_bound: 32, upper_bound: 999, level: 3}90 ],91 AH : [ // åç¸ç¿ç92 {lower_bound: 0, upper_bound: 21, level: 0},93 {lower_bound: 22, upper_bound: 23, level: 1},94 {lower_bound: 24, upper_bound: 25, level: 2},95 {lower_bound: 26, upper_bound: 999, level: 3}96 ]97 },98 J1 : { // åä¸ç·ç99 RP : [ // 人ééä¿100 {lower_bound: 0, upper_bound: 46, level: 0},101 {lower_bound: 47, upper_bound: 52, level: 1},102 {lower_bound: 53, upper_bound: 58, level: 2},103 {lower_bound: 59, upper_bound: 999, level: 3}104 ],105 BC : [ // è¡çºè¦ç¯106 {lower_bound: 0, upper_bound: 58, level: 0},107 {lower_bound: 59, upper_bound: 64, level: 1},108 {lower_bound: 65, upper_bound: 71, level: 2},109 {lower_bound: 72, upper_bound: 999, level: 3}110 ],111 DM : [ // æ鬱æ
ç·112 {lower_bound: 0, upper_bound: 53, level: 0},113 {lower_bound: 54, upper_bound: 60, level: 1},114 {lower_bound: 61, upper_bound: 67, level: 2},115 {lower_bound: 68, upper_bound: 999, level: 3}116 ],117 AX : [ // ç¦æ
®æ
ç·118 {lower_bound: 0, upper_bound: 27, level: 0},119 {lower_bound: 28, upper_bound: 29, level: 1},120 {lower_bound: 30, upper_bound: 32, level: 2},121 {lower_bound: 33, upper_bound: 999, level: 3}122 ],123 AH : [ // åç¸ç¿ç124 {lower_bound: 0, upper_bound: 25, level: 0},125 {lower_bound: 26, upper_bound: 28, level: 1},126 {lower_bound: 29, upper_bound: 30, level: 2},127 {lower_bound: 31, upper_bound: 999, level: 3}128 ]129 }130};131function SAPB_Assessment(object, type, score){132 var objOblect;133 if(object == "E0") objOblect = SAPB_Tables.E0;134 if(object == "E1") objOblect = SAPB_Tables.E1;135 if(object == "J0") objOblect = SAPB_Tables.J0;136 if(object == "J1") objOblect = SAPB_Tables.J1;137 var objType;138 if(type == "RP") objType = objOblect.RP;139 if(type == "BC") objType = objOblect.BC;140 if(type == "DM") objType = objOblect.DM;141 if(type == "AX") objType = objOblect.AX;142 if(type == "AH") objType = objOblect.AH;143 for(var i = 0; i < objType.length; i++){144 if(score >= objType[i].lower_bound && score <= objType[i].upper_bound){145 return objType[i].level;146 }147 }...
Using AI Code Generation
1var wptree = require('wptree');2var tree = new wptree();3tree.insert(1);4tree.insert(2);5tree.insert(3);6tree.insert(4);7tree.insert(5);8tree.insert(6);9tree.insert(7);10tree.insert(8);11tree.insert(9);12tree.insert(10);13tree.insert(11);14tree.insert(12);15tree.insert(13);16tree.insert(14);17tree.insert(15);18tree.insert(16);19tree.insert(17);20tree.insert(18);21tree.insert(19);22tree.insert(20);23tree.insert(21);24tree.insert(22);25tree.insert(23);26tree.insert(24);27tree.insert(25);28tree.insert(26);29tree.insert(27);30tree.insert(28);31tree.insert(29);32tree.insert(30);33tree.insert(31);34tree.insert(32);35tree.insert(33);36tree.insert(34);37tree.insert(35);38tree.insert(36);39tree.insert(37);40tree.insert(38);41tree.insert(39);42tree.insert(40);43tree.insert(41);44tree.insert(42);45tree.insert(43);46tree.insert(44);47tree.insert(45);48tree.insert(46);49tree.insert(47);50tree.insert(48);51tree.insert(49);52tree.insert(50);53tree.insert(51);54tree.insert(52);55tree.insert(53);56tree.insert(54);57tree.insert(55);58tree.insert(56);59tree.insert(57);60tree.insert(58);61tree.insert(59);62tree.insert(60);63tree.insert(61);64tree.insert(62);65tree.insert(63);66tree.insert(64);67tree.insert(65);68tree.insert(66);69tree.insert(67);70tree.insert(68);71tree.insert(69);72tree.insert(70);73tree.insert(71);74tree.insert(72);75tree.insert(73);76tree.insert(74);77tree.insert(75);78tree.insert(76);79tree.insert(77);80tree.insert(78);81tree.insert(79);82tree.insert(80);83tree.insert(81);84tree.insert(82);85tree.insert(83);86tree.insert(84);87tree.insert(85);88tree.insert(86);89tree.insert(87);90tree.insert(88);91tree.insert(89);92tree.insert(90);93tree.insert(91);94tree.insert(92);95tree.insert(93);96tree.insert(94);97tree.insert(95);98tree.insert(
Using AI Code Generation
1var wptree = require('wptree');2var tree = new wptree();3tree.add(1);4tree.add(2);5tree.add(3);6tree.add(4);7tree.add(5);8tree.add(6);9tree.add(7);10tree.add(8);11tree.add(9);12tree.add(10);13console.log(tree.lower_bound(5));14var wptree = require('wptree');15var tree = new wptree();16tree.add(1);17tree.add(2);18tree.add(3);19tree.add(4);20tree.add(5);21tree.add(6);22tree.add(7);23tree.add(8);24tree.add(9);25tree.add(10);26console.log(tree.upper_bound(5));27var wptree = require('wptree');28var tree = new wptree();29tree.add(1);30tree.add(2);31tree.add(3);32tree.add(4);33tree.add(5);34tree.add(6);35tree.add(7);36tree.add(8);37tree.add(9);38tree.add(10);39console.log(tree.find(5));40var wptree = require('wptree');41var tree = new wptree();42tree.add(1);43tree.add(2);44tree.add(3);45tree.add(4);46tree.add(5);47tree.add(6);48tree.add(7);49tree.add(8);50tree.add(9);51tree.add(10);52console.log(tree.find(5));53var wptree = require('wptree');54var tree = new wptree();55tree.add(1);56tree.add(2);57tree.add(3);58tree.add(4);59tree.add(5);60tree.add(6);61tree.add(7);62tree.add(8);63tree.add(9);64tree.add(10);65console.log(tree.find(5));66var wptree = require('wptree');67var tree = new wptree();68tree.add(1);69tree.add(2);
Using AI Code Generation
1var wptree = require('wptree');2var tree = new wptree();3tree.insert(1);4tree.insert(2);5tree.insert(3);6tree.insert(5);7tree.insert(6);8tree.insert(7);9var wptree = require('wptree');10var tree = new wptree();11tree.insert(1);12tree.insert(2);13tree.insert(3);14tree.insert(5);15tree.insert(6);16tree.insert(7);17var wptree = require('wptree');18var tree = new wptree();19tree.insert(1);20tree.insert(2);21tree.insert(3);22tree.insert(5);23tree.insert(6);24tree.insert(7);25var wptree = require('wptree');26var tree = new wptree();27tree.insert(1);28tree.insert(2);29tree.insert(3);30tree.insert(5);31tree.insert(6);32tree.insert(7);
Using AI Code Generation
1var wpt = require('webpagetest');2var api = new wpt('API_KEY');3}, function(err, data) {4 if (err) return console.error(err);5 console.log(data.data.median.firstView);6 console.log(data.data.median.firstView.SpeedIndex);7 console.log(data.data.median.firstView.TTFB);8 console.log(data.data.median.firstView.render);9 console.log(data.data.median.firstView.fullyLoaded);10 console.log(data.data.median.firstView.docTime);11 console.log(data.data.median.firstView.bytesOut);12 console.log(data.data.median.firstView.bytesOutDoc);13 console.log(data.data.median.firstView.bytesIn);14 console.log(data.data.median.firstView.bytesInDoc);15 console.log(data.data.median.firstView.requestsDoc);16 console.log(data.data.median.firstView.responses_200);17 console.log(data.data.median.firstView.responses_404);18 console.log(data.data.median.firstView.responses_other);19 console.log(data.data.median.firstView.result);20 console.log(data.data.median.firstView.run);21 console.log(data.data.median.firstView.completed);22 console.log(data.data.median.firstView.TestStartOffset);23 console.log(data.data.median.firstView.TTFB
Using AI Code Generation
1var wptools = require('wptools');2var lower_bound = wptools.lower_bound;3var upper_bound = wptools.upper_bound;4var binary_search = wptools.binary_search;5var find = wptools.find;6var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];7var arr2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];8console.log(lower_bound(arr, 1));9console.log(lower_bound(arr, 2));10console.log(lower_bound(arr, 3));11console.log(lower_bound(arr, 4));12console.log(lower_bound(arr, 5));13console.log(lower_bound(arr, 6));14console.log(lower_bound(arr, 7));15console.log(lower_bound(arr, 8));16console.log(lower_bound(arr, 9));17console.log(lower_bound(arr, 10));18console.log(lower_bound(arr, 11));19console.log(lower_bound(arr, 12));20console.log(lower_bound(arr, 13));21console.log(upper_bound(arr, 1));22console.log(upper_bound(arr, 2));23console.log(upper_bound(arr, 3));24console.log(upper_bound(arr, 4));25console.log(upper_bound(arr, 5));26console.log(upper_bound(arr, 6));27console.log(upper_bound(arr, 7));28console.log(upper_bound(arr, 8));29console.log(upper_bound(arr, 9));30console.log(upper_bound(arr, 10));31console.log(upper_bound(arr, 11));32console.log(upper_bound(arr, 12));33console.log(upper_bound(arr, 13));34console.log(binary_search(arr, 1));35console.log(binary_search(arr, 2));36console.log(binary_search(arr, 3));37console.log(binary_search(arr, 4));38console.log(binary_search(arr, 5));39console.log(binary_search(arr, 6));40console.log(binary_search(arr, 7));41console.log(binary_search(arr, 8));42console.log(binary_search(arr, 9));43console.log(binary_search(arr, 10));
Using AI Code Generation
1var wptools = require('wptools');2var wiki = wptools.page('Mumbai');3wiki.lang('en');4wiki.get(function(err, resp) {5 if(err){6 console.log(err);7 }8 else{9 console.log(resp);10 }11});12var wikipedia = require('wikipedia-js');13var options = {query: "Mumbai", format: "html", summaryOnly: true};14wikipedia.searchArticle(options, function(err, htmlWikiText){15 if(err){16 console.log(err);17 }18 else{19 console.log(htmlWikiText);20 }21});22var wikipedia = require('wikipedia-js');23var options = {query: "Mumbai", format: "html", summaryOnly: true};24wikipedia.searchArticle(options, function(err, htmlWikiText){25 if(err){26 console.log(err);27 }28 else{29 console.log(htmlWikiText);30 }31});32var wikipedia = require("wikipedia-node");33var params = {34};35wikipedia.api("GET", params, function(err, data){36 if(err){37 console.log(err);38 }39 else{40 console.log(data);41 }42});43var wikipedia = require('wikipedia-js');44var options = {query: "Mumbai", format: "html", summaryOnly: true};45wikipedia.searchArticle(options, function(err, htmlWikiText){46 if(err){47 console.log(err);48 }49 else{50 console.log(htmlWikiText);51 }52});53var wikipedia = require('wikipedia-js');54var options = {query: "Mumbai", format: "html", summaryOnly: true};55wikipedia.searchArticle(options, function(err, htmlWikiText){56 if(err){57 console.log(err);58 }59 else{60 console.log(htmlWikiText);61 }62});63var wikipedia = require('wikipedia-js');64var options = {query: "Mumbai", format: "html", summaryOnly: true};65wikipedia.searchArticle(options, function
Using AI Code Generation
1var wpt = require('wpt');2var wpt = new WebPageTest('www.webpagetest.org');3var test_id = '';4var test_status = '';5var test_results = '';6var test_result = '';7wpt.runTest(test_url, function(err, data) {8 if (err) {9 console.log(err);10 } else {11 test_id = data.data.testId;12 console.log("Test ID: " + test_id);13 console.log("Test Status: " + data.statusText);14 console.log("Test URL: " + data.data.url);15 }16});17wpt.waitForTestToFinish(test_id, function(err, data) {18 if (err) {19 console.log(err);20 } else {21 test_status = data.statusText;22 console.log("Test Status: " + test_status);23 console.log("Test URL: " + data.data.url);24 }25});26wpt.getTestResults(test_id, function(err, data) {27 if (err) {28 console.log(err);29 } else {30 test_results = data;31 console.log("Test Status: " + test_results.statusText);32 console.log("Test URL: " + test_results.data.url);33 }34});35wpt.getTestResult(test_id, 1, function(err, data) {36 if (err) {37 console.log(err);38 } else {39 test_result = data;40 console.log("Test Status: " + test_result.statusText);41 console.log("Test URL: " + test_result.data.url);42 }43});44wpt.getTestResult(test_id, 1, function(err, data) {45 if (err) {46 console.log(err);47 } else {48 test_result = data;49 console.log("Test Status: " + test_result.statusText);50 console.log("Test URL: " + test_result.data.url);51 }52}, true);53wpt.getTestResult(test_id, 1, function(err, data) {54 if (err) {55 console.log(err
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!!