Important program in Javascript
Important program in Javascript
<!DOCTYPE html>
<html>
<head>
</head>
<body style = "text-align: center; font-size: 20px;">
<h1> Welcome to the javaTpoint.com </h1>
Enter a number: <input id = "num">
<br><br>
<button onclick = "fact()"> Factorial </button>
<p id = "res"></p>
<script>
function fact(){
var i, num, f;
f = 1;
num = document.getElementById("num").value;
for(i = 1; i <= num; i++)
{
ff = f * i;
}
ii = i - 1;
document.getElementById("res").innerHTML = "The factorial of the number " + i + " is: " + f
;
}
</script>
</body>
</html>
function checkPrime(num) {
let i, flag = true;
for (i = 2; i <= num - 1; i++) {
if (num % i == 0) {
flag = false;
break;
}
}
if (flag == true)
console.log(num + " is prime");
else
console.log(num + " is not prime");
}
checkPrime(4);
checkPrime(5);
<html>
<head> <title> JavaScript Palindrome </title>
</head>
<body>
<!-- Use JavaScript programming code to validate the Palindrome numbers or strings. -->
<script>
function validatePalin(str) {
console.log(value);
</script>
</body>
</html>
<script type="text/javascript">
function sum()
{
var n,i, sum = 0;
n = parseInt(document.getElementById ("first").value);
for (i = 1; i <= n; i++)
{
sum = sum+i;
}
document.getElementById ("num").innerHTML="Sum of "+n+ " natural numbers is
:"+sum;
}
</script>
</html>
Identifying small objects like street signs presents a significant challenge, particularly in dynamic
environments with varying lighting and obstructions. This paper focuses on developing an efficient
and reliable method for street sign identification. A novel approach is proposed, leveraging
convolutional neural networks (CNNs) augmented with simplified Gabor feature maps. This
combination enhances feature extraction and enables precise classification, maintaining a balance
between accuracy and computational efficiency.The system is trained on a comprehensive dataset
of over 50,000 realistic street sign images spanning 43 distinct classes. This dataset includes
variations in distance, lighting conditions, occlusions, and rotations, ensuring the model's
robustness and generalizability across diverse real-world scenarios. During the detection stage,
parameters from the Gabor feature maps are utilized to classify street signs, enhancing accuracy
while maintaining computational efficiency. Experimental results demonstrate that the system
achieves an impressive 97% accuracy under favorable daylight conditions, confirming its
effectiveness in recognizing a wide variety of street signs. However, performance under low-light
or nighttime conditions drops to 74%, indicating room for improvement in challenging
environments. Future work will aim to enhance nighttime accuracy, making the system suitable
for deployment in autonomous vehicles and intelligent traffic management systems.