« first day (1218 days earlier)      last day (3955 days later) » 

00:00
/shrug, get to googlin'! ;)
oh fuck this
guys, will I be the worst programmer ever if I send a request to my server with the url I want to request from this server and return output from there?
@rdlowrey That's very likely. 15 minutes on SAT solving is very, very excessive...
user895378
00:22
If I'm merging something into old versions I just merge to PHP-5.4 (for example) right? The PHP-5.4.25 is just for the official releases?
Hello, im a not very strong in PHP and was wondering if anyone could help;

I have 2 db's:

One includes ID, Term, Desc, CatID, Example.
Second includes CatID, Catagory.

I want to have something like localhost/cat.php?id=1, on that page I want every Term with the same CatID from table one and tabel two, to be linked and listed.
ThW
ThW
Two databases or just two tables?
2 tables sorry, thanks.
ThW
ThW
SQL allows you to join tables using conditions
The result is a list of records that you can iterate and output
Sorry, I kind of follow what your saying, but im not fluent with php. Could you help me write this?
Actually @ThW I don't think I would need to use joins.
ThW
ThW
00:33
You're using MySql?
PhpMyAdmin yes,
ThW
ThW
Phpmyadmin is just an administration app
Look for mysqli_query() in the php manual
00:46
@Jhawins most of what you can do on the db you likely should do on the db.
01:22
Word
Hey guys I'm trying my hand at using some simple JSON with PHP but i've struck a error I just can't seem to get, I would like the title of the following JSON code, But I cannot quite get it to echo it out
{
events: [
{
event: {
repeats: "no",
id: 10487792269,
title: "Roy Smoothe Talk: CEO of 'Just Cool'"
}
}
]
}
<?php
			$url = 'url';
			$json = file_get_contents($url);

			$data = json_decode($json, TRUE);
			echo $data -> events->event->title;


			?>
Hmm That looks crap I'll set up a gist
@jack I suggest reading what the second parameter does - uk3.php.net/json_decode
If you want it as an object, true is not a good choice.
Ah and so by keeping it a object it will be easier to "select"?
If you want to use the object notation then yes. But you could use it as an array and do $data['events']['event']['title']
@jack btw that's slightly odd having an array of 'events' and then having 'event' as the name of the property that all other properties are listed under.
Yeah well I'm using "eventbrites" api
:/ I personally have not used it before so I don't know if it is good or bad
@Danack They also offer xml whould that be easiler / better?
01:33
@jack Probably no different.
If the data is not under your control - then you got to work with what you're given.
Hmm so I tried the $data['events']['event']['title'] Although no text shows up, no errors either, When I used Var dump It just echo'd "NULL"
thank you so much for your help Danack I promise I'm not a help Vampire
01:58
:14726151 Hey man just once more question, when using this code,

<?php
$url = 'url';
$json = file_get_contents($url);

$obj = json_decode($json);
var_dump($obj);

