rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This requires some sort of database to keep current user data, such as MySQL or PostgreSQL. You need to write your php scripts to capture the data to the database, and then the script to sync the data to mailchimp has to read that data. This is not a trivial task. How much PHP experience do you have?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can also try configuring your power settings to only speed up the cpu and RAM when needed for processing purposes, throttling it down when not necessary. This will usually help control system temperatures. Don't set it on maximum continual power.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a simple factoral problem. 1, 2, 4, 8, 16, 32, 64, 128...
As DaveAmour asks, do you have any code yet?

miazara commented: #include <iostream> #include <iomanip> using namespace std ; void main () { int total_month; float total_salary = 0, total_pay = 0; c +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show an example please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How is the joystick connected to the computer? Analog game port, serial port, usb port? What?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In the immortal words of Bruce Schneier, it sounds like security theater to me!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to be more specific about what you want and the problems you are having. And GOD or $$ have nothing to do with this!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The virtual machine extensions need to be enabled in the BIOS. IE, the VT-x and/or AMD-V extensions need to be enabled in the BIOS or you will get this sort of problem with kvm, vmware, or VirtualBox.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Too much data to analyze in any reasonable amount of time. Reduce it to some reasonable subset around the point of the crash, along with other supporting data. FWIW, 250ms per snap is only 1/4 of a second. This is a lot of data to capture, and may be contributory to your failure. Try setting it to 1 second intervals and see what happens.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Besides the fact that Win98 is waaaaay out of date and insecure, why don't you upgrade to a current (or recent) Linux system? The CUPS printer files for Linux/Unix can probably handle your printer without problem. Also, viruses will pretty much be a thing of the past.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can try an 802.11n card and see if that helps. The one you provided the link to does support 802.11n, but you may need a driver for XP, and since XP is no longer supported by Microsoft, you may only get 802.11g/b speeds (no better than you get now). My advice would be to upgrade your OS to Win7 at least, unless the card has an XP driver that supports 802.11n as well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My wife is a physicist and I am a software architect/engineer. All of our systems at home are either OSX or Linux. Even when I am forced by an employer to use Windows, most of my work is in Linux and I run it in a virtual machine. Windows is used only for "business" applications. As for OSX, it was derived from Next, but that was from BSD Unix, and now the BSD part far outstrips the Next part.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Fib(43) is a VERY big number, and will overflow even double precision numbers. Not sure about 64bit integers, but definitely 32bit ones.

As for the recursive vs. non-recursive algorithms, show your work!

FWIW, I was using recursive fib algorithms back in the mid-1980's to balance S&P indexed funds for the Mellon Bank.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, you have not initialized the two strings, so they contain random data from the stack. Moschops is correct in that you need to initialize the strings before calling the mystery function. Also, this is NOT testing for length, but for equality of strings, so your output is misleading. IE, "foo" and "bar" will results in "The strings are of different lengths" even though they are not. Try this instead:

