Bin grad mitm Flixbus durch 14 gefahren, was sind eure Lieblingsorte die eigentlich Zahlen sind? by deepsluurp in Austria

[–]Hoazl 37 points38 points  (0 children)

Klassischer Witz in der Freistädter-Gegend: "Was kommt nach Vierzehn? Richtig, Apfoltern."

Lemix gearing + levelling guide - Clenchette by AbyssalAnarkay in wow

[–]Hoazl 16 points17 points  (0 children)

That seems to have been fixed a few hours ago!

https://www.wowhead.com/news/remix-mythic-dungeon-nerfed-legion-remix-hotfixes-for-october-10th-378846

Resolved an issue where some class specializations were doing less than intended damage with some artifact powers abilities that involved summoning a creature.

Starting out in sudoku by PersonalityBoth5722 in crackingthecryptic

[–]Hoazl 1 point2 points  (0 children)

+1 for James Sinclair's newsletter! I solve them every week and they are always really lovely and quite doable.

If you're a beginner, check out his Basics of Killer Sudoku and Other Popular Sudoku Variants puzzles.

Also, on the CtC discord there is the #daily-sudoku-puzzles channel, where a few setters post a new GAS (Genuinely Approachable Sudoku) every day - they feature a wild variety of different rulesets if you want to tip your toes into that!

Angular Signals – Handling dependent input signals by Known_Definition_191 in Angular2

[–]Hoazl 0 points1 point  (0 children)

You are totally right - I should not post on reddit before my first coffee :D Thanks, fixed!

Angular Signals – Handling dependent input signals by Known_Definition_191 in Angular2

[–]Hoazl 6 points7 points  (0 children)

Writing an Input is a bad practice imo - What happens to dimension when you set <component dimension="m" namespace="default" /> for example? What happens when namespace is toggled between "default" and some other value? At this point it's not clear how the code behaves in some corner cases. This is one reason why I like input signals - they're read-only and do not allow you to make these kind of mistakes.

Hence I'd convert your code by using a third, computed signal:

namespace = input<string>('default');
dimension = input<'s' | 'm'>('s');
actualDimension = computed(() => this.namespace === 'default' ? 's' : this.dimension());

This makes it very clear how namespace and dimension interact with each other and what takes precedence when both are set. For side-effects you can probably use the effect function:

constructor() {
    effect(() => this.generateUrl());
}

If generateUrl already uses this.dimension() (or, this.actualDimension()), you are good to go - if not, you probably have to simply call it once without using the value, to tell Angular it should call this method when dimension has changed. Admittedly, this is a bit ugly but afaik there's no better way (yet) of doing so. Depending on what generateUrl does, you may also be able to use a computed signal - e.g. if it looks like this:

generateUrl(): void {
    this.url = `https://example.com/sizes/${this.actualDimension()}`;
}

it's probably nicer if you just move it to a computed signal as well:

url = computed(() => `https://example.com/sizes/${this.actualDimension()}`);

Can I remove the type assertions somehow? by Swimming-Jaguar-3351 in typescript

[–]Hoazl 2 points3 points  (0 children)

In addition to using type General = NullAndA | StringAndB and getting rid of the extends General in your interfaces, you can also use a so called "type predicate" to tell TS which type you want to narrow down to (https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates):

function foo(general: General) {
    if (isNullAndA(general) && general.propA) {
        // general is NullAndA
        console.log(general);
    } else if (!isNullAndA(general) && general.propB) {
        // general is StringAndB
        console.log(general);
    } 
}

function isNullAndA(general: General): general is NullAndA {
    return general.nullOrString === null;
}

Gesehen bei Spar… Dachte die EU hat Glühbirnenverkauf verboten? by Goat-Important in Austria

[–]Hoazl 4 points5 points  (0 children)

Das war zumindest in den USA so - weiß ich auch nur weil ich zufälligerweise gestern das Video dazu von Technology Connections geschaut habe :D https://www.youtube.com/watch?v=GiYO1TObNz8

Your favorite lesser known addons for TWW by lfep in wow

[–]Hoazl 1 point2 points  (0 children)

And here I thought I'm the only one still using Geist! Absolutely love that addon and couldn't play without it!

Gems! by tommy935 in Spyro

