rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Cooling is critical for todays' systems. Make sure you have good air flow through the case, and that it routes over the motherboard and its components and the hard drives as well. Note that Seagate drives over 500GB tend to run very hot! My 1.5TB Seagate drives, even in specially cooled enclosures with mongo-big fans, run up to 120 degrees Fahrenheit. Memory sticks that get over 105 degrees Centigrade (100C == 212F == boiling water) will start to fail. My memory under load runs up to about 95-100C under prolonged heavy load (100% CPU utilization on 8 processor cores).

In truth, designing computer cases/enclosures is not only a visual and material design problem, it is an industrial engineering problem with a lot of thermodynamic aspects. Don't minimize. Over-designing for these issues is not a fault here, as one who has experienced the effects of under-designed cases on computer components can attest.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Hopefully they have solved their problem by now! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

These games really exercise the system - CPU, memory, video. A lot of this sort of shutdown/reboot problem occurs because of component overheating. Make sure that your system is effectively dust free, that the fans work properly, and that, as noted by others, your power supply is adequate to drive your system at max. A lot of these big-box store bought systems (even brands like HP/Compaq) have minimalist power supplies that can handle your average system load, but are fubar when it comes to working for a living. Even top-end gear can have this problem. My system is a custom built 8-core, 8GB monster with 750VA power supply. I run Linux, and the temperature monitoring software found that the memory was running so hot, that occasionally the operating system would shut down one of the 4 sticks, and map it out of use (Windows doesn't work quite so gracefully). By moving the memory sticks around I was able to improve air flow over them and reduce their average, and maximum, operating temperature by about 20 degrees. No more memory problems. If I had been running Windows like this, instead of mapping out the overheating RAM, it would have shutdown and/or rebooted the system, most likely...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

SNAFU, FUBAR, toast. Enjoy your new doorstop! Actually, the Dell Dimensions have good cases, enclosures, power supplies, etc. You should be able to drop in a new mobo, but if you do that, the OEM version of Windows that was on the machine (unless you installed a new one that you bought from MS), will not work, since they check the BIOS and (possibly) CPU information to determine if you are running on the original manufacturer's equipment. If that is your situation, may I encourage you to take this opportunity to not only get a new computer, but also try out Linux? I use Linux exclusively in my consulting business and it works great for me! As someone once said, it is cheap at twice the price, and 10x more secure than Windows!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I had to remove this virus from my attorney's system earlier this year. Since I run Linux system software, I mount these Windows drives in an external enclosure or dock, run about 3 different AV scanners over the drive (they all miss something), and clean it up. I also have Linux software to repair the registry on the Windows system drive. I've never been unable to fix a system with this methodology. I find that newer viruses are VERY difficult to remove using Windows tools because once the system is running, the viruses are capable of "hiding" themselves, moving around, etc. I have even seen them infect DLL's on the recovery partition, so if you try to reinstall the OS to factory state, they are still pwnd.

Anyway, to check if your drive is fubar physically, and not just pwnd with a virus, you need to boot up a drive testing stand-alone disc, such as what you can get from Seagate's web site. Since you don't say what make/model of drive you have, I don't know whether that would be best for you, but Seagate's drive diagnostic software will work with non-Seagate drives, although obviously their own hardware will be better analyzed (one would hope).

And in case you are interested in the AV scanning software I use, the scanners are the Linux versions of ClamAV (free, open source), F-Prot, and McAfee. They are all good, but as I said, each finds stuff the others don't.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

i use alcohol 120

So do I, when I have to burn on Windows. Normally I am running Linux so I use the various tools there, such as Brasero or K3b, which use the command-line tools underneath.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What compiler are you using?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

ClearOS (clone of CentOS),,, its simple works well and it's most popular in Indonesia. :)
i'm sorry if my english is not good.

That's good to know. Thanks for the info. I don't supposed they have a version 6 available yet? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Tried that. No luck.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

the twofish-cpy.zip file code requires a "tables.h" to be included. whre do i get that from.

That is generated by the python code. Since I haven't been able to get the python code to work on my RHEL 6 Linux system, I haven't been able to check it out either...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As for single trace multiple inheritance (no common base classes), that is a very powerful feature of C++, and one to use to express specific implementations of general abstractions. An example would be that of a storage adapter. Sometimes, the storage adapter might be a remote server that communicates with messages, such as SOAP. Other times, it may be a local SQL database, or a flat file. Each of these storage adapter types can be derived from the StorageAdapter base class, which has the interfaces you need, but behaves very differently internally. So, a persistent class can have a static member that is a pointer to a generic StorageAdapter, yet when the class asks the adapter to store it, it gets handled appropriately, being marshaled as an XML SOAP message in one case and sent to a remote server, to executing SQL statements directly to a local database server, to writing the contents of the object out to a flat file in whatever format it chooses. The object doesn't need to know anything about that. It's store() method can simply pass its 'this' pointer to the storage adapter, and that then deals with all the twiddly bits.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Narue gave a good explanation of the problem. If you don't want class derive to re-implement both functions, you should be able to do this:

class derive : public derive2, protected derive3
{
public:
    derive();
    derive2::foo;
    derive3::boo;
};

That tells the compiler which terminal version of the function(s) to use.

Just a final comment about this sort of multiple inheritance scenario - avoid it at all costs! You will find yourself dealing with tonnes of gnarly bugs, and if building on multiple platforms or different compiler versions, subtle issues with those as well. Remember the KISS principle. It definitely applies here!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you had to ask the question here, then it is already too late... There are a number of "Dummies" books for Linux, the BASH shell, etc. However, I have been managing and developing software on Unix/Linux systems for about 30 years, and I can't keep up with the changes. It is a continuing education. In any case, you need at the least to attain some mastery of shell scripting, cron, system and network services configuration, file systems and data storage, security, not to mention the hundreds of system applications that you will be using in those scripts, or at the command line. Finally, do get comfortable with reading the man pages, and find an editor you like so you can document what you learn as you learn it - writing things down helps fix it in memory, and gives you a searchable data base for stuff you can't quite remember how you did the last time. You won't need it so much after awhile, but it helps at first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

how do i get the python modules to run in ms vista environment?

You need to install python, which is freely available on the web, and there may be other dependencies as well. I don't run Vista except on client systems when they haven't yet upgraded to Win7... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think Dev C++ is usually for C++ not C thought I am not sure

Please correct me if I am wrong

Given that C is a subset of C++, it should work ok. I'm not familiar with it, however.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ubuntu is good. They have what is called a Live CD and/or DVD which you can use to boot your system for recovery purposes.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Multisets are the same as sets, except that they can have multiple instances associated with a single key. They are templates, as you know, but the signature of multiset is not multiset<T>, but multiset<Key_Type, Value_Type, Key_Allocator = Allocator<Key_Type> >. IE, you need at least 2 template arguments when declaring multisets, as in:

multiset<double, double> my_double_mset;
multiset<int, int> my_int_mset;

So, if you wanted a multiset that is keyed on the number of instances of a string, you could do this:

multiset<unsigned, string> counts_of_strings;

Kind of silly examples, but hopefully you get the point.

Doh! I think that was a "senior moment" - thinking of multimap<KT,VT> instead of multiset<T>... My bad - and sorry for the confusion it may have caused.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are plenty of Windows editors, plus open source development environments such as code::blocks and eclipse that you can use which have built-in code editors.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. With appropriate compiler platform symbol definition, I got it to run, but it still has an error in that the encrypt/decrypt operation miscompares. IE, the plaintext that is encrypted and then decrypted does not end up the same. I haven't gone further than that, but it could be a simple matter of how certain string characters are interpreted in MS operating systems vs. Linux/Unix systems. I don't know for sure at this point. Also, the twofish-cpy.zip file I pointed you to has a couple of python modules that have to run in order to built that version, and it doesn't work on my system. So, at this point I am going to get lunch...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

His code is a VERY old reference implementation. I was just checking it out on my Linux system, and it requires some work to function in my environment. There are links on Schneier's TwoFish web page to other implementations that may be better to try. There are also open source encryption tools that utilize twofish, though the ones I found are either Delphi or C# code bases. Here is a link to one I found on Schneier's twofish page that might work better for you: http://www.schneier.com/code/twofish-cpy.zip

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming your system is running Windows of some sort? For a free one, you can get MinGW, which is a GNU compiler implementation for Windows. Look at www.mingw.org

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Why not use system() command instead of exec() to execute the CGI program? IE:

system('/Applications/MAMP/cgi-bin/rotate.cgi ../logs/access.log');

Also, I notice the '?' after the command string, and no space before the '../logs/access.log' part. Possibly there is an error here? Finally, the bkfile variable is using '../../logs/access.log' instead of '../logs/access.log'. Was this intentional, or another typo?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can download a recovery and/or live CD/DVD from the distribution web site for your version. When you boot from the CD/DVD, login as root. Then you will create a mount point (directory) for the system / directory, such as: mkdir /mnt/rootfs

Finally, you will mount the root file system, assuming it is the 3rd partition on the system drive, as: mount /dev/sda3 /mnt/rootfs - at this point you can access your shadow password file (a text file) which would be /mnt/rootfs/etc/shadow

In any case, get the recovery/live CD/DVD, get to where you can boot up and logged in as the root user. Then we can help walk you through the process in detail.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

DVI is just an interface. You really don't need to concern yourself with that. It is the video card (physical or virtual) that you need to communicate with. For VirtualBox, using VESA API's in the client would be appropriate, or normal system graphic API's, such as Qt, OpenGL, DX10, etc.

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

FWIW, DLL's are "Dynamic Link Libraries". They are NOT suitable for static linkage. For Windows, you need to link *.lib files, not *.dll files... They may reside in directories other than where you find the .dll ones.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, how/where does your result generate incorrect results (other than that they differ from what your teacher provided)? We aren't going to solve your school problems. So, look at the output, and determine where in your code the error (if there is one) occurred. That is your first step.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The problem isn't with OpenGL - it is just an interface to display stuff on the screen. Calculating the vector is the main problem. That is simple calculus or vector algebra. Refresh your math and go from there!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Usually these systems have some sort of boot error indications in the audio beeps. Do you hear anything out of the system speaker (not external ones, but one built into the system enclosure)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

RAID just protects from drive failure. Not controller failure, unless you also have redundant controllers! In any case, RAID-1 is just mirroring - no redundancy. You have two drives with the same data. If one failes, the other contains the data. However, some other types of problems can corrupt both drives. RAID-5 is better, since it incorporates striping and distributed parity blocks. IE, in an array of 4 drives, for example, any single drive can fail, and the others can be used to reconstruct it. It is more resilient to other sorts of failures. So, in your case, if you had 4 drives, you would have 2 + 2 drives mirrored. If you want complete mirroring with recovery possible, then I recommend RAID-10, which is mirroring with striping and distributed parity - sort of double redundancy.

Here is the wikipedia article on RAID: http://en.wikipedia.org/wiki/RAID

rch1231 commented: Well written and accurate. +2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming you are running Win7? Have you tried the same with a live Linux DVD/CD to see if it may be OS related?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Quote: If you don't ask, don't expect an answer! :-) You asked, you were answered.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show the actual PHP code you are using to execute it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Effectively, not possible! Linux/Unix passwords are encrypted with (at the minimum) with 56-bit DES encryption, and they are one-way encrypted (no way to determine plain-text from encrypted version). My suggestion is to boot with a recovery CD/DVD/USB drive, mount your root file system, and set the user password to blank in /etc/shadow. Then boot, login (no password needed) and reset the password.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, some indicator of either compilation or linkage or runtime errors would be appropriate, before you ask us to analyze a 200+ lines of code program.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You expect people in their spare time to analyze this much MIPS assembler code? Wishful thinking, I do believe... :-) Try to be more direct as to where you are experiencing a problem. In any case, since you are experiencing a word alignment error/exception, look at where you are placing non-char elements in memory. Generally, non-char values have to be word-aligned, which in the case of most MIPS systems, would be on a 32-bit boundary.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Aren't you commenting out initialization of the DS register? As far as I remember (from my last x86 assembler coding work around 1990), if you don't initialize DS, then it is set to CS. Sorry that my memory is so spotty about this. I was just looking at my old x86 User's Manual (from 1979) to refresh my memory of all this... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Somewhere on my bookshelf, gathering dust, is an original Intel x86 manual. Back then, they didn't have the 32-bit and 64-bit instructions. 16-bit only... :-) Anyway, it was compliments of my college buddy, Bruce Ravenel, who was one of the principal architects of the x86 processor at Intel back in the 70's.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

