Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [named-parameters]

Named parameters enable you to specify an argument for a particular parameter by associating the argument with the parameter's name rather than with the parameter's position in the parameter list.

named-parameters
0 votes
1 answer
77 views

Passing an object/map as named arguments/properties to a Flutter Widget

As I extend Flutter widgets, I'd like a way to pass any properties to the original widget without having to specify them all on my widget three times beforehand, or modifying it every time I want to ...
Chema's user avatar
  • 745
0 votes
0 answers
52 views

cannot use proper named parameter in flutter app

yes, i did just do that. the trouble i have is that i can't remove the red underline, and thus my project won't run. InputDecoration error parameter : https://api.flutter.dev/flutter/material/...
JTalbott's user avatar
2 votes
1 answer
117 views

How can I have the value of a Gradio block be passed to a function's named parameter?

Example: import gradio as gr def dummy(a, b='Hello', c='!'): return '{0} {1} {2}'.format(b, a, c) with gr.Blocks() as demo: txt = gr.Textbox(value="test", label="Query", ...
Franck Dernoncourt's user avatar
1 vote
0 answers
52 views

What's the functional / technical / semantic difference between calling a PowerShell function with positional vs named arguments? [duplicate]

I'm recursively calling a function in Powershell. When I call the function using positional arguments, I get a ParameterBindingArgumentTransformationException exception, but when I call the function ...
Omnomnious's user avatar
3 votes
1 answer
862 views

org.postgresql.util.PSQLException: ERROR: function lower(bytea) does not exist

I'm in a migration process from javax to jakarta. Our project is build with Spring Boot (thus upgrade from 2.7 to 3.2) and Hibernate (5.6 to 6.3) and we use a PostgreSQL database (V14). One pitfall ...
RainerZufall's user avatar
0 votes
1 answer
136 views

Is it okay to have same name of parameter and variable in function call in Kotlin?

i have query that is it fine to use to use named parameter which having name parameter and the variable name same in a function call for example fun fun1( to:string ){ //body} fun fun2( ){ to = "...
Tushar Singla's user avatar
1 vote
1 answer
65 views

How to pass named parameters to ST_Makevalid method in SAP Hana

It is easy and simple to use St_Makevalid method of st_geometry in SQL-statements like documented in https://help.sap.com/docs/SAP_HANA_PLATFORM/cbbbfc20871e4559abfd45a78ad58c02/...
Hannu Huttunen's user avatar
0 votes
1 answer
43 views

How to mix named parameter and closure in Groovy

I want to write a method that takes named parameters only and a closure. See below. def myMethod(Map args, Closure cl) When I call the method, I can do something like this: myMethod(param1: 'a', ...
Lawrence Zeng's user avatar
0 votes
1 answer
658 views

"Unknown named parameter" incomprehensible error

I am building several very similar objects and it works for all of them, except one. The error trace is: Fatal error: Uncaught Error: Unknown named parameter $hymnus in /THEROUTE/src/App/Models/...
A. Cedano's user avatar
  • 671
1 vote
1 answer
92 views

scipy optimize: how to make it work with a function that has only optional arguments?

Let's say I have the following function (very simplified, to explain the gist of the issue): def func(a=None, b=None, c=None): return 100-(a+b*c) The purpose of this function is eventually to ...
J-J-J's user avatar
  • 150
0 votes
1 answer
38 views

Error when not using named parameters when calling a function reference

I get the following error: The argument type 'void Function(String?)' can't be assigned to the parameter type 'void Function()?' when I this in my code: void openNoteBox(String? docID) {} ... ***...
Dennis's user avatar
  • 3
3 votes
1 answer
160 views

Groovy named parameters in traits

Given example with @NamedVariant groovy transform - everything works as expected: import groovy.transform.NamedVariant class A { @NamedVariant def func(String key1 = "val1", String ...
Maciek's user avatar
  • 516
0 votes
1 answer
87 views

LocalDate::of - None of the following functions can be called with the arguments supplied

In kotlin, this works: LocalDate.of(2023, 1, 1) However when I try to use named parameters I get the error: None of the following functions can be called with the arguments supplied: public open fun ...
Elliott de Launay's user avatar
2 votes
1 answer
441 views

Is there named parameters in modern C++? [duplicate]

In some languages like C# and Python there is a notion of 'named parameters'. In a book on C# I have found the code: static void print_nums(int x = 0, int y = 0, int z = 0) { Console.WriteLine(x, ...
ProMike's user avatar
  • 89
1 vote
1 answer
347 views

JPA Query named parameter issue in Repository

I have this method in my repository: @Query(""" SELECT items FROM ItemEntity items WHERE items.type = :type AND (:idList IS NULL OR items.id IN :idList) """) List<...
askwer's user avatar
  • 225

15 30 50 per page
1
2 3 4 5
26