rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sounds like it's time to either replace or repair it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

On Linux systems, double quoting a directory or file name will deal with the spaces. IE, your adding "\ " values to the string are problem causing this error. So, the string probably should be this: "~/.PlayOnLinux/wineprefix/LeagueOfLegends/drive_c/Riot Games/League of Legends/"

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Start with lines 42 and 43. I assume you want to add the numbers in each element of the array, but it is a 2 dimension array, so lines 42 and 43 would have to be like this:

 int x = arr[0][0] ;
 int y = arr[0][1] ;

Also, you are making your code much more complex than it needs to be. Make the last element of the test array a guard element, such as {0,0} or {-1,-1} and do a regular loop for (i = 0; test[i][0] == -1 && test[i][1] == -1; i++) setting x and y to test[i][0] and test[i][1].

Processing negative numbers is a bit more complex than the all positive ones, though even with the positive numbers you have to deal with integer overflow which would set the top bit, making it a negative number, in which case you need to throw an overflow exception. Anyway, I'm leaving that to you to deal with that in your plus() function. Also, you are using addition in your signed_plus() function, which you say you are not supposed to do. Try to do some trivial positive and negative number sums by hand to determine what the bits should look like. That will help you work out the algorithms you need. And remember, simplify, simplify, simplify. You are trying to be too clever and complex for the task at hand. And this may be a good time to see how an assembler would do this. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To extend Jorge_7's answer - you're not opening the connection to the database. As noted, the mysql api's are deprecated (out of date) so either use pdo or mysqli. Myself I prefer mysqli for MySQL database connections, though I think that PDO is more general and supports other databases as well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What's your problem? Explain it here and maybe we can help. Post your code if available.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As explained in the stackoverflow thread, this would be a MAJOR security breach! If the user has logged into your server previously, the login information could be saved in the browser's password database, or as a cookie. If a cookie was saved, you could access it from there. In any case, getting the user's REAL Windows (or Linux) login ID is very bad juju!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your section bracing is bad. Look at it, especially in the child section. Example:

while(TestAndSet(&lock))
    printf("spinning");

There is no brace starting the block after the while() statement. This is not an uncommon beginner problem. BRACE ALL BLOCKS OF CODE! This shows exactly what is related, and what is not.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Post some subjects and what you intend to accomplish. I'd be interested.

-Rubberman

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a good exercise in bit-twiddling. Just remember, a left shift is a multiply by 2, a right shift divide by 2. Your logic is faulty and you need to rethink how to deal with the bits. Here is an example:

2 (dec) == 0x10 hex.
3 (dec) == 0x11 hex.

So 2+3 == ??

0x10 + 0x10 (2+2) == 0x100 (4)
0x100 + 0x1 (4+1) == 0x101 (5)

which is 2+3. So, without adding this would be the same as (0x10 << 1) | 0x1 == 0x101 (5). No &'s required.

ddanbe commented: deep knowledge +15
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Function? The only function you have is main()...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, what is your problem? A C++ compiler on x86 or Mips systems should generate equally valid executables unless you are doing bit-manipulation and need to address little vs big-endian issues.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Schol-R-LEA beet me to the mark with his response. Your original post is not valid C code. You can use semaphores to enable a mutual-exclusion behavior, but all the processes that need to access the common service/data will have to utilize the semaphore in order for this to work. I have had to do this in the past for C programs to safely access shared memory.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The only link I could find was this: http://concorde-sst.com.foxmos.com/

That appears to be a cloud data storage service. If you don't have your son's ID and password, it is unlikely that you can access his data. At the least, you can contact them and see if, provided you offer proof of your son's death and wish that you get access to his data, that they will allow you to access it. Even in that case, it may not be possible.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need a disassembler. That will turn the binary code into assembler code. Good luck!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your new code.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Specify CREDITRATING as a private member, but provide a protected setter and public getter method to set/get the data. Don't use friend or static members or methods for that. In your derived class, if you need to change the credit rating based upon some analytical processes, then you can call the protected base class setter function, but it keeps any old code from being able to change it without thought.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please post the code directly, and describe the problems you are having.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Use one or the other in C++, not both. Cout is preferred. You can use sprintf() to push the data into a string, and then output that with cout. Sometimes, that is a reasonable alternative, allowing you to use printf() formatting options to build the string you want to output.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

People need to recognize that PHP is an object-oriented language (C++ with training wheels) that runs on a web server, and can emit HTML and javascript as necessary to run on the client (browser) for further processing. I posted an article here about how to do that properly. Read it. It may help you build better web sites!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You really don't need javascript to do this! Assuming you have the tax rate and selling price (either GET or POST variables), then you can easily do this in the server-side PHP logic. Then, output to the client browser with HTML is trivial.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is more or a C than a C++ problem. Read one character from stdin (cin), count the number of instances of that character from stdin until you get a new character. Add that code (cN) to an array of results. Start with new character with a count of 1 and reiterate. Continue until all characters are read.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your routers have a maximum bandwidth, and all the loads are probably hitting that limit, hence the "lags" you are experiencing. You can use both wifi access points, provided they are directly cabled to the modem, providing a greater throughput than you will get with WiFi only.

