- Strength to Increase Rep
- +14
- Strength to Decrease Rep
- -3
- Upvotes Received
- 386
- Posts with Upvotes
- 291
- Upvoting Members
- 130
- Downvotes Received
- 211
- Posts with Downvotes
- 128
- Downvoting Members
- 91
- Interests
- Making fun of people, hurting people's feelings, sneaking up on people and scaring them, causing them…
- PC Specs
- L-shaped
1,684 Posted Topics
Re: [quote]byt the way, why douse RAND_MAX exist if it cant be set? is there another reason?[/quote] RAND_MAX doesn't 'exist', for some definitions of the word. It just happens to be a fact that rand() will return a value that is less than or equal to whatever value RAND_MAX denotes. It's … | |
Re: Your second predicate is going to match and override whatever you do in your third predicate. You need to handle nested lists before you handle non-nested lists. | |
Re: How can you people have different opinions on TV shows than me? My gosh, you must all be retarded. | |
Re: The only good way to do this is to figure it out yourself. You've thought about using an "array," but didn't you just mention "vectors"? You might have correctly described your algorithm; now you just need to implement it. | |
Re: [QUOTE=sloan31;1458981]I'm currently majoring in computer science and taking a class in compiler design. From what I have learned so far, I can tell one thing for certain. Anyone who thinks creating a new programming language is so simple is highly naive and misinformed.[/QUOTE] It [i]is[/i] simple. You're just failing to … | |
Re: Count the total number of basic operations, those which take a constant amount of time. That's all there is to it. For example, the code [inlinecode]int Sum = 0;[/inlinecode] is 1 basic operation. Then [inlinecode]j = 0;[/inlinecode] is another basic operation. Then [inlinecode]j < i[/inlinecode] forms yet another basic operation. … | |
Re: If you feel like reading this post slowly and carefully, it will describe what this notation _really_ means. All functions have some kind of behavior as n grows towards infinity. For example, if f(n) = 1/n, then as n grows towards infinity, f(n) gets closer and closer to zero. Whereas … | |
Re: Looping up to j-2 sure looks dubious. | |
![]() | Re: Is this not sufficient? [url]http://en.wikipedia.org/wiki/Adaptive_Huffman_coding[/url] |
Re: Try a textbook on the theory of computation. They explain these quite clearly. As for your first question, the answer is yes (from what I remember). As for your second question, the answer is no, yours is not fine. In particular, the string 1 would pass your NFA, while it … | |
Re: This is an assignment for you to do, so do your own damn homework. | |
Re: It depends on the new file, and how the text layout is defined. Does RTF have a defined algorithm for kerning and paragraph layout? If not, then the behavior is specific to the particular RTF-reading application. If so, then, well, there's a spec somewhere. In general, how fonts work and … | |
Re: Some programming languages are designed so that the parser and compiler can work from top down -- that is, the meaning and compilation of a particular function depends only on the code that comes before it. C, C++, and probably Pascal work this way. Thus, the compiler doesn't need to … | |
Re: I know! Make a dynamically meta-orthogonal optimistically hyper-hybrid interpreter-optimizer. | |
Re: What do you know about linked lists? Can you implement a linked list? Do you know what you can do with one? Surely you understand what polynomials are and how adding them works. One part of the question is, how would you represent a polynomial using a linked list? The … | |
Re: > Has Lisp ever really been anything more than an academic language with very little real-life applicability? Yes. Common Lisp and a subset of its ancestors are not academic languages at all. A few people even made money with it. Scheme is (in particular) the academic lisp. > There are … | |
![]() | Re: Yep, it's C++. It gives you better ability to make and use abstractions than almost any other language and better ability to micromanage the low level than any other language (and that includes C). |
| |
Re: Here's one example where a linked list is the appropriate structure for this: hashing, with linked lists used to handle collisions. Or any other situation where the linked list is short. | |
Re: It depends on the requirements for the game. | |
Re: The main problem is that all your code is in one function, making it difficult to reason about. You need to design your code around the limitations of your brain. Also, you end up with an empty stack because you never check if your stack is empty. | |
Re: I think a good place to start is the book by Koenig & Moo, Accelerated C++, if you think your class is easy. Maybe you'll still think it's easy and useless, because it's designed to teach the language and not e.g. how to use libraries to build certain kinds of … | |
Re: The actual information you learn won't be particularly important. I think the artificial intelligence specialization will affect you in ways that make you a better all-around programmer. Data science takes you outside of tough programming and throws you into some statistics, that isn't really particularly interesting, and is the sort … | |
Re: > Software Development is something I enjoy but I feel like I am more of an ideas person and may not get all the satisfaction I require from work by simply writing code for years on end. This is code talk that says you suck at programming. So I perused … | |
Re: 1. The typical practice is to store the password in plaintext. And this is okay, frequently. 1a. Store the password in plaintext on a usb drive. 2. A better practice is to store the password encrypted and have the encryption key hardcoded into the application -- this is not cryptographically … | |
Re: You should look for interviews with and documents written by the designers of these languages. | |
Re: There is no difference in behavior between the two. Both declare a variable "a" and give it the value 10. | |
Re: Yeah, on most systems nowadays you can get away with modulus. But I've been burned by that kind of assumption when porting between different systems before, so personally I would rather divide. Or just use <random> now. | |
Re: If you want to master data structures, a few good first baby steps would be to get good at basic data structures in C or C++ (graphs, trees, etc, using a common first text like CLRS or some other), then learn a bit about functional data structures by reading Okasaki … | |
Re: OP, I think you might enjoy the series of challenges at http://microcorruption.com/ . It is a good introduction to this sort of thing. | |
Re: The reason is that the language is simpler to understand if every case clause has fall-through behavior. If `default:` sections didn't have full-through behavior (on entry), that would be surprising to people because that's different behavior than what you get with all the other clauses. Also, if such was the … | |
Re: The transformation you have given isn't well-explained. What would be the output if the input were the following: [code] ABC 1000 10 BUY ABC 500 10 SELL [/code] | |
Re: This question should go in a new thread, not as a reply to somebody else's thread. | |
Re: Hello Sean Fuoco. You are now prohibited from using your timer class. By posting your code, you have granted DaniWeb an exclusive copyright license to your code according to DaniWeb's terms of service. You may no longer use it and have no rights to you code. Please delete your code … | |
Re: [QUOTE=POW]I need help with my big integer calculator program.[/QUOTE] Okay. [QUOTE=POW]The program should receive two large integers using vectors and calculate the sum, difference, product, and quotient o the two integers.[/QUOTE] Okay. [QUOTE=POW]The main file is:[/QUOTE] Okay. [QUOTE=POW]The header file is:[/QUOTE] Okay. What do you want? | |
| |
| |
Re: Croft: Web design only needs a text editor, such as Notepad (or Vim or jEdit or ...), because HTML is a textual language. There are many of them, and you can figure out how to use a search engine. Also useful may be an image editor -- The GIMP is … | |
Re: A randomly assigned password I received, and a nonsense syllable. | |
Re: Regardless, C++ is still hell on a new programmer. It's probably not the case that for their first game or two they need to avoid a garbage collector. | |
Re: As far as the C# language's prettiness goes, dudeserius's post gives a poor example. Lots of well-written C# is much prettier and much more readable than that. He's working with a particularly poor API in that example. [quote=Lardmeister] It is always good not to be tied to just the Microsoft … | |
Re: Probably you were expected to assume the name didn't have any spaces in it, and do ```char name[100]; scanf("%99s\n", name); ``` The way the code in your post works is that it matches a sequence of characters that are not `\n`. The `%[^\n]` format specifier works a bit like a … | |
Re: Why are the circles pointing at each other? Am I going to get virused? HELP! IM SCARED | |
Re: It depends on the company. What you've listed are all basic pieces of knowledge that don't tell anybody whether you're a good programmer or not. Any reasonable company would be happy to hire a good C programmer, for example, if they wanted somebody good at writing C++. Certainly such a … | |
Re: [QUOTE=Kiba Ookami]I can see Java having to be around, for web-based applications,[/QUOTE] That's not where Java shines. [QUOTE=Kiba Ookami] and Visual Basic for teaching programming fundimentals,[/QUOTE] What????????????? ???????? ?????? ~cries~ (The problem with Visual Basic, as a relative of mine who uses it jokes, is that it's "just not nerdy … | |
Re: You could use a binary search algorithm. (It would be easy to name better ways, but Meh.) |
The End.