rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

lol. many many years ago ,,i say new to linux but actuall made my first live cd/dvd 7 or 8 yrs ago ,i have a Live Puppy Linux on a multisesion DVD [can make changes and save to the dvd when i shut down,]made at or about 2004,play it with rarely

Well, I use Linux almost exclusively at home, and mostly at work as well, though I have Windows XP running in a VM at home, and my work laptop runs Windows 7, but with a Linux Vm on it for system software development and testing!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As to what happens when you run out of letters (/dev/sdz), I don't know since I have never had that many physical drives attached to my system!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Anyway, this is why I label my drives / file systems. Mounting them is a lot easier. So, in /etc/fstab, I mount them using the LABEL=name syntax. My array is named afs-ts02, the /home lvm is mounted by its lvm device name, /dev/mapper/VolGroup00-LogVol00, and the additional drives are labeled as afs-esata-1 through afs-esata-4. I had another drive (afs-esata-5), but it is starting to fail, so I leave it off most of the time. When I get a new drive, I'll copy it to the new drive and it will then become /dev/sdn instead of the thumb drive.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Understood. As each drive is detected by Linux, it is assigned the next available device id/slot. The boot device should be /dev/sda. Assuming /home is in an LVM group, then each physical drive will be /dev/sdb.../dev/sdx. On my system, the /home lvm is a 4 drive group, so it goes from /dev/sdb.../dev/sde. Then I have a 4 drive array which is detected next, and each physical drive is /dev/sdf.../dev/sdi. Finally, my other drives are /dev/sdj.../dev/sdm. After the system was started, I plugged in a USB thumb drive, which registered as /dev/sdn. Are we confused yet? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

only new when it come to linux ,and only use a live Linux ,but i think /dev/sdb is the second disk in the boot menu ,and a usb would show as sdd1 because it a removable device and not hard disk

