« first day (863 days earlier)      last day (4310 days later) » 

06:00
anyone know any jqury ajax image uploading code please let me know
user652649
@NullPointer they all totally suck... what features do you need btw?
I have other fast question (I hope not bother you with my questions) so.. what its the correct point (so speak) in order to know if a php file make more mysql request that if have to.. I mean, how I know (in terms of efficiency) if im doing more mysql request than I have to. How measure that?
@wes just progress bar
user652649
@JuanFernandoz you can use a profiler like xdebug... search for "php profiler" on google
user652649
06:05
@NullPointer target browsers? IE?
@wes it would be fine if it wont work in ie
user652649
ie<9 can't have upload progress on client side... but php apc can... it is a pecl extension
user652649
in ie<9 you can use a loading gif without showing the actual progress
user652649
also
user652649
in ie upload is made using iframes, or flash player
06:09
@wes working on is not requirement
user652649
any script that i tried sucked in some way... some are hard to customize, some don't work properly... better if you write by your own, using modernzr :P
@wes i have one .. but i sucks ...
user652649
otherwise just use xmlhttp2 and FormData();
gonna just apply my old script
user652649
within my coding-goals there is publishing my js framework, which includes what you need... but i don't have time to properly package the framework... for now it is just a mess... a working mess
06:15
@wes lol...
I have another fast question (some ideas I thing), I only a lawyer so maybe this is rare but .. Thinking about that kind of converter that facebook make some years ago to php code can be reconverted to a c code (hiphop) so.. do you use something like that? I mean its possible to make a code in php and using some kind of converter to make an c aplication?. I know that its no the correct way to do it (because is better just make the app in c directly), but Im thinking about in last days..
user652649
@JuanFernandoz facebook developed hiphop, you are welcome to use it
0
A: Having trouble getting my prepared statement to work

