Bread
Explore posts from serversPossible to 'intercept' a successful sign in attempt with .net core identity?
I was curious if it was possible to add some middleware that would detect if someone has signed in successfully with Identity, I'd like to raise my own events and handle them as I need
7 replies
Get longest consecutive date 'streak' [Answered]
I'm trying to figure out a nice way of getting a date-streak from a list of objects which will have activities on them. The premise to the problem is, each user records their 'excercise' which can be multiples per day. I don't care about anything other than some acceptence criteria (namely, duration of the exercise) but I can group these effectively into some structure I assume of:
This would indicate if the user has completed an activity on that date.
Where I'm struggling is to then calculate the streak of dates (the largest streak) in that full list, ie:
Here the users top 'streak' is going to be 2, as completed on the 3rd and 4th
18 replies