dan in a can
dan in a can
CC#
Created by Core on 12/1/2023 in #help
Database Design
You can use a default value for the column https://www.postgresql.org/docs/current/ddl-default.html
3 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
looks good, glad you got it working
41 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
you're incrementing your index but never calling the method currentHouseIndex() , also in that method you're setting a local variable to 0 (different from your class-level currentHouseIndex) so the condition will always be false in that
41 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
close, I think your logic for the index is a little off though
41 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
try it without a loop and see what happens
41 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
start with int currentHouseIndex = 0, then you can add them to hogwarts.Houses[currentHouseIndex] and increment currentHouseIndex on each click, putting it back to 0 when it's reached 4
41 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
you will need to keep track of which house you added to last with an index and then whenever the button is clicked, increment the index and add them to the next house
41 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
ok, I misunderstood what you wanted then - yeah a loop is not what you want
41 replies
CC#
Created by olleeee on 11/30/2023 in #help
✅ Lists is the same index all the time.
break will exit a foreach loop early, so every time your loops run, they just do the first iteration and then stop. It should work as you expect if you take the breaks out https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/jump-statements#the-break-statement
41 replies
CC#
Created by SWEETPONY on 11/20/2023 in #help
How to optimize this?
since all the side variables are class level anyway, why not make sides class level?
13 replies
CC#
Created by Decabytes on 11/19/2023 in #help
CatAPI Json deserialization issue.
glad it works!
10 replies
CC#
Created by Decabytes on 11/19/2023 in #help
CatAPI Json deserialization issue.
10 replies
CC#
Created by Spekulant on 10/16/2023 in #help
❔ ✅ whitespaces are doing me dirty
you can try Environment.Newline instead of \n
13 replies
CC#
Created by Spaxter on 10/14/2023 in #help
✅ Unit Testing HttpClient
are you sure the verb + url are correct?
10 replies
CC#
Created by Spaxter on 10/14/2023 in #help
✅ Unit Testing HttpClient
I haven't used that library before, always just used the out of the box Setup
10 replies
CC#
Created by Spaxter on 10/14/2023 in #help
✅ Unit Testing HttpClient
or rather, have something wrong
10 replies
CC#
Created by Spaxter on 10/14/2023 in #help
✅ Unit Testing HttpClient
so you're missing something in your request matching
10 replies
CC#
Created by Spaxter on 10/14/2023 in #help
✅ Unit Testing HttpClient
I know you probably don't want it that way ultimately, just trying to narrow it down
10 replies
CC#
Created by Spaxter on 10/14/2023 in #help
✅ Unit Testing HttpClient
does it work if you change your SetupRequest to SetupAnyRequest?
10 replies