mac

[Cocoa] Is it possible to change the Dock icon of an app so it remains when it is not running?

Is it possible to badge a dock icon and have the icon persist when the application is quit? iCal does this, but I have not seen it anywhere else. ...

In Xcode 3.2.3 NSDate returns year 2553. How to fix

Hi, I'm using Xcode 3.2.3 and Xcode 3.2.2. In Xcode 3.2.3 [NSDate date] (or any NSDate methods) returns 2553 year and current month, year, time. It's ok in 3.2.2. I tried to find where it can be placed at default values but I didn't find that option. I removed and installed it again but it didn't help too. What should I change? Thanks ...

use ppk file in mac terminal to connect to remove connection over ssh

I have been using putty on WINDOWS XP and used the .ppk file to connect to my linux servers (several servers) On the servers I have the following folder and file ~/.ssh/authorized_keys I now want to use a MAC to connect via the terminal. I have set up the remote connections to the servers manually and want to know how I can setup using...

Setting Bonjour Display Name on Mac

Hey everyone, I'm looking to setup some Macs on my company's network to change their Bonjour broadcast name based upon who is logged in to the computer. Currently, they broadcast with the computer's name. This will hopefully make it easier for them to share files, as they wont have to remember that computernameXYZ is Jane Smith's comput...

Uninstall pysvn in Mac OSX 10.5

I installed the wrong version of pysvn in my system using the .dmg. I realized the mistake and removed the pysvn folder from /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/. I don't see pysvn anywhere else on my system. Now when I try to install the correct (older) version of pysvn the installation process...

AppleScripting an edit to computers' info in ARD

So there's this weird behavior in Apple Remote Desktop where computers will report self-assigned IPs back to the console before they've gotten their real IPs from the DHCP server, and then since ARD contacts computers based on this IP address, they become "lost," in a manner of speaking. I can fix this by wiping out the 169.x.x.x address...

Two versions of Perl in Mac OS X?

I've installed the Template module via CPAN on my MacBook Pro and it seemed to install correctly. But, when I try to run a script that includes the Template module, I get the following: Can't locate Template.pm in @INC (@INC contains: /Users/purinkle/Sites/rob/modules /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level /Library/...

Configuring 'git help' to open kernel.org reference

I've got git installed on my mac and either forgot or decided not to install the local docs. On my windows install however, when I use git help command it actually opens the corresponding documentation on kernel.org. Can this be configured for my mac install as well? If so how? ...

Environment.SpecialFolders in Silverlight 4 on Mac

Silverlight 4 running with elevated permissions provides access to certain special folders in the file system. http://msdn.microsoft.com/en-us/library/system.environment.specialfolder(VS.95).aspx These work great on Windows, but what do they map to on Mac OSX systems? My application needs to access "My Documents". Will this map somewhe...

Python ctypes not loading dynamic library on Mac OS X

I have a C++ library repeater.so that I can load from Python in Linux the following way: import numpy as np repeater = np.ctypeslib.load_library('librepeater.so', '.') However, when I compile the same library on Mac OS X (Snow Leopard, 32 bit) and get repeater.dylib, and then run the following in Py...

Vim - Nerd commenter . First line commented out differently.

Hi, When using nerd commenter in visual mode, the first line is commented differently. Initial code const IMG_SIZE_SMALL = '32x32'; const IMG_SIZE_MEDIUM = '64x64'; const IMG_SIZE_LARGE = '192x192'; After doing ,cc in visual mode selecting these lines. /* const IMG_SIZE_SMALL = '32x32';*/ //const IMG_SIZE_MEDIUM = '64x6...

Easiest way to strip newline character from input string in pasteboard

Hopefully fairly straightforward, to explain the use case when I run the following command (OS X 10.6): pwd | pbcopy the pasteboard contains a newline character at the end. I'd like to get rid of it. ...

Setting up Postgresql to work with my local dev

I have Snow Leopard and am using the default apache. I installed postgresql via macports. So now I can do a psql from a terminal (I tried but failed to do a install of php5 through macports but there was an error) I have enabled php5 and restarted the apache so now I have php. But for the life of me I cannot figure out to hook up postgr...

.profile and .bashrc doesn`t work on my Mac

Hi, This problem I have for a long time. After running terminal .profile, and .bashrc file doesn`t work (are not executed). Could you indicate where should I looking form a source of problem? ...

NSString initWithData returns null

I am pulling data from a website via NSURLConnection and stashing the received data away in an instance of NSMutableData. In the connectionDidFinishLoading delegate method the data is convert into a string with a call to NSString's appropriate method: NSString *result = [[NSString alloc] initWithData:data ...

Equivalent of AutoIt for Mac OS X?

AutoIt is a Windows tool to automate UI tasks, for testing or scripting. It supports basic commands like moving the mouse, clicking its buttons, simulating keystrokes. Beyond that it also recognizes windows controls and can interact with them easily. It sports a scripting language to write macros, with loops, ifs, etc. I'm looking for a...

Xcode (Snow Leopard) project works differently based on declaration of a single variable.

OK, I'm still quite new to Xcode/Cocoa etc, so please forgive me if this issue is something totally obvious, but it seems to me to completely defy any logical software behaviour that I have ever seen. I have a project which uses OpenGL in Snow Leopard. I have created a very basic solid teapot (using glut, obviously) and have shone a lig...

How do I get XAMPP's MySQL and Ruby on Rails work together on my Mac?

I have mysql and apache running through XAMPP on my Mac machine (10.6.4). I usually do PHP development with this setup butnow I want to start out with Ruby on Rails. Unfortunately I cannot get mysql to work with RoR. I start the mysql Server with XAMPP and when I do "rake db:migrate" I get this output:!!! The bundled mysql.rb driver has ...

Cocoa slider with integer value

I'm trying to use a horizontal slider in my mac app, by default the slide values is floating point number, because i need to display the value again as text in a label(binding using user defaults), so is there a way to make slider to output integer rather than floating point number? ...

Python psycopg2 error when changing environment to os x

Hi guys, I have this error when i perform the following task, results = db1.executeSelectCommand(siteSql, (),) TypeError: unbound method executeSelectCommand() must be called with dbConnn instance as first argument (got str instance instead) My code is as follows: class dbConnn: db_con = None execfile("/Users/usera/Do...