rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume this is a graduate-level program? And you are still clueless? What about "research" don't you understand? Don't ask us to do your work for you! This sort of research project is not supposed to be easy or simple, otherwise any schlub could deal with it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To repeat many replies in this forum - we don't do your homework for you - that is cheating (not to mention unethical). Make an honest effort to do the assignment and we will be happy to critique it, and point out errors that new programmers are likely to make (which you will certainly emulate).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The file /etc/resolv.conf (no trailing 'e') is controlled by your network dns settings. If you change it manually, the changes will only be in effect until the next update or reboot, unless you change your network settings to block that. Sorry, but I don't remember right now what settings need to be changed, but I know I have done that some time in the deep, dark past.... :-) Remember, Google is your friend!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can get jdbc bindings, native libraries, and source code for all of them from Oracle for MySQL.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Who am I? What am I doing here? What is this conversation about? :rolleyes:

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The time for any specific read/write function in a hadoop cluster and data node can vary significantly. I don't suppose you are running an industrial strength management tool like Cloudera on your cluster, are you? They do track those sort of metrics, and can alert you when they exceed specified limits.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to determine what the output of your power supply is, and the power requirements of the cards, motherboard, CPU, disc drives, memory, etc. A lot of systems do not have adequate power for what you want to do, so you may need to get a better power supply.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How did you burn it? Did you burn the ISO to the disc as a file, or as the complete image? It must be written as a complete image, and then you need to verify the disc checksum (md5sum is most common) to the iso checksum to be sure it was written successfully.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A good graphics library, available on just about every OS in use today, is Qt. It is system independent (works on Windows, Linux, Unix, QNX, and others), and very complete, handling threading very nicely. If you have to do it natively yourself, then you have a lot more work to do. Ask your teacher if they have any suggestions, or limitations, in the graphics API's you are allowed to use.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And please don't ask us to solve your school work for you. That is cheating, and not allowed by the TOS of these forums! Make an effort first, and we will be happy to help you find your errors.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Since this is in the subject "Shell Programming", I have to assume you are running some varient of Linux, and most likely the bash shell? Linux supports just about any character in a file name, including question marks. If an application wants to create a file with such a name, then it can (usually). The problem starts when trying to scan for these files in a bash script since question marks are wild card characters in bash. To match a real question mark, you have to "escape" them - preceed the question mark character with a backslash. The suggestion by rch1231 is not a bad idea. The rm command will ask you if you want to delete each file in that directory. The only problem is when there are a lot of files with those names. Given that Linux directories can easily contain hundreds, or even thousands of files, that could be quite tedious! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a very much artificial set of data elements, in that both the A and the B parts are in sorted order in your example. If that is indeed the case, then you can use a binary search on the structures to most quickly find either the A or B keys.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The world is going mobile. The most common language for mobile development is some version of Java (Android's Dalvek is a Java derivative - just a different virtual machine). C# is very much limited to Windows systems (the .NET infrastructure). My company does a lot of work with Windows mobile devices (phones, tablets, etc), and it still uses mostly Java for that stuff. So, I would advice a few things to study:

  1. UML for design and modeling of software.
  2. Java, Java Script, and WebApps for application programming on mobile devices.
  3. C++ and C for systems-level programming. I call Java C++ with training wheels... :-)

If you look at my profile, I have 30+ years professional experience in many aspects of software development, and my current position is as Senior Systems Engineer for a tier-one mobile phone company.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try downloading the package deb files directly from debian: http://packages.debian.org/squeeze/nasm and then use apt-get or dpkg to install them.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It sounds like this virus has also infected the boot loader. You will need to reinstall a clean MBR to this system drive. You can do that with EasyBCD (a bootable CD/DVD drive). Look here for more details: http://www.linuxbsdos.com/2012/03/10/restore-the-windows-bootloader-to-mbr-after-dual-booting-with-linux/

