Friday, August 18, 2017

Count number of Vowels in Real Time in JQuery

In this program it will ask the user to give a sentence and then our program will count the number of vowels in a given sentence by our user using JQuery in real time.  The code is very short and easy to understand and use.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.








Sample Program Output


Program Listing

<!DOCTYPE html>
<html>
    <head>
        <title>Count number of Vowels in Real Time in JQuery</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
 <style>
 body {
      font-family:arial;
               font-weight:bold;
  background-color:lightgreen;
               size:15;
    }
 
 </style>
        <script>
            $(function () {
       
                $('#txtbox').keyup(function () {
                   
                    var txtcountvowels = $(this).val().replace(/[^aeiou]/gi,'').length;
                    $('#txtcountvowels_ok').text(txtcountvowels);
               });
            });
        </script>
     </head>
    <body>
   <br><br>
        <div style="padding-bottom: 25px;">Count number of Vowels in Real Time in JQuery</div>
        <div>
            Enter your text: <input style="padding: 7px;" maxlength="60" size="60" type="text" id="txtbox" required/>
           <br><br>
  <p>No. of vowels in the given string or sentence : <span id="txtcountvowels_ok"></span></p>
        </div>
    </body>

</html>





Count number of Digits in Real Time in JQuery

In this program it will ask the user to give a sentence and then our program will count the number of digits in a given sentence by our user using JQuery in real time.  The code is very short and easy to understand and use.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.





Sample Program Output


Program Listing

<!DOCTYPE html>
<html>
    <head>
        <title>Count number of Digits in Real Time in JQuery</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
 <style>
 body {
      font-family:arial;
               font-weight:bold;
  background-color:lightgreen;
               size:15;
    }
 
 </style>
        <script>
            $(function () {
                    $('#txtbox').keyup(function () {
                    var txtdigits = $(this).val().replace(/[^0123456789]/gi,'').length;
                    $('#txtdigits_ok').text(txtdigits);
               });
            });
        </script>
     </head>
    <body>
   <br><br>
        <div style="padding-bottom: 25px;">Count number of Digits in Real Time in JQuery</div>
        <div>
            Enter your text: <input style="padding: 7px;" maxlength="60" size="60" type="text" id="txtbox" required/>
           <br><br>
  <p>Number of digits in the given string or sentence : <span id="txtdigits_ok"></span></p>
        </div>
    </body>

</html>



Count number of Consonants in Real Time in JQuery

In this program it will ask the user to give a sentence and then our program will count the number of consonants in a given sentence by our user using JQuery in real time.  The code is very short and easy to understand and use.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.





Sample Program Output


Program Listing

<!DOCTYPE html>
<html>
    <head>
        <title>Count number of Consonants in Real Time in JQuery</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
 <style>
 body {
      font-family:arial;
               font-weight:bold;
  background-color:lightgreen;
               size:15;
    }
 
 </style>
        <script>
            $(function () {
                    $('#txtbox').keyup(function () {
                    var txtconsonants = $(this).val().replace(/[^bcdfghjklmnpqrstvwxyz]/gi,'').length;
                    $('#txtconsonants_ok').text(txtconsonants);
               });
            });
        </script>
    </head>
    <body>
   <br><br>
        <div style="padding-bottom: 25px;">Count number of Consonants in Real Time in JQuery</div>
        <div>
            Enter your text: <input style="padding: 7px;" maxlength="60" size="60" type="text" id="txtbox" required/>
           <br><br>
  <p>Number of consonants in the given string or sentence : <span id="txtconsonants_ok"></span></p>
        </div>
    </body>

</html>


Area of the Circle in JavaScript Version 2

Here is another version of my work on Area of the Circle Solver Using JavaScript what does the program will do is to ask the radius of the circle from the user and then our program will compute the it's area. The code is very easy to understand and use.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.







Sample Program Output


Program Listing


<!DOCTYPE html> 
<html>
<head> 
<meta charset=utf-8 /> 
<title>Area of the Circle Solver in JavaScript</title> 
<style type="text/css"> 
body {
font-family:arial;
font-size:12;
font-weight:bold;
background-color:lightgreen;
margin: 30px;
}
</style>
</head> 
<body> 
<script>
function solve_area() 
radius = document.getElementById("radius_value").value; 

solve =Math.PI * Number(radius) * Number(radius);
display_result = solve.toFixed(2);
document.getElementById("result").innerHTML = display_result;
</script>
<hr>
<h2>Area of the Circle Solver in JavaScript </h2>
 <hr>
<form> 
<br><br>
Give the Radius of the Circle : <input type="text" id="radius_value" maxlength="5" size="5"><br> 
<br><br>
<input type="button" onClick="solve_area()" Value="Solve" 
title="Click here to find the area of the circle." />  
</form> <br>
<p>The area of the circle is 
<span id = "result">.</span> 
</p> 
</body> 
</html>





Capitalize the first letter of each word in a sentence Using JQuery and JavaScript


