« first day (650 days earlier)      last day (4311 days later) » 

Sam
4:00 PM
@Event_Horizon one of those idiots created this application you are currently using
 
@NokImchen Don't ask whether someone is here or can help.
 
@webarto being 110 and 195cm does not make you fat... cough
 
@vamsi makes sense, for example in my neighbor country, average is 6ft2
 
mysqli_query($mysqli, "UPDATE myTable SET domain = COUNT(the number of occurrence of domain in row domaim in my_table)") or die('echo "error"');
@vamsi i've asked :P
how to code for "the number of occurrence of domain in row domaim in my_table"
?
using loop in php is too slow cos i've too mamny rows. so i'd like to perform the number of occurance of a particluar domain using one line sqli query
 
@Leigh you could say that but when you are physically less active for 5 years, it turns to fat :P tied to the chair most of the day, and chair kills :)
 
4:04 PM
@Sam what does that have to do with anything? also where did the assumption come from that I called the creator of SO/SO Chat whatever you are referring to an idiot?
 
@NokImchen select count(unique uid) from table_name where condition = true ?
 
@webarto Well its the same numbers as me, and I'm not fat, I'm just not skinny
 
Sam
@Event_Horizon you said: Because the entire country uses it and it would confuse all the idiots if it changed.
 
And?
Its a large country there are bound to be tons of idiots.
 
@Leigh not skinny not fat, it's a upper limit for that height :) agree?
 
4:07 PM
@orourkek it dont work :(
 
then what are you looking for...?
 
@tereško Why would I order a half litre when I could have a pint, that extra 68ml of alcoholic goodness is important.
 
@orourkek ok, i'll explain :)
 
@orourkek i've two rows (domain, number) in table mytable
 
4:08 PM
@Sam Also, Protip: I'm US American talking about USA
 
Sam
basically, you insinuated that we use ancient measurements in order to accommodate the idiots amongst us
 
@Leigh , because it will be cheaper and you could finish drinking it before if get warm
 
@orourkek row domain has, say, millions of urls. Most of them are repeated urls
 
Does anyone know how to make it so when a user posts something to the MySQL database, it's not echoed back as something in the actual code? Like if someone submitted <img src='lol.png'> it would literally only show the text not the image? I want to do this for security reasons.
 
@Sam , which is true
 
4:09 PM
@Sam Yup, because its true, and because the idiots are majority.
 
@tereško tbh I could finish drinking it before I got to my table... and in most countries, it's not really cheaper.
 
then buy two
 
@orourkek i'd iike to update the row number withr the number of duplicates of the domain
how to do it?
 
@Alec htmlentities()
 
@Alec htmlspecialchars("<img src='lol.png'>", ENT_QUOTES);
 
4:10 PM
@NokImchen , you use UPDATE statement in SQL
 
@tereško yes :)
 
@webarto @orourkek Thank you, also that's a beautiful picture webarto.
 
@tereško i'm using UPDATE cos its much faster. i can do i using loop in php + sqli but its too slow cos it has to loop throught every row. thats y i want to do it at one line sqli query
 
@webarto Just opened up the image in a new tab, saw the name of the ship :P
 
@Event_Horizon: Just be careful with that, when you start performing other string operations on the object, you will actually end up dereferencing the object, and you'll end up with a normal string again
 
4:13 PM
for example, one mysli query i use to extract domain from a complex url is: mysqli_query($mysqli, "UPDATE mytable SET domain = SUBSTRING_INDEX(SUBSTRING(rawUrl, LOCATE('http://', rawUrl)+7),'/',1)")
using the above code, i extracted the domain. Now, i want to update the number of repeated domains using one line code. But i dont know how. i know kjnow to to use COUNT/UNIQUE code :(
 
@Event_Horizon: Example: html(html(...) . html(...), 'tag2') will cause a double escape, since it will convert both returned pseudo-string classes back into a string
 
@Leigh Good to know.
 
@Event_Horizon: Couldn't you just use a DOMDocument somehow to do all of that?
right, weekend here i come! laters
 
@Event_Horizon Whatcha trying to do?
 
@Alec pirate bay :)
 
4:21 PM
@Truth I was just trying to see if I could write a html_wrapper that detects a function as a parameter and skips it for htmlentities-ifying it.
 
