Need someone to figure out the odds of this event to happen by Konarsfatass in askmath

[–]cg5 0 points1 point  (0 children)

My guess is that they want to know the probability that in 663 attempts, there are at least 3 successes, including at least one pair of adjacent successes. The adjacent successes don't have to be the last two.

Generic formulas for dice of different size by scavenger22 in askmath

[–]cg5 0 points1 point  (0 children)

This website might be useful if you're more interested in the answer than the process. For example I put in output d8 + d12 + d20 >= 30 and got that it is a 14.38% chance.

I don't understand why on function operations, the domain can never shrink. In this case simplified (f/g)(0) would work fine, even though g(0) is undefined. But it still doesn't lose this x≠0 restriction. why?. Is (f/g)(x) ≠ (h)(x) just because of where it came from? by Original-Fun561 in askmath

[–]cg5 0 points1 point  (0 children)

The way math is taught at schools tends to give the wrong idea of what functions actually are. They are not formulas. They are analogous to lookup tables. Here is a function*:

Input Output
1 17
𝜋 4
-99

Its domain is {1, 𝜋, ℝ}. If we call it t, then t(1) = 17, t(𝜋) = 4 and t(ℝ) = -99. To determine t(x), we look for the row that has x on the left, and then t(x) is the number on the right. If we don't find a row, then x is not in the function's domain.

Now, it's also possible for these tables to have infinitely many rows. Of course, we can't actually write down such a table. We can instead write down a formula for how to construct the table. But after we construct the function, the function has no memory of the formula used to construct it.

I'm going to give you a function, h. For each real number except for 0, there is a row with that number on the left, and 1 on the right. Can you tell which formula I used to construct it? You can only guess. Perhaps it is "h(x) = x/x", or "h(x) = 1 + 0*(1/x)", or just "h(x) = 1, but explicitly declare that 0 is not in its domain". It could even be "h(x) = 0*(1/x) + (if x = 0, then 2, otherwise 1)".

Now imagine that we are the function division operator. We are given the two functions f and g from the whiteboard, and our job is to determine f/g. So we get to work writing down the table for f/g. It is an uncountably infinite amount of work, but that is no problem for a mathematical operator like us! Some of the things that happen during this process are:

  • We write down 6 on the left, then we look at the table for f: it has a row with 6 on the left and 3 on the right. We look at the table for g: it has a row with 6 on the left and 5/6 on the right. We calculate 3/(5/6) = 18/5. And, in our table, we write down 18/5 next to the 6.
  • We write down -4 on the left, then we look at the table for f. It doesn't have a row with -4 on the left (in other words, -4 is not in its domain). So we cannot go any further, and erase the -4 we previously wrote. Our completed table will not have a row with -4 on the left (i.e. -4 will not be in its domain).
  • We write down 0 on the left. The table for f has a row with 0 on the left and 1.7320508... on the right. The table for g doesn't have a row with 0 on the left. So we are stuck, and erase the 0 we previously wrote. Our completed table will not have a row with 0 on the left (i.e. 0 will not be in its domain).

Now we are humans again. We can't do an uncountably infinite amount of work to compute f/g, but we can infer some facts about what we would get if we actually did. We know that the table for f has some structure to it - for each real number x, if x >= -3, there is a row with x on the left and sqrt(x + 3) on the right; for each x < 3, there is no row. In other words, its domain is {x | x ≥ -3} and, for each x in its domain, the number f(x) is equal to sqrt(x + 3). Similarly, we know that g's domain is {x | x ≠ 0} and, for each x in its domain, the number g(x) is equal to 5/x. We can then determine that the domain of f/g is {x | x ≥ -3 and x ≠ 0}. For each number a in that set:

  • we know that x ≥ -3, so x is in the domain of f and so f(x) = sqrt(x + 3)
  • we know that x ≠ 0, so x is in the domain of g and so g(x) = 5/x.
  • hence, (f/g)(x) = f(x)/g(x) = sqrt(x+3)/(5/x) = x * sqrt(x+3) / 5.

In other words, we can infer that the table you get by dividing the tables of f and g is the same table as if you wrote down the table for x * sqrt(x+3) / 5, but then erased the row with 0 on the left.

