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