1$(document).ready(function(){ 2 3 var preloaderHeight = $(".result").height(); 4 $(".preloader").height(preloaderHeight); 5 6 $("#first-vector").on("change" , function(){ 7 var f_value = $(this).val(); 8 9 if(f_value == 1){ 10 $("#f-p-vector").hide(); 11 $("#f-c-vector").show(); 12 $("#f-p-vector input").val("0"); 13 $("#f-c-vector input").val(""); 14 }else if(f_value == 2){ 15 $("#f-p-vector").show(); 16 $("#f-c-vector").hide(); 17 $("#f-c-vector input").val("0"); 18 $("#f-p-vector input").val(""); 19 } 20 }) 21 $("#second-vector").on("change" , function(){ 22 var s_value = $(this).val(); 23 24 if(s_value == 1){ 25 $("#s-p-vector").hide(); 26 $("#s-c-vector").show(); 27 28 $("#s-p-vector input").val("0"); 29 $("#s-c-vector input").val(""); 30 31 }else if(s_value == 2){ 32 $("#s-p-vector").show(); 33 $("#s-c-vector").hide(); 34 35 $("#s-c-vector input").val("0"); 36 $("#s-p-vector input").val(""); 37 } 38 }) 39 40 $(document).on("submit" , "#calculate" , function(event){ 41 event.preventDefault(); 42 43 44 // Validtion For Inputs 45 var check_point = validtion("#calculate" , "input[type='number']"); 46 47 if(check_point == false){ 48 49 modelAlert("warning" , "Please Fill Required Field"); 50 return false; 51 } 52 var fx,fy,fz, fx_ip,fy_ip,fz_ip , fx_tp , fy_tp , fz_tp , sx , sy ,sz , fx_s_ip , fy_s_ip , fz_s_ip , fx_s_tp , fy_s_tp , fz_s_tp , first_vector , second_vector; 53 54 first_vector = $("#first-vector").val(); 55 second_vector = $("#second-vector").val(); 56 if(first_vector == 1){ 57 fx = $("#fx").val(); 58 fy = $("#fy").val(); 59 fz = $("#fz").val(); 60 fx_ip = 0; fy_ip = 0; fz_ip = 0; fx_tp = 0; fy_tp = 0; fz_tp = 0; 61 62 }else if(first_vector == 2){ 63 64 fx_ip = $("#fx-ip").val(); 65 fy_ip = $("#fy-ip").val(); 66 fz_ip = $("#fz-ip").val(); 67 68 fx_tp = $("#fx-tp").val(); 69 fy_tp = $("#fy-tp").val(); 70 fz_tp = $("#fz-tp").val(); 71 72 fx= 0; fy= 0; fz= 0; 73 74 } 75 76 if(second_vector == 1){ 77 sx = $("#sx").val(); 78 sy = $("#sy").val(); 79 sz = $("#sz").val(); 80 fx_s_ip = 0; fy_s_ip = 0; fz_s_ip = 0; fx_s_tp = 0; fy_s_tp = 0; fz_s_tp = 0; 81 82 }else if(second_vector == 2){ 83 84 fx_s_ip = $("#fx-s-ip").val(); 85 fy_s_ip = $("#fy-s-ip").val(); 86 fz_s_ip = $("#fz-s-ip").val(); 87 fx_s_tp = $("#fx-s-tp").val(); 88 fy_s_tp = $("#fy-s-tp").val(); 89 fz_s_tp = $("#fz-s-tp").val(); 90 sx= 0; sy= 0; sz= 0; 91 } 92 93 94 //return false; 95 // Ajax Strat 96 $.ajaxSetup({ 97 headers: { 98 "X-CSRF-TOKEN": $('meta[name="_token"]').attr("content"), 99 }, 100 }); 101 $.ajax({ 102 method: "POST", 103 url : "/AjaxReqests/cross_product_calculator", 104 beforeSend:function(){ 105 showOverlay(); 106 }, 107 data: { 108 fx : fx, 109 fy : fy, 110 fz : fz, 111 fx_ip : fx_ip, 112 fy_ip : fy_ip, 113 fz_ip : fz_ip, 114 fx_tp : fx_tp, 115 fy_tp : fy_tp, 116 fz_tp : fz_tp, 117 first_vector : first_vector, 118 second_vector : second_vector, 119 fx_s_ip : fx_s_ip, 120 fy_s_ip : fy_s_ip, 121 fz_s_ip : fz_s_ip, 122 fx_s_tp : fx_s_tp, 123 fy_s_tp : fy_s_tp, 124 fz_s_tp : fz_s_tp, 125 sx : sx, 126 sy : sy, 127 sz : sz 128 }, 129 }).done(function(result){ 130 hideOverlay(); 131 console.log(result); 132 var obj = jQuery.parseJSON(result); 133 134 $(".solution").html(obj.string); 135 $(".answer").html(obj.Ans); 136 137 138 $('html, body').animate({ 139 scrollTop: $("#result").offset().top 140 }, 10); 141 142 }).fail(function(){ 143 // $(".preloader").fadeOut(1000); 144 hideOverlay(); 145 return false; 146 modelAlert("danger" , "Somthing Wrong in request"); 147 148 149 }); 150 // ajax end 151 // end else 152 }); 153});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.