Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)ZK
zkfcfbzr @lemmy.world
Posts 28
Comments 384
Eeeeee
  • Kind of intentionally obtuse since they used eₑ as a variable and eₑₑ as another variable, and used (e-e) as an exponent a few times, which is basically the equivalent of multiplying by 1 in a fancy way. The first and last term also perfectly cancel out.

    The same integral written in a saner form is:

    integral from -e^e to e^e of (integral from -e^e to e^e of e^-(x^2+y^2)dy)dx

  • IBM’s contributions
  • One thing I think people miss when political donations by company are listed like this is that it's not the company itself making donations, it's their individual employees.

    Ever made a political donation? Remember when it asked for your employer on the form? Well this figure is from people who put IBM there on their form.

    So when you read a stat like this that tells you one company overwhelmingly donated one way or the other, it's really telling you nothing about the company itself, and more about the employees who work there - primarily the low level employees, who likely vastly outnumber everyone else.

    Similarly, it means nothing as far as corruption is concerned when you look into a specific candidate's political donations and see that, for example, oil companies overwhelmingly donated to them. It doesn't mean oil companies literally donated to them, it means people who work at oil companies did.

    It might be useful for gauging a company's general culture, but even then I'd be cautious since the bulk of political donations for most companies is probably dominated by their low level employees.

  • [Unsolved] [2024/05/17] 1 dimensional gravity
  • Not sure how much you'd care, but I came back to this and found (by hand) a function which closely approximates the solution - it's not exact but it's also not super far. Graph.

    I think I could also solve the differential equation by hand at this point (getting the same solution as before) - I haven't, but I'm pretty sure I could if I wanted to for whatever reason. I'm doubtful it's possible to get an exact solution in terms of just x but if you ever manage I'd love to see how.

  • [2024/05/25] Angle between two vectors
  • Making one additional note here, because of your parenthetical message, letting you know that my short backlog of problems I found interesting has actually run dry with the last one I posted - so my series is unfortunately on hiatus. I'll still post if I come across other interesting problems but that honestly doesn't happen too often - even the ones I have posted were collected (and saved by a friend) over several years.

  • [2024/05/25] Angle between two vectors
  • solution

    I'm sure there's some short elegant solution here that uses beautiful vector math. Instead I went for the butt ugly coordinate geometry solution.

    Let u = <a, b> and v = <c, d>

    See diagram. WLOG, assume u has a smaller angle than v. We can find cos(θ) by constructing a right triangle as shown, and by finding a new vector w, in the same direction as u, which has the correct length to complete our right triangle. Once done, we will have cos(θ) = |w| / |v|.

    Let's consider each vector to be anchored at the origin. So we can say u lies on the line y = (b/a)x, and v lies on the line y = (d/c)x. To find w, let us first find z - the third side of the triangle, which we know must be perpendicular to u, and pass through (c, d).

    The line perpendicular to y = (b/a)x and passing through (c, d) is y = (-a/b)(x-c) + d. So this is the line containing the third side of our constructed triangle, z. To find w, then, let's find its point of intersection with y = (b/a)x, the line containing w.

    (b/a)x = (-a/b)(x-c) + d → Setup

    (b/a)x = (-a/b)x + (ca/b) + d → Distribute on right

    x(b/a + a/b) = (ca/b) + d → Add (a/b)x to both sides, factor out x on left

    x(a² + b²) = ca² + dab → Multiply both sides by ab

    x = (ca² + dab) / (a² + b²) → Divide both sides by (a² + b²)

    x = (ca² + dab) / |u|² → a² + b² is |u|²

    y = (b/a)x = (b/a)(ca² + dab) / |u|² → Plug solution for x into (b/a)x, don't bother simplifying as this form is useful in a moment

    So w = <(ca² + dab) / |u|², (b/a)(ca² + dab) / |u|²>. Now we need |w|.

    |w| = sqrt((ca² + dab)² / |u|⁴ + (b²/a²)(ca² + dab)² / |u|⁴) → Plugging into normal |w| formula

    |w| = sqrt(((ca² + dab)² / |u|⁴) * (1 + b² / a²)) → Factor out (ca² + dab)² / |u|⁴

    |w| = (ca² + dab) / |u|² * sqrt(1 + b² / a²) → Pull (ca² + dab)² / |u|⁴ out of the root

    |w| = (ca² + dab) / |u|² * sqrt((a² + b²) / a²) → Combine terms in root to one fraction

    |w| = (ca² + dab) / |u|² * |u| / a → Evaluate sqrt

    |w| = (ca + db) / |u| → Cancel out |u| and a from numerator and denominator

    So this is the length of our adjacent side in the constructed right triangle. Finally, to find cos(θ), divide it by the length of the hypotenuse - which is |v|.

    cos(θ) = |w| / |v| = (ac + bd) / (|u||v|)

    And note that ac + bd is u•v. So we're done.

    cos(θ) = u•v / (|u||v|), or |u||v|cos(θ) = u•v.

    Note that since this formula is symmetric with respect to u and v, our assumption that u's angle was smaller than v's angle did not matter - so this should hold regardless of which is larger.

  • Coin-flipping game
  • In probability, two events are said to be independent if one event happening has no effect on the probability of another event happening. So coin flips, as an example, are independent - because when you flip a coin and get Tails, that doesn't affect the probability of the next coin flip also coming up Tails.

    So in this context, asking if A and B are independent is asking: Does knowing the game lasts at least four turns change the probability of winning? And similarly for A and C. Does knowing the game lasts at least 5 turns change the probability that the game will end in a victory?

    Rest of response

    To be clear about your other answers, saying P(B) = 1/16 and P(C) = 1/32 are not correct - I was saying if you adjusted your formula, from 1/2^n to 1/2^(n-1), then your answers would be correct. So the probability of the game lasting at least four turns is 1/2^(4-1) = 1/2^3 = 1/8, and the probability of it lasting at least 5 turns is 1/2^(5-1) = 1/2^4 = 1/16.

    But I think you were more asking about why this didn't affect your win rate - that's because there's a subtle difference between "making it to the nth round" and "having the game end on the nth round" - and that difference is that once you make it to a round, you then have a 1/2 probability to end the game - which makes the probability of ending on the nth round the 1/2^n you used.

  • Coin-flipping game
  • response

    This is the correct answer, although P(A|B) should actually be 2/3 rather than 7/12 - I think you meant 1/2 + 1/8 + 1/32 + ...?

    The reasoning is good, either way. Since past flips won't affect future flips, if the player has made it to turn 5, an odd turn, then their future prospects are no different than they were on turn 1, another odd turn - so A and C are independent. Similarly, A and B are dependent because your chances of winning and losing effectively flip: If you've made it to an even turn, then you now win if it takes an odd number of flips from there to get Heads.

    So it should be an almost paradoxical-seeming situation: You win 1/3 games overall, you win 2/3 games that make it to turn 2, you win 1/3 games that make it to turn 3, you win 2/3 games that make it to turn 4, 1/3 that make it to turn 5, etc.

  • Coin-flipping game
  • Games are always played to completion, though if you wanna make it (barely) more challenging you can add in a 5% chance for both players to get bored and give up on each round (before flipping), leading to a loss. Though it seems unlikely - after flipping a quarter 20 times and getting Tails every time, I'd be inclined to keep flipping if anything.

    response

    These are correct. It is possible to reason out which of B and C is independent of A without going into the numbers.

  • Coin-flipping game
  • response

    This is close, but you've got an off-by-one error where you calculate the probability of making it to the nth round as 1/2^n. Consider that that would imply you have a probability of 1/2 for the game to make it to round 1, or 1/4 to make it to round 2, etc - it should be 1/2^(n-1). Correcting this would give you the correct answers for P(B) and P(C).

    As for the dependence question, I'm not sure I followed your arguments there - but saying both are dependent is not correct.

  • Coin-flipping game

    We're playing a game. I flip a coin. If it lands on Tails, I flip it again. If it lands on Heads, the game ends.

    You win if the game ends on an even turn, and lose otherwise.

    Define the following events:

    A: You win the game

    B: The game goes on for at least 4 turns

    C: The game goes on for at least 5 turns

    What are P(A), P(B), and P\(C)? Are A and B independent? How about A and C?

    12

    Bounding a function

    Consider the function defined by y = x\(sin(x)\sin(x)). Observe its graph. Find an increasing function which passes through each of its local maximums, and another increasing function which passes through each of its local minimums.

    Extra credit: You'll notice the graph isn't drawn for x-values which make sin(x) negative. This is because most of those values make the function undefined - though it is defined for infinitely many points in those intervals, it just also has infinitely many holes. Since it lacks continuity here, it has no true local maxes or local mins, and doesn't impact the original problem. We can nonetheless cheat and fill in the holes by expanding the function to these regions with y = x\|sin(x)|\sin(x) (Using x\-|sin(x)|\sin(x) should also be technically valid, but is being ignored because it's discontinuous with the rest of the graph and not as pretty, but will be mentioned in my solution). Doing so adds more local maxes and local mins. The new local mins should line up with your function that finds the local maxes for the original function - but, find a new function which hits all of the new local maxes.

    8

    Solve for x

    (x/5)\^log_b(5) - (x/6)\^log_b(6) = 0

    11

    Index of my posted problems

    Index of my unnamed series of posted problems

    |Date|Post |---|---| |2024-05-07 | Find a+b |2024-05-09 | What is the area of the shaded region? |2024-05-15 | Solve for x |2024-05-17 | Bounding a function |2024-05-22 | Coin-flipping game

    0

    What is the area of the shaded region?

    An 8x5 rectangle. If the bottom left corner is considered (0, 0), then two lines are drawn within the rectangle, from (0, 4) to (8, 1) and from (1, 5) to (7, 0). The smaller two regions of the four these lines cut the rectangle into are shaded. What is their combined area?

    15

    Find a+b

    !

    The image is of a large unit square with five smaller disjoint shaded squares contained entirely within it. The five smaller squares are congruent. Four of them are at each corner of the large square. The fifth is in the center, rotated diagonally, so the center of each of its sides is touched by the vertex from one of the other four squares. You are given that the common length for the five smaller congruent squares is (a-sqrt(2)) / b, where a and b are positive integers. What is the value of a + b?

    8

    What are the practical effects of the recent court ruling nullifying Musk's Tesla pay package?

    I read this article and still walked away feeling like I didn't understand the situation that well.

    Is it $56 billion that he's already been paid, and he needs to return it? $56 billion he's partially been paid, and he can keep what he has, but won't get the rest? Something more complicated?

    9

    U.S. Presidents

    Sharing an Anki deck I made for learning the US presidents. I've always been mediocre at best when it came to remembering them, but in about a week with this deck I can now list them all, in order, including their years in office.

    Card fronts will display either their order, name, or their years in office. Card backs will display all of that, in addition to their official white house portrait, political party, vice president(s), and the president who preceded and succeeded them. Also includes a note for presidents who died in office, detailing how they died. When using the deck I study it by attempting to remember both of the missing pieces of information from the front of the card. I put a fair amount of effort into trying to get the cards to look nice as well, and in particular trying to get elements of the card to stay in place when swapping between front and back - I don't like when things jump around.

    I might share other decks in the future. I have decks I made for US/Canadian/Australian state/province/territory locations and capitals, but for all three of those I used maps from decks other people made, so I'm not sure on the etiquette of sharing something like that. I did make a chemical element deck from scratch that I'm pretty proud of and will probably share at some point, though - I'm just not sure if I'm done tinkering with it yet.

    I'm pretty new to Anki but have enjoyed learning how to create nice decks. If you download this and find any sort of issues or bugs, please let me know.

    0

    In autohotkey, can you daisy chain together hotstrings from different scripts?

    Note that I'm using autohotkey v2, not v1.

    I want to run two different autohotkey scripts. I want to trigger a hotstring in the first script, the output of which ends up being part of the hotstring trigger for the second script. Is this possible?

    Here's a simplified version of my intended workflow.

    Script 1: #Hotstring EndChars \ #Hotstring o #Hotstring ? ::iv::ǐ ::av::ǎ

    Script 2: #Hotstring EndChars \ #Hotstring o #Hotstring ? ::nǐ::你 ::hǎo::好

    So the idea is that I can type niv\ and the first script will convert it to nǐ - then I can immediately type \ and the second script will convert it to 你. So I type niv\\\ and my text goes from niv to nǐ to 你. I can then type hav\o\ and have my text go: h, ha, hav, hǎ, hǎo, 好. So I can do niv\ hav\o and get nǐ hǎo, or I can do niv\\\ hav\o\ and get 你 好. Both writing systems in a reasonably simple format.

    There are reasons I want to set it up like this. The first script has dozens of functions beyond writing in pinyin/chinese, and I share it with another person - so I don't want to add potentially hundreds of random Chinese hotstrings to it, just the special pinyin characters. That's why I'm using two scripts.

    But I also realize I could just make "niv" and "havo" their own hotstrings which go directly to 你 and 好 without the intermediate nǐ and hǎo. I don't want to do this mostly because I think the system I have in mind is prettier - type it correctly in pinyin first, then have it correctly convert to Chinese.

    All of that aside: I've gathered that this is probably possible using some combination of SendLevel and #InputLevel - but I've tried a bunch of different combinations and ideas with it, and haven't successfully had one script trigger another yet. Even in simplified toy scripts, which is a little discouraging. Ideally I'd be able to do this with as few changes to the main script I share with another person as possible - the script that handles the Chinese can be as complicated as it needs to be though. Anyone know how to make this work?

    3
    What's this Bug? @lemmy.ml zkfcfbzr @lemmy.world

    What're these bugs? (Southwest Florida)

    Imgur album: https://imgur.com/a/ikTA97e

    Those photos were taken under extreme magnification and bright light - the actual size is about the size of an uncooked grain of rice. Maybe smaller. This one was killed by freezing to preserve its form.

    In the last few days I've started to see a lot of these - I can find one crawling across my desk every 5 or 10 minutes if I remember to look (Though I can't find where they're coming from at all). They don't move all that fast - they're frankly pretty easy to capture or squash.

    In person I don't think they look very much like ants but in the closeup I think they kind of do. Also hoping they aren't termites.

    Thanks for any help.

    Edit: Here's a video of one scurrying across my desk too: https://imgur.com/a/ZC15gNZ

    1

    Are there any websites that track upcoming cultural events, with a focus on sports and TV?

    For example - if a popular TV show is about to have its season or series finale, or a sport league is about to have its championship game. Are there any websites that track these, without all the noise of less important shows or games, to keep track of?

    ESPN.com does seem to track upcoming sporting events pretty well, but it's not that easy to tell which upcoming games are "big" for the league in question or not.

    5

    Can I replace my shower controls?

    It seems like every shower has its own unique way of controlling water temperature and pressure. Of all the showers I've ever used, no two of which have ever been alike, I like my controls the least. Plus the faucet has started dripping lately.

    Is this likely to be something I can replace on my own, without a plumber? To me, that means: Can I likely do this without damaging the wall, without having to mess with pipes, and without needing to do anything involving words like "hacksaw", "weld", or "plumbing torch"?

    Basically I believe in my ability to buy a faucet and control thingie from Home Depot; to use screwdrivers, allen wrenches, pliers, and regular wrenches; to use things like plumbing tape, lubricants, and caulk; and to remember to turn the water off to the house.

    Would a project like this likely require anything more complex than that? I tend to prefer shower controls that have separate knobs for hot and cold, but I figure going from a one-knob setup to a two-knob setup is definitely going to require reconfiguring the plumbing. Should sticking with a one-knob solution be okay?

    I don't know if it matters but I live in Florida in the US, and this place was built in the 1980s. I doubt this matters, but my current controls work by turning the larger knob left or right for temperature, and the smaller knob for pressure.

    My place does have some annoyances - like the front door is an uncommon size that's difficult to find replacements for at places like Home Depot. Is there any chance of me running into issues like that when it comes to things like the size of the pipe openings?

    Thanks for any insight.

    Edit: Thanks for all the replies. It's pretty clear now that this is something that could very easily end up a lot more involved and time consuming and property damaging than I'm comfortable with.

    29

    Are there any recurring charges (or other downsides) that come with having a driver's license but not owning a car or regularly driving?

    I'm mostly thinking about insurance here. I've been told conflicting information. I live in Florida.

    I live with someone who has a driver's license and a car, but I don't have either. I've avoided getting one because I have no interest in car ownership, and I feel like if I started driving regularly I'd probably die - I have driven before but I really don't think it's something I'd ever get good at.

    It's undeniable that having one would be convenient though - for rare occasions like emergencies at a minimum but also other scenarios.

    I know almost nothing about how this stuff works. If I get a license, am I required to acquire and pay for insurance, even if I don't own a car or regularly drive? Or will the person I live with have to pay more for their insurance? Are there any other costs or downsides associated with it that I might not be thinking of?

    Thanks.

    38

    What is this cat?

    What kind of cat is this? It was taken behind a Chinese food restaurant in southwest Florida.

    The person who took the picture said it's a Bobcat, but other people who've seen it have said it doesn't really look like one, and is probably something non-native. Anyone know for certain?

    10

    Hollow Knight - 6 Years Later.

    Hollow Knight is an incredibly competent game on pretty much all fronts. In my opinion, Hollow Knight is a masterpiece and we will discuss all the things that make it so great in detail in this Hollow Knight retrospective. However - the one thing that I find most fascinating about Hollow Knight is an aspect of the game that is seldom discussed. The most fascinating aspect of Hollow Knight is that it exists in the first place - because to put it mildly - Hollow Knight’s existence should not be possible. Hollow Knight was developed by only three people, in roughly three years. Three people managed to produce a game that looks this beautiful, features a combat system with a skill ceiling this high, crafted a beautiful world this big, wrote lore that deep, and crafted gameplay this fluid. Three people did a job that puts most teams of 60 people that work for half a decade on a game to shame. How did three pull this off?

    In this Hollow Knight retrospective, we are going to investigate this question. We are going to find out how it is possible that Hollow Knight even exists!

    19
    arstechnica.com What’s going on with the reports of a room-temperature superconductor?

    Rumors are flying of confirmation, but the situation is still frustratingly vague.

    What’s going on with the reports of a room-temperature superconductor?

    In late July, a couple of startling papers appeared on the arXiv, a repository of pre-peer-review manuscripts on topics in physics and astronomy. The papers claim to describe the synthesis of a material that is not only able to superconduct above room temperature, but also above the boiling point of water. And it does so at normal atmospheric pressures.

    Instead of having to build upon years of work with exotic materials that only work under extreme conditions, the papers seem to describe a material that could be made via some relatively straightforward chemistry and would work if you set it on your desk. It was like finding a shortcut to a material that would revolutionize society.

    The perfect time to write an article on those results would be when they've been confirmed by multiple labs. But these are not perfect times. Instead, rumors seem to be flying daily about possible confirmation, confusing and contradictory results, and informed discussions of why this material either should or shouldn't work.

    In this article, we'll explain where things stand and why getting to a place of clarity will be challenging, even if these claims are right.

    11

    So, how many lemmynsfw.com communities have you blocked?

    I just reached 112 myself.

    I'm very much awaiting a time when users can block specific instances. I still don't want to check the option to hide NSFW content, because I do want to see NSFW content that may show up on non-porn communities. Just not really interested in seeing so much porn in All.

    You can check on your settings page, btw, in the Blocks tab - count quickly with Ctrl+F.

    191

    Why can youtube links no longer open as in-line embeds?

    About two weeks ago I believe there was some sort of update that let posts that are just youtube links open in-line on the lemmy feed as embeds, by clicking the post thumbnail. This was pretty great.

    It seems to be back to the old behavior now, where you can't do that anymore. Why? What happened?

    0
    arstechnica.com Why AI detectors think the US Constitution was written by AI

    Can AI writing detectors be trusted? We dig into the theory behind them.

    Why AI detectors think the US Constitution was written by AI
    6

    Why does my cactus grow so tall it can't stand on its own?

    I've had this cactus for a few years, and for a while it's had a problem where it grows so tall that it can't stand up. You can see in the photo that I have it tied to some stakes to keep it upright - if not for those it would literally uproot itself in under a day.

    Why might this be? I don't know all that much about houseplants. I water this cactus (and my other cactuses, which are not the same species) once every two weeks, about 1 to 1.5 cups of water. I use some cactus fertilizer like twice a year, pretty inconsistently. It lives perpetually indoors with those three light rods visible in the picture as its sole light source (On for 12 hours a day).

    Given how little I know about proper plant care, I'm sure none of that is ideal - but is any of it the obvious culprit for why this happens? What should I be doing better?

    Thanks for any help.

    P.S. Those two nodules just above the lower string are brand new, and it's never branched out like that before - what should I expect them to become? Round bulbs? Branches? Flowers? Nothing at all? The tip top of the cactus being white is also very recent.

    19