WTF Bites
-
@pie_flavor Sounds like something from the analog age that should be impossible in this century.
Maybe he's using a VGA connection? Projectors don't get replaced often, and VGA is still pretty common for this usage.
It could even happen with a purely digital signal, if the sync detection fails (unlikely, but still possible).
-
@Zerosquare VGA would be my guess too. Cheap analog decoder circuits don't detect v-sync properly sometimes. I have a monitor that does that frequently. Toggling the KVM switch back and forth again generally causes it to sync up the signal correctly the second time.
-
@anonymous234 said in WTF Bites:
Microsoft: "confirmation dialogs should never use OK/Cancel, they should use the verbs of the actions they do"
Also Microsoft: "no, we won't extend the MessageBox class to let you use custom strings for the buttons, go create your own lol"INB4 Microsoft changes the link.
-
@topspin Jeez, if only they'd offer that directly from .net... and maybe advertise it somewhere. Then people might actually use it.
-
@Zerosquare Yeah, it was VGA.
-
@anonymous234 said in WTF Bites:
Microsoft: "confirmation dialogs should never use OK/Cancel, they should use the verbs of the actions they do"
Also Microsoft: "no, we won't extend the MessageBox class to let you use custom strings for the buttons, go create your own lol"INB4 Microsoft changes the link.
Cool, now how do you call that from VBA?
kidding not kidding...
-
@anonymous234 said in WTF Bites:
@topspin Jeez, if only they'd offer that directly from .net... and maybe advertise it somewhere. Then people might actually use it.
Much like the code pieces you need to adjust what part of the window gets shown in the live taskbar preview thing, or the auto-restart thing that prompts you to automatically restart the app if it crashed, or... ... ...
-
Shine on, you crazy elephpant.
#ifndef HAVE_REALPATH #define realpath(x,y) strcpy(y,x) #endif
The
realpath()
function is part of POSIX, meant to normalize the filesystem path, resolve symlinks, removefoo/../
fragments, etc. What should be done if we're running on a platform that doesn't have it? Ehhhh, juststrcpy
the path that was passed in. What's the worst that could happen?Source: /r/lolphp
(I suppose this is only left in as the worst-case scenario handle for some bizarre environment. Doesn't make it any less funny IMO.)
-
PHP, aka the "On Error Resume Next" language.
-
@Zerosquare Assuming, of course, scream.enabled is set to false in php.ini.
-
Microsoft.WindowsAPICodePack
.Dialogs.TaskDialog
, and add severalTaskDialogCommandLink
s. Microsoft created and released it in the Vista/7 days, so it's now Retired Content, but it's still good.
-
@Zerosquare said in WTF Bites:
PHP, aka the "On Error Resume Next" language.
PHP will stop (and give you a blank page) on any fatal error, so no.
You're thinking of Visual Basic
-
@TimeBandit: I was under the impression that many things that are fatal errors in other languages are "oh well, better carry on anyways" in PHP. But I may be mistaken.
-
Status: dreams last night were so wild I willingly Do Not Save-d them.
-
@TimeBandit said in WTF Bites:
PHP will stop (and give you a blank page) on any fatal error, so no.
Yes, but on warnings, it defaults to giving the user information they shouldn't have and then proceeding onward...
-
{signing up for an account on a dinky little electronics store site} The usual email, a secure password and-- huh?
ERROR! Your password is too weak.
Why?
It must have at least one upper case
It does
It must have at least one number
It does
It must have at least one special character
It does
It must be at least twelve characters long
wait wat
I'm disabled the Submit button now
Motherfucker, my BANK doesn't even have that requirement. You're some two-bit electronics website I'm only signing up for to get price alerts.
security is very important
Fucking really, huh? Well... F12 <buttondisabled=disabled/> aaaand click
Form submitted. Welcome to Dickshit's Electronics
Client-side only. Great security, assholes.
-
@anotherusername said in WTF Bites:
Yes, but on warnings, it defaults to giving the user information they shouldn't have and then proceeding onward...
That should never be enabled on production servers
-
@TimeBandit said in WTF Bites:
@anotherusername said in WTF Bites:
Yes, but on warnings, it defaults to giving the user information they shouldn't have and then proceeding onward...
That should never be enabled on production servers
If it should never be enabled on production servers, then it shouldn't be enabled by default on production servers.
-
@anotherusername said in WTF Bites:
If it should never be enabled on production servers, then it shouldn't be enabled by default on production servers.
I agree that it should default to NOT be enabled.
OTOH, those who can't properly configure a production server should not be installing one
-
@TimeBandit OTOH, the PHP language was designed for those who can't properly configure a production server to be able to install one.
-
-
@pie_flavor said in WTF Bites:
Assuming, of course, scream.enabled is
set to falsenot set to true in php.iniPHP defaults to being “helpful” not helpful.
-
@TwelveBaud said in WTF Bites:
Microsoft created and released it in the Vista/7 days, so it's now Retired Content
MessageBox is from Win95 or even earlier, though. I'm sure TaskDialog was supposed to supersede it.
-
@Lorne-Kates said in WTF Bites:
Motherfucker, my BANK doesn't even have that requirement. You're some two-bit electronics website I'm only signing up for to get price alerts.
I mean, I hate it when websites don't accept
123456
as my default password when I don't give a shit about the account to begin with (I wouldn't include shops in this, of course, even if I never intend to actually shop there), but comparing with banks is not appropriate. Banks should have the highest security but actually their password requirements are ridiculously weak.
-
How the fuck does
cron
actually work? Or bash for that matter.I've got a script I want to run and I swear I tested that it works under cron on Monday (setting it to run two minutes from now until I got it working), but today it's not working anymore. How?
I know that cron works under a stupidly small environment, so my PATH includes only/usr/bin:/bin
, but I run all my cron tasks underbash -l
to get my normal environment. That sets up a full PATH with all directories including e.g./usr/local/sbin
and${HOME}/bin
yet, magically, it is missing exactly/usr/local/bin
.:fliptable.png:
-
@TwelveBaud said in WTF Bites:
Microsoft created and released it in the Vista/7 days, so it's now Retired Content
MessageBox is from Win95 or even earlier, though. I'm sure TaskDialog was supposed to supersede it.
Supposed to, but they immediately swept under the rug unless you hunted for it.
-
How the fuck does
cron
actually work? Or bash for that matter.I've got a script I want to run and I swear I tested that it works under cron on Monday (setting it to run two minutes from now until I got it working), but today it's not working anymore. How?
I know that cron works under a stupidly small environment, so my PATH includes only/usr/bin:/bin
, but I run all my cron tasks underbash -l
to get my normal environment. That sets up a full PATH with all directories including e.g./usr/local/sbin
and${HOME}/bin
yet, magically, it is missing exactly/usr/local/bin
.:fliptable.png:
I wonder this as well, it's screwing with the ability of one of my scripts to gate out files from automatic check-in to perforce.
-
I run all my cron tasks under bash -l to get my normal environment
I prefer to write the exact environment I need in the shell script that I run; that's a lot more reliable.
The cause of your problem might be an update to cron that is being interpreted by bash as being a request to run in privileged mode (!!!) which disables the
-l
option. Or it could just be a weird permissions issue. Logging the output ofid -a
to a file might help you figure out what is going on. (If you're lucky, mailing of the output of cron is working. Alas, it's broken most of the time because antispam…)
-
I run all my cron tasks under bash -l to get my normal environment
I prefer to write the exact environment I need in the shell script that I run; that's a lot more reliable.
The obvious, easy fix was to append to PATH directly in my script. But I was still wondering why I needed to do that in the first place, since
/usr/local/bin
seems to be as much of a default system directory as thesbin
variant.The cause of your problem might be an update to cron that is being interpreted by bash as being a request to run in privileged mode (!!!) which disables the
-l
option.Holy fuck, what?
Although I don't think that's the case here, running it directly vs. running it withbash -l
does give me different environments, just apparently not all that I need.Or it could just be a weird permissions issue. Logging the output of
id -a
to a file might help you figure out what is going on.Not sure how to interpret that, but I see no difference when run from shell or from cron.
(If you're lucky, mailing of the output of cron is working. Alas, it's broken most of the time because antispam…)
Mailing does work, but otherwise there's still file redirection for troubleshooting.
I'll file it under: who knows what .*rc files are loaded when, it's a mystery
-
@Zerosquare said in WTF Bites:
PHP
"PHP"? What's that? I know that PHB stands for "Pointy Haired Boss" at Dilbert's place of work.
So, "PHP" could be a "Pointy Haired Programmer"?
Or is it something totally different?
E.g. a "Pink Hot P..."
No, this is not the NSFW thread!
-
-
@BernieTheBernie it stands for Psychological Horror Programming
-
Edit: wait, maybe I'm thinking of someone else...
-
I was riding the train this morning and saw a Windows Error Reporting dialog. Lulz.
But that's not all! Zoom, enhance!
Why hello there, Windows XP on my train!
-
@TwelveBaud said in WTF Bites:
I was riding the train this morning and saw a Windows Error Reporting dialog. Lulz.
Am I seeing right? Is that Windows XP "something went wrong [send report to Microsoft] [don't send]" dialog window? Long time no see, old friend.
But that's not all! Zoom, enhance!
Why hello there, Windows XP on my train!...wait, you didn't recognize it from dialog alone? Kids these days...
-
@anotherusername said in WTF Bites:
Yes, but on warnings,
it defaults tolazy systemadmins who misconfigure their INI files wind up giving the user information they shouldn't have and then proceeding onward...FTFY. Output warning (or error) information has been off by default in PHP for at least 10 years. Probably more.
Stupid people & WordPress installers (but I repeat myself) turn it on to make debugging easier, without consideration for "hey we shouldn't send that from a production server and maybe I should check my log files instead"
-
@TwelveBaud
Well, I mean, they're so busy spending money on repairing the tracks, they can only afford pirated versions of Windows, so they're stuck on XP.
-
@izzion Windows 7 piracy is actually easier than XP piracy. And your system is much safer (as much as a pirated system can be).
-
@izzion Windows 7 piracy is actually easier than XP piracy. And your system is much safer (as much as a pirated system can be).
And if you can do Windows 7,you're likely also to be able to do 10....
-
@Tsaukpaetra but why would you?
-
@TwelveBaud
Too much technological development is how you get these guys on your train:
-
@Tsaukpaetra but why would you?
-
-
-
e: The red x boxes are part of the original error message dialogs I saw.
-
wizard
-
@hungrier Context, Ben?
-
@BernieTheBernie it stands for
Psychological Horror ProgrammingPHP Horreur PsychologiqueRTFY.
-
@topspin Context: I tried to import something into a database, and the import wizard (after grinding for about a minute) showed me these helpful error messages.
-
@hungrier wait, were those red ☒ things actually part of the original error message?