1,075,645 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by rubberman Contributing to Articles being Marked Solved

It is likely that either your code is malformed, or that security protections prevent this from executing. IE, the string is in "string" space, but you are trying to exectute as though it is in executable code/text space. I'm not sure what you would need to do in that case. Is this for security research? Have you studied the appropriate processor and operating system documentation on how to do this? Have you tried changing the typing of your code[] array to const char* code = ...;?

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

Several problems.

  1. In struct reco, the money field is an int, not a float.
  2. You need to return an int from main() - at least for current compilers and systems.
rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

And FWIW, I have written numerous date processing functions over the years, in language ranging from BASIC to dBase II to C++ and Java date/time classes. They all properly dealt with leap years/seconds, days of week, etc. So, first convert the date to a Julian value. Then, the rest is simple math.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

Not wanting to go through all this code, I have one suggestion - use julian date values. There are standard expressions to take a julian date (either unsigned integer for y/m/d, or double float for y/m/d/h:m:s) and extract the day of the week, accomodating leap years, and even leap-seconds (if necessary).

Also this:

    if(day==911){
        cout << "The Program has Ended" << endl;
    }

should be this:

    if(day==911){
        cout << "The Program has Ended" << endl;
        return 0;
    }
rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

While Linux is not Unix, it is a Posix-compliant operating system, so most of what you learn about Unix is relevant. I have used both Unix and Linux (and related systems such as QNX) for many years. This is a good book - probably worth getting for general background information and knowledge. Kernighan was one of the original Unix developers at Bell Labs, and he was, with Dennis Ritchie, the author of the C language, still at the heart of most operating system development, especially Linux.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

You should be able to modify the tmpfs entry in /etc/fstab to add the option size=NN where NN is something like 20M, etc. Here is a link to a good article on the subject: http://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/

Note that tmpfs uses the swap file for storage, so make sure your swap space is big enough for your needs.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

What do you mean by "modify tmpfs? Where it is mounted? Please explain exactly what you are trying to accomplish.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

Correct! You can declare a common namespace in many source files / headers. The effect is cumulative in that in each case, the contained classes/symbols are added to that namespace.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

You say it won't start, but the reset button will force it to boot. Have you set your BIOS to output detailed POST (Power On Self Test) information when it boots? If you do that, you should be able to see where it gets to in the boot process before hanging.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

if ((courses < 4) && (courses > 6)) is wrong. You want to verify if the courses variable is between 4 and 6, inclusive, so it should be if ((courses < 4) || (courses > 6)). IE, use the OR, not the AND boolean operator.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

Please show more code. Your error indicates that you are missing some virtual function declarations. The vtable is the virtual function table. Since you aren't showing the derivation of your classes, it is difficult to help further.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51

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
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 51
 
© 2013 DaniWeb® LLC
Page rendered in 0.1576 seconds using 2.71MB