osx-snow-leopard interview questions
Top osx-snow-leopard frequently asked interview questions
I am wondering if anyone is able to help me out with getting a .sh file to run when I log in to my account on my computer. I am running Mac OS X 10.6.7.
I have a file "Example.sh" that I want to run when I log onto my computer. I do not have a problem running it when I am already logged in, but I want this to run automatically.
People are saying to add it to the login shell file, but I do not know where that is. Some help please.
Source: (StackOverflow)
I still have Snow Leopard. I have Xcode 4.2 for iOS development. This morning I upgraded my iPhone and iPad to iOS 5.1.
But Xcode 4.2 is not detecting my device for testing. I could not find the iOS 5.1 SDK image on Apple's developer site, for Xcode 4.2.
I don't want to do upgrade to Lion to get XCode 4.3 at this time.
Will I able to use Xcode 4.2 (on Snow Leopard) for iOS development now?
Source: (StackOverflow)
Not sure why I'm getting this, but I just installed RVM, the new Ruby 1.9, and reinstalled a bunch of gems, and I get this
/Users/johnsmith/.rvm/rubies/ruby-1.9.1-p378/bin/gem:4: warning: Insecure world writable dir /opt/local/bin in PATH, mode 040777
Everything still runs otherwise, but I was wondering if there was a way I could get rid of it.
Source: (StackOverflow)
This probably has a really obvious answer, but I can't seem to find it. I am trying to use Xcode 4 to program with C++, and I want to create a project, build, and run it through Xcode 4 like I do for other languages. My problem is that I can't find the right type of project to do this.
Source: (StackOverflow)
Double values store higher precision and are double the size of a float, but are Intel CPUs optimized for floats?
That is, are double operations just as fast or faster than float operations for +, -, *, and /?
Does the answer change for 64-bit architectures?
Source: (StackOverflow)
This is useful for debugging (hence programming related). On linux, we can use the command
strace -feopen python myfile.py
to figure out which python modules and shared objects are loaded. Is there an equivalent one-liner on macOS X?
Source: (StackOverflow)
What is the easiest way to activate PHP and MySQL on Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion)?
I'd prefer to use any bundled versions before resorting to downloading from the PHP or MySQL websites. That also rules out MAMP and similar.
I'm comfortable at the command line in Terminal.
Source: (StackOverflow)
I'm trying to make my project compatible with Snow Leopard and I am not able to remove the autolayout in the nibs using Interface builder (XCode 4.3 on Lion).
Is it possible to remove the constraints and the autolayout in a nib on XCode?
Source: (StackOverflow)
In my iPhone app, I have many ASCII arts which I need to insert into the database.
I am using the simulator and pasting the textpic in the textview to insert the ASCII art to database.
Here the clipboard of simulator once pastes the art properly but when I copy another art then too it pastes the previous art into textview.
How to solve this problem?
Is there a work around for this or any better approach?
Please Help and Suggest
Thanks
Source: (StackOverflow)
So today I upgraded to bazaar 2.0.2, and I started receiving this message (I'm on snow leopard, btw):
bzr: warning: unknown locale: UTF-8
Could not determine what text encoding to use.
This error usually means your Python interpreter
doesn't support the locale set by $LANG (en_US.UTF-8)
Continuing with ascii encoding.
very strange, since my LANG is actually empty. Similar thing happen when I try to tinker with the locale module
Python 2.5.4 (r254:67916, Nov 30 2009, 14:09:22)
[GCC 4.3.4] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/sbo/runtimes/lib/python2.5/locale.py", line 443, in getdefaultlocale
return _parse_localename(localename)
File "/Users/sbo/runtimes/lib/python2.5/locale.py", line 375, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
exporting LANG does not help
sbo@dhcp-045:~ $ export LANG=en_US.UTF-8
sbo@dhcp-045:~ $ bzr
bzr: warning: unknown locale: UTF-8
Could not determine what text encoding to use.
This error usually means your Python interpreter
doesn't support the locale set by $LANG (en_US.UTF-8)
Continuing with ascii encoding.
However, this solved the problem
sbo@dhcp-045:~ $ export LANG=en_US.UTF-8
sbo@dhcp-045:~ $ export LC_ALL=en_US.UTF-8
Python 2.5.4 (r254:67916, Nov 30 2009, 14:09:22)
[GCC 4.3.4] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF8')
Could you please explain what's going on here, for better googlability ?
Source: (StackOverflow)
This question already has an answer here:
I get the error below many times and this error makes it impossible to run my application unless I restart the whole Mac.
This is not caused due to changes in code.
ERROR :
Couldn't register com.yourcompany. with the bootstrap server.Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.
What could be wrong?
Please give your suggestions, they are most welcome.
Source: (StackOverflow)
I have a fresh install (started with a wiped drive) of Snow Leopard with the developer tools installed during the Snow Leopard installation.
I then installed Python 2.6.2, replacing the Snow Leopard default python 2.6.1. I've tried to install PIL by:
easy_install
pip
- downloading source and running
python setup.py build
manually.
All yield the same error (link to pip
log: http://drop.io/gi2bgw6). I've seen others have had success installing PIL using the Snow Leopard default python 2.6.1, so I'm not sure why I'm having so much trouble getting it to work with 2.6.2.
Source: (StackOverflow)
How do you delete all the contents of a directory without deleting the directory itself? I want to basically empty a folder yet leave it (and the permissions) intact.
Source: (StackOverflow)
Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great.
It also has Ruby pre-installed (version 1.8.7) which is great too.
However, I want Ruby autocompletion in VIM. Looking up the VIM version (vim --version) shows -ruby (i.e. ruby support isn't enabled).
How to enable ruby for my VIM installation?
Source: (StackOverflow)
Is there any way to install PHP:s PECL handler on Mac OS X 10.6, to be used with the bundled PHP?
Source: (StackOverflow)