krnekhelesh 16 Junior Poster

Ubuntu has a nice feature called Live CD which allows you to use the linux desktop without installing anything into your hard drive. You can check if ubuntu detects all your drivers including the ones for 1395 Wireless Mini Card by Dell.

All you have to do is insert the cd before you boot your computer and then let it run. The rest is simple...just follow the screen.

krnekhelesh 16 Junior Poster

I have started a new post in this section titled " Choosing the right Distro" , you can read that for more info. I'll keep updating it.

krnekhelesh 16 Junior Poster

I'll keep adding more posts to this tutorial. Keep checking this thread for more articles.

krnekhelesh 16 Junior Poster

Choosing the right Distro – Part I

Users trying to migrate from Windows to Linux have to make the most important and difficult decision “ Choosing the Right Distro (short for distribution) “. It is very important because the distro you choose will affect your experience with linux a lot. Your decision should be based on your computer hardware configurations, your knowledge of computer related stuff and many others all of which I will cover in this tutorial.

Note: This tutorial is focused mainly on novice users using Linux or are planing to migrate from windows to Linux.

Distros - Intro

You may wonder why in hell would there be so many distributions out there. Why can't it be just like Windows or Mac where it is just one company controlling everything and making a choice isn't difficult.
This is the best part of Linux. You CHOOSE everything. Well for a novice user this may be overwhelming but as you start using Linux you will see that this is actually a wonderful feature. One main reason for users migrating from Windows are because everything is fixed, constant and rigid. The themes, application fonts...and users want a change. And with using Linux, you get a wide variety from many well known companies like red-hat, openSuse , Ubuntu, mandriva etc...if you don't like one you can always use an another one.

Distros – Leading Examples

There are many distros to name all of them would …

krnekhelesh 16 Junior Poster

Are you sure that vista doesn't give you an option? Because I had a laptop which came with vista preinstalled. So to install Linux, I had to first partition my hard disk into 2 partitions ( 1 for Linux, 1 for vista ) and then I installed vista on one partition.

After which I installed linux and it configured the boot loader automatically., and now I am dual booting these 2 os.

krnekhelesh 16 Junior Poster

Always when you try to dual-boot and in your case boot 3 Operating Systems, make sure you install Linux at the end.

Because when you install windows after installing linux, windows overwrites the bootloader and detects only other windows os which means in your case only windows XP and Windows Vista will be shown in the bootloader if though linux is installed.

But if you install linux at the very end, it automatically creates a new bootloader displaying all the operating systems available including windows.

So to summarize this, First Install XP over vista, then finally install linux.

krnekhelesh 16 Junior Poster

yes, all other things except for some display would be just fine. I'm guessing if you disable compiz fusion and other display effects it should be fine.

And mandriva is supposed to be really good when it comes to managing the system, installing rpm packages etc... You can do other stuff like browsing, listening to music...etc probably if you try to use flash video or watch any video that's where this intel bug would affect you..

If mandriva upgrades to the latest linux kernel 2.6.30 then it would almost solve that problem.

krnekhelesh 16 Junior Poster

Ok it works, however there is one problem that I noticed...in the HDA Intel ( Alsa Mixer ) GUI way the mic1, capture1, capture 2 other recording input are always disabled automatically.

I enable them and use skype and everything works. However after I quit skype and start it again all the recording inputs are disabled again. Any idea why?

krnekhelesh 16 Junior Poster

ok that's wierd.....cause I remember when I ordered a 9.04 ubuntu cd I was asked to create an account in launchpad and only using that account I could order the cds.

And also I got the 32-bit version delivered to me. I have no idea why they didnt provide an option to choose which 32 bit or 64 bit architecture we want.

krnekhelesh 16 Junior Poster

Okay here are my configurations

Sound In: HDA Intel (hw:Intel,0)
Sound Out: HDA Intel (hw:Intel,0)
Ringing: HDA Intel (hw:Intel,0)

At this point the video works perfectly, I tried making a test call and the mic input is very low but I can hear the other side clear and loud.

I used the command in the previous post "alsamixer -V all" and it shows that my master and capture volume are maximum 100. Any other suggestions to solve my problem?

krnekhelesh 16 Junior Poster

Intel Drivers are OpenSource which means they fully support Linux. Recently they made a lot of changes like literally rewriting the Intel Drivers for better performance, and unfortunately it had serious display issues.

They are in the process of fixing them. I heard that they have improved it a lot, but those improvements were made after the release of mandriva 2009. All linux distribution like ubuntu 9.04, mandriva 2009 have this problem.

So you just have to wait for the next release where they will incorporate all these improvements.

You can read more at Softpedia Mandriva's Review of 2009 Spring Edition

http://www.softpedia.com/reviews/linux/Mandriva-Review-113434.shtml

krnekhelesh 16 Junior Poster

When you order the CD's from shipit.ubuntu.com you get to choose whether you want the 32-bit or 64-bit Ubuntu installation cd. They also provide you options between desktop Edition and Server Edition.

I'm guessing you choose the wrong one. For the i386 you have choose the 32-bit desktop edition.

