rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Don't know who/why the downvote, but I gave you an up-vote with comment (so to speak), which will leave you with more positive than negative points. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

P.P.S. Do you have a VOAM (Volt, Ohm, Amp meter)? I have seen some parts that had the wrong colored wires installed, and without being able to tell what that lead really was, you are toast!

These meters aren't expensive, but necessary when assemblying complex electronics. I keep one handy in my tool box.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

P.S. I was factory trained and certified as a computer tech by IBM, Apple, and others. My nephews, as teenagers, one of which is now the head IT guy for his county in California, decided to build a computer from parts, much as you did. They did so under the supervision of myself, and my brother-in-law (their other uncle) who is a licensed/certified TV/Radio broadcast engineer (he builds TV and Radio broadcast systems). It worked as designed when we turned it on, but there were a few things that we had to help them fix first. Just remember, printed instructions MAY be wrong - typos do occur! Having a basic understanding of electricity and electronics is useful. My grandson builds his own gear, but then he is an electronic genius who has been hacking electronics gear since he was 8 (he's 21 now). Now, he designes his own circuit boards to control drone aircraft of his own design and manufacture!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Disconnect external power.
  2. Verify that the internal power supply is properly connected, and grounded.
  3. Make sure all fan electrical connections are correct.
  4. Ditto motherboard, and disc drives.

One assumes you have a CD/DVD player so you can install the OS? The first sign that things are starting to work properly is the BIOS flash. You will need to enter the BIOS setup mode and configure it to your needs. Until you get there, you are SOL and need to verify what is/isn't working. FWIW, you can disconnect the disc drives (including CD/DVD drives), and the BIOS should still work if all the electrical connections are proper.

Don't worry about RAID and that cruft until you can at least get the basic system running and into the BIOS. Until then, you have a nice door stop!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Intel does understand chip design (my friend Bruce Ravenel was one of the chief architects of the 8086/8087 processor family there), so they could take the ARM core, and add some interesting cruft to make their chips stand out from the crowd.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Nothing new there, but informative for many people, I'm sure.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My laptop has an eSata port. I can connect an array with 8+TB of space to it without problem. Unfortunately, a lot of current laptops are moving exclusively to USB 3.0 ports and removing the eSata ones. Pisses the heck out of me! I need to get a net laptop, but none of the ones I am interested in have eSata ports without a USB -> eSata adapter.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

They's been trying to adapt the x86 family for mobile devices for some time, without a lot of success. ARM pretty much owns that business, but I think I heard that Intel may license the ARM designs. Since ARM itself doesn't manufacture anything (other than test devices perhaps), they wouldn't be in competition with Intel, other than graciously accepting the royalties paid for their designs! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Visual Studio has the means to create an install script (.msi file) for an application. Read the documentation.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Android development is Java with a different compiler and runtime (Dalvik vs. JVM). DotNet is totally different. If you are angling for an Android job after graduation, then I would strongly suggest that you do your project for that environment. There are Android emulators available from Google for both Windows and Linux operating systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Take the input into a char buffer and then allocate and copy it to a new buffer, which you assign to the struct. Also, since this is C++, you need to create a default constructor which will null the pointer and set the age to some sane value, such as 0. Remember, structs in C++ are simply classes where the default for member variables and functions is public. Also, create a destructor that will de-allocate the name buffer, otherwise you will end up with a memory leak! And this is not getting near to the need to reference count links to the buffer if you assign it elsewhere! :-) Have fun!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The dd application is running in memory, so it is altering it as you dump it. You might want to look into how the open source ClamWin virus scanner handles this issue when scanning memory for viruses.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The answer is simple: 2^64 - 1. Why bother with the loop?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Schol-R-LEA said. You certainly need to know the functions for i/o outputs on this system, and an 8051 cross platform compiler. I have such for my ARM embedded systems, but they can be quite different for other processor families. Do you have an 8051 emulator to run your compiled code, or do you have to move it to a target board (probably using JTag connections to do so)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Example (in a .cpp or .cc file):

void myHelloWorld(void)
{
    std::cout << "Hello World!" << std::endl;
}
int main(void)
{
    myHelloWorld();
    return 0;
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, itoa() is a non-standard C/C++ language extension. Don't use it. Normally for C++, you would use something like sprintf() instead, like this:

char tpid[33];
int numchars = 0;
numchars = sprintf(tpid, "%d", (int)Processes.at(pindex).pid);
if (numchars > 32)
{
    // sprintf() returns number of chars output, not
    // including the trailing null byte, so check for
    // more than 32 for a 33 char buffer.
    throw(overflow_error);
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have done this. Try VirtualBox, and install something like CentOS 6.6 or 7.1.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One common method is to create a bunch of virtual machines, each with its own IP, and partition the job to those. That is basically how we did it for Adobe's Email Campaign software, used by many major vendors for email campaigns - and no, they aren't spam, per se! And users can easily opt out of receiving those emails. So, if you are a Barnes and Noble customer, this is the technology they use to send out information about sales, coupons, and such to their many millions of registered customers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can remove the driver installation files and associated programs, probably without incident. The driver itself should be now part of the operating system, and required DLL's in the \Windows OS directories.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I don't think there is any current HDD over 2TB that will fit into a laptop. There are 3 and 4TB units, but they are 3 1/2" and thus too big to fit in a laptop.

Anyway, to paraphrase Star Trek - disc space, the final frontier!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are no discs of that size, but some file systems can support that size of array or multi-disc volume, such as zfs which can handle file systems of 256 zetabytes, and single files of 16 exabytes. Currently, the biggest single disc I know of is about 4TB, but I think that is in a format that won't fit into a laptop.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not as far as I know. You can declare it, but it needs to be implemented in some translation unit. It may be that one of the newer C++ versions (C++11 or C++14) may allow that sort of lazy coding, but it is, in my opinion (and as you discovered) a dangerous practice, and not portable to a lot of compilers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A static member variable is still just a static (global) variable, that belongs to a class. All static variables have to be declared and initialized somewhere in a translation unit - them's the rules!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Provide your code, errors, and problems, then we may help you. That said, we DO NOT do your homework for you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
def isValidFormat(str):
    if len(str) == 11 and str[4 and 7] == "_":
        valid = True
    else:
        valid = False

You are testing for an underscore and not a hyphen in this part of your code. Try this instead:

def isValidFormat(str):
    if len(str) == 11 and str[4 and 7] == "-":
        valid = True
    else:
        valid = False

You also have an error on lines 2 and 3. Do you see what they are?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

That code works except for the initialization of total and the loop limiter. An accumulator in this case is simpler than keeping a register of all the results, but there may be times when you want that information for more complex calculations.

This should work for you:

    Scanner Keyboard = new Scanner(System.in);
    System.out.print("Please enter your number: ");
    double userNum = Keyboard.nextDouble();
    double total = userNum;

    // Only do 4 iterations - the input userNum is the first item.
    for(int i = 1; i < 5; i++)
    {
        // Print previous userNum amount.
        System.out.println(userNum);
        userNum = (userNum/2.0);
        total += userNum;
    }
    // Print final userNum.
    System.out.println(userNum);
    System.out.println("your total is " + total);
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You really don't need to downvote a person who is trying to help you "learn to fish". What about my post didn't you understand? Downvoting should be used only when you think someone is totally out of line. I don't think I was.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I've never had a problem with Cygwin's gcc version (yes, it is a bit old - you might want to update so you are running gcc/g++ 4.x). Did you try MingW instead?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How are you using it? Also, have you declared "using namespace std;"? If not, then you need to prefix it with std:: as in std::cout << std::setw(width) << std::dec << value << std::endl;

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Add each new result to a vector (array) and then after the division loop, loop over the vector, and add each result for a final value. I leave the coding to you as a simple exercise.

noobjavacoder commented: sorry, but i cant seem to follow your directions. they're not clear. +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

From the department of sarcasm department: Windows 10 will be ready when Windows 11 ships... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Services can be disabled from autostarting in the control panel, and you can remove other auto-started applications by removing them from the Start menu's All Programs Startup folder.

cambalinho commented: thanks +3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you could find an older version of Acrobat for Windows and install it in Wine, that may work. I really don't know since I never tried it. I had a full installed version of Acrobat when I worked at Adobe last year, on Windows 7, but I don't know if you can still get it or are stuck with the cloud version.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
$ ./menu
Welcome to Johnny's Restaurant!!!
What would you like to order?
1 Plain Egg       $1.45
2 Bacon and Egg   $2.45
3 Muffin          $0.99
4 French Toast    $1.99
5 Fruit Basket    $2.49
6 Cereal          $0.69
7 Coffee          $0.50
8 Tea             $0.75

Please enter the number for your desired selection
or enter 0 to complete your order: 2  

Please enter the number for your desired selection
or enter 0 to complete your order: 3

Please enter the number for your desired selection
or enter 0 to complete your order: 5

Please enter the number for your desired selection
or enter 0 to complete your order: 6

Please enter the number for your desired selection
or enter 0 to complete your order: 7

Please enter the number for your desired selection
or enter 0 to complete your order: 0

Thank You for Eating at Johnny's!!!
Customer Check: 
Bacon and Egg   $2.45
Muffin          $0.99
Fruit Basket    $2.49
Cereal          $0.69
Coffee          $0.50
Tax             $0.36
Total           $7.48
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What diafol said. Mixing html and php like that is just asking for trouble. First, build up your output html in php classes and variables. Then when you are ready, output the data. You can take the data/age input from another page, and call this one with the data you need for display and other purposes. This may help: https://www.daniweb.com/web-development/php/tutorials/484310/why-you-dont-want-to-mix-php-and-html-directly-

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I think your table name is incorrect. You are using "item" for the table name and "ITEM" for the column name. MySQL doesn't care if a column name is upper, lower, or mixed case, so you have the same name for your table and column. Are you sure the table name isn't "items" plural? If not, then you probably need to rename the table.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Re. deceptikon - it works fine for me also on RHEL 6.6 Linux using the g++ version 4.4.7 compiler.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I wrote a widely used C++ sorted collection that used a modified qsort algorithm to implement an insertion sort, with head-tail optimization to deal with already sorted incoming data efficiently. The collections would remain sorted without additional work, and it was very fast for very large collections (100,000+ elements). Below is an example of some of the code I wrote for an options trading framework some years ago (2006). The original code was written some years before this, but was similar in most respects. I can't post that code here since it is owned by Applied Materials. This is my code, with no encumbrances. Use if if you wish - I can release it under an LGPL license if needed.

       virtual void insert( CT* pItem ) throw (NoMemoryError, InvalidArgumentError, DuplicateObjectError)
        {
            size_t locn;
            size_t where = findItem(pItem, locn);
            if (where != SIZE_MAX)
            {
                // Item has been found. Insert after other member.
                locn = where + 1;
            }
            Collection<CT>::insertAt(pItem, locn);
        }

        size_t findItem( const CT* pItem, size_t& locn ) const throw (InvalidArgumentError, MissingObjectError)
        {
            if (!pItem)
            {
                InvalidArgumentError err;
                err.setMessage(0, "pItem", "is nil");
                throw err;
            }
            size_t cnt = entries();
            size_t curr = 0;
            size_t found = SIZE_MAX;
            if (cnt > 0)
            {
                // Note: this will have to be adjusted to accomodate sparse arrays.
                const CT* pMember = 0;

                bool done = false;
                for (size_t left = 0, right = cnt - 1; !done; )
                {
                    size_t mid = (left + right)/2;

                    pMember = getPtrAt(mid);
                    if (pMember …
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

An example (of 3 perhaps) would be useful.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Adobe's cloud acrobat tools should deal with this just fine. Personal use is $12.99 / month subscription. Check on Adobe.com.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Quicksort is implemented in C with the qsort() function. It is fast, efficient. You aren't sorting in your code. RTFM... For C++/Java code, look here: http://www.algolist.net/Algorithms/Sorting/Quicksort

FWIW, you should be able to do this in about 10-20 lines of code. A bit more if you implement all the low-level stuff yourself.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Some of the new mock tools are useful for unit testing software. I would like to see more of your "fuzzy" methodology that uncovered these bugs. Code is good...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The Boost libraries support arbitrarily large (and arbitrary precision) numbers. This is not available "out-of-the-box" for systems, which is why that Boost does provide this. Note that Boost was originally written for scientific computing where this was a needed capability. IE, if you want to estimate the # of protons in the universe, you need to have the ability to deal with REALLY big numbers! FWIW, the Boost Multiprecision library supports numbers up to 1024 bits by default. An unsigned long long is 128 bits, so you can represent numbers up to a power of 8 larger than that.

Here is an article about the MP library: http://www.codeproject.com/Articles/588385/Boost-Multiprecision-Library

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Homework? Sorry, but we don't do it for you. This information is easily available with a simple Google search on the Internet.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a great wikipedia article on the approximations of PI: https://en.wikipedia.org/wiki/Approximations_of_%CF%80

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. We don't do your homework for you.
  2. See #1
  3. See #2
    .
    .
    .
    Post your work, errors, problems, etc and we may be able to help.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

XP refuses to die because it is a zombie! You cannot kill a zombie - it is already dead...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Ports 443 and 80 are HTTP ports. Do you have any other web server running on your system? They would use those ports, possibly causing this problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Sort the array (qsort works well for this).
  2. Iterate through the sorted array and keep the pointer and incremented count in a separate array (one entry for each string). When the string changes, add the new one to the counter array with a count of 1 and then increment for each copy until a new string is encountered.

You will end up with a sorted array of strings, with the count of instances found for each. You can do this without sorting the original array, but then you will have to look up each element in the counter array which is much more expensive time-wise than sorting the original array in the first place, especially if it is quite big.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Intentional programming. Always do what you intend. NEVER depend on some other service to do it for you if at all possible. Not explicitly returning 0 at the end of main() in a C++ program may not be technically necessary, but it IS being lazy! And in my 30+ years of experience, lazy programmers cause a LOT more problems than those who are thinking about what they are doing, and act accordingly.