rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@ddanbe
They probably still use ADA for system-crital cruft, but also C/C++/Java. However, since I haven't done any programming for the USN since about 1992, I can't say for sure!

As a side-bar, the Oracle PL/SQL language was derived from ADA. From the Department of Obscure Tech-Geek Knowledge Department... :-)

Also, ADA was the first (an may still be only) US government approved open source programming language for military operational systems - not to say there were never ANY allowed exceptions to that. They made it open source because they wanted to be sure that all variants could be properly audited and verified as correct to the language definition. Oracle used it for PL/SQL because it was open and freely available without attribution (or payment). Our tax dollar$ at work! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to start the mysqld service: sudo service mysqld start

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I started my professional programming career in the 1980's. I was a sales rep at a computer store in the Silicon Valley, and one of my customers was looking for a commercial accounting program for his wholesale bakery business. He looked at everything we had or could get, and nothing would do what he wanted/needed. I had been doodling with dBase-II at the time and told him I thought someone could write a custom program to meet his needs. He said "Why not you?" I replied that I had never done anything like that before, but I did have a foundation in accounting (from running my own business in the past, and doing accounting at other firms). We agreed on a price, and payments staged upon progress. Several months later, after we had agreed on his requirements, he had his accounts receivable system (the most important thing to him - billing and getting paid from his customers). The main thing was that if the customer didn't understand the statements, they wouldn't pay... He was my client for the next 10-12 years until he sold the business. Later, I wrote both accounts payable and general ledger (double-entry) for him, and he was very happy with both.

So, I guess my point here is you learn best by doing and reaching beyond your current capabilities. It is not an easy process, but the rewards are high!

Good luck to you!

FWIW, one of his retail stores in LA was featured in a …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
  1. Boot to a live cd/dvd/usb drive.
  2. Do a bit copy backup of the data in /dev/sda and a separate bit copy of /dev/sda2 to another drive (an external drive would be appropriate). You use dd to copy /dev/sda, and then /dev/sda2. The bit copy of the entire drive is so if things go badly, you can restore the drive to the old image, using dd to copy the data back.
  3. Repartition with fdisk /dev/sda, removing /dev/sda1 and /dev/sda2 and then recreating /dev/sda1 to the full size of the disc. Then use the (w)rite command from fdisk to save the new configuration. Be VERY sure that the starting block of /dev/sda1 is exactly the same as it was originally.
  4. Assuming that the /dev/sda1 partition is any of ext2/3/4, then you can use the /sbin/resize2fs tool to resize the file system on /dev/sda1, expanding it to fill the new partition size.
  5. Mount the new version of /dev/sda1, loop mount the backup copy of /dev/sda2, and then copy the contents of /dev/sda2 to the new file system.
  6. Reboot.

For the bit copies, do this:

dd if=/dev/sda of=/mountpointofexternaldrive/sda bs=1M
dd if=/dev/sda2 of=/mountpointofexternaldrive/sda2 bs=1M

To resize the /dev/sda1 partition (after repartitioning the drive), do this:

/sbin/resize2fs /dev/sda1

To mount/copy the data from /dev/sda2 to /dev/sda1, do this:

mkdir /mnt/sda1 /mnt/sda2
mount /dev/sda1 /mnt/sda1
mount -o loop /mountpointofexternaldrive/sda2 /mnt/sda2
cd /mnt/sda2
cp -rfp . /mnt/sda1

BTW, you may want to save some space to create a swap partition unless you already have …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is wrong:

void largest::enter(int a,int b,int c)
{
    cout<<"Enter numbers n";
    a=num1;
    b=num2;
    c=num3;
    cin>>a>>b>>c;
}

Try this:

void largest::enter(int a,int b,int c)
{
    cout<<"Enter numbers a,b,c";
    cin>>a>>b>>c;

    num1 = a;
    num2 = b;
    num3 = c;
}

