1,684 Posted Topics

Member Avatar for mrstrong11

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

Member Avatar for vegetablevn
0
171
Member Avatar for xshashiy

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.

Member Avatar for DKdontKNO
0
550
Member Avatar for BboyRodimus
Member Avatar for NormR1
0
279
Member Avatar for prajakta cool
Member Avatar for t_tanweiboon

You could try learning how to read. He has (or had) three days to pick a title, not to do the entire project.

Member Avatar for Rashakil Fol
0
186
Member Avatar for Ajantis
Member Avatar for monstercameron
Member Avatar for diafol

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 …

Member Avatar for Lusiphur
0
354
Member Avatar for emclondon

Just rewrite that section of the program. It's only a couple hundred lines of code.

Member Avatar for Dani
-1
282
Member Avatar for kebbby
Member Avatar for Momerath
0
106
Member Avatar for gidireich

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 …

Member Avatar for griswolf
0
84
Member Avatar for johndoe444

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.

Member Avatar for Rashakil Fol
0
106
Member Avatar for oracleruiz

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

Member Avatar for Rashakil Fol
0
142
Member Avatar for 0x69
Member Avatar for Syphilis

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

Member Avatar for Rashakil Fol
0
76
Member Avatar for johndoe444

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 …

Member Avatar for Rashakil Fol
0
173
Member Avatar for beforetheyknew

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

Member Avatar for beforetheyknew
0
363
Member Avatar for johndoe444

You can find your answers at [url]http://en.wikipedia.org/wiki/Design_pattern_(computer_science[/url])

Member Avatar for pritaeas
0
86
Member Avatar for mrkaran

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.

Member Avatar for Rashakil Fol
0
45
Member Avatar for mrnutty

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

Member Avatar for Rashakil Fol
0
882
Member Avatar for gaurav_13191

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

Member Avatar for gaurav_13191
0
95
Member Avatar for mrkaran

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.

Member Avatar for Rashakil Fol
0
98
Member Avatar for tressureme

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

Member Avatar for Rashakil Fol
-4
829
Member Avatar for nbaztec

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

Member Avatar for mrnutty
0
573
Member Avatar for shoebansari
Member Avatar for Rashakil Fol
0
63
Member Avatar for gaurav_13191

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]

Member Avatar for Rashakil Fol
0
136
Member Avatar for diafol
Re: Guns

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.

Member Avatar for jon.kiparsky
0
661
Member Avatar for m7r23

Erm, [code]if (num > max) { max2 = max; max = num; } else if (num > max2) { max2 = num; }[/code]

Member Avatar for jeevsmyd
0
185
Member Avatar for VanessaRyan
Member Avatar for zombiegirl
Member Avatar for programboy

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 …

Member Avatar for Nick Evan
0
339
Member Avatar for newsguy
Member Avatar for jjemphoung
Member Avatar for Mrinny

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.

Member Avatar for Mrinny
0
177
Member Avatar for dan345
Member Avatar for Rashakil Fol
Member Avatar for bluejamesbond

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.

Member Avatar for bluejamesbond
0
186
Member Avatar for gunbuster363
Member Avatar for cherrylacido
Member Avatar for Nick Evan
-2
91
Member Avatar for md16185

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

Member Avatar for Oamaok
0
636
Member Avatar for stevebush

What if the smaller list were sorted? Would you be able to do it then?

Member Avatar for AuburnMathTutor
0
110
Member Avatar for arkoenig
Member Avatar for monstercameron

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 …

Member Avatar for 0x69
0
263
Member Avatar for Famous16
Member Avatar for cwarn23

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.

Member Avatar for GrimJack
1
453
Member Avatar for 1NJ3CT3D

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.

Member Avatar for peter_budo
0
92
Member Avatar for kebbby

Linux is written in C. Look at its scheduling algorithm and see how it could be improved.

Member Avatar for AuburnMathTutor
-1
110
Member Avatar for ellioth_13
Member Avatar for ellioth_13
-1
100
Member Avatar for khess
Member Avatar for arthurav

The End.