Thursday, May 3, 2018

Password With Asterisk in C++

Here is a password security with asterisk masking that I wrote a long time ago in C++ using CodeBlocks. 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

password.cpp

// Password.cpp
// Author    : Mr. Jake Rodriguez Pomperada, MAED - Instructional Technology
// Date      : September 26, 2009 Saturday
// Email     : jakerpomperada@yahoo.com
// Tool      : Code Blocks 8.02
// Language  : C++

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

using namespace std;

const int PASSLEN = 4;

string passget();


void start()
{

string password;
cout << "\n\n";
cout << "\t PASSWORD SECURITY VERSION 1.0";
cout << "\n\n";
cout << "Enter Your Password: ";
password = passget();

if (password == "jake") {
    cout << "\n\n";
    cout << "Password Accepted";
    cout << "\n\n\n";
    cout << "\t\t Thank You For Using this Software";
    cout << "\n\n\t Created By: Mr. Jake Rodriguez Pomperada, MAED-IT";
        cout << "\n\n\t\t Date : September 26, 2009 Saturday";
}
else {
    cout << "\n\n";
    cout << "Password Denied Try Again !!!";
    start();
}
}  // End of Start Function


int main()
{
    start();
getch();
}

string passget()
{
char password[PASSLEN], letter;
int loop;
int len;
string password2;

//Get Password and replace letters with *--------------
loop = 0;
while(loop != PASSLEN)
{
password[loop] = '\0';
loop++;
}
loop = 0;
len = 0;
letter = '\0';
while( letter != '\r' )
{
letter = getch();
if( letter == '\b' && password[0] == '\0')
{
loop = 0;
len = 0;
}
else
{
if( letter == '\b' && password[0] != '\0')
{
cout << "\b";
cout << " ";
cout << "\b";
loop--;
password[loop] = '\0';
len--;
}
else
{
if( isprint( letter ) != 0 && loop < PASSLEN)
{
password[loop] = tolower(letter);
cout << "*" ;
}
loop++;
if (loop <= PASSLEN)
len++;
}
}
}

//Convert Password from character array to string
loop = 0;
len = len;
password2 = "";
while (loop != len)
{
password2 = password2+password[loop];
loop++;
}

return password2;
 } // End of Function Password


LinkedHashMap Collection Example in Java

Presently I am learning collections framework in Java in this sample program I will show you how to use LinkedHashMap. The code is very simple and easy to understand.

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

LinkedHashMapExample.java


package javaapplication1;

import java.util.*;


/**
 *
 * @author : Mr. Jake R. Pomperada, MAED-IT
 * Date : May 3, 2018
 * Thurdsay
 * Barangay Alijis, Bacolod City Negros Occidental Philippines
 * jakerpomperada@yahoo.com and jakerpomperada@gmail.com
 *
 */

public class LinkedHashMapExample {
    
      public static void main(String[] args) {
       System.out.println("\n\n");
       System.out.println("LinkedHashMap Collection Example in Java");
       System.out.print("\n");
       
       LinkedHashMap <Integer,String>  set = new LinkedHashMap<Integer,String>();
       
       set.put(1,"Jake R. Pomperada");
       set.put(2,"Ma. Junallie F. Pomperada");
       set.put(3,"Jacob Samuel F. Pomperada");
       set.put(4,"Julianna Rae F. Pomperada");
       set.put(5,"Lydia R. Pomperada");
       set.put(6,"Virgilio V. Pomperada");
       
       
       for (Map.Entry m:set.entrySet()) {
           System.out.println(m.getKey() + " " + m.getValue());
       }
       System.out.print("\n\n");
       System.out.println("End of Program");
       System.out.print("\n\n");
    }
       
}




TreeMap Collection Example in Java

Presently I am learning collections framework in Java in this sample program I will show you how to use TreeMap. The code is very simple and easy to understand.

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

Main.java

package javaapplication1;

import java.util.*;


/**
 *
 * @author : Mr. Jake R. Pomperada, MAED-IT
 * Date : May 3, 2018
 * Thurdsay
 * Barangay Alijis, Bacolod City Negros Occidental Philippines
 * jakerpomperada@yahoo.com and jakerpomperada@gmail.com
 *
 */
public class Main {
    