?>
I get this echo'd out, although for the life od me I cannot get just the title from this,
user924016
echo $json;
object(stdClass)#109 (1) { ["events"]=> array(1) { [0]=> object(stdClass)#100 (1) { ["event"]=> object(stdClass)#105 (3) { ["repeats"]=> string(2) "no" ["id"]=> float(10487792269) ["title"]=> string(36) "Roy Smoothe Talk: CEO of 'Just Cool'" } } } }
user924016
$obj['events'][0]['event']->title
@RonniSkansing Thank you so so so much for the help, but it's not working, I think I'm being retarded, this is the code I am using
and this is the out put
user924016
oh i see
user924016
02:04
$obj->events[0]->event->title
This is why I prefer to just always decode my JSON to array and not fool with the stdClass object
user924016
hehe
@jack There aren't even 16 lines there?
Sorry? I don't understand,
You may also want to invalidate that eventbrite app key and get a new one
02:08
@jack According to the error you posted, the problem is on line 16 in footer.php. The file you put a screenshot of is not even 16 lines long.
Ah man I'm so confused, I just want to grab the title from this url and echo it to the page,
@LeviMorrison Ah right yes sorry I just grabbed the function from my footer,
For now I don't mind doing inline as I just want to get it working once,
The problem is most likely what Ronni suggested:
$obj->events[0]['event']->title should be $obj->events[0]->event->title
Ahhh thats how I was getting confused by the @
I'm so close I can taste it, can I quickly ask how to remove the string part from the front if it is possible?
@jack Use print or echo instead of var_dump.
Wow, thank you guys so much you have no idea how many hairs i've pulled out over this simple thing!
02:15
It can be hard starting out. Try reading more parts of the manual when you are stuck; that helped me out a lot.
Yep I did I read ALOT, but I also over read and was looking to deep into things
I also like to add bits of code and delete bits of code to try to understand things better.
There's nothing like reading the manual and playing with the code until you've got it right.
Sometimes you just get stuck and need genuine help, but try to minimize the help you need from other humans.
It's not that asking for help is bad, but generally speaking you don't learn as well that way.
user924016
Ah i love puppies
:D
user924016
Well time to grab the brown and go to sleep
user924016
02:20
nn
Bye Ronni Thank you for your help
02:34
@rdlowrey It turns out that opening 26 connections to a server at once is bad.
Guzzle is opening all the requests at once, which is overloading the small window size that Bing uses. Artax only opens 8 connections, which fit within the window size and allows the data to be transferred quicker, even though less is being transferred at once.
Anyway I uploaded some wireshark files just in case you're interested enough to look.
 
