« first day (4280 days earlier)      last day (651 days later) » 

 
2 hours later…
mr5
6:26 AM
hey folks
commonly, SSO for web is implemented this way:
- hosted in a different domain
- provides redirect URL for client
- provides token for client which can be used for both/either authentication and authorization
what do you call to this certain protocol?
 
7:03 AM
sounds like OAuth2
 
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
mr5
@Wietlol isn't it like a specific implementation?
 
not really, I guess
 
 
1 hour later…
mr5
8:17 AM
Oh fakk
On another story, I found out that Android's WebView doesn't trigger onDownload(...) callback if you directly invoke loadUrl(:url) and the URL returns a non-renderable content. onDownloas(...) will only be triggered if user interact manually to links in WebView. Since I need loadUrl(:url) to trigger onDownload(...), I first direct the WebView to a local html file passing the target URL in the query string and have that html file to redirect to the URL fromq query string asap.
I'm wondering if I should post this workaround in SO
 
9:22 AM
[Captain Obvious] @mr5 if you already have the url outside of the webview, why are you trying to download it through the webview?
[Captain Obvious] Because that'll just send it back into your code anyway
 
 
2 hours later…
mr5
11:03 AM
I still need to figure out if it's a downloadable content or not
So the requirement is either render it or download
 
11:53 AM
[Captain Obvious] ahh okay
 
 
1 hour later…
1:02 PM
Is there a more idiomatic way of splitting/partitioning a dictionary into two dictionaries? Here is what I use so far and I'd like to clean it up, if possible:
Dictionary<bool, Dictionary<string,string>> separated = combinedDictionary
	.GroupBy(keyValuePair => /* ... condition that returns true or false ... * /)
	.ToDictionary(grouping => grouping.Key, grouping => grouping.ToDictionary(x => x.Key, x => x.Value));

if (!separated.TryGetValue(true, out var firstDict))
{
	firstDict = new Dictionary<string, string>();
}

if (!separated.TryGetValue(true, out var secondDict))
{
	secondDict = new Dictionary<string, string>();
}
 
1:14 PM
you mean like this?
(not that any of those 3 functions exist in the base library though)
but they are easy to make
 
1:49 PM
Yes, something like this. I was hoping there was a more standard approach.
 
 
1 hour later…
mr5
3:08 PM
@Wietlol how do you do flags |= a | b | c in Kotlin?
 
use EnumSet over bit masking
 
mr5
flags |= a or b or c almost works
 
(effective Java item 36)
 
mr5
I don't think I can do that
the flags are from Android SDK
 
sure you can, I believe in you!
 
mr5
3:11 PM
.clone() doesn't work so I guess they are not converted into EnumSet
flags = flags or a or b or c
works though but it's fugly
 
its bitmasking, it is fugly regardless
 
mr5
eh so you mean there is no other syntax than this?
 
not afaik
 
mr5
ew
kotlin suks
 
not really, it just doesnt want you to use code that sucks
why are your flags not enums?
 
3:20 PM
posted on July 05, 2022 by Sam Spencer

CoreWCF 1.1 has been released, and now we have a project templates package The post CoreWCF 1.1.0 and project templates appeared first on .NET Blog.

 
mr5
it's from Android SDK but in Kotlin
 
then android sdk sucks
which is no surprise
 

« first day (4280 days earlier)      last day (651 days later) »