728 questions
0 votes
0 answers
12 views
Error in heemod::define_strategy() with a 3-state Markov model using matrix transition
I'm trying to build a 3-state Markov model using the heemod package in R to evaluate cost and effectiveness over time. I defined: 3 health states: Healthy, State2, and Death A 3x3 transition ...
0 votes
0 answers
62 views
Does new S3 bucket quota change AWS data partitioning best practice for multi-tenant systems
I am trying to find updated information regarding aws best practices when it comes to multi-tenant data partitioning in S3. From what I know and what I studied for when I did my AWS Solutions ...
1 vote
0 answers
39 views
Can I annotate a strategy-pattern class-factory using JSDoc?
Essentially I have the following inheritance chain: Chainable -> Strategy -> Actions Actions are used at the call-site returning a chainable API: await actionMaker() .action1() .action2() ...
0 votes
4 answers
248 views
Strategy pattern to filter objects, how to compose them?
Say I have come class that looks like this class Product { double Price; String name; String category; } I have a client facing API that allows users to filter my list of objects based on ...
0 votes
0 answers
75 views
Code Snippet : Bridge Pattern or Strategy Pattern? [duplicate]
The following code is an example of Strategy Design Pattern or Bridge Design Pattern. If Strategy , why not Bridge and vice-versa. I am quite confused after reading different articles and comments. ...
0 votes
0 answers
84 views
esp32 rssi based tracking - Consultation
I am trying to build an asset tracking solution with esp32. I am looking out here for an optimal strategy, than an answer to a specific question. I've set 3 esp's as anchors, and I have another 5 esp'...
0 votes
1 answer
202 views
Design approach for safely picking between multiple payment methods
We need to dynamically support multiple payment methods (credit, paypal, google pay, etc...). We can change the gateway we use to implement a certain payment method. For example: PayPal payment method ...
0 votes
1 answer
175 views
Type mismatch in Kotlin when using strategy pattern with generics
I need to implement a backend system which accepts multiple payment methods, and then process them according to their type. I used Strategy Pattern, but I can't seem to make it work when I initialize ...
0 votes
0 answers
46 views
How can I implement an object of strategies with same API but that only the provided argument options differ for each strategy?
Right now I am struggling with pleasing TypeScript compiler when using generics. I am trying to implement a strategy pattern selector using a JavaScript object. Every strategy shares the same API with ...
0 votes
1 answer
337 views
Pine script version change and stop reprint and repaint issue
Here is a very small pine script that follows trend but I'm facing issue with this repaint and reprint issue. //@version=2 strategy("PrabhuTrendStrategy", overlay=true) tim=input('160') ...
0 votes
1 answer
176 views
How to use mutable references as arguments for generic functions in rust [duplicate]
I am attempting to practice using the stratergy pattern and thought to sort a vector using a function selected at runtime, ideally being able to change the data in place using a mutable reference. I ...
-2 votes
1 answer
358 views
Why my strategy doss not execute in tradingview? it creates no trade? caution! this strategy did not generate any orders throughout the testing range
`//@version=5 strategy("4:4 S1", overlay=true) // Indicator Inputs fairValueGap = input(0.5, "Lux Algo Fair Value Gap") cciLevel = input(100, "CCI Level") cci = ta.cci(...
0 votes
0 answers
309 views
How do you implement the strategy pattern using Flutter and Riverpod?
In my Flutter app, there is a page that loads the data for a given topic. Included in this topic is an identifier for the algorithm to use when the user interacts with the widget. Due to the nature of ...
2 votes
1 answer
95 views
Is this Command Pattern or Strategy Pattern?
This is an image from an old exam I'm working through. Through the UML-diagram, as seen above, how can I determine if this is Command Pattern or Strategy Pattern? The answer to the question is that is ...
1 vote
6 answers
952 views
How to conditionally select concrete implementation for strategy pattern using Dependency Injection C#
I am trying to understand the Strategy Pattern in order to utilise it for a problem I have. The current code looks as such where I have an amount that I want to process based on a payment type. public ...