Assigning a,b,c from the member variables isn't the problem. Not storing the input back is.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Or,

    #include <stdio.h>
    int main()
    {
        char c;
        ::scanf("%c", &c);
        ::printf("You typed %c", c);
    }
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need a space between the variables here:
scanf("%d%d",&m,&n);
should be this:
scanf("%d %d",&m,&n);
otherwise it is not clear that the user needs to put a white space between the two values. You can mitigate that by specifying that in the instructions. IE,
"Enter order of matrix, as in 'x y' where x is the width and y is the height". Once they enter the order, then output something like this: "Now, enter the values of the matrix. These will be entered left-to-right, top-to-bottom."

Next, these lines should be bracketed in order to avoid "sophomoric" errors:

    for(i=1;i<=m;i++)
        for(j=1;j<=n;j++)
            scanf("%d",&a[i][j]);

/* Should be this */
    for(i=1;i<=m;i++)
    {
        for(j=1;j<=n;j++)
        {
            scanf("%d",&a[i][j]);
        }
    }

My final critique is that your code should be more symbolically clear in order for others to read and understand the intention of the code more clearly. IE, instead of variables m (assume height) and n (width), use the terms "height" and "width". Remember, "correct != good || clear"... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It almost sounds like the WiFi and USB port are using the same interrupt. I suspect that the WiFi is a USB device, and the other USB cruft he is using is connecting to the same internal hub. Have him contact Asus about this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How old? What CPU does it have? Yes, you can run stuff like VirtualBox on older systems without the CPU virtualization support newer CPUs offer, but the VMs will run slow and somewhat less reliably. The main thing is the number of cores the CPU has and even more importantly, how much memory. Also, remember that you cannot run 64-bit virtual machines on a 32-bit CPU. At least not that I would want to... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, if any of the intermediate directories don't exist, you can add the -p option to mkdir. IE,
mkdir -p /red5/webapps/openmeetings/upload/files

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@AD
True enough, but I do like consistency! I find that I make fewer mistakes that way, and IMO consistency is the root to reliable code. I've spent 30+ years (20+ with C++) writing code for ultra-high reliability systems, both embedded real-time and enterprise, where failure (bugs) can either cause a plane to crash, a factory to trash a gazillion $ worth of product, or introduce a fatal defect in a medical device or drug.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Backup? All images have been what? Modified? Deleted? What?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you getting an error? Have you properly unmounted the device (safely remove device on Windows) before removing it? Have you run chkdsk (Windows) or fsck (Linux) on the file system contained by the device? Have you formatted it?

As you can see, there are a lot of possibilities. Your question doesn't provide anywhere enough information to help you at this point... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Both AD & Mike2k's answers are good. I just have a small nit to pick with AD regarding proper use of member initializers in a constructor, rather than inside the body of the constructor. IE, instead of his example, I would do this:

    class Foo
    {
    public:
        Foo() : _x(0) {} // inline method
        void setX(int x) {_x = x;} // another inline method
        int getX() {return _x;} // another inline function
    private:
        int _x;
    };