    public static void main(String[] args) {
       System.out.println("\n\n");
       System.out.println("TreeMap Collection Example in Java");
       System.out.print("\n");
       
      TreeMap <Integer,String>  set = new TreeMap <Integer,String>();
       
       set.put(1,"Jake R. Pomperada");
       set.put(2,"Ma. Junallie F. Pomperada");
       set.put(3,"Jacob Samuel F. Pomperada");
       set.put(4,"Julianna Rae F. Pomperada");
       set.put(5,"Lydia R. Pomperada");
       set.put(6,"Virgilio V. Pomperada");
       
       
       for (Map.Entry m:set.entrySet()) {
           System.out.println(m.getKey() + " " + m.getValue());
       }
       System.out.print("\n\n");
       System.out.println("End of Program");
       System.out.print("\n\n");
    }
       
}





Tuesday, May 1, 2018

Hello World in Assembly Language

I am starting learning assembly language programming in my spare time this sample program will display a hello world message on the screen including my name also. It is very basic assembly language program.

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


Software used in writing this program


Program Listing

hello.asm

.MODEL SMALL

.STACK

.DATA

STRING DB 10, 13, "HELLO WORLD FROM JAKE R. POMPERADA, MAED-IT $" 

.CODE

MAIN PROC                                         

MOV AX, @DATA                                     

MOV DS, AX

LEA DX, STRING                                    

MOV AH, 09H                                       

INT 21H                                            

MOV AX, 4C00H                                      

INT 21H

MAIN ENDP                                         

END MAIN                                         



SWAP A NUMBER USING POINTERS IN C++

Here is a simple program to show how to use pointers to swap two numbers given by our user using C++ as our programming language.

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.



Program Listing

swap.cpp

