Wednesday, October 7, 2020

Leap Year Checker in Visual FoxPro Version 2

 A program that I wrote using Microsoft Visual Foxpro will ask the user to give a year and then the program will check and determine whether the given year by the user is a leap year or not a leap year.

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.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com





Sample Program Output


Program Listing


* Command Button

nYear = VAL(thisform.text1.Value)

IF NOT EMPTY(DATE(nYear, 2, 29))
MESSAGEBOX("The given year " + LTRIM(STR(nYear)) + " is a Leap year.","The Result",64)
thisform.text1.SetFocus
ELSE
MESSAGEBOX("The given year " + LTRIM(STR(nYear)) + " is Not Leap year.","The Result",64)
thisform.text1.SetFocus
ENDIF

* Clear Button

WITH thisform
     .text1.value = ""
     .text1.setfocus
 endwith
    

* Quit Program Button

IF MESSAGEBOX("Are you sure you want to exit the application?",36)=6
   QUIT
ELSE
 thisform.text1.Value = ""
 thisform.text1.SetFocus
endif 




Tuesday, October 6, 2020

Area of a Circle in Visual Foxpro

Area of the Circle in Visual Foxpro Version 2.0

 This is my second version of area of the circle solver using Microsoft Visual Foxpro I just improve the code much shorter and efficient compared to version one 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.

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.



Sample Program Output


Program Listing


* Compute Button

IF EMPTY(thisform.txtradius.value) then
   MESSAGEBOX("Cannot be empty. Please Try Again")
   thisform.txtradius.setfocus
ELSE
radius = val(thisform.txtradius.value) 
area = (3.1416 * radius * radius);

final_solve= round(area,2)

thisform.label2.caption = "The area of the circle is " + ltrim(padl(final_solve, 5))
ENDIF


* Clear Button
thisform.txtradius.value =""
thisform.label2.caption =""
thisform.txtradius.SetFocus

* Quit Button
IF MESSAGEBOX("Are you sure you want to exit this program?",36)=6
   thisform.release
ENDIF
thisform.txtradius.Value = ""
thisform.txtradius.SetFocus


Monday, October 5, 2020

Fibonacci Numbers in C#

Fibonacci Numbers in C#

Fibonacci Numbers in C#

 A C# program that I wrote that will ask the user to give a number and then the program will generate the Fibonacci Numbers sequence.

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.

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.

Program Listing

/* fibonacci.cs
 * Author  : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
 * Date    : October 5, 2020 Monday
 * Website : www.jakerpomperada.com  / www.jakerpomperada.blogspot.com
 * Email   : jakerpomperada@gmail.com
 * Place   : Bacolod City, Negros Occidental Philippines
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Fibonacci
{
    class Program
    {
        static void Main(string[] args)
        {
            int term1 = 0, term2 = 1, term3 = 0;
            Console.Write("\n\n");
            Console.Write("\tFibonacci Numbers in C# ");
            Console.Write("\n\n");
            Console.Write("\tGive a Number : ");
            int count = Convert.ToInt32(Console.ReadLine());
            Console.Write("\n\n");
            Console.Write("\t");
            Console.Write(term1 + " ");
            Console.Write(term2 + " ");
            for (int a = 0; a <= count; a++)
            {
                term3 = term1 + term2;
                Console.Write(" "+ term3+" ");
                term1 = term2;
                term2 = term3;
            }
            Console.Write("\n\n");
            Console.Write("\tEnd of Program");
            Console.Write("\n\n");
            Console.ReadLine();
        }
    }
}


Fibonacci Numbers in Go

Fibonacci Numbers in Go

Fibonacci Numbers in Go

 I will show you how to write a program using Go programming language to ask the user to give a number and then the program will compute and generate the Fibonacci 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 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.

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.

Program Listing

// fibonacci.go
// Author  : Jake Rodriguez Pomperada, MAED-IT, MIT
// Date    : October 5, 2020   Monday
// Website : www.jakerpomperada.com  / www.jakerpomperada.blogspot.com
// Email   : jakerpomperada@gmail.com
// Place   : Bacolod City, Negros Occidental Philippines

package main

import "fmt"

func main() {
    var n int
    term1 := 0
    term2 := 1
    nextTerm := 0

    fmt.Print("\n\n")
    fmt.Print("\tFibonacci Numbers in Go")
    fmt.Print("\n\n")
    fmt.Print("\tGive a Number : ")
    fmt.Scan(&n)
    fmt.Print("\n")
    fmt.Print("\tFibonacci Series :")
    fmt.Print("\n\n")
    fmt.Print("\t")
    for i := 1; i <= n; i++ {
        if i == 1 {
            fmt.Print(" ", term1)
            continue
        }
        if i == 2 {
            fmt.Print(" ", term2)
            continue
        }
        nextTerm = (term1 + term2)
        term1 = term2
        term2 = nextTerm
        fmt.Print(" ", nextTerm)
    }
    fmt.Print("\n\n")
    fmt.Print("\tEnd of Program")
    fmt.Print("\n\n")
}


Sum and Product of Two Numbers in Visual Foxpro

 A simple Visual FoxPro program to ask the user to give two numbers and then the program will compute the sum and product of two 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 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.

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.

Program Listing

* Compute Button

a = VAL(thisform.Text1.value)
b =VAL(thisform.Text2.value)

total_sum = (a+b)

total_product = (a * b)

thisform.text3.value = LTRIM(STR(total_sum))
thisform.text4.value = LTRIM(STR(total_product))


* Clear Button

thisform.text1.Value = ""
thisform.text2.Value = ""
thisform.text3.Value = ""
thisform.text4.Value = ""
thisform.text1.setfocus()


* Quit Button

thisform.Release

Sunday, October 4, 2020

Addition of Two Numbers in C#

Addition of Two Numbers in C#

 A simple program to ask the user to give two numbers and the program will compute the sum of two numbers 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 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.

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.

Program Listing

// Addition_Two_Numbers.cs
// Author   : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
// Date     : October 4, 2020    Sunday  9:20 AM
// Website  : http://www.jakerpomperada.com
//            http://www.jakerpomperada.blogspot.com
// Email    : jakerpomperada@gmail.com
// Location : Bacolod City, Negros Occidental, Philippines

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Addition_of_Two_Numbers
{
    class Program
    {
        static void Main(string[] args)
        {

        Console.Write("\n");
        Console.Write("\tAddition of Two Numbers in C#\n\n"); 
        Console.Write("\tGive First Value  :  ");
        int a = Convert.ToInt32(Console.ReadLine());
        Console.Write("\tGive Second Value : ");
        int b = Convert.ToInt32(Console.ReadLine());

        // Perform addition of two numbers 
      int sum = (a+b);
      Console.Write("\n");
      Console.WriteLine("\tThe sum of {0} and {1} is {2}.", a, b, sum);
      Console.Write("\n");
      Console.Write("\tEnd of Program");
      Console.Write("\n");
      Console.ReadKey(); 
        }
    }
}

Login System in PHP and MySQL

Login System in PHP and MySQL

 A login system that I wrote using PHP and MySQL. It already uses mysqli procedural code for sql statements. 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.

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.



Sample Program Output


Program Listing

connect_to_database.php

<?php
$conn = mysqli_connect("localhost","root","","login") or die(mysql_error()); 
mysqli_select_db($conn,"login");

?> 

login.php

<?php
include 'connect_to_database.php'; //connect the connection page
if(empty($_SESSION)) // if the session not yet started 
   session_start();


if(isset($_SESSION['username'])) { // if already login
   header("location: home.php"); // send to home page
   exit; 
}

?>
<html>
<head></head>
<body>
<style>
body {
    background-color: lightgreen;
    font-family:arial;
    font-size:20px;
}
   input, button, select, option, textarea {
    font-size: 100%;
}

</style>
<br>
<h2>Login System in PHP and MySQL</h2>
 Created By
 Mr. Jake Rodriguez Pomperada,MAED-IT,MIT
<br><br><br>
<form action = 'login_process.php' method='POST'>
 Username:   &nbsp;
 <input type="text" name="username" 
 placeholder="Your Username" required/>  <br><br>
 Password: &nbsp;
 <input type="password" name="password"
 placeholder="Your Password" required />
<br> <br>
<input type = "submit" name="submit" value="Ok" />  
</form>
</body>
</html>

login_process.php

<html>
<body>
<style>
body {
    background-color: lightgreen;
    font-family:arial;
    font-size:20px;
}
</style>
<?php
//error_reporting(0);
include 'connect_to_database.php'; //connect the connection page
  
if(empty($_SESSION)) // if the session not yet started 
   session_start();
if(!isset($_POST['submit'])) { // if the form not yet submitted
   header("Location: login.php");
   exit; 
}
//check if the username entered is in the database.

$username = $_POST['username'];

$test_query = "SELECT * FROM users WHERE username = '$username'";

$query_result = mysqli_query($conn,$test_query);

// query to get the users lastname and firstname to be display in the main page
$test_query2 = "SELECT lastname,firstname FROM users WHERE  username = '$username'";

$query_result2 = mysqli_query($conn,$test_query);

//conditions
if(mysqli_num_rows($query_result)===0) {
//if username entered not yet exists
    echo "<font name='arial'> <font size='5'>";
    echo "<br>";
    echo "<h2>The username that you have given is invalid. Please try again.</h2";
    echo "<br><br><br><br>";
    echo "<a href='logout.php'>Return To Login Page</a> " ;
    echo "</font></font>";
}else {

    $password = $_POST['password'];
//if exists, then extract the password.
    while($row_query = mysqli_fetch_array($query_result)) {
        // check if password are equal
        if($row_query['password']==$password){
         
         while($row_query2 = mysqli_fetch_array($query_result2)) {
   
             $_SESSION['username'] = $_POST['username'];
             // This two line of code will able us to retrieve the lastname
                 // and firstname of the user we just login.
                 $_SESSION['lastname'] = $row_query2['lastname'];
             $_SESSION['firstname']= $row_query2['firstname'];
                 header("Location: home.php");
                 exit;
             } 
        } else{ // if not a valid user  
            echo "<br>";
            echo "<h2> Invalid Password !!! Try Again </h2>"; 
            echo "<br>";
            echo "<font name='arial'> <font size='5'>";
            echo "<a href='logout.php'>Return To Login Page</a> " ;
            echo "</font></font>";
        }
    }
}
?>

</body>
</html>

home.php

<?php
include 'connect_to_database.php'; //connect the connection page

if(empty($_SESSION)) // if the session not yet started 
   session_start();

if(!isset($_SESSION['username'])) { //if not yet logged in
   header("Location: login.php");// send to login page
   exit;
?>
<html>
<body>
<style>
body {
    background-color: lightgreen;
    font-family:arial;
    font-size:20px;
    }
input, button, select, option, textarea {
    font-size: 100%;
}
</style>
<br>
<H2> Main Page </H2>
<br>
Welcome  <b> <?php echo $_SESSION['firstname']. " ".$_SESSION['lastname']."."; ?>  </b>
<br><br>
 <a href="logout.php">Logout</a> 
</body>
</html> 

logout.php

<?php
session_start();
unset($_SESSION['username']);
session_destroy();

header("Location: login.php");
exit;
?>

users.sql

-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 28, 2016 at 11:42 AM
-- Server version: 10.1.16-MariaDB
-- PHP Version: 5.6.24

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `login`
--

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(200) NOT NULL,
  `password` varchar(200) NOT NULL,
  `lastname` varchar(200) NOT NULL,
  `firstname` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password`, `lastname`, `firstname`) VALUES
(1, 'jake', 'jake', 'POMPERADA', 'JAKE'),
(2, '123', '123', 'POMPERADA', 'JACOB SAMUEL'),
(3, 'iya', 'iya', 'POMPERADA', 'JULIANNA RAE'),
(4, 'allie', 'allie', 'POMPERADA', 'MA. JUNALLIE'),
(5, 'bill', 'bill', 'GATES', 'WILLIAM'),
(6, 'peter', 'peter', 'NORTON', 'PETER');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;








Login in Microsoft Visual Foxpro

Fibonacci Numbers in PHP

Fibonacci Numbers in PHP

 In this article I would like to share with you guys how to create fibonacci numbers using PHP as my programming. The program will ask the user to give number and then it will generate the fibonacci number series.

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.

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.




Sample Program Output



Program Listing

<!-- index.php
     Author  : Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
     Website : http://www.jakerpomperada.com
               http://www.jakerpomperada.blogspot.com
     Email   : jakerpomperada@gmail.com
     Address : Bacolod City, Negros Occidental, Philippines
-->

<html>
<style>
  body {
    font-size: 20;
    font-family:sans-serif;
    font-weight: bold;
  }
input {
    font-size: 20px;
    font-weight: bold;
   }

  /* http://cssdemos.tupence.co.uk/button-styling.htm */ 
  input#shiny {
