Search results

  1. A

    bind() to INADDR_LOOPBACK

    As a matter of fact, the first line in my little test is "bzero(&addr.sin_zero, sizeof addr.sin_zero)" I thought you had omitted it for clarity. Since the field is named sin_zero, pretty much every socket guide I found fills it with zeroes, even though the latest POSIX spec omits the field...
  2. A

    bind() to INADDR_LOOPBACK

    I haven't a damn clue, but it can't be a universal problem since the same code runs fine on my machine, also running 10.3.4.
  3. A

    bind() to INADDR_LOOPBACK

    Are you sure you can't bind to INADDR_LOOPBACK? I just tried it with sin_family==AF_INET, sin_addr.s_addr==INADDR_LOOPBACK and sin_port==9876, and I could connect to 127.0.0.1 and receive data without any problems. Could you tell us more about what kind of errors you're getting?
  4. A

    Md5?

    There's documentation, all right. You have to use 'man 3 md5'. The 3 indicates that you're interested in C function calls instead of shell commands. The docs for MD5() are pretty straightforward: unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md); MD2()...
  5. A

    Omikron Basic or similar, need feedback

    http://python.org/ It only bears a passing resemblance to BASIC, but frankly, BASIC isn't that great to begin with. More modern scripting languages are a better choice to learn. http://www.ruby-lang.org/en/ I haven't used this one personally, but programmers at iDevGames are quite fond...
  6. A

    Help file for app... using a PDF?

    Use one of NSWorkspace's methods for launching a file. This is how the open command is actually implemented. Oh, and he's right. Avoid PDF unless you're trying to produce printables...
  7. A

    Associate shell script as "Open With" application?

    The app has to be in a valid .app bundle. It is possible to embed that shell script into an app bundle so it appears as an application, but you won't be able to have it open files, since the open-file mechanism involves Apple Events. Try making an Applescript application instead. Make...
  8. A

    [_outlet setString:@"testing"]; // selector not recognized

    setString: is for NSText, which is the class used for an NSTextField's field editor while it is being edited, and for the NSText subclass NSTextView which can display and edit styled text as in TextEdit. Look up Exception Handling. An exception is raised when an object is sent a message it...
  9. A

    Where is my brace ?

    If you set your keyboard layout to US, the braces and pipe are the three keys directly below the Backspace key.
  10. A

    new language

    The shebang line should be #!/usr/bin/perl -w The -w flag tells perl to report errors to you instead of silently ignoring them. This helps tremendously when debugging your program, which is pretty much all the time. Oh, and I agree. BASIC sucks. You're better off with a language which...
  11. A

    65k array limit on G4 ?

    The default limit for the entire stack is 8192k. This can be discovered using the shell command 'ulimit -s' or modified using the C functions getrlimit()/setrlimit(). The limit for allocating memory using malloc() is bounded by the system's available memory and paging file. And yes, you can...
  12. A

    65k array limit on G4 ?

    double * x = (double *)malloc(65200 * sizeof(double)); //blah blah free(x);
  13. A

    Perl and Flush ...

    Did you remember to put \n when you print each line?
  14. A

    Closing safari windows

    mywindow = window.open(url) mywindow.close();
  15. A

    System-wide keyboard hook in OS X?

    You get to hack the windowserver. Find the keyboard input routine, and use APE Lite and a windowserver bundle to override it with your own handler.
  16. A

    PHP and code-behind pages

    Since you already know about code-behind, try applying it to PHP - make a file full of variables or whatever which contain portions of your page's content. Then make another file of PHP code which creates a complete web page from those variables.
  17. A

    PHP and code-behind pages

    You can code in a style that separates content from logic, but PHP has no built-in provisions for making a HTML page programmatically accessible the way ASP does. For the record, ASP code-behind does use separate files for HTML UI and logic, and ASP uses custom HTML extensions to signify which...
  18. A

    Good script language to learn?

    Did nobody mention python? It's a refreshing break from languages that have you abuse curly braces, and its array syntax is just sweet, sweet candy.
  19. A

    makeWindowControllers Problem

    You have to call [controller window] to actually load the window.
  20. A

    Mac OS 9

    Yeah, your first stop in your quest for programmers should be the bank.
Back
Top