Questions tagged [input-parameters]

65 questions
18
votes
4 answers

About the order of input parameters

For a function/method contains many input parameters, does it make a difference if passing-in in different orders? If does, in what aspects (readability, efficiency, ...)? I am more curious about how should I do for my own functions/methods? It…
herohuyongtao
  • 49,413
  • 29
  • 133
  • 174
18
votes
2 answers

Type datetime for input parameter in procedure

I have created a procedure with this structure but it doesn't work for datetime input parameter I executed this query but declare @a datetime declare @b datetime set @a='2012/04/06 12:23:45' set @b='2012/08/06 21:10:12' exec LogProcedure…
9
votes
6 answers

Copy parameters from DbCommand to another DbCommand

How do you copy DbCommand parameters to another DbCommand, I want a new DbCommand with the same parameters as my last DbCommand. But now with a different sql string.
Aivan Monceller
  • 4,636
  • 10
  • 42
  • 69
8
votes
2 answers

WCF and Input Parameter Order in SOAP Envelope

I'm getting an Object reference not set to an instance of object error in my WCF web service which uses webHttpBinding (soap 1.1) I have noticed that if you have the input parameters in a certain order the error does not get…
Harindaka
  • 4,658
  • 8
  • 43
  • 62
6
votes
2 answers

How to pass a Swift string to a c function?

I am having serious trouble passing a string from swift, to a function written in c. I'm trying to do this in my swift code var address = "192.168.1.2" var port = 8888 initSocket(address, port) The c function looks like this: void initSocket(char…
Mads Gadeberg
  • 1,429
  • 3
  • 20
  • 30
5
votes
2 answers

How do I use MATLAB's inputParser with optional string inputs? The documentation says "use a validation function" but it's unclear how to do that

I have a MATLAB file that contains a single top-level function, called sandbox. That function in turn contains two nested functions, mysum and myprod, which are identical in functionality and what parameters they allow except that one uses @sum…
Michael A
  • 4,391
  • 8
  • 34
  • 61
4
votes
0 answers

How to enter an array, consisting of different arrays, as an input parameter for the "Match()" function?

I was trying to answer another question, when I realised that I don't know how to enter an array, consisting of different arrays, as an input parameter for the INDEX() or the MATCH() function. Background: As some of you know, you can find a value…
Dominique
  • 16,450
  • 15
  • 56
  • 112
3
votes
1 answer

How to pass ENUM variable as input for POSTGRESQL functions

I have a function in MySQL which works fine: CREATE PROCEDURE `Accounts_Active`(IN_DeptName VARCHAR(255), IN_Src ENUM('TRAINING','ELZA')) BEGIN END$$ DELIMITER ; But when converted to PostgreSQL: CREATE or replace FUNCTION…
dp1212
  • 69
  • 2
  • 8
3
votes
3 answers

How To Test PHP Bitwise Function Input Parameters

Sometimes in programming they allow one to chain parameters in a single function input variable like the second input variable below: define('FLAGA',40); define('FLAGB',10); define('FLAGC',3); function foo($sFile, $vFlags) { // do…
Volomike
  • 23,743
  • 21
  • 113
  • 209
3
votes
1 answer

JasperReports Server parameter dependency

I have a report which has two input-parameter. Both have a dropbox where i can select values. Let's say ParameterA and ParameterB. Is it possible to make ParameterB dependent from ParameterA? for example: If i choose in ParameterA the carbrand…
3
votes
1 answer

Calling a java stored procedure in oracle using PL/SQL with boolean input parameter

I am trying to write a PL/SQL block for calling a Java Stored procedure where the java method has a boolean as a paramter. How can I translate the boolean when defining the package for the java procedure and invoking the java procedure from a PL/SQL…
adbdkb
  • 1,897
  • 6
  • 37
  • 66
2
votes
1 answer

Finding Neural Network input parameters for classifying text documents

I need to train a neural network to classify some text documents into a boolean class (NN has one output with "Yes" or "No" values). Is there any algorithm to find best input parameters (for example presence of words, term, sentence and/or…
Ariyan
  • 14,760
  • 31
  • 112
  • 175
2
votes
1 answer

In Matlab, Why does the input parser invalidate positional arguments, even when no validation functions are set?

I am trying to understand the Matlab inputParser, as it seems from previous questions people deem it best practice to use this class for validating inputs to a function. Therefore, I am fooling around with it a little and I've written the following…
Sam
  • 305
  • 1
  • 8
2
votes
2 answers

How to call stored procedure in Entity Framework Core with input and output parameters using mysql

I am using ASP.net Core 2.2 with Entity Framework core 2.2.6 and Pomelo.EntityFrameworkCore.MySql 2.2.0 for connectivity with MySQL, I have a stored procedure which takes 3 input parameters and 1 output parameter. I am able to call it in MySQL…
2
votes
2 answers

SQL - Limiting stored procedure input parameters

I have created this stored procedure that accepts the parameter @UpdType char(1). The procedure executes no matter what parameter is entered. However; the stored procedure only completes its function if the parameter is either R or U. Is the there…
1
2 3 4 5