Your Ad Here

Friday, 28 October 2011

Program for testing FOR loop


#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i=0;
char a='a', b='b', c='c';
for(cout<<a<<"  ";cout<<b<<"  ";cout<<c<<"  ")
{
i++;
if(i==10)
break;
}
getch();
}



OUTPUT  :-
-----------------------------------------------------------------
a   b   c   b   c   b   c   b   c   b   c   b   c   b   c   b   c   b   c   b
-----------------------------------------------------------------

The FOR loop has three parts. The first part is the initialization part, the second one is the condition part and the third part is the updation part i.e incrementing or decrementing.
The syntax of for loop is :-
for(initialization ; condition ; increment / decrement)
{
               body of the loop
}

First intialisation is done and then condition is tested and if it is true then the body of the loop is executed. Then the control proceeds to the updation part. When it finishes processing updation then again the condition  is tested. If it is true again then the body of the loop is executed one more. This process continues till the condition becomes false.

But the above program is not for illustrating this general FOR loop. Infact it is for showing an interesting facts of this for loop.
Here we haven't used those usual initialization, control, and updation statement but instead we have used  "cout" statement (used for outputting results on the screen) in place of those three parts of the FOR loop.

The result I have found is that it behaves similarly. The control passes in the similar sequence as that of the general three statement parts of the FOR loop.

When a c program detects a FOR loop it first proceeds to the initialization part. Similarly in the FOR loop of the above program the statement "cout<<a" gets executed which is in place of the initialization part. Then in a  general FOR loop after initialization it checks the condition and if it is true the body of the loop gets executed. In the above program it then executes the middle statement of the FOR loop i.e "cout<<b" which is in place of the condition statement. In this FOR loop there is no condition but instead is a cout statement. Since no decision (true / false) can be taken on this statement the body of the loop will be executed for infinite times unless it is stopped by the break statement inside the body of the loop. In a general FOR loop after executing the body of the loop it proceeds to the updation part and then again it checks for the condition. But in our program we again have given another cout statement in place of the updation part. So after executing the body of the loop it executes the cout statement present in the updation part and then instead of checking for condition it executes the cout statement present in the condition part of the FOR loop. The body of the loop will go on executing since it will never become false (i.e no condition statement is there instead a cout statement is present).

We have used the break statement in our program to limit the execution of the body of the loop for 10 times.  Then the control comes out of the loop.

Sunday, 16 October 2011

Transform your mobile into a computer remote control


Ever thought that your mobile can serve you as a remote control for your PC/Laptop ?? If I am not wrong then most had not .

Yes you can turn your mobile phone into a computer remote control which have full over the mouse movement, media player, powerpoint and much more.

All this you can do by with the help of a software "Phone Remote Control 5.2" which have support for Win7 as well as WiFi also. It uses bluetooth to communicate with the computer. So you must have bluetooth enabled laptop/PC. For PC users you can buy a bluetooth dongle for much cheap as Rs. 250 to Rs. 300.

It is J2ME software means mobile application which you have to install it in your mobile first ; not a big deal; simple as installing mobile games.

Its a demo version software means some of the features are locked. For the full version you have to buy it. The demo version also has many features but with limitation of time limit. It gets disconnected after a certain time ; means you have to re-connect it again.

Its a software package containing the mobile application and the client application means another software which you have to install it into your PC/Laptop.

So now lets see what are the features of (Phone Remote Control 5.2) :-

Phone Remote Control turns your Bluetooth enabled mobile phone into a universal controller for Window.

See your Power Point slides directly in the phone, browse/play the songs in ITune and Media player and much more...

Phone Remote Control is a true universal remote control that lets the user adds or modify the controlled programs. Customize simple keymaps or for full control over the UI write your own Java and VB scripts.

Phone Remote Control supports the following programs: Support for additional programs can easily be added with simple keymaps, VB or Java scripts (Script Guide).


