GUI applications that are used to execute parameters transmitted to the command/program, CMD. the command prompt is returned when the application is terminated. If it is executed in the Command Script, the new behavior will not occur. 8. choice command choice uses this command to allow users to enter a character to run different commands. The/c: parameter should be added for use, and c: should be followed by a prompt to enter characters without spaces. Its return code is 1234 ...... For example
. "Example: The contents of Test.bat are as follows (* * Note that when you use if errorlevel to determine the return value, you want to sort by the return value from highest to lowest * *):@echo offchoice/c dme/m "Defrag,mem,end":: if errorlevel 3 goto end::if ERRORLEVEL 2 goto mem::if errorlevel 1 goto Defra G:defragc:\dos\defraggoto End:memmemgoto End:endecho Good byeAfter this batch is run, the defrag,m
to low ):
@ Echo off
Choice/C dimethyl/M "defrag, mem, end"
If errorlevel 3 goto end
If errorlevel 2 goto mem
If errotlevel 1 goto defrag
: Defrag
C:/DOS/defrag
Goto end
: Mem
Mem
Goto end
: End
Echo good bye
After this batch is run, "defrag, mem, end [d, M, E]? ", The user
]?
For example, the content of test. bat is as follows (NOTE: When determining the return value using if errorlevel, sort the returned values from high to low ):
@ Echo off
Choice/C dimethyl/M "defrag, mem, end"
If errorlevel 3 goto end
If errorlevel 2 goto mem
If errotlevel 1 goto defrag
: Defrag
C:/DOS/defrag
Goto en
determining the return value using if errorlevel, sort the returned values from high to low ):
@ Echo off
Choice/C dimethyl/M "defrag, mem, end"
If errorlevel 3 goto end
If errorlevel 2 goto mem
If errotlevel 1 goto defrag
: Defrag
C: \ dos \ defrag
Goto end
: Mem
Mem
Goto end
: End
Echo good bye
After this batch is r
Doscommand line choice command usage details _ dos choice command usage instructions, choice_dos
Doscommand-line choice command usage details mainly introduce how to use the doscommand-line choice command. For more information, see.Choice command
You can run different commands by entering a single character. The/c: parameter should be added for use, and c: should be followed by a prompt to enter characters without spaces. The return code is 1234 ....... This command may be unavailable in some Wi
screen will show:Confirm Press Y, no press N, or cancel please press C. [Y,n,c]?Example: The contents of Test.bat are as follows (note that when you use if errorlevel to determine the return value, you want to sort by the return value from highest to lowest):@echo offCHOICE/C dme/m "Defrag,mem,end"if errorlevel 3 goto endif errorlevel 2 goto MEMif errorlevel 1 goto defrag:d EfragC:\dos\defragGoto END: MemMemGoto END: Endecho Good byeAfter this batch
. "
If I run the command: choice/c ync/M "OK, Press Y, N, or cancel to press C. "
The screen displays:
Press Y to confirm, N to confirm, or C to cancel. [Y, N, C]?
For example, the content of test. bat is as follows (NOTE: When determining the return value using if errorlevel, sort the returned values from high to low ):
@ Echo off
Choice/C dimethyl/M "defrag, mem, end"
If errorlevel 3 goto end
If errorlevel 2 goto mem
If errotlevel 1
help messages.Note:The errorlevel environment variable is set to the key index selected from the selected set. The first option to be listedReturns 1, returns 2, and so on. If the key you press is not a valid choice,The tool generates a warning. If the tool detects an error, it returns the 255Errorlevel value. If you press Ctrl + break or Ctrl + C, the tool returns 0The errorlevel value. When the errorlevel parameter is used in a batch programSort in sequence.Example:Choice /?For choice/c ync/m
Errorlevel value. If you press Ctrl + break or Ctrl + C, the tool returns 0
The errorlevel value. When the errorlevel parameter is used in a batch program
Sort in sequence.
Example:
Choice /?
For choice/c ync/m ", Press Y, N, or C. "
Choice/T 10/c ync/CS/d y
Select a for choice/c AB/M "option 1 and B for option 2. "
Choice/c AB/N/m "option 1 select a, option 2 select B. "
If I run the command: choice/c ync/M "OK, Press Y, N, or cancel to press C. "
The screen displays:
Press Y to confirm, N to
warning. If the tool detects an error, it returns the errorlevel value of 255. If you press Ctrl + break or Ctrl + C, the tool returns the errorlevel value of 0. When the errorlevel parameter is used in a batch program, the parameters are sorted in descending order.
Example:
Choice /?
For choice/c ync/m ", Press Y, N, or C. "
Choice/T 10/c ync/CS/d y
Select a for choice/c AB/M "option 1 and B for option 2. "
Choice/c AB/N/m "option 1 select a, option 2 select B. "
If I run the command: choice/c
To use boost. RegEx, You need to include the header file "Boost/RegEx. HPP". RegEx is one of the two libraries in this book that need to be compiled independently (the other is boost. signals ). You will be glad to know that if you have built boost--, you only need to run a command at the command prompt-to automatically link it (for Windows compilers ), therefore, you do not need to bother to point out the library files to use.
The first thing you need to do is declare a variable of the type b
Linux system monitoring and diagnostic tools-lsof usage Overview 1. lsof introduction lsof is a very practical system-level monitoring and diagnostic tool in linux. It means List Open Files. It is easy to remember that it is a combination of "ls + ~It can be used to list the File Information opened by various processes. Remember: "Everything is a file" in linux, including but not limited to pipes, sockets, directories, devices, and so on. Therefore, you can use lsof to obtain information about a
Environment: Win10, Eclipse-jee-mars, python2.7Package on Linux for installation testing1.1 PackagingThe project directory structure is as follows:Packaged object: Utils.regCreate the setup.py file in the top-level directory of the P1 project, which is the parent directory of the Utils package, as follows:#coding =utf-8From Distutils.core Import SetupSetupName='reg',version=' v1.0 ',py_modules=[' Utils.reg '])Running the file directly will report the
The notation for regular expressions:var reg = new RegExp ("str", "gim"); New Regular Objectvar reg1 =/str/gim; Regular literals (common)G Global MatchI is case insensitiveM performs multi-line matchingSelect On demand: I im img ig GM g MCompare New RegExp () with REGEXP ():When we are in the new regular object, the parameter passed in is a regular object, such as: var reg2 = new RegExp (REG1, ' G '), at this time a new regular object is generated, th
can be dispensable, there must be two decimal places.
RegEx Reg = new RegEx (@ "^ (? : [1-9] [0-9] * | 0 )(? : \. [0-9] {2 })? $ ");
If (Reg. ismatch (textbox1.text ))
{
Richtextbox2.text = "the input format is correct! ";
}
Else
{
Richtextbox2.text = "incorrect input format! ";
}
Because the source string is verified as a whole,^And$"Is indispensable. Otherwise, the verification result
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.