Questions tagged [collections]
Collections APIs provide developers with a set of classes and interfaces that makes it easier to handle collections of objects.
17
questions with no upvoted or accepted answers
4
votes
0
answers
99
views
C++14 AtomicRoundRobinPool for sharing a pool of keys
The idea here is that we have some resource that is relatively very expensive to generate, but once we have a bunch of them in a pool, we can keep reusing them instead of generating new ones. "HTTP ...
4
votes
0
answers
143
views
Generic Macro Generated Interval Heap in C
When I saw this amazing data structure I couldn't stop myself from trying it! I first sought resources such as this and an article about it here. It basically works as a Max-Heap and a Min-Heap at the ...
4
votes
0
answers
126
views
C++11 Removable connection from emitter or receiver object
Please review my solution for the following problem. I am interested in:
Maintainability
Usability
Logical correctness
Efficiency
Problem:
It has 1+ objects each in separated thread and between the ...
3
votes
0
answers
121
views
Simulating Objects with Collections in VBA
Background
I am writing a VBA module which requires the functionality of a custom object. This object will support "regular" functions (UDFs) within the module.
Due to reasons beyond the ...
3
votes
0
answers
236
views
Implementation of Dynamic Array with allocators and C++20
To train my skills in C++, I decided to implement the well-known "Dynamic array" data structure on my own. I realized early on that using pointers or smart pointers is wrong, as it leads to ...
3
votes
0
answers
176
views
Simple generic macro-generated containers
In order to learn macros in C I decided to make a generic data structures generator for other projects that I have in C.
The main macros are the following:
...
3
votes
0
answers
76
views
A matrix class for objects other than numbers
I'm in the process of writing a matrix like container to store objects. Despite many existing matrix implementations, I won't do numerics. Instead I want to replace a ...
3
votes
0
answers
173
views
Deque class using typing module
I wanted to make a class for type hinting that the result of a function is a homogenous deque.
...
2
votes
0
answers
95
views
Game involving finding words containing letters from a memorized list
I wrote this Java game where the user memorizes a list, gets given letters and needs to find a word that contains those letters. The player has only a few seconds to enter the word.
Example:
Program ...
2
votes
0
answers
66
views
Iterating in a list of data and search data in another datatable
I have a list which has 25000 data and I am iterating in all data and in each iteration, I am searching data in another data table. my whole routine is taking a long time to finish.
Loading data from ...
2
votes
0
answers
30
views
How to connect a propery class/object with a collection (its database class)?
I'm struggling with organizing my code regarding 'best practise'. In particular how I link a class with its collection class.
I've 2 classes:
...
2
votes
0
answers
582
views
Flattening a map into a list of records
In my everyday work I'm trying to move away from traditional iterating over collections to a more Java 8 streams-like behavior. I'm currently working on a project where I have a collection defined as:
...
2
votes
0
answers
108
views
Set manipulation (javascript arrays) using lodash
I'd like a more elegant and readable (if possible using functional programming style) for collection filtering (groupToAdd and groupToDelete collection handling)
Just getting rid of multiple _....
2
votes
0
answers
283
views
Better way to deep copy than this? How can I make it generic by `Collection` type?
Could I make this method for deep copy generic to the Collection type?
That method is so simple and I can't imagine ever needing to change it, so maybe I should ...
1
vote
0
answers
1k
views
Spring Boot Integration Test with SQS and Elastic Search
I have the following integration test that starts with sending message to sqs queue and ends with checking elastic search if the associated object added to db.
The part of application I want to test ...
1
vote
0
answers
92
views
Further dive into filtering using IPredicate
Preface
This is a follow up to my previous post from not long time ago about containers and filtering. This post can be found here. Now, I will attempt to expand what I have learnt from the answer ...
1
vote
0
answers
2k
views
Custom dictionary class for reading and writing json value to a file
Is my implementation good? The program works as planned, but I wonder if some parts of the code can be made cleaner or more efficient. The file output looks like this:
...