Tuesday, September 16, 2014

Fahrenheit To Celsius Solver in Bash

In this article I would like to share with you a sample program that I wrote using BASH scripting language or Bourne Again Shell in Linux operating system I called this program Fahrenheit To Celsius Solver in Bash. What the program will do when the user run the script using ./fah.sh or bash fah.sh it will ask the user to enter the temperature in Fahrenheit and the program will convert it to its Celsius equivalent.

The script is very short and very easy to understand a good way to automate some math problems using Bash as our programming language under the Linux environment. If you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much.


Sample Output of Our Program


Program Listing

#!/bin/bash

# Fahrenheit To Celsius Solver
# Written By Mr. Jake R. Pomperada, MAED-IT
# Operating System : UBUNTU 14.04
# Date : September 16, 2014

start()
{
clear
echo -e "\n"
echo -e "\t (====== FAHRENHEIT TO CELSIUS SOLVER  =====)";
echo -e "\n"

read -p  "Please Enter Temperature in Fahrentheit : " fah
compute=$(echo "scale=2;((($fah -32) * 5) / 9)"|bc)

echo -e "\nTemperature in Fahreneit is $fah\xe2\x84\x83 ."
echo -e "The equivalent temperature in Celsius is $compute\xe2\x84\x83."

while true; do
  echo -e "\n"
  read -p "More (Y/N)? " answer
  case $answer in
       [Yy]* ) start;  break;;
       [Nn]* ) bye; break;;
       * ) echo "Please answer yes or no. ";;
  esac
done
}

bye()
{
echo -e "\n"
echo -e "\t Thank You For Using This Program.";
echo -e "\n\n";
}

start

DOWNLOAD FILE HERE

Friday, September 5, 2014

Prime Number Checker in Bash

I'm still learning how to program in Bash or Bourne Again Script that is very useful in system administration in Unix or Linux operating system. There is already some improvements in my understanding how to create different types of script using Bash. Indeed learning Bash scripting programming is a wonderful journey that everyone that is interested will truly enjoy.

In this article I would like to share with you a simple script that will check if the given number by the user is a prime number or not. First thing we must able to understand what is really a prime number. A prime number an be divided evenly only by 1, or itself. And it must be a whole number greater than 1 there are many examples of  prime number one example is 3 that can divided evenly by 1 and itself the same with 5,7,11,13,17,19 and so on and so forth. An example of number that is not a prime number is 8 that is very divisible by 2,4.

I hope you will find my sample bash script useful in your learning bash programming. If you have some questions feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much.


Sample Output of Our Program


Nano Text Editor used in writing this program

 
Program Listing

#!/bin/bash

# Prime Number Checker
# Written By Mr. Jake R. Pomperada, MAED-IT
# Operating System : UBUNTU 14.04
# Date : September 5, 2014 Friday


echo -e "\n"
echo -e "\t (====== PRIME NUMBER  CHECKER =====)";
echo -e "\n"

read -p  "Kindly enter a number : " number
echo -e "\n"

a=2
b=0

while [ $a -lt $number ];
 do
   solve=$(($number % $a))

  if [[ $solve -eq $b ]]; then
       echo " The $number is NOT a PRIME NUMBER."
       echo -e "\n"
       exit
  else
    a=$(($a+1))
  fi
done
       echo " The $number is a PRIME NUMBER."
       echo -e "\n"

DOWNLOAD FILE HERE

Thursday, September 4, 2014

Leap Year Checker in Bash

In this article I would like to share with you a simple bash script that I wrote to check if the given year by the user is a leap year or not a leap year. In order for us to understand leap year occurs every four years just like the Olympic games examples of leap year are 1988, 2000, 2004, 2008 and etc. 

The formula in bash script in checking for leap year is a=$(($year % 4)) in this expression we assign a variable a to check if the given year that is being stored in variable year has a remainder of 4. The operator we use to check of remainder is % also known as modulo. If assignment operator a is equal to without any remainder in the given year that year will become a leap year. In addition our script will allow the user to repeat the program running by asking the user if the user would like to run the program again or not. What is good about this script it checks if the response of the user to run the program is valid or not valid it makes our script more secure in accepting only valid response from our user.

