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

Syntax:

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

imagecopyresized PHP GD Function

Copy and resized the specific part of an image

Syntax:

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

syntax:

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 )

width
Image width for creating

height
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

<?php
function test_array($ar)
{
for($i=0;$i<count($ar);$i++)
{
  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

=====> COMPILATION PROCESS <======

                     |
                     |---->  Input is Source file(.c)
                     |
                     V
            +=================+
            |                 |
            | C Preprocessor  |
            |                 |
            +=================+
                     |
                     | ---> Pure C file ( comd:cc -E <file.name> )
                     |
                     V
            +=================+
            |                 |
            | 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.

#include<stdio.h>
#include<conio.h>
/*  Girfa : student Help
    for more question visit: http://girfahelp.blogspot.in/2012/09/some-program-of-c-language.html
*/
void main()
{ int ar[5],i=0;
clrscr();
goinput:
if(i<5)
{

Saturday 16 April 2016

Scrollbar Using HTML

<html>
<head>
<title>
Girfa : Scrollbar Demo
</title>
</head>
<body>

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

Microsoft-Office-MCQ-Question-Answer

1 By default how many tabs are shown in word
(A)7
(B)8
(c )9
(D)6
2 shortcut of subscript in word
(A)Contl+=
(B)Cntl+=
(c )Cntl++
(D)Both a & b
3 Type writer font
(A)typeface
(B)algerian
(c )times new roman
(D)Courier

Wednesday 13 April 2016

Password Validation Check C Language Program

#include<stdio.h>
#include<conio.h>
/******************************************
Develop By Girfa
Visit : http://girfahelp.blogspot.in/2012/09/some-program-of-c-language.html
*******************************************/
void main()
{
char pass[20],ch;
int i,number,special,capital,small;
number=special=capital=small=0;
clrscr();

Tuesday 12 April 2016

3gvs4g

3G vs 4G

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
 (A)FTTP (B)SMTP ( C)SNTP (D)HDLC

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

<html>
<head>
<title>Girfa : Image Map</title>
</head>
<body>
<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">
  </map>
</body>
</html>

Color-Tringle-c-clanguage-program

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

#include<stdio.h>
#include<conio.h>
/* Girfa : Student Help
   Color triangle example
   for program visit :
   http://girfahelp.blogspot.in/p/c-language.html
*/
void main()
{