ASCII digits can simply be converted to integer binary numbers by subtracting the character '0' from them.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This appears to be, at first blush, a simple xor substitution/rotation algorithm. Simple stuff. You solve it... If this is from commercial software, I have to think there is more to it than this, unless they are trying for "security by obscurity" - the key is in the "key". If you have the key, and know the algorithm to transform the plain-text, decryption is (at least for symmetric keys) trivial. Read Bruce Schneier's book "Applied Cryptography" if you are interested in this stuff.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A couple of (or a few) questions:

1. What video hardware (video board) are you using?
2. What kind of display?
3. How are you trying to program the display?

Modern cards are 24-bit or 32-bit color capable. There is a standard api interface that most all modern cards support called VESA. If you aren't using a card more than, say 15 or 20 years old, then they have VESA support, which will handle 24-32bit color pallets quite nicely. NO ONE uses VGA direct framebuffer I/O any more except possibly for raw console/BIOS output.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You also might want to check out these two wikipedia articles, and some of the links they provide:

1. http://en.wikipedia.org/wiki/CPU_design
2. http://en.wikipedia.org/wiki/Stack_machine

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Showing the output of your code isn't particularly helpful. Please state the algorithms you are using, in detail (functionally). You mention stuff like "revised simplex method with LU decomposition", but you don't show specifically how your are applying these abstractions. Show the math...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What venomxxl said. Adding to that, in the days before C++ (some of use were doing complex C software development in those dark years), we still understood abstractions, and keeping the association of processing functions close to the data they were intended to process - sort of the antecedent of OOP and C++, and we would do just that, create data structures with pointers to the functions used to process that data. It was clunky, but it worked. Stuff I wrote like that in the 80's still is in use today by industry and the military.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Using (int)sqrt(n); as a divisor (for your modulus operation) is not a good idea, since it will cast away the fractional part, resulting in an invalid result. There are other issues as well, but this is a start. Myself, I do some short-cuts (anything ending in even number -> reject, anything ending in 5 -> reject, resulting in reducing your search space to 4 in 10). Anyway, check out the wikipedia article on the Sieve of Eratosthenes for some good information.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