@orourkek lol
 
Some-what off topic but does anyone else here use Linux? I'm looking for what's out there for text editors that people recommend, I use Sublime Text 2 but I haven't had time using Linux so I'm curious on what other people are using. Previously I was a all-windows person.
 
@Event_Horizon Looks like you're grinding water there
 
@Truth Why do you say that, impossibru?
 
@Event_Horizon That's a solved problem you're trying to solve
 
4:25 PM
maybe_passed_as_parameter()
:D
 
@Truth Solved by what?
 
@Event_Horizon DOM, really
(When talking about HTML that is)
 
Anyone use Unison for a newsreader?
 
Alright well I gotta grab lunch, bbl.
 
@Event_Horizon are you trying to prevent double encoding?
 
4:33 PM
:(
someone help me :(
in mysqli_multi_query, can we pass one variable from 1st query to the 2nd query?
 
4:47 PM
@Event_Horizon the google-a-day is very relevant to your username :]
 
Several one-line answers that get 8 upvotes really fast.
Even when it isn't the accepted answer, the answers get those upvotes in rapid succession
 
@Chris It's very possible that people see 17k rep and slam the upvote button
 
My motive here is not sour grapes -- I could give a shit
But that is 2 votes from "nice answer", and that isn't really, per se, a nice answer. It's an answer
That happened in front of my eyes with amazing rapidity
 
I've edited my post... blog.ircmaxell.com/2012/07/framework-fixation-anti-pattern.html Hopefully that will quiet some of the downtalkers
 
4:54 PM
@Chris your answer is better
 
Well, I look at that as teaching a man to fish vs. handing him a fish
But I just thought the vote pattern was odd
 
@Chris Welcome to SO
where quick beats good any day of the week
(sad, I know)
 
I mean... what are the actual odds that 8 people saw that question and naturally voted it up that fast
 
@ircmaxell but .. but . .but .. i use codeigniter and it is so cool , you are just a stupid noob who does not know how to use awesome frameworks
 
Most questions of that type and caliber would be getting downvotes or close votes, magically that answer jumps up to +8 while I'm deciding whether to answer or CV
I decided to answer in the spirit of the "Summer of Love" :p
 
4:57 PM
I've noticed that a lot of people throw in one line "answers" just seconds after the question is posted, then make edit after edit, expanding the post
 
@tereško did you see Lukas's comment?
 
nope , i am still reading the article itslef , which comment ?
 
@orourkek I like to do that too ;)
 
@orourkek Gives very good results :D
 
4:58 PM
@ircmaxell Not sure why people can't just read something and say "gee, that was an interesting take on it!" Instead we get: "It's not what I think, so it's wrong!"
@NikiC apparently it does, if people constantly do it :P
 
@orourkek I wouldn't be bothered if the criticism is valid, like taking one of my counter-points and rebutting it. Then again, if all I do is get people to think for a few minutes, I'm happy
@tereško last one
@NikiC I don't. I'll expand after posting it, but I won't post a bs answer just to by me more time to expand it
 
@ircmaxell A one line answer doesn't have to BS ;)
 
@orourkek This happens quite often, though I guess its for the best as long as they do expand on the original answer(Because at least people that come to the question later will benefit, like they should )
 
well, it must have substance. That answer is a perfect example: stackoverflow.com/a/11692022/338665 I wouldn't accept that as an answer, because there's no explanation or linking to documentation. So I consider it a BS answer...
 
@ircmaxell "So the legacy assumptions that went into the prototype wind up haunting the production application for years." -- this rings very true for 90% of the work I've done in my career. I worked with a lot of startups in prototype phase, and invariably the prototype becomes the product itself while I'm standing by with a sheaf of documents outlining how I would make the production version.
 
5:03 PM
@Arjan no harass, well all I can say is really... macfags. — webarto 10 secs ago
have I insulted anyone?
 
@Chris ;-)
 
The problem I have with using that as a justification to avoid frameworks is that you can say the same thing down-cycle even if you didn't use a framework... "if only we had xxxx instead of yyyy, we could zzzz easier!" This seems like an unavoidable lament
 
Well, I'm not saying to or not to use a framework
 
