osx-lion

Location of the mongodb database on mac

南笙酒味 提交于 2019-12-03 00:04:16
问题 I am kind of new to mac as well as mongodb. I have a weird doubt, accessing the database created using mongodb on mac? I know, in windows there is a folder called c:\data\db, where my database files are stored. How and where in mac, the database is stored. I remember doing something like sudo mkdir -p /data/db sudo chown `id -u` /data/db to create such a folder on mac, but I didn't find any database file in this folder, though i created a database. Where are the database files saved on mac?

“subl” command not working properly

二次信任 提交于 2019-12-02 23:24:41
I'm running into a problem when using the "subl" command in my terminal. It used to work fine but lately when I run it does open the files I want but I can't edit them and moreover Sublime Text doesn't show up in the topbar of my mac as if it wasn't running at all (there's no dot besides the icon in the dock aswell). I kind of opens it as if it was just a window and not an application...But when I click on the icon from the dock it works just fine ! I've got an old macbook from 2008 running on Lion. Thanks for the help (I'm a newbie), Appreciated Try creating the subl symlink, it may have been

How do I add PPC/PPC64 support back to Xcode 4.2 under Lion?

偶尔善良 提交于 2019-12-02 21:51:07
I have a Lion (10.7.1) system on which I installed Xcode 4.2. Suppose I have a simple C program helloWorld.c as follows: #include <stdio.h> main() { printf("hello, world\n"); } Using this setup, I would like to try to compile helloWorld.c for use on PPC and PPC64 architectures, e.g. : $ gcc -arch ppc helloWorld.c -o helloWorld This gives the following error message: llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory How do I restore support for PowerPC to my Xcode 4 installation? I have tried the instructions

Don't automatically switch to the higher-end discrete GPU

半世苍凉 提交于 2019-12-02 21:26:15
As written in this Technical Q&A : By default, once your application creates an OpenGL context (by either calling OpenGL directly or an API that relies on OpenGL such as Core Animation, Core Image, etc), the MacBook Pro automatically switches to the higher-end discrete GPU for performance concerns and won't switch back until the application quits. There is a way to prevent this? The discrete GPU, on newer MacBook Pros, wastes power and shortens battery life. The simple insertion of the NSSupportsAutomaticGraphicsSwitching key in Info.plist (suggested in the Technical Q&A), apparently, is not

How can I get an NSView to resize to fit the desired sizes of its subviews using Auto Layout?

好久不见. 提交于 2019-12-02 21:16:17
I have a superview with three subviews. Two of those subviews are fixed in size and position within the superview, but the third can vary in size depending on its contents. I have set up auto layout constraints to set the size and position of each of the sub views, but what I would like to happen is that when the contents of the third view change, the superview should resize to be able to display it fully. I have implemented - (NSSize) intrinsicContentSize on that subview so that it returns the size it would like to be, but I can't work out how to add a constraint which will trigger the

Emacs 24 and GDB 6.3 on Mac OS X

百般思念 提交于 2019-12-02 20:53:56
I've been trying out Emacs 24 (pretest 24.0.95.1) on OS X Lion for the past few days but am running into some issues with the new gdb/MI interface. With GDB 6.3 that comes with Xcode, but the gdb/MI interface doesn't seem to load at all. It appears to try to start the GDB GUD mode, but no commands actually work. I also attempted installing GDB-7.4 via Homebrew. That gets me partly there. the gdb-many-windows interface shows up, but the gdb prompt never arrives. Emacs just sits there eating up 100% CPU, but yet doesn't become unresponsive. I can still open files, etc. I just can't do anything

How can I mount vmdk in 10.7?

吃可爱长大的小学妹 提交于 2019-12-02 19:39:50
I'm using OSX Lion and want to mount a VMDK-File which I've created on my VMWare Fusion 4.0.2. Is it possible?! I asked Google, it means I should mount the VMDK with an app under '/Library/Application Support/VMware Fusion/VMDKMounter.app', but this app isn't there. So I installed MacFuse (and later OSXFuse) like suggested, but there is still no VMDKMounter. Any suggestions? Zee You need a copy of Fusion 3.1.3 and Pacifist 2.6.4, download them from: http://downloads.vmware.com/d/info/desktop_end_user_computing/vmware_fusion/3_0 http://www.charlessoft.com Drag the Pacifist application to your

Problems installing Git with Homebrew [duplicate]

落爺英雄遲暮 提交于 2019-12-02 18:57:52
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 paths are fine export PATH="/usr/local/bin:$PATH" Again -- all I really need to know is how to set up the sym link. Thanks! All you should need to do is: brew link git

OS X Cocoa Auto Layout hidden elements

半腔热情 提交于 2019-12-02 18:31:29
I am trying to use the new Auto Layout in Lion because it seems quite nice. But I can not find good information about how to do things. For example: I have two labels: +----------------+ | +------------+ | | + label 1 | | | +------------+ | | | | +------------+ | | | label 2 | | | +------------+ | +----------------+ but the first label gets not always populated with content, sometimes there ist just no content for it. What I would like to do is to automatically show the label 2 where label 1 would be when it would have content. +----------------+ | +------------+ | | + label 2 | | | +---------

Resolved: MAMP Php can't exec ('convert') after Homebrew ImageMagick install

这一生的挚爱 提交于 2019-12-02 18:23:21
I installed Imagemagick using Homebrew on Lion, everything is fine except that it doesn't work at all when being called from php. Console: $ convert -version Version: ImageMagick 6.7.1-1 2011-07-29 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC Features: OpenMP $ which convert /usr/local/bin/convert PHP: echo exec ('convert -version'); or exec('convert -version', $output); var_dump($output); Produces nothing (or an empty array). exec ('/usr/local/bin/convert') // works, but exec ('which convert') // doesn't I need to test this locally to make sure I