osx-snow-leopard

Setting up PHPUnit on OSX

坚强是说给别人听的谎言 提交于 2019-12-03 02:27:27
问题 Though I'm sure others have eventually managed to figure this out, I've been following the various documentation out there and have been having a heck of a rough time of it. http://www.phpunit.de/manual/current/en/installation.html Makes it sound pretty easy. However depending on your setup, you might be going down a rabbit hole. PEAR for example must be of a version higher than 1.8.1. I had 1.8.0 at the time, so I went to find out how to update PEAR PEAR upgrade-all Gives an error. No access

NSFileManager delete contents of directory

孤者浪人 提交于 2019-12-03 02:18:03
问题 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. 回答1: E.g. by using a directory enumerator: NSFileManager *fileManager = [[NSFileManager alloc] init]; NSDirectoryEnumerator *enumerator = [fileManager enumeratorAtPath:path]; NSString *file; while (file = [enumerator nextObject]) { NSError *error = nil; BOOL result = [fileManager removeItemAtPath:[path

Imagemagick jpeg decode delegate missing with OS X Homebrew install

前提是你 提交于 2019-12-03 02:06:22
I recently converted from macports to homebrew and my previous macports Imagemagick install was working fine. I followed the homebrew instructions to chown /usr/local (somewhat apprehensively) and remove /usr/local/include and /usr/local/lib. When trying to work with any jpeg images, imagemagick chokes with: no decode delegate for this image format Here is a list of some relevant command output. As you can see, no jpeg/jpg delegate can be found. convert -list configure => DELEGATES bzlib freetype png x11 xml zlib identify -list configure => DELEGATES bzlib freetype png x11 xml zlib However,

How to clean up my Python Installation for a fresh start

ⅰ亾dé卋堺 提交于 2019-12-03 02:02:15
问题 I'm developing on Snow Leopard and going through the various "how tos" to get the MySQLdb package installed and working (uphill battle). Things are a mess and I'd like to regain confidence with a fresh, clean, as close to factory install of Python 2.6. What folders should I clean out? What should I run? What symbolic links should I destroy or create? 回答1: One thing you should not do is try to remove or change any of the Apple-supplied python files or links: they are in /usr/bin and /System

Copy from Mac OS X does not copy to iPhone Simulator

放肆的年华 提交于 2019-12-03 01:50:57
问题 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? 回答1: I was getting frustrated with copy and paste in the simulator and couldn't figure

python locale strange error. what's going on here exactly?

这一生的挚爱 提交于 2019-12-03 01:41:31
问题 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

Assertion not working

流过昼夜 提交于 2019-12-03 01:09:33
I am trying to write an Assertion to check if the size the user gives is a positive value, if not then make it positive, this statement is inside the class constructor which takes the size value and then makes an array[size]. I have written the below code which i believe to be correct. public Grid(int size) { try{ assert size > 0 ; } catch(AssertionError e){ size = Math.abs(size); } setLayout(new GridLayout(size, size)); grid = new JButton[size][size]; } Though I never seems to evaluate my assertion and continues the program then causes the NegativeArraySize error( which i am trying to avoid)

PyObjc and Cocoa on Snow Leopard

大城市里の小女人 提交于 2019-12-03 00:49:42
I am about to start my A-Level Computing project (High School Level) which will hopefully be a point-of-sale application for Mac OS. Unfortunately, Objective-C is a little out of my league at the moment and should I get stuck with it in the project I have no one to help out so I would fail the section of the course and not get into University. So this is quite important to me. I want to use Python to develop a Cocoa app. I know that I need PyObjc, however all details on the net seem to assume it is pre-installed. Apparently this is the case with Leopard and Snow Leopard but I don't seem to

Django manage.py syncdb throwing No module named MySQLdb

≡放荡痞女 提交于 2019-12-02 23:49:29
I am a newbie learning Python/Django... Am using the following tutorial located here . Created a mysite database in MySQL 5 running on Snow Leopard. Edited the settings.py file to look like this: DATABASE_ENGINE = 'mysql' DATABASE_NAME = 'mysite' DATABASE_USER = 'root' DATABASE_PASSWORD = '' DATABASE_HOST = '' DATABASE_PORT = '' Now when I run the following command: python manage.py syncdb I receive the following error: Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site

How to install lightblue (bluetooth) module on Snow Leopard?

谁都会走 提交于 2019-12-02 22:04:55
问题 I'm trying to install the bluetooth module from lightblue. My system: Mac OS X Snow Leopard 10.6.8, Python 2.7, gcc 4.2 & 4.0, xcode v.3.2.3 . I checked , i also got python 2.3/2.5/2.6 folders directly under /Library/Python/ in my system (This is different from 2.7 which is located in /Library/Frameworks/Python.framework/Versions/2.7/) When I install lightblue with python setup.py install , I get the following error: GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file