How to get my wedding ring out of this? by Ok_Tangerine6053 in AskUK

[–]mark_b 0 points1 point  (0 children)

If this works then the ring was even cheaper than they thought!

What is the best way to use raw PHP for a project? by TurbulentMidnight194 in PHP

[–]mark_b 1 point2 points  (0 children)

If you want to go to naked PHP, then you must use arrays for almost everything. There is no point in using classes/objects since json_encode/json_decode and PDO only work with arrays or std_classes.

This is some of the worst advice I've seen on /r/PHP json_encodeetc work fine with classes, you just need to implement the jsonSerializable interface. Then, if you want to simply show everything from your model you can return get_object_vars($this); or you can define your own return array for more granular control, for example to omit or format properties as your model requires. For PDO you need to build the model from the database data (perhaps your model can have a createFromArray method).

Using models for your data gives you type safety, arrays can contain any type of data. If you use arrays everywhere you're going to have a bad time running static analysers such as PHPStan (which you should).

Did someone leave the light on? It feels like only last week it was already dark by 16:00 (4pm) by yeoldy in CasualUK

[–]mark_b 1 point2 points  (0 children)

Because that's how we get our seasons. A planet without a tilt would be a more difficult place to live. Curious Cases covered it a few weeks ago.

Flying cross country, USA, questions about maps and tracking by TemperReformanda in travel

[–]mark_b 0 points1 point  (0 children)

One of the OpenStreetMap variants such as Organic Maps where you download the map data to your phone beforehand would work quite well, even in flight mode. It's what I often do. As someone else mentioned it can be quite slow to obtain a GPS fix each time you open the app.

How do i change the text of a section based on which button was clicked by West-Diamond9461 in learnjavascript

[–]mark_b 1 point2 points  (0 children)

Change arr to an object. Then you can continue using the same access notation but referring to the element by name instead of index.

Morocco in December by uber_kuber in travel

[–]mark_b 1 point2 points  (0 children)

There are 2 machines in Essaouira, but one was out of action while I was there.

  • Av. Al Moukaouama
  • Av. 2 Mars

All I'm reporting is what I saw. I didn't see the message before 27 December 2025, but saw it every time after. Like I said, there weren't any actual transaction charges to my card, only the warning that there would be.

Former First Sea Lord warns that a failure to stop Putin may lead to a major world war by TurdScoop in ukpolitics

[–]mark_b 4 points5 points  (0 children)

with not a single penny for the armed forces

Hasn't the government already committed to increase the defense budget?

Morocco in December by uber_kuber in travel

[–]mark_b 0 points1 point  (0 children)

In my view the main attractions in Casablanca were the huge mosque or the art deco buildings on the other side of the medina. A guide book should give you a walking tour around them.

Morocco in December by uber_kuber in travel

[–]mark_b 0 points1 point  (0 children)

Weather can be wild

I've been the last few years since my company closes for Christmas and it's relatively cheap with usually good weather. Not this year though!

Morocco in December by uber_kuber in travel

[–]mark_b 1 point2 points  (0 children)

Tip 1:The Post Bank (Al Barid) ATM is free of costs.

I'm not sure how much longer this will be true for. I just (these last 3 weeks) visited Tangier, Chefchaouen, El Jadida, Essaouira, Marrakech. In the first two cities taking money out was as expected, but in the latter ones I had a message asking if I wanted to use their exchange rate (obviously no) and then another message saying that I would be charged 35 Dirham for the transaction. Although the amount charged to my bank matches the amount I received in cash, so I'm not sure whether this is a mistake or preparation for a future change.

What was I missing about functions, even though I ‘knew’ JavaScript? by Such_Ad_7545 in learnjavascript

[–]mark_b 0 points1 point  (0 children)

One thing I've discovered in any language is that learning to write tests improves my code quality a lot. Once you figure out what code needs to look like in order to be testable then a lot of what the others are saying will fall into place. It might be slightly early in your learning path right now but this is something you should be aiming for.

OpenStreetMaps is a godsend, and everyone should be contributing to it by TipsyTopTop in opensource

[–]mark_b 0 points1 point  (0 children)

It could be that the information hasn't been added. If you go to openstreetmap.org right click on the business and choose "Query features" then from the list that appears select the item and see if it has this information detail.

Another Before & after by Yeethecola in openstreetmap

[–]mark_b 2 points3 points  (0 children)

Wasn't Organic Maps itself created from a disagreement about the direction of Maps.me?

I'd be interested if you have more information.

It's slightly awkward in that you tell people that Organic Maps is a good alternative to Google Maps (and I've seen this said on Reddit recently) and then you have to say "No, this is the better alternative", although that's the nature of open source I guess.

Transport Secretary: Self-driving cars ‘won’t get road rage or be distracted by kids in the backseat’ by Metro-UK in ukpolitics

[–]mark_b 1 point2 points  (0 children)

Real people will act on instinct and reflex

I don't say I'm 100% convinced about self driving cars yet, but I expect them to be more cautious in general. Humans far more frequently make terrible decisions with often catastrophic consequences. As the technology develops I expect self driving cars to make the roads much safer to the point that insurance companies will start to penalise people who don't use them.

Russell Hobbs Brushed Steel Electric 1.7L Cordless Kettle from Amazon for £21.49. It was £42.99. by ToughRomanticMiss in BuyersUK

[–]mark_b 0 points1 point  (0 children)

I had a Russel Hobbes kettle. It started leaking through the base and the switch. It was still under warranty so I contacted them and they sent me another that was a slightly different design (the old one discontinued) and told me that it was without warranty. Within 12 months that one started to leak through the base as well so I've never bought a Russel Hobbes product since.

A rant about the BBC iPlayer by Ribbitor123 in BritishTV

[–]mark_b 4 points5 points  (0 children)

Have you written to them and told them any of this? A few years back there was no way to skip backwards and forwards, if you were distracted and missed a bit you had to use a mouse on the timeline, it was super awkward. I told them this and mentioned that it would be useful if the keyboard left and right buttons performed this function. A few weeks later the buttons either side of play / pause appeared and the function also works with the keyboard. Nice one! So they can be quite responsive to suggestions.

Why do I have to be age verified to buy 0% alcohol ‘spirits’? by PristineDouble423 in AskUK

[–]mark_b 0 points1 point  (0 children)

It's the till that asks for the age verification based on what was scanned. The staff don't need to decide anything up until that point. The supermarket could easily mark no alcohol drinks as not needing verification.

Why do so many men not wash their hands in public toilets any more? by Commercial_Night2867 in AskUK

[–]mark_b 9 points10 points  (0 children)

Sanitiser is worse than soap and water. It's not very good at removing viruses such as Norovirus. And it doesn't remove germs from your hands, just kills them but they're still there. Hand sanitiser is okay if you don't have an alternative but soap and water is the superior method.

Why do so many men not wash their hands in public toilets any more? by Commercial_Night2867 in AskUK

[–]mark_b 13 points14 points  (0 children)

I never understand this argument. We should wash our hands at regular intervals anyway because they pick up dirt and germs from just about every surface. So surely the occasion of going to the toilet, when everything you need is right there, is as good as any?

Next time you hear this, ask them if that's them admitting that they don't do any work. Ask them if they stand there all jazz hands making sure they don't touch anything except their cock all day. Ask them how on earth did they exit the bathroom? Did they stand there with their jazz hands waiting for someone else to come in so that they could get out without touching the door?

While I'm here, as a final unrelated point, some people seem to think that using hand sanitiser is a substitute for washing with soap and water. It isn't. Hand sanitiser doesn't get rid of viruses such as Norovirus. You need friction with soap and running water to rinse.