Friday, June 29, 2018

Greeter in LISP

A simple program to ask the user to give user name and then our program will greet the user using LISP as our programming language.

I am using Common LISP is open source and free to download in the Internet.

You can get the latest CLISP for Windows from here - https://sourceforge.net/projects/clisp/files/latest/download

 I am currently accepting programming work, it project, school 

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 in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.


Sample Program Output


Program Listing

greeter.lisp

(defun Greeter()
   (terpri)
   (format t "Greeter in LISP ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "What is your name?  ")
   (setq user_name (read))
   (format t "~%")
   (format t "Hello ~s How are you today?  " user_name)
   (format t "~%~%")
   (format t "End of Program")
)
(Greeter)

Product of Two Numbers in LISP


Here is a simple program that I wrote using Common LISP that will ask the user to give two numbers and then our program will compute the product of the two numbers being provided by our user. I am using Common LISP is open source and free to download in the Internet.


You can get the latest CLISP for Windows from here - https://sourceforge.net/projects/clisp/files/latest/download

 I am currently accepting programming work, it project, school 

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 in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.



Sample Program Output


product.lisp

(defun Product()
   (terpri)
   (format t "Product of Two Numbers in LISP ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "Enter First Value :  ")
   (setq a (read))
   (princ "Enter Second Value :  ")
   (setq b (read))
   (setq product (* a b))
   (format t "~%~%")
   (format t "The product is ~D." product)
   (format t "~%~%")
   (format t "End of Program")
)
(Product)


Addition of Two Numbers in LISP

Here is a simple program that I wrote using Common LISP that will ask the user to give two numbers and then our program will compute the sum of the two numbers being provided by our user. I am using Common LISP is open source and free to download in the Internet.

You can get the latest CLISP for Windows from here - https://sourceforge.net/projects/clisp/files/latest/download

 I am currently accepting programming work, it project, school 

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 in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.


Sample Program Output


add.lisp

(defun Addition()
   (terpri)
   (format t "Addition of Two Numbers in LISP ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "Enter First Value :  ")
   (setq a (read))
   (princ "Enter Second Value :  ")
   (setq b (read))
   (setq total_sum (+ a b))
   (format t "~%~%")
   (format t "The Total Sum is ~D." total_sum)
   (format t "~%~%")
   (format t "End of Program")
)
(Addition)


Area of the Circle Solver in LISP

A very simple program that I will ask the user to give the radius of the circle and then our program will compute the it's are using LISP as our programming language.

I am currently accepting programming work, it project, school 

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 in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.


Sample Program Output


area.lisp

(defun AreaOfCircle()
   (terpri)
   (format t "Area of the Circle Solver ~%")
   (format t "~%~%")
   (format t "Created By Mr. Jake R. Pomperada, MAED-IT")
   (format t "~%~%")
   (princ "Enter Radius: ")
   (setq radius (read))
   (setq area (* 3.1416 radius radius))
   (format t "The Radius is = ~F~%The Area is ~F" radius area)
   (format t "~%~%")
   (format t "End of Program")
)
(AreaOfCircle)


Tuesday, June 26, 2018

Centimeter To Feet Converter in PHP

In this article I wrote a sample program to ask the user to give a value in centimeter and then our program will convert it into feet equivalent using PHP as our programming language.  I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.


Sample Program Output


Program Listing

fee.php

<?php

function ConversionToFeet($centi)
{
    $feet = 0.0328 * $centi;
    
    echo("<h2> Feet (s) equivalent is " . $feet . ".</h2>\n");
}


$centi = 100;

echo "<style> body { font-family:arial; size:12px } </style>";
echo "<h2> Centimeter To Feet Converter in PHP </h2>";
echo "<h3> Written By Mr. Jake Rodriguez Pomperada, MAED-IT </h3>";
ConversionToFeet($centi);
echo "<h2> End of Program </h2>";

?>



Centimeter To Inches Converter in PHP

In this article I wrote a sample program to ask the user to give a value in centimeter and then our program will convert it into inches equivalent using PHP as our programming language.  I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.



Sample Program Output


Program Listing

index.php


<?php

function ConversionToInches($centi)
{
    $inch = 0.3937 * $centi;
    
    echo("<h2> Inches equivalent is " . $inch . "</h2>\n");
}


$centi = 100;

echo "<style> body { font-family:arial; size:12px } </style>";
echo "<h2> Centimeter To Inches Converter in PHP </h2>";
echo "<h3> Written By Mr. Jake Rodriguez Pomperada, MAED-IT </h3>";
ConversionToInches($centi);
echo "<h2> End of Program </h2>";

?>




Centimeter To Inches Converter in Pascal

In this article I wrote a sample program to ask the user to give a value in centimeter and then our program will convert it into inches equivalent using Pascal as our programming language. I am using Free Pascal as both my compiler and IDE this is open source project that is free to download and use from the Internet. I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.





Sample Program Output


Program Listing

cmtoinches.pas

Program CM_Inches;
Uses Crt;
Const
   inch = 0.3937;
Var
   cm : real;
   solve : real;
Begin
  Clrscr;
  Writeln;
  Writeln('Centimeter To Inches Converter in Pascal');
  Writeln;
  Write('Written By Mr. Jake R. Pomperada,MAED-IT ');
  Writeln;
  Writeln;
  Write('Give the value in Centimeter? ');
  Readln(cm);

  solve := (cm * inch);

  Writeln;
  write('The equivalent value of ' ,cm:5:2, ' Centimeter (s) in Inches is ' ,solve:5:2,' Inche (s) .');
  writeln;
  Writeln;
  write('End of Program');
  writeln;
  Readln;
End.

Friday, June 15, 2018

Login System in Java JDBC and Oracle 11g Database

In this article I would like to share with you guys a Login System that I revised using Java JDBC and by this time our database is Oracle 11g. The code is very short and easy to understand what is important in running this code the library file ojdbc6.jar must also resides in your working directory in order to run the code properly. The ojdbc6.jar is a library file which connects your Java code in your Oracle 11g database. I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.





Sample Program Output


Program Listing

Login.java

import java.io.Console;
import java.sql.*;


public class Login {
    
static Connection conn;

   static void closeConnection() {
        try {
            
            conn.close();
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

void display() {
        Console console = System.console(); 
    console.printf("\n");
    console.printf("===== LOGIN SYSTEM IN JAVA JDBC AND ORACLE DATABASE =====");
    console.printf("\n\n");
        console.printf("Enter Username : ");
        String userName = console.readLine();
        char passwordArray[] = console.readPassword("Enter Password: ");
        String passWord = new String(passwordArray);
    
            String selectSQL = "select * from hr.users where username = ? and password = ?";
 
          try {

              
             conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system", "hr");
     
            PreparedStatement ps = conn.prepareStatement(selectSQL);
            ps.setString(1, userName);
            ps.setString(2, passWord);
            ResultSet rs = ps.executeQuery();
            if (rs.next()) {
  String lastname = rs.getString(5);
                           String firstname = rs.getString(4);
              System.out.println("\n");
  System.out.println("Welcome to the System Mr/Ms. " 
                                  + firstname.toUpperCase() 
                                  + " " + lastname.toUpperCase() + ".");
  System.out.println("\n");   
}
else
{
    System.out.println("\n");
            System.out.println("Intruder Detected. Please Call the System Administrator.");
System.out.println("\n");
display();
}
       
       closeConnection();
             
              
        }  catch (SQLException ex) {
            ex.printStackTrace();
            
    }

}
public static void main(String[ ] args) {
               
      Login  Start = new Login();
      Start.display();
  }
    
}    


    




Employee's Contact List System in Java JDBC and Oracle Database

Hi there in this article I would like to share with you a sample program that I wrote using Java JDBC and Oracle database to manage the contacts of the employees in the company. I called this program Employee's Contact List System in Java JDBC and Oracle Database. It demonstrates the concept of all basic database operations CRUD (Create, Retrieve, Update and Delete). It allows the user to add, update, delete, view all the records and single employee's record and quite the program. I hope you will find my work useful.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.






Sample Program Output

Program Listing

CRUD.java


package oraclecon;

/**
 *
 * @author Mr. Jake R. Pomperada, MAED-IT
 * Date : June 14, 2018  Thursday
 * Home Address: #25-31 Victoria Malaga Street, Eroreco Subdivision, 
 *               Barangay Mandalagan, 6100 Bacolod City, Negros Occidental
 * Email Address : jakerpomperada@yahoo.com and jakerpomperada@gmail.com
 */
import java.sql.*;
import java.io.*;

public class CRUD {

    Connection con;
    PreparedStatement ps;

    public CRUD() {
        try {
             Class.forName("oracle.jdbc.driver.OracleDriver");
             con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system", "hr");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
                
    
    public void insertEmp(int id, String lastname, String firstname, String address, String email, String mobile) {
        try {
            ps = con.prepareStatement("INSERT INTO HR.EMP values(?,?,?,?,?,?)");
            ps.setInt(1, id);
            ps.setString(2, lastname);
            ps.setString(3, firstname);
            ps.setString(4, address);
            ps.setString(5, email);
            ps.setString(6, mobile);
            int i = ps.executeUpdate();
            if (i != 0) {
                System.out.println("Record is successfully inserted in the database.");
                System.out.println();
            } else {
                System.out.println("Record is not successfully inserted in the database.");
                System.out.println();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void updateEmp(int id, String lastname, String firstname, String address, String email, String mobile) {
        try {
            ps = con.prepareStatement("UPDATE HR.EMP SET lastname=?,firstname=?,address=?,email=?,mobile=? WHERE id=?");
            ps.setString(1, lastname);
            ps.setString(2, firstname);
            ps.setString(3, address);
            ps.setString(4, email);
            ps.setString(5, mobile);
            ps.setInt(6, id);
            int i = ps.executeUpdate();
            if (i != 0) {
                System.out.println("Record is succesffuly updated.");
                System.out.println();
            } else {
                System.out.println("Record is not updated.");
                System.out.println();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void deleteEmp(int id) {
        try {
            ps = con.prepareStatement("DELETE FROM HR.emp WHERE id=?");
            ps.setInt(1, id);
            int i = ps.executeUpdate();
            if (i != 0) {
                System.out.println("Record is succesfully deleted.");
                System.out.println();
            } else {
                System.out.println("Record is not deleted.");
                System.out.println();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void dispAll() {
        try {
            Statement st = con.createStatement();
            ResultSet res = st.executeQuery("SELECT * FROM HR.EMP");
            while (res.next()) {
                System.out.println("ID Number       : " + res.getString(1));
                System.out.println("Last Name       :  " + res.getString(2));
                System.out.println("First Name      :   " + res.getString(3));
                System.out.println("Home Address    : " + res.getString(4));
                System.out.println("Email Address   : " + res.getString(5));
                System.out.println("Mobile Number   :  " + res.getString(6));
                System.out.println();
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    public void dispAnEmp(int s) {
        try {
            ps = con.prepareStatement("SELECT * FROM HR.EMP WHERE id=?");
            ps.setInt(1, s);
            ResultSet res = ps.executeQuery();
            if (res.next()) {
                System.out.println("ID Number       : " + res.getString(1));
                System.out.println("Last Name       :  " + res.getString(2));
                System.out.println("First Name      :   " + res.getString(3));
                System.out.println("Home Address    : " + res.getString(4));
                System.out.println("Email Address   : " + res.getString(5));
                System.out.println("Mobile Number   :  " + res.getString(6));
                System.out.println();
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        try {
            CRUD obj = new CRUD();
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            int ch = 0;
            while (true) {
                System.out.println("\tEMPLOYEE'S CONTACT LIST SYSTEM IN JAVA JDBC AND ORACLE DATABASE\n\n"
                        + "\t\t CREATED BY MR. JAKE RODRIGUEZ POMPERADA,MAED-IT \n\n"
                        + "\t 1. ADD EMPLOYEE'S RECORD \n "
                        + "\t 2. UPDATE EMPLOYEE'S RECORD \n "
                        + "\t 3. DELETE EMPLOYEE'S RECORD \n "
                        + "\t 4. DISPLAY ALL EMPLOYEE'S RECORD \n "
                        + "\t 5. DISPLAY A SINGLE EMPLOYEE'S RECORD \n"
                        + "\t 6. QUIT PROGRAM \n\n"
                        + "\t SELECT YOUR OPTION :  \n");
                String str1 = br.readLine().toString();
                ch = Integer.parseInt(str1);
                switch (ch) {
                    case 1: {
                        System.out.println("Employee Code ");
                        String code = br.readLine();
                        int id = Integer.parseInt(code);
                        System.out.println("Last Name" );
                        String lastname = br.readLine();
                        System.out.println("First Name ");
                        String firstname = br.readLine();
                        System.out.println("Address ");
                        String address = br.readLine();
                        System.out.println("Email ");
                        String email = br.readLine();
                        System.out.println("Mobile ");
                        String mobile = br.readLine();
                        obj.insertEmp(id,lastname,firstname,address,email,mobile);
                        break;
                    }
                    case 2: {
                        System.out.println("Employee Code ");
                        String code = br.readLine();
                        int id = Integer.parseInt(code);
                        System.out.println("Last Name" );
                        String lastname = br.readLine();
                        System.out.println("First Name ");
                        String firstname = br.readLine();
                        System.out.println("Address ");
                        String address = br.readLine();
                        System.out.println("Email ");
                        String email = br.readLine();
                        System.out.println("Mobile ");
                        String mobile = br.readLine();
                        obj.updateEmp(id,lastname,firstname,address,email,mobile);
                        break;
                    }
                    case 3: {
                        System.out.print("Enter Employee Code to delete record : ");
                        String code = br.readLine();
                         int id = Integer.parseInt(code);
                        obj.deleteEmp(id);
                        break;
                    }
                    case 4: {
                        obj.dispAll();
                        break;
                    }
                    case 5: {
                        System.out.print("Enter Employee Code to display record : ");
                        String code = br.readLine();
                        int id = Integer.parseInt(code);
                        obj.dispAnEmp(id);
                        break;
                    }
                    case 6:
                    {
                        System.exit(0);
                    }
                    default:
                        break;
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}  // End of Code