« first day (879 days earlier)      last day (4295 days later) » 

11:19
oho, SO makes also fake reviews to check if I actually read stuff? :D
@Ocramius I've failed 3/4 of those
That happens to be 'three quarters', but I've only had 4 checks and got one correct
@Jimbo nice ratio :D
@Ocramius Yes, to prevent badge gaming
(Or more accurately, blind reviewing)
@MadaraUchiha What if you're just retarded like me and keep failing?
(Or more accurately, blind reviewing)
11:22
@Gordon I was going to say that yesterday :D
@Ocramius Yes, to prevent badge gaming
@Jimbo Then you'll be suspended like a crapuser :)
=[
I knew the answer to that, don't know why I asked actually lol
meh... I spent a year not writing a single line HTML... now I notice the side effects
Q: Zend Framework 1 "works" even without .htaccess rewrite rules?
11:26
posted on March 13, 2013 by Brandon Savage

You’re ready to start testing your application. But there’s a problem: the application is a legacy application, or based on a framework. The code is rickety and the level of the code is less than S.O.L.I.D. Is it possible to correctly unit test the application? You want to have certainty that fixing one bug won’t [...]

brandon sure is on fire O_o
Meh, audits are pretty easy. So much so that I will write a nice custom reject message when I see them ;-)
@Ocramius /controller/action and index.php/controller/action both work O_o
@DaveRandom I knew it! Thx! :D
11:28
Maybe PHP CLI server routes everything to index.php by default...
@webarto probably, not sure about that
@DaveRandom so awesome!
> 100% Free Cloud Storage - Store Your Files In My Butt
haha, the web suddenly became a better place
11:36
Awesome.
haha
@hakre That's going to be difficult to sort out in a cross-browser manner, it's reasonably easy to look for adjacent text nodes but you'd probably need to ignore <div>the</div> cloud (block-level elements, in other words) and innerText/textContent are a) a pain in the arse and b) will screw up the HTML semantics if you modify them
@DaveRandom It's complex stuff, but I think this bug definitely needs to be fixed.
11:45
@DaveRandom hey, if it would be easy, this would have been in the plugin already.
true that
@DaveRandom innerText is actually a pain in the cloud ;-)
killed me
@Eugene lol
Hi all
11:49
@DaveRandom New pattern: LOL - Language-Object-Language :)
And don't forget about the Remote Object Functional Language for Machine Assisted Operation.
@Eugene ROTFL - Relational Object Threading Functional Language ... oh I am late @Jack
is worth 4 upvotes?
@Jimbo That is for easy rep hunt. Let them feed.
@Jimbo Is a) because 4 answers and b) the question is actually well formulated :)
argh, out of cv
Yes but, it's incredibly localised and unlikely to help anyone in the future? Especially when the title is "Mysql - PHP query"
go ahead without me :(
The problem is not in PHP, it is in providing faulty credentials. Try root@localhost ? — Unamata Sanatarai 46 secs ago
@Jimbo It isn't. It may be sockpuppeting (/cc @Gordon) but more likely people are so sick of awful questions that when a half-way decent one shows up (legible, makes sense, not completely unresearched) they will upvote it to relieve the monotony
11:54
Ahahaha!
:D
PLB
PLB
@DaveRandom How about replacement like:
v = v.replace(/\b(<.*>)?the(<.*>)? cloud\b/g, "$1my$2 butt");
I've just handled @hakre's input but I think you'll get the idea.
@Jack Guys, close it already. It's getting worse... -.-
@Ocramius You always need to keep at least one vote for emergencies like this! ;)
@PLB Won't work, it loops the DOM properly looking at specific text nodes, it would treat them (correctly) as what they are - separate objects. You could do something like that with innerHTML but that is yuck.
Post error message and dump code on Stackoverflow. Get code-review for free.
PLB
PLB
11:59
@DaveRandom Yeah, right. I don't have other solutions right now. :D
@All hi
@TillHelgeHelwig I did ... wondering whether I should suggest to install nginx instead, since apache doesn't work.
@hakre Isn't that what codereview.stackexchange is for?
can some one help me to get counts of fb posts from page
@Jimbo No, codereview doesn't deal with error message dissection.
@Aadil Just scroll from top to bottom and count?
12:00
Guys, can you please collaborate on improving the phrasing of gist.github.com/3881905 and also think of a less obtrusive way of putting it on StackOverflow. They way it's used now it's rather spammy. Thanks!
11
4
A: Ignore html tags in preg_replace

