osx-lion

Where to put SQLite database to keep it from being over-ridden during update on OS X?

心不动则不痛 提交于 2019-12-03 20:59:58
I'm developing my first OS X application which will be distributed through Mac App Store. The app makes use of an sqlite database which I am currently keeping on the same location as the rest of app file dependencies. I'm using Qt Framework to develop the application. Keeping within the boundaries of App Store rules; Where can I locate the database file for it not to be overridden during app updates? How should I structure the .app folder and all the dependencies? Thank you. Your question implies that you are writing to the sqlite database, which is a bad idea given the application will be

Why am I getting a could not connect to server error for postgres in Mac OS Lion?

佐手、 提交于 2019-12-03 20:31:20
I just installed postgresql on my Mac OS Lion machine. I've already uninstalled and reinstalled the pg gems. When I run psql I get the following error: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? running which psql : /usr/local/bin/psql I installed postgresql using homebrew Here is a lsof results for postgres: postgres 21159 myuser cwd DIR 14,2 680 3528182 /usr/local/var/postgres postgres 21159 myuser txt REG 14,2 5092464 3546949 /usr/local/Cellar/postgresql/9.1.3/bin/postgres

RESTful web service: java.lang.NullPointerException service.AbstractFacade.findAll

非 Y 不嫁゛ 提交于 2019-12-03 19:28:45
I created a simple XML web service using NetBeans 7's "RESTful Web Services from Database..." wizard. At this point, I want to publish a list of users from the associated mySQL database. When I attempt to access the service via its URL (http://localhost:8080/database/resources/users), I get an error that reads "java.lang.NullPointerException". The stack trace: service.AbstractFacade.findAll(AbstractFacade.java:41) service.UserFacade.findAll(UserFacade.java:51) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java

Why java midi synth on mac stop playing notes

不羁的心 提交于 2019-12-03 18:06:04
问题 I am trying to make a simple app that read from a midi port (hardware) and forward events to the software synth. It mostly work except that the soft synth stop playing from time to time. I can see midi messages being forwarded in the logs, I can trace in debug and see that the event reach the native code in the synth receiver but for some reason, the synth does not play the note. If you wait then the sound play again, then stop, then play again... Here is a demo app that shows the problem. If

psycopg2 installation problem on OSX Lion

限于喜欢 提交于 2019-12-03 17:26:15
I used PIP to install psycopg2 on OSX Lion. But when I try to import from python I get the following errors: Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import psycopg2 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/psycopg2/__init__.py", line 67, in <module> from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: dlopen(/Library/Python/2.7/site

RVM - MacPorts won't update through proxy

我是研究僧i 提交于 2019-12-03 16:33:00
I'm trying to use RVM to install ruby on my iMac. I start by typing the following: rvm list known I then target the version that I want to install (the guide I'm following recommends 1.9.2 instead of the base 1.8.7) with the following line: rvm install 1.9.2 Then I get this: 27698AM:~ butler15$ rvm install 1.9.2 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.7/x86_64/ruby-1.9.2-p320. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Installing requirements for osx, might require sudo password. Password

How to assign application to all desktops (spaces) of Mac OS X Lion using Objective C?

我只是一个虾纸丫 提交于 2019-12-03 15:50:12
问题 I am trying to create an Application on Mac OS X Lion which requires application to be assigned to All Desktops (Spaces). This can be manually done by Right clicking on application's dock icon and Selecting Options > Assign To > All Desktops . But, I need to find a way to do this via Objective C. Is there a way to achieve this programmatically? 回答1: You can use method setCollectionBehavior: of NSWindow with the NSWindowCollectionBehaviorCanJoinAllSpaces bitwise flag. It will make the window

How can I access the 'GitHub for Mac' command-line utility from the terminal?

[亡魂溺海] 提交于 2019-12-03 15:44:13
I recently installed GitHub for Mac, the graphical Git client from GitHub, and also the command-line utility from its menu, shown below: I was notified the command-line utility had been installed in /usr/local/github , but when I checked it had actually been put in /usr/local/bin/github - details shown below: When I try to run git I get -bash: git: command not found , so I added export PATH=/usr/local/bin:$PATH to ~/.profile thinking it would solve the issue, but it hasn't - all that seems to be different is I can now start GitHub for Mac from the terminal by typing github . Please could

pip install django timeout on MacOSX Lion

风格不统一 提交于 2019-12-03 15:33:41
On a MBP, following instructions (http://techblog.rosedu.org/python-environment.html), I installed Xcode 4.4.1, brew (brew doctor says all set), and then python. Next, I tried to setup virtualenv: > $MYPYTHON/bin/python distribute_setup.py > $MYPYTHON/bin/easy_install pip > $MYPYTHON/bin/pip install virtualenv I then created a virtual environment and tried to install django: > $MYPYTHON/bin/virtualenv $MYENV > $MYENV/bin/pip install Django It downloads 98% and then hangs for a while, and finally I get a traceback indicating a timeout: pcm@pcm-mac[302]% $MYENV/bin/pip install django Downloading

Unable to download nltk data

こ雲淡風輕ζ 提交于 2019-12-03 14:53:24
import nltk nltk.download() It shows [SSL:CERTIFICATE_VERIFY_FAILED] . In case of requests one can use verify=False , but what to do here. UPDATE: This error persists on Python 3.6, with NLTK 3.0, on Mac OS X 10.7.5: Changing the index in the NLTK downloader (suggested here ) allows the downloader to show all of NLTK's files, but when one tries to download all, one gets another SSL error (see bottom of photo): user3626301 I had the same problem when trying to configure both nltk and SpaCy. Per the instructions in this question , I was able to overcome the issue. Try running /Applications