« first day (2089 days earlier)      last day (2874 days later) » 

Gon
12:34 AM
> UNIX is basically a simple operating system, but you have to be a
genius to understand the simplicity.
 
Anonymous
meh, header() is giving me problems again
 
Anonymous
more like a headache
 
Anonymous
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); // no effect
header("HTTP/1.0 404 Not Found");  // no effect
header('HTTP/1.0 404 Not Found', true, 404); // no effect
var_dump(headers_sent()); // false
header('Location: /'); // works
 
Anonymous
How ..what .. wtf is going on?
 
What are you expecting to happen?
 
Anonymous
12:38 AM
send 404 obviously
 
Anonymous
oh fug
 
I'm pretty sure that using header() to change the status code doesn't really do much than that. Check you're server's log.
 
Anonymous
fixed!! just stupid mistake from my part.
 
Anonymous
I only had to have 2 beers to loose my common sense :\
 
Gon
12:55 AM
:P
 
 
2 hours later…
Adi
3:05 AM
hello guys?
 
Anonymous
yo
 
Adi
i want to know something about javascript because im using it in my application
 
Anonymous
yeah, something is good. I use it always, go for it
 
Adi
whenever i use <script> tag in my application with one function, it worked perfectly. but when i add another function, the second function is not working
why is that?
 
Anonymous
code?
 
Adi
3:11 AM
wait
<script type="text/javascript">
function disable() {
document.getElementById("course").disabled = true;
}

function activate () {
document.getElementById("course1").disabled = true;
}
</script>
the function activate is not working. please dont mind the name
 
Anonymous
Shouldn't that be .style.disabled = true ?
 
Anonymous
hmm
 
Adi
the first function is working but the second function is working
 
Anonymous
what exactly do you want?
 
Anonymous
Are you trying to disable/enable an input?
 
Adi
3:16 AM
yes
but the code is not for enabling only for disabling
i know
i just want to know why the second function is not working
 
Anonymous
<div class="wrapper">
  <input type="user" data-field="username">
  <input type="pass" data-field="password">
</div>

<script type="text/javascript">
  var wrapper = document.querySelector('.wrapper');
  wrapper.addEventListener('click', function(e){
  	e.target.disabled = true
  })
</script>
 
Anonymous
@Adi you probably need something like that
 
Adi
@samayo what is the difference between your code and mine?
 
Anonymous
I don't know what your HTML looks like, or how you are triggering the disable/activate methods..
 
Anonymous
generally, there is not much difference, mine is just a tad simpler, cleaner a bit more upto-date...
 
Anonymous
3:30 AM
if you want your input to be disabled/enabled back and forth when it's clicked upon .. you can use e.target.disabled = !e.target.disabled
 
Adi
because im just a beginner at javascript
i dont have much knowledge about it
 
Anonymous
I'm actually a beginner.
 
Adi
really? any advice? what should i study?
or where?
 
Anonymous
I can't say, but there were some screencasts that really helped me ..
 
Adi
im just reading at w3school
 
Anonymous
3:34 AM
@Adi Don't!!
 
Anonymous
Make sure to see all the parts for that video.
 
Anonymous
Write down every example, and don't try to learn everything at the same time.
 
Adi
okay i will watch all
but what is wrong with w3school?
 
Anonymous
It's not a school.
 
Anonymous
3:37 AM
You can learn from other resources much faster.
 
Adi
i thought it is good. thank you man
 
Anonymous
When you are done with the following the video, you can come back and I will give you a better one.
 
Adi
thanks man
 
Anonymous
no problem
 
...
 
3:43 AM
@samayo God, no
 
Anonymous
?
 
Dn't follow that
 
Adi
@littlepootis what is eloquent javascript? please enlighten me guys
 
@Adi It's a book that teaches you JS fundamentals
 
Anonymous
He is just starting with Js. You can't ask him to read and understand the book at this state.
 
Anonymous
3:46 AM
He should grasp the fundamentals, which the video is good for.
 
@samayo That book is for absolute beginners
If you've programmed before, I'd recommend this: shop.oreilly.com/product/0636920035534.do
 
Adi
so what do you advice guys? watch the video or read the book?
 
Anonymous
And around 200-300 pages? He could get bored and lose interest, and he will ... eventually unless he starts with the basics
 
@samayo Well he's not going to regret that later
 
I advise starting with assembly and then moving up to C -> C++ -> Javascript
 
3:49 AM
lol
 
Adi
haha much more complicated @William
 
You will then be an expert
 
@William That looks nice
 
Adi
@William i agree haha
 
But seriously.. avoid using intrusive, weird stuff like alert, 'document.write' and stuff/
Books teach you a lot more.
This is an excellent book: wrox.com/WileyCDA/WroxTitle/…
 
3:54 AM
i use alert sparingly document.write is pretty much always bad
you are in the wrong room for JS stuff
 
Yeah
Also.. avoid YouTube videos like PHP 6 books.
Unless Crockford's the man speaking.
 
Adi
thanks guys for the advice
 
@Adi js or node or both
 
4:41 AM
Hi All
I am confused to what use to send bulk emails to the customers
there is a php function "mail()" and also "Mail_mime" from pear and mailchimp client
any help on what to use from experience?
 