hakreI assume you should make your function based on DOMDocument and DOMXPath rather than using regular expressions. Even those are quite powerful, you run into problems like the one you describe which are not (always) easily and robust to solve with regular expressions. The general saying is: Don't ...

Is it too trollish to change the title of that question to "Cannot access MySQL with wrong user credentials"? ;)
@Jack nopz i need it through webservices
@Gordon Isn't it supposed to be obtrusive though? :)
@TillHelgeHelwig hahaha
12:02
@Gordon I think only the part with the red box could be removed...
also "Learn" is kinda like "hey, noob, whatcha doin?"
Maybe loose the bold.
Though I am not so fond of them, my reps go up and down up and down I did not understand how and why :) Any ideas people?
@Jimbo that was just a joke seeing that question and the comments below it.
@DaveRandom: Xpath support is not that bad, isn't it? en.wikipedia.org/wiki/…
@Gordon How about:
Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. Consider using prepared statements with either PDO or MySQLi. If you're not sure which one to use, read this article. Here's a good PDO tutorial.
@Jack we want to help users. Not make them feel bad about themselves
12:09
Still a fair amount of hyperlinks though =/
@MadaraUchiha How about putting all that together somewhere and link only to that page?
@MadaraUchiha yeah, it should not be "you are doing it wrong" but rather "consider this better way"
It sounds quite polite to me. And it already suggests to switch to MySQLi or PDO.
@Jack well, it looks quite spammy. and it fells like waltzing over a user
12:11
@Ocramius that definitely. It's a Deixis ad Oculus where there is nothing for the oculus to see.
"Please take some time to read up on PDO and MySQLi, as the mysql_* functions are considered to be bad practice and thus will at some point be removed from PHP. You can find more information here."
@Gordon So hmm, how about just a single link that takes them to a dedicated page ?
Wow, Microsoft just plain lies.
@Jack that sounds sane to me
Yup that's right.
12:14
msdn.microsoft.com/en-us/library/… The note on that table is just, well, wrong.
@Jack some page can be my canonical question
@MadaraUchiha Alright. Almost there then :)
Please stop using the old mysql_* functions, read here why.
@hakre flag it for @Gordon to handle it :-P
12:21
@MadaraUchiha It's not that urgent ;-)
Anonymous
WOW, @Gordon got elected, congrats :)
@PHPNooB thanks
thx.
Sometimes I think it would be easier if the Markdown syntax for code (indenting) would be replaced with <code></code>. Too many people don't seem to grasp the concept of indenting...
@hakre I was thinking in terms of "doesn't work in IE" LCD, but actually for this purpose it's fine, I really need to get out of that habit
@Bracketworks It's not wrong, it just only tells about 1/8th of that sad and blunderous story
> Here is my code: (I am aware of SQL injection weaknesses)
Always nice to read that.
One does not write code with SQLi.
In the first place.
@Ocramius another question came up. :) If I want only one property to be linked to another and not both ways, then I have unidirectional relationship, right?
@Jack The question title is "PHP: Select/Option form store into variable". The top of his 'question' includes: " Ive been told to add a session to store this although im not entirely sure how this would work?" ...
12:35
@Eugene yep
Anybody has a link to that always return a value crap post?
Actually, it is preferrable to have unidirectional associations
@PeeHaa return; :P
Noooooo. Now I cannot test my code :|
...
@PeeHaa careful. He tracked me down on IRC after I said I didn't like it :\
Found it BTW
^ the dupe is not really a dupe, I just left it as a hint there.
@Ocramius No worries I just asked whether he was drunk when he wrote that ;-)
That spawned a weird conversation yesterday
Audit reject reason #34: Because it's Wednesday; there's nothing on TV, conditions are perfect!
12:39
> 1. Fluent interfaces are much more than method chaining and, despite your opinion, they are widely used to improve the readability of the code.
@PeeHaa eih
You're in love with fluent interfaces. Your point is moot
Ow wait sorry. Didn't know @Ocramius was in here ;-)
@PeeHaa haha
;-)
@PeeHaa The purpose of a Fluent Interface is to build an internal Domain Specific Language (DSL). The point of a DSL is to provide a terse and semantically meaningful API with little syntactic noise. A Fluent Interface will sit on top of a Semantic Model that is hopefully build on sound design principles (like CQS). Think of a Fluent Interface as a semantic Facade for your Domain Model.
they are not some sort of general readability improvement technique though
12:42
hello all
Congratulations @Gordon!!
@Abyss Hello
@dragon112 thanks
@DaveRandom I wish; actually it is wrong. IE6 supports 1 class selector.
.foo.bar.baz = .baz and .foo.bar = .bar
@Gordon counter thanks++ :)
12:43
Guys i had a question. How to keep sense between two IN () statements in WHERE comparsion ?
Sorry for SQL question
Not getting you. Show your query @Abyss
@Bracketworks Exactly. Technically it does support multiple class names, it just ignores all but the last. But it does understand multi class syntax, except it has no idea what to actually do with it.
@Rikesh yep, 1 sec
@Gordon Stop saying thanks so many times ;-) you'll wear it out.
@Jack ok, thanks
12:47
@Gordon You're welcome :)
SELECT ... FROM t_drugstore ds, t_drugstore_shellife dssl, t_drugstore_price dsp, t_pharmacies_companies tpc WHERE ds.id = dssl.id AND ds.s_company_id=dssl.s_company_id AND ds.s_company_id=dsp.s_company_id AND ds.id = dsp.id AND dsp.s_datetime=(SELECT MAX(s_datetime) FROM t_drugstore_price) AND dssl.s_datetime=(SELECT MAX(s_datetime) FROM t_drugstore_shellife) AND tpc.id=ds.s_company_id AND (ds.id IN (72793905,72947886,209348) AND ds.s_company_id IN (1)) HAVING dsp.s_price > 0
@Abyss You might want to make a pastebin to make it readable: pastebin.com
Damn, for a moment I thought it was a joke written in SQL :-(
@Jack Haha, you are not the only one...
12:50
@Abyss seems fine what's bothering you ?
Need to keep some sense between IN statements or replace it with another contruction. I need to get goods by their id and their company id. I use IN, but i thing it's not provide correct getting. I need something like IN, but with dependense between they. Like get row with IN-1[0] and IN-2[0]
@DaveRandom Well, technically PHP does support anonymous blocks, it just doesn't do anything with them. I'd hardly call that support ;)
But your diplomacy towards Microsoft deserves some kudos. I don't think I've made many statements about Microsoft in recent history that didn't include the words "fuckers", "liars", or something like that.
Seems noone help me (
@Abyss How can you even read that query properly when it's all on one line?
@Jack ok, i understood you. But problem is not on reading.
12:59
you have a HAVING without a GROUP... that's not valid IIRC
@ircmaxell ok, will erase what, but question about IN dependense
> The SQL standard requires that HAVING must reference only columns in the GROUP BY clause or columns used in aggregate functions. However, MySQL supports an extension to this behavior, and permits HAVING to refer to columns in the SELECT list and columns in outer subqueries as well.
@Abyss It is for me!
Lol, guys, you see which question i give ?
Or you only gives some advices.. Nice
@Abyss Can you update the pastebin with what you expect and what you are actually getting? this way we can see what's going wrong. Right now it's rather hard to say imo.
@webarto Oh that's actually new to me, thanks!
Programming is hard!
OKAY. Another words. Need to get goods, by two columns. I think about IN statement, WHERE id IN(1,2,3) AND id2 IN (5,6,7). Need dependense between INs, like IN1[0] AND IN2[0].
13:04
then IN is the wrong construct for you, because that's not how it works
@dragon112 ;)
@ircmaxell Okay, another solution for getting mass goods by two columns in single query ?
honestly, without sitting down and really examining what you're trying to do and your schema, I have no idea...
XY OR E_CONTEXT_MISSING
2
As i said, please give some more information on what you want to do an what the query is returning in stead
13:08
later
@Bracketworks Speaking ill of a despotic regime doesn't generally work out well you, you are liable to be killed in your sleep.
I do it for the people. This town deserves a better class of criminal browser.
> Anyone can piss on the floor, be a hero and sh*t on the ceiling.
4
Public toilet graffiti can be amusing sometimes...
@DaveRandom Public toilet graffiti? Are you talking about Pinterest?
user895378
Oooh Gordon is blue!
13:15
No a colleague just showed me a pic on his phone
@rdlowrey yes
user895378
hehehe
da bu dee
Wut?
@go_oh @Ocramius Does the same apply to the Doctrine docs?
@Gordon what is he talking about? O_o
@Ocramius I dunno
ah, he's raging on the entity generator
it was totally OT :)
@DaveRandom Is that the third time he's asked that? I'm not bothering to read.
Your XML does not contain any nodes that match your query. 20130313 is not less than either of the two dates in your data, I suspect you have the operands the wrong way round. — DaveRandom 6 mins ago
problem solve sorry i forget sign with < to > thanks for view and now i want some change in them i also edit my question please check... — jack lanza 2 mins ago
And the edit is:
> i want one textbox by input manual date... i dont like $queryResult = $xpathvar->query ('//product_id["20130313"...
@DaveRandom did he ask the same question yet again?
Looks like it
Actually the others are all very slightly different. Whatever, the guy does appear to be vamping heavily via the medium of terrible questions on this particular issue.
people who keep asking the same question in different ways are a little bit annoying, especially when you answer the question and they accept it (and then you edit the question to not be terrible)
they accept, but then they carry on debugging on SO, so you ignore them
then they email you :|
@Hiroto That's a plain stalker imo.
@Hiroto Stop giving people your email address then :-P
13:45
it's on my portfolio
:|
2
A: Moderator name appears twice on deleted post

Marc Gravellasdlkjaslkdj lkasjdlkasjdlk asjdalksj

lol
13:48
@Hiroto when you help a help vampire they tend to target you for more. Soon you will end up waking up with concatenation marks on your neck. O_0
user895378
lol @ concatenation marks
Hahahah thats pretty awesome
@Hiroto you could also remove your email from your portfolio or remove your portfolio from your SO account.
13:49
Yup looks like cryptic have some :p
Lol
@NullPointer I giggled heartily
@NullPointer Haha
> both configuration and test scenarios are controlled by the developer, this will not make any difference.
@DaveRandom famous last words :D
Please let ke know your Twitter acccount so that I can follow
Just created account in Twitter
13:54
@NullPointer Why you accepted that one ? :p
All of my aliases are taken on twitter
@Rikesh Because clearly it's the most comprehensive answer.
so i refuse to make one
@Bracketworks haha. i hope i'm reading the same you all are reading :p
@DaveRandom lolwut
13:56
Its always good to accept concrete\correct answers
And I found that one correct answer
@DaveRandom lol, is the eval even necessary?
Or truth I want to troll him back
@NullPointer That's cool..I was just worrying for the user who answered it correctly ;)
@hakre Because E_ALL ^ E_NOTICE & E_STRICT, etc. But still... some validation would be nice...
13:59
@webarto well, why not express that when setting the config? e.g. in some bootstrap or test-case?
paths:
    tests: .
    log: ../logs
    data: _data
    helpers: _helpers
settings:
    bootstrap: _bootstrap.php
    suite_class: \PHPUnit_Framework_TestSuite
    colors: false
    memory_limit: 1024M
    log: false
    silent: false
    error_level: E_ALL ^ E_NOTICE
it's like this, thru YAML
@Rikesh Well, I wasn't in complete agreement with "asdlkjaslkdj", but when he mentioned "lkasjdlkasjdlk", I couldn't help but upvote.
lol :D
I wish i can decode this encrypted language :p
@hakre - user must be drunken :)
14:03
@webarto then this should have some extension like:
settings:
    bootstrap: _bootstrap.php
    suite_class: \PHPUnit_Framework_TestSuite
    colors: false
    memory_limit: 1024M
    log: false
    silent: eval(E_ALL & E_NOTICE)
    error_level: eval(E_ALL ^ E_NOTICE)
