rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are a number of good text books on compilers (and building them) - I have at least 3 or 4 on my bookshelf; however, this is not a beginner-level subject. There is some good documentation on the GNU web site, especially as related to the GCC (GNU Compiler Collection) tool set. Go to www.gnu.org for more details: http://www.gnu.org/software/gcc/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In case you are enterested, my organization uses sha256 to encrypt user identifiable browsing information in our cell phone proxy browsers. These are one-way hashes, and make recovering data about a specific user very difficult. We are considering moving to a sha512+salt hash to make them pretty much un-encryptable, even with modern brute-force tools and tonnes of processors.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

MD5 is popular because it can be implemented small and fast. Better ones are SHA256 and SHA512 hashes, which can be implemented pretty efficiently in todays' hardware. In any case, adding a salt value to permute the hash of a string is always a good idea from the security perspective.

So, for a simple file checksum, md5 is very good, and will very rarely generate a collision (if ever), but for speed, the old cksum tool is much faster for big files (like video files of 1+GB size).

FWIW, md5 check sums are 128 bits in size, sha256 are (duh) 256 bits, and sha512 are 512 bits.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do they also come with the world's smallest violins? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go to the Gateway web site and get / reinstall the touchpad drivers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Rule one - never accept unsolicited phone or email contacts with people you don't know.
Rule two - see rule one...
Rule three - keep your A/V and malware detection software updated.
Rule four - only use known suppliers for A/V and malware detection software.
Rule five - sometimes all of this doesn't work to keep you safe - make a backup of your system on a regular basis, and your data.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As Senior Systems Engineer responsible for performance engineering at our numerous world-wide data centers I have a little expertise in this domain. The first thing you need to do is to determine what performance metrics are applicable for you. The next thing is to capture that performance data in a time-series database for analysis. Then you will be able to apply good mathematical and engineering principals to analyze that data. Trends are what are most important, as they will help identify switches and NICs (network adapters) that are starting to fail - dropped packets, queue length, latency, etc are all important factors to measure on a continuous basis, especially at times of high network utilization.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

All phones have security vulnerabilities. As for security risks, I think that the most robust phone OS out there is probably the new Blackberry 10 (QNX) operating system. It comes down to teaching your users safe usage of their phones - such as which apps they can install and use, keeping the system updated (enable automatic system updates), etc. This is still not a panacea, but it will help minimize the exposure your organization faces.

As a disclaimer, I am a senior systems engineer at Nokia Mobile Phones, and use Android, Windows, and Series 40 phones. I have also been a QNX developer since 1982 (I own QNX serial number 0004).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ah! Serious beginner C++ programmer errors. Reference variables are much like pointers, but you can declare them as const, and thus refuse the called funtion from modifying them without going through some contortions (such as explicitly casting them as non-const). The issue is your intention. If you WANT the called function to be able to modify the contents of the object, then pass them as non-const, otherwise, a const reference is preferable. For C++, passing variables as pointers is usually not recommended. Example (from your source):

void class::b(int& MyIntRef)
{
    MyIntRef++;
}

void class::a()
{
    int MyInt = 5;
    b(MyInt);
    //MyInt now == 6
}

Clearer now?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Average:

total = 0;
for (i = 0 i < N; i++)
{
    total += array[i]; i++)
}
avg = total/N;

You get to figure out the coding errors... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just stating that you have a compiler and/or runtime error is not too helpful. Please post code, compiler errors, and other compiler/make instructions.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Found my old 8086 manual - still looking for the 8085 manual. Not sure how long it will take to dredge it up from the basement... :-)

FWIW - you may find this documentation on the Intel web site. They keep a LOT of this old cruft around.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is anyone still using 8085 chips? :rolleyes: I haven't since the mid-1980's! I think I still have an 8085 reference manual on my bookshelf somewhere. Let me look and I'll get back to you! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
void insertAtHead(void* p)
{
    void* ptmp = head;
    head = p;
    p->next = ptmp;
}
void insertAtTail(void* p)
{
    void* ptmp = tail;
    ptmp->next = p;
    tail = p;
}

Of course, this is the simplified view. If you don't have a pointer to the tail member, then you need to walk the list from the head to find it (where p->next == NULL).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What the others said is true, but (with Linux/Unix at least) you can store stuff in RAM using shared memory. As vmanes said, it is volatile, in that when you reboot the system, it will be lost; however, it will be available as long as the system is running.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Don't use goto statements (bad, bad, bad! except in very RARE situations).
  2. Using recursion (calling your own function from within your function) can be very useful. Computing a Fibbonacci sequence is a good example of this.
  3. Don't list ALL of your code here (340+ LOC is counter-productive). Instead, just try to show the code that you are having problems with.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

