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
383
questions
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 ...
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/...
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", ...
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 ...
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 ...
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 = "...
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/...
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', ...
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/...
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 ...
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) {}
...
***...
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 ...
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 ...
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, ...
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<...