why reduce it to that special case?
holy shite, the new mods are doing well. my flags are being handled within seconds.
@crypticツ would if I could :/
y don't they onebox ^
gordon, don't your close votes close instantly?
@Gordon You still have the 50 cv limit?
was going to ask the same
Eurgh! Since when did my flagged posts have the number of answers on the right of them?
Has it always been like that? It's awful!
@dragon112 i dont think so. I just dont want to instaclose it
14:31
@Jimbo yes always been that way AFAIK
Just booked my flight to DPC
i thought you said DPRK
for a second
DPRK?
Democratic People's Republic of Korea
looks like a nice place for a vacation
14:38
North or south Korea ?
I was thinking about the border :P
@hakre ZF2 tests cannot be run with globals backup, because there's a flustercluck of closures representing the running application
Ah ok
With the schedule flights, I'll get Silver on United in June, on the flight back from DPC (actually, on the first of the two flights back from DPC)
@Ocramius well then I'd say PHP needs to support serialization of closures soon. They could on define store the source location and on unserialze pick it from there.
muhahaha
haha
@hakre Not possible to serialize closures
14:49
serializing closures... I don't even think that's really possible :)
@webarto: github.com/Codeception/Codeception/commit/… - nice code btw, this is just a small addition.
@ircmaxell it's the case where serialize throws an exception!
A php core function throwing an exception!
@hakre no, the function doesn't throw the exception
the closure object does... (which you could still argue isn't right)
well, probably it's right. probably not. but in any case, you can't serialize because of the use() clause.
correct
how would you restore that variable on unserialize?
it's not possible I would assume.
@hakre Awesome :+1:
bummer
the idea is nice btw :)
@Ocramius one more Q. Sorry. If I have a field in mysql database with type blob, and earlier I wrote by hand $data = new ArrayObject(); serialize( $data ); what would be the correct way to do it in Doctrine2?
15:04
@Eugene you don't handle the serialization. That's done by a doctrine DBAL type for you
you can mark the field as type "object"
But then if I generate entity it comes out like this
/**
     * Set data
     *
     * @param \Object $data
     * @return Session
     */
    public function setData( \Object $data )
    {
        $this->data = $data;

        return $this;
    }