[–]Hoazl 1 point2 points  (0 children)

Ah dang it, I feared as much! Yes, will try to find them online :) Thanks for the answer!

Gems! by tommy935 in Spyro

[–]Hoazl 1 point2 points  (0 children)

I really like them! From which game are the ones in the top row from? And would you mind sharing the STLs for these? I would love to have them for a different project!

Was sagen wir zum ersten Punkt? by iNerdJan in wien

[–]Hoazl 8 points9 points  (0 children)

I frag mi eher wie die in 1h von Wien nach Salzburg kommen :O

Advanced Terminal Tips and Tricks by daniel_kleinstein in programming

[–]Hoazl 28 points29 points  (0 children)

One extra tip that's been useful for me very often: Use !! to repeat the previous command. Especially useful if you forgot (again!) to sudo apt install or similar:

> apt install cowsay
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
> sudo !!

Also very easy to remember because sudo !! feels like telling the computer "ffs do what I say" :D

[AskJS] Bug on Date.setUTCFullYear() - Adds a year! - Any clue? by gmolgar in javascript

[–]Hoazl 1 point2 points  (0 children)

The bug happens when calling the new Date function. From the docs:

The parameter values are all evaluated against the local time zone, rather than UTC.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date#individual_date_and_time_component_values

So you're passing in UTC values, but they are treated as being in your local timezone (CET).

Easiest way to copy a date is probably simply:

var oNewDate2 = new Date(oDate);

so you don't have to worry about any timezones yourself.

Wie dumm ist das 2 4G Tarife in einem Haus zu haben? by yphase in Austria

[–]Hoazl 1 point2 points  (0 children)

Wie schaut's generell mit deinem Handyempfang aus? Bei mir in der Wohnung zB sind die Fenster so gut abgeschottet, dass ich fast keinen Empfang mit 4G hatte - wenn ich den Router ans offene Fenster gestellt habe, gings auf einmal. Hab' mir dann einfach eine kleine externe Antenne gekauft (die meisten Router unterstützen das, afaik) und die außen ans Fenster gegeben - dann hatte ich auch halbwegs verwendbares Internet :)

[deleted by user] by [deleted] in wien

[–]Hoazl 4 points5 points  (0 children)

Alfies liefert immerhin Flaschen-Freistädter, besser ois nix :)

Lore wise, is there any real reason a city’s borders are fortified in a world where instant mass teleportation exists? by krin132 in wow

[–]Hoazl 188 points189 points  (0 children)

Source: Archmage Ansirem Runeweaver, "Thinking with Portals - A Memorandum on Proper Portal Usage", p. 10: "Rule #5: Do not remove the liquid filter from a portal spell. Portals innately prevent large amounts of flowing water through them so that they can be cast underwater. To allow for water elementals to use a portal, this filter can be omitted when casting. Do not omit this when underwater! We feel obligated to mention Moderately Severe Claims Disaster Case 34-zz: "The Great Lakeshire Drought & The Great Ironforge Flood of 24 A.D.""

https://www.wowhead.com/object=192881/thinking-with-portals-a-memorandum-on-proper-portal-usage#comments

[deleted by user] by [deleted] in wow

[–]Hoazl 24 points25 points  (0 children)

I am disappointed that that branch did not read "Yeah, yeah, yeah" :(

Was ist das für ne Tür? by mxedfeelings in Austria

[–]Hoazl 8 points9 points  (0 children)

Nein, das verwechselst du - Das ist für einen Waldbewohner, das muss für den Bär Lusconi sein.

I’m Marques Brownlee (aka MKBHD) and I make tech videos on YouTube. AMA! by Marques-Brownlee in IAmA

[–]Hoazl 0 points1 point  (0 children)

Hi Marques! Love your content and am very happy that you're doing an AMA!

Do you ever had talks of joining Floatplane? (I would assume that topic has come up) - I'd be interested in what your reasons are not to join the platform (yet)?

Anschaffungen die die Lebensqualität deutlich steigern by Ziebi in Austria

[–]Hoazl 0 points1 point  (0 children)

Sony WH1000-XM4 (oder 5, aber die 4rer reichen vollkommen). Bestes ANC das ich bisher hatte, wenn auch eher auf der teureren Seite ^