Archive for 2014
C++ program to do linear search in Array
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a[20],n,x,i,flag=0;
cout<<"How many Elements?";
cin>>n;
cout<<"\nEnter Elements of the Array\n";
for(i=0;i<n;++i)
cin>>a[i];
cout<<"\nEnter Element to search:";
cin>>x;
for(i=0;i<n;++i)
{
if(a[i]==x)
{
flag=1;
break;
}
}
if(flag)
cout<<"\nElement is Found at position "<<i+1;
else
cout<<"\nElement not found";
getch();
}
Posted by Unknown
C++ program to create a loading bar
#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int x=170,i,gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"c:\\tc\\bgi");
settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
outtextxy(170,180,"LOADING,PLEASE WAIT");
for(i=0;i<300;++i)
{
delay(30);
line(x,200,x,220);
x++;
}
getch();
closegraph();
}
Posted by Unknown
How to Format an Unformattable Pendrive
Sometimes when you format your pendrive an error message is shown. This error is
shown because your pendrive is affected by viruses. You try hard to format your pendrive but you fail in doing so. In this post i am telling you a trick by which you can format an unformatable pendrive easily. I use this method most of the time on my computer.
Instructions to format a Pendrive
1. Insert you pendrive in the usb port.
2. Now open run from the start menu and type cmd and hit enter.
3. A black screen will open. Now Write format and your drive letter (example: format h:) and pressenter, as shown in above image.
4. Your device is ready to format now press enter.
5. Now pendrive is formated, label your pendrive by a name that you like and press enter.
Posted by Unknown
HOW TO KNOW ADMIN PASSWORD THROUGH GUEST ACCOUNT
1) Go to C:/windows/system32.
2) Copy cmd.exe and paste it on desktop.3) Rename cmd.exe to sethc.exe.
4) Copy the new sethc.exe to system 32,when windows asks for overwriting the file,then click yes.
5) Now Log out from your guest account and at the user select window,press shift key 5 times.
6) Instead of Sticky Key confirmation dialog,command prompt with full administrator privileges will open.7) Now type “ NET USER ADMINISTRATOR “zzz” where “zzz” can be any password you like and press enter.
8) You will see “ The Command completed successfully” and then exit the command prompt and login into administrator with your new password.
Posted by Unknown
IP Address Definitions
Short for Internet Protocol address, an IP address is an address of a computer or other network device on a network using TCP/IP. For example, the number "166.70.10.23" is an example of such an address. These addresses are similar to an addresses used on a house and is what allows data to reach the appropriate destination on a network and the Internet.
Getting an IP address
By default the router you use will assign each of your computers their own IP address, often using NAT to forward the data coming from those computers to outside networks such as the Internet. If you need to register an IP address that can be seen on the Internet, you must register through InterNIC or use a web host that can assign you addresses.
Anyone who connects to the Internet is assigned an IP address by their Internet Service Provider (ISP) who has registered a range of IP addresses. For example, lets assume your ISP is given 100 addresses, 109.145.93.150-250. This means the ISP owns addresses 109.145.93.150 to 109.145.93.250 and is able to assign any address in that range to its customers. So, all these addresses belong to your ISP address until they are assigned to a customers computer. In the case of a dial-up connection, you are given a new IP address each time you dial into your ISP. With most broadband Internet service providers because you are always connected to the Internet your address rarely changes and will remain the same until the service provider requires it to be changed.
- There are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B, and C are commonly used. Each class allows for a range of valid IP addresses. Below is a listing of these addresses.
Class | Address Range | Supports |
---|---|---|
Class A | 1.0.0.1 to 126.255.255.254 | Supports 16 million hosts on each of 127 networks. |
Class B | 128.1.0.1 to 191.255.255.254 | Supports 65,000 hosts on each of 16,000 networks. |
Class C | 192.0.1.1 to 223.255.254.254 | Supports 254 hosts on each of 2 million networks. |
Class D | 224.0.0.0 to 239.255.255.255 | Reserved for multicast groups. |
Class E | 240.0.0.0 to 254.255.255.254 | Reserved for future use, or Research and Development Purposes. |
Ranges 127.x.x.x are reserved for the loopback or localhost, for example, 127.0.0.1 is the common loopback address. Range 255.255.255.255 broadcasts to all hosts on the local network.
IP address breakdown
Every IP address is broke down into four sets of octets that break down into binary to represent the actual IP address. The below table is an example of the IP 255.255.255.255. If you are new to binary, we highly recommend reading our binary and hexadecimal conversions section to get a better understanding of what we're doing in the below charts.
IP: | 255 | 255 | 255 | 255 |
Binary value: | 11111111 | 11111111 | 11111111 | 11111111 |
Octet value: | 8 | 8 | 8 | 8 |
- If we were to break down the IP "166.70.10.23", you would get the below value. In the below table, the first row is the IP address, the second row is the binary values, and the third row shows how the binary value equals the section of the IP address.
166 | 70 | 10 | 23 |
10100110 | 01000110 | 00001010 | 00010111 |
128+32+4+2=166 | 64+4+2=70 | 8+2=10 | 16+4+2+1=23 |
Automatically assigned addresses
There are several IP addresses that are automatically assigned when you setup a home network. These default addresses are what allow your computer and other network devices to communicate and broadcast information over your network. Below is the most commonly assigned network addresses in a home network.
192.168.1.0 | 0 is the automatically assigned network address. |
192.168.1.1 | 1 is the commonly used address used as the gateway. |
192.168.1.2 | 2 is also a commonly used address used for a gateway. |
192.168.1.3 - 254 | Addresses beyond 3 are assigned to computers and devices on the network. |
192.168.1.255 | 255 is automatically assigned on most networks as the broadcast address. |
- If you have ever connected to your home network, you should be familiar with the gateway address or 192.168.1.1, which is the address you use to connect to your home network router and change its settings.
Posted by Unknown
Enabling Windows God Mode
Microsoft Windows Vista (32-bit version) introduced a new hidden feature called God Mode that allows you to view and adjust all settings within Windows. To create a shortcut to the God Mode in Windows Vista (32-bit) or any version of Windows 7 follow the below steps.
- Anywhere on your computer create a new folder.
- After the folder has been created, copy the below text, rename that folder, and paste the text as the file name.
GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
Once the above steps have been completed a new shortcut entitled God Mode will be visible. Opening this shortcut will display a Window similar to the below example.
Posted by Unknown
Cleaning The Computer And Its Components
Cleaning your computer and your computer components and peripherals helps keep the components and computer in good working condition and helps keep the computers from spreading germs. In the picture to the right, is a good example of how dirty the inside of your computer case can get. In this example, its obvious that all the dirt build up will prevent proper air flow and may even prevent the fan from working.
How often should I clean my computer?
The frequency of how often you should clean your computer varies on several different factors. To help you determine how often you need to clean your computer we've created the below chart. Check each of the boxes below that apply to your computers environment to determine how often it should be cleaned.
General cleaning Tips
Below is a listing of general tips that should be taken when cleaning any of the components or peripherals of a computer as well as tips to help keep a computer clean.
- Never spray or squirt any liquid onto any computer component. If a spray is needed, spray the liquid onto a cloth and then use that cloth to rub down the component.
- You can use a vacuum to suck up dirt, dust, or hair around the computer on the outside case. However, do not use a vacuum for the inside of your computer as it generates a lot of static electricity that can damage the internal components of your computer. If you need to use a vacuum to clean the inside of your computer, use a portable battery powered vacuum designed to do this job or try usingcompressed air.
- When cleaning a component or the computer, turn it off before cleaning.
- Be cautious when using any cleaning solvents; some individuals may have allergic reactions to chemicals in cleaning solvents and some solvents can even damage the case. Try to always use water or a highly diluted solvent.
- When cleaning, be careful not to accidentally adjust any knobs or controls. In addition, when cleaning the back of the computer, if anything is plugged in, make sure not to disconnect any of the plugs.
- When cleaning fans, especially the smaller fans within a portable computer or laptop it's suggested that you either hold the fan or place something in-between the fan blades to prevent it from spinning. Spraying compressed air into a fan or cleaning a fan with a vacuum may cause damage or back voltage to be generated.
- Never eat or drink around the computer.
- Limit smoking around the computer.
Cleaning tools
Although many companies have created products to help improve the process of cleaning your computer and peripherals, users can also use household items to clean their computers and peripherals. Below is a listing of items you may need or want to use while cleaning your computer or computer peripherals.
Keep in mind that some components in your computer may only be able to be cleaned using a product designed for cleaning that component; if this is the case, it will be mentioned in the cleaning tips.
- Cloth - A cloth is the best tool used when rubbing down a component; although paper towels can be used with most hardware, we recommend using a cloth when ever possible. Caution: We only suggest you use a cloth when cleaning components such as the outside of the case, a drive, mouse, etc. You should not use a cloth to clean any circuitry such as the RAM or motherboard since they can generate ESDthat can damage electronics.
- Water or rubbing alcohol - When moistening a cloth, it is best to use water or rubbing alcohol. Other solvents may be bad for the plastics used with your computer.
- Portable Vacuum - Sucking the dust, dirt, hair, cigarette particles, and other particles out of a computer can be one of the best methods of cleaning a computer. Over time, these items can restrict the airflow in a computer and cause circuitry to corrode. Do not use a standard vacuum as it can generate a lot of static electricity that can damage your computer.
- Cotton swabs - Cotton swaps moistened with rubbing alcohol or water are excellent tools for wiping hard to reach areas in your keyboard, mouse, and other locations.
- Foam swabs - Whenever possible, it is better to use lint-free swabs such as foam swabs.
Case cleaning
Why? Keeps the appearance of the computer looking new. During cleaning, if ventilation locations are found, these can be cleaned helping the case keep a steady airflow to the computer, keeping components cool and in good working condition.
Procedure: The plastic case that houses the PC components can be cleaned with a lint-free cloth that has been slightly dampened with water. For stubborn stains, add a little household detergent to the cloth. It is recommended that you never use a solvent cleaner on plastics.
Make sure all vents and air holes are hair and lint free by rubbing a cloth over the holes and vents. It is also helpful to take a vacuum around each of the hole, vents, and crevices on the computer. It is safe to use a standard vacuum when cleaning the outside vents of a computer; however, if you need to clean the inside of the computer, use a portable battery powered vacuum to prevent static electricity.
CD-ROM, DVD, and other disc drive cleaning
Why? A dirty CD-ROM drive or other disc drives can cause read errors when reading discs. These read errors could cause software installation issues or issues while running the program.
Procedure: To clean the CD-ROM drive we recommend purchasing a CD-ROM cleaner from your local retailer such as a local Radio Shack. Using a CD-ROM cleaner should sufficiently clean the CD-ROM laser from dust, dirt, and hair.
In addition to cleaning the drive with a special disc designed to clean drives users can also use a cloth dampened with water to clean the tray that ejects from the drive. Make sure however that after the tray has been cleaned that it completely dry before putting the tray back into the drive.
See the CD cleaning recommendation for further steps on cleaning each of your CDs.
CD and DVD disc cleaning
Why? Dirty CDs can cause read errors or cause CDs to not work at all.
Procedure: Cleaning CDs and DVDs should be done with a cleaning kit but can also be done with a normal clean cotton cloth or shirt. When doing this with a clean cotton cloth or shirt, wipe against the tracks, starting from the middle of the CD or DVD and wiping towards the outer side as shown in the below picture. Never wipe with the tracks; doing so may put more scratches on the disc.
It is recommended when cleaning a CD that water is used. However, if the substance on a CD cannot be removed using water, pure alcohol can also be used.
Hard drive cleaning
Why? While hard drives cannot be cleaned physically, they can be cleaned with various utilities on the computer to help it run fast and more efficiently. Utilizing these utilities will prevent the hard drive from slowing down.
Headphones cleaning
Why? Headphones that are used by multiple people may need to be cleaned frequently to help prevent the spreading of germs and head lice.
Procedure: If the headphones being used are plastic or vinyl, moisten a cloth with warm water and rub the head and earpieces of the headphones. As mentioned earlier in our cleaning tips, it is recommended that if your headphones are being used for a library or school that you do not use any disinfectant or cleaning solvent as users may have allergic reactions to the chemicals they contain.
Headphones that have cushions also have the availability of having the cushions replaced. Replacing these cushions can also help keep the headphones clean.
Finally, in regards to headphones and the spreading of head lice, if multiple students are using your headphones, you should consider having the students use their own headphones, using bags that are placed over the headphones, or having headphones that can be wiped with warm water after each student has used the headphones.
Keyboard cleaning
The below steps are for cleaning a standard desktop keyboard.
Dust, dirt, and bacteria
The computer keyboard is often the most germ infected items in your home or office, often it will contain more bacteria than your toilet seat. Cleaning it can help remove any dangerous bacteria. Dirt, dust and hair can also build up causing the keyboard to not function properly.
Procedure: Before cleaning the keyboard first turn off the computer or if you're using a USB keyboard unplug it. Not unplugging the keyboard can result in causing other computer problems as you may press keys that cause the computer to perform a task you don't want it to do.
Many people clean the keyboard by turning it upside down and shaking. A more effective method is to use compressed air. Compressed air is pressurized air contained in a can with a very long nozzle. aim the air between the keys and blow away all of the dust and debris that has gathered there. A vacuum cleaner can also be used, but make sure the keyboard doesn't have loose "pop off" keys that could possibly be sucked up by the vacuum.
If you wish to clean the keyboard more extensively you'll need to remove the keys from the keyboard.
After the dust, dirt, and hair has been removed. Spray a disinfectant onto a cloth or use disinfectant cloths and rub each of the keys on the keyboard. As mentioned in our general cleaning tips, never spray any liquid onto the keyboard.
Substance spilt into the keyboard
If the keyboard has anything spilt into it (e.g. pop, cola, Pepsi, Coke, beer, wine, coffee, milk, etc.), not taking the proper steps can cause the keyboard to be destroyed.
Procedure: Below are a few recommendations to help prevent a keyboard from becoming bad once a substance has been spilt within it.
If anything is spilt onto the keyboard turn the computer off immediately or at the very least disconnect it from the computer. Once done flip the keyboard over helping to prevent the substance from penetrating circuits. While the keyboard is upside down, shake the keyboard over a surface that can be cleaned later. While still upside down, use a cloth to help clean out what can be reached. After cleaned to the best of your ability leave the keyboard upside down for at least one night allowing it to dry. Once dry, continue cleaning the keyboard with any remaining substance.
If after cleaning the keyboard you have keys that stick remove the keys and clean below the keys and the bottom portion of the key.
Finally, if the keyboard still works but remains dirty or sticky before discarding the keyboard as a last resort try washing the keyboard in the dishwasher.
If after doing all the above steps the keyboard does not function properly or at all it's recommended you buy a new keyboard.
LCD cleaning
Why? Dirt, dust, and finger prints can cause the computer screen to be difficult to read.
Procedure: Unlike a computer monitor, the LCD or flat-panel display is not made of glass, therefore requires special cleaning procedures.
When cleaning the LCD screen it is important to remember to not spray any liquids onto the LCD directly, press gently while cleaning, and do not use a paper towel as it may cause the LCD to become scratched.
To clean the LCD screen we recommend that you use a non-rugged microfiber cloth, soft cotton cloth, or Swiffer duster. If a dry cloth does not completely clean the screen, you can apply rubbing alcohol to the cloth and wipe the screen with the damp cloth. Rubbing alcohol is used to clean the LCD before it leaves the factory.
Monitor cleaning
Why? Dirt, dust, and fingerprints can cause the computer screen to be difficult to read.
Procedure: The glass monitor screen can be cleaned with ordinary household glass cleaner*. Be sure to remove power from the monitor and spray the cleaner onto a lint free-cloth so the fluid doesn't leak into the electrical components inside the monitor. Vacuum off any dust that has settled on top of the monitor, and make sure no books or papers have been placed on the air vents. Obstructed monitor vents can cause the monitor to overheat or even catch on fire.
Caution: We suggest using a cloth dampened with water when cleaning monitor on a screen that is not made of glass or has any anti-glare protection on the screen. Using ordinary household glass cleaner on special screens, especially cleaners with ammonia can remove anti-glare protection or other special surfaces.
Other good cleaning solutions
- Microfiber Towels
- Swiffer Dusters
Motherboard cleaning
Why? Dust and especially particles of cigarette smoke can build up and corrode circuitry causing various problems such as computer lockups
Caution: When inside the computer take the necessary ESD precautions and try to avoid unplugging any cables or other connections.
Procedure: Our recommendation when cleaning the motherboard from dust, dirt, or hair is to use compressed air. When using compressed air, hold it in the up-right position; otherwise, it is possible chemicals may come out of the container that could damage or corrode the Motherboard or other component within the computer. Also, ensure when using compressed air that you always blow the dust or dirt away from the motherboard, or out of the case.
Another good alternative to compressed air is to use a portable battery powered vacuum that can effectively remove the dust, dirt, and hair from the motherboard completely and prevent it from getting trapped within the case. However, do not use a standard electricity powered vacuum as it can cause a lot of static electricity that can damage the computer. When using the vacuum it is vital that you stay a couple inches away from the motherboard and all other components to help prevent contact as well as to help prevent anything from being sucked into the vacuum. Ensure that you do not remove any small components with the vacuum such as jumpers.
Tip: When cleaning the inside of the case also look at any fans or heat sinks. Dust, dirt, and hair collects around these components the most.
Mouse cleaning
Why? A dirty optical-mechanical mouse (mouse with a ball) can cause the mouse to be difficult to move as well as cause strange mouse movement.
Procedure: To clean the rollers of an optical-mechanical mouse, you must first remove the bottom cover of the mouse. To do this, examine the bottom of the mouse to see what direction the mouse cover should be rotated. As you can see in the below illustration, the mouse cover must be moved counter clockwise. Place two fingers on the mouse cover and push the direction of the arrows.
Once the cover has rotated about an inch, rotate the mouse into its normal position, covering the bottom of the mouse with one hand and the bottom should fall off including the mouse ball. If this does not occur, attempt to shake the mouse gently.
Once the bottom cover and the ball are removed, you should be able to see three rollers located within the mouse. Use a cotton swab, finger, or fingernail to remove any substance. Usually, there will be a small line of hair and dirt in the middle of the roller, remove as much as this
substance as possible.
Once you have removed as much dirt and hair as possible, place the ball back within the mouse and place the cover back on.
If the mouse still appears to be having the same issue, repeat the above process; if after several attempts the mouse is still having the same issues, it's likely that your mouse has other hardware issues and we recommend that it be replaced.
Note: Cleaning your mouse pad with a damp cloth can also help improve a computer's mouse movement.
Why? To help keep a mouse clean and germ free it can be helpful to clean the mouse.
Procedure: Use a cloth moistened with rubbing alcohol or warm water and rub the surface of the mouse and each of its buttons.
Printer cleaning
Why? Cleaning the outside of a printer can help keep the printer's appearance looking good; and in the case of a printer that is used by many different people, keep the printer clean of germs.
Procedure: First, make sure to turn off the printer before cleaning it. Dampen a cloth with water or rubbing alcohol and wipe the case and each of the buttons or knobs on the printer. As mentioned earlier, never spray any liquid directly onto the printer.
Why? With some printers it may be necessary to clean the inside of the printer to help keep the printer running smoothly.
Scanner cleaning
Why? Flatbed scanners commonly become dirty with dust, fingerprints, and hair. When a scanner is dirty, the images may have distortions.
Procedure: Clean a flatbed scanner's surface by spraying a window cleaner onto a paper towel or cotton cloth and wipe the glass until clean. As mentioned earlier, never spray a liquid directly onto the component.
To clean the outside of the scanner, the same towel or cotton cloth can be used.
Miscellaneous cleaning steps
Below are a listing of miscellaneous computer hardware that is rarely used today, but kept on this page for the few people who are working on older computers and need to clean these devices.
Floppy drive cleaning
Why? Dirty read/write heads on the floppy drive can cause errors during the reading or writing process.
Procedures: The floppy drive can be cleaned two different ways. The first method of cleaning a floppy drive, and our recommended method, is to purchase a kit at your local retail store designed to clean the read/write heads on your floppy drive.
The second method of cleaning the floppy drive is only recommended for experienced computer users. Open the floppy drive casing and physically swab the read/write heads with a lint-free foam swab soaked in pure alcohol, free-on, or trichloroethane. When performing these steps, be extremely careful when cleaning the heads to ensure that you do not lock them out of alignment causing the floppy drive to not work. To help prevent the heads from becoming out of alignment, use a dabbing motion lightly putting the swab on the head and removing it, do not perform a side-to-side motion with the swab.
Posted by Unknown