1,684 Posted Topics

Member Avatar for Manutebecker

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?

Member Avatar for Rashakil Fol
0
85
Member Avatar for 666kennedy

This is a stupid question. You should write small sample programs to verify your understanding of things like this.

Member Avatar for Rashakil Fol
0
87
Member Avatar for ishitasheth

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.

Member Avatar for Rashakil Fol
0
115
Member Avatar for panpanf
Member Avatar for RavUn
Member Avatar for Trekker182
Member Avatar for fatnickc

[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 …

Member Avatar for fatnickc
0
120
Member Avatar for obscured47

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 …

Member Avatar for obscured47
0
144
Member Avatar for hazelwize

You're acting completely ignorantly of the people who could answer your question.

Member Avatar for hazelwize
0
123
Member Avatar for DanDaMan

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 …

Member Avatar for Rashakil Fol
0
135
Member Avatar for The Dude

[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 …

Member Avatar for Dave Sinkula
0
973
Member Avatar for SteelSlasher
Member Avatar for ARubert

[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 …

Member Avatar for dickersonka
0
182
Member Avatar for coachHinesfan

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?

Member Avatar for Rashakil Fol
0
74
Member Avatar for Manutebecker

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 …

Member Avatar for ArkM
0
95
Member Avatar for the_swan

Look up the way GL_LINE_LOOP is supposed to work and then look at your code.

Member Avatar for Rashakil Fol
0
160
Member Avatar for philmetz

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.

Member Avatar for Rashakil Fol
0
2K
Member Avatar for sweet angle

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.

Member Avatar for Rashakil Fol
0
72
Member Avatar for Jacky1

Decompile it? Yes. Into something useful? No, unless they just want to figure out how it works.

Member Avatar for Jacky1
0
87
Member Avatar for mina1984

In regard to your original code: Could you please explain why it is supposed to work correctly?

Member Avatar for ddanbe
0
196
Member Avatar for christina>you

Give any physical thing a mysterious sounding name and the religious people will hop all over it.

Member Avatar for GrimJack
0
2K
Member Avatar for minnie

[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 :-)

Member Avatar for Salem
0
167
Member Avatar for bk2008

1. The hardware design. 2. The hardware design. 3. It's the reciprocal of #2.

Member Avatar for Rashakil Fol
0
52
Member Avatar for newcountry
Member Avatar for crunchie
Member Avatar for WD40
Member Avatar for nlsna17
Member Avatar for lese

[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".

Member Avatar for lese
2
187
Member Avatar for mattyd

[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 …

Member Avatar for ~s.o.s~
3
10K
Member Avatar for cpp noob

[QUOTE=cpp noob]i would also appeciate a smaller version of this progrm.[/QUOTE] Then use subroutines.

Member Avatar for CrisRo
0
343
Member Avatar for yoas

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 …

Member Avatar for Omarcito
0
117
Member Avatar for Narue

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) { …

Member Avatar for ivailosp
1
680
Member Avatar for war_criminal

I guess I am mainly a piano geek. Here is me playing with Tetris music. [url]http://youtube.com/watch?v=SkrVnfHsmK8[/url]

Member Avatar for jbennet
0
542
Member Avatar for dark7angelx07

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 …

Member Avatar for DavidB
0
1K
Member Avatar for dilip.mathews

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 …

Member Avatar for omko
0
1K
Member Avatar for Rashakil Fol

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 …

Member Avatar for MidiMagic
1
235
Member Avatar for jrkeller27

You can also write [icode]operator<[/icode], [icode]operator<=[/icode], etc.

Member Avatar for vijayan121
0
3K
Member Avatar for fskhan

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) | …

Member Avatar for jephthah
0
3K
Member Avatar for mysterio

When you write "example," what exactly do you mean? You're not going to be given the answer.

Member Avatar for gkbush
1
585
Member Avatar for Dave Sinkula

[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.

Member Avatar for sneekula
0
553
Member Avatar for sk8ndestroy14

[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 …

Member Avatar for BearofNH
0
2K
Member Avatar for <1337>Me</1337>

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 …

Member Avatar for technogeek_42
0
310
Member Avatar for Rashakil Fol
Member Avatar for imkul

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 …

Member Avatar for Rashakil Fol
0
481
Member Avatar for Lardmeister

[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 …

Member Avatar for jbennet
0
564
Member Avatar for nedimavci

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.

Member Avatar for jwenting
-2
135
Member Avatar for sneekula

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.

Member Avatar for sneekula
0
226
Member Avatar for vanhelsing

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 …

Member Avatar for Salem
0
157
Member Avatar for sk8ndestroy14

Ok, I'll play. What are the rules? How much time goes on the clock?

Member Avatar for palegray.net
0
2K
Member Avatar for The Dude

The End.