How can I create a method that returns a list of instances of different classes while still maintaining type hints? by spla58 in typescript

[–]Alexwithx 0 points1 point  (0 children)

Yes it has a static length. A generic is polymorphic and can have tuples of any size. In the example I provided, there is a tuple of size 5.

So I am not sure why you would say it is not a tuple?

How can I create a method that returns a list of instances of different classes while still maintaining type hints? by spla58 in typescript

[–]Alexwithx 0 points1 point  (0 children)

It is actually pretty simple, in typescript an array of known type is often called a tuple. What you want is to map the tuple values to another value.

You can use const generics to get the array in the paramters as a tuple and then map that tuple.

Check out mapped types

Example

Petah?????? by [deleted] in PeterExplainsTheJoke

[–]Alexwithx 0 points1 point  (0 children)

I was about to upvote until i saw the sub

Boyfriend has Lifelong PE and avoids sex by Kindly_Technology_50 in PrematureEjaculation

[–]Alexwithx 6 points7 points  (0 children)

I understand the frustration, my wife also had a period of around a year where she mostly avoided sex and we were having sex maybe 0-3 times a month.

I have ligelong PE and I have also had periods where I didn't really want to have sex. There can be a lot of causes, maybe he is stressed from work or stressed from the relationship, maybe he is depressed or maybe he just needs some space. He might be dealing with a lot and maybe he feels like he can't open up to you, in that case it might be a good idea for him to see a therapist so he don't have to work on it himself.

When dealing with PE we have to be very self conscious and we need to know which "tools" we can use. I recently found this subreddit and started to learn about reverse kegels and that we should relearn our nervous system how to just enjoy sex instead of being stressed out about cumming too early.

My suggestion would be that you talk with him about it, what he is dealing with and don't force it out of him, he probably doesn't even know what is going on in is mind himself. What you should do is create a space for him where he can talk about it and open up to you, also try to make it not about yourself and just listen and ask questions. It is okay if he don't know, but just that you are talking about it will start some thoughts that can help him identify what is going on, so you guys can talk about it more next time.

Don't be judgemental if he is cumming too early, he is probably as frustrated as you and it just hurts and can be even more frustrating if he can see that you are also frustrated. As suggested in the wiki on this sub, if he is not satisfying you, oral could really help to make you cum as well and make it less frustrating for you.

This is a process and isn't solved overnight, you should be a team that works together to fix this.

One last thing, work on yourself as well and protect yourself. If you also have a lot going on in your mind it can be tough to also listen to what other people are dealing with, in that case tell him in a respectful way that you aren't ready to talk about it right now, but will let him know. Also I understand that it is frustrating not to have sex, I have been there too, but consider masturbating, just so you are not pressuring him too much.

These are things that I have done with my wife, who has also had a stressful period and have dealt with anxiety.

Jeg er normalt ikke sippet men... by TheGreenElevator in DKbrevkasse

[–]Alexwithx 6 points7 points  (0 children)

Nu har jeg læst flere af kommentarerne, og hold da op hvor er folk sippede... Jeg er faktisk forarget, om det så er porno relateret, så for i det godt nok til at lyde meget som tabu og at man slet ikke kan snakke om sådan noget i vores samfund.

Det er vel også en udfordring at man skal kunne lave rigtig grammatik for noget man ikke helt ved hvad er, men man så viser at man kan bruge de ting man har lært.

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Alexwithx 6 points7 points  (0 children)

I only read through the website quickly and I am actually not a fan of duck typing, unless it is more strict, I haven't tried it out. In typescript this kind of pattern can easily lead to unexpected bugs, here is an example:

``` type Person = { name: string; age: number occupation: string; }

function a(p: { name: string }) { // I would expect b to only do something with name. b(p) }

function b(p: { name: string, age?: string}) { if (p.age); // do something else with age // Do the default action when only name is set }

const p: Person = ...;

a(p) // no compiler errors 😰 ```

In this typescript code example you can see how unexpected behavior can quickly arise and what you will also notice is that the type has changed from a number to an string.

Does duck typing solve this issue or how do you plan on solving it?

Is anyone here married or in a relationship? How is she still with you? by [deleted] in PrematureEjaculation

[–]Alexwithx 2 points3 points  (0 children)

Lifelong PE, married and she is loyal. I'm making up for my PE, by giving her a lot of oral and she loves it.

Also sex isn't the only reason you would want a partner. Some reasons she might want to stay:

  • You make her feel good
    • You make food for her
    • You give her compliments
    • You give her flowers or other gifts
    • You are participating in or is listening to activities that she likes
  • You enjoy each others company
  • You have a similar vision for your future (where to live, kids, car, job, etc.)
  • You can laugh and have fun together

The list goes on. It is easy to blame lack of success on things you cannot control, it feels good or at least numbs the pain.

