osx-lion

How to perform matrix inverse operation using the accelerate framework?

被刻印的时光 ゝ 提交于 2019-11-28 04:12:01
问题 I would like to find the inverse of a matrix. I know this involves first LU factorisation then the inversion step but I cannot find the required function by searching apple's docs of 10.7! This seems like a useful post Symmetric Matrix Inversion in C using CBLAS/LAPACK, pointing out that the sgetrf_ and sgetri_ functions should be used. However searching these terms I find nothing in Xcode docs. Does anybody have boiler plate code for this matrix operation? 回答1: Apple does not document the

Prevent “Resume” for my Cocoa application?

南笙酒味 提交于 2019-11-28 04:08:17
问题 I love the new "Resume" feature in Lion. After a restart window size and position is exactly how you left it. But during development this is a bit annoying. If I resize a window in the Interface Builder and restart my application it doesn't have the new size but the old size. In the past you had to set the AUTOSAVE property to get this kind of behavior but with Resume it all happens automatically. Can I disable resume for my application somehow? 回答1: Yes. As documented in the Lion AppKit

NSTextField not calling delegate when inside an NSTableCellView

人走茶凉 提交于 2019-11-28 03:51:44
问题 I have a fairly vanilla Source List (dragged out from the Object Library) in my app, with an NSTreeController as its data source. I set the NSTextField inside the DataCell to be editable, but I want to be able to turn that off for some cells. The way I figured you would do this, is with a delegate for the NSTextField , but none of the delegate methods I've tried get called. Is there something I'm missing? I have the delegate set with an outlet in my XIB, and it happens to be the delegate to

gem install pg doesn't work on OSX Lion

南楼画角 提交于 2019-11-28 03:29:01
There are variations of this question bouncing around SO, but none of them seem to have an answer that solves my problem. I am running OSX Lion (10.7.3). The latest XCode is installed. I've installed Postgres using the Postgres.app package from postgresapp.com. But when I try to install the pg gem, I get a failure: $ gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/MacOS/bin/pg_config Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb

How do you get php working on Mac OS X?

一世执手 提交于 2019-11-28 03:06:09
I have recently updated to Lion and enabled Web Sharing in the System Preferences but I am unable to get php working. I added an info file to the web root directory and it outputs the file as text. info.php with the content <?php phpinfo(); ?> (Edit: This method appears to work fine for 10.9 (Mavericks), 10.10 (Yosemite) and 10.11 (El Capitan), so I figured I'd mention that for any new influx of slightly frustrated OS X updaters :D ) Edit your /etc/apache2/httpd.conf and make sure the line: LoadModule php5_module libexec/apache2/libphp5.so ...exists. I think it's commented out by default in

start MySQL server from command line on Mac OS Lion

你。 提交于 2019-11-28 02:32:29
I installed mySQL for my Mac. Beside starting the SQL server with mySQL.prefPane tool installed in System Preference, I want to know the instruction to start from command-line. I do as follow: After su root I start the mySQL server by command-line, it produce error as below: sh-3.2# /usr/local/mysql/bin/mysqld 111028 16:57:43 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.5.17-osx10.6-x86_64/data/ is case insensitive 111028 16:57:43 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! 111028 16:57:43

Getting the full path of a TFENode in Lion

拟墨画扇 提交于 2019-11-28 01:22:35
问题 I'm trying to get the full path of a TFENode in OSX Lion, but am unable to get a result using the old way (by converting to an FINode and getting the fullPath - the method [[FINode nodeWithFENode:myTFENode] fullPath] doesn't seem to work for Lion anymore. Is there a way to do this? 回答1: From a TFENode, you can get an OpaqueNodeRef, and use that with FINode's nodeFromNodeRef: method. After that, you can get the NSURL to the item with FINode's previewItemURL method. 来源: https://stackoverflow

Imagemagick issue on Lion installed with Homebrew

与世无争的帅哥 提交于 2019-11-28 01:09:55
I am trying to use the Paperclip gem on a Rails project so followed the docs and first installed Imagemagick using the Homebrew recipe. I added to my model my attachment has_attached_file :screenshot This worked OK and the file uploads functioned as expected I then wanted to add thumbnails to this, so again followed the docs and added to the model has_attached_file :screenshot, :styles => { :medium => "300x300>", :thumb => "100x100>" } At this point the uploads no longer worked I check the development logs and noticed this: [32mCommand[0m :: identify -format %wx%h '/var/folders/ky

Can an ANSI C-compliant implementation include additional functions in its standard library?

霸气de小男生 提交于 2019-11-27 23:07:21
Is an ANSI C-compliant implementation allowed to include additional types and functions in its standard library, beyond those enumerated by the standard? (An ideal answer would reference the relevant part of the ANSI standard.) I ask particularly because Mac OS 10.7 declares the getline function in stdio.h, even when compiling with gcc or clang using the -ansi flag. This breaks several older programs that define their own getline function. Is this a fault of Mac OS 10.7? (The man page for getline on Mac OS 10.7 says that getline conforms to the POSIX.1 standard, which came in 2008.) Edit: To

Mac OS X Lion, scrollbars, and website usability

前提是你 提交于 2019-11-27 21:05:54
问题 I have a number of overflowed divs that I use to display a lot of content in small space (like long lists, etc). Giving the divs the CSS rule of overflow: auto; always worked like a charm, giving the user scroll bars to indicate more content was available. This is kinda thrown out the window with Mac OS X Lion, which (as a default) hides the scroll bars unless you're actively scrolling. I like it when dealing with an application on my computer, because I think there are very strong visual