No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
14 Posted Topics
Re: Code Style --------------- Comments are useful for telling people WTF this code is supposed to do, but there's another aspect to readability - formatting! Most languages allow a programmer to write code that is perfectly legal according to the syntax rules of the language, but is nonetheless a snarled and … | |
Re: [QUOTE=MAD_DOG]Just curious what exactly is Haskell sounds just about right but I cant remember what it is exactly let me know this time I am asking you the question. haha[/QUOTE] Haskell is a functional programming language. Similar in that respect to LISP or Scheme, but it is a lot more … | |
Re: (Google turned up this thread for me...) Same problem. I've tried it by typing right into Python, from the Windows shell (cmd.exe) and from a Cygwin bash shell, and got slightly different behavior in each case, but either way the PyGame window is unresponsive. [CODE=Python]import pygame a = pygame.display.set_mode((400, 300)) … | |
Re: [code=Python] x = initial_value x_last = x threshold = minimum_change MAXITER = maximum_iterations_desired iterations = 0 while iterations < MAXITER and x - x_last > threshold: x_last = x x = iterate(x) # x now holds your result [/code] Using [icode]break[/icode] and [icode]continue[/icode] is overcomplicating things, IMO. | |
Re: [QUOTE=rixius]only 9,472,710,129,612,967,086,019,848,437,700,000,000 possible combinations...[/QUOTE] lmao. Might I just bring this down to earth a bit and ask if you don't think that many bafrickingzillion possible distinct hashes will be ENOUGH?? | |
Re: [QUOTE=Toba]Hrm.... truly random data is harder to find than I thought. <grumbles>[/QUOTE] lol. Winzip doing a pretty good job, huh? | |
Re: Consider the definition of a stack - last-in, first-out. If you load a bunch of stuff into a stack, and then take it all out again, you now have your original items *in reverse order*. | |
Re: [QUOTE=aviral82]hi all , i have to create an ellispe the inputs are major axis , minor axis , and the angle of the major axis the ellipse needs to be tilted. thanks aviral[/QUOTE] Construct the formula for the ellipse in standard position, and then use an affine transformation to rotate … | |
Re: Take the points (1,1), (1,-1), (-1,1) and (-1,-1). Stretch the set to however wide/tall you need, then run all four through x *= cos(a); y *= sin(a); It's the same principle as in the rotated-ellipse problem. | |
Re: [QUOTE=cscgal]There are two types of computer programming errors ...[/QUOTE] The [b]Maintenance-Time Error[/b] The original author didn't comment, used crappy and inconsistent code style, and obfuscated because it made him/her feel clever. So now when the system needs updating, the new team of coders takes one look at the codebase and … | |
Re: [QUOTE=Chainsaw]How many digits of base-36 numbers do you need?[/QUOTE] That's exactly the question that logarithms will answer. Were invented to answer. Going back to the definition: a^x=b --> log_a(b)=x, we have 36 as the base, and we know the result of the exponentiation is something in the vecinity of 4B. … | |
Re: [QUOTE=Chainsaw]Not in Notepad, no. In a hex editor, maybe with a ton of patience.[/QUOTE] Does Windows filter the input so much that typing ALT+(ASCII) codes won't produce the right results? *Nuez goes to check. Yeah, guess it does. :rolleyes: | |
Re: For obvious reasons I can't recite code from memory that'll do what you're asking for, but there does exist a regexp-->DFA algorithm...on paper. You're probably already familiar with it, it's the one where you create a start edge labelled with the original expression, and then perform a sequence of splits/branches/loops … |
The End.