WTF Bites
-
As for
currentTarget
andtarget
having seemingly switched names: you can either blame early IE or W3C for that, as per usual.
-
@zecc They would make less sense the other way around, because as the event is handled (multiple handles may be called), the
target
still the same and thecurrentTarget
is changes for each handler.
-
-
something CSS should not have
When you have a hammer in your hand, everything looks like a nail…
-
When you have a hammer in your hand, everything looks like a
nailthumb…FTFY
-
currentTarget is by definition the element to which you attached the event listener.
Yeah, I acctually realized that must be the case just after posting but eh, editing
it appears Firefox doesn't expect anyone to put elements inside a <button>
What, in 2018? We've been forced to do that for last 10 years in order to appear "modern". And no, I'm not making it an anchor, it's bad enough I need click handlers on everything, it's a freaking button!
-
What do you think is wrong with this?
.someclass, .someclass * { display: flex; align-items: stretch; align-content: space-between; justify-content: space-between; flex: 1; align-self: center; }
Hint
New selector now reads:
.someclass *::not(script)
Of course technically the browser just following the rule to a tee, but... Just do what I mean.
-
.someclass, .someclass *
and
.someclass *::not(script)
are just as wrong. The
display: flex
should only be set for the parent, not the children. If the children are themselves also flex parents, they should just specify the class too and not get it from a wildcard.
-
@bulb Meh. I wouldn't even have put the script in the middle of the HTML if it weren't just a quick and dirty experiment.
-
@bulb Meh. I wouldn't even have put the script in the middle of the HTML if it weren't just a quick and dirty experiment.
?
-
-
@bb36e This is not a WTF. Think about what mayonnaise is: egg, oil, salt, sugar, usually an acid to make it tastier. Cake normally contains all of those things.
-
@anotherusername said in WTF Bites:
usually an acid to make it tastier
Vinegar. Vinegar does not belong in a cake.
-
@hardwaregeek counterpoint: wacky cake. It's leavened with vinegar and baking soda and does not include eggs or butter. It's still pretty good.
-
@benjamin-hall Never heard of it. It sounds whacky — in a not good way.
-
@hardwaregeek said in WTF Bites:
@benjamin-hall Never heard of it. It sounds whacky — in a not good way.
It's actually quite good. As long as you use the right concentration of vinegar (not all vinegar is 5% acetic acid)...
-
@hardwaregeek said in WTF Bites:
@anotherusername said in WTF Bites:
usually an acid to make it tastier
Vinegar. Vinegar does not belong in a cake.
ORLY.
Show me a chemically-leavened cake that doesn't have acid in it, please.
-
@anotherusername said in WTF Bites:
Show me a chemically-leavened cake that doesn't have acid in it, please.
There's many other sources of acid though. Lemon and milk are common ones.
-
@dkf milk is acidic? For real?
-
@lucas1 IIRC yes. Enough to activate the rising agent anyway. It doesn't take all that much. (I think it might be a buffered acid, but that still works here.)
-
@dkf I had the impression it was whatever water was but I could put it in my tea.
-
@anotherusername said in WTF Bites:
Show me a chemically-leavened cake that doesn't have acid in it, please.
There's many other sources of acid though. Lemon and milk are common ones.
Or buttermilk.
But perhaps even more commonly, baking powder... which is actually a bit of a cheat, since it has both acid and base, in exactly the right proportions to react properly. Of course, if you don't have baking powder, you can make your own substitute by mixing baking soda (base) and cream of tartar (acid) in a ratio of about 1:2. It won't be "double acting" baking powder, but it'll do in a pinch.
@dkf milk is acidic? For real?
Very slightly acidic. Also, the older it gets, the more acidic it becomes, until it curdles (or you can curdle it intentionally, by adding an acid to lower the pH).
-
@anotherusername said in WTF Bites:
@lucas1 said in WTF Bites:
@dkf milk is acidic? For real?
Very slightly acidic. Also, the older it gets, the more acidic it becomes, until it curdles (or you can curdle it intentionally, by adding an acid to lower the pH).
Even before it curdles, the taste of sour — or starting to sour — milk is due to lactic acid (lactic==milk).
-
Magento of the day:
When a customer is logged in and going through his account pages, Magento saves some data in the session on page load:
$parts[self::VALIDATOR_PASSWORD_CREATE_TIMESTAMP] = Mage::helper('customer')->getPasswordTimestamp($this->_data['visitor_data']['customer_id']); $parts[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] = time() + $this->getCookie()->getLifetime();
On next page load, that data is validated for sanity:
if ($validatorData[self::VALIDATOR_PASSWORD_CREATE_TIMESTAMP] > $sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] - $this->getCookie()->getLifetime() ) { return false; }
When a customer saves his account details, Magento also saves this fact:
$customer->setPasswordCreatedAt(time()); // even if I didn't touch the password
Everything is fine as long as the code before
setPasswordCreatedAt()
runs instantly…If there's any delay between the page load and
setPasswordCreatedAt()
(e.g. you attached a debugger to inspect the submission process, or you just got unlucky and the clock rolled over to the next second), the form submission will still go through, but on next page load Magento will notice thatPASSWORD_CREATE_TIMESTAMP
is outside the valid range, log you out, andthrow new Mage_Core_Model_Session_Exception('')
with no meaningful information just because.
-
This has been bugging me for years: when I log into Gmail from a new device, I get an email about it. Immediately. That I can read from the device I've just logged into. And I can delete it too. What's the point then?
-
@gąska it's also in your account security page.
-
@pie_flavor OK, but what's the point of email?
-
but what's the point of email?
You get a notification right away on your phone
-
@timebandit I get a special notification about new device anyway. Whenever I log in from new device, my phone shows the notification about mail about new device, and a notification about new device.
-
my phone shows the notification about mail about new device
Just mark it as spam
-
This has been bugging me for years: when I log into Gmail from a new device, I get an email about it. Immediately. That I can read from the device I've just logged into. And I can delete it too. What's the point then?
I'm pretty sure it also sends the same email to the recovery email address that you've associated with your Google account. The person logging in would not be able to delete that, unless they also had control of the account that you used for the recovery email address.
Plus, like @TimeBandit said, the email would generate a push notification to your mobile devices, even if they deleted it right away.
-
@anotherusername said in WTF Bites:
This has been bugging me for years: when I log into Gmail from a new device, I get an email about it. Immediately. That I can read from the device I've just logged into. And I can delete it too. What's the point then?
I'm pretty sure it also sends the same email to the recovery email address that you've associated with your Google account.
That part is sensible. Sending it to the account that just logged in is what I don't get.
Plus, like @TimeBandit said, the email would generate a push notification to your mobile devices, even if they deleted it right away.
I'm pretty sure these push notifications go away as soon as you read them on any other device. For example, the one you just logged into.
-
@anotherusername said in WTF Bites:
the email would generate a push notification to your mobile devices,
It does, but so does the actual notification that they also send to the device at the same time.
-
@anotherusername said in WTF Bites:
the email would generate a push notification to your mobile devices,
It does, but so does the actual notification that they also send to the device at the same time.
Yes. It's incredibly amusing because forever ago I set an alt account to be the recovery account for my primary, and vice versa (bad idea, I know) and whatever I log into it I get no less than two emails, notification, and a text (I think). Ping plug ping ping pong!
-
@anotherusername said in WTF Bites:
I'm pretty sure it also sends the same email to the recovery email address that you've associated with your Google account.
It does.
-
I'm pretty sure these push notifications go away as soon as you read them on any other device. For example, the one you just logged into.
I'm pretty sure they don't.
That part is sensible. Sending it to the account that just logged in is what I don't get.
You're more likely to actually get the notification from that email address. You might not have your backup account signed in / check it as often.
so does the actual notification that they also send to the device at the same time
If you have an Android device and your Google account is connected to it, yeah. If you don't, you're not going to get that, but you might still get a ding when the email arrives.
-
Translation: the new password is too simple.
And nowhere at all does it specify any requirements (lengths, characters, whatsoever) of the password. Ugh, WTF, I just banged the keyboard at some point and it never changed to acceptable.
But hey, this is acceptable:
Educated guess: they have a list of bad passwords and do substring matching. So
qetu2468
would be fine butpasswordWnciorZbsp47cSnegkt1oNLsWwn6djgtiy93
is too simple.
-
So the space ran out on my C: drive, and after some detective work I found who the culprit is.
Curse you, Apple! There seems to be this bug where iCloud Drive will just keep downloading these staging files but never removing them, happily keeping going until the folder is full. The files are useless and can be removed without issue. Also, the bug has been present since 2016 at least, with reports I found stating 900 GB staging directories, because why automatically delete the old files, or keep a maximum size for the directory? The files themselves are small, under 1 MB each. But they do add up...
-
@atazhaia it's punishment for having the temerity to use a non apple product to talk to their holy servers.
-
- Attempt to enter DOB on mobile:
- Swipe right 200+ times to get to my birth year
-
@bb36e this seems to be a firefox mobile WTF
-
- Attempt to enter DOB on mobile:
- Swipe right 200+ times to get to my birth year
Can you not tap the "2018" to get to the year selection view?
-
-
this seems to be a firefox mobile WTF
Because nobody ever wants to talk about dates more than a few months away from the current day?
-
@tsaukpaetra said in WTF Bites:
Can you not tap the "2018" to get to the year selection view?
nop
K just had to try it for myself.
Conclusion: what assholes! Was there anything particularly wrong with the native date picker pop-up that just had to be solved with a crappier implementation?
-
@gąska
They also CC your security email address.
-
Found while looking for an airbnb in Switzerland:
-
Swipe right 200+ times to get to my birth year
This was my complaint on Google Calendar up until yesterday, when I looked at the keyboard shortcuts (which I never use) and saw that pushing g brings up a box to type an arbitrary date. I'm still annoyed there's no way to do this in the page GUI.
-
@mzh It's not so critical for a calendaring application; most events are no more than a few months away (and entries for birthdays are typically reaped from your contacts).
-
I'm still annoyed there's no way to do this in the page GUI.
Huh, never had to seek more than a few years (and you can select year view from the drop-down).