Saturday, June 12, 2021

Console Password in C++

 I simple console password in C++ language that I wrote which uses asterisk to hide the password. I hope you will like my work.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

password.cpp

// password.cpp

// Jake Rodriguez Pomperada, MAED-IT, MIT

// www.jakerpomperada.com and www.jakerpomperada.blogspot.com

// jakerpomperada@gmail.com

// Bacolod City, Negros Occidental Philippines


#include <iostream>

#include <string>

#include <cstdio>

#include <conio.h>


int main()

{

  back:

     const std::string password("admin");

     std::string input;

     char c;


     std::cout << "\n==============================";

     std::cout << "\nConsole Password in C++";

     std::cout << "\n==============================";

     std::cout << "\n\n";


     std::cout << "Give Your Password: ";

     do

     {

         c = _getch();

         if( isprint(c) )

         {

             input += c;

             std::cout << '*';

         }

         else if( c == 8 && !input.empty())

         {

             input.pop_back();

             std::cout << "\b \b";

         }

     } while( c != 13 );

     std::cout <<"\n";

     if (input == password) {

         std::cout << "\nPassword is valid.\n";

         goto end;

        }

     else {

         std::cout << "\nInvalid password.\n";

        goto back;

     }

    end:

    std::cout <<"\n";

    std::cout <<"\tEnd of Program";

    std::cout <<"\n";

}




Friday, June 11, 2021

What is Phishing?

Count Vowels in PHP

Count Vowels in PHP

 A simple program to count the vowels, occurrence of vowels in a given string in PHP programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.







Program Listings

index.php

<html>

  <head> 

   <title> Count Vowels in PHP </title>

  </head>

  <body> 

      <style type="text/css">

      

      body {

        font-family: arial;

            size: 12px;

      };


        </style>

    <?php


     error_reporting(0);



     $val_str = strtolower($_POST['val_str']);

     

      

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

      

      $results = "<h4>The Number of Vowels : &nbsp;" 

        .count_Vowels($val_str)."</h4>";

      

      $display_strings =  "<h4>The List of Vowels : " 

        .strip_Consonants($val_str)."</h4>";


      $display_vowels = "<h4>Number of Letter A : " 

                         .count_a($val_str)."</h4>";

      $display_vowels .= "<h4>Number of Letter E : " 

                       .count_e($val_str)."</h4>";

      $display_vowels .= "<h4>Number of Letter I : " 

                         .count_i($val_str)."</h4>";

      $display_vowels .= "<h4>Number of Letter O : " 

                       .count_o($val_str)."</h4>";

      $display_vowels .= "<h4>Number of Letter U : " 

                       .count_u($val_str)."</h4>";

      

      }




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

      $val_str = "";

      $results = "";

      $display_strings = "";

    }



function count_Vowels($string)

{

    preg_match_all('/[aeiou]/i', $string, $matches);

    return count($matches[0]);

}

 

function strip_Consonants($string)

{


  $trans = array("b" => "","c"=>"","d"=>"","f"=>"","g"=>"",

                 "h" => "","j"=>"","k"=>"","l"=>"","m"=>"",

                 "n" => "","p"=>"","q"=>"","r"=>"","s"=>"",

                 "t" => "","v"=>"","x"=>"","z"=>"");

  

  return  strtoupper(strtr($string, $trans));

}


function count_a($string)

{


  preg_match_all('/[a]/i', $string, $matches);

  return count($matches[0]);

}


function count_e($string)

{


  preg_match_all('/[e]/i', $string, $matches);

  return count($matches[0]);

}


function count_i($string)

{


  preg_match_all('/[i]/i', $string, $matches);

  return count($matches[0]);

}


function count_o($string)

{


  preg_match_all('/[o]/i', $string, $matches);

  return count($matches[0]);

}


function count_u($string)

{


  preg_match_all('/[u]/i', $string, $matches);

  return count($matches[0]);

}



