« first day (223 days earlier)      last day (4951 days later) » 
02:00 - 15:0015:00 - 21:00

15:01
@Robik you mean the real life meetups?
No, chat Events
oh that.. afaik you can schedule special events. for instance, chat with @JeffAtwood
@Gordon upvoted; should get you populist ;)
Where i can ask him?
@gms8994 thanks :) though i think the AA needs 11 and I'd need 23 for that
15:04
So when event starts you have to spam to win it or what? :D
> Answer outscored an accepted answer with score of more than 10 by more than 2x
more than 10 = 11, by more than 2x = 23
How to accept answer on chat ?
@Robik they cant be won. they are just chats for special events
like I said, something like Q&A with Jeff Atwood. There is nothing to win. You just know there is time frame where Jeff will be in the chat answering questions of people.
Well, i can create event in my room so it's like invaitation?
i remember there was a QA with Moderator candidates during the mod elections
@Robik kind of
15:20
@Gordon: nice answer
which one?
^^^^^ singletones vs service locator
thanks
Anonymous
We should write guides on patterns, with a general consensus of "this is how it should be done"
no one can say how something should be done
Anonymous
15:23
I know, but people can have opinions in common.
Anonymous
which helps form a general consensus
cannot agree
its more like schools of thought whether to use this or that feature or this or that pattern in/of php
patterns themselves are a "solutions" for some specific set of problems
Anonymous
i think a newbie to OOP can easily be overwhelmed with all the different dev patterns kicking about. Their first instinct is to say "im developing a new application, what am I best to start with". While we know that different patterns suit different applications, we can still argue out the pros and cons between each pattern and have a majority agreement on what's suited for what. I know this info is already out there, but it'd be good to bring it together
15:26
hehe, that is what I call "experience"
the more design mistakes you make - the more experienced you are
Anonymous
I agree. right now there are good reviews / appraisals of many different patterns, and many different pattern implementations all over SO. Would be good to bring them altogether in some way so we can point people over to them.
once you've made a mistake - you know why it is bad. it is million times better than read some answer of gordon ;-)
Anonymous
@zerkms true. we are trying to help people though right?
too idealistic ;-) /me is being pessimist
i'm still thinking that making design decision is all about experience, not one more "pattern"
pattern over pattern, omg
Anonymous
meh. my point is really a non-point. I guess I'm just saying new users will get overwhelmed, we should have a forum (we probably already do somewhere) that we can point them to where they can read through debates on each. Realistically they should get off their ass and go and research each one themselves, but you know just as much as i the average patience level of a SO OP :P
Anonymous
15:29
@zerkms agreed.
well, anyway - nice conversation before going to bed ;-) doing that with a good mood
2:30am 28th may here
@Gordon: have read your conference report. It looks like it was great there
@zerkms yes, was very nice. i enjoyed it a lot.
was lold about your opinion about REST report
very vague term and every single reporter always thinks that only he knows what it actually is
its not easy explaining rest with all there is to say about it, especially all that hateoas stuff
the basic concept is easy, but there is lots of interesting details in it
yep, like design patterns - with rest you cannot be ever sure that you're doing it academically right
15:37
the guy basically just went over all the http status code and some of the lesser known possible headers
need to go, was glad to see you all
laters
Anonymous
@zerkms laters
15:53
Hey all
I wonder if someone could help me with picking random arrays?
It's a little more complex than that, I can explain in more detail if you'd like to help
go ahead
Anonymous
you're going to need to explain it in more detail before we decide if we want to help anyway :P haha
Anonymous
time to go home :) Later guys. @Chrish, good luck, @Gordon will steer you right no doubt.
16:03
maybe you have $array1, $array2, $array; could store those names in an array and use array_rand to get one of them?
@SkippyChalmers laters
posted on May 27, 2011

On NetTuts.com there's a new post of a two-part screencast series helping you get authentication working in CodeIgniter based on the information in a MySQL database. In this in depth "screencast of the week," I'll take you through the process of building an authentication system with CodeIgniter. Need to restrict access to certain parts of your website to only those who've logged in? This t