#include <iostream>
#include <string>

 using namespace std;

 int swap_value(int *a, int *b, int temp)
 {
  temp = *a;
  *a = *b;
  *b = temp;
 }

 main() {

     int a=0,b=0,temp=0;
      char reply = 'Y';

 for (; toupper(reply)== 'Y'; ) {

 cout << "\n\n";
 cout << "\t\t SWAP A NUMBER USING POINTERS";
 cout << "\n\n\t Created By: Mr. Jake R. Pomperada, MAED-IT";
 cout << "\n\n";
 cout << "Enter the first value  :=> ";
 cin >> a;
 cout << "Enter the second value :=> ";
 cin >> b;

 cout << "\nOrignal value of a : " << a <<".";
 cout << "\nOrignal value of b : " << b <<".";

 cout << "\n\n";

 swap_value(&a,&b,temp);
 cout << "After calling the function Reference/Pointer";
 cout << "\n\n";

 cout << "\nNew value of a : " << a <<".";
 cout << "\nNew value of b : " << b <<".";
 cout << "\n\n";
 cout << "Do You Want To Continue Y/N :=> ";
 cin >> reply;

 }
 if (toupper(reply) == 'N') {
     cout << "\nThank You For Using This Program.";

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

Compound Interest Solver in JavaScript Version 2

A very simple compound interest solver in Javascript version 2 that I wrote while learning JavaScript programming.

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.htm

<HTML>
<TITLE> COMPOUND INTEREST SOLVER IN JAVASCRIPT </TITLE>
<STYLE>

BODY {
   FONT-FAMILY:ARIAL;
   FONT-SIZE:15PX;
    };
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
var princ;
var ratepc;
var years;
var rate;
var power;
function calcAmt(frm) {
princ = eval(frm.pr.value);
ratepc = eval(frm.rt.value);
years = eval(frm.yr.value);
rate = ratepc / 100;
power = Math.pow((1 + rate), years);
frm.amt.value = Math.round(princ * power * 100) / 100;
frm.inter.value = Math.round((frm.amt.value - princ) * 100) / 100;
}
function checkInput(frm) {
if (rate == 0 || rate > .3) {
window.alert ("Are you sure that the interest rate is " + ratepc +"%?");
frm.rt.focus();
}
if (years == 0 || years > 30) {
window.alert ("Are you sure that the term is " + years + " years?");
frm.yr.focus();
   }
}
</script>

</HEAD>

<BODY BGCOLOR="LIGHTGREEN">

<BR>
<center>
<table width=600 cellpadding=0 cellspacing=10>
<tr>
<td width=468 align=center>

    
    
</td>
<td width=120 align=center>
    
</td>
</tr>
</table>
<BR>
<BR>
<basefont size=3>
<FONT SIZE="+2" FACE="Helvetica,Arial">
<FONT COLOR="blue"><b>Compound Interest Solver in JavaScript</b></font></font>
<BR>
<FONT COLOR="blue"><b>Written By. Mr. Jake R. Pomperada, MAED-IT</b></font></font>
<table BORDER=0 WIDTH=486 CELLPADDING=3 CELLSPACING=0>
<tr><td><font FACE="helvetica,arial,geneva">
<br>

</td></tr>
</table>

<center>
<form method=get name=frm>
Principal <input type=text name=pr size=10 maxlength=10 onChange=calcAmt(this.form)>
Rate <input type=text name=rt size=6 maxlength=6 onChange=calcAmt(this.form)>
Years <input type=text name=yr size=5 maxlength=5 onChange=calcAmt(this.form)>
<br>
<br>
<input type=button name=calc value="Calculate" size=10 onClick=checkInput(this.form); calcAmt(this.form);>
<input type=reset value="Clear">
<br>
<br>
Amount <input type=text name=amt size=10>
Interest <input type=text name=inter size=10>
</form>
</center>
</BODY>
</HTML>

Sunday, April 29, 2018

Area of the Triangle in C++

Simple program to solve the area of the triangle written in C++.

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.



Program Listing

triangle.cpp

#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
    double b,h;

    cout<<"[ Area of a triangle ]"<<endl;
    cout<<"base  : "; cin>>b;
    cout<<"height: "; cin>>h;
    cout<<"area = "
        <<(b*h)/2
        <<" square units "
        <<endl;

    system("pause");
return 0;
}

Sum,Difference,Quotient,Product and Remainder in C++

A very  simple program to solve the Sum,Difference,Quotient,Product and Remainder in C++.

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.



Program Listing

math.cpp

#include<iostream>
#include<cstdlib>

using namespace std;

int main()
{
int x,y;
int s,d;

cout <<"Sum,Difference,Quotient,Product and Remainder in C++";
cout <<"\n\n";
cout<<"Enter x value: ";
cin>>x;
cout<<"Enter y value: ";
cin>>y;

    s = x + y;
    d = x - y;

    cout<<"\n sum        = "<<s
        <<"\n difference = "<<d
    <<"\n quotient   = "<<x/y
    <<"\n product    = "<<x*y
    <<"\n remainder  = "<<x%y
        <<endl;

    system("pause");
return 0;
}

Swap Two Numbers Using Pointers in C++

A very simple program to ask the user to give two numbers and swap the arrangement of the numbers using functions and pointers in C++ programming language.

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.



Program Listing

swap.cpp

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

using namespace std;

void GetVal(int& Get1,int& Get2);
void SwapVal(int& Swap1,int& Swap2);
void ShowVal(int& Show1,int& Show2);

int main()
{
    int FirstNum,SecondNum;
    GetVal(FirstNum,SecondNum);
    SwapVal(FirstNum,SecondNum);
    ShowVal(FirstNum,SecondNum);
    system("PAUSE");
    return 0;
}

void GetVal(int& Get1,int& Get2)
{
 cout <<"SWAP TWO NUMBERS USING POINTERS AND FUNCTIONS IN C++";
cout << "Enter 2 values: ";
     cin >> Get1 >> Get2;
}

void SwapVal(int& Swap1,int& Swap2)
{
     int temp;
     temp = Swap1;
     Swap1 = Swap2;
     Swap2 = temp;
}

void ShowVal(int& Show1,int& Show2)
{
     cout << Show1 << "  " << Show2 << "\n";
}


Age Determiner in C++

A very simple age determiner using if - else statement in C++.

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.



Program Listing

age.cpp

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


int age main()

{


   cout<<"Enter age" ;
   cin>> age;
         if ((age>=0)&&(<=2))
         else if cout<< "baby"

         if ((age>=3)&&(<=5))
         else if cout<< "toddler"

         if ((age>=6)&&(<=12))
         else if cout<< "child"

         if ((age>=13)&&(<=15))
         else if cout<< "adolescent"

         if ((age>=16)&&(<=19))
         else if cout<< "teenager"

         if ((age>=20)&&(<=50))
         else if cout<< "adult"

         else cout<< "senior citizen"

      system("PAUSE");
      return 0;
}