Wednesday, January 28, 2015

Menu in C++

In this article I would like to share with you one of my c++ codes that I wrote a long time ago that will give you an idea how to construct a navigational menu using C++ as our programming language. This sample menu that I wrote uses switch case statement for the selection of entries in our menu. 

I hope you will find my work useful in your learning in C++ programming. If you have some questions regarding on my work feel free to send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Thank you very much and Happy Programming.




Sample Output of Our Program


Program Listing

// Created By: Mr. Jake Rodriguez Pomperada, MAED-IT
// Date : April 1, 2010 Thursday
// Tool : C++
// Email : jakerpomperada@yahoo.com
// Facebook Address : jakerpomperada@yahoo.com

#include <iostream>
#include <stdlib.h>

using namespace std;

main() {

    char choice;

    do {
       system("cls");
        cout << "\n\t\t     MENU IN C++ ";
        cout << "\n\n\t Created By: Mr. Jake R. Pomperada, MAED-IT";
        cout << "\n\n";
        cout << "\n\t\t\t 1. Add Record ";
        cout << "\n\t\t\t 2. Edit Record ";
        cout << "\n\t\t\t 3. Delete Record ";
        cout << "\n\t\t\t 4. View Record ";
        cout << "\n\t\t\t 5. Quit Program ";
        cout << "\n\n";
        cout << "\n\t\t Enter Your Choice :=> ";
        cin >> choice;

        if (choice == '1') {
            cout << "You select Add";
            break;
        }
        else if (choice == '2') {
            cout << "You select Edit";
            break;
        }
    else if (choice == '3') {
            cout << "You select Delete";
            break;
        }
        else if (choice == '4') {
            cout << "You select View";
            break;
        }
         else if (choice == '5') {
            cout << "\n\n\tThanks for using this program and return to OS.";
            break;
        }
     else if (choice != '5') {
         cout << "\n\n\n \t\t\t Invalid Option Try Again...";
         cout << "\n\n";
        system("pause");
          }

    } while (choice != '5');
    cout << "\n\n";
    system("pause");
}


Friday, January 23, 2015

Fibonacci Number Series Generator in PHP

In this article I would like to share with you one of a sample program that I wrote just to learn and practice my skills in PHP programming I called this program Fibonacci Number Series Generator in PHP. What the program will do is to ask the user to enter a number and then our program will generate the fibonacci number series in a given number by our user.

If you have some question please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

People here in the Philipines who wish to contact me can reach me at 09173084360.

Thank you very much and Happy Programming



Sample Output of Our Program

Program Listing

<html>
<title> Fibonacci Number Series Generator </title>
<style>
body { 
  font-size:20px; 
  font-family:arial;
  color:blue;
  } 
</style>
<?php

$values = $_POST['value'];

   
 function fibonacci($variable) 
{
   $counter = 0 ; $fibo1 = 0; $fibo2 = 1;
   
   echo $fibo1." , ";  echo $fibo2." , "; 

  while ($counter < $variable ) 
  {
     $fibo3 = $fibo2 + $fibo1 ; 
     echo $fibo3." , "; 
     $fibo1 = $fibo2 ;
     $fibo2 = $fibo3 ; 
     $counter+=1;
  } 
}


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

$title = "List of Fibonacci Number Series";

    if (ctype_alpha($values)) {
      echo "<script>";  
  echo "alert('PLEASE ENTER A NUMERIC VALUE.');";
  echo "</script>";
  $values="";
           $result="";
 }
    else  if ($values=="") {
      echo "<script>";  
  echo "alert('It Cannot Be Empty!!! Please enter a integer value.');";
  echo "</script>";
  $values="";
           $result="";
 }
   }  

if(isset($_POST['clear'])) {
  $title=""; 
  $values=" "; 
  $result="";
  $fibo1="";
  $fibo2="";
}

?>
<body style='background-color:lightgreen'>
<div style='width:800px;margin:auto'>
  <br> <h1 align="center">Fibonacci Number Series Generator</h2>
  <br>
