rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not asking for much, are you? What have you tried so far? FWIW, I charge $200 USD per hour (minimum 8 hours) for consulting work, which is what you are asking for... I would estimate that such a job would take 2-3 days minimum (especially since you want it in both HTTP/PHP and JavaScript), so that would be between $3200 and $5000 (approximately).

Oops. Sorry. Forgot I was starting a new position as Lead Technical Architect at Adobe next week. No time.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Get yourself one what? SSL certificate? Are you running a web site? If not, don't bother. If so, then explore the options for registered certificate authorities.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As we both suspect, your 500W PS is not adequate, which assumption is reinforced with your newer comments about it failing when game playing (forces the GPU into high-power mode). Get a 750 or 1000W PS and see if that fixes the problem. Myself, for my workstation I always go for the higher capability PS (1000W). In this case, more is better. It costs only incrementally more, but it will cover all reasonable power requirements without problems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you running from a home network, or company one? Is this on WiFi or a hard-wire ethernet connection?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Mac OS is basically BSD Unix with a nice GUI. Linux is similar, with many nice GUIs, SOME of which resemble the Mac's. That said, Linux GUIs are a lot more user configurable than the Mac's is. Play with them. You can switch easily enough, without munging the entire system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A map is not case-insensitive by default. You need to specify your own comparison function in the template argument list for the directory object to handle your use case. Here is a link to the documentation for std::map: http://www.cplusplus.com/reference/map/map/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I doubt it would make much difference betwixt the two versions, assuming the Bing Maps APIs are available for 8.1 as well as 8.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try using Google or Wikipedia to start your search about facial recognition algorithms. This is not a simple subject and is one that has tripped up some of the top minds in the business for years. Just now are some such technologies becoming reasonably accurate where they can be used in "production" environments, not that as a student project that would be a requirement. In any case, I think you have a lot of work ahead of you, and not in just the coding aspects of the project. Getting your head around the algorithms themselves will be a challenge in itself. If you get it to recognize your own face in various poses (smiling, mouth open, eyes shut, with/without glasses, etc) with only one reference photo as a baseline, then you will be doing very well indeed!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How many and what type of disc drives are you running? Devices that are USB powered? Other cards besides the video?

FWIW, the Radeon 7850 draws approximately 300 watts when not at idle or just doing simple desktop stuff (provided your system can engage with the 7850's low-power control system). With everything else, your power supply may be the culprit here. Try replacing it with a 750W unit. Thermaltake units are, AFAIK, perfectly fine supplies, but I think that 500W is a bit weak for your needs. I have seen more systems fail from inadequate PS units than just about anything else, other than RAM or CPU overheating.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Bose has some nice gear for this sort of thing. A bit more expensive than Logitech, but far better in quality.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If it is an Apple phone, it already is installed. If not, then you can't install it. If it is an iPhone and the flash memory has been completely wiped, then you would at least have to go to an Apple Store to get it re-flashed. If you are in Bangldesh or in an area where Apple Stores don't exist, you would have to send it to someone in an area where one does exist.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

OOP is a means to help you think about the things that are going to "live" in your programs - their properties and behaviors, as well as how they are related to other things (classes). For example, a class "Automobile" might have some properties such as Engine (probably another class with its own properties and behaviors), Suspension, NumberOfSeats, NumberOfDoors, Transmission, etc. It may be a kind-of MovingVehicle which would have some fundamental properties that all things that are a kind-of MovingVehicle would have, such as number of wheels (a Bicycle would have 2, Automobile 3 or 4, Truck 4 or more, etc). Behaviors could be accelerate, decelerate, stop, turn, openDoor, openTrunk, and such. There are also state properties, such as CurrentSpeed, which some of the behaviors (methods) could check, such as openTrunk, which may throw an exception or set an error if the CurrentSpeed <> 0.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Put a space between the '>' and 'records' on line 38. Other than that, what is your problem other than confusion? Show how you are using the vector.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try Googling this on your own. We aren't here to do your homework for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

nitin1: extremely awesome ;) You always explain awesomly. how? ;)

