388 questions
-1
votes
0
answers
123
views
Use of named parameters in MySQL subquery with PHP8 [closed]
I have 2 tables customers and addresses (each customer can have many addresses)
The customers table has two fields of interest:
userName (varchar)
userID (varchar)
The addresses table has two fields ...
2
votes
2
answers
224
views
Is there a way to use both named args and variable args in a function call?
Going through a code review and found named argument call being used to a argument that uses the spread operator for variable args (vargs). To my suprise it works fine for 1 argument, but I cannot ...
1
vote
2
answers
214
views
How to skip default named arguments while setting a named variadic argument in a function call?
I have an existing method:
public function dbQuery(
string $query,
bool $flag1 = false,
int $flag2 = SOME_DEFAULT,
bool $flag3 = false
)
Now I want to adapt it so it is possible to ...
0
votes
1
answer
153
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
57
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
395
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
93
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 ...
9
votes
3
answers
5k
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 ...
-1
votes
1
answer
351
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
93
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
68
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
1k
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/...
2
votes
1
answer
162
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
53
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
249
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 ...