Monday, October 5, 2020

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>

Friday, October 2, 2020

Fibonacci Sequence in VB6

  A simple fibonacci sequence in vb.net that I wrote that will ask the user to give an integer value and then it will generate the fibonacci sequence in the listview in Visual Basic 6.

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


Dim a As Integer
Dim b As Integer
Dim fib As Integer

Private Sub Command1_Click()
        a = 0
        b = 1
        Dim userinput, i As Integer
        userinput = Val(Text1.Text)
        i = userinput
        List1.AddItem (1)
        Do
            fib = a + b
            a = b
            b = fib
            List1.AddItem (fib)
            i = i + 1
        Loop While fib < i
End Sub

Private Sub Command2_Click()
Text1.Text = ""
List1.Clear
Text1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub

Fibonacci Numbers in VB NET

Fibonacci Sequence in VB.NET

 A simple fibonacci sequence in vb.net that I wrote that will ask the user to give an integer value and then it will generate the fibonacci sequence in the listview in 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 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

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim a As Integer = 0
        Dim b As Integer = 1
        Dim fib As Integer
        Dim userinput, i As Integer
        userinput = Val(TextBox1.Text)
        i = userinput
        ListView1.Items.Add(1)
        Do
            fib = a + b
            a = b
            b = fib
            ListView1.Items.Add(fib)
            i = i + 1
        Loop While fib < i
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        ListView1.Clear()
        TextBox1.Focus()
    End Sub

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


Fibonacci Series in C

Fibonacci Series in C

 Write a program that will ask the user to give an integer and then the program will generate the Fibonacci series using C as my 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

// fibonacci.c
// Author   : Jake Rodriguez Pomperada,MAED-IT,MIT
// Date     : October 2, 2020   Friday  2:52 PM
// Website  : http://www.jakerpomperada.blogspot.com
//            http://www.jakerpomperada.com
// Email    : jakerpomperada@gmail.com
// Location : Bacolod City, Negros Occidental

#include <stdio.h>


int fibonacci_series(int n) {
   if (n <= 1)
   return n;
   return fibonacci_series(n-1) + fibonacci_series(n-2);
}

int main() {
   int n=0,a=0;
   
   printf("\n\n");
   printf("\tFibonacci Series in C");
   printf("\n\n");
   printf("\tGive a Number : ");
   scanf("%d",&n);
   printf("\n");
   printf("\tDisplay Results");
   printf("\n\n");
   printf("\t");
   for(a=0;a<n;a++) {
    printf(" %d ",fibonacci_series(a));
   }
   printf("\n\n");
   printf("\tEnd of Program");
   printf("\n");
}

Fibonacci Series in C++

Fibonacci Series in C++

Write a program that will ask the user to give an integer and then the program will generate the Fibonacci series using C++ as my 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

// fibonacci.cpp
// Author   : Jake Rodriguez Pomperada,MAED-IT,MIT
// Date     : October 2, 2020   Friday  1:09 PM
// Website  : http://www.jakerpomperada.blogspot.com
//            http://www.jakerpomperada.com
// Email    : jakerpomperada@gmail.com
// Location : Bacolod City, Negros Occidental

#include<iostream>

using namespace std;

int fibonacci_series(int n) {
   if (n <= 1)
   return n;
   return fibonacci_series(n-1) + fibonacci_series(n-2);
}

int main() {
   int n=0;
   
   cout << "\n\n";
   cout << "\tFibonacci Series in C++";
   cout << "\n\n";
   cout <<"\tGive a Number : ";
   cin >> n;
   cout << "\n";
   cout << "\tDisplay Results";
   cout << "\n\n";
   cout << "\t";
   for(int a=0;a<n;a++) {
    cout<<fibonacci_series(a)<<" ";
   }
   cout << "\n\n";
   cout << "\tEnd of Program";
   cout << "\n";
}

Thursday, October 1, 2020

Sum, Product, and Divide in Visual Basic 6

Sum, Product, and Divide in Visual Basic 6

  I will show you how to write a program using Visual Basic 6 application that will ask the user

to give two integer values and then the program will compute the sum, product, and divide values of the two numbers given by the user.

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


Private Sub Command1_Click()

a = Val(Text1.Text)

b = Val(Text2.Text)


Text3.Text = (a + b)

Text4.Text = (a * b)

Text5.Text = (a / b)

End Sub


Private Sub Command2_Click()

End

End Sub