Hi all
2
Q: add multiple data in xml file using PHP xmlwriter

NewCod3rI need to add article for each month in xml file using PHP xmlwriter: $sql = "SELECT *,YEAR(FROM_UNIXTIME(timestamp)) AS YEAR, MONTH(FROM_UNIXTIME(timestamp)) AS MONTH FROM ".NEWS_ARTICLES." GROUP BY YEAR, MONTH ORDER BY YEAR DESC, MONTH "; $newsdata = DataAccess::Fetc...

 
5:20 AM
Hi guys please tell me how to do this...form templates create from html editor in backend and how will i do its processing when it come to front end?
 
5:38 AM
jquery
 
don't quote me on this, but I think there is some tooling for pecl that requires PHP_ prefix
might caught a problem at release time is all ...
stack variable goes out of scope, can't see it referenced anywhere, but be warned
 
Will fix whatever needs fixing when it comes to that.
 
looking good
 
Which variable goes out of scope?
Wait I think I see.
 
Assigning "params" to the global, but it's on the stack so it'll be left in an undefined state?
Morning @Anmol
 
@rtheunissen correct
 
The global compare func passaround is still semi broken.
I haven't changed it to how internals does it yet.
I recall us digging around that code.
 
yeah, distant memories now though :)
 
@JoeWatkins I'll be applying for jobs all across CA in a month or two, hoping to get php-ds packaged and released asap so I can add it to me CV and have the release mech in place.
a job*
 
5:50 AM
cool
 
Full time on it for the rest of the week, so I'll be around.
Refactor -> Documentation -> Release
 
I'll be here if you need me for anything
 
Thanks :)
Almost definitely will when it comes to PECL
But I'll see how far I can get.
 
you mean docs stuff?
@Trowski can you merge throw errors in extensions please, in the next few hours would be good (tagging day)
@rtheunissen you'll want to read the stuff about setting up php-web, so that you can run docs locally ... the skeleton generated by tooling is pretty bad, you'll want to definitely tweak it before even first commit
Sammy done a good blog post on getting php-doc setup locally here
There is all of this on php.net systems, covering build times and some other useful stuff
afk because taxi service ... that's a good start anyway :)
 
6:11 AM
posted on July 05, 2016

New Cyanide and Happiness Comic

 
Hi
Can someone let me know how to send mass HTTP requests?
 
6:47 AM
@JoeWatkins Sure. Any reason Closure from callable hasn't been merged yet?
 
moin
 
moin DaveRandom
 
mornin
 
@Trowski in case you forgot, voting still open on errs in exts as well
 
@DaveRandom Oh yeah, will close, thanks.
 
6:53 AM
mornin tereško
 
@PeeHaa so are there any changes on live Jeeves that are not in master? If so plz push, I'm going to do a bit of work on it today since I have to sit in the office but don't really have anything that I'm working on and don't want to start anything because moving
 
@Trowski don't know
well, I just merged it, but apparently there are conflicts
wait, no I done it ...
omg, I hate having to use git for stuff ...
 
@JoeWatkins Should I add an entry in NEWS for every new fatal -> Error?
Or maybe just in UPGRADING?
 
yes
 
Ok, so both then :-P
@JoeWatkins Under "Other changes to Extensions"?
 
7:03 AM
yes
I forgot about upgrading file myself
 
!!rfcs
 
moin chris
 
hey :-)
hows tricks?
Does anyone comprehend the "session ID without hashing" RFC and can explain it to me?
 
@DaveRandom not too shabby ... actually, pretty good ... doctor gave me meds for anxiety and depression a few weeks ago, they are starting to work ...
@DaveRandom obviously not
 
7:09 AM
@DaveRandom All changes on prod had been pushed already. Do your thang
 
@JoeWatkins Oh that's awesome :-) how's RM duty working for you? High stress job is high stress (I imagine)
 
Aslo morngi
 
@PeeHaa kk coolio
oh lol right actually going to send you ssh keys now
 
@DaveRandom doesn't really take up much more time ... at least at the moment it doesn't ... not really looking forward to all the doc work ... all of you people are going to be pestered to help me ...
moin @PeeHaa
 
@PeeHaa you got mail
@JoeWatkins You got a list?
ugh svn
 
7:14 AM
basically everything in UPGRADING needs to be reflected in the manual in some way
 
k will look for some easy wins
I have time to kill today
 
thanks
 
It's a sorry state of affairs when loading docs into PHP Storm is the easiest way to work with it :-(
 
I super hate working on the manual, it's so awkward, nobody cares about it enough to make it good ...
someone, at some point really did care, they bothered to write edit.php.net
and then ran away, I think ...
 
