Disable Usb Ports in Windows XP

Monday, March 22, 2010 13:25
Posted in category Administration

Assume that you want to prevent users from connecting to a USB storage device that is connected to a computer that is running Windows XP and you have the Admin access to the System.

1.First Your Login to Administrator,

Login to Administrator



2.Right Click On My Computer,

Right Click On My Computer

2.Selct Manage Option in the context menu,

Manage Option in the context menu

3.Select Device Manager,

 Device Manager

4.Selcet Universal Serial Bus Controllers,

Universal Serial Bus Controllers

5.Selct Sub USB Ports,

 Sub USB Ports

6.Right Click on each Usb Port,

Right Click on each Usb Port

7.Select the Disable Option,

Disable Option

8.Total All 4 ports you can Disabled.

Check Site Loading Speed using CURL curl_getinfo() in PHP.

Monday, June 22, 2009 10:06
Posted in category PHP, Programming

We use curl_getinfo() in to get the information of last transfer that made use of curl functions in PHP.  Using the following code we can get the time taken to load a webpage.

$ch = curl_init('http://www.inetminds.com/parsing-xml-feeds-in-php-with-simplexml-111/');

// set  cURL to return the contents in a variable instead of giving it to the browser.

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Execute
$contents = curl_exec($ch);

// Check if any error occured
if(!curl_errno($ch)){
// $info = curl_getinfo($ch);
$total_time     = curl_getinfo($ch, CURLINFO_TOTAL_TIME);
$url             =curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);

echo $ulr 'Took ' . $total_time . ' seconds to load ' ;
}
// Close handle
curl_close($ch);

Using curl_init(‘http://www.inetminds.com/parsing-xml-feeds-in-php-with-simplexml-111/’) we have Initialized the session to load ‘http://www.inetminds.com/parsing-xml-feeds-in-php-with-simplexml-111/’ and returns a cURL handle which can be passed to other cURL functions.

Using curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) we loaded the page to variable $ch.

Using curl_getinfo($ch, CURLINFO_TOTAL_TIME) we retrieved the total time taken for the last CURL transfer.

Using curl_getinfo($ch, CURLINFO_EFFECTIVE_URL) we retrieved the url effected or used in the last CURL transfer.

Below are some more options that can be used whit curl_getinfo() for different requirements.

* CURLINFO_EFFECTIVE_URL – Last effective URL
* CURLINFO_HTTP_CODE – Last received HTTP code
* CURLINFO_FILETIME – Remote time of the retrieved document, if -1 is returned the time of the document is unknown
* CURLINFO_TOTAL_TIME – Total transaction time in seconds for last transfer
* CURLINFO_NAMELOOKUP_TIME – Time in seconds until name resolving was complete
* CURLINFO_CONNECT_TIME – Time in seconds it took to establish the connection
* CURLINFO_PRETRANSFER_TIME – Time in seconds from start until just before file transfer begins
* CURLINFO_STARTTRANSFER_TIME – Time in seconds until the first byte is about to be transferred
* CURLINFO_REDIRECT_TIME – Time in seconds of all redirection steps before final transaction was started
* CURLINFO_SIZE_UPLOAD – Total number of bytes uploaded
* CURLINFO_SIZE_DOWNLOAD – Total number of bytes downloaded
* CURLINFO_SPEED_DOWNLOAD – Average download speed
* CURLINFO_SPEED_UPLOAD – Average upload speed
* CURLINFO_HEADER_SIZE – Total size of all headers received
* CURLINFO_HEADER_OUT – The request string sent
* CURLINFO_REQUEST_SIZE – Total size of issued requests, currently only for HTTP requests
* CURLINFO_SSL_VERIFYRESULT – Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER
* CURLINFO_CONTENT_LENGTH_DOWNLOAD – content-length of download, read from Content-Length: field
* CURLINFO_CONTENT_LENGTH_UPLOAD – Specified size of upload
* CURLINFO_CONTENT_TYPE – Content-Type: of downloaded object, NULL indicates server did not send valid Content-Type: header

Source : http://in2.php.net/manual/en/function.curl-getinfo.php

Create Electrifying Text with PhotoShop

Monday, May 4, 2009 9:03
Posted in category PhotoShop

 

 

In this Photoshop tutorial we will be using the Wind and Ripple filters along with some tricky rotation to create some truely electrifying text.

 

 

STEP 1

 

Open a new file 600 x 300 at 72dpi and fill the background with black.

Select the text tool (T) and type the lettering you want to effect on the stage. I’m using Helvetica 80pt Bold in this example. Now right click on this type layer in the layers palette and select Rasterize Text. This turns our text into a graphic (*note: the text will no longer be editable). Rename this layer Wind by double clicking on the name of the layer.

step-1

 

STEP 2

 

Duplicate the Wind layer by pressing Command+J (CTRL+J on PC) and call this new layer Text. (*note: the Text layer should be above the Wind layer in the layers palette.)