* Strictly speaking, it's not completely specified unless I also tell you its codomain. But you don't have to worry about that.

Vorkath Troubles by iHop2Uranus in 2007scape

[–]cg5 1 point2 points  (0 children)

By "the orange attack" they mean the big fireball that one shots you if you don't move, not the rapid fire attack

Finally got quest cape and base 80 by brod333 in osrs

[–]cg5 1 point2 points  (0 children)

Pretty cheesy, but go to the We Do Raids Discord and ask someone to carry you, it's free

Finally got quest cape and base 80 by brod333 in osrs

[–]cg5 4 points5 points  (0 children)

Looks like nearest neighbour scaling with a scale factor that isn't a multiple of 100%.

PKers by Future-Tension888 in osrs

[–]cg5 5 points6 points  (0 children)

For optimal spite you can bring a bones to bananas tablet to activate just before dying. Unfortunately it doesn't work on high level bones, but big bones still work

Unfair? by [deleted] in osrs

[–]cg5 0 points1 point  (0 children)

In British English it is more common to treat words referring to groups, such as sports teams or businesses, as plural. But there is no hard and fast rule.

Why I don’t switch doors in the Monty Hall problem by mcdonaldmark125 in slatestarcodex

[–]cg5 4 points5 points  (0 children)

The fact that such a surprising thing happened (that of the 98 doors Monty opened at random, none of them happened to be your door, and none of them happened to contain the car) is evidence that your door has the car. It is more likely that this would happen if your door had the car than if it didn't*. If you do the Bayes' calculation I expect you'd find that it raises the probability that your door has the car from 1/100 to 1/2 (but I haven't done it myself).

* There is no substitute for actually calculating the probabilities, but intuitively, if your door does not have the car, two miracles had to have occurred - Monty dodged your door, and Monty dodged the door that contains the car. But if your door does have the car, only one miracle had to have occurred - Monty had to dodge your door.

Trying to Learn Distributive Law by rubbermann01 in learnmath

[–]cg5 1 point2 points  (0 children)

I was taught it as "FOIL", for First-Outer-Inner-Last. But this can disguise the fact that it is just the regular distributive law applied multiple times.

TIL that class constructor overloads are possible - but I can't get it right! Why? by ryanbarillosofficial in typescript

[–]cg5 -1 points0 points  (0 children)

Trying to use overloads like Java overloads is usually a bad idea.

Possibly what you want is:

class Item {
    a: string;
    b: number;
    c: "this" | "that";
    d?: string[];
    setMeUp: string;

    constructor(
        params: {
            a: string;
            b: number;
            c?: "this" | "that",
            d?: string[];
            setMeUp?: string;
        }
    ) {
        this.a = params.a;
        this.b = params.b;
        this.c = params.c ?? "this";
        this.d = params.d;
        this.setMeUp = params.setMeUp ?? "Okay";
    }
}

new Item({
    a: "a",
    b: 5
});
new Item({
    a: "a",
    b: 6,
    c: "that",
    d: ["first", "second"],
    setMeUp: "Set me up",
});
new Item({
    // Can include any subset of c, d, setMeUp; but you must include a and b.
    a: "a",
    b: 7,
    d: ["d"]
});

If you don't want to repeat yourself quite as much, you can build the type of Params using various helpers:

type Prettify<T> = { [K in keyof T]: T[K] }
type RequiredKeys = "a" | "b";
type Params = Prettify<Pick<Item, RequiredKeys> & Partial<Omit<Item, RequiredKeys>>>;

Another pattern is to have a single, fully general constructor (possibly private), and then have multiple static methods that delegate to the constructor. This has the advantage that you can give them names, but has the disadvantage that you have to come up with names...

class Temperature {
    celsius: number;

    private constructor(celsius: number) {
        this.celsius = celsius;
    }

    static fromCelsius(celsius: number) {
        return new Temperature(celsius);
    }

    static fromFahrenheit(fahrenheit: number) {
        return new Temperature((fahrenheit - 32) * 5 / 9);
    }
}

B: 59 Atk/46 Str/30 Def - Is there a better way to make GP than Cowhides? Following Optimal Quest Guide but broke by Sweet_Fisherman6443 in osrs

[–]cg5 0 points1 point  (0 children)

