Thursday, December 25, 2014

Some very basic programs in C++

Here are few codes written in C++ (dev C) for practice

<-------- Program to calculate x raise to power y where x is base and y is exponent
------------>
#include <iostream>

using namespace std;

int main()
{
 int a,b,c,d=1;
 cout<<"Enter the Base number"<<endl;
 cin>>a;
 cout<<"Enter the exponent"<<endl;
 cin>>b;
 for(c=1; c<=b; c++)
 {
  d=a*d;
  
 }
 
 cout<<d<<endl;
 return 0;
 
 
}

Friday, December 12, 2014

Selecting a specific Image in azure

Sign in to the Windows Azure Management Portal.
Choose VIRTUAL MACHINES, choose NEW, and then choose FROM GALLERY.
On the Select the virtual machine operating system page, locate the image that you want to use.
Note the name of the image.
This is the label that is assigned to the image.
Start Windows Azure PowerShell.

$image=Get-AzureVMImage | where-object {$_.Label -like "Windows Server 2008 R2 SP1*"}
 
Now you can access the image name using
 
$image[0].ImageName 

Monday, December 1, 2014

Making a simple calculator in java

I found an old java project and thought to share it here for my refernce and maybe someone can get some help from it... It is a basic calculator with gui made in java. You can get the eclipse project source code from the link given below

Download