« first day (3894 days earlier)      last day (1037 days later) » 

12:16 AM
aderw
29
, 29 reputation
●22 bronze badges
Home
PUBLIC
Questions
Tags
Users
FIND A JOB
Jobs
Companies
TEAMS
What’s this?
Create free Team
Design pattern when you have multiple tasks with and without dependency on each other
2
Design pattern when you have multiple tasks with and without dependency on each other
Can someone help me with this
1
Q: Design pattern when you have multiple tasks with and without dependency on each other

aderwfor eg : say you are loading an app Where you have tasks like login task - which has no dependency then say fetchUserData - which depends on login task then say fetchUserHistory etc - which say depends on above 2 tasks and say there are 10 more such tasks with cross dependencies i know that I can...

 
 
1 hour later…
mr5
1:18 AM
@aderw did you just copy all text from SO, paste it here, and ask what tf did you copied?
 
 
1 hour later…
2:22 AM
Task.Run thats all, it will do the invocation parallelly, why need a design pattern
It doesnt need a designing
 
2:34 AM
Turkey.Elapsed += (_, __) => {
    lock (Singleton) {
        if (Sheeping) return;
        Sheeping = true;
    }
    try {
        Sheep();
    }
    catch (Exception cow) { }
    finally {
        lock (Singleton) {
            if (Sheeping)
                Sheeping = false;
        }
    }
};
Turkey.Start();
 
2:47 AM
how is it that indicatorview is not updating when i add photos to my carouselview
in xamarin.forms
 
3:00 AM
@c0dem0nkey Updating entire array carouselview.ItemSource = array
 
yes , my carouselview is updating , carouselview.itemsource = someObservable
 
array.ToArray() explicitely recreate an array?
ok.
 
<CarouselView ItemsSource="{Binding LstSelectedImageSource}"

EmptyView="No items to display."
IndicatorView="indicatorView">



<CarouselView.ItemTemplate>
<DataTemplate>
<StackLayout>


<Image Source="{Binding .}"
Margin="10,10,10,10"
HeightRequest="320"
WidthRequest="640"
/>
</StackLayout>

</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
<IndicatorView x:Name="indicatorView"
IndicatorColor="LightGray"
SelectedIndicatorColor="DarkGray"
HorizontalOptions="Center"
MaximumVisible="5"/>
carousel itemsource can update okay. but not for the indicators
docs says itemsource is set when indicator is set in carousel. appreciate some help if any! thankies
 
knew youd be asking that
xamarin.forms 5.0, xamarin essentials 1.6.1
 
"closed" lol
 
yeah someone said still bug, idk, I cant help you anymore, not so familiar ion xamarin.form
 
sure but thanks, i really appreciated that
^_~
thats a wink supposedly
 
worked on xamarin.android, I can say... xamarin flatform wasnt so much reliable, it has bugs and slow update
 
yeah i remember you and mr5
MAUI is coming
 
3:11 AM
but when I used to it, it was ok
 
hoping to have something more stable.
 
mr5
3:24 AM
@c0dem0nkey have you tried IndicatorView="{x:Reference indicatorView}"?
 
trying
it ish not working
it actually never appears when page is loaded with 0 items in source.
if i hot reload it , it appears however.
so i think the issue really is that it doesnt update as it should like carousel
 
mr5
3:55 AM
<CarouselView>
    <CarouselView.IndicatorView>
        <IndicatorView />
    </CarouselView.IndicatorView>
</CarouselView>
or this
 
4:26 AM
Hey, does using the break statement only break out of the current loop or does it end the entire nested loop?
 
4:53 AM
Good morning
break will break only the current loop
Btw VS has the "C# Interactive" window, which is basically a REPL
Which lets you do this
 
avoid nested loop.
 
only few circumstances for optimized performance can only use 'advanced' nested loop with jump. most of the time it can be avoided, includes multimultimultidimensional array
 
mr5
@Squirrelkiller that + the Immediate window would a more useful feature
 
yeah the immediate window is great. Let's me quickly serialize some object into a json file during debug :D
 
5:54 AM
will do @mr5
 
 
1 hour later…
6:58 AM
posted on June 08, 2021 by Scott Hanselman

There's something happening in the E Ink space, somewhat quietly, but consistently. It's going to be interesting to see if it's a fad or if E Ink tablets are here to stay. I love my Amazon Kindle and I love its E Ink display. I'd say 90% of my reading in the last 5 years has been on a Kindle with E Ink. They are bright in direct sunlight, and the newer ones have color temperature settings. The

 
7:13 AM
@nyconing except when you need a nested loop, then do use a nested loop
 
8:05 AM
 
8:20 AM
Similar, our maths lecturer recently explained that "If two terms are syntactically the same, they are syntactically the same"
 
hi i did webbrowser1.dispose()
 
Hi, congrats
 
how do i start it back up again
 
make a new one?
 
I agree, make a new one
 
8:21 AM
> when in doubt, always make a new one
- every parent
 
You wouldn't wanna eat bread you had disposed of before
 
yeah i did make one like this again WebBrowser webBrowser1 = new WebBrowser();
but than it says cannot create disposed object
is it saying i cant make another object with same name as i disposed of before ? like webBrowser1
 
does it say "cannot create disposed object"?
 
@user3548161 That is literally impossible
webBrowser1 is just a variable
 
sorry it says "cannot access a disposed object "
 
8:34 AM
then you still use the old object
 
Hi, running completely nuts trying to get my Xamarin project into the app store. It's day 5 and I'm running out of ideas. Anyone here who wants to help?
 
[Captain Obvious] Which app store?
 
iOS
 
[Captain Obvious] oh okay lol I can't help there
 
Thank you for trying
 
8:39 AM
hmm strange that new object WebBrowser webBrowser1 = new WebBrowser(); created but still being said as disposed ....
 
adding to app store, that's easy
> iOS
oh... good luck
 
[Captain Obvious] Helpful as ever
 
@user3548161 can you share code?
@CaptainObvious always happy to help :)
 
@user3548161 Recompile, maybe you're running an old version?
 
you were right.... silly me ...rebuild solution did it
 
8:50 AM
lol damnit^^
 
eh but now its not showing in splitContainer1.Panel2.Controls.Add(this.webBrowser1);
 
9:05 AM
bleh thanks for help guys ... all fixed its just a case of lol for me ..
i guess i just needed someone to talk to :)
 
9:29 AM
[Captain Obvious] Rubber duck debugging it absolutely amazing
[Captain Obvious] Glad to be your duck
 
10:19 AM
anyone available for a quick question?
 
10:44 AM
@nyconing it needs a design as it not just running tasks parallely . how do I manage interdependencies and other tasks should fire immediately once its dependencies are completed
 
11:18 AM
[Captain Obvious] @dane something something justask
 
my clientele thinks I leave voicemails in their mailboxes for fun and that they don't have to listen to them; you can't convince me otherwise
 
mr5
11:40 AM
@Freerey play.ht
try this plugin. it's almost sounds like a natural reader
 
what is that?
 
[Captain Obvious] aaaaaaaa the US "Guy" sounds like the guy doing announcements on American Airlines
 
mr5
it sounds really natural. I think it could be use to generate audiobook now without human intervention
 
why? what is that and what's footech?
 
11:49 AM
> Hi, my name is Lotte, I read every...
wait, what?
 
[Captain Obvious] OMG THERES A LITTLE GIRL VOICE
 
mr5
which is the little girl voice?
 
[Captain Obvious] Scarlett
 
mr5
lol I guessed it on my first try
 
12:29 PM
Hi all, I have web API services: A, B, and C. A and B share models and B and C share different models, these models are the request/response models (view models, maybe).
my question is where to put these models? in any project?
I thought to create class libraries for ABModels and BCModels.. what do you think?
 
seems good
 
mr5
12:45 PM
👍🏼
 
why do they share models?
are the shared models perhaps supposed to be their own domain and their own library?
 
The system is composed of microservices
 
and?
 
Hi all
 
