QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

How do I pass command-line arguments to a test execution?

JUnit FAQ
If the number of parameters on the command line gets unweildy, pass in the location of a property file that defines a set of parameters. Alternatively, the JUnit-addons package contains the XMLPropertyManager and PropertyManager classes that allow you to define a property file (or XML file) containing test parameters.

How can I duplicate the process by which main() is handed argc and argv?

Library Functions
The only Standard function available for this kind of ''tokenizing'' is strtok, although it can be tricky to use [footnote] and it may not do everything you want it to. (For instance, it does not handle quoting.) Here is a usage example, which simply prints each field as it's extracted: #include <stdio.h> #include <string.h> char string[] = "this is a test"; /* not char *; see Q 16.

How can I process command-line arguments?

Andy Mc's C# FAQ for C++ programmers
Like this: using System; class CApp { public static void Main( string[] args ) { Console.WriteLine( "You passed the following arguments:" ); foreach( string arg in args ) Console.WriteLine( arg ); } }

How can I split up a string into whitespace-separated fields?

Frequently Asked Questions: C Language (abridged)
I'm trying to sort an array of strings with qsort(), using strcmp() as the comparison function, but it's not working. You'll have to write a "helper" comparison function which takes two generic pointer arguments, converts them to char **, and dereferences them, yielding char *'s which can be usefully compared. Now I'm trying to sort an array of structures, but the compiler is complaining that the function is of the wrong type for qsort().

How do I run DWI with command line arguments?

Dance With Intensity - Frequently Asked Questions
Right click on the .EXE file, and select "Create Shortcut". A new file called "Shortcut to..." will appear in your folder. Right-click this file and go to "Properties". You'll see one text box labelled "Target:" that points to the .EXE file. Go to the end of this text and add the command line arguments there. So to run the program in SDL, fullscreen mode, add " /sdl /fullscreen". Another method is to use a batch file. A sample one, "DWI-sdl.bat" is included.

How do I access command-line arguments?

OOPS FAQ - Page 18
Latest Answer: Command line arguments can be accessed by using a string type and integer type variables as the main... Latest Answer: Both aggregation and composition are special kinds of associations. Aggregation is used to represent...

How do I specify command line arguments?

Frequently Asked Questions
This depends on how you load the game. If you load it from a DOS prompt by typing the command "DIGGER" and pressing enter, then it is as simple as typing the options after the word "DIGGER", i.e. "DIGGER /C 20" to play in CGA at double speed.

What do the jackd command line arguments do?

FAQ - FreeBoB
Currently, we are working on a prototype and we don't have anything useful to do aside from coding. Of course, this will not stay that way for ever. Hopefully soon we know what we want and how we want to code the real driver. Then there will be plenty else to do (documentation, testing, ...). So please stay tuned!

How do I pass REBOL arguments from the command line?

REBOL Language FAQ
To pass arguments into a script when launching REBOL from the command line, do the following: commandline> rebol %some-script.r 54321 Launch! Assuming %some-script.r is written as follows: REBOL [ Title: "Command-Line Argument Example" ] print mold system/options/args print mold system/script/args REBOL for BSD is compiled with the newer ELF binary format while many older systems still expect the a.out format. To use REBOL, the BSD installation will need to be upgraded to support ELF.

How do I get the arguments from the command line?

OpenVMS FAQ -&- page 14
If you're writing a program and want to accept arguments from a foreign command, you can use LIB$GET_FOREIGN to get the command line and parse it yourself, or if you're programming in C, use the normal argc/argv method. To write an application which uses the normal DCL verb/qualifier/parameter syntax for invocation, see the description of the CLI$ routines in the OpenVMS Callable Utility Routines Reference Manual.

Which command line arguments can I use with Cobian Backup?

Cobian's site - The home of Cobian Backup
This version has dropped the special command line utility from older versions. Now you can use the application CobBU.exe from the command line. The arguments are: list:(ListName) start the program using the list on ListName. If the list name contains spaces, surround THE WHOLE argument between quotes. Then you can enter a valid user ID and a password. This account must have permission to access the network drive. Well, first, be sure that you have entered the right ID and password.

Can I run NTBACKUP from the command line?

Environment settings set by a batch file are not working.
ntbackup <operation> <path> /a /b /d "text" /e /hc:<on/off> /l "<filename>" /r /t <backup type> /tape:n /v This will be backup . If you wanted to eject a tape you could enter eject (but must also include the /tape parameter) The list of drives and directories to be backed up. You may not enter file names or use the wildcard character. To backup multiple drives just put a space between them, e.g. ntbackup backup c: d: etc..

Is Linux a command line system like DOS or is it more like Windows?

The Linux FAQ
The core system is based on the command line, but there is the X Window System with provides a Graphical User Interface environment. Window managers (such as Afterstep, fvwm, Enlighment) and desktop environments (GNOME, KDE) build on top of X to provide a total GUI experience. Are there 'windows-like' Internet clients like Eudora, Netscape, etc. available on Linux? How about ICQ? IRC. Netscape is available for Linux. There are also graphical e-mail programs for X.

How do I draw a line to replace the functionality of VB6's Line command?

General - Windows Forms FAQs
Try this code: Dim g as Graphics g = frmMain.CreateGraphics() g.DrawLine(Pens.Black, new Point(0,0), _ new Point(frmMain.ClientRectangle.Width), frmMain.ClientRectangle.Height) g.Dispose() This should draw a line from the upper left to the bottom right...

Is there a CLI (command line interface) version?

Team Discovery TSC FAQ - dslreports.com
First, of course install TSC. Open TSC and right click on the icon in your task bar (near the clock). Select properties. Set your candidate queue to whatever you want. I max mine out. If you have a dialup computer, unselect the online tab. Click ok, and then right click again and select exit. In this directory, there is a file called readme.txt.. it might be a good idea to read this. It's kind of hard to understand. Now edit (with notepad or something like it), the file called launch.

How do I train SpamBayes (command line method)?

SpamBayes FAQ
Given a pair of Unix mailbox format files (each message starts with a line which begins with 'From '), one containing nothing but spam and the other containing nothing but ham, you can train SpamBayes using a command like: python sb_mboxtrain.py -g ~/tmp/newham -s ~/tmp/newspam The above command is OS-centric (e.g., UNIX, or Windows command prompt). You can also use the web interface for training as detailed above.
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact