WTF Bites


  • Notification Spam Recipient

    @DCoder said in WTF Bites:

    Seen when integrating a third-party Magento module...

    var isServerNginx = ($("#server-nginx").length) ? $("#server-nginx").val() : 0
    

    Why does this JavaScript need to know what webserver it's hosted on?

    To know whether it can GETPROP it or not?



  • 0_1479801849765_upload-37d8cf6d-aa03-4a99-9333-239e7e70d077

    So I masked off the card, and put it in my drill press and moved the hole just a tiny bit in. From what I can tell, I didnt drill through any circuits on the card. But now when I use the card on my brand new motherboard, The monitor won't boot. (keyboard and mouse both stay lit up, and the gpu fan is getting power) I know the board is fine, because I tested another gpu on it, and tested the 980ti on my friends board. (same problem).

    0_1479801939827_20160306_152742.thumb.jpg.6b28147479870c23984be3c24d7282b9.jpg



  • @cartman82 said in WTF Bites:

    OP: I'm gonna try to fill the hole with solder haha.
    Other person: ... trying to use solder will probably only make the situation worse, and you will risk compromising your motherboard in the process since you could end up shorting something. ...
    OP: You were right about the layers. I booted the pc while holding a metal screwdriver in the hole to simulate soldering the hole shut. But it just started smoking. The card is F**ked

    Poor GPU. 😢


  • ♿ (Parody)

    @cvi TRWTF spotted!

    Everyone going on and on about the GPU, but nobody gonna comment on his mismatched memory? That's the real sin here.


  • :belt_onion:

    @cartman82 said in WTF Bites:

    0_1479801849765_upload-37d8cf6d-aa03-4a99-9333-239e7e70d077

    So I masked off the card, and put it in my drill press and moved the hole just a tiny bit in. From what I can tell, I didnt drill through any circuits on the card. But now when I use the card on my brand new motherboard, The monitor won't boot. (keyboard and mouse both stay lit up, and the gpu fan is getting power) I know the board is fine, because I tested another gpu on it, and tested the 980ti on my friends board. (same problem).

    0_1479801939827_20160306_152742.thumb.jpg.6b28147479870c23984be3c24d7282b9.jpg

    OOOUCH.

    Ok, now, I didn't know they were multilayered either, but.

    WHY WOULD YOU DRILL A HOLE IN IT OHNOWHY!

    Poor 980ti (You could have been so much more!) and poor OP. He learned a very expensive lesson...



  • @FrostCat said in WTF Bites:

    @Maciejasjmj said in WTF Bites:

    scum on the sink

    I think the idea is that you don't actually take much off the bar when you use it, because it foams up a lot. I mean, assuming you're not leaving it in a pool of water to dissolve.

    Liquid soap seems to encourage you to use more than you need, too, like how ads for toothpaste show people using 4-5x what they actually need.

    I basically have a lifetime supply of bar soap. After my mom died, my dad moved, and he gave me a whole drawer full of hotel soaps... hundreds of 'em. Also gave me about half a gallon of hotel shampoo (he'd drained all the bitty little bottles into a big glass jar), but I'll use that up long before I use all that soap.



  • @Bulb said in WTF Bites:

    Or you can store it as some kind of variable length code, but then it gets Complicated™.

    @groo said in WTF Bites:

    Obviously the right way is to have the size of the size before it.

    Just store the size at the beginning as a UTF-8 character, followed by the UTF-8 encoded string. Then you have a maximum string size of 2,147,483,647 bytes. Easy! 🚎



  • @sloosecannon said in WTF Bites:

    WHY WOULD YOU DRILL A HOLE IN IT OHNOWHY!

    Poor 980ti (You could have been so much more!) and poor OP. He learned a very expensive lesson...

    Even better, a bit further down on the page from another commenter with a link to an instructional video for installing that cooling bracket:

    Man you weren't meant to screw anything into that hole at all.

    Have to agree with the many people in the comments who pointed out that when things don't seem to be working, drilling holes in your expensive new kit really shouldn't be the first thing you go for.



  • @anotherusername said in WTF Bites:

    Just store the size at the beginning as a UTF-8 character, followed by the UTF-8 encoded string. Then you have a maximum string size of 2,147,483,647 bytes.

    No, it won't. It will only allow maximum of 1,114,111 bytes and won't allow you to store sizes in range 55,296–57,343 bytes and sizes 65,534 and 65,535 bytes.Unless you lower the UTF-8 character requirement at least to WTF-8.


  • @Bulb is that given a four byte UTF-8 character or the original six byte size as per the spec?



  • @Arantor It is based on the fact that to be a Unicode transfer format, it must decode to a valid Unicode codepoint and those are in the set ⟨0; 55,295⟩∪⟨57,344; 65,533⟩∪⟨65,536; 1,114,111⟩. The first gap is for the lone surrogates, the second gap is for the byte-order mark (0xfffe is invalid) and the error value (0xffff, aka -1 in 16 bits, is invalid) and the maximum is given by the maximum for UTF-16 ((0x3ff << 10) + 0x3ff + 0x10000 = 0x10ffff).

    Yes, the encoding scheme itself allows up to 2,147,483,647, but that is not UTF.



  • @Bulb I was trying to go for a funny-if-you-know-the-context :(



  • @groo said in WTF Bites:

    the first byte is a 01 that say the string lenght is represented in one byte
    the second byte is 04, the actual lenght of the string

    But what if you want to store a string longer than 256^255-1 bytes?!



  • @cartman82 said in WTF Bites:

    0_1479801849765_upload-37d8cf6d-aa03-4a99-9333-239e7e70d077

    So I masked off the card, and put it in my drill press and moved the hole just a tiny bit in. From what I can tell, I didnt drill through any circuits on the card. But now when I use the card on my brand new motherboard, The monitor won't boot. (keyboard and mouse both stay lit up, and the gpu fan is getting power) I know the board is fine, because I tested another gpu on it, and tested the 980ti on my friends board. (same problem).

    0_1479801939827_20160306_152742.thumb.jpg.6b28147479870c23984be3c24d7282b9.jpg

    From what I can tell from the image, since the white line below C81 no longer connect with the current conducting metal ring, the circult between this line and the white horizontial line below C80 marking is definately broken.


  • area_deu

    @cheong I know that this is probably the stupidest thing to ask on this site, but I just can not control myself: You are joking, right? Please tell me you are joking.



  • @Akko said in WTF Bites:

    @cheong I know that this is probably the stupidest thing to ask on this site, but I just can not control myself: You are joking, right? Please tell me you are joking.

    Oops. I missed the :trollface: emoji icon. :P

    (Screw hole rings must not be connected to circuit, of course)


  • area_deu

    @cheong Oh thank god. I'm usually not too bad at detecting :trollface:-stuff, but as an EE the thought that you might have been serious didn't leave me alone XD



  • @Bulb said in WTF Bites:

    It will only allow maximum of 1,114,111 bytes

    If you go with standard UTF-8, yeah... ok...

    0_1479908154104_Untitled.png

    But there's been proposals to extend it, and the encoding is identical except for the 5- and 6-byte code points:

    0_1479908296272_Untitled.png

    and won't allow you to store sizes in range 55,296–57,343 bytes and sizes 65,534 and 65,535 bytes.

    Those code points can be encoded fine in UTF-8; they're just illegal Unicode characters. The length isn't a Unicode character, so there's no reason why you couldn't. Those values do have UTF-8 encodings. They're just not allowed if they're to be interpreted as characters.

    0_1479908723147_Untitled.png

    "their UTF-8 encoding" ...so they do have a UTF-8 encoding... "must be treated as an invalid byte sequence." But if we're not interpreting that value as a Unicode character, why is it invalid?

    @Bulb said in WTF Bites:

    to be a Unicode transfer format, it must decode to a valid Unicode codepoint

    The payload of the string is a Unicode transfer format; the length is not. The length is just a value that is encoded in the same UTF-8 encoding format.


  • Discourse touched me in a no-no place

    @anotherusername said in WTF Bites:

    Those code points can be encoded fine in UTF-8; they're just illegal Unicode characters. The length isn't a Unicode character, so there's no reason why you couldn't. Those values do have UTF-8 encodings. They're just not allowed if they're to be interpreted as characters.

    I approve of your :pendant:


  • FoxDev

    0_1479910039223_upload-8a25aac5-cbc7-4cb5-a335-4f4ffec8b348
    I wonder how many devs have said that...



  • Streaming 4K on Netflix requires certain Intel processors. Hardware-based DRM?


  • Discourse touched me in a no-no place

    @anonymous234 said in WTF Bites:

    Streaming 4K on Netflix requires certain Intel processors. Hardware-based DRM?

    Apparently there's been some changes to support 4K video too. Don't know if it is that or the HDCP 2.2 support that's critical here (4K video really does push a lot of data through the video pipeline).

    (Also, these processor architectures have dumb names.)



  • @dkf said in WTF Bites:

    (Also, these processor architectures have dumb names.)

    Skylake, now Kaby lake, and next one is supposed to be named Cannonlake.

    Maybe Intel think its business is drowning.



  • @RaceProUK it's only a U away from being a double-U T F. :wtf:



  • @Arantor Related: WTF-8. Pretty sure it's been on here before.



  • @anotherusername said in WTF Bites:

    The length is just a value that is encoded in the same UTF-8 encoding format.

    therefore it is not a

    @anotherusername said in WTF Bites:

    UTF-8 character,

    Because it is not a character, see.


    @cvi said in WTF Bites:

    Related: WTF-8. Pretty sure it's been on here before.

    Apparently the <details> get easily lost on people around here (yes, they do when the ▶ does not get shown in (WT)FF):

    @Bulb said in WTF Bites:

    ▼ No, it won't. It will only allow maximum of 1,114,111 bytes and won't allow you to store sizes in range 55,296–57,343 bytes and sizes 65,534 and 65,535 bytes.
    Unless you lower the UTF-8 character requirement at least to WTF-8.



  • @Bulb said in WTF Bites:

    yes, they do when the ▶ does not get shown in (WT)FF

    FF user reporting in. And, yeah, there is no indication of the whole <details>/<summary> thing unless I try to quote your post.



  • @cvi Until recently there used to be a CSS shim that added the triangles, but then users with other browsers complained they see two of them.


  • 🚽 Regular

    details is directly supported since FF 49.0.

    For users of FF 22.0 I don't know if there's :-moz-any way to specify to specify Firefox specific CSS.



  • @Zecc said in WTF Bites:

    details is directly supported since FF 49.0.

    49.0.2, no ▶. Just updated to 50.0, still no ▶.

    The tag is “supported”, otherwise the details wouldn't be hidden. It just does not indicate in any way that it is Clickable™.

    And, um, I just checked and it is actually a WTDWTF-specific problem! If I create a small test with no style-sheet and the ▶ is there…


  • 🚽 Regular

    article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary {
    	display:block
    }
    

    This rule is in both stylesheet.css and bootstrap.min.css. Remove details and summary from the selector and it works.

    Or put summary { display: list-item !important; } somewhere, I guess. It seems that's enough.

    I'm having a big dejà vu, as if we had reached this conclusion before.





  • @Zecc said in WTF Bites:

    For users of FF 22.0

    They can deal with their choices and get broken web pages.


  • 🚽 Regular

    "Fuck you, give me triangles"



  • @Zecc

    +         +     +         +
    |\       /|     | \      /|   ...
    | \     / |     +---+   / |
    +--+   +--+            +--+


  • I'm currently, as a favour to a friend, writing an ASP VBscript website whose job is to handle calls to a 3rd party XML*/JSON API.

    The number of WTFs in that language are beyond belief. It is not typed. It has the worlds shittiest "Class" implementation; with the added bonus of no namespacing. There's no easy way to encapsulate repeated code into a function; even functions are pretty useless. More than 3/4 of my code is error-testing and recovery; and of course, there's no unit testing framework for this shitshow. Everything is manual.

    ASP VBscript has to be the very worst language that ever made it to wide-scale production; it's so bad that PHP3 (which comes from a similar time) would be preferable

    * I chose to use the XML version because I was not willing to write a JSON parser for a language that was abandoned by its makers years and years ago.



  • @scudsucker said in WTF Bites:

    More than 3/4 of my code is error-testing and recovery;

    ON ERROR RESUME NEXT covers both!


  • Java Dev

    @Maciejasjmj said in WTF Bites:

    @scudsucker said in WTF Bites:

    More than 3/4 of my code is error-testing and recovery;

    ON ERROR RESUME NEXT covers both!

    I hope you realize I cannot in good taste upvote this.



  • Today's WTF Bite:

    I just had a training on our new pupil supervision software - you know, to be able to hand out files, collect files, have a look at a pupil's screen, lock internet and so on and so forth.

    Among that is also the ability to look up passwords.

    Yes, you heard that right.

    In case a pupil has forgotten his/her password you can use the UI to select the computer the pupil is currently at, select "Show Password" and it will show the pupil's password on said PC for five seconds.

    You get three guesses as to what this means for the storage method of passwords. And the first two don't count.



  • @Rhywden I'm sure they just have a beefy server somewhere that can crack salted SHA, right...?


  • BINNED

    @anonymous234 said in WTF Bites:

    Streaming 4K on Netflix requires certain Intel processors. Hardware-based DRM?

    Because it's impossible to do otherwise!

    https://www.youtube.com/watch?v=OY8ro90FY4w

    Oh. This worked on Linux in Opera.

    GOOGLE ARE WIZARDS! BURN THEM AT THE STAKE!



  • @Zecc said in WTF Bites:

    article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary {
    	display:block
    }
    

    This rule is in both stylesheet.css and bootstrap.min.css. Remove details and summary from the selector and it works.

    Or put summary { display: list-item !important; } somewhere, I guess. It seems that's enough.

    I'm having a big dejà vu, as if we had reached this conclusion before.

    We have. I thought it was fixed a while back!



  • @Rhywden said in WTF Bites:

    You get three guesses as to what this means for the storage method of passwords. And the first two don't count.

    It's stored in plaintext 3 times?



  • @anotherusername said in WTF Bites:

    @Rhywden said in WTF Bites:

    You get three guesses as to what this means for the storage method of passwords. And the first two don't count.

    It's stored in plaintext 3 times?

    We actually asked that. And the guy doing the presentation responded proudly: "It's encrypted!"

    Yes. Just not with a one-way function...




  • FoxDev

    @anonymous234 That explains this GIF:



  • @Rhywden With ROT-13, but going the other way. Nobody will figure that out!


  • Discourse touched me in a no-no place

    @RaceProUK said in WTF Bites:

    That explains this GIF

    I'm not convinced that anything goes quite that far…



  • @hungrier said in WTF Bites:

    @Rhywden With ROT-13, but going the other way. Nobody will figure that out!

    Do it twice for extra security!



  • While typing:
    0_1480311741959_upload-b4c10a25-f502-4b18-8259-5e82aee790ed
    When trying to print:
    0_1480311766110_upload-54ce7dd1-8bec-48c6-96c2-5e8db91ebedb


Log in to reply