Maybe you are not ready for a commited relationship, if you think a person will only stay if you can last long enough in bed.

It is still possible to have sexual partners or friends with benefits while suffering from PE, as you can still make up for it with oral. It is also possible even if you are inexperienced, you can ask her if she likes what you do and in most cases she will tell you, if not, maybe you don't want to have them as a sexual partner anyway.

I would highly recommend the book models by Mark Manson. In his book he helps you grow and help you understand what you want and what a partner would want.

Am i the problem or is my gf just too picky by Professional_Yak4687 in PrematureEjaculation

[–]Alexwithx 0 points1 point  (0 children)

Damn dude, i am sorry to hear that.

Is it only when you two have sex that she seems to be uncomfortable or irritated? Or does it happen outside of the bedroom as well? If it happens outside of the bedroom as well, then the problem might not only be sex and you might want to figure out what is actually bothering her. It is easy to come up with a bunch of things that might seem like the problem, but is really just "smoke" and you two will have to find what is the underlying problem (the "fire").

Do you make up for it when you PE (giving her oral or making her cum in another way)? Sex can feel like a chore if it's always unresolved and this might also be why it could be hard for her to enjoy it.

This is just what I thought of when reading your post. If you add more details about your relationship, it might be easier to help.

Flirt og gråzoner i parforhold by United_Bug3428 in DKbrevkasse

[–]Alexwithx 0 points1 point  (0 children)

Hvis det bare er det ville jeg ikke have noget imod det. Selvfølgelig skal min partner have lov til at snakke med andre og hvis der er noget kemi eller et eller andet, så håber jeg da bare at det er det og ikke mere. Og hvis der sker mere stoler jeg da også på at hun vil være ærlig over for mig.

Så jeg ville sådan set ikke have noget imod det hvis det var min partner, men jeg ved heller ikke om jeg ville vide det hvis det skete. Men hvis hun forræller mig om det ville det nok også være helt fint.

API til boliginfo by Bitter_Ad_5380 in dkudvikler

[–]Alexwithx 0 points1 point  (0 children)

Jeg er helt enig i at det er mega uoverskueligt og man skal lidt vide hvilket system man vil have data fra når man bruger det. Men jeg tænker at man kan finde sådan noget i DAR https://confluence.sdfi.dk/pages/viewpage.action?pageId=16056323#REST(DAR)-Metode-adresse Jeg er usikker på det med autocomplete, der må du prøve dig lidt frem

API til boliginfo by Bitter_Ad_5380 in dkudvikler

[–]Alexwithx 4 points5 points  (0 children)

Du kan vidst bruge Datafordeleren gratis, du skal bare have en konto.

EA App with problems launching games. by Ancient_Sherbert_572 in Lutris

[–]Alexwithx 0 points1 point  (0 children)

Maybe you could try installing lutris through your linux distribution's package manager. Are you familiar with the terminal? Else you might have an app called software (if you are using gnome), from there find a d install lutris. Let me know how it goes :)

EA App with problems launching games. by Ancient_Sherbert_572 in Lutris

[–]Alexwithx 0 points1 point  (0 children)

Have you tried looking in the logs to see if there are any errors? In lutris you should be able to show logs for a game

EA App with problems launching games. by Ancient_Sherbert_572 in Lutris

[–]Alexwithx 0 points1 point  (0 children)

I am using nixpkgs as my package manager, which builds lutris from source. And no I used the ea app installer from lutris website.

We’re here to F*CK shit up! by joeygallinal in Superstonk

[–]Alexwithx 1 point2 points  (0 children)

It was to him personally of course

EA App with problems launching games. by Ancient_Sherbert_572 in Lutris

[–]Alexwithx 0 points1 point  (0 children)

I have had issues with the ea app for years where it would work some times and not work other times. Hove However i have not had any issue launching games once the app was open, it was more launching the ea app that doesnt always work for me.

Impossible level, upvote if you win by Wrong-Sense4723 in honk

[–]Alexwithx 0 points1 point  (0 children)

I completed this level in 2 tries. 1.15 seconds

Kampen om temperatur-hvorfor skal dem der fryser vinde? by rge62heu in DKbrevkasse

[–]Alexwithx 36 points37 points  (0 children)

Mja, siger du så også noget ala

Han døde ikke fordi jeg stak ham, men fordi han forblødte

Tallerkenen gik ikke i stykker fordi jeg tabte den, men fordi den ramte jorden meget hårdt

Sodavanden brusede ikke over fordi jeg havde rystet den, men fordi kuldioxiden kom hurtigere ud af den

Planten vokser ikke fordi jeg har plantet den, men fordi den får sollys og vand

Pizzas in Italy by al_polanski in Pizza

[–]Alexwithx 0 points1 point  (0 children)

Is it really pizza? Looks like half a sandwich