I hope you will find our program useful in your learning how to write bash script in Linux and Unix operating system. If you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much.



Sample Output of Our Program


The nano text editor used in writing our script.


Program Listing

#!/bin/bash

# Leap Year Checker
# Written By Mr. Jake R. Pomperada, MAED-IT
# Operating System : UBUNTU 14.04
# Date : September 4, 2014 Thursday

start()
{
echo -e "\n"
echo -e "\t (====== LEAP YEAR CHECKER =====)";
echo -e "\n"

read -p  "Please enter a year : " year
echo -e "\n"

a=$(($year % 4))
b=$(($year % 100))
c=$(($year % 400))


if [[ $a == 0 || $b == 0 || $c == 0 ]]; then
   echo "The $year is a Leap Year."
else
   echo  "The $year is Not a Leap Year"
fi
while true; do
  echo -e "\n"
  read -p "More (Y/N)? " answer
  case $answer in
       [Yy]* ) start;  break;;
       [Nn]* ) bye; break;;
       * ) echo "Please answer yes or no. ";;
  esac
done
}

bye()
{
echo -e "\n"
echo -e "\t Thank You For Using This Program.";
echo -e "\n\n";
}

start

DOWNLOAD FILE HERE

 


Wednesday, September 3, 2014

Even and Odd Number Checker in Bash

In this article I would like to share with you a simple program that uses BASH or Bourne Again Shell in Linux operating system I called this program Odd and Even number Checker.  What this program will do is to ask the user to enter a number and then the program will check and determine if the number odd or even number. What is good about this program is that after the program determine the number whether it is even or odd number. The program will ask the user to continue using the program or not if the user choose y for yes the program will run again, if no the program will terminate and will return to command line.

If hope you will find my work useful in learning how to program using Bash scripting language in Linux, Unix or others distributions. If you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much.


Nano text editor is used in writing the bash program


Change File Permission and Running our Bash Script Program



Sample Output of Our Program


Program Listing

#!/bin/bash

# Odd and Even Number Checker
# Written By Mr. Jake R. Pomperada, MAED-IT
# Operating System : UBUNTU 14.04
# Date : September 3, 2014

start()
{
clear
echo -e "\n"
echo -e "\t (====== ODD AND EVEN NUMBER CHECKER =====)";
echo -e "\n"

read -p  "Please enter a number : " number
echo -e "\n"

check_number=$(($number % 2))

if [ $check_number == 0 ]; then
   echo "$number is an even number."
else
   echo  "$number is an odd number."
fi
while true; do
  echo -e "\n"
  read -p "More (Y/N)? " answer
  case $answer in
       [Yy]* ) start;  break;;
       [Nn]* ) bye; break;;
       * ) echo "Please answer yes or no. ";;
  esac
done
}

bye()
{
echo -e "\n"
echo -e "\t Thank You For Using This Program.";
echo -e "\n\n";
}

start

Addition of Five Numbers in Bash

One of the interesting aspects of open source software is that we can explore different types of tools and programming languages that can help us in our everyday work. When I started learning Linux way back in 2010 I can say it is a different experience first time in my life I was able to learn an operating system that is free, open source, stable and best of all has many built in functions that cannot be found in windows operating system. At first I found myself in a difficult situation because of lacking of experience in Linux and there are only few books written on that particular subjects. The biggest hindrance for beginners like me how to learn the rules in using Linux in everyday computing activities.

The best advice that I get actually is the forum that I read in the Internet the journey in Linux or Unix operating system is a step by step process. Read a lot from blogs, tutorials and articles in the Internet and do some example activities in your computer by installing virtual machine or install the full installation of the operating in your computer. It takes a lot of courage and confidence to learn something new in this ever changing world of Information Technology. By persistence, hard work and patience your effort spend in learning Linux is a worth while.

In this article I would like to share with you my avid reader of my blog of the simplest script that I have written using BASH script of Bourne Again Shell I called this program addition of five numbers. What the program will do is to ask the user to enter five numbers and then it will compute for the sum of five numbers being given by our user. I am using Ubuntu 14.04 as my Linux distribution, I try to improve myself in the aspect of scripting programming using BASH because it is very useful in system administration of networks.

If you find my work useful let me know kindly send me an email at jakerpomperada@yahoo. com and jakerpomperada@gmail.com.

Thank you very much.

 Nano text editor used in writing this BASH script.


Change File Permission and Running our BASH script.

Sample Output of Our Program


Program Listing

#!/bin/bash

# addition.sh
# addition of five numbers in bash
# written by: Mr. Jake  R. Pomperada, MAED-IT
# tools : Ubuntu 14.04
# date  : September 03, 2014

clear
echo -e "\n"
echo -e "\t (===== Addition of Five Numbers =====)"
echo -e "\n"
read -p  "Enter First Number   :  " a
read -p  "Enter Second Number  :  " b
read -p  "Enter Third Number   :  " c
read -p  "Enter Fourth Number  :  " d
read -p  "Enter Fifth Number   :  " e

sum=$(expr "$a" + "$b" + "$c" + "$d" + "$e")

echo -e "\n"
echo "The sum of  $a, $b, $c, $d and $c is $sum.";
echo -e "\n"
echo -e "\t Thank you for using program."
echo -e "\n"


Saturday, August 30, 2014

Password Security in C++

One of the basic protection that we can apply in our computer is the use of password. In this article I will show you a sample program that I wrote before a simple password security program in C++. What this program will do is to ask the user to enter the correct password as you run the program, every time the user type the password it display asterisk character to hide the real password underneath it protects the user from anyone who looks in their screen while they are typing for this password to access their system.

I hope you will find my work useful in your quest in learning C++ as your programming language.

Thank you very much.


Sample Screen Shoot of Our Program

Program Listing

#include <iostream>
#include <conio.h>

using namespace std;

void start();

void start()
{
    char ch;
     string password;
       system("cls");
       cout << "\n\n";
       cout << "\t\t ===== SIMPLE PASSWORD VALIDATION =====";
       cout << "\n\n";
       cout << "\t Created By: Mr. Jake Rodriguez Pomperada, MAED-IT";
      cout << "\n\n\n\n";
      cout << "Enter Your Password ==> ";

         while ((ch=getch()) != 13) {
              cout << "*";
               password+=ch;
         }

         if (password == "123") {
             cout << "\n\n\n";
             cout << "\t\t\t Password is Right Access is Granted !!!";
             cout << "\n\n\n";
             system("pause");
         }
       else {
             cout << "\n\n\n";
             cout << "\t\t\t Password is Invalid Access is Denied !!!";
             cout << "\n\n\n";
             system("pause");
             start();
    }
 }


int main() {
    start();
}



Lower Case To Upper Case Conversion in C++

This program that I wrote will show you how to convert lowercase words in a given sentence into uppercase equivalent using C++ as my programming language. The C++ library file that I used to convert lowercase into uppercase is #include <cctype> this library file has a built in function called toupper() that enables the programmer to convert lowercase characters into uppercase characters. I hope you will find my work useful and beneficial in your learning how to program in C++.

Thank you very much.



Sample Output of Our Program

Program Listing

#include <iostream>
#include <cctype>
#include <string>

int main()
{
    using namespace std;
    string str;

   cout << " Lower Case To Upper Case String Conversion 1.0";
   cout << "\n\n";
   cout << "Enter a String : ";
   getline(cin,str);
    for (size_t i = 0; i < str.length(); ++i)
    {
        str[i]=toupper(str[i]);
    }

    cout << "\n";
    cout<<"\n Converted Results in Upper Case : "  <<str << ".";
    for (size_t i = 0; i < str.length(); ++i)
    {
        str[i]=tolower(str[i]);
    }

    cout<<"\n Converted Results in Lower Case : "  <<str << ".";
    cout << "\n\n";
    system("PAUSE");
}


