Tuesday 19 July 2011

LOCK THE FOLDER

Note :If you are familiar with DOS commands,then only try this.

1. Gather all the files that you wish to hide in a folder anywhere in your PC (make it in C:\hidden – RECOMMENDED).

2. Now, add those files in a RAR archive (e.g. secret.rar). This file should also be in the same directory (C:\hidden).

3. Now, look for a simple JPEG picture file (e.g. logo.jpg). Copy/Paste that file also in C:\hidden.

4. Now, open Command Prompt (Go to Run and type ‘cmd‘). Make your workingdirectory C:\hidden.

5. Now type: “COPY /b logo.jpg + secret.rar output.jpg” (without quotes) – Now, logo.jpg is the picture you want to show, secret.rar is the file to be hidden, and output.jpg is the file which contains both.

6. Now, after you have done this, you will see a file output.jpg in C:\hidden. Open it(double-click) and it will show the picture you wanted to show. Now try opening the same file with WinRAR, it will show the hidden archive .

Monday 18 July 2011

PROGRAM TO OBTAIN ADDRESSES OF PRINTER PORTS

//PROGRAM TO OBTAIN ADDRESSES OF PRINTER PORTS 
#include <stdio.h>
#include <dos.h>

void main(void)
{
      unsigned int far *ptraddr;  /* Pointer to location of Port Addresses */
      unsigned int address;  /* Address of Port */
      int i;

      ptraddr=(unsigned int far *)0x00000408;

      for (i = 0; i < 3; i++)
      {
               address = *ptraddr;
               if (address == 0)
               printf ("No port found for LPT%d \n", i+1);
               else
               printf("Address assigned to LPT%d is %Xh\n", i+1,address);
              *ptraddr++;
       }
}

Note :Execute this code on your own risk.

Get CSV Values in SQL

Query: DECLARE @CSVValue NVARCHAR(50)='100,101,102'                   DECLARE @eachValue NUMERIC(9,0)   while len(@CSVValue) &...