rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Pascal is a defunct language. Even the inventor of it redid it as Modula! If your school is still teaching Pascal, go somewhere else!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My solution for Java programming issues is simple. Don't use Java! Fine for trivial applications, but a pit for system-level applications! Don't be lazy. Learn C++ instead!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In my opinion, Windows is a virus, just waiting to infect your systems! I ONLY use Linux. My wife is an Apple user (iPad and Mac workstations). Neither of us have virus issues, or lost files such as this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Except on my work Win7 machine, I ONLY run Windoze in a Linux virtual machine! Fortunately, there are few programs I use (and those rarely these days since most vendors are getting pretty savvy about supporting Linux) that require Windows. The one Windows software I can't live without, Sparx Enterprise Architect, runs flawlessly in Wine on Linux. They have spent a lot of cycles making sure of that, because they cannot afford a cross-platform port.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, don't bother me with this any further. Find another sucker, or figure it out on your own!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. We are having an argument that is going nowhere, mostly because you have not told me anything to change my mind about the use of ssl/https/tls for these so-called "web sockets". You either need to be much more forthcoming, or find some other sucker to punch... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are talking to a web site, and the data stream is encoded (encrypted), then it is likely using https (ssl/tls). Why do you say it isn't? You have not said anything to change my mind about that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The https protocols use the secure sockets library (ssl) to do the encryption. What did YOU think the answer was? Read this article, and cancel your downvote: https://en.wikipedia.org/wiki/HTTPS - and fyi, this IS my business and career.

Chris.T commented: The website in question does NOT use https, so I dont see why you keep saying https? What makes you so sure it is ssl encoded? U gave 2 downvotes +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Upgrading from Win7 to Win10 right now? HUGE mistake! Mostly, it doesn't work... :-( Try running the recovery option and revert back to Win7 first.

FWIW, the Win7->Win10 upgrade messed up my brother-in-law's computer and that is what he had to do. He got all of his data back then.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Most web traffic now is encrypted with SSL. It's nice that Wireshark can determine the decryption certificate to use from the stream, which is why it can turn it into plain text (unmask it). That is also how your browser knows what to do to decode it into a real web page. When your browser makes a connection with an https url, it sends it's public key to the site, which uses that to encrypt the page data before sending it to you. Then your browser uses your private key to decrypt it. Without your private key, no one should be able to see what you are doing! That's what malware trojans do to compromise you - they can steal your private keys!

Chris.T commented: It's not ssl, so i reposted because you didn't give me the right answer. +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Using the Gregorian calendar for date computations is just so stupid! Any rational date class will use Julian dates (a floating point representation of date + time) which can be used easily in date arithmetic and provide accurate answers, even accounting for leap years, and if done right, leap seconds. No wonder I hate Java and Android (Dalvik)! I like Android devices (I have 3 Android phones, including a Nexus One), but programming them is brain-dead!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you really analyzed the original qsort algorithm? Read Knuth's volume 3, Sorting and Searching? If you haven't adsorbed that, then you don't know what the fark you are doing!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

XP refuses to die because it is a zombie! You cannot kill a zombie - it is already dead...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What OS are you running? If Linux, try running Alsamixer to adjust your master and other volume controls. If Windows, then see if your system is using the desired channels. On my work Windows system, I have both external speakers as well as a headset, and I need to enable the appropriate one to get output.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Boot into the system. Login as root. Run the commands "lspci" and "lsmod", posting the output here.

hithirdwavedust commented: I feel this is an inappropriate response to someone whom states that they are 'new at using linux'. +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try Googling this on your own. We aren't here to do your homework for you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I disagree with oricion.

  1. If the card did work at first, but stopped working recently, then the card is likely failing and you should return it for a replacement.
  2. If #1 is not the case, then the problem is likely that you need to access the BIOS and configure it to use the add-on display card instead of the integrated graphics that you are likely using.
  3. Also if #1 and #2 are not relevant, did you move the video cable from the old port to one on the GTX 760? If so, then the card is likely failing and you should return it for a replacement.
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Recursion is when a function/method calls itself. This is common for binary search, fibbonacci routines, etc. It is very basic computer science and has nothing to do with Java per se. Read this: http://en.wikipedia.org/wiki/Recursion

JeffGrigg commented: Direct, simple, and correct answer. -1
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can set up a database (MySQL, Oracle, Postgres, etc) in the Amazon cloud that your web site can access, and you can get to from anywhere. They all have command-line tools that let you query the data using standard SQL syntax.

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