?>


  <h2> Count Vowels in PHP </h2>

  <p> Mr. Jake Rodriguez Pomperada,MAED-IT, MIT </p>

<form method="post">

   <p>Give a String <input 

    type="text" name="val_str" size=50

     value="<?php echo $val_str; ?>" autofocus required /></p>

      

<input type="submit" name="submit" 

   title="Click here to count the vowels."

   value="Submit" />

   

    &nbsp;&nbsp;&nbsp;

    <input type="submit" name="clear" 

    title="Click here to clear the textbox."

    value="Clear" />

</form>


<?php

   echo $results;

   echo $display_strings;

   echo $display_vowels;

?>

</body>

</html>



Wednesday, June 9, 2021

Password Security in C

Password Security in C

 A simple password security program that I wrote in C programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

password.c


/* password.c

   Prof. Jake Rodriguez Pomperada,MAED-IT, MIT

   www.jakerpomperada.com

   www.jakerpomperada.blogspot.com

   jakerpomperada@gmail.com

   Bacolod City, Negros Occidental

*/


#include <stdio.h>

#include <string.h>

#include <conio.h>


int main()

{

    char buffer[256] = {0};

    char password[] = "admin";

    char c;

    int pos = 0;


    printf("\n==============================");

    printf("\nPassword Security in C");

    printf("\n==============================");

    printf("\n\n");


     printf("%s", "Give Your Password: ");

    do {

        c = getch();


        if( isprint(c) )

        {

            buffer[ pos++ ] = c;

            printf("%c", '*');

        }

        else if( c == 8 && pos )

        {

            buffer[ pos-- ] = '\0';

            printf("%s", "\b \b");

        }

    } while( c != 13 );


    if( !strcmp(buffer, password) )


    {

        printf("\n\n");

        printf("Password is Accepted.");

        printf("\n\n");

    }

    else

         {

        printf("\n\n");

        printf("Intruder has been detected.");

        printf("\n\n");

    }

        printf("\n\n");

        printf("THANK YOU FOR USING THIS PROGRAM");

        printf("\n\n");

}



Monday, June 7, 2021

Local Variables in Python

Local Variables in Python

 Here is a sample program to demonstrate how to declare and use local variables in Python programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

# local_variables.py
# Prof. Jake R. Pomperada, MAED-IT, MIT
# June 7, 2021
# Bacolod City, Negros Occidental

def sum(a, b,c):
print()
print("\tLocal Variables in Python")
sum = a + b + c
print()
print("\tThe sum of {0},{1} and {2} is {3}.".format(a,b,c,sum))

sum(1,2,3)

Friday, June 4, 2021

Average Grade Using Do While Loop in C++

Average Grade Solver Using Do While Loop in C++

  Machine Problem

Write a program that will ask the user to give a grade and then the program will compute the average grade using while loop statement in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing


/* average_grade_do_while_loop.cpp

   Jake Rodriguez Pomperada,MAED-IT,MIT

   www.jakerpomperada.com www.jakerpomperada.blogspot.com

   jakerpomperada@gmail.com

   Bacolod City, Negros Occidental Philippines

*/


#include <iostream>

#include <cmath>


using namespace std;


int main()

{

int NumGrades=0;

double grades=0.00;

double total=0.00,GradeAv=0.00;

cout <<"\n\n";

    cout <<"\tAverage Grade Solver Using Do While Loop in C++";

    cout <<"\n\n";

    

do {

cout << "\tEnter the Grade No. " << (NumGrades+1)

<< ".  (Press -1 To Stop ) : ";

cin >> grades;

total += grades;

if (grades == -1) {

GradeAv = ceil((total / NumGrades));

cout << "\n\n\tThe average of Grade is " << 

     GradeAv<< ".";

break;

}

NumGrades++;

     }  while(NumGrades != -1);

      cout <<"\n\n";

  cout <<"\tEnd of Program";

  cout <<"\n";

}


Average Grade Using While Loop in C++

Average Grade Solver Using While Loop in C++

 Machine Problem

