Forum: Legacy and Other Languages May 9th, 2008 |
| Replies: 5 Views: 4,644 Re: Pascal's Triangle I suppose anything is cryptic if you make no effort to understand it.
Even so, your statement is very odd. Apparently you are under the mis-apprehension that your failure to understand is the... |
Forum: Legacy and Other Languages Apr 28th, 2008 |
| Replies: 5 Views: 4,644 Re: Pascal's Triangle These seem rather elaborate in comparison to something like (in J):
Pascal =: i. !/ i.
See http://www.jsoftware.com/jwiki/NYCJUG/Projects/Pascal or... |
Forum: VB.NET Apr 24th, 2008 |
| Replies: 4 Views: 419 |
Forum: Pascal and Delphi Apr 24th, 2008 |
| Replies: 6 Views: 1,004 Re: Generate N random different numbers I hope you noticed, though no one commented on it, that the suggestion I made scales much better than the original algorithm. That is, if you're doing this for 10,000 numbers instead of 10, the... |
Forum: Software Developers' Lounge Apr 13th, 2008 |
| Replies: 6 Views: 623 |
Forum: Pascal and Delphi Apr 12th, 2008 |
| Replies: 6 Views: 1,004 Re: Generate N random different numbers The problem is that, apparently, what you really want is a permutation - it looks like you want only 10 random numbers between 1 and 10. There are any number of ways to do this. One is to go to... |
Forum: Legacy and Other Languages Mar 10th, 2008 |
| Replies: 3 Views: 715 Re: Running an equation a million times Try summing the results of the equation - printing out a million things is absolutely useless - then dividing by 1e6 at the end of the loop. Better yet, use an array-based language to avoid finding... |
Forum: Computer Science and Software Design Feb 22nd, 2008 |
| Replies: 3 Views: 588 Re: Bits Assuming by 256MB you mean 2^28, you'd need 28 bits to address all the bytes; to address only words, you'd need (2^28)/16 = (2^28)/(2^4) = 2^24, or 24 bits.
However, the number of bits needed... |