How to use its method in fast-check-monorepo

Best JavaScript code snippet using fast-check-monorepo

fp_test.js

Source:fp_test.js Github

copy

Full Screen

...24const meq = fn.bound(assert, 'equal').alsoVargs(fn.bound(process.stdout, 'write').curry1('eq! '));25const mok = fn.bound(assert, 'ok');26const allok = function(...xs){ xs.each(nomagic); };27let it;28function its(x) { it = x;29 apis += 1;30 process.stdout.write(colored(37, (x)? x.name : ':(') + '... '); }31function summary() {32 console.log("Done. "+colored(37, apis)+" APIs tested, "+colored(32, passes)+" passed / "33 +colored(31, fails)+" failed in "+(Date.now()-started)/1000+" secs.");34}35testing('Is/Kindof');36its (kindof.undID);37meq(typeof wtf, kindof.undID);38testing('bool/num/int/str/sym/obj/fun');39its (kindof.boolean);40mok(!it(0.0), !('true'));41allok(it(false), it(true));42its (kindof.number);...

Full Screen

Full Screen

ITS_screen.js

Source:ITS_screen.js Github

copy

Full Screen

1/*2ITS - main JavaScript function file for JS only functions34Author(s): Greg Krudysz5Date: Mar-17-20106*/78//obj.childNodes[1].style.display = 'block';9//-------------------------------------------------//10function ITS_obj_timer() {11//-------------------------------------------------//1213var date1 = new Date();14var ms1 = date1.getTime();1516sessionStorage.setItem('TIME0',ms1);17alert(ms1);18}19//-------------------------------------------------//20function ITS_menu(obj){21//-------------------------------------------------//22 var str = '<img src="phpimg/ITS_stem.php?t=s&d=1,1,2,1&title=y[n]" class="ITS_pzplot" onClick="ITS_plot_reset(this.parentNode)">';23 24 creatediv(5,str,200,200,100,100);25 creatediv(5,str,200,200,300,100);26 creatediv(5,str,200,200,100,500);27 creatediv(5,str,200,200,300,500);28}29//-------------------------------------------------//30function creatediv(id, html, width, height, left, top) { 31//-------------------------------------------------//32//alert('creatediv');33 var newdiv = document.createElement('div'); 34 newdiv.setAttribute('id', id);3536 //if (width) { newdiv.style.width = 200;}37 //if (height){ newdiv.style.height = 200;}38 39 if ((left || top) || (left && top)) {40 newdiv.style.className = "ITS_popImage";41 newdiv.style.position = "absolute";42 newdiv.style.left = left; 43 newdiv.style.top = 0;44 newdiv.style.margin = "50px 0 0 100px";45 //alert(newdiv.style.top);46 //if (left) { newdiv.style.left = left; } 47 //if (top) { newdiv.style.top = top; }48 }4950 newdiv.style.background = "#fff";51 newdiv.style.border = "2px solid #666";52 53 if (html) { newdiv.innerHTML = html; }54 else { newdiv.innerHTML = "nothing"; }55 56 document.body.appendChild(newdiv);5758 return false;59}60//-------------------------------------------------//61function ITS_plot(obj){62//-------------------------------------------------//63 var str = '<img src="phpimg/ITS_stem.php?t=s&d=1,1,2,1&title=y[n]" class="ITS_pzplot" onClick="ITS_plot_reset(this.parentNode)">';64 obj.innerHTML = str;65 66 //var helloWorld = new ajaxObject('helloContainer','showtext.php');67 return false;68}69//-------------------------------------------------//70function ITS_showImage(obj){71//-------------------------------------------------//72 var im = '<img src="'+obj.src+'" style="float:left;height:120px;cursor: pointer;" onclick="ITS_killImage(this);">';7374 var b=creatediv('ITS_viewImage',im,200,200,200,200);75 return false;76}77//-------------------------------------------------//78function ITS_killImage(obj){79//-------------------------------------------------//80 obj.parentNode.removeChild(obj);81 return false;82}83//-------------------------------------------------//84function ITS_plot_reset(obj){85//-------------------------------------------------//86 obj.innerHTML = '<div class="ITS_plot" onClick="ITS_plot(this)">plot</div>';87 return false;88}89//-------------------------------------------------//90function ITS_changeConcepts(non_obj){91//-------------------------------------------------//92// update lab header93// selected object94sel_obj = document.getElementById(non_obj.name);9596var selectedClass = sel_obj.className;97var noneClass = non_obj.className;9899sel_obj.id = '';100sel_obj.className = noneClass;101sel_obj.name = non_obj.name;102103non_obj.id = non_obj.name;104non_obj.className = selectedClass;105non_obj.name = '';106107// update events108sel_obj.onclick = non_obj.onclick;109non_obj.onclick = '';110111ITS_AJAX('ajax/ITS_screen.php','updateConcept',non_obj.innerHTML,ITS_screen,'contentContainer');112}113//-------------------------------------------------//114function ITS_content_select(non_obj){115//-------------------------------------------------//116/** -- timer -- **//*117var date1 = new Date();118var milliseconds1 = date1.getTime();119/** -- timer -- **/120var non_obj_name = non_obj.attributes.getNamedItem("name").value;121var arr = new Array();122arr = document.getElementsByName(non_obj_name);123124for(var i = 0; i < arr.length; i++) {125 var obj = document.getElementsByName(non_obj_name).item(i);126 obj.className = '';127 obj.onclick = new Function('ITS_content_select(this)');128}129non_obj.className = 'active';130non_obj.onclick = '';131132var class_info = non_obj_name.split("_");133var class_fcn = class_info[0];134var class_prop = class_info[1];135136ITS_AJAX('ajax/ITS_screen.php',class_fcn,class_prop+','+non_obj.innerHTML,ITS_screen,'contentContainer'); 137138return false;139}140//-------------------------------------------------//141function ITS_content_select2(non_obj){142//-------------------------------------------------//143var non_obj_name = non_obj.attributes.getNamedItem("name").value;144var arr = new Array();145arr = document.getElementsByName(non_obj_name);146147//alert(non_obj_name);148149for(var i = 0; i < arr.length; i++) {150 var obj = document.getElementsByName(non_obj_name).item(i);151 obj.className = 'CHOICE_ACTIVE';152 obj.onclick = new Function('ITS_content_select2(this)');153}154non_obj.className = 'CHOICE_SELECTED';155non_obj.onclick = '';156157//*****************************************//158//alert(non_obj.qid+' '+non_obj.n);159160var class_info = non_obj_name.split("_");161var class_fcn = class_info[0];162var class_prop = class_info[1];163164var qid = non_obj.attributes.getNamedItem("qid").value;165var qn = non_obj.attributes.getNamedItem("n").value;166167var ans = String.fromCharCode(64+parseInt(qn)); 168//alert(ans);169// remove session item IF NOT NULL170if (sessionStorage.getItem('ITS_LAB_'+qid)) {171 var itemx = sessionStorage.removeItem('ITS_LAB_'+qid); 172}173// save session item174sessionStorage.setItem('ITS_LAB_'+qid,ans);175//alert('ANSWER: '+'ITS_LAB_'+qid,ans);176177/*178//--- enable tagContainer ---//179var tag_obj = document.getElementById('tagContainer');180tag_obj.style.display = 'block';181182//--- enable ratingContainer ---//183var tag_obj = document.getElementById('ratingContainer');184tag_obj.style.display = 'block';185//---------------------------//186*/187//alert("Question "+qid+" is: " + sessionStorage.getItem('ITS_LAB_'+qid)); // accessing it188//alert("Hello " + sessionStorage.fullname); // another way of accessing the variable189//sessionStorage.removeItem('fullname'); // finally unset it 190191192//alert(data.attributes.getNamedItem("runat").value)193/** -- timer -- **//*194var date2 = new Date();195var milliseconds2 = date2.getTime();196197var difference = milliseconds2 - milliseconds1;198alert(difference);199/** -- timer -- **/200//alert(class_fcn+' - '+class_prop);201//ITS_AJAX('ajax/ITS_screen.php',class_fcn,class_prop+','+non_obj.innerHTML,ITS_screen,'contentContainer'); 202203return false;204}205//-------------------------------------------------//206function ITS_content_nav(obj,nav){207//-------------------------------------------------//208alert('gotcha');209var obj_name = obj.attributes.getNamedItem("name").value;210var class_info = obj_name.split("_");211var class_fcn = class_info[0];212var class_prop = class_info[1];213ITS_AJAX('ajax/ITS_screen.php',class_fcn,class_prop+','+nav,ITS_screen,'contentContainer');214}215//-------------------------------------------------//216function ITS_Q(screen){217//-------------------------------------------------//218 //alert('Under construction ...');219220 ITS_AJAX('ajax/ITS_screen.php','updateHeader',screen,ITS_screen,'headerContainer');221 str = "ITS_AJAX('ajax/ITS_screen.php','getContent',"+screen+",ITS_screen,'contentContainer');"222 setTimeout(str,250); 223 224 return false;225}226//-------------------------------------------------//227function ITS_MSG(flag){228//-------------------------------------------------//229var mC_display;230var mI_display;231232if (flag) {mC_display = 'block';233 mI_display = 'none' }234else {mC_display = 'none';235 mI_display = 'block'}236237var ta_obj = document.getElementById('messageContainer');238ta_obj.style.display = mC_display;239240var mi_obj = document.getElementById('messageIcon');241mi_obj.style.display = mI_display;242}243//-------------------------------------------------//244function NAV_MOUSE(obj,button){245//-------------------------------------------------//246 obj.src = 'phpimg/ITS_button.php?o='+button;247}248//-------------------------------------------------//249function ITS_match_box(obj){250//-------------------------------------------------//251//$("#check_1_2").attr("checked", true).button("refresh");252//$("#check_1_2").css('ui-state-active');253 var L = 7;254 var check_info = $(obj).attr("id").split("_");255 256 for(var c = 1; c <= L; c++) {257 if ( c!=check_info[2] ) { 258 //alert('#check_'+check_info[1]+'_'+c);259 $('#check_'+check_info[1]+'_'+c).attr("checked",false).button("refresh"); //$(obj).is(':checked')260 }261 }262 for(var r = 1; r <= L; r++) {263 if ( r!=check_info[1]) { 264 $('#check_'+r+'_'+check_info[2]).attr("checked",false).button("refresh"); 265 }266 }267}268//-------------------------------------------------//269function ITS_question_submit(obj,qid,qtype){270//-------------------------------------------------//271272/* --- DEBUG ---273for (i=0; i<sessionStorage.length; i++) {274 alert(sessionStorage.getItem(i));275} --- DEBUG --- */276277//alert('ITS_question_submit');278/*279var ms1 = sessionStorage.getItem('TIME0');280var date2 = new Date();281var ms2 = date2.getTime();282var difference = ms2 - ms1;283sessionStorage.removeItem('TIME0');284alert('diff: '+difference);285*/286//alert(qid+' - '+qtype);287288var chosen = '';289switch (qtype.toUpperCase()) {290 //----------//291 case 'P':292 //----------//293 var x=document.getElementsByName('ITS_'+qid);294 chosen = x[0].value;295 break;296 //----------//297 case 'M':298 //----------//299 300 var L = $("li[name=matchingLeft]").length; // no. left choices301 var M = $("INPUT[@name='check'][type='checkbox']").length; // no. matrix elements302 var values = new Array();303304 for(var r = 0; r < M/L; r++) {305 for(var c = 1; c <= L; c++) {306 if ($('#check_'+(r+1)+'_'+c).attr("checked")) { 307 values[r] = c; 308 }309 }310 if (values[r] == null) { values[r] = ''; };311 }312 chosen = values.join();313 //alert(chosen);314 //values = 315 //$("form#" + id + " INPUT[@name=" + name + "][type='checkbox']").attr('checked',true).button("refresh"); 316 //alert(values.length);317 /*318 var x=document.getElementsByName('radio');319 for (i=0; i<x.length; i++) {320 alert(x[i].checked+' '+x[i].id);321 //values[i] = x[i].value;322 //if (x[i].value) { chosen[i] = x[i].value; } 323 }324 */325 /*326 var values = new Array();327 var x=document.getElementsByName('ITS_'+qid); 328 for (i=0; i<x.length; i++) {329 //alert(x[i].value);330 values[i] = x[i].value;331 //if (x[i].value) { chosen[i] = x[i].value; } 332 }333 chosen = values.join();*/334 break;335 //----------//336 case 'MC':337 //----------// 338 /*339 var x=document.getElementsByName('ITS_'+qid); 340 for (i=0; i<x.length; i++) {341 if (x[i].checked) { chosen = x[i].value; }342 }*/343 chosen = sessionStorage.getItem('ITS_LAB_'+qid);344 var rmItem = sessionStorage.removeItem('ITS_LAB_'+qid);345346 //alert('SUBMIT: '+'ITS_LAB_'+qid);347 break;348 //----------//349} 350//alert(chosen);351/*352if (chosen){353354// Hide error message355//var err_msg=document.getElementById('errorContainerContent');356//alert(err_msg.visibility);357358 for (i=0; i<x.length; i++) {359 var y=document.getElementById('TextAlphabet'+x[i].value);360 if (x[i].checked) { // chosen361 chosen = x[i].value;362 x[i].style.color = "red";363 //y.style.color = "blue";364 }else{365 y.style.color = "silver";366 }367 }368 */369 /*370 //alert(qid+'~'+qtype+'~'+chosen);371 //--------------------------//372 ITS_AJAX('ajax/ITS_screen.php','recordChapterAnswer',qid+'~'+qtype+'~'+chosen,ITS_screen,'contentContainer'); //'contentContainer');373 //ITS_AJAX('ajax/ITS_screen.php','updateScores','~',ITS_screen,'scoreContainerContent');374 375 //--- update Scores using AJAX ---//376 var updateScores = new ajaxObject('scoreContainerContent','ITS_screen_AJAX2.php');377 updateScores.update('doc=updateScores.txt&ajax_args=updateScores&ajax_data=');378 379 //alert('ajax_data='+qid+','+qtype+','+chosen);380 381 //--- show Answer using AJAX ---//382 //var showAnswer = new ajaxObject('navBoxContainer','ITS_screen_AJAX2.php');383 //showAnswer.update('doc=updateScores.txt&ajax_args=showAnswer&ajax_data='+qid+','+qtype+','+chosen); 384 //-------------------------// 385} else {386 ITS_AJAX('ajax/ITS_screen.php','message','<div id="errorContainerContent">Select an answer.</div>',ITS_screen,'errorContainer');387}*/388}389//-------------------------------------------------//390function JQTsubmit(obj) {391//-------------------------------------------------//392//alert(obj.id);393ITS_AJAX('JQT_AJAX.php','test','',ITS_screen,'demoContainer');394$("input.check").button("refresh");395}396//-------------------------------------------------//397function ITS_question_next(){398//-------------------------------------------------//399 alert('ITS_question_next');400 ITS_AJAX('ajax/ITS_screen.php','getContent','',ITS_screen,'contentContainer');401}402//-------------------------------------------------//403function ITS_review_next(delta){404//-------------------------------------------------//405//alert(ITS_review_next);406 ITS_AJAX('ajax/ITS_screen.php','reviewMode',delta,ITS_screen,'reviewContainer');407}408//-------------------------------------------------//409function ITS_submit(obj,qid){410//-------------------------------------------------//411alert('ITS_submit');412var x=document.getElementsByName('ITS_'+qid) 413var chosen = '';414415for (i=0; i<x.length; i++) {416 if (x[i].checked) { chosen = x[i].value; }417} 418419if (chosen){420 for (i=0; i<x.length; i++) {421 var y=document.getElementById('TextAlphabet'+x[i].value);422 if (x[i].checked) { // chosen423 chosen = x[i].value;424 x[i].style.color = "red";425 //y.style.color = "blue";426 }else{427 y.style.color = "silver";428 }429 }430 ITS_AJAX('ajax/ITS_screen.php','getAnswer',qid+','+chosen,ITS_screen,'answerContainer');431 //alert('hello');432} else {433 ITS_AJAX('ajax/ITS_screen.php','message','<span id="errorContainerContent">Select an answer.</span>',ITS_screen,'errorContainer');434}435}436//-------------------------------------------------//437function ITS_screen(obj,txt){438//-------------------------------------------------//439//$(obj).live{$("input.check").button("refresh"); };440//$("input.check").addClass("ui-state-hover");441//$( "input.check" ).button();442/*443alert($("input.check").attr("id"));444 var filename = "jquery-ui-1.8.4.custom/css/ui-lightness/jquery-ui-1.8.4.custom.css";445 var fileref = document.createElement("link");446 fileref.setAttribute("rel", "stylesheet");447 fileref.setAttribute("type", "text/css");448 fileref.setAttribute("href", filename);449450 document.getElementsByTagName("head")[0].appendChild(fileref);451 */452 /*453$("#"+obj).css('border','1px solid blue');454455$(function() {456 $("#selectable").selectable();457 $("#sortable1").sortable({ connectWith: '.connectedSortable'}).disableSelection();458 $( "input.check" ).button();459});460*/461 var ta_obj = document.getElementById(obj);462 ta_obj.innerHTML = txt;463 ITS_screen_close();464 465//if (!document.getElementById) document.write('<link rel="stylesheet" type="jquery-ui-1.8.4.custom/css/ui-lightness/jquery-ui-1.8.4.custom.css">');466 467 /*468 switch (obj) {469 //----------//470 case 'headerContainer':471 //----------//472 ITS_AJAX('ITS_screen.php','showExercises',1,ITS_screen,'contentContainer');473 }474 */475 /*476 var footer_div = document.createElement('div');477 footer_div.setAttribute('id','ITS_footer'+obj.innerHTML); 478 479 //var oInput = document.createElement('textarea');480 //oInput.innerHTML = "HELLO";481 //footer_div.appendChild(oInput);482 483 footer_div.style.position = "absolute";484 footer_div.style.width = 0.6*dim.width;485 footer_div.style.height = "auto"; 486 footer_div.style.left = 0.15*dim.width; //obj.offsetLeft;487 footer_div.style.background = "#FEFEFE";488 footer_div.style.border = "3px solid #FFCC00";489 footer_div.style.display = "block";490 footer_div.style.padding = "10px";491 footer_div.innerHTML = "<sup>"+obj.innerHTML+"</sup> "+str;492 document.body.appendChild(footer_div); 493 footer_div.style.top = obj.offsetTop-footer_div.offsetHeight;494 } else {495 496 var footer_div = document.getElementById('ITS_footer'+obj.innerHTML);497 498 if (footer_div) {499 //alert('true');500 document.body.removeChild(footer_div);501 //footer.style.display = 'none'; footer_div.style.text-align = "center";502 }//else{alert('false');}503 */504} ...