Should I just change \Object by hand to something like \ArrayObject?
It's remarkable the different tone and mood set by the regular users of different rooms.
15:10
@Bracketworks What do you mean?
Ohhhhhhh, nothing.
@Eugene why would you want to generate entities? :P
Just thinking viciously out loud.
I told you already, that should be done only once :)
@Ocramius I was playing around with command line tool
15:11
@Eugene you can also mark it as "array"
@Ocramius you mean they should be generated once or wrote by hand once?
@Eugene you generate once if you really must, then work as if the entity generator never existed
I was unable to generate entities if there were none in first place.
Is this a noraml Doctrine2 behaviour?
@Eugene the normal approach is code first
@Gordon is it same as we are using in website .. ?
15:14
first write the entities, then the mappings, then generate the db
@Ocramius okay, what would you suggest if I already have DB with relationships and everything?
if anybody still has some close and del votes, you can visit the closing room chat.stackoverflow.com/rooms/25318/the-closing-room which has some typo questions that still need some clicks.
@Eugene import once (the mappings) from DB, then generate the entities, then clean it up by hand
How I might do this step import once (the mappings) from DB?
@NullPointer huh? it's RTFM if you ask me, but I cannot closevote on it because it would instaclose it. So I leave it up to you to handle it.
15:16
@Ocramius are there any docs regarding that?
@Eugene we wanted to write a "database first" documentation, but never got to complete it :)
@Gordon imho you are taking that wrong approach to this
but if you already have the mappings extracted from db, you're almost done
What point is there to insta-close if you are not going to use it
@Ocramius I haven't. If there was an example, would be awesome!
15:18
I think @Gordon is just being cautious
I think you should not shy away from closing stuff, just maybe let the deletion part out ;)
@Eugene there's a convert-mappings CLI command that accepts a --from-db flag or such
@Gordon just asking because if curiosity don't like android at all ...
@Eugene symfony has docs for that approach. I don't like their docs, but it's similar to what you need: symfony.com/doc/2.1/book/doctrine.html
@NikiC what @Jimbo said
15:20
@Gordon I understand that
I just don't think it makes much sense. This way closing becomes more complicated for you (as you have to wait for the last vote), rather than easier
completely agree with @NikiC we(atleast i) leave thing upon mod ..
@Ocramius Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it. I hoped, that Doctrine2 will be easier, then 1.2
@NikiC yes, but it doesnt matter much. I mean, I can handle other things now. that's okay.
@Eugene d2 does not have enums. You can map them to strings
15:23
@Gordon Now that you're a mod you should convince SO to automatically post that when a question containing mysql_ is asked :P
4
So I am using mkdir to make a directory. Simple enough. I get safe mode restriction in effect. I found a solution where you can change the session.save_path in the php.ini file. However the hosting provider I am using does not allow me to have access to that file. Is there another way to fix this problem so I can make a directory from within php
@Gordon I can't really agree with that. The bulk of work in the php tag at least is plain closevoting (and not merging etc). It's good that you can handle other stuff now, but it would be nice if you would also stay on the cv-train ;)
@Eugene $em->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string') - related:
5
Q: What do you use instead of ENUM in doctrine2?