krnekhelesh 16 Junior Poster

Hi,

I have searched a lot in google about proper video and audio chat in linux. Skype is available for linux, but for some reason when I installed it in ubuntu 8.10, the audio was very low. I tried changing the configurations of pulse audio but it still didnt.

Is there any other options available?

krnekhelesh 16 Junior Poster

Definitely Ubuntu, I think Ubuntu is more practical where everything is installed automatically at install. And being based on Debian it has an excellent packaging system and millions of packages available for it.

It is the distro which has made me to use linux for almost 95% of the time. I use windows only for special applications like games, video-chatting.

krnekhelesh 16 Junior Poster

Obviously you are dual booting windows and linux, so you have fedora and windows installed in two partitions of your hard disk. You can easily access the windows drive from fedora by mounting it.

So you should transfer all your files from fedora to the windows partition and then go about installing mandriva. Mandriva will automatically write over the existing boot-loader and give you options to either boot to windows or mandriva. After installing mandriva you can again access the windows partition and transfer the files back to your linux partition.

Note that in the current edition of mandriva ( Spring 2009 ) there are serious display problems related with Intel Drivers. So if you are using any Intel Graphics Card then I would advise you to not use the latest Mandriva.

krnekhelesh 16 Junior Poster

Ubuntu is currently the best linux distribution after Mandriva and OpenSuse. It is suited for users new to linux, and are thinking of migrating from windows to linux.

Ubuntu releases a new version every 6 months thereby you are always updated to the latest softwares, better driver support etc. And it comes pre-installed with the basic softwares required for internet browsing, watching movies, listening to music etc...

The link below is very useful to get you started with ubuntu.
http://www.psychocats.net/ubuntu/

krnekhelesh 16 Junior Poster

Hi,

You can visit this link https://shipit.ubuntu.com/ where you can order LiveCds of Ubuntu Server or Desktop Editions and they will mail it to you for FREE!!!!

You may have to create an account first and then fill in your postal address. You will receive the cd in a month's time. And also you can order more than one cd if want ( max of 12 CDs)

krnekhelesh 16 Junior Poster

I havent heard of Turbo Explorer. Is it good? I mean can we use the graphics functions in it?

krnekhelesh 16 Junior Poster

I am sorry as I by mistake posted the same thing twice!

krnekhelesh 16 Junior Poster

When you use BGI functions like setcolor(), circle(), line(); under borland C++ Win API it does not accept.

I have tried it many times.
The error message is as follows
BGI not supported under Windows.

But Turbo v1.1 supports it. It is the DOS based Turbo C++.

Infact in this very forum I have created a post called C++ Graphics where I have got help from so many users and all have agreed that it does not work under Borland (Windows Based)

krnekhelesh 16 Junior Poster

The Fork Command has been extensively discussed before in this forum, Please search for that post.

krnekhelesh 16 Junior Poster

The ofstream class is used to open a file. While opening a file we generally provide only the name of the file, so the program searches for that name in the same folder.

You can also provide the location of the file so that the program opens that particular file

char file[20];
strcpy(file,"C:\\Myfolder\\filename");           // You can also input the location of the file
Ofstream outfile;
outfile.open(file);

Hope this helps.

krnekhelesh 16 Junior Poster

Yeah I agree with vijayan. File pointers like seekg(),tellg() work correctly only with Binary Files where the read() and write() functions are used.

krnekhelesh 16 Junior Poster

I can help you. I have been using Turbo C++ and Borland C++ for the past 2 years.

However please note that you cannot use Turbo C++ to output any sort of graphics as BGI graphics is not supported in windows.

However the older versions of Turbo do support graphics.

krnekhelesh 16 Junior Poster

but the thing is it edits reads only strings... I want to read a value which has binary values.... How do I do that?

krnekhelesh 16 Junior Poster

I got the following source from the internet... but I don't know how to manipulate it for my convience

#include <windows.h>
#include <iostream>

int main () {

	HKEY hKey;				// Declare a key to store the result
	DWORD buffersize = 1024;	// Declare the size of the data buffer
	char* lpData = new char[buffersize];// Declare the buffer

	/* Open the Registry Key at the location 
	HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
	with read only access
	*/

	RegOpenKeyEx (HKEY_CURRENT_USER, 
	"Software\\Microsoft\\Internet Explorer\\Main",NULL,KEY_READ,&hKey);
	
	// Query the registry value
	RegQueryValueEx(hKey,"Start Page",NULL,NULL,(LPBYTE) lpData,&buffersize);
	
	// Print out the registry value
	std::cout << "Registry Key Open: memory location=" << hKey << "\n";
	std::cout << "Your Internet Start Page is " << lpData << "\n\n";

	// Close the Registry Key
	RegCloseKey (hKey);
	
	// Pause the system so there is time to read what is going on
	system("Pause");

	delete lpData;
}
krnekhelesh 16 Junior Poster

I want to create a C++ Program to edit the Windows Registry. For example to change the home page of internet explorer. But I don't know how to read or edit the help.

I am doing this program just for my own self and is not a part of homework.

krnekhelesh 16 Junior Poster