Hide the new Text layer by clicking the little eye icon in the box to the left on the layers paette and click back to theWind layer. Rotate the contents of the layer 90° (Edit>Transform>Rotate 90° CCW). (*note: The Wind filter that we’ll be using next only blows Right or Left, which is why we rotated the layer. Some of your text may be outside the visible area of our stage but not to worry, effects will be applied to those areas as well.)

step-2

STEP 3

 

 

Next we are going to apply the Wind filter to our Wind layer by selecting it from the filters menu (Filter>Stylize>Wind) and choosing the Wind and From The Right options. Click OK and you will see that the wind filter has blown pixels from left to right on our layer. The wind filter is a little weak on the first pass so let’s apply the filter again. This can be done easily by pressing the “Last Filter” quick key Command+F (CTRL+F on PC) . Next lets re-open the Wind Filter dialog box Filter>Stylize>Wind and repeat the process blowing the wind From The Left twice.

Now rotate the layer back to normal (Edit>Transform>Rotate 90° CCW) and repeat the previous steps blowing wind in each direction twice.

step-3

STEP 4

 

While still on the Wind layer apply the Ripple filter (Filter>Distort>Ripple). The default 100 and Medium settings are fine so click OK.

Merge the Wind layer with the black Background layer by pressing Command+E (CTRL+E on PC) and create a new layer above that merged layer by clicking the New Layer icon at the bottom of the layers palette or by pressing Controll+Option+Shift+N (CTLR+ALT+SHIFT+N on PC). Call the new layer Blue.

Click on the foreground color in the tools palette and pick a nice shade of blue, I used #1942aa for this example. Change the blend mode in the layers palette to Color and drop the Fill opacity to around 60 percent.

step-4

STEP 5

 

Next click on the Text layer that we hid earlier and un-hide it by clicking the empty box to the left in the layers palette. It’s possible that with our rotating and wind that the layer isn’t directly on top of our Wind layer anymore so go ahead and line them up. This can be done by either selecting the Move Tool (V) and moving the text with your mouse, or by selecting the Move Tool (V) and using the arrows on your keyboard.

Select the contents of this layer by holding down the Command key (CTRL on PC) and clicking on the layers thumbnail in the layers palette. We want to shrink the selection by 2 pixels so go to the Select menu (Select>Modify>Contract), choose 2 pixels and click OK.

Fill this selection with black by clicking on the foreground color in the Tool palette and dragging the selector to black or by simply pressing the (D) key on the keyboard which will reset the foreground/background colors to black and white. Fill the selection by holding the Command key and pressing Delete (CTRL+Delete on PC). Deselect the selection by pressing Command+D (CTRL+D on PC) and we’re finished!

step-5

 

Smoke Effect in photoshop in 9 Steps

Saturday, May 2, 2009 13:28
Posted in category PhotoShop

Step 1 Open Photoshop and create a new document, I used 1920×1200 pixels. Then apply a gradient, you could fill it with a gradient or apply a Layer Style. I used the layer style, Gradient Overlay. Use Radial for the Style and #07090a – #202b35 for the colors. media_1225100569910    

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 2 Add some text in white then go to Filter>Blur>Motion Blur. Use 90º for the Angle, and 40 pixels for the Distance. media_1225100662955   Step 3 Now go to Filter>Distort>Wave. use 3 for the Number of Generators, 10 and 346 for the Wavelength, and 5 and 35 for the Amplitude media_1225100689869 Step 4 Go to Filter>Blur>Gaussian Blur. Use 10 pixels for the Radius. Then group the layer and rename the folder’s Blend Mode to Color Dodge. You will get a nice light effect media_1225100714999 Step 5 Create a new layer on top of the others and go to Filter>Render>Clouds, make sure you had black and white for the background and foreground colors, then change the Blend Mode to Color Dodge and go to Layer>Layer Mask>Reveal All. With a very soft brush, 0% hardness and black color, hide some areas of the clouds layer. Use the image below for reference.  

media_1225100731816

Step 6 Create a new Folder on the Layers’ Palette. Change the folder’s Blend Mode to Color Dodge and add a new layer in it. Then use the Smoke Brushes from Qbrushes . Select white for the color and paint over some letters. If you think the brush is not very bright, just click twice. Step 7 Paint a few more smokes like the image below. Step 8 Create a new layer beneath the other layers but in front of the Background layer. Fill this layer with black and go to Filter>Texture>Texturizer. Use 100% for the Scaling and 4 for the Relief. For the Texture use Canvas and Light use Top. That will add a nice texture to the image but you will need to change the opacity to 10% Step 9 Anyway, on top of the other layers just add the Invert adjustment. You can go to Layer>New Adjustment Layer>Invert. It will be the same. You will get a very nice effect, like burning paper. Smoke Effect in PhotoShop*

How to find duplicate values in array

Tuesday, March 17, 2009 5:11
Posted in category PHP

simple way to find the duplicate values in array.

function array_duplicates_values($array)
{
if(!is_array($array))
return false;
$duplicates = array();
$unique = array_unique($array);
if(count($array) > count($unique))
for($i = 0; $i < count($array); $i++)
if(!array_key_exists($i, $unique))
$duplicates[] = $array[$i];
return $duplicates;
}

above function will return the duplicate values in array.