« first day (687 days earlier)      last day (4275 days later) » 

1:38 AM
RALRS.
(Recursive Acronyms Like RALRS Suck.)
 
2:38 AM
hey everyone I'm making a script that needs to output in JSON a url among other things but it's escaping the slashes and I need it not to do that. but then I tried to call json_encode($theissues,JSON_UNESCAPED_SLASHES); as the manual says I can i get an error "json_encode() expects exactly 1 parameter, 2 given" so how do I set the option to not escape slashes?
 
That's for 5.4+
 
okay so then how can I do it in earlier versions?
 
What is the reason you want to prevent the escaping of slashes?
 
because I'm having an iPhone app someone is making for me read the reply, and they said they needed me to remove the \ from the reply.
 
wait thats not it :)
0
Q: problem slash with json_encode. why and how solve it?

Me hdiwhy whan output this date ("2011/7/11") whit json_encode displaying data ("2011\/7\/11")? how can converted "2011\/7\/11" to "2011/7/11"? $data_go = '2011/7/11'; $ddmmyyy='([1-9][\d]{3})[- \/.]([0-1][\d])[- \/.]([0-3][\d])'; if(preg_match("/$ddmmyyy$/", $data_go)) { $year...

much better :)
 
2:46 AM
ahh I was gooing to say it looked close but not quite it. alright I'll look at that one now
 
2:58 AM
@PeeHaa @ thanks that did it
 
@KitRamos np
 
3:13 AM
Yay! I finally got enough rep to get in here!
 
@SarahLasonia Well done!
 
@ShaquinTrifonoff Thanks, I'm new, but already contributing!
 
So I made this thinking I was being creative doing something unique:
I show it to my friend, and then he sends me this back as a response:
And of course that was after I print & cut out all of my cards.
 
@Alec That's cool!
 
3:28 AM
@ShaquinTrifonoff Not when you find out that your idea isn't original :c
 
Yeah, I suppose...
 
That feel when you just realize you posted your real name & phone number into a online chat and you can't remove it now because the message is too old.
Ohwell, not like this is 4chan.
 
 
1 hour later…
4:54 AM
0
Q: how to use mod_rewrite with godaddy

LokeshI am using godaddy linux shared hosting and i am having some problem with mod_rewrite. I am not much familier with mod_rewrite my code is RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] RewriteRule readfile.php(.*)$ seceretfile.php?$1 [L,QSA] this cod...

can anyone help me....??
 
 
1 hour later…
6:19 AM
@Alec nice business card that is.
 
6:32 AM
hey anybody here knows how to get embeded code from a video site? I tried embedly but some video need pro key,for that I have to register on their site and pay some money for that.So I dont want to do that.Is there any other solution ?
I am using php codeigniter
 
6:54 AM
I already left a comment on your question yesterday. The open standard regarding this is oembed. oembed.com
 
 
2 hours later…
8:28 AM
Just wrote a kind of blog-post answer on how to use PHP Iterators to traverse a directory recursively including recursive filtering:
0
Q: PHP get path to every file in folder/subfolder into array?

Papa De BeauI am not sure where to start. But I have to get the paths to all files in a folder and all the content of the subfolder in paths too. For example if I had 1 folder that had five folders and each folder had 10 mp3s in it etc... That means my array would have to find 50 paths to these files. La...

 
8:40 AM
@hakra nice answer, but you dont need the FilesOnlyFilter when you use LEAVES_ONLY
 
9:59 AM
good morning
 
Good morning
 
@hakra damn
I'm so passée...
 
10:29 AM
@Gordon I think LEAVES_ONLY does not filter links, only directories. But nice hint. I also now found getSubPathname which somewhat is a miracle because it is of RecursiveDirectoryIterator but it works on RecursiveIteratorIterator when used. Or since when are (Recursive)IteratorIterators passing the functions down to their subject?
 
morning
 
@hakra dont know. would have to look at the source or ask @NikiC
 
@hakra Since always :D
 
good morning @NikiC, @webarto and naturally as well @gordon and @all to not loose anybody here ;)
 
IteratorIterator proxies method calls to the wrapped iterator
 
10:33 AM
@NikiC Please tell me! :D
@NikiC Yeah, cool, didn't know that. So they can decorate a little bit.
 
Yep
 
is there anything I'd need to configure in the cv-pls ff addon to make it work. I've closed several Qs now and nothing shows up in chat
 
Let me try that to use for an RecursiveIteratorDecorator which I needed to write manually in the past. Double cross fingers.
 
10:42 AM
If i got this: $chunks = array_chunk($griditems, $rand);

