How To Install the Apache Web Server on Ubuntu 16.04

STEP 1: INSTALL APACHE

Apache is available within Ubuntu’s default software repositories, so we will install it using conventional package management tools

JavaScript Closure


Most of developers use JavaScript Closure, JavaScript Closure means that an inner function always has access to the vars and parameters of its outer function. 

Creating a Nested function in JavaScript called Closure. 

how to call Class direct into function

In function direct call parent class and it's functions using the object,

Parent class now, available to inherit using function before we inherited class to class, can call specific function only.


public function function_name(): CLASS_Name { } 
After the creating a object of the Class $object = new CLASS_Name();

call function of class using object

$obA->index();
The Following complete tutorial with guide to how to call parent class to specific child class's function.
<?php
//Limited return type covariance and argument type contravariance
//how to call Class direct into method.
class A {
  
public function index(){
    echo "test1";
}
  
}
class B extends A {}

class Producer {
    public function test(): A {
      $obA = new A();
      echo $obA->index();
      echo "test2";
    }
}
class ChildProducer extends Producer {
    public function method(): B {}
}

$ob = new Producer();
$ob->test();

?>

Javascript do while loop Statement

JavaScript do while loop will always be executing at least once, even if condition false, because condition works at the end of block of code so, block of code executed before the condition.

PHP : Converts double slashes in a string to a single slash

In this tutorial learn how to Converts double slashes in a string to a single slash, except those found in http:// ,

http://www.example.com//index.php 

becomes: 

http://www.example.com/index.php

Tutorial

PHP : Removes single and double quotes from a string

In this tutorial learn how to Removes single and double quotes from a string using str_replace() method.

Tutorial

PHP : Removes slashes contained in a string

In this tutorial learn how to Removes slashes contained in a string using function with stripslashes() method.


PHP : How to get Number of days in a month

In this tutorial learn how to get number of days in month using function, pass parameter month and year in function only

JavaScript Functions

A JavaScript function is a block of code to perform a specific task.

JavaScript Function Syntax

A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().

JavaScript Array forEach() Method

In this tutorial learn how works Array with foreach() loop in javaScript, List each item in the array example:




 <!DOCTYPE html>
<html>
<body>

<p>List all array items, with keys and values:</p>

<p id="result"></p>

<script>
var fruits = ["Mango", "Banana", "Pineaple"];

fruits.forEach(foreachdemo);

function foreachdemo(item, index) {
  document.getElementById("result").innerHTML += index + ":" + item + "<br>"; 
}
</script>

</body>
</html>

How To Install the Apache Web Server on Ubuntu 16.04

STEP 1: INSTALL APACHE Apache is available within Ubuntu’s default software repositories, so we will install  it using conventional pack...