« first day (3604 days earlier)      last day (1346 days later) » 

1:00 AM
I was just working on a project in Visual Studio. When I clicked a menuStrip control to add an item, all of my other controls suddenly disappeared? I mean, they're still there. No exceptions or anything. But they're no longer added to the designer or the form when compiling the code. What's going on here?
Seems that for some reason all of the this.Controls.Add(control) lines have been removed the Designer code. What the hell..?
 
1:40 AM
looks like a bug of designer
WinForm designer have many ancient bugs
Once, the designer copied all controls... I didn't find until I pressed F12.
 
 
3 hours later…
5:19 AM
Buenos dias
 
5:57 AM
yo yo yo
 
squirrel -_-
we meet again
 
6:56 AM
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
Hands up @CupOfJava you're surrounded
@icecub VS is so bork nowaday it pains me.
Microsoft isn't putting enough ressources into it.
 
good morning
in murica teaching prisoners to programming considered risky...
really
 
7:13 AM
'murica is just fucked by now. The american dream worked when there was land and resources for everyone, but now it's just fucking over everyone not born rich.
 
prisoners considered harmful to learn programming because of cyber security of the prison... What's with the programmers locked up? They go to different jails?
 
Programmers dont get locked up bro
 
they have a pickupable badge, like in GTA?
 
Either they're white and get a stern talking to, or not then they get 6 warning shots in the back and die by tripping on the way to the station.
 
well. That makes sense. Programmers tend to pick those up in GTA
 
7:27 AM
orly?
why?
 
@Squirrelintraining cuz then they can haxx™ the prison
 
@Squirrelkiller oh
 
I'm reading the podcast
there are rentable tablets in prisons. They fear you might hack it.
side comment was that cyber security is some of the worst in prisons...
 
 
1 hour later…
8:43 AM
ahoy mateys o/
 
Ahoy Captain o7
 
8:57 AM
'ello roachboi
 
9:25 AM
yellow
 
9:42 AM
HOlycrud guys, have you seen this? youtube.com/watch?v=E65uQRfGKJs
3
 
@Squirrelintraining That's a lot of fun!
 
dang it, all becci videos should start with kfV
I am going to write a letter to youtube
 
So new, much Fridayness
 
10:06 AM
@Wietlol They don't? :o
@Hozuki The most fun I've heard in a long time infact.
Also roel why u no answer me yesterday?!
 
?
 
@Squirrelintraining it appears not
 
10:23 AM
23 hours ago, by Squirrel in training
@Hozuki Roel, tell me.
If we generate a new context for each call (.AddScoped(myRepo))
What is the use of using .Find()?
23 hours ago, by Squirrel in training
AFAIK .Find() just "caches" the entry, but if this context is disposed b4 it's used again why even bother using .Find()?
 
why use AddScoped?
also, what else would you use instead of .Find()
anyone familiar with oauth2?
 
10:39 AM
I am
 
I have a service, where the client is authenticated by oauth2, but I looked at the request headers and there isnt really anything interesting as far as I can see in there to identify which client it was
I have the bearer token, but I am not sure I can decrypt that
 
@Wietlol to keep the scope of the context small.
 
token is a token. Why would you decrypt that?
 
@Wietlol .FirstOrDefault and only select what actually want.
 
if you are interested in the party (user or entity) use the claims that is given with a valid token
 
10:43 AM
I want to identify which client was authenticated
 
anyway you will refresh those tokens
 
+ you'd usually don't need all the tracking mambo jambo when having a web api unless you wana update.
 
@Squirrelintraining but FirstOrDefault has a different api
 
@Wietlol hm?
 
The token must be associated with a clientId by the endpoint that issued the token. Are you using a framework? IdentityServer?
 
10:47 AM
^ yeah. That also. You will call the refresh token with clientId anyway
 
@hollystyles I just have a http request object
the authentication is done by another application
 
docs.microsoft.com/en-us/dotnet/api/… you could identify the user/entity by email claim
 
out of my control
email?
this is a service to service authentication
 
almost all auth app waits for a client id param
 
the client has a client id and a client secret
 
10:49 AM
@Squirrelintraining @Hozuki that there incase u didn'T see it
 
it asks a token from the authentication service and then calls my service with said token as the bearer auth
@Squirrelintraining Find() requires the primary key, FirstOrDefault() requires a filter expression
 
@Wietlol Which yields the same result.
 
@Wietlol identify which client was authed. Like you have the client id and a client secret.
how did you lost it?
 
Find() by PK can be used in different methods and yield the same object. FirstOrDefault will need to hit the DB, and then use the cached entity if it detects the PK of the read entity is in memory. Find is just faster in those cases.
 
