rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can try removing the shortcut you see in the root of the F: and G: drives. It is also possible that just mounting the drive on your system has infected it as well. Do run advanced A/V and Anti-malware scanners on your system now. Whether or not you can recover any of your data remains to be see. FWIW, I NEVER lend my hard drives to others. When I lend them a thumb drive, I wipe it completely, and create a new boot sector on it with a Linux system before I remount it back to my Windows environment.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Check the power supply. Some of these cards pull a LOT of current, and many system power supplies are unable to handle it. Also, trade the AMD card back in for an nVidia one... Since pcworld support also suggested a new PSU (power supply), did you follow that advice?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

JorgeM's points are well taken. That said (and I know it isn't too feasible these days), the only 100% (more or less) sure way to avoid hacking is to stay disconnected from the Internet... :-) Firewalls, NAT's, A/V, malware scanners, rootkit scanners, and keeping a close eye on attachments you are sent are all appropriate.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Why did the old keyboard die? Was it the keyboard, or something with the USB port and/or internal hub of the computer? You need to obtain and run hardware diagnostics to determine what the problem is. From your description, my guess is that the hub you are plugged into is faulty. Most systems these days have 2 internal hubs, one that runs the front ports, and another that runs the back ones. Try switching the port you are using, if you haven't already.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A pipe is a pipe - consider it a FIFO (First In, First Out) queue. There are other IPC mechanisms for Linux/Unix such as Posix queues, etc. Is there something you need to accomplish in particular?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What text book(s) are you using? There are some good ones out there that deal with this stuff. Generally, you tokenize the code, and then create a set of tree structures or finite-state-machine to represent the program. As you might infer from this, there is more than one approach that can work for you.

Two books that I have used in the past are Allen Holub's "Compiler Design in C", and Fischer/LeBlanc's "Crafting a Compiler". Both are on my shelf. FWIW, between the two of them, they take up almost 4 inches of shelf space... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, is D: a hard drive, a partition of the system drive, a removable drive (CD/DVD), a usb drive? What? How is it attached to the system? As you might be able to tell from my questions, you aren't providing enough information... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

At a minimum, 10xsizeof(double*). The size of a pointer depends upon whether you are running in 32-bit or 64-bit mode. The easy way to tell is to execute the function/macro sizeof(p1).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Any particular reason why you want Ubuntu? For a 512mb system you will want a lighter weight distribution I think, although xubuntu might suffice, running the XFCE window manager, which is less resource instensive than kde or gnome. In any case, 9.04 was the last (in my opinion) decent Ubuntu distribution.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In C, you can #include <unistd.h> and then use the ttyname(0) function. It resturns a pointer to the terminal that fd 0 (stdin) is connected with, or NULL if it isn't attached to a terminal (or there is an error) - checking errno for ENOTTY will tell you if it is not attached. From the Linux ttyname(3) man page:

TTYNAME(3)                 Linux Programmer’s Manual                TTYNAME(3)

NAME
       ttyname, ttyname_r - return name of a terminal

SYNOPSIS
       #include <unistd.h>

       char *ttyname(int fd);

       int ttyname_r(int fd, char *buf, size_t buflen);

DESCRIPTION
       The function ttyname() returns a pointer to the null-terminated pathname of the terminal device that is open on
       the file descriptor fd, or NULL on error (for example, if fd is not connected to a terminal).  The return value
       may point to static data, possibly overwritten by the next call.  The function ttyname_r() stores this pathname
       in the buffer buf of length buflen.

RETURN VALUE
       The function ttyname() returns a pointer to a pathname on success.  On error, NULL is returned,  and  errno  is
       set appropriately.  The function ttyname_r() returns 0 on success, and an error number upon error.

ERRORS
       ttyname_r():

       EBADF  Bad file descriptor.

       ENOTTY File descriptor does not refer to a terminal device.

       ERANGE buflen was too small to allow storing the pathname.

CONFORMING TO
       4.2BSD, POSIX.1-2001.

SEE ALSO
       fstat(2), isatty(3)

