Questions tagged [initializing]

115 questions
1
vote
0 answers

How to initialize and format a Virtual Disk using Delphi (or C#)?

Based on and using the Jedi Demo VHD, I've created a virtual disk, and can mount and dismount it. When mounted, it appears in the Disk Manager as disk 1 "unknown". Going on to initialize and format it in my code, I am trying with the following…
1
vote
1 answer

is there any difference between two methods that re-initializing vector?

I use two methods when I re-initialize vector vector vec(1000, 1); //first vec.assign(1000, 2); //second vec = vector(1000, 3); I think these two methods are produce same result, but I found that the second method takes up less…
jsjclink
  • 49
  • 3
1
vote
1 answer

Python: Am I able to create a set of objects, in which the object names are determined by iterating through a list of strings

I'm new to this so my title may be misleading and/or make no sense. I have 32 objects I want to initialize with a loop. I have the desired names of the objects in one list, call it A. And the desired values in one list, call it B. i want to do…
PumpMan
  • 11
  • 2
1
vote
1 answer

Initializing an array with elements of another array in R

I have an array a<-c(6,77,98,88,3,10,7,5) I want to initialize another array with the 1st, 6th, and 8th element i.e. b should look as follows: b = (6,10,5) Is there a straightforward way to do this in R? (I am a beginner, as I am sure you…
Nilima
  • 197
  • 1
  • 2
  • 9
1
vote
2 answers

C++ - Strange problem with loop initialization

The compiler can't handle even the simplest loop #include using namespace::std; int main() { for( int i = 0, char a = 'A'; i <= 26; i++, a++ ) cout << "OK, lets try. Showing values: i = " << i << ", a = " << a <<…
1
vote
5 answers

Android Studio cannot find my device ! (Initializing ADB)

I'm struggling to connect my device(Galaxy S10) in Android Studio. I used several methods to solve this problem, but it didn't work. [Methods that I tried] - Delete all android studio files and re-install it. ( gradle, sdk, etc.... ) - Add the…
Donghyun
  • 11
  • 1
  • 2
1
vote
1 answer

Embedded C++ static initialization of struct arrays

While migrating to C++ I require a certain function that seems to have been deprecated. sorry, unimplemented: non-trivial designated initializers not supported What is the correct way to implement the following data storage system in C++ for memory…
Jeroen3
  • 919
  • 5
  • 20
1
vote
0 answers

populating a dictionary of lists behavior

I initialized a dictionary of empty lists, but when appending values to one list, all the lists get updated margenes = dict.fromkeys(['su_a2b', 'hd_a2b', 'su_b2a', 'hd_b2a', 'L1s', 'L4s'],[]) margenes['su_a2b'].append(1) margenes {'L1s': [1], …
Zensualito
  • 11
  • 2
1
vote
0 answers

How to get influxdb docker image to initialize graphite and telegraf

Using the official InfluxDB docker image, I am trying to have multiple databases one that uses Graphite and the other uses the normal InfluxDB. I am using docker-compose to build and start the images. I am initializing the InfluxDB with a slightly…
1
vote
3 answers

Piece-wise initialization of very large C struct

My embedded application stores (in ROM, const) very large, very nested struct. I'm looking for a tidy way to initialize it. So instead writing : typedef struct { uint32_t n1; float fArr[5]; struct { char cArr[1000]; …
eyalasko
  • 75
  • 6
1
vote
3 answers

Adding values to an array of undefined size

I have researched and tried for hours to solve my problem, but the reality is that I can't find anything on it. It is simple really. I need to initialize java arrays of undefined size, and then compare the two. In the process of testing my program,…
1
vote
0 answers

Android monkey test produced many activitiy instances which are in the INITIALIZING state

After running monkey test for a long time, one activity in my application produced a large number of instances which are in the INITIALIZING state. What could be the cause? How to solve this problem? This activity cannot be singleton.
xf1020
  • 43
  • 5
1
vote
2 answers

list initialization for a matrix class

I am trying to write a matrix class for linear algebra calculations. I have almost finished writing what I wanted. but I have a little trouble in creating a constructor that uses list initialization to create a matrix. this is my class data…
ahamid555
  • 333
  • 4
  • 16
1
vote
0 answers

Initializing an array of structure in C

I'm using the LXLE 14.04 distribution of Linux. I want to write a C program to read commands, interpret and perform them. I'd like the program to be efficient, and I do not want to use a linked list. The commands are operations on sets. Each set can…
Tree
  • 145
  • 1
  • 13
1
vote
1 answer

C - Passing a local variable in a function without initializing

so I'm really new at this, and I was wondering how I would go about passing a local variable in a function (in terms of the initialization). For example, I have one function (move) that declares and initializes two variables (t_row and t_column) to…
Allie H
  • 121
  • 1
  • 11