rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, I have to disagree with Mike2K with regard to UML, but that depends upon the tools you use. I employ Sparx Enterprise Architect for my design needs, and then use it to generate source code. If I have to work with existing code, then I used its reverse engineering capabilities to capture the code design into UML diagrams. I have designed major software systems in use for many enterprise systems since the early to mid 1990's using UML or earlier OOP tools (I was there when Booch, et al announced UML 1.0 at OOPSLA in San Jose). Modern tools such as Enterprise Architect, Rose, Tau G2 (Rose and G2 are currently owned by IBM), and such are often capable of forward and reverse engineering from model to code to model. So, there is no doubling of effort, provided you use appropriate tools.

Many of the complex systems I have designed and implemented since the early 1990's would have not been possible without the use of modern design tools (UML, Booch diagrams, CRC cards, etc). The complexity is very much clarified with such tools, allowing one to understand the relationships between classes that would be daunting if you only have source to analyze.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

assert() is very useful (and commonly used) in debugging new code or unit testing code. You build it debuggable, run your tests, and if an assert (used for range/bounds checking, valid states and data, etc) triggers, then you can run the code in the debugger and see what is going on directly so it can be fixed.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Some AP's provide an unsecured "guest" option, which is what I think is happening here. Make sure you are connecting to the secure ssid, and have used the correct passphrase with which you configured the AP. Best guess? If you use the wrong passphrase, or ssid, it will fall ack to the public/guest ssid, hence your problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most coding problems with PHP is that people don't use it as it was intended. They try to mix PHP and HTML (which you can do). It is an object-oriented language very similar to C++. Don't just output HTML. Embed it in strings constructed in the methods in your classes. Once everything is ready, then do your output, such as your CSS structures, headers, and then the HTML/JS data. This will allow you to better debug the code and improve performance (less network I/O to the client browser). PHP is a powerful language and can, if used properly, greatly increase the security and flexibility of your web applications.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Some settings are universal and others are personal. When as root you set up some GUI configurations, many of those are "global", so you get them as a normal user. As for your question "is there any way to ..um .. maybe use root's session without the previliges until password is entered?" - you really, really do not want to do that! It would leave your system very open to security exploits.

So, please explain why, exactly, you want to do this?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is why I run Linux - no activations, registrations, other people pwning my system credentials...

Rant finished.

It is possible that either MS "lost" your registration/activiation, or someone (malware) has tried to activate a Windows system with your key (possible). What happens when you actually try to re-activate your license?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It probably isn't needed, but look in the add/remove applications tool to see if the system thinks it is installed. If so, use the tool to remove it, and then you can remove the directory. If the tool doesn't know about it, then first try renaming the directory (or moving it to /TEMP) and see if some other application starts to complain.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How are you pushing the data to the next page - via Posts or Gets? That's the key. You can call the same page in a form and either use POST or GET values (POST values are not visible in the URL) and then obtain their values in your code via $_POST['name'] or $_GET['name'] constructs.

If this is confusing, let me know and I can give some examples.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this what you are talking about? https://www.rapid7.com/db/modules/payload/windows/shell/reverse_tcp

In any case, what exactly are you trying to accomplish?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The maximum disc size depends upon (to some extent) the file system that is using it. In any case I think that 2TB is about the smallest maximum size (kind of an oxymoron that) supported. Modern partition table formats can handle larger devices (such as 3tb discs and larger RAID/LVM arrays), as can file systems such as btrfs and such for Linux. Not sure about Windows. I think NTFS may be limited (but I may be incorrect in this) to 2TB as well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your image is too fuzzy to read.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Honestly, I have to agree with Hiroshe. If the result of the insert operation of z,x,z into the second position of x,y,z is to result in a set, then the results should be x,z,y - anything else is a list, not a set. Sets do NOT have duplicates.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most probably it means that the program has a memory access error. If you wrote the program, or have the source code, then run it in the debugger. If you didn't/don't, then report the problem to the developer.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The random() function is a system function that returns a long int. You have declared that your random() function returns an int, and this is the cause of the compiler complaint. FWIW, long int random() is declared in <stdlib.h>.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My guess is that the underlying code that handles the "heavy lifting" is C++, and the UI stuff is C#. Why C# when they are also using Qt (multi-platform GUI API's) is beyond me. Totally unnecessary IMO.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is html, not php, even if you are doing this in a php page. Read the HTML documentation online for help with this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you don't have it, you should get Clocksin and Mellish's book on Prolog programming. It is the "Prolog Bible"...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What Mike2K said. I use dd on Linux for this purpose all the time, and it has saved my bacon on more than one occasion when my system drive started to fail. However, as he pointed out, you REALLY need to know what you are doing. If you point it at the wrong disc... Let's just say that "bad things will happen".

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

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

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

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

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

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Interesting that the poster of this thread is using the handle of one of the inventors of the C programming language... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please show the code. Without that, it isn't possible to answer your question. The typical swap algorithm is this

