w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to enable httprequest for mamp 2.0 Mac mountain lion, not http_request2
It is not about problem with MAMP. MAMP by default is installed without httprequest library. You need to install it manually like you did it with your local server. If your client doesn't want install any libraries from PECL you need to solve problem alternatively.

Categories : PHP

Scratch Effect Plugin: getting the scratch to go across multiple panels without lifting mouse
http://jsfiddle.net/ericjbasti/CeTR8/5/ Changed self.theCanvas.bind('mousedown', $.proxy(self.addDownHandler, self)); to $(window).bind('mousedown', $.proxy(self.addDownHandler, self));

Categories : Javascript

Installing JDK on OSX Lion for Scala
Scala is a popular enough of a language for there to be plenty of information on how to get started from scratch. For example, googling for "scala installation" gave me (amongst other stuff) http://www.tutorialspoint.com/scala/scala_environment_setup.htm —they talk about JVM versions, how to install Scala, etc; i.e. all you need. If that page won't do, I'm sure you'll find many more.

Categories : Scala

MAC OSX LION: gcc on mac not compiling wget
Honestly, even though it appears that gcc exists; but does it point to a valid install? It still sounds like it is not installed properly and with an upgrade to Mountain Lion, all your open source tools have been scrubbed away and pushed to Xcode and must be manually installed if necessary.

Categories : C++

Will it be possible to upload to App Store from Lion?
Your Lion will be just fine as stated here: https://developer.apple.com/support/ios/ios-dev-center.html "To develop with the iOS SDK and Xcode, you must have an Intel-based Mac running Mac OS X Snow Leopard or later and you must be registered as an Apple Developer." Update July 2015 https://developer.apple.com/support/enrollment/ You must have an Intel-based Mac running OS X Yosemite (v10.10) or later.

Categories : IOS

SublimeClang OSX Mountain Lion C++11
It may be too late, but I found how to do it. This matter is because clang uses headers for gcc-4.2, which is quite old and doesn't support C++11. To complete C++11 code, you have to get newer gcc and copy the include path it uses. If you have homebrew, open terminal and type brew tap homebrew/versions brew install gcc48 You can install gcc-4.8 and new libstdc++ with these two lines. Now, create some c++ file and try to use g++-4.8 with -v option. g++-4.8 -v example.cpp -v option tell gcc to show detailed log. In the output, there should be some lines like this. #include <...> search starts here: /usr/local/Cellar/gcc48/4.8.1/gcc/lib/gcc/x86_64-apple-darwin12.4.1/4.8.1/../../../../include/c++/4.8.1 /usr/local/Cellar/gcc48/4.8.1/gcc/lib/gcc/x86_64-apple-darwin12.4.1/4.8.1/

Categories : C++

Mac OSX Lion/X11/CImg Library
The header file Xlib.h is in /opt/X11/include, so add that path to the Header Search Paths in Xcode: You'll probably need to add libraries from /opt/X11/lib as well...

Categories : Xcode

Two versions of PHP - Mountain Lion
Your Apache is including libphp5.so of the wrong/the other installation. Option 1: See if you can find a libphp5.so file for your other PHP installation and point the Apache config to it (just put the whole path in the LoadModule line and restart Apache). If you cannot find such a file, the Apache module wasn't compiled for that PHP version. Compiling that may be a bit complicated, so in that case: Option 2: Figure out which PHP you're executing on the command line using which php and then just use the other one using the full path, e.g. instead of $ php ... use $ /usr/bin/php .... Note that you may still have different PHP configuration files for Apache and the CLI.

Categories : PHP

TideSDK Notifications in OSX Lion 10.7.5
Harry, I'm not too familiar with CoffeeScript, but the following code works for me in 10.7.5 and 10.8.4 - it seems similar to what you have: function showNotify(title, message) { var notification = Ti.Notification.createNotification({ 'title': title || 'No Title', 'message': message || 'No Message', 'timeout': 10 }); notification.show(); } showNotify("The Title", "The Message"); Hope it helps.

Categories : Misc

R - OSX Mountain Lion and CPU Limit
Tried ulimit... Appears I do not have access, even via sudo. I get the same output from ulimit -a -H before and after giving ulimit -t 12000 # sets cputime limit to 12000 seconds from 600 seconds SOLVED via Debian Virtual Machine. If someone has a Mountain Lionic solution, please let us know.

Categories : R

