osx

Tab-completion in Python interpreter in OS X Terminal

Several months ago, I wrote a blog post detailing how to achieve tab-completion in the standard Python interactive interpreter--a feature I once thought only available in IPython. I've found it tremendously handy given that I sometimes have to switch to the standard interpreter due to IPython unicode issues. Recently I've done some work...

How to prevent the OS X text layout engine from automatically "flipping" lines with right-to-left text?

How do I make Apple's Cocoa GUI controls not automatically "flip" lines that contain right-to-left text (such as arabic)? Behold my test case, wherein I plan to keep the asterisks (**) in the beginning of the lines when they are printed on screen: #import <Foundation/Foundation.h> int main(int argc, char *argv[]) { NSAutoreleasePo...

Where are Java preferences stored on Mac OS X?

On Windows, the Java preferences, which you access in your application from java.util.prefs.Preferences are stored in the registry. Where are those stored on Mac OS X? ...

setjmp/signal crash exception handling

I am trying to install a "crash handler" for a C OSX Carbon multithreaded application. On Windows, I can easily use the simple and efficient try{} __except{} SEH of Windows which works great. (Note these are **unrelated to C++ exceptions, these are lower level C constructs!) This is very related to a question I asked on SO previously: ...

Running .exe files in Mac OS X

I am a Mac user who wants to run a few .exe files from my Java process using Process and Runtime classes. I know that it is not possible to execute .exe files in general in Mac OS X. Is there a Mac application which can wrap these .exe files so that they can be executed ? Does Apple provide anything by itself ? The alternative I am u...

installing Oracle Instantclient on Mac OS/X without setting environment variables?

Oracle's instructions specify setting DYLD_LIBRARY_PATH. This makes my application dependent on random users' configuration and is very troublesome to set up. How can I avoid having to set any environment variables? http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html related note for linux: http...

Setting up wildcard domains on local host (OS X 10.5)?

I am starting to develop a site which basically acts as WordPress MU, in the sense that a user can signup and have their own blog. I will be coding this in Rails, however I am hoping to be able to utilize wildcard subdomains, so I can use the format such as blog.example.com. I've done some searching but I can't find any good resources. ...

Find the Window ID of a GTK widget on Mac OS-X

I'm trying to port a GTK-based Linux app to Mac OS-X. I have the GUI working OK but now I need to create a Widget which embeds MPlayer. I should be able to use the -wid option of MPlayer to embed it in my app but I need to find the Window ID. Does anyone know how to find the window ID of a GTK Widget or Container on OS-X ? ...

How to detect whether an OS X application is already launched

Normally an application bundle on OS X can only be started once, however by simply copying the bundle the same application can be launched twice. What's the best strategy to detect and stop this possibility? On Windows this effect can simply be achieved by the application creating a named resource at launch and then exit if the named r...

Eclipse 3.4.2 compiling Java 1.6 on Mac OSX

My Eclipse 3.4.2 does not compile Java 1.6 on Mac OS 10.5.6, does anyone here got it working? Seems that no matter which JRE I choose, it keeps compiling using 1.5. ...

Is there any way to pass an NSArray to a method that expects a variable number of arguments, such as +stringWithFormat:

Some context: I'm trying to clean up some of my FMDB code. My one table has a lot of columns and the method in FMDB I need to use is one that expects a variable number of arguments, similar to NSString's class method +stringWithFormat:. An example: [db executeUpdate:@"insert into test (a, b, c, d, e) values (?, ?, ?, ?, ?)" , @"hi'", /...

Extraordinarily Simple Shell Scripting Question: Making sticky changes?

I write shell scripts to do various things in OSX and Linux, but I always have the same problem. The script runs but any changes it makes to the environment (except the disks, of course) do not "stick." When the script terminates the changes revert. How can I make my changes stick? Edit: A lot of the answers have been great, but they h...

Remembering terminal states in OS X (like Fluid for the shell...)

I have a few different things open in the terminal whenever I'm developing -- log tailing, Ruby console, plain shell in a certain directory, and so on. How do I: start all those things at once, hopefully in the right position on the screen? make them distinct so I can switch to them with Quicksilver / Alt-Tab? Fluid solved this pro...

How to install MySQL on Leopard, Mac OS X 10.5?

I followed this tutorial to the very end, then found out it didn't work right. I think I have everything installed but when I type mysql -uroot I only get -bash: mysql: command not found Note: I did not skip the "Setting the Path" step. Upon running this command for the first time: mate ~/.bash_login This brought up an empty fil...

Making an NSTextField act like a "microwave timer", store as NSNumber

What I'm trying to accomplish is two fold: I want my NSTextField to act like a "microwave timer" and update as characters are entered. So the field would default to "00:00" (minutes, seconds). When a 1 is pressed, the field would look like "00:01". Then a 4 is pressed and "00:14". A 2 is pressed and "01:42". I want to store this as an ...

SVN commit problems on Mac OSX Terminal

I had no problem checking out my project from googlecode in terminal. I tried to commit the changes but I get the following error message: "...programming/softwaredefinedradio/out' is not under version control" The problem is I don't have a file called out in my directory. What would be causing this? ...

Mac OS X terminal killall won't kill running process

I have an instance of lighttpd running. When I do "ps -axc" the process is listed as "614 ?? 0:00.15 lighttpd" But when I do "killall lighttpd" I get No matching processes belonging to you were found I'm on Mac OS X 10.5.6. Is there something I'm missing? ...

What is the best Mac OS X software for making architectural diagrams?

I am an OS X user. Often, I need to share architectural, workflow and other data with managers and developers in a visual fashion. Can anyone recommend me some software and tell me why it's awesome? ...

What's the best software for checking disk health on Mac ?

Does Mac OS X have a good utility provided by default. Disk Utility doesn't seem very comprehensive. What is the best software available ? ...

Good Editors for Web Development on OS X?

I'm getting started with web development on OS X need some good development tools, text editors...etc. I have XCode already but it doesn't seem geared towards editing the web technologies I will be using: xhtml, javascript, css, and php. So I am looking for some ideas. I know about TextMate, but am trying to avoid spending any $$$. Th...