Posts
 
Reputation
Joined
Last Seen
Ranked #51
Strength to Increase Rep
+14
Strength to Decrease Rep
-3
66% Quality Score
Upvotes Received
386
Posts with Upvotes
291
Upvoting Members
130
Downvotes Received
211
Posts with Downvotes
128
Downvoting Members
91
213 Commented Posts
~810.94K People Reached
Interests
Making fun of people, hurting people's feelings, sneaking up on people and scaring them, causing them…
PC Specs
L-shaped
Favorite Tags
c++ x 602
c x 140
java x 64
c# x 49
Member Avatar for moderate_rock48
Member Avatar for humbug

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

Member Avatar for yw_046
2
30K
Member Avatar for BlackIris

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.

Member Avatar for fgmart
0
2K
Member Avatar for samaru

How can you people have different opinions on TV shows than me? My gosh, you must all be retarded.

Member Avatar for thompsonmax
1
3K
Member Avatar for djbsabkcb

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.

Member Avatar for jacklin
0
2K
Member Avatar for mikeandike22

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

Member Avatar for VEGETA_DTX
1
2K
Member Avatar for Rose Aashii

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

Member Avatar for Ali_84
0
2K
Member Avatar for rupali

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 …

Member Avatar for jamie_13
2
49K
Member Avatar for se00an
Member Avatar for elektro123

Is this not sufficient? [url]http://en.wikipedia.org/wiki/Adaptive_Huffman_coding[/url]

Member Avatar for Zlatan25
0
3K
Member Avatar for kantze

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 …

Member Avatar for adityasai79
0
797
Member Avatar for playagain
Member Avatar for priya..
-2
12K
Member Avatar for furalise

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 …

Member Avatar for Rashakil Fol
0
259
Member Avatar for Siberian

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 …

Member Avatar for Rashakil Fol
0
343
Member Avatar for hertzzz

I know! Make a dynamically meta-orthogonal optimistically hyper-hybrid interpreter-optimizer.

Member Avatar for Rhay_1
0
1K
Member Avatar for vuquanghoang

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 …

Member Avatar for Smita_1
0
875
Member Avatar for Jack_11

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

Member Avatar for Schol-R-LEA
0
364
Member Avatar for vjcagay

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

Member Avatar for vegaseat
-1
4K
Member Avatar for Gayal
Member Avatar for cblue

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.

Member Avatar for drussell024
0
3K
Member Avatar for loken
Member Avatar for ramyking

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.

Member Avatar for أحمد_9
0
860
Member Avatar for MrSchmutz

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 …

Member Avatar for Anton_4
0
251
Member Avatar for mvd3

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 …

Member Avatar for kemal.eksi.7393
0
227
Member Avatar for asif49

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

Member Avatar for Wandaga1
0
343
Member Avatar for david.1982

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 …

Member Avatar for JOSheaIV
0
553
Member Avatar for Đăng

You should look for interviews with and documents written by the designers of these languages.

Member Avatar for mike_2000_17
0
424
Member Avatar for Sahilsikka

There is no difference in behavior between the two. Both declare a variable "a" and give it the value 10.

Member Avatar for DonnSchwartz
0
193
Member Avatar for lewashby

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.

Member Avatar for deceptikon
0
214
Member Avatar for hydra.p

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 …

Member Avatar for Rashakil Fol
0
302