JackMigrating my answer from the (now removed) duplicate. You're executing the statement with a :name placeholder, but it's sometimes not there: function get_config($name = 'home') { $config = array(); $row = array(); $sql = "SELECT value FROM config WHERE name = :name"; $result...

what the ... anything wrong with this answer?
like, it was downvoted once in the removed dupe and again here ... gah, stupid farting genie!
06:21
@Jack looks like it's a +1 now ;oP
heh thnx ... sometimes i wonder whether i've garnered a anti-fan or sth
user652649
i voted down you!
aww =(
user652649
:P
user652649
06:26
where does rowCount() work on pdo mysql? i'm too tired to test by myself.
@wes Ahh, that I know
It's rows affected
So, applicable only on delete, update, insert afaik
user652649
there isn't any num_rows equivalent?
Good question .. I never needed it ..
I would just fetch all and then count ;-)
14
Q: Count with PDO

JamesThere are many conflicting statements around, what is the best way to row count using PDO in PHP with MySQL? Before using PDO I just simply used mysql_num_rows. FetchAll is something I won't want as I may sometimes be dealing with large datasets, so not good for my use. Any suggestions?

user652649
yes but i have to run the query twice
user652649
one for actual rs, one for counting
06:30
how so?
well, it turns out that mysql_num_rows() would actually fetch all rows internally heh
haha stackoverflow.com/questions/15061178/… what a horrible suggestion
and someone upvoted it
@crypticツ There's no rep associated with comments, so an upvote doesn't carry the same meaning :)
It's meant as a joke I'm sure.
user652649
@Jack i'm currently using SELECT FOUND_ROWS() but i was trying to get something more standard
user652649
@Jack does num_rows work on unbuffered queries?
@wes I doubt it works on unbuffered :)
That's the whole idea of unbuffered isn't it?
user652649
06:34
well maybe depends by the dbms
user652649
do you know if FOUND_ROWS() works on unbuffered queries? its the same, probably, right?
ya, it's the same
But why would you need to know the number of rows beforehand?
user652649
i don't actually need it, i'm just examining the pdo thing
user652649
no wait, i need for pagination
user652649
and running twice the fulltext search only for counting doesn't seem a good idea
user652649
06:42
@Jack
user652649
btw i'm going to office... but only after giving my vote to berlusconi
Heh cya later
You can run SELECT FOUND_ROWS(); after you're done with the first query though, I reckon.
07:13
kicks wes and hides
@tereško Hey, if and when you do AR stuff, what do you typically use for it? self rolled, or .. ?
user652649
07:36
@ShyamK :P
user652649
user652649
nice weather today
mod election process begun in 12 hour stackoverflow.com/election/4
@wes Nice! Our weather always looks the same, except for monsoon season :(
user652649
@Jack usa? where in usa?
07:47
afaict, usa has seasons lol
and no monsoon hehe
me.location() == singapore :)
shouldn't that be a single '=' ? :D
@Jack hey, maybe i'll call you if i visit
@kanuj No Stewie, that would be a wrong left hand expression :)
@Jack I'm at Malay
@andho Cool, neighbour :)
Whereabouts? Johor area? Province .. what do they call it heh
anyhoo, gtg ... airport pickup :) cya!
user652649
07:54
@Jack lol right, i should go back to schools again
@Jack Petaling Jaya, Selangor. I think part of this huge area called Klang Valley. bye
08:23
hey guys please suggest something
http://stackoverflow.com/questions/15062787/how-to-adjust-this-query-to-get-the-result
Morning all
Morning
morning
08:54
morning
\o/ I skipped a vacation week without noticing
I'm the best! :D
lol
now every co-worker passing by is showing me an overly gestured facepalm
@Ocramius :D
09:10
@Jack , i use hand-made code. Especially since there is no point to have complex implementation for AR. If your AR need to handle joins, then you should not be using AR to begin with.
(AR == Aggregate Root) ?
how to check size of array which is start from "a"
@andho active record
09:22
@Nileshpatel "how to check size of array" -> php.net/count / "which is start from 'a'" -> no clue what that is supposed to mean
@Jimbo monring
i need no of element in array who's starting form "a"
i.e {a,aa,asd,asfg,b,bb,bsd} 4 record start from "a"
Vote for @Gordon!
you are running right?
@crypticツ uuh, not yet :) should I?
09:32
@Gordon if you got the time definitely
@Nileshpatel loop through or use array_reduce
check each element and update the counter
I probably should. it would save me from flagging stackoverflow.com/questions/56860/… and then getting disputed, having to reflag and getting declined only to find that it is now deleted instead of changed into a comment.
classic example of copy/pasting code. User is using regex to break up URL into their segments stackoverflow.com/questions/15063401/… =o(
@Gordon how long are terms or are they lifetime?
Mornings
As in if you get elected and decide to quit due to availability do we have to kill you?
i didn't know @ is a special character in regex
09:36
Monring @DaveRandom
@crypticツ i dont know. but they only ask for at least 30 minutes a day which is way less than the time I usually spend here. I guess I will just shift from closevoting to flag handling.
@andho It isn't
is the election open already?
Anonymous
hmm..
09:37
I think it started for nominations?
nomination period begins in 10 hours
@Gordon You're going to apply right? Right?
@PeeHaa keep encouraging me :P
@DaveRandom Monring :)
09:40
Star this if you want Uncle @Gordon for moderator
73
blush
@tereško quick - someone thinks they're better than you at mvc: stackoverflow.com/questions/15061395/…
do i have all the badges?
@Jimbo I removed the [mvc] tag, because it has nothing to do with mvc :)
Anonymous
if @Gordon becomes a mob, I wont shave my beards in protest for a year.
09:42
@Gordon Do you have 400 helpful flags?
@PHPNooB You have multiple beards? shudders
@Gordon Yes
@PeeHaa yup. got all of them
Anonymous
mob mod, ain't no difference
Ooh, ooh, I watched a video Ircmaxell posted about Dependency Injection and.. I think I get it! Now I want to make a DIC D:
09:43
@DaveRandom last year I was still missing Convention I think
@PHPNooB pictures or it didnt happen
If anyone's interested in learning how DI works: blog.ircmaxell.com/2013/01/… - it's a good head start!
@Jimbo "DIC D"?
Anonymous
I should be a mod, so I can kick out all people in this room, except for 3