No, I get you, just that line stuck out to me because it had me going, "YEAH! JERKS! Buuuutt......"
 
I'm saying think about the problem you're going to solve, and tailor the solution to the architecture dictated by the problem. If that means avoiding a framework, fine
That's quite fair though
 
5:07 PM
Damn, I'm going to start blogging
heh
 
Definitely!
 
Not that anyone would read it, but you get to make some great points
 
@Chris I'll definitely read it
 
@Chris yes you should. blogging always good
 
hey guys, what is wrong here: mysqli_multi_query($mysqli, "SET @colur:='red'; UPDATE fruits SET apple= @colour") or die('</br>mySqli Error</br>');
can we use the variable @red in the 2nd query?
 
5:08 PM
For those who don't realize: The goal of my blog is not to tell you what to do or not to do. But make you think about the choices you make.
 
If nothing else, it seems like it would help crystallize ways of thinking. I've read that most people don't actually understand why they believe the things that they believe, and that explaining your beliefs to another intelligent person is when you actually create your rationale.
 
@ircmaxell don't tell me how to think about you telling me what to think!
 
lol;
 
You already had the ideas, but until you have to justify them you don't actually have a justification
 
5:09 PM
:(
 
@Chris agree 10000% there
ok, off to lunch
 
This is one of my favorite blogs, non-technical, more about psychology. I'm pretty sure that's where I got all that mumbo-jumbo about the rationale for one's knowledge: youarenotsosmart.com
 
@ircmaxell If you don't mind me asking what do you do for a living? You seem rather intelligent.
 
5:25 PM
i have proposal for next PSR standard :
> PSR-3: guidelines for proper (or maybe, "double-plus good" ) blog articles
 
good luck with that one :]
 
@PeeHaa Yes
 
@Alec I'm a senior development architect. Which basically means that everything to do with development is in my purview at work...
@NikiC very nice!
 
@webarto essentially yeah. html(html()) shouldn't do any htmlentities
 
5:38 PM
PSR, that's the damn name!
I was looking everywhere for that thing
 
Is doing mysql_escape_string enough to prevent MySQL injection or should I take more precautions?
 
In a conversation about how Traits are yet another example of a PHP feature that appeals to the "New OO" way of thinking, that is, the framework developers that have invented an entirely separate theory for OOP
 
@Alec no
 
@ircmaxell Sorry for postin' anonymous :p
 
5:40 PM
10
A: Are dynamic mysql queries with sql escaping just as secure as prepared statements?

