Thursday, January 25, 2018

Palindrome Number Checker in PHP

A very simple program that I wrote that will ask the user to give a number and then our program will check if the given number is a Palindrome or Not a Palindrome using PHP as our programming language.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.




Sample Program Output


Program Listing

palindrome.php


<!-- palindrome.php                                        -->
<!-- Written By Mr. Jake R. Pomperada, MAED-IT             -->
<!-- January 25, 2018 Thursday  Papa Jun's Birthday    -->
<!-- jakerpomperada@yahoo.com and jakerpomperada@gmail.com -->
<!-- Bacolod City, Negros Occidental Philippines           -->
<!DOCTYPE html>
<html>
<head>
   <title></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   </head>
   <style>

   .art {

      font-family: arial;
      font-weight: bold;
      color:red;
      text-align: center;
      width:45%;
      background-color:yellow;
   }

.art2 {

      font-family: arial;
      font-weight: bold;
      font-size: 25px;
      color:blue;
      text-align: center;
      width:45%;
      background-color:lightgreen;
   }

   body {
    font-family: arial;
    font-weight: bold;
    font-size: 20px;
   }

   input[type=submit] {
    background-color: #008CBA;
    font-family: arial;
    font-weight: bold;
    font-size: 20px;
    height: 50px;
    width: 120px
     text-align: center;
    cursor: pointer;
 }

 input[type=text] {
    font-family: arial;
    font-weight: bold;
    font-size: 20px;
   
 }
</style>
   <body>
    <?php
    error_reporting(0);
   
    ?>
    <h1 class="art"> Palindrome Number in PHP </h1>
    <p  class="art2"> Created By Mr. Jake R. Pomperada, MAED-IT </p>
    <br><br>
   <form method="post">
   Give a Number :
 <input type="text" name="val_num" autofocus=""><br><br>
 <input type="submit" name="submit" value="Check"> &nbsp;&nbsp;&nbsp;
 <input type="submit" name="clear" value="Clear">
 </form><br><br><br>
<?php

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

     $num = $_POST['val_num'];

$p=$num;
$revnum = 0;
while ($num != 0)
{
$revnum = $revnum * 10 + $num % 10;

$num = (int)($num / 10); 
}

if($revnum==$p)
{
$display = "The given number " .$p." is Palindrome number.";
echo $display;
}
else
{
  $display = "The given number " .$p. " is not Palindrome number.";
  echo $display;
}
}

if(isset($_POST['clear']))  
    { 
    $display="";
    }

?>
</body>
</html>





Current Day in PHP

Here is a simple code that I wrote using PHP as my programming language that will get the current day.   The code is very short and easy to understand. I hope you will find my work useful.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.



Sample Program Output


Program Listing

day.php


<?php

$t=date('d-m-Y');
echo "<h1> Today is " .date("D",strtotime($t))."</h1>";
?>

Saturday, January 20, 2018

Palindrome Number Checker in Visual Basic

Here is another version of Palindrome Number Checker that I wrote using Microsoft Visual Basic 5. It will ask the user to give a number and then our program will check and determine if the given number is Palindrome or Not a Palindrome. The code is much compatible in Visual Basic for Application with little modification kindly see the Microsoft Access version of this code.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.







Sample Program Output


Program Listing

'Palindrome Number Checker in Visual Basic 5
'Written By Mr. Jake R. Pomperada, MAED-IT
'January 20, 2018 Saturday
'Bacolod City, Negros Occidental Philippines
'jakerpomperada@yahoo.com and jakerpomperada@gmail.com

   Public Function CheckNumberPalindrome(value_input) As Integer
    Dim n, r, sum, t As Integer
        n = value_input
        sum = 0
        t = n
        While n <> 0
            r = n Mod 10
            sum = sum * 10 + r
            n = n \ 10
       Wend
       
       If sum = t Then
   
     Label2.Caption = "The given number " + Str(value_input) + " is a Palindrome Number."
    Else
  Label2.Caption = "The given number " + Str(value_input) + " is Not a Palindrome Number."
End If
End Function

Private Sub Command1_Click()
Dim a As Integer
   

If Len(Trim(Text1.Text) & vbNullString) = 0 Then
     MsgBox "Enter the a Number", vbInformation
     Text1.Text = ""
     Text1.SetFocus
     Exit Sub
End If

a = Val(Text1.Text)

CheckNumberPalindrome (a)
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text1.SetFocus
End Sub





