« first day (1523 days earlier)      last day (3425 days later) » 

7:01 PM
hello
oh man... look at that time gap
hello?
echo echo echo
Stack Overflow if you or anyone else doesn't do this yet then I eventually will
A website that accepts code at any given time in real time to be evaluated by paid experts
Funding for the website comes from ad revenue and high traffic, most likely outsourcing to drive down costs of "experts"
I came her to ask a simple question, seeing as I am banned from asking questions
but seeing as there are no one here I shall be off
there is?
 
there are ...
 
ha!
someone is here
I don't know it could be "there is" since "no one" is singular
not sure
 
unimportant
 
Joe Watkins are you here?
I mean yes you are but can I ask you a question
If not I shall go
It is about PHP not grammar
 
you can ask, if someone wants to answer they will ...
 
7:06 PM
Well I'm asking you, since you are the only one on right now, otherwise I will go, no harm no foul, no bounce no play
get the reference?
Stephen King
 
we are little php ninjas waiting in the shadow. we are present but you can only see us if we choose so
 
okay I shall go, thanks anyway
I see
 
there are other people here too ... ask your question
 
well I'll try
 
7:07 PM
is that guy on cocaine or why is he so hyped up?!
 
this
$column1 = "SELECT DISTINCT Rc FROM computers WHERE Rc=$rc";
actually don't even bother with the DISTINCT
 
@JoeWatkins you mean to say that he's still at the "can I ask a question?" stage?
 
$column1 = "SELECT Rc FROM computers WHERE Rc=$rc";
 
wtf?
we're into SQLInjection here now?
 
7:08 PM
What if there isn't a result? is it empty? null?
I'm trying to create a simple redirect based on search results, if that condition is not met, what is the value of $column1?
 
@JacobDavidC.Cunningham what if $rc is a drop table?
 
eg. if Rc=$rc did not exist
$rc is a six digit repair code entered by a customer, Rc is a column in a database
 
if it doesn't exist, you'll get an empty result set
 
I have two values in there right now, 123098, 123099
I purposely enter 333 so that it is wrong
what does $column1 return?
 
@JacobDavidC.Cunningham , what people are trying to say to you is: your code is vulnerable to SQL injections
 
7:10 PM
Also I'm not on cocaine, I haven't done any drug, alcohol or cigarettes or anything for at least 2 months
 
@JacobDavidC.Cunningham $column is a string at the moment... so you will get the string back
 
Yes I am aware
 
@JacobDavidC.Cunningham: for this kind of quesiton, it's really better to try it and see yourself
just var_dump the result so you can see
 
that is another thing I have to do as well as enabling SSL certificate for improved SEO
 
@JacobDavidC.Cunningham it's very suspicious that you should say that ...
 
7:11 PM
var_dump I saw that, I was trying to figure out how to return a boolean like is_null
 
anyway ... $column1 is a string ...
 
also.. what the fuck is with his nickname
 
@JacobDavidC.Cunningham you are all over the place my friend. why not sit down for a minute, think this through and then come back?
 
it's the sql statement
 
7:11 PM
do you want to check if $rc has a valid value?
 
why is it a string? I have it set as a integer in the database
 
you didn't execute anything ...
 
The customer is provided a 6 digit code, starting with 123098 as an arbitrary number I don't want my first customer to have 1 as his/her code like "Good luck, you're my first" haha
 
post the code you're having a problem with ... and listen to what you're told about injection and what api's to use ...
 
these are autoincremented
okay thank you for your guys' time
 
7:13 PM
this guy...
 
In the statistical theory of estimation, the problem of estimating the maximum of a discrete uniform distribution from sampling without replacement is known in English as the German tank problem, due to its application in World War II to the estimation of the number of German tanks. The analyses illustrate the difference between frequentist inference and Bayesian inference. Estimating the population maximum based on a single sample yields divergent results, while the estimation based on multiple samples is an instructive practical estimation question whose answer is simple but not obvious. ��2...
 
Morning
 
mohaa
 
<?php

error_reporting(E_ALL | E_NOTICE);
ini_set('display_errors','1');

error_reporting(E_ALL);
error_reporting(-1);

