Sunday, March 13, 2016

Celsius To Fahrenheit Converter in AngularJS

A very simple program that I wrote using AngularJS that will ask the user to give the temperature in Celsius and then it will convert it into Fahrenheit equivalent. The code is very simple and easy to understand for anyone interested in AngularJS programming.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output

Program Listing

<html>
<head> 
<title>  Celsius To Fahrenheit Converter in AngularJS </title>
</head>
<script type="text/javascript" src="angular.js"></script>
<script>
var app = angular.module('myApp', []);

app.filter('singleDecimal', function ($filter) {
    return function (input) {
        if (isNaN(input)) return input;
        return Math.round(input * 10) / 10;
    };
});

app.filter('setDecimal', function ($filter) {
    return function (input, places) {
        if (isNaN(input)) return input;
         var factor = "1" + Array(+(places > 0 && places + 1)).join("0");
        return Math.round(input * factor) / factor;
    };
});

app.controller('Ctrl', function ($scope) {
    $scope.val = 1.56;
});
</script>
<style>
p {
   color:blue;
   font-family: "arial";
   font-style: bold;
   font-size: 18px;
  }
  
h3{
   color:red;
   font-family: "arial";
   font-style: bold;
   font-size: 20px;
  }
  
 input[type='text'] 
   { 
   color:blue;
   font-family: "arial";
   font-size: 18px;
   font-style: bold;
   }
 </style>
 <body bgcolor="yellow">
<br><br>
<h3> Celsius To Fahrenheit Converter in AngularJS</h3>
<div ng-app="myApp">
    <p>Enter temperature in Celsius :
        <input type="text" ng-model="fahrenheit" maxlength="5" size="3"/>
    </p><br>

    <p>The temperature in celsius is {{ fahrenheit }}&degC its equivalent to fahrenheit is {{ (fahrenheit * 9/5) + 32 | setDecimal:1}}&degF.</p>
</div>.
</body>
</html>




Fahrenheit to Celsius Converter in AngularJS

A very simple program that I wrote using AngularJS that will ask the user to give the temperature in fahrenheit  and then it will convert it into celsius equivalent. The code is very simple and easy to understand for anyone interested in AngularJS programming.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




Sample Program Output


Program Listing


<html>
<head> 
<title> Fahrenheit to Celsius Converter in AngularJS </title>
</head>
<script type="text/javascript" src="angular.js"></script>
<script>
var app = angular.module('myApp', []);

app.filter('singleDecimal', function ($filter) {
    return function (input) {
        if (isNaN(input)) return input;
        return Math.round(input * 10) / 10;
    };
});

app.filter('setDecimal', function ($filter) {
    return function (input, places) {
        if (isNaN(input)) return input;
         var factor = "1" + Array(+(places > 0 && places + 1)).join("0");
        return Math.round(input * factor) / factor;
    };
});

app.controller('Ctrl', function ($scope) {
    $scope.val = 1.56;
});
</script>
<style>
p {
   color:blue;
   font-family: "arial";
   font-style: bold;
   font-size: 18px;
  }
  
h3{
   color:red;
   font-family: "arial";
   font-style: bold;
   font-size: 20px;
  }
  
 input[type='text'] 
   { 
   color:blue;
   font-family: "arial";
   font-size: 18px;
   font-style: bold;
   }
 </style>
 <body bgcolor="yellow">
<br><br>
<h3>Fahrenheit to Celsius Converter in AngularJS</h3>
<div ng-app="myApp">
    <p>Enter temperature in Fahrenheit :
        <input type="text" ng-model="fahrenheit" maxlength="5" size="3"/>
    </p><br>

    <p>The temperature in fahrenheit is {{ fahrenheit }}&degF its equivalent to celsius is {{ (fahrenheit - 32) * 5/9 | setDecimal:1}}&deg C.</p>
</div>.
</body>
</html>





Kilograms To Pounds Converter in AngularJS

A very simple program that I wrote using AngularJS that will ask the user to give the weight in kilograms and then it will convert it into pounds equivalent. The code is very simple and easy to understand for anyone interested in AngularJS programming.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output

Program Listing

<html>
<head> 
<title> Kilograms To Pounds Converter in AngularJS </title>
</head>
<script type="text/javascript" src="angular.js"></script>
<script>
var app = angular.module('myApp', []);

app.filter('singleDecimal', function ($filter) {
    return function (input) {
        if (isNaN(input)) return input;
        return Math.round(input * 10) / 10;
    };
});