@Gordon sorry about that, I had to do my dishes.
Let me just upload my code to pastebin
Okay
which is located here: grtoutdrs.com/steamgamepicker (type in a steam username, ie chrish, to see the process.php file linked above on pastebin)
Steam has a public API? Oo
What it does when is grabs a list of all of your Steam games via an xml document. I want it to pick out one of those games and display it :)
16:11
A Steam API would be awesome
Yeah it's boss! This is my first time using it though and the first time I've used xml with php so I'm a little rusty.
I don't think they have an actual API though
well, they provide their stuff in XML. That's pretty neat
I had to write a scraper to get an RSS feed of their Specials page. They have some good deals if you keep an eye on it all the time
16:13
It's saved me a bunch of $$
@JohnP yeah they've got some good deals at the moment, steamgamesales.com
@Chrish yup. Although I use this : randomcoding.com/steam
yeah, its horrible. and its so frigging easy to buy in their store. will ruin me
wrote it to keep me posted ^_^
I force myself to buy only if it's 10 ~ 15. involves me waiting for a bit though :(
ok, but back to your provlem
16:15
Cheers
the xml_parser thing is the most complicated of the parsers because its event driven
you are easier off with DOM, XMLReader or SimpleXml
I'm not particularly familiar with it, I found a tutorial on Kirupa and just adjusted to fit what I wanted it to do.
SimpleXml would be a good fit here
you just want to pick one <game> from the XML?
Yeah I tried SimpleXML but I didn't know what I was doing with it and couldn't find any decent tutorials for it either.
Yeah
The way I'm doing it now I get this error:

Catchable fatal error: Object of class xml_game could not be converted to string in /home/grtoscom/public_html/steamgamepicker/process.php on line 78
16:18
echo $gameArray[$randomGame]; that line?
Yeah
The problem lies in $gameArray[$counter] = new xml_game();
line 37
You probably have an xml_parse object and not a string
just do a var_dump on $randomGame to check it out
I'll give it a go
It outputs int(56)
posted on May 27, 2011

Christian Weiske has a problem he hopes you can help with - he's trying to get the PHP_Codesniffer tool integrated into his git workflow (well, the workflow of his team) as an automatic process that runs on commit. Unfortunately he's having some issues. At work, we used a SVN server and enforced our project coding standard with a pre-commit hook on the server that ran PHP_CodeSniffer. Whene

strange, are you sure that's the line? What happens when you do $gameArray[56]?
16:25
$gamesList  = simplexml_load_file('http://steamcommunity.com/id/chrish/games/?xml=1');
$randomGame = rand(0, $gamesList->games->game->count());
echo $gamesList->games->game[$randomGame]->name;
[5] => xml_game Object
(
[appid] => 24790
[gamename] => Command and Conquer 3: Tiberium Wars
)
What am I looking at here @Gordon?
you're storing objects in there. you can't echo them out
@Chrish the solution to your problem if I understood it correctly
So what would you suggest?
Would that require re-writing what I've done so far to work with simplexml?
16:27
you can use simple xml like the snippet gordon posted
or you can just work with the object
I'd rather not re-write it if it can be helped
@Chrish it would require throwing away what you got so far, because the above its all the code you need
if you don't want to dump it, you can do this to fix your code echo $gameArray[$randomGame]->gamename;
since you'r working with an object, just access the properties inside it
instead of echo $gameArray[$randomGame]; use echo $gameArray[$randomGame]->gamename;
@Gordon that question you posted with the => was awesome! I +1 your answer. I just pasted the code in eclipse and BANG! errors
:779833 so like this?
		<?php
			$randomGame = array_rand($gameArray);
			echo $gameArray[$randomGame]->gamename;
		?>
@Chrish yup
Your script works for me when I do that
16:32
@JohnP :)
Sweet. You're right it works :)
great :)
<3 @JohnP for uv'ing me on that because it earned me Populist
@Gordon ^_^
I want to include other information I'll be pulling from the xml file, for example the app ID
To do that, would I simply do something like...
			$randomGame = array_rand($gameArray);
			echo $gameArray[$randomGame]->gamename;
			echo $gameArray[$randomGame]->appid;