swap(type& var1, type& var2)
{
    type tmp = var1;
    var1 = var2;
    var2 = tmp;
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How do you determine the end of the input for vector a?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

How was the image created? Did you use a dvd ripper that would remove the DRM and region codes? If not, then the image will remain unplayable since DVD DRM does weird stuff that is not translatable to an image file without code to remove the DVDCSS (DVD Content Scramble System) DRM that commercial discs use.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Don't know - never used it before. I found it with a Google search. FWIW, you should have installed the rpm with yum, not rpm since the rpm command won't deal with dependencies. I would suggest that you remove it, and then reinstall it with yum. That may help. No promises though. You are treading in mostly uncharted territory. Also, you might want to post the output of "ipkgbuild --help" and the man page for ipkgbuild (man ipkgbuild). We may see something that will help you sort out your problems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It used to be said that C++ is C with classes. In fact, early C++ compilers would simply generate C code and then compile that. Before C++ was generally available, I used to write C code much like what C++ compilers would generate at that time. Honestly, I much prefer C++ to C now, and if I have to write C code, I still use C++ compilers, except for Linux kernel/driver code (for the most part).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes, exceptions are standardized, and all compilers that I am aware of handle them correctly (not always the case in the mid-90's). This signature indicates that Funct1(int) may (or may not) throw an exception. In any case, throw() specifies that it may throw ANY exception. Usually you specify what exception type(s) it may throw. Your usage is a "catch-all". Caveat programmer! :-)

Just a bit of history. In the early-mid 1990's we were writing application development frameworks and applications in C++ that had to run on many different Unix systems (and Windows as well as embedded systems), so consistent exception handling was required. I wrote a recursive routine to compute fibonacci numbers using exceptions to test them. You would be surprised how many failed that test! Let's just say that a lot of major corporate VP's of engineering had some interesting phone calls (Sun, IBM, HP, DEC, et al). Needless to say, since we were a major partner for all of them, the problems were resoved PDQ. In any case, this was not the only compiler issue with many of them. I'm sure that to this day, I am remembered "fondly" by many!

As for the rules changing in the future - it may happen, but probably not - Bjarne would roll over in his grave if he is not around by then! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Re. ipkg for installing .ipk packages. Let me do some research and get back to you on that. I've been running RHEL/CentOS/SL systems for about 8 years now and never ran into that requirement! :-)

Ok. Here is a link to an RPM that will install the ipkg installer on Red Hat 6.x or compatible (such as CentOS) systems: http://rpm.pbone.net/index.php3/stat/4/idpl/21706162/dir/redhat_el_6/com/ipkgbuild-0.8.0-1.el6.pp.noarch.rpm.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, I don't know any standards for pseudo-code except possibly for BNF (Backus–Naur Form) which is used for many standards, including the DDN Whitebook specification of the TCP/IP protocols.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Hassan, you need to try to solve the problem, then post your code here with descriptions (and output) of errors that you are getting, then we may be able to help you. We DO NOT do your homework for you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As Mike2k said, apt-get/aptitude/synaptic/dpkg are package management tools for Debian-based distributions such as Debian, Ubuntu, Mint, et al. For RedHat-based distributions you can use yum, or rpm. That said, yum is the current preferred package manager for RH distributions as it deals with dependencies much better than rpm, whereas with rpm you are pretty much on your own. There are rare occasions where using rpm is called for, but only in rare, and advanced situations, and then it is a case of caveat developer (developer beware!)... :-)

FYI, Suse distributions use yast, which is also an rpm-based package manager. So, if you want to install an rpm meant for a RedHat system, it may also work on a Suse/OpenSuse system (and vice-versa). Again, caveat developer/user!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, understand what the various functions/processes need to do (RTFM), and then write out how you would, in simple words, how you would go about performing those processes - this is called "pseudo code". Then consider how you would do that in a C++ class-based environment where strings have their own class. IE, the signature for strcat(target, source), may be something like this:

MyString& MyString::strcat(const MyString& source)
{
    ::strcat(this->raw_string, source.raw_string);
    return *this;
}

Of course, you will also need to add code to increase the size of the local raw_string variable as necessary. This is just one example, and not a particularly great one - I wouldn't use it for production code!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A couple of minor issues with the assignment operator in StuXYZ's example:

Way& Way::operator=(const Way& A)
{
    if (this!=&A)
    {
        id=A.id;
        name=A.id;
    }
    return A;
}

should be this:

Way& Way::operator=(const Way& A)
{
    if (this!=&A)
    {
        id=A.id;
        name=A.name;
    }
    return *this;
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

See my reply to your other post. We DO NOT do your homework for you! :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you want us to do your homework for you? Make an effort to solve the problem and we can help you. This is not sufficient... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The 'ld' command is the linker for GCC compilers, such as MingW. If you installed Ming in a normal manner, it should be on your system as well. Possibly you deleted it? Or installed MingW in a non-standard manner?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm only going to say one thing - you don't validate your input data. In the constructor you do not verify that either the suit or rank passed is valid. If not, you need to throw an exception. Data validation is critical for all programming processes. If you don't verify all input data at the point of use, then you are going to have a "bad time"...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

For Linux, go into "Sound Preferences" and disable the audio input device. Don't have Win8 so I can't say what to do there, other than what I would do with Win7 - disable the mike in the hardware settings.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, work out the process in plain language (pseudo code). Then, write the code that follows that process. Good luck!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most of the time, when you install Linux, it already has the drivers you need for your hardware, including video. Linux is NOT Windows! It will interrogate the system on boot and enable the needed drivers at that time. Sometimes you can get better performance with proprietary drivers (nVidia video cards are a good example of that), but don't bother until you really need them.

So,

  1. Don't just download and install drivers until you really need them.
  2. You don't need to mount a driver on disc. Either the package manager will do that for you, or when it is built from source it can be installed directly onto the system disc. Linux has standard ways to do that.

I have installed Linux in various forms on many systems. Usually, I don't need to deal with hardware drivers at all. This includes servers and laptops.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm not sure I understand your question (#2). I have been programming Linux/Unix systems since 1982, and led the Y2K analysis/remediation effort for a major software company in 1998 (10 million lines of Unix and Windows code). Also, I have written C++ date/time classes that can handle date/time values up to the heat death of the universe, to the millisecond.

So, please be more explicit (and clear) as to what your concerns are.

P.S. The "heat death" of the universe is hypothetical. Let's just say that my date/time classes handle this up to a REALLY big number. :-)

If you want that code, it is now owned by Applied Materials - the 800lb gorilla of the semiconductor manufacturing equipment industry.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

MySQL is a specific implementation of a relational database that uses the SQL data access language. SQL is an ANSI/ISO standard, and is supported (to varying degrees) by database products such as MySQL, Ingres/Postgres, Oracle, DB2, Sybase/MS-SQLServer, et al. It is not a part of any operating system, per se. MySQL is now part of Oracle, and can be downloaded from here: http://dev.mysql.com/downloads/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok, but yes, most start with including iostream because it has the basic stuff for output to console, input from the terminal, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do some reading on how to program in C/C++, work out the algorithms (processes) to do currency conversions from any currency to any other, and write them down in plain language over and over until you are certain you have the processes correct. Then, start writing code that reflects those processes. When you have some code, we can critique it and help you with your errors.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I see javascript and html. Where is the php code?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

TopSpeed
FuelConsumption (adjusted for speed) ie, mpg @ 100 mph != mpg @ 50 mph.
PassengerLoad
Cargo (in cubic whatever is appropriate for you)

Cars have a LOT of options. This will change things quite dramatically when all things are considered. FWIW, I was a master mechanic before I became an engineer, and factory trained by Volvo, Fiat, Lancia, Subaru, Toyota, Jeep, Chrysler ... and have the paperwork to prove it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You have possibly put this file into the Visual Studio configuration file to be compiled, or the problem is that for C++ (especially for pre-compiled headers) it should either not have the .h extension, or should be something like .hh, .hxx, etc.