ALT_IMG

You are the cause of my pain

You are the cause of my pain, yet the love I feel for you is my only consolation, my only cure..

ALT_IMG

Saw the girl, whom once I thought as my best friend

Remembering my classmates, after few years, My eyes were filled with tears, Everyone is busy a lot, No one escaped destiny's plot, Saw the girl, whom once I thought as my best friend, Today she is some body else's girl friend, After months remembered about her for a little while, Heard she is happy, that made me smile.

Alt img

It’s been raining since you left me

It’s been raining since you left me, now I’m drowning in the flood. You see, I’ve always been a fighter, but without you I give up.

ALT_IMG

Sweet Heart

Sweetheart.....I miss ......THe whisper of your voice...The warmth of your touch and all the wonderful times that we shared together.......

ALT_IMG

When I see you

When I see you smile and know that it's not for me, that's when I miss you the most.

Thursday, June 16, 2011

How to Compile C in Linux

0 comments


How to Compile C program in Linux/Unix ?:

Some people have doubts about how to compile C source code in Linux/Unix.Firstly you need GNU project C and C++ compiler for compiling C program and create executable(EXE) file.Most Linux and Unix user start compiling their C program by the name cc.But you can use gcc command to compile program.


  • First make sure you have gcc installed.
Type the following Command in Terminal to verify that gcc is installed:
which gcc

Output:
/usr/bin/gcc
  •   Find out version of gcc:
gcc --version

Output:
gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

  • To compile C program you need to use syntax as follows:
gcc program.c -o program-output

Use text editor such as vi or gedit to creat a c program called sample.c
For example open gedit and type your code and save as sample.c


Type the following code:
#include<stdio.h>
int main(void){
printf("Hello! World.This is my sample program in C\n");
return 0;
}

How do compile my C program?:

  • To compile my sample.c program:
gcc sample.c -o sample

  • To execute C program:
./sample




Continue reading →
Monday, June 13, 2011

UBUNTU LINUX 11:04 REVIEW

0 comments
                         Ubuntu Linux released new version of Ubuntu named as Ubuntu 11:04  Natty Narwhal. Normally Ubuntu considered as Linux based Windows.About 12 million Desktop computer running under Ubuntu operating system.Ubuntu OS differed from other Linux OS by it's easy to use ability.

                         I upgraded my later version Ubuntu 10:10 to Ubuntu 11:04 Natty Narwhal.Ubuntu is almost free from virus attack compared to Windows OS.Ubuntu is free and open source OS.So we can use it freely.

Main advantages of Ubuntu
  1. It's a free and open source OS.
  2. Almost zero virus attacks compared to Windows.
  3. Speedy network and Secure.
  4. Easy to use as Windows OS.
  5. Speedy computing.
  6. Almost all useful applications are free and we can buy other applications.
  7. We can Run Ubuntu OS in low RAM computer also.And many more.

Software Changes in Ubuntu 11:04

                           Many softwares are updated to new versions.Banshee replaced Rhythmbox as default media player.LibreOffice has replaced OpenOffice.It also come with the new generation browser Firefox 4.0.Linux Kernel 2.6.38.3, Nautilus 2.32.2, Gnome 2.32.1,Empathy 2.34.0,Banshee 2.0,Compiz 0.9.4 and many more.

Some screen shots of Ubuntu 11:04 Natty Narwhal

 Ubuntu Work Places


We can access four Work Places in Ubuntu 11:04 and navigate between Work Places

Latest Chrome Browser



New Wallpaper and Improved Theme 


The desktop has been totally advanced to a new level.The background has been changed slightly and 17 new wallpapers have been added.The default Ambiance theme has been once again improved.

Ubuntu Software Center


The new Software Center offers users review ,better support to buy applications.it also provides suggestions and applications to install.We can easily download and install(Automatically) from Software Center.

Scroll Bars



Another worthwhile feature in this release is the overlying scroll bars(they appear were the scroll bar should be).This increase the productivity of windows.

Control Center




Other Changes in Ubuntu 11:04

  1. Improved Installer.
  2. Revamped Indicator Applet.
  3. Built in support for installing proprietary software-automatically,straight from the file manager.
  4. Better support for iPhone-User can mount the iPhone's documents directory now.
  5. Support for multi-arc-to install library packages of different architectures.
  6. Ubuntu One Control Panel-integrated into unity,the new control panel for Ubuntu One offers users a great control over their cloud account.