padding: 4px 20px;
/*give the background a gradient*/
background:#ffae00; /*fallback for browsers that don't support gradients*/
background: -webkit-linear-gradient(top, blue,blue);
background: -moz-linear-gradient(top, blue, blue);
background: -o-linear-gradient(top, blue, blue);
background: linear-gradient(top, blue, blue);
border:2px outset #dad9d8;
/*style the text*/
font-family:Andika, Arial, sans-serif; /*Andkia is available at http://www.google.com/webfonts/specimen/Andika*/
font-size:1.1em;
letter-spacing:0.05em;
text-transform:uppercase;
color:#fff;
text-shadow: 0px 1px 10px #000;
/*add to small curve to the corners of the button*/
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
/*give the button a drop shadow*/
-webkit-box-shadow: rgba(0, 0, 0, .55) 0 1px 6px;
-moz-box-shadow: rgba(0, 0, 0, .55) 0 1px 6px;
box-shadow: rgba(0, 0, 0, .55) 0 1px 6px;
}
/****NOW STYLE THE BUTTON'S HOVER STATE***/
input#shiny:hover, input#shiny:focus {
border:2px solid #dad9d8;
}
 </style>
<body>
  <?php
  $values = $_POST['inputText'];


  if(isset($_POST['ClearButton'])){
  $values = "";

  }

   ?>
  <br>
  <h4> Fibonacci Numbers in PHP </h4>
  <form action="" method="post">
  Give a Number
  <input type="text" name="inputText" size="5" maxlength="5"
  value="<?php echo $values; ?>"  style="width:100px; height:30px;" required autofocus=""/>
  <br><br>
  <input id="shiny" type="submit" value="Ok" name="SubmitButton"/>
  &nbsp;&nbsp;&nbsp;
  <input id="shiny" type="submit" value="Clear" name="ClearButton"/>
</form>
<?php

// Function to generate the fibonacci series
function DiplayFibonacciSeries($n)
 {
 
  $first = 0;
  $second = 1;
 
  echo "<h4>Fibonacci Series</h4>";
  echo $first.' '.$second.' ';
 
  for($i = 2; $i < $n; $i++){
 
    $third = $first + $second;
 
    echo $third.' ';
 
    $first = $second;
    $second = $third;
 
    }
}

$values = $_POST['inputText'];

if(isset($_POST['SubmitButton']))
   {

  $n= (int)$values;
  DiplayFibonacciSeries($n);
 }

?>

</body>
</html>