Friday, January 26, 2018

Palindrome Number in JavaScript

A very simple program that I wrote in JavaScript 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.  

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

<!doctype html>
<html>
<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;
   }

   #button_me {
    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>
  
    
<script>
function palindrome_number()
{
var a=0,no=0,b=0,temp=0;


no=Number(document.getElementById("no_input").value);

b=no;
while(no>0)
{
a=no%10;
no=parseInt(no/10);
temp=temp*10+a;
}
if(temp==b)
{
 document.getElementById("msg").innerHTML = "The given number is a  Palindrome.";
}
else
{
document.getElementById("msg").innerHTML="The given number is Not Palindrome.";
}
}
</script>

<script>
function clear_me()
{
document.getElementById("msg").innerHTML = "";
document.getElementById("no_input").value = "";
document.getElementById("no_input").focus();
}
</script>

</head>
<body>
<h1 class="art"> Palindrome Number in JavaScript </h1>
    <p  class="art2"> Created By Mr. Jake R. Pomperada, MAED-IT </p>
<br><br>
Give a Number : <input id="no_input" type="text" autofocus>
<br><br>
<p id="msg"> </p> 
<button id="button_me" onclick="palindrome_number()">Check Number</button>
&nbsp;&nbsp;&nbsp;
<button id="button_me" onclick="clear_me()">Clear</button>
</br></br>
</body>
</html>





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