Friday, May 6, 2022

Simple Login Form Using JavaScript

 A simple login form using JavaScript programming language. I hope you will find my work useful.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Simple Login Form Using JavaScript</title>

    <style>

        * {

            box-sizing: border-box;

            margin: 0;

            padding: 0;

        }

        body {

            min-height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            background-color: #01C3FF;

            font-family: sans-serif;

        }

        form,

        .message {

            padding: 30px;

            border-radius: 3px;

            background: #fff;

        }

        h2, h4 {

            margin: 5px 0;

            color: #1F1A19;

            text-align: center;

            line-height: 1.2;

        }

        input {

            display: block;

            padding: 8px 3px;

            outline: none;

            font-size: 12px;

            border-top: 0;

            border-right: 0;

            border-left: 0;

            border-bottom: 2px solid #01C3FF;

            border-radius: 0;

            margin-top: 10px;

            width: 100%;

            color: #888;

        }

        input:first-of-type {

            margin-top: 15px;

        }

        .btn {

            padding: 8px ;

            text-align: center;

            display: block;

            width: 100%;

            cursor: pointer;

            border: none;

            background: #01C3FF;

            color: #fff;

            margin-top: 10px;

            border-radius: 3px;

            text-decoration: none;

        }

        button:hover {

            opacity: 0.9;

        }

        .hide {

            display: none;

        }

        #messageDetails {

            margin-bottom: 20px;

            text-align: center;

        }

    </style>

</head>

<body>

    <form action="" id="frmLogin">

        <hr>

        <h2>Simple Login Form<br>Using JavaScript</h2>

        <h4>Jake R. Pomperada, MAED-IT, MIT</h4>

        <hr>


        <input type="text" name="txtUsername" id="txtUsername" placeholder="Enter your username" required>

        <input type="password" name="txtPassword" id="txtPassword" placeholder="Enter your password" required>

        <button type="submit" class="btn">Login</button>

    </form>


    <div class="message hide">

        <p id="messageDetails"></p>

        <a href="" class="btn">Reset</a>

    </div>


    <script>

        document.querySelector('form').onsubmit  = (e) => {

            e.preventDefault()


            let username  = "admin", 

                password  = "admin",

                inputUser = document.querySelector('#txtUsername').value,

                inputPass = document.querySelector('#txtPassword').value


            if (inputUser != username || inputPass != password) {

                document.querySelector('#messageDetails').innerHTML = "Username and Password do not match.<br>Please try again."

            }

            if (inputUser == username && inputPass == password) {

                document.querySelector('#messageDetails').innerHTML = "Success!<br>You're currently logged in now."

            }


            document.querySelector('#frmLogin').classList.add("hide")

            document.querySelector('.message').classList.remove("hide")

        }

    </script>

</body>

</html>

Thursday, May 5, 2022

Kilogram To Grams in C++

Kilogram To Grams in C++

 A simple program asks the user to give a kilogram value and then the program will convert the given kilogram into grams in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

#include <iostream>
#include <iomanip>


int main() {
float kilograms=0.00;
std::cout <<"\n";
std::cout <<"\tKilogram To Grams in C++";
std::cout <<"\n\n";
std::cout << "\tGive Kilogram Value : ";
std::cin >> kilograms;
float grams = kilograms * 1000;
std::cout <<"\n\n";
std::cout <<"\t" <<kilograms << " Kilogram(s) is equal to "
<<std::fixed<<std::setprecision(2)
<<grams << " Gram(s)";
std::cout <<"\n\n";
std::cout <<"\tEnd of Program";
std::cout <<"\n";
}

Wednesday, May 4, 2022

Current Trends in Machine Learning

Count Consonants and Vowels Using JavaScript

Count Consonants and Vowels in JavaScript

 A program that will ask the user to give a string or a sentence and then the program will count the number of consonants and vowels using JavaScript programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Count Consonants and Vowels Using JavaScript</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #cacaca;
            color: #04181F;
            font-family: sans-serif;
            font-size: 90%;
        }
        main {
            padding: 30px;
            border-radius: 10px;
            background-color: #f1f1f1;
            width: 450px;
        }
        h1 {
            margin-bottom: 5px;
            font-size: 26px;
            text-align: center;
        }
        h2 {
            margin-bottom: 30px;
            font-size: 20px;
            text-align: center;
        }
        .block {
            margin: 0 auto 12px;
            display: flex;
            align-items: center;
        }
        label {
            display: block;
            line-height: 40px;
            background-color: #47356E;
            color: #eee;
            text-align: center;
        }
        textarea {
            padding: 10px;
            width: 100%;
            font-size: 14px;
            border-radius: 0;
            border: 2px solid #04181F;
            outline: none;
            resize: none;
            text-align: center;
            margin: 0;
        }
        button {
            display: inline-block;
            padding: 15px;
            background-color: #F68802;
            color: #eee;
            outline: none; 
            border: none;
            cursor: pointer;
            width: 100%;
            font-size: 16px;
            text-decoration: none;
            text-align: center;
            transition: all .2s;
            margin-top: 5px;
        }
        button:hover {
            opacity: 0.9;
        }
        .output {
            display: block;
            width: 100%;
            margin-top: 12px;
            padding: 20px 0;
            background-color: #2F4C58;
            font-size: 16px;
            text-align:center;
            color: #f3f3f3;
            line-height: 1.5;
        }
        .hide {
            display: none;
        }
    </style>
