rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this a Linux system? If so, did you install the debug kernel and such? What about your current installation of the Gnu Compiler Collection (GCC) - did you install a debuggable version of that? What seems to be happening here is that glibc is a debuggable version, but you don't have the source handy, so it will happily single step through malloc et al and give you these errors.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this Windows, or a Linux system? Also, where did you obtain the drivers, and how specifically did you install them? Finally, are you SURE you got the correct driver for your hardware?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please don't ask us to do your homework for you. Make an honest attempt to complete it yourself first, and then we can comment on your work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is possibly a situation where the Payroll class should be a singleton (only one instance can exist), in which case, you could do something like thins:

Payroll::getInstance()->append(*member);

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As shown by np_complete, you can implement methods of a class inline, in which case you don't need to compile them as a separate translation unit. They are truly inline code, implemented in each translation unit that uses them.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

FWIW (For Whatever It's Worth), any serious software will convert date+time values into julian values when doing date/time arithmetic.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Convert dates to julian values, then just subtract one from the other to get number of days. There is a great article on Wikipedia that expounds the algorithm in detail (http://en.wikipedia.org/wiki/Conversion_between_Julian_and_Gregorian_calendars and http://en.wikipedia.org/wiki/Revised_Julian_calendar).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Homework exercise? Try solving it first, then post code here for comments/corrections. We are not here to help you cheat!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I've done a lot of research into memory management for C/C++ software, including garbage collecting versions of malloc/free, reference-counting garbage collectors that can handle non-acyclic graphs (non-trivial, but implemented in major system software), and such. This work has been written up in technical journals.

If I were asked to show how to implement malloc/free in a job interview I think I would laugh, and tell them to find some other fool to work for them!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Basically, you cannot sort an unsorted list without modifying the list, unless you make a sorted copy of it without modifying the original. So, I think your original question is in question...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What caperjack said. Alternatively, you can go to the nVidia web site (www.nvidia.com) and download/install the driver from there. On Windows systems, it will automatically detect the OS and video hardware you have, pointing you directly to the correct driver. This will be the most current and stable version of the driver, which you might not get from Microsoft or HP.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go to this web page (http://www.centos.org/modules/tinycontent/index.php?id=30) and select a mirror to download CentOS from.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Either C or C++ mostly, though Apple tools usually use Objective-C. You could use Java as well as other languages, but for efficiency's sake, C/C++/Objective-C are the preferred choices.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As far as I can tell, you still are not showing us where the buffer pointed to by BufferData is being originally being declared and instantiated. So, at this point, not a lot makes sense to me.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Exactly as WaltP says. You cannot compare a float with a double unless you down-cast the double, and even then it may not do what you think. Given the 64-bit systems we are mostly using these days, just use doubles if you need to compare computational results of floating point values. The only exception to that is if you need more than 64 bits of precision, in which case you can use long doubles if your compiler supports them.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What WaltP said. The division symbol you are using in the computation for "total" is wrong... :-)

WaltP commented: Thank you for wasting my post and not allowing him a chance to use his brain. -3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Glad to help! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

School work? Analyze the problem and break it down. What are the salient factors that make up a 2-D model? What is the complexity of the model? Arbitrary, or a known model, such as floor-plans, geometric shapes, electronic board layouts (similar to floor plans), etc?

Once you have determined the complexity of the model, what classes of objects are there that are distinctive? What are the components that make them up? Example: shapes have sides, vertices, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Time to take it in to the "geniuses" at your local Apple store...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try googling for some reviews of these boards. Unless someone lurking here has personal knowledge and experience with them, I doubt you will get any / many responses. Both Asus and MSI boards are of reasonable quality. Myself, I prefer Intel boards, unless I am getting one for an AMD chip.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you look at the drive bay bezel / door, you should see a little hole next to the eject button. Get a paper clip or other small tool (pin) that will fit into that, and push. That is the manual release.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try ffmpeg. That is a command-line tool, but there is a graphics interface for the Mac. The main tool is at www.ffmpeg.org. The Max GUI interface for it is at www.ffmpegx.com. It is possible that the ffmpegx install will also include ffmpeg itself. Anyway, it will let you convert just about any video format into any other.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

MySql is part of the standard CentOS installation, assuming you installed from either the Live DVD, or the full DVD set. In that case, the RPM files should be there for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Take it in for repair. Something is fried on the motherboard most likely, or the power supply is fubar.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The first issue about autoreconf means you don't have the correct autoconf package installed. You need 2.63 I do believe. What version do you have installed? Anyway, since you have made it past that error, obviously you sorted out that particular issue.

Missing libbz2 and libz means that in the first case you need to install the bzip2 package. Not 100% sure about which package libz is in. It may also bin in the bzip2 package, but I am not certain about that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this a CRT or flatpanel (LCD/Plasma) display?

If CRT, then it should be repairable, though the cost will likely be more than replacing it with a new LCD flatpanel display. If plasma, don't bother - run, don't walk to your local computer store to replace it with an LCD display. If LCD, then it may be repairable, but get an estimate first - it may be possible to replace it with a new LCD display of higher quality at a lower cost.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. See the last two entries? They are mounting the same ISO file on different mount points. There are some other questionable mounts as well:

none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)

where both /sys and /run are already mounted.

The umount command is just that, a command, not a file system, and it is used to unmount file systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There is no standard hashmap for C, though there is for C++ (a template class). You are going to need to do the heavy lifting to implement this yourself, or find some open source code that implements it. As I have implemented such code in the past (not open source, sorry - belongs to Applied Materials now), I know something of this subject. First, you need to use a good hashing algorithm that will generate non-colliding key hashes. Those keys are then used to index the data records.

A good source of information on how to implement this stuff is Donald Knuth's "The Art of Computer Programming", volume 3, "Sorting and Searching".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Take it into the computer shop. If they can't get it to work properly, ask for your $$ back.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you have a visible (static) internet address, then yes you can. If you don't then it isn't so easy. Contact your ISP about obtaining a static IP address if you want to host your own email (or other, such as web) server. It will cost you some extra $$ most likely.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Private: This is only stuff that I can access directly or change.
Protected: This is only stuff that I, or my children (derived classes) can directly access or change.
Public: This is what I let the world access.

Then, we have "friends". Our friends can access/change private and protected elements that we have allowed them to. IE, I can allow a friend to come into my house and get beer out of the fridge, but not drive off in my car... :-)

