Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
143 views

This is a follow up question to the Ignore boolean property = true in JSON serialization. I have a record with multiple bool properties, some of them having default value true and some false: private ...
Theodor Zoulias's user avatar
1 vote
0 answers
64 views

When sending a prompt with a schema/json schema, I'd like to ensure that some values would be always present with a default if they are not mentioned in the prompt. Both Gemini API and Vertex API ...
solisoares's user avatar
1 vote
1 answer
75 views

After executing the following script: alter table test_table add (test1 varchar2(1 char), test2 varchar2(1 char) default 'T' not null); I got interesting results... both columns are filled with ...
stelmee's user avatar
  • 63
0 votes
0 answers
60 views

In my application, I have multiple databases in PostGreSql which can contain more than 500 table and each table can have 5 to 20 columns with different data types. The data in the database is imported ...
DevMindzz's user avatar
1 vote
2 answers
40 views

I have a function fun foo( id: String, vararg values: Int, ){ ... } and there are calls like these fun bar1(){ foo("id_1") foo("id_2", 1) foo("id_3&...
gstackoverflow's user avatar
-5 votes
1 answer
67 views

def myfunc(l=[]): if not l: l[:] = otherlist The preceding snippet of code completely reassigns list l to whatever list is stored in variable otherlist and maintains that value across ...
Ethan's user avatar
  • 41
0 votes
1 answer
376 views

We have react-hook-form + zod + react-query. How do I type values with TypeScript to let it catch a bug if I do not provide optional default values? https://codesandbox.io/p/sandbox/react-form-form-...
Anton Arbus's user avatar
1 vote
2 answers
49 views

I'm wondering if it's possible to somehow insert default values into a component from a library (but not wrapping it into another component which does this) to set default values. e.g. i don't want ...
Wilbert's user avatar
  • 53
0 votes
1 answer
298 views

`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, ...
user avatar
0 votes
1 answer
312 views

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 ...
tgkprog's user avatar
  • 4,743
0 votes
0 answers
433 views

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, ...
Berkan Kadioglu's user avatar
1 vote
1 answer
58 views

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 ...
G.Don's user avatar
  • 29
1 vote
1 answer
320 views

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 ...
mazalan01's user avatar
2 votes
4 answers
2k views

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 ...
mubashir's user avatar
  • 961
4 votes
1 answer
60 views

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 ...
tom's user avatar
  • 75
2 votes
1 answer
61 views

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, ...
Erel Segal-Halevi's user avatar
0 votes
1 answer
71 views

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 ...
Ooker's user avatar
  • 3,404
1 vote
1 answer
58 views

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 ...
ngaumont's user avatar
0 votes
0 answers
33 views

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 ...
user21524036's user avatar
0 votes
0 answers
431 views

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 ...
DesktopDev's user avatar
0 votes
2 answers
558 views

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 ...
alelom's user avatar
  • 3,267
1 vote
1 answer
119 views

I have this Jolt spec : [ { "operation": "shift", "spec": { "data": { "*": { "id": "[&1].id",...
Sinuers's user avatar
  • 79
0 votes
0 answers
688 views

For the following types' structure public class Person { public string Name { get; set; } } public class Adult : Person { public string Occupation { get; set; } } ... // many more subtypes I need to ...
Yola's user avatar
  • 19.4k
0 votes
0 answers
31 views

I need to use the function capwords() from SGP in the way to get approach to use the value of default parameter special.words extended with my additional words. I.e. I need to do somthing like: ...
Sergey V.'s user avatar
  • 1,028
2 votes
2 answers
94 views

I have the following problem: I want to write a function that is supposed to get multiple similar sets of inputs, lets say: FUN <- function(part1.x, part1.y, part1.z, part2.x, part2.y, part2.z){} ...
Finn Lübber's user avatar
0 votes
1 answer
82 views

I am trying to write some code in Excel which loops through a number of documents and extracts details from FormFields. The documents are all produced from the same template and users can only enter ...
Jamie H's user avatar
1 vote
1 answer
2k views

Why I got error? Column datatype is integer like a sequence value... SQL> create sequence SEQ_TEST_ID; Sequence created. SQL> desc test Name ...
Dmytro's user avatar
  • 41
0 votes
2 answers
88 views

I have a React component representing a form with inputs (Text, Number, Date). The date input has a default value - today. I use this component for two functions: creating an object and editing an ...
Caplex's user avatar
  • 3
-3 votes
1 answer
450 views

At the beginning, everything is going well. I have a configuration to read from drivers with the help of the package github.com/kelseyhightower/envconfig type NXConfig struct { Enable bool `...
Marc Le Bihan's user avatar
2 votes
2 answers
393 views

I'm just studying python OOP, and truly confused when to use self and not. especially when I want to make a method that defaultly get object instance input and also wanna make it work as a normal ...
Jongbin Won's user avatar
1 vote
1 answer
783 views

I have this scenario: A value is read from a cookie and passed as an $option to a FormType: $indexOrder = $request->cookies->get('clientfile-order') ?? 'date-last'; $advancedSearchform = $this-&...
K. Weber's user avatar
  • 2,803
0 votes
0 answers
124 views

I am trying to pass data to antd form and set the values of the data as default value of the input form but nothing displays on the input. I get the id from from the url and use the id to fetch data ...
etranz's user avatar
  • 1,313
0 votes
2 answers
330 views

I am pretty new to this, so please be nice ;) I have created a function in PL/SQL where I feed the function a UserNo and it gives me an email-address. What I would like to be able to do, is to add a ...
Morten Sørensen's user avatar
2 votes
2 answers
2k views

I attach a basic OAS 3.0 schema below. When using editor.swagger.io, I am able to view the default values of my properties in generated page, when expanding the schema details. openapi: 3.0.3 info: ...
Manny's user avatar
  • 73
0 votes
1 answer
92 views

I am trying to write a function that sets the default for some arguments to NULL. However, when I then want to specify those arguments to not be NULL when calling the function, I receive the error ...
Reid's user avatar
  • 37
2 votes
0 answers
402 views

When you provide a default for an InitVar typed variable in a dataclass, the attribute for that variable is set (actually, for variables that lack a default the attribute seems to be actively deleted ...
Anthon's user avatar
  • 78.3k
1 vote
0 answers
209 views

Below is my github actions ISSUE_TEMPLATE that seeks input from user. name: GH Action details description: GH Issue form title: "GH Action details" assignees: - my-devops labels: - ...
Ashar's user avatar
  • 3,215
0 votes
1 answer
61 views

i have a plugin where i set config defaults at the installation - die "defaultValue" Option in the config.xml won't work out of the box: private function addDefaultConfiguration(): void ...
BlueWolf's user avatar
2 votes
3 answers
138 views

In a code that evaluates a web response, I would like to zip elements from several lists. However, the elements of the iterators are dict's. Therefore, I would like to fill up the missing values also ...
Wör Du Schnaffzig's user avatar
1 vote
1 answer
211 views

We have a table defined as: CREATE TABLE tokens ( token VARCHAR2(36) NOT NULL PRIMARY KEY, username VARCHAR2(60) NOT NULL, insertedOn TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); If we connect to the ...
hijack's user avatar
  • 321
0 votes
1 answer
1k views

I'm working at a ToDo app and I managed to make a menu section with two buttons switching between the app section. The problem is that when it's first opened the 'About me' button should be clicked by ...
Valery's user avatar
  • 11
0 votes
2 answers
158 views

I want to create a class that will be a able to create a subclass. Here is an example of code: class System: def __init__(self, a=0, b=0, c=0): self.a, self.b, self.c = a, b, c ...
Danya K's user avatar
  • 610
1 vote
2 answers
83 views

I'd like to default values in place on jq, and return root document. What I have (note that some property is missing from the inner object) is following, but length is not fixed: [{"foo":{}},...
user-id-14900042's user avatar
0 votes
2 answers
54 views

I want to do something like this. function add($num1, $num2 = 1) { return $num1 + $num2; } $bool = true; // Can be true or false if($bool) { add(5, 5); } else { add(5); } I was asking ...
SimonSolutions's user avatar
1 vote
1 answer
103 views

I want to use a function with a default argument (as in argument with default value) in two separate scripts in which that default argument is set differently. Of course, the function may also be ...
silence_of_the_lambdas's user avatar
1 vote
1 answer
1k views

I want to create SQL function two params: CREATE OR REPLACE FUNCTION myudf (varchar_argument VARCHAR, number_argument NUMBER) ... But I want to set default value if the user did not specify all ...
Lotem 's user avatar
  • 13
1 vote
1 answer
342 views

I would like to call a Lua script, say "test.lua", with an input argument through any of the following options: Piping in the output of an earlier command, say as: echo "value" | ...
Marcos's user avatar
  • 135
2 votes
3 answers
1k views

This is what I'm having problems with in my application.yml file: url: ${DATASOURCE_URL:jdbc:postgresql://localhost:5432/postgres} It seems to treat it like it should cut it at the last colon: ...
eis's user avatar
  • 53.8k
0 votes
0 answers
86 views

I have a menu where you filter geographical locations using two dropdown menus. Then the user proceeds to the main screen. On the main screen, if the user wants to change the geographical location ...
TheCoolest2's user avatar
0 votes
2 answers
139 views

Are there any elvis like operator in Ocaml ? Any sort of optional chaining that return the right value when the left one is empty, a default value operator, like the |> operator with opposite ...
Dav's user avatar
  • 67

1
2 3 4 5
41