ITunes
------
-+ Shows song name, artist & track time and UI objects
-+ Browse playlists, songs, artist, album and composers
-+ Search for songs
-+ Rank tracks
-+ Toggle shuffle
-+ Repeat track or library
-+ Play/pause, rewind, fast forward, change volume, previous/next track
-+ Mute

PowerPoint
----------
-+ Shows next slide and slide notes
-+ Shows actual slides
-+ Play/stop presentation, previous/next slide
-+ Load recently used file
-+ Browse/Goto all/any slide
-+ Presentation time
-+ Scroll slide notes
-+ Vibrate when time expires

WinAMP
------
-+ Shows song name, artist & track time and UI objects
-+ Search for song and artists
-+ Play/pause, rewind, fast forward, change volume, previous/next track
-+ Toggle shuffle mode
-+ Change volume
-+ UI objects
-+ Toggle repeat mode

Windows Media Player
--------------------
-+ Shows song name, artist & track time and UI objects
-+ Browse playlists and artists
-+ Rank tracks
-+ Toggle shuffle
-+ Repeat track or library
-+ Play/pause, rewind, fast forward, change volume, previous/next track
-+ Mute

Mouse mode
----------
-+ Full support for controlling the PC mouse
-+ See the computer desktop on the phone
-+ Zoom in and out of the desktop
-+ B&W colors for faster response time
-+ Enter text

File Browser
------------
-+ Allows launching of files

System
------
-+ Change system volume
-+ Start screensaver
-+ Lock workstation
-+ Shutdown Windows
-+ Start screensaver

So what are you waiting for ?? Just grab this rich featured software immediately.

Installing Process:
Install the PC/Laptop software into your computer and then install the mobile software into your mobile. Turn ON your PC/Laptop and mobile bluetooth and then connect you PC with your mobile using the PC/Laptop software. That's it !!!

Thursday, 13 October 2011

Programming Jokes


A project manager, a computer programmer and a computer operator are driving down the road when the car they are in gets a flat tire. The three men try to solve the problem.
The project manager said: "Let's catch a cab and in ten minutes we'll reach our destination."
The computer programmer said: "We have here the driver's guide. I can easily replace the flat tire and continue our drive."
The computer operator said: "First of all, let's turn off the engine and turn it on again. Maybe it will fix the problem."
Suddenly a Microsoft software engineer passed by and said: "try to close all windows, get off the car, and then get in and try again."


A Software Engineer, a Hardware Engineer and a Departmental Manager were on their way to a meeting. They were driving down a steep mountain road when suddenly the brakes on their car failed. The car careened almost out of control down the road, bouncing off the crash barriers, until it miraculously ground to a halt scraping along the mountainside. The car's occupants, shaken but unhurt, now had a problem: they were stuck halfway down a mountain in a car with no brakes. What were they to do?
"I know," said the Departmental Manager, "Let's have a meeting, propose a Vision, formulate a Mission Statement, define some Goals, and by a process of Continuous Improvement find a solution to the Critical Problems, and we can be on our way."
"No, no," said the Hardware Engineer, "That will take far too long, and besides, that method has never worked before. I've got my Swiss Army knife with me, and in no time at all I can strip down the car's braking system, isolate the fault, fix it, and we can be on our way."
"Well," said the Software Engineer, "Before we do anything, I think we should push the car back up the road and see if it happens again."


How to connect two laptops via Wireless LAN to play multiplayer games ?


The process I am mentioning here is for Windows 7 Operating System only. For XP and and Vista the process will partially be similar. The process mentioned here is for establishing Wireless LAN connection between two Laptops  which got Win7 installed.  With this connection  you can play multiplayer games ,  share files etc.  We will be using adhoc connection. 

Connectivity between two systems without using access points such as a switch/router is called as "adhoc" connection. In basic you don’t need any extra hardware.
Here one laptop will act as an access point while the other connects itself to that access point and vice versa. When playing multiplayer games one laptop serve as a access point and in the mean while connects to other access point i.e to the other laptop. This is called bridge between two connections.
Now get back to the steps for doing it in real.