@ntohl the client has, the server just knows the client is authenticated
 
10:53 AM
what do you want to identify? The user/entity who is using the service to service stuff, or the service1, service2, etc?
 
I am not sure what service1 and service2 mean
 
clientId1, clientId2, etc
I'm also lost about your architecture
 
ye, I want to know which client id is in the request
 
so there is a GoogleHelper service for example, which communicates between services. Provides some Tiles or whatever. This have a clientId 1234 for example. You call something with [Authorize], it will do it's magic, and send you to login form or let you in. Whatever. But the 1234 is a constant for that particular GoogleHelper service
 
But Find() would only be faster if you don't dispose the context, eight?
If you dispose the context between `Find()` calls, then one wouldn't benefit from the caching.
 
11:00 AM
applications:
	client-application
	aws-gateway
	aws-cognito
	server-application (aws-lambda)


client-application sends request to "/oauth2/token" to aws-gateway, passing clientId, clientSecret (header only) and oauth-scopes
aws-gateway forwards request to aws-cognito to authenticate the client
aws-cognito returns an oauth-access-token (forwarded by aws-gateway to the client-application)

client-application sends request to "/myservice/ping" to aws-gateway
aws-gateway forwards request to server-application (aws-lambda)
 
@Squirrelintraining Sure. But are you writing such well optimized code that Find is called only once and never more?
 
@ntohl I am not sure if actual users use a similar setup
 
@Hozuki Which is where DI and .AddScoped comes into play. If we have - let's say - services which are used to interact with the datbase. Each time we create a service it creates it's own context. Now we if use .AddScoped<IThatService, ThatService> then we'd have it once per request.
Leading to having very small context lifespans.
Am I making sense?
 
Oh. We tend to have contexts bound to the lifecycle of a HTTP request, not a context per request per service.
 
I feel like I've confused myself in hurtion.
 
11:03 AM
But I'm not too knowledgeable about AddScoped stuff to be fair.
Colleague set up the DI so..
 
AddScoped makes it be scoped for one request.
@Hozuki Even then you'd need to call .Find() for the same entity multiple times in different places which in my experience isn't very likely.
 
Still, why the Q?
Does it really matter?
 
A) For my autism it doesn
B) What do you mean by Q? Question?
 
yes
 
Well I was under the imprecion, that .Find() generates alllot of overhead, especially if you only want to fetch that resourse and never write to it.
 
11:08 AM
@Wietlol I still not fully understand it. 1 thing is that the clientId that's calling server-application is always aws-gateway's client Id. Than some "myservice" comes into the picture
yeah. Passing clientId, clientSecret FROM client is not regular.
 
aws-gateway doesnt have a client id
it is just a hosting mechanism
like iis
 
@wietlol somewhere is the authorization server (typically authentication and authorization are same server or endpoint) It should determine if your service url is an authorized scope for the token.
 
@hollystyles how would that make any difference to detemine which client is authenticated?
the scope is always the same
 
let myservice do it's implicit flow. Than myservice has it's own clientId clientSecret
 
this is basically how the client works:
var clientId = "qwertyuiooasdfghjkzb"
var clientSecret = "guweiarfhifunzoiqfzajwepofqweoqpfsjieofjjwl"

var accessToken = httpClient.post(
	url = "https://wietlol.auth.eu-west-1.amazoncognito.com/oauth2/token",
	authorization = auth.basic(clientId, clientSecret),
	form = new {
		client_id = clientId,
		grant_type = "client_credentials",
		scope = "https://wietlol.me/ping.read"
	}
)

