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.
Questions tagged [named-parameters]
371 questions
0
votes
3 answers
Named keywords in decorators?
I've been playing around in depth with attempting to write my own version of a memoizing decorator before I go looking at other people's code. It's more of an exercise in fun, honestly. However, in the course of playing around I've found I can't…

wheaties
- 35,646
- 15
- 94
- 131
0
votes
1 answer
Does Basic4Android support named parameters like Visual Basic?
Since Basic4Android is based on Visual Basic, can it support named parameters to make the code more readable?

guagay_wk
- 26,337
- 54
- 186
- 295
0
votes
1 answer
Null pointer in Initialising NamedParameterJdbcTemplate bean
If i do the code in controller with
final DataSource dataSource = (DataSource) getApplicationContext().getBean("dataSource", DataSource.class);
final JdbcTemplate jdbcTemplate = new JdbcTemplate(jdbcDataSource);
final NamedParameterJdbcTemplate…

Arun b
- 1
- 1
0
votes
2 answers
python sqlite named parameter containing dash
I'm trying to insert a record into an sqlite database using named parameters in python (with the sqlite3 module).
The values I want to insert are in a dictionary, but the dictionary keys might contain dashes, for example {'request-id': 100,…

Daniele
- 145
- 6
0
votes
2 answers
Ruby's named parameters with hyphens
I often have to generate SVG files, and I like doing so with Ruby's Nokogiri. The nice thing about Nokogiri is that it lets you create attributes passing a hash to their "functions", like so
doc.rect(:x => 0, :y => 0, :width => 100, :height =>…

Morpheu5
- 2,610
- 6
- 39
- 72
0
votes
1 answer
JDBC query doesn't work when giving NamedParameterJdbcOperation gets date as parameter (in params map)
I try to query my Mysql DB using JDBC.
I use the org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations.
The column DATE_FROM in my_table is defined as DATE column (which is also a PK).
A simplified version of a query which works…

user1028741
- 2,745
- 6
- 34
- 68
0
votes
1 answer
Angular optional named groups on url leave encoded question mark
I have the following angular route:
$routeProvider.when('/sites/:var1/:var?/something/:year?/:month?/', {
templateUrl: 'path-to-template.html,
controller: 'PageController'
});
…

user3638565
- 55
- 1
- 6
0
votes
0 answers
Java persistence: named queries. Multiple parameters changes boolean values to int?
I'm an amateur programmer and I'm having trouble with the java eclipse persistence named queries. I have an entity class. In this class I have created named queries. With the ClientInformation.getList I have two parameters. One on active (Boolean)…

Mohr
- 1
- 2
0
votes
2 answers
Why do named parameters appear to work in PHP?
I recently discovered some code in PHP that appeared to use named parameters, and was surprised.
$this->setCellPaddings ($left = '', $top = '', $right = '', $bottom = '1');
Unfortunately a quick test confirmed my fear: only the order matters. If…

iconoclast
- 21,213
- 15
- 102
- 138
0
votes
0 answers
How can I avoid undesired argument matching?
Suppose I write such a function in R:
fun1 <- function(x,...,simplify=TRUE,sort=TRUE) {
# do something here ...
}
In the function, ... is supposed to be a number of expressions that are evaluated in specific environments. However, sometimes it…

Kun Ren
- 4,715
- 3
- 35
- 50
0
votes
1 answer
WSO2 DSS 3.2.0/3.2.1 can't recognize named parameters within LIKE statements
I have created a simple Data Service using wso2 dss as follows.
Query : SELECT id, key, value, description FROM dbo.configs where key like '%:filter%'
Final XML :
SELECT id, key,…

Yasas Karunarathna
- 361
- 2
- 9
0
votes
1 answer
When should i consider using named parameters against normal parameters?
I was splitting RenameFolder to two pieces and i notice visual studios 2010 supports named parameters! (example below).
I know this has existed for a number of years in other languages. I remember a professor saying why he likes named parameters and…
user34537
0
votes
0 answers
NoSuchMethodError when named parameters are added to previously working update with NamedParameterJdbcTemplate
I'm able to successfully connect to a MySQL database with SpringMVC and JDBC, I can run queries and updates no problem, until I try to add named parameters. Any named parameter and I get the following exception:
nested exception is…

paniclater
- 903
- 1
- 12
- 18
0
votes
0 answers
NamedParameterJdbcTemplate with SQL Server : Incorrect syntax near '@P0'
I have the following code which runs a query against a SQL Server DB. I've read these links
http://jenikya.com/blog/2009/02/sqlexception-select-top-number.html
MS SQL Exception: Incorrect syntax near '@P0'
but i still can't see where/why i'm…

emeraldjava
- 10,894
- 26
- 97
- 170
0
votes
3 answers
C# syntax ignoring a parameter, asking of possibilities
Having
public static void Search(string name, int age = 21, string city = "Tehran")
{
MessageBox.Show(String.Format("Name = {0} - Age = {1} - City = {2}",
name, age, city));
}
I want to call Search method using name and city…

Mahdi Tahsildari
- 13,065
- 14
- 55
- 94