terminal

Permission Denied on httplib2 install

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-04 04:13:08
问题 I'm trying to install the httplib2 library for Python so I can use it to interact with the Twitter but I get the following error in the console when I try to install via 'python setup.py install'. This is a new MBA and I am the only user (and Admin) so I shouldn't get denied so rudely! error: could not create '/Library/Python/2.7/site-packages/httplib2': Permission denied Thoughts? 回答1: Use sudo to run setup.py as root: % sudo python setup.py install 回答2: Some say that using sudo on python

How to change the default Xcode iphone simulator when testing in the terminal?

最后都变了- 提交于 2020-01-04 03:59:07
问题 I know there is a simular question here: (How to change the default Xcode iphone simulator when testing) But it still doesn't answer the question of how to do it in the terminal. Meaning: I'm working on a React Native project now & when I run it in the terminal (react-native run-ios) it opens iPhone 6. Now I would like to change this default to a iPhone 7 as it works better on my screen. How can I change this. (I've tried changing it in Xcode, but It keeps changing back.) I have looked

ANSI escape sequence save/restore cursor position support

喜你入骨 提交于 2020-01-03 18:15:47
问题 Are there any known terminals which support the ANSI escape sequences for cursor keys up, down, forward and back: CSI n A Cursor Up CSI n B Cursor Down CSI n C Cursor Forward CSI n D Cursor Back but don't support the save-cursor-position and restore-cursor-position escape sequences? CSI s Save Cursor Position CSI u Restore Cursor Position 回答1: A genuine VT100 (or VT220 for that matter) did not recognize these control sequences for save/restore cursor position. They use (as noted in xterm's

Mac Terminal can't run most commands after restarting it

假装没事ソ 提交于 2020-01-03 17:46:05
问题 I am using a mac. I have a customised terminal zsh , and it was fine for a while. But after I restarted my computer, it started to behave differently: The terminal stopped running commands such as rake or rails . I have already created applications using rails, but using a rails command like rails -v now gives me this: Rails is not currently installed on this system. To get the latest version, simply type: The terminal used to display a tilde ~ instead of my username and that has also stopped

Unix/C++: Open new terminal and redirect output to it

纵然是瞬间 提交于 2020-01-03 17:39:37
问题 My program (C++ on Solaris 10) writes output via wcout to its terminal when it is started from a shell. But when I execute it from within Sun Studio or the file manager is does not have a terminal and the ouput appears in the Sun Studio output window or nowhere at all. I would like it to open its own terminal window in any of the three cases and attach wcout to this terminal window. I want this to be done be the program itself with C++ system calls not by the way how the program is executed

Unix/C++: Open new terminal and redirect output to it

99封情书 提交于 2020-01-03 17:35:10
问题 My program (C++ on Solaris 10) writes output via wcout to its terminal when it is started from a shell. But when I execute it from within Sun Studio or the file manager is does not have a terminal and the ouput appears in the Sun Studio output window or nowhere at all. I would like it to open its own terminal window in any of the three cases and attach wcout to this terminal window. I want this to be done be the program itself with C++ system calls not by the way how the program is executed

Python raw_input() limit with Mac OS X Terminal?

北战南征 提交于 2020-01-03 15:50:13
问题 I wrote a python script and have been running it in terminal on Mac OS X snow leopard using python2.6. I used raw_input() to import text in several places, but I seem to reach a limit where it will no longer accept any more characters. Is this a limit in python raw_input() or is this something to do with Terminal or Mac OSX? Is there a better way to have the user input larger amounts of text in python? 回答1: I'd say it's a limitation/bug with the OSX Terminal - try running the script with

How to explain './' prefix before the name of an executable in terminal? [closed]

时光总嘲笑我的痴心妄想 提交于 2020-01-03 15:33:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Every time I compile a C program, say with the cc compiler, I get an executable in the current directory. Now if I want to run it, instead of typing out just a.out or name_of_executable , I have to prefix that with this combination ./a.out . I understand the meaning behind . (link to the current directory) and .

how to trim audio file with specific time from text file by using SoX in Mac terminal?

£可爱£侵袭症+ 提交于 2020-01-03 03:18:05
问题 I have a text file looks like this text file ,and I want to use sox to trim the audio file based on the time in the text file, so I can have different audio clips from 0.0 to 6.16, 6.16 to 13.44, 13.44 to 17.54 etc.. I understand the basic script for sox trim is *$ sox audio.wav newaudio.wav trim starttime duration* But how can I get the duration from the text file and use sox to trim the audio? 回答1: Updated Answer I think the following code may be closer: #!/bin/bash index=0 while read this;

Use command-line Ant to build Eclipse Ant project

[亡魂溺海] 提交于 2020-01-03 03:01:59
问题 For my current project I need to run the build of our Java projects. But for the current task I am doing, Eclipse is not helping at all. All tools I need are not integrated in Eclipse, everything I do in Eclipse is clicking the Ant tasks. So is there a way to just do it by command line? Simply calling the command arguments for Ant does not work. I am running on Ubuntu Linux. 回答1: You can invoke the command-line builder with the following command. eclipsec -nosplash -application org.eclipse