Vowel Omitter in C++

In this article I would like to share with you a sample program that I wrote a long time ago in my class in C++ programming I called this program Vowel Omitter. What this program will do is to ask the user to enter a sentence and then the program will remove or omit all the vowels that can be found in the words in the given sentence. I used this program to show my students in my class that C++ has many features that are suitable in string manipulation not just solving numbers.

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

Thank you very much.


Sample Output of Our Program

Program Listing

#include <iostream>

 using namespace std;

int x=0,j=0, y=0,vow=0;
int countedw(char str[150]);

main()
{

char str[150];

cout << "\n\n \t VOWEL OMITTER ";
cout << "\n\n  Created By: Mr. Jake R. Pomperada, MAED-IT";
cout << "\n\n";
cout << "Type a Sentence :=> ";
gets(str);
cout << "\n\n";
cout <<"\nOriginal Words: " <<str ;

cout<< "\n\nRemaining letters: ";
countedw(str);


cout <<"\n\nTotal No. of Omitted Vowels:  " <<vow;
cout << "\n\n";
system("pause");

}


int countedw(char str[150])

{
char tmp,tmp1;
y=strlen(str);
for(x=0; x<=y; x++)
{

tmp=str[x];

  if (tmp!='a'&&tmp!='A'&&tmp!='e'&&tmp!='E'&&tmp!='i'&&tmp!='E'&&tmp!='o'&&tmp!='O'&&tmp!='u'&&tmp!='U' )
  {
   tmp1=tmp;

  cout << tmp1;

  }else{
  vow++;
     }
   }
}

DOWNLOAD FILE HERE

Wednesday, August 6, 2014

Positive and Negative Numbers Counter in C++

One of the basic programming problems that I have developed for my C++ programming class here in the Philippines is to count the number of positive and negative numbers being given by the user of our program. My intention of creating this program is to introduce my students in my programming class how to understand and learn how to use one dimensional array as their data structure to display the positive and negative numbers in our program.

Normally arrays is one of the simplest data structure in my own opinion that can be learned easy by apply person interested in computer programming. We can define array as a list of values that has the same data type and having the same variable name also. It is very easy to manage data if we are using arrays because we are only dealing with one variable name but we can identify different values in our array by its index or elements that we access in our program. 

If order for us to determine if the number is positive is by having using this condition in our program  if (numbers[y] >=0) this condition tells us the if number[x] is greater the zero then it will display all positive numbers in our program. In our case I consider zero as positive number in our example. For checking for negative numbers and display the values of our screen I am using this condition if (numbers[y] < 0) this condition implies that if the given numbers by our user is less that zero then the values to be displayed will be negative numbers.

I hope you will find my sample program beneficial and useful in your learning how to use arrays as your data structure in your C++ program. If you have some questions about my work please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Thank you very much.


Sample Output of Our Program

Program Listing

#include <iostream>

using namespace std;

main()
{
    int numbers[5];
    cout << "\n\n";
    cout << "\t Positive and Negative Numbers Counter";
    cout << "\n\n";
    for (int x=0; x<5; x++) {
        cout << "Enter item no." << x+1 <<  ": ";
        cin >> numbers[x];
     }
 cout << "\n\n";
 cout << "Positive Numbers";
 cout << "\n";
  for (int y=0; y<5; y++) {
    if (numbers[y] >=0) {
        cout << " " << numbers[y] << "";
    }
  }
  cout << "\n\n";
  cout << "Negative Numbers";
 cout << "\n";
  for (int z=0; z<5; z++) {
    if (numbers[z] <0) {
        cout << " " << numbers[z] << "";
    }
  }
 cout << "\n\n";
 cout << "\t Thank You For Using This Software.";
 cout << "\n\n";
}


Wednesday, July 30, 2014

Prime Number Checker in Python

In mathematics we refer a number that is a prime number if the number is greater than one  that has no positive dividend or divisor other than 1 and itself.  For example 7 is considered as prime number primarily because 1 and 7 are its only it positive integer factors, whereas 8 is composite because it has the divisor of 2 and 4.

