« first day (1030 days earlier)      last day (3924 days later) » 

3:07 PM
@DaveChen I think I remember seeing an issue with the Exif data in Canon Powershot images being 'non-standard' aka invalid strings.
 
@NokImchen Here ill give you the newest php file. It still has errors but easier to fix..
 
Hello Guys
 
@Cody Hi
 
I need some help
 
I need some beer.
 
3:10 PM
@l0oky ah, no prob :) u are working so hard for me....
 
Me too...
 
I want to handle file download using this code
<?php
	header('Content-type: {$row['type']}');
	header('Content-Disposition: attachment; filename="{$row['name']}"');
	readfile("$filename");
	exit;
?>
 
@NokImchen I really can't continue anymore on your project cause It's going nowhere. You'll realize that what you trying to do is 100+ years of research the compression nerds figured out already
 
@Cody use double quotes or escape :P
 
It work fine for file smaller than 150Mb
 
3:11 PM
Also, PHP isn't meant for this..
 
Variable expanding has got to be one of the worst features imho.
 
@l0oky no prob at all :) u have already helped me a lot
@l0oky i knw i'l be able to fix the bug :)
 
@NokImchen Glad I helped :)
 
But when i try with files size >150 it browser download only 2Kb
 
Still can't get used to the php syntax...
 
3:12 PM
what's the problem
 
@l0oky i'm more glad that u r helping me and being so kind :)
 
@Cody :
 
@NokImchen mega.co.nz/…
 
$fileHandle = fopen($fileNameToServe, 'r');

			if($fileHandle == false){
				throw new \Exception("Failed to open file [$fileNameToServe] for serving.");
			}

			while (!feof($fileHandle)) {
				$contents = fread($fileHandle, 8192);
				echo $contents;
			}

			fclose($fileHandle);
 
@l0oky downloading,. thanks a lot :)
 
3:13 PM
@NokImchen np
 
@l0oky done :)
 
...
 
@NokImchen You can comment these print_r lines cause I used them fro debuging only
 
@l0oky oh, i see :)
 
@NokImchen Ask me If you see anything in code that you don't understand..
 
3:15 PM
@l0oky oh, sure :) thanks again :)
 
@NokImchen No problem.
 
@Danack I don't know how to combine that with the query I already have =/
 
@NokImchen If you're looking to do this in a high performance manner, don't use PHP
It's not what PHP is made for.
 
@Jeremy Er - it replaces the query you already have.
 
@SweetieBelle yes, i understand, but as of now, m most comfortable with php, so i'm using it as a learning purpose :)
 
3:18 PM
@Danack It replaces the query I originally sent you, but that was only for one condition. I've got multiple queries built into this one condition (so I don't need to use PHP and it's easier to implement). The post has the full query
 
@NokImchen PHP is very simmilar to c, c++;
 
@NokImchen OK, but if I were you I'd learn C++ as its not much different
and will do what you want in a far more efficient way
 
@Jeremy Can you link it again?
 
@NokImchen Also you already have done code for what you want, arithmetic coding and stuff
 
@l0oky my pc is too slow, just 356MB ram, so i'm using browser based languages like php only :)
 
3:20 PM
Similar to c? Really? Oh my...
 
@l0oky if i want i can use vb6, but its too outdated , so i'm sticking to php as it can make web app too and turn into cron jobs for saving manual works... i'm doing as much as possible using php as php is available in any hosting plan
 
I miss vb6
 
@DaveChen me too! its one of the easiest language i've come accross. compared to other languages and i learnt most about programming from vb6 only...
 
@NokImchen PHP is slower then c++... Also you can get a great c++ editor without having a fast computer
 
which is faster preg_replace or str_replace for simple replace like replace "abc" to "xyz"?
 
3:24 PM
str_replace obviously
 
@l0oky yup, but c++ cant be used in godaddy shared hosting. so, i want php only...
@Langdi thanks :)
 
@Langdi: you may be surprised....
 
@NokImchen Lol?, You need to use mysql from godaddy?
 
@l0oky as i sad, i want my algo to work in cron even wen i'm snoring :P
 
