mac

How can I delete all the databases in my machine without deleting them one by one?

I want to delete all the databases in my Macbook pro. The number is more than 300 so I can't remove them one by one. How can I delete all the databases without deleting them one by one? ...

Limit the output of the TOP command to a specific process name

If you call the top command, you get all the running processes. But how can I limit the output only to a certain process name like "java"? I've tried this top -l 2 | grep java but in this way you get only snapshots and not a continuously updated list. And top -l 0 | grep java is not really clear. ...

htaccess - How to restrict to access from my home

I have a website on the internet that I only want to be accessible from my house. Could I have htaccess be restricted to the MAC address of my router? If not, are there any other options? I don't think I could use IP address because my ISP changes it all the time. ...

Playing Speex audio in RIFF-WAV container on Mac OS X

There are speex audio embeded in RIFF-WAV container (The files obtained in Windows system through encoding using Speex ACM codec, WAVEFORMATEX.wFormatTag = 41225 (0xA109) is used). Now I need to write an application, that will play such wav files. I just started to learn programming under Mac OS X, so I am looking for right start points...

Input Fields in Firefox on a Mac

I have an issue that was reported to me just now before we go live tomorrow and I am not able to reproduce as I don't develop on macs and our site is all macs. I don't have a version number or OS number and know that would make it easier. I am stuck with these two and will do further testing over the weekend. It was reported to me that...

common place to store files on mac and windows.

hi. am writing a java code that needs to save a file. the below code is for mac. ImageIO.write(movie_image, "jpg",new File("/Users/sathyap/Desktop/movieimages/"+fileName+".jpg")); is there a way i can give the directory structure "/Users/sathyap/Desktop/movieimages/" hardcoded that works for both mac and windows. ...

"Too old to work with working copy" error with SVN in Mac OS X

I've had this before and followed these instructions http://www.redfinsolutions.com/redfin-blog/update-subversion-mac-os-x. However today I am trying to do a 'status' and then 'commit', however I'm now getting the same error of: svn: This client is too old to work with working copy '.'; please get a newer Subversion client Which is ob...

Benefits of creating iPhone, iPad and Mac apps with Cocoa over Sproutcore+Phonecap/Titanium?

I'm going to create iPhone and Mac apps and wonder if there are benefits of creating iPhone and Mac apps with Cocoa over Sproutcore + Phonegap/Titanium? I'm not doing any game or high performance related software. If I learn Cocoa I could only create apps for iPhone, iPad and Mac. But if I use Sproutcore for web development with Phoneg...

common code integration in mac network

Hi to all, I am new to mac network environment. I working in a team, each time the code has to be get and integrated in single place. Is there any possibility to have common code integration software in the mac server for auto integration Regards, sathish ...

Resizing NSTokenField after populating with tokens

I am using an NSTokenField as a way for users to enter tags. Everything works fine and it hooks up with CoreData managing the tags both when the user adds or deletes a tag. I recently added logic so that the NSTokenField would resize vertically as the user adds tags and they break to the next line using Andrew Bowman's IFVerticallyExpan...

CodeIgniter 2.0 friendly URLs not working on Mac OS X Snow Leopard

For some reason in CI 2.0 the URLS do not work. http://localhost/myapp/ - will open the default controller (bc it finds index.php) http://localhost/myapp/index.php/home/ - will open the default controller http://localhost/myapp/home/ - will show path not found I am not sure if this is a problem with 2.0 or a specific problem with my ...

Xcode folder as bundle/package

Hey guys, I have made a file format which is just a folder with an extension. I have set up an app the makes finder use it as a package but when I drag it into the resources in xcode it expands that package into a folder. Is there a way I can get xcode to treat a folder like one file regardless of what is in it? The reason I need this i...

creating a block device programmatically in mac os x using iokit framework

Hey all, As i am a total noob to mac os x programming i am having some problems understanding this.I want to create a block device in mac os x leopard which would act as a normal drive in mac os x and after that i want to define the geometry of that device or drive according to a drive which i created during installation. As i a...

Python Script Fails To Run When Launched From Shell File, But Works When Launched From Terminal

If I launch the Google Code upload Python script from Terminal, it works as expected, but when I launch it using the code below in a Bourne Shell Script file, it fails with the error "close failed in file object destructor: Error in sys.excepthook: Original exception was:". #!/bin/sh BUILD_FOLDER="/Users/James/Documents/Xcode Projects/U...

Loading NSView subclass from a XIB

I need to use a custom view into a NSMenuItem. I've created a new view XIB and customized the view in it. How can I load that view and set it in the NSMenuItem using the setView: method? UPDATE: I've found a solution but now the menu item with the custom view doesn't highlight on mouse over. Ho can I solve this problem? ...

Mac server in order to compile obj-c projects?

Is it possible to write an obj-C code with any text editor and then upload it to Mac server to compile it using Xcode?? I know that it is possible to compile your project using Xcode without open it something like use some command lines, but I am not sure is it possible to make it a server and then upload any obj-c code! ...

How do you add an item to dictionary with a variable for a key name?

I am trying to write a script that will add a new key to a dictionary plist. The script works fine when using a string for the key of the dictionary but I can't seem to figure out how to use a variable for the keyname. The script is below and is almost working. THe only issue is being able to use keyName as a variable instead of a str...

SSH Connect to Mac using iPhone SDK for Remote Login

I wonder if anyone has succeeded in connecting to a Mac using an iOS Device via SSH (Remote Login) to access terminal and execute commands. I know that this is definietly possible as the Mobile Terminal App accomplishes this perfectly. I am trying to implement this connection in an iOS4 Application. Does anybody know the code to do this?...

web page layout issue in firefox 3.6 /mac os

This web page does not display correctly in firefox 3.6 /mac os. http://solcuisine.com/dev/?page_id=2 .. and here's how it looks in firefox3.6/mac: firefoxmac.png located in dev/ directory of same domain (sorry, can't post more than one link here) http://solcuisine.com/dev/firefoxmac.png The css has been validated in w3.org. And the...

How to profile the time of calling initializer functions when dyld loads an image?

I am now trying to optimize the launch time of an application, and currently want to reduce the time spent by the OS image loader. From dyld(1), I found two environment variables: DYLD_PRINT_STATISTICS and DYLD_PRINT_INITIALIZERS. DYLD_PRINT_STATISTICS causes dyld to print statistics about how dyld spent its time. This is its output wh...