I wrote this program using Python as my programming language if your find my work useful in your programming assignments and projects using Python you can send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Thank you very much.



Sample Output of Our Program


Program Listing

# Prime Number
# Written By: Mr. Jake R. Pomperada, MAED-IT
# Tools : Python
# Date  : July 30, 2014 Wednesday

def checking_prime_number(number):
 if number > 1:

   for i in range(2,number):
       if (number % i) == 0:
           print(number,"is not a Prime Number")
           print(i,"times",number//i,"is",number)
           break
   else:
       print(number,"is a Prime Number.")
   
 else:
   print(number,"is not a Prime Number.")

complete = False

while complete == False:

  print("@==================================@")
  print("      Prime Number Checker   ")
  print("@==================================@")
  print("");
  value = int(input("Kindly Enter a Number :=> "))
  print("");
  checking_prime_number(value)
  print("")
  choice = input("Are You Finish?  Y/N: ").lower().strip()
  if choice == "y":
         complete = True
  else:
   print("\n")
  print("Thank You For Using This Program.")
 


DOWLOAD FILE HERE

Tuesday, July 29, 2014

Math Expression Solver in JavaScript

Mathematics plays an important role in our lives everyday we use math buy a product or pay for services rendered to us. Indeed having this knowledge about mathematics is very significant to survive in this world. The computer that we ca enjoying using today is based of mathematics the word computer derive from the word "compute" or to calculate. I have learned reading in the books and watching documentaries about the history of computers that is main reason why it is being developed is during the wartime in World War II to calculate the trajectory of missiles and bombs for the US military. After the war ended the US government and computer scientist and engineers try to think what is the other usage of computers that the time they make computers for commercial use in banks and business to make business transactions much easier and efficient.

In today's society computer are being used in a wide variety of applications not only in military, business, education but also in many fields. In addition computers finds its place in education to teach the students how to use it for their studies and research works and assignments. In this article I would like to share with you a program that I wrote using JavaScript as my programming language I called this program Math Expression Solver in JavaScript. What is program will do is to ask the user to enter basic mathematical expression let say (10*2) + 3 our program will find its result in this case our program will first evaluation the first expression (10*2) that will gives us the result of 20 because we multiply 10 by 2 and in computers once the expression is being put with parenthesis it will be the first one to be process or evaluated by our compiler and then 20 will be added with 3 which gives us the final result of 23.

This program is very useful among students in their mathematics subjects and other people who wish to understand how to program using JavaScript as their programming language.

If you find my work useful please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

Thank you very much.


Sample Output of Our Program




Books Information System in PHP and MySQL

The technology that we use today makes our day to day work much easier compared as before primarily because if you a computer we can search a particular record much faster, more efficient and less prone for errors compared of finding a record using a traditional filling cabinet that we must exert some effort and time just to locate a particular record that is being stored in a folder.

This can be done with the use of computer as our machine and a software called database management software which caters of storing, manipulation, retrieval and generation of reports of records. Having this application in any business can ease the processing of big amount of information and makes the transaction much faster and easier both the user and the customer.

In this article I would like to share with you a sample database application that I wrote that can be useful in finding and processing of books in a library setting I called this program Books Information System written entirely in HTML,CSS, JavaScript, PHP and MySQL as my back end database tools of storing records. What is good about this program it will help the user to manage the different books that the library was able to acquire from different book publishers it makes book inventory and monitoring a breeze and will lessen the time spend in finding the particular book from the index card cabinet. 

I hope you will find my work useful as basis in your programming projects and assignments using PHP and MySQL as your tools in developing web based database applications.

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.



Sample Output of Our Program




Compound Interest Solver Using JavaScript

In today's world business plays an important role in our economy they make our nation growth, it generates jobs to our people and make our live much comfortable because we have money to spend in our day to day expenses such as foods, shelter, clothing and other basic human needs. In reality in life most of the time the income that we earn from our jobs is not sufficient enough to fill up our needs because of high cost of basic commodities like food ans shelter for example.

Most of us the easiest way is to lend money from a bank or lending institution but lending money is not an easy we must have to consider our capacity to pay such loan to avoid penalty such as big amount of monthly interest for the money that we lend from a bank or financial institution.  In this article I would like to share with you a simple program that I used in JavaScript to compute the compound interest rate of the money being loaned so that the user will able to learn and understand how much he or she must able to save and to pay for the loan they get from a bank or any lending institution.

The code is not difficult to understand it can run directly in any web browser without any problem because JavaScript programs are programs that runs on a client computers it does not need to run on the Internet most of the time. I hope you will find my work useful in your programming projects and assignments if you are using JavaScript as your developmental language of choice.

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

Thank you very much.



Sample Output of Our Program



Viewing of Customer Records

The use of database management system today is more important as before primarily because it used in many areas in our society today. Database applications used in business, medicine, schools, engineering, military and other industries that are relying on storing, manipulation of records and generation of reports that is being used in making good decisions based of the information gathered and processed.

At present time database application can no longer seen in a desktop application the Internet is also utilize to processing this data into a useful form of information. The main advantage of web based database applications compared to desktop based application is that records can be stored, processing, retrieve and generate reports anywhere in the world as long there is an Internet connectivity. In this article I would like to share with you a simple code that I wrote using PHP and MySQL that will retrieve all the records from our database in this case I am using MySQL as my back end in storing my records in my table.

The code is very short and very easy to understand I also include an SQL dumb file for easy creation of database, tables and insertion of records in our program. You can use this program in your programming projects is your are using PHP and MySQL as your tools in creating your database application.

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

Thank you very much.



Sample Output of Our Program




Friday, July 25, 2014

Form Validation Using JavaScript

The Internet is a great place to do some research on any topics that we have in our mind. There is a lot of resources out there that we can utilize as source of information that can help us in our day to day lives. Being a web developer one of my big challenges is how to validate information being given by the visitors to my site that I working with. This can be a big headache to us if the user gives us invalid values or no values at all in our form our website is useless primarily because we can't get relevant information  from our users that can help us improve our website or clients who wish to contact us about our product or services offered through the use of Internet as our medium communication.

In this article I would like to share with you a simple JavaScript for form validation that I wrote using the JavaScript code that I was able to get freely from http://www.javascript-coder.com/. The script is very useful in making form validations that can check if the visitor of our website was able to fill up information on several fields that we lay down in our website. The script itself is free to use in your website provided you do not remove the credits of the original author of the code.

I also include the HTML and CSS file for the webpage layout and design, you may modify the code that will fit in in your needs in your website you are planning to create and implement.

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

Thank you very much.



Sample Output of Our Program




Multiplication Table

In order for us to improve our programming skills we must always practice and solve different programming problems that we encounter in our day to day life. One of the most interesting problem that I encounter when I started write a program is how to create a multiplication table using C++ programming language as my primary language. Maybe some people think my problem is very easy and very basic but for me even a simple problem has a place for me in improving my skills and understanding how to create good algorithm to derive a solution to the problem.

I started using nested for loop statement to generate the multiplication values by multiplying the values of variable x and y. I also use the C++ library called iomanip or its stands for input and output manipulator to give spacing of values in our program. The code is very short and very easy to understand I intended my work for beginners in C++ programming I hope they will find my work useful.

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

Thank you very much.


Sample Output of Our Program


Zip File Content of Our Program

Program Listing

#include <iostream>
#include <iomanip>

using namespace std;

main()
{
    cout << "\t    Multiplication Table";
    cout << "\n\n";
    for (int x=1; x!=11; x=x+1) {
            cout << "\n";
            for (int y=1; y<=10; y++) {
        cout << setw(4) << x*y;
            }
    }
 cout << "\n\n";
}



Thursday, July 24, 2014

Odd and Even Number Determiner in C++

Array is one of the basic data structure in programming that is very important for beginning and experienced programmers able to understand and eventually to master. By definition an array is a list of values belongs with the same variable name and data type. For example int values[100] it means I have 100 elements or index under the variable name values and its data type for all the elements is integer.

One of the common applications of arrays in computer programming for example is that we ask the user to enter five numbers and then we want to display all the five numbers being given by our user earlier in our program. There are several solution to tackle this problem but the most efficient way is to use for loop statement and an array declaration just like this one int x[5] where x has five elements or index values. 

In this article I would like to share with you one of my program that I wrote for my class in C++ programming I called this program Odd and Even Number Determiner written entirely in C++ programming language. What the program will do is very simple it will ask the user to enter ten integer numbers and then it will display the list of numbers that are Odd and Even Numbers by generating a report.

I hope you will find my work useful in learning how to user one dimensional array and for loop statements in C++.

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

Thank you very much.


Sample Output of Our Program

Program Listing

#include <iostream>

using namespace std;

main() {
 int val[10];

cout << "\n\n";
cout << "<======== ODD AND EVEN NUMBER DETERMINER ======>";
cout << "\n\n";

 for (int x=0; x<10; x++) {
    cout << "Enter item no. " << x+1 << ": ";
    cin >> x[val];
 }
cout << "\n\n";
cout << "<======= GENERATED REPORT ======>";
cout << "\n\n";
 cout << "LIST OF ODD NUMBERS";
 cout << "\n\n";
 for (int x=0; x<10; x++) {
     if (x[val] % 2 == 0) {
       }
       else {
        cout << " " << x[val] <<" ";
       }
     }
  cout << "\n\n";
 cout << "LIST OF EVEN NUMBERS";
 cout << "\n\n";
 for (int x=0; x<10; x++) {
     if (x[val] % 2 == 0) {
       cout << " " << x[val] <<" ";
       }
       else {
       }
     }
cout << "\n\n";
cout <<"\t Thank You For Using This Program.";
cout << "\n\n";
}



Friday, July 18, 2014

Disable Submit Button Until All Text Fields Has an Entry Using JQuery

Developing web applications is a challenge both the web developer and web designer but most of the time the responsibilities is being given to the web developer. One of the most challenging is how to make sure that all the text field in your web page is being filled up by your visitor of your website. As a web developer our main concern is to ensure as much as possible the all the information that is being submitted by our visitor in our website is correct and accurate.

By doing some research in the Internet I saw a code in JavaScript that uses JQuery framework that will allows the web developer to add functionality in their webpage by forcing the visitor of their website to fill up all the text fields prior it is will send the information in the web server. The code is not difficult to understand and implement below is the sample code for our webpage.

I hope you will find my work useful and beneficial in your web design and development using JQuery as your Javascript framework. If you have some questions you can send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much.


Sample Output of Our Program


Program Listing

<html>
<head>
<title>Personnel Record System</title>
  
<script src="jquery.js"></script>
 <script>
     $(document).ready(function() {
  
$(function() {
    $('#send').attr('disabled', 'disabled');
});

$('input[type=text],input[type=password]').keyup(function() {
        
    if ($('#val1').val() !=''&&
    $('#val2').val() != '' &&
    $('#val3').val() != ''&&
    $('#val4').val() != '' &&
    $('#val5').val() != '') {
      
        $('#send').removeAttr('disabled');
    } else {
        $('#send').attr('disabled', 'disabled');
    }
});
    });
</script>
  
<style type="text/css">
html { background: lightgreen; }
</style>
  </head>
  <body>
<h3>
<br>
 Fill Up Forms </h3>
  <form action="#">
     <table border="1">
     <tr>
     <td><strong>Enter Your Name :</strong></td>
<td><input type="text" name="name" id="val1" />
     </tr>
     <tr>
     <td><strong>Enter Your Address :</strong></td>
<td><input type="text" name="address" id="val2" />
     </tr>
     <tr>
     <td><strong>Enter Your Mobile Number :</strong></td>
<td><input type="text" name="mobile" id="val3" />
     </tr>
      <tr>
     <td><strong>Enter Your Email Address</strong></td>
<td><input type="text" name="email" id="val4" />
     </tr>
<tr>
     <td><strong>Enter Your Facebook Address</strong></td>
<td><input type="text" name="fb" id="val5" />
     </tr>
     <tr>
     <td colspan="2">
      <center><input type="submit" value="Submit Information"  
 title="Click here to submit information in the database." id="send" />
       
     </td>
          </form>
</body>
</html>





Tuesday, July 15, 2014

Sentinel Login Security in PHP and MySQL

Working on the web is more intimidating compared with working in a desktop environment why because in the Internet there are many people using it and they are located in different locations around the world. One of the major concern is about security this is because anyone can access your personal information in the Internet once they gain access to your account such as username and password for instance.

In this article I would like to share with you a sample program that I wrote using PHP, MySQL and JQuery I called this program Sentinel Login Security. What this program will do is to check if the user is authorized to access the website by asking the user for its username and password. Once the user provide the necessary username and password our program will search the record from the database once the record exist it will allow the user to enter in the main page and the name of the user will also display on the main page. However if the username and password cannot be found in our MySQL database our program will do a small shake animation and display the message wrong username and password. 

I also added a button to cancel the operation and the webpage will automatically close itself from the web browser. The program is very easy to understand I also added an SQL dumb file to easy creation of the database, table and insertion of sample user records.

If you have some questions about my work please don't hesitate to email me at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much.


Login Page of our Program


Welcome Page of our Program




Wednesday, July 2, 2014

Student Grading Record System in C++

One of the most common business applications that is widely used is Student Grading System that is being used to compute and store information about the student school academic performance. In this article I would like to share with you a simple student grading system application that I wrote using C++ programming language.

In this application I am using structure as my data structure in storing different records of the students in an array. Using structure it enables us to store and retrieve different values from our array, in this program I have five variables that is being store in our structure name student records. This variables are follows 
string   first_name[5];   string last_name[5];   int age[5];   string major_course[5]; and  float gpa_grade[5];.

Our program will accept five names of the students from the user using one dimensional array we will store those different variable entries in our array and then populate all the records afterwards in our program. This program is simple enough to give you some idea how to understand the proper way how to use one dimensional array and structure in accepting and manipulating records. In writing this program I am using Code Blocks as my text editor and Dev C++ as my C++ compiler.

In hope you will find my work useful in programming assignments and projects in C++.

Thank you very much.

Sample Output of Our Program

Program Listing

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

using namespace std;

struct student_records{

  string first_name[5];
  string last_name[5];
  int age[5];
  string major_course[5];
  float gpa_grade[5];
};

main() {

     student_records student;

     cout << "\t =========================================\n";
     cout << "\t ===== Student Grading Record System =====\n";
     cout << "\t =========================================\n";


  for (int x=0; x<5; x+=1) {
    cin.ignore();
    cout << "\n\n";
    cout << "Enter student no." <<x+1 << " First name :";
    getline(cin,student.first_name[x]);
    cout << "Enter student no." <<x+1 << " Last name  :";
    getline(cin,student.last_name[x]);
    cout << "Enter student no." <<x+1 << " Age  : ";
    cin >> student.age[x];
    cin.ignore();
    cout << "Enter student no." <<x+1 << " Majoring : ";
    getline(cin,student.major_course[x]);
    cout << "Enter student no." <<x+1 << " GPA : ";
    cin >> student.gpa_grade[x];
  }

  cout << "\n\n";
  for (int y=0; y<5; y+=1) {
     cout << "\n\n";
     cout << "Record No. " << y+1;
     cout << "\n First Name : " << student.first_name[y];
     cout << "\n Last Name  : " << student.last_name[y];
     cout << "\n Age        : " << student.age[y];
     cout << "\n Majoring   : " << student.major_course[y];
     setprecision(2);
     cout << "\n GPA        : " << student.gpa_grade[y];
     cout << "\n\n";
  }
  system("pause");

}