Saturday, September 30, 2017

Palindrome Checker in ASP.NET

Here is a simple program that I wrote that will ask the user to give a string and then our program will check if the given string is a Palindrome or Not a Palindrome using VB.NET as my programming language and ASP.NET as my web development SDK framework. I hope you will find my work useful. Thank you.

I am currently accepting programming 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.







Sample Program Output


Program Listing

Default.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Palindrome Checker in ASP.NET</title>
</head>
<style type="text/css">
    p 
 {
  font-family:Arial;
  font-size:16px;
  color:Blue;
  font-weight:bold;
        width: 672px;
    }

 body 
 {
  font-family:Arial;
  font-size:14px;
  color:Blue;
  font-weight:bold;
  background-color:Lime;
  }

</style>

<body>
    <form id="form1" runat="server">
    <br />
    <p align="center">
        Palindrome Checker in ASP.NET <br /><br/>
        Created By Mr. Jake R. Pomperada, MAED-IT
        </p>
    <p align="center">
        &nbsp;</p>
<p align="left">
        Give a String&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox1" runat="server" Width="193px"></asp:TextBox>
        </p>
<asp:Button ID="Button1" runat="server" Text="Check" align="center" 
        ToolTip="Click here to check if the given string is a palindrome."/>
&nbsp;&nbsp;&nbsp;
<asp:Button ID="Button2" runat="server" Text="Clear" align="center" 
        ToolTip="Click here to clear the textbox."/>
    <br />
    <br />
    <br />
    <br />
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</form>
</body>
</html>


Default.aspx.vb

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim s1 As String
        Dim s2 As String

        Me.Label1.Visible = True

        s1 = Me.TextBox1.Text.ToLower
        s2 = StrReverse(s1)
        If (s1 = s2) Then
            Me.Label1.Text = "The given string  " + s1.ToUpper() + " is a Palindrome."
        Else
            Me.Label1.Text = "The given string " + s1.ToUpper() + " is Not a Palindrome."
        End If
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Label1.Visible = False
    End Sub

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Label1.Text = ""
        Me.TextBox1.Text = ""
        Me.TextBox1.Focus()
    End Sub
End Class



Addition of Two Numbers Using ASP.NET

In this article I would like to share with you a sample program that I wrote using ASP.NET and VB.NET to compute the sum of the two numbers. Actually this is the first time I wrote an ASP.NET application in my entire programming career it is very easy to write one it only takes some dedication and patience to accomplish one. I hope you like my work. Thank you.

I am currently accepting programming 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.








Sample Program Output


Program Listing

Default.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Addition of Two Numbers in ASP.NET</title>
</head>
<style>
  body 
  {
  background-color:lime;
  }
 </style>
<body>
    <form id="form1" runat="server">
    <div>
    
        <b>Addition of Two Numbers in ASP.NET<br />
        <br />
        Created By Mr. Jake R. Pomperada, MAED-IT</b><br />
    
    </div>
    <p>
        Enter First Number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;         <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </p>
    <p>
        Enter Second Number&nbsp;
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    </p>
    <p>
        The sum is&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Sum" 
            ToolTip="Click here to compute the sum of the two values." Width="75px" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button2" runat="server" Text="Clear" 
            ToolTip="Click here to clear the text box." Width="80px" />
    </p>
    </form>
</body>
</html>

Default.aspx.vb

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.TextBox3.Text = Val(Me.TextBox1.Text) + Val(Me.TextBox2.Text)
    End Sub

    
    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.TextBox1.Text = ""
        Me.TextBox2.Text = ""
        Me.TextBox3.Text = ""
        Me.TextBox1.Focus()
    End Sub
End Class






Friday, September 29, 2017

Decimal To Hexadecimal Converter in Java

A very simple program to ask the user to give a value in integer or decimal and then convert it into hexadecimal equivalent using Java as our programming language. The code is very easy to understand and use.

I am currently accepting programming 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.






Sample Program Output


Program Listing


Decimal_Hexa.java


import java.util.Scanner;

/**
 * @author Jake R. Pomperada
 * Bacolod City, Negros Occidental, Philippines
 * September 29, 2017  Friday    7:42 PM
*/


public class Decimal_Hexa {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int deci_values, rem, orig;
                String hexdecnum_values="";
        
Scanner input = new Scanner(System.in);
        
        char hexa_values[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
        
        System.out.print("\n\n");
System.out.print("===== Decimal To Hexadecimal Converter in Java ====");
System.out.print("\n\n");
System.out.print("===== Written By: Mr. Jake R. Pomperada =====");;
System.out.print("\n\n");
       
        System.out.print("Give Decimal Number : ");
        deci_values = input.nextInt();
        orig = deci_values;
        
        while(deci_values >0)
        {
            rem = deci_values % 16;
            hexdecnum_values = hexa_values[rem] + hexdecnum_values;
            deci_values /=16;
        }
        System.out.println();
        System.out.print("The Equivalent Hexadecimal Value of " + orig + " is ");
        System.out.print(hexdecnum_values + ".");
        System.out.print("\n\n");
System.out.println("END OF PROGRAM");
 System.out.println();
        input.close();

}

}