How can i skip the 3 first array (chunks) ? the $chunks[0], $chunks[1] and [2], so when I do foreach($chunks as $chunk) it starts at [3]
 
@Gordon already closed
 
@salathe answer is good though. we should hijack a Question and make it canonical or create Reference Q collecting the good ones.
 
@Gordon sure, sounds like a plan.
 
@salathe im too lazy though. its sunday :D
 
10:48 AM
I don't know how "reference questions" work
and I'm too lazy as well
 
speaking of Sunday … time for cat content
 
3
Q: How does RecursiveIteratorIterator works in php

user1538127How does RecursiveIteratorIterator works? PHP manual has nothing much documented or explained. What is the difference of IteratorIterator and RecursiveIteratorIterator?

Is it really that hard to figure out?
 
@salathe I guess the Iterator concept is weird at first, but apart from that, no.
 
@Gordon Yes :) However, this needs an edit about the LEAVES_ONLY I'd say. I'll edit the answer for that.
 
@hakra you could ask for Qs to be merged
 
10:54 AM
@hakra You're spending a lot of time on something entirely useless.
 
@salathe would stackoverflow.com/questions/3829460/… qualify for a dupe?
 
@Gordon That question is a dupe, or another is a dupe of that?
 
@salathe the one with a bounty a dupe of the one I just gave?
 
@Gordon Nope, it doesn't really explain what the other question asks.
 
@salathe ok
 
11:01 AM
I wish there was a close reason of "RTFM"
 
11:24 AM
@salathe How did I know that you knew that already ;)
 
11:48 AM
visited 992 days, 822 consecutive
8 days to go
 
visited 842 days, 839 consecutive
 
the 70s radio in spotify is broken. it's playing Like A Rolling Stone and shows a cover of "The Definite 60s"
 
> 977 days, 42 consecutive
:D
 
12:06 PM
stackoverflow.com/questions/12235768/docblock-regex-parsing and there should be a couple more suitable dupes
 
12:28 PM
@PeeHaa is there anything I'd need to configure to make the cv-pls plugin work in FF?
 
Dang gordon works fast :D
 
@Darius yeah, just dont call me flash ;)
 
Hello, everyone!
 
1:05 PM
@ircmaxell cron job :P
 
 
1 hour later…
2:31 PM
anybody here can help me decide which is the best PHP framework to work with if i will be building an e-class website. Features includes like what moodle has. I' m considering joomla, any thoughts?
 
@Saber which specific features of moodle do you expect the framework to have?
 
user50049
2:50 PM
Joomla is a framework now? God help us.
13
 
@salathe does not like my answer :(
-1
A: How does RecursiveIteratorIterator works in php

hakraRecursiveIteratorIterator is an IteratorIterator that supports recursion for iteration (see also traversal and Tree Traversal). Take a directory listing as an example. Consider you have got the following file and directory tree on disk: While a standard (non-recursive) iterator would just...

@TimPost The branched a framework out of the CMS, yes. So now Joomla is a CMS that uses it's own framework. Nifty, right?
Must be like with typo and flow. However they decided to engineer the framework first and then port the next typo version on top of it or so.
There is also a PHP framework that branched out of wordpress in the past, but, well, hmm, how to say it?
 
user50049
I need a third hand to support my shaking head.
 
3:05 PM
 
@TimPost I think Drupal is doing that right, they started to pick stuff from other projects, for example from Symfony2. So it's not rolling your own only and a benefit for the developer who learns it. It will be interesting how this turns out.
 
Can I get some love?
0
A: Different results between preg_replace & preg_match_all

DaveRandomYour replace operation has a problem which you have evidently not yet come across - it will allow unescaped HTML special characters through. The reason I know this is because your regex allows hashtags to be prefixed with >, which is a special character. For that reason, I recommend you use t...

 
3:28 PM
@hakra I really, really don't. :)
 
hey guys , how good are you at css ?
do you think it would be possible to make this with CSS ?
 
That depends a lot on the browser requirements ;)
 
well .. let's say we are ignoring browser requirements for the moment
 
@tereško background-image: url("path/to/image");
EASY!
 
@salathe , you are really bad at this , if you think that even a image-based solution would be so simple
 
3:32 PM
@tereško I guess you missed that that was tongue-in-cheek.
 
@tereško you mean only the middle part of it, not the background, right?
 
yes , i do not care about the bokeh effect
 
it's possible, with bokeh too
 
@tereško yes. it's possible though likely takes some effort
 
wtf is "the bokeh effect"? Wikipedia has left me none the wiser, and graphical design is not my forte. How does it relate to the above image? Is it just a poncy way of saying lens glare?
 
