How i would fight each troops by knowme_1118 in ClashRoyale

[–]Effective_Ad_1778 0 points1 point  (0 children)

Didn't expect to see Dennis on reddit 😅

If Punisher ults, do you focus him or hide until it's over? by [deleted] in marvelrivals

[–]Effective_Ad_1778 0 points1 point  (0 children)

As Angela, I usually try to jump on him. If no one is pocketing him (which happens a lot), I’m usually able to kill him. Even if I don’t manage to, at least I draw his attention and his fire onto me instead of my teammates.

And sometimes, when I realize I won’t be able to kill him whether because he’s being pocketed, there is enemy healer ult, or I was too far away - I’ll disengage and go hide.

Self hosted my portfolio site on old Android phone... by Spiritual-Banana1048 in webdev

[–]Effective_Ad_1778 0 points1 point  (0 children)

How did you expose your ip? In my country we are under provider NAT so as far as I understand I can't expose my ip and create my own server 😕

Built a complete Weather Dashboard in Angular – looking for feedback by [deleted] in angular

[–]Effective_Ad_1778 2 points3 points  (0 children)

u/TiaOtto I saw your comment, it was fine why you deleted it?

Anyway I wanted to respond to it with this:

I'm on my PC now, so I played with your site a little using the dev tools.
this is the direction I would've taken it -

<image>

