« first day (3382 days earlier)      last day (1552 days later) » 

12:52 AM
A puzzle for you guyz.
0
Q: An error when sending PATCH with Postman to Asp.net Core webapi

Money Oriented ProgrammerI have a model, public class Order { public Guid Id { get; set; } public IEnumerable<string> ItemIds { get; set; } public string Currency { get; set; } } and a repository, public interface IOrderRepository { IEnumerable<Order> Get(); Order Get(Guid id); void Add(Order ...

100 years later...
 
 
5 hours later…
mr5
5:25 AM
^ Business Insider website
"Ads aren't important to us" - Huawei
Hmm let's see
 
 
4 hours later…
9:16 AM
@PawelFlajszer yes, but I hear SignalR is much simpler to use.
 
I've never used either of them
Also extensive refactoring is an excellent idea
 
@Squirrelkiller you know when someone authorizes access to your app... you then need to get their access token/refresh token. When you're receiving a webhook - do you always use your apps webhook, or the subscribed users one?
it was obvious to me till now, that they authorize your app, so you use your apps token of all times, but having some auth trouble with this approach
and after some testing (storing all tokens and then iterating over those to see what works) it seems like it's the users token that needs to be used to make calls
seems weird
I've never used signalr to be fair
 
9:46 AM
So I'm awake now
Turns out I confused webhooks with websockets
I would have had the same thought as you - user authorized the app so use the token of the app
@CaptainObvious Extensive refactoring in this case is changing like 70% of teh code
 
10:01 AM
Yeah I did that a year and a half ago with one of mine
I think it turned out a ~80% performance improvement
 
how can I give a special name to an extern method?
for example, public static extern void totally_bamboozled();
I dont want to write totally_bamboozledbut instead TotallyBamboozled
but changing the name of the method would make the compiler unable to find the external function that it should represent
I could make a function around it, making the extern private and the wrapper public, with any name I desire, but I am not going to write so many functions
 
No idea. IMO a wrapper class would be the best solution here.
@CaptainObvious This one isn't even finished yet though. No way of measuring performance, and also the few features already working seem to work quite fast.
 
10:17 AM
I just measured using dottrace
 
10:41 AM
anyone has experience in Lua?
I am trying to merge a source directory into one lua file
 
yo yo yo
 
oi
 
boi
 
11:00 AM
Good morning Cup o/
I don't know where you live so...did you also sleep or are you still awake?
 
11:12 AM
@Squirrelkiller sleep is for web developers
it's like around 5:30 a.m. where I am
 
11:33 AM
The only experience i have of Lua is how people don't know it from playing gmod
 
 
2 hours later…
1:59 PM
@Squirrelkiller yet here i am, having to store oauth creds for each subscriber :( done anyway
 
 
1 hour later…
3:17 PM
Holy shit why is getting DI to work on asp mvc 5 such a pain in the arse
 
0
Q: Garbage collector not getting called in .NET Core API?

SamuraiJackI used postman to call an API Method about 100 times consecutively. The memory graph went from 100mb to 400mb after running it twice. And there was not a single yellow mark throughout: Then I added these two lines in my controller: GC.Collect(2, GCCollectionMode.Forced, true); GC.WaitForPendi...

 
Nope. 10 minutes old.
But pro tip. Calling GC.Collect is bad practice. Instead of having to constantly collect the garbage, why not just generate less in the first place
 
@CaptainObvious I would love that. But, I am not able to figure out what is it that I am doing wrong.
 
Try something like DotMemory, using that you can find out what is taking so much memory up in the heap, and you can probably work it out from there
 
@CaptainObvious just installed it .. lets see
 
3:49 PM
holy shit
It was just Owin
All the guides were like "Oh yeah just put this code into your startup.cs" and I've been all "I DON'T HVAE A STARTI[P.CS ASDASFJKAJHSDHJ
And then some guy mentioned in some random comment I can't even find now that owin is what makes the startup.cs do something
Fucking microsoft whyyyyyyyyyyyyyyyyy
If it's unmanaged memory you may be in for a bad time
 
4:06 PM
Why don't you have a startup.cs?
 
Because that's not a feature by default
 
mr5
o/
 
Apparently it's part of the owin library which is involved if you use any of the nuilt in auth providers
 
mr5
4:25 PM
adatum.com is microsoft.com in disguise
same for adventure-works.com
 
4:36 PM
yo yo yo
@SamuraiJack holy sh** you got a Microsoft developer commenting on your post
that's real customer support
 
4:56 PM
I had a microsoft developer actually work with me to fix an issue with my project which turned out to be an odd issue with VS itself. It was fixed within a week or so
Clinging onto those emails like gold dust
 
5:09 PM
Why var x = obj.Foo; doesn't throw null reference exception when obj is null? it's Xamarin code and it's written in a ContentView derived class, *not surrounded by try block
 
what is foo defined as?
nevermind
wait are you using more then one catch()?
 
6:07 PM
no try catch blocks
 
oh idk then. I heard something like that might happen if the catch is out of order
but if there isn't any then I have no idea
 
watup folks, can anyone link me to a proper way to return images in Blazor?
I kinda managed to get it to work in asp net in a method that looks kinda like this stackoverflow.com/a/3605510/1306322
but the "File" name is not getting picked up in a Blazor app like it does in an asp webapp
I've looked through all the [blazor] questions having to do with showing images and it's not there
one important thing: I want to be able to serve images from anywhere in the file system, not just the web folder for the site
I also managed to configure this for the asp net app, but not for blazor app yet
basically if you know a link to a guide about serving images in Blazor, that'd be already great, I might be able to get further from there
 
6:39 PM
ping me if anything comes to mind
 
mr5
@mshwf could happen under non UI thread
or inside a Task where you didn't access the result
 
7:19 PM
@mr5 Is any code not running under UI thread swallowed?
 
 
2 hours later…
9:28 PM
@user1306322 The answer you linked seems like the right way to go - have blazor load via a method form the server and have the server load the image manually.
@mshwf Sometimes exceptions that happen on a background thread are swallowed
 

« first day (3382 days earlier)      last day (1552 days later) »