@JoeWatkins To be fair, the state of documentation in PHP is much better than most other languages
(I'm looking at you, Java!)
 
7:16 AM
from the outside, from the inside it uses SVN, and the worst kind of XML markup imaginable
 
morning o/
 
@JoeWatkins If it's a schema validated XML markup, why not move to a different sort of markup?
As for SVN, it could be Git later today, if you only so wish.
 
because it would still be xml
 
Migration paths are generally easy.
@JoeWatkins XML isn't bad when you need schema and validation.
 
it's not that simple ... you don't get to just do things that are obviously good without arguing about it for many years ...
 
7:17 AM
And also, not necessarily, if you have a schema, you can transform it into Markdown just as easy.
 
morning @Sjon
 
(I mean, you are transforming it to HTML at the edge of the pipe...)
 
@JoeWatkins I like docbook as a back end, I'd like a more user-friendly front end - the editor is great but I wish it had some kind of not-exactly-wysiwyg-but-not-xml middle ground for the average user
 
that thing you wanted in opcache, it's not so simple, it requires some kind of integration with the engine to avoid more stat() than is necessary, without it, it actually harms performance ... I tried the simple way and it was bad, so I'm going to revisit it when I have a weekend next ... sorry about the wait @Sjon
 
The docbook learning curve is steep and I suspect I've forgotten a lot of it...
 
7:19 AM
> Not sure if you'll get this message. I appreciate your remark, but I've been called "he" and "him" so much on SO. I hope my comment didn't come across as rude.
O.o
 
@PeeHaa Eh?
 
@DaveRandom yeah, I could go for that ... but I'd also like to be able to commit markdown from github to php-doc, I don't care what happens to it after commit ...
 
@MadaraUchiha Some SO person found my contact form on my site :)
 
@JoeWatkins ah, np. Thanks for the update
 
it won't work for everything, but as an ext maintainer it's a huge pain in the ass, you put in so much effort to the code, the manual feels like more effort than the programming
 
7:20 AM
@DaveRandom besides SO fun and spam I don't see your mail?
 
@JoeWatkins It usually is
 
@JoeWatkins There's a lot of open PRs that seem like fairly straightforward fixes. Who generally has the responsibility of merging those? (Genuine question, if it's suppose to be your job as a release manager I'm not trying to be subtle.)
 
That's why I opt for a few high level manuals, and the rest is autogenerated from tests
 
@Trowski yeah it's me, I'm looking through them this morning ...
 
from: Chris Wright <**@daverandom.com>
to: Pieter Hordijk <h***r@gmail.com>
date: 5 July 2016 at 08:13
subject: SSH key
mailed-by: gmail.com
 
7:21 AM
feel free to do it yourself if you have karma, I'll be afk for an hour in a minute, because taxi again ...
 
@PeeHaa you use gmail as your main incoming mail right?
 
That's the first addr that came up when I typed your first name
 
@JoeWatkins someone wrote the docbook editor specificly for edit.php.net? :o
 
yeah I think they actually did
 
7:23 AM
wow...
 
It was Felipe iirc
 
@JoeWatkins That's weird... I wonder if the original author meant if (var_name && *var_name == ' ')
 
he's so awesome, there's not enough Felipe now ...
 
@Sjon yeh it's a really great platform imo, just needs a few smallish usability improvements
 
Nah, there's an assert(var_name != NULL) above, so that looks correct.
 
7:24 AM
@DaveRandom I haven't decided about the platform but a few usability improvements won't hurt the editor, I agree on that
 
ugh, cert expired on edit.php.net?
 
looks like it ...
 
oh no it was Yannick sorry
 
dunno who that is
are they still around ?
 
I think mostly docs
 
7:28 AM
morning
 
moin
 
mornin tereško
 
That is one of the coolest pieces of astrodynamics manipulation ever ^
 
hard to get excited about technical achievements when every other story in the news shows the world to be an utter mess ...
 
@PeeHaa got it yet? If not I will resend as my gmail uid... although I'd hope that it's smart enough not to block it because of that]
 
7:32 AM
first data will be cool still, but there's literally one story about that, and the rest is tragic ...
afk coz taxi
 
morning
 
Morning.
 
@Epodax ping me when you get back ;)
 
7:49 AM
o/
 
$reg_exp = "/_^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:/[^\s]*)?$_iuS/";
What i am missing here
 
morning
@PraveenKumar regex101.com
 
I just took this from this url mathiasbynens.be/demo/url-regex
 
@PraveenKumar sweet jesus what is that monstrosity
 
@PraveenKumar Yeah, don't use that...
 
7:57 AM
That is horrifying
What are you actually trying to do?
 
okk i just want to validate website url
 
Match a URL obviously, but from what text and to do what with, with what constraints
 
anybody
 
@PraveenKumar define "validate"?
 
!!docs filter_val
 
ThW
7:58 AM
@PraveenKumar that you can use () as the pattern delimiters and that you can use the x to allow to write the pattern on multiple lines with comments
 
[ filter_var() ] Filters a variable with a specified filter
 
@PraveenKumar ^
 
@JoeWatkins in case you have time, can you explain what are target use cases for TSRMLS_FETCH_FROM_CTX/TSRMLS_SET_CTX usage in php7? Maybe you know some good reference or some other material.
 
@PraveenKumar There are already _ for the delimiter, you don't want the /.
 
ThW
@PraveenKumar additionally it looks like you have the modifiers before the closing delimiter
 
7:59 AM
validate means validating a website url as an text field input :)
 

« first day (2089 days earlier)      last day (2874 days later) »