</head>
<body>
    <main class="container">
        <h1>Count Consonants and Vowels<br>Using JavaScript</h1>
        <h2>Jake R. Pomperada, MAED-IT, MIT</h2>
        <form action="" id="frmCount">
            <label for="grade1">Enter a sentence:</label>
            <textarea name="" id="txtContent" rows="3" required></textarea>
            <button type="submit">Count</button>
            <div class="output hide"></div>
        </form>
    </main>

    <script>
        document.querySelector('#frmCount').onsubmit  = (e) => {
            e.preventDefault()

            let content = document.querySelector('#txtContent').value,
                output = document.querySelector('.output'),
                countConsonants = () => {
                    return content.match(/[^aeiou\s]/gi).length
                },
                countVowels = () => {
                    return content.match(/[aeiou]/gi).length
                }

            output.classList.remove('hide')
            output.innerHTML = 'Number of Vowels: '+countVowels()+'<br>'+
                               'Number of Consonants: '+countConsonants()+'<br>'
        }
    </script>
</body>
</html>

Tuesday, May 3, 2022

Kilograms To Grams in Python

Kilograms To Grams in Python

 A simple program to ask the user kilograms values and then it will convert into grams using Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

# kilograms_grams.py
# Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.blogspot.com and www.jakerpomperada.com
# jakerpomperada@gmail.com
# Barangay Mandalagan, Bacolod City, Negros Occidental Philippines
print("");
print("\tKilograms To Grams in Python");
print("");
kilograms = float(input("Enter Kilogram Value : "))
#Convert kilogram to grams
grams = float(kilograms * 1000)
#Display the result
print("");
print("There are " + str(format(grams,'.2f')) + " Gram(s) in " + str(kilograms) + " Kilogram(s), ")
print("");
print("End of Program")
print("");


Buttons in Tkinter Using Python

Buttons in Tkinter Using Python

 A simple program to show how to display and use buttons using Tkinter in Python Programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support





Program Listing

from tkinter import *

root = Tk()
root.geometry("300x200")
root.title("Button")


def callback():
label.config(text='You clicked me!', fg='red')


button = Button(root, text='Click Me!', command=callback)
button.pack()
label = Label(root, text='Buttons in Tkinter Python')
label.pack()

root.mainloop()

Monday, May 2, 2022

Print A To Z in Python

Print A To Z in Python

 A program to print the alphabet from A To Z in Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support




Program Listing

# Print_A_To_Z.py
# Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com and www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# May 2, 2022 6:09 AM Monday
# Bacolod City, Negros Occidental

import string

print()
print("\tPrint A To Z in Python")
print()

for letter in string.ascii_uppercase:
print(letter, end =" ")

print("\n")
print("\tEND OF PROGRAM")
print()

Sunday, May 1, 2022

Print Odd Numbers in C

Print Odd Numbers in C

 Machine Problem

A simple program to print odd numbers based on the given numbers in the C programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support



Program Listing

#include <stdio.h>

int main()

{

int i=0,n=0;


printf("\n");

    printf("\tPrint Odd Numbers in C");

    printf("\n\n");

printf("\tGive a Number :  ");

scanf("%d",&n);

printf("\n");

printf("\tThe odd numbers between 1 and %d are : \n\n",n);

printf("\t");

for(i=1;i<=n;i+=2)

{

printf("%d ",i);

}

printf("\n\n");

    printf("\tEnd of Program");

    printf("\n");

}


Saturday, April 30, 2022

Simple Login in Java

Simple Login in Java

 A simple login program that is written in Java programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support




Program Listing

import java.util.Scanner;


public class Simple_Login {

  

 static final String CorrectPassword = "admin";

  static final int MaxLoginAttempts = 3;

  

public static void main (String[] args) {

    boolean loggedIn = false;

    int logginAttempts = 0;


    System.out.println("\n");

    System.out.println("\tSimple Login in Java");

    System.out.println("\n");

    try(Scanner scanner = new Scanner(System.in))

    {


      while(!loggedIn && logginAttempts < MaxLoginAttempts) {

        System.out.print("Password: ");

        String input = scanner.next();

        logginAttempts++;

        if(input.equals(CorrectPassword))

          loggedIn = true;

      }

      System.out.println("\n");

      if(loggedIn) 

        System.out.println("\tLogin successful");

      else

        System.out.println("\tLogin failed");

    }

    catch(Exception ex) {

      ex.printStackTrace();

    }

}

}




Sum and Average of Five Numbers in Java

Sum and Average of Five Numbers in Java

 Machine Problem

Write a program that will ask the user to give five numbers and then our program will find the total sum and average of five numbers using an array.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support





Program Listing


/*
average_array.java
Programmer By: Mr. Jake R. Pomperada, MAED-IT
Date : July 23, 2015
Tools: NetBeans 8.0.2, Java SE 8.0

Problem No. 1:
  
Write a program that will ask the user to give five numbers 
and then our program will find the total sum and average of
five numbers using an array.
*/


import java.util.Scanner;

class average_array {
    
public static void main(String[] args) {
      
     Scanner input = new Scanner(System.in);
     char ch;
   
  do { 
      int [] values; 
      values  = new int[5];  
      int x=0, total_sum=0, average=0;
      System.out.println("\n");
      System.out.print("Sum and Average of Five Numbers in Java");
      System.out.println("\n");
      for (int a=0; a<5; a++)
      {
         x=1;
         x+=a;
         System.out.print("Enter value in item no." + x + " : ");
          
         values[a] = input.nextInt();
         total_sum += values[a];
         average = total_sum/5;
      }
     System.out.println(); 
     System.out.print("The total sum is " + total_sum + ".");
     System.out.println();
     System.out.print("The average of five numbers is " + average + ".");
     System.out.println();
     System.out.print("\nDo you want to continue (Type y or n) : ");
     ch = input.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
     System.out.println();
     System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
     System.out.println("\n\n");
     input.close();
  }
}