osx-lion

OS X Cocoa Auto Layout hidden elements

拥有回忆 提交于 2019-12-31 08:45:17
问题 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

iPhone/OS X LION: How to retrieve the decoded data from the CC_SHA256 encrypted data?

和自甴很熟 提交于 2019-12-31 07:33:07
问题 I am encoding NSString input using the following code (CC_SHA256). Could someone help me retrieving in decoded format using the same logic? -(NSString*) encodeAndGetHashInfo :(NSString *) inStringToHashIt { NSDate *currentDate = [NSDate date]; NSLog(@"currentDate %@",currentDate); NSTimeInterval currTimeMillsecs = ([currentDate timeIntervalSince1970] * 1000); NSString *strCurrTimeMilliSecs = [NSString stringWithFormat:@"%.0f", currTimeMillsecs]; NSLog(@"strCurrTimeMilliSecs: %@",

Build and install Brew apps that are x86_64 instead of i386?

陌路散爱 提交于 2019-12-30 18:29:41
问题 After I have done this: brew install git I do this: which git which returns: /usr/local/bin/git I then do this: file /usr/local/bin/git which returns: /usr/local/bin/git: Mach-O executable i386 I need brew to install as x86_64. How can I force brew to build and install my apps as x86_64? brew --config Returns this: HOMEBREW_VERSION: 0.9 HEAD: 1c64a6624ed83ef17af6e98638b8165400e9e908 HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar CPU: quad-core 64-bit sandybridge OS X: 10.7.4

postgresql failing with below error on lion os x

余生长醉 提交于 2019-12-30 11:27:06
问题 Failed system call was shmget(key=5432001, size=16498688, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 16498688 bytes), reduce PostgreSQL's shared_buffers parameter (currently 1536) and/or its max_connections parameter (currently 104). If the request size is already small, it's

“-std=gnu++0x”option for MacOS

雨燕双飞 提交于 2019-12-30 10:04:34
问题 I'm trying to compile a CMake project which uses set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wall -std=gnu++0x") in the CMakeLists.txt file under MacOS X Lion. I have installed XCode 4.2.1. but the compiler fails with this: cd something/src/lib && /usr/bin/c++ -Dlib_ginacra_EXPORTS -Wall -std=gnu++0x -fPIC -o CMakeFiles/lib_ginacra.dir/utilities.cpp.o -c something/src/lib/utilities.cpp cc1plus: error: unrecognized command line option "-std=gnu++0x" The compiler's verion is: c++ --version i686

“-std=gnu++0x”option for MacOS

♀尐吖头ヾ 提交于 2019-12-30 10:03:30
问题 I'm trying to compile a CMake project which uses set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wall -std=gnu++0x") in the CMakeLists.txt file under MacOS X Lion. I have installed XCode 4.2.1. but the compiler fails with this: cd something/src/lib && /usr/bin/c++ -Dlib_ginacra_EXPORTS -Wall -std=gnu++0x -fPIC -o CMakeFiles/lib_ginacra.dir/utilities.cpp.o -c something/src/lib/utilities.cpp cc1plus: error: unrecognized command line option "-std=gnu++0x" The compiler's verion is: c++ --version i686

OpenGL invalid framebuffer operation after glClear(GL_COLOR_BUFFER_BIT);

℡╲_俬逩灬. 提交于 2019-12-30 08:36:30
问题 Every time after I call glClear(GL_COLOR_BUFFER_BIT); , I get the OpenGL error "invalid framebuffer operation". The call seems to work just fine, and nothing seems wrong. I call glClear(GL_COLOR_BUFFER_BIT); first thing in the ::paintGL() method. Huh? Should I just disregard this error? 回答1: My best guess is that your framebuffer is not complete and calling glClear on an incomplete framebuffer is throwing the error. Check the status of the framebuffer using glCheckFramebufferStatus and make

How to develop in Java on Mac with OSX Lion

你说的曾经没有我的故事 提交于 2019-12-30 01:12:29
问题 Im a new Java developer and was thinking about getting a Mac. But I heard that OSX Lion does not support Java. Does that mean that I cannot develop Java on a Mac? Or that I just have to go get all the Java downloads myself? 回答1: What it means for right now, is nothing has changed, except that the JDK 6 and on is now a separate download via Software Update. For JDK 7 it will be available from Oracle, maybe even through the App Store if we are lucky! What has happened is Apple has quit mangling

MAMP: How to upgrade PEAR

浪尽此生 提交于 2019-12-29 18:39:07
问题 When trying to upgrade MAMP pear the following error is raised: Notice: unserialize(): Error at offset 276 of 1133 bytes in Config.php on line 1050 ERROR: The default config file is not a valid config file or is corrupted. Some suggestions how to fix this? Steps to reproduce: Installed MAMP (version 2.0.5) cd /Applications/MAMP/bin/php/php5.3.6/bin sudo ./pear upgrade pear above mentioned error is thrown Update (1): Based on answer 8375349/420953 I tried 2 possibilities to fix this A: delete

How to run iPhone emulator WITHOUT starting Xcode?

旧时模样 提交于 2019-12-29 10:09:13
问题 On my old Mac running Snow Leopard, I could type "ios" into spotlight and it would start up the iPhone/iPad emulator by itself. I have since had to get a new machine running Lion. I have installed Xcode for Lion, I have installed the developer tool options from the preferences panel. But the "ios" option is no longer there :( The only way now seems to be to run Xcode, create an empty project and then launch emulator with the run option. I have searched and searched the intertubes and the