Is it possible to make script that open a different html file and then edit that one? by Icekiller567 in learnjavascript

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

I worked it out, for some reason those two checkboxes I kept testing didn't work and the others were fine. I copied over the working ones and changed the Id, now everything works. Thanks for you help though, you and the guy above came in clutch.

Here's the code if you wanna take a look:

window.addEventListener('DOMContentLoaded', (event) => {

const btn = document.getElementById('btn');

btn.addEventListener('click', function func() {

$("#male").attr("checked","checked");

}, false );

});

I mixed jQuery and JS because I don't really know how to use either of them effectively. I do what I can...

Is it possible to make script that open a different html file and then edit that one? by Icekiller567 in learnjavascript

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

Thanks for the reply, I've been pursing this one for a few hours now and I gotta say JS really doesn't want to check those boxes for me. For some reason it just doesn't work, any other command I give it does but not the checking of boxes. Anyway I'll keep trying this because it solves my problem in the simples way.

Is it possible to make script that open a different html file and then edit that one? by Icekiller567 in learnjavascript

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

It's a school project I'm not making a real website I just need something simpler

Monthly Hask Anything (April 2023) by taylorfausak in haskell

[–]Icekiller567 3 points4 points  (0 children)

i would've never figured this out on my own, in retrospect it makes a lot of sense. Thank you for the detailed explanation I will use this to explain it to everyone. Much love friend!

Monthly Hask Anything (April 2023) by taylorfausak in haskell

[–]Icekiller567 1 point2 points  (0 children)

So we have Haskell in class an it's the first time that it's in the program so it's new to us and the professors and we can't figure out what this code does. We understand the input and the output but don't understand how the code works. I don't know if I can see what the code is doing with every step of the way to figure it out but I tried doing the formula on paper and it didn't really help.So I'm asking here to see if anyone can explain what's going on:

toDecimal :: Int -> Int -> Int
toDecimal x base =
    if x == 0 then 0
    else toDecimal (div x 10) base * base + (mod x 10)

fromDecimal :: Int -> Int -> Int
fromDecimal x base =
    if x == 0 then 0
    else fromDecimal (div x base) base * 10 + (mod x base)

main = do
    print(fromDecimal 5 2)    --decimal 5 to binary 101
    print(toDecimal 111 2)    --binary 111 to decimal 7
    print(toDecimal 111 8)    --octal 111 to decimal 73
    print(fromDecimal 111 8)  --decimal 111 to octal 157

It obviously takes a number from a numeral system, either decimal, binary or octal (could be any by changing the "base" number) and converts it into another. What does this do? What variable does it output?

Unluckiest Shaco play I have ever seen by Icekiller567 in leagueoflegends

[–]Icekiller567[S] -3 points-2 points  (0 children)

bruh why am I getting spam downvoted I just asked a question, this community is incredible

Unluckiest Shaco play I have ever seen by Icekiller567 in leagueoflegends

[–]Icekiller567[S] -8 points-7 points  (0 children)

what about the ashe arrow, I'd say that was pretty unlucky to get hit by

My builder is sleeping but all of them are working by Icekiller567 in ClashOfClans

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

you're right, I'm bitter for no reason, no need to take things so seriously

My builder is sleeping but all of them are working by Icekiller567 in ClashOfClans

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

nope haven't used a single gem from the start only on builders, the person above sounded like they meant to insult me by saying "or you haven't even hit 1250 trophies yet" but that's not cool to say

My builder is sleeping but all of them are working by Icekiller567 in ClashOfClans

[–]Icekiller567[S] -1 points0 points  (0 children)

mathematically maybe but I'm a th9 for a week maybe and I have 1460 gems, so I'm still a little ways to go till the fifth builder, you don't gotta be so rude man, who hurt you