School problems/exercises don't get simple answers - you have to make an effort to solve the problem first yourself before we will chime in with corrections, hints, etc. Please read the terms of use for the forums. It explains this clearly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are at least 2 you can get. One is for the Cygwin Unix/Linux environment and requires the Cygwin runtime support. The other is MinGW. Below are their web sites where you can freely download them and get appropriate documentation.

Cygwin: www.cygwin.com
MinGW: www.mingw.org

They both work well. I used to use cygwin for Linux/Unix development on my Windows workstations (I only use Linux and Unix for that now). MinGW is more appropriate for cross-platform development where you want to deliver Linux applications on Windows to people who may not want to install the cygwin runtime.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please post the compiler/linker output here, at the very least.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Normally you would put the input device (stdin for C or cin for C++), and preferably use the POSIX termios functions to set the device into raw (unbuffered, unmapped) mode. That would normally be the tcsetattr() function. On Windows, if you don't have the POSIX libraries and headers installed, there are similar, but different functions to put the standard input port into raw mode so you can get the actual data generated by a keystroke.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Multisets are the same as sets, except that they can have multiple instances associated with a single key. They are templates, as you know, but the signature of multiset is not multiset<T>, but multiset<Key_Type, Value_Type, Key_Allocator = Allocator<Key_Type> >. IE, you need at least 2 template arguments when declaring multisets, as in:

multiset<double, double> my_double_mset;
multiset<int, int> my_int_mset;

So, if you wanted a multiset that is keyed on the number of instances of a string, you could do this:

multiset<unsigned, string> counts_of_strings;

Kind of silly examples, but hopefully you get the point.