COLOPHON
       This  page  is part of release 3.22 of the Linux man-pages project.  A description of the project, and informa-
       tion about reporting bugs, can be found at 
       
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try using new, as in totalPoints3=new String(top5)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It is as I said - you need a separate array of exam grades associated with each student. You have only one exam array, so it will ONLY contain the last set of data that you read into it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What version of Kerberos are you using, and are you running vanilla RHEL 6, or some clone such as CentOS, Scientific Linux (SL), etc? There are a number of FAQ's on those sites (especially SL) that deal with setting up a kerberos server.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Rik said. Also, why XP mode (other than because you are more comfortable with it)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do YOU think they are? Sorry, but we don't do your homework for you, nor do we like to help you cheat... Make an effort, and show your work. We can critique and make suggestions then.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What JorgeM said. Do a Google search. There are a bunch of tools to help you deal with this problem, maybe... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Write it out first in pseudo-code - 300 (almost) lines of code is too much to analyze quickly. That will help you determine if you are doing what you think. Then write the code to implement the algorithm/pseudo-code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry. We don't do your homework for you... Show your work, and if appropriate then we will help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Like what Mike2K said. That said (sic), the nice thing about standards... is that there are so many! :-)

And FWIW, Microsoft's compilers are usually quite far behind the current set of standards... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do this instead:

using namespace std;
string somestuff;    
cin >> somestuff;
cout << somestuff << endl;

As Tumlee said, what you did was not only unsafe, but guaranteed to segfault! A pointer has to point to valid memory. You had two major problems:

  1. The pointer was not initialized.
  2. Even if it was initialized to 0 (null) it would not be a valid address - writing to it would dump core.
  3. Even if it was initialized with a valid pointer to data, using such as new char[256] the input could still overflow the buffer. The C++ string class will deal with all of that for you. :-)
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This may not be easily fixed. You may need to reset the computer to factor settings - losing everything on it. I have a system donated to my grandson that has a BIOS password set, and it cannot be reset wtihout contacting the manufacturer and providing a one-time secret key, which if they wish, they can use to generate a reset password... :-( So far, no such luck! As far as I'm concerned, unless we physically replace the BIOS and flash memory, we are toast!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Like C/C++, Java uses 0-based indexes. Not interested in reading through your 200 lines of code. If you set a member to index 1, it is actually the second member of the array, NOT the first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Another approach would be to see if stdin is attached to a real terminal. A process that is spawned by a daemon would have no stdin device, or it would be /dev/null.

boomerang2711 commented: never mind.. i got it! +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm not sure there is such. I was trained by IBM, AT&T, and others in the hardware repair and maintenance of their systems, and received certificates of completion of their courses for such, but I am not aware of any general certificate in computer repair and maintenance - not to say that these days there is none.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to do this in set.h:

#include "vector.h"
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show all of your code, including variable definitions. This is not sufficient to tell you why your grades are not in the proper order. However, you have only one exam[] array, and you need one for each student, which is why each student has the same grades...

Create a Student class that contains an array of exam grades, and then create an array of students. The pseudo-code for this would be:

for each student
    read student id
    for each exam
        read student exam grade
    endfor
endfor
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a common problem in multi-threaded applications. You will need to use a mutex to syncronize the producer/consumer threads. Using condition variables is not safe enough, especially in high throughput applications. I write a lot of this sort of code in my job. We have to deal with it very precisely, and variables are not enough.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are running out of stack space most likely. Are you running this on Windows, or on Linux?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The purpose of homework is to help you think about the problem domain that the class is trying to cover. Asking us to do your homework for you is cheating... :-( Try to solve the problems yourself first, and then we will try to help you understand and fix your code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You aren't providing enough information to really help you. That said, put the data set structures (you are using structures aren't you?) or strings, or whatever, into an array. They use a random number generator to randomly select items for the test set, and put the rest into the training set.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

LastMitch's ending comment is correct, but normally, even with Acrobat Pro, you will need the password to change the security settings on the document.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What speedtaxi12 suggests is not for most people to try. My advice is to contact the PC manufacturer and if advised to do so, send it in for repair.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

See the man page for libsox (assuming it is installed on your system). It provides low-level api's to play sound files. Not simple, but not too difficult. You will need to install the developer package in order to get the header files that you need.

From the libsox man page:

DESCRIPTION
       libsox  is  a  library  of  sound sample file format readers/writers and sound effects processors. It is mainly
       developed for use by SoX but is useful for any sound application.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you - don't ask us to help you cheat! Make an effort and we will help you correct coding problems. You might start by reading your linear algebra text book...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If I have a choice, I would go with the nVidia gear. IMO, the Intel gear is still a generation behind nVidia for performance and capability. If you are running a gaming system, get nVidia. If you are doing video production, get nVidia. If you are doing simple business graphics and some video display, then Intel will suffice. With a decent nVidia adapter, I can run two HD full-screen videos on 2 monitors at the same time. With Intel, not so much... Again, this is my opinion and observation. However, Intel is not sitting still in this domain, and are working hard to increase the capabilities of their chip sets.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I presume you want to reconfigure your kernel, perhaps to remove unneeded drivers, and such? You need to visit www.tldp.org and your Linux distribution's web site for "building a kernel" FAQ. In any case, you need to do the following at a minimum:

  1. Download and install the kernel sources.
  2. Go to the source code root directory.
  3. Run the command "make menuconfig" or "make xconfig".
  4. Run the make command to build the kernel.
  5. Run "make install" as root the install the kernel and drivers.

Do 1-4 as a regular user. #5 needs to be done as root, or sudo.

The "make menuconfig" in #3 will present you with a text-based (ncurses) form to edit the kernel configuration. The "make xconfig" will present you with an X-Windows based GUI to do the same. I prefer the xconfig myself since it has more useful help information.

Doing a manual kernel configuration is mostly useful when you need non-standard file system drivers automatically installed, or if you want to configure a minimal kernel for an embedded device or other small system.

All that said - RTFM! DO NOT DO THIS WITHOUT PREPARATION! Also, study the documentation for your boot loader, and remember that the above comments and instructions may NOT be complete for your distribution! Caveat user! :-)