The component A is MVC web admin calls component B, B calls C
on the other hand M is MVC web admin calls component N, N calls C
B, N and C are APIs
 
12:58 PM
do B, N and C have a client library?
 
Struggling to enable web sockets with SignalR 2.4.2 (Framework). It always ends up using long polling. The web sockets package is installed on the server but getting TryWebSockets: false when doing https://someServer.org/signalr/negotiate
 
@Wietlol sorry, what do you mean by "client library"?
 
have a nuget library, containing a service that encapsulates your transport protocol and serialization, providing you with the public models and functions
 
@Wietlol Isn't this the same as creating ABModels and BCModels class libraries (but without NuGet)?
 
it is
but nuget or another artifact repository is mandatory
if you want to do microservices without client libraries... good luck
 
1:14 PM
Good point, we are still in the development
 
every domain has their own project
it is either
- a function with logic and a client library
- a library with logic/models
- a public endpoint
only that last one does not have to have a client library, but for user experience, it would also be preferred
does not have to be in nuget*
 
the benefit of deploying it (on nuget for example), is for consumers to be able to know the models they need to deal with, right?
 
and the functions
 
what functions, the APIs? they are deployed, on a server
 
1:33 PM
Doesn't dotnet or VS come with a functionality to scan/read an API (like a swagger endpoint or something?) and generate your models from there? Service Reference or something?
 
Anyone screwing around with Maui?
 
@Squirrelkiller Framework or .NET core?
 
New 6.0 stuff has swagger built in
 
@mshwf Both
Found it
 
1:38 PM
And it does include OpenAPI, which is swagger
 
@mshwf the functions are deployed, but you list them in your service object
@Squirrelkiller to be fair, it is a half baked solution
you can absolutely use it for 3rd party services that do not expose a .net client library
but for your own services, there are far better options
keep in mind, the models you use on your service already exist, there is no reason to generate copied models
and the interface should already exist too
 
Why? I imagine it being a very simple task to, whenever the API gets an update, update the service reference of the consumer.
If producer and consumer are in the same solution anyway, sure. But as soon as I'd need a NuGet or other package, I'd think about using the service reference.
 
whenever my service gets an update, a new client library is also shipped with it
 
But instead of "guys which of these 5 versions is the one actually deployed with the API?" I just ask the API itself.
 
obviously, the service needs to be backwards compatible
the consumer can update whenever he likes
also, the version that is deployed must be the latest... otherwise there is something wrong
still, the others should work or be removed
 
1:44 PM
You are presuming a lot of discipline
 
I assume automation
generating a client library is a fine solution, but only if you do not control the hosted service
if you do control the hosted service, there are far better solutions
 
2:04 PM
Ryan Donovan on June 14, 2021
Across alien epics and procedural crime dramas, detectives and truth seekers have repeated the mantra: zoom and enhance. It’s passed into popular culture as a much-beloved meme, but in recent years, machine learning has increasingly made this fiction trope into an accessible reality. And we’ve got the demo to prove it.
 
CSI: Zoom and enhance!
 
They obviously knew
 
 
1 hour later…
3:19 PM
anyone ever use dev.to?
 
 
2 hours later…
5:02 PM
 
 
1 hour later…
6:06 PM
I have a webapi that I'm trying to write middleware for, but it's never getting called. I'm just now learning how middleware works. Can someone help?
Here is the class
    public class KeepAlive
    {
        RequestDelegate _next;

        public KeepAlive(RequestDelegate next) {
            _next = next;
        }

        public async Task Invoke(HttpContext context) {
            await _next.Invoke(context);

            UserCookieData userCookieInfo = AuthCookie.GetUserCookieData(context);
            if (userCookieInfo != null && context.Response.StatusCode == 200) {
                AuthCookie.setAuth(context, userCookieInfo);
            }
        }
    }
I have app.UseKeepAlive(); as the last line in Configure() in Startup.cs
 
6:22 PM
>making api
>never getting called
yeah welcome to the party
 

« first day (3894 days earlier)      last day (1037 days later) »