Remove Digits in Java

In this article I would like to share with you a very simple program to ask the user to give a string which contains a numbers or digits and then our program will remove the digits or numbers in the given string by our user using Java as our programming language.

I am currently accepting programming 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.






Sample Program Output


Program Listing


Remove_Digits.java

/**
 * 
 */


package remove_digits;

import java.util.Scanner;


/**
 * @author Jake R. Pomperada
 * Bacolod City, Negros Occidental, Philippines
 * September 29, 2017  Friday    7:22 PM
*/


public class Remove_Digits {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
String str_one, str_two;
System.out.print("\n\n");
System.out.print("===== Remove Digits in Java ====");
System.out.print("\n\n");
System.out.print("===== Written By: Mr. Jake R. Pomperada =====");;
System.out.print("\n\n");

System.out.print("Enter a String : ");
str_one = input.nextLine();
System.out.print("\n\n");   
        
    str_two = str_one.replaceAll("[1234567890]", "");
   
    System.out.print("Original String :=> " + str_one + ".");
    System.out.print("\n\n");
    System.out.print("New String :=> " + str_two + ".");
    System.out.print("\n\n");
    System.out.println("END OF PROGRAM");
    System.out.println();
    input.close();
}

}






Friday, September 22, 2017

Addition of Three Numbers in Java Server Pages

In this article I would like to share with you a simple program that will ask the user to give three numbers and then it will find the total sum of the three numbers using Java Server Pages or JSP. The code is very simple and easy to understand. I hope you will find my work useful thank you very much for visiting my blog.

I am currently accepting programming 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.



Sample Program Output


Program Listing

index.htm

<html>

    <head>
        <title>Addition of Three Numbers in Java Server Pages</title>
    </head>
    
    <body>
        <br>  
        <h2> Addition of Three Numbers in Java Server Pages </h2>
         <b><i> Created By Mr. Jake R. Pomperada   <b> </i>
        <br><br>
        <form action="./add.jsp">
            First number  : <input type="text" name="t1"/> <br>
            Second number : <input type="text" name="t2"/> <br>
            Third number  : <input type="text" name="t3"/>
            <br><br>
            <input type="submit" value="Sum" alt="Click her to compute the sum of three numbers." />
        </form>
    </body>

</html>


add.jsp

<html>
    <head>
        <title>Enter two numbers to add up</title>
    </head>
    
    <body>

    <%!
      String val1;
      String val2;
      String val3;
      int val1_int;
      int val2_int;
      int val3_int;
      int sum;
      %>

        

     <% 

     val1 = request.getParameter("t1");    
     val1_int = Integer.parseInt(val1);   
  
     val2 = request.getParameter("t2");    
     val2_int = Integer.parseInt(val2);   

     val3 = request.getParameter("t3");    
     val3_int = Integer.parseInt(val3);

     sum = (val1_int + val2_int + val3_int);   

     %>

     <br>
     <h3> The total sum is <%= sum %>.  </h3>
    </body>
</html>








Wednesday, September 20, 2017

Selection Sort in Turbo Pascal

A program that I wrote using Pascal as my programming language that will ask the user how many items to be sorted and then our program will display the original arrangement of the numbers and finally it will display the sorted arrangement of numbers on our screen. I am using selection sort algorithm to sort the given numbers by our user. I am using Turbo Pascal for Windows as my programming environment. I hope you will find my work useful. Thank you.

I am currently accepting programming 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.





Sample Program Output


Program Listing

selection.pas

Program Selection_Sort;
uses Wincrt;

const
items = 100;

type
 values = array[1..items] of integer;

var
num,a,b  : integer;
list_items     : values;
min            : integer;
temp           : integer;


Begin
writeln;
writeln('Selection Sort Program in Turbo Pascal');
writeln;
writeln;
writeln('Written By: Mr. Jake R. Pomperada');
writeln;  
write('How many items ?  '); 
readln(num);
for a:= 1 to num do
begin
    write('Give value in item number ',a,' : ');
    read(list_items[a]);
end;
    writeln;
    writeln;
    writeln('Orignal Arrangement of Values : ');
    writeln;
for a:=1 to num  do
    write(list_items[a],' ');

{============ Selection Sort Ascending Order ===================}
For a:=1 to num-1 do
begin
Min:=a;
For b:= a to num do
begin
            If list_items[b] < list_items[min] then
            Min:=b;
End;
Temp:=list_items[a];
    list_items[a]:=list_items[min];
    list_items[min]:=temp;
End;

writeln;
writeln;
writeln('Arrangement of Values Using Selection Sort ');
writeln;
for a := 1 to num do
begin
write(list_items[a],' ');
end;

writeln;
writeln;
write('End of Program');
writeln;
readln;

End.