2 hours later…
user895378
04:52
@Danack Cool, yeah. I don't think curl exposes any configurable limits on max simultaneous connections to the same host (which is bad for people who need to scrape without getting banned).
user895378
You can change that setting in Artax, though. You might try raising the limit to something really high and then compare the results. Like you said, it defaults to 8.
user895378
I learned quickly that the securities and exchange commission frowns on users hammering their servers with many simultaneous connections. So I made sure to expose that configuration when I was writing Artax.
user895378
@Danack You should set this option on Artax and see if there's still a difference:
user895378
$client->setOption('maxConnectionsPerHost', 26);
user895378
05:05
The big difference speed-wise is that you don't want too many connections to the same host because then you can't reuse the persistent connections for multiple requests. The overhead of actually establishing the TCP connections is the slowest part of the process. Without a way to limit the number of simultaneous connections to the same host you'll always have that problem.
user895378
You might be able to speed up Artax further in your tests by lowering the maxConnectionsPerHost to 4 or 6:
user895378
$client->setOption('maxConnectionsPerHost', 4);
user895378
When I talk about artax being way better than guzzle it's because there are a million tiny things like this that I've implemented that will never be possible in guzzle because guzzle doesn't actually implement any of the HTTP -- all it does is wrap curl_* ... In summary, Guzzle's usefulness for sophisticated retrieval is fairly limited.
user895378
(this is why I had to roll my own)
Hi
I have asked question at stackoverflow and it's 4 day i haven't received any answer :(
user895378
05:14
@Danack Also, you can use the simpler Artax parallel retrieval method (as seen here) ... you don't have to use the non-blocking event-looped version:
user895378
$client = new Artax\Client;
$requests = [
    'google' => 'http://www.google.com',
    'bing' => 'http://www.bing.com',
    'yahoo' => 'http://www.yahoo.com',
];
$client->requestMulti($requests, $onEachResponse, $onEachError);
Well i am new here and don't know much about this. can anyone help ?
user895378
@MandeepGill If your question hasn't been answered in 4 days it's very probable that your question was vague and unaswerable :)
user895378
But if you'd like to post the link here someone may be able to help.
Okay, here is link : stackoverflow.com/questions/21706739/…, Maybe help to answer why this is not answerable or should i delete ?
user895378
05:22
@MandeepGill It's unclear what your specific problem is. I'd suggest trying to clarify exactly what you're trying to do (in code) and what you tried that didn't work.
Okay, thanks i will edit this
05:56
hello all,my website's httpd.conf is publicly visible,can anyone tell me how to restrict it?
06:47
hello all,my website's httpd.conf is publicly visible,can anyone tell me how to restrict it?
Morning Geeks
07:13
I want to run some custom code after receiving an email
Do I need to talk with the web server technical support for this?
Or can I myself configure this?
hello williams
Does anyone know a API which is freely to convert the currency rate
I was using of google but it is no longer
07:30
08:07
I'm being trolled by PHP right now.
I'm using PDO and I have a INSERT statement which is failing, Apparently I have no database selected even though I am providing it in the connection parameters and I'm even doing exec use db_name to make sure it's selected :/
08:18
@JamieH code?
@JamieH Where are $mysqlDatabase etc defined?
in config.php but I have another file which uses the variables from that and that works fine.
@JamieH Have the signIn method take a PDO object as an argument.
Don't let it make a new one.
Thank you very much
:)
08:29
morning
could you please help to close that stackoverflow.com/questions/21795030/…
:)
@MadaraUchiha How did you typed that "cv-pls" ? (newbie question :)
@hek2mgl [tag:cv-pls]
@MadaraUchiha thanks!
@crypticツ I mean the repo is private, the message isn't :-P
08:55
good morning.. :)
09:12
^_^
(Ok, this rulez have been written down by Eric Raymond, not Dennis Ritchie) ... However, these guys are my idols
how do I set support for utf8_unicode_ci when retrieving data from my database? The database is all set to utf8_unicode_ci and in one part of the webpage the text shows normal with all special characters displayed and in the other it shows question marks. I don't know why.
@SineLaboreNihil The chat isn't a replacement for the site itself
@hek2mgl I've been looking at the site and no answer helped me. That's why I finally came here to look for help.
09:40
@SineLaboreNihil If you couldn't find an answer then ask a question on the site. It is meant for that
I need some help in submitting a form via email
@udaysagar The chat isn't a replacement for the site itself (Can't you read?)
@udaysagar Apparently asking questions here is frowned upon.
10:35
@SineLaboreNihil Depends on the question. If it is on topic on the main site – ask there.
Morning
morning too
10:59
@hek2mgl oh. I must have missed something. I always thought: first ask here and then, if nobody has an idea… ask on the site.
@bwoebi ?
But actually I don't have often questions :-)
I guess you have, but you solve them on your own...
but this is definitely off topic here :)
;-)
user924016
=]
ThW
ThW
11:08
Good Morning
user924016
Morning
11:37
good morning
@udaysagar if you have a question, ask it. ;)
mornigng
Morning Alma, Salathe, Ronnie, ThW and PeeHaa
http://stackoverflow.com/questions/21797070/how-to-use-cron-job-in-w‌​indows
12:00
Morniningnignnigni
^ E_PEEHAA
hi, @DaveRandom :p
good mornrings :D
I wonder if anyone has anything else to say today :-P
hmrm… how do you find interesting new questions on SO (php tag) without having to observe the newest list all the time with its shitty questions…?
^ him
@bwoebi interesting questions? really? :p
12:04
@AlmaDo yes, there is too much shit.
user924016
@bwoebi lol
I'm not joking :-(
user924016
if you find out please share =]
@bwoebi want to find interesting question? ask it
I'm not so good in inventing questions ^.^
12:06
if you'll invent it, it'll be sh*t. If it will be from real use-case - then good chances are it will be interesting
user924016
Any of you use any a frameworks like Angular, Backbone or etc?
@AlmaDo well… I really rarely have real use cases in PHP which would be a problem for me…
^ someone here told that teresko is a lovely flower in comparison to frontend-devs
user924016
It is true
@bwoebi so that's why so much sh*t and so few good questions
12:08
Well nice idea, we could group-gang asking questions under the PHP tag.
as for me - if SO's model won't change.. it will soon sink in that sh*t (because it's only growing)
@AlmaDo that's why I'd like to filter shit out
Just grabbing some example codes form somewhere and asking questions like why it does not work or why some variable is named that way or similar.
(not actually checked the quality of those results, btw)
@bwoebi but when someone propose any restriction to protect SO from that shitstorm - he'll get extremely high negative feedback from the community. So conclusion for now is - SO is expected to serve goal of answering sh*t questions or storing sh*t answers
12:11
there should be at least a more intelligent duplicate detector…
@DaveRandom I think also answers < 3 (otherwise your answer will just be drowned:p )
because most thing really are duplicates of some unknown questions…
@AlmaDo Not necessarily, some good questions attract a flood of shit answers, I think hasaccepted:no is more important
ymmv, of course
user924016
Hmm Interface Installable { void install(); void uninstall() }
uninstall does not really fit inside a interface named Installable. Split interface?
@DaveRandom and now include a predictor for new questions what their quality will be… (beofre any upvotes are added)
12:14
@bwoebi If you want a question answer, answer me this (because it's relevant to a conversation I was having yesterday): can you explain briefly what the "function call overhead" is that people are always talking about in PHP? For example, isset($arr['key']); vs array_key_exists('key', $arr); - why is the latter so much slower than the former, since they are doing almost the same thing and the latter is actually doing slightly less since it doesn't inspect the value
Basically: what is the ze doing for functions that takes so long?
(discounting user defined functions and the obvious overheads of having to interpret the opcodes)
the overhead of parameter parsing, storing current context etc.
allocating new stack… (just on user functions)
@bwoebi Really I'm talking about native functions
I get how the parameter parsing API could be slow though
parameter parsing is also necessary for native functions
you have to first send the params on the stack and then zend_parse_parameters at the end
also isset just does the _IS fetch and then returns… no more opcodes.
@bwoebi Right, but for array keys it presumably has to do the HT lookup as well?
@DaveRandom why not, just add me I'll take a look :)
12:20
@DaveRandom yes
@bwoebi Essentially I don't get why it doesn't have to do a zpp
@hakre Trying now but I seem to have forgotten my GH password
@DaveRandom because the _IS function directly tries an switch (Z_TYPE(zval))
@bwoebi Oooh right OK, gotcha
can anyone clarify whether am wrong or right over here
cuz op states that If not, are they valid in HTML version 5?
user924016
@Mr.Alien some attributes are valid bools, not any (html4&5) =] The OP should tell his intent with attribute to really answer anything other then no, as it could be he/she does not even understand nor attributes such as class, id or even what a tag is.
12:34
@RonniSkansing agreed, but what I went is with this <h2 section>foobar</h2> <--
user924016
@Mr.Alien then we would need to know why OP is putting section there. Else it is impossible imo to say
user924016
<section>
<h2> .. </h2>
</section>
vs
<h2 class="section"> .. </h2>
user924016
imo =]
nah nah, the question focused on attribute and not the tags :)
user924016
If the user is using section as a attribute something is wrong
12:39
@RonniSkansing yes, I've stated that it's invalid, even as of HTML5, also, I edited my answer...
user924016
the answer is pretty good though =]
thank you :)
user924016
+1
lol I didn't wanted one, as I wanted to know whether I went wrong somewhere, so that I can make my answer better... that's all
thanks though, but you can take it back ;)
user924016
=] haha I am not going to take it back. I throw +1 whenever a answer shows effort or better then other answers (often misleading answers)
12:44
@Mr.Alien: Nice answer mate!
This can't be beaten, though:
-1
A: How to generate UL Li list from string array using jquery?

user3313295its very complicated.. can u plz simplify it?

user924016
lol
user924016
Humans are fun
@AmalMurali thanks bro.. and lol that was epic :D @RonniSkansing credited you in the answer as I worked on that via validator :) ...
@AmalMurali so what are you doing these days? I guess exams overhead right?
yeah, as usual!
you in second year or the final third year?
12:50
First year only
ohhh kidd...
@AmalMurali Nice digging! :)
How can I edit this ?
@hek2mgl heya o/
@Mr.Alien Write the mailinglist?
@Mr.Alien Join the W3C ?
12:57
because if you see that page, the very first HTML example, it misses a closing <p> tag
@PeeHaa where's the CMS @hek2mgl wasn't sure about that :)
@Mr.Alien What wasn;t @hek2mgl sure about?
Also what CMS? :P

« first day (1218 days earlier)      last day (3955 days later) »