<form action="" method="post">
 Enter a Number : <input type="text" name="value"    value="<?php echo $values; ?>" autofocus  size=20/>
   <input type="submit" name="check" value="Find Fibonacci Number" 
  title="Click here to view the list of Fibonacci Number Series."/>
  <input type="submit" name="clear" value="Clear" 
  title="Click here to clear text box and values on the screen"/>
</form>
<br> <br>
<?php 

echo $title;
echo "<br><br>";
fibonacci($values);
 ?>
  </body>
</html>




Thursday, January 22, 2015

Employee's Attendance Monitoring System in PHP and MySQL


     About this code I will monitor the attendance of the employees in a company by asking the employees to check in and check out using employees user name and password. The system will also compute the number of hours the employee work in a day and generates summary of attendance report of the employee. This code will also teach programmers how to use one to many relationship in MySQL as well as the effective use of Primary Key and Foreign Key and database normalization. I hope you will find my work useful if you have some questions regarding my work please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. 


People here in the Philippines who wish to contact me can text or call me at 09173084360 and 09993969756. 

Thank you very much and Happy Programming








Sample Output of Our Program




Decimal To Binary Conversion Using PHP

In this article I would like to share with you a program that I wrote using PHP I called this program Decimal To Binary Conversion Using PHP. What the program will do is to accept integer value from the user and then the user where able to convert the value in binary equivalent I also make sure if the user give a letter in the text box our program will inform the user to enter integer numerical number instead of a letter. In addition if the user forget to enter a number our program will inform the user that the text box cannot be empty. The code is very easy to understand because PHP has a built in function to convert decimal number into binary equivalent using printf and sprintf statements.

I hope you will able to find my work useful and beneficial if you have some questions regarding my works in programming feel free to send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

People here in the Philippines who wish to contact me can reach me at my mobile number 09173084360 and +63 (034) 4335675.

Thank you very much and Happy Programming


Sample Output of Our Program


Friday, January 16, 2015

Student Profile System With Picture Upload and Report Generation

One of the interesting aspects of developing business application is that applications requirements changes from time to time. In this article I would like to share one of the application that I wrote for a client I called this program Student Profile System with Picture Upload and Report Generation. This application will able the user not only to input information about the student but also able to upload picture of the student to the database and afterwards able to generate report for printing. I store all the picture in a folder instead to the database itself because it will make our database bigger and slower when we do some search of records in our tables.

I hope this simple program will you an idea how to accomplish uploading picture, viewing of records with the picture you upload and printing of reports. If you have some questions feel free to send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can reach me at my mobile number 09173084360 and my telephone number at home at (034) 4335675.

Thank you very much and Happy Programming.



Sample Output of Our Program




Thursday, January 8, 2015

On The Job Training Time Monitoring System in PHP and MySQL

Here is a simple time management system that I wrote in PHP and MySQL to monitor the total number of hour rendered by the student in their on the job training in a company I called this program on the job training time monitoring system written in PHP and MySQL. The advantage of this system it will notify the supervisor or the person in charge to the student if the student has already reached the number of hours of their on the job training in the company.

I hope you will find my work useful and beneficial if you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. People here in the Philippines who wish to contact me can reach me at my mobile number 09173084360.

Thank you very much and Happy Programming.





Sample Output of Our Program



Prime Number Generator in PHP

As a programmer I always learns how to apply my previous knowledge in other programming language before I wrote a program that will generate prime numbers in C and C++ programming language. The program works perfectly in my programming class. Recently I am more involved in wed design and development my main primarily language of choice in PHP so I have decide why not rewrote my code from C/C++ into its PHP equivalent here is it a prime number generator written in PHP. 

As we know a prime number is a number that is divisible by one and only itself example of prime numbers are 2,3,5.7,11,13 and 17 etc. In this sample program I make a form which the user can enter a number and then their are two buttons the first one will check if the number is a prime number or not and the other button will clear the text box and the results in our webpage. I also incorporate autofocus as a function in my program this function is available in HTML 5 to make the cursor focus in our text field. My program will also display the list of numbers that are not prime in terms of their values.

I hope you will find my work useful and beneficial if you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. People here in the Philippines who wish to contact me can reach me at my mobile number 09173084360.

Thank you very much and Happy Programming.



Sample Output of Our Program

Program Listing

<html>
<title> Prime Number Generator </title>
<style>
body { 
  font-size:20px; 
  font-family:arial;
  color:blue;
  } 
</style>
<?php

$values = $_POST['value'];

if(isset($_POST['clear'])) {
  $title=""; $a="";
  $values=" ";
}
?>
<body style='background-color:lightgreen'>
<div style='width:800px;margin:auto'>
  <br> <h1 align="center">Prime Number Generator</h2>
  <br>
<form action="" method="post">
 Enter a Number : <input type="text" name="value"    value="<?php echo $values; ?>" autofocus  size=20/>
   <input type="submit" name="check" value="Check Prime Number" 
  title="Click here to view the list of prime numbers"/>
  <input type="submit" name="clear" value="Clear" 
  title="Click here to clear text box and values on the screen"/>
</form>


<?php

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

$title ="List of Prime Numbers";
$title2="List of Non-Prime Numbers";

echo $title;
echo "<br><br>";
for( $a = 2; $a <= $values; $a++ )
{
   for( $b = 2; $b < $a; $b++ )
   {
     if( $a % $b == 0 )
      {
        break;
      }
      
   }

    if( $a == $b )
{
    echo " ".$a." ";
}
  }
  echo "<br><br>";
  echo $title2;
  echo "<br><br>";
  
  for( $c= 2; $c <= $values; $c++ )
{
   for( $d = 2; $d < $c; $d++ )
   {
     if( $c % $d == 0 )
      {
        break;
      }
      
   }

    if( $c != $d )
{
    echo " ".$c." ";
}
  }


  }

?>
</body>
</html>


Tuesday, January 6, 2015

PHP Framework::Downloading and Installations in Laravel 4

This article is written by a good friend of mine named Mr. Ronard G. Cauba he his a practicing web developer and software engineer here in the Philippines. In this article he will discuss how to download and install Laravel 4 in your computer.

Downloading and Installations in Laravel 4
1. You need to donwload composer for PHP. So that we can proceed for downloading and installing Laravel to our Xampp
This is the link of composer: https://getcomposer.org/Composer-Setup.exe.
2. After downloading and installing your composer installer.
Note: The composer installations will ask about your PHP directory where the locations of your PHP.exe. More info just research on google.
3. Open you CMD or Window+R and input this command line: composer create-project laravel/laravel your-project-name --prefer-dist
Note: Wait until the package will be finished and follow the path of below generated in your CMD where the location of your package saved.
4. After you find the path where the package save. Copy the package and paste to your htdocs in Xampp or www in Wampp.
5. Rename the the folder name to your projec name.
5. Open your command promt and input type this line: CD C:/xampp/htdocs/laravelProject
6. And hit enter
7. Once you are in with the said path above.
8. Kindly input this command line to your CMD: php artisan serve
9. Go to your browser and type this URL: localhost:8000
10. Finally you are now in the home page of your project.

Please visit my FB group for those programmers from Negros: https://www.facebook.com/groups/1472022079753106/

If you would like to contact my friend Ronard here in the Philippines you can reach him through his mobile number : 09352887840 and his email address at ronardcauba@zoho.com


Thank you very much and Happy Programming


Prisoner Visiting Management System in PHP and MySQL

In this article I would like to share with you a program that is written by a good friend of mine Mr. Ronard G. Cauba a fellow software engineer and web developer here in Negros Oriental, Philippines. I ask permission to him to share his work to our website which he agree provided we acknowledge him as the author of the program which we agree to do so. I am very thankful that some of my programmer friends like Ronard is also sharing their works to our fellow developers and programmers to give them ideas to create different application programs particularly the use of PHP and MySQL as their programming language.

About the program he called his system Prisoner Visiting Management System written in PHP and MySQL what the system will do is to manage the visitors of inmates in the Jail. It also count the number of hours the visitor can only stay in the Jail to visit there prisoners love ones. In addition it has functions to monitor the profile of the prisoners in the Jail. Generate reports of number of visitors per month and generation of PDF document for record purposes and documentation.

