command-prompt

How to run a PHP program from command prompt on a Windows Machine?

假装没事ソ 提交于 2019-12-19 03:38:20
问题 I'm a PHP Developer by profession. I'm using a Lenovo Ideapad laptop that runs on Windows 10 Home Single Language 64-bit Operating System I've also installed XAMPP Control Panel v3.2.2 at location "C:\xampp" to execute PHP programs in a web browser on my machine. The "php.exe" file is present at the location "C:\xampp\php" . The document root directory to save the PHP files is at the location "C:\xampp\htdocs" . I'm able to run the PHP programs that I created and saved in a directory C:\xampp

How does the command prompt know when to wait for exit?

家住魔仙堡 提交于 2019-12-18 10:11:53
问题 I was attempting to do a Windows command prompt re-code in C#. I was wondering how the command prompt knows when to wait for the process started to exit, and when not to wait for the called process to exit. For example, if you type in the command prompt "notepad", Notepad will launch, but you can still execute other commands. However, if you open a utility such as more.com, ping.exe, or another utility, it will wait for the executing program to finish before letting you execute another

node.js and npm for windows

不打扰是莪最后的温柔 提交于 2019-12-18 09:42:46
问题 I am trying to get node.js and npm working on a windows computer (It works perfectly fine for me on mac ox and ubuntu). The installation completed without any errors but when I try to install anything with npm I get the following error: Example: npm install express Error: ENOENT, stat 'C:\Users\siva.sivakumaran\AppData\Roaming\npm' Can someone help me out with this issue? 回答1: I added the folder npm under AppData/Roaming and it worked for me. 回答2: I was having the same issue and I solved it

Pre-Filled Prompt in Ruby [duplicate]

人走茶凉 提交于 2019-12-18 08:25:46
问题 This question already has answers here : What will give me something like ruby readline with a default value? (5 answers) Closed 3 years ago . I am using to Ruby to write a small command line utility to search Pubmed. Right now, I prompt the user for a query and display the results, and the user has the option of appending to the query or entering an entirely new query. I would like to add the ability to edit the current query; i.e. the prompt should come pre-filled with an editable version

Pre-Filled Prompt in Ruby [duplicate]

时间秒杀一切 提交于 2019-12-18 08:25:25
问题 This question already has answers here : What will give me something like ruby readline with a default value? (5 answers) Closed 3 years ago . I am using to Ruby to write a small command line utility to search Pubmed. Right now, I prompt the user for a query and display the results, and the user has the option of appending to the query or entering an entirely new query. I would like to add the ability to edit the current query; i.e. the prompt should come pre-filled with an editable version

How do I hide “MATLAB Command Window” when I run an m-file from command line?

*爱你&永不变心* 提交于 2019-12-18 04:59:11
问题 I am running MATLAB with a command line string like this: C:\<a long path here>\matlab.exe -nodisplay -nosplash -nodesktop -r "run('C:\<a long path here>\mfile.m');" The m-file contains a plot() function to plot a simple curve on the x-y plane. The m-file successfully runs and draws the plotting with the command line string I specified above. However, every time I run this command, a window named "MATLAB Command Window" appears along with the plotting. How do I make this "MATLAB Command

Get Command Prompt Output to String In Java

跟風遠走 提交于 2019-12-18 04:12:47
问题 I need a java method that will read command prompt output and store it into a String to be read into Java. This is what I have so far but isn't working right. public void testGetOutput() { System.out.println("\n\n****This is the testGetOutput Method!****"); String s = null; String query = "dir " + this.desktop; try { Runtime runtime = Runtime.getRuntime(); InputStream input = runtime.exec("cmd /c " + query).getInputStream(); BufferedInputStream buffer = new BufferedInputStream(input);

How do I change the default virtualenv prompt?

只愿长相守 提交于 2019-12-17 23:20:11
问题 How do you change the default Virtualenvwrapper prompt? By default, working on a particular virtual environment with a command like "workon <_name_of_env_>" prepends the name of the virtualenv to your prompt. This may work poorly if you're not using a default command prompt. 回答1: If you are working on a custom PS1 (as I when found out this issue), I recommend you to disable prompt change, use export VIRTUAL_ENV_DISABLE_PROMPT=1 (see virtualenv docs), and make your own virtualenv prompt in

Open text file and program shortcut in a Windows batch file

不问归期 提交于 2019-12-17 22:38:31
问题 I have two files in the same folder that I'd like to run. One is a .txt file, and the other is the program shortcut to an .exe . I'd like to make a batch file in the same location to open the text file and the shortcut then close the batch file (but the text file and program remain open). I tried this with no luck: open "myfile.txt" open "myshortcut.lnk" Also didn't work: start "myfile.txt" start "myshortcut.lnk" 回答1: I was able to figure out the solution: start notepad "myfile.txt"

Get CPU Usage from Windows Command Prompt

心已入冬 提交于 2019-12-17 21:55:02
问题 How would I get total CPU Usage from Windows Command Prompt?: Expected Output: 27% 回答1: C:\> wmic cpu get loadpercentage LoadPercentage 0 Or C:\> @for /f "skip=1" %p in ('wmic cpu get loadpercentage') do @echo %p% 4% 回答2: The following works correctly on Windows 7 Ultimate from an elevated command prompt: C:\Windows\system32>typeperf "\Processor(_Total)\% Processor Time" "(PDH-CSV 4.0)","\\vm\Processor(_Total)\% Processor Time" "02/01/2012 14:10:59.361","0.648721" "02/01/2012 14:11:00.362","2