osx-mountain-lion

grep (BSD grep) 2.5.1-FreeBSD on mac os 10.8 line regexp mode not working with overlapping patterns

只愿长相守 提交于 2019-12-01 02:45:27
问题 It seems like the stock version of grep (version info: grep (BSD grep) 2.5.1-FreeBSD) under mac os 10.8 has an issue with patterns sharing a common prefix when being run in line regex mode (-x). In the following minimal example I would expect that grep reports "test" and "test2" but instead only "test" is reported. (Same also holds true for word regexp mode (-w)). printf "test\ntest2\n" > f1.txt printf "test\ntest2\n" > f2.txt grep -x -F -f f1.txt f2.txt Has anyone else made similar

apache tomcat 7.0.30 datasourcerealm javax.naming.NameNotFoundException: Name [jdbc/proto] is not bound in this Context. Unable to find [jdbc]

做~自己de王妃 提交于 2019-12-01 01:54:45
问题 let me describe the environment first: environment: - mac os x (java build 1.6.0_35-b10-428-11M3811) - apache tomcat 7.0.30 - mysql 5.5.27 - tomcat/lib --> mysql-connector-java-5.1.22-bin.jar i've implemented successfully a JDBCRealm and want to switch to a DataSourceRealm because it is recommended for production environments. i use form-based authentication. I did everything described here: http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#DataSourceRealm and here: http://tomcat

nc (netcat) on Mac OS X 10.8.4 gets stuck

人盡茶涼 提交于 2019-12-01 00:01:00
I encountered a little issue while using the nc utility on Mac OS X, a utility i often use as a quick and dirty solution to check if a port is open and what version the daemon is running. We deployed a new set of computers the other day and i wanted to verify what version of sshd they were running, without having to leave my chair. This is the command i ran and the resulting output: $ for i in {183..200}; do echo "hello" | nc -n -w 2 -v 10.120.113.$i 22; done Connection to 10.120.113.183 22 port [tcp/*] succeeded! SSH-2.0-OpenSSH_5.9 Protocol mismatch. nc: connect to 10.120.113.184 port 22

How to compile a servlet for Tomcat in command line? error: package javax.servlet does not exist

只谈情不闲聊 提交于 2019-11-30 15:42:44
I've got this error message when I compiled a Java file : error: package javax.servlet does not exist I installed a big .SH file for Jave EE SDK, a Java version gives me this: java version "1.7.0_10" Java(TM) SE Runtime Environment (build 1.7.0_10-b18) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode) Do I need to install something else? I am using Tomcat 7 as a Servlet Container located in /Library/Tomcat/ and simple text editor with the command line. cowls You need to include the servlet-api JAR in the compile time classpath. If you are using maven add this as a dependency in

can't find mcrypt => Call to undefined function Laravel\mcrypt_create_iv()

狂风中的少年 提交于 2019-11-30 12:58:47
问题 Trying to set up Laravel and keep getting hit with this error. I installed mcrypt through brew and it is located in /usr/local/Cellar. Any thoughts? .. It's not showing up in terminal command php -m either, if that matters. I'm running Mountaion Lion with macs native web server. 回答1: You need to enable it in your php.ini file as well and probably restart Apache. In php.ini you will find ;mcrypt.so and remove the ; from it. Or, if it's not in there, just add mcrypt.so somewhere. Also the salt

Compile simple hello world ZeroMQ C example, compile flags?

大憨熊 提交于 2019-11-30 12:07:08
问题 Trying to compile the example hello_world.c from the zeromq tutorial: http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive Pretty sure I have everything installed in OSX Mountain Lion. clang -Wall hwserver.c -o hwserver gives me an error: Undefined symbols for architecture x86_64: "_zmq_bind", referenced from: _main in hwserver-OgrEe6.o "_zmq_ctx_new", referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_close", referenced from: _main in hwserver-OgrEe6.o "_zmq_msg_data", referenced

How to uninstall Xcode 4.4 command line tools (Mac OS X 10.8 Mountain Lion)?

浪尽此生 提交于 2019-11-30 11:51:00
This SO post explains very well how to install command line tools for Xcode 4.4. But how to uninstall them? There's a script listed on this page to do just that on Mountain Lion: http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/ Copy the script into a text file. Save it as remove_CLI_tools.sh Open terminal and navigate to the folder where you saved the script. Type: sh remove_CLI_tools.sh I installed just the isolated command line tools (stand alone installer) without installing the Xcode application. So I ended up running the script twice, changing the variables

Getting Ruby 1.8.7 installed on Mountain Lion (10.8)

妖精的绣舞 提交于 2019-11-30 11:48:38
问题 I'm having a lot of trouble getting Ruby 1.8.7 installed on my clean install of Mountain Lion. I've looked around on Stack Overflow and don't see anything that specifically addresses this issue and hope that someone might have encountered this before. I'm using the command line tools that can be downloaded with Xcode I haven't had any problems installing Ruby 1.9.3 via RVM and HomeBrew. When I try to install 1.8.7 I get the following message after it tries to compile: I first ran the command

Java applet with self-signed certificate on OS X Mountain Lion

↘锁芯ラ 提交于 2019-11-30 11:42:10
We have a Java applet that needs to run with full trust. While developing and during pre-release tests we sign it using a self-signed certificate (the production version is signed with a real code signing certificte). But when we try to start the self-signed applet on the prerelases of OS X 10.8, we can no longer choose to allow it to run. The "Allow"-button is simply disabled: If I press "Show Details..." I can choose to "Always trust" the certificate, but this makes no difference: It works with the same version of the Java JRE on OS X Lion 10.7, so I suspect it is an issue with the OS and

How to fix “yo: command not found” after installing Yeoman

泄露秘密 提交于 2019-11-30 10:56:25
问题 Following these instructions, I tried to install yeoman using npm twice: http://yeoman.io/learning/index.html After the first failure, I uninstalled node using these instructions: How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X) Then, I installed nvm and node/npm (via nvm) with one error: [Yeoman Doctor] Uh oh, I found potential errors on your machine --------------- [Error] NPM root value is not in your NODE_PATH [info] NODE_PATH = /Users/joanna/.nvm/v0.10.22