3:38 PM
@DaveRandom there is a nice Q&A at photographers.SE explaining it
74
Q: What is bokeh, exactly?

Chris NoeI understand that "bokeh" refers to out-of-focus areas of an image — but there is obviously more to it than that. What does the term mean exactly? How well is bokeh really understood? Is it purely subjective, or can it be evaluated, measured, classified? And how can bokeh be compared and contrast...

 
@Gordon Thanking you muchly
 
@DaveRandom it is not graphical design, effect is there when the lens is wide open and focus in on short distance...
 
Understood. I have nothing useful to contribute to the wider discussion, but at least you done learned me something.
 
3:55 PM
@DaveRandom you could have typed that in google and clicked on "images"
=P
 
user1125394
hi, any of you would know a simple reverse function of nl2br, (for the moment 2nd comment of php.net/manual/en/function.nl2br.php should do it)
 
? I don't know, I mean that was my first port of call but the first hit was a Wikipedia article which is way too verbose for my hung over state.
19 hours ago, by DaveRandom
@pce No the Gallo stuff is mass produced sh*t. To the extent that they badge it as something else. Turning Leaf my arse. I have plumped for a Loire Merlot in the end. Say what you like about Costco, their wine buyers know what they are doing. I feel a Sunday Costco trip coming on.
There is none left
 
4:25 PM
Hey @NikiC @ircmaxell, what would you estimate the chances of this ever actually happening are? Is there a related RFC?
 
There is an RFC
and implementation
As part of the get/set proposal
 
@NikiC Meaning that I have to implement it with get/set or actually to introduce a readonly keyword?
 
nah, I think read-only will also work without implementing get/set
will use the automatic implementation then
 
what da faq
 
@NikiC Nice one, can't wait for that. It bugs me slightly that the docs often show native classes with properties declared readonly and I can't implement it in userland code. Just like it bugs me slightly that that there is no __toBoolean() method, since SimpleXMLElement obviously somehow implements one internally because it is possible for it to evaluate to FALSE
 
4:34 PM
@DaveRandom There are a lot of things userland can't do :P
 
__toInt()/__toFloat()/__toNumber() would be nice as well.
 
could be worse (hints at @tereško's tags ;))
 
tereško, Riga, Latvia
13.9k 6 19 36
=P
 
:)
 
also , it looks like i will get mvc silver badge before getting gold one for php
 
4:42 PM
@tereško I've not known you for long but I think you deserve a special gold badge.
 
naah .. what we need is badge
it would be just covered under that title
 
I get the feeling there would be considerably more badges awarded
@tereško By the way, what does the accent on the š do to the sound?
 
make it into "sh" as in "shadow"
 
@tereško Hey, you are the 2nd Google result: google.com/search?q=tere%C5%A1ko
 
hmm
 
4:52 PM
(you're disappointed you're not #1, aren't you?)
I actually have to add the site names to find myself. There are so many shitty little teenagers who call themselves DaveRandom. I was the original. I'm the only cool one.
 
Honestly ? i am not sure. I actually would prefer to see "google could not find anything:
 
Like Chuck Norris?
 
and it is surname , not nickname
my "given nickname" is way too common to be googled for
 
@tereško I guessed that from Google.
I've just been using this for so long it's a reflex when I create a new account on anything. It's even my AD username at work. My real name's not even Dave, I can't remember where it comes from.
 
@tereško you mean "grumpy troll"? :D
 
4:58 PM
no, my give nickname is "mefisto"
and it has been repeatedly given by 3 different groups of people =/
 
lol
i have a lot more hair , don't you think
 
idk, does he ever take the hat off? Maybe there's 27ft of hair under there...
The pub calls. Laterz...
 
5:33 PM
 
folks
is this the PHP thing
 
6:32 PM
I'm poor, only one bronze... sigh #fml
@JohannesSchaub-litb invisibility? :)
They fixed invisible characters, bastards.
 
6:50 PM
morning
 
@JohannesSchaub-litb it's sunday evening thing =P
 
@PeeHaa , care to update ? stackoverflow.com/a/7060363/727208
 
@tereško What should it be updated with? Correct way of setting up the connection?
 
that would be a nice start , yes
 
@tereško :) Will write a full blown answer later tonight. Need to finish a project for a friend of mine this evening
 
this kinda mreminds me that i should do some maintenance on my own older posts
it's not only old code that happens to rot .. same is true of old advice
 
7:15 PM
@tereško It sure is, but I can only see that as a good thing
 
not if it comes back to bite you
 
@tereško Meh. Just file it under personal progress and you should be fine.
 
sed ftw
 
7:36 PM
damn, Metallica never gets old...
@hakra where art thou
 
7:54 PM
Hey ho
 
hola
 
Can't stay for long, but I noticed and wanted to congratulate @PeeHaa for joining the upper ranks
So yeah :D
 
Elitists :P
I'm humble, I'll settle for 10k :P
 
@webarto They all say that
 
@Truth Femanons too :D
 
7:57 PM
@webarto But then they get all MOAAARRRRRRR jquery REPPPPPPPPP
 
If I had continued answering jQuery I would have had 50k now :D
But wasn't active for a year :\
Funk dat, I came here to chew bubblegums drink beer and close vote, and I'm out of bubblegums beer :P
 
@Truth tnx :)
 
8:31 PM
hmmm ... i think there is beer somewhere
 
8:52 PM
Im about to buy my first domain. Does anyone have any tips / suggestion?
 
9:32 PM
Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in C:\site\report.php on line 30 - Is that because I'm just using localhost? Or is it my code?
 
@GeorgeSumpster It's your server config.
 
@ShaquinTrifonoff Alright, let me try and find that =P
 
PHP.ini.
@GeorgeSumpster Are you using Windows or *nix?
 
Windows
I just installed a WAMP, trying to learn PHP =P
So, I found this; [mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
Is that it?
 
No, SMTP should be the mail server of your ISP.
 
9:35 PM
@GeorgeSumpster , if you cannot make the server work you could use direct socket to your (or any other , like gmail's ) SMTP server
but , setting your ISP's SMTP server should be enough , if it is provided
this is only part of setting up windows/php stack that i find easier then in nix/php stack
 
@ShaquinTrifonoff So, I use Comcast, so it'd be smtp.comcast.net? Right?
 
@GeorgeSumpster Most likely. Try it.
 
@ShaquinTrifonoff So, I have to SMTP = smtp.comcast.net the port being 25, still getting the same error
 
9:50 PM
@GeorgeSumpster Did you restart Apache?
 
Ok, that worked kind of, do I put my Comcast email here?
sendmail_from = you@yourdomain
 
@GeorgeSumpster You can leave it commented out, and use headers when you send it. If you don't want to do that, you can set it to anything you want. you@yourdomain.tld, support@google.com...
 
@ShaquinTrifonoff Ok, now I'm getting this; Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 550 5.1.0 Authentication required in C:\site\report.php on line 30
I gather that it's a password, where do I enter this?
 
That's... strange.
Try port 587.
 
SMTP = smtp.comcast.net
; http://php.net/smtp-port
smtp_port = 587
Commented out the sendmail_from
Still getting authentication error, even with 587
 
10:08 PM
@GeorgeSumpster Looks like you have to put your Comcast email address in? Link
 
@ShaquinTrifonoff Hmm.. That code looks familiar =P I'm learning from Headfirst too xD
 
while ($drunk) {
    $ausages++;
}
 
@ShaquinTrifonoff That Alien Abduct code he has, I'm on the same part, it's part of a book
 
@GeorgeSumpster Ah, I see. I'm not working though a book, I just found that link on Google and thought it might solve your problem.
(I have nothing to with that thread.)
 
10:19 PM
@ShaquinTrifonoff Yeah, I figured, still, 10x more useful since it's the same code =
=P
 
@GeorgeSumpster Would be.
Is it working now?
 
Wait, so I have a comcast email
But it's separate from my ISP, I think.
What would be my main ISP email that I put in send_from
 
@GeorgeSumpster I think so.
 
Is there some kind of mysql option where "WHERE cow='$variable'" search by any cow in case $variable is empty?
 
10:30 PM
Just do a different query in that case. And please use prepared statements
 
Ok, thank you :)
 
@ShaquinTrifonoff Oo, no error. Let me get my email
 
10:59 PM
> disputed
w.t.f. mods
What the heck are they drinking
 
Have exams tomorrow, better get drunk so I can wake up on time.
 
@webarto Don't get a hangover :-)
 
@ShaquinTrifonoff I get drunk from can of beer :P
I play this song youtube.com/watch?v=jxBKgOyMzSc and drink as much as I can
 
@webarto :)
 
1.5€/l of gasoline... you can buy 2l of beer for that, sigh...
 
11:14 PM
@ShaquinTrifonoff Hey, so now I got the email working, how do I make it formatted, I though this worked, but apparently not; "What they did: $what_they_did\n"
 
Solvay in color
 
