Saturday, 30 April 2016

getimagesize PHP Function

Get the size of an image

array getimagesize ( string $filename [, array &$imageinfo ] )

The getimagesize() function will determine the size of any given image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag and the correspondent HTTP content type.

list($width, $height) = getimagesize($_FILES['file']['tmp_name']);
echo $width;
echo $height;

Thursday, 28 April 2016

Difference between Terminal and Non-Terminal Symbols (Compiler Design)


Terminal Symbol

  • A terminal is a symbol which does not appear on the left-hand side of any production.
  • Terminal symbols cannot be changed using the rules of the grammar.
  • terminal symbols, which are the characters of the alphabet that appear in the strings generated by the grammar.
  • a terminal symbol is one that cannot be broken down further, e.g. a literal character or digit (but not necessarily as it depends on the grammar).
example : Contant etc

Monday, 25 April 2016

Histogram Digital Image Processing

The histogram is in digital image processing used to indicate the intensity of colors with the help of graph as follows

Wednesday, 20 April 2016

Passing Dynamic Array to function in php

<?php
function test_array($ar)
{
for($i=0;$i<count($ar);$i++)
{
  echo  "<br>" . ($i+1) . "'st element value " . $ar[$i];
}
}
?>