DaVinki
DaVinki
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
Yeah, you could do something like a manual reset event where an incoming unit would notify threads that there's something new and available
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
SortedSet isn't array backed so it'll only be as large as it needs to be, no creating more queues
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
when a consumer is done with the queue, it takes in another unit group of another ID and repeats
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
You would just need something to forward units to queues actively working on unit group N if it's "late" or something
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
No description
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
If so then you could use a sorted set for pending units and then when it's their time, pop them out of the sorted set and push them into a channel which is now dedicated to that specific unit
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
When there are new units of work, is it a first come first serve basis on which unit gets to be processed first by first appearance
19 replies
CC#
Created by Nacho Man Randy Cabbage on 2/22/2024 in #help
Best container for ~1 million objects
Would a dictionary + a linked list work? Wouldn’t be able to arbitrarily jump to elements by index but yes by key and the list can be sorted
26 replies
CC#
Created by Camster on 1/25/2024 in #help
Generics without Casting
Use T for the dictionary instead of object
20 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
That generic method is another way of doing it but you’ll be calling it for every type still
22 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
Right it just wouldn’t be a load of if statements. It’d be structured and could be done for any single instance if needed, then you would just need a foreach loop and call the overridden method
22 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
Just fyi you’ll write one method for each if statement involving the block name if you do it this way
22 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
22 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
If it ain’t mathin, it’s manually mappin
22 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
MSDN will have a lot of documentation over inheritance. Also for the switch cases, values have to be mapped somewhere somehow. In code, in some variable file, wherever
22 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
Yeah, abstract and virtual methods are used to do things without needing to know the implementation details. You wouldn’t need to know how it adds a missing component, just that it does and works for every type inheriting the base type declaring the method
22 replies
CC#
Created by titan 1-1 on 1/8/2024 in #help
There are a lot of IF statements here
To aggregate the data you would need to know the definition of blocks. If each block is its own type such as frictionblocks being a list of FrictionBlock, you could instead write an abstract or virtual method in the base, override it with the null component check specific to the derived and then replace all of the if statements with a single for loop that just calls the method on base type
22 replies
CC#
Created by onpointz! on 12/22/2023 in #help
Alignment
Put them in the same grid and align the grid wherever you want, or give them the same margins
2 replies
CC#
Created by Draaxus on 12/14/2023 in #help
Am I understanding .NET Framework correctly?
A little irrelevant from the question but on topic with your report, you could talk about the System.Numerics namespace and its types that abstract hardware acceleration to make it super easy to write accelerated code once and use anywhere. If a language doesn't provide abstract hardware acceleration, you'll find yourself rewriting code multiple times to try and target the highest available SIMD instructions available in an ISA. Other languages are following suit with this like Java's Vector API and Rust's std::simd module, although .NET looks like it's had the most support for this. It's not experimental or in an incubator and AVX-512 is officially supported as of .NET 8
8 replies
CC#
Created by SWEETPONY on 12/12/2023 in #help
✅ Is it possible to lock method by id?
It might be an XY problem
31 replies