Sunday, May 2, 2021

Simple Distance Converter in PHP

 In this tutorial I will share to you guys how to create a PHP program to ask the user to give a distance in centimeter, and convert it into meters, and kilometres. 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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com






Program Listing

style.css

*,

html {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

}


body {

    font-family: "Calibri", sans-serif;

    background: #e2e1e0;

    color: #111;

    display: -webkit-box;

    display: -ms-flexbox;

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 100vh;

}


main {

    -webkit-transform: skewY(8deg);

    transform: skewY(8deg);

    background: #fff;

    border: 8px solid #2196f3;

    border-radius: 20px 40px 20px 40px;

}

.container::before {

    position: absolute;

}

.container {

    -webkit-transform: skewY(-8deg);

    transform: skewY(-8deg);

    padding: 50px 40px;

    min-width: 530px;

    text-align: left;

}


h1 {

    margin: 0;

    line-height: 1.2;

    text-align: center;

}


h2 {

    margin: 0 0 30px;

    font-size: 22px;

    text-align: center;

}


.txtbox {

    display: inline-block;

    background: #eee;

    width: 100%;

    margin: 0 0 8px 0;

    padding: 15px;

    border: none;

    font-size: 15px;

}


.txtbox:focus {

    background: #f1f1f1;

    outline: none;

}


.block {

    display: block;

    width: 100%;

    padding: 10px 0;

    margin-bottom: 10px;

}


.block .radioblock {

    width: 100px;

    display: inline-block;

}


.block label {

    cursor: pointer;

}


button {

    display: block;

    background: #2196f3;

    color: #fff;

    padding: 10px;

    font-size: 15px;

    width: 100%;

    opacity: 0.9;

    outline: none;

    text-transform: uppercase;

    border: none;

    text-decoration: none;

    text-align: center;

    border: none;

    margin-bottom: 10px;

}


button:hover {

    opacity: 1;

}


.result {

    padding: 10px;

    font-size: 20px;

    background: #eee;

    text-align: center;

    font-weight: bold;

}


index.php

<?php 
    if(isset($_POST['txtNumber'])) {
        $num = $_POST['txtNumber'];
        $rad = $_POST['txtRadio'];

        switch ($rad) {
            case "Meter":
                $res = $num / 100;
                $res .= " m";
                break;
            case "Kilometer":
                $res = $num / 100000;
                $res .= " km";
                break;
        }
    }
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Simple Distance Converter in PHP</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <main>
        <div class="container">
            <h1>Simple Distance Converter in PHP</h1>
            <h2>&#187; Jake R. Pomperada, MAED-IT, MIT &#171;</h2>

            <div class="container-wrapper">
                <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" class="frmSelect">
                    <label for="txtNumber" class="label">Distance in Centimeter:</label>
                    <input type="number" min="1" class="txtbox" name="txtNumber" id="txtNumber"
                        value="<?php if(isset($num)){echo $num;} ?>" required>

                    <div class="block">
                        <div class="radioblock">
                            <input type="radio" name="txtRadio" id="txtRadio1" value="Meter" required>
                            <label for="txtRadio1">Meter</label>
                        </div>
                        <div class="radioblock">
                            <input type="radio" name="txtRadio" id="txtRadio2" value="Kilometer" required>
                            <label for="txtRadio2">Kilometer</label>
                        </div>
                    </div>

                    <button type="submit">Convert</button>
                </form>
                <?php if(isset($res)) echo '<div class="result">'.$res.'</div>'; ?>
            </div>
        </div>
    </main>
</body>

</html>



Multi Line Message Box in Visual Basic NET

 I created this video to demonstrate how to create multi line message box using Microsoft Visual Basic NET.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com






Program Listing

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        MsgBox("This program was created by" & vbCrLf & vbCrLf & _

               "Mr. Jake Rodriguez Pomperada, MAED-IT, MIT" & vbCrLf & vbCrLf & _

               "www.jakerpomperada.com and www.jakerpomperada.blogspot.com" & vbCrLf & _

               "jakerpomperada@gmail.com" & vbCrLf & "Bacolod City, Negros Occidental Philippines.", vbInformation, "About this Program")

        TxtUsername.Focus()

    End Sub

Thursday, April 29, 2021

String Length in Java

String Length in Java

 In this tutorial I will show you how the program will ask the user to give a string and then the program will count the number of characters in the given string using Java programming language. I am using eclipse as my IDE and OpenJDK.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com








Program Listing

/**
 * @author Jake Rodriguez Pomperada,MAED-IT, MIT
 * www.jakerpomperada.com    www.jakerpompomperada.blogspot.com
 * jakerpomperada@gmail.com
 * Bacolod City, Negros Occidental Philippines
 *
 */
import java.util.Scanner;

class String_Length_Demo
{
public static void main(String x[])
{
Scanner input=new Scanner(System.in);
System.out.print("\n\n");
System.out.print("\tString Length in Java");
System.out.print("\n\n");
System.out.print("\tGive a String : ");  
String str=input.nextLine(); 
int len=str.length();
System.out.print("\n\n");
System.out.println("\tGive string contains "+len+" characters");
System.out.print("\n\n");
System.out.print("\tEnd of Program");
}
 
}


Wednesday, April 28, 2021

Product of Two Numbers Using Pointers in C++

Product of Two Numbers in Pointers Using C++

 A simple program to ask the user to give two numbers that will compute the product of two numbers using pointers 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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com







Program Listing


// product.cpp

// Jake Rodriguez Pomperada, MAED-IT, MIT

// www.jakerpomperada.blogspot.com   www.jakerpomperada.com

// jakerpomperada@gmail.com


#include <iostream>



int main()

{

    int val1=0,val2=0;      

    int *ptr1,*ptr2;   

    int solve_product = 0;

                 

    std::cout << "\n\n";

    std::cout << "\tProduct of Two Numbers in Pointers Using C++";

    std::cout << "\n\n";

    std::cout << "\tGive First Value  : ";

    std:: cin>>val1;   

    std::cout << "\n\n";                        

    std::cout << "\tGive Second Value : ";

    std:: cin>>val2;                          


    ptr1=&val1;                                      

    ptr2=&val2;


    // Solving the product here

    solve_product=*ptr1 * *ptr2;                                 


    std::cout << "\n\n";

    std::cout << "\tThe product of " << val1 << " and " << val2 

    << " is " << solve_product << ".";

    std::cout << "\n\n";

    std::cout << "\tEnd of Program";

    std::cout << "\n\n";

    system("pause");

    

}



Sunday, April 25, 2021

String Palindrome in Python

String Palindrome in Python

 In this tutorial, I will show you how to write a string palindrome using Python programming.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com






Program Listing

palindrome.py

# palindrome.py
# Jake Rodriguez Pomperada,MAED-IT,MIT
# www.jakerpomperada.blogspot.com www.jakerpomperada.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental Philippines
print("\n\n")
print("\tString Palindrome in Python")
print("\n")
str_value = input("Give a String : ")
print("\n")

if(str_value.lower() == str_value.lower()[:: - 1]):
print("\tThe given string ", str_value.upper(), " is a Palindrome.\n")
else:
print("\tThe given string ", str_value.upper(), " is not a Palindrome.\n")
print("\tEnd of Program")

Arithmetic Operators in C#

Arithmetic Operators in C#

 In this article I would like to share about arithmetic operators in C# programming languages. 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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com





Program Listing

using System;


namespace Aritmetic_Operators

{

    class Program

    {

        static void Main(string[] args)

        {


            // Arithmetic Operators in C#


            // Jake Rodriguez Pomperada,MAED-IT, MIT


            // www.jakerpomperada.com  


            // www.jakerpomperada.blogspot.com


            // jakerpomperada@gmail.com


            // Bacolod City, Negros Occidental Philippines

            int a = 40;

            int b = 6;


            int sum = a + b;

            int sub = a - b;

            int mul = a * b;

            float div = (float)a / (float)b;

            int rem = a % b;

            

            Console.WriteLine("\n\n");

            Console.WriteLine("\tArithmetic Operators in C#");

            Console.WriteLine("\n");

            Console.WriteLine("\tThe Addition of {0} and {1} is = {2}", a, b, sum);

            Console.WriteLine("\tThe Subtraction of {0} and {1} is = {2}", a, b, sub);

            Console.WriteLine("\tThe Multiplication of {0} and {1} is = {2}", a, b, mul);

            Console.WriteLine("\tThe Division of {0} and {1} is = {2}", a, b, div);

            Console.WriteLine("\tThe Remainder of {0} and {1} is = {2}", a, b, rem);

            Console.WriteLine("\n");

            Console.WriteLine("\tEnd of Program");

            Console.ReadLine();

        }

    }

}



Saturday, April 24, 2021

Area of the Circle in C#

 I wrote this simple program to ask the user to give radius of the circle and then program will compute the area of the circle using 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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com








Program Listing


Program.cs

using System;


namespace Area_of_Circle

{

    class Program

    {

        // Area of the circle in C#

        // Jake Rodriguez Pomperada,MAED-IT, MIT

        // www.jakerpomperada.com  

        // www.jakerpomperada.blogspot.com

        // jakerpomperada@gmail.com

        // Bacolod City, Negros Occidental Philippines

        static void Main(string[] args)

        {

            double radius, area;

            Console.WriteLine("\n\n");

            Console.WriteLine("\tArea of the Circle in C#");

            Console.WriteLine("\n");

            Console.Write("\tEnter Radius: ");

            radius = Convert.ToDouble(Console.ReadLine());

            area = Math.PI * radius * radius;

            Console.WriteLine("\n");

            Console.WriteLine("\tArea of circle: {0:0.##} " , area);

            Console.WriteLine("\n");

            Console.WriteLine("\tEnd of Program");

            Console.ReadKey();

        }

    }

}