DavidWWhat do you use instead of ENUM in Doctrine2? smallint? I thought of using varchar, or explicitly define char, but this may not be very effective when it comes to indexes, or am I wrong?

Thank you.
If anyone's a fan of twitter bootstrap, and uses their limited number of glyphicons, you'll love what I just stumbled upon: fortawesome.github.com/Font-Awesome
15:26
@NikiC there is a lot of flags to handle :)
@Jimbo that's huge O_o
@Jimbo omg omg that is awesome ... :P
@Jimbo I like that
IKR!!
@Gordon hehe, I guess that's right ^^
15:28
anybody read my thing ^^
http://stackoverflow.com/questions/15389331/session-start-not-working-on-all-pages/15389346#15389346
@Ocramius, okay, mappings in place. Now I should somehow generate entities based on those mappings, right?
Don't see anyway to do that with command line tool
15:48
@Eugene there's a generate entities command
@Ocramius yes. But when I view help I don't see any option for usage of mappings during generation of entities.
user895378
ANNOUNCEMENT: I'm on FIRE. Wayward code parts like the F-ing Red Sea when it sees me coming.
user895378
</announcement>
lol
user895378
15:59
I was going to say something about how wayward code opens up like @Lusitanian's mother but I didn't want to get flagged. So I went for the biblical reference instead.
2
nohup php -S 127.0.0.1:1337
can't touch this

« first day (879 days earlier)      last day (4295 days later) »