Symfony2 app from scratch
Start by reading ALL the available documentation so you're familiar with features offered by the framework: http://symfony.com/doc/current/index.html I mean ALL the documentation (The book, the cookbooks, the components, everything). Seriously. Read A year with Symfony to learn even more about Symfony. Read few Symfony related blogs, for example: http://richardmiller.co.uk/ http://fabien.potencier.org/ http://php-and-symfony.matthiasnoback.nl/ http://www.whitewashing.de/ Than read some more. Browse through available bundles to see what you could quickly use in your prototype. Also, if there's no appropriate bundle solving your problem, search on https://packagist.org/ - might be there's a PHP library you could use and integrate it with Symfony by creating a bundle (and potentially

Categories : PHP

RabbitMQ not working on OS X Mountain Lion
I've managed to fix this issue by completely removing brew from my system and reinstalling it again. I've used the following instructions (adapted from the official brew documentation) to completely remove brew from my system: cd `brew --prefix` rm -rf Cellar brew prune rm -r Library/Homebrew rm -rf .git rm -rf ~/Library/Caches/Homebrew I simply reinstalled RabbitMQ afterwards: brew install rabbitmq .. and everything worked like a charm!

Categories : Osx

Which Python architecture provided on Mac (Lion)?
Use platform.architecture(): >>> import platform >>> platform.architecture() ('64bit', '') Run on my Mac OS X 10.8.4. Note that your Python executable may be a universal binary, in which case you could get the wrong architecture quoted: Note: On Mac OS X (and perhaps other platforms), executable files may be universal files containing multiple architectures. You can also test sys.maxsize: >>> sys.maxsize > 2**32 True The above would return False if you were running a 32-bit platform.

Categories : Python

Can't Uninstall Java 7 JDK on Mac OS X (Mountain Lion 10.8.4)
If you can't find the Java Home, open up terminal and enter: env look for or SOMETHING LIKE THIS Mine might not be the same as yours JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.7/Home This is where your Java is installed If you want to see it in Finder then open up Finder and press Command + Shift + G and enter in the path to java home. to uninstall simply remove the java version from : /System/Library/Java/JavaVirtualMachines with cd /System/Library/Java/JavaVirtualMachines rm -r some.version.java.jdk Note: Sometimes Java is install in /System/Library but sometimes it's installed on /Library, so that's why you couldn't find Java in /Library which the Oracle document suggested.

Categories : Osx

How do I create a .conf file in Mac osx Lion?
Open TextEdit's Preferences, and switch to the Open and Save section. Under the When Saving a File panel, uncheck the Add '.txt' extension to plain text files option.

Categories : Osx

How can I install pybrain on Mac OS X Mountain Lion?
Try using the Python package manager pip with the correct permissions: pip install pybrain or clone the repo and build the package git clone git://github.com/pybrain/pybrain.git python setup.py install

Categories : Python

Installing Cloudera Hue on mac os x mountain lion
You need to delete desktop/core/ext-py/Twisted and retry. Also Hue 2.5 release (which contains this fix) is around the corner (this Monday/Tuesday).

Categories : Osx

Tesseract and dylib on OSX Mountain Lion
Done by cleaning my installation of both the softwares and re-installing them through brew. Mind that if there is some linking problem, you have to execute brew link --overwrite tesseract to solve them.

Categories : Misc

Where are the files generated with Xcode 4.5 in Lion?
This has nothing to do with Lion. Xcode puts generated files in: ~/Library/Developer/Xcode/DerivedData where ~ is your home directory. Keep in mind that the ~/Library directory is hidden by default in Lion (and later).

Categories : Xcode

Does anybody know how to sniff in promiscuous mode on OS X Lion?
I recall having to setup a script on terminal to "tweak the permissions" of some files / drivers That's probably referring to the permissions on the /dev/bpf* devices. That's not something necessary to sniff in promiscuous mode, it's something necessary to sniff at all unless you're running as root. Recent versions of Wireshark, going back at least to Wireshark 1.8.0, install a script to do that automatically. Open up a Terminal window and do ls -l /dev/bpf*; it should report the /dev/bpf* devices, e.g. /dev/bpf0, /dev/bpf1, etc. as having permissions rw-rw---- and as being owned by root and group access_bpf. In addition, the id command should report you as being a member of group access_bpf. If that's all the case, Wireshark should show an en0 device and possibly an en1 device.

Categories : Osx

Mac Lion: Issue with opencv and python 2.7.5
This is how I configured it in the end for the official python 2.7.5 from http://www.python.org First we need to install opencv via brew: brew tap homebrew/science brew install opencv now add /usr/local/Cellar/opencv/2.4.5/lib/python2.7/site-packages to your PYTHONPATH . I did it by editing bash_profile: open ~/.bash_profile add this line in TextEditor: export PYTHONPATH=/usr/local/Cellar/opencv/2.4.5/lib/python2.7/site-packages:$PYTHONPATH #Check the version in your directory Save the file and do: source ~/.bash_profile Now everything should be ready.

