Most voted "parameters" questions
Parameters are a type of variable used in the subroutine to refer to the data provided as input to the subroutine.
Learn more…208 questions
Sort by count of
-
2
votes2
answers2748
viewsPassing parameter null to a method
It is possible to pass/receive null parameters in Java. In C# I know it is possible using ? in kind. public DateTime Teste(DateTime? exemplo){...} In this case the example I know can come null, in…
-
2
votes1
answer227
viewsAction Script 3.0 Function does not receive parameter
I’m having a problem with parameters for my function. It’s not getting the parameter I pass to it. Follow the code below: function gerarescala(e:MouseEvent):void { var tom:String = texto.text; var…
-
2
votes1
answer365
viewsCollection Namedquery as Parameter
I am using the Namedquery of JPA, to create a DTO. And in my Query I have as condition one IN and as a parameter of IN has values with white spaces in the middle. (Ex: 9292 929). and these values…
-
2
votes2
answers674
viewsPassing parameter between pages
How to pass parameter between pages in Windows Phone 8 . 1? In the previous version it was made like this: Pag 1: private void Button_Click(object sender, RoutedEventArgs e) { string uri =…
-
2
votes1
answer622
viewsProblem passing parameters to function
I have the following Javascript code to which I intend to pass parameters from an event onClick, but they are not recognised: HTML <a id="addplaylist" href="javascript:void(0);"…
-
2
votes1
answer643
viewsParameters with Javascript
On the server, I don’t know why, when accessing the site, it goes through a index.html before going to the main page. It turns out that before there is a Servlet with some data as parameter. In html…
-
2
votes2
answers140
viewsPublic method where a date is passed as a parameter, a parameter only
I need to create a public method called mostraData where a date is passed as a parameter (a parameter, not a separate day, month and year) and the date is returned in the following format: dd / mm…
-
2
votes1
answer2187
viewsHow to pass a text as a parameter to a Javascript function?
I need to do a Javascript function and I want it to receive the parameters in text format: HTML code: <button onClick="AlteraNome(Felipe)">Enviar Nome</button> Javascript code: function…
-
2
votes3
answers1573
viewsHow to send parameters to a server?
I started learning Android programming very little time ago. I was programming in Java desktop but I never made any application to communicate with a server. Now I need to communicate with a server…
-
2
votes2
answers4863
viewsHow to create a method with optional parameters in pure Java?
How I create a method that does not need to enter all parameters? Ex. There is a method that asks for 5 parameters. But I intend to use only 2.
-
2
votes1
answer296
viewsVariable as Java Method Argument
Do you pass a variable as an argument of a method not its value, but the instance itself, every change made in the argument applies the variable? Just like it works in Javascript?
-
2
votes2
answers743
viewsReceive by parameter a List of miscellaneous objects
I have the following problem described in the comment: public class Funcionario{ public long Id {get; set;} public string Nome {get; set;} public DateTime DataContrato {get; set;} } public class…
-
2
votes0
answers448
viewsDynamic parameter limitation in Crystal Reports
I created a report in Crystal Reports that will display the data of a Project generated in the SCIA system. The user must select the Project to be issued in the report in a list of values of the…
-
2
votes2
answers759
viewsUnderstanding parameters and arguments in functions
I am learning programming and I know that there are some answers on this topic, that have made me (theoretically) understand who is the parameter and who is the argument, however still do not…
-
2
votes1
answer36
viewsObject-Oriented Programming Simple Doubt with Implements
I’m using a php library. You have a class with a method that takes as parameter exactly this text that I will write: TextElementInterface $pText = null .In the definition of TextElementInterface he…
-
2
votes1
answer101
viewsMethod does not accept passing from null to parameter
I have the following method: public String insereRegistro(int tipo, String data, String horario, String historico, int veiculo, double km, int cliente, int solicitante, String finalizado) { ... }…
-
2
votes1
answer92
viewsFunction with variable number of parameters via template
I know that templates in function definitions do, for each configuration it makes possible, compile a distinct function. I want to know if it is possible to create functions of varied number of…
-
2
votes1
answer7425
viewsFunction takes as parameter a string array
I just started learning the C programming language and I’m having a hard time. I declare a string vector, pass values to that vector and then pass that same vector as a function argument. The…
-
2
votes1
answer152
viewsRor - Get controller Strong files inside the Application Controller
I am developing a logging process on my system (Rails 5), more specifically within the application controller. This process is being created there so I can add one before_save us controllers that I…
-
2
votes0
answers186
viewsHow to list all parameters of a report automatically in SSRS?
Problem I need to generate a report usage log with the user, report name, usage date and selected parameters. Most of the fields were obtained using the Built-In Fiels. However, I cannot get a…
-
2
votes1
answer153
viewsHow to pass the return of a function that is a tuple as arguments to another one in Python?
I’m trying to return multiple values from one function to another with multiple parameters: def chamar_ab(): a = 1 b = 2 return a, b #tupla def soma(x, y): return x + y But using it doesn’t seem…
-
2
votes1
answer169
viewsHow do you create an optional parameter in a class method?
I know that to create an optional parameter in a function you can do this: void exemplo(int a,int b=0); But how do I do it in a class function ex: class Exemplo{ public: void nada(int,int); }; void…
-
2
votes1
answer210
viewsMake a parameter change the value of the variable with pointer
It is possible to work with pointers in JS, if yes, how do I do this? In the example below the goal is to make the variable str stay with the value: "worked :D" var str = "teste"; function…
-
2
votes1
answer53
viewsWhy do different types of variables give different results when modified in a function?
I can’t understand why x and v[0] are different. void edit1 (int x) { x = 9 * x; } void edit2 (int v[]) { v[0] = 9 * v[0]; } int main () { int x, v[2]; x = 678; edit1 (x); printf (" x: %d\n" , x);…
-
1
votes1
answer1601
viewsPass parameters in a VB6 application
How do I pass VB6 parameters? Private Sub Command1_Click() Dim cnpj As String cnpj = "tal" Dim chaveCliente As String chaveCliente = "tal" Dim chaveAcesso As String chaveAcesso = "tal" Dim status As…
-
1
votes1
answer1292
viewsFill a parameter field in Crystal Reports
I have a report from Crystal Reports where I must pass parameters for the search, however one of these parameters must come filled with a default value that is nothing more than a field of type memo…
-
1
votes1
answer89
viewsUse only one parameter
Hello, it is possible to use only one parameter of a function? My problem is I have a Function oUtils.CarregarListaDominioAnalise(Session("idioma"), lst_cdocorrencia, 30, True, "", "") In which…
-
1
votes1
answer4690
viewsObject as parameter in a Javascript function
I have looked in several places about the use of object as a parameter in a function, but only found on that website, but I didn’t feel comfortable with that structure. how best to put an object as…
-
1
votes0
answers681
viewsPass parameter to modal window
I have a link that calls a modal bootstrap and I need that when it is clicked, the modal window is opened and a data is loaded in it that was sent as parameter by the link. The modal link and call…
-
1
votes3
answers821
viewsRazor - Send parameters to a Bootstrap modal
I have a list (grid) and want to open a modal bootstrap with details of the chosen line. To build the list I’m using - @foreach, and store the data in a viewbag. The idea is to open the modal window…
-
1
votes3
answers825
viewsMethod parameter with abstract class
Hello. I believe my doubt is very simple, but I really did not find any solution, after much research. In Java, I have two concrete classes that extend an abstract class, as the example: public…
-
1
votes1
answer252
viewsHow to create Parameters for Ireport
I am developing a Java Software where the user registers. Each registered product can be printed. Each product may have several images and these images should be printed together with the data of…
-
1
votes0
answers129
viewsProblem when passing Arraylist to another Activity
Good evening, I’m having trouble passing a Listview from one Activity to another. The Activity code that passes to the other is the following, called Filtrarimoveis.class: for (int i = 0; i <…
-
1
votes2
answers1150
viewsPass pythonic form parameters
The database driver I am using returns the data of a record in the form of an example tuple ('João', 32, False). I’m thinking of a pythonic way of passing this data to the constructor of a Person…
-
1
votes0
answers305
viewsPass parameter to a callback function
I need to pass a parameter to a callback function. Actually the idea is this: I search in the database members of a team, in case the table is PESSOA_EQUIPE And in this database there’s her code…
-
1
votes2
answers1328
viewsCalling javascript function with null parameter
The function verificaCampoVazios has two parameters (fs and campos). verificaCamposVazios = function (fs, campos) { console.log(campos[0]); } Example of how it is called function:…
-
1
votes1
answer493
viewsHow do I pass this image as a parameter?
The question is as follows, as I pass the image as parameter to use it in javascript with tried in the code below? HTML <!doctype html> <html lang="pt-br"> <head> <meta…
-
1
votes1
answer47
viewsUWP XAML Frame.Navigate to page with parameter
I have two pages and I want to navigate from one to the other. Only the second page has a parameter that should be received from the first. ... class MainPage { MainPage() { InitializaComponent(); }…
-
1
votes1
answer802
viewsPass array as parameter
I have a question about arrays. So I have the following code: public static void main(String[] args) { //Objetos..... ColeçãoCidades ListaCidades = new ColeçãoCidades(); //Adicionar regiões Scanner…
-
1
votes1
answer258
viewsPDO passing the bindValue parameter
I have the following parameter in my query UPDATE. $consulta->bindValue(':foto', $foto, PDO::PARAM_STR); What I would like to do is the following: If the variable $foto come blank, how could I…
-
1
votes2
answers525
viewsPath null parameter
I’m trying to get into a controller, receive a parameter and print it in the View by a ViewData or ViewBag. My Controller: public ActionResult Index(string information) { ViewData["Bag"] =…
-
1
votes0
answers19
viewsParameter with default value in Java
In other languages, such as javascript, it is allowed to make a function by passing a parameter with a default value, as in the following structure: function myFunction(value = true){ //alguma ação…
-
1
votes1
answer672
viewsStatic method with object as parameter
I am creating a very simple system for enrolling students. I took a class Aluno as follows: public class Aluno { private String nome; private String matricula; private String curso; private int…
-
1
votes2
answers457
viewsHow to omit certain arguments for which standard values were given in the function prototype parameters?
How to omit specific arguments of the function in C++ for which standard values were given in the function prototype parameters? E.g. how to omit the second argument (b = 4 by default), passing the…
-
1
votes1
answer41
viewsDoubt regarding the passage of parameters
In the code below, in line 5, the function foo1t calls the function foo1 passing two parameters to it, however, the function foo1 has only one parameter. Is it possible to do this or the code is…
-
1
votes1
answer101
viewsAbout passing parameters in compiled programming languages
What would be more advantageous when calling a function, putting in the stack from right to left or vice versa? And cleaning the stack? The function that calls (Caller) or what is called (calee)…
-
1
votes2
answers1267
viewsHow to create a vector by joining together 2
I’m doing an exercise with vectors where I need to read two vectors of 5 positions each, and after that, concatenate these two into a 3 of 10 positions. My program is correctly printing the first…
-
1
votes1
answer352
viewsHow to pass parameter to Index from another Controller
I have to pass a parameter (ID) to a controller’s index, I tried to use the ActionLink but it didn’t work. View: <body> <table class="table"> <tr> <th>…
-
1
votes0
answers32
viewsCan I pass a string, which is not previously stored in an array, as a parameter for a function?
I wrote this function to remove the characters nay repeated from any string in c: char *repeticoes(char *s){ int i=0, j, cont=0; while(s[i]!='\0'){ for(j=0;j<strlen(s);j++) if(s[j]==s[i] &…
-
1
votes1
answer60
viewsParameter name does not match with the variable passed
void countdown(int max, boolean output) { for (int i=max; i>=0; i--) if (output) println(i); } void setup(){ int top = 20; countdown(top, true); } There is something wrong with the syntax/writing…