New Post

Markov Chains || Step-By-Step || ~xRay Pixy

Image
Learn Markov Chains step-by-step using real-life examples. Video Chapters: Markov Chains 00:00 Introduction 00:19 Topics Covered 01:49 Markov Chains Applications 02:04 Markov Property 03:18 Example 1 03:54 States, State Space, Transition Probabilities 06:17 Transition Matrix 08:17 Example 02 09:17 Example 03 10:26 Example 04 12:25 Example 05 14:16 Example 06 16:49 Example 07 18:11 Example 08 24:56 Conclusion

JavaScript Calculator Step-By-Step ~xRay Pixy


HTML + JAVASCRIPT CODE
<html>
<head>
<title>JavaScript Calculator</title>
<link rel="stylesheet" href="calc.css"/>
</head>
<body>
<div class="front">
<form name="form">
<input id="clac" type="text" name="result"><br><br>
<input type= "button" value ="1" onclick="form.result.value += '1'">
<input type= "button" value ="2" onclick="form.result.value += '2'">
<input type= "button" value ="3" onclick="form.result.value += '3'">
<input type= "button" value ="+" onclick="form.result.value += '+'">
<br><br>
<input type="button" value="4" onclick="form.result.value += '4'">
<input type="button" value="5" onclick="form.result.value += '5'">
<input type="button" value="6" onclick="form.result.value += '6'">
<input type="button" value="-" onclick="form.result.value += '-'">
<br><br>
<input type="button" value="7" onclick="form.result.value += '7'">
<input type="button" value="8" onclick="form.result.value += '8'">
<input type="button" value="9" onclick="form.result.value += '9'">
<input type="button" value="*" onclick="form.result.value += '*'">
<br><br>
<input type="button" value="/" onclick="form.result.value += '/'">
<input type="button" value="0" onclick="form.result.value += '0'">
<input type="button" value="." onclick="form.result.value += '.'">
<input type="button" value="=" onclick="form.result.value = eval(form.result.value)">
<br><br>
<input id ="clean" type="button" value="CLEAR" onclick="form.result.value = ''">
</form>
</div>
</body>
</html>

CSS CODE
#clean{
       width:200px;
       border:2px solid black;
       border-radius:2px;
       padding:15px;
       background-color:lime;
       font-size:20px;
       color:white;                
}

.front{
       width:300px;
       height:550px;
       border:4px solid black;
       margin:auto;
       padding:20px;
       border-radius:3px;
       background-color:black;       
}

input{
      width:30px;
      background-color:gray;
      color:white;
      border:3px solid black;
      border-radius:3px;
      padding:25px;
      margin:6px;
      font-size:15px;
}

#clac{
      width:300px;
      border:3px solid black;
      padding:20px;
      border-radius:3px;
      margin:auto;
      background-color:blue;
}

Comments

Popular Post

PARTICLE SWARM OPTIMIZATION ALGORITHM NUMERICAL EXAMPLE

Cuckoo Search Algorithm for Optimization Problems

Particle Swarm Optimization (PSO)

PSO (Particle Swarm Optimization) Example Step-by-Step

how is the LBP |Local Binary Pattern| values calculated? Step-by-Step with Example

PSO Python Code || Particle Swarm Optimization in Python || ~xRay Pixy

Grey Wolf Optimization Algorithm

Bat algorithm Explanation Step by Step with example

Grey Wolf Optimization Algorithm Numerical Example

Whale Optimization Algorithm Code Implementation || WOA CODE || ~xRay Pixy