New Post

Intelligent Traffic Management Using || AI & Metaheuristics || ~xRay Pixy

Image
Hybrid Artificial Intelligence and Metaheuristics for Smart City TRafci Management Problem Video Chapters: 00:00 Introduction 00:40 Smart Cities 01:14 Traditional Methods for Traffic Management 02:12 Hybrid Approach AI and Metaheuristics 02:47 STEPS for Hybrid  Traffic Management System 08:40 Advantages of Smart Traffic Management System 09:33 Conclusion

JavaScript Analog Clock || Step-By-Step || ~xRay Pixy


---------------------------- clock.html ---------------------------------------

<html>
<head>
<title>Javascript Analog Clock</title>
<link rel ="stylesheet" href="clock.css">
<script src = "clock.js"></script>
</head>
<body>
<div id="clockBox">
     <div id="hour"></div>
     <div id="minute"></div>
     <div id="second"></div>
     <div id="point"></div>
</div>
</body>
</html>


------------------------------ clock.css -----------------------------------------
#clockbox{
          height: 650px;
          width: 650px;
          background: url(clc.png);
          background-size:100%;
          margin:auto;
       
}
#hour, #minute, #second{
                        position:absolute;
                        background:red;
                        border-radius:15px;
                        transform-origin:bottom;
}

#hour{
                        width:1.6%;
                        height:25%;
                        left:48.85%;
                        top: 25%;
                        
}
#minute{
                        width: 1.4%;
                        height:30%;
                        left: 48.9%;
                        top:18%;
                        
}

#second{
                        width:0.8%;
                        height:36%;
                        top: 9%;
                        left: 49.25%;
                          
}

              
---------------------------- clock.js ---------------------------------------------------

setInterval(() => {
                       D = new Date();
                       H = D.getHours();
                       M = D.getMinutes();
                       S = D.getSeconds();
                       
                       H_rotation = 30 * H + M / 2;
                       M_rotation = 6 * M;
                       S_rotation = 6 * S;
                       
                       hour.style.transform =`rotate(${H_rotation}deg)`;
                       minute.style.transform =`rotate(${M_rotation}deg)`;
                       second.style.transform =`rotate(${S_rotation}deg)`;
                     
},1000);

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

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

Bat algorithm Explanation Step by Step with example

Grey Wolf Optimization Algorithm

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

Grey Wolf Optimization Algorithm Numerical Example

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