tagged [arguments]

Best way to parse command-line parameters?

Best way to parse command-line parameters? What's the best way to parse command-line parameters in Scala? I personally prefer something lightweight that does not require external jar. Related: - [How ...

C# pass additional parameter to an event handler while binding the event at the run time

C# pass additional parameter to an event handler while binding the event at the run time I have a link button which have a regular click event : And I bind this event at the runtime : Now I need the f...

if arguments is equal to this string, define a variable like this string

if arguments is equal to this string, define a variable like this string I am doing some bash script and now I got one variable call `source` and one array called `samples`, like this: as I want to ex...

8 Jul at 06:24

Specify environmental variables as commandline parameter in a debug session of VisualStudio C#

Specify environmental variables as commandline parameter in a debug session of VisualStudio C# I want to use an environment variable as a commandline parameter in a debug session. So Project Propertie...

Default value on generic predicate as argument

Default value on generic predicate as argument First time question for me :) I need some way to define a default predicate using a generic on the format and then use this as a default argument. Someth...

26 Jan at 12:29

Generic methods and optional arguments

Generic methods and optional arguments Is it possible to write similar construction? I want to set, somehow, default value for argument of type T. Additionally, I found

21 Jul at 20:27

Is there a "standard" format for command line/shell help text?

Is there a "standard" format for command line/shell help text? If not, is there a de facto standard? Basically I'm writing a command line help text like so: ``` usage: app_name [options] required_inpu...

Passing command line arguments to argv in jupyter/ipython notebook

Passing command line arguments to argv in jupyter/ipython notebook I'm wondering if it's possible to populate `sys.argv` (or some other structure) with command line arguments in a jupyter/ipython note...

How to run Java program in command prompt

How to run Java program in command prompt I created a Java project to call a Web service. It has one Main java file and another class file. I have used some jar files for HTTP client. In Eclipse it ru...

Import SQL file by command line in Windows 7

Import SQL file by command line in Windows 7 I want to import an SQL file (size > 500MB) into a database. I have wamp on my PC. Phpmyadmin does not work well with this size. I changed all parameters i...

How can I pass a member function where a free function is expected?

How can I pass a member function where a free function is expected? The question is the following: consider this piece of code: ``` #include class aClass { public: void aTest(int a, int b) { p...

TypeError: generatecode() takes 0 positional arguments but 1 was given

TypeError: generatecode() takes 0 positional arguments but 1 was given I have the code below: ``` from tkinter import * class Window(Frame): def __init__(self, master = None): Frame.__init__(sel...

2 Jan at 22:15

mkdir's "-p" option

mkdir's "-p" option So this doesn't seem like a terribly complicated question I have, but it's one I can't find the answer to. I'm confused about what the `-p` option does in Unix. I used it for a lab...

docker build with --build-arg with multiple arguments

docker build with --build-arg with multiple arguments According to the [documentation](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg), it's possible to...

26 Dec at 06:13

How do I pass a unique_ptr argument to a constructor or a function?

How do I pass a unique_ptr argument to a constructor or a function? I'm new to move semantics in C++11 and I don't know very well how to handle `unique_ptr` parameters in constructors or functions. Co...

13 Nov at 22:44

Execute PowerShell Script from C# with Commandline Arguments

Execute PowerShell Script from C# with Commandline Arguments I need to execute a PowerShell script from within C#. The script needs commandline arguments. This is what I have done so far: ``` Runspace...

What is the difference between _tmain() and main() in C++?

What is the difference between _tmain() and main() in C++? If I run my C++ application with the following main() method everything is OK: ``` int main(int argc, char *argv[]) { cout

21 May at 23:45

Best way to check for null parameters (Guard Clauses)

Best way to check for null parameters (Guard Clauses) For example, you usually don't want parameters in a constructor to be null, so it's very normal to see some thing like Is there any way to check ...

21 Mar at 16:39

How to parse command line output from c#?

How to parse command line output from c#? I want to execute an application(command line application) from the C#... and I want after executing this application and providing the input to it, I want to...

Getting raw (unsplit) command line in .NET

Getting raw (unsplit) command line in .NET In .NET, we can easily access split command line arguments in a string array from the argument of `Main(string[])` or `Environment.GetCommandLineArgs()`. How...

30 May at 18:8

Powershell Execute remote exe with command line arguments on remote computer

Powershell Execute remote exe with command line arguments on remote computer I've searched all over and tried different variations of commands, but I am still not there yet. My goal is to run an exe t...

3 Mar at 18:27

How to handle command-line arguments in PowerShell

How to handle command-line arguments in PowerShell What is the "best" way to handle command-line arguments? It seems like there are several answers on what the "best" way is and as a result I am stuck...

29 Jun at 19:15

NDesk.Options: how to register required parameters correctly?

NDesk.Options: how to register required parameters correctly? I am trying to utilize the `OptionSet` class in the following way: ``` string resultsFileName = null; bool isHelp = false; var p = new O...

Running batch file with arguments from C#

Running batch file with arguments from C# I have a batch file like this I have my C# code as follows: ``` string MyBatchFile = @"C:\Program Files (x86)\MybatchFile.bat"; string _sourcePath = @"C:\Fold...

24 Jan at 10:5

Correct way to implement C# console application?

Correct way to implement C# console application? What is the correct way to implement and architect a command line tool as a C# console application? Concerns to address include proper parsing of comma...

7 May at 19:14