The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
4answers
51 views

Can't use optional parameters when implementing an interface for a WCF

In my interface I have declared this. [OperationContract] [WebGet] String GetStuff(String beep, String boop = "too lazy to type"); I implemented it as follows. String GetStuff(String beep, String ...
2
votes
1answer
34 views

Accepting an optional parameter only as named, not positional

I'm writing a PowerShell script that's a wrapper to an .exe. I want to have some optional script params, and pass the rest directly to the exe. Here's a test script: param ( ...
1
vote
1answer
20 views

Matching a string till a symbol and make it optional. Do not capture the matched optional string too

Match a string that ends with a ; make it optional and do not capture that group as it is not required. But do capture the rest of the string that occurs after the first condition. Text1: transfer ...
0
votes
3answers
56 views

Passing an optional iterator to a function

Is it possible to define an optional iterator to a function that will change the behaviour of the function based on its presence or not? To give a concrete example consider the definition ...
1
vote
1answer
36 views

Optional Parameters with method overloding

I have a method like that : public static void Fill<T> (this DropDownList control, Expression<Func<T, object>> value, Expression<Func<T, bool>> whereClause = ...
0
votes
0answers
6 views

Ngingx: Make URL-rewrited optional parameter accept default value

Full URI /en/galleries/name/1/ is mapped to /cache/galleries/name/en.1.php. I defined these locations: location ~ ...
4
votes
1answer
97 views

why does a missing optional parameter cause an “Incompatible types” error

Can someone please explain why I get an "Incompatible type" error (Delphi XE3) in the following program (see comments at the bottom of the code for details) when I omit an optional parameter for the ...
3
votes
3answers
37 views

How to define optional parameters in Java Script

Here is my object construction, function Employee(name, dob) { this.Name = name; this.DateOfBirth = new Date(dob); } Now, I have created an instance for this, like var emp = new ...
3
votes
2answers
65 views

Function overloading vs Optional Parameters

So I'm just thinking about function overloading... Overloaded methods share the same name but have a unique signature. The number of parameters, types of parameters or both must be different. A ...
2
votes
1answer
16 views

Multiple capture groups - all optional

I know this (or similar) has been asked a hundred times - but I really need help now :D The strings the regex should match. Note: n is in the range of INTEGER_MIN - INTEGER_MAX {number} ...
0
votes
0answers
11 views

How to write a \newenvironment with a conditional structure and one optional parameter [migrated]

I would like to define a new environment with an optional parameter. Currently, I have \theoremstyle{plain} \newtheorem{prop}{Proposition} \newenvironment{propExt}[1][]{\ifx!#1! \begin{prop} \else ...
1
vote
1answer
44 views

Parameter passing in R when interior function arguments are dependent on optional parameters

I'm working in R and need to pass arguments to a function so that they can be used as arguments when calling another function within the original. In the example below you can see that I'm interested ...
0
votes
3answers
54 views

Optional query parameters in SQL Server

I want to fetch data from a SQL Server database using values from a dropdown list. My query is select Age,City,State,Caste,IncomeMin,IncomeMax from Ruser where (Age between '" + ...
0
votes
3answers
58 views

Optional parameters: constants vs direct declaration in method? [closed]

What is the better approach for methods with optional parameters: Declare constant and use it as default parameter: Or declare default parameters in method: I'm sorry for images instead of ...
0
votes
3answers
32 views

How to work with optional parameters that are set to None

With named parameters, how can I tell the receiver method to use the "not supplied" version of the parameter? Sending in None does not work. The following is my specific code, note especially the ...

1 2 3 4 5 25
15 30 50 per page