Learn Computer Programming Free from our source codes in my website.
Sponsored Link Please Support
https://www.techseries.dev/a/27966/qWm8FwLb
https://www.techseries.dev/a/19181/qWm8FwLb
My Personal Website is http://www.jakerpomperada.com
Email me at jakerpomperada@gmail.com and jakerpomperada@yahoo.com
Sunday, February 21, 2021
Pure HTML and CSS Navigation Bar
A simple navigational menu using pure HTML and CSS.
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 the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com
If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.
Your support on my channel is highly appreciated.
Thank you very much.
Program Listing
Thursday, February 18, 2021
Simple Currency Converter in PHP
A simple currency converter that I wrote using PHP to convert currency from Philippine Peso, Canadian Dollar, Hongkong Dollar, and Japanese Yen vice versa.
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 the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com
If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.
Your support on my channel is highly appreciated.
Thank you very much.
Program Listing
index.php
<?php
// Output text
$out = $ans = $txtAmount =
// txtSelectBox1 selection
$selA0 = $selA1 = $selA2 = $selA3 =
// txtSelectBox2 selection
$selB0 = $selB1 = $selB2 = $selB3 = "";
// Check if form was submitted
if(isset($_POST['txtSelectBox1'])) {
// Get post values
$txtSel1 = $_POST['txtSelectBox1'];
$txtSel2 = $_POST['txtSelectBox2'];
$txtAmount = $_POST['txtAmount'];
// Exchange rates
$cur = array("PHP", "CAD", "HKD", "JPY");
$php = array("1", "0.026219", "0.159988", "2.187584");
$cad = array("38.148506", "1", "6.104467", "83.556541");
$hkd = array("6.250537", "0.163831", "1", "13.689826");
$jpy = array("0.45631", "0.011967", "0.07302", "1");
// Switch statement for conversion
switch ($txtSel1) {
case "php":
$selA0 = ${"selB".$txtSel2} = "selected";
$ans = $txtAmount * floatval($php[$txtSel2]);
$case = 0;
break;
case "cad":
$selA1 = ${"selB".$txtSel2} = "selected";
$ans = $txtAmount * floatval($cad[$txtSel2]);
$case = 1;
break;
case "hkd":
$selA2 = ${"selB".$txtSel2} = "selected";
$ans = $txtAmount * floatval($hkd[$txtSel2]);
$case = 2;
break;
case "jpy":
$selA3 = ${"selB".$txtSel2} = "selected";
$ans = $txtAmount * floatval($jpy[$txtSel2]);
$case = 3;
break;
}
// Display output
$out = '<div class="answer">'.$txtAmount.' '.$cur[$case].' = '.$ans.' '.$cur[$txtSel2].'</div>';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Currency Converter in PHP</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<div class="container">
<div class="title">
<h1>Simple Currency Converter in PHP</h1>
<h2>» Jake R. Pomperada, MAED-IT, MIT «</h2>
<i>Exchange Rates as of Feb 17, 2021</i>
</div>
<div class="container-wrapper">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" class="frmSelect" name="frm">
<div class="selectWrapper">
<select class="txtSelectBox" name="txtSelectBox1" id="txtSelectBox1">
<option value="php" <?php echo $selA0; ?>>Philippine Peso (PHP)</option>
<option value="cad" <?php echo $selA1; ?>>Canadian Dollar (CAD)</option>
<option value="hkd" <?php echo $selA2; ?>>Hong Kong Dollar (HKD)</option>
<option value="jpy" <?php echo $selA3; ?>>Japanese Yen (JPY)</option>
</select>
<select class="txtSelectBox" name="txtSelectBox2" id="txtSelectBox2">
<option value="0" <?php echo $selB0; ?>>Philippine Peso (PHP)</option>
<option value="1" <?php echo $selB1; ?>>Canadian Dollar (CAD)</option>
<option value="2" <?php echo $selB2; ?>>Hong Kong Dollar (HKD)</option>
<option value="3" <?php echo $selB3; ?>>Japanese Yen (JPY)</option>
</select>
</div>
<input type="number" class="txtbox" name="txtAmount" id="txtAmount" value="<?php echo $txtAmount; ?>" placeholder="Input Amount" required>
<div class="btnWrapper">
<a href="index.php" class="btn btnReset" name="btnReset">Reset</a>
<button type="submit" class="btn btnConvert" name="btnConvert">Convert</button>
</div>
<?php echo $out; ?>
</form>
</div>
</div>
</main>
</body>
</html>
style.css
* {
box-sizing: border-box;
}
body {
font-family: "Calibri", sans-serif;
background: #e2e1e0;
color: #111;
}
main {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.container {
padding: 50px;
width: 600px;
background: #fff;
text-align: left;
border-radius: 20px;
box-shadow: 0 0 60px rgba(0,0,0,0.05);
}
h1 {
margin: 0;
line-height: 0.9;
}
h2 {
margin: 0;
}
.title {
display: block;
margin: 0 0 30px;
text-align: center;
}
select,
.txtbox {
display: inline-block;
background: #f1f1f1;
width: 100%;
margin: 0 0 10px 0;
padding: 15px;
border: none;
font-size: 20px;
border-radius: 8px;
font-family: "Calibri", sans-serif;
}
.selectWrapper {
display: inline-flex;
margin: 0 0 10px 0;
}
.selectWrapper select {
width: 245px;
}
.selectWrapper select:first-child {
margin: 0 10px 0 0;
}
.selectWrapper select:last-child {
margin: 0;
}
select:hover,
select:focus,
.txtbox:hover,
.txtbox:focus {
background: #e0e0e0;
}
.btnWrapper {
display: inline-flex;
}
.btn {
background: #673ab7;
color: #fff;
padding: 15px;
width: 250px;
opacity: 0.9;
outline: none;
font-size: 20px;
text-transform: uppercase;
border: none;
text-decoration: none;
text-align: center;
font-family: "Calibri", sans-serif;
cursor: pointer;
text-decoration: none;
display: block;
}
.btn:hover {
opacity: 1;
}
.btnReset {
background: #ff5722;
border-radius: 8px 0 0 8px;
}
.btnConvert {
border-radius: 0 8px 8px 0;
}
.answer {
width: 100%;
padding: 20px;
text-align: center;
font-size: 25px;
font-weight: bold;
background: #9e9e9e;
color: #fff;
line-height: 1;
margin-top: 20px;
border-radius: 8px;
}
Burger Order Form in PHP
A simple burger order form in written using PHP, HTML and CSS.
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 the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com
If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.
Your support on my channel is highly appreciated.
Thank you very much.
style.css
* {
box-sizing: border-box;
}
body {
font-family: "Calibri", sans-serif;
background: #e2e1e0;
color: #111;
}
main {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
}
.container {
padding: 40px;
width: 480px;
background: #fff;
text-align: left;
border-radius: 25px;
white-space: normal;
}
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;
}
.btnReset,
button {
display: block;
background: #2196f3;
color: #fff;
padding: 15px;
font-size: 15px;
width: 100%;
opacity: 0.9;
outline: none;
text-transform: uppercase;
border: none;
text-decoration: none;
text-align: center;
border: none;
}
.btnReset {
background: #ff5722;
}
.btnReset:hover,
button:hover {
opacity: 1;
}
.visibility_on {
display: block;
}
.visibility_off {
display: none;
}
.checkboxWrapper {
margin: 0 0 10px;
display: inline-flex;
}
.checkbox {
display: block;
position: relative;
padding-left: 35px;
margin: 0 0 8px 10px;
cursor: pointer;
font-size: 15px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.checkbox:first-child {
margin: 0 0 10px;
}
/* Hide the browser's default checkbox */
.checkbox input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom checkbox */
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 25px;
width: 25px;
background-color: #eee;
}
/* On mouse-over, add a grey background color */
.checkbox:hover input ~ .checkmark {
background-color: #ccc;
}
/* When the checkbox is checked, add a blue background */
.checkbox input:checked ~ .checkmark {
background-color: #4caf50;
}
/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
content: "";
position: absolute;
display: none;
}
/* Show the checkmark when checked */
.checkbox input:checked ~ .checkmark:after {
display: block;
}
/* Style the checkmark/indicator */
.checkbox .checkmark:after {
left: 9px;
top: 5px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
table {
margin-bottom: 10px;
font-size: 18px;
border: none;
padding: 0;
width: 100%;
}
table th {
width: 120px;
padding: 8px;
background: #2196f3;
color: #fff;
text-align: right;
}
table td {
padding: 8px;
border: 2px solid #111;
}
index.php
<?php
$name = $contact = $address = $size = $flavor = $extras = "";
$vis1 = "visibility_on";
$vis2 = "visibility_off";
if (isset($_POST["btnCalculate"])) {
$name = isset($_POST['txtName']) ? $_POST['txtName'] : "";
$size = isset($_POST['txtSelect']) ? $_POST['txtSelect'] : "";
$flavor = isset($_POST['txtFlavor']) ? $_POST['txtFlavor'] : "";
$num = 0;
foreach($_POST['txtExtras'] as $check) {
if (++$num === count($_POST['txtExtras'])) {
$extras .= $check;
} else {
$extras .= $check.", ";
}
}
$vis1 = "visibility_off";
$vis2 = "visibility_on";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Burger Order Form in PHP</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<div class="container <?php echo $vis1; ?>">
<h1>Burger Order Form in PHP</h1>
<h2>» Jake R. Pomperada, MAED-IT, MIT «</h2>
<div class="container-wrapper">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" class="frmBasicMath">
<input type="text" name="txtName" class="txtbox" placeholder="Full Name" required>
<select name="txtFlavor" class="txtbox" required>
<option value="" selected disabled>~ Select Flavor ~</option>
<option value="Regular">Regular</option>
<option value="American">American</option>
<option value="Vegetarian">Vegetarian</option>
</select>
<select name="txtSelect" class="txtbox" required>
<option value="" selected disabled>~ Select Size ~</option>
<option value="Small">Small</option>
<option value="Medium">Medium</option>
<option value="Large">Large</option>
<option value="Double Patty">Double Patty</option>
<option value="Triple Patty">Triple Patty</option>
</select>
<div class="checkboxWrapper">
<label class="checkbox">Extra Cheese
<input type="checkbox" name="txtExtras[]" value="Extra Cheese">
<span class="checkmark"></span>
</label>
<label class="checkbox">Extra Gravy
<input type="checkbox" name="txtExtras[]" value="Extra Gravy">
<span class="checkmark"></span>
</label>
<label class="checkbox">Extra Veggies
<input type="checkbox" name="txtExtras[]" value="Extra Veggies">
<span class="checkmark"></span>
</label>
</div>
<button type="submit" class="btnCalculate" name="btnCalculate">Place Order</button>
</form>
</div>
</div>
<div class="container <?php echo $vis2; ?>">
<h1>Burger Order Form in PHP</h1>
<h2>» Jake R. Pomperada, MAED-IT, MIT «</h2>
<table>
<tr><th>Full Name:</th><td><?php echo $name; ?></td></tr>
<tr><th>Flavor:</th><td><?php echo $flavor; ?></td></tr>
<tr><th>Size:</th><td><?php echo $size; ?></td></tr>
<tr><th>Extras:</th><td><?php echo $extras; ?></td></tr>
</table>
<a href="index.php" class="btnReset">New Order</a>
</div>
</main>
</body>
</html>
Wednesday, February 17, 2021
Meter To Millimeter in C++
Machine Problem in C++
Write a program to ask the user to give a value in meter and then it will convert it into millimeter equivalent.
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 the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com
If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.
Your support on my channel is highly appreciated.
Thank you very much.
Tuesday, February 16, 2021
Highest in Three Numbers in Java
Machine Problem in Java
THE highest number Write a program that takes three input numbers and determines the largest number among the three. Use nested conditionals.
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 the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com
If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.
Your support on my channel is highly appreciated.
Thank you very much.
Program Listing
Highest_Number.java
/* Average_of_Four_Numbers.java
* Author : Jake Rodriguez Pomperada, MAED-IT, MIT
* February 16, 2021 7:39 PM Tuesday
* www.jakerpomperada.blogspot.com
* www.jakerpomperada.com
* jakerpomperada@gmail.com
* Bacolod City, Negros Occidental
*
* Machine Problem in Java
*
* THE highest number Write a program that takes three input
* numbers and determines the largest number among the three.
* use nested conditionals.
*
*/
import java.util.Scanner;
public class Highest_Number
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int a=0, b=0, c=0;
System.out.print("\n");
System.out.print("\tHighest in Three Numbers in Java");
System.out.print("\n\n ");
System.out.print("\tGive first number: ");
a = input.nextInt();
System.out.print("\tGive second number: ");
b = input.nextInt();
System.out.print("\tGive third number: ");
c = input.nextInt();
System.out.print("\n");
if(a > b && a > c)
{
System.out.println("\tThe Highest Number is "+a+".");
}
else if(b > c)
{
System.out.println("\tThe Highest Number is "+b+".");
}
else
{
System.out.println("\tThe Highest Number is "+c+".");
}
System.out.println("\n");
System.out.println("\tEnd of Program");
System.out.println("\n");
input.close();
}
}