terminal

Can I open multiple terminal windows in WebStorm and how?

ぃ、小莉子 提交于 2020-01-16 03:57:36
问题 I have WebStorm 2019.2.2 on Windows and I would like to have multiple terminal windows, all simultaneously visible next to each other, not as multiple tabs in one terminal window. It is possible to split the editor window multiple times (see fig. 1) via a right-click menu but I can't find the same for the terminal window (fig. 2). Is it at all possible to achieve this in current version or do I need to contact JetBrains with a feature request? Firgure 1: Right-click menu for the editor window

Send some input to a Terminal window using Java on Mac OS

送分小仙女□ 提交于 2020-01-16 02:55:10
问题 I can get a terminal window or command prompt to open on either Mac OS or Windows. I want to send a string to that terminal or cmd window using my java. String in = " -i " + "\"" + tfIntdta.getText() + "\""; String rst = " - r " + "\"" + tfRstplt.getText() + "\""; String out = " -o " + "\"" + tfOutdta.getText() + "\""; String strip = " -s" + "\"" + tfStpdta.getText() + "\""; String guistring = "-n gui"; String wd = "\"" + System.getProperty("user.dir"); String osver = System.getProperty("os

Why is my mac terminal's ps -u not working?

北城余情 提交于 2020-01-16 02:26:26
问题 I am learning the Linux ps command and its possible arguments. My tutorial told me about the -u argument and I am trying to use it. No matter if I use it alone or with other args, it is throwing errors. I am inserting a picture of the output I keep receiving. I'm not sure if this is something to do with my Mac's terminal/shell, or if I am missing something that I should be typing. It seems to be telling me to use two hyphens, --u, instead of one, -u, but it gives me the same issue. If I JUST

Getting stdout contents without disabling cout/cin

眉间皱痕 提交于 2020-01-15 12:33:09
问题 Is it possible to save terminal (previously) written contents (stdout), to an array of strings: vector<string> lines; without disabling cin/cout normal functionality, in a linux console application. In a terminal window in addition to characters there's coloring information for each character. Is there a way to save them in another array? 回答1: If you mean you want to write inside a program to std::cout and have the data appear both on the terminal and in some program-internal data structure,

Trying to setup postgresql for ruby on rails locally

别等时光非礼了梦想. 提交于 2020-01-15 11:38:47
问题 I have installed postgresql via there app and it is running in the menu bar but when I run rails new blog -d postgresql i get the following output An error occurred while installing pg (0.14.1), and Bundler cannot continue. Make sure that `gem install pg -v '0.14.1'` succeeds before bundling. UPDATE this is what i get when i run the suggested command [~/sites]$ gem install pg -v '0.14.1' Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build

What Terminal does Python IDLE use on Windows

强颜欢笑 提交于 2020-01-15 11:30:11
问题 I was helping a fellow Stack Overflow-er today and I noticed that I don't know what terminal IDLE uses in Windows. I am tacitly assuming that Python didn't write their own terminal for Windows, and that they probably use an API that gives them some version of cmd or powershell . I verified that the interpreter runs on cmd , but I don't know about IDLE . What terminal does IDLE use in Windows? 回答1: IDLE is not built on an external shell or terminal, but on the Tkinter GUI toolkit. The source

How to measure the depth of a file system path?

限于喜欢 提交于 2020-01-15 10:29:48
问题 I'm looking for a way to do this on the command line, since this is not too hard a task in Java or Python . Something like: $ measure_depth /a/b/c/d/e/f 6 $ measure_depth /a 1 This question is functionally equivalent to "is there an easy way to count the number of slashes in a filename?" 回答1: Define a measure_depth function: measure_depth() { echo "${*#/}" | awk -F/ '{print NF}'; } Then, use it as follows: $ measure_depth /a/b/c/d/e/f 6 $ measure_depth /a 1 回答2: You can do something like tr

How to execute terminal commands in Swift 4?

て烟熏妆下的殇ゞ 提交于 2020-01-15 10:14:30
问题 I have an iOS app and in the unit tests (XCTests) I need to execute some terminal commands such as xcrun simctl shutdown [simulator-UDID] I created this function to run the shell scripts func commandLine(launchPath: String, arguments: [String]) -> String { // Used to be NSTask() before Swift 3 let process = Process() // Set the task parameters process.launchPath = "/usr/bin/env" process.arguments = ["pwd"] // Create a Pipe and make the process // put all the output there let pipe = Pipe()

Visually what happens when you call same process with ampersand

只谈情不闲聊 提交于 2020-01-15 09:38:50
问题 I am playing with ampersand “&” . I understand that in bash shell script the ampersand is used to fork processes but will run in the background . This is useful because it allows you to get your prompt back immediately , and run the process in the background . Please observe the following code: #include <stdio.h> #include <unistd.h> int x=5; void main() { int pid = getpid(); int y=6; printf("[%d] [%p] x = %d\n", pid, &x, x++); printf("[%d] [%p] y = %d\n", pid, &y, y++); } After successful

.bash_profile and terminal

ぐ巨炮叔叔 提交于 2020-01-15 09:38:49
问题 my .bash_profile looks this way : When I open my terminal I get this three lines : -bash: export: Workbooks.app/Contents/SharedSupport/path-bin': not a valid identifier -bash: export: Workbooks.app/Contents/SharedSupport/path-bin': not a valid identifier -bash: export: Workbooks.app/Contents/SharedSupport/path-bin': not a valid identifier -bash: export: Workbooks.app/Contents/SharedSupport/path-bin': not a valid identifier What should I remove from my .bash_profile to get rid of this ? 回答1: