osx-lion

Error with inline and Xcode 4.2.1

允我心安 提交于 2019-12-21 03:15:08
问题 I'm trying to get the inline package working on my macbook. The following block of code (from the cxxfunction examples) fails: library(inline) fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , ' return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ; ' ) fx( 2L, 5 ) With this error: Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! make: g++-4.2: No such file or directory make: *** [file141b5882.o] Error 1 This

Mac OSX Lion Postgres does not accept connections on /tmp/.s.PGSQL.5432

a 夏天 提交于 2019-12-20 14:41:29
问题 I'm getting a common Mac OSX error for Homebrew installations of Postgres, No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? This is apparently due to there being multiple installs on the system. However, the usual steps are not resolving things. I can successfully start Postgres and running: ps auxw | grep post returns .. euanmillar 847 0.0 0.0 2432768 588 s000 R+ 11:19am 0:00.00 grep postgres euanmillar 845 0.0 0.0

How to install/use php on mac v 10.7.2

流过昼夜 提交于 2019-12-20 10:57:49
问题 i'm your average college student interested in using PHP. Could anyone give me a 101 on how to install/enable it on a mac version 10.7.2 using simple, plain language? I will appreciate any and all help!! Cheers 回答1: No Need to Install PHP or Apache, They already ship with Mac 10.7 These are the basic steps you need to take for PHP and Apache to work together: Enable PHP in you httpd.conf file located - /etc/apache2/httpd.conf Setup your php.ini - sudo cp /etc/php.ini.default /etc/php.ini

Mac OS X Lion Xcode problems using RVM

六月ゝ 毕业季﹏ 提交于 2019-12-20 10:44:26
问题 I had Xcode 4.1 preview 5 working fine but decided to upgrade to the final xcode 4.1 thru the App store. I uninstalled Xcode first... sudo /Developer/Library/uninstall-devtools –mode=all Then installed Xcode thru the app store and rebooted. I also removed RVM completely but... now whenever I try and install a version of Ruby it fails. In the error file i get this: [2011-07-27 18:29:25] ./configure --prefix="/Users/holden/.rvm/usr" checking for a BSD-compatible install... /usr/bin/install -c

Problems installing Git with Homebrew [duplicate]

蹲街弑〆低调 提交于 2019-12-20 09:30:34
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Problems Upgrading Git with Homebrew I'm very close here -- I think I just need to create a symbolic link, but I'm not sure how (and why this is need). I'm on OSX Lion btw. I've downloaded and installed git using this command. brew install git the response is git-1.7.12 already installed, it's just not linked How do I do this? when I run which git >/usr/bin/git when I run git --version >git version 1.7.4.4 My

NSPopover transiency when popover is in status bar

眉间皱痕 提交于 2019-12-20 08:44:33
问题 I'm making an app which lives in status bar. When status item is clicked, NSPopover pops up. It looks like this: Here's the problem: I want it to be "transient", that is if I click anywhere outside of the popover, it will close. And while NSPopoverBehaviorTransient works fine when popover is in a window, it doesn't work when it's in status bar. How can I implement such behavior myself? 回答1: It turned out to be easy: - (IBAction)openPopover:(id)sender { // (open popover) if

'sandboxd: deny file-write-create' when writing to app's own bundle

北慕城南 提交于 2019-12-20 07:18:20
问题 I've written a program in the Mac App store which displays some graphics. Occasionally it updates these off the internet. As with most folks, I'm having to Sandbox my app now. Almost everything is working, but when updating it saves a file in my app's own bundle and fails with 'sandboxd: deny file-write-create' I just use fopen(..., "wb") The path passed into fopen is: /Users/MyUser/Library/Developer/Xcode/DerivedData/MyApp-czuwveatgjffaggwqjdqpobjqqop/Build/Products/Debug/My.app/Contents

save mail attachment from applescript in Lion

我们两清 提交于 2019-12-20 04:45:14
问题 It seems, that the method of saving a mail attachment with applescript is broken under Lion. Assume, 'theAttachment' is already the right object containing the e.g. attached jpg, here is what I've done: set strPath to (path to pictures folder) as string save theAttachment in strPath -- leads to the error: "„Mail“ got an error: error in AppleEvent-Routine." number -10000 save theAttachment in strPath as "test" -- leads to \"test\" can't convert into typ constant" number -1700 from "test" to

Turn off OS X 10.7 Lion's “auto-correct” feature programmatically?

不想你离开。 提交于 2019-12-20 04:16:34
问题 OS X Lion has an iPhone-like autocorrect feature as you're typing. This feature interferes with my typing app. The people using my app would not want it turned on at all , system wide. I need to turn off all auto-correct off for all apps, not just in my own NSTextField . Is there any way for me to check/set the global/system auto-correct feature to OFF ? Or am I stuck basically providing a guided tutorial for how to turn it off? Solution must be legal for the Mac App Store. 回答1: Is this in an

Increase stack size in OS X Lion

荒凉一梦 提交于 2019-12-20 02:32:40
问题 I need to do it for a C++ program that needs a lot of stack. I use g++ (included in OS X Lion) to compile it. How could I increase it for my program? 回答1: From http://developer.apple.com/library/mac/#qa/qa1419/_index.html Using gcc, pass link flags through to ld with -Wl: gcc -Wl,-stack_size -Wl,1000000 foo.c 回答2: You can use getrlimit / setrlimit - this works on Linux, Mac OS X, and other POSIX-ish operating systems, e.g. #include <sys/resource.h> int main (int argc, char **argv) { const