Best JavaScript code snippet using fast-check-monorepo
ms.attention.js
Source:ms.attention.js
1<<<<<<< HEAD2define(function(require, exports, module) {3 var ms = require("ms");4 var ajaxCfg = {5 "type" : "post",6 "dataType" : "json"7 };8 return {9 people : {10 attention : {11 "version" : "1.0.0",12 /**13 * ååæ¶è14 ------15 * @callmethod people.attention.save(data,function(returnJson){...});16 * @param {{type:string,have:true}} basicAttentionBasicId ä¿¡æ¯ç¼å·17 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°ä¹å¯ä»¥æ ¹æ®èªèº«çè§åå®ä¹18 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)19 * @examples 20 * ...21 * mpeople.people.attention.save($("form").serialize(),function(returnJson){22 * alert(JSON.stringify(returnJson));23 * })24 * ...25 * @function 26 * {"result":true,"code":"09000000"}27 * @return {{type:code}} é误ç¼ç 28 * @return {{type:result}} trueæåãfalse失败29 */30 save:function(data,func){31 if (validator.isNull(data)){32 return;33 };34 //å°dataåæ°è½¬json35 var newDataJson = ms.turnJson(data);36 if (validator.isNull(newDataJson.basicAttentionBasicId)){37 ms.alert("ååç¼å·ä¸è½ä¸ºç©º");38 return;39 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){40 ms.alert("ååç¼å·åºè¯¥ä¸ºæ´å");41 return;42 };43 if(validator.isNull(newDataJson.basicAttentionType)){44 ms.alert("å
³æ³¨ç±»åä¸è½ä¸ºç©º");45 return;46 };47 ajaxCfg.url = ms.base + "/people/attention/save.do";48 ajaxCfg.params = data;49 ms.ajax(ajaxCfg, func); 50 },51 /**52 * å¤æååæ¯å¦æ¶èè¿53 ------54 * @callmethod people.attention.isExists(data,function(returnJson){...});55 * @param {{type:string,have:true}} basicAttentionBasicId ä¿¡æ¯ç¼å·56 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°ä¹å¯ä»¥æ ¹æ®èªèº«çè§åå®ä¹57 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)58 * @examples 59 * ...60 * mpeople.people.attention.isExists($("form").serialize(),function(returnJson){61 * alert(JSON.stringify(returnJson));62 * })63 * ...64 * @function 65 * {"result":true,"code":"09000000"}66 * @return {{type:code}} é误ç¼ç 67 * @return {{type:result}} trueæåãfalse失败68 */69 isExists : function(data,func){70 if(validator.isNull(data)){71 return;72 }73 //å°dataåæ°è½¬json74 var newDataJson = ms.turnJson(data);75 if (validator.isNull(newDataJson.basicAttentionBasicId)){76 ms.alert("ååç¼å·ä¸è½ä¸ºç©º");77 return;78 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){79 ms.alert("ååç¼å·ä¸ºæ´å");80 return;81 };82 if(validator.isNull(newDataJson.basicAttentionType)){83 ms.alert("å
³æ³¨ç±»åä¸è½ä¸ºç©º");84 return;85 };86 ajaxCfg.url = ms.base + "/people/attention/isExists.do";87 ajaxCfg.params = data;88 ms.ajax(ajaxCfg, func); 89 },90 /**91 * å é¤å
³æ³¨92 ------93 * @callmethod people.attention.del(data,function(returnJson){...});94 * @param {{type:string,have:true}} basicId ä¿¡æ¯ç¼å·éå å¤ä¸ªç¼å·ç¨éå·éå¼,ä¾å¦1,2,3,495 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)96 * @examples 97 * ...98 * mpeople.people.attention.del($("form").serialize(),function(returnJson){99 * alert(JSON.stringify(returnJson));100 * })101 *...102 * @function 103 * æ è¿åå¼104 */105 del : function(data,func){106 if(validator.isNull(data)){107 return;108 }109 var newDataJson = ms.turnJson(data);110 if(validator.isNull(newDataJson.basicId)){111 ms.alert("basicIdä¸è½ä¸ºç©º");112 return;113 }114 var idArray = new Array;115 var dotNum = 0;116 idArray = newDataJson.basicId.split(",");117 for (var index = 0; index < newDataJson.basicId.length; index++) {118 if(newDataJson.basicId[index] === ','){119 dotNum++;120 }121 }122 if (dotNum >= idArray.length){123 ms.alert("è¾å
¥åæ°æ ¼å¼æ误");124 return;125 }126 ajaxCfg.url = ms.base + "/people/attention/delete.do";127 ajaxCfg.params = data ;128 ms.ajax(ajaxCfg, func); 129 },130 /**131 * æ¶èå表132 ------133 * @callmethod people.attention.list(data,function(returnJson){...});134 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°å¯ä»¥æ ¹æ®èªèº«è§åå®ä¹135 * @param {{type:string,have:true}} modelCode 模åç¼ç 136 * @param {{type:string,have:true}} pageNo 页ç 137 * @param {{type:string,have:true}} pageSize ä¸é¡µæ¾ç¤ºæ°é138 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)139 * @examples 140 * ...141 * mpeople.people.attention.list($("form").serialize(),function(returnJson){142 * alert(JSON.stringify(returnJson));143 * })144 *...145 * @function 146 * { "list": [147 * {148 * "basicPic": "缩ç¥å¾", 149 * "basicTitle": "æ é¢", 150 * "basicComment": è¯è®ºæ°, 151 * "basicCollect": æ¶èæ°é, 152 * "basicHit": ç¹æ°é, 153 * "basicAppId": 1, 154 * "basicCategoryId": 160, 155 * "basicDateTime": 1468568887000,156 * "basicThumbnails": "/upload/mall/product/1/1468568853464.jpg", 157 * "basicTypeIds": [ ], 158 * "basicUpdateTime": shan, 159 * }],160 * "page":{"endRow": 2, 161 * "firstPage": 1, 162 * "hasNextPage": trueåå¨ä¸ä¸é¡µfalseä¸åå¨, 163 * "hasPreviousPage": trueåå¨ä¸ä¸é¡µfalseä¸åå¨, 164 * "isFirstPage": trueæ¯ç¬¬ä¸é¡µfalseä¸æ¯ç¬¬ä¸é¡µ, 165 * "isLastPage": trueæ¯æåä¸é¡µfalseä¸æ¯æåä¸é¡µ, 166 * "lastPage": æåä¸é¡µç页ç , 167 * "navigatePages": 导èªæ°éï¼å®ç° 1...5.6.7....10ææ, 168 * "navigatepageNums": []导èªé¡µç éå, 169 * "nextPage": ä¸ä¸é¡µ, 170 * "pageNum": å½å页ç , 171 * "pageSize": ä¸é¡µæ¾ç¤ºæ°é, 172 * "pages": æ»é¡µæ°, 173 * "prePage": ä¸ä¸é¡µ, 174 * "size": æ»è®°å½, 175 * "startRow": , 176 * "total":æ»è®°å½æ°é}177 * }178 * @return {{type:basicAppId}} ç¼å·179 * @return {{type:basicTitle}} æ é¢180 * @return {{type:basicDateTime}} æ¶é´181 * @return {{type:basicPic}} 缩ç¥å¾182 * @return {{type:basicLinkUrl}} é¾æ¥183 * @return {{type:basicUpdateTime}} æ´æ°æ¶é´184 * @return {{type:basicHit}} ç¹æ°é185 */186 list : function(data,func){187 if (validator.isNull(data)){188 return;189 };190 //å°dataåæ°è½¬json191 var newDataJson = ms.turnJson(data);192 if(validator.isNull(newDataJson.basicAttentionType)){193 ms.alert("å表çç±»åä¸è½ä¸ºç©º");194 return;195 }196 if(validator.isNull(newDataJson.modelCode)){197 ms.alert("模åç¼ç ä¸è½ä¸ºç©º");198 return;199 }200 if(validator.isNull(newDataJson.pageNo)){201 ms.alert("页ç ä¸è½ä¸ºç©º");202 return;203 }else if(!validator.isInt(newDataJson.pageNo)){204 ms.alert("页ç åºä¸ºæ´å");205 return;206 }207 if(validator.isNull(newDataJson.pageSize)){208 ms.alert("å页æ°éä¸è½ä¸ºç©º");209 return;210 }else if(!validator.isInt(newDataJson.pageSize)){211 ms.alert("å页æ°éåºä¸ºæ´å");212 return;213 }214 215 ajaxCfg.url = ms.base + "/people/attention/list.do";216 ajaxCfg.params = data;217 ms.ajax(ajaxCfg, func); 218 },219 },220 mall : {221 attention:{222 /**223 * ååæ¶èå表224 ------225 * @callmethod people.mall.attention.list(data,function(returnJson){...});226 * @param {{type:string,have:true}} pageNo 页ç 227 * @param {{type:string,have:true}} pageSize ä¸é¡µæ¾ç¤ºæ°é228 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°å¯ä»¥æ ¹æ®èªèº«è§åå®ä¹229 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)230 * @examples 231 * ...232 * mpeople.people.mall.attention.list($("form").serialize(),function(returnJson){233 * alert(JSON.stringify(returnJson));234 * })235 *...236 * @function 237 * [238 * {"basicId":ååç¼å·,239 * "basicTitle":"ååæ é¢",240 * "basicDateTime"ï¼"æ¶é´",241 * "basicPic":ååå¾ç,242 * "productLinkUrl":ååé¾æ¥,243 * "basicSort":"åååç±»",244 * "productPrice":ååä»·æ ¼245 * }246 * ]247 * @return {{type:basicId}} ååç¼å·248 * @return {{type:basicTitle}} ååæ é¢249 * @return {{type:basicDateTime}} æ¶é´250 * @return {{type:basicPic}} ååå¾ç251 * @return {{type:productLinkUrl}} ååé¾æ¥252 * @return {{type:basicSort}} åååç±»253 * @return {{type:productPrice}} ååä»·æ ¼254 */255 list : function(data,func){256 if (validator.isNull(data)){257 return;258 };259 //å°dataåæ°è½¬json260 var newDataJson = ms.turnJson(data);261 if(validator.isNull(newDataJson.basicAttentionType)){262 ms.alert("å表çç±»åä¸è½ä¸ºç©º");263 return;264 }265 if(validator.isNull(newDataJson.pageNo)){266 ms.alert("页ç ä¸è½ä¸ºç©º");267 return;268 }else if(!validator.isInt(newDataJson.pageNo)){269 ms.alert("页ç åºä¸ºæ´å");270 return;271 }272 if(validator.isNull(newDataJson.pageSize)){273 ms.alert("å页æ°éä¸è½ä¸ºç©º");274 return;275 }else if(!validator.isInt(newDataJson.pageSize)){276 ms.alert("å页æ°éåºä¸ºæ´å");277 return;278 }279 ajaxCfg.url = ms.base + "/people/mall/attention/list.do";280 ajaxCfg.params = data;281 ms.ajax(ajaxCfg, func); 282 }283 }284 }285 } 286 }287=======288define(function(require, exports, module) {289 var ms = require("ms");290 var ajaxCfg = {291 "type" : "post",292 "dataType" : "json"293 };294 return {295 people : {296 attention : {297 "version" : "1.0.0",298 /**299 * ååæ¶è300 ------301 * @callmethod people.attention.save(data,function(returnJson){...});302 * @param {{type:string,have:true}} basicAttentionBasicId ä¿¡æ¯ç¼å·303 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°ä¹å¯ä»¥æ ¹æ®èªèº«çè§åå®ä¹304 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)305 * @examples 306 * ...307 * mpeople.people.attention.save($("form").serialize(),function(returnJson){308 * alert(JSON.stringify(returnJson));309 * })310 * ...311 * @function 312 * {"result":true,"code":"09000000"}313 * @return {{type:code}} é误ç¼ç 314 * @return {{type:result}} trueæåãfalse失败315 */316 save:function(data,func){317 if (validator.isNull(data)){318 return;319 };320 //å°dataåæ°è½¬json321 var newDataJson = ms.turnJson(data);322 if (validator.isNull(newDataJson.basicAttentionBasicId)){323 ms.alert("ååç¼å·ä¸è½ä¸ºç©º");324 return;325 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){326 ms.alert("ååç¼å·åºè¯¥ä¸ºæ´å");327 return;328 };329 if(validator.isNull(newDataJson.basicAttentionType)){330 ms.alert("å
³æ³¨ç±»åä¸è½ä¸ºç©º");331 return;332 };333 ajaxCfg.url = ms.base + "/people/attention/save.do";334 ajaxCfg.params = data;335 ms.ajax(ajaxCfg, func); 336 },337 /**338 * å¤æååæ¯å¦æ¶èè¿339 ------340 * @callmethod people.attention.isExists(data,function(returnJson){...});341 * @param {{type:string,have:true}} basicAttentionBasicId ä¿¡æ¯ç¼å·342 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°ä¹å¯ä»¥æ ¹æ®èªèº«çè§åå®ä¹343 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)344 * @examples 345 * ...346 * mpeople.people.attention.isExists($("form").serialize(),function(returnJson){347 * alert(JSON.stringify(returnJson));348 * })349 * ...350 * @function 351 * {"result":true,"code":"09000000"}352 * @return {{type:code}} é误ç¼ç 353 * @return {{type:result}} trueæåãfalse失败354 */355 isExists : function(data,func){356 if(validator.isNull(data)){357 return;358 }359 //å°dataåæ°è½¬json360 var newDataJson = ms.turnJson(data);361 if (validator.isNull(newDataJson.basicAttentionBasicId)){362 ms.alert("ååç¼å·ä¸è½ä¸ºç©º");363 return;364 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){365 ms.alert("ååç¼å·ä¸ºæ´å");366 return;367 };368 if(validator.isNull(newDataJson.basicAttentionType)){369 ms.alert("å
³æ³¨ç±»åä¸è½ä¸ºç©º");370 return;371 };372 ajaxCfg.url = ms.base + "/people/attention/isExists.do";373 ajaxCfg.params = data;374 ms.ajax(ajaxCfg, func); 375 },376 /**377 * å é¤å
³æ³¨378 ------379 * @callmethod people.attention.del(data,function(returnJson){...});380 * @param {{type:string,have:true}} basicId ä¿¡æ¯ç¼å·éå å¤ä¸ªç¼å·ç¨éå·éå¼,ä¾å¦1,2,3,4381 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)382 * @examples 383 * ...384 * mpeople.people.attention.del($("form").serialize(),function(returnJson){385 * alert(JSON.stringify(returnJson));386 * })387 *...388 * @function 389 * æ è¿åå¼390 */391 del : function(data,func){392 if(validator.isNull(data)){393 return;394 }395 var newDataJson = ms.turnJson(data);396 if(validator.isNull(newDataJson.basicId)){397 ms.alert("basicIdä¸è½ä¸ºç©º");398 return;399 }400 var idArray = new Array;401 var dotNum = 0;402 idArray = newDataJson.basicId.split(",");403 for (var index = 0; index < newDataJson.basicId.length; index++) {404 if(newDataJson.basicId[index] === ','){405 dotNum++;406 }407 }408 if (dotNum >= idArray.length){409 ms.alert("è¾å
¥åæ°æ ¼å¼æ误");410 return;411 }412 ajaxCfg.url = ms.base + "/people/attention/delete.do";413 ajaxCfg.params = data ;414 ms.ajax(ajaxCfg, func); 415 },416 /**417 * æ¶èå表418 ------419 * @callmethod people.attention.list(data,function(returnJson){...});420 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°å¯ä»¥æ ¹æ®èªèº«è§åå®ä¹421 * @param {{type:string,have:true}} modelCode 模åç¼ç 422 * @param {{type:string,have:true}} pageNo 页ç 423 * @param {{type:string,have:true}} pageSize ä¸é¡µæ¾ç¤ºæ°é424 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)425 * @examples 426 * ...427 * mpeople.people.attention.list($("form").serialize(),function(returnJson){428 * alert(JSON.stringify(returnJson));429 * })430 *...431 * @function 432 * { "list": [433 * {434 * "basicPic": "缩ç¥å¾", 435 * "basicTitle": "æ é¢", 436 * "basicComment": è¯è®ºæ°, 437 * "basicCollect": æ¶èæ°é, 438 * "basicHit": ç¹æ°é, 439 * "basicAppId": 1, 440 * "basicCategoryId": 160, 441 * "basicDateTime": 1468568887000,442 * "basicThumbnails": "/upload/mall/product/1/1468568853464.jpg", 443 * "basicTypeIds": [ ], 444 * "basicUpdateTime": shan, 445 * }],446 * "page":{"endRow": 2, 447 * "firstPage": 1, 448 * "hasNextPage": trueåå¨ä¸ä¸é¡µfalseä¸åå¨, 449 * "hasPreviousPage": trueåå¨ä¸ä¸é¡µfalseä¸åå¨, 450 * "isFirstPage": trueæ¯ç¬¬ä¸é¡µfalseä¸æ¯ç¬¬ä¸é¡µ, 451 * "isLastPage": trueæ¯æåä¸é¡µfalseä¸æ¯æåä¸é¡µ, 452 * "lastPage": æåä¸é¡µç页ç , 453 * "navigatePages": 导èªæ°éï¼å®ç° 1...5.6.7....10ææ, 454 * "navigatepageNums": []导èªé¡µç éå, 455 * "nextPage": ä¸ä¸é¡µ, 456 * "pageNum": å½å页ç , 457 * "pageSize": ä¸é¡µæ¾ç¤ºæ°é, 458 * "pages": æ»é¡µæ°, 459 * "prePage": ä¸ä¸é¡µ, 460 * "size": æ»è®°å½, 461 * "startRow": , 462 * "total":æ»è®°å½æ°é}463 * }464 * @return {{type:basicAppId}} ç¼å·465 * @return {{type:basicTitle}} æ é¢466 * @return {{type:basicDateTime}} æ¶é´467 * @return {{type:basicPic}} 缩ç¥å¾468 * @return {{type:basicLinkUrl}} é¾æ¥469 * @return {{type:basicUpdateTime}} æ´æ°æ¶é´470 * @return {{type:basicHit}} ç¹æ°é471 */472 list : function(data,func){473 if (validator.isNull(data)){474 return;475 };476 //å°dataåæ°è½¬json477 var newDataJson = ms.turnJson(data);478 if(validator.isNull(newDataJson.basicAttentionType)){479 ms.alert("å表çç±»åä¸è½ä¸ºç©º");480 return;481 }482 if(validator.isNull(newDataJson.modelCode)){483 ms.alert("模åç¼ç ä¸è½ä¸ºç©º");484 return;485 }486 if(validator.isNull(newDataJson.pageNo)){487 ms.alert("页ç ä¸è½ä¸ºç©º");488 return;489 }else if(!validator.isInt(newDataJson.pageNo)){490 ms.alert("页ç åºä¸ºæ´å");491 return;492 }493 if(validator.isNull(newDataJson.pageSize)){494 ms.alert("å页æ°éä¸è½ä¸ºç©º");495 return;496 }else if(!validator.isInt(newDataJson.pageSize)){497 ms.alert("å页æ°éåºä¸ºæ´å");498 return;499 }500 501 ajaxCfg.url = ms.base + "/people/attention/list.do";502 ajaxCfg.params = data;503 ms.ajax(ajaxCfg, func); 504 },505 },506 mall : {507 attention:{508 /**509 * ååæ¶èå表510 ------511 * @callmethod people.mall.attention.list(data,function(returnJson){...});512 * @param {{type:string,have:true}} pageNo 页ç 513 * @param {{type:string,have:true}} pageSize ä¸é¡µæ¾ç¤ºæ°é514 * @param {{type:string,have:true}} basicAttentionType å
³æ³¨ç±»å å
·ä½å¹³å°å¯ä»¥æ ¹æ®èªèº«è§åå®ä¹515 * @param {{type:function,have:true}} åè°æ¹æ³ è¿åå¼(returnJson)516 * @examples 517 * ...518 * mpeople.people.mall.attention.list($("form").serialize(),function(returnJson){519 * alert(JSON.stringify(returnJson));520 * })521 *...522 * @function 523 * [524 * {"basicId":ååç¼å·,525 * "basicTitle":"ååæ é¢",526 * "basicDateTime"ï¼"æ¶é´",527 * "basicPic":ååå¾ç,528 * "productLinkUrl":ååé¾æ¥,529 * "basicSort":"åååç±»",530 * "productPrice":ååä»·æ ¼531 * }532 * ]533 * @return {{type:basicId}} ååç¼å·534 * @return {{type:basicTitle}} ååæ é¢535 * @return {{type:basicDateTime}} æ¶é´536 * @return {{type:basicPic}} ååå¾ç537 * @return {{type:productLinkUrl}} ååé¾æ¥538 * @return {{type:basicSort}} åååç±»539 * @return {{type:productPrice}} ååä»·æ ¼540 */541 list : function(data,func){542 if (validator.isNull(data)){543 return;544 };545 //å°dataåæ°è½¬json546 var newDataJson = ms.turnJson(data);547 if(validator.isNull(newDataJson.basicAttentionType)){548 ms.alert("å表çç±»åä¸è½ä¸ºç©º");549 return;550 }551 if(validator.isNull(newDataJson.pageNo)){552 ms.alert("页ç ä¸è½ä¸ºç©º");553 return;554 }else if(!validator.isInt(newDataJson.pageNo)){555 ms.alert("页ç åºä¸ºæ´å");556 return;557 }558 if(validator.isNull(newDataJson.pageSize)){559 ms.alert("å页æ°éä¸è½ä¸ºç©º");560 return;561 }else if(!validator.isInt(newDataJson.pageSize)){562 ms.alert("å页æ°éåºä¸ºæ´å");563 return;564 }565 ajaxCfg.url = ms.base + "/people/mall/attention/list.do";566 ajaxCfg.params = data;567 ms.ajax(ajaxCfg, func); 568 }569 }570 }571 } 572 }573>>>>>>> commit...
main.ts
Source:main.ts
1function einde () {2 midden()3 sM()4 led.setBrightness(200)5 basic.pause(1000)6 rechts()7 basic.pause(500)8 led.plot(3, 3)9 basic.pause(100)10 led.plot(3, 2)11 led.unplot(3, 3)12 basic.pause(100)13 basic.showLeds(`14 # # # # .15 # # . . #16 # . . . .17 . . . . .18 . . . # .19 `)20 basic.pause(1000)21 links()22 basic.pause(500)23 led.plot(1, 3)24 basic.pause(100)25 led.plot(1, 2)26 led.unplot(1, 3)27 basic.pause(100)28 basic.showLeds(`29 # . # # .30 . . . . #31 # . . . .32 . . . . .33 . # . . .34 `)35 basic.pause(1000)36 midden()37 basic.pause(500)38 led.plot(2, 3)39 basic.pause(100)40 led.plot(2, 2)41 led.unplot(2, 3)42 basic.pause(100)43 led.plot(2, 1)44 led.unplot(2, 2)45 basic.pause(100)46 basic.showLeds(`47 # # . # .48 . . # . #49 # . . . .50 . . . . .51 . . # . .52 `)53 basic.showLeds(`54 # . . . #55 . # # # #56 # . . . .57 . . . . .58 . . # . .59 `)60 basic.showLeds(`61 . . . . .62 # . . . #63 # # # # .64 . . . . .65 . . # . .66 `)67 basic.showLeds(`68 . . . . .69 . . . . .70 # . . . #71 . # # # .72 . . # . .73 `)74 basic.showLeds(`75 . . . . .76 . . . . .77 . . . . .78 # . . . #79 . # # # .80 `)81 basic.showLeds(`82 . . . . .83 . . . . .84 . . . . .85 . . . . .86 # . . . #87 `)88 basic.clearScreen()89 led.plot(2, 4)90 basic.pause(100)91 led.plot(2, 3)92 led.unplot(2, 4)93 basic.pause(100)94 led.unplot(2, 3)95 led.plot(2, 2)96 basic.pause(1000)97 for (let index = 0; index < 5; index++) {98 led.plot(3, 0)99 basic.pause(100)100 led.unplot(3, 0)101 led.plot(3, 1)102 led.plot(1, 0)103 basic.pause(100)104 led.unplot(1, 0)105 led.plot(3, 0)106 led.plot(1, 1)107 led.unplot(3, 1)108 led.plot(3, 2)109 basic.pause(100)110 led.unplot(1, 1)111 led.plot(3, 1)112 led.unplot(3, 0)113 led.plot(1, 2)114 led.unplot(3, 2)115 led.plot(3, 3)116 basic.pause(100)117 led.unplot(1, 2)118 led.plot(3, 2)119 led.unplot(3, 1)120 led.plot(0, 0)121 led.plot(1, 3)122 led.unplot(3, 3)123 led.plot(3, 4)124 basic.pause(100)125 led.unplot(1, 3)126 led.plot(3, 3)127 led.unplot(0, 0)128 led.plot(0, 1)129 led.unplot(3, 2)130 led.unplot(3, 4)131 led.plot(1, 4)132 basic.pause(100)133 led.unplot(1, 4)134 led.unplot(0, 1)135 led.plot(0, 2)136 led.plot(3, 4)137 led.unplot(3, 3)138 basic.pause(100)139 led.unplot(0, 2)140 led.plot(0, 3)141 led.unplot(3, 4)142 basic.pause(100)143 led.unplot(0, 3)144 led.plot(0, 4)145 basic.pause(100)146 led.unplot(0, 4)147 }148 led.plot(3, 0)149 led.unplot(2, 2)150 led.plot(2, 3)151 basic.pause(100)152 led.unplot(3, 0)153 led.plot(3, 1)154 led.plot(1, 0)155 basic.pause(100)156 led.unplot(1, 0)157 led.unplot(2, 3)158 led.plot(2, 2)159 led.plot(3, 0)160 led.plot(1, 1)161 led.unplot(3, 1)162 led.plot(3, 2)163 basic.pause(100)164 led.unplot(1, 1)165 led.plot(3, 1)166 led.unplot(2, 2)167 led.plot(2, 1)168 led.unplot(3, 0)169 led.plot(1, 2)170 led.unplot(3, 2)171 led.plot(3, 3)172 basic.pause(100)173 led.unplot(1, 2)174 led.plot(3, 2)175 led.unplot(2, 1)176 led.plot(2, 0)177 led.unplot(3, 1)178 led.plot(0, 0)179 led.plot(1, 3)180 led.unplot(3, 3)181 led.plot(3, 4)182 basic.pause(100)183 led.unplot(1, 3)184 led.plot(3, 3)185 led.unplot(0, 0)186 led.unplot(2, 0)187 led.plot(0, 1)188 led.unplot(3, 2)189 led.unplot(3, 4)190 led.plot(1, 4)191 basic.pause(100)192 led.unplot(1, 4)193 led.unplot(0, 1)194 led.plot(0, 2)195 led.plot(3, 4)196 led.unplot(3, 3)197 basic.pause(100)198 led.unplot(0, 2)199 led.plot(0, 3)200 led.unplot(3, 4)201 basic.pause(100)202 led.unplot(0, 3)203 led.plot(0, 4)204 basic.pause(100)205 led.unplot(0, 4)206 basic.clearScreen()207 basic.showLeds(`208 . # # # .209 # . . . #210 # # # # #211 # . . . #212 . # # # .213 `)214 basic.pause(2000)215 basic.clearScreen()216}217function level_4 () {218 basic.showNumber(4)219 basic.pause(2000)220 basic.clearScreen()221 midden()222 basic.pause(1000)223 led.plot(0, 0)224 led.plot(1, 0)225 led.plot(2, 0)226 basic.pause(500)227 led.plot(0, 1)228 led.plot(1, 1)229 led.plot(2, 1)230 led.unplot(0, 0)231 led.unplot(1, 0)232 led.unplot(2, 0)233 basic.pause(500)234 led.plot(0, 2)235 led.plot(1, 2)236 led.plot(2, 2)237 led.plot(3, 0)238 led.unplot(0, 1)239 led.unplot(1, 1)240 led.unplot(2, 1)241 basic.pause(500)242 led.plot(0, 3)243 led.plot(1, 3)244 led.plot(2, 3)245 led.plot(3, 1)246 led.unplot(3, 0)247 led.unplot(0, 2)248 led.unplot(1, 2)249 led.unplot(2, 2)250 basic.pause(500)251 led.unplot(0, 3)252 led.unplot(1, 3)253 led.unplot(2, 3)254 if (led.point(1, 4)) {255 gameover()256 } else {257 if (led.point(2, 4)) {258 gameover()259 } else {260 led.plot(3, 2)261 led.unplot(3, 1)262 led.plot(0, 4)263 led.plot(1, 4)264 led.plot(2, 4)265 basic.pause(500)266 led.plot(3, 3)267 led.unplot(3, 2)268 led.unplot(0, 4)269 led.unplot(1, 4)270 led.unplot(2, 4)271 basic.pause(500)272 led.unplot(3, 3)273 if (led.point(3, 4)) {274 gameover()275 } else {276 led.plot(3, 4)277 basic.pause(500)278 led.unplot(3, 4)279 basic.pause(500)280 level_5()281 }282 }283 }284}285function laatste () {286 sM()287 basic.pause(1000)288 led.plot(3, 1)289 led.plot(1, 1)290 basic.pause(100)291 led.unplot(3, 1)292 led.unplot(1, 1)293 basic.pause(100)294 led.plot(3, 1)295 led.plot(1, 1)296 basic.pause(100)297 led.unplot(3, 1)298 led.unplot(1, 1)299 basic.pause(100)300 led.plot(3, 1)301 led.plot(1, 1)302 basic.pause(100)303 led.unplot(3, 1)304 led.unplot(1, 1)305 basic.pause(100)306 led.plot(3, 1)307 led.plot(1, 1)308 basic.pause(100)309 led.plot(1, 1)310 led.plot(3, 1)311 basic.pause(100)312 led.plot(3, 2)313 led.plot(1, 2)314 basic.pause(100)315 led.plot(3, 3)316 led.plot(1, 3)317 if (led.point(1, 4)) {318 gameover()319 } else {320 if (led.point(3, 4)) {321 gameover()322 } else {323 led.plot(1, 4)324 led.plot(3, 4)325 basic.pause(1000)326 led.plotBrightness(1, 1, 200)327 led.plotBrightness(3, 1, 200)328 basic.pause(100)329 led.unplot(3, 2)330 led.unplot(1, 2)331 basic.pause(100)332 led.unplot(1, 3)333 led.unplot(3, 3)334 basic.pause(100)335 led.unplot(3, 4)336 led.unplot(1, 4)337 einde()338 }339 }340}341function sL () {342 led.plotBrightness(0, 0, 200)343 led.plotBrightness(1, 0, 200)344 led.plotBrightness(2, 0, 200)345 led.plotBrightness(3, 0, 200)346 led.plotBrightness(4, 0, 200)347 led.plotBrightness(0, 1, 200)348 led.plotBrightness(4, 3, 200)349 led.plotBrightness(4, 2, 200)350 led.plotBrightness(3, 2, 200)351 led.plotBrightness(2, 1, 200)352 led.plotBrightness(3, 1, 200)353 led.plotBrightness(4, 1, 200)354 led.unplot(2, 2)355 led.unplot(1, 2)356 led.unplot(0, 2)357 led.unplot(1, 1)358 led.unplot(0, 3)359}360function links () {361 led.unplot(2, 4)362 led.unplot(3, 4)363 led.plotBrightness(1, 4, 255)364}365function midden () {366 led.unplot(1, 4)367 led.unplot(3, 4)368 led.plotBrightness(2, 4, 255)369}370function to_be_continuet () {371 basic.pause(2000)372 for (let index = 0; index < 5; index++) {373 basic.pause(10)374 basic.showLeds(`375 . . # # #376 . . . . #377 . . . . #378 . . . . #379 . . # # #380 `)381 basic.pause(10)382 basic.showLeds(`383 . . . # #384 . . . . #385 . . . . #386 . . . . #387 . # # # #388 `)389 basic.pause(10)390 basic.showLeds(`391 . . . . #392 . . . . #393 . . . . #394 . . . . #395 # # # # #396 `)397 basic.pause(10)398 basic.showLeds(`399 . . . . .400 . . . . #401 . . . . #402 # . . . #403 # # # # #404 `)405 basic.pause(10)406 basic.showLeds(`407 . . . . .408 . . . . .409 # . . . #410 # . . . #411 # # # # #412 `)413 basic.pause(10)414 basic.showLeds(`415 . . . . .416 # . . . .417 # . . . .418 # . . . #419 # # # # #420 `)421 basic.pause(10)422 basic.showLeds(`423 # . . . .424 # . . . .425 # . . . .426 # . . . .427 # # # # #428 `)429 basic.pause(10)430 basic.showLeds(`431 # # . . .432 # . . . .433 # . . . .434 # . . . .435 # # # # .436 `)437 basic.pause(10)438 basic.showLeds(`439 # # # . .440 # . . . .441 # . . . .442 # . . . .443 # # # . .444 `)445 basic.pause(10)446 basic.showLeds(`447 # # # # .448 # . . . .449 # . . . .450 # . . . .451 # # . . .452 `)453 basic.pause(10)454 basic.showLeds(`455 # # # # #456 # . . . .457 # . . . .458 # . . . .459 # . . . .460 `)461 basic.pause(10)462 basic.showLeds(`463 # # # # #464 # . . . #465 # . . . .466 # . . . .467 . . . . .468 `)469 basic.pause(10)470 basic.showLeds(`471 # # # # #472 # . . . #473 # . . . #474 . . . . .475 . . . . .476 `)477 basic.pause(10)478 basic.showLeds(`479 # # # # #480 # . . . #481 . . . . #482 . . . . #483 . . . . .484 `)485 basic.pause(10)486 basic.showLeds(`487 # # # # #488 . . . . #489 . . . . #490 . . . . #491 . . . . #492 `)493 basic.pause(10)494 basic.showLeds(`495 . # # # #496 . . . . #497 . . . . #498 . . . . #499 . . . # #500 `)501 }502 basic.clearScreen()503}504input.onButtonPressed(Button.A, function () {505 links()506})507function sM () {508 led.plotBrightness(0, 0, 200)509 led.plotBrightness(1, 0, 200)510 led.plotBrightness(2, 0, 200)511 led.plotBrightness(3, 0, 200)512 led.plotBrightness(4, 0, 200)513 led.plotBrightness(0, 1, 200)514 led.plotBrightness(0, 2, 200)515 led.plotBrightness(1, 1, 200)516 led.plotBrightness(4, 1, 200)517 led.plotBrightness(4, 2, 200)518 led.plotBrightness(3, 1, 200)519 led.unplot(1, 2)520 led.unplot(2, 2)521 led.unplot(3, 2)522 led.unplot(4, 3)523 led.unplot(0, 3)524 led.unplot(2, 1)525}526function s_bijdeRL () {527 sB()528 basic.pause(200)529 led.plot(1, 1)530 led.plot(3, 1)531 basic.pause(100)532 led.unplot(3, 1)533 led.plot(3, 2)534 led.unplot(1, 1)535 led.plot(1, 2)536 basic.pause(100)537 led.plot(3, 3)538 led.unplot(3, 2)539 led.plot(1, 3)540 led.unplot(1, 2)541 basic.pause(100)542 if (led.point(1, 4)) {543 gameover()544 } else {545 if (led.point(3, 4)) {546 gameover()547 } else {548 led.plot(1, 4)549 led.unplot(1, 3)550 led.plot(3, 4)551 led.unplot(3, 3)552 basic.pause(100)553 led.unplot(3, 4)554 led.unplot(1, 4)555 }556 }557}558function rechts () {559 led.unplot(1, 4)560 led.unplot(2, 4)561 led.plotBrightness(3, 4, 255)562}563function sB () {564 led.plot(0, 0)565 led.plot(1, 0)566 led.plot(2, 0)567 led.plot(3, 0)568 led.plot(4, 0)569 led.plot(0, 2)570 led.plot(0, 1)571 led.plot(4, 2)572 led.plot(4, 1)573 led.plot(2, 1)574 led.unplot(1, 1)575 led.unplot(3, 1)576 led.unplot(1, 2)577 led.unplot(2, 2)578 led.unplot(3, 2)579 led.unplot(0, 3)580 led.unplot(4, 3)581}582input.onButtonPressed(Button.AB, function () {583 midden()584})585function level_2 () {586 basic.showNumber(2)587 basic.pause(2000)588 basic.clearScreen()589 links()590 basic.pause(1000)591 led.plot(1, 0)592 basic.pause(1000)593 led.plot(1, 1)594 led.unplot(1, 0)595 basic.pause(1000)596 led.plot(1, 2)597 led.plot(3, 0)598 led.unplot(1, 1)599 basic.pause(1000)600 led.plot(1, 3)601 led.plot(3, 1)602 led.unplot(1, 2)603 led.unplot(3, 0)604 basic.pause(1000)605 led.unplot(1, 3)606 led.unplot(3, 1)607 if (led.point(1, 4)) {608 gameover()609 } else {610 led.plot(1, 4)611 led.plot(3, 2)612 basic.pause(1000)613 led.plot(3, 3)614 led.unplot(1, 4)615 led.unplot(3, 2)616 basic.pause(1000)617 led.unplot(3, 3)618 if (led.point(3, 4)) {619 gameover()620 } else {621 led.plot(3, 4)622 basic.pause(1000)623 led.unplot(3, 4)624 level_3()625 }626 }627}628function s_rechts () {629 sR()630 basic.pause(200)631 led.plot(3, 1)632 basic.pause(100)633 led.unplot(3, 1)634 led.plot(3, 2)635 basic.pause(100)636 led.plot(3, 3)637 led.unplot(3, 2)638 basic.pause(100)639 if (led.point(3, 4)) {640 gameover()641 } else {642 led.plot(3, 4)643 led.unplot(3, 3)644 basic.pause(100)645 led.unplot(3, 4)646 }647}648input.onButtonPressed(Button.B, function () {649 rechts()650})651function level_5 () {652 basic.showNumber(5)653 basic.pause(2000)654 basic.clearScreen()655 basic.pause(500)656 led.setBrightness(200)657 basic.showLeds(`658 # # . # #659 # . . . #660 . . . . .661 . . . . .662 . . . . .663 `)664 basic.pause(100)665 led.plotBrightness(0, 0, 200)666 led.plotBrightness(1, 0, 200)667 led.plotBrightness(2, 0, 200)668 led.plotBrightness(3, 0, 200)669 led.plotBrightness(4, 0, 200)670 led.plotBrightness(0, 1, 200)671 led.plotBrightness(0, 2, 200)672 led.plotBrightness(1, 1, 200)673 led.plotBrightness(4, 1, 200)674 led.plotBrightness(4, 2, 200)675 led.plotBrightness(3, 1, 200)676 led.setBrightness(255)677 basic.pause(1000)678 midden()679 basic.pause(randint(1000, 3000))680 s_midden()681 basic.pause(randint(1000, 3000))682 s_links()683 basic.pause(randint(1000, 3000))684 s_rechts()685 basic.pause(randint(1000, 3000))686 s_rechts()687 basic.pause(randint(1000, 3000))688 s_links()689 basic.pause(randint(1000, 3000))690 s_bijdeRL()691 basic.pause(randint(1000, 3000))692 s_links()693 basic.pause(randint(1000, 3000))694 s_midden()695 basic.pause(randint(1000, 3000))696 s_links()697 basic.pause(randint(1000, 3000))698 s_rechts()699 basic.pause(randint(1000, 3000))700 s_bijdeRL()701 basic.pause(randint(1000, 3000))702 s_rechts()703 basic.pause(randint(1000, 3000))704 s_links()705 basic.pause(randint(1000, 3000))706 s_rechts()707 basic.pause(randint(1000, 3000))708 s_links()709 basic.pause(randint(1000, 3000))710 s_links()711 basic.pause(randint(1000, 3000))712 s_midden()713 basic.pause(2000)714 laatste()715}716function s_midden () {717 sM()718 basic.pause(200)719 led.plot(2, 1)720 basic.pause(100)721 led.unplot(2, 1)722 led.plot(2, 2)723 basic.pause(100)724 led.plot(2, 3)725 led.unplot(2, 2)726 basic.pause(100)727 if (led.point(2, 4)) {728 gameover()729 } else {730 led.plot(2, 4)731 led.unplot(2, 3)732 basic.pause(100)733 led.unplot(2, 4)734 }735}736function s_links () {737 sL()738 basic.pause(200)739 led.plot(1, 1)740 basic.pause(100)741 led.unplot(1, 1)742 led.plot(1, 2)743 basic.pause(100)744 led.plot(1, 3)745 led.unplot(1, 2)746 basic.pause(100)747 if (led.point(1, 4)) {748 gameover()749 } else {750 led.plot(1, 4)751 led.unplot(1, 3)752 basic.pause(100)753 led.unplot(1, 4)754 }755}756function start () {757 basic.pause(1000)758 basic.showLeds(`759 # . . # .760 . . . . .761 . . . . .762 . . . . .763 . . . . .764 `)765 basic.pause(100)766 basic.showLeds(`767 . . # . #768 # . . # .769 # . . # .770 . . . . .771 . . . . .772 `)773 basic.pause(100)774 basic.showLeds(`775 # . # . #776 . . # . #777 . . . # #778 # . . # .779 # . . . .780 `)781 basic.pause(100)782 basic.showLeds(`783 . . . . .784 # . # . .785 # . # . #786 . . . . #787 # . . # #788 `)789 basic.pause(100)790 basic.showLeds(`791 . . . . .792 . . . . .793 . . # . .794 # . # . #795 # . . . #796 `)797 basic.pause(100)798 basic.showLeds(`799 . . . . .800 . . . . .801 . . . . .802 . . . . .803 . . # . .804 `)805 basic.clearScreen()806 basic.pause(1000)807 basic.showLeds(`808 . # # # .809 # . . . #810 # # # # #811 # . . . #812 . # # # .813 `)814 if (true) {815 basic.pause(1000)816 basic.clearScreen()817 basic.pause(2000)818 level_1()819 } else {820 basic.pause(1000)821 basic.clearScreen()822 basic.pause(2000)823 level_1()824 }825}826function sR () {827 led.plotBrightness(0, 3, 200)828 led.plotBrightness(0, 2, 200)829 led.plotBrightness(1, 2, 200)830 led.plotBrightness(2, 1, 200)831 led.plotBrightness(0, 1, 200)832 led.plotBrightness(4, 1, 200)833 led.plotBrightness(0, 0, 200)834 led.plotBrightness(1, 0, 200)835 led.plotBrightness(2, 0, 200)836 led.plotBrightness(3, 0, 200)837 led.plotBrightness(4, 0, 200)838 led.plotBrightness(1, 1, 200)839 led.unplot(4, 3)840 led.unplot(2, 2)841 led.unplot(3, 2)842 led.unplot(4, 2)843 led.unplot(3, 1)844}845function level_1 () {846 basic.showNumber(1)847 basic.pause(2000)848 basic.clearScreen()849 midden()850 basic.pause(1000)851 led.plot(2, 0)852 basic.pause(1000)853 led.unplot(2, 0)854 led.plot(2, 1)855 basic.pause(1000)856 led.unplot(2, 1)857 led.plot(2, 2)858 basic.pause(1000)859 led.unplot(2, 2)860 led.plot(2, 3)861 basic.pause(1000)862 led.unplot(2, 3)863 if (led.point(2, 4)) {864 gameover()865 } else {866 led.plot(2, 4)867 basic.pause(1000)868 led.unplot(2, 4)869 level_2()870 }871}872function level_3 () {873 basic.showNumber(3)874 basic.pause(2000)875 basic.clearScreen()876 midden()877 basic.pause(1000)878 led.plot(1, 0)879 basic.pause(500)880 led.unplot(1, 0)881 led.plot(1, 1)882 basic.pause(500)883 led.unplot(1, 1)884 led.plot(1, 2)885 basic.pause(500)886 led.unplot(1, 2)887 led.plot(1, 3)888 led.plot(2, 0)889 basic.pause(500)890 led.unplot(1, 3)891 led.unplot(2, 0)892 if (led.point(1, 4)) {893 gameover()894 } else {895 led.plot(1, 4)896 led.plot(2, 1)897 basic.pause(500)898 led.unplot(1, 4)899 led.unplot(2, 1)900 led.plot(2, 2)901 basic.pause(500)902 led.unplot(2, 2)903 led.plot(2, 3)904 basic.pause(500)905 led.unplot(2, 3)906 if (led.point(2, 4)) {907 gameover()908 } else {909 led.plot(2, 4)910 basic.pause(500)911 led.unplot(2, 4)912 level_4()913 }914 }915}916function gameover () {917 basic.clearScreen()918 basic.showString("game over")919}...
classerpc_1_1_basic_codec.js
Source:classerpc_1_1_basic_codec.js
1var classerpc_1_1_basic_codec =2[3 [ "BasicCodec", "classerpc_1_1_basic_codec.html#abd7b171481037fc3a9f4238acf6f7f6d", null ],4 [ "startWriteMessage", "classerpc_1_1_basic_codec.html#ac470f37a771427cbfac97ab0283e9181", null ],5 [ "writeData", "classerpc_1_1_basic_codec.html#a25e2b6cb85c37518be6148f54cbd01e0", null ],6 [ "write", "classerpc_1_1_basic_codec.html#aa5c809aed676e5b6a372991198c56c71", null ],7 [ "write", "classerpc_1_1_basic_codec.html#a3341bb468ab0adf3de1c3bf5401e4028", null ],8 [ "write", "classerpc_1_1_basic_codec.html#aea0a589580c22e50c1df833cb11ae0a0", null ],9 [ "write", "classerpc_1_1_basic_codec.html#a1b7bd9c40066c887ff77c4737d478525", null ],10 [ "write", "classerpc_1_1_basic_codec.html#a0aa696437c2b168f153117a154a4e0a7", null ],11 [ "write", "classerpc_1_1_basic_codec.html#a06407f2256fb0fa77e5404f279be423f", null ],12 [ "write", "classerpc_1_1_basic_codec.html#ade10e176496f6e8573f5c9ba91ac0655", null ],13 [ "write", "classerpc_1_1_basic_codec.html#ad5275291303ef67ff13151c97b4c324b", null ],14 [ "write", "classerpc_1_1_basic_codec.html#a3d345b54e136cbb4839199182e5270b1", null ],15 [ "write", "classerpc_1_1_basic_codec.html#a8c666e7bc3ae15ba6b3e8f93438d95de", null ],16 [ "write", "classerpc_1_1_basic_codec.html#a0106776fe3730d8be0f565106f73b521", null ],17 [ "writePtr", "classerpc_1_1_basic_codec.html#a502e1325f3051079c7e19dda25e7dd65", null ],18 [ "writeString", "classerpc_1_1_basic_codec.html#a7bb982495470fdc4da1eab2883371a18", null ],19 [ "writeBinary", "classerpc_1_1_basic_codec.html#a6456b4d7a1e7944f60d6baf1d33b2281", null ],20 [ "startWriteList", "classerpc_1_1_basic_codec.html#a7866b1ea6e2b89a373eddd3939d9e6f3", null ],21 [ "startWriteUnion", "classerpc_1_1_basic_codec.html#a75fc57134ce77a3949c1470b1243f871", null ],22 [ "writeNullFlag", "classerpc_1_1_basic_codec.html#a45a74c033c173b85096a8cd641841560", null ],23 [ "writeCallback", "classerpc_1_1_basic_codec.html#a45de8c72bcbb8611db98f83480104128", null ],24 [ "writeCallback", "classerpc_1_1_basic_codec.html#a3cf8a93617b7f712b19f6fa2a017c92f", null ],25 [ "startReadMessage", "classerpc_1_1_basic_codec.html#a8edbc2ad42055a8c17083b9f2da3248e", null ],26 [ "readData", "classerpc_1_1_basic_codec.html#af12b78761da78e9f140379972ca0cf86", null ],27 [ "read", "classerpc_1_1_basic_codec.html#a8bcc22f1815f0881b555bd8ac4a2d3b4", null ],28 [ "read", "classerpc_1_1_basic_codec.html#aba0745d52ce24779782f7bcedf4cf10e", null ],29 [ "read", "classerpc_1_1_basic_codec.html#a435757c15967421e4209e3456faec36a", null ],30 [ "read", "classerpc_1_1_basic_codec.html#a8395a4908bc9f077a27e7babe2727cac", null ],31 [ "read", "classerpc_1_1_basic_codec.html#a3aab31b4ea7bc6ceac592ce52e31b639", null ],32 [ "read", "classerpc_1_1_basic_codec.html#ad1898d71bacc79adbef49f61e72f5542", null ],33 [ "read", "classerpc_1_1_basic_codec.html#a4f988dbb016a98d99b681940fe4f886d", null ],34 [ "read", "classerpc_1_1_basic_codec.html#af35ade38165441954e85b4ebefaeab54", null ],35 [ "read", "classerpc_1_1_basic_codec.html#af988e51e450dda9e8649101ed472401a", null ],36 [ "read", "classerpc_1_1_basic_codec.html#a99dffc27fecbd06ce2367f22711c8a02", null ],37 [ "read", "classerpc_1_1_basic_codec.html#a418767f583e150e4e23cf8b25c3e377e", null ],38 [ "readPtr", "classerpc_1_1_basic_codec.html#a3bb94b2429f248ad6e3a357d25318404", null ],39 [ "readString", "classerpc_1_1_basic_codec.html#aefe3fd8293738dd1f863c786e069e2d9", null ],40 [ "readBinary", "classerpc_1_1_basic_codec.html#aef4a3aaa7bbd74c412bdb42c9468e777", null ],41 [ "startReadList", "classerpc_1_1_basic_codec.html#a286e2bda535cc3d1ef8931c9eb493a1d", null ],42 [ "startReadUnion", "classerpc_1_1_basic_codec.html#ae007d4c166a39f39111896e6fe01cb32", null ],43 [ "readNullFlag", "classerpc_1_1_basic_codec.html#a000e06e1dc72a3439c74792d40d61f01", null ],44 [ "readCallback", "classerpc_1_1_basic_codec.html#aef6e72c11eeca1cff3ec7cca6bcfa400", null ],45 [ "readCallback", "classerpc_1_1_basic_codec.html#a39527995a0bd9e460cdf1dcd4bbb06e7", null ]...
index.ts
Source:index.ts
1import { StyleProvider, connectStyle } from '@app/native-base-shoutem-theme'2import { LodashUtils as _ } from '@app/tools'3import setDefaultThemeStyle from './init'4import variables from './theme/variables/platform'5import Drawer from './basic/Drawer'6import { SwipeRow } from './basic/SwipeRow'7import { Text } from './basic/Text'8import { ViewNB as View } from './basic/View'9import { Button } from './basic/Button'10import { DatePicker } from './basic/DatePicker'11import { TabHeading } from './basic/TabHeading'12import { TabContainer } from './basic/TabContainer'13import { IconNB } from './basic/IconNB'14import { Icon } from './basic/Icon'15import { Header } from './basic/Header'16import { HeaderStatusBar } from './basic/HeaderStatusBar'17import { InputGroup } from './basic/InputGroup'18import { Input } from './basic/Input'19import { Title } from './basic/Title'20import { Fab } from './basic/Fab'21import { Left } from './basic/Left'22import { Right } from './basic/Right'23import { Body } from './basic/Body'24import { Badge } from './basic/Badge'25import { CheckBox } from './basic/Checkbox'26import { Radio } from './basic/Radio'27import { Thumbnail } from './basic/Thumbnail'28import { Card } from './basic/Card'29import { CardItem } from './basic/CardItem'30import { Li } from './basic/Li'31import { Ul } from './basic/Ul'32import { P } from './basic/P'33import { H1 } from './basic/H1'34import { H2 } from './basic/H2'35import { H3 } from './basic/H3'36import { Spinner } from './basic/Spinner'37import { Switch } from './basic/Switch'38import { Container } from './basic/Container'39import { Root } from './basic/Root'40import { Content } from './basic/Content'41import { Footer } from './basic/Footer'42import { FooterTab } from './basic/FooterTab'43import { Form } from './basic/Form'44import { ToastContainer } from './basic/ToastContainer'45import { ActionSheetContainer } from './basic/Actionsheet'46import { PickerNB } from './basic/Picker'47import { List } from './basic/List'48import { ListSwipeRow } from './basic/ListSwipeRow'49import { ListItem } from './basic/ListItem'50import { Separator } from './basic/Separator'51import { DeckSwiper } from './basic/DeckSwiper'52import { Item } from './basic/Item'53import { Segment } from './basic/Segment'54import { Label } from './basic/Label'55import { Textarea } from './basic/Textarea'56import { Tab } from './basic/Tab'57import ScrollableTabView from './basic/Tabs'58import { DefaultTabBar } from './basic/Tabs/DefaultTabBar'59import { ScrollableTab } from './basic/Tabs/ScrollableTabBar'60import { Subtitle } from './basic/Subtitle'61import { Accordion } from './basic/Accordion'62import { ScrollHeader } from './basic/custom/ScrollHeader'63import { FixLeft } from './basic/custom/FixLeft'64import { FixRight } from './basic/custom/FixRight'65import { HeaderLayout } from './basic/custom/HeaderLayout'66export * from './utils'67setDefaultThemeStyle()68// Theme69export {70 // Custom71 HeaderLayout,72 ScrollHeader,73 FixLeft,74 FixRight,75 // Common76 variables,77 StyleProvider,78 connectStyle,79 Drawer,80 Button,81 DatePicker,82 IconNB,83 Icon,84 Header,85 HeaderStatusBar,86 Form,87 InputGroup,88 Input,89 Title,90 Fab,91 Left,92 Right,93 Body,94 Badge,95 CheckBox,96 Radio,97 Thumbnail,98 Card,99 CardItem,100 Li,101 Ul,102 P,103 H1,104 H2,105 H3,106 Spinner,107 Switch,108 Container,109 Content,110 Footer,111 Tab,112 ScrollableTabView as Tabs,113 FooterTab,114 PickerNB as Picker,115 List,116 ListSwipeRow,117 ListItem,118 Separator,119 DeckSwiper,120 Item,121 Subtitle,122 Label,123 Textarea,124 Text,125 Content as TabContent,126 View,127 ToastContainer as Toast,128 ScrollableTab,129 ActionSheetContainer as ActionSheet,130 TabHeading,131 TabContainer,132 DefaultTabBar,133 Segment,134 Root,135 SwipeRow,136 Accordion137}138const mapPropsToStyleNames = (styleNames, props) => {139 return _.keys(props)140}141export { mapPropsToStyleNames }...
Using AI Code Generation
1const fc = require("fast-check");2fc.assert(3 fc.property(fc.integer(), (n) => {4 return n >= 0;5 })6);7const fc = require("fast-check");8fc.assert(9 fc.property(fc.integer(), (n) => {10 return n >= 0;11 })12);13const fc = require("fast-check");14fc.assert(15 fc.property(fc.integer(), (n) => {16 return n >= 0;17 })18);19const fc = require("fast-check");20fc.assert(21 fc.property(fc.integer(), (n) => {22 return n >= 0;23 })24);25const fc = require("fast-check");26fc.assert(27 fc.property(fc.integer(), (n) => {28 return n >= 0;29 })30);31const fc = require("fast-check");32fc.assert(33 fc.property(fc.integer(), (n) => {34 return n >= 0;35 })36);37const fc = require("fast-check");38fc.assert(39 fc.property(fc.integer(), (n) => {40 return n >= 0;41 })42);43const fc = require("fast-check");44fc.assert(45 fc.property(fc.integer(), (n) => {46 return n >= 0;47 })48);49const fc = require("fast-check");50fc.assert(51 fc.property(fc.integer(), (n) => {52 return n >= 0;53 })54);55const fc = require("fast-check");56fc.assert(57 fc.property(fc.integer(), (n) => {58 return n >= 0;
Using AI Code Generation
1const fc = require('fast-check');2const assert = require('assert');3const isEven = (n) => n % 2 === 0;4fc.assert(5 fc.property(fc.integer(), (n) => {6 assert(isEven(n));7 })8);9const fc = require('fast-check');10const assert = require('assert');11const isEven = (n) => n % 2 === 0;12fc.assert(13 fc.property(fc.integer(), (n) => {14 assert(isEven(n));15 })16);17const fc = require('fast-check');18const assert = require('assert');19const isEven = (n) => n % 2 === 0;20fc.assert(21 fc.property(fc.integer(), (n) => {22 assert(isEven(n));23 })24);25const fc = require('fast-check');26const assert = require('assert');27const isEven = (n) => n % 2 === 0;28fc.assert(29 fc.property(fc.integer(), (n) => {30 assert(isEven(n));31 })32);33const fc = require('fast-check');34const assert = require('assert');35const isEven = (n) => n % 2 === 0;36fc.assert(37 fc.property(fc.integer(), (n) => {38 assert(isEven(n));39 })40);41const fc = require('fast-check');42const assert = require('assert');43const isEven = (n) => n % 2 === 0;44fc.assert(45 fc.property(fc.integer(), (n) => {46 assert(isEven(n));47 })48);49const fc = require('fast-check');50const assert = require('assert');51const isEven = (n) => n % 2 === 0;52fc.assert(53 fc.property(fc.integer(), (n) => {54 assert(isEven(n));55 })56);
Using AI Code Generation
1import * as fc from 'fast-check';2const myArb = fc.integer(0, 100);3fc.assert(4 fc.property(myArb, (n) => {5 return n >= 0 && n <= 100;6 })7);8import * as fc from 'fast-check';9const myArb = fc.integer(0, 100);10fc.assert(11 fc.property(myArb, (n) => {12 return n >= 0 && n <= 100;13 })14);15import * as fc from 'fast-check';16const myArb = fc.integer(0, 100);17fc.assert(18 fc.property(myArb, (n) => {19 return n >= 0 && n <= 100;20 })21);22import * as fc from 'fast-check';23const myArb = fc.integer(0, 100);24fc.assert(25 fc.property(myArb, (n) => {26 return n >= 0 && n <= 100;27 })28);29import * as fc from 'fast-check';30const myArb = fc.integer(0, 100);31fc.assert(32 fc.property(myArb, (n) => {33 return n >= 0 && n <= 100;34 })35);36import * as fc from 'fast-check';37const myArb = fc.integer(0, 100);38fc.assert(39 fc.property(myArb, (n) => {40 return n >= 0 && n <= 100;41 })42);43import * as fc from 'fast-check';44const myArb = fc.integer(0
Using AI Code Generation
1import { fc, testProp } from "fast-check";2import { isEven } from "./isEven";3testProp("isEven is correct", [fc.integer()], (n) => {4 return isEven(n) === (n % 2 === 0);5});6export function isEven(n) {7 return n % 2 === 0;8}9import { fc, testProp } from "fast-check";10import { isEven } from "./isEven";11testProp("isEven is correct", [fc.integer()], (n) => {12 return isEven(n) === (n % 2 === 0);13});14export function isEven(n) {15 return n % 2 === 0;16}17import { fc, testProp } from "fast-check";18import { isEven } from "./isEven";19testProp("isEven is correct", [fc.integer()], (n) => {20 return isEven(n) === (n % 2 === 0);21});22export function isEven(n) {23 return n % 2 === 0;24}25import { fc, testProp } from "fast-check";26import { isEven } from "./isEven";27testProp("isEven is correct", [fc.integer()], (n) => {28 return isEven(n) === (n % 2 === 0);29});30export function isEven(n) {31 return n % 2 === 0;32}33import { fc, testProp } from "fast-check";34import { isEven } from "./isEven";35testProp("isEven is correct", [fc.integer()], (n) => {
Using AI Code Generation
1const fc = require("fast-check");2const { property, asyncProperty } = require("fast-check");3const { generate } = require("fast-check");4const { sample } = require("fast-check");5const { assert, fail } = require("fast-check");6const { check, checkForall, checkAsync } = require("fast-check");7const { checkWithSettings, checkForallWithSettings, checkAsyncWithSettings } = require("fast-check");8const { checkForallWithLargeSettings, checkAsyncForallWithLargeSettings } = require("fast-check");9const { checkForallWithSmallSettings, checkAsyncForallWithSmallSettings } = require("fast-check");10const { checkForallWithMaxDepthSettings, checkAsyncForallWithMaxDepthSettings } = require("fast-check");11const { checkForallWithMaxSkipsSettings, checkAsyncForallWithMaxSkipsSettings } = require("fast-check");12const { checkForallWithMaxTimeSettings, checkAsyncForallWithMaxTimeSettings } = require("fast-check");13const { checkForallWithVerboseSettings, checkAsyncForallWithVerboseSettings } = require("fast-check");14const { checkForallWithVerboseMaxDepthSettings, checkAsyncForallWithVerboseMaxDepthSettings } = require("fast-check");15const { checkForallWithVerboseMaxSkipsSettings, checkAsyncForallWithVerboseMaxSkipsSettings } = require("fast-check");16const { checkForallWithVerboseMaxTimeSettings, checkAsyncForallWithVerboseMaxTimeSettings } = require("fast-check");17const { checkForallWithVerboseLargeSettings, checkAsyncForallWithVerboseLargeSettings } = require("fast-check");18const { checkForallWithVerboseSmallSettings, checkAsyncForallWithVerboseSmallSettings } = require("fast-check");19const { checkForallWithVerboseMaxDepthSettings, checkAsyncForallWithVerboseMaxDepthSettings } = require("fast-check");20const { checkForallWithVerboseMaxSkipsSettings, checkAsyncForallWithVerboseMaxSkipsSettings } = require("fast-check");21const { checkForallWithVerboseMaxTimeSettings, checkAsyncForallWithVerboseMaxTimeSettings } = require("fast-check");22const { checkForallWithVerboseLargeSettings, checkAsyncForallWithVerboseLargeSettings } = require("fast-check");23const { checkForallWithVerboseSmallSettings, checkAsyncForallWithVerboseSmallSettings
Using AI Code Generation
1import {fc} from 'fast-check';2const arbNumber = fc.integer();3const arbNumberArray = fc.array(arbNumber);4const arbNumberArrayArray = fc.array(arbNumberArray);5const arbNumberArrayArrayArray = fc.array(arbNumberArrayArray);6const arbNumberArrayArrayArrayArray = fc.array(arbNumberArrayArrayArray);7const arbNumberArrayArrayArrayArrayArray = fc.array(arbNumberArrayArrayArrayArray);8const arbNumberArrayArrayArrayArrayArrayArray = fc.array(arbNumberArrayArrayArrayArrayArray);9const arbNumberArrayArrayArrayArrayArrayArrayArray = fc.array(arbNumberArrayArrayArrayArrayArrayArray);10const arbNumberArrayArrayArrayArrayArrayArrayArrayArray = fc.array(arbNumberArrayArrayArrayArrayArrayArrayArray);11const arbNumberArrayArrayArrayArrayArrayArrayArrayArrayArray = fc.array(arbNumberArrayArrayArrayArrayArrayArrayArrayArray);
Using AI Code Generation
1const { fc } = require('fast-check');2const { generate } = require('fast-check-monorepo');3const { generate } = require('fast-check-monorepo');4fc.assert(5 fc.property(6 generate({7 properties: {8 name: { type: 'string' },9 age: { type: 'number' },10 isAlive: { type: 'boolean' },11 },12 }),13 (obj) => {14 return (15 );16 }17);18const { fc } = require('fast-check');19const { generate } = require('fast-check-monorepo');20const { generate } = require('fast-check-monorepo');21fc.assert(22 fc.property(23 generate({24 properties: {25 name: { type: 'string' },26 age: { type: 'number' },27 isAlive: { type: 'boolean' },28 },29 }),30 (obj) => {31 return (32 );33 }34);35const { fc } = require('fast-check');36const { generate } = require('fast-check-monorepo');37const { generate } = require('fast-check-monorepo');38fc.assert(39 fc.property(40 generate({41 properties: {42 name: { type: 'string' },43 age: { type: 'number' },44 isAlive: { type: 'boolean' },45 },46 }),47 (obj) => {48 return (49 );50 }51);
Using AI Code Generation
1const fc = require("fast-check");2const { generator } = require("./generator");3const { shrinker } = require("./shrinker");4const { Arbitrary } = require("./arbitrary");5const { prop } = require("./prop");6const { run } = require("./run");7const { runTest } = require("./runTest");8const { runTestWithCommand } = require("./runTestWithCommand");9const { runTests } = require("./runTests");10const { runTestsInParallel } = require("./runTestsInParallel");11const { runTestsInParallelWithCommand } = require("./runTestsInParallelWithCommand");12const { runTestsInParallelWithCommandAndSave } = require("./runTestsInParallelWithCommandAndSave");13const { runTestsInParallelWithCommandAndSaveInFile } = require("./runTestsInParallelWithCommandAndSaveInFile");14const { runTestsInParallelWithCommandAndSaveInFileAndSend } = require("./runTestsInParallelWithCommandAndSaveInFileAndSend");15const { runTestsInParallelWithCommandAndSaveInFileAndSendAndSave } = require("./runTestsInParallelWithCommandAndSaveInFileAndSendAndSave");16const { runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFile } = require("./runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFile");17const { runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSend } = require("./runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSend");18const { runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSendAndSave } = require("./runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSendAndSave");19const { runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSendAndSaveInFile } = require("./runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSendAndSaveInFile");20const { runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSendAndSaveInFileAndSend } = require("./runTestsInParallelWithCommandAndSaveInFileAndSendAndSaveInFileAndSendAndSaveInFileAndSend");
Using AI Code Generation
1const fc = require('fast-check');2const { command } = require('fast-check-monorepo');3const { run } = command;4const { runCommand } = run;5const { runCommandWithArgs } = runCommand;6const { runCommandWithArgsAndOptions } = runCommandWithArgs;7const { runCommandWithArgsAndOptionsAndEnv } = runCommandWithArgsAndOptions;8const { runCommandWithArgsAndOptionsAndEnvAndTimeout } = runCommandWithArgsAndOptionsAndEnv;9const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdin } = runCommandWithArgsAndOptionsAndEnvAndTimeout;10const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdout } = runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdin;11const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderr } = runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdout;12const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncoding } = runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderr;13const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncodingAndStderrEncoding } = runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncoding;14const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncodingAndStderrEncodingAndMaxBuffer } = runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncodingAndStderrEncoding;15const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncodingAndStderrEncodingAndMaxBufferAndKillSignal } = runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncodingAndStderrEncodingAndMaxBuffer;16const { runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStdoutEncodingAndStderrEncodingAndMaxBufferAndKillSignalAndUid } = runCommandWithArgsAndOptionsAndEnvAndTimeoutAndStdinAndStdoutAndStderrAndStd
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!!