I think deceptikon had the "awesome C++ wizard" gene spliced into his DNA... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What deceptikon said. This where coding boffins start calculating the number of cycles each valid approach uses, and determine if there is a big enough difference to matter. If you are doing this a gazillion times a second, a few cycles may be important, at least for the initial target CPU architecture! The next one may behave very differently... See x86 vs Sparc vs ARM vs ...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@rubberman Why will I need to update each and every source file? Can you please elaborate little bit? Please explain more. thanks.

If the contents of any of the headers you would have included in your source file(s) changes, then you would have to update each of the affected source files in turn in order to incorporate those changes. For example, structures may have members added or removed, global arrays changed in size, macros that you might use updated, etc, etc, ad nauseum.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As pointed out, that is just bad code with no indentation, not pseudo code, which is the process of describing what the program will do, not doing it. Here is your code in pseudocode form:

    if the user inputs a valid medium
    {
        ask user to enter the distance
        get user input for distance
        if (distance > 0)
        {
            calculate the time the sound takes for the distance specified
                for the medium specified
            output the time the sound will take to traverse the medium
        }
        else
        {
            tell user they specified an invalid distance
        }
    }
    else
    {
        tell the user they chose an unsupported medium
    }

Again, the purpose of pseudocode is to tell WHAT the program should do, NOT how it should do it, though hints, suggestions, issues to address and such are ok. The idea is that the pseudocode can be commented out and the appropriate code inserted, resulting in a well-commented application.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Because if the headers change (software updates, etc), then you would have to update every source file you have.
  2. Header files often have macros defined, global variables that may vary upon the results of macro definitions, etc.
  3. Each header file may include many other headers, which in turn include others, ad infinitum.
  4. Trust me, your idea is not sustainable, period.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And that method is...?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Intel compilers and libraries are generally first class, but they are not free. You can get the same results with other compilers and libraries. On Linux, supposedly using the -pthreads option for the gcc compilers will use a thread safe version of malloc. I do know that when I use malloc/calloc/realloc on Linux using pthreads, that I have never had an issue (in 8+ years), so I suspect that is the case. As for Windows, that is an entirely different issue that I am not able to answer... :-( Sorry!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

:-) We have all done that. Just remember, we are trying to help students to learn how to fish. Not just feed them a fish! Anyway, as per my comment, your intention was good, but the results may not help the student in the long term. I know I have had, in my career as a principal software engineer, to terminate "engineers" who had not learned this lesson. They did not help the organization, and in some cases absolutely caused serious problems with our customers. FWIW, a couple of these people had "earned" PhD's. I suspect that they did not do their own research and analysis to earn their degrees!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As chriswelborn said, having a problem to solve is a good incentive to learn how to program. I got started in 1983 by being challanged to write an accounting program in dBase II for a wholesale bakery company in the Silicon Valley. That program ran the bakery for the next 10+ years until it was sold. By that time I was principal software engineer for a major software company.

FWIW, I wrote the program to handle Y2K date issues... :-) Then, 15+ years later, I was tasked with leading the Y2K analysis and remediation process for my company's enterprise applications - 10+ million lines of Unix and Windows code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I hope my answer helped you find this solution. In any case, I'm happy you have solved the problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The data from the scanner is binary. You are trying to output that as text. You need to decode the binary data first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And the purpose of this is? Keyloggers can be used to build a remote-control support application (I have done so in the past, and that is what VNC and other RC applications do), or it can be used for nefarious purposes. In any case, it can be a dangerous path to provide for those who don't know how to pwn systems already... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I disagree with oricion.

  1. If the card did work at first, but stopped working recently, then the card is likely failing and you should return it for a replacement.
  2. If #1 is not the case, then the problem is likely that you need to access the BIOS and configure it to use the add-on display card instead of the integrated graphics that you are likely using.
  3. Also if #1 and #2 are not relevant, did you move the video cable from the old port to one on the GTX 760? If so, then the card is likely failing and you should return it for a replacement.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you have no monitor, how do you know it is running properly. The fact that the fan and/or hard drive spin is no indication for sure. Have you tried another monitor? Cable? Video card? Does the system beep when you boot it up, and if so, how many beeps in what pattern? Finally, what is the make, model, and configuration of the machine?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You may also have a restore partition on the hard drive that will let you restore it to factory settings. If not, then it is either paying for the restore discs, or wiping the hard drive completely and letting the center install the operating system of the hard drive, or installing something like Linux on it for them, which will take care of wiping the drive for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I don't see a Basement to Dining_Room transition. There is a Basement to Closet transition, and a Dining_Room to Basement transition.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You have defined State after Machine, but each has a dependency on the other. This is how you can deal with that:

// Forward declaration of the State class.
class State;

class Machine
{
    // Don't put 'class' in front of State here.
    State *current;
.
.
.
};
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are correct in that the protected: declaration in class Tank does nothing. You could put static or instance methods or variables there, but since it is only succeeded by public: that is what access will be granted to following elements. Do note that you can multiple public, private, protected sections in a class header.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is how to do it:

#include <stdio.h>

int main(void)
{
    int a = 10;
    int b = 12;

    a ^= b;
    b ^= a;
    a ^= b;
    printf("a == %d, b == %d\n", a, b);
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I suspect that you would need a BIOS option as well as operating system support for that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, show your code doing this. You only show the structure of the list and node structures.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You definitely need some skills... I don't run windoze, so I can't comment on your use of netsh very intelligently, but from what I garner from some web searches and reading MS documentation on the tool, what you want to do is not possible.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A joke, right? Iamthwee usually posts sensible stuff... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you only show your main() and argumentCheck() methods. What have you done for the createTable() and printTable() methods? What problems are you encountering?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Any particular reason why you are using hash-maps vs regular maps? One advantage (possibly) for maps is that they are key ordered.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are ample e-commerce packages that will do what you want. Nothing is free. You either pay in $$ or in time and effort.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The only question I will answer is #3. SQL injection is when someone alters an SQL query predicate to do something other than what the web site developers intended. How do you avoid it? You don't allow SQL queries or query predicates directly in HTTP GET/POST messages. You take the elements you want to fetch/change and pass them directly to a stored procedure in the database that can properly validate the information. It is never to be used to create an SQL string, even in the stored procedure. Rather, the data is used to bind to SQL variables which will not allow the attacker to override the intended behavior of the system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually my suggestion only shows what runs on the browser. The PHP code runs on the server, and that, as mentioned by other posters here, is not easily accessible. That is the property of the web site, and not yours to use.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, dinad's change is legitimate since there can be negative numbers in the array, and if they all are, then my code would not provide the correct answer. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but I don't do your homework for you. I provided a pseudo-code algorithm to solve the problem. Write the code, and post it here with errors that you encounter. Then we may be able to help.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It sounds like your Firefox proxy settings are incorrect. Go to Edit->Preferences->Advanced->Network and verify if you have clicked on "Use system proxy settings" or something else.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I seem to recall there were some problems with that update. Have you tried updating with the current patches?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What error are you getting? FWIW, this is a Star Office file (most likely). LibreOffice or OpenOffice should be able to read this file unless it is corrupted or you are out of memory.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You want the code for that web page? Most browsers should allow you to display the code. I just did with Firefox. It's about 1000 lines of HTML with form calls to various PHP pages, most of which are recursive calls to the same page except the login script which is a different page (index.php).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The main distinction, which decepticon was trying to get across, is that each member variable in a struct has its own memory within the structure, and the structure size is the aggregate of all the member variables. A union is only as big as the largest member of the union. So if you have a struct like this:

struct foo {
    int x;
    char* y;
    double z;
};

The size of struct foo is sizeof(x)+sizeof(y)+sizeof(z). However if you have this union:

union foo {
    int x;
    char* y;
    double z;
};

The size of union foo is the largest of these elements, which depends upon the system architecture. The size of x would be likely 32-bits, z would likely be 64-bits, and y could be anything from 32-bits to more than 64-bits, unless you are programming an 8 or 16 bit embedded processor, in which case they will be smaller. So, assuming you have a 64-bit system, then the size of union foo would be at least 64 bits, and the size of struct foo would be at least 32+64+64, or 160 bits.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Glad to help. Sometimes basic C/C++ programming rules can be rather confusing, even to us "experts". :-)

nitin1 commented: I want the day when I can say myself "expert" +4