var pong = httpClient.get(
	url = "https://wietlol.me/ping"
	authorization = auth.bearer(accessToken.body.access_token)
(in pseudocode)
that first call (httpClient.post) goes to aws cognito, which creates the access_token
after that, a request is done to my service, for now a dummy endpoint "/ping" which I use for testing purposes
 
11:18 AM
than the clientId and clientSecret is always the above one
 
yes
and how do I know the client id on the server?
 
copy pasta?
 
are you trolling?
 
If you attach the id to the token properties on the server, it's gonna be available by reading the token on the client.
 
no. I'm saying that it will not work if you have different clientId per call
 
11:20 AM
there is a server, hosted behind https://wietlol.me/ping which needs to know who made the call
 
Read the token?
 
you are basically making clients users IMHO
 
the token is just random gibberish as far as I understand it
@ntohl that is the idea
 
Isn't it a JWT?
 
If it's a JWT, it is not random gibberish.
 
11:21 AM
if you make them clients, use 1 clientID
 
You can attach data to it.
 
I can give ntohl a clientId and clientSecret and ntohl can use it,
and I can give Hozuki a different clientId and clientSecret and then Hozuki can also use the service
 
oauth 2 doesn't necessarily use JWT
 
Wiet, paste your token here: jwt.io
 
ah yes, that is it
 
11:23 AM
HAHHAHA
my new powerbook is in town already
did I tell ya guys about that thing?
 
it seems that the client_id is in the payload
 
There ya go.
 
so I just need to parse the bearer token as jwt token?
 
anyway I would expect ntohl to have a principal, and Hozuki have a principal
 
@Wietlol Yep
 
the right wing in the US has lost its mind, but when has it not?
 
@ntohl I dont have that
I just have a http request
 
use the magic
 
11:27 AM
@Hozuki it's ok :D
 
@Squirrelintraining youtube.com/… .
 
@Wietlol thats actually quite well produced ;:o
 
11:44 AM
ofc this shit had to origin from me xD
 
ok ohhhhh
 
wanna see something sexi?
 
Yes please
 
still looks good 19 years later
 
@Freerey 19 years young woul dbe a tad to young for me.
Also has anyone seen @Hans1984 lately?
 
12:00 PM
if you used a 19yo laptop in public when this powerbook came out, you'd get some funny looks
I'm not even sure laptops were a thing in 1982
 
woa it even has a handle
 
1981
https://en.wikipedia.org/wiki/Osborne_1
 
that's not a laptop; that's a smartwatch with giant bezels and a keyboard
 
12:17 PM
@Freerey soooo typical consumer society. Instead of value long-lasting, mock it.
 
@Squirrelintraining why? are you missing the occasional shiba?
!~shiba
 
@Wietlol yeah
and ze german support
 
ooh, ze flammenwerfer
 
I'm okay ;) Just not in the mood lately @Squirrelintraining
 
12:28 PM
N1ce to hear :)
Also any1 want to help me finda pump gun and hunt ex colleagues?
 
:D
hitman 1 was just released for free on epic launcher
its a lot of fun
i played every entry 1-5 when I was younger
 
sure I could go with filling some college kids with lead
I still don't know how I made it through college without yelling at anyone
 
hitman is the right game for my mood in these times...
I hiked for 16 kilometers yesterday
around 4 hours
 
why?
 
Yup me too right now. Just got a bug that would only happen on my machine.

It's in a web app. Delete cache, reboot, still the bug. Only on my machine. Any browser.
 
12:35 PM
Because it is healthy and it frees my mind
 
wish I could do it for 4 hours; my bsl would drop like a rock if I did that
 
today everything aches
but it was worth it
 
Take cereal bars?
 
that's all I can do lol
 
12:59 PM
@Hans1984 uhh
 
I feel like revenge trolling today
 
So just in case there's anyone with Hashi/Nomad/Consul experience here now
0
Q: Nomad.json constraint with LTarget/RTarget/Operand or Attribute/value?

SquirrelkillerSo my deployments run using nomad.json with LTarget/RTarget like "Constraints": [ { "LTarget": "${attr.kernel.name}", "Operand": "==", "RTarget": "linux" } ] But the docs say to go HCL like { attribute = "${attr.kernel.name}" value = "linux" } Where is the difference? Wh...

 
Im reading Henry Miller right now
its my 3rd book of him already
I like that guy
@Squirrelintraining did you play it already ?
 
>Hitman 1

>already
 
anyone remember the Hitman movie from 5 years ago?
 
1:12 PM
@Squirrelkiller not the original hitman 1
its also called hitman 1 but its is from 2016
its a new game
Hitman is a 2016 stealth video game that was developed by IO Interactive and was released episodically for Microsoft Windows, PlayStation 4 and Xbox One from March to October 2016. The game, which has six episodes, is the sixth mainline entry in the Hitman franchise; its story takes place six years after the events of Hitman: Absolution (2012) and follows professional assassin Agent 47 as he goes on a worldwide adventure and solves a mysterious series of seemingly unconnected assassinations. Hitman features a number of large, open-ended sandboxes that Agent 47 can freely explore. The game presents...
 
Oh nice
 
its very nice
a lot liek the old hitmans but new graphics
and 1000 ways to play every mission
 
@Freerey I always confuse it with Jason Statham, but yes I remember lol.
 
you unlock more stuff th emore you play one mission
which lets you play it in different ways
its a nice concept
it was released as several chapters
but the epic version is the complete version with all chapters
 
may someone take a quick look at this simple code? I'm on it for about an hour and absolutely have no idea. :(
 
1:25 PM
Looks like it gets reset to false immediately
At least put an await Task.Delay(3000); in there
 
yes it seems like that. do you mean before the api call?
 
does StateHasChanged return a Task?
 
@qd0r I mean instead of the api call
Right now there is only a comment, therefore the code you posted will instantly return to connecting=false.
 