app.filter('setDecimal', function ($filter) {
    return function (input, places) {
        if (isNaN(input)) return input;
         var factor = "1" + Array(+(places > 0 && places + 1)).join("0");
        return Math.round(input * factor) / factor;
    };
});

app.controller('Ctrl', function ($scope) {
    $scope.val = 1.56;
});
</script>
<style>
p {
   color:blue;
   font-family: "arial";
   font-style: bold;
   font-size: 18px;
  }
  
h3{
   color:red;
   font-family: "arial";
   font-style: bold;
   font-size: 20px;
  }
  
 input[type='text'] 
   { 
   color:blue;
   font-family: "arial";
   font-size: 18px;
   font-style: bold;
   }
 </style>
 <body bgcolor="yellow">
<br><br>
<h3>Kilograms To Pounds Converter in AngularJS</h3>
<div ng-app="myApp">
    <p>How many kilograms :
        <input type="text" ng-model="kilograms" maxlength="5" size="3"/>
    </p><br>
    <p>The weight in kilogram(s) is {{kilograms}} kg(s) its equivalent in pounds is {{ kilograms * 2.20462262 | setDecimal:0 }} lbs.</p>
</div>.
</body>
</html>
 



Kilometers To Miles Converter in AngularJS

A very simple program that I wrote using AngularJS that will ask the user to give the distance in kilometers and then it will convert it into miles equivalent. The code is very simple and easy to understand for anyone interested in AngularJS programming.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output

Program Listing

<html>
<head> 
<title> Kilometers To Miles Converter in AngularJS </title>
</head>
<script type="text/javascript" src="angular.js"></script>
<script>
var app = angular.module('myApp', []);

app.filter('singleDecimal', function ($filter) {
    return function (input) {
        if (isNaN(input)) return input;
        return Math.round(input * 10) / 10;
    };
});

app.filter('setDecimal', function ($filter) {
    return function (input, places) {
        if (isNaN(input)) return input;
         var factor = "1" + Array(+(places > 0 && places + 1)).join("0");
        return Math.round(input * factor) / factor;
    };
});

app.controller('Ctrl', function ($scope) {
    $scope.val = 1.56;
});
</script>
<style>
p {
   color:blue;
   font-family: "arial";
   font-style: bold;
   font-size: 18px;
  }
  
h3{
   color:red;
   font-family: "arial";
   font-style: bold;
   font-size: 20px;
  }
  
 input[type='text'] 
   { 
   color:blue;
   font-family: "arial";
   font-size: 18px;
   font-style: bold;
   }
 </style>
 <body bgcolor="yellow">
<br><br>
<h3>Kilometers To Miles Converter in AngularJS</h3>
<div ng-app="myApp">
    <p>How many kilometers :
        <input type="text" ng-model="kilometers" maxlength="5" size="3"/>
    </p><br>
    <p>The distance in kilometers is {{kilometers}} km its equivalent in miles is {{ kilometers * 0.621371192 | setDecimal:2 }} mi.</p>
</div>.
</body>
</html>
 

Employee's Payroll System in PHP and MySQL With Radio Buttons

A simple database drive Payroll System that I have written in PHP and MySQL as my database that will compute the salary of the employee in the company and then the user can able to save all the information into the database. The code is very simple and easy to understand.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.









Sunday, March 6, 2016

Average of Five Numbers in AngularJS

A simple program that I wrote using AngularJS as my JavaScript framework that will ask the user to give five numbers and then the program will compute for the average value of all five numbers. This program is very simple because I'm still learning AngularJS generally.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing

<html>
<head> 
<title> Avergage of Five Numbers in AngularJS </title>
</head>
<style>
p,h3 {
   color:blue;
     display: inline-block;
    float: left;
    clear: left;
    width: 380px;
    text-align: right;
   font-family: "arial";
   font-style: bold;
   size: 16;
  };
  
  input {
  display: inline-block;
  float: left;
}

 </style>
<script type="text/javascript" src="angular.js"></script>
<body bgcolor="yellow">
<script>
var app = angular.module('myApp', []);

app.filter('singleDecimal', function ($filter) {
    return function (input) {
        if (isNaN(input)) return input;
        return Math.round(input * 10) / 10;
    };
});