There are a number of good discussions on the internet about this - try a google search on the terms "java operator overloading". The short answer is that java does copy-by-reference vs. C++ (and I assume C#) using copy-by-value. Here is one link for you that tries to explain it: http://stackoverflow.com/questions/77718/why-doesnt-java-offer-operator-overloading

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you post a bunch of code and fail to say anything about what your specific problem may be... So, what IS your problem?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just listing the components isn't helpful. When you turn it on, does ANYTHING work, such as fans and such? Have you verified that you plugged the power supply into the correct headers/plugs? If it doesn't even turn on the power supply fan, have you checked if the power supply circuit breaker / fuse hasn't tripped / blown?

I have built a lot of systems from components, but many people have problems doing so because they don't utilize due dilligence in making sure that all the i's are dotted and t's are crossed properly.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

C# is NOT cross platform! Yes there is Mono for Linux, but it is not really ready for prime time... Consider it a Windows-only tool. If working in the Windows environment is what you want, then fine, but realize that even on Windows phone systems, Java is still the language of choice.

So, ss125 writes keyloggers? Is he a blackhat hacker, works for the NSA, or just someone who likes to see what others are doing, behind their back? :-(

ss125 commented: Any rules stating that only NSA can code for keyloggers? Because I am programmer with interest in learning of all sort of things. +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Actually, to modify my earlier post, rather than a loop, you can use the C "strcpy()" or "memmove()" functions instead, eliminating the inner loop. It will also be faster, especially since x86 processors have very efficient string handling primitives that gcc (or Visual Studio) will hopefully utilize.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon what you want to do. In bash scripts you can assign the output of any other executable to a variable using the back-quote character, as in:

varname=`md5sum filename`
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You want a java method that can do that? RTFM! Java docs for all of this stuff is readily available on the web. Try a visit to the Oracle java language pages...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

To both arpha16 and exsoft: we don't do people's homework here. If they post their best effort code and describe where they are having problems, we might help them. However, the terms of service for this forum is that we DO NOT do your homework for you! So exsoft, please don't do this in future! :-)

Ok, dope-slap over - you (exsoft) gave a good hint that arpha16 should take from here, though it REALLY isn't pseudo code. That would be more on the order of:

while password is not correct
    print "too bad, you lose!"
else
    print "ok, you win!"
end while

IE, pseudo code is JUST a description of the steps to take to solve the problem. Your code is way too close to correct C++ source code (with some issues - not to discuss here).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Make a backup copy, install directly, and see how it works. If you have a problem with it, then you still have the original to import from.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try this:

#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
    int maxArray[10];
    int maxValue=0;
    for(int j=0; j<4; j++)
    {
        cout<<"Enter a number: ";
        cin>>maxArray[j];
    }
    for (int j = 0; j < 4; j++)
    {
        if(maxArray[j]>maxValue)
        {
            maxValue=maxArray[j];
        }   
    }
    cout << "The highest value is: " << maxValue << endl;
    getch();
    return 0;
}

Yes, you could evaluate the maxvalue in the first loop, but I like to keep my input, evaluation, and output loops separate. Just personal preference, and it helps me to keep "domains of responsibility" distinct.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

AND you need to implement all of the methods specified in the Serializable class.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your system is running Windows? If so, then you probably are part of a bot-net... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One last suggestion is that instead of shutting the system down, just hibernate it when you aren't using it. It will start up much faster than a cold boot.

SerbOz commented: thanks rubberman. that's works! +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ah! Serious beginner C++ programmer errors. Reference variables are much like pointers, but you can declare them as const, and thus refuse the called funtion from modifying them without going through some contortions (such as explicitly casting them as non-const). The issue is your intention. If you WANT the called function to be able to modify the contents of the object, then pass them as non-const, otherwise, a const reference is preferable. For C++, passing variables as pointers is usually not recommended. Example (from your source):

void class::b(int& MyIntRef)
{
    MyIntRef++;
}

void class::a()
{
    int MyInt = 5;
    b(MyInt);
    //MyInt now == 6
}

Clearer now?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Personally, I only run Windows in a Linux virtual machine. I create a snapshot of the Windows "disc", and when I get a virus, I just restore the snapshot. Virus - gone!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Like C/C++, Java uses 0-based indexes. Not interested in reading through your 200 lines of code. If you set a member to index 1, it is actually the second member of the array, NOT the first.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What waltp said:

string getName()
    {
        cout << "What is your name? ";
        getline(cin, name);
        return name;
    }
WaltP commented: Do you ALWAYS have to reinterpret what's said before? Can't the post stand on it's own? -3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You don't provide any error messages, diagnostics, etc. Just "don't work", which does not work for me! Want help, then provide as much useful information as you can. Emacs has a built-in compiler. If you are building this to run in emacs, then use that. The command is byte-compile-file filename

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Scheme is a dialect of Lisp, so you might want to look for Lisp/CommonLisp tutorials on the web. I haven't used it for many, many years. The last time was probably when I needed to tweak some Emacs macros. The GNU project has a Common Lisp implementation (Gnu Common Lisp) which is widely supported. Here are some links for Lisp books and tutorials online:

http://www.apl.jhu.edu/~hall/lisp.html
http://services.renderx.com/Content/demos/wikibooks-CL.pdf
http://curry.ateneo.net/~jpv/cs171/LispTutorial.pdf
http://cs.gmu.edu/~sean/lisp/LispTutorial.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The variable i needs to be instantiated outside of main, either in the same file, or in another one that is subsequently linked to create the executable. Try this:

#include <stdio.h>

int i = 0;

int main(void)
{
    extern int i;
    i=20;
    printf("%d\n",i);
    return 0;
}

In any case, your code should compile, but it will not link as it stands. Actually, the compiler should complain and may error out since you forgot the return value.

WaltP commented: I don't understand the purpose of this post. The code is essentially identical to the OP's code, and the information is just restating what decepikon said. Did you read his post at all? +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
itemWord* findDup(itemWord* head, itemWord* item)
{
    for (itemWord* curr = head; curr != 0; curr = curr->next)
    {
        if (curr != item && strcmp(item->word, curr->word) == 0)
        {
            return curr;
        }
    }
    return 0;
}
void removeDup(itemWord** head, itemWord* item)
{
    itemWord* prev = 0;
    for (itemWord* curr = *head; curr != 0; curr = curr->next)
    {
        if (item == curr)
        {
            if (prev == 0)
            {
                head = &(curr->next);
            }
            else
            {
                prev->next = curr->next;
            }
            free(curr);
            return;
        }
        prev = curr;
    }
}
int main(void)
{
    itemWord *curr = 0, *head = 0;
    int done = 0;
    .
    .
    .
    /* This will get rid of ALL duplicates, even if there are muliples.
     * An optimization may be to avoid rescanning the list. That said,
     * I haven't run this code, so it may need some tweaking! :-)
     */
    while (!done)
    {
        int gotone = 0;
        for (curr = head; curr != 0; curr = curr->next)
        {
            itemWord* found = findDup(head, curr);
            if (found)
            {
                removeDup(&head, curr);
                gotone = 1;
                break;
            }
        }
        done = !gotone
    }
    return 0;
}
WaltP commented: Doesn't anyone look at posting dates anymore???? It's a freaking 4-year old thread! -3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What WaltP said. The division symbol you are using in the computation for "total" is wrong... :-)