#include <stdio.h>
#define SIZE 80
int mystery( const char *s1, const char *s2 ); // prototype 7
int main( void )
{
    int result;
    char string1[ SIZE ]; // create char array
    char string2[ SIZE ]; // create char array

    puts( "Enter two strings: " );
    scanf( "%79s%79s", string1, string2);
    result = mystery(string1, string2);
    if (result == 1)
    {
        puts("The strings are the same");
    }
    if (result == 0)
    {
        puts("The strings are different");
    }
    return 0;
} // end main
int mystery( const char *s1, const char *s2 )
{
    for( ; *s1 != '\0' && *s2 != '\0'; s1++, s2++ ) {
        if( *s1 != *s2 ) {
            return 0;
        }//end if
    }//end for
    return 1;
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, you can modify it for personal use, but may have to pay a license fee if you want to redistribute it (sell it) with your changes - or at least get permission. I believe that is part of the LGPL lincense. At least that was my understanding when I worked for Nokia when it still owned Qt.

Anyway, I would have to look at the current licensing documents to know exactly what the restrictions are. Typically, LGPL licenses allow you to modify and redistribute code provided you provide proper attribution and a means to obtain the modified source code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What interface(s) does the printer provide? It can be serial, pararllel, or USB. That will determine what port you send the output data to. Also, does the printer require some specific protocol to communicate print data to it? There are many factors here to resolve before you can even think about what tools to use to accomplish this. IE, you need to read and digest the device's technical documentation first before you go one step further.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are running WiFi 802.11b (probably) then you are getting about the max your wireless can provide (between 1 and 11 mbps), depending upon signal strength and distance from the access point.

According to the Dell user docs, the specs say that it should be able to support 802.11g (still 2.4GHz) which should provide up to 54mbps data rates, but I'm not sure your XP driver would support that. It also depends upon the access point.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It puts the last character read from the input buffer back into the buffer so the next call to getch() will return it. Let's say you are reading numbers into a string buffer from stdin and you get a character. You want to process the numeric data and then start reading a string, so you put the character back with ungetch(). That way when you start reading a string, you start with the character you had read. Example where you are reading amounts and currency type and your incoming data looks like this:

100dollars
200euros
300pesos

So you read the 100, and then get the 'd'. You put it back in the buffer and then read the currency, starting with the 'd', getting "dollars", then 200 and 'e', putting the 'e' back and getting "euros", etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to implement the order() function (and others) outside of main(). Java let's you implement functions inside others, but not in C or C++.

Also, please don't ask us to analyize 400+ lines of code. That is just disrepectful of our time and efforts.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Each case statement needs a 'break;' command at the end, otherwise it will fall through to the next, resulting in your experienced output. Also, I would suggest that you to a case-conversion for weight in the switch() statement so you don't need stuff like case 'S': case 's': constructs.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Then if you cannot resize the array, you will need to back up your data, and re-configure / re-format the array to the size you need. Others here may have better advice. I try to stay away from Windows as much as possible, especially with regard to this sort of thing.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

From your post I assume you mean that your printer has a usb or SD card port? This is a matter of software. The Lexmark applications and drivers should provide you the means to do this. That is about as much help as I, personally, can provide.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We aren't your code slaves. You code it, post it here, and then we critique it or help you fix errors and/or problems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The size seen is the file system size, which was set to 250GB originally as that was the size of the smaller drive. You need to go into the disc manager tool and expand the file system. On linux you would do this with the command resize2fs for ext2/3/4 file systems, or if it is an NTFS file system on Linux, ntfsresize.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Then a singly-linked list where you insert at the top of the list (push), and remove from there as well (pop), will give you a nice stack behavior. You can use an array as well, inserting and removing from the bottom of the array. Either will work, though the array is moderately more efficient. I have used both methods in the past for very similar problems, including an RPN calculator! My best (but most difficult) implementation was done using a B-Tree structure, but that was for an infix calculator. :-)

Anyway, this may help: https://www.gnu.org/software/bison/manual/html_node/RPN-Calc.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The Linux kernel is written in C as are many of the system utilities, though python is becomeing very popular. Most large-scale programs are written in C++ or Java. I prefer C++ myself since it is much more efficient and flexible than Java (my opinion). If you want to write a GUI application, it is best to use one of the high-level API libraries available, such as Qt (a C++ library). Qt is also widely used to write Windows applications. It is very cross-platform compatible.

Slavi commented: flexibility! +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you are using other people's code? Have you tried implementing it yourself? Do that, and we can help you. Also, you will learn a lot more about what you are doing. An RPN calculator is effectively a stack machine. You can use the singly-linked list pattern in either C or C++. C++ also has stack constructs in the STL that you can use (push/pop data).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to learn how to parse text data.

  1. Get field up to delimiter
  2. Go to #1 until you reach the end of the line.

Each field goes into a variable. Once you have reached the end of the line, you can store that data as appropriate for your application. This can be an in-memory structure/object, or a database record. FWIW, this is pretty standard stuff. Don't ask for code until you have made an attempt to solve the problem yourself.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Huh? Joke? Phumble phingers? What?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

When you lose power on a PC while running, it is likely that the power surge/failure caused a catastrophic failure of the system and/or other hard drives.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do you mean by "put the same name of the objects"? Show code please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Never having used BlueJ I cannot answer #3. As for #1, if two objects of the same class have the same state, then at that time, they are identical, in that A == B. That said, you can change the state of one, and then they will no longer be identical. Identical does not mean they are the same, just as identical twins are not the same entity.

As for #2, when you compile a .java source file, you get a .class file (a binary representation of the source code). They are not the same, but there are tools to reconstruct the source code from the .class file.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And your question is? We can't tell you what topics to do your research in. Always, choose something that is of personal interest to you, if possible. The domains you mention are all very different, require different approaches, different tools, and different mindsets.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try
const double pi=3.14;
const double e=2.718281828;
instead. That's what ddanbe was trying to tell you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We get a lot of beginners and students here. Post your questions, code, error messages, problems and we will help if possible.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please don't ask us to do your homework for you. Write the code and then post it with your errors or problems here and then we can help.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good question nitin1. I use cmake for appropriately constructed projects, but have never built a project for it. I will have to do some research and get back to you. In the meantime, perhaps another user here can provide some clarity on the subject.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are not providing enough information. What exactly are you trying to do? Build your own web server with C++ using winsock API's to handle the network interfaces? Something else? What?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can use a series of if/else branches, or you can create a set of functions for each operator and create a 2d array or 2d vector of operators and the associated function. In the latter method, you look up the operator, and call the associated function with the provided numbers. Using a 2d array will work for both C and C++ as will branching (if/else statements).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just remember, we don't do your work/homework for you. Make an effort, post the code and errors or problems you are having, and then we can help. FWIW, this can be coded in about 2 lines in most programming languages, including C, aside from the required includes, main(), variable declarations, output functions such as printf(), and the return from main().

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Dealing with the logic is 99% of the work in programming. Moschops is being very nice to you! Show your work, and logic. Start with pseudo-code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Nathan is saying (nicer than I would) is that we don't do your homework for you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Find a subject that interests you, and then figure out how to program an application that fits it. For example, let's say you like weight lifting and you want to track your progress in pressing more and more weight over time. You could write an application that lets you input current data on a regular basis, stores that in a file or database, and then lets you run some graphs of your progress over time, such as meeting specific goals.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The code says you need at least 1 argument, the number of processes to run. IE, you need to execute it as ./chainofn N where N is the number of processes. You are not specifying that argument, hence the error.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Did you just turn it off, or did you shut it down? If it is running and you shut it off (power down without shutting down) you can do a lot of damage, mostly to the disc drive. Can you get into the BIOS?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Shutting down the system when the CPU overheats before damage is done is not usually a default setting of many systems, though most can be configured to do that. My Linux 8-core system is so configured. It will map out overheating memory, and gracefully shut down the system if the CPU is overheating, but I had to configure it to do that. I'm not 100% sure about Windows systems. I think your system is fried. If you are lucky, the disc drive and data is still intact.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What have you done so far? I have developed PHP/MySQL applications (for internal purposes at Nokia). Making it an application? What does it do? Does it serve a rational purpose? Please describe what it does, and how it does it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Alternatively you can use a 3 member array and set each as used, of course after you have initialized the members to false! IE:
bool lifeline[3] = {false, false, false};. Either method (mine or ddanbe) will work for you. So, if selection is 1, then lifeline[0] = true;, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

While the first construct is still allowed in most C compilers, current C++ compilers will issue a warning about assignment of a string constant to a non-const char*.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please show the entire image class definition.