417,747 questions
Score of -4
0 answers
69 views
Java NullPointerException after looping through a empty array, and trying to check if a certain variable is there [duplicate]
I have 2 builder patterns, in which I have items, and character respectively, the characters have arrays as one of their components. ( I have to include these just, so you can run the code, I can't ...
Score of -2
0 answers
129 views
How can I add to a array that is a component to an object, and and how modify/change/extract the value from a component in a builder design pattern [closed]
I have a builder design pattern for Characters and items in my text based role playing game.
the CharacterComponentBuilder:
public class CharacterComponent {
private String name;
private int ...
Advice
0
votes
4
replies
149
views
2 flat arrays (keys/values) to nested JSON
In short I need to go from
keys = ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'd', 'a', 'b', 'c', 'd']
values = ['12', '9', '4', '5', '14', '6', '3', '3', '10', '9', '4', '6', '11', '4']
to
{
&...
Advice
0
votes
12
replies
146
views
Add item before a specific item in each item in array
Given
flat_array = ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'd', 'a', 'b', 'c', 'd']
, I would like to turn it into
['a', 'b', 'c', '|', 'a', 'b', 'c', '|', 'a', 'b', 'c', 'd', '|', 'a', 'b', 'c'...
Advice
0
votes
7
replies
157
views
deduction of nontype template parameter std::array
This is a template class with a std::array as a nontype template parameter.
Ideally it should be possible to deduce this parameter from the argument of the constructor.
This requires to do some ...
Score of 1
0 answers
50 views
How can I filter Milvus vector search results by values in an ARRAY field?
I have a Milvus collection with both dense and sparse vector fields for text retrieval. I also want to store a list of preprocessed keywords for each text chunk, for example:
tags = ["milvus"...
Score of 1
1 answer
144 views
Why is the string element's Count method being referenced and not the array's Count method?
I'm trying to create a custom class to store an array of strings in and to display the array values with a different format than the regular string[] does, but I'm running into problems even though ...
Score of 0
1 answer
82 views
Why is variable not expanded using a "join" in zsh?
I have with zsh version 5.9
arr=(A B)
sep=#
print ${(j:$sep:)arr}
I would expect to see A#B, but A$sepB is printed. Obviously, $sep is not expanded, but I can't conclude from the man page, why such ...
Advice
1
vote
5
replies
110
views
Why not put a RAID 5 in a 2 dimensional array?
I have no background in computer science so forgive my ignorance with this question but I have recently learnt about RAID 5 and RAID 6 and I was curious as to why a RAID 5 is not put in a 2x2 array to ...
Advice
0
votes
4
replies
126
views
Is it possible to build an AI-powered ticket management system with automatic department and employee assignment?
I am developing a project called TIXORA, which is an AI-powered ticket management system.
Workflow:
Employee creates a ticket with title and description.
AI analyzes the ticket content.
AI predicts:...
Best practices
0
votes
7
replies
118
views
Creating a static char array inside struct from dynamic char array using initializer in C
I am making a macro which takes a char pointer array and uses it create a fixed size char array inside a struct using a struct initializer. Right now I have this code which works as intended:
typedef ...
Advice
0
votes
8
replies
118
views
What factors influence the branch misprediction penalty?
I have two arrays x and y. The values of x are random, while y has been partitioned into positive and negative subarrays. x can have anywhere from thousands to millions of elements, while y generally ...
Score of 2
1 answer
185 views
Excel VBA: Out of Memory Error When Copying Large Arrays Worksheet
I am running a VBA macro that processes a large dataset (around 500,000 rows and 30 columns). The data is read into a Variant array, processed in memory, and then written back to a new worksheet.
The ...
Score of 1
1 answer
104 views
How to Initialize Array of MutableList in Kotlin
I understand that initializing an array in kotlin is pretty straight-forward if you know the items to put in the array. In my situation, I know how many elements at run time, not during compile time.
...
Score of 2
1 answer
93 views
why does `DOUBLE[]` cause a syntax error in backtick symbol vectors?
When defining a schema for loadText, I need to specify column types. Some columns are array vectors with type names like DOUBLE[] and LONG[].
I tried using backtick symbol vectors, which is the ...