ah i see. :) the code is actually a bit longer. i removed all irrelevant stuff to extract the important lines of codes
 
I'd say in this case, at least a representative Task.Delay is inded relevant ;)
@Wietlol It returns void
In fact in this case, you shouldn't even need to call StateHasChagned()
 
1:35 PM
wow i got it. even i don't really understand the reason:

the api call is not "async" so in the whole method I don't have any "await" keyword
I just saw the compiler warning: warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
 
shouldnt be a big difference though
assuming it runs on a parallel thread
 
Except when the api call is actually an async method. Then you'd start the api call and instantly return to connecting=false.
 
if your long operation also is not async, then it might explain the behavior though
 
when i put now your recommended Task delay with 1millisecond before the api call the button is disabled over the whole execution time and resets as expected the button after it's loaded
 
The Task.Delay shouldn't be in your actual code, it was just meant to rerpesent the actual api call in the paste
 
1:38 PM
@qd0r is the api call async?
 
> the api call is not "async"
Always make network calls async
 
ah
 
Android will actually kill your app for not doing that
dotnet will just warn you
 
I thought he just got that message when he removed the actual api call
the difference between having the 1ms delay is that it does a context switch
it allows the invoker of this method to do other things such as handling the StateHasChanged() command
 
no it's a simple webclient.DownloadString()
 
1:41 PM
I assume it is expecting you to use async
and therefor only limits to one thread, which is locked while you are doing the api call
 
i thought even an async method is called, the code inside the method itself is running synchronously
thank you a lot for your help :) @Wietlol @Squirrelkiller
 
In this case you'll have to be more precise what you mean with "synchronously".
Async != parallel
Async means the thread goes "now this network call is fired and I have to wait for a response, I can go ahead and do some other things like updating the UI until the network call returns"
Or rather, IO. Filesystem access counts too, as it is way slower than a CPU.
 
i'm trying to find the right words, one moment. it's complicated to translate this in english for me ;)
I expected this:
If a method is async or not makes only a difference for the *caller*!
Because the caller doesn't have to wait for a result and can handle callbacks when they come.

But I would expect that the behaviour within an async method is exactly the same as in a non-async method (it's just outsourced to another Task).
The only exception would be if the method calls another async method from there without using .Result.
Otherwise async and non-async methods are executing the code same.

Is that correct?
 
1:58 PM
pretty much
although I hope you meant await and not .Result
if you are always doing immediate awaits (as in var x = await DoStuffAsync(); )
then you basically have synchronous code
the difference is how the caller handles your Task
if the caller also does an immediate await, then it just unfolds further
the only exception is that async/await code is sometimes doing context switches when an await occurs
in your case, your caller is probably not just doing an await
instead, it will go back to doing user interface processes before awaiting
 
wow now i get it! :))
i assume it's something blazor specific. when i change the method to a void, the IU button change (visible/invisible) doesn't happen
 
and if it is a Task?
 
It's something that applies to every frontend
 
only if the frontend framework is using that approach
 
An immediate await can still let the thread context-switch, like the await Task.Delay(1); made the button change.
 
2:09 PM
Ryan Donovan on August 28, 2020
August 2020 Welcome to ISSUE #36 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. In the US, it’s the dog days of summer, which we imagine dogs are excited about. Read on for personal development nerds, creating secure voting systems…
 
Anyway, time for some weekend. bye
 
@Squirrelkiller have a good wekend!
 
no
I am playing the try not to go an a rampage game.
 
thats hard
 
2:12 PM
@Feeds SHHH!
 
as opposed to the game where a gorilla destroys a city?
 
cocks gun
 
and thank you guys for this enlightenment. i really have to learn more about this async/Tasks logic the next days ;)
 
2:44 PM
seing u
weekend
 
lord shiba calm our nerves!
!~shiba
 
cya @Squirrelintraining
 
3:33 PM
0
Q: ASCX control not showing up on Site.Master click event

FreereyI have a Bootstrap modal which is meant to be used as a login panel, meaning there are two scenarios where it would need to show up: When the user, not logged in, has entered a page that requires them to log in When the user clicks the button to log in While the first part of my program runs co...

got another one 🙃
 
 
3 hours later…
6:09 PM
I was wondering if some one can help me here. please follow this question. stackoverflow.com/questions/8058832/…
I have a same problem which I calling a method System.Object System.Activator.GetObject
I get error method not found, it was work in dot net and the name of project was general, while here I am using dotnet core and this general is part of that ( as assembly reference )
I used all the tips on the link which I have already mentioned to it.
but I can't get what is the reason I get this error.
with many thanks.
 

« first day (3604 days earlier)      last day (1346 days later) »