We have two WiFi access points in our house. One is part of the internet router. The other is connected directly to that via a powerline modem (no cables required other than from AP to modem to router), so we can take full advantage of the 25mbps bandwidth we have on our internet connection. Of course, sometimes that isn't adequate... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Systems shut down automatically when certain things happen, such as overheating. Is this a laptop or desktop system? What is the power supply rating (in watts)? Are the cooling fans working?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This warning will be issued in a number of scenarios, including if the certificate is a self-signed one (not registered with a legitimate CA). They should be noted, but for testing purposes can probably be ignored, although CA spoofing is becoming a problem these days.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Use HTML form structures for output.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, use sudo to change to root: sudo su -
Then, install the package. No passwords will be sent to any malware as a result. Checksums are good, and I think that Qt will provide those if you need.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Probably not. Apple is in full control of this stuff. Getting them to allow a retrograde installation is very unlikely... :-( That said, there are a lot of security upgrades in the new versions of firmware.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you. Write the code, post it here along with the errors you are getting, and we may help you...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Battery life depends totally upon the load that the computer is generating. Computationally or graphically intense programs will increase power usage. Also, power settings for the system will have a major impact.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this a usb mouse, or is it a wireless unit? If wireless, have you tried replacing the battery?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, look at this: http://www.cprogramming.com/tutorial/lesson17.html

Variable arguments have been in use for decades. This technique is pretty standard for processing (...) arg lists. FWIW, the printf() functions use this internally.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just remember that PHP is a true object-oriented language. Use it appropriately. I posted an article in these forums about how to best utilize it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just remember that PHP is a true object-oriented language. Use it appropriately. I posted an article about how to best utilize it here. You can find it here:

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Know that EOL (End Of Life) on MS products is part of the Microsoft Income Protection Act... For companies wedded to MS products, switching to Linux is difficult and often not an option, so open up those checkbooks, or risk becoming the next source of malware for all of your customers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Gmail is definitely a browser-based client, but gmail clients are available for most mobile devices as well, which are not browser-based.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

An interesting thing about some of the later PHP 5 distributions (starting with 5.4 or 5.5 - don't remember exactly which but I think 5.5) is that there is a built-in web server that you can use to test your code. I did this at Nokia when I was writing a lot of PHP code for our performance testing needs. The php.net web site can provide that information for you. In any case, using that means you don't need a web server such as Apache running. You can also specify the port so it won't conflict with running web services.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Unfortunately, a lot of schools are still using seriously outdated tools, such as Borland C/C++. This is just absurd, and not suitable to train new programmers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In current c++ compilers, main() must return an int, NOT void. That is deprecated, and will generate errors or warnings with any recent (since 1999 or so) c++ compiler.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The pop function generally is just removing the most recently added (push) member of the queue/stack and returning it to the caller.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, what's the output, and/or your problem?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to take the tests for min and max outside of the loop. Also, min and max are the names for common functions (such as min(x,y) and max(x,y)) - some compilers will not like this. Change the names to something like theMin and theMax.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Open Office (and Libre Office) should not install any other apps with it. Where did you get the install files from?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, describe the input, the output, and the miscalculation.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you. Write your code, and when you have problems with it, post it here for advice.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Wipe the entire drive and reinstall the operating system - preferably Linux. Boot a Linux live CD/DVD drive and run the command "dd if=/dev/zero of=/dev/sda bs=1M" - that will wipe the entire disc including the boot/partition sector, which is probably where the malware was located so it could re-infect your Windows OS after wiping it and re-installing it. It is also possible that the malware has infected your BIOS flash data area. That is a more serious issue. It can be resolved, but it isn't simple as the method depends upon the system hardware.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Gmail?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I tend to agree with s.o.s about the clunky nature of SQL to model such hierachical structures. It can be done of course, but the file data would have to be BLOBS if you want the file data in the database. Depending upon their sizes, that could be an issue as well. All the directories could be in a single table with self-joins to reference their parents, and the containing directory in the file table would be a foreign key to the directory table. Since multiple directories, even in the same path, can have the same name, you would need another field for the primary directory key - ditto the files.

So, doable, but complex. Personally, I'm not familiar with Neo4J. I'll have to do some research to see if that would be a better option, but at this point I'll take s.o.s's opinion about that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do you mean by "vertical the output"?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try running alsa mixer and see if adjusting the master volume control helps. Also, try running VLC media player.