If you would like to contact my friend Ronard here in the Philippines you can reach him through his mobile number : 09352887840 and his email address at ronardcauba@zoho.com

You can also reach me at my email address at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much and Happy Programming





Sunday, January 4, 2015

Time Record System in PHP and MySQL

Hi there in this article I would like to share with you a simple business application program that I wrote that will monitor the attendance of the student and employees in a company I called this program Time Record System in PHP and MySQL. What the program will do is to allow the student or employee's to time in and time out when they report in their class or work. The program will count the number of hours an employee work in the company. There are still many things to do in order to improve how this program works properly with different scenarios what is important we can have an idea how to perform computation of hours rendered by employees in their work.

If you like my work please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. My mobile number here in the Philippines is 09173084360.

Thank you very much and Happy Programming




Sample Output of Our Program


Saturday, January 3, 2015

Three Dimensional Array in C++

In this article I would like to share with your how to write a three dimensional array in c++ also known as multidimensional array. The logic behind three dimensional array in C++ is the use of three for loop statement. In most programming problems the use of three dimensional array is rarely being used but it is a good idea to have some knowledge how write multidimensional array using C++ as our programming language.

If you have some questions regarding about my work please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much and Happy Programming.


Sample Output of Our Program


Program Listing

#include <iostream>

  using namespace std;

   main()
   {
       int elements[2][2][2];
       int count=1;

      cout << "\n\n Three Dimentional Array";
      cout << "\n\n";
     for (int a=0; a<2; a++) {
        for (int b=0; b<2; b++) {
           for (int c=0; c<2; c++) {

            cout << "Enter Values No "
            << count++
            << " : ";



            cin >>elements[a][b][c];
           }
        }
     }
     cout << "\n\n";
     cout << "List of Values ";
     cout << "\n\n";
     for (int a=0; a<2; a++) {
        for (int b=0; b<2; b++) {
           for (int c=0; c<2; c++) {
            cout << "\n" << elements[a][b][c];
           }
        }
     }

     cout << "\n\n";
     system("pause");
   }



DOWNLOAD SOURCE CODE HERE

Thursday, December 25, 2014

Addition of Five Numbers in Java Server Pages


One of the interesting web scripting programming language that is based on Java is Java Server Pages or JSP this programming language is based on Java but their are some similarities in terms of syntax in PHP. As I having my christmas vacation at home I try to keep myself busy by learning other programming language one of its is JSP or Java Server Pages. At first I find it very confusing and hard just to write a single line of code primary because majority of my experience in based in using PHP as my primary web programming language.

Basically before you can write your first JSP program you must download and install the Apache Tomcat Web Server that enables you to run your JSP script on it. The tomcat installer is very small and very easy to install and configure it is very similar to Apache web server in many ways the only difference it can only runs Java related codes like JSP and Servlets. 

What are program will do is quite simple it will ask the user to enter five numbers in our form and then send those five number values to another page using POST method and then our JSP script will compute the sum of the five numbers. The code is very simple and easy to understand once you have a basic background in Java programming you can easy leverage your existing knowledge in JSP programming.

I hope you will find my work useful and beneficial I'm just a beginner in terms of programming using JSP. If you have some questions please send me an email at jakerpomperda@gmail.com and jakerpomperada@yahoo.com.

People here in the Philippines who wish to contact me can reach me through my mobile numbers at 09173083260 and 09993969756.

Thank you very much and Happy Programming




Sample Output of Our Program

Program Listing

index.htm

<html>
    <head>
        <title>Addition of Five Numbers</title>
    </head>
    
     <body bgcolor="lightgreen">
 <br><br>
<h2> Addition of Five Numbers </h2>
<br>
        <form action="./add.jsp">
            First number: <input type="text" name="val1"/><br>
            Second number: <input type="text" name="val2"/><br>
            Third number: <input type="text" name="val3"/><br>
            Fourth number: <input type="text" name="val4"/><br>
            Fifth number: <input type="text" name="val5"/><br>
          <br><br>
 <input type="submit" value="Solve" title="Click here to find the sum." />
        </form>
    </body>
