rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't help people cheat on their homework assignments! Give the $5 to a charity as a fine for asking us!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What are all those leading asterisks? Is that actually in your code, or is it just showing where tab spaces are located?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One assumes this is a broadband wireless modem? Current systems will have a "Mobile Broadband" connection setup option in the network manager tool. Since to the system these are just USB serial devices (modems), no special software or drivers should be required.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Another term for this (for serial rs-232 connections) is a null-modem cable. For ethernet cables, this would be called a patch cable.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you using a static address, or one dynamically generated by your ISP? In any case, using a VPN service (Virtual Private Network) will effectively mask your identity. There are a number of them out there. The most famous is Tor.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good luck! Copyright trolls have take over the world, and unless you are a multi-billionare like Bill Gates, you will soon be inundated with take-down notices from all and sundry, even if they don't have the right to do so!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Integer intval = new Integer(999)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As Bob said, include <string.h> - that contains the declaration of strlen() and a bunch of other string functions, such as strcat(), strstr(), et al. Also, np_complete is correct. The <conio.h> header and clrscr()/gotoxy() methods are Windows/DOS specific. They are not portable.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As JorgeM said, however you should be able to create a VPN (virtual private network) tunnel to an external service, and download that way. If you have to ask how to do that, I can only say that "Google is your friend"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A lot of systems advertize dual core cpus with hyperthreading as quad-core, which is deceptive in my opinion. My work laptop is an i7 cpu, which should be quad-core for real, but a lot of them are only dual-core + hyperthreading, and such is my system. That means I can't run as many cpu-intensive operations as I should be able to, which can be a problem given that I run Windows 7 as the host OS, and Linux as a guest in a virtual machine, and I can only allocate 1 core to Linux, even though I could well use a couple of more!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Quite a number of laptops are coming with Intel integrated video, as well as nVidia video adaptors, and switch between them (if you run Windows 7) seamlessly, depending upon what your video requirements may be. Myself, I disable the Intel video, since it takes up needed RAM resources (the nVidia hardware has its own vRAM). In any case, the nVidia is better than the Intel video hardware, but if you want to use more than 2 displays, then you will need to keep the Intel hardware enabled. As for Aero, I can't say since I disable it as soon as I can - it just gets in my way...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How old? This is not an uncommon problem. My wife's 3gs has a similar issue (3 years old) - she has ordered a new iPhone 5...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not enough information. What is the make/model of computer, and RAM? Also, how do you know that the new RAM stick is "exactly the same" as the old one? If their dates of manufacture are significantly different, then even the "same" models may be different enough not to work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not enough information here. My advice? Take it to a repair facility, or if it is under warranty then contact the vendor.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If it seems to boot, but you have no display, then HOW do you know it booted successfully? Also, have you verified that the display isn't broken? If a laptop, what if you boot with external keyboard/mouse/monitor, and the top closed? Does it show anything on the external display?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ditto what CimmerianX said. Dell has very good tech support, and you can chat online with their tech people. They are better even than my own company's help desk people! If you need a repair, it will be reasonably priced. If it is something that should not have happened, they sometimes replace/repair parts out-of-warranty, especially if it is not too far out... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most major companies use Linux in their data centers. Mine has several thousand servers, spread over multiple data centers world-wide! In fact, if you want to work in IT or engineering here, you HAVE to be Linux/Unix savvy. My suggestion? Install a virtual machine manager on your PC, such as VirtualBox (free), and install a Linux enterprise distribution (Suse, CentOS, etc) in a virtual machine. Then, start working with it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It should take a standard USB cable (square end goes into monitor, flat end into computer). You can get one from just about anywhere for a few $$.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, is this an example, or are you asking for help?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Unlike C++, you cannot override the primitive relation operators in Java. You would need to implement methods like this:

class X
{
    bool isLessThan( const X rhs ) ( ... return trueorfalse; }
    bool isGreaterThan( const x rhs ) { ... return trueorfalse; }
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The Win32 API is a C api, not C++, so in order to apply object-oriented methods to it, you have to wrap it inside of classes. Qt and GTK (Qt more so) are good if you want to develop applications that can run on Windows, Linux, Unix, etc without modification (mostly).

Disclaimer re. Qt - I am a Senior Systems Engineer for Nokia, who until recently (last month or so) was the owner of Qt.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please be more specific about what hardware you have, and what your problem is - dropping connections in remote locations? Or what?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Tomcat is installable from aptitude (apt-get) and synaptic package managers. I don't know about Axis2. I am installing an Ubuntu 12.04 image on a VM over the next couple of days (the DVD's are downloading now), so I'll reply back about that when I know a bit more. Usually, if you can install a package from the system repositories, it is preferable to installing from source or whatever.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you have the original XP installation disc, then just have it install over the Win7 partitions, taking over the disc. If necessary, you can easily do that with a live Linux CD and uting the dd command: dd if=/dev/zero of=/dev/sda
That will erase the entire disc, including partition table and boot loaders. Then XP will be able to take over the entire disc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Stack - you have a hole, and put things in it that are approximately the same diameter as the hole. IE, LIFO.
Queue - you have some beads and a string. You put one bead on one end, and take one off of the other. IE: FIFO.

