User Controls
Posts That Were Thanked by NARCassist
-
2017-07-31 at 4:13 AM UTC in Fucking jedis
Originally posted by Malice I'd really like to observe the high IQ educated jedi (Ashkenazi only) personality IRL, in action. I recall Lanny once mentioning that he had noted that jedis (A considerable portion?) tended to display a distinct type of neuroticism.
Do you REALLy want that? It seems to me there's a lot of posturing going on, one way or another.
Know what I mean?
"Oh let's see this one racial type with one IQ under this demographic in these conditions, and make an analysis."
I don't like it. Not one bit.
Your guises VIEWS of jediS are hilarious, and embarrassing, to be quite frank. FRANK. They are. jedis are bad. Niggers are bad. handsome and well tanned individuals are bad. Ugh. What a simplistic, basic bitch view of things.! WHY? Why am I able to see how stupid the smart people are? This isn't even sploo level this is what the fuck level. jediS RUN EVERYTHING. Do something about it or shut up basic bitch! -
2017-07-31 at 3:59 AM UTC in THE OFISH 2017 COLLAGE THREAD!!!
-
2017-07-31 at 2:28 AM UTC in Fucking jedis
-
2017-07-31 at 1:06 AM UTC in Things that women are better at
Originally posted by infinityshock a hooker is the optimal choice for all men. no one who is sane would want to have a kid, and even having a gf is a drain on financial and time resources.
Then there are those of us who don't need to buy a whore to get laid, which believe it or not is a thing. Women will have sex with you for free, just so you know. You don't even have to be good looking if you have charm and wit. I'm guessing with your physical features and personality you've probably never even considered sexual relations outside of prostitute, but you should give it a try. If nothing else you'll give some lady a good laugh and make her day. -
2017-07-30 at 11:06 PM UTC in Fucking jedis
-
2017-07-30 at 2:46 PM UTC in im sellin sumthin
-
2017-07-30 at 6:06 AM UTC in ITT we post really sexy women
-
2017-07-30 at 6:06 AM UTC in ITT we post really sexy women
-
2017-07-30 at 4:56 AM UTC in The Retarded Thread: Click Here for AIDS
Originally posted by anra your iq is like low 130s, just like 75% of the forum
why do you think that iq means very much?
its like i have a big fucking chunk of a cobalt blue diamond. it has just been taken out of the ground, so its unpolished, uncut, and unprocessed. its a cool diamond! its cobalt blue which looks fucking sick, and would only look better after becoming a shiny, angular, piece of expensive. but i just sit and circlejerk about my diamond rock and how much it could be worth or how nice it would look after some work, or generally fucking off instead of making those visions into reality.
thats you and your dumb gay iq. instead of making a contribution to society you would rather just sit like a wart on the ass end of a bridge troll and just talk about how smart you are when people who "are dumb" are running laps around you in life. -
2017-07-29 at 11:33 PM UTC in (Django) Class based view for splitting view logic based on HTTP methodsKinda unlikely anyone here is going to care, but I have this piece of code I've been copy pasting between Django projects for years because it addresses a really common situation in a way I think is quite neat relative to the approach you typically see used in the docs and such. Might be worth some SEO points or something. Also possibly useful to the couple of you who poke through the ISS code now and then because it's used pervasively there.
The situation is you have some view (the thing that handles an incoming HTTP request) and you want to do something different when a client does a GET request vs. a POST request vs. something else. This is done constantly with form handling, GET should present a form POST should validate the form and either represent with error messaging or take some action if the form is valid. The usual approach is to look at the request method in your view and branch according to what you want to do. It typically looks like this (taken from django docs):
def get_name(request):
# if this is a POST request we need to process the form data
if request.method == 'POST':
# create a form instance and populate it with data from the request:
form = NameForm(request.POST)
# check whether it's valid:
if form.is_valid():
# process the data in form.cleaned_data as required
# ...
# redirect to a new URL:
return HttpResponseRedirect('/thanks/')
# if a GET (or any other method) we'll create a blank form
else:
form = NameForm()
return render(request, 'name.html', {'form': form})
If these alternative paths get long however this quickly becomes unreadable. Half the function is doing one thing and half is doing something else. Gets worse the more methods you're trying to support. So enter MethodSplitView:
class MethodSplitView(object):
"""
A flexible class for splitting handling of different HTTP methods being
dispatched to the same view into separate class methods. Subclasses may
define a separate class method for each HTTP method the view handles (e.g.
GET(self, request, ...), POST(self, request, ...) which will be called with
the usual view signature when that sort of request is made.
Subclasses may also define a `pre_method_check` method which, if it returns
a HttpResponse, will be used to response to the request instead of
delegating to the corresponding method.
"""
def __call__(self, request, *args, **kwargs):
if getattr(self, 'active_required', False):
if not request.user.is_active:
return HttpResponseForbidden('You must be an active user '
'to do this')
if getattr(self, 'staff_required', False):
if not request.user.is_staff:
return HttpResponseForbidden('You must be staff to do this.')
meth = getattr(self, request.method, None)
if not meth:
return HttpResponseBadRequest('Request method %s not supported'
% request.method)
response_maybe = self.pre_method_check(request, *args, **kwargs)
if isinstance(response_maybe, HttpResponse):
return response_maybe
return meth(request, *args, **kwargs)
def pre_method_check(request, *args, **kwargs):
return None
@classmethod
def as_view(cls):
if getattr(cls, 'require_login', False):
return login_required(cls())
else:
return cls()
https://gist.github.com/RyanJenkins/258723c74485fb01ee85272075bad967
Essentially this the behavior here is to look at the request method and pick a method from the subclass with the appropriate name and delegate request handling to that. So submission logic lives in one method, inquiry logic in another. On the whole it's a lot easier to visually parse quickly. One downside is that sharing logic between multiple methods is harder here, in my experience the vast majority of shared logic between methods is in the form of some kind of auth check (is the user logged in, do the have the appropriate privileges, etc) so I added a `pre_method_check` method that subclasses can specify to do this check and optionally return a response (preventing delegation to other methods). There are more opportunities for reducing boilerplate but generally at the cost of flexibility, empirically this seems to be the sweet spot and any other logic sharing can be delegated to private methods that request handling method call.
For a concrete example, here's the user registration method using this "pattern" (kinda hate that word):
class RegisterUser(utils.MethodSplitView):
def pre_method_check(self, request, *args, **kwargs):
if not utils.get_config('enable_registration'):
return render(request, 'generic_message.html', {
'page_title': 'Registration Closed',
'heading': 'Registration Closed',
'message': ('Registration is temporarily closed. Check back '
'later to register a new account. If you think '
'this is in error, please contact the '
'administrator.')
})
def GET(self, request):
form = forms.RegistrationForm()
ctx = {'form': form}
return render(request, 'register.html', ctx)
def POST(self, request):
form = forms.RegistrationForm(request.POST)
if form.is_valid():
poster = form.save()
poster = authenticate(username = form.cleaned_data['username'],
password = form.cleaned_data['password1'])
login(request, poster)
return HttpResponseRedirect('/')
else:
ctx = { 'form': form }
return render(request, 'register.html', ctx) -
2017-07-29 at 10:56 PM UTC in i'm totally head over heels in love right now
-
2017-07-29 at 7:55 PM UTC in what triggers your thrist ???7Up commercials trigger my thirst. I personally dislike alcohol. The trade off sucks, a mediocre buzz for a shitty hang-over.
-
2017-07-29 at 7:16 PM UTC in John McCain is an American hero
Originally posted by Captain Falcon Like literally basic facts about even the nature of Obamacare holy shit lol.
Basic facts according to you? Aren't you supposed to be rich? You know all about economics right? So tell me, what happens when you force insurance companies to take on people with pre-existing conditions? 1. Premiums go up massively. 2. Everyone just cancels their plan until they get sick. To keep the fucking scam going Obamacare just forces everyone to get healthcare and pay the premiums. That's the real reason for Obamacare. You're delusional if you actually believe the government is this big old humanitarian organization that gives a single shit about the welfare of it's citizens. -
2017-07-29 at 8:44 AM UTC in Your ideal breakfast.anyone who argues pigs are filthy hasnt been on a farm and seen the rest of the animals
-
2017-07-29 at 8:16 AM UTC in Your ideal breakfast.I never eat breakfast at all, intermittent fasting.
Pigs are only filthy due to the abhorrent conditions the vast majority are kept in. Regardless, it's not as if fecal matter becomes intrinsically enmeshed into muscle tissue. Any exposure is largely external.
What about cows? Do you know how fucking filthy the CAFOs they're kept in are? -
2017-07-29 at 5:45 AM UTC in i'm totally head over heels in love right nowYou should have a coffee together.
-
2017-07-29 at 5:38 AM UTC in i think i have a little dilemma developing.
-
2017-07-29 at 2:40 AM UTC in i'm totally head over heels in love right nownice, i haven't done H in a couple years, I used to be all about it. like 8/9 years ago. About 6 months ago I went to the area near the university where I would score and they really "cleaned" up that area.
the main drug around here everyone is into now is meff. its funny how some people are with their drug of choice are, a lot of meff heads around here have a superiority complex and look down on heroin users but once twacked or they've been doing it awhile won't mind slamming.
my drug buddy who is now dead used to do heroin with me and quit and just started smoking meff all day errrr day. Going on about how he will never do heroin again. I eventually stopped hanging out with him because he was a drug jedi and starting getting annoying when we'd smoke speed.
I found out months later that he started doing heroin again and died. For being college educated and coming from a very well off family the guy was kind of a ree ree. -
2017-07-29 at 2:07 AM UTC in i'm totally head over heels in love right nowThat looks fucking disgusting.
-
2017-07-29 at 1:57 AM UTC in i think i have a little dilemma developing.