Following are the steps which should be performed serially :-

Step 1:
First we setup one laptop as access point 
Open Control panel then go to Network and sharing center
Click on "Setup a new connection or network"



Step 2:
Scroll down on the dialog box and Select "Setup a  wireless ad hoc (computer-to-computer) network. Then click "Next"



Step 3:
In the next window, provide a name for the network and a security key for the network. Then click "Next", if required click on "enable Internet connection sharing" in the next window.
Click "Close" to finish the setup.



Step 4:

For setting up the IP address, again go to Control panel->Network and sharing center.
Click on the "Change Adapter Settings" link on the left panel.



Step 5:
Right click on your wireless network connection that should named as "Wireless Network Connection" (by default) and select "Properties". 
Select "Internet Protocol Version 4" and click on the "Configure" button.



Step 6: 
Fill the "IP address"and "Subnet mask" fields as below and then click "OK" to save the settings.
Now the access point is setup successfully.



Step 7: Connect the other laptop to the newly setup access point by using the usual procedure.(searching for wifi and connecting).
Then setup the IP address of this laptop to the 192.168.0.x format.




Now both laptops are in LAN. To play multiplayer games, just turn off the windows firewall temporarily.
For file sharing, the laptops can be accessed by their IP addresses or through the Network sharing center.














Tuesday, 11 October 2011

EARN BY JUST VIEWING ADS ONLY

Here I will tell you about another earning site from which you can earn by just viewing ads given by them and for other activities such as playing games and quiz, regular visiting the site and other such activities. These all only are the work you all got to do in order to earn.
The site is http://www.viewbestads.com

You will be credited Rs. 200 / $4 for just registering onto their site. If you want to make a decent money then just viewing the ads will not do. You have to visit the site everyday and have to spend at least 15-25 mins regularly or even more time if you play a long quiz of 100 objective type questions.

The other works you an do to earn there is participating in the contests there. You can play quiz there which includes both long and short  type. For each of the correct answers you give you will be credited by small points. It also got mind games link solving jumble words etc.

So you will be rewarded as per you regularity, amount of activities (i.e playing games, viewing jokes/quotes etc) and viewing those ads which they provides everyday.

Another similar type of website is http://www.neobux.com (same as viewbestads.com) where you are get paid for viewing advertises. You may check this out also.

Payment is guaranteed in this sites but you can withdraw you income only when it reaches a certain specified level. In case of viewbestads.com the amount is Rs. 1200.

So hurry and get signed up on these sites.
Hope this information will help you to all those who are on the hunt of finding online earning sources.

Monday, 10 October 2011

A GENUINE SITE FOR ONLINE JOBS


Hi, 
     I want to tell all those who are finding best sites on the internet for a genuine online job without investment. I was doing that same thing. I wasted most of time registering on the worthless sites who says to offer online jobs instantly like form filling,  typing etc. 
Here I will tell you about an earning site which I found to be useful after a lots of surfing on the net.


If you are willing to do online data entry jobs like book typing, form filling, typing from PDF to MS Word etc. then freelancer.com is the one you can go for. After registering complete your profile first then browse jobs according to your interest and then start bidding on the job you think you can do. Don't just bid on a single job; bid nearly 15 to 20 .. the limit is 30. After a certain period of days the bid limit again refills.


Bidding is done by on how much money you can do that job and how much time will you would require. Depending on your bidding you will be placed on the bidders list. The one who is on the top of the list has the chances of getting the job.


There is not only data entry jobs available but any kind of job ; i.e. from data entry to graphic designing to software development to database design etc. I mean A to Z types of works are available and thousands of latest jobs comes hourly.


For  getting the job you cannot rest after bidding once ... but continuously have to change your bids which should be very competitive till the last moment of ending of  the bidding time
...............................Click here to go to Freelancer site ............................


Hope this information helps you all ...