Search results

  1. A

    PHP: Reverse Listing... reverse sort?

    Well, yeah. The easier way is to read the directory into an array, then loop over the array in reverse order, processing and/or outputting each element.
  2. A

    stupid question about Mac OS X and python

    In emacs, you can type Escape, x, shell-command, enter, then enter a command that runs your script. Option-x works for Escape-x if you have enabled the appropriate "Use option key as meta key" option in Terminal, or if you are using the OS X GUI port of emacs.
  3. A

    compiling c++

    Okay....um...you said you have the Developer Tools. Have you installed them?
  4. A

    Internal SCSI Hard Disk in a blue G3 works in 9 but not X

    Try going to your SCSI card's manufacturer's web site and looking for OS X firmware updates, drivers, or similar software. My mother's Quicksilver G4 had a similar problem, and a poorly-designed firmware upgrade from Orange Micro solved it. If that fails, tell us who made your SCSI card and...
  5. A

    UNIX Newbie Question About "TOPS"

    tops is a command designed for programmers which does massive name-changes on selectors, variable names, function calls, etc. You would use this after renaming some global identifier so that all your source uses the new name. tops is useful because the regular expressions for replacing Obj-C...
  6. A

    Making a sheet from a subclass of NSWindow

    Try instantiating your GPGPassphrasePanel in your document's nib. Perhaps there's something awry with creating it programatically. Do you mean to say that in your panel's init method or whatnot, it attempts to load a nib of its own?
  7. A

    Making a sheet from a subclass of NSWindow

    What code are you using to bring up the sheet? If you are using IBOutlets, have you made sure to use them only during or after -awakeFromNib is called?
  8. A

    Making a sheet from a subclass of NSWindow

    Try making a NSPanel subclass. NSPanel is an NSWindow subclass adapted for sheets and utility windows.
  9. A

    The D programming language

    Actually, memory management in C++ is quite confusing compared to plain C, due to the ability to pass objects by reference, and allocate temporary objects on the stack. This requires you to copy every object you find, lest your caller pass you an object in his stack frame and return later. On...
  10. A

    file streams...

    I looked at that code again, and it seems you're still opening infile multiple times. And with two different files, no less. This line creates AND opens infile on the file build/before.txt: ifstream infile("build/before.txt"); This line, which followed it, opens infile a second time on a...
  11. A

    file streams...

    Umm...are you using Codewarrior or Apple's dev tools? With Codewarrior and Carbon iostreams, I believe the directory separator had to be a :, as in "build:before.txt". Also, what is the exact text of the error message you're getting?
  12. A

    file streams...

    You do not need infile>>counter. This statement reads a formatted integer from infile. What you are trying to read is spaces, not formatted integers. Check the location of your executable and your files relative to it. Is there really a "build" folder in the same folder as the program? Is...
  13. A

    file streams...

    Since you didn't put your example in code or preformat tags, your indentation was removed. I can only assume that you meant to replace an initial run of spaces with a number equal to the number of spaces removed. What you would have to do is read an individual character with infile.get() and...
  14. A

    file streams...

    If you enclose your code in vB code tags and disable smilies for your post, your code will be much more legible. In this line, you create an ofstream object and open it to the file "after.txt" with the default mode ios::out. ofstream outfile("after.txt"); A side effect of opening the...
  15. A

    PowerBook and Ettercap

    Your Linksys might also be a switch. If it is, it will only forward packets through ports which their destination is on. Both you and a computer whose traffic you want to sniff would have to be on the same port. You may be able to disable this feature of the router using ARP cache poisoning.
  16. A

    Interface Builder

    Go read the docs again. It's -tabView:willSelectTabViewItem:. This way it tells you which NSTabView and which NSTabViewItem it is talking about. Each NSTabViewItem has an associated view which holds its contents. You can get this view with [tabviewitem view], and get its size with...
  17. A

    Interface Builder

    Sure. Just implement -tabView:willSelectTabViewItem: in your NSTabView's delegate, and have it resize the window appropriately.
  18. A

    bit reading instead of byte reading ...

    Generally, modern computers have enough memory that you don't need to go pack several data fields into a byte. If you need 29 bits of data, just use a 32 bit int. The extra three bits aren't much of a loss. A long long can hold up to 64 bits. If you need more than 64 bits, you generally will...
  19. A

    bit reading instead of byte reading ...

    Another thing you could do is define a struct full of bit fields, and read your data as that struct, like so: struct pseudo_fs { unsigned int two_bits:2, fifteen_bits:15, fifteen_more_bits:15, and_then_three_remaining_bits:3; }...
  20. A

    Adding image in a tableview

    cbaron: That is not the problem at hand. +imageNamed: searches for the image using NSBundle. Like he said, the image displays fine in an NSImageView. BTW, there are also -pathForImageResource: and -pathForSoundResource: which can locate an image or sound resource. With these methods...
Back
Top