1,684 Posted Topics
Re: Don't follow Ancient Dragon's advice; it's horrible design. What do you mean exactly by "single instance class"? Why don't you pass the instance by reference? | |
Re: This is a stupid question. You should write small sample programs to verify your understanding of things like this. | |
Re: Are you having a problem with this homework assignment? I recommend figuring out what information you need to help yourself and then operating on that. | |
Re: Why would you want to limit the number of buckets? | |
Re: [QUOTE=fatnickc;387280]I'm about to start writing a genetic algorithm program which will be able to find the highest/lowest/whatever else values of variables required for an equation, and have come upon a point about which I am uncertain. I do not know whether I should store and work upon the values as … | |
Re: Pass in to the function in class A a delegate or object that constructs class B. [code] abstract class A { public static void INeedToConstructSomeSubclass(Func<A> subclassDelegate, ...) { A blah = subclassDelegate(); ... } }[/code] Then just call it with [code]A.INeedToConstructSomeSubclass(() => new B());[/code] You'll need some way of communicating … | |
Re: You're acting completely ignorantly of the people who could answer your question. | |
Re: C++ is higher-level than Java, in that it has a more flexible type system and can make abstractions that Java cannot. On the other hand, Java has garbage collection. The truth is, Java sucks, horribly. Java is pretty much as crappy as a language can be. But it has garbage … | |
Re: [QUOTE=joshSCH;390650]Hmm.. I believe you are forgetting one thing.. Scientists are more intelligent than you.[/QUOTE] Are you sure? [QUOTE=joshSCH]The logic you propose is not exactly what scientists are saying.. all you have basically done is state something, and then refute it. You have given no evidence whatsoever that this is what … | |
Re: There's nothing insane about writing a parser. | |
Re: [b]1. What is your title?[/b] "Software Engineer" [b]2. What are your responsibilities?[/b] Anything that has to do with writing code, designing code, fixing code, and figuring out bugs exhibited at customers, that were caused by our code. And some occasional interviewing. [b]3. What kinds of skills do you need to … | |
Re: Why don't you read Wikipedia? It has clear answers. [quote]And how is it all different to developers ? [/quote] What does this even mean? | |
Re: For a complete answer, you need to provide a better description of what you're trying to do. What do you mean by "share"? If you just want a function to be visible, make it public. If you want multiple classes to see the same variable, the proper course of action … | |
Re: Look up the way GL_LINE_LOOP is supposed to work and then look at your code. | |
Re: I don't know what makes you think there's a "proper" way to think recursively. But as the other poster said, thinking recursively means reasoning based on an assumption about the net effects of your function's recursive calls. And an example was given too. | |
Re: You're talking about the most boring part of science ever, scientific research posters. There's no hope for student engagement. Really you should just do them a favor and make the presentation as short and concise as you can. | |
Re: Decompile it? Yes. Into something useful? No, unless they just want to figure out how it works. | |
Re: In regard to your original code: Could you please explain why it is supposed to work correctly? | |
Re: Give any physical thing a mysterious sounding name and the religious people will hop all over it. | |
Re: [QUOTE=Narue]>I'm a CS student and as far as my experience tells me I'm thinking you need some more experience if you can't tell that 2004 was two years ago.[/QUOTE] But 2004 was only 1.5 years ago :-) | |
Re: 1. The hardware design. 2. The hardware design. 3. It's the reciprocal of #2. | |
Re: pdftex can make PDF documents. | |
Re: [QUOTE=nlsna17]PS. What should i do?[/QUOTE] Drop the class? | |
Re: [QUOTE=The Dude;607857]Not many people admit they have done wrong and thus dont apologize....[/QUOTE] There is nothing unethical about not following some silly posting format and no need to admit one has done anything "wrong". | |
Re: [b]How dare you blaspheme![/b] Or did you do that before the beginning of time? Anyway,,, The world was created 6013 years ago? Horsehockey! The world was created 6000000000ish years ago? Mere orders of magnitude do not give correctness! You fools. If only you knew the world was created 30 seconds … | |
Re: [QUOTE=cpp noob]i would also appeciate a smaller version of this progrm.[/QUOTE] Then use subroutines. | |
Re: You could write a full-blown HTML parser, you could use somebody else's HTML parser, or you could use a cheapo solution that looks for strings like NZD-USD and walks their way forward through values. And you'll need to grab the page from the webserver, too. I'm not sure what you're … | |
Re: Don't think you can trick us into doing your homework for you! This is the oldest one in the book! And here's a lame version that assumes reasonable input, has passed only one test case, and assumes 32-bit longs. [code]unsigned long extract_digits (unsigned long x, size_t n, size_t i) { … | |
Re: I guess I am mainly a piano geek. Here is me playing with Tetris music. [url]http://youtube.com/watch?v=SkrVnfHsmK8[/url] | |
Re: To find if a number [i]n[/i] is prime, you can just loop through all the numbers from 2 to ([i]n[/i] - 1) and see if any of them divide evenly, using the modulus operator. So your loop ending condition could be (i < n), and you know that i divides … | |
Re: Then you mean the maximum sublist sum, not subset. First, you can convert the list into a list of cumulative sums, turning [5,-2,10,-4] into [0,5,3,13,9]. Then walk through the list of cumulative sums, saving the smallest value so far and the maximum difference between what you see as the current … | |
The IRC profanity filter has gone out of control. [code]<Rashakil> sss _ss * DaniBot sets ban on *!*@dani-5F79DBC3.dyn.optonline.net * You have been kicked from #DaniWeb by DaniBot (Watch your language!) * Cannot join #daniweb (You are banned).[/code] First of all, how is [icode]sss _ss[/icode] profane? Second, why does it merit … | |
Re: You can also write [icode]operator<[/icode], [icode]operator<=[/icode], etc. | |
Re: Here's a rather neat solution that is relatively portable. It only reverses bytes though. [code]unsigned int reverse_bytes(unsigned int n) { #if UINT_MAX > 4294967295 n = ((n & 0xFFFFFFFF00000000) >> 32) | ((n & 0x00000000FFFFFFFF) << 32); #endif #if UINT_MAX > 65535 n = ((n & 0xFFFF0000FFFF0000) >> 16) | … | |
Re: When you write "example," what exactly do you mean? You're not going to be given the answer. | |
Re: [QUOTE=christina>you;421368]I think religion should be allowed in public schools and that's not just because I'm a Christian. I think that learning about different religions helps everyone to better understand the origins and beliefs of each one.[/QUOTE] This is allowed and happens; I had a class like this. | |
Re: [quote=sj87]1301[/quote] What unoriginal fluff. This wouldn't even be copyrightable. Why don't you come up with something new, something youthful and interesting, something unpredictable???//slash Do you have no spirit? How do you want to spend your life: as a mere drone, a spiteless follower of a soporophized forum-mangler? Or will you … | |
Re: Yeah, it can be used for more than just textual input and textual output. You can do lame graphics without it being a big deal. But you are generally limited by the fact that the language and environment are 20 years out of date. You'd be better off using an … | |
Re: I don't know if anybody here happens to be familiar with "Borland C++ 5.0 Client" applications (assuming "Client" is capitalized as part of the proper name for this sort of thing). I am unsure, though, what you mean by the "Perl GET method". What does Perl have to do with … | |
Re: [QUOTE=MidiMagic;461745]The problem is that our long-term permanent memories are serial, like recording tape. The problem isn't that you can't remember something, but the rewindatory gap. That's the time it tales to find and retrieve the memory. My memory can take 24 hours to complete a search cycle.[/QUOTE] What the heck … | |
Re: I'll get right on it. It'll take me a couple of days, so I should be done on Thursday. Post your email address, and I'll send it to you. | |
Re: Forcing people to vote means violently attacking the people who didn't vote. These people will be violently attacked without having committed any misdeed upon others. That is evil, and so is the desire to force others to conform to your personal lifestyle choices. | |
Re: Maybe they were speaking of average case efficiency, not worst case. You have 'random' insertions and deletions. On any deletion the probability that the minimal element is deleted is 1/n, assuming elements are distinct, where n is the size of the list. Then it only takes O(n) operations to scan … | |
Re: Ok, I'll play. What are the rules? How much time goes on the clock? | |
The End.