</html>

add.jsp

<html>
    <head>
        <title>Addition of Five Numbers</title>
    </head>
   
<body bgcolor="lightgreen">
 <br><br>
<%
int a,b,c,d,e1,sum;
try{
a=Integer.parseInt(request.getParameter("val1"));
b=Integer.parseInt(request.getParameter("val2"));
c=Integer.parseInt(request.getParameter("val3"));
d=Integer.parseInt(request.getParameter("val4"));
e1=Integer.parseInt(request.getParameter("val5"));

sum=(a+b+c+d+e1);
out.println("<h1> The total sum of " +a+ ", " +b+" ,"+c+" , "+d+", "+e1 + " is " + sum + ".</h1>");
}
catch(Exception e)
{
out.println("<script>alert('You entered invalid number',); </script>");
}
%>
    </body>
</html>



Friday, December 19, 2014

Count Number of File Downloads in PHP

In this article I will share with you a program that I wrote to count the number of downloads of a certain files using PHP as our programming language. The code does not uses mysql to store the number of downloads rather it uses a text file to store how many times the file is being downloaded from the website. Actually there are many methods in order to count the number of times the file is being downloaded from a website. Feel free to change or modify my code to suit in your needs.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines who wish to contact me can reach me through my mobile numbers 09173084360 and 09993969756.



Sample Output of Our Program


Wednesday, December 17, 2014

Count Number of Visitors in PHP

In this article I would like to share with a very simple program  that is written in PHP to count the number of views on a web page. In order for us to count the number of views in a particular website in their webpage we are using sessions function in PHP. The sessions is a process that we want start if login or visit a particular website it is very similar to cookies that is being stored in our web browsers the only difference is cookies save the information in the history of our browser. Everytime the user open this web page it will increment the number it  is the same way is we just refresh our web page using using F5 from our keyboard.

I hope you will find my work useful to add functionality in your website that using PHP and MySQL as your main developmental language. If you have some questions regarding my work feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

People here in the Philippines who wish to contact me can reach me through my mobile numbers 09173084360 and 09993969756

Thank you very much and Happy Programming



Sample Output of Our Program


Program Listing

<html>
<title> Count Number of Views </title>
<body bgcolor="lightgreen">
<style>
div#first {
 position:absolute;
 right:820px;
 }
</style>
<br><br>
<font face="comic sans ms" size="3" color="blue">
<?php

session_start();

if(isset($_SESSION['visitor']))
     $_SESSION['visitor']+=1;
else
    $_SESSION['visitor']=1;
    echo"<h1> <div id='first'>Total Number of Views : ".$_SESSION['visitor']." </div></h1>";
echo "<br><br><br>";
echo "<h3> Written By: Jake R. Pomperada  </h3>";

echo "<font size='5'>Email Address : </font>";
echo "<br>";
echo "<h3>jakerpomperada@yahoo.com<br>";
echo "jakerpomperada@gmail.com </h3>";
?>
</font>
</body>
</html>


Monday, December 15, 2014

Product Cost Information System in PHP and MySQL

Yesterday I have a chance to visit a bookstore here in the Philippines as I glance their collection of books. One of the book gets my attention the title is Teach Yourself SQL in 24 Hours I bought the book immediately and started reading it. I find out what are the proper ways of using SQL statements in developing a database application I also understand the concepts of database normalization, relational database concepts and correct practices in designing and developing database driven applications.

One of the interesting topic that I read is all about calculated fields in SQL as far I understand calculated fields is far more important in a sense we do most computation using the fields in our table. It is a good practice not to store computed values on a field because if we change the value in other field we must also update the compute values in other field. What a waste of time to us and also be create erroneous results in our computation during the process because we have fixed the value store in our tables in the database.

