PIE
PIE
CC#
Created by PIE on 10/7/2024 in #help
✅ File.WriteAllBytesAsync fails to download to bin folder with no error
No description
16 replies
CC#
Created by PIE on 6/28/2024 in #help
✅ Strange parsing error with docker instance
ok thanks o/ worked
10 replies
CC#
Created by PIE on 6/28/2024 in #help
✅ Strange parsing error with docker instance
ah yes tested with invariant Culture and returns the same error
10 replies
CC#
Created by PIE on 6/28/2024 in #help
✅ Strange parsing error with docker instance
hm would something like
long itemCost = long.Parse(itemCostElement.TextContent, NumberStyles.AllowThousands | NumberStyles.AllowCurrencySymbol, CultureInfo.InvariantCulture);
long itemCost = long.Parse(itemCostElement.TextContent, NumberStyles.AllowThousands | NumberStyles.AllowCurrencySymbol, CultureInfo.InvariantCulture);
work then?
10 replies
CC#
Created by PIE on 6/21/2024 in #help
Optimization problem for matching two lists of objects with same property
alr thanks will try it out o/
10 replies
CC#
Created by PIE on 6/21/2024 in #help
Optimization problem for matching two lists of objects with same property
the user list I get is something like this
IEnumerable<Task<User>> users = traders
.Select(trader => ApiWrapper.Get<User>(trader.TraderId));
IEnumerable<Task<User>> users = traders
.Select(trader => ApiWrapper.Get<User>(trader.TraderId));
idk if this helps
10 replies
CC#
Created by PIE on 6/21/2024 in #help
Optimization problem for matching two lists of objects with same property
ah yes the user list I get is from an api wrapper call but I only need one part of the data (the online property) only the trader list is part of the db
10 replies
CC#
Created by PIE on 6/9/2024 in #help
✅ List<KeyValuePair<Trader, long>> requires primary key to be defined
ok thank you o/
15 replies
CC#
Created by PIE on 6/9/2024 in #help
✅ List<KeyValuePair<Trader, long>> requires primary key to be defined
ah... would there be an alternative way to store something like this than?
{
"Id": 123,
"Name": "123",
"TraderPrices": [
{
"Key": {
"Id": 123,
"Name": "123",
"IsTeTrader": false,
"IsAwTrader": false
},
"Value": 123
}
]
}
{
"Id": 123,
"Name": "123",
"TraderPrices": [
{
"Key": {
"Id": 123,
"Name": "123",
"IsTeTrader": false,
"IsAwTrader": false
},
"Value": 123
}
]
}
with proper order? or would I need to use something else?
15 replies
CC#
Created by PIE on 6/9/2024 in #help
✅ List<KeyValuePair<Trader, long>> requires primary key to be defined
EntityFrameworkCore.InMemory
15 replies
CC#
Created by PIE on 4/1/2024 in #help
Attempting to get value from different JSON files with variable key
thanks I will look into it o/
8 replies
CC#
Created by PIE on 4/1/2024 in #help
Attempting to get value from different JSON files with variable key
I'm not sure what you mean by normal models, is it the same as the classes that I used above? Also there is an identifier from the JSON file that all have the same key that denotes the type of the JSON (all the JSON files with a "tumber" identifier will have the same keys). I could use it with a switch statement in order to parse preset keys in order to get the correct values as you said but I'm wondering if there is a better way...
8 replies
CC#
Created by PIE on 11/23/2023 in #help
Attempting to get the file name from a REST api download link
Ah yeah I figured it out it turns out you can't access the headers with httpClient.GetStreamAsync so I had to use httpClient.GetAsync to get an HttpResponseMessage which I can get the headers :)
3 replies