Questions tagged [default-value]
A default, in computer science, refers to a setting or value automatically assigned to a software application, computer program or device, outside of user intervention.
default-value
2,033
questions
0
votes
0
answers
13
views
How to set a default value for a specific cell in a matrix dropdown question in Survey JS?
`I'm working on a survey using SurveyJS, and I need help configuring a matrix dropdown question. My goal is to set a default value for a specific cell in this matrix.
Problem Description
In my survey, ...
0
votes
1
answer
78
views
Kotlin default value for non-null field in data class, then dont pass that attribute in json?
I have a data class :
import com.fasterxml.jackson.annotation.JsonInclude
import io.micronaut.serde.annotation.Serdeable
@Serdeable.Deserializable
@JsonInclude(JsonInclude.Include.NON_NULL)
data class ...
0
votes
0
answers
79
views
Postgresql pgvector: How to set a default value to a vector when its size is large?
Say I have a very large vector, I want to set all its indices to some default value. How can I achieve this? I seached online but couldn't find an answer. Note that this is not a postgresql array, ...
1
vote
1
answer
27
views
How to use the default value set for a table in a where condition in an update statement?
I want to use the default value (string) for a specific column in a specific table in the where condition of an update statement in SQLite. So, the column should only be updated if the current value ...
1
vote
1
answer
60
views
How can I turn a literal into an expression in SQLAlchemy for MYSQL?
I'm using sqlalchemy to create a table in mysql. I would like to have a JSON column, with a default value, but mysql doesn't allow literals to be the default value, only expressions.
If I create the ...
2
votes
4
answers
182
views
Is there a way to set default values of columns that are NOT NULL in postgres?
In PostgreSQL, when a column is marked as NOT NULL and no value is provided for it during insertion, an error is thrown. However, in MySQL, if no value is provided, the default value is set based on ...
2
votes
1
answer
34
views
What is by default significance level of Modified Mann Kendal test in R?
I am using Modified Mann Kendal test in R.
I want to know its by default value for significance level. Can we set the significance level manually? For example: 5%, 10% etc. if possible, then how can ...
0
votes
0
answers
61
views
Vue 3: withDefaults() prevent TypeScript from checking conditional props
I've tried to create conditional props for my <Button /> component using discriminated union types. I don't want to allow pass down props like to, hash, linkBehavior when another prop called ...
0
votes
0
answers
25
views
How to set default filter for a particular column before data load in ag-grid?
I have ag-grid implemented in React.js. I want to apply a default filter for one column(for certain conditions) and then fetch data for ag-grid.
I tried onFirstDataRendered and onGridReady. But those ...
2
votes
1
answer
46
views
Is it possible to have a default value that depends on a previous parameter? [duplicate]
Suppose I want to write a recursive binary search function in Python. The recursive function needs to get the start and end of the current search interval as parameters:
def binary_search(myarray, ...
0
votes
1
answer
37
views
Default value of input 2 is from input 1. Why does the state of input 2 not get its default value from input 1?
I have 2 <input type="text"> elements. What users type in input 1 will be the default value of input 2. The value of input 2 will be used for other tasks. The tasks should run right ...
1
vote
1
answer
39
views
Json::Serializable don't use default value from proc
I'm trying to provide a default value for a struct attribute that is generated instead.
However when deserializing, the value is still nill.
playground:
require "json"
struct A
include ...
0
votes
0
answers
22
views
Exploring the Use of Mutable Default Arguments for Caching in Python [duplicate]
Today, while tackling this question on Project Euler, I stumbled upon an intriguing use-case for employing mutable objects as default arguments in Python functions. Typically, this practice is ...
0
votes
0
answers
252
views
Getting default values of any type in Python3
Assuming I want to make a function in python that just returns the default value of a given type as a parameter:
def PrintDefaultValue(valueType: type):
print(default(type)) // ?? # <-- how I ...
0
votes
2
answers
172
views
Get the default value of a property of an abstract class
Is there a way in C# to access the default value of a non-static, non-const property that is defined in an abstract class?
For example, given:
public abstract class SomeClass
{
public int ...