Monday, April 6, 2020

What is the extension of PHP?

.php is the extension of PHP

PHP originally stood for

PHP originally stood for:
Personal Home Page in 1994


The acronym was formally changed to PHP: HyperText Preprocessor, in 1997

Write a php program to check wether a number is prime or not

Write a php program to check wether a number is prime or not 

<?php 
// PHP code to check wether a number is prime or Not

function primeCheck($number)

    if ($number == 1) 

    return 0; 

    for ($i = 2; $i <= $number/2; $i++)

        if ($number % $i == 0) 

            return 0; 

    } 

    return 1; 

  
$number = 31; 

$flag = primeCheck($number); 

if ($flag == 1) 

    echo "Prime number"; 
else

    echo "Not Prime number"
?>

Write a program in php to check given number is even or odd

Write a program in php to check given number is even or odd

Answer:
<html>
<body>
<h3>Odd or Even PHP Example</h3>
<form action="" method="post">
<label>Enter a number</label>
<input type="text" name="number" />
<input type="submit" />
</form>
</body>
</html>
<?php 
if($_POST){
$number = $_POST['number']; 
//check if the enter value is a number or throw an error
if (!(is_numeric($number) && is_int(0+$number))){
echo "<p style='color:red;'>Error: You entered a string. Please enter an Integer</p>";
die();
}
//divide the entered number by 2 
//if the reminder is 0 then the number is even otherwise the number is odd
if(($number % 2) == 0){
echo "You entered an Even number";
}else{
echo "You entered an Odd number";
}
}
?>

Joke of the month

पहिल्यांदा दारू पिऊन पडल्यावर कोण पहात नव्हतं

पण आता

उचलून साईट घेऊन विचारतात 
"कुठं मिळाली" 😂😂😂😂😂😂

Maths Joke of equation

Equations! - This is the best
I have read in a LONG time !!!!

Equation1 

 

Human = eat + sleep + work + enjoy

 Donkey = eat + sleep + work

Therefore:
Human = Donkey + enjoy

Therefore:
Human-enjoy = Donkey 

 In other words,
 A Human that doesn't know how to enjoy = Donkey that works.
 

 Equation 2
 Man = eat + sleep + earn money
 Donkey = eat + sleep

 Therefore:
 Man = Donkey + earn money
 
Therefore:
 Man-earn money = Donkey
 
 In other words
 Man who doesn't earn money = Donkey
 
Equation 3

 Woman= eat + sleep + spend
 Donkey = eat + sleep
 
 Therefore:
 Woman = Donkey + spend
 Woman - spend = Donkey
 
 In other words,
 Woman who doesn't spend = Donkey
 
 To Conclude:
 From Equation 2 and Equation 3
 
 Man who doesn't earn money = Woman who doesn't spend
 
 So Man earns money not to let woman become a donkey!
 And a woman spends not to let the man become a donkey!
 
 So, We have:
 Man + Woman = Donkey + earn money + Donkey + Spend money
 
 Therefore.     
 from postulates 1 and 2, we can conclude
 
 
 Man + Woman = 2 Donkeys that live happily together, earning and spending! 

😂😜😉😝😛😂

(Maths people pls check & verify it)

Business and Job Comparison


Business and Job
Business and Job
Sr. No Business Job
1 Means: a person's regular occupation, profession, or trade. Means:a paid position of regular employment.
2 It is a commercial activity. It is a task or piece of work, especially one that is paid.
3 Types of business organization: sole proprietorship, partnership, corporation,Cooperative,Franchises, and Limited Liability Company, or LLC In society, most of us have multiple jobs. A person may be an employee, a parent, and homemaker. They are all, in fact, by definition, types of jobs.
4 It is categorized as paid only as its commercial which can be on time given It can be full-time or part-time categorized as paid or unpaid.

AI internal programming

  AI's internal programming involves complex algorithms and data structures that enable machines to learn, reason, and interact. Here...