All Questions
Tagged with container or collections
13 questions with no upvoted or accepted answers
4
votes
0
answers
100
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
146
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
127
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
136
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
241
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
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
31
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
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:
...