rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you have a licensed installation disc, you can easily create an iso from that. If not, then you need to get one.

knives67 commented: thanks a lot for the reply.. :) +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@sdtelchi - which is evaluated in what order when the operator precidence is the same is up to the compiler. This can vary - I have experienced this when using compilers other than GCC. I think my post was worth a comment - not a down vote! In any case, it is definitely a situation where caveat programmer... Always state it the way you mean it. After all, your intention could have just as easily been this: per=((m1+m2+m3+m4+m5)/(500*100); - totally different result. Remember, some compilers parse left to right, and others right to left. This is why the parens are so important. MAKE NO ASSUMPTIONS!

ddanbe commented: So true. +15
sdtechi commented: Yes you true rubberman..thanks +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The CPU is only part of the equation to build a good gaming system. This CPU is a good one, but the motherboard, memory, cache, I/O speed and bandwidth, video processor(s), power supply, disc drive (SSD vs. HDD), and many other things factor into the overall success of the system.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If it is locked, and you don't have the unlock code, then it isn't your phone... Sorry, no help here!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This line: per=(m1+m2+m3+m4+m5)/500*100; means that per is equal to the sum of the inputs divided by 50000. It that your intention? Or is it to divide the sum by 500 and then multiply that result by 100? If so, then the expression should be (since C/C++ treat multiply and divide operators with equal prescidence) per=((m1+m2+m3+m4+m5)/500)*100;. You need the parentheses to force the order of evaluation.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

"Java is to JavaScript as Car is to Carpet."

Myself, I would reverse the nouns, as in

"Javascript is to Java as Carpet is to Car." :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Adobe has been working on patching Flash Player to eliminate these issues. In fact, I just got an update for that on my Linux system this morning. Yes, there are vulnerabilities in any software - that is the nature of the beast - but responsible companies will attempt to deal with them as soon as they are informed of them. Yes, most could be more pro-active, but sometimes even with the best people and intentions stuff is missed that malware writers catch.

Disclaimer: I am an Adobe employee. We use Flash extensively in our work, so fixing these problems asap is in our own best interest.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The usual answer is "it depends". Laptops typically use a 2.5" HDD sata drive format. You can install a large (up to 1TB at least) HDD or SSD in place of the SSD that is provided, but you will have to re-install the OS, which if Windows means that you will need to purchase the system with full Windows installation media as well (probably adds something to the cost).

That said, some vendors require that the on-disc controller have a code that is proprietary to them, which means that you would have to purchase a different drive from them, at grossly inflated prices, instead of one from "CheapComputerGear.com".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Viruses that infect a virtual machine should only affect that virtual machine, unless it has some network connection to the host that can let the virus propagate to the host (rare). If your host is Linux, and the VM is Windows, this is unlikely. I use VirtualBox for this sort of stuff, and keep a current snapshot of my Windows VM. If it gets infected, I just roll the image back to the snapshot - voila! No virus!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To see what is going on, before line 8, put in a printf statement that will output i and j. That may help you see the behavior of the algorithm. IE:

    int i = 1;
    while ( i < 10 )
    {
        int j = 10;
        while ( j > i )
        {
            j--;
        }
        System.out.printf("i == %d, j == %d\n", i, j); 
        i += j;
    }
    System.out.print(i);
JamesCherrill commented: Exactly! That's how to understand it. +15
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

C++ is derived from C, and is fully compatible with C code. It has added classes, templates, references (vs raw pointers), and a number of other advanced programming features that allow you to write very complex programs much more quickly and with less code that it would require in C. As it is, the original C++ was a pre-processor for C, and C++ code would be turned into C code for the C compiler. That was the standard when I started programming in C++ in the early 1990's some 25 years ago.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

After pulling the battery, hold the power-on button down for at least 10-30 seconds in order to drain the CMOS-Flash memory charge. Just removing the battern is insufficient. Also, some systems actually require shorting out a couple of terminals on the motherboard. Some HP systems require that to discharge the CMOS. My attorney gifted my grandson an HP laptop that was so locked. After removing the battery, he took the cover and keyboard off, shorted out the contacts, and then was able to install Windows 7. Took him all of about an hour to have Win7 up and running. He uses the system to run high-end circuit design tools (retail value, about $50K - he got a legitimate license from one of his clients for work he did for them). I'm a computer geek. He is an uber-geek! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Everybody has a bad day from time to time. Common questions are often similar in form... Give the dude a break! And Ahmad, this is NOT a pathetic site, but your question was pretty "basic" to put it nicely...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And don't forget to stick your tongue out and flap your arms vigorously while you reboot!

Sorry, I couldn't help myself after these other responses! Do let us know WHAT you need help with. We are not mind readers, but we will do what we can to help you if you let us know what your problem is.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One is positive, the other negative. Positive and negative charges attract each other. Spyware helps sell antivirus software. Bingo! No spyware... No antivirus! Myself, I run Linux on all of my personal systems, and Windows only in a virtual machine. I have never had an issue with spyware/malware on Linux. Too frequently on Windows. Fortunately, I can rollback my Windows virtual machine image to the last snapshot after being infected and immediately remove the infection.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Dell makes some nice laptops for this use. I prefer them to HP because in my experience they have been better at support. Given that my last Dell laptop was purchased in 2006 (9 years ago), my experience is not current... :-) One thing they do provide is an extended warranty from the standard 1 year to 3 years for a nominal $99 or thereabouts. Worth every penny!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My wife is a staff physicist in the computing division of Fermi National Laboratory, doing serious software development for high-energy physics research. Her development systems are Macs, but the code she writes has to be cross-platform to Linux and Unix as well. The GNU compiler, Clang, and such are all available for the Mac, which under the covers is running BSD Unix.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It is kind of like asking "What is the difference between a Yugo and a Ferrari?" They are both cars. They can take you from point A to point B. One is inexpensive and slow. The other takes a lot of expensive maintenance, but will take you from A to B a lot quicker!

Ahmad Imran commented: the difference i was wanting +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Suzie999 says. Don't ask stupid questions until you have exhausted standard search tools...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What ddanbe says. For #2 you need to change the language to Norwegian so it will deal with the extra letters, accents, and such.

ddanbe commented: still have to learn to express myself better :) +15
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, most current processors support process segregation, but the OS has to utilize it. Most do these days, including Unix, Linux, and Windows (since Windows 2000). You don't want processes to be able to access memory and other resources in other processes as that would allow them to, accidentally or otherwise, corrupt those processes.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Networks don't usually crash unless a switch, router, or proxy server goes down. If a switch fails, then all the systems connected to it will not be accessible and they will not be able to access the rest of the network or the Internet. You can install more than one network interface on your servers and have each connected to a different switch to eliminate this point of failure. If a router fails, that is a bigger problem. If you have set up multiple network interfaces (NICs) on your servers, then each can be routed separately, resulting in redundant routing services, solving this problem also. Proxy servers likewise can have backup systems to take over if they fail, and your NIC's can be directed to different proxys if needed.