Full Screen

Full Screen

analyze.js

Source:analyze.js Github

copy

Full Screen

1var analyse_card_list = function(chs, its, skill = 'deck-power'){2 var mydict = skills[skill];3 if (['deck-power', 'all-skill'].indexOf(skill) >= 0){4 mydict = mydata;5 }6 var total_scores = {};7 var scores_arr = {};8 chs.forEach(function(ch){total_scores[ch]=0.0; scores_arr[ch] = [];});9 its.forEach(function(it){total_scores[it]=0.0; scores_arr[it] = [];});10 chs.forEach(11 function(ch){12 if (scores_arr[ch].length > 0) return;13 its.forEach(14 function(it){15 var cm_factor = 1.0;16 var cm = 0.0;17 if (combos[(ch + '+' + it)] in cmdata){18 cm = cmdata[combos[ch + '+' + it]];19 cm_factor += cm/10;20 }21 if ((ch + '+' + it) in mydict){22 scores_arr[ch].push(mydict[ch + '+' + it] * cm_factor);23 }24 }25 );26 }27 );28 29 its.forEach(30 function(it){31 if (scores_arr[it].length > 0) return;32 chs.forEach(33 function(ch){34 var cm_factor = 1.0;35 var cm = 0.0;36 if (combos[(ch + '+' + it)] in cmdata){37 cm = cmdata[combos[ch + '+' + it]];38 cm_factor += cm/10;39 }40 if ((ch + '+' + it) in mydict){41 scores_arr[it].push(mydict[ch + '+' + it] * cm_factor);42 }43 }44 );45 }46 );47 var sharpness =parseFloat(document.getElementById("sharpness").value);48 var sh_a = 0.1;49 var sh_b = 10;50 if (sharpness < sh_a){ sharpness = sh_a;}51 else if (sharpness > sh_b) {sharpness = sh_b;}52 else if ((sharpness >= sh_a - 0.01) && (sharpness <=sh_b + 0.01)) { sharpness = sharpness;}53 else {sharpness = 1.0;}54 //console.log("Sharpness = " + sharpness.toString());55 var factor_foo = (i)=>{56 var x = Math.exp(sharpness * Math.log(i)); return x;57 };58 its.forEach(function(it){59 if (total_scores[it] > 0.1) return;60 scores_arr[it].sort();61 for (var i = 1; i <= scores_arr[it].length; i++){62 var sc = scores_arr[it][scores_arr[it].length - i];63 if (sc < 2) sc = 0.0;64 else if (sc < 2.5) sc = sc*0.5;65 else if (sc < 3) sc = sc * 0.8;66 total_scores[it] += sc/factor_foo(i);67 }68 }69 );70 chs.forEach(function(ch){71 if (total_scores[ch] > 0.1) return;72 scores_arr[ch].sort();73 for (var i = 1; i <= scores_arr[ch].length; i++){74 var sc = scores_arr[ch][scores_arr[ch].length - i];75 if (sc < 2) sc = 0.0;76 else if (sc < 2.5) sc = sc*0.5;77 else if (sc < 3) sc = sc * 0.8;78 total_scores[ch] +=sc/factor_foo(i);79 }80 }81 );82 chs.sort(function(c1, c2){return total_scores[c2]-total_scores[c1]});83 its.sort(function(c1, c2){return total_scores[c2]-total_scores[c1]});84 var eva = 0.0;85 var eva_c = 0.0;86 var eva_i = 0.0;87 var fct = 1.0;88 chs.forEach(function(ch){eva_c += total_scores[ch]*fct;});89 fct = 1.0;90 its.forEach(function(it){eva_i += total_scores[it]*fct;});91 eva = Math.max(eva_c, eva_i)*10;// + Math.max(eva_c, eva_i);92 return [mydict, chs, its, total_scores, eva, eva_c*10, eva_i*10];93};94var find_worst = function(chs, its, skill = 'deck-power', item_only = false){95 var ares = analyse_card_list(chs, its, skill);96 var mydict = ares[0];97 chs = ares[1];98 its = ares[2];99 var total_scores = ares[3];100 if (chs.length <= 12){101 if (its.length > 12) { return its[its.length-1]; }102 else {return 'none';}103 }104 else if (its.length <= 12) {105 if (chs.length > 12) { return chs[chs.length-1]; }106 else {return 'none';}107 }108 else if (item_only){109 return its[its.length - 1];110 }111 else{112 it1 = its[its.length - 1];113 it2 = its[its.length - 2];114 ch1 = chs[chs.length - 1];115 ch2 = chs[chs.length - 2];116 it0 = its[0];117 ch0 = chs[0];118 if ((total_scores[it2]+total_scores[it0])/total_scores[it1]> (total_scores[ch2]+total_scores[ch0])/total_scores[ch1]){119 return it1;120 }121 else{122 return ch1;123 }124 }125};126var remove_worst = function(chs, its, skill = 'deck-power', item_only = false){127 var cd = find_worst(chs, its, skill, item_only);128 if (cd == 'none') return;129 if (item_only){130 remove_subset(its, [cd]);131 }132 else{133 remove_subset(its, [cd]);134 remove_subset(chs, [cd]);135 }136};137var filter_cards = function(clist = get_clist() ) {138 var chs = [];139 var its = [];140 clist.forEach(141 function(cd){142 if (is_char(cd)) {chs.push(cd);}143 else {its.push(cd);}144 }145 );146 return [chs, its];147};148var gen_sel = function*(set, num, start = 0){149 if (num == 0){ yield []; }150 else if (start + num == set.length) {151 var nss = [];152 for (var i = start; i < set.length; i++) nss.push(set[i]);153 yield nss;154 }155 else if (start + num > set.length) {}156 else if (num == 1){157 for (var i = start; i < set.length; i++) yield [set[i]];158 }159 else{160 for (var subset of gen_sel(set, num - 1, start + 1)){161 var nss = [];162 for (var x of subset) nss.push(x);163 nss.push(set[start]);164 yield(nss);165 }166 yield* gen_sel(set, num, start + 1);167 }168};169var gen_sel_opt = function*(set, num){170 if (num * 2 < set.length){171 yield*gen_sel(set, num);172 }173 else{174 yield*gen_sel(set, num);175 }176}177var remove_subset = function(set, _subset){178 var subset = [];179 for (var x of _subset) subset.push(x); 180 while (subset.length){181 var x = subset[subset.length - 1];182 var i = 0;183 var flag = 0;184 while (i < set.length){185 if (set[i] == x){186 set[i] = set[set.length - 1];187 set.pop();188 subset.pop();189 flag = 1;190 break;191 }192 i ++;193 }194 if (!flag){195 return;196 }197 }198}199var deep_optimize = function(_chs, _its, has_fixed_slots){200 var max_sc = 0.0;201 var mchs, mits;202 var chs = [];203 //var ress = [];204 for (var x of _chs) chs.push(x); 205 var scores = [];206 var char_num = 12;207 if (has_fixed_slots){208 char_num -= fixed_slots.length;209 }210 var cts = 0;211 console.log(['Choose', chs.length, char_num]);212 for (var _subset of gen_sel(chs, char_num)){213 cts += 1;214 var nchs = [];215 for (var x of _subset) nchs.push(x); 216 var its = [];217 for (var x of _its) its.push(x);218 if (has_fixed_slots){219 for (var x of fixed_slots) {220 nchs.push(x);221 }222 }223 while (its.length > 12){224 remove_worst(nchs, its, 'deck-power', true);225 }226 var nsc = analyse_card_list(nchs, its)[4];227 scores.push(nsc);228 if (nsc > max_sc){229 max_sc = nsc;230 //ress.push([max_sc, nchs, its])231 mchs = [];232 mits = [];233 for (var x of nchs) mchs.push(x);234 for (var x of its) mits.push(x);235 }236 }237 console.log(['cts', cts]);238 scores.sort();239 if (max_sc > 0.1){240 var h = make_table(mchs, mits, 'deck-power');241 document.getElementById('table').innerHTML = h; 242 //document.getElementById('card-list-input').value = mchs.join('\n') + '\n' +mits.join('\n');243 best_combo(mchs.concat(mits));244 }245};246var fixed_slots;247var optimize_deck = function(has_fixed_slots = false){248 var worst_card = '';249 while (worst_card != 'none'){250 var fres = filter_cards();251 var chs = fres[0];252 var its = fres[1];253 worst_card = find_worst(chs, its, 'deck-power');254 if (worst_card == 'none'){ break; }255 if (has_fixed_slots){256 remove_subset(chs, fixed_slots);257 }258 else{259 fixed_slots = [];260 }261 if (chs.length + fixed_slots.length <= 14){262 deep_optimize(chs, its, has_fixed_slots);263 return;264 }265 delete_card(worst_card);266 }267 go();...

Full Screen

Full Screen

Gruntfile.js

Source:Gruntfile.js Github

copy

Full Screen

1module.exports = function(grunt) {2 // Project configuration.3 grunt.initConfig({4 pkg: grunt.file.readJSON('package.json'),5 concat: {6 options: {7 // define a string to put between each file in the concatenated output8 separator: ';',9 stripBanners: true10 },11 app: {12 src: ['res/js/dogfeed.js',13 'res/js/feeds/feeds.js',14 'res/js/directives/misc.js',15 'vendor/moment.min.js',16 'vendor/helpers/ngRemoteStorage.js',17 'vendor/helpers/ngCommandQueue.js',18 'vendor/helpers/ngMessages.js',19 'vendor/helpers/ngSockethubClient.js',20 'vendor/helpers/ngSockethubRemoteStorage.js'],21 dest: 'build/app.js.tmp'22 },23 modules: {24 src: ['vendor/remotestorage/*-*.js'],25 dest: 'build/remotestorage-modules.js.tmp'26 },27 sockethub: {28 src: ['vendor/sockethub-client/sockethub-client.js'],29 dest: 'build/sockethub-client.js.tmp'30 },31 css: {32 src: ['res/**/*.css'],33 dest: 'build/app.css.tmp'34 }35 },36 copy: {37 main: {38 files: [39 {expand: true, src: ['*.html'], dest: 'build/'}, // includes files in path and its subdirs40 {expand: true, src: ['*.ico'], dest: 'build/'}, // includes files in path and its subdirs41 {expand: true, src: ['*.png'], dest: 'build/'}, // includes files in path and its subdirs42 {expand: true, src: ['*.jpg'], dest: 'build/'}, // includes files in path and its subdirs43 {expand: true, src: ['res/img/*'], dest: 'build/', filter: 'isFile'}, // includes files in path and its subdirs44 {expand: true, src: ['res/js/feeds/*.html.tpl'], dest: 'build/', filter: 'isFile'}, // includes files in path and its subdirs45 {expand: true, src: ['res/views/*.html'], dest: 'build/', filter: 'isFile'}, // includes files in path and its subdirs46 {expand: false, src: ['vendor/bootstrap/fonts/glyphicons-halflings-regular.eot'], dest: 'build/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot', filter: 'isFile'}, // includes files in path and its subdirs47 {expand: false, src: ['vendor/bootstrap/fonts/glyphicons-halflings-regular.svg'], dest: 'build/vendor/bootstrap/fonts/glyphicons-halflings-regular.svg', filter: 'isFile'}, // includes files in path and its subdirs48 {expand: false, src: ['vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf'], dest: 'build/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf', filter: 'isFile'}, // includes files in path and its subdirs49 {expand: false, src: ['vendor/bootstrap/fonts/glyphicons-halflings-regular.woff'], dest: 'build/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff', filter: 'isFile'}, // includes files in path and its subdirs50 {expand: false, src: ['vendor/jquery.min.js'], dest: 'build/vendor/jquery.min.js', filter: 'isFile'}, // includes files in path and its subdirs51 {expand: false, src: ['vendor/angular.min.js'], dest: 'build/vendor/angular.min.js', filter: 'isFile'}, // includes files in path and its subdirs52 {expand: false, src: ['vendor/angular-route.min.js'], dest: 'build/vendor/angular-route.min.js', filter: 'isFile'}, // includes files in path and its subdirs53 {expand: false, src: ['vendor/angular-sanitize.min.js'], dest: 'build/vendor/angular-sanitize.min.js', filter: 'isFile'}, // includes files in path and its subdirs54 {expand: false, src: ['vendor/angular-touch.min.js'], dest: 'build/vendor/angular-touch.min.js', filter: 'isFile'}, // includes files in path and its subdirs55 {expand: false, src: ['vendor/snap.min.js'], dest: 'build/vendor/snap.min.js', filter: 'isFile'}, // includes files in path and its subdirs56 {expand: false, src: ['vendor/matchMedia.js'], dest: 'build/vendor/matchMedia.js', filter: 'isFile'}, // includes files in path and its subdirs57 {expand: false, src: ['vendor/remotestorage/remotestorage.min.js'], dest: 'build/vendor/remotestorage.min.js', filter: 'isFile'}, // includes files in path and its subdirs58 {expand: false, src: ['vendor/bootstrap/js/bootstrap.min.js'], dest: 'build/vendor/bootstrap/js/bootstrap.min.js', filter: 'isFile'}, // includes files in path and its subdirs59 {expand: false, src: ['vendor/bootstrap/js/bootstrap-switch.min.js'], dest: 'build/vendor/bootstrap/js/bootstrap-switch.min.js', filter: 'isFile'}, // includes files in path and its subdirs60 {expand: false, src: ['vendor/bootstrap/css/bootstrap.min.css'], dest: 'build/vendor/bootstrap/css/bootstrap.min.css', filter: 'isFile'}, // includes files in path and its subdirs61 {expand: false, src: ['<%= concat.app.dest %>'], dest: 'build/res/js/app.min.js', filter: 'isFile'}, // includes files in path and its subdirs62 {expand: false, src: ['<%= concat.sockethub.dest %>'], dest: 'build/vendor/sockethub-client.min.js', filter: 'isFile'}, // includes files in path and its subdirs63 {expand: false, src: ['<%= concat.modules.dest %>'], dest: 'build/vendor/remotestorage-modules.min.js', filter: 'isFile'} // includes files in path and its subdirs64 ]65 }66 },67 // uglify: {68 // options: {69 // compress: true,70 // banner: '/*! built for <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'71 // },72 // dist: {73 // files: {74 // //'build/res/js/app.min.js': ['<%= concat.app.dest %>'],75 // //'build/vendor/sockethub-client.min.js': ['<%= concat.sockethub.dest %>'],76 // //'build/vendor/remotestorage-modules.min.js': ['<%= concat.modules.dest %>']77 // }78 // }79 // },80 cssmin: {81 minify: {82 expand: true,83 cwd: 'build/',84 src: ['*.css.tmp', '!*.min.css'],85 dest: 'build/res/css/',86 ext: '.min.css'87 }88 },89 useminPrepare: {90 html: ['build/index.html', 'build/rscallback.html']91 },92 usemin: {93 html: ['build/index.html', 'build/rscallback.html']94 },95 clean: ['build/*.tmp']96 });97 // Load the plugin that provides the "uglify" task.98 grunt.loadNpmTasks('grunt-contrib-uglify');99 grunt.loadNpmTasks('grunt-contrib-cssmin');100 grunt.loadNpmTasks('grunt-contrib-concat');101 grunt.loadNpmTasks('grunt-contrib-copy');102 grunt.loadNpmTasks('grunt-contrib-clean');103 grunt.loadNpmTasks('grunt-usemin');104 //grunt.file.write('build/VERSION', grunt.pkg.version);105 // Default task(s).106 grunt.registerTask('default', ['concat', 'copy', 'cssmin', 'usemin', 'clean']);...

Full Screen

Full Screen

ITS_QControl.js

Source:ITS_QControl.js Github

copy

Full Screen

1/*2ITS_QControl - main JavaScript function file for JS only functions34Author(s): Greg Krudysz5Date: Mar-14-20116//-------------------------------------------------*/7function ITS_QCONTROL(CONTROL, TARGET) {8 //-------------------------------------------------//9 //--- Update Question Controls ---//1011 // get question number INPUT TEXT object12 var QCTR_TEXT = document.getElementById('ITS_QCONTROL_TEXT');13 var DATA = '';1415 switch (CONTROL) {16 /*------------------------------------------------------------------*/17 case 'PREV':18 /*------------------------------------------------------------------*/19 if (QCTR_TEXT.value == 1) {20 QCTR_TEXT.value = 1;21 } else {22 QCTR_TEXT.value--;23 }24 break;25 /*------------------------------------------------------------------*/26 case 'NEXT':27 /*------------------------------------------------------------------*/28 QCTR_TEXT.value++;29 break;30 /*------------------------------------------------------------------*/31 case 'CANCEL':32 /*------------------------------------------------------------------*/33 var obj_ctrl = document.getElementById(TARGET);34 obj_ctrl.innerHTML = '<a href="#" class="ITS_edit" name="ITS_EDIT_QCONTROL" onclick=ITS_QCONTROL_EDIT("' + TARGET + '")>Edit</a>';35 break;36 /*------------------------------------------------------------------*/37 case 'SAVE':38 /*------------------------------------------------------------------*/39 alert('SAVE');40 var obj_ctrl = document.getElementById(TARGET);41 obj_ctrl.innerHTML = '<a href="#" class="ITS_edit" name="ITS_EDIT_QCONTROL" onclick=ITS_QCONTROL_EDIT("' + TARGET + '")>Edit</a>';4243 DATA = document.getElementById("TXA_" + TARGET + "_TARGET").value;44 DATA = encodeURIComponent(DATA);45 //alert(DATA);46 break;47 /*------------------------------------------------------------------*/48 }4950 var args = new Array();51 args[0] = QCTR_TEXT.value; // question number52 args[1] = CONTROL; // control53 args[2] = TARGET; // target54 //alert(TARGET);5556 ITS_AJAX("ajax/ITS_control.php", args, DATA, ITS_QCONTROL_UPDATE, TARGET);57}58//-------------------------------------------------//59function ITS_QCONTROL_UPDATE(obj_id, text) {60 //-------------------------------------------------//61 // -- called from ITS_QCONTROL: updates 'object_id' container62 //alert(obj_id);6364 switch (obj_id) {65 case 'ITS_question_container':66 document.getElementById(obj_id).innerHTML = text;67 break;68 default:69 document.getElementById(obj_id + "_TARGET").innerHTML = text;70 break;71 }72 mathJax();73}74//-------------------------------------------------//75function ITS_QCONTROL_EDITMODE(obj) {76 //-------------------------------------------------//77 // -- displays EDIT-MODE: [Edit] links78 /*79var spans = document.getElementsByTagName('span');80 81 if (spans) {82 for (var i = 0; i < spans.length; i++) {83 if (spans[i].className == 'ITS_QCONTROL') {84 //spans[i].innerHTML='<a href="#" class="ITS_EDIT" name="ITS_EDIT_QCONTROL" onclick=ITS_QCONTROL_EDIT("'+spans[i].id+'")>EDIT</a>';85 spans[i].innerHTML='<a href="#" class="ITS_EDIT" name="ITS_EDIT_QCONTROL" onclick=ITS_QCONTROL_EDIT("'+spans[i].id+'")>EDIT</a>';86 }87 }88 }*/89}90//-------------------------------------------------//91function ITS_QCONTROL_EDIT(obj) {92 //-------------------------------------------------//93 // obj: 'ITS_TITLE' | 'ITS_QUESTION'94 //95 alert('EDIT');96 var obj_ctrl = document.getElementById(obj);97 var obj_targ = document.getElementById(obj + "_TARGET");98 /*99 //obj_targ.innerHTML.replace(/</g,'&lt;').replace(/\n/g,'<br>');100 //alert(obj.offsetwidth);101 //alert(escape(obj_targ.value).split('%0A').length);102 //var s=obj_targ.innerHTML.split("\r\n");103 //alert(s.length);104 */105 // NEEDS WORK: dynamically adjust size of TA window106 if (obj == 'ITS_QUESTION') {107 var ht = 120;108 } else {109 var ht = 30;110 }111112 var str = obj_targ.innerHTML();113114 //var pattern = "<img src=\"/cgi-bin/mimetex.exe?(.*?)\">"115 //var pattern = '</?\w+((\s+\w+(\s*=\s*(?:".*?"|\'.*?\'|[^\'">\s]+))?)+\s*|\s*)/?>';116 //var pattern = "<img latex=\"(.*?)\">";117 //var pattern = "/<img[^>]+>/";118 //var pattern = '/<IMG([^>]*)\ssrc=(["].*?)/';119 //var pattern = '/\< *[img][^\>]*[.]*\>/i';120 //"<img * latex=\"(.*?)\" *>"121 //var patt1 = '/<img[^>]*latex="(.*?)"*\>/';122123 var matches = str.match(/<img[^>]*latex="(.*?)"*\>/i);124 //alert(matches);125 if (matches != null) {126 var str = str.replace(matches[0], '<latex>' + matches[1] + '</latex>');127 }128 obj_targ.innerHTML = '<textarea class="ITS_EDIT" id="TXA_' + obj + '_TARGET" style="height:' + ht + 'px">' + str + '</textarea>';129 //obj_ctrl.innerHTML = '<b>[ </b> <a href=`#` onclick=`ITS_QCONTROL("'+NAV_TXT.value+'","'+obj+'_TARGET","CANCEL")`>Cancel</a><b> ]</b>&nbsp;<b>[ </b> <a href=`#` onclick=`ITS_QCONTROL("'+NAV_TXT.value+'","'+obj+'_TARGET","SAVE")`>Save</a><b> ]</b>'130 //obj_ctrl.innerHTML = '<b>[ </b> <a href=`#` onclick=`ITS_QCONTROL("CANCEL")`>Cancel</a><b> ]</b>&nbsp;<b>[ </b> <a href=`#` onclick=`ITS_QCONTROL("SAVE")`>Save</a><b> ]</b>'131 obj_ctrl.innerHTML = '<a href="#" class="ITS_EDIT" onclick=ITS_QCONTROL("SAVE","' + obj + '")>SAVE</a><br>&nbsp;<br><a href="#" class="ITS_EDIT" onclick=ITS_QCONTROL("CANCEL","' + obj + '")>CANCEL</a>';132 $("textarea.ITS_EDIT").resizable({133 handles: "se"134 });135} ...

Full Screen

Full Screen

Grid.js

Source:Grid.js Github

copy

Full Screen

1import cx from 'classnames'2import PropTypes from 'prop-types'3import React from 'react'4import {5 customPropTypes,6 getElementType,7 getUnhandledProps,8 META,9 SUI,10 useKeyOnly,11 useKeyOrValueAndKey,12 useMultipleProp,13 useTextAlignProp,14 useVerticalAlignProp,15 useWidthProp,16} from '../../lib'17import GridColumn from './GridColumn'18import GridRow from './GridRow'19/**20 * A grid is used to harmonize negative space in a layout.21 */22function Grid(props) {23 const {24 celled,25 centered,26 children,27 className,28 columns,29 container,30 divided,31 doubling,32 inverted,33 padded,34 relaxed,35 reversed,36 stackable,37 stretched,38 textAlign,39 verticalAlign,40 } = props41 const classes = cx(42 'ui',43 useKeyOnly(centered, 'centered'),44 useKeyOnly(container, 'container'),45 useKeyOnly(doubling, 'doubling'),46 useKeyOnly(inverted, 'inverted'),47 useKeyOnly(stackable, 'stackable'),48 useKeyOnly(stretched, 'stretched'),49 useKeyOrValueAndKey(celled, 'celled'),50 useKeyOrValueAndKey(divided, 'divided'),51 useKeyOrValueAndKey(padded, 'padded'),52 useKeyOrValueAndKey(relaxed, 'relaxed'),53 useMultipleProp(reversed, 'reversed'),54 useTextAlignProp(textAlign),55 useVerticalAlignProp(verticalAlign),56 useWidthProp(columns, 'column', true),57 'grid',58 className,59 )60 const rest = getUnhandledProps(Grid, props)61 const ElementType = getElementType(Grid, props)62 return <ElementType {...rest} className={classes}>{children}</ElementType>63}64Grid.Column = GridColumn65Grid.Row = GridRow66Grid._meta = {67 name: 'Grid',68 type: META.TYPES.COLLECTION,69}70Grid.propTypes = {71 /** An element type to render as (string or function). */72 as: customPropTypes.as,73 /** A grid can have rows divided into cells. */74 celled: PropTypes.oneOfType([75 PropTypes.bool,76 PropTypes.oneOf(['internally']),77 ]),78 /** A grid can have its columns centered. */79 centered: PropTypes.bool,80 /** Primary content. */81 children: PropTypes.node,82 /** Additional classes. */83 className: PropTypes.string,84 /** Represents column count per row in Grid. */85 columns: PropTypes.oneOf([...SUI.WIDTHS, 'equal']),86 /** A grid can be combined with a container to use the available layout and alignment. */87 container: PropTypes.bool,88 /** A grid can have dividers between its columns. */89 divided: PropTypes.oneOfType([90 PropTypes.bool,91 PropTypes.oneOf(['vertically']),92 ]),93 /** A grid can double its column width on tablet and mobile sizes. */94 doubling: PropTypes.bool,95 /** A grid's colors can be inverted. */96 inverted: PropTypes.bool,97 /** A grid can preserve its vertical and horizontal gutters on first and last columns. */98 padded: PropTypes.oneOfType([99 PropTypes.bool,100 PropTypes.oneOf(['horizontally', 'vertically']),101 ]),102 /** A grid can increase its gutters to allow for more negative space. */103 relaxed: PropTypes.oneOfType([104 PropTypes.bool,105 PropTypes.oneOf(['very']),106 ]),107 /** A grid can specify that its columns should reverse order at different device sizes. */108 reversed: customPropTypes.multipleProp([109 'computer', 'computer vertically', 'mobile', 'mobile vertically', 'tablet', 'tablet vertically',110 ]),111 /** A grid can have its columns stack on-top of each other after reaching mobile breakpoints. */112 stackable: PropTypes.bool,113 /** A grid can stretch its contents to take up the entire grid height. */114 stretched: PropTypes.bool,115 /** A grid can specify its text alignment. */116 textAlign: PropTypes.oneOf(SUI.TEXT_ALIGNMENTS),117 /** A grid can specify its vertical alignment to have all its columns vertically centered. */118 verticalAlign: PropTypes.oneOf(SUI.VERTICAL_ALIGNMENTS),119}...

Full Screen

Full Screen

mutations.js

Source:mutations.js Github

copy

Full Screen

1import CONSTANT from '@/store/constant'2export default {3 [CONSTANT.ADD_POST_IT]: (state, postIt) => {4 state.postIts.push(postIt)5 },6 [CONSTANT.DELETE_ALL_POST_IT]: state => {7 state.postIts = []8 },9 [CONSTANT.SET_ACTIVE_POST_IT]: (state, postItId) => {10 state.activePostItId = postItId11 },12 [CONSTANT.EXPAND_POST_IT]: state => {13 const { postIts, activePostItId } = state14 let postIt = postIts.find(postIt => (postIt.id === activePostItId))15 if (postIt) {16 postIt.collapse = false17 }18 },19 [CONSTANT.COLLAPSE_POST_IT]: state => {20 const { postIts, activePostItId } = state21 let postIt = postIts.find(postIt => (postIt.id === activePostItId))22 if (postIt) {23 postIt.collapse = true24 }25 },26 [CONSTANT.DELETE_POST_IT]: state => {27 const { postIts, activePostItId } = state28 const newPostIts = postIts.filter(postIt => (postIt.id !== activePostItId))29 state.postIts = newPostIts30 }...

Full Screen

Full Screen

date.js

Source:date.js Github

copy

Full Screen

1console.log(' DATE TASK ');2console.log(' ----------------------------- ');345var its = new Date("2020 , 12 , 07")6console.log(its);78var its = new Date()9console.log(its.getMonth());1011var its = new Date()12console.log(its.getSeconds());1314var its = new Date()15console.log(its.getHours());1617var its = new Date()18console.log(its.getDay());1920var its = new Date()21console.log(its.getMinutes());2223var its = new Date();24its.setFullYear(2020);25console.log(its);2627var its = new Date();28its.setDate(16);29console.log(its);3031var its = new Date();32its.setMonth(09);33console.log(its);3435var its = new Date();36its.setHours(04);37console.log(its);3839var its = new Date();40its.setSeconds(52);41console.log(its); ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const fc = require('fast-check');2fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));3fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));4console.log("test3.js is executed");5fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));6fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));7console.log("test3.js is executed");8fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));9fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));10console.log("test3.js is executed");11fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));12fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));13console.log("test3.js is executed");14fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));15fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));16console.log("test3.js is executed");17fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));18fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));19console.log("test3.js is executed");20fc.assert(fc

Full Screen

Using AI Code Generation

copy

Full Screen

1const { fc } = require('fast-check');2console.log(fc);3const { fc } = require('fast-check');4console.log(fc);5const { fc } = require('fast-check');6console.log(fc);7const { fc } = require('fast-check');8console.log(fc);9const { fc } = require('fast-check');10console.log(fc);

Full Screen

Using AI Code Generation

copy

Full Screen

1const fc = require("../../fast-check/lib/fast-check");2fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));3const fc = require("../../fast-check/lib/fast-check");4fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));5const fc = require("../../fast-check/lib/fast-check");6fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));7const fc = require("../../fast-check/lib/fast-check");8fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));9const fc = require("../../fast-check/lib/fast-check");10fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));11const fc = require("../../fast-check/lib/fast-check");12fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));13const fc = require("../../fast-check/lib/fast-check");14fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));15const fc = require("../../fast-check/lib/fast-check");16fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => a + b >= a));

Full Screen

Using AI Code Generation

copy

Full Screen

1const { check } = require('fast-check');2const { generateFoo } = require('fast-check-monorepo');3check(generateFoo(), (foo) => {4});5The problem is that I can't use the generateFoo() method in the test3.js file. I'm getting the following error:6"dependencies": {7}

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run fast-check-monorepo automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful