WTF Bites
-
@Yamikuronue said in WTF Bites:
I'm on a roll today:
...what video?
The one that was so bad you forced yourself to forget about it. Looks like the last option is the one for you!
-
The one that was so bad you forced yourself to forget about it.
Yeah, 4 hours of EDM do that to you.
-
@anonymous234 It's still not as big a crime as writing a single script that combines both Perl and Python into one thing.
And now I am envisioning a really, really fucked up version of Weave that combines Perl code and Python documentation into a single TEX file. Illiterate Programming, anyone?
-
-
-
Recommendation from SEO consultants to a client of ours:
Finding
When logo is clicked a hash symbol "#" (domain.tld/#) is appended to the end of the URL of the Homepage. This may cause improper indexation by some search engines and lead to impaired authority flow.
Recommendation
We recommend to remove the hash "#" from the link in the logo or redirect it via 301 redirect to the canonical version of the page.
-
-
@bb36e a local man makes improper assumptions about the implementation of a remote system. News at 11...
-
Thank you, Postman. This single option was exactly what I needed when I right clicked that tab.
It's like you read my mind.
-
WTF of the Day: I have some work travel coming up and we have an abomination of an internal website to book company travel. The website said my flight was too expensive, and recommended a somewhat cheaper flight that leaves from Dallas/Ft. Worth instead (3 states and ~650 miles away!). That would require me to drive halfway to my final destination, in the wrong direction, and spend more on fuel and parking than the difference in airfare.
Fortunately there is a way to appeal the system and get on the flight that actually comes to my city.
-
@cartman82 said in WTF Bites:
Thank you, Postman. This single option was exactly what I needed when I right clicked that tab.
It's like you read my mind.
I was wondering about that. Thought I installed the wrong extension...
-
@cartman82 said in WTF Bites:
Thank you, Postman. This single option was exactly what I needed when I right clicked that tab.
That's a default thing added to all “selected-something” right-clicks. I'm not sure who ever thought it was useful.
-
So I was watching the news before Stephen Colbert's Hour of Network TV Grade Political Humor and they had a story about people in costume doing community service stuff like picking up trash along a highway and cleaning windows at a hospital. They showed a bald guy wearing a green Ab Abber 2000 t-shirt and wearing a powder blue mask. The newscaster said something along the lines of "and the teenage mutant ninja turtle". Yep, the teenage mutant ninja turtle super hero. That one.
Anyway, I looked up which of the teenage mutant ninja turtle he was dressed as.
Thanks, Google. That's very helpful.
-
@ben_lubar said in WTF Bites:
So I was watching the news before Stephen Colbert's Hour of Network TV Grade Political Humor and they had a story about people in costume doing community service stuff like picking up trash along a highway and cleaning windows at a hospital. They showed a bald guy wearing a green Ab Abber 2000 t-shirt and wearing a powder blue mask. The newscaster said something along the lines of "and the teenage mutant ninja turtle". Yep, the teenage mutant ninja turtle super hero. That one.
Anyway, I looked up which of the teenage mutant ninja turtle he was dressed as.
Thanks, Google. That's very helpful.
It was clearly Shredder!
-
@ben_lubar Are you complaining because Google's onebox of the Wikipedia article doesn't contain the specific bit you wanted, forcing you to click on the link like a caveman (or to look at one of the other results)?
Well, sucks to be you then, I guess. My first three hits all had the information in the preview:
-
Opera decided that when I write "y", I don't in fact want to reach youtube like I did since forever. No, what I really want is to access Yahoo -.-
And of course there's no easy way to remap the fucking shortcut or just remove it from the list.
-
@homoBalkanus Welcome to Opera 15+! Fuckers.
Had to move my YouTube search to
yt
as well. FFS Opera had the capability to remove/change built-in search shortcuts since they introduced these features. NOPE, NO MORE YOU FUCKS!Oh, and also, if you just migrated from 12 and this is your first time using Opera Chromiclone... I'm sorry. I'm so, so sorry.
-
-
@homoBalkanus Welcome to Opera 15+! Fuckers.
Had to move my YouTube search to
yt
as well. FFS Opera had the capability to remove/change built-in search shortcuts since they introduced these features. NOPE, NO MORE YOU FUCKS!I had the same issue and found a couple of StackOverflow questions with solutions. But as time went by, each solution got disabled and required some other tweaks...
The last one that I did (and that worked, but apparently since then an update of Opera botched it, I haven't redone it since) was http://superuser.com/questions/956087. Basically, replace %installation-root%/default_partner_content.json by %installation-root%/profile/siteprefs.json (the read-only bit didn't matter in my case) and then you can freely edit all search engines.
Oh, and also, if you just migrated from 12 and this is your first time using Opera Chromiclone... I'm sorry. I'm so, so sorry.
It's slowly, very, very slowly starting to look again like something that can be used. But without all the nice original stuff that made Opera different from the rest, sadly.
-
@remi Vivaldi is doing a bang-up job on the useful little things Opera had.
Too bad it's not doing as good of a job at fixing annoying little bugs that haunt me. And I suspect most of the bug is due to them using Node and Webkit to build a browser...
-
using Node and Webkit to build a browser...
I'm no web/js/node/whatever-the-new-group-wank-of-today-is developer, but seriously? Isn't that (or ... or both...)?
-
@remi Probably. Also see Atom and VS Code editors. Same tech. It's extra fun when you accidentally hit Ctrl+Shift+I when focused on your editor and WebKit's inspector actually opens in it.
They work fine though, and Atom doesn't annoy me much. Probably because it's not displaying a website within a website, so there's no runaway JS or events that bubble up weirdly messing with your workflow.
-
Not sure if .
Building a browser is Webkit's raison d'être.
As for Node... it's one way to implement a run loop and JavaScript engine.As long as they're not using both JavaScriptCore and V8 in a hackish mess. That would be silly.
-
@Onyx
Vivaldi crashed on me several times while I was trying to get Lastpass installed and XMarks synched. If it doesn't support 2 things I want the most, it's no use for me
-
@homoBalkanus that sucks. I had no troubles with any of the extensions that I use. Well, perfect example of YMMV right here...
-
Not sure if .
Building a browser is Webkit's raison d'être.
Yes, using webkit makes sense. But it was part of the same sentence, I was too lazy to cut it out :-)
As for Node... it's one way to implement a run loop and JavaScript engine.
As long as they're not using both JavaScriptCore and V8 in a hackish mess. That would be silly.
The thing is (again, without being really familiar with these as it's not the tools I use), I am always skeptical when I see one tool initially developped for one kind of use-cases suddenly become the One Great Solution that can be applied everywhere. That stinks too much of hype and/or marketing. It may turn out to work, but my first reaction would be to have a long and hard () look at the reason behind that choice.
Reminds me of the other day, when devs in another team organized a big meeting to show that they had started to rewrite from scratch one of our classical desktop program with HTML5/Node/etc. Okay, why not? They go on for an hour about how it's great that we will be able to build that as network micro-services and that it will work on your mobile phone (we're talking of a very business specific app about as complex as a trading desk or NASA command room!).
Then someone asks if any of the clients, product manager or anyone outside their team has ever requested this kind of features. Long and awkward silence. Right, so the benefits we'll gain by using this new tech are not actually benefits that anyone wants. Might still be useful one day, but that's doesn't sound like a very good argument to put forward.
Then, "why did you choose that tech?" "oh, well, all other apps in the group are written in C++/Qt (*) and none of us knew it, so we had to learn something new, so we thought that's a nice opportunity to try new
hipsterstuff."Really? That's the only reason? At that point, I wonder if it's , or ...
(*) or some older antediluvian toolkits that no-one wants to mention and everyone hopes they'll die... but they're like zombies, they keep raising their ugly heads again and again...
-
I think you guys missed a part of the point.
Using WebKit as a rendering engine is all good.
The thing is, the entire UI is HTML and JS. All of it. No native controls at all, not even window borders.
This results in... Well, weirdness, at times. Like how sometimes key events bubble up to the browser instead of staying constrained to the page, to the point that, for a while, hitting Backspace while writing a post here caused the browser to navigate back! This seems fixed now (don't know on whose end though), but there are still situations where this happens.
There are other weird quirks like that I encountered, just can't remember them off the top of my head.
-
(3 states and ~650 miles away!). That would require me to drive halfway to my final destination, in the wrong direction, and spend more on fuel and parking than the difference in airfare.
At $0.575/mi, that's going to be $747.50 (round trip). Not including fuel/parking. I'd say that's pretty good grounds for appeal...
-
@dcon
As though his company pays IRS reimbursement rates.I've worked for places that pay less then half and literally said "well, you can always deduct the difference"
-
$0.575/mi
You guys get $0.57 a mile? The legal limit here is €0,19 per kilometer for untaxed travel expenses.
-
@PleegWat £0.45 a mile here, and petrol is a lot more expensive than in America
-
if you just migrated from 12
...you're 10 behind even @Lorne-Kates
Version numbers != actual versions.
Firefox 22 is only 7 months newer than Opera 12.10.
-
WTF is this shit!?
Javascript is just a gift that keeps on giving.
-
-
-
http://i.imgur.com/MOXgsGJ.jpg
No, Google, I don't think you can call this a "new album by David Bowie". I don't think David Bowie will be putting out any new album in the foreseeable future.
-
@Maciejasjmj What does the dinner plate icon mean? Between the battery and the flashlight.
-
@Maciejasjmj What does the dinner plate icon mean? Between the battery and the flashlight.
Oh, it's just Nougat's easter egg.
http://www.pocket-lint.com/news/138312-how-to-access-android-n-nougat-easter-egg
-
@Maciejasjmj :D
-
-
@Maciejasjmj said in WTF Bites:
Oh God, we're becoming crazy cat ladies.
https://wiki.guildwars2.com/wiki/Cat#Hungry_cats
I have all of them.
-
Not sure what to say about this. I mean, it's technically correct, but why you would want to do this...
-
in str himself
If a piece of software ever achieves sentience, I sure as hell hope it won't be using C strings.
-
@Tsaukpaetra That'll be so much “fun” when compiled on a system that puts string literals in read-only memory…
-
@Tsaukpaetra said in WTF Bites:
it's technically correct
No it's not.
main()
doesn't return an integer value.
-
@Tsaukpaetra Where is the
index
function defined and why isn't it idempotent (assuming the loop doesn't go indefinitely)?
-
/* * This code replaces all 'r' in str to 'a' in str himself * Really simple to understand, and to write */ #include <stdio.h> #include <string.h> int main() { char str[] = "rarararararar"; char* pos; while(pos = strchr(str, 'r')) { *pos = 'a'; } printf("%s\n", str); return 0; }
I know that no one asked for solution, but my question is... Why the fuck would you just not do something like that? Because the original one is a confusing fucking mess, how is it simpler than my snippet?
Also,
int main
without a return? Fucking class.This industry is doomed.
-
Where is the index function defined and why isn't it idempotent
It's part of POSIX.1, though this code uses an older spec. From my manpages (and omitting some irrelevant stuff)…
DESCRIPTION
The index() function locates the first occurrence of c (converted to a char) in the string pointed to by s. The terminating null character is considered to be part of the string; therefore, if c is ‘\0’, the functions locate the terminating ‘\0’.
The rindex() function is identical to index(), except that it locates the last occurrence of c.
RETURN VALUES
The functions index() and rindex() return a pointer to the located character, or NULL if the character does not appear in the string.
HISTORY
The index() and rindex() functions appeared in Version 6 AT&T UNIX. Their prototypes existed previously in <string.h> before they were moved to <strings.h> for IEEE Std 1003.1-2001 (“POSIX.1”) compliance.
Idempotency isn't there because the code is assigning to
str2[0]
(andstr2=str
does not copy the string in C, but just the pointer to it).
-
@dkf Ok. Somehow I missed that once you replace the character the following call will return another index (or pointer).
-
@Onyx I'd skip out on the strchr entirely and use
/* * This code replaces all 'r' in str to 'a' in str himself * Really simple to understand, and to write */ #include <stdio.h> int main() { char str[] = "rarararararar"; char* p; for( p = str ; *p ; p++ ) { if( *p == 'r' ) { *p = 'a'; } } printf("%s\n", str); return 0; }
The only evil involved is that, if you pack this in a function, that function manipulates its input instead of producing a copy. Which is commonly done in C but rare in other languages.
On initial reading I misread
char * str = "rarararararar";
, which would be a segfault waiting to happen here.