osx-lion

“PHP Fatal error: Class 'HttpRequest' not found”

别来无恙 提交于 2019-11-26 22:35:26
I've been stuck trying to solve this problem in many ways, reading a lot of posts but still having no luck. I work on a Mac, OSX 10.7 Lion, and I'm writing a plugin for a WordPress site (php files) using MAMP, and at one point I have to make an HTTP request: $request = new HttpRequest('something'); $request->setMethod(HTTP_METH_GET); There's an error when executing this request and when I checked the log file, here's the message: "PHP Fatal error: Class 'HttpRequest' not found in (the_php_file)" I've already installed PEAR, PECL and the HTTP extension (pecl_http), Xcode and its command line

Hadoop on OSX “Unable to load realm info from SCDynamicStore”

蹲街弑〆低调 提交于 2019-11-26 22:30:39
问题 I am getting this error on startup of Hadoop on OSX 10.7: Unable to load realm info from SCDynamicStore put: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/travis/input/conf. Name node is in safe mode. It doesn't appear to be causing any issues with the functionality of Hadoop. 回答1: Matthew Buckett's suggestion in HADOOP-7489 worked for me. Add the following to your hadoop-env.sh file: export HADOOP_OPTS="-Djava.security.krb5.realm=OX.AC.UK -Djava

How to use AVX/pclmulqdq on Mac OS X

心已入冬 提交于 2019-11-26 22:23:08
问题 I am trying to compile a program that uses the pclmulqdq instruction present in new Intel processors. I've installed GCC 4.6 using macports but when I compile my program (which uses the intrinsic _mm_clmulepi64_si128), I get /var/folders/ps/sfjmtgx5771_qbqnh4c9xclr0000gn/T//ccEAWWhd.s:16:no such instruction: `pclmulqdq $0, %xmm0,%xmm1' It seems that GCC is able to generate the correct assembly code from the instrinsic, but the assembler does not recognize the instruction. I've installed

Fullscreen feature for Java Apps on OSX Lion

别说谁变了你拦得住时间么 提交于 2019-11-26 22:14:56
问题 How can I (natively) implement the fullscreen feature of OSX Lion in a Java application? The current answers given incorporate a good method for achieving a sort-of-fullscreen feature. I've read that Eclipse may be able to use the "native" fullscreen feature of Lion. That's what I'm asking about. 回答1: I found this on Apple's Java release notes: Mac OS X 10.7 Lion Fullscreen Support Java applications on Lion can now opt into the Fullscreen window feature per-window. Developers can use the com

Issue updating Ruby on Mac with Xcode 4.3.1

痴心易碎 提交于 2019-11-26 21:52:47
I'm using RVM to install it and it gives me this error: The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`. I'm on Lion 10.7.3 and I have Xcode 4.3.1. shigeya Short answer is you can grab RVM master branch (not stable) to build it with LLVM (not gcc, I mistyped initially). It has appropriate patches to make 1.9.3-p125 to run (at least better) with Xcode 4.3.1 by default. I provided the patch. If you already installed RVM, rvm get head will install the master branch. With command line tools installed with Xcode 4.3

Disable elastic scrolling in Safari [duplicate]

丶灬走出姿态 提交于 2019-11-26 21:19:53
This question already has an answer here: ipad safari: disable scrolling, and bounce effect? 15 answers I just wanted to diable the elastic scrolling/bounce effect in Safari (OSX Lion). I found the solution to set overflow: hidden for body in css, but as expected it only disables the scrollbar , so if the website is "longer" than the screen you won't be able to scroll! Any solutions or hints are welcome! Thanks! Aintaer You can achieve this more universally by applying the following CSS: html, body { height: 100%; width: 100%; overflow: auto; } This allows your content, whatever it is, to

How to update LLVM & Clang on Mac OSX?

吃可爱长大的小学妹 提交于 2019-11-26 20:37:43
问题 On my version of Mac OSX (Lion 10.7.1, XCode 4.1), there is LLVM 3.0svn and Clang 2.1. The current versions are LLVM 3.0 and Clang 3.0. From the XCode web site, it seems that the latest version (4.2.1) still uses LLVM 2.0, and this seems to be a mistake. Do you know if installing the latest XCode I will get a more recent version of LLVM/Clang? Do you know of any possible issues installing Clang manually? Once installed, will the new Clang be used automatically by all the IDEs I have (e.g.

gcc-4.2 failed with exit status 1

寵の児 提交于 2019-11-26 20:21:12
I've been looking for an answer to this issue but I couldn't find it, so here it is. I'm trying to install Uniconvertor with a setup.py file into a MacOS X Lion (Python 2.7.2) using: python setup.py install Then I get the following error code: running install running build running build_py running build_ext building 'uniconvertor.app.modules.streamfilter' extension gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -arch i386 -arch x86_64 -DMAJOR_VERSION=1 -DMINOR_VERSION=1 -I/Library/Frameworks/Python.framework/Versions/2.7

How can I test for OpenCL compatibility?

自作多情 提交于 2019-11-26 20:17:59
问题 I have a MacBook Pro 13' with an integrated Intel HD 3000 and a i7 core. I have to use Parallel Programming. My teaching advisors couldn't tell me if it would work with my MacBook. Is there a test I could run on my Laptop for testing? + I found this, but there is only a Linux and Windows SDK ... maybe the Linux version works also for Mac. What should I do? 回答1: vocaro's answer is absolutely correct; you can always use the CPU compute device on Snow Leopard and Lion, even if your particular

Why CURL return and error (23) Failed writing body?

孤街浪徒 提交于 2019-11-26 19:51:44
It works ok as a single tool: curl "someURL" curl -o - "someURL" but it doesn't work in a pipeline: curl "someURL" | tr -d '\n' curl -o - "someURL" | tr -d '\n' it returns: (23) Failed writing body What is the problem in the piping the curl output? How to buffer the whole curl output and then handle it? This happens when a piped program (e.g. grep) closes the read pipe before the previous program is finished writing the whole page. In curl "url" | grep -qs foo , as soon as grep has what it wants it will close the read stream from curl. cURL doesn't expect this and emits the "Failed writing