FWIW, this tutorial is complements of the US Oak Ridge National Laboratory, where Frank Oppenheimer et al developed the first Uranium enrichment program that led to the atomic bomb in 1945. Also, Frank O. was my college physics professor at the University of Colorado in 1966.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

:-) Good points Nathan! Tanmay, if you want to really understand random number generators, go visit http://www.phy.ornl.gov/csep/CSEP/RN/RN.html

It is the best tutorial I have seen regarding random number generators! I have been involved with this field for 30+ years, so I think I can say that without reservation!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do you know about compression algorithms? There are RLL (run-length limited) ones that work well with streaming data, and others, such as zip and similar ones (Lemple-Ziv) for data sets that are fixed in size. What have you tried?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Class assignment? Post your approach and some code and we may be able to help. What you have given so far is not so useful.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As per Agni - post compiler errors or what your problem is. Just posting 250 lines of code (more or less) is not usefull. Sure we could analyze it in detail - I'm paid $50USD+ per hour to do that just for my normal employment, and $200USD for consulting time (as a senior IEEE member). So, some explanation of your problems would be helpful, and encourage me to respond in kind... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

IE (per Eagletalon), post some code that you think will implement your requirements, and then we may be happy to critique/correct/criticize it! :-) I am paid a 6-figure (in US Dollars) income to do this - don't expect me to just give you my time if you aren't willing to put something up-front as well!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In this case, the answer is "it depends"... Some fonts are vector fonts, and others ware bit-mapped. IE, what you want to do is trivial with bit-mapped fonts (but not necessarily pleasing to view when expanded), but not easy to do with vector fonts (they are scaled when output).

I think you need to do some research into this domain before you try to build your own font-rendering functions. It is not trivial, and there is a LOT of literature available on the subject.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Dec - per your signature - water, water, everywhere! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a laptop? Many laptop WiFi devices are USB connected, even when they are internal. My Dell D630 Wifi card is usb, but internally connected.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I seem to be agreeing with deceptikon a lot lately! :-) That said, strtok() is not the be-all and end-all of string parsing. I tried it a long time ago when writing an object serializer/de-serializer and found out its limitations, ending up writing my own tokenizer that could handle such things as nested quotes, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not a good idea! Unless you have specific permission to do so, you will likely get a visit from some unfriendly people dressed in black suits...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A lot of video cards suck up a HUGE amount of power, that many systems' PSU (Power Supply Unit) is incapable of handling - often over 100 watts. You need to verify that your system's power supply can handle the additional load.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Personally, I only run Windows in a Linux virtual machine. I create a snapshot of the Windows "disc", and when I get a virus, I just restore the snapshot. Virus - gone!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is not an issue about free vs. commercial tools. It is likely that your commercial tools didn't handle read errors properly. This can also happen with free (open source) tools. In any case, it is wise to have multiple tools in your chest, just for such situations! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Local cellphones will do this as well when they try to connect to the local cell tower. Move all cellphones away from the computer as far as possible.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you don't have the original system password, then you need to do this:

  1. Wipe disc COMPLETELY. Boot from a live CD/DVD/USB Linux system - and then from a terminal command line window, run the command: dd if=/dev/zero of=/dev/sda bs=1M
  2. Create a new boot sector / partition table, or just go to #3 (it will create the boot sector / partition table for you).
  3. Install OS from CD/DVD/USB drive - I'd suggest you try a Linux distribution. It's free and will probably work better than Windoze - just my opinion.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, all of your links are invalid - not found (404 errors). So, please be more specific as to what you are curious about. There are a number of answers to this "question", depending upon what you are referring to.

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

