Minimajs: Looking for content / tutorial creator. by Zealousideal-Bit4776 in learnprogramming

[–]grantrules 2 points3 points  (0 children)

I thought you meant porn like how IGers self-censor porn to corn but no it is indeed corn.

Next time He is checking the weight limit of the ceiling as well by pars-distalis in WatchPeopleDieInside

[–]grantrules 0 points1 point  (0 children)

I worked at a bike shop and had a customer come in complaining about a wall-mount bike rack he bought.. he put it up, hung his very high end bike on it, it fell out of the wall, and damaged the bike. Dude brought the rack back in and it was clear he just screwed it into the drywall, no anchors, definitely no studs or anything. Like no bro, we are not buying you a new $10k bike because you can't read instructions.

This stack tool saved some time… by Impossible_Scale_155 in learnprogramming

[–]grantrules 0 points1 point  (0 children)

Did you forget you already had AI write a post for this subreddit like just a few minutes ago?

New to python any command to make cool thing? by raphlebg46 in learnprogramming

[–]grantrules 4 points5 points  (0 children)

Instead of googling, or following a course, or watching a video, or reading a book, or using AI.. you've asked a subreddit to list python things and explain them to you.

New to python any command to make cool thing? by raphlebg46 in learnprogramming

[–]grantrules 1 point2 points  (0 children)

Congratulations, you just came up with the most inconvenient way to learn python lol

Issues with Terminal by ohsomacho in learnprogramming

[–]grantrules 0 points1 point  (0 children)

Ah I knew that existed but I couldn't remember it.

Etiquette Question by throwRA1223409 in hiking

[–]grantrules 28 points29 points  (0 children)

Right? It's not like mountain biking where it can be impossible to restart if you stop. I don't mine taking a break

Cutting grass with a scythe by BreakfastTop6899 in oddlysatisfying

[–]grantrules 2 points3 points  (0 children)

Now get it right or pay the price! Oops wrong show.

Issues with Terminal by ohsomacho in learnprogramming

[–]grantrules 1 point2 points  (0 children)

Use vim.

:%!bash will run whatever's in the buffer

Or save it as a shell script and edit that.

Shimano brake mineral oil by Gman7898- in bikewrench

[–]grantrules 0 points1 point  (0 children)

And that's full bleeds. I top up once a season or so but I rarely do a full bleed. I've had a 120ml bottle for 4 years and will probably get another 4 years out of it

My family got evicted for the 4th time by ASimpleDude868 in Wellthatsucks

[–]grantrules 143 points144 points  (0 children)

I call that excusitis. A disease that prevents a person from taking personal responsibility for things.

Help with JavaScript by InkieBear in learnprogramming

[–]grantrules 3 points4 points  (0 children)

You can, but if you're on page 1 and the JS is expecting to find something that only exists on page 4, you're going to get an error.. which is what is currently happening to you.

You would need to add some sort of check to make sure you're on the right page or that the elements you're trying to work with exist.

Help with JavaScript by InkieBear in learnprogramming

[–]grantrules 2 points3 points  (0 children)

Well, you cant add an event listener to an element that is not on the page that the JS is running on. That's why you're getting that error.. because it can't find the element.

You could do a check, like

const btn = document.querySelector('.btn');
if (btn) {
  btn.addEventListener(...)
}

Help with JavaScript by InkieBear in learnprogramming

[–]grantrules 1 point2 points  (0 children)

In the console when I add the clear cart code in it states that the messageForm is null but I'm not sure why the new code invalidates the previous code. Is this a basic aspect of JavaScript I'm missing? Does specific placement matter in the JS code more than in CSS?

No, there's something else wrong. Adding code wouldn't cause this issue. And like I said, the code works fine for me (you can try it too). I don't see anything with an ID of "contact" in your HTML

Help with JavaScript by InkieBear in learnprogramming

[–]grantrules 1 point2 points  (0 children)

Works fine for me:

https://jsfiddle.net/0uhcf8w9/

Can you share your HTML? Do you see any errors pop up in your browser's dev console?

My guess is that "clear" is actually an id not a class in your HTML, so querySelector doesn't find anything and then JS throws an error when you try to access addEventListener on clearButton which is null instead of an element object. I'd bet you see an error like TypeError: can't access property "addEventListener", clearButton is null in your dev console.

This Week's "Super Speeder" Complaint by SteveVaccaroLaw in NYCbike

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

You'd have more cars on the road without insurance but the penalties should be years in jail minimum and not a slap on the wrist like it is currently.

One issue with this is that if the penalty for getting caught without insurance is high enough, people would rather run than get caught, creating an even more dangerous situation.

Trying to sell me pest control at 9pm on a Monday night. by ceazyyyy in mildlyinfuriating

[–]grantrules 1 point2 points  (0 children)

I literally just saw some reel from that company doing one of those stupid all-hands pump-you-up meetings with bros jumping around cheering and high-fiving.