thanks for the help..

krnekhelesh 16 Junior Poster

got it... Windows XP

krnekhelesh 16 Junior Poster

But is it possible to run a C++ program in the background????

krnekhelesh 16 Junior Poster

I want it to be a DOS based program. I have borland C++ the windows based.

krnekhelesh 16 Junior Poster

I am making this program which checks if your floppy drive is ready or not. And so it has to check for say 20 seconds. And for this I want the program to run in the background. How do I do this?

I am using Borland C++ and Turbo C++

krnekhelesh 16 Junior Poster

U could choose whatever you want

krnekhelesh 16 Junior Poster

Maybe you could do a game or any database program.
For example a airway reservation program

krnekhelesh 16 Junior Poster

Can anyone give me the syntax, please?
Thanx in advance

krnekhelesh 16 Junior Poster

wow, there's so much I have to learn in C++!

krnekhelesh 16 Junior Poster

file.write((char*)&name,sizeof(name));

I think it is better you do this

[B]struct[/B] getname
  {
     char name[25];
   };

[B]int[/B] main()
{
   [B]fstream[/B] file("myfile.txt",ios::in|ios::out);
   
   [B]getname name1;[/B]    // Declaring structure variable. You could also use classes
   
   [B]cout[/B]<<"Enter your name: ";
   [B]gets([/B]name1.name);
   
   [B]fstream[/B].[B]write[/B]((char*)&name1,[B]sizeof[/B](name1));
}

And it is not necessary to include
file.close();
When your program ends it automatically ends the file.

I suggest that you use the a structure or a class to write a object into the fil because when you read data from the file it would be easier to get the data.

krnekhelesh 16 Junior Poster

c Syntax (Toggle Plain Text)
ofstream *pfile;pfile.open("myFile.txt", ios::in | ios::out);ofstream *pfile;
pfile.open("myFile.txt", ios::in | ios::out);

The code you wrote just opens the file if it is available but does not create a new one.

Use this to create a new text file

#include<iostream.h>
#include<fstream.h>

int main()
{
   fstream file("myfile.txt,ios::in|ios::out);
   // Use the following to write something into the file
  file.write((char*)&objectname,sizeof(objectname));
}

Hope it helps!

krnekhelesh 16 Junior Poster

INT 16,1 - Get Keyboard Status
INT 16,2 - Read Keyboard Flags

Could you give me the syntax to use them? Is it something like this

int16(2,&in,&out);
I don't know much about assembly language.

krnekhelesh 16 Junior Poster

INT 5 - Print Screen
Does this do something like screen capture?
Because since my program is DOS based program none of the screen capture programs seem to work. And I need to show screen shots of my program in my project.

krnekhelesh 16 Junior Poster

I went to a site where it mentioned a similar code.

#include<iostream.h>
#include<graphics.h>
union REGS in,out;

void mousecall()
{
   in.x.ax = 1;
   int86(51,&in,&out);
}

int main()
{
   int driver = DETECT,mode;
   initgraph(&driver,&mode,"\\tc\\bgi");
   mousecall();
   getch();
   closegraph();
}

What does in.x.ax = 1 signify?
I know what the numerical value stands for.

like 1 = show the mouse pointer
3 = get the mouse status

But what is union REGS??

krnekhelesh 16 Junior Poster

Game Programming is EASY. Introducing Graphics and mouse support is also simple.
Check out <snipped> for tutorials based on this topic

Salem commented: 3 years too late -2
krnekhelesh 16 Junior Poster

The link also mentioned something about displaying images. But it didn't explain it well.

I downloaded the file from the site but the code didn't mention anything related to that.

Could you explain how to introduce images?

Thanks in advance!

krnekhelesh 16 Junior Poster

check out this site. If you are using ancient Turbo C++ I don't think it can access either PS2 or USB mouse ports because you will need a MS-DOS device driver which pre-dates both port types.

If you are using the newest version of Turbo C++ then you can use win32 api windows program mouse events.

Very useful site you mentioned above. Actually I also did a search and got a similar tutorial. It works beautifully. But I haven't yet tried with a USB mouse.

Thanks for the link

krnekhelesh 16 Junior Poster

OS - Windows
Compiler - Turbo C++

for a PS2 and a USB mouse.

krnekhelesh 16 Junior Poster

How do you introduce mouse in c++ program?

krnekhelesh 16 Junior Poster

When I use the header file #include<unistd.h>
It says the compiler cannot read the file.

I tried compiling it in DEV C++ it gave me a error message that fork() was not initialized.

krnekhelesh 16 Junior Poster

I have finished my chess program. I defined some rules but couldn't code in all the rules.

krnekhelesh 16 Junior Poster

I think you missed the irony a little bit there... Salem posted a suggestion of putting the char into a string, then your reply contained "I got an idea..", where you went on to describe the same thing :)

I realise that might have been lost on some people ;)

bench don't bother, I am an idiot . .. misunderstood things...

krnekhelesh 16 Junior Poster

I asked my friends they said that
board[64][4] would work.

there would 64 boxes in the board and each would store a string of 3 characters.