Write a program that will ask the user to give a grade and then the program will compute the average grade using while loop statement in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.








Program Listing

/* average_grade_while_loop.cpp
   Jake Rodriguez Pomperada,MAED-IT,MIT
   www.jakerpomperada.com www.jakerpomperada.blogspot.com
   jakerpomperada@gmail.com
   Bacolod City, Negros Occidental Philippines
*/

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
int NumGrades=0;
double grades=0.00;
double total=0.00,GradeAv=0.00;
cout <<"\n\n";
    cout <<"\tAverage Grade Solver Using While Loop in C++";
    cout <<"\n\n";
     while(NumGrades != -1)
{
cout << "\tEnter the Grade No. " << (NumGrades+1)
<< ".  (Press -1 To Stop ) : ";
cin >> grades;
total += grades;
if (grades == -1) {
GradeAv = ceil((total / NumGrades));
cout << "\n\n\tThe average of Grade is " << 
     GradeAv<< ".";
break;
}
NumGrades++;
     }
      cout <<"\n\n";
  cout <<"\tEnd of Program";
  cout <<"\n";
}

Wednesday, June 2, 2021

Average Grade Using For Loop in C++

Average Grade Solver Using For Loop in C++

Machine Problem

Write a program that will ask the user to give a grade and then the program will compute the average grade using for loop statement in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

/* average_grade_for_loop.cpp

   Jake Rodriguez Pomperada,MAED-IT,MIT

   www.jakerpomperada.com www.jakerpomperada.blogspot.com

   jakerpomperada@gmail.com

   Bacolod City, Negros Occidental Philippines

*/


#include <iostream>

#include <cmath>


using namespace std;


int main()

{

int NumGrades=0;

double grades=0.00;

double total=0.00,GradeAv=0.00;

cout <<"\n\n";

    cout <<"\tAverage Grade Solver Using For Loop in C++";

    cout <<"\n\n";

for (NumGrades = 0;; NumGrades++)

{

cout << "\tEnter the Grade No. " << (NumGrades+1) 

<< ".  (Press -1 To Stop ) : ";

cin >> grades;

total += grades;

if (grades == -1) {

GradeAv = ceil((total / NumGrades));

cout << "\n\n\tThe average of Grade is " << 

     GradeAv<< ".";

break;

}

     }

      cout <<"\n\n";

  cout <<"\tEnd of Program";

  cout <<"\n";

}


Tuesday, June 1, 2021

Odd and Even Numbers in Visual Basic 6

Odd and Even Numbers in Visual Basic 6

 A simple program to ask the user to give a number and then the program will check if the given number is odd or even using Microsoft Visual Basic 6 programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.









Program Listing

' Odd and Even Numbers in Visual Basic 6

' Jake Rodriguez Pomperada, MAED-IT, MIT

' www.jakerpomperada.blogspot.com  www.jakerpomprada.com

' jakerpompeada@gmail.com

' Bacolod City, Negros Occidental Philippines

' May 31, 2021


Private Sub cmdCheck_Click()

x = Val(Form1.txtVal.Text)

If ((x Mod 2) = 0) Then

  Label2.Caption = "The given number " & x & " is an even number."

Else

  Label2.Caption = "The given number " & x & " is an odd number."

End If

End Sub


Private Sub cmdClear_Click()

Form1.txtVal.Text = ""

Label2.Caption = ""

Form1.txtVal.SetFocus

End Sub


Private Sub cmdQuit_Click()

answer = MsgBox("Do you want to quit?", vbQuestion + vbYesNo, "Confirm")

If answer = vbYes Then

End

Else

MsgBox "Action canceled", vbInformation, "Confirm"

Form1.txtVal.Text = ""

Label2.Caption = ""

Form1.txtVal.SetFocus

End If

End Sub


Private Sub Form_Load()

' Center the form on the screen

 Me.Move (Screen.Width - Me.Width) / 2, _

     (Screen.Height - Me.Height) / 2


End Sub