16:34
yup. just remember you have objects in your array. not strings
@Gordon did you get Populist?
I'll keep it in mind :)
Thanks for your help @Gordon and @JohnP
you're welcome!
@gms8994 yes! thanks to you as well
16:36
@Chrish you're welcome. Think about changing to SimpleXml though. You are making it more complicated right now as it needs to be and the XML is simple enough for SimpleXml.
it doesnt show my profile :(
It shows the badge when I look at it
ah, lol. no. that showed up. i meant the Steam thingie
probably because i didnt create a custom url for my profile
well, if you type in your ID it suggests a game
it doesn't actually show the profile
the font color is too close to the bg, so the game name isn't too visible. I think he's still working on it
i checked with my profile settings and I didnt set anything for my custom URL, so that's probably why its not returning anything for me
@Gordon ahh. Probably yeah. works ok for me : steamcommunity.com/id/jomanlk/games/?xml=1
16:51
i wonder if i can get my games from my numeric id
you should be able to. that data has to be available somehow
the other one is just a vanity url
https://steamcommunity.com/profiles/[steam64Id]?xml=1
wow. i dont want that data publicly available
lol
been playing those naughty indie games have you? ^_^
no? but now that you told me there is some :D
lol
16:56
https://steamcommunity.com/profiles/[steam64id]/games?xml=1
will get the games list. the other was just the profile
with all my play times and friends on it
and online status
yeah, it's all made public
you can disable that in the profile settings though
I don't use the community features that much. Just wanted legal games for some multiplayer
There isn't even one place that actually sells legal games here
I'm halfway to Famous Question status!
9
Q: testing if javascript function exists

gms8994I need to test whether the value of a form's onsubmit is a function. The format is typically onsubmit="return valid();". Is there a way to tell if this is a function, and if it's callable? Using typeof just returns that it's a string, which doesn't help me much. EDIT: Of course, I understand ...

for that
only another 3 more years to go!
Get some eyeballs on that
talking about games has got me in the mood. I'm going to go an play some Majesty
see you later folks, good night!
17:04
@gms8994 looked at it
heh, thanks :)
@JohnP nite :)
anyways. enough for today.. will prepare dinner now
laters
posted on May 27, 2011

On the Zend Developer Zone today there's a new post showing how you can cache your application configuration file to boost the performance of your Zend Framework application just a little bit more. If you think that you've done everything in terms of performance optimization of your Zend Framework-based project, I bet that your application configuration file was not included in that process

posted on May 27, 2011 by Matthew Turland

If you attended my sessions at the php|tek 2011 conference, thank you! I’ve linked to my slide decks below. Simply extract them and open the html files in any browser. Also, if you haven’t already done so, please take a moment to use the links below to leave feedback. Thanks in advance! Accessing Web Resources with PHP session – slides, feedback Creating Desktop Applications with Titanium and

