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");

}