Search:

User: trent.josephsen; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: Problem with my output in my Assembly program. Area of a Trapezoid.

    That was my first thought, too, but the ABI says that floating point parameters are passed in xmm0 through xmm7. It looks like OP is doing it right, although I haven't walked through it to know for...
  2. Re: Problem with my output in my Assembly program. Area of a Trapezoid.

    The thing that jumps out at me immediately is that you're using addss with double-precision floats, which might partially explain the area being wrong.

    Also IIRC %lf is the wrong printf format for...
  3. Replies
    6
    Views
    368

    Re: Am I being stupid?

    test is a shell command:

    $ which test
    test: shell built-in command

    Type ./test to make sure you're running the file in the current directory.
  4. Replies
    5
    Views
    450

    Re: C++ and Java and Games

    Here's a recent /r/Minecraft thread you might find interesting, but take TheRuiner_'s top level comment as a warning.

    Notably, Java doesn't have to be slow. Minecraft's performance issues are...
  5. Replies
    11
    Views
    456

    Re: Python and Go and the Binary

    Yes, I'm sure you're right about that. The comparison to freeze was inappropriate. (There's a reason I don't normally post before noon.) But what I should have said was that Go "binaries" still have...
  6. Replies
    11
    Views
    456

    Re: Python and Go and the Binary

    Go doesn't exactly compile to binary in the same sense as C.



    In other words, Go is "compiled" in a manner somewhat analogous to how py2exe and freeze work. This is basically the only way to...
  7. Re: Becoming a better programmer: depth or breadth of knowledge recommended?

    No, that's practically the exact opposite of refactoring. Refactoring is making small incremental changes that alter the code's structure but not its content, and is generally much more difficult...
  8. Re: Becoming a better programmer: depth or breadth of knowledge recommended?

    Fairly recent although brief thread on this very topic. Two comments I liked:
  9. Replies
    3
    Views
    336

    Re: System Calls? Ubuntu.

    A system call is by definition a kernel feature, so if there are differences between those available on different distros, it's because the distros use different kernels. This could be due to...
  10. Replies
    26
    Views
    2,047

    Re: Selecting a programming language

    Added to my original post. Couldn't think of anything to say about PL/1 or Rexx, though, and some of them are beginning to stretch a bit.


    Good point.

    It's also important to realize that most...
  11. Replies
    26
    Views
    2,047

    Re: Selecting a programming language

    Well, for instance, when someone I don't know suggests Java to a new programmer, I assume that Java is the only programming language they know.
    If you suggest Python, I assume you're just repeating...
  12. [SOLVED] Re: move cursor back to previous search in vi

    That's easy. Way too easy; I'm always doing it by accident. It took a long time for me to figure out exactly what typo it was.


    q:
  13. [SOLVED] Re: move cursor back to previous search in vi

    Not as such, but you can hit 'q' to stop the search-and-replace and 'u'ndo only the last replacement, then continue with something like one of these:

    :6,$s/word/123/gc (replace from line 6 to...
  14. [SOLVED] Re: Python - List Comprehension Problems

    True for Python 2, but not for Python 3.
  15. Replies
    36
    Views
    1,255

    Re: Can`t write a simple C program

    Have you programmed before? C is a challenging language; you cannot go from "hello, world" to making a chess AI in a couple of days. It would be difficult even for someone who was already an expert...
  16. Re: sorting a million numbers in 10 memory locations

    100 billion (10^8) is the number of unique 8 digit numbers, starting with 0 and ending with 99999999. That's because the original Stack Overflow post specified "8-digit decimal numbers". That's the...
  17. Re: sorting a million numbers in 10 memory locations

    No, that post won't extend to sorting one million numbers with less than a hundred bytes (skip to bolded text for caveats) but forgive me if I talk about it anyway, because I think it's a very neat...
  18. Replies
    3
    Views
    329

    Re: Linux Kernel

    Those first two lines don't appear in the given source code listing, so either you are misrepresenting the error message, or the code you're compiling is different from the code you posted. Please...
  19. [SOLVED] Re: Python - Caeser Cipher encryption function not working with string bigger than 1

    I'd lose the [ ] -- they just cause the characters to be collected in a list first, which has no advantage. str.join takes any iterable, so a plain generator is more Pythonic than a list...
  20. [SOLVED] Re: Python - Caeser Cipher encryption function not working with string bigger than 1

    A couple of things stand out:

    m = str
    Not sure what you meant here, but I'm pretty sure this wasn't it.

    cipherText = addchr(keyValue, m)
    If you delete "m = str", this will encrypt the...
  21. [SOLVED] Re: unable to 'git push' to my github account(using First time)

    The command you posted isn't consistent with the error message:

    git remote add origin https://github.com/IAMTubbby/Hello-World.git

    error: The requested URL returned error: 403 while accessing...
  22. [SOLVED] Re: Math.floor() returns int in Windows, but returns double in Linux?!

    The PEP you linked doesn't back up that assertion:

    I'm pretty sure there was never any intention to make python refer to python2 forever.
  23. Replies
    10
    Views
    776

    Re: Learning C

    "unsigned" means that a type can only hold nonnegative values. A "regular" or signed int can hold (at least) any integer from -32768 to +32767, but an unsigned int can hold the integers from 0 to (at...
  24. Replies
    10
    Views
    776

    Re: Learning C

    Nah, it's just that the author doesn't apply his criticisms of K&R to his own code. Specifically,


    printf("%s", foo);
    has undefined behavior if foo is NULL or points to an unterminated string,...
  25. Replies
    10
    Views
    776

    Re: Learning C

    I looked through Learn C the Hard Way, and it seems ok. It takes an editorial tone in places that I feel it should lose. The bit at the end where the author castigates K&R for defining functions that...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4