ircmaxellYes, but a qualified yes. You need to properly escape 100% of the input. And you need to properly set character sets (If you're using the C API, you need to call the mysql_set_character_set() instead of SET NAMES). If you miss one tiny thing, you're vulnerable. So it's yes, as long as you do ...

@Chris That was you? Awesome...
 
how do you post a question or answer all fancy like that in chat?
 
Just drop the link in
 
dur... haha thanks
 
@Event_Horizon what doesn't make sense to me is that $tag can contain HTML... anyways... htmlentities has fourth parameter... bool $double_encode = true, have you tried setting this to false?
 
@ircmaxell Would you judge it as safe if I cleaned a string which is being inserted into the MySQL? I'm not selecting anything here, nor am I using any special APIs.
 
5:46 PM
@Alec always escape. Or even better, always use prepared statements
 
@ircmaxell Are prepared statements sqli only or can I do them with normal sql?
@ircmaxell I'm only seeing tutorials on how to do them with SQLi when I google search.
 
use mysqli or pdo
don't use mysql_* anyway, it's deprecated. You'd be better starting with either the improved version or pdo...
gist: cannonical SO comment for mysql_* users, 2012-06-10 23:46:24Z
Please, don't use `mysql_*` functions to write new code. They are no longer maintained and the community has begun [deprecation process](http://goo.gl/KJveJ). See the [*red box*](http://goo.gl/GPmFd)? Instead you should learn about [prepared statements](http://goo.gl/vn8zQ) and use either [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli). If you can't decide which, [this article](http://goo.gl/3gqF9) will help you. If you pick PDO, [here is good tutorial](http://goo.gl/vFWnC).
 
@ircmaxell Alright I'll move to SQLi, I was just fearing it would be more advanced since it's newer, and more difficult for a new person to learn.
 
@webarto That just prevents something thats been encoded not to happen again right? I'm trying to prevent a function from being encoded, because the inner function of html(html()) has already encoded its strings, it shouldn't get encoded as well. I'm not sure double_encode being false would fix that.
 
5:56 PM
@MikeB -_-
 
@Alec , if you call it "SQLi" you are referring to "SQL injection"
that's a commonly used acronym
 
include_if_exists would be very helpful right about now
 
or you could , ya know , be creative and do: if (file_exists($filename)){ include $filename; }
 
Found comment:
/* UNDOCUMENTED FUNCTIONS
	Sorry!  I got these funtions from somewhere else,
	I swear to god
*/
 
That's what I am doing, but coding standards make each one take up ~4 lines, and this particular file has a lot of them
allman brackets :}
 
6:05 PM
jo
 
Yo
 
herro
 
that "ivosaurus" character from /r/PHP is a wonder that just keeps on giving
 
@tereško I need a good laugh. Link please
 
6:07 PM
damn .. i was too slow
 
what are the chances of that
awww, twitter went down
 
i think this is the channels policy :
> see a stupid , share with others
 
Twitter has been having some troubles lately
 
> then I guess we should forget about people like fabien potiencer

I wouldn't hire him anyway. But that's besides the point...
 
@ircmaxell , what will you now do without your heartwarming stream of flame
 
6:10 PM
Actually, it got better once I posted the edit
 
I've been pretty excited about OAuth, I started with simple Facebook Connect and am giving that a try before I move into the larger adoption. That's been one of my concerns about OAuth though, rather than home-brew login -- if you never collect a password from the user and your provider is down, no logging in? Seems like a bad plan, in a way, to pin such a critical function on a company (companies) you have absolutely no control over, and that owe you nothing since you're not even a customer
 
@ircmaxell to be fair, you should have seen this particular backlash coming :p
 
and i find it funny, how they have managed to glorify Fabian , without ever readind what he has said
 
They're fanboys, expect nothing less. You've just committed a blaspheme against their code-Jesus of choice, unthinkable
 
I've been arguing with macfags all day...
 
6:12 PM
@orourkek I did
 
i especially love the "Constants have a flaw in php - you cannot change the values. This is why we use static registry" .. i am paraphrasing a bit here
7
 
@webarto Another camp of rabid fanboys, to be sure
 
@tereško lol! epic!
 
it's from a book about synfony
 
@Chris meta.stackoverflow.com/questions/119558/… one of the examples with a reason 'because it is ugly'...
 
6:15 PM
if(mb_strlen($uid) > 0 AND mb_strlen($hash) > 0)
{
    return 0;
}
else
{
	return 0;
}
^ beautiful
 
> Counterpoint: Wordpress.
BAM!
 
WP solution: rm -rf wp-*
 
@PeeHaa :-D
 
You didn't even had to elaborate after that :)
 
OK, not sure what's going on here anymore, but happy flaming friday everyone~
 
6:20 PM
Ok in all fairness. I also didn't really agree with the statement "It implies that those first three phases of application development aren't important." when reading it on your blogpost. I don't really think it implies that. For all the other points you have my vote though (for whatever that's worth) @ircmaxell
 
well at the very least, they allow their respective users to essentially ignore those aspects, without immediate repercussions @PeeHaa
 
@PeeHaa perhaps not. The nice thing is we don't have to agree :-D
 
@ircmaxell It would suck if everybody agrees on anything and really wouldn't be a good thing
 
exactly
I'm sad it didn't take off on HN
getting decent traffic from programmers though...
 
@orourkek I agree with that, I just don't think it implies importance of any kind
@ircmaxell said? ;)
> It's worth noting that as time goes on frameworks are starting to be developed with more of an "Open-System" design making it easier to fix mistakes in component choices. PSR-0 to the rescue!
Yeah right! PSR-0 solves all the problems and magically fixed most flaws in FW's. Go go gadget fix! ... :|
 
6:26 PM
Actually, I agree with that comment
as the framework groups start adopting standards and working towards interoperability, it will make things easier and better
 
