web stats analysis

Archive for August 7th, 2013

How to force my .NET App to run as administrator on Windows 7?

Allow given application to run as administrator Windows 7.
Follow below steps:
Step:1- Right Click on your project

Step:2- Now click on Add -> New Item

Step:3- Now create Application Manifest file.

Step:4- In Manifest file find requestedExecutionLevel.

Step:5- And replace with <requestedExecutionLevel                      level=”requireAdministrator”>

Step:6- Now save your file and run it.

Allow given application to run as administrato,.NET App to run as administrator on Windows 7

What is variable scope in php?

Scop of variable
Php already has a Variable Scops..Which like Below
Here, Four type variable scops available.
Global.
Loval.
Static.
Parameter.
Global Scope.
Little Discription about Global
Global variable is decaler outside of any functionWe can acceess Global variables in anywere.When you want to access a Global variable, use the “global” keyword:
Example.
<?php$a=10;

$b=20;

function demo()

{

$GLOBALS['b']=$GLOBALS['a']+$GLOBALS['b'];

}

demo();

echo $b;

?>

We can create an array of all global variable in PHP,Using $GLOBALS[index]

Here..

=>index contain variable name.

We can update global variable.

Example
<?php$a=5;

$b=10;

function demo()

{

$GLOBALS['b']=$GLOBALS['a']+$GLOBALS['b'];

}

demo();

echo $b;

?>

Local Scope.
The variable declare inside the function is call local variable..
Example
<?php$a=10; // global scope

function demo()

{

echo $x; // local scope

}

demo();

?>

Static Scope.
Every time the variable is remuve after completed function.But,many time you need local variable not remove.

This time use Static variable.

Example.

<?php

function demo()

{

static $a=0;

echo $a;

$a++;

}

demo();

demo();

demo();

?>

Parameter Scope.
A parameter is a local variable.

Parameters are define in a parameter list it’s kind of the function:

Example
<?phpfunction demo($a)

{

echo $a;

}

demo(10);

?>

Scope variable in php,What is Scope variable in php,local variable,global variable,static variable,parameter variable,

What is variable scope in php?,learn variable scope in php.