command-prompt

enable delayed expansion doesn't work

本秂侑毒 提交于 2019-12-11 05:26:31
问题 I am getting a weird error in my batch program. I think the problem is in enable delayed expansion, but the fix I apply doesn't work. This is my code: setlocal ENABLEDELAYEDEXPANSION for /l %%x in (1, 1, 3) do ( set ff=Firefox_45_0.0_%%x echo %%x firefox.exe -CreateProfile "%ff% %homedrive%%homepath%\Desktop\Firefoxes\Profiles\Firefox_45_0.0_%%x" ) ff doesn't have any value, although I used delayed expansion. What could be the fix? EDIT: command printed to console (I don't use @echo off) C:

Java program to output unicode chars in cmd

北慕城南 提交于 2019-12-11 05:22:45
问题 In the java se 7 specifications it is written that A Java compiler should use the \uxxxx notation as an output format to display Unicode characters when a suitable font is not available. But when I run the below program, the command prompt displays a Hell?, World! instead of \uxxxx notation. import java.io.*; class test{ public static void main(String args[]){ System.out.println("Hell\u0c13, World!"); } } As my command prompt doesn't have a suitabe font, the compiler must be printing the

Utilizing Async/Await in .NET Console applications breaks when calling Application.Run() or instantiating a WinForms UserControl object

為{幸葍}努か 提交于 2019-12-11 04:08:57
问题 Background Async/Await facilitates responsive applications in .NET by automatically creating a "state machine", allowing the primary thread of an application to remain responsive even while performing blocking work. Windows Forms, WPF, and ASP.NET (to my knowledge) all incorporate a form of SynchronizationContext (although ASP.NET may have removed this recently; I'm not positive, as I don't work with it.) I've recently needed to extend a Windows Forms application to also support accepting

Send Windows Key in batch script

∥☆過路亽.° 提交于 2019-12-11 04:08:16
问题 I've recently been using the SendKeys function using Batch script. I've understood how to input certain keys into a window, such as the tab key: %SendKeys% "{TAB}" Or the backspace key: %SendKeys% "{BACKSPACE}" But I have been trying to input the Windows key without pressing it. Unfortunately, I do not know what the batch name for it is. I've tried: WIN WINDOWS WINKEY START LWIN But none have worked. I've looked everywhere for this, and help would be greatly appreciated. 回答1: There is

Can't run MySQL from command prompt

自作多情 提交于 2019-12-11 04:01:59
问题 I downloaded MySQL 5.6.25 for Windowsx64 and I tried to run the command mysql -uroot -p to start using MySQL but it says 'mysql' is not recognized as an internal or external command, operable program or batch file. Do I need to move MySQL to some other place? It is currently on the desktop. EDIT: I downloaded Xampp but now when I run that same command I get this: 回答1: You need to place mysql in your environment variable PATH in order to run it from the command prompt, if you are not in bin

How to color Linux terminal foreground and background text

非 Y 不嫁゛ 提交于 2019-12-11 03:56:50
问题 I am working on a Linux terminal. The terminal foreground and background colors are hard to look at. Is there a way to change the terminal prompt colors and keep the commands (ls) at the same colors? 回答1: How to color the command prompt in the terminal in Linux. This will give you a colored command line and everything else is one color. $ export PS1='\[\033[00;35m\]\u\[\033[00m\]@\[\033[00;35m\]\H\[\033[00m\]:\[\033[00;33m\]\W\[\033[00m\] \$\[\033[00;34m ' If you want to make this change

Where did “Command Prompt with Ruby on Rails” come from and why does it keep creating a “sites” folder?

≡放荡痞女 提交于 2019-12-11 01:38:18
问题 So we understand, I use Windows 7. I've been fighting my way through ruby.railstutorial.org/ruby-on-rails-tutorial-book, but I seemed to have split my command prompts. Originally, I installed Rails based on the instructions from here: http://railsinstaller.org/windows (this was where guides.rubyonrails sent here). I didn't notice it until much later, but it seems I created a Command Prompt called "Command Prompt with Ruby on Rails" after following the instructions there. Now, throughout the

Unable to run wsimport utility in JDK8

北城余情 提交于 2019-12-11 01:26:40
问题 I have JDK8 installed in the directory C:\Program Files\Java\jdk1.8.0_05\ and I have my PATH Environment Variable set to C:\Program Files\Java\jdk1.8.0_05\bin . Now; in order to use Amazon's Product API I follow their guidelines here under the Java getting set up section; and I use the following command... wsimport -d ./build -s ./src -p com.ECS.client.jax http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl -b jaxws-custom.xml after opening a command prompt in a custom

psexec exited with error code 1 - double quotes

醉酒当歌 提交于 2019-12-11 01:25:36
问题 Why does the psexec-executed command below fail when I add double quotes to the parameter? It works fine without psexec with double quotes It works fine with psexec without double quotes! The contents of the .bat file are as follows: set FILEPATH=%~1 set BAT_ARCHIVE_IDENTIFIER=%~2 set DEPLOYMENT_ROOT=%~3 echo %FILEPATH% %BAT_ARCHIVE_IDENTIFIER% %DEPLOYMENT_ROOT% 回答1: psexec -u user -p pass cmd /c "d:\GitRepos\runAll.bat a1 a2 "a3"" 来源: https://stackoverflow.com/questions/24905546/psexec

Running a c/c++ program from java through command line

六月ゝ 毕业季﹏ 提交于 2019-12-11 00:04:04
问题 I have written a java program that compiles and executes C,c++,java programs ..I firstly tested it for java and it worked absolutely fine. Then I tested it for C but it gave errors.Please tell what I need to do..Here is the module which compiles the code..: public void compileCode(String path,String lang)throws IOException { String cmd=""; if(lang.equals("c")||lang.equals("cpp")) cmd="g++ Main"+threadNum+"."+lang+" -o "+threadNum; else if(lang.equals("java")) cmd="javac Main"+threadNum+".java