@ircmaxell maybe because it is Friday? :P
 
Well it may make it easier, but it is far from perfect. It may "fix" a tiny part of the issues
But imo there are bigger issues which make it hard to fix component choices
 
@tereško had the master plan -- we all quit our jobs, fork PHP and remove all the framework-pandering from the last 2 years, then start a development company with our "new" proprietary language.
 
that's a lie
 
Oh, don't get me wrong. PSR-0 does nothing for it. But it's a start to an idea that has potential...
@Chris Sounds good. Kickstart it?
 
6:29 PM
that is not the goal of FIG
they just want symfony 3 to be bundled with default php 6 installation
 
user895378
@tereško lol
 
want and will get are two very different things...
 
@tereško some people just want to see the world burn
 
I would rather push a pencil into my eye
 
user895378
Symfony 3 is PHP 6. Didn't you hear?
 
6:31 PM
-1
Q: Can I turn this into a function?

EricI have to do this a few times over to get my links thw way i want to. is there a way I can simplify this and make it a function rather than doing this all the time? Thanks $('.welcome').on('click', function(){ $selected = '.home'; $('.home-lnk li').addClass('active'); ...

really?
 
@rdlowrey man, you are so out of date... amazon.com/PHP-MySQL-Dynamic-Web-Sites/product-reviews/…
 
@Truth I'm so going to answer that :D
 
@ircmaxell I wouldn't doubt that money would come in, but enough to cover ~10-15 full time salaries would be hard to come by :]
 
@Truth why did you have to ruin my day!
 
6:32 PM
@webarto lol?
 
Truth! I just read a chat log between you and Col. Shrapnel
 
PHP6 is so 22nd century!
 
@orourkek Nah... we could raise $2m+ easily
 
@ircmaxell that'll cover my salary, what about the other people?
:D
 
6:33 PM
you just need a cool idea and investors, that a willing to throw money at it
 
got 260 pages NDA and they told me to sign it and fax...
 
@ircmaxell I'd back it :)
What do you care? Does kickstarting it cost money?
If it's not funded that is
 
it costs time if nothing :)
 
OMG!
 
@Truth , you cannot kickstart if your mission statement is "make stuff"
 
6:35 PM
Someone ACTUALLY upvoted that
-2
Q: Can I turn this into a function?

EricI have to do this a few times over to get my links thw way i want to. is there a way I can simplify this and make it a function rather than doing this all the time? Thanks $('.welcome').on('click', function(){ $selected = '.home'; $('.home-lnk li').addClass('active'); ...

 
even if the 2/3rd world country like mine you can get 80k€ for a good project...
 
@tereško What do you mean?
@tereško Most projects are "make stuff"
The best example..
 
yes, but that is hardware :P and gaming console, you can't resist not to give
 
There's no way he's getting that point for that question!
@webarto I didn't give...
 
my colleagues gave a lot, guess they make much more than I do :)
 
6:39 PM
Hardware is too naive. They'll never even tickle the big guns like Sony 3 and 4...
Tegra3 quad-core processor
1GB RAM
8GB of internal flash storage
HDMI connection to the TV, with support for up to 1080p HD
WiFi 802.11 b/g/n
Bluetooth LE 4.0
USB 2.0 (one)
Wireless controller with standard controls (two analog sticks, d-pad, eight action buttons, a system button), a touchpad
Android 4.0
ETHERNET! (Announced by Muffi 7/18)
 
Thats a good catch @Truth . But the answer is a good one for the question ;) — sabithpocker 5 mins ago
 
the pebble watch amount funded is so large that it broke out of the div :}
 
is he f* jokin', a good asnwer :\
 
@webarto He probably meant a suitable answer.
bad answer for bad question
I wouldn't upvote it though.
 
ah, I see, apt answer
 
.doIt() should be .Idiot()... — webarto 6 secs ago
and guy above me is sirius..
 
just delete this shit...
 
I'll get to 10k/20k just to have those capabilities...
 
i would , but i need 8000 more rep
 
we need moar jquery in our answers
 
this question made me regret even checking stackoverflow.com/questions/11693914/…
 
lol , the whole list of answers is just a jewel
 
hehe
 

« first day (650 days earlier)      last day (4311 days later) »