And I will ban teresko 24/7 he won't ever see the light of the Send button in this room
Anonymous
@Jimbo even ' I ' know about DI.
Albeit, did so, 3 days ago
09:49
@Ocramius Dependency Injection Container
@PHPNooB Where did you find the most useful info? Have you written a container?
@Ocramius Very nice, cheers!
err, fixed link
LOL :P
Many useful links here, thanks all :)
@DaveRandom I starred it
See, you even have support from other mods. They want you. Be afraid.
there's also others, like Aura DI or the stuff by Flow3, but I don't really know them
09:56
@BoltClock do you have to spend a lot of time on Meta when you are a mod?
@Gordon It won't be any more than the time you spend on the main site
@BoltClock time I spent on main site > time I spent on Meta * 100
That said switching between the two is as easy as a single click, so it's not that bad
@BoltClock do you guys have a quota? Like do they monitor how many flags you handle, etc.
@Ocramius I find it better to learn how to write my own - then find it's a load of rubbish, and more importantly why - and then I can see how these properly used one's are good, what they do differently and why...
Is a good learning strategy ^^
09:58
i usually keep away from meta because I think it's mostly pointless
@Jimbo sure! I just gave you some pointers :) Hope these help
@Jimbo +1 to reinventing the wheel
@crypticツ They don't enforce anything, but if they notice we've been extremely inactive for a long time then they'll chat us up about it
Usually if something crops up for us though we'll let our fellow mods and the team know in the mod chat room
@Jimbo feel free to ask on that, I kinda digged into a lot of that stuff in the last year =D
Other than that it's entirely voluntary. You handle flags when you feel up to it, you don't have to if you don't
69
Q: Should Stack Overflow moderators have a "standard of duty"?

Jeff AtwoodStack Overflow, due to its size, has some unique problems. One of those is flags. For example, in the last 30 days as of the time I am writing this, there have been 26,710 flags. That is 890 flags per day on average. One of the primary duties of a community moderator is to look at and process fl...

There's this, but again it's not really enforced. It's just a guideline to say that if you can't commit to it then this isn't a suitable position for you, since we have a huuuuge load
10:04
morning ... :)
monring @NullPointer
@NullPointer morning
@Ocramius Thanks ^^
@PeeHaa Is not re-inventing the wheel for usage purposes, only for learning :)
Hey @Gordon, this means your name will become in chat omgz
PHP chat: the place where mods gather to relax hide.
4
well ... we mod-friendly environment
especially since the whole channel is actually moderating the
3
10:09
Something else to entice @Gordon into nominating for mod
I just destroyed 5 user accounts in the last minute
@BoltClock does they have rep too ?
@NullPointer Mostly spam accounts, so no
@BoltClock yay!
I wish we could trade badges, I'd trade my Unsung Hero badge for a PHP gold badge
10:11
@crypticツ lol
@crypticツ I was thinking about tracking @tereško, kill him in his sleep and take his shiny [oop] badge
3
I can haz mod pls bcuz I <3 deleshion and banning for the lulz!!
@PeeHaa i want [mvc]
@NullPointer There is only one person with a gold MVC badge
Lol, too many starworthy in here :'(
10:13
@crypticツ that s why i want mvc :P
@crypticツ there is someone with a gold MVC badge?
and here I was thinking my ~10 answers on MVC are already repetitious
I mean, seriously, how much can you say about MVC?
stackoverflow.com/badges/1233/mvc the 2nd guy has the gold, @tereško is on his way to getting it.
@Gordon thats mostly questions
@tereško but still, getting a gold badge on a Design Pattern?
10:19
@Gordon yeah , that would be nice
@tereško I think it's ridiculous and impossible without repeating yourself on at least every 3rd answer. Everything there is to say about MVC can be handled in a couple dozen questions at max.
@NullPointer Could not watch comfortable for more than 30 secs
@Jimbo same here
@Gordon yeah .. that's kinda true.
i just started after 1 minut so dont know about first 30 second
10:22
@NullPointer judging from my fast forward after 30s I'd say it's all the same, so doesnt matter which 30s
but the thing is that question are not about the design pattern itself , but about the related features , for example: handling of "dirty" state of domain objects, with extensive object graphs
@tereško then why are they tagged mvc? thats a persistance question. maybe but ?
well ... you can go and try to retag all of the 15k question , if you can
Because MVC is involved. That's how tags are used by common folk
even just retagging + to is a pain in the ass
10:26
@tereško *rolls up sleeves* I'll be back in a few weeks.
10
Q: Vast majority of questions tagged [asp.net] and [mvc] should be tagged [asp.net-mvc]