Once you restore the Windows MBR (Master Boot Record - or boot loader), you should be able to boot into the recovery partition. One word of warning however; I have seen some of these viruses also infect the recovery partition, so it will happily reinfect your system if you run it... :-(

When a client of mine gets this badly munged, then I take the drive out of the system, and scan it with about 3 different professional grade A/V/Malware scanners running on a Security Enhanced enterprise class Linux system and manually clean up the broken parts of the Windows system, restoring broken system files, dlls, etc. from a known-good Windows image. I also backup their user files in case we decide that a clean system re-installation is called for. I suspect that may be the case in your situation.

If that is the case, and we decide to reinstall from scratch, then we first do a complete wipe of the system disc, and reinstall from a Windows DVD. Sometimes we have to order the disc from the system manufacturer, or we install from a commercial DVD and download drivers from the system manufacturer after it is back running. The last thing we do is reinstall their user files …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

When it asks for you to set the date+time, did you do so? Some BIOS's won't let you go further until the clock is set. Also, some BIOS's require you to boot into the BIOS to change the boot device. My Intel motherboard works that way.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There is also a Win7 and XP tool that can restore the Windows MBR. The actual problems is that the Grub boot loader is looking for the grub configuration files in the Linux partition, which don't exist any more. So, if you boot directly to the Windows recovery partition, or from a Windows recovery disc, you can restore the MBR and Win7 will go back to booting properly.

Mike2k's suggestion about using EasyBCD is also a good one - you can boot it from CD/DVD/USB and restore the Windows MBR from that. Here is a link with instructions and helpful screen shots for that tool: http://www.linuxbsdos.com/2012/03/10/restore-the-windows-bootloader-to-mbr-after-dual-booting-with-linux/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. I missed your call to listen() in the code example. You are basically doing it ok, but you may want to increase your queue length (2nd arg to listen()) to some number bigger than one if you may be getting multiple connection requests at the same time.

Also, looking further at your code, this line:

while(buf !="exit")

Won't work. You need to do this instead:

while(strcmp(buf, "exit") != 0)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Oops. You listen() first (sets up the incoming queue length), and then you loop, calling accept() to get connection requests from clients. Sorry, my answer was backwards in the previous posting... my bad! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, for a server, you don't need to bind the socket, but you need to do an accept() before you listen() for connection requests. A client will bind().

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need the cups driver for that printer. Here is a link with instructions: http://www.iheartubuntu.com/2012/02/install-canon-printer-for-ubuntu-linux.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your standard repositories for apt-get/synaptic package managers should have the java 1.6 openjdk packages.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried the "Use CD as USB" option?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have att internet (DSL) also. When this happens, it is usually due to a problem with the trunk wiring in the neighborhood. Call tech support and have them dispatch a service technician to fix it. ATT support office people have tools to check the health of the link to your location, so they can tell if there is a physical issue (or other) to deal with. You know that old saw - the sqeeky wheel gets the grease! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just a style suggestion (one that will eliminate a LOT of bugs): use {} to scope ALL conditionals (if/else if/else) and loop blocks. IE:

int maxScore = 0, maxItems[3];
for(int i = 0; i < items.size() - 2; i++)
{
    for(int j = i + 1; j < items.size() - 1; j++)
    {
        for(int k = j + 1; k < items.size(); k++)
        {
            if(compatible(items[i], items[j], items[k]))
            {
                if(maxScore < items[i].getScore() + items[j].getScore() + items[k].getScore())
                {
                    maxScore = items[i].getScore() + items[j].getScore() + items[k].getScore();
                    maxItems[0] = i; maxItems[1] = j; maxItems[2] = k;
                }
            }
        }
    }
}
if(maxScore)
{
    printBestMatch(items[maxWords[0]], items[maxWords[1]], items[maxWords[2]]);
}
else
{
    cout<<"No matches found!"<<endl;
}

IE, don't be a lazy programmer! If one of my team did that (no braces), I'd rip them a new one - but then, they know better! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your work, and we will try to help. Don't show your work, and we assume you are trying to cheat... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

With the CPU cooler (verify that it is compatible with this CPU chip type) and the case fan, the cabinet fan is probably reduntant. Only get it is you can verify that the case has a mount point for it. This is a decent configuration to start with. Personally, I like Intel motherboards myself (I have a dual-cpu workstation board from them myself). For a few dollars more, you can get a 1TB hard drive instead of the 500GB unit you mention. Just remember my motto - disk space, the final frontier! :-) I also have created the disk usage law - data expands to fill available disk space, plus 10%...

I assume this motherboard has an Intel video controller and display port(s)? If so, then that is a good start; however, you will probably want to get a better video controller in the near future, especially if you want to run full-screen HD videos and/or video-intensive games.

Enjoy your new system!

P.S. Be careful about static. Don't just walk across a rug, sit down, and start grabbing stuff. Make sure you are grounded first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming that they both use the same video adapter type, such as DVI or vga, and your video adapter supports two of those types of displays, then you should be "golden". I use two slightly different monitors on my desktop (24", 1920x1200, DVI w/ nVidia 8800GT adapter), and except that the colors are just a little different (adjustment gets them close, but not exactly the same - a typical issue actually, even if the displays are "identical"), they work great!

That said, if your adapter supports 2 monitors, but one is DVI and the other is VGA, then as long as the monitors each support one of each, then that should work also. DVI is preferable to VGA from a performance and usability perspective.

