Friday, December 28

Remove write protection on pen drive

Hi All,

I got the code from net :)

Here is how you can remove or uninstall write protection on pen drive. This is a common problem faced by most users. 
Often an error occurs while copying, deleting or modifying data or files for the USB. This happens because it is 'Write-Protected'. Here is a solution to the problem of the USB being write-protected. Follow the steps mentioned in this article to enable the modification, copying or deleting of files from the USB thereafter. 

Issue

This a very common problem when using USB flash drives. Sometimes when you try to copy or delete files you get an error message "Remove the write-protection or use another disk". Furthermore, it won't allow you to format it! 




Solution

To remove write protection:
  • Open Start Menu >> Run, type regedit and press Enter. This will open the registry editor.
  • Navigate to the following path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
  • Double click the key WriteProtect in the right pane and set the value to 0
  • In the Data Value Box, press OK
  • Exit Registry, restart your computer and then re-connect your USB pen drive to your computer.



That is it, done. Good luck!

Wednesday, December 19

BubbleSort program in Java


Hi All,


package Sorting;

/**
 *
 * @author SKiTECH
 */
public class bubbleSort {

    public static void main(String arg[]) {
        int a[] = {100, 30, 80, 20, 2, 90, 50, 11, 99, 99};
        int temp = 0;
        System.out.println("Ascending sort program");
        for (int i = a.length - 1; i >= 0; i--) {
            for (int j = 0; j < i; j++) {               
                if (a[j] < a[j + 1]) 

                {   // if you want descending order  change ">" symbol instead of  "<" (a[j] > a[j + 1])
                    temp = a[j];
                    a[j] = a[j + 1];
                    a[j + 1] = temp;
                }
            }
            System.out.println(a[i]);
        }
    }
}



OUTPUT:

~~~~~~~~

Ascending sort program                  
2
11
20
30
50
80
90
99
99
100



Descending sort program
100
99
99
90
80
50
30
20
11
2

How to Enable USB Port in Windows(if it is blocked).

Hi All,

How to Enable USB Port in Windows(if it is blocked).
Follow the steps to open a USB port in Windows machine.

1. Click Start Button, and then click Run. 

2. In the Open box, type regedit, and then click OK. 


3. and then click the following registry key: for finding the location of  USB port.

HKEY_LOCAL_MACHINE -> SYSTEM->CurrentControlSet->Services->UsbStor 

4. In the right pane, double-click "Start" option. 


5. In the Value data box, type "4" (without quotes), click Hexadecimal (if it is not already selected),  and then click OK. Note :- if 4 is entered it will open the port


6. Quit Registry Editor.



Backup files to google drive using PHP coding

 Dear All, To backup files to Google Drive using PHP coding, you can use the Google Drive API and the Google Client Library for PHP. Here...