17:29
hey, how can I differentiate between a query that errors out for various reasons and a query that just returns nothing. I'm using PDO
Can someone help me with a 301 rediect code to redirect care-guides/reptiles/lizards/item/bearded-dragons.html to /care/bearded-dragons/
joomla to wordpress
@Radu check your $PDO->errorInfo?
@Radu , one will have $stmt->errorCode()
I see, thanks teresko
17:46
Found this interesting phpsadness.com
Wassup?
yeah T_PAAMAYIM_NEKUDOTAYIM should be replaced with its alias T_DOUBLE_COLON
Well, it's cool name!
yup, but not everyone rocks the hebrew
and why have something that long, but abbreviate T_SHIFTLEFT to T_SL
Yeah
17:52
@JohnD i actually think that ?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 is a pretty nice easter-egg
Bastards
Ternary operator associativity, good one for the ZCE
This one is better: ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
Or ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 :D
Couldn't you potentially figure out the version of PHP a site is using with`?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000`
You can
17:58
a rainbow table of php credits, heh
and exposes that the server runs php generally
Looks like you can add expose_php = Off to your php.ini and it'll turn all those off.
I wanted to say that
yup
@teresko As the page says though there's no way to disable it from being loaded into memory
Cute but wasteful in some situtations
18:03
We can check if page is using PHP
;)
@JohnD nice gravatar, weird video
@oblig Heh, thanks.
18:32
@JohnD agreed. it'd be nice to easily remove that. 21K might not sound like much, but every bit adds up
Hey all, I'm back with more problems ;)
Are @JohnP or @Gordon around?
Hi @ircmaxell
Could anyone help me with something?
With what?
18:46
@Chrish yes?
> Discussion for all things PHP - Don't ask whether someone is here or can help. Just ask us. If anybody can and wants to help, they will. But no one can know before you actually ask your question.
lol
I'm working on this (grtoutdrs.com/steamgamepicker). I'm trying to get it to display the game AND the time but for some reason it doesn't want to display both.
@Robik I just asked for those two because they were helping me with this earlier and already know what it is
For some reason it either displays the title or the time, never both.
Why woin't you use single quotes?
Maybe because
if(!isset($steamid))
and
$steamid = $_POST["steamid"];
You should check for isset $_POST['steamid']
;)
My bad
> and is not NULL
@Robik quotes have nothing to do with that...
18:57
Well quotes is other thing
@Chrish does a var_dump($gameArray[$randomGame]) show you anything useful?
Works :D
How to call a class, that provides getters for array (specified getters)
19:37
bahahaha, le fu IDEs, for not allowing me to save because of your stupid errors...I USE "use strict"; FOR A REASON
</rant>
Error! You're closing not opened tag.
GUI is fail. IDEs need moar full-screen mode
bahaha, there is one
@Robik @gms8994 sorry about that, I went down for a drink and ended up going up the chip shop
I prefer double quotes, it's just what I'm used to. I'm not really a PHP developer.
Okay, i gtg. C'ya folks
@Robik I'll miss you ;(
19:53
@gms8994 I tried a var_dump like you suggested and got this: object(stdClass)#98 (1) { ["totalplaytime"]=> string(3) "0.6" }
@Chrish that means that your object only has the totalplaytime value
@Chrish what about var_dump($gameArray) ?
There's a lot, one sec I'll put it in a pastebin
ok. here's part of your problem
[0]=> object(xml_game)#1 (3) { ["appid"]=> string(3) "440" ["gamename"]=> string(15) "Team Fortress 2" ["totalplaytime"]=> NULL }
[1]=> object(stdClass)#2 (1) { ["totalplaytime"]=> string(5) "951.3" }
note that totalplaytime is not in the same portion of the object as gamename
what you'll have to do, after getting your random game value, is determine if the gamename value exists in the object. if it does, you'll need to get the next item in the array to get the playtime. if it doesn't, you'll need the previous item in the array to get the gamename
make sense?
Sort of
How has it become a seperate portion though?
and could you help me fix it because I'm still a little confused how
it's become separate because the Steam XML defines it separately
what you want to do is this
`$randomGame = array_rand($gameArray);
$gameObject = $gameArray[$randomGame];
if ($gameObject->gamename) {
$playTime = $gameArray[$randomGame+1];
} else {
$playTime = $gameArray[$randomGame];
$gameObject = $gameArray[$randomGame-1];
}
print $gameObject->gamename." ".$playTime->totalplaytime;`
multiline formatting is hard
20:08
If you paste it in without the `'s, there should be a fixed font button next to the send button.
But I got it anyway :)
Just implementing it
Okay I got this:
			} else {
				echo "<p class=\"letsplay\">Why don't you try playing...</p>";

				$randomGame = array_rand($gameArray);
				$gameObject = $gameArray[$randomGame];

				if($gameObject->gamename) {
					$playTime = $gameArray[$randomGame+1];
				} else {
					$playTime = $gameArray[$randomGame];
					$gameObject = $gameArray[$randomGame-1];
				}

				echo "<h2>" . $gameArray[$randomGame]->gamename . "</h2>";
				echo "<p>You've only played it for <em>" . $playTime . "</em> hours afterall!</p>";
Did I do that right?
close; replace $gameArray[$randomGame]->gamename with $gameObject->gamename, and " . $playTime . " with " . $playTime->totalplaytime . "
				echo "<h2>" . $gameObject->gamename . "</h2>";
				echo "<p>You've only played it for <em>" . $playTime->totalplaytime . "</em> hours afterall!</p>";
Like that?
doesn't seem to work for the user 'iweartightpants'
though, I may be doing something wrong
also; make this work for XBox360, so I have something to do as well ;)
doesn't exist?
hahah :) I may do at some point. does xbox have an API like that?
steamcommunity.com/id/jomanlk/games/?xml=1 -- is that not what the 'steamID' node in the XML is?
20:20
I might try and use the playfire API, they've probably got something like this.
Steam ID is your Steam persona
of course ;)
it's a bit misleading on the xml doc.
if you click on the underlined text on the website, "Enter your Steam URL ID into the box below and hit enter"
it'll show you the bit it's asking for
20:42
				} else if($playTime->totalplaytime > 9000) {
					echo "<p>WHAT NINE THOUSAND?!</p>";
					echo "<iframe width=\"960\" height=\"750\" src=\"http://www.youtube.com/embed/TBtpyeLxVkI?rel=0\" frameborder=\"0\" allowfullscreen></iframe>";
				}
haha :')
Well time to go
thanks for your help @gms8994
02:00 - 15:0015:00 - 21:00

« first day (223 days earlier)      last day (4951 days later) »