In any case, it is better to be proactive and monitor your network services to be sure they are healthy, and if they start to degrade in performance, schedule a replacement before they fail. This is not a simple issue. It was what I was doing at Nokia before the Microsoft take-over, developing tools to perform predictive analytics to determine when systems and services were starting to fail, but before they would fail.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Nobody really gets this correct. Microsoft certainly doesn't get it right, and Linux engineers are not much better. There are too many factors such as system load, I/O loads, disc read/write speeds, is the source file on one disc and the target on another or the same disc? What are their speeds, buffer sizes, etc. You can get the actual size easily enough, and let your progress bar show the actual percentage of the file that has transferred. After some has been moved, you can start estimating how long it will take and show that in a window with the progress bar. That is how most do it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Re. Antone068's suggestion. Caveat user! I know nothing about this tool (DriverTuner), and it may well be malware. Only install it if you are confident it won't mung your system!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I write quite a bit of Java, and learned about it from the inventor, James Gosling, back in 1995 I believe, at a Boston IEEE Conference. I even got an "official" Java coffee mug from him! Personally, it is a PITA! The standard garbage collector sucks, and the lack of multiple inheritance makes complex class development an impossibility. Using interfaces intead of multiple inheritance requires that each declared function be implemented separately in each using class. This is just so stupid (my opinion)! In any case, it becomes a point of error generation.