Carpetfizz commented: why the downvotes? i think his analogy is pretty helpful... +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Here is some code to convert gregorian (yyyy/mm/dd) dates to julian numbers, and to determine the day-of-week, and name-of-day that you need. I wrote this stuff some 15-20 years ago to run major semiconductor fabs:

typedef uint32 julian_t;
#define FWBAD_DATE (julian_t)UINT_MAX

// --------------------------- Static Data -------------------------
// daysInMonth and firstDayOfMonth are for non-leap-years.
const uint32 _daysInMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};

const uint32 _firstDayOfMonth[] = {1,32,60,91,121,152,182,213,244,274,305,335};

const char* _months[] =
    {
        "January",      "February",     "March",        "April",
        "May",          "June",         "July",         "August",
        "September",    "October",      "November",     "December"
    };

const char* _days[] =
    {
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday",
        "Sunday"
    };

//
// Convert Gregorian calendar date to the corresponding Julian day
// number j.  Algorithm 199 from Communications of the ACM, Volume 6, No.
// 8, (Aug. 1963), p. 444.  Gregorian calendar started on Sep. 14, 1752.
// This function is not valid before that.
// NOTE: 2 digit years will be scaled according to the specified window and cross-over year
// where the default is <= 69 == 2000, >= 70 == 1900.
// Validated 5-dec-1997, bboyle.
//
julian_t toJulian( uint32 y, uint32 m, uint32 d, uint32 window, uint32 xover )
{
    julian_t retval = FWBAD_DATE;

    // Adjust for 2 digit year according to window provided.
    if (y < 100)
    {
        if (y <= window)
        {
            y += xover;
        }
        else
        {
            y += (xover - 100);
        }
    }
    if (validDayOfMonth(y, m, d))
    {
        register uint32 cc, yy = y, mm = m, dd = d;
        if (mm > 2)
        {
            mm -= 3; …
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What deceptikon said, except instead of "redirect stdin", it should read "redirect stdout"... :-) Another case of the keyboard mis-interpreting the user's intent... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As WaltP said. In addition, once you read all of the student records into an array, you can sort it as you wish using the qsort() function / algorithm. You just need to specify the comparison function to use to determine which record is to be sorted ahead of another. See the Linux/Unix man pages for qsort() and bsearch().

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We will help those who make a sincere effort to do the work. We aren't here to do your homework for you... Given that major companies pay me $200USD / hour to write software for them, why should I help you cheat on your school work? :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Depending upon a lot of unknowable stuff, a laptop battery can last from 1 to 5 years, though it will gradually lose its ability to hold a charge over that time. I've had batteries die in less than 1 year (still under warranty), and in 2+ years (not under warranty - mostly the warranties on laptop batteries are for 1 year). Do what smitty 68503 suggested, in that you should connect the power adapter, take the battery out, hold down the power buttone for 10-15 seconds (that resets the BIOS to factory settings), and then boot it up. If it boots ok with the power adapter (AC power), then it has to be the battery. Replace it. Unfortunately, a new battery for most laptops will cost you $100 USD or more... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You will still need to obtain the RPM file for it, then you can use yum to install it (yum install filename.rpm) and then follow the rest of the instructions that turncoatlol mentioned. Here is a link to directories that contain the rpms (do you want 64bit or 32bit?):

  1. 32bit: http://ftp.scientificlinux.org/linux/scientific/6.3/i386/os/Packages/
  2. 64bit: http://ftp.scientificlinux.org/linux/scientific/6.3/x86_64/os/Packages/

Look for mysql. There are the basic files, libraries, support stuff, etc. These are the binaries. On the same site you can find the source RPMS as well.

For whatever it's worth (FWIW), Scientific Linux is a clone of Red Hat Enterprise Linux, just like (and compatible with) CentOS. You can find these on the CentOS mirror sites as well, but personally I use Scientific Linux since my wife works with the maintainers of that distribution at Fermi National Lab.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are some good resources online to help with this. One is "Linux Device Drivers" here free: http://lwn.net/Kernel/LDD3/ It can also be purchased from O'Reilly, or Amazon. Another good resource is "Linux Kernel Development" by Robert Love, published by Addison-Wesley. It is also available online (3rd edition) for free. Not sure what the URI is for that, but I have a copy (pdf) on my system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

"one of which is ICMP". Oops, I mean to say "one of which is IRC (Internet Relay Chat)"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are a number of IM protocols that are in common use, one of which is ICMP. Look at Pidgin, a popular IM application that handles most protocols. It is open source, so you can see how each protocol it supports (almost 20 differenct protocols) is implemented.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your loop for(j=k-1;j=0;j--) is wrong. Try for(j=k-1;j>=0;j--)
You are assigning j in the test condition instead of testing it to be >= 0.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I don't suppose you went to the cti web site and looked at the specs and software developer documentation, did you? The plus model uses a com port (RS-232 serial port) to communicate with the PC. It will only send you data, in a message format described in detail in the documentation available online (pdf). There is driver software available for sale for Windows systems, as well as ActivX controls and such from another vendor (link found on the web site). So, do a little research before you try to get someone else to do your work for you... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon the CPU you have in the system. Current/recent Intel chips have the ability to support virtual machines at the hardware level, allowing you to install/run them directly on the hardware. However, VMware Workstation does not support that as far as I am aware. Some of their higher-end enterprise products may support it, as does (I think) Xen. All that aside, I have never done this. I normally run an enterprise class of Linux as a host, and run other systems in virtual machines on top of that.

So, my question for you is, why do you want to do that? What benefit do you think it will provide?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Somehow I don't think you will find many people here familiar with Haiku. I am considered something of an expert on many systems (Windows, DOS, CP/M, Amiga, QNX, Linux, Unix including BSD, Solaris, HPUX, AIX, and Tru64), but I don't know anything about Haiku. I would strongly suggest that you post your question on their user forums: http://www.haiku-os.org/forum

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are open source packages for voice recognition. As for whether or not they would be suitable for this purpose, I don't know. Try a Google search.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume these branches are geographically separated (in different buildings/towns/states/whatever). In such a case, you will need what is called a "Virtual Private Network", or VPN for short. There are a lot of devices and software that will let you set up such a network, allowing your offices to connect as though they were all local. There is open source software such as OpenVPN that is widely used, as well as many "appliance" systems that provide such capabilities. Which sort of VPN you use depends a lot on how sophisticated your IT people (assuming you have any) are. If you are still clueless, check with your internet service provider(s). They may have VPN services you can utilize, for a price.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried pressing keyboard keys or moving the mouse around?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Either the video card or monitor are fubar, or your cable is defective. If the monitor can give you access to the on-screen menus and such, then the monitor itself is ok, though there is a small possibility that its input interface is bad. However, it is much more likely in such a case that the video adaptor or cable are bad. Does your computer have built-in graphics, or does it have a discrete video card plugged into the I/O bus?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How did you install/copy Windows from the old to the new IDE drive? Also, are they the same size and configuration (heads, cylinders, sectors)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Even root can be protected (prohibited) from creating files or sub-directories if the permissions of the directory are so set. Make sure that the directory is owned by root and has read+write+execute permissions for the owner. You can do that with these commands:

chown root dirname
chmod u+rwx dirname