@webarto between 1.7€/l and 1.8€/l here :(
 
@GeorgeSumpster Do you want to include HTML?
 
@PeeHaa damn :( mine is spending 20l over 100km/h ... last one had TNG (gas), it's like 0.5€... so I don't like to drive... but I figure your country is clean and stuff, so maybe that is a demotivation... (super ping)
 
@ShaquinTrifonoff Uh, sure
 
11:16 PM
@GeorgeSumpster What do you mean by 'make it formatted'?
 
@ShaquinTrifonoff New lines... that's it for now
 
@webarto Neh. The government just likes to cash. Nothing to do with clean anything
 
@PeeHaa 1.99 here lol
 
@GeorgeSumpster \n should work. If it doesn't, try PHP_EOL.
 
@PeeHaa O.o ... but you are in 1st world country, and I'm in 3rd, so imagine... 'mericans :)
 
11:19 PM
@draconis jesus :(
 
\n didn't work, so how do I put PHP_EOL
 
@webarto :P
 
In tags?
 
TNG I say, mother Russia and stuff...
 
@GeorgeSumpster I'll post some code:
 
11:21 PM
@ShaquinTrifonoff Thanks
 
$message = array();
$message[] = 'line 1';
$message[] = 'line 2';
mail('someone@someplace.com', 'Subject', implode(PHP_EOL, $message));
 
@PeeHaa the worst part is it can be much cheaper(maybe one of the cheapest on the world) if we compare without taxes
 
@PeeHaa sorry LPG - liquid propane gas :) TNG - tečni naftni gas
 
Isn't LPG liquid petroleum gas?
 
i just look %60.2 is tax
@ShaquinTrifonoff yup
 
11:23 PM
@draconis Thought so.
 
@ShaquinTrifonoff which brings us back to propane-butane :) but P is petroleum in abbr.
 
@ShaquinTrifonoff mail($to, $subject, implode(PHP_EOL, $msg)), 'From:' . $email); - I get unexpected ,
 
@PeeHaa do you drink your whiskey with ice?
 
@GeorgeSumpster If you have sendmail_from set, you don't need to specify a From:. Otherwise, use this: mail($to, $subject, implode(PHP_EOL, $msg), 'From: ' . $email . PHP_EOL);
 
@webarto Only the cheap stuff
 
11:26 PM
@ShaquinTrifonoff Yes, but in the form you input your email and it sends the email looking like the email that the person entered
 
@PeeHaa did you know that ice breaks alcohol from 40% to 22%
 
@webarto No I did not? Is it only ice or just plain water too?
 
@GeorgeSumpster $to is the person's email, and $email is your email.
 
So, I have a form, one person fills it out and presses send, the to, is me. The from is them.
 
@PeeHaa ice especially, hydrogen bondings, when ice cracks that is actually force realeased... "When an alcohol is added to water, the hydrogen bonds in the water and alcohol have to be broken in order for them to mix.
Breaking bonds requires energy; however (in smaller molecules) when the hydrogen bonds are reformed between the alcohol and water molecules energy is released, and this compensates for the initial energy needed to break the bonds.", I think they are broken if ice is question, probably doesn't mix well with pure water...
 
11:31 PM
@GeorgeSumpster Who is the form being sent to? Are you sending them a confirmation or just emailing the results to yourself?
 
@ShaquinTrifonoff Emailing the results to myself
 
@PeeHaa my chemistry professor loved whiskey so he actually brought it once and explained why it's better to drink whiskey with ice if you bet with someone on who can drink more :D
 
Useful trivia I tells ya :)
 
@GeorgeSumpster Then use mail($email, $subject, implode(PHP_EOL, $msg), 'From: ' . $email . PHP_EOL);.
Where `$email` is your email address.
Remember to include their email in the results, though.
 
@webarto did you study chemistry?
 
11:38 PM
@draconis nope, just attended extra classes... my mother worked in lab so I always blew up something in house as a kid...
 
@ShaquinTrifonoff The lines appear out of order :/
 
@GeorgeSumpster Are they not taking effect in the email?
 
@ShaquinTrifonoff New lines? Yes, there are working, but they appear in random order :/
 
> Alcohol has this thing in it that makes ice melt. I think it's called ethyl.
genius :D
 
It just seems odd to me that the use of 'abstract' can be so limiting, so I want to know if I'm missing something.
0
Q: PHP Abstract Method versus Default Method

Kim PrinceI notice that when I define a method as abstract, the signature of child classes needs to be compatible with it. This robs me of an opportunity to use the type checking in the child class' signature. If I define the parent method as a concrete method with a default implementation, I can then ov...

 

« first day (687 days earlier)      last day (4275 days later) »