WaltP commented: Thank you for wasting my post and not allowing him a chance to use his brain. -3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Time to switch to Linux...

PhilliePhan commented: That's really helpful!! -2
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

ClamAV works just fine as x86_64. How are you trying to install it? From source? On Fedora or RHEL, you can install x86_64 ClamAV from either the atrpms or epel repositories. Use either of these repositories and you should be able to install it just fine using yum. Most use the epel repository.

FWIW, the epel repository should be in the normal Fedora repositories. Just execute the command "yum install epel-release". Then after you install that, try "yum install clamav.x86_64".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As for "tethering" the desktop to the laptop, you can configure the laptop to do routing for the desktop. In effect, it becomes the router, and optionally a dhcp server. It's quite simple for Linux, and I know it can also be done for Windows, but I have not done it myself. My brother-in-law did that once when were were at his parent's house for Christmas one year, so we could all access the Internet via one laptop that had a broadband modem attached. All the computers were networked via a WiFi access point.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, understand how recursive-descent parsers work. That is the fundamental method to build a calculator or numerical/mathematical expression evaluator.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Multisets are the same as sets, except that they can have multiple instances associated with a single key. They are templates, as you know, but the signature of multiset is not multiset<T>, but multiset<Key_Type, Value_Type, Key_Allocator = Allocator<Key_Type> >. IE, you need at least 2 template arguments when declaring multisets, as in:

multiset<double, double> my_double_mset;
multiset<int, int> my_int_mset;

So, if you wanted a multiset that is keyed on the number of instances of a string, you could do this:

multiset<unsigned, string> counts_of_strings;

Kind of silly examples, but hopefully you get the point.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I am running Scientific Linux 6 (a clone of RHEL 6) for the past several months, after 3 years running CentOS 5 (close of RHEL 5). I've been happy with both, and both have some minor issues, stability not being one of those issues. Mostly they deal with changes in the desktop managers (KDE and Gnome). I run Windows in a virtual machine (using VirtualBox) which does support Windows 7, so if you want to run Win7 under Linux, you can easily enough. As for known problems with Win7 SP1, I don't know since as I mentioned before I don't run Win7. I have a couple of clients that run Win7, and they much prefer it to Vista, but that's not saying much.

peter_budo commented: Read carefully before replying -3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
char buffer[500];
sprintf(buffer, "======================\nMonth : %d\n:Day : %d\n", st.month, st.day);