Saturday, 30 April 2016

Resized and Saved Uploaded Image in PHP

Image resizing is an important task because if uploaded image size is bigger than requirement and we are not resizing it then it will consume server space and bandwidth which is not good.
So Resizing is necessary .you need to use four PHP GD functions for achieve this.

imagejpeg PHP GD Function

Creates and output an image to browser or saved into a file


bool imagejpeg ( resource $image [, string $filename [, int $quality ]] )

imagecopyresized PHP GD Function

Copy and resized the specific part of an image


bool imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h )

imagecreatefromjpeg PHP GD Function

Create a new image from a url or uploaded by file control


resource imagecreatefromjpeg ( string $filename )

Argument Detail:

filename Path to the JPEG image.

Return Values :

imagecreatetruecolor PHP GD Function

The imagecreatetruecolor () function is used in PHP to create a new true color image using the GD Library.

resource imagecreatetruecolor ( int $width , int $height )

Image width for creating

Image height for creating

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

function test_array($ar)
  echo  "<br>" . ($i+1) . "'st element value " . $ar[$i];

Monday, 18 April 2016

Get Record gridview to window control by select a row form gridview

Private Sub DataGridView1_RowHeaderMouseClick_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.RowHeaderMouseClick

Context Free Grammar

     The analysis phase of a compiler breaks up a source program into constituent pieces and produces an internal representation for it, called intermediate code. The synthesis phase translates the intermediate code into the target program. 

     Analysis is organized around the "syntax" of the language to be compiled. The syntax of a programming language describes the proper form of its programs, while the semantics of the language defines what its programs mean; that is, what each program does when it executes. For specifying syntax, we present a widely used notation, called context-free grammars or BNF (for Backus-Naur Form)

Compilation Process


                     |---->  Input is Source file(.c)
            |                 |
            | C Preprocessor  |
            |                 |
                     | ---> Pure C file ( comd:cc -E <> )
            |                 |
            | Lexical Analyzer|
            |                 |

Sunday, 17 April 2016

Print array without using loop in c language

Q . Write a program to print an array value without using loop.

/*  Girfa : student Help
    for more question visit:
void main()
{ int ar[5],i=0;

Saturday, 16 April 2016

Friday, 15 April 2016

Image Map Highlighter

Image Map Highlighter

Image map is used to provide different type of links on image at a any specific place.

Image map help you to provide many links on a single image which is requirement of many fields. I am going to show you an example of e paper for a print paper which is totally based on image map ..

Thursday, 14 April 2016

Office and Computer Fundamental MCQ Question Answer


1 By default how many tabs are shown in word
(c )9
2 shortcut of subscript in word
(c )Cntl++
(D)Both a & b
3 Type writer font
(c )times new roman

Wednesday, 13 April 2016

Password Validation Check C Language Program

Develop By Girfa
Visit :
void main()
char pass[20],ch;
int i,number,special,capital,small;

Sunday, 10 April 2016

CCC (Computer Basic) MCQ Question Answer

1 a sesitive device that convert printed material into its equivalent digital form
 (A)scanner (B)ocr ( C)a and b (D)None of these

2 Which protocol provide email facility

3 The basic architecture for digital computer was developed by
 (A)Bill Gates (B)Charles Babbage ( C)John Von Neumann (D)Garden Moore

4 Decimal (128) Hex Equal is (?) 
 (A)20 (B)30 ( C)40 (D)80

Thursday, 7 April 2016

Image Map HTML

<title>Girfa : Image Map</title>
<img src="1.jpg" usemap="#planetmap" >
<map name="planetmap" >
  <area shape="rect" coords="0,0,82,126" href="2.htm" alt="Sun" title="Get Report">
  <area shape="rect" coords="150,90,320,620" href="2.jpg" alt="Sun" title="Strong Man">


Color Triangle C Language Program with full code.This program creates a dynamic triangle based on user input and print message when  tringle size exceeded.

Color C Language Program outpur screen

/* Girfa : Student Help
   Color triangle example
   for program visit :
void main()