PIE
✅ File.WriteAllBytesAsync fails to download to bin folder with no error
This is the code I have currently
I'm assuming it's becuase the bin folder where the files are being downloaded to is being used by the application
anyway to bypass this besides changing download locations?
edit: seems to fail for all folders not just bin
16 replies
✅ Strange parsing error with docker instance
So I have a program that scrapes prices and parses them into longs with these lines of code
however I got this error
Is this because of unicode differences in linux that doesn't work well with docker images made in windows? The above code seems to work fine on my windows machine.
10 replies
Optimization problem for matching two lists of objects with same property
So I currently am running a database of ef core that needs to update userdata based on api calls and am faced with a speed problem
So I have two lists:
1. List<Trader> (tracked by ef core)
2. List<User>
that both have a property with the same value (trader id/user id)
They both have a property "online" and I am attempting to set the list of traders "online" property to the same of the user
The two lists are of random order but they have the same size and unique ids
currently I am doing something like this (trader changes are auto tracked even in foreach loop):
would there be a linq or faster way to do the above?
10 replies
✅ List<KeyValuePair<Trader, long>> requires primary key to be defined
This is my main model i'm trying to pass
with Trader as
with a basic database
for some reason, passing a Item class through this this method
throws the error in the title
is there a way to set List<KeyValuePair<Trader, long>> to be keyless?
15 replies
Can't figure out how to apply attributes to values in json property dictionary (System.Text.Json)
This is my model that I'm working with
The converter I'm using can convert integers to date time like so:
is there a way to change the converter to support dictionarys/lists? or apply the attribute to all values in a dictionarys/list?
1 replies
Attempting to get value from different JSON files with variable key
Hello o/ I am attempting to deserilize and obtain the value from a variety of JSON files that contain similar values, but different keys with System.Text.Json.
This was the current classes that I used in order to extract the values for one JSON file:
I know it's not possible to directly set attributes with a variable, but is there another way of dynamically searching for a value besides creating a class for every case?
Thanks!
8 replies
Attempting to get the file name from a REST api download link
I have a method that that recive a zip file from a REST api download link. However, the method that I use only manages to get the id of the file that I originally sent out.
This was my method to extract the filename from the api:
and my method to download the zipped file form the api
So for example if I called the method with
GetFilenameFromUrl(1627149);
it would return the id (1627149) instead if the default filename (ex. the filename received when putting the link https://api.chimu.moe/v1/download/1627149 in the browser). Is there an alternative way to get the zipped file similar to a browser?3 replies