Download Ubuntu 11:04 Natty Narwhal

Download Ubuntu 11:04 from here
Download Ubuntu 11:o4


For more information about new feature and working of Ubuntu 11:04 Natty Narwhal,see the Video





Pls add your comments.Thanks!           Enjoy :)




Continue reading →
Sunday, June 12, 2011

MAKE SIMPLE GAME IN C

0 comments



Hi friends,here we will make a simple Game in C language.Enjoy C programming.Compile below code and Generate EXE file. 

Source code of Game:

#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <graphics.h>
#include <stdlib.h>
#include <time.h>

#define PAS 20

struct time t;
int keye=250;
int coordX=0;
int coorde=0;
int coordY=0;
int coordYe=0;
int tmp=0;
int tmp2=0;
int i;

void moveMyshipLeft(void);
void moveMyshipRight(void);
void moveMyshipUp(void);
void moveMyshipDown(void);
void desenMyShip(int,int,int);

void getConflict(it coordX,int coordXe,int coordY,int coordYe)
{
int stuffz,stuffy;
stuffz=coordX;
}
int getSecTime(void)
{
gettime(&t);
return t.ti_hund;
}
int pressedKey(void)
{
keye=getch();
return(keye);
}

void desenEnemyShip(int coordXe,int coordYe,int culoare)
{
setfillstyle(1,culoare);
bar(0+coordXe,0+coordYe,60+coordXe,40+coordYe);

}
void initDefault(void)
{
}
void desenEnemyShip(int coordX,int coordY,int culoare)
{
setfillstyle(1,culoare);
bar(coordX,coordY,60+coordX,40+coordY);
getConflict(coordX,coordY,coordXe,coordYe);
}

void moveMyShip(void)
{
if ((keye==75) && coordX >getmaxx()-1023)
{
moveMyShipLeft();
}
if ((keye==77) && coordX >getmaxx()-1023)
{
moveMyShipRight();
}
if ((keye==80) && coordY
{
moveMyShipUp();
}
if ((keye==72) && coordY >getmaxy()-767)
{
moveMyShipDown();
}

}
void moveEnemyShips(int coordXe,int coordYe,int culoare)
desenEnemyShip(coordXe,coordYe,0);
coordYe=coordYe+1;
desenEnemyShip(coordXe,coordYe,culoare);
tmp=getSecTime();
}
void initEnamies(void)
{
}
void moveMyShipLeft(void)
{
desenMyShip(coordX,coordY,0);
coordX=coordX-PAS;
desenMyShip(coordX,coordY,2);
}
void moveMyShipRight(void)
{
desenMyShip(coordX,coordY,0);
coordX=coordX+PAS;
desenMyShip(coordX,coordY,3);
}
void moveMyShipUp(void)
{
desenMyShip(coordX,coordY,0);
coordY=coordX+PAS;
desenMyShip(coordX,coordY,4);
}
void moveMyShipDown(void)
{
desenMyShip(coordX,coordY,0);
coordY=coordX-PAS;
desenMyShip(coordX,coordY,5);
}
int huge DetectVGA256(void)
{
int vid=4;
return vid;
}
void doGame(void)

{
initDefault();
coordYe=1000;
do
{
if(coordYe>8oo)
{
coordXe=rand()%1023;
coordYe=40;
}
if(kbhit()){
pressedKey();
moveMyShip();
}
desenMyShip(coordX,coordY,4);
if(getSecTime()+10!=tmp+10)
{
desenEnemyShip(coordXe,coordYe-15,coordY-15,0);
moveEnemyShips(coordXe,coordYe,12);
coordYe=coordYe+15;
}
}
while (keye!=27);
}
void main(void)
{
int gdriver,gmode,errorcode;
gdriver=installuserdriver("svga256",DetectVGA256);
gdriver=DETECT;
initgraph(&gdriver,&gmode,"..\bgi\svga256.bgi");
errocode=graphresult();
if(errorcode!=gr0k)
{
printf("Graphics error:%s\n",grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}
doGame();


Pls add your comments.Thanks! Enjoy! :)


Continue reading →