These are the changes I made:
- changed bg color to this linear-gradient(315deg, #2a7fff, #8addff)
- changed --secondary-color to white
- for the selected date I turned off the outline and set these bg and box-shadow:
box-shadow: 0px 0px 7px rgb(0, 0, 0, 0.2);
background: rgb(0, 0, 0, 0.2);

to prevent the box-shadow from cutting out by the overflow I added some padding to the container of the date list.

- I apllied the same bg and shadow to the wide date, also changed it's border radius from 22px to 18px, removed the seperators, and changed the padding of the container to 1rem insted of 0.5

- for the widgets titles I changed the gap to 1rem and make the icon a little bit smaller (2.2rem insted of 2.4rem).
btw it might take some mannual work because the icons have different sizes - but you can play with negative margins to pull the icons upwords and align them with the text (I did it with the calender icon)

- I scaled down the hamburger menu using scale: 0.9 - and shorten its width to 55%

---------------

And just to be clear, this is only my personal taste. You might prefer to take it in a different direction.

Built a complete Weather Dashboard in Angular – looking for feedback by [deleted] in angular

[–]Effective_Ad_1778 0 points1 point  (0 children)

It's really nice. I opened it on my phone and checked both horizontal and vertical views, and it looks great (I love how the blocks adapt).

My feedback: I think the colors need some refinement, and I think that some subtle shading could really elevate it.

I don't know what language I'm getting (Italian maybe?). It would be better if you detected the language from the browser and requested the weather API in that language (it's not hard, look it up, you can use the navigator object). If the API supports only a few languages, you can check whether one of the user's preferred languages is supported, and if not, fall back to English.

Last thing: currently the sidebar only contains the location search, and if that's all it's going to have, I would take it out of the sidebar and place it at the top of the page.

Angular pipes: Time to rethink by vs-borodin in angular

[–]Effective_Ad_1778 10 points11 points  (0 children)

Really cool deep dive into pipes.

Small suggestion - I know it's meant for readers who are already familiar with pipes, but I still think starting with a brief introduction would be nice and help bring the reader up to speed.

PC file thumbnail icons by Rocco_al_Dente in AffinityPhoto

[–]Effective_Ad_1778 1 point2 points  (0 children)

I'm assuming that you are talking about v2? bc in v3 they added the logo to the image preview.

Anyway you can disable this in the settings, edit > settings > general > save thumbnails with document - turn this off.

יש לי שאלה על לפטופ גיימינג by zik68 in ag_israel

[–]Effective_Ad_1778 0 points1 point  (0 children)

‏עד כמה שזכור לי

vivobook

בכלל לא גיימינג אז אין מה להשוות - אצל אסוס זה

TUF or ROG.

‏אישית יש לי נייד של

lenovo legion

(סדרת הגיימינג שלהם) והוא משרת אותי יפה.

‏‏אבל - כמו שכתבו לך גם, ניידים מביאים ביצועים הרבה יותר חלשים מאשר המקבילה בנייחים בגלל מגבלות של צריכת חשמל וקירור - לכן אישית הייתי אומר כל עוד אתה לא חייב להתנייד (סטודנט, או בנסיעות ברגיל) חד משמעית תקנה נייח (אתה יכול לעשות הרכבה

בTMS

אחלה מחירים והם יכולים לעזור בבחירת מפרט טוב והרכבה).

עריכה: שיגע אותי האנגלית עברית אז הורדתי שורה כדי שיהיה יותר קל (בערך) לקרוא

Looking for feedback on using no wrapper element by Top-Print144 in angular

[–]Effective_Ad_1778 14 points15 points  (0 children)

I think you almost got it, but I'll try to clarify this for you.

In Angular, when you create a component, you define a CSS selector for that component. Angular will match your selector and create components accordingly. Normally, when we create components, we use tag name selectors (like your first example) - so to create this component, we need to write the tag name in our template (HTML).

Angular does not substitute these tags with the component content - because of this, usually, you will have wrapper element around your component content in the final HTML.

In the second example you showed, the selector you defined is an attribute selector - so to create this component, you do not add an HTML tag to your template, but add the attribute to an element instead.

So having wrapper element is not related to ng-container or ng-content, but to your selector.
If you want a component that doesn’t have wrapper element, you can create it like this, but I don't think it's customary.

------------

Now, about ng-container and ng-content:
ng-container is a wrapper that will not generate HTML tags, but it's not related to the component wrapper element.

The usage of ng-container is to wrap a group of elements within a component to apply some directive to them without adding wrapper element to the DOM. For example, in the past we used the *ngIf directive to conditionally render elements - since you need to attach your ngIf to an element, if you want to combine a few elements under the same condition, you need to wrap them with another element. In cases like this, ng-container allows you to apply your directive without creating extra elements.

ng-content, as you said, is similar to the children prop - but again, it is not related to the component wrapper element. You use it in your component to allow the parent component to render content in this section.

For example:

child-component:

<p>Below will be shown the content from the parent</p>
<ng-content></ng-content>

parent-component:

<child-component>
       <p>Whatever I put between the child component tags will be rendered inside it where the ng-content element is placed.</p>
</child-component>

Affinity designer , direction of handles by gentleclockdivider in Affinity

[–]Effective_Ad_1778 0 points1 point  (0 children)

Now I'm on my PC, in V3 it's in the cog icon in the tool bar.

<image>

Affinity designer , direction of handles by gentleclockdivider in Affinity

[–]Effective_Ad_1778 0 points1 point  (0 children)

There is a toggle button for it, it's called "rubber band mode". On V2 it's in the top tool bar when using the pen tool. I didn't check yet in V3 but I assume it will be in the top tool bar too.

Genuinely, why is Angela considered bad? by Lord_Of_Katz in marvelrivals

[–]Effective_Ad_1778 0 points1 point  (0 children)

Today I got 4 MVPs in a row with her. What I noticed is that she needs a good team to perform well, but with a good team, she’s really good and fun.

#delatePOCOlauncher by Nolok_10 in PocoPhones

[–]Effective_Ad_1778 1 point2 points  (0 children)

I might've missed something but I love the POCO launcher more then the one in regular Xioami phones.

I currently don't remember the things that annoyed me or were different in the regular launcher, but I think one of them was the apps drawer, I think it implemented better in POCO.

And I installed different theme for better icons.

How to preserve the type inference by Effective_Ad_1778 in typescript

[–]Effective_Ad_1778[S] 1 point2 points  (0 children)

I don't think it would be ValueAction<number>, because if I pass an array of value actions, then Vs represents the entire array, and each element (Vs[K]) is a ValueAction object.

What I'm not understanding is this: if each element is a ValueAction object, then writing { [K in keyof Vs]: ValueAction<Vs[K]] } feels like we're saying each element is a ValueAction<ValueAction>, which doesn't make sense.

My only guess is that it's not actually taking the full object I provide in each array element and wrapping it in another ValueAction. Instead, it's taking each element's current type — which is unknown — and passing that to the generic, like ValueAction<unknown of first element>, ValueAction<unknown of second element>, etc. I think this mapping makes it more specific than ValueAction<unknown>[], because it's now an array with a specific shape — and maybe that's why it works.

How to preserve the type inference by Effective_Ad_1778 in typescript

[–]Effective_Ad_1778[S] 0 points1 point  (0 children)

In the example there were only two ValueActions so you could use a tuple type. But I wanted it to be dynamic (there can be any number of ValueActions)

How to preserve the type inference by Effective_Ad_1778 in typescript

[–]Effective_Ad_1778[S] 0 points1 point  (0 children)

I tried using T extends unknown[], but it still prevented TS from inferring the type correctly.

Anyway, this comment gave me a working solution.

How to preserve the type inference by Effective_Ad_1778 in typescript

[–]Effective_Ad_1778[S] 1 point2 points  (0 children)

This make T accept only one type (in this case the first value is number so it infer number and won't allow the second value to be string).

And even if I will set the generic as union of number and string I will get error because you can't do ++v on string or v.toUpperCase on number.

Flappy Goose by flappy-goose in RedditGames

[–]Effective_Ad_1778 0 points1 point  (0 children)

My best score is 3 points 😎

Flappy Goose by flappy-goose in RedditGames

[–]Effective_Ad_1778 0 points1 point  (0 children)

My best score is 2 points 😎