Friday, January 19, 2018

Palindrome Number Checker in Microsoft Access

A simple program that I wrote using Microsoft Access Visual Basic Application that will ask the user to give a number and then our program will determine and check if the given number is a Palindrome or Not a Palindrome. The code is very simple and easy to understand.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.









Sample Program Output


Program Listing

'Palindrome Number Checker in Microsoft Access
'Written By Mr. Jake R. Pomperada, MAED-IT
'January 19, 2018 Bacolod City, Negros Occidental
'jakerpomperada@gmail.com and jakerpomperada@yahoo.com

Option Compare Database


   Public Function CheckNumberPalindrome(value_input) As Integer
    Dim n, r, sum, t As Integer
        n = value_input
        sum = 0
        t = n
        While n <> 0
            r = n Mod 10
            sum = sum * 10 + r
            n = n \ 10
       Wend
       
       If sum = t Then
   
     Me.Label15.Caption = "The given number " + Str(value_input) + " is a Palindrome Number."
    Else
  Me.Label15.Caption = "The given number " + Str(value_input) + " is Not a Palindrome Number."
End If
End Function

    

Private Sub Command16_Click()
Dim a As Integer
   

If Len(Trim(Me.Text13) & vbNullString) = 0 Then
     MsgBox "Enter the a Number", vbInformation
     Me.Text13.SetFocus
     Exit Sub
End If

a = Val(Me.Text13)

CheckNumberPalindrome (a)

End Sub


Private Sub Command17_Click()
Me.Text13 = ""
Me.Label15.Caption = ""
Me.Text13.SetFocus
End Sub

Private Sub Command18_Click()
DoCmd.OpenForm "frmAbout"
End Sub




Wednesday, January 17, 2018

Leap Year Checker in Microsoft Access

A simple program that will ask the user to give a year and then our program will check if the given year is a leap year or not a leap year using Microsoft Access.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.








Sample Program Output


Program Listing


Option Compare Database
Function IsLeapYear(Optional varDate As Variant) As Boolean
       If IsMissing(varDate) Then
        varDate = Year(Now)
       ElseIf VarType(varDate) = vbDate Then
        varDate = Year(varDate)
      ElseIf VarType(varDate) = vbInteger Then
         If varDate < 100 Or varDate > 9999 Then
            varDate = Year(Now)
        End If
      Else
        varDate = Year(Now)
    End If
    IsLeapYear = (Day(DateSerial(varDate, 2, 28) + 1) = 29)
End Function

Private Sub Command16_Click()
Dim a As Integer


If Len(Trim(Me.Text13) & vbNullString) = 0 Then
     MsgBox "Enter the a Year", vbInformation
     Me.Text13.SetFocus
     Exit Sub
End If

a = Val(Me.Text13)

If IsLeapYear(a) = True Then
   Me.Label15.Caption = "The given year " + Str(a) + " is a Leap Year."
Else
  Me.Label15.Caption = "The given year " + Str(a) + " is Not a Leap Year"
End If
End Sub


Private Sub Command17_Click()
Me.Text13 = ""
Me.Label15.Caption = ""
Me.Text13.SetFocus
End Sub

Private Sub Command18_Click()
DoCmd.OpenForm "frmAbout"

End Sub







Prime Number Checker in Microsoft Access

In this article I would like to share with you a sample program that will ask the user to give a number and then our program will check if the given number in prime number or not using Microsoft Access. I am using Microsoft Access 2010 in writing this program.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.








Sample Program Output



Program Listing

Option Compare Database

Public Function PrimeNumberChecker(sinput) As Boolean
    PrimeNumberChecker = True
    If sinput = 1 Then
        PrimeNumberChecker = False
    ElseIf sinput > 2 Then
        For i = 2 To sinput - 1
            If sinput Mod i = 0 Then
                PrimeNumberChecker = False
                Exit Function
            End If
        Next i
    End If
End Function

Private Sub Command16_Click()
Dim a As Integer


If Len(Trim(Me.Text13) & vbNullString) = 0 Then
     MsgBox "Enter the a Number", vbInformation
     Me.Text13.SetFocus
     Exit Sub
End If

a = Val(Me.Text13)

If PrimeNumberChecker(a) = True Then
   Me.Label15.Caption = "The given number " + Str(a) + " is a Prime Number."
Else
  Me.Label15.Caption = "The given number " + Str(a) + " is Not a Prime Number."