In this article I wrote a simple program that will allow the user to give a sentence and then our program will capital the first letter of the words in the given sentence using JavaScript and JQuery. The code is very simple and easy to understand. Combining JavaScript and JQuery is much fun and productive learning experience in programming in my own opinion only. Thanks guys for the support and visiting my website.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.







Sample Program Output



Program Listing

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Capitalize the first letter of each word in a sentence Using JQuery and JavaScript</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("button").click(function(){
            var words = $.trim($("textarea").val()).split(" ");
var output = "";
       for (i = 0 ; i < words.length; i ++){
lowerWord = words[i].toLowerCase();
lowerWord = lowerWord.trim();
capitalizedWord = lowerWord.slice(0,1).toUpperCase() + lowerWord.slice(1);
output += capitalizedWord;
if (i != words.length-1){
output+=" ";
}
}
output[output.length-1] = '';
   document.getElementById("result").innerHTML = output +".";
        });
    });

</script>
  <style>
   body {
     font-family:arial;
font-weight:bold;
background-color: lightgreen;
size:12px;
   }
  </style>
</head>
<body>
    <br>
<h2>Capitalize the first letter of each word in a sentence Using JQuery and JavaScript</h2>
<br>
    Enter a sentence 
    <textarea cols="80"></textarea>
    <br><br>
    <button type="button" title="Click here to capitalize the first letter of each word in a sentence .">
Ok</button>
<br><br><br>
The result : <span id="result"></span>
</body>
</html>                                



Count the number of Words Using JQuery

A very simple program that I wrote using JQuery to count the number of words in a given sentence by our user. I admit I love to you with JavaScript specially using it's framework JQuery, AngularJS and others because it is fun and easy to understand. The code is very short and simple to use. I hope guys you will learn from this one.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.







Sample Program Output


Program Listing

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Count the number of Words Using JQuery</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("button").click(function(){
            var words = $.trim($("textarea").val()).split(" ");
            var display_results = words.length;
   document.getElementById("result").innerHTML = display_results +".";
        });
    });
</script>
  <style>
   body {
     font-family:arial;
font-weight:bold;
background-color: lightgreen;
size:12px;
   }
  </style>
</head>
<body>
    <br>
<h2>Count the number of Words Using JQuery</h2>
<br>
    Enter a sentence 
    <textarea cols="50"></textarea>
    <br><br>
    <button type="button" title="Click here to count the number of words in the sentence.">
Ok</button>
<br><br><br>
The number of words in the sentence is <span id="result"></span>
</body>
</html>                                



Palindrome Using JQuery and JavaScript

In this article I wrote a simple program to check if the given word by the user is a Palindrome or Not a Palindrome. A Palindrome word refers to a word that when we read forward and backwards the spelling is the same and it's sound also. Examples of Palindrome words are below:

  • Anna
  • Civic
  • Kayak
  • Level
  • Madam
  • Mom
  • Noon
  • Racecar
  • Radar
  • Redder
  • Refer
  • Repaper
  • Rotator
  • Rotor
  • Sagas
  • Solos
  • Stats
  • Tenet
  • Wow
I wrote the code using JQuery and JavaScript I hope you will like my work. Thank you very much for visiting my website.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.






Sample Program Output


Program Listing

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Palindrome Using JQuery and JavaScript</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("button").click(function(){
            var words = $("textarea").val();
var flag = true;
var  str = words.toUpperCase();
         for( var i = 0; i <= words.length-1; i++){
if( words[i] !== words[words.length - i-1]){
flag = false;  
}
}
if(flag == false){
  
output = 'The word ' + str +' is not a Palindrome!';   
}
else {
output = 'The word ' + str + ' is a Palindrome!';
}
document.getElementById("result").innerHTML = output;
        });
    });
</script>
  <style>
   body {
     font-family:arial;
font-weight:bold;
background-color: lightgreen;
size:12px;
   }
  </style>
</head>
<body>
    <br>
<h2>Palindrome Using JQuery and JavaScript</h2>
<br>
    Enter a word 
    <textarea cols="80"></textarea>
    <br><br>
    <button type="button" title="Click here to check if the given work is a Palindrome.">
Ok</button>
<br><br><br>
The result : <span id="result"></span>
</body>
</html>                                



Monday, August 14, 2017

Divide Two Numbers in Visual Basic 6

A very simple program that I wrote using Microsoft Visual Basic 6 to ask the user to give two numbers and then our program will compute the quotient of the two numbers given by our user. The code is very short and easy to understand. I hope you will learn something on this one. Thank you.

I hope you will find my work useful and beneficial. If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.







Sample Program Output


Program Listing

' Written By: Mr. Jake R. Pomperada, MAED-IT
' August 14, 2017
' Mandaluyong City, Metro Manila
' Visual Basic 6


Private Sub Command1_Click()
Dim solve As Integer
Dim a As Integer
Dim b As Integer

a = Val(Text1.Text)
b = Val(Text2.Text)

solve = (a / b)

Label3.Caption = "The Division of Two Numbers is " & Trim(Val(solve)) & "."
End Sub

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

Private Sub Command3_Click()
End
End Sub