In this article I will show you how to create a Product Cost Information System using PHP and MySQL as my programming language to demonstrated how to use properly the calculated fields in SQL and also the use the SUM() function in SQL correctly. What the program will do is very simple it will populate the records from our table and then perform a series of computation using calculated fields in SQL that I declare in our program and then display the results in our webpage. The program code itself is very simple and easy to understand I also use Twitter Bootstrap to improve the appearance of our result in our webpage.

I hope you will find my work useful in your programming projects and applications that uses PHP and MySQL as your main developmental language.If you have some questions you can send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. Be one of my friends in www.facebook my address is https://www.facebook.com/jake.pomperada

People here in the Philippines who wish to contact me can reach me at my mobile numbers 09173084360 and 09993969756. My telephone number at home is +63 (034) 4335675.

Thank you very much and Happy Programming.





Sample Output of Our Program



Thursday, December 11, 2014

Object Oriented Programming in PHP

One of the most popular web scripting language now a days in PHP formerly known as Personal Home Page as a developer this programming language one of my favorite in building different types of application from website to business applications on wide variety on clients. In this article I would like to share with you my experience in writing object oriented programming in PHP.

At first learning how to program in object oriented is quiet focusing if you have trained in procedural programming also known as structured programming. In object oriented programming we start in declaring a class which acts as blue print of our object. In our class we declare public variable that we will use are attributes or properties of our object and then after that we create our methods also know as behavior that will carry out the actions of our class. In this example I wrote a a class math and then I declare two variables as public variable which means I can use this two variables outside of my class. In PHP 5 we use the keyword  __construct which allows us to pass parameters in our function solve as our method in our class. 

We later create an object that will inherit the attributes and methods of our class math I called our object product. As you observe I am also using a keyword $this this keyword in PHP act as a pointer to pointing the attributes we have in our class in this case our attributes are $val1 and $val2. After which I create a function to perform the multiplication of the two value that we pass in our function parameters. I called the function named solve() this function will not only perform multiplication operation but also display the computed result on our web page.

public function solve() {
$sum = ($this->val1 * $this->val2);
echo "The product of " .$this->val1. " and " 
    .$this->val2. " is " .$sum.".";
}


To create an object I used the follow commands   $product = new math(2,4);  and I also pass two values to be multiplied by our function. Take note we know that we create an object by using the new statement in PHP. After which we display the result in our web page by declaring the following statements below.

echo "<h1> <font color='green'>"; echo $product->solve(); echo "</h1> </font>";   


I hope this object oriented programming article that I wrote will give you some insights how to write object oriented program using PHP as your programming language. The benefits of learning object oriented programming in PHP is very significant you can make your code must easier to write, maintain and most important you can easy learn how to use PHP framework like Zend, CakePHP, CodeIgniter and Symfony because this frameworks are written in object oriented way.

If you have some questions about my works feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

People here in the Philippines who wish to contact me can reach me in my mobile numbers 09173084360 and 09993969756.


Sample Output of Our Program


Program Listing

<?php class math { public $val1, $val2; public function __construct($val1, $val2 ) 
{
$this->val1 = $val1; $this->val2 = $val2;
}
public function solve()
{ $sum = ($this->val1 * $this->val2);
echo "The product of " .$this->val1. " and " .$this->val2. " is " .$sum.".";
}
} $product = new math(2,4); echo "<h1> <font color='green'>"; echo $product->solve(); echo "</h1> </font>";
?>


Worker's Payroll System Using JavaScript

In this article I would like to share with you a program that is being developed and presented to me by my student we called this program workers payroll system written in Javascript. Before I publish this code I ask permission from them if they allow me to share their work to other people specially students that are new in Javascript and they yes to here is it. 

The following are my student contribute in writing this program JB Vie C. Busaing,  Maricar S. Conde, John Paul C. Divinagracia, Nylre Jel C. Ortega, Krisha Carey L. Ureta and  Arvel B. Vergara.

What this program will do is to compute the net pay of the employee in the company after all the deductions like tax, cash advances, pagibig and many other deductions. The deductions are based here in the Philippines.

I you have some questions regarding to our work you can send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Thank you very much.





Sample Output of Our Program