Clear yet?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

IE: sum(div(x)) = x, and (sum(div(x) + x)/2 = x.

Obviously, the factorization of x is the key. I'm not 100% sure, but that may mean prime factors of x.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

From the Wikipedia:

n number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself (also known as its aliquot sum). Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself) i.e. σ1(n) = 2n.

First, express the math as pseudo-code, then write code that expresses that in concrete terms. So, first show us the pseudo-code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You write the code. We help you debug it. No cheating here! For whatever it's worth (FWIW), I always use the formula %C = (%F-32)x(5/9) or the inverse, %F = (%Cx(9/5))+32. Why bother with approximations? What is the purpose of inexactitude for this?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There may be some data in the keyboard buffer that has not been consumed when the loop is called. You might try flushing the input buffer first. What version of Java are you using? Also, what is the actual class you are using for keyboard input. There is no keyboard class per-se in current Java implementations as far as I know.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. 2yy == yank the current and next line into a save buffer. You can then insert them with '2p' somewhere else.
  2. :2 == goto line 2 of the file.
  3. p == insert first line in save buffer (see #1 above) just below the current line.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, these crash reports may mean something to Mozilla engineers, but most of us are clueless! Have you tried installing a slightly older version? Or newer if this is a bit dated? Alternatively, try Chrome as suggested by johhny-marshal. I use Chrome now pretty much exclusively. It also has occasional problems (what complex software doesn't), but it would be a good test-bed to determine if your problem is specific to Firefox or not.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you purchased this from Dell, then contact them for warranty service. I think that probably the LED backlighting is faulty.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

They are pretty clearly written and self-explanatory. Read them again, perhaps 2 or 3 times. /etc/fstab is the file that contains instructions for the kernel to mount file systems when the system is booted. The grub config file is another kettle of fish entirely, and not related to /etc/fstab. How it is configured depends upon whether you are installing grub, or grub2. They are VERY different. I haven't done an LFS install for a couple of years so I don't know which grub version (1 or 2) that yours is using.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to show how the files are linked: ls -l /usr/bin

In any case, the files python3 and python3.2 are the executables you need to run. If the raw /usr/bin/python is not linked to one of those, you can change that easily enough.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Typically, such utilities are either inexpensive (under $2USD) or free (advertising supported). Most developers will offer both options. Some of us will put up with a banner adv. at the bottom of the screen to get the app for free, and others of us will not and prefer to pay you directly. If you app is really popular, then the banner adv. may pay you more than you would make with direct sales, since each use and click-through will generate revenue.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Where I work (at a software division of a major cell-phone manufacturer) all engineering workstations are now laptops. These are all dual or quad-core 3+GHz i7 processor systems w/ 8GB of RAM, WiFi (a/b/g/n), bluetooth, CD/DVD recorder, 320GB HD, eSata port, USB 2.0 and 3.0, HDMI and VGA video output, dual Intel/nVidia video controllers, etc. They are portable, and with a docking station a very good desktop replacement. Yes, a similarly configured desktop/deskside system will be a little less, but they will be a lot more ungainly to move around. Plus you have to deal with additional stuff like monitor, speakers, microphone, etc. When all is considered, I think the price will be a wash, and the convenience of the laptop will be immeasurably better.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Scheme is a dialect of Lisp, so you might want to look for Lisp/CommonLisp tutorials on the web. I haven't used it for many, many years. The last time was probably when I needed to tweak some Emacs macros. The GNU project has a Common Lisp implementation (Gnu Common Lisp) which is widely supported. Here are some links for Lisp books and tutorials online:

http://www.apl.jhu.edu/~hall/lisp.html
http://services.renderx.com/Content/demos/wikibooks-CL.pdf
http://curry.ateneo.net/~jpv/cs171/LispTutorial.pdf
http://cs.gmu.edu/~sean/lisp/LispTutorial.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You first need to think carefully and thoroughly about the problem you are trying to solve. Myself, I find that UML modelling techniques are useful, especially for more complex problems. For general system overview, use-case diagrams help constrain the problem domain. For structural issues, how things are connected/related, class diagrams work well. For behavioral issues, finite-state machines and sequence diagrams rule. If you are serious about getting into professional software development and engineering, these sort of tools are indespensible.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
typedef struct room
{
    int size; /* square feet/meters */
    int numClosets;
    int numWindows;
    char purpose[20]; /* Such as "bedroom", "kitchen", etc. */
} room_t;

typedef struct house
{
    int size;
    int numRooms;
    room_t* rooms;
} house_t;
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried to model this mathematically? That's where I would start.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is quite a bit "ex-post facto", but I have one final suggestion, and that is to use a switch statement instead of the long list of if/else statements. IE, instead of this:

            if (num == 1)
                JOptionPane.showMessageDialog(null, "I");
            else if (num == 2)
                JOptionPane.showMessageDialog(null, "II");
            else if (num == 3)
                JOptionPane.showMessageDialog(null, "III");
            else if (num == 4)
                JOptionPane.showMessageDialog(null, "IV");
            else if (num == 5)
                JOptionPane.showMessageDialog(null, "V");
            else if (num == 6)
                JOptionPane.showMessageDialog(null, "VI");
            else if (num == 7)
                JOptionPane.showMessageDialog(null, "VII");
            else if (num == 8)
                JOptionPane.showMessageDialog(null, "VIII");
            else if (num == 9)
                JOptionPane.showMessageDialog(null, "IX");
            else if (num == 10)
                JOptionPane.showMessageDialog(null, "X");
            else { //error message
                JOptionPane.showMessageDialog(null, "Not good at following instructions?" +
                "\nI said enter a number between 1 and 10!");

use this:

            switch(num)
            {
                case 1:
                JOptionPane.showMessageDialog(null, "I");
                break;
                case 2:
                JOptionPane.showMessageDialog(null, "II");
                break;
                .
                .
                .
                default:
                JOptionPane.showMessageDialog(null, "Not good at following instructions?" +
                "\nI said enter a number between 1 and 10!");
                break;
            }

The compiler will likely do a better job of optimizing this since it doesn't have to evaluate each if/elseif statement.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are running on Windows and don't want to install Cygwin to get the GCC compiler directly, you can use MingW, which is an open source GCC implementation for native Windows applications. When it came out, TurboC/C++ was the bee's knees, but it is sorely dated now and not particularly standards compliant. GCC is a leader in standards compliance, hence portability.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not relevant directly to solving your problem, but you might be interested in Henry Spencer, the author of regex: http://en.wikipedia.org/wiki/Henry_Spencer

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To replace the main board on a Dell laptp, you first need to remove the battery, RAM (accessible via a port on the bottom of the system), CD/DVD drive, HDD (hard drive), top cover/bezel, keyboard, and various other bits and pieces. You may need a special tool to safely remove the bezel/cover which looks a bit like a small snow scraper with a hooked end. One of the last thing you will do is remove the screws on the bottom of the case so you can pull the board out, after disconnecting things like the connections to the display, etc. The screws on the bottom of the case all (usually) have some sort of icon associated with them to indicate what they attach. In any case, when removing the main board, you will probably remove all of them... :-) Good Luck!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This causes the compiler to read the header file stdio.h which declares and/or defines a number of symbols and functions such as NULL, printf(), stdout, stdin, stderr, etc. These are necessary for general I/O (input/output) actions that all programs need to perform. On Linux/Unix and similar systems, this file is found in the directoryo /usr/include. Not sure where it is on Windows, but it would depend upon the compiler you are using.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is the problem:

void Logger::CloseLogFile(const std::string& prefix)
    {
        delete file_map[prefix];
    }

You delete the entry in file_map, but do not remove it from the map, so it is still in use, but not valid - crashing the next time something tries to access it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As Bob said, look in splitzer.h for the cause of this error. That is the only possibility as the cause of these errors.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Walt, you are reading my mind (regarding nested loops)! :-) That would be the typical approach if you don't have a sorted array.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your best bet is to sort the array (qsort() is good). Then it is easy to find duplicates since they will have to be adjacent to each other. IE (after sorting):

int lastfound = INT_MAX;
for (int i = 0; i < arraysize; i++)
{
    if (array[i] != lastfound)
    {
        lastfound = i;
    }
    else
    {
        /* We have a duplicate */
    }
}

How you deal with the duplicates is up to you. For whatever it's worth, setting lastfound to INT_MAX before the loop is just a "guard" value. It is unlikely (not impossible) that a valid value of the array COULD be the same as INT_MAX (2147483647, or 2^31 - 1).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not quite. You need to call the ofstream constructor with the name, which can be a variable. Here is the ofstream() constructor's signature:

 ofstream ( const char * filename, ios_base::openmode mode = ios_base::out );

So, as long as you construct the stream with a const char* file name, you are golden. Then, you can write to the ofstream object. Example:

void createAndWriteToFile( const char* vname, const char* somedata )
{
    char fname[MAX_FILE_NAME_LEN];

    // Construct file name here.
    sprintf(fname, "test/%s", vname);

    ofstream ostrm(fname);

    ostrm.write(somedata, strlen(somedata));
}