At this point, if it isn't under warranty, just get a new computer. Just because the mobo is bad does NOT mean other stuff isn't also, such as the PSU, CPU, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What deceptikon said. Writing good serialization code is not simple, and just writing an instance of a class (especially if it has pointer data, or virtual functions) will not work as you would expect. As he mentioned, you can use pre-packaged serializers such as provided by the boost library, or you can roll your own. Some years ago I wrote an object serialization package that handled arbitrarily complex structures into a TCL-based wire format for a distributed system. It was a LOT of work! So, do some Googling and find a package that will work for you instead of writing your own, would be my recommendation.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Send the computer in for repair. It may be possible to find such a charging device, but the question is whether or not the xps ports are configured to allow that. You might want to connect with Dell Tech Support (they have a decent browser-based chat capability) and ask them if it would be possible.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I vote with Nathan. Create a base class with the behaviors (as virtual functions) you need, and then for each subsequent standard, all you need to do is implement the deltas with a new derived class. Using a reference or pointer to the base class, it will do what you need since the functions will be called on the implementing class (Std2003, Std2011, etc). So, the basic functionality won't need to change, and you only need to instantiate a member of the appropriate standards-based class.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To determine the behavioral changes in Oracle Reports from 6i to 11g, try reading the manual! There have been MANY changes in the years between these releases!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

2-dimension sort

  1. for each member of first element, sort second.
  2. sort each member of first element, and maintain order of second.

Enjoy!

And BTW, you have your rows (first element) and columns (second element) reversed! Your 3x4 array should be 3 rows of 4 columns, not the other way around... Think of it as a 2 dimensional array of x and y, where x is the row, and y is the column. You CAN do it the other way around, but it gets messier when you go beyond 2 dimensions and add a z (3rd) dimension... :-)

Getting back to the math - in reality it really doesn't matter, but your matrix[rowindex][colindex] is reversed from what you think it should be. Eyes crossing yet?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What deceptikon said! Make an effort, and we will be happy to critique it - otherwise I have a library you might be interested in! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Both of the popular cross-platform GUI toolsets have been mentioned - Qt and WxWidgets. I've used both on Unix/Linux/Windows and while very different in flavor, they both work very well. There are other tools as well, though a bit more low-level, such as GTK and such. Myself, if I want to write a full-featured GUI with C++ that behaves identically on Linux and Windows, then I use Qt - and my being an engineer at Nokia (formerly owner of Qt) has nothing to do with it - I do no GUI programming at Nokia - I am a systems engineer... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Class members are part of a class instance. Where they live depends upon where the instance lives. If you declare an instance of a class as an automatic variable, then it is on the stack. If you allocate it with operator new, then it is on the heap. See example:

void sumFunction()
{
    SomeClass anInstance;   // On the stack
    SomeClass* pToAnInstance = new SomeClass;   // On the heap
    .
    .
    .
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, you are 1/2 the way there. You haven't computed the change, and just output the cost. A bit more effort and you will solve this! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can set a timer to generate an interrupt. It will happily run until it expires. In your code for the quiz, if the quiz finishes without the timer triggering the interrupt, then you can cancel it. What OS are you programming this on? Some timer types are not supported by the MS compilers that are on Linux. If you need more help, just holler. If this is a class exercise, please try to solve it first (you at least now have a hint), and then we will help you sort it out.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And just an FYI, I wrote a library to handle arbitrarily large numerical data back on the 8086 in the mid-1980's, so I know what is involved with doing that! :-) I also had the 8087 math co-processor, and it could handle internally up to 80 bits of precision. I used that up to its limits, and then switched to software. Of course, one can use clever algorithms to maximize the use of the math hardware on modern systems, but I didn't have the time, and inclination, to do so at that time. It was just an experiment when I was developing serious prime factorization algorithms in relation to public key encryption that had just been published by RSA (Rivest, Shamir, and Adelman).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As AD said. On most modern systems, if you are running a 32-bit OS, a long int is 32-bits, and a long long int is 64. On 64-bit systems, mostly (not sure about Windoze - I run Linux) a long and long long both are 64-bits. You can tell by evaluating the LONG_MAX and LLONG_MAX macros.

So, if you want to evaluate REALLY large powers of 2, then you will need a specialized numerical library that can handle arbitrarily large numbers. I think that the boost library will do that for you. Do bear in mind, however, that these are slower than native libraries which will use the CPU's math hardware. They have to do the computations in software, at least after some point, and that is WAAAAY slower than hardware! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You haven't declared what the Do_Command type is. You can do this in such a case by adding before the definition of the class FOO_Factory this line:

class Do_Command;
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Where do you think it should be? Note that there are 7 slots in the array for the day of the week, but you are only stuffing one day. So, what about a loop around the "Enter Day" and the test output section?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How are you connected to the Internet? Is it through the switch, or does the desktop have a direct connection?