So, in my not-so-humble opinion, learn the basics of object-oriented design (UML), C++, and then Java. After the first two, Java will be trivial! After all, in my opinion, Java and PHP are just C++ with training wheels! Of course, all the support libraries and tools are another issue, but the basic language is not very difficult once you have learned C++ to any reasonable degree.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A vpn connection basically makes your system a peer in the network you have connected to. You will be using its DNS servers, LDAP (Active Directory) servers, etc. Even your IP address will change. All network traffic, authentications, etc. will go through the office network. You need the appropriate VPN client, and credentials to connect. Once you are connected, your systems should behave just as though it were in the office.

So, I think you are over-analyzing this scenario. I use VPN's on a daily basis. Since I work from home, and my company network is hosted 2000 miles away, when I connect to the VPN, I have automatic access to all of the company resources behind the firewalls. Sometimes I need to connect to a client VPN, so I disconnect from the company VPN, wait a few seconds (or a minute) to let my computer re-establish its local identity, and then I connect to the client VPN. At that point I am a local machine on their network. Some VPN clients allow you to connect seamlessly to more than one network at a time, but that is uncommon.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a situation where "I told you so" is correct, but not particularly helpful... IE, NEVER install new OS versions directly on your system. This is what virtual machines are for! If they mess up (they will, inevitably), then you can just remove the VM and files, and start over if desired.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

TCP is connection oriented, suitable for sending complete files. UDP is packet oriented, suitable for sending short messages. TCP will verify that all the data got to the destination, and in the proper order. UDP makes no guarantees. You will have to bake your own error recovery and retry logic.

In the case of a "media server", if a client connects to you via TCP, then you can send the data in a stream and not worry about it getting there properly, other than if something breaks the stream (network glitch or whatever). If you are just pushing out data, and let all the "listeners/receivers" get the data as desired, then you would use UDP - the receivers would need to deal with bad/missing data. With media that may not be a problem unless you have a lossy network environment. This is a "broadcast" environment, and TCP/IP does let you broadcast UDP messages to anyone on the network (LAN - broadcast packets usually don't travel outside of the local network), which the clients can listen for and receive. So, there are two real options for a media server. One is connection-oriented TCP streams where the clients connect to the server to get a stream. The other is where the media server broadcasts UDP packets to whoever wants to get them, kind of like radio.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

JorgeM is correct. In our home, I have two wifi access points w/ switches. The router/internet connection and access point is in my office in the basement. The other switch/access-point is in my wife's office on the first floor. They are connected via a power-line connector, which is just an ethernet cable that uses the home power lines for transmission (don't have to run a cable). It has worked great for 9 years now.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What have you done so far? We don't do your homework for you. Please read the terms of service (TOS) for this site for details.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you. Make an effort. Post the code here. And if it is an honest effort, we will help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

By default, deleting files on Linux systems will put the file/directory into the trash folder (works that way on Windows also). If you empty the trash folder, the files in that directory will be physically deleted. The reason for putting them there is that if you realize you didn't want to delete a file, you can recover it from there. Usually, the trash folder has a file number or size limit. When you exceed those settings, then the oldest files will be deleted first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Here is #3...

    std::cout << "*" << std::endl
              << "***" << std::endl
              << "*****" << std::endl
              << "*******" << std::endl
              << "*********" << std::endl
              << "*********" << std::endl
              << "*******" << std::endl
              << "*****" << std::endl
              << "***" << std::endl
              << "*" << std::endl;

Just pure C++ code!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I like it Moschops! Keep it simple...

fawadali commented: its not answer of my question +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

More complex == more comments. If you come back to the code in 6 months and wonder what the fark you were doing, then it wasn't commented well enough!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried using qsort(). It was made for this, unless your professor wants you to implement your own sorting routine.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The major problem that one must watch out for when using multiple inheritance is if more than one of the base classes are derived and one of their base classes is the same. Unless you use virtual inheritance, then you get two instances of that base-base class in each instance of the derived class, so if you make a call that is handled by that base-base class, which instance handles it may be unknown, and their state data may vary. Virtual inheritance helps assure that there is only one instance of that base-base class.

