Short Notes

Add and Remove event listener javascript

Enable and Disable scroll with event listener javascript

Add and Remove event listener with javascript is very simple. First, you need to create your function with your business logics. We have taken an example of stop and start scrolling&nbs...

How to find minimum value of an array

Minimum value of an array using foreach loop

It's very simple to find the minimum value of an array using foreach loop. Create an array with some numeric value. Now create a temporary variable $temp in which stored array’s first index&rsqu...

Find the Largest Number in an Array using php

Example  for getting largest number in an array

Example  for getting largest number in an array: $array = array(20,18,95,45,48); $max1 = 0; $max2 = 0; for($i=0; $i<count($array); $i++) { if($array[$i] > $max1) { ...

Call by reference in php with example

Reference variable in php with example

Let's understand the concept of call by reference by the help of examples. Variable $str is passed to the adder function where it is concatenated with 'Call By Reference' string. Here, printing $str v...


Switch statement in php

Switch case in php with multiple case example

Switch statement is used to execute one statement from multiple conditions in PHP. It works like PHP if-else-if statement. But it's better that if-else-if statement. Syntax for Switch statement in ph...

How to create arrows in CSS

Simple way to create arrow in your HTML page

Simple way to create arrow in your HTML page, just add few line of CSS and create it. There two step to add arrow in your page. 1. Your HTML code: <p>Left arrow: <i class="arrow left">&l...

Javascript show hide div onclick toggle

Display or hide the matched elements.

The toggle() method simply toggles the visibility of elements. The matched elements will be revealed or hidden immediately, with no animation, by changing the CSS display property. Simply if the eleme...

Android difference between Two Dates

How do I calculate difference in days between two dates?

In the given example we will learn how to calculate difference between two dates in java in terms of Second/ Minutes / Hours / Days. public int getDateDiffFromNow(String date){ int days = 0; tr...


Top