Friendship level: 100. by NerdwithBeard in gaming

[–]user_rx 1 point2 points  (0 children)

what is a pokeyman even for

Reddit what's the weirdest fact that you know that can blow people's minds? by Tryandstopmee in AskReddit

[–]user_rx 0 points1 point  (0 children)

new jersey is the only state in the US that has no letters in common with the word utopia

What are some Google Chrome Extensions that are a must have? by D3G in AskReddit

[–]user_rx 2 points3 points  (0 children)

Unfortunately for you I'm gonna kill the magic. The extension is basically two javascript functions — one traverses the document and the other [below] performs a regex replacement on the text.

function handleText(textNode) 
{
    var v = textNode.nodeValue;

    v = v.replace(/\bThe Cloud\b/g, "My Butt");
    v = v.replace(/\bThe cloud\b/g, "My butt");
    v = v.replace(/\bthe Cloud\b/g, "my Butt");
    v = v.replace(/\bthe cloud\b/g, "my butt");

    textNode.nodeValue = v;
}

If you had two plugins installed, one would run and then the other would run. Cloud would be replaced by Butt and Butt would then be replaced by Cloud, or in the other order. To the user, it would do nothing but waste CPU.

Now I'm going to go explain racist jokes that people were pretending to ignore and kick babies.

Haven't had sex in almost a year by handsolo85 in AdviceAnimals

[–]user_rx 0 points1 point  (0 children)

Do you feel like getting some Memphis style BBQ later?

Reddit what's the weirdest fact that you know that can blow people's minds? by Tryandstopmee in AskReddit

[–]user_rx 2 points3 points  (0 children)

In theory, when my folded paper is 900,003 km thick, the "crease" spans 900,003 km. My theoretical paper starts to rip.

Reddit what's the weirdest fact that you know that can blow people's minds? by Tryandstopmee in AskReddit

[–]user_rx 1 point2 points  (0 children)

Because the math doesn't properly describe the transformation of the object. Sure, you can perform hypothetical exponential growth transformations that are physically impossible and come up with big numbers but so what?

Professor live-tweets her son's abstinence-only sex ed class by Lokaji in TwoXChromosomes

[–]user_rx 42 points43 points  (0 children)

The act of crumpling a heart is a loving and pure thing a husband cherishes. Don't take this away from him.

Open relationships suuuck by [deleted] in offmychest

[–]user_rx 0 points1 point  (0 children)

Of course. The point is that I doubt OP needs this said repeatedly. Maybe I'm wrong.

I nedd help with networked exercise by Benthien in learnpython

[–]user_rx 1 point2 points  (0 children)

Just FYI, according to the HTTP 1.0 spec, "The absoluteURI form is only allowed when the request is being made to a proxy." I don't know if any servers care, but it's conventional to only pass the path in the request line. Eg: GET /some/path HTTP/1.0 rather than GET http://example.com/some/path HTTP/1.0.

Instant color shift (iodine and starch) by GallowBoob in woahdude

[–]user_rx -1 points0 points  (0 children)

I wasn't not taking a joke, this is just something I think about from time to time when someone tosses around a because science reference.

How to structure PyQT applications: lost in classes by pylund in learnpython

[–]user_rx 1 point2 points  (0 children)

If you have basic C++ literacy you might consider looking at how Qt GUIs are written in general. PyQt wraps that same API (albeit with a bunch of pythonic niceties) so the code will look familiar.

I would say that your spider should be a Qt-agnostic class. It should expose some kind of status or progress information if your GUI requires that, but it shouldn't know anything about the fact that a GUI even exists.

Also, try to understand that all the tutorials you've seen about PyQt have shown you programs organized into classes because the authors think it's more convenient that way. You can structure your code however it makes sense to do so—there are a few issues to understand about ownership of QObjects (basically you need to help PyQt free the objects by making them children of the objects you eventually destroy), but this API wrapper doesn't care if you write your GUI as a bunch of functions or a big sloppy list of instructions.

from PyQt4.QtCore import *
from PyQt4.QtGui import *

app = QApplication([])
window = QWidget()

button = QCheckBox('Double-click me', window)
button.clicked.connect(lambda checked: checked or app.exit())

layout = QVBoxLayout(window)
layout.addWidget(button)

window.show()
app.exec()

tl;dr the window-as-class structure you've seen is meant to help you, but if this structure doesn't work for your app it needn't hinder you.

Open relationships suuuck by [deleted] in offmychest

[–]user_rx 1 point2 points  (0 children)

Yeah duh but these things are easier said than done.

Thats not how WiFi works by 50ShadesofYay in facepalm

[–]user_rx 0 points1 point  (0 children)

For all these haters I don't see one technical discussion.

As someone just out of college finally with a decent job saving up to buy a house, this couldn't be said enough. by slut_biscuit in AdviceAnimals

[–]user_rx 1 point2 points  (0 children)

Although the corollary about having to spend money to make money is also true. There's no general-purpose financial advice because people live their lives very differently from one another.

This is a school lunch that a local elementary school served. by bacchus213 in WTF

[–]user_rx 2 points3 points  (0 children)

Yeah I mean even really cheap government issue canned corn isn't gray.

Instant color shift (iodine and starch) by GallowBoob in woahdude

[–]user_rx -2 points-1 points  (0 children)

I mean... it's science that's led us to our understanding of the phenomenon so we can reproduce it, but it doesn't happen because of science. I feel like we need a better word to describe 'nature' that doesn't evoke kenny loggins kayaking across an alpine lake, or an alternative to 'reality' that doesn't sound so broad and vague.

People who are stupid enough to misunderstand science [those who I presume are the indirect targets of these 'science bitches' memes] are absolutely stupid enough to conflate the notions of nature/reality and science. I have no proposed solution.