FWIW, I only do this now for embedded systems that I am building. The last custom kernel that I built for my workstation/server was 3-4 years ago, though I have done this for specialized servers …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sometimes ancillary hardware gets into "wierd" states, and a soft reboot will not necessary reset them, resulting in a malfunctioning system on reboot. When you do a complete power-down, wait for 30-60 seconds, and then start the system up again, these devices will properly power down (discharging onboard capacitors, etc) and come back online properly. For Windows systems, you need to reboot (soft reset) when installing new software or updating old software since it cannot replace things like DLL's when the system is running (or any open files). This is the famous "3-finger salute"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To quote someone, it all depends! Some UPS systems are inherently good surge suppressors. Others are not. In any case, do remember that surge suppressors (power strips with surge protection usually) use a device called a MOV Varistor - they have a limited lifespan. After so much time (# and significance of surges), they degrade to uselessness. This is your normal consumer device. Replace them once a year. There are other technologies that don't degrade over time, but they are more expensive (thyristors, etc). My guess is that your consultant's PDU is more likely a thyristor type of device, hence more reliable. Ask him to explain! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I've had this problem with Windows 7 frequently. The solution we found was to go into the device manager and remove all the USB devices and hubs, then reboot. The system will find the hardware and reconfigure the drivers and such. I have to do this every few months... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What caperjack said - cpuz will tell you all about your system hardware. Also, you can boot into the BIOS and see what it says. In any case, you do have a dual core CPU from what you posted.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What bguild said. Also, we don't do your homework for you! Consider that to be cheating, and I'm SURE you don't want to do that, do you? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to run yum as root, or with sudo (assuming you have sudo privileges). Since you are using yum, I assume you are either running a Red Hat or SuSe distribution? The openssl package is a standard module in the "security" distribution. FWIW, WHY do you want to remove openssl? It is a dependency for many other packages, so removing it could seriously impact your system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Less than a day? :-) Ok. I've been doing serious software engineering for 30+ years and am still learning about this subject (and others). Let's start with what you DO know, and then move to what you NEED to know!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Visit this site - lots of helpful documents, books, etc on linux kernel programming: www.tldp.org

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

All good sugestions, IMO. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Send it back for warranty repair?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

2 things:

  • power failures
  • power surges

These things are totally unforseeable. The only way to deal with power failures is with a good UPS. They are often accompanied with power surges. Only a good surge suppressor can deal with those. Also, when there are power surges due to lightning and such, then you also need to be sure your network/internet/modem connections are also protected. What is the cost if you don't? Total loss of data and system functionality. You might go for 3-4 years without any incidents, but when it happens, either you are protected, or you are toast!

FWIW, good UPS systems will also provide good surge protection, but you need to also protect your external internet (cable/dsl/modem) connections. Laptops have built-in power failure protection (their batteries), but when plugged into system main power, then you also need some external surge protection (a power strip with surge protection is usually adequate). For your desktop/side/underside workstations and servers? A good UPS is money well-spend, in my opinion.

One aphorism comes to mind with this - hope for the best, but plan for the worst!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Take it down to your local Apple Store's "geniuses"? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

These graphics cards are very power hungry. Assuming your system still works when you remove the card, you need to verify that your power supply is adequate for the system + video card. If not, then you will experience the symptoms you are getting.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And, what do YOU mean by the term "convert"? Do you mean to print it out as binary 0's and 1's? Or, something else?

tux4life commented: Good observation ;) +13