Friday, April 23, 2021

Odd and Even Numbers in JavaScript

Odd and Even Number Checker in JavaScript

 A simple program that I wrote to ask the user to give a number and then the program will check if the given number is odd or even number 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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com







Program Listing

<!DOCTYPE html>
<html> 
<head>
<meta charset=utf-8 />
<title>Odd and Even Number Checker in JavaScript </title>
<style type="text/css">
html {
    box-sizingborder-box;
    margin0;
    padding0;
}

body {
    background#fff;
    color#000;
    height100%;
    min-height100vh;
    overflow-yauto;
    padding100px 0;
    text-aligncenter;
    font-familysans-serif;
}

h1:nth-of-type(1) {
    font-size35px;
    line-height35px;
    margin0 0 15px;
}

h2:nth-of-type(1) {
    margin0 0 35px;
}

h2:nth-of-type(2) {
    margin30px 0 20px;
    text-transformuppercase;
    letter-spacing1px;
    font-size30px;
}

a,
input[type="submit"] {
    margin0 0 35px;
    color#fff;
    text-decorationnone;
    padding15px 20px;
    border-radius10px;
    min-width150px;
    background#3CBB9E;
    displayinline-block;
    text-transformuppercase;
    bordernone;
    outlinenone;
    font-size15px;
}

a:hover,
input[type="submit"]:hover {
    opacity0.8;
    color#fff;
    cursorpointer;
}

a:nth-of-type(1) {
    margin-right8px;
}

a:nth-of-type(2) {
    margin-left8px;
}

table {
    margin0 auto;
    border-collapsecollapse;
    border1px solid #000;
}

thead td {
    text-transformuppercase;
    font-weight700;
    background#00334B;
    color#f2f2f2;
}

tbody tr {
    background#fff;
    border-bottom1px solid #00334B;
    color#666666;
}

td {
    padding20px;
}

table a,
table a:hover {
    border-radius5px;
    min-width80px !important;
    padding10px !important;
    margin0 !important;
}

table tr td:nth-child(4a {
    background#2b86c5 !important;
}

table tr td:nth-child(5a {
    background#784ba0 !important;
}

table tr td:nth-child(6a {
    background#ff3cac !important;
}

p,
label,
input[type="text"] {
    font-size15px;
    margin-bottom10px;
}

p {
    font-size20px;
}

label {
    width200px;
    displayinline-block;
    padding15px 0;
    background#3CBB9E;
    color#fff;
    border-top-left-radius30px;
    border-bottom-left-radius30px;
    text-transformuppercase;
    font-size15px;
}

input[type="number"] {
    border0;
    outlinenone;
    padding15px 20px;
    width250px;
    border-top-right-radius10px;
    border-bottom-right-radius10px;
    font-size15px;
    background#eaeaea;
}

form {
    displayblock;
    width350px;
    margin0 auto;
}

input[type="submit"] {
    width100%;
    font-size15px;
}

h1 {
    text-transformuppercase;
    letter-spacing1px;
    color#f5f5f5;
    background#009688;
    padding15px;
    border-radius10px;
    margin0;
    line-height30px;
    font-size35px;
}

</style> 
</head>
<body>
    <h1>Odd and Even Number Checker in JavaScript</h1>
    <script>
        function isEven() {

       //get the input value
             var num = document.getElementById('Val_Num').value;
    if (num%2 == 0)
        
        alert("The given number " + num +  " is even number");
    else
    alert("The given number " + num + " is odd number");
}

function Clear_Text() {

 document.getElementById('Val_Num').value ="";
 document.getElementById('Val_Num').focus();
 

}

    </script>
<form>
<label>Give a Number </label> <input type="number" id="Val_Num" name="Val_Num"/><br>
<br>
<input type="submit" onClick="isEven()" Value="Check" />
<input type="submit" onClick="Clear_Text()" Value="Clear" />
</form>
</p>
</body>
</html>

Thursday, April 22, 2021

Addition of Three Numbers in VB NET

Addition of Three Numbers Using VB.NET

 A simple program that I wrote using VB.NET to ask the user to give three numbers and then the program will allow the user to compute the sum of the three numbers.

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 at 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 jakerpomperada@gmail.com and jakerpomperada@yahoo.com






Program Listing


Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs)

        MessageBox.Show("Addition of two Numbers")

    End Sub


    Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click

        TextBox4.Text = Val(TextBox1.Text) + Val(TextBox2.Text) + Val(TextBox3.Text)

    End Sub


    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

        TextBox1.Text = ""

        TextBox2.Text = ""

        TextBox3.Text = ""

        TextBox4.Text = ""

        TextBox1.Focus()

    End Sub


    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

        Me.Close()

    End Sub

End Class