Anonymous
 
3:26 PM
^ haha what!
 
@NokImchen Well you can do it from your computer
 
@l0oky yes, i used to use mysql a lot.
@l0oky my poor pc will die if i run 24*7 :|
 
@NokImchen Then you can use webservices
 
@Wrikken: For simple replacements str_replace is faster. I've seen benchmarks.
 
@l0oky web and software development are different fields, please don't compare them here :)
 
3:26 PM
@l0oky ahem..ahem.. expensive :P
 
@DaveChen The lines are very blurred these days...
 
@Langdi: I've seen benchmarkts both ways... it really depends on how 'convenient' the data is for both solutions.
 
@DaveChen He wants to make a compression program to compress .zip files haah how crazy is that. On web! With PHP!
 
-t*
 
@DaveChen Web is just a UX library these days :P
You can put it on front of anything
 
3:28 PM
I'm a c# desktop dev :P, so yeah, lines are blurred...
 
@Jeremy "I want the query to, in addition to selecting Users.* FROM Users, select UsersGames.role (where UsersGames.user = :user AND UsersGames.game = :game). I know I probably have to do something with a union of some sort, I'm just not sure what." Yes -
http://chat.stackoverflow.com/transcript/11?m=11179977#11179977
 
@Danack I said that because you gave me a union!
 
That query does what you want doesn't it? If it doesn't, then I don't understand what you want.
oh hang on - just seen the role = bit.
 
@Danack Did you see the query in the post? The only difference between the new query and the old query is: if the game parameter isn't a wildcard, it should include a role column
 
3:41 PM
So you want two separate queries based on what the parameter is set to?
 
@Danack Kind of, but I decided (in the comments under the post) that having role set to null would also be okay
 
meh - if you want two different queries, just write two different queries.
 
@Danack I addressed that in the post also :P
 
@Simon_eQ I don't see why a "total beginner" should use an ORM. You should have some base concepts in mind: databases, parameter binding, some decent OOP
also, this is for total beginners. I used it to teach doctrine2 to my co-workers, who should match the definition of "total beginners" since they're frozen in the PHP 5.1 era
 
Anonymous
3:59 PM
@Ocramius Well, the only thing I can do, is speak for myself. And, based on the amount tutorials I have searched, none were even remotely as helpful as this one. symfony.com/doc/current/book/doctrine.html
 
Anonymous
It may be difficult for you to imagine what a total beginner means, because are not it.
 
Anonymous
Anyway, while searching for tutorials I have found also many users who said, they couldn't understand the doctrine intro.
 
@rdlowrey upvoted. In terms of stability, how is it?
 
0
Q: Preg_split on quote, except when followed by another quote

Mark BakerI'm trying to split a UTF-8 string on a quote character (") with delimiter capture, except where that quote is followed by a second quote ("") so that (for example) "A ""B"" C" & "D ""E"" F" will split into three elements "A ""B"" C" & "D ""E"" F" I've been attempting to use: $string = '"A...

 
Anonymous
4:13 PM
@Gordon In what ways can PHPUnit do tests aside from doing assertEquals()?
 
Anonymous
Or, what are more useful functions aside from that one
 
Anonymous
@Gordon That was so helpful. thanks
 
4:39 PM
La La La
Anybodyy alive?
 
zan
yup all are alive
whats going on guys
 
xd
 
@Simon_eQ I helped a couple of hundred people getting started with D2 :P I may have an idea of the "total beginner" ;)
the fact is that it's not easy to understand a data mapper. And honestly, the symfony2 tutorial is borked, suggesting practices like code generation for entities...
 
Anonymous
I think the problem is that, all the doctrine guides assume, that one has an efficient understand of ORM before the tutorial. That is not the case, with most beginners to doctrine
 
4:54 PM
tried to get rid of it a lot of times, but it's a "marketing" feature of symfony to "generate everything". Makes me wanna rip my hair off...
@Simon_eQ an orm saves and loads objects. Doctrine loads and saves ANY object
how hard can that be? :P
I even introduced that part at the beginning of my old tut
 
Anonymous
First your video tutorial, which I have saved in my PC, because I was using wifi outside, was disappointing. low quality, difficult into but good jokes.
 
that one is meant for ZF2 devs who already use doctrine
it's not "Doctrine basics"
 
Anonymous
I thought it was intro, so I downloaded it. Reading the doctrine docs, I even thought the /*...*/ were comments, and when the doctrine manual said, annotations I kept assuming that it had to was something inside the class, It took me long to realized, the comments were infact part of the tutorial
 
Anonymous
THAT, now is the definition of total beginner
 
Anonymous
Anyway, after the symfony tutorial. I made, and am still making as of this moment many CRUD applications. I even memorized some of the commands.
 
5:01 PM
/me pukes at "memorized"
that's exactly what you should not do :P
 
Anonymous
And, why is that?
 
but anyway, you're through
because you should understand what is going on, and not blindly generate stuff
 
I need some advice, I have a table thats getting queries based on the strtotime this week variable from monday till friday. is it possible to make it dynamic with a arrow on click it switches from this week to next week? or whats the best way to do something like that
 
you should be fine with the d2 website if you're through that though
 
Anonymous
@Ocramius offcourse, I understand what is going on. The only way, I was able to memorize it, because the commands made sense to me.
 
Anonymous
5:04 PM
Anyway, just 1 question. So, far I have made basic blog with symfony using doctrine. And it is awesome, even though it may take me some time to realize its full potentials. But, my question is, how would I use D2 without a cmf?
 
Anonymous
Lets say, I need to make a site without any cmf. Can I just get doctrine, require some file from the folder, and just start right away with it?
 
CMF?
ah, symfony is not a cmf, but anyway, without a framework
I made a tutorial at marco-pivetta.com/doctrine2-orm-tutorial/#1 that assumes no other framework
you just bootstrap the ORM with a metadata driver and a DB connection, and that's it
there's also a sandbox dir in the ORM repo... there's examples in there
 
Anonymous
" bootstrap the ORM with a metadata driver and a DB connection, "? You should keep up with me on that "Total Beginner" subject
 
Anonymous
You are loosing me.
 
Anonymous
When I download the Doctrine2 library, what files should I include from it?
 
5:08 PM
@Tredged I hate being invited.
 
@Gordon I tought u were afk so I could leave a message but since u are here
 
@Simon_eQ just read the examples. Metadata driver => reads information about your entities into metadata that the ORM understands. DB connection => well that is usually setup from a configuration
 
@Gordon I need some advice Im asking u since ur experienced with most PHP possibilities. I have a table thats getting queries based on the strtotime this week variable from monday till friday. is it possible to make it dynamic with a arrow on click it switches from this week to next week? or whats the best way to do something like that. ? Hope you can help.
 
@Tredged All chat rooms are public anyway, so asking me here is as good as anywhere else and if you put @Gordon in front I'll get notified of your question anyway. Doesn't need a separate room. Also, I am likely not the only one who can answer your question.
 
Anonymous
5:10 PM
@Ocramius thanks, later
 
@Gordon Sure! Ah thats to bad, thanks anyway then :P
 
> with a arrow on click it switches from this week to next week
that's a frontend question then.
use some sort of datepicker widget
 
@Gordon Ye I am using a sort of datepicker widget but it fetches some queries based on the week it is currently and I want it to switch sort of easy so u can look into the futher :P (as in next 2-3-4-5 weeks or so).
 
@Tredged them modify the widget so it does that. what you ask for can certainly be done.
 
@Gordon Thanks, I will sure try my best :)
 
user895378
5:18 PM
@DaveChen The API itself is very stable. There are features and functionality I plan to add but those changes won't result in BC breaks. It's not fully mature, so I wouldn't rush it into a production site right now. But it does make sense to try it out and see how it works for you.
 
user895378
You can install and use it in about two minutes because there are no extension or OS requirements.
 
user895378
Most PHP web SAPI apps don't need this functionality, of course. I wrote it because I needed asynchronous processing in my event-driven PHP servers.
 
@Gordon is there any way to add a user to chat room who doesn't have at least 20 rep ?
 
@à° _à°  no
 
5:26 PM
Lmao xd
 
Lol what a question @PLB
 
PLB
No. You can't. If you are thinking about doing this, learn an actual programming language, not PHP. — Cole "Cole9" Johnson 15 mins ago
@Tredged This comment is better. lol
 
XD
 
PLB
5:32 PM
@PLB MASM is assembly. Assembly is programming. I don't view PHP as programming. — Cole "Cole9" Johnson 47 secs ago
 
Haha @ tag
 
What on earth
why is there so much of this football span
 
I have no idea, I dont understand the point of spamming anyway lol.
 
Agreed
 
5:35 PM
Funny thing is... easily to hunt down due to their use ;)
 
xd
 
Hello
 
@HamZa Hi.
 
PLB
It's getting annoying now.
 
5:40 PM
0
Q: Recent Mass Football Spam

Bad WolfIs something wrong with StackOverflow's spam filter? Recently there have been huge numbers of spam topics related to football streaming. They have all been spam flagged and deleted but there are more getting posted all the time, I just flagged another 6 or so a few minutes ago. This has been goin...

 
@SweetieBelle I don't think the speed test from we-love-php.blogspot.co.uk/2012/07/mysql-or-mysqli-or-pdo.html is that good - but if you're going by it, then "PREPARED STATEMENTS ALL THE THINGS" pastebin.com/pJ9Hu2qL
 
http://stackoverflow.com/questions/18174792/nfl-tv-free-watch-buffalo-bills-vs-indianapolis-colts-live-broadcast-streaming-p
Lmao they keep coming :S
 
I'm going to run out of flags if this keeps up
 
Hahaha yea
 
5:45 PM
E_INDIAN. Nothing against the race btw :) — HamZa 37 secs ago
 
RACIST ^^^
 
Haha
 
hehehehe
 
@Mr.Alien lol, I said "nothing against the race" :D
 
PLB
It's general error for doing things wrong. :D
 
5:47 PM
LOL at gordon's reply.
 
I pointed E_INDIAN :p
 
why static persists the var change?
 
this outputs 125 on first function call and 130 on another function call
function globy2() {
		static $var = 125;
		echo "$var";
		$var = 130;
	}
 
5:51 PM
Yes, that it does.... and 130 on every next call.
 
@Mr.Alien yeah, because it will "save" the state of the value. A better example would be to increment $var, and call x times
@Wrikken another dutch ...
 
Dutchies taking over
 
Well, yup.... :P
 
@Tredged yeah, crazy ...
 
but why, so that means it will change the value in func, but not globally
 
5:53 PM
@Mr.Alien yup, that's actually very handy :p
 
so that means static var default value is used on 1st iteration and than it will be overridden;..
 
I had like 28 days visit row and I missed 1 day otherwise I would have my silver badge xd:(
 
If I roll my chair to the next room I could be german if that suits you better :P
 
@Wrikken NEIN NEIN NEIN
 
@Mr.Alien: see it like this: the 'static' line is run only once per process, the rest on every function call.
 
5:55 PM
@Wrikken stayin on border?
 
@MadaraUchiha hahahaha
 
@Wrikken yea, it will run once, won't be running on second func call
 
Well, I exaggerate, but Germany is like 200 meters east.
 
@MadaraUchiha I guess you just had php code in your dreams..
 
5:56 PM
The mods deleted the nfl tag lol
 
@Mr.Alien Heh :D
 
PLB
@BadWolf Why did we have it?
 
I don't know why it even existed in the first place
 
@BadWolf Not really the mods only ;)
 
The NFL tag was a side-effect of people using nfl-data api's
 
5:58 PM
@PLB I had my volume maxed out and ping from the chat when you posted that made me jump backwards out of my char
 
I think tags like "search", "replace" should be deleted
 
PLB
@Wrikken There exists too many WS we should not have tags for all of them.
 
EMULATOR + NES + ANDROID = AWESOME WEEKEND
 
PLB
@BadWolf lol, sorry.
 
I agree, just saying that people incorrectly tagged it in.
Which just got removed from all those questions to let the garbage collector take care of it.
 