Used carefully, multiple inheritance is incredibly useful.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Scalar expressions such as the first is more efficient as every time you do some math (especially division) in your code, it adds overhead. The only advantage here is if you can reduce your search space. In the second expression, instead of n/2, use n>>1, which is the same as dividing by two, but just shifts a register, hence is likely more efficient in time. The only issue there is whether your processor instruction set will drop a bit that "falls off the end", or wrap it around. Caveat programmer! And do have fun experimenting with this stuff.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It may help to show your list structures as well. Also, this is very clumsy code and prone to logic errors. In addition, your lack of appropriate scoping (bracing) of your logic means that the return values are not what you think. Example, this code:

if (t->data == d)
    cout << "found" <<endl;
return true;

Will ALWAYS return true, even if it isn't. This is how it should be scoped:

if (t->data == d)
{
    cout << "found" <<endl;
    return true;
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

They are totally different animals! Thread-safe means that multiple threads in one executable image can run the same functions without interfering with each other. Re-entrant means that you can have a function that can be recursively entered even before the previous invocation has finished. This is common for recursive algorithms such as computing fibonacci sequences. This does not require a threaded environment.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The "./" means "use the current directory where your application is running". The dot is the current directory. If it was "../" it would point to the directory above where you are. If it was "~/" then it would point to your home directory.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

C++11 adds a lot of cruft to the older versions of C++ that will leave newbies' brains in a fog. In any case, C++ works with C code just fine. Learn basic C++ and utilize exceptions to handle errors. Use C in your C++ code when you need to get closer to the hardware.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not ever! Blu-ray is heavily DRM encumbered, and every purchase of a drive and/or disc puts $$ in Sony's pocket, who I will NEVER again support! Stick with DVD's. Yes, BR can provide higher resolution, but not enough to justify Sony's egregios anti-consumer behavior! 720p (DVD quality) is pretty darned good, even on HD TVs. So, just say NO!

My reason for this? Some years ago Sony delivered CD albums infected with a rootkit that bricked and/or infected millions of computers. Did they every pay compensation for this? No. Did they ever apologize? No. As far as I'm concerned, hacking Sony is a public service... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Since these systems are both behind your router/firewall, don't bother with SSH but enable telnet and FTP. SSH will require in some cases that your client is registered with the host account (login ID) that you are using, with its public key. Your client needs to use the private key so that the server can validate you. A PITA, but that's the way it works, which is why for local LAN connections I don't bother with SSH usually.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The "speeds" specified in the USB (and other device) specs are the maximum supported speeds. That doesn't mean that devices so attached are capable of those speeds. Certainly, most disc drives cannot support sustained speeds of either USB 2.0 or 3.0, especially for writing. Once the the internal buffers on the drive are full, it will fall back to the maximum write speed of the drive. Given you are probably using the same drive for both USB 2.0 and 3.0 tests, then the 23MBps speed you are seeing is likely the maxiumum physical speed that the drive is capable of.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

That's kind of like starting out trying to do PhD research when you don't even have a high-school education in the subject... Not going to work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Visual Stupido - please, just hit me on the head with a brick! There are MUCH better IDE's for Linux and Unix if you need. Even a good editor and Make are (in my mind) preferable!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assembly is direct-to-processor coding and totally not portable. It is only used these days to write processor-specific code for operating system low-level programming. My last assembler coding was about 25 years ago for x86 TCP/IP device driver code. Even since then most of my device driver code for systems such as Solaris, Linux, and other *nixes has been in C or C++.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just remember, the Internet forgets nothing! If this person is not willing to remove your posts from his computer (remember, they are also likely on other users' systems, not to mention backup devices for the company), then you know what kind of "friend" and/or "mentor" he really is. So, give it up, let your corresponents who you communicated with know that their mail with you has been compromised, and keep a stiff upper lip!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You might want to verify that all the RAM is being used. Some modern motherboards will disable a stick of RAM that is failing. Usually, it will require that the stick in slot 0 (the first slot) is healthy, and map out others if necessary. So, it is possible that swapping the RAM SIMMs helped.