How to connect two PC’s on LAN

If you want to connect two computers on LAN (local area network) then you will need a crossover cable. A crossover cable (image) is an Ethernet cable which simply helps to connect computing devices together. In this post i will tell you how to use this crossover cable to connect two computers directly.

You can get this crossover cable from any computer hardware store i guess. I got mine from my nearest computer hardware store. It is also called as RJ45 cable. If you are not getting the cable from any store then you can even create one. To know how to create a RJ45 cable click here.

To connect two computers on the network, Both computers should belong to same WORKGROUP. To check the work group of your computer. Just go to Control Panel > System. Here you can see the workgroup of your computer. See Image Reference. If your computers are not on the same workgroup. Then you can change the workgroup of one of your computer to match the other one. To change the workgroup of your computer follow these steps :

  1. Go to Control Panel > System > Advanced System Settings
  2. Click on Computer Name tab.
  3. You can see ” To rename this computer, click Change.” message.
  4. Click on change.
  5. Now just type in your new workgroup name. Click Ok, Ok. And restart.
That’s it, now you know how to change the workgroup of your computer. So you can put both the computers on the same workgroup before proceeding to the next steps. When both the computers are on the same workgroup then you are ready to connect them together. Follow these steps to connect two computers on LAN :
  1. Go to Control Panel Network and Sharing Center.
  2. Click on Local Area Connection > Properties.
  3. Click on Internet Protocol Version 4 (TCP/IPv4)Properties.
  4. For PC 1. Put IP : 10.1.1.1. Subnet: 255.0.0.0. Default Gateway: 10.1.1.2. (Image Reference)
  5. For PC 2. Put IP : 10.1.1.2. Subnet: 255.0.0.0. Default Gateway: 10.1.1.1. (Image Reference)
  6. Click Ok, Ok, Close.
  7. Restart both PC’s. And you are connected on LAN.
  8. You can find your other PC in My Computer > Network.
If you are getting the message “Access is denied” while accessing the other computer then just go ahead and disable the antivirus/firewall on both the computers and you will be able to access that computer.

If you are not getting the other computer in the Network then just go to your Network and Sharing center. Click on Choose homegroup and sharing options. In that window if you can see create homegroup button, then just click on it and just go clicking next next next till you are done creating homegroup. Now try checking your Computer > Network again. If you still don’t see the other computer then feel free to ask help on the Codefap Forum.

And please connect the crossover cable to both the computers hehe 😛

Top 10 Google search Tips & Tricks

Most of us use the Google search to find or locate something on the web. But normally even after searching multiple times, all we get is disappointment. In this article i will share some of the Google search tips and tricks which will boost your search efficiency to a whole new level.

Google has encoded some rules to search over the web. These rules are defined as syntax of Google search. Using the proper syntax for a particular type of search will help you get your desired results faster than ever.

1) Currency Conversion

Syntax : <currency1> to <currency2>
Suppose if you want to convert Dollars in Indian Rupees. Then you can just type usd to inr and search. You will get the result as 1 U.S. dollar = 56.1608447 Indian rupees

google-currency

[code]Input : 50$ to inr<br />
Result : 50 US$ = 2 808.04223 Indian rupees<br />
Input : 2 pound to dollar<br />
Result : 2 British pounds = 3.09900 U.S. dollars[/code]

2) Calculator

Syntax: <number> <operator> <number>
If you are not getting your calculator and need one urgently then you can just go to Google. And use their syntax to calculate or carry out your desired operations on the numbers.

google-calculator

[code]Input : 5 + 10<br />
Result : 15<br />
Input : 500 – 235 / 25<br />
Result : 490.6[/code]

3) Graph Calculator

Syntax: Put any graphical mathematical equation to see Beautiful static / animated graph.
I was not knowing about graph, but while using google calculator i came across this amazing feature. Click here to see one of the amazing heart graph on Google using a mathematical equation.

google-graph

[code]//try out these codes, one line at a time<br />
sin(x)/x, 1/x^2<br />
graph ln(x)<br />
sin(x)<br />
cos(x)<br />
tan(x)[/code]

4) Find local time

Syntax: time in <place>
If you want to find the local time of any particular place. You can just type in ‘time in name_of_that_place‘ to get the time of that certain place. For example, I can type in ‘time in india‘ and the result is : 19:34 Wednesday (IST) – Time in India.

google-time

[code]Input : time in london<br />
Result : 15:08 Wednesday (BST) – Time in London, UK[/code]

 5) Weather

Syntax: weather <place>
If you want to find the weather of a certain place, just type in that syntax and your desired place. For example,  if i type “weather mumbai” then i will get the result shown in the image below.

google-weather

6) Unit Conversion

Syntax: <unit1> to <unit2>
Suppose if i want to convert kilograms to grams then i can just type in “kg to g” to get the desired conversion. Similarly you can convert any other unit you want using Google search.

google-unit-conversion

7) Exclude Keywords in Search

Syntax: <search string> <excluded string>
If i want to search something excluding a certain keyword then i can use the syntax mentioned above. For example, if i search for “Webhosting -free” then it will exclude all the results containing the keyword free. And only the remaining results will be displayed. Or lets say if i search for my name excluding the keyword facebook like this : “omkar bhagat -facebook“. Then only the results which do not contain the word facebook will be displayed.
Note: there is no space between minus sign and excluded string.

8) Definitions

Syntax: define: <keyword>
If you want to get the definition of a certain word then just type in define: word. For example, if i want definition for technology, i can just type in “define: technology“.

google-define

9) Searching related websites

Syntax: related: <website>
If you want to get sites related to certain website then just type in related: website_address. For example, if i want to get related websites to wikipedia website, then i can just type in “related: www.wikipedia.org“.

10) Excluding certain websites

Syntax: <search_text> -site:<sitename>
If you want to search something but don’t want results from a certain website. Then you can just use the above syntax. For example, if i want to search for technology but don’t want results from wikipedia, then i can just type in “technology -site: www.wikipedia.org“.

I hope this post was quite informative to you guys. Thanks for reading. 🙂

Getting Input from the User in C++

Now lets learn how to get input from the user, how to store that input, and how to display that input as output. To show the output we used a keyword called cout (console out). Similarly to get the input there is a keyword called cin (console in). But there is one more difference. While using cout we used an insertion operator (<<). This insertion operator was having two less than signs. But while using cin we will use the insertion operator (>>). This insertion operator has two greater than signs.

Now lets understand practically..

int x ;
cin >> x ; 

In the above code, we ‘declared‘ a variable x of the integer datatype. Then on the second line, we have cin >> x. That means we are getting the input from the console and storing it inside the variable x. So value is being taken from the user and being stored inside variable x using the insertion operator having two greater than signs.

Lets understand this with the help of a simple program ..

Code :

#include <iostream.h>
#include <conio.h>
void main ()
{
clrscr() ;
int x ;
cout << " Enter a number : " ;
cin >> x ;
cout << " You entered : " << x ;
getch();
}

Output 1 :

Enter a number : 5
You entered : 5 

In the code above, we have put our basic code as learned in the previous tutorials. Then inside the main function we have declared variable x of the integer datatype. Then we displayed “Enter a number : ” on the screen, asking the user to enter a number. User can enter any value. In this case, I entered the value 5. Then after next statement is executed which displays “You entered : ” string on the screen ALONG with the VALUE stored within variable x.

So if  i run the program again and enter some other value then this will be the output :

Output 2 :

Enter a number : 25
You entered : 25 

You can even perform different operations on the accepted input. We will see that in next Tutorial.