Categories : Python

Installing jpype in Mountain Lion
This is on a system running OSX 10.8.5. I modified the setup.py for JPype-0.5.4.2 and added an element to the end of the self.includeDirs list which is created in the function setupInclusion. This function is declared at line 61 for this particular version of JPype. def setupInclusion(self): self.includeDirs = [ self.javaHome+"/include", self.javaHome+"/include/"+self.jdkInclude, "src/native/common/include", "src/native/python/include", #I added this line below. The folder contains a jni.h "/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/" ] Finally I ran pip install ~/Path/To/JPype-folder/ and the installation was successful.

Categories : Java

Mac OS X Lion - mysql: command not found
In the past I've had problems installing the mysql2 gem, so I wrote a little shell script to make my life easier: #!/bin/sh -x env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Try updating that with the path to your mysql_config: /usr/local/Cellar/mysql/5.5.28/bin/mysql_config and change mysql to mysql2.

Categories : Mysql

Mono Program Crashes on OSX Lion
This might be a problem of where you built it: try building it in Lion instead to see if that makes a difference. I've seen problems before when trying to execute a program on an older OS than where it was built.

Categories : C#

How to recreate migrations from scratch
If you would like to start work "code first migration" using an existing database, you can do the following: I run the add-migration "InitialMigrations". It explores the existing database and make it a migration step. temporarily delete the contents of the "InitialMigrations" step: public partial class InitialMigrations : DbMigration { public override void Up() { //... //... } public override void Down() { //... //... } } I run the update-database This creates the appropriate entries in the table __MigrationHistory. Restores the contents of the "InitialMigration" Go to work properly on an empty database. That's it. update: initializer As I understand it, the 'DropCreateDatabaseAlways' always delete and create the database.

Categories : Entity Framework

Guava Cacheloader from scratch
have you looked at EhCache spring annotations (http://ehcache.org/documentation/recipes/spring-annotations)? Seems like that's exactly what you need here... Simply add @Cacheable(name="getAvailableNews") above your getAvailableNews() method, and the framework will automatically take care of caching the results for you (first time calls the DB, fetches the results back, and cache them...next time, get it from the cache directly) For this to work though, you need to change a bit your class construct...I would remove the "newsList" instance variable...that's cause for inconsistencies and troubles...(you probably did that to build some sort of home grown "caching" which I can understand) and update your getAvailableNews() method to actually return the List object... @Cacheable(name="getAvai

Categories : Java

Implementing an OPC DA client from scratch
I have a c# implementation but actually it's hard to fit it in here. I'll try to summarize the steps required. Mostly you need to have OpcRcw.Comn.dll and OpcRcw.Da.dll from the OPC Core Components Redistributable package downloable for free from Opcfoundation.org. Once installed, the files are located in C:WindowsassemblyGAC_MSIL. Create a reference in your project. About coding, this is what you should do (there are three objects you want to implement, Server, Group and Item): Let's start with server: Type typeofOPCserver = Type.GetTypeFromProgID(serverName, computerName, true); m_opcServer = (IOPCServer)Activator.CreateInstance(typeofOPCserver); m_opcCommon = (IOPCCommon)m_opcServer; IConnectionPointContainer icpc = (IConnectionPointContainer)m_opcServer; Guid sinkGUID = typeof

Categories : Misc

Python Shuffle from scratch
Something like the next (not tested). from random import choice def get_list( l ): len_ = len( l ) output = [] for i in range( len_ ): index = choice( len( l ) ) output.append( l[ index ] ) del l[ index ] return output

Categories : Python

Scratch generate by openssl_random_pseudo_bytes PHP
Unfortunately, bin2hex() gives you a hexadecimal representation of the binary values. Hexadecimal can only represent 0-9 and A-F since it's a base 16 number system. However, you could do something like the first answer to this question: PHP random string generator to generate random strings with Qs and Ws.

Categories : PHP

Scratch image in android?
If you use Android-WScratchView library, you can register OnScratchCallback and assign the percentage of cleared part to your progressbar scratchView.setOnScratchCallback(new WScratchView.OnScratchCallback() { @Override public void onScratch(float percentage) { yourProgressBar.setProgress(percentage);//Assign progressbar value here } @Override public void onDetach(boolean fingerDetach) { if(mPercentage > 50){ scratchView.setScratchAll(true); updatePercentage(100); } } }); You can check full sample at here

Categories : Android

installing pycrypto on mountain lion with xcode 5
The solution was to reset my active Xcode to Xcode4. You were right, XCode5 has all kinds of problems and isn't ready for primetime. To switch back to your 'regular' XCode (Xcode 4.6 current release) sudo xcode-select -switch /Applications/Xcode.app credit to: http://stackoverflow.com/questions/11961032/xcrun-error-could-not-stat-active-xcode-path-volumes-xcode-xcode45-dp1-app-c Now pycrypto installs perfectly.

Categories : Python

Running Python locally on Mountain Lion
Try this (or possibly switch WebServer to webserver (what I changed was make the pathnames all be WebServer; you had some Webserver (lowercase S) and some WebServer <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents/python-mn" ServerName python.local ServerAlias www.python.local WSGIScriptAlias / /Library/WebServer/Documents/python-mn/wsgi.py <Directory /Library/WebServer/Documents/python-mn> #Options Indexes FollowSymLinks MultiViews Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> Per Apple's mod_hfs_guide, your error message is due to

Categories : Python

can't connect to postgres server with mountain lion
Do you have the user "postgres" in the system? I don't know homebrew but maybe you need: /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data Also postgres user must have write permissions on logs files.

Categories : Ruby On Rails

use c++11 on mac os x mountain lion with eclipse (Juno or Kepler)
Well after trying different things and expending tedious time fixing my issue I will answer my own question with the hope someone with my same needs will not experiment such annoying situation. First as in a lot of forums remark and is well know the gcc compiler provided for the Mac OS is old and obsolete (more than 5 years old is a lot in computing terms), so first step to work with c++11 is to get a new version of the gcc. There are two options with the packets common managers (homebrew and macports), I have to say that I was that frustrated that i tried both to see if was a problem of the version in the packet manager even thought should be the same, but for my surprise there is a small difference which later I will explain, which bring me to suggest use macport because with macports

Categories : Eclipse

Uninstall postgresql on MacOs Lion Mountain
You don't have to remove the version Apple ships. I have been using MacPorts to run various custom builds of PostgreSQL on OSX. It takes a little effort to make it "just work" (PATH and PG environment variables) but I never had to remove Apple's copy of Postgres. I also keep a VM (VirtualBox) of a pretty minimal Debian install with Postgres running. I can do all my testing against the VM with a change of PG variables or JDBC URL. It's not as performant as running on the host but it is really clean for development.

Categories : Osx

Fail Installation: OpenCV 2.4.6.1 on Mac OS X Mountain Lion
you could just skip the performance tests for now. (you can always build them later, once this got solved) add: -D BUILD_PERF_TESTS=OFF to your cmake cmdline [edit] looks you're having issues #3191 and 3179 both of them are fixed in 2.4 now https://github.com/Itseez/opencv/pull/1228 , https://github.com/Itseez/opencv/pull/1244 when did you download the code ? might consider getting a fresh copy ?

Categories : Osx

Can't run Composer on my Mac Mountain Lion - openssl extension
In doubt (tks to Sven for pushing me that direction ;) ), I reinstall using port the openssl extension. sudo port install php5-openssl It didn't download files but reset something in the preferences and i was able to run Composer install properly on Tiki Wiki CMS (the CMS i'm using most).

Categories : Osx

SubVersion on Apache on Mountain Lion Server
Weep.... On ML Server the Apache configuration file is /Library/Server/web/config/apache2/httpd_server_app.conf Not /etc/appache2/httpd.conf As I would have thought. Once I read this it all made sense and started working. https://help.apple.com/advancedserveradmin/mac/10.8/#apd9eb9f4ab-1377-47e6-a2c4-1311e25a74df Sorry.

Categories : Osx

Boost 1.54 build error under OS X 10.8.4 Mountain Lion
With the hint from Igor R, I tried gcc 4.8.1 on linux which works well. Then I think c++11 might play a role in the errors and tried to find how to get c++11. So eventually I got it to work. XCode comes with two sets of tool. gcc front-end + llvm backend and clang front-end + llvm backend. The gcc version is old as on my machine ( 4.2 ), the clang supports c++11, so once I use "toolset=clang", I can compile everything successfully.

Categories : Xcode

vagrant fails to start up in osx mountain lion
I dont think the issue is to do with the permissions - well probably not... that will probably just be a warning. Try running vagrant in Gui mode to see if you can see any errors in the VM itself. http://docs.vagrantup.com/v2/virtualbox/configuration.html

Categories : Misc



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.