$servername = "localhost";
$username = " ";
$password = " ";
$dbname = " ";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
$rc = $_POST['repair-code']; // step 1 get repair code input user
$column1 = "SELECT DISTINCT Rc FROM computers WHERE Rc=$rc"; // step 2 compare
$repc = $conn->query($column1); // run comparison
while ($row = $repc->fetch_assoc()) {
it's not super long, 24 lines
 
$column1 = "SELECT Rc FROM computers WHERE Rc=$rc";
the two double quotes (") enclose a string, which is then assigned to the variable $column1. that's it... so basically all you did is to give that string a name that allows you to refer to it from any other place within the same scope. and also though the content of that string looks like a sql query, you didn't execute it at that point in time. it's just a simple string of characters...
 
7:14 PM
@JacobDavidC.Cunningham why are you not using parameter binding?
 
I've thought of that, it does work, and when I don't use doulbe quotes I get errors like unexpected T_String
Why? Because I don't know what I'm doing... simple answer, I'm poor and can't hire other people to write this code which would take an expert a couple minutes / hours
 
well, the net with sandra bullock is on tv. i'm off
 
lol debugging my proxy. Only see a long list of microsoft addresses downloading porn...
 
When I echo $row['Rc'] I get what I inputted/searched
 
@JacobDavidC.Cunningham ok first thing, look up parameter binding. and read up quickly on sql injection
 
7:17 PM
anyway regardless of your input / the outcome thank you anyway
I know about the security problem I haven't implemented it yet
I'm primarily concerned with it working right now
 
It is live, it is online, but at worste case scenario I can destroy/rebuild the server whatever start over
I don't have any value to lose right now
people always judge I don't get that
"like oh oh oh I'm so great, this guy blah blah blah" whatever
 
that's wreckless, we had a deal, you post code, then listen ... listen to what people are saying to you ...
 
@JacobDavidC.Cunningham you talk too much and listen/think too little
 
It's a very common issue that most people don't understand the ramifications of, so we're inclined to make sure that it's fixed first and foremost
 
7:18 PM
could just be like "hey man, I'd be glad to help you." why thank you
I'm not disagreeing
someone can take over my server and use it for their needs
but it doesn't work eg. useless for my purpose
I am going to implement the injection/sql,ht access
right now, all I want to do is take an input, check if it matches, redirect
 
@JacobDavidC.Cunningham stop talking, go back and read the answers.
your glass is already full
 
well call me immature, arrogant, whatever, I'm going to go
thank you
 
internet makes me sad
 
+1
The super at my old building waits until after I say "if you can find my bike I'll give you a reward" to say he's got it.
 
proxy.pieterhordijk.com @DaveRandom o/
ow wait. it redirects for some reason :|
assholes
 
7:29 PM
I've been dipping into Stack Overflow a lot less over the last six weeks or so. Has the average question quality dropped in that time, or that just my pessimism?
 
@halfer Just as crap me thinks
 
All I seem to do now is bashing questions into shape - if they are rescuable at all.
 
IMHO, stackoverflow has been decaying for past two years
 
@halfer I've been here for about two years and I can also say there are only a few questions a day that are worth some effort.
 
I had a good session today, and found several "please write it for me". I think maybe I don't DV enough, but I'm often too soft on 'em.
 
7:32 PM
it has succumbed to the help-vampires and is now in it's death-throws
 
Yesterday I saw a "you hate me because of my religion, don't you?". = sigh =
 
I've been here about 4 months and it's pretty much been equally crap that whole time.
 
But still, anwering a simple question (like.. how can I filter this array.. bla bla bla) is sometimes good to waste some spare time.
 
Serve me right for frequenting the [php] tag, I s'pose :-D
 
Yeah, of my 1587 total votes cast... 87 are upvotes
 
7:34 PM
adjust your expectations ... me, I expect that every once in a while, someone will post a picture of a kitten doing something funny or cute ... I am not disappointed ...
 
@JoeWatkins That is a really good metaphor ;). But you are right, you can't always ask for the full 100%
 
also
 
ok fixed it. Could somebody pretty please confirm this works correctly now?
 
this is a community moderated site, if the quality of the question is declining, then do something about it ...
@PeeHaa yep
 
tnx
@DaveRandom proxy is up again
 
7:37 PM
@Joe, I often try to help people with their questions, but it feels like I am asking the tides not to come in :-)
 
Now to make me something to eat
 
@PeeHaa works. searching for "peehaa porn" brings up a large number of results
 
Oops, got an ALL CAPS post to fix now...
 
@halfer You are too good for mankind ;).
 
And probably too foolish to keep trying, but thanks :)
 
7:42 PM
@halfer think of it like making a sand mandala, only on a windy day in the sahara
 
@PaulCrovella Works as designed I would say
 
@salathe <3
see ...
 
A suitable metaphor, @salathe! The cat is me, and the chick is someone today who asked one unresearched question after another, after another, after...
(Except my whiskers aren't as impressive).
 
we've all been there :)
 
i think that other chick is dead
 
7:44 PM
It's not dead, it's just pining for the fjords.
 
it isn't dead, it's sleeping, everybody sleeps @PaulCrovella ... pfft ...
 
Not everybody. Dead people don't.
 
@JoeWatkins Thx. I was already waiting two years before a good moment came to bring it up
 
actually it's a bit more complicated since, from a subjective point of view, "you" do not exist while asleep
 
7:53 PM
deep ...
 
lucid dreaming. check. mate.
 
I cannot say, since I have never been myself in a lucid dream
 
me neither ... I only have one sort of dream ... terrifying ...
 
they're neat, though I've only had a handful of them
 
7:56 PM
I think I did once
 
I have then once every few month, it's kinda annoying, because it takes about an hour to regain my sense of self fully
 
the worst dreams I've ever had were 2 weeks ago when I had the fever
not really dreams as much as halucinations...
 
sounds like a pretty serious fever
 
it wasn't fun
 
nasty fevers are nasty ...
 
8:04 PM
That's not okay. Went to a doctor? Or was this dreaming/hallucinations one of the side effects of heavy medication?
 
I had pneumonia
and yes, went to the doctor ;-)
 
We'll, that you didn't end up in the hospital is maybe the only good thing in this story :).
 
@PeeHaa @ircmaxell do you move all gifs?
because if you do, I can write a userscript to move them after X seconds automagically for you
 
try to
 
similar to Caps unonebox command
 
8:08 PM
@Benz yu
 
Ahhh man. Been a good day or two since I had a tea. Man is it refreshing!
 
Is there a way to tell eclipse that $event->twig is an instance of Twig_Environment?
Other than:
	/**
	 * @var $twig \Twig_Environment
	 */
	$twig = $event->twig;
/** @var $event->twig */ does not work
 
8:24 PM
@birdieblue You should be able to set the doc block in the event class for the twig property.
 
@Danack Unfortunately the Event class is just a proxy, so it contains any number of class references
 
@ircmaxell Sorry for being a complete n00b, but what means [yu] ?
 
Both the Content-Security-Policy and X-XSS-Protection HTTP headers have a report-uri option. So when a browser encounters a violation the browser will submit a report of the violation (JSON) to the specified destination. This allow an admin to know users are being attacked and how. Now my question is, what if any methods exist to prevent this report uri from being abused for spam, or just to make bogus reports to fill up logs etc. I will be dropping dupes, but anything else I can do?
 
@crypticツ people pinky swear not to lie?
 
@Benz I missed the "p"
@crypticツ no, it's a pretty wide open attack surface
 
8:29 PM
@ircmaxell I was thinking of a completely new swag language inside this PHP community :). Too bad.
 
lol
 
The Unicode escape syntax has so many tests. It feels good.
 
8:45 PM
"so many tests" <-- not always a good sign
 
Man going back and fourth with a theme support for a template my wife bought because the guy can't understand that I can't compile with SASS because there's a missing compass file. They just don't seem to get it.
 
that was such a great scene
 
 
1 hour later…
10:04 PM
Hmm
 
Do Facebook engineers refer to him as The Zuck?
Zucky? Zuckdog? Mark?
 
@AndreaFaulds s/Z/S/? :-D
4
 
10:20 PM
@birdieblue Regardless of IDE, you got it the wrong way around
/** @var \Twig_Environment $twig */
Although I would alias to TemplateEngine or similar
@FlorianMargaine I am insanely jealous of your Star Trek hat thingys
 
:D
I don't have many hats!
@Jimbo "Fascinating is earned by upvoting an answer that is accepted and has a score of at least 5."
upvote this and you'll get the hat
:D
j/k, upvote any answer worth it.
(for those who want to cheat: meta.stackexchange.com/questions/245170/…)
 
Upvoting* then down voting (Y)
Pre-requisite is 10k views
 
for the other "fascinating"
 
@AndreaFaulds You have the perspective all wrong
He refers to all the users as "Zuckers".
4
 
How long does it take for these to unlock?
 
10:27 PM
For whatever reason I have less of a problem with Facebook than with Google
 
Hello!!! Can someone help me at an exercise about NP-problems??
Hello @BenjaminGruenbaum can you maybe help me at this exercise: cs.stackexchange.com/questions/35456/… ??
 
Google Subset-Sum
Also - do your own homework, everyone ends up doing their own homework in the computability course.
It's just that some people do their own homework the second time.
 
@LeviMorrison Well, his blog was named Zuckonit.
That's not a The Social Network thing, it actually was named that IIRC
Ah, no, I don't think it was actually. I was fooled.
 
what the hell is up with that cv
> Congratulations!

> This was only a test, designed to make sure you were paying attention. You passed.
Cool, StackOverflow checks you review properly
 
Anyone know how to test if a late static bound constant is set?
 
@Jimbo defined()
 
@AndreaFaulds Ahh, danke. My IDE was throwing up issues with static::CONST_NAME and isset()
 
@Jimbo Yeah, isset() doesn't work on constants for some reason, it's annoying.
This is for a global constant right?
 
10:48 PM
imho if you need to know whether a class constant is defined you are doing something very seriously wrong
4
 
Oh god, there's a comment on the defined() page telling people not to use it because performance
Not sure if that's good or bad
 
Shit, better avoid it then. I'm absolutely using this in a loop of 10 mil +
 
Should I delete that note?
Ohh, now I understand "late static binding". Literally late binding of static.
 
@AndreaFaulds "Late static binding" is a feature that people who ran into the usual issues with horrible class based software design, but want to continue using it and try to hack around it in some way.
2
 
@NikiC Re-read that sentence again, you're missing a word, probably before "that"
Hey @NikiC: Maybe I'm crazy, but: Unary ?? as a shortcut for isset()?
if ($_GET['error']??) panic();
Though that specific case could be rewritten $_GET['error'] ?? panic();
No it couldn't.
^^
 
11:01 PM
@AndreaFaulds Nope, class constant
 
please stop staring random shit, @think123
@NikiC , could you please do the needful ?
 
I reckon that was Jimbo.
 
And it wasn't me
@NikiC Not true, it allows you to do something in a base class depending on what your child object has... good for automating functionality as soon as you add a new child class and it's used in your application
 
@Jimbo NO NO NO NO NO NO NO
NO
 
Y U NO LIKE IT?
 
11:04 PM
YOU DO NOT DEPEND ON YOUR CHILDREN
EVER
 
I don't... I just, use my children.
If you declare an abstract method that must be implemented, then something in your base class can make use of that via lsb
Allows a child to specify what it's doing without caring how it's used, useful for plugin architecture
Or so, I have seen it anyway...
 
11:18 PM
@Jimbo You abuse your children...
Nothing wrong with using abstract methods, but I don't see what that has to do with static.
 
Well, let's say you want to use some specific logic in a class, in the parent class. A 'call out'... first declare the method abstract, then in the method that will make the call, make it with static:: and you pull in the specific logic depending on the currently extended class being used
I don't actually know why it was called "static" binding, but it's just an inheritance aware version of self
 
@Jimbo So you just use $this->method(). No static.
 
@NikiC If I use $this->method() in the abstract class, will it call the child's method?
 
Yes, of course
 
lol
Bad example, one sec
WTF
I have reasons, sec!
Okay, I did have a bloody good reason, I promise :P
 
11:35 PM
:D
 
Man. It's crazy how much protein you have to eat for muscle growth.
Recommended 1g per pound you weigh, but going a little over is best.
 
in JavaScript , yesterday, by Benjamin Gruenbaum
IF YOU STAR RANDOM THINGS WE WILL REPORT YOU and we will make them take your hats away.
I think we need to pin a similar message here
 
Unsure what their goal was in making that achievement for a hat.
 
@Jimbo Not sure what that's supposed to tell me. You have an undefined variable there
 
11:46 PM
@NikiC Yeah it's me being retarded, sorry man it's getting late and I swear I had a valid use case. I'll think on it...
 
@Jimbo It'll keep you up at night!
 
I don't know what's kept me up more nights: "Why is it broken?" or "Why is it working?"
 

« first day (1523 days earlier)      last day (3425 days later) »