Sunday, February 11, 2018

Factors of a Number in JavaScript

A simple program that I wrote using Javascript to ask the user to give a number and then our program will display the factors of the given number.

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

index.htm

<!--
 Written By Mr. Jake R. Pomperada, MAED-IT
 February 11, 2018   04:24 PM   Sunday
 Bacolod City, Negros Occidental Republic of the Philippines
 jakerpomperada@yahoo.com and jakerpomperada@gmail.com -->
<!doctype html>
<html>
<head>
<title>Factors of a Number in JavaScript </title>
<style>

   .art {

      font-family: arial;
      font-weight: bold;
      color:red;
      text-align: center;
      width:60%;
      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 factors(n)
{
 var num_factors = [], i;

 for (i = 1; i <= Math.floor(Math.sqrt(n)); i += 1)
  if (n % i === 0)
  {
   num_factors.push(i);
   if (n / i !== i)
    num_factors.push(n / i);
  }
 num_factors.sort(function(x, y)
   {
     return x - y;});  // numeric sort
     return num_factors;
    }


function start()
{
num1=Number(document.getElementById("val1").value);

document.getElementById("result").value= factors(num1);
}

</script>


<script>
function clear_me()
{
document.getElementById("val1").value = "";
document.getElementById("result").value = "";
document.getElementById("val1").focus();
}
</script>

</head>
<body>
<h1 class="art"> Factors of a Number in JavaScript </h1>
    <p  class="art2"> Created By Mr. Jake R. Pomperada, MAED-IT </p>
<br><br>
Give a Number <input id="val1" type="text" size="5" autofocus>
<br><br>
The result is <input id="result" type="text" size="50"
<br> <br> <br>
<button id="button_me" onclick="start()">Check</button>
&nbsp;&nbsp;&nbsp;
<button id="button_me" onclick="clear_me()">Clear</button>
</br></br>
</body>
</html>




Swap Two Numbers in JavaScript

In this article I would like to share with you a simple program that I wrote using JavaScript to ask the user to give number integer numbers and then our program will swap the arrangement of the two numbers.

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

index.htm

<!--
 Written By Mr. Jake R. Pomperada, MAED-IT
 February 6, 2018   04:24 PM   Tueday
 Bacolod City, Negros Occidental Republic of the Philippines
 jakerpomperada@yahoo.com and jakerpomperada@gmail.com -->
<!doctype html>
<html>
<head>
<title> Swap Two Numbers in JavaScript </title>
<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 swap()
{

var temp;

num1=Number(document.getElementById("val1").value);
num2 =Number(document.getElementById("val2").value);
temp=num1;
num1=num2;
num2=temp;
document.getElementById("result1").value= num1;
document.getElementById("result2").value= num2;
}
</script>

<script>
function clear_me()
{
document.getElementById("val1").value = "";
document.getElementById("val2").value = "";
document.getElementById("val1").focus();
document.getElementById("result1").value= "";
document.getElementById("result2").value= "";
}
</script>

</head>
<body>
<h1 class="art"> Swap Two Numbers in JavaScript </h1>
    <p  class="art2"> Created By Mr. Jake R. Pomperada, MAED-IT </p>
<br><br>
Value Number 1 <input id="val1" type="text" size="5" autofocus>
<br><br>
Value Number 2 <input id="val2" type="text" size="5">
<br><br>
After Swapping
<br><br>
Value Number 1 <input id="result1" type="text" size="5">
<br><br>
Value Number 2 <input id="result2" type="text" size="5">
<p id="msg"> </p> 
<button id="button_me" onclick="swap()">Check</button>
&nbsp;&nbsp;&nbsp;
<button id="button_me" onclick="clear_me()">Clear</button>
</br></br>
</body>
</html>





Math and Science Tutorials ~ Professional Math and Science Tutorial Services Made Easy.


Having problems following through classroom lectures in mathematics and science and appreciating mathematics and science at its basics? Do you need assistance in coping with the inherent challenges encountered with these subjects? You might just be in need of a follow up, or some more practice in solving problems in these areas. Then a one-on-one or guided practice might be the one for you. Mathematics is all about procedures and pattern(s) recognition in solving. If these procedures and patterns are understood, any mathematical procedure no matter how complex is made a lot easier and manageable as they may first appear at first reading. Scientific problems on the other hand need mathematical skills in applying the given information in the problem to appropriate formulas together with information like what is given and what is required in the problem.



Dr. Ma. Junallie F. Pomperada is a professor of the College of Engineering of the University of St. La Salle in the Chemical Engineering Department. Graduated from University of Negros Occidental-Recoletos and finished her Master of Engineering Major in Chemical Engineering from Central Philippine University. She finished her Doctor of Philosophy in Technology Management from Carlos Hilado Memorial State College.
Services Offered:
Tutorial on the following subjects: Inorganic Chemistry, Analytical Chemistry, Thermodynamics, Algebra, Trigonometry, Differential and Integral Calculus, Differential Equations, Advanced Engineering Mathematics, Chemical Reaction Engineering, Process Control ad Unit Operations with Specialization in Distillation, Evaporation, Gas Absorption, Stripping, Extraction and Leaching.
She also offers online tutorial kindly contact here in the following address below.
Contact Information:
Email: alliepomperada@yahoo.com
Mobile: +63 (0917)7010825
Residence: +63 (034)4335675
Facebook Address: https://www.facebook.com/allie.fuentebella
Advertisements

WHAT IS THE EDGE OF USING PROMOTIONAL PRODUCTS

Hello friends and visitors of my website I would like to promote the online business of my best friend Mr. John Madrigal kindly read his article below it is all about promotional products and what is the benefits of promotional products to your business. If you like the article please click the follow link to know more about Saybasic http://www.saybasic.com Thank you very much for the support guys.


Any advertising ideas help you to connect with prospective clients, whether on prints, radio, or television. This helps them entice to buy products or services offered by advertisers who wish that their business become more competitive. And we all know that competition is something that business owners cannot be ignored regardless of any types of industry. Without ads, your business will be out in the competition, because there are so many big giants dominating in the market niche. As a business owner, you won't probably allow that your competitors take off and possibly you'll have to do something on it before it's too late.

Big business has already an edge because some can afford to put their advertisement on television, newspaper and magazine, or on the radio. While as a small business owner, you don't like your business to become less competitive. You think out of the box and will not rely only on your existing clients. You may also want to consider acquiring some promotional products so you can nest your business with this kind of mean. Giving away promotional items can actually help multiply your ads because it can be passed from person to person. With a logo or imprint on your promotional products, it is possible that it would help you connect with these potential customers, as they might probably need something in the future. Seeing those imprints or logo, it would help them remember your business and that could possibly make them aware about what you can offer them. Unlike print ads, the cons it that, they might only see you once; and the information may not always be viable for them. Promotional items as giveaways are affordable, whether it is a pen, key chains, note pads or umbrella because of the unique benefits that one can get from these items. With promotional products, information is very convenient and viable.

Now it's really hard to argue some of the points between promotional products and traditional print ads. Statistics are facts and of course as a business owner, you would not like to spend hundred dollars that ads are run only once and then soon enough these are just only thrown away or put it in the cabinet. It is also a fact that most people are not going to cut a print ad out and then carry it with them every day. With Promotional products, it can be carried anywhere they go and these can be used every day. For example a simple key chain with a name or imprint on it displaying company information can be carried everyday by a user. Promotional items are a lot of more savings for a customer own perspective.

Promotional products are actually lead generator which allows to capture some potential customers and eventually buy your products and services. It is described as a silent salesman which the imprints or logo are the first hand information that customers would keep in mind. Promotional products last very long and it works more than the print ads do.

Article Source: 
http://www.valuable-content.com/others/what-is-the-edge-of-using-promotional-products.html


Saturday, February 10, 2018

Login Security System with Display Username in Visual Basic NET and Microsoft Access

Here is a program that I wrote using Microsoft Visual Basic NET 2013 and Microsoft Access 2010 to protect the user from intruders I called this program login security system. The program will search and display the name of the registered user of the system. 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.




Database, Table and Sample Record structure in Microsoft Access 2010









Sample Program Output


Program Listing

Form1.vb

Imports System.Data.OleDb


Public Class Form1
    Public fullname As String
    Dim user As String = ""
    Dim pass As String = ""

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\Login.accdb")
        Dim cmd As OleDbCommand = New OleDbCommand( _
                   "SELECT * FROM tblusers WHERE USERNAME = '" & _
                   TextBox1.Text & "' AND PASSCODE = '" & TextBox2.Text & "' ", con)
        con.Open()
        Dim sdr As OleDbDataReader = cmd.ExecuteReader()
        If (sdr.Read() = True) Then
            user = sdr("USERNAME")
            pass = sdr("PASSCODE")
            fullname = sdr("FIRSTNAME") + " " + sdr("LASTNAME")
            Form2.Show()
        Else
            MessageBox.Show("Invalid username or password!")
            TextBox1.Text = ""
            TextBox2.Text = ""
            TextBox1.Focus()
        End If
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Me.Close()
    End Sub
End Class

Form2.vb

Public Class Form2

    Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.Show()
        Label2.Text = Trim(Form1.fullname)
    End Sub
End Class







Tuesday, February 6, 2018

Armstrong Number in JavaScript

Here is a sample program that will check if the given number is an Armstrong Number or Not using JavaScript. 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

index.htm


<!--
 Written By Mr. Jake R. Pomperada, MAED-IT
 February 6, 2018   04:24 PM   Tueday
 Bacolod City, Negros Occidental Republic of the Philippines
 jakerpomperada@yahoo.com and jakerpomperada@gmail.com -->
<!doctype html>
<html>
<head>
<title> Armstrong Number in JavaScript </title>
<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 armstrong()
{

var arm=0,a,b,c,d,num;
num=Number(document.getElementById("no_input").value);

temp=num;
while(temp>0)
{
a=temp%10;
temp=parseInt(temp/10); // convert float into Integer
arm=arm+a*a*a;
}
if(arm==num)
{

 document.getElementById("msg").innerHTML = "The given number " + num
 + " is a Armstrong number.";
}
else
{
document.getElementById("msg").innerHTML = "The given number " + num
 + " is Not a Armstrong number.";
}
}
</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"> Armstrong 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" size="5" autofocus>
<br><br>
<p id="msg"> </p> 
<button id="button_me" onclick="armstrong()">Check</button>
&nbsp;&nbsp;&nbsp;
<button id="button_me" onclick="clear_me()">Clear</button>
</br></br>
</body>
</html>