app.filter('setDecimal', function ($filter) {
    return function (input, places) {
        if (isNaN(input)) return input;
         var factor = "1" + Array(+(places > 0 && places + 1)).join("0");
        return Math.round(input * factor) / factor;
    };
});

app.controller('Ctrl', function ($scope) {
    $scope.val = 1.56;
});
</script>
<br><br>
<h3>Average of Five Numbers in AngularJS</h3>
<div ng-app="myApp">

    <p>Enter a Value in Item No. 1 :
        <input type="text" ng-model="a" placeholder="enter a number" size="15"/>
    </p><br>
    
   <p>Enter a Value in Item No. 2 :
        <input type="text" ng-model="b" placeholder="enter a number" size="15"/>
    </p><br>
<p>Enter a Value in Item No. 3 :
        <input type="text" ng-model="c" placeholder="enter a number" size="15"/>
    </p><br>
    
    <p>Enter a Value in Item No. 4 :
        <input type="text" ng-model="d" placeholder="enter a number" size="15"/>
    </p><br>
<p>Enter a Value in Item No. 5 :
        <input type="text" ng-model="e" placeholder="enter a number" size="15"/>
    </p><br> 
    
<br><br>
    <p>The total average is {{ (a -- b -- c -- d -- e) / 5  | setDecimal:1  }}</p>
</div>
</html>








Payroll System in AngularJS

A simple Payroll System that I have create using AngularJS as my JavaScript framework the code is very simple and easy to understand.  I just learning how to program in AngularJS and I find it easy and very interesting to explore and learn.

If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing

<html>
<head> 
<title> Payroll Program in AngularJS </title>
</head>
<style>
p,h3 {
   color:blue;
     display: inline-block;
    float: left;
    clear: left;
    width: 380px;
    text-align: right;
   font-family: "arial";
   font-style: bold;
   size: 16;
  };
  
  input {
  display: inline-block;
  float: left;
}

 </style>
<script type="text/javascript" src="angular.js"></script>
<body bgcolor="yellow">
<script>
var app = angular.module('myApp', []);

app.filter('singleDecimal', function ($filter) {
    return function (input) {
        if (isNaN(input)) return input;
        return Math.round(input * 10) / 10;
    };
});

app.filter('setDecimal', function ($filter) {
    return function (input, places) {
        if (isNaN(input)) return input;
         var factor = "1" + Array(+(places > 0 && places + 1)).join("0");
        return Math.round(input * factor) / factor;
    };
});

app.controller('Ctrl', function ($scope) {
    $scope.val = 1.56;
});
</script>
<br><br>
<h3>Payroll System in AngularJS</h3>
<div ng-app="myApp">
<p>Employee's Name :
        <input type="text" ng-model="emp" placeholder="employee's name" size="20"/>
    </p>
    <p>Number of Days Work :
        <input type="text" ng-model="days" placeholder="no. days works" size="15"/>
    </p>
    <p>Rate Per Day :
        <input type="text" ng-model="rate" placeholder="rate per day" size="15"/>
    </p>
<br>
<p> Employee's Name is  {{emp}}. </p><br>
<p> The Number of Days Worked is {{days}}.</p><br>
<p> The Rate Per Day is ${{rate | setDecimal:2 }}. </p><br><br>
    <p>The salary of {{emp}} is  $ {{ days * rate  | setDecimal:1 }}</p>
</div>
</html>




Product of Two Numbers in AngularJS

A simple program that I wrote in AngularJS that will ask the user to give number numbers and then our program will compute the product of the two numbers. I am still a beginner in AngularJS programming. I hope you will find my work guys useful.


If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing


<html>
<head> 
<title> Product of Two Numbers in AngularJS </title>
</head>
<style>
p,h3 {
   color:blue;
     display: inline-block;
    float: left;
    clear: left;
    width: 380px;
    text-align: right;
   font-family: "arial";
   font-style: bold;
   size: 16;
  };
  
  input {
  display: inline-block;
  float: left;
}

 </style>
<script type="text/javascript" src="angular.js"></script>
<body bgcolor="yellow">
<br><br>
<h3>Product of Two Numbers in AngularJS</h3>
<div ng-app="">
    <p>First Number:
        <input type="text" ng-model="a" placeholder="enter a number" size="15"/>
    </p>
    <p>Second Number:
        <input type="text" ng-model="b" placeholder="enter a number" size="15"/>
    </p>
<br>
    <p>The product of {{a}} and {{b}} is {{ a * b }}.</p>
</div>
</body>
</html>