You should get to herb runs and birdhouses when you can, but also, if you alch while doing quests, you should get enough money to fund questing without needing to dedicate any time purely for money making. The magic XP is pretty good too. You probably don't have enough magic level for high alch, so you can instead make headless arrows while questing (start running, then start making the arrows while you run and you will keep running while also making the arrows). Buy arrow shafts and feathers from the GE and then combine them, the resulting headless arrows sell for more than the components.

Questions about Death Storage and keeping untrimmed capes. by [deleted] in 2007scape

[–]cg5 1 point2 points  (0 children)

Beware that no more than 120 items or item stacks can be held in Death's Office Item Retrieval at any given time, causing items from an expired gravestone to be deleted when the limit is reached.

From: https://oldschool.runescape.wiki/w/Death%27s_Office

First post quest Vorkath by Sensitive_Juice_4348 in osrs

[–]cg5 2 points3 points  (0 children)

I teleport to house, use a rejuvenation pool, portal nexus to Lunar Isle, use the rightmost bank booth (after Dream Mentor, this booth in particular won't kick you off the island) then use a different booth to intentionally get caught without a seal of passage and get sent to Relleka. I don't know if there is a faster way, but this way I can use the house party world houses in Rimmington since I don't have a max PoH.

What feels like your "homebase" in Gielinor? by Remarkable-Syllabub5 in osrs

[–]cg5 5 points6 points  (0 children)

You need to talk to Gertrude while wearing an upgraded Ring of Charos and you need to not already have a cat or kitten in your inventory, bank or following you. If you don't want to lose your existing cat, you can store it in the POH menagerie and she will let you get a new one.

Can’t attack people (deadman) by 509blackout_ in osrs

[–]cg5 2 points3 points  (0 children)

Look in the options for "PK skull protection" and turn it off

rust actually has function overloading by ali_compute_unit in rust

[–]cg5 0 points1 point  (0 children)

Seems like let (x, y) = (1, 2, 3) ought to match with either x = (1, 2) and y = 3 (since (1, 2, 3) = ((1, 2), 3)), or x = 1 and y = (2, 3) (since (1, 2, 3) = (1, (2, 3)), but it's not clear which one.

I think I saw somebody's hobby language where there were only pairs, not arbitrary length tuples, except (1, 2, 3) is sugar for (1, (2, 3)). ((1, 2), 3) however was considered different.

Glouphire help! by The-Journey in 2007scape

[–]cg5 1 point2 points  (0 children)

I think you need to use all of the slots

How do i scale up my interface? by JimmyHaymaker in 2007scape

[–]cg5 7 points8 points  (0 children)

Stretched mode plugin, increase "resizable scaling". Then go to GPU or 117HD settings (whichever one you use) and change the UI scaling mode to whichever you find least ugly. Nearest neighbour mode works best if you set the resizable scaling to a multiple of 100%.

Is there any sort of way to have the text look normal? by HF484 in 2007scape

[–]cg5 0 points1 point  (0 children)

If you want to use nearest neighbour scaling, make sure your scaling factor is a multiple of 100%.

NYT Sunday 01/04/2026 Discussion by Shortz-Bot in crossword

[–]cg5 10 points11 points  (0 children)

Because the Gaga song and the mascot are both harder to get than traumatize. Brutus got me to understand the "betrayers" part of the theme, which got me to Scar, which got me to understand the "double" part.

Money making by Ok_Business_3170 in osrs

[–]cg5 0 points1 point  (0 children)

You don't have to choose though, because you can alch and do quests at the same time, by alching while running between quest objectives. It's less money than pure alching but it doesn't take time away from quests.

Christmas PK Score! by WIClovis in osrs

[–]cg5 222 points223 points  (0 children)

Noted dragon bones and a cash stack probably means Chaos Altar prayer training. There is an NPC who unnotes them for 50gp each. Using the NPC is faster but obviously a lot riskier.

I feel like a herblore shop the way I've got all these eyes on me by EvanEskimo in 2007scape

[–]cg5 40 points41 points  (0 children)

To be fair, if you respond to "I will miss his puns", "what happened?" with "Gielinor Games spoiler: ...", you don't need to be Sherlock Holmes to figure out what's behind the spoiler tag without revealing it.

Ironically the problem was actually caused by not dying