6:00 PM
ok, we don't have to write static $var; like we write global $var cuz this is not changing the value like static $var = 125 does
 
@Mr.Alien I think global should be avoided. But can't be helped sometimes :p
 
PLB
@Mr.Alien I guess, static $var inside function has the same flow as in c++ not sure, btw.
 
@HamZa I use params, but I was saying about declaration part
 
6:02 PM
@PLB nah, these 2 has difference
 
@PeeHaa DAMN !!!!!!! I had to scroll for eternity !!
 
function globy2() {
		static $var; //Useless according to me, doesn't make $var 130 on second function iteration
		$var = 125;
		echo "$var";
		$var = 130;
	}
 
@HamZa I'm still scrolling!
:)
 
function globy2() {
		static $var = 125; //this makes $var = 130 on 2nd iteration
		echo "$var";
		$var = 130;
	}
 
It does make $var 130... you just set it back to 125 right before your echo.
 
@Wrikken me = noob shat... thank you haha
 
Super flagged
 
Anonymous
24 Answers And, I don't understand none of them. I'm too lazy :)
 
6:08 PM
 
If you don't understand none of them, does that mean that you understand some of them? :D
 
@Simon_eQ I've read in a book that it provides "more control" to the code
 
@Mr.Alien I don't understand why do you have 100 flag votes ... I mean you don't need them xD
 
Anonymous
6:11 PM
@HamZa Yeah, I guess it does.
 
@HamZa was sunday, I just got some free time now, if you want to see my flag count, you will be ashamed of yours :p lol
 
Anonymous
^ how many
 
@Mr.Alien I got 290 "helpful" flags. Now that I can close vote questions I don't bother the mods
 
@HamZa I flag too many non answers
 
6:13 PM
@Mr.Alien Well mines get rejected quite often. But ofcourse, you're watching the CSS tag :p
 
like these
 
Anonymous
@Mr.Alien what is your percentage?
 
@HamZa I watch generally PHP, CSS, HTML, JS ;)
 
@Simon_eQ accept/declined?
 
Anonymous
6:15 PM
What difference does it make?
 
Anonymous
Either one will do
 
Anonymous
166	moderator attention flags
148	deemed helpful
7	declined
10	disputed
 
@Simon_eQ sorry but I didnt got you, ohh about that ^^^ ?
wait
 
6:16 PM
@BadWolf please don't edit the posts
 
1264	moderator attention flags
6	waiting for review
1153	deemed helpful
53	declined
52	disputed
oops I went to edit but I deleted before
 
Anonymous
Its nice record
 
@ds1 Relogin to chat and you'll be able to talk
 
@Simon_eQ ;)
I just clean up the CSS/PHP junk a lot
odd combination of technologies
 
Anonymous
@Mr.Alien Any ambitions for being a Mod some day?
 
6:19 PM
nope
I would like to dedicate some more time to some projects of mine and to some further studies :)
 
@PeeHaa Off-topic is Laptop speakers not working, headphones is working. And my topic is opposite — user40333 51 secs ago
lol
 
PLB
@user40333 Are you drunk or what? — PLB 40 secs ago
could not help myself
 
HAHAHAHAHAH
 
@PLB @PeeHaa game over :p
 
good :)
 
Anonymous
6:27 PM
ehm.. The fun ends too soon for me in SO
 
Soon this bitch is going to be banned
 
@Gordon can't you guys at least ban the profiles after the first question gets flagged?
 
Anonymous
It would be unreasonable to ban someone after first spam question @PeeHaa
 
Anonymous
But, second or third -- definitely.
 
6:29 PM
@Simon_eQ WAT ?
 
@Simon_eQ I'm not talking about in general. I'm talking about the spam whore
 
@Mr.Alien That should also be marked as spam....
 
@PeeHaa community should do that and not the mods
 
PLB
@Simon_eQ BTW, in my opinion, spammers should be banned immediately. Spammer knows that violates rules.
 
Anonymous
6:31 PM
@HamZa most people post spam-like question/answers mostly their first time, in SO. That does not mean, they are all spammers
 
@PeeHaa hehe get too many mysql_eeew() quests
 
@Simon_eQ What @PLB said
 
PLB
@Simon_eQ I guess our mods are intelligent enough to identify it's a spam or just post written without reading help.
 
F^&*%^$ You.... — Mr. Alien 12 secs ago
 
Anonymous
6:33 PM
@PLB me beggs to differ
 
@Simon_eQ excuse me, but it is not a mod's sole job to do things the community has the power to do.
 
6spam = auto-del :D
 
WTF is going on...
 
Anonymous
Today's spamming is bit unusual. Seems like a spam attack by some hackers or something
 
6:35 PM
@Simon_eQ mods are aware of these things way before you :)
 
is it a good idea to edit out the spam links?
 
@Simon_eQ community handles it pretty well ;) Kick on spammers ASS
 
(I'm a mod on freelancing.SE)
 
I mean, that might be bad because it pushes the content back to the front page
 
@DaveChen no don't edit flagged posts
 
6:35 PM
@DaveChen flag it as spam, nothing more.
 
okay :D
 
nyways flagged all profiles.. will be deleted soon
 
woohooo
> helpful flags 400
 
@PeeHaa 1/3
 
1/3 of what?
 
6:37 PM
my flags hehe
 
Pfff, and here I am with 45....
 
@Mr.Alien ow I almost never flag. Never need it, because we have the cv ring
 
@Wrikken lolz
 
I've We've closed 4300 questions / answers though
 
6:38 PM
@MadaraUchiha E_WUT
 
@PeeHaa I use mod tools
 
PLB
/me returns to rep-whoring to access mod tools
 
@PLB sigh
 
PLB
/nah; me is too lazy
 
6:41 PM
@PLB quite easy. Especially the regex tag
 
/me heading for 30K
 
Anonymous
@HamZa wow 7.2k Your almost there :)
 
Anonymous
hows that github account commin anyway?
 
@Simon_eQ I would be there if I answered all crappy questions
 
6:41 PM
^ accepting delvs
 
PLB
I have to get up early tomorrow. Good night.
 
haha count down was so correct there
 
:P
 
@Simon_eQ I've removed windows and I'm on linux now. Building my own webserver ATM
 
@PLB night /me too off to bed... gn pals
 
6:42 PM
laters
 
Anonymous
later @Mr.Alien
 
Anonymous
@HamZa Linux. Nice, I have VM set up too. Just need some time to move all my files
 
Well it was a mess, but my google-fu is quite good. So I'm finding my way.
I installed a VM (centos), currently nginx is up, postgresql should be working
Now figuring out how to install PHP 5.5
 
Anonymous
yum install php (I don't know what I am saying lol)
 
Anonymous
6:46 PM
I heard it should be easy
 
Anonymous
I can't wait to get my hands on it
 
@Simon_eQ That wil only work when enable another repo (e.g. remi), because 5.5 is not available in the main repo
 
Anonymous
I just need to buy external hard disk, to store my files, because I have tons of stuff in my laptop
 
@Simon_eQ Well, I'm hanging a bit on SO. But I shouldn't forget to install some extensions like GD, cURL etc...
 
PHP 5.5 in Centos repo's already? Well, I'm more used to the glacial speed of Debian... which just got 5.4 in stable.
 
6:47 PM
@Wrikken no not in the main repo
 
Anonymous
didn't know that.
 
it's indeed not as slow as debian at least moving :)
 
Hehe :)
 
@PeeHaa This is getting annoying
 
Anonymous
Its a Superbowl spam
 
Anonymous
14
Q: Recent Mass Football Spam

Bad WolfIs something wrong with StackOverflow's spam filter? Recently there have been huge numbers of spam topics related to football streaming. They have all been spam flagged and deleted but there are more getting posted all the time, I just flagged another 6 or so a few minutes ago. This has been goin...

 
it's ridikilis these people post a comment saying the question is offtopic and yet nothing in the TOS says that's the way you mark a question is off topic. trolling — Terminal 31 secs ago
lolski
ridi wat!?
 

« first day (1030 days earlier)      last day (3924 days later) »