No, not really. With current systems, usb drives appear as /dev/sdx where x depends upon what slots are available. If you have one physical drive and then boot, then it is /dev/sda. If you then plug in a USB drive (hard drive, thumb drive, it doesn't matter) it will be /dev/sdb.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I would still recommend the nVidia drivers. They generally are a generation ahead of the system vendor's version.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I'm not sure I'd go as far as Rik and accuse you of downloading "illegal" software, but it appears you were infected with a virus. Rolling back the system probably removed them, as should have the Malware Bites A/V software. Consider yourself lucky if that is all that happened to you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What OS are you running? If Linux, then I recommend using the proprietary nVidia Linux drivers, rather than the default open source Nouveau nVidia driver, especially if you are going to run videos, games, or other graphics-intensive software.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

/dev/sdb tells me you are running a Linux system, not windows. And dban is a "secure" disc wiper program. Finally, /dev/sdb is not necessarily a USB device. Since nothing in your post indicates that this is a USB device, why did you make that assumption?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Bogus info, AFAIK! Avast has been around for quite awhile, and has been considered one of the better A/V programs out there. I haven't used it myself, but I think that if such rumors are circulating, that you should, until you know otherwise, take them with a very large grain of salt!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not really. There are many reasons why a process may be started without your input, so to speak. In Unix/Linux terms, these may be daemons - processes that run on a regular basis in order to do system cleanup/maintenance duties, or to provide other services. The explorer.exe process for Windows is your user interface. In fact, if you shut it down, it will probably be restarted, and (initially at least) may require more CPU and RAM than it did before, simply in order to get back to a "steady state".

So, may I ask where this question is coming from? Do you think you have a virus? If so, what have you done to determine what it is, and what has been infected (beyond the system in general)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, IMHO WinME was a kluge of the worst sort! If anyone is still using it, they should be taken out to the woodshed and given a great big whack up their backside! However, considering that just about 3 people in the world are probably still using it today, the good thing is that most viruses won't bother with it!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Thanks a lot but does this mean that there's no root terminal in ubuntu 11.10

Don't know. Don't use 11.10, though I installed it in a VM on my system at home in order to answer another question about 11.10. You can enable root logins if that is what you mean, but somehow I don't think so. Myself, when I used earlier versions (7.04, 8.04, 9.04, and 10.10) I didn't even look for a "root terminal". It never occurred to me that such a thing existed... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

400+ lines of code is a LOT to ask people to analyze who do this in their spare time... Focus on the areas that you think may be problematic. You haven't received any responses yet, probably because we all have better things to do than analyze this amount of complex code.

I have to do this at work, but then I am paid well over $100K per year to do so. Call it about $60USD / hour... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

For root access, try "sudo su", or "sudo su -". The first preserves your environment variables, the second does not.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Why are you running WinMe? Is that the latest Windows OS your hardware will support? As for the CPU usage, look at the services running to determine which are possibly taking up your CPU. My guess is that if you have some sort of anti-virus program installed that does on-access scanning, then that is your culprit. Those tools can totally suck the performance out of a system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

No, I don't use Alcohol 120. Lets see if Google can save the day.

Had to ask! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Googling the terms "Windows shell hardware detection boot time" results in a number of possibly useful posts. BTW, I don't suppose you have Alcohol 120% installed on your system? I found one posting that indicates it (which installs virtual CD/DVD drives) can interact with the shell hardware detection service to cause this problem. Just looking at unlikely possibilities. FWIW, I use Alcohol 120 on my Windows systems - best CD/DVD burner I've found for Windows, and for mounting ISO and other disc images in virtual drives.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Start Googling, visiting the MS and Dell user forums, and such for a start.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. I thought maybe that's what it was for, but then I never have used a system with that feature! Sounds like something you can live without. Also, there is the distinct possibility that since this media-OS would have to support various DRM functions, it may have been made uncopyable by creating a couple of "bad sectors" that only their software could read/decode, thus preventing it from being cloned. It would not be the first time this has been the case, and there are any number of examples of copy-protected CD's and DVD's that utilize that technique!

So, that takes us back to the registry issue, in fixing it so that the software in question doesn't barf on the missing partition.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, I have been using Dell computers for years, but I'm not familiar with that one! What do they store there? DRM stuff?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Your OS is probably looking for the recovery partition, that is the "hidden" partition, which allows you to recover if your OS is munged for some reason. Are these Sata drivers, or are they older IDE drives? I'm guessing IDE...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I've never had problems with Apricot's products in the past, but that was long past. I take it, from looking at their web site, that this tool is freeware? I wasn't able to find a price, and it seems to allow unencumbered downloads. Did you run the tool from the .exe installer, or did you run it from the CD ISO image? If from CD, did you remove the CD from the drive? Are there any CD's or DVD's in the drive?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

1. Put your code inside code blocks (see formatting symbols on top of message input window).
2. Show ALL of your code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are good GUI tools for both python and C++. Most people consider C++ more difficult to learn. To me, each is JAPL - Just Another Programming Language - I have used C, C++, Basic, Visual Basic, Java, PL/SQL (a dialect of ADA), Transact-SQL, Cobol, Dibol, x86 assembler, 8008 assembler, dBase, SQL, Quel, Smalltalk, ksh, sh, csh, bash, perl, python,... At this point, it really doesn't matter to me.

In any case, if you are going to use a GUI and want to use C++ as the language, then check out Qt for the GUI and general development framework.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Remember, with recursion, just as with loops, you need a terminating condition that will ALWAYS be reached (unless you want an endless loop), which we sometimes call a barrier condition. You need to test for when you reach a value less than 10, so change your code for D(int) to something like this:

static int D(int n) 
    {
        if (n < 10)
        {
            return 0;
        }
        return (D(n - 10) + n);
    }
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Alternatively, you can use an array of pointers to House. IE:

int numHouses = 100;
House** someHouses = new House*[numHouses];
for (int i = 0; i < numHouses; i++)
{
    someHouses[i] = 0;
}

Now, when you want to see if you have a house there, the contents of that entry in the array will be 0 (null) if it hasn't been used yet.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Probably the new drive doesn't have the same "signature" (configuration, size, whatever) as the old one, so possibly the shell hardware detection service saved some of this information about the boot drive when the system was originally installed, and now is taking its time to decide that everything is ok to boot. These are probably registry entries. Which ones are relevant I have no clue. When you cloned the drive, are you sure it was EXACTLY the same as the original drive? Or is it bigger, a different manufacturer, or ANYTHING that may differ between them? And how did you clone the system? Details please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Any programming language would let you do this. Which ones are you familiar with? Which are you most comfortable with, and why?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You also need to scan your disc for bad sectors. They may be readable after a few retries, so checkdisk/f may still succeed, even though the disc is starting to go off the road.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

These are the kernels installed on the system. As you update with yum, new kernels, with security and other fixes in them, they are added to the boot menu, with the latest as the default. The others are there so that if the new kernel causes you problems, you can reboot to the older one(s). Also, they don't take much space, and the system will delete the oldest after a certain number are installed. In any case, DO NOT remove the recovery one.

If you want to know more about this, read the Grub documentation. That is the boot-loader that all Red Hat systems use. The kernels and grub configuration files are kept in /boot in case you are interested. In any case, DO NOT remove anything from this directory until you know EXACTLY what you are doing!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

ClamAV works just fine as x86_64. How are you trying to install it? From source? On Fedora or RHEL, you can install x86_64 ClamAV from either the atrpms or epel repositories. Use either of these repositories and you should be able to install it just fine using yum. Most use the epel repository.

FWIW, the epel repository should be in the normal Fedora repositories. Just execute the command "yum install epel-release". Then after you install that, try "yum install clamav.x86_64".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Linux AV is useful if you are using your system as a mail, web, or file sharing host, in order to scan files and emails as they are uploaded and stored to the system. Clam is popular for that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, most systems have ClamAV in their repositories so you should only need to execute "yum install clamav" as root from a command-line.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are no drive designations in Linux. Everything is under the root file system, which is / - user directories are under /home, user commands are in /usr/bin, etc. As a simple user, usually you will be working in your /home/userid directory.

As for free anti-virus for Linux, the most commonly used one is ClamAV. You can get that at www.clamav.net

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, when working as a consultant and computer security professional (back to employed status as Senior Systems Engineer for tier-one mobile phone company), I would always use a Linux system to scan and disinfect Windows drives, and never was not successful in doing so. However, I would use 2-3 different professional-level scanners as they each catch different stuff. Where each intersected, that was a definite problem to be removed. Where 2 of 3 intersected, likely same. Where only one of 3 would find a problem, I would investigate further. I have found that a lot of modern viruses will also infect the shared libraries on the recovery partition, resulting in a reinfection if you try to restore the system to factory settings after trying to clean the infection. In any case, it is getting harder and harder to fix this stuff without a complete wipe and reinstall of the OS from read-only media (DVD). Myself, I only run Linux, and run Windows in virtual machines with current snapshots, so if (when) it is infected, I can restore the system to the last known good image. I do run virus scanners on my Linux systems fairly regularly, but so far, after about 10 years, I have never had a problem. Windows - not so lucky!

As you have probably found, NOT using IE for web browsing (using Chrome or Firefox) is probably the best thing you can do to keep from getting pwned.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, for me, on Linux/Unix systems at least, I MUCH prefer a simple Makefile and the standard C compiler options. If you are using Visual Stupido on Windoze, then you should really use the VS environment.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you installed the CDT plugin for Eclipse? What is your OS, and what compiler are you using? Have you verified that your project is using the correct compiler, etc? Eclipse is picking about that sort of stuff.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The key is in the connectors. Visit the Intel web site to see what other processors use the same connectors. Those should be compatible with your current CPU.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume this is a broadband LTE modem? You need to make sure you have a very good connection to the appropriate tower. If you don't, then you will get some fraction of the maximum speed the device is capable of. What does the manufacturer documentation say?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

std is a system-level namespace. If you want to set the namespace for a section of code, you can do so with the "using namespace <name>" directive. IE:

using namespace std;

int foo(int value)
{
    cout << "value==" << dec << value << endl;
}

Without the "using" directive, you'd have to do this:

int foo(int value)
{
    std::cout << "value==" << std::dec << value << std::endl;
}

That said, a lot of standard C++ header files will do the "using namespace std;" for you, which is why you often don't see the "std::" part of these elements.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, mazzica1 is not quite correct. Just use the name of the function. You don't need the address operator. IE,

void callTest()
{
    test(add);
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

FWIW, in my organization we use Java and C++ extensively, and our server software all runs on Red Hat Enterprise Linux. Our newest stuff runs on 6.1. Older stuff on 5.x. In my opinion, 6.1 has been a major improvement in hardware support, especially WiFi on laptops.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As ITG-JM said, IPv4 has been around for decades (since the 1970's and 80's). If you are concerned about IPv6, that is different. The stuff I learned about IPv4 back in the 80's is still relevant today. I still use the DDN White Book as a reference for IPv4 issues, and it was published in 1985.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

School class exercise? So, define your terms. What do YOU mean by "starvation free"? What do you understand to be the relationship between deadlock and "starvation". These are broad terms, and are relevant to the environment, and specific situation in which you encounter them.

FWIW, typically "starvation free" refers to the fact that readers of a resource are not gated (blocked) by the writers of the resource. IE, until the writer has "committed" the changes to the resource, the reader will still be able to access the pre-commit state of the data. In your example, you have described a situation where starvation can occur, in that if the crosser of the bridge does not release the semaphore, no one else can cross, hence "starving" access to the bridge. So, to modify this algorithm to be starvation free, you need to change it so that there are no blockages upon subsequent accesses to the bridge.

This brings up the question, what SHOULD block access to the bridge?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most any current distribution is suitable for learning how to program in Java and/or C/C++. My personal preference (personal, and preference) is to use Red Hat Enterprise Linux, or clones thereof (CentOS or Scientific Linux). In fact, I use all three, and I have used Ubuntu extensively in the past. Unfortunately, my opinion is that Ubuntu started regressing after 9.04, so I don't use it any longer. RHEL 6.1, or a clone thereof, is my preferred system these days, and I do a LOT of serious software engineering. My current position/title is Senior Systems Engineer at Nokia Mobile Phones. I do Java and C++ software engineering for a living.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have to agree with WaltP in his assessment of this question, for both parts. In any case, DO NOT use a \n in a C++ output statement, unless you don't mind it getting mixed up with other output to the same device (such as a terminal or log file). That why in C we have to use fflush(stream) after an fprintf(stream, "fmt", args, ...). FWIW, this rule is relaxed somewhat when the output is to cerr (c++) or stderr (c) since they are by design unbuffered.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Can you use inline conditional assignments? IE:

int Grade = (pct >= 85) ? 'A' : ((pct >= 75) ? 'B' : ((pct >= 65) ? 'C' : ((pct >= 55) ? 'D' : 'F')));

No if statements there! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most any current distribution will work fine on this, even though the CPU is a bit pokey. Try Linux Mint (derived from Ubuntu, which is in turn derived from Debian). If you want a Red Hat Enterprise Linux (RHEL) system, you can install either CentOS or Scientific Linux (SL), which are free clones of RHEL. I use RHEL 5.4 and 6.1 at work, SL 6.0 and 6.1 at home, and used to use CentOS 5.x, but switched to SL a bit over a year ago because CentOS was slow in adopting RHEL version 6, which has major improvements over 5.x in hardware support, and current software such as audio/video editing tools.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Anyway, I have no clue as to the answer for your original question. Sorry. That (previous post) was my sarcastic clone answering... :-)

Though we did really have the VAX, VM 370, and DEC 10/20 manuals around here at one time. I think we finally recycled them some years ago, because they were a big pile of boxes that aren't in the storage room any longer. Anyway, the VM370 docs were mine, and the VAX/DEC docs were my wife's. You know that old saw "If you don't have 36 bits, you aren't dealing with a full DEC"? :-)