abatishchevI see that mvc (13254 so far) is used incorrectly very often. For example, vast majority of the questions tagged by asp.net (or .net) and mvc actually should be tagged by asp.net-mvc, etc. Only minimal amount of all the questions tagged by this tag are MVC framework independent and are about MV...

@BoltClock how you find always relevant meta question ? this is amazing
@BoltClock i have been trying to retag the "incoming" question , but there are like 100 per day and I am a lazy person
@NullPointer That's what moderation does to you
also , Microsoft sucks
3
10:28
@BoltClock cant you guys just do if && then retag ?
@tereško We're all lazy
@Gordon Not really
Even if we did find questions with both tags only, there's no automated retagging process to combine two tags into one
SQL server, ASP.NET MVC, Internet Explorer, Microsoft Virtual Server
.. and then we get questions like ".. i cannot install SQL"
I could probably throw together a user script but I'm not sure how well that would go down with the powers that be...
10:30
@BoltClock ok, then retag all mvc into asp.net-mvc and live with the lesser evil ;)
@Gordon some of those question are actually about the pattern
like 1 in 100 , but still
it's kinda the same crap-ratio as php questions in general
@tereško 1% wrong tagged questions vs the current 99% - I know what I'd prefer
true ..
I don't find anything wrong with this question ? stackoverflow.com/questions/15064876
at least currently asp.net + mvc is already under 2000
@Rikesh mostly it is missing the "question" part
10:35
@tereško - still problem seems to be clear
I need one php developer
which write some web service for us
@Rikesh I don't see any problem in there. Only do this for me. Which is not a valid error message in PHP
@Rikesh it is also obvious that the OP has put in no effort in researching the subject and expect a solution on a silver platter
Or your company's HR department
10:37
@tereško I agree on that
it's personal requirement..
i will pay for this...
I have one project which we need to complete
iOS project backend PHP server
if any one interested please let me know..
@KapilGhai IMO its not gonna helping to post here .....
@KapilGhai Sounds like this is about to happen again. articles.latimes.com/2013/jan/17/business/…
in iOS Developer Family, 3 mins ago, by Kapil Ghai
both PHP and iOS developer
@NullPointer I am not getting your point
kapil Ghai Project
@NullPointer can you do this job
@crypticツ lol message :P
10:47
aww =o(
@KapilGhai sorry ... nooooooooooooooo
This may be one of the most useless questions on SO: stackoverflow.com/questions/2570633/… I like it!
Anonymous
hmm..
user652649
mornings
10:56
@wes morning .........:)
user652649
@NullPointer :P
Anonymous
morning wes
@wes (O)_(o)
@wes morning
user652649
@NullPointer more like ((((((()))))))))_((((((()))))))))
user652649
10:57
morning peehaa
@wes (((((((O)))))))))_(((((((o))))))))) :P
user652649
coffee will never be enough today...
@ircmaxell youtube will start paid channels soon, too
@Gordon if it will happen it will be very bad
imo add is good enough to get get money ...
user652649
@NullPointer i bet you use adblock :P
11:00
@wes try another powder instead Coffey powder :P
@NullPointer well, they are not mandatory. you can still choose how you monetize your channel. its not like everyone is forced to do paid channels.
@wes no i dont spend many watching youtube :P:P
The best YouTube videos are the ones where the ad is longer than the actual video =oD
@crypticツ and no option to skip
user652649
@crypticツ deal with it or internet will turn into pay per view
Anonymous
11:03
word!
user652649
excel!
user652649
sorry.. i'm really tired
@wes I don't get ads on YouTube vids, unless I view it on my phone. Besides they don't get paid unless I click them right? Or is it display and pay?
@crypticツ depends
i see some time add of movie .. and there is not link on add ....
user652649
@crypticツ the ad video before the actual video is ppv, embedded banners are ppc
11:07
or like ponds/oley adds .. which are mostly full screen ..
@NullPointer good point, but all that makes me do is go to Piratebay
@crypticツ no kat.ph ?
@PHPNooB are you idiot ? you know what is result if you caught by police
i want the demonoid.me back
@NullPointer they basically scrape other torrent sites and tracker to make their listings, PB is the direct source
@tereško yeah I miss them
now i have to get my audiobooks from theaudiobookbay.com , and they have very poor library
ahh RIP demonoid.me
I've been looking all over for this! theaudiobookbay.com/audio-books/…
@PeeHaa deadly bad answer -1
.. here is something we might need to work on : stackoverflow.com/search?q=w3schools
@tereško if only we had an automated system where we can search any post that links to their site and put a warning linking to w3fools.com
Please before you flag link-only answers, look at the question. Is the question asking for link answers? Then you should be flagging the question instead
Otherwise, if the question OK but the answer is a link answer, go ahead and flag the answer
@BoltClock - to flag such question in what category ? "very low quality" ?
just make a custom description of problem
Wondering... is there any decent way of catching exceptions and re-throwing them without destroying the stack trace?
@Rikesh What @tereško said
11:20
@PHPNooB You of all people should know mods can ban people considering you have been banned by @ThiefMaster multiple times
user652649
@Ocramius why rethrowing the same exception? you could use "Exception $previous = NULL" with a new exception
hey folks
whats the purpose of this chat?
PHP and cats
user652649
@Hamad talking about pirate sites
Anonymous
to chat?
11:22
@wes because I want to preserve the original exception and add some invalidation flags
@Hamad php and beer
I guess to report bad questions on SO?
or can we openly advertise questions/answers here?
Also house keeping yeah
PeeHaa how's your websockets project goin?
@Hamad If they fit the room topic and you are not spamming sure :)
@Hamad Pretty good. Have been thinking about some nice API to implement
user652649
@Ocramius and in the new throw you want the sum of both traces?
if you you simply spam you question here, it is quite possible that it will get closed in 30 seconds
Anonymous
@Hamad becarefull, many people who came here never made it back alive
@wes I basically want the old exception re-thrown and be the same. I gotta check first btw
11:25
@PHPNooB elitist nerds bashing on noobs?
so teh more points I have on SO the cooler I am ?
@wes nvm, I was being stupid. Stack trace is preserved
9 messages moved to bin
Anonymous
Just about right
user652649
@Ocramius lol, good to know
@Hamad naah .. if all of your 20k points are in jquery , it's even worse then having no points at all
or codeigniter or cakephp
@wes yeah, just had to write down a sample script
@tereško lol.. thanks for the advice.
@PeeHaa ok what is cv-pls
user652649
@Ocramius eval.in/11141 weird that the trace is catched not on the actual throw, but on the "new"
@Gordon got it
11:34
@wes yeah, kinda weird
but it makes sense since exceptions are immutable
user652649
still weird btw
user652649
@crypticツ also favorited
how about we help this guy out?
makes you feel good inside eh?
He thinks file_get_contents() not only fetchs the HTML but also the images themselves.
user652649
11:43
@Hamad badges make them feel good inside :P
if he bothered to read the documentation or know basic HTML he would know why it's not working.
Anonymous
who?
@wes I feel sorry for him, so innocent in that picture. I favorited the question to make him feel good
ok, it is taboo to answer a question and put your source as w3schools ?
hehe
absolutely
@Hamad the answer you linked does not solve the OP's problem. He is not fetching an image. He is fetching an HTML page. And that page likely has <img src="/foo"/> so he will need to prepend this with the fully qualified URI to the remote location
@Hamad please read w3fools.com .. that might explain the issue to you , it's kinda the same as phpclasses.org
@Gordon got it.
@tereško agree with wikifying w3schools, would tremendously improve quality.

« first day (863 days earlier)      last day (4310 days later) »