End If
End Sub


Private Sub Command17_Click()
Me.Text13 = ""
Me.Label15.Caption = ""
Me.Text13.SetFocus
End Sub

Private Sub Command18_Click()
DoCmd.OpenForm "frmAbout"

End Sub



Saturday, January 6, 2018

Temperature Converter in Microsoft Access

I created a program using Microsoft Access 2010 I called this program Temperature Converter it has two options the first one is Fahrenheit To Celsius and the other one is Celsius To Fahrenheit. It will ask the user to give temperature value and then our program will convert the given value. I hope you will find my work useful.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.






Sample Program Output


Program Listing

' Temperature Converter in Microsoft Access 2010
' Written By Mr. Jake R. Pomperada, MAED-IT
' January 6, 2018  Saturday
' jakerpomperada@yahoo.com and jakerpomperada@gmail.com
' Bacolod City, Negros Occidental Philippines

Option Compare Database

Private Sub Command17_Click()
Me.Option2.Value = ""
Me.Option6.Value = ""
Me.Option2.Enabled = True
Me.Option6.Enabled = True
Me.Label18.Caption = ""
Me.txt_temp = ""
Me.txt_temp.SetFocus
End Sub


Private Sub Command19_Click()
Dim Sure As Integer

Sure = MsgBox("Are you sure?", vbOKCancel)
If Sure = 1 Then
DoCmd.Quit
Else
 DoCmd.OpenForm "temp"
 Me.txt_temp.SetFocus
End If
End Sub

Private Sub Command8_Click()
Dim temp As Double
Dim Result_Fahrenheit As Double
Dim Result_Celsius As Double

temp = Val(Me.txt_temp)

If Len(Trim(Me.txt_temp) & vbNullString) = 0 Then
     MsgBox "Enter temperature value please.", vbInformation
     Me.txt_temp.SetFocus
     Exit Sub
End If
  Result_Fahrenheit = ((temp * 9) / 5) + 32
  
  Result_Celsius = ((temp - 32) * 5) / 9

If Me.Option2.Value = True Then
Me.Label18.Caption = "Temperature is " + Str(Round(Result_Celsius, 2)) + " Degree's Celsius."
End If

If Me.Option6.Value = True Then
Me.Label18.Caption = "Temperature is " + Str(Round(Result_Fahrenheit, 2)) + " Degree's Fahrenhiet."
End If

End Sub

Private Sub Form_Load()
Me.Option2.Value = ""
Me.Option6.Value = ""
End Sub

Private Sub Option2_AfterUpdate()
If Me.Option2.Value = True Then
Me.Option6.Enabled = False
End If
End Sub

Private Sub Option6_AfterUpdate()
If Me.Option6.Value = True Then
Me.Option2.Enabled = False
End If
End Sub








Friday, January 5, 2018

Word Counter in Microsoft Access

A very simple program that I wrote using Microsoft Access to ask the user to give a string or a sentence and then our program will count the number of words in the given sentence. 

I am currently accepting programming and web development work kindly contact me in the following email address for further details. 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 is (034) 4335675.







Sample Program Output



Program Listing

'Count Words in a Sentence in Microsoft Access
' Written By Mr. Jake R. Pomperada, MAED-IT
' January 5, 2018  Frinday

Option Compare Database

Public Function WordCounter(Text As String) As Integer
Dim Counts As Integer
Dim dupText As String
dupText = Replace(Trim(Text), vbNewLine, " ")
If dupText = "" Then
    Counts = 0
Else
    Counts = 1
    For i = 1 To Len(dupText)
        If Mid(dupText, i, 1) = " " Then ' use Mid to search space
            If Mid(dupText, i - 1, 1) <> " " Then
                Counts = Counts + 1
            End If
        End If
    Next
    
Me.Label15.Caption = "Total number of words is " + Str(Counts) + "."
End If

End Function
Private Sub Command16_Click()
Dim word_count As Integer

If Len(Trim(Me.Text13) & vbNullString) = 0 Then
     MsgBox "Enter a sentence", vbInformation
     Me.Text13.SetFocus
     Exit Sub
End If
 WordCounter (Me.Text13)

End Sub


Private Sub Command17_Click()
Me.Text13 = ""
Me.Label15.Caption = ""
Me.Text13.SetFocus
End Sub

Private Sub Command18_Click()
DoCmd.OpenForm "frmAbout"

End Sub