Questions tagged [initialization]
Initialization deals with the task of initializing the contents of your data structure. It's a common practice in statically-typed languages.
initialization
11,803
questions
-3
votes
0
answers
12
views
ReferenceError: Cannot access 'supabase' before initialization
[enter image description here][1]I'm trying to set up Sape base, but I come across this error. Help pleasе
I searched for various solutions on the Internet, nothing helped
I'm trying to set up Sape ...
1
vote
1
answer
29
views
initializing inline and initializing inside constructor which does run first in Typescript?
I'm learning about class concept in typescript. I recognize that there are two ways to initialize fields (properties) in typescript: initializing inline the class body and initializing inside the ...
0
votes
1
answer
29
views
How should I initialize pthread mutexes in shared memory, since at program start they can be already initialized?
I'm using shared, robust pthread mutexes to protect some shared memory areas I have in my application. Since my program is managed by a systemd service, it could potentially be restarted, in which ...
0
votes
0
answers
35
views
C++ Large Heap Array Initialisation
I am writing code which demands a large array. I am told that, due to the size of the array, it is best to store this in Heap Memory. I need this array to be unsigned because I am using it to store ...
0
votes
0
answers
18
views
Initializing array elements inside a forEach [duplicate]
I declare an array, then set its arr.length property. When I try to initialize its elements inside a forEach loop via arr[index], it doesn't work and only those elements can be accessed/modified which ...
0
votes
0
answers
17
views
Initializing an array created with malloc with arbitrary values
I need to create large float arrays using malloc, to be able to free the memory when I don't need the array anymore.
The values are arbitrary, meaning they are not all zeros or ones, much more random ...
0
votes
0
answers
11
views
Dot Net framework error initialization problem
enter image description here
Error displayed when turn on pc , and install windows apps
I tried to install . Net frewoek v4. D
How can I fix it , I have windows 10 . Please I want to know if the ...
2
votes
1
answer
60
views
Using previously set fields when initializing structure with compound literals
What is the expected behavior of referring to previously set fields, when declaring initial values for a struct using compound literal: Specifically is it ok to: struct foo v = { .v1 = ..., .v2 = .v1+...
1
vote
1
answer
46
views
JavaFX won't initialize views
I've encountered with issue that JavaFX won't initialize any view or container by fx:id.
And it throws NullPointerException with reference at object that i've already initialized.
For an example i've ...
0
votes
1
answer
71
views
Is there a performance benefit to using c++'s std(::ranges)::uninitialized_... algorithms, and is it worth not having constexpr?
I'm implementing a container type that owns some memory which I am creating using std::make_unique_for_overwrite(). Given that this function is specifically returning a std::unique_ptr to ...
0
votes
1
answer
54
views
Error in RAGAS: "embeddings must be set" when using answer_similarity in FastAPI
I'm developing a REST API using FastAPI, and I'm trying to calculate the similarity between answers using the RAGAS library. However, I encounter an error that says embeddings must be set.
Here's a ...
0
votes
2
answers
72
views
Does having a vector containing structs with uninitialized members lead to undefined behavior
If you have a vector containing structs with uninitialized members, is this undefined behavior. The context for this is a vector which is created but then filled in a parallel context, Thus the ...
-3
votes
2
answers
115
views
segmentation fault in c++ programme [duplicate]
output
the below code is a c++ program that calculates the sum of the letters in given text.
#include <iostream>
using namespace std;
int letter_sum(string text)
{
int Psum = 0;
int n;
...
0
votes
0
answers
10
views
I am having an issue with my controller not calling initialize.my table is not being populated with the items placed in. Any help would be appreciated
Here is the Code sample. I have a table that I manually populate but it does not show up in the table. Any help would be greatly appreciated. I don't get any errors, just an empty table. I have ...
1
vote
1
answer
43
views
Using outer class's val/methods as defaults in nested data class declaration
Consider the following toy example:
class A{
val a=1
fun hello() =println("hello")
init {
println(a)
println(this::hello)
}
data class B(val b: Int = a,...