1,684 Posted Topics
Re: [QUOTE=mrstrong11;1023551]Hi, my name is Strong(such a cool name :]), and I am a high school student looking for career path to follow.[/QUOTE] Psh, Strong is nothing -- check out the names of Alan Grayson's children: [url]http://grayson.house.gov/about/[/url] [QUOTE=mrstrong] I have found that computer engineering may be an fun and interesting career, … | |
Re: Sometimes the standard library makes life easier: [CODE]#include <algorithm>[/CODE] [CODE]/* Random shuffle */ std::random_shuffle(seq, seq + N);[/CODE] Obviously not useful since we already have an implementation, but useful if you'll need it elsewhere. | |
Re: You have syntax errors and the error messages should make the problem quite clear. | |
Re: You could try learning how to read. He has (or had) three days to pick a title, not to do the entire project. | |
![]() | |
Re: Learn how to explain things. | |
![]() | Re: I think the idiot button would be preferable, especially if it sent the user a PM telling them that somebody (who gets to remain anonymous) marked them as an idiot, every time somebody does. Then, for users who have been marked as an idiot by 5 or more people, the … |
Re: Just rewrite that section of the program. It's only a couple hundred lines of code. | |
Re: Um, show us some real code? We're not going to debug pseudocode, that's a waste of time. | |
Re: It's mostly a question of constant factor speed and memory allocation. A real fast heap implementation won't use the packed-in-array representation though, since that's not cache-friendly. Instead they'll use a tree of packed-in arrays. Either way, there's no need to worry about rebalancing or all the other ugly problems BSTs … | |
Re: What? No it can't. You're totally confused and I don't know where to begin except to say look at what the flyweight pattern is. | |
Re: [QUOTE] [I]Where do people get the public key?[/I] You get it (possibly indirectly) from the sender. This does two things: First, it allows you to decrypt the signed document. Second, because it [B]does[/B] allow you to decrypt, you know that it did indeed come from the sender who gave you … | |
Re: C++ is. It's complicated and subtle. | |
Re: Ugh, Tango. Why are you using Tango? > Currently I'm trying to send some text between a Client & Server script, Then execute the text in the native shell. Haha, this is a terrible idea (in general). > Slave.d(20): Error: function tango.stdc.stdlib.system (char*) does not match parameter types (uint) Slave.d(20): … | |
Re: This is an excellent example of the retardedness and overcategorization of design patterns. The "builder" is just a function. The "director" is the thing that uses that function. So this "design pattern" is just fancy way of describing one particular case where you use the behavior of one function to … | |
Re: Abstract is not a verb. How you approach this problem depends on what your goals are, which affects whether you'd rather have a high false positive rate or a high false negative rate. The proper general approach to your question also depends on the age of the people you're assessing. … | |
Re: You can find your answers at [url]http://en.wikipedia.org/wiki/Design_pattern_(computer_science[/url]) | |
Re: You have each child parsing function return the representation for the thing it has parsed. Then you combine the children return values into your return value. So the children will return trees and you'll combine these trees into a root node. | |
Re: [QUOTE=mike_2000_17;1302362]Finally, in _mergeSort, erasing elements from the vector "lhs" and "rhs" is useless and might very well destroy your performance by adding a O(N) complex calls in the middle of your merge loops, I haven't worked out the math or a test-benchmark, but I doubt it remains O(NlogN).[/QUOTE] It makes … | |
Re: I take it you mean that [icode]display(...)[/icode] is not producing any output, other than a newline. You could figure out your problem by adding a few statements to that function that print out useful information like whether the list in question is empty or not. You could add a [icode]display(...)[/icode] … | |
Re: The errors were caused by the C++ code that the original poster wrote, which is intermingled inside the output of flex++, so C++ would still be the appropriate forum. | |
Re: [QUOTE=Vexx] natural language (see example below),[/QUOTE] It's called "English," <<snip>>, do you speak it? Sorry, couldn't resist. [1] [QUOTE=Vexx] [B]flow charts[/B], [/QUOTE] <<snip>> [QUOTE=Vexx]psuedocode[/QUOTE] <<snip>> [QUOTE=Vexx]control tables[/QUOTE] <<snip>> . . What I don't get is you talk about horrible ways of representing algorithms. Here is the tried and true good … | |
Re: [QUOTE=firstPerson;1299215]I beg to differ, C++ is not an OO language.[/QUOTE] What do [i]you[/i] call the set of languages that support classes, inheritance, and runtime polymorphism? Unless you're planning on sperging out some "C++ is multiparadigm" crap, or unless you're a dynamic language weenie, there's no way you can say C++ … | |
Re: You want to convert the program to a data file? What does that even mean? | |
Re: Why don't you think of the efficient way. Here are your sets A and B. Do these by hand and see if you can think of anything. A = [0,83,71,39,9,34,77,20,86,9,82,45,88,44,34,38,24,61,48,3,96,66, 47,1,95,54,83,49,9,5,78,78,47,98,54,6,3,1,74,87,1,75,100,18,21,94, 19,15,4,78,72,48,63,56,18,31,83,84,5,65,54,88,38,93,83,16,11,21,80,84] B = [17,85,78,41,85,56,9,12,83,100,59,66,56,86,66,82,98,92,14,43,96,69, 57,21,97,76,10,72,5,20,20,10,29,37,89,92,71,42,41,58,19,23,30,79,91,67, 57,48,77,11,98,92,60,87,93,48,28,37,3,48,43,58,62,10,10,18,35,28,20,2] | |
![]() | Re: In the long run (where "long run" means 10-20 years), gun rights don't matter. Once desktop manufacturing becomes affordable, people will be able to download whatever kind of weapons they want. |
Re: Erm, [code]if (num > max) { max2 = max; max = num; } else if (num > max2) { max2 = num; }[/code] | |
Re: This is the dumbest news story ever written in the history of Daniweb. | |
| |
Re: This is probably the best-written project idea request I've seen on this forum. The answer, of course, is to figure it out yourself :-) A good way to think of an idea is to just think of bad ideas. Just make a list of ideas that you don't want to … | |
Re: so posting your gender is indeed against the rules | |
Re: Draw lines between every pair of points, order lines by number of points covered or nearly missed, remove lines with the fewest intersections until no more can be removed. Optimal solution not guaranteed. This is an n^2 log(n) algorithm though. | |
Re: If you're a fan of it, you should know more about it than us. | |
The control panel's links point to the first page in a thread. Which is bad. | |
Re: Nobody can, unless you are lucky enough to run into somebody who's an expert on both Swing and Racket. See [url]http://docs.racket-lang.org/[/url] and look at the GUI toolkit documentation. Racket's documentation is excellent. | |
Re: [QUOTE=gunbuster363;1269637]I have to learn cobol[/QUOTE] Haha. | |
Re: How about a cryptographically secure assassination market? | |
Re: [QUOTE=md16185]It seems that alot of forums are too afraid to allow HTML, are people just being paranoid?[/QUOTE] It seems that alot of computer users are too afraid to open attachments sent to them from random addresses, are people just being paranoid? Daniweb _could_ allow a limited subset of HTML, but … | |
Re: What if the smaller list were sorted? Would you be able to do it then? | |
Re: Yep, it's an interesting problem. How about that. | |
Re: Dealing with the syntax is the easiest part of programming and of learning how to program. > There is a balance between making programming languages look like natural languages and having them be as unambiguous as possible. I would disagree, completely. There is no reason to make programming languages look … | |
Re: All countries allow the brutal slaughter of animals, some just don't allow humans to do it, and it has nothing to do with improving the general animal condition and has everything to do with hating on sociopathic humans. | |
Re: Okay. Just learn these things. 1. Learn how to program. 2. Learn how to program C. 3. Learn how to write a compiler, and make one that creates i386 executables. 4. Study these books: [url]http://www.amazon.com/An-Application-Security-Reading-List/lm/R2EN4JTQOCHNBA/ref=cm_lmt_srch_f_1_rsrsrs1[/url] and read academic papers in the field. | |
Re: Linux is written in C. Look at its scheduling algorithm and see how it could be improved. | |
| |
Re: This seems like a reasonable list. | |
Re: Ignore all these scrub posters and use Horner's algorithm. |
The End.