aVar++ commented: Ok, that helped alot thank you. +2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your CPU, HD, and video card are likely the biggest current draws on your PSU. See what the load is (you can find out from the manufacturer's documentation). FWIW, if you are only running one of the DVD drives at once, then you will not likely have a problem. Running both may be an issue, if you were to use one to copy to the other, for example.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a usb device? Run the command-line command "lsusb" and post the output here. You probably need a driver for it. These can usualy be found on the site www.linuxwireless.org. The reasone we need the lsusb output is so we (and you) know the device chip set and device (manufacturer + device) numbers. Those are needed in order to determine what driver to use, assuming one is available for Linux.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

NP Mike. I've run into the "massively concatenated environment variable" issue before, even to the point of exceeding the maximum length of an environment variable. That's how I know about the problem! :-) You know that old saw - "It hurts when I do that!" - resp. "Then don't do that!"...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to understand C#'s implementation of the Reflection pattern. There are API's that should allow you to create and object via type name. I had to do this (create the class factory in order to create an object by name) about 20 years ago for C++. That way, when we needed to create an object using its name in a serialized image (TCL or XML wire format), we could do so.

Anyway, I've read articles on this about C#, and have read the code to do it with Java, but since I haven't don't more than simple C# programming I cannot tell you specifically how to do it. Here is a link to the MS documentation on Reflection: http://msdn.microsoft.com/en-us/library/ms173183(v=vs.80).aspx

What version of Visual Studio are you using? There have been a few changes between VS2005 and VS2012. The link above (including the v=vs.80 part) is for 2005.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please provide the full class definition (header file). This is not enough to really analyze your problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

All that said, I think that Eclipse CDT is a good tool, and if you need the hand-holding that an IDE provides, that is a great choice. I've used it in a number of collaborative development projects and it just works well. It is also cross-platform, so you aren't limited to Windows, which you would be with Visual Studio. If you are ONLY going to program in the Windows ecosystem, then VS may be a better choice.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm old-fashioned. I like a good editor such as nedit (any X-windows system), gedit (Linux), notepad++ (Windows), and make, plus a good debugger. I've used VS (many versions), and Eclipse (several versions), but they all get in the way of focussing on what you need to do, in my opinion. FWIW, I have been doing C++ programming for over 20 years, originally as principal engineer and architect for the company that wrote the manufacturing systems used by most semiconductor manufacturers in the world to run their FABs, and currently as senior systems engineer for a tier-one global tech company, I still use it extensively.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, please DO NOT ask us to do your homework assignments! Cheating is not an acceptable activity on Daniweb... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually Mike, you don't want to set PATH in .bashrc, as it is executed on each invocation of bash, sometimes resulting in PATH variables like "/sbin:/sbin:/sbin:/usr/bin:...". Path should only be set (in my opinion) in .bash_profile, or in a manually run script when you need to temporarily add a new link to PATH.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Look into the Linux nmap tool.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Time to send it on a trip to the repair depot. Go online and get an RMA from Gateway. If it is under warranty, they should provide a pre-paid return label for UPS or FedEx or similar. If it isn't under warranty, then you will probably have to pay for the shipping to the depot, as well as the repair costs. Usually these are not excessive as they replace the broken stuff (motherboard etc) with rebuilt units and then rebuild yours to factory specs. The one thing you will want to do is either fully backup your hard drive, or remove it from the system before sending it in. You can back it up by removing it, placing it in a docking bay ($25-$50 USD), attach to another computer, and then copy the data. If you cannot access the data, then the drive is the failing component.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Indeed, there are times when auditing is appropriate, especially with systems that have enhanced security requirements. This is why there are the SELinux extensions (Security Enhanced Linux) and implements access control lists, and such. You might want to look into that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

And your problem is?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sometimes you have to do this the hard way:

  1. Remove all binaries and directories for the "tool".
  2. Remove all registry entries for it.
  3. Reboot, and see if it re-installs itself.

If in #3 it re-installs itself, then you have more work to do. This may not be simple, and certainly a terrible waste of your time, but necessary.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

:lol: Didn't think of that acronym mike! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Personal opinion? Don't bother. It is not an infrequent event for people to try to access folders (directories) that they are not allowed to - often innocently. As long as it is blocked from them, then as the saying goes, "no harm, no foul".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We do NOT do your homework for you - that is cheating! Make an effort to solve the problem, post the code here, and we MIGHT decide to help you... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Huh? What do YOU mean by IP? IP == Internet Protocol || IP == Intellectual Property...
Please be more clear and specific about what you are trying to accomplish.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You don't show the definition of the default argument "shift".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do you know of this subject? It is non-trivial. Do some google searching for more information, and don't expect someone with this sort of specialized knowledge to just "impart" it to you. Also, if you go to the Matlab web site, you might be able to find packaged solutions for these requirements.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you considered that the tool may be truncating the xml file's lines? An xml file can be placed entirely on one line, but that does cause problems for some tools that have a line-length limit.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please properly and consistently indent your code. It makes it a LOT more readable. Also, use curly-braces to bracket the contents of ALL conditional code blocks. Failure to do so is a major cause of many bugs in the code of inexperienced programmers.