IE, it is always prefereable to have your member variables properly initialized before the constructor is executed. It helps avoid a lot of buggy/invalid code in my experience.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@mehak70
Trying to hack WiFi routers? Sorry, not allowed to help you with that here... :-( If you are just looking for anonymous browsing, try Tor or other VPN services.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To my mind, the main reason to use class static variables and methods is to control the namespace, and keep what are effectively global variables from polluting the system root namespace. Decepticon was spon on with his examples, I think. IMO, class statics are more flexible than using specific name-spaces, although in effect they can be very similar.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Momerath gave you a great hint. Remember, we DO NOT do your homework for you! FWIW, it is also a variant of the "Traveling Salesman" problem. I think you have some research to do before attacking this problem. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you remove an SD card (or USB thumb drive, or other device) from your computer without doing the "safely remove" thing, you are likely to lose EVERYTHING on the device. The OS caches device writes, so until you select "safely remove", or on Linux "unmount/eject", the device will be seriously compromised. In your case, you will probably need to reformat the devices and backup the data again, and THEN select "safely remove" or "eject". If that device had the source data, then you will be into serious data recovery efforts. Not simple, but possible - maybe... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have one personal use program which will not run on Wine on Linux, and for which there is no Linux replacement. That is the ONLY reason why I still keep XP around, but only to run in a virtual machine! All of my other software is Linux or as in the case of my preferred software design tool, can run perfectly on Wine (the company that makes it made a lot of effort to be sure it could). I don't use MS Office except on my work system. At home (and at work) I prefer Libre Office. So, other than the fact that my stock/options trading software from Fidelity cannot run on Linux, I have zip, zero, no reason at all to continue to use XP. That said, I haven't checked to see if Fidelity's latest version of Active Trader Pro runs on Wine... :-) If it does, then goodby XP, and good riddance!

P.S. I even imported a bunch of complex Visio diagrams into Libre Office, and was able to edit and use them without problems! Visio does some weird shit with layers, but I was able to deal with that without too much effort.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you go to the command line window (terminal), you should be able to find the hidden files/directories with the command "ls -a". To search recursively, add the "R" (recursive) option, as in "ls -aR". That one will generate a LOT of output if done from the root directory (/), in which case you would want to do this: ls -aR / | less
If the "less" command doesn't exist on your system, then try "more" instead.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

YouTube basically (mostly) uses Adobe Flash media. It has been improved over the years (but is still, IMO, a piece of crud). Yes, can skip to wherever you want in the stream. I do that all the time.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you looked at the bookmarks themselves to see if they have been altered from what you thought you were saving? If so, then you should be able to correct that, but check if you save a new bookmark whether or not it was also altered. If so, then you have a virus. If not, then your browser is seriously pwnd in that when navigating via the bookmark the URL is being dynamically altered. In any case, this is the first I have heard of this problem. :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Structures are like classes, but where all of the member variables (salesid, customer_name, etc) are public. As Sky said, post your answer here - we don't do your homework for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you... :-( Create the diagram and write the note. Then, post them here and we may help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your data file please. Also, you are reading the data, but never outputting it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Rik said - HP's are notorious for overheating. Some of my colleagues at work have ones that keep shutting down unexpectedly. We changed the performance settings from "Performance" to "Balanced" and that made them much more stable. IE, they would only ramp the CPU up to full speed when needed, otherwise it would run at a lower speed, thus keeping the heat under control.

Fortunately, I have a Lenovo laptop, and they seem much more stable when running continuously at a high performance level.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Since the file system is read-only, you cannot. You need to remount the file system in read-write mode, and you need to be root or sudo to do that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Boot into the rescue mode and see if you can reinstall the kernel. That should allow you to boot the system.

One bit of gratuitous advice - leave /boot alone! Once you are a "Linux Expert" that may not be necessary advice, but until then, leave well-enough alone... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As AD said, Turbo-C++ is antiquated and not likely suitable for this. You CAN use Mingw's gnu c++ compiler for this, though you will need to install the MySQL shared or static libraries and header files. You might be able to use a recent Visual Studio C++ compiler (you can use the Express version for free). In any case Turbo-C++ will likely not be usable.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If they are .docx files, then they are in a pseudo xml format, with parts that are MS proprietary data (binary blobs). You would be able to read simple text and formatting data I think, but linked data, such as images and such are another matter entirely.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please show an example of the input, and the output.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We don't do your homework for you. Make an effort and post the code here along with the errors you are experiencing. If it seems to us that you are making an honest effort to do the work, we will help you. If not, then you are on your own... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I use VirtualBox happily to run Linux systems under Windows, and Windows systems under Linux. That said, there are ways to create bootable USB drives with storage capacity that you can use to boot without getting either into Wubi, or dual-booting the system. You can also create a live USB drive using Unetbootin.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The command-line (CLI) package installation tools for Debian-based distributions (which Ubuntu is one of) are the aptitude tools, such as apt-get. Read the Ubuntu documentation on their site. They go into this stuff in great detail.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@AD
Good point, but since current MAC systems use BSD as their basic OS, I think they use the *nix LF terminator.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Time to get back to basic calculus I think... Gah! I have forgotten so much! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How long do you think this will take? FWIW, there are functions that will let you inject characters into the keyboard buffer so that they can be read by a program just like you had typed them in yourself. I haven't done this in a monkey's age (about 20 years probably), and I don't know what the appropriate Windows C/C++ functions would be to do that. The main thing is that a brute-force attack like this may take longer than the heat-death of the universe - certainly longer than you can expect to live!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are you sure you are running the appropriate version of java for this application? Are you running the OpenJVM or a certified Oracle Java version? If Oracle Java, what version? You do know that you can install more than one version on your system? I have 1.5, 1.6, and 1.7 on mine (find the official releases installed in /usr/java). Some applications I run require 1.6, and others 1.7... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is not a particularly helpful post. Do you need basic networking books, management Linux networks, connecting your Linux systems to a LAN or WAN... I mention Linux because you say you are using Fedora. What version? What can't you do now using the built-in network manager? Are you having problems with your wired network, wireless, what?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I am running the most recent versions of Chrome and Windows 7 Ultimate (corporate system - IT keeps them patched almost daily). No problems here, though if it has changed since Friday last (2 days ago) I wouldn't know. I'll be updating tomorrow, so if it has broken, I'll report it here. If not, then you have to think that possibly you have become infected with some virus.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Did you just disconnect it, or did you go to the "remove device" icon in your Windows (I assume you are running Windows) menu bar docking bay and ask it to safely remove the device from the os (same as unmounting it in Linux)?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is not particularly helpful. How many of the steps in the "how-to" list in http://neanderslob.com/2013/09/27/how-to-install-open-meetings-on-ubuntu-12-04/ did you successfully get through?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What David_W said. This is not a beginner problem. First, you need to understand something of file system structures. Next, you need to understand how to relate that to program code. Other than re-iterating your class assignment, you haven't done anything that lets us think you understand the scope of the problem, or any approaches that may be fruitful in solving the problem.

One good approach (to give you a hint) is using an extent-based file system. IE, a file consists of one or more extents - locations on the disc where parts of the file exists. The first part of each extent is a header that indicates the size of the current extent, and the disc sector where the next extent is to be found.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What JasonHippy said. To elaborate:

Segfaults are caused by accessing invalid memory. The most common causes are:

  1. Trying to read/write to a null pointer.
  2. Over-writing the memory allocated to a variable.
  3. Trying to access the member of an array beyond the end of the array, or (less common) before the beginning of the array.

Items #2 and #3 are somewhat related. Example:

for (size_t i = 0, j = size-of-array; j <= j; i++)
{
    array[i] = some-value;
}
/* Oops - just crashed! */

Why did we crash? Because we wrote to the array one element past the end of the array, where i == j. The proper way would be:

for (size_t i = 0, j = size-of-array; j < j; i++)
{
    array[i] = some-value;
}
/* Oops - just crashed! */

What a difference a singe character in your source code makes!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Interesting that a poster with the handle which is the name of one of the inventors of the C programming language does not know the basics of the language. Talk about hubris! @dennis.ritchie - please change your handle. I find it offensive! I knew Dennis back in the 1980's. You are NOT him - have some respect! FWIW, he passed away about 2 1/2 years ago. :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@Shol-R-Lea
Well put!

@Morganstevens
Read Donald Knuth's seminal volume 3 of the "Art of Computer Programming, Sorting and Searching". I am considered an "expert" on database systems. Knuth volume 3 is where I learned the basics of the subject - that and the works of Codd and Date.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@ravi_14
Good references.
@inspire_all
These are basic problems in concurrent programming systems. Read the text books your professor has assigned for your class. We don't do your homework for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The sarcasm of my colleagues notwithstanding, my magic wand stopped working this morning. :-) Learn by doing, reading, and studying the works of others who are known to be competent in the field. Best single C++ reference work? The ARM (Annotated Reference Manual) by Ellis and Stroustrup. Stroustrup invented the language, so he must know something about it...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Line breaks in Windows files are a cr+lf (carriage-return + line-feed) pair of bytes. For Linux/Unix systems, it is a simple line-feed character. So, scan for a line-feed, and then inspect the immediately previous character to see if it is a carriage-return. If it is, then break there and throw away the cr+lf pair to continue processing. If not, then just throw away the lf, and continue processing after that. The common denominator is the line-feed.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You are using strdup as a variable. It is also the name of a C-function that copies a string. Better to do this:

        const char* source = "foo";
        char *strs[NUMBER_OF_STRINGS][STRING_LENGTH+1];
.
.
.
        strs[i] = strdup(source);