« first day (824 days earlier)      last day (4140 days later) » 

8:00 PM
like why not node.js .. i like js and c++ so .. i want to work in node.js .. but my project in php (CI) so now i need to learn CI not node.js ..first .
or if you can take risk than .. learn you want instead need
 
Just experiment with node.js in your time off.
Every decent developer should develop in his own time too
 
@PeeHaa completely agree with you ...
if one like me not decent developer can ... learn everything ..C# and php and c math at same time .. which makes no sense ..
 
Anyone knows how to write a plugin engine?
 
@ircmaxell thanks! i'll check right now.
 
8:06 PM
@PeeHaa +1
 
:)
 
wtf why are they naming winter storms
this is the most ridiculous sensationalism
brought to you by the US media
 
@PeeHaa I especially like how the version history is in the comments
 
8:08 PM
One class to rule them (engines) all
@Lusitanian I used to do that in the past (I was young and innocent stupid) :)
 
@PeeHaa well its grand mother 3625 line long :P
 
zOMG I hate elseif...
 
@webarto I hear ya brother
 
@PeeHaa I used to use singletons...when I was young and innocent had less knowledge than a church mouse
 
:D
 
8:10 PM
I'm still young and now I have slightly more knowledge than a church mouse but not much
 
@webarto why it reduce complexity ?
 
You're still a puppy :)
 
@hanleyhansen frameworks in general suck, Symfony (2) is decent
@PeeHaa yup, thanks to @NikiC for that (you're only seven months older than me or so so you are also a puppy)
 
@Lusitanian lol
 
I'm an old dog man ;)
 
8:12 PM
you are human breed puppy ..:P
 
	} elseif ($this->extension == 'mysql') {
return "'" . mysql_real_escape_string($value, $this->connection) . "'";
} elseif ($this->extension == 'mysqli') {
return "'" . mysqli_real_escape_string($this->connection, $value) . "'";
} elseif ($this->extension == 'pgsql') {
return "'" . pg_escape_string($value) . "'";
} elseif ($this->extension == 'sqlite') {
return "'" . sqlite_escape_string($value) . "'";

VS

return sprintf("'%s'", {$this->extension} . '_escape_string'($value));
@NullPointer :D
 
@PeeHaa you're still younger than 40, just a young dog
i want an @php.net email address
 
@Lusitanian try lus_php.net@gmail.com
lol
 
lol
 
:7240826 Switch is OK, but it's rather confusing at least to me, when you have lot's of "conditions".
 
8:13 PM
:P
 
@webarto your approach is best .. very very less complexity
 
@PeeHaa how much core or doc work do you have to do for them to give you an email address?
 
@Lusitanian Depends
 
@Lusitanian Put kitten instead of dog on your avatar and you're in.
 
@PeeHaa what need to do to get php.net email
 
8:15 PM
@PeeHaa +1 useful answer would read again
 
:D
 
@ircmaxell I wanted to vote that separately
Just to make sure that the main thing gets in in any case
 
ahh, ok
 
@Lusitanian function again(){ again();}
 
@Lusitanian @webarto is right. Kittens are really helpful. Making useful patches too.
 
8:16 PM
@NullPointer Yo there's a new super computer IBM has that can execute an infinite loop or recursion in four seconds.
 
looooool
But can it do infinity + 1?
 
That's limited to deep thought, and infinity + 1 = 42.
 
@Lusitanian how infinity can be calculated its always n+1..
 
Nope, it's 42.
When in doubt, the answer is 42.
 
8:18 PM
@Lusitanian useful link is useful
 
@PeeHaa it's a terrific site, been around for years
 
@Lusitanian Can I also use it or is it yours?
:P
 
@NullPointer that's also a good one
@PeeHaa hahahaha
 
R.I.P.
 
8:20 PM
I often try to type it out rimshot + crash, but that's just not it
 
reddit never ceases to amuse me
 
@Lusitanian why removed that was hilarious ..lol
 
@NullPointer people yell when large images are left around :)
 
user1125394
 
@cab that lady has bigger biceps than me
 
8:23 PM
where I can buy the PHP elephant? In DX doesn't exists...
 
why girls have bigger biceps/lags than boys ?
 
@Juanma I heard there were some over here in the netherlands
 
Where can I buy a regular elephant?
It's for a, um, "project"
 
lol
Don't ask don't tell... :D
 
@PeeHaa reference to books.google.com/…
one of my favorite comic strips (not that one in particular, just FoxTrot in general -- I've read the entire collection like 3 times)
 
user1125394
8:24 PM
her biceps are bigger than my thigh
 
I love how in one week we find out that Lance Armstrong did (for sure) dope and that Manti Te'o faked having a girlfriend, faked her having a car accident and then faked her dying of leukemia -- presumably for publicity. What the hell is with American sportspeople?
 
@Lusitanian lol
@cab and they cant even pull 50kg weight .. (her bicep )
gud night ....
 
@NullPointer Night
 
user1125394
@Lusitanian I can sell you i.imgur.com/VQpyV.jpg for $10k
 
8:39 PM
:)
 
user1125394
but it's not in blue
 
user1125394
armstrong should be quite concerned, but no, he is staring at ...
 
user1125394
and she has the strong arms
 
wow guru badge for a crap answer :P
 
9:00 PM
way too many chrome tabs open
ugh
using a solid 2gb of ram
 
Oh my gods.
Someone that I edited a post of
tracked my employer down
(not hard)
and mailed our support@ address
asking me to stop editing his posts.
 
@Charles HAHAHAHAHA
WHAT?!
 
That was pretty much what our support manager said
 
Answers are ostensibly wikis
I don't see the issue
 
Exactly.
 
9:03 PM
@Charles loooooolz
 
Found him.
1
Q: How to query documents in docpad based on arrays of objects

AshnurIn my documents meta I have a categories array which has an unknown number of elements. These elements are category objects. They all have a property called slug. I would like to query all documents which have a category object with a predefined slug value in their categories array. How is this...

 
Edit wars FTW!
mumumumumumulti edit
edit spree!
 
STOP RECREATING THE TAG ARGH!
 
SORRY. THOUGHT IT WAS VALID. AAAAH SPAARTAAAAAAA!
:)
 
RAGEEE
 
9:08 PM
CAAAAAAAAAAAAAAAAAPSLOOOOOOOOOOOOOCK!!!!!!!!!!!!
 
Dude, how could be valid?
I mean come on. That's not a real thing.
 
Glanced it and it had a shiny tag description :)
 
wtf is a query engine
 
Didn't see the 0 questions thingy :)
 
Apparently it's some component of DocPad.
There are only 15 DocPad questions; we do not need further fragmentation there.
Great, now my freaking coworkers are in awe of me being a 20k.
GJ INTERNET STALKER THIS IS YOUR FAULT
 
9:13 PM
lol :)
 
hey guys... trying to do a simple file rename procedure but having difficulties...
$dir = opendir('/public_html/_documents/temp_fs/');

// loop through all the files in the directory
while (false !== ($file = readdir($dir)))
{

        rename($oldname $newname);

}

// close the directory handle
closedir($dir);
 
And what is the problem?
 
the problem is... I have the names in an array... like this as follows, and I don't know how to include the rename script with the array... I'm new to PHP
foreach ($filename as $oldname => $newname)

$filename = array (
"1.pdf" => "9015.fs.pdf"
 
You're discarding the return from rename. It returns a boolean success value.
 
I get the rename script. rename ($oldname, $newname) but I want to make use of a foreach loop
I've got all 250 file names in an array with $oldname => $newname
 
9:26 PM
Loop through the array instead of through the directory; see if the file_exists and rename as needed?
 
@Charles could you please show me the code that would do that?
 
Alternatively, loop through the directory and do an array_key_exists in the array, doing a rename as needed?
 
I'm trying to get all this, but it's overwhelming...
 
@BenJones Show you the code, no. Show you where you can learn the code, absolutely.
 
either of those options would work, I'm sure... I prepared the array using excel. If this was in excel np.. but PHP - no idea
 
9:27 PM
Use foreach to iterate over the array.
 
@Charles :)
@Charles ok I can appreciate that and am 100% all for learning this!
 
And here's file_exists and array_key_exists, which will help.
So basically you're already about 90% of the way there
given that you're already using foreach
Your pseudocode is going to look like:
 
this is what I've come up with, a little emberassing coz I have no idea if this makes any sense...
 
For each key (old filename) and value (new filename) in the array: see if the old filename exists, and if so, try renaming it to the new filename.
 
?php

$directory = '/public_html/_documents/if(file_exists($directory . $oldname))
{
rename($directory . $oldname, $directory . $newname);
echo 'File $oldname has been renamed to $newname';
}
else
{
echo 'File $oldname has not been renamed';
}

foreach ($filename as $oldname => $newname)

$filename = array (
"1.pdf" => "9015.fs.pdf"
"3.pdf" => "9014.fs.pdf")

?>
 
9:31 PM
So, first things first, if your code is really indented like that, you'll want to fix it. Consistent indentation is important. Given the number of edits you're making, I'm betting that the chat is just eating the formatting instead :)
 
@BenJones Edit message -> ctrl+k :)
 
You need to move the declaration of $filename above the foreach using it. Can't use a thing until it exists.
 
@Charles I was trying to make it better buy the edits..
    <?php

    $directory = '/public_html/_documents/temp_fs/';

    if(file_exists($directory . $oldname))
            {
            rename($directory . $oldname, $directory . $newname);
            echo 'File $oldname has been renamed to $newname';
        }
        else
            {
            echo 'File $oldname has not been renamed';
        }
       $filename = array (
    "1.pdf" => "9015.fs.pdf"
    "3.pdf" => "9014.fs.pdf"

    foreach ($filename as $oldname => $newname)

    ?>
 
You'll also want to add curlies for the block after that foreach, as right now, PHP will try to loop over an array that does not exist, then will try to define the array, and all hell will break loose and/or an elder god will be summoned to destroy the world.
You should also probably stop pasting the code. People tend to not like having that done over and over.
 
ok .. sorry..
 
Raf
9:34 PM
@tereško I don't totally take that respond as very helpful, but as of now, I think you should take a look into what sort of place is there is in OOP for static class usages, and you should know that in the file you have referred is just doing its job to hold a state while providing the service like a Facade subsystem. I don't know how to explain but this topic can be debatable, as I see it widely discussed on the internet.
 
@Charles lol dear me. let's get those curlies in there!
 
@Raf Why do you (think you) need those statics?
 
Raf
@tereško may be this might sort the idea msdn.microsoft.com/en-us/library/orm-9780596527730-01-04.aspx
@PeeHaa I used it clearly to hold one state of an instance that allows like binding other objects, sometime like handling all dependencies and states of all the subsystem used within a Facade system
 
State as in global state
 
I'm still stuck. I want to learn this and I'm trying but honestly, that stupid php.net/manual/en/index.php is not helpful...
 
Raf
9:42 PM
@PeeHaa Kind of global state as long as it is within the first instance of it's object
 
I don't get why people suggest looking at that, when they are new to PHP, as though it's going to be helpful...
 
@BenJones Those are links. You can click them. The useful parts are after that page :)
 
yes I've tried clicking links before.. it's great that it takes you directly to the page
 
:)
 
;)
but it's the freakin manual...
boolean this/that
makes no sense to me
and all the cases or cummulative knowledge or w/e is way over my head.
 
Raf
9:44 PM
@BenJones u will like it, it all happens
 
@Raf Instance? It's all static. You don't need no stinking instance
 
Raf
@PeeHaa I told it Facade Subsystem
@PeeHaa its like this: Form::make(function($callback)); where this static method is originally holding an instance of an object which gets passed a callback to the method, the object methods are not important at this level
 
@Raf And you call that from within some other class?
 
Raf
@PeeHaa github.com/raftalks/Form take a look at the example
@PeeHaa what matters in my opinion is the object returned to the callback method
 
Works great for procedural programming if you're into that.
 
Raf
@PeeHaa for example, before creating a form, I may want to setup templates defined to be used with form object, so every things is hold within the first instance of the object inside the facade
 
Although to me personally it looks like those sql abstraction thingies
 
Raf
@PeeHaa well, I see it as nested closures giving ability to make forms with php, and not only forms, but any html tag
it works like the object returned to the closure will have its first method as the tag element and any nested methods creates its attributes
 
Let's just say I'm not your target audience :)
 
Raf
sorry @PeeHaa if that is so, I thought you wanted to clarify the discussion of someone pointing my Facade class having static method is about time for me to learn OOP !! o.)
0.O
 
9:58 PM
I've said everything I wanted three comments ago ;)
 
Raf
but I ain't putting procedural program
 
would have been faster renaming all these files the old fashioned way... still no solution!
studying the code here... not sinking in...
open directory, read file names, rename files where the match the array, close directory, call it a day.. I know what I want to do... so frustrating.
#learning
 
One does not simply follow Java practices ;)
 
Raf
10:05 PM
its not java or c# or php or any other language, Facade is a design pattern used in software engineering
mainly used in OOP
 
I'm just trolling now :)
(kinda)
 
Your point?
 
Raf
yes, that is fine, and I also like to highlight the line that says "The Singleton pattern can be extended to support access to an application-specific number of instances."
in the form library on GH, even if someone use Form::make() twice, that will create independent two forms which will not be the same object as that of the problem described in singleton, but both of these new object instance will inherit similar functionalities or template objects that is been created before them
 
That's not the only problem of singletons
 
Raf
10:16 PM
github.com/raftalks/Form/blob/master/src/Html/… this is where it is actually passing the real object to a closure
 
And how are you going to swap that class?
 
Raf
what do u mean to swap that class with?
also I note that the same link u pointed out, under rules of thumb, it says Facade objects are often Singletons because only one Facade object is required.
 
The HtmlTag class is tightly coupled to the HtmlHandler class
 
Raf
Thats the point, Html handler is to handle the html tags
 
I
give
up
 
Raf
10:23 PM
Singletons are intended to be used when a class must have exactly one instance, no more, no less.
 
Singletons are intended to be gone
/out
 
Raf
@PeeHaa it have its good and bads, those who abuse it will have to give up on it, I like the last Rule of Thumb in this singleton sourcemaking.com/design_patterns/singleton
misconception of global data and singleton
hehehe The answer to the global data question is not, “Make it a Singleton.” The answer is, “Why in the hell are you using global data?” Changing the name doesn’t change the problem.
 
That should have been the only text in the entire page :)
2
 
Raf
lol
 
11:18 PM
public function __get($name) {
    if (method_exists($this, $name)) {
        $cb = array($this, $name);
        return function() use ($cb) {
            return call_user_func_array($cb, func_get_args());
        };
    }
    return null;
}
 
I need to generate html from php and can't use external resource such as lib. What would be the more efficient way to achieve this with re-usability in mind?
 
11:31 PM
@PeeHaa I'm not sure to understand it! Is it me?
 
@Happyninja have you ever thought of creating your own little template engine for that?
 
@Happyninja DOMDocument / plain HTML or whatever you want to use
Since it's friday here:
 
@TemporaryNickName I'm unsure on how to design it. Actually I created myself functions and I put inner stuff in it as argument like :
	function html_div($class = '',$content = ''){
		$string = '';
		if($class != ''){
			$string .= '<div class="'.$class.'">'.$content.'</div>';
		}else{
			$string .= '<div>'.$content.'</div>';
		}
		return $string;
	}
 
@PeeHaa THAT IS WONDERFUL
 
:D
 
11:37 PM
also, caps lock is cruise control for cool
 
CAPSLOCK FRIDAY!
 
Evening
Or should I say EVENING
 
EVENING
 
EVENING DAVE!
 
HIS NAME IS CHRIS
 
11:38 PM
@PeeHaa OMG (CAPSLOCK THURSDAY)
 
SORRY. HIYA MR WRIGHT
 
it's still thursday here for me too
@PeeHaa N EMR
 
Hy! Can anyone tell me if there is a way of sending yahoo IM's from php using an Yahoo Api ?
 
lol
 
@PeeHaa omg, I didn't even know I could use DOMDocument for something else than xml ...
 
11:39 PM
EMR HAS TOTALLY BAILED, SHE FELL ASLEEP ABOUT 10 MINS AFTER WORK
 
@DaveRandom poor emr, she must be exhausted or not want to take care of the child or take care of you. one of those.
 
:-P
 
Must be from your country dave img.pr0gramm.com/2013/01/1358426053754.jpg :P
 
"emr" is a really interesting name...
@PeeHaa no, probably mine
 
:D
 
11:41 PM
USA. A McDonald's on every street. Vote for Ray Kroc 2012.
 
I think we should make it Multiping The Random Pingers Friday
@Lusitanian It's Emma ;-)
 
@DaveRandom I figured, I was kidding
 
@PeeHaa That I really did not need
 
hehehehehehe I have issues man
@Lusitanian Now these are proper 'muricans img.pr0gramm.com/2013/01/nxdir.jpg :D
 
September is amazing
 
11:43 PM
ahhahahaha
 
@PeeHaa wonder if she ever had sex
 
@PeeHaa augh
 
@Happyninja I have seen some weirder shit on the internet
 
@PeeHaa no doubt on that
 
I mean I heard someone say that. Never seen it myself of course
;)
 
11:45 PM
@PeeHaa LOL
 
yesterday I saw a 'are you christian' type of dating site, it amazed me.
@PeeHaa surely not ;)
 
@Happyninja I would looove to troll on that
yes I'm a dick like that
ókey now for something less nsfw'ish
 
@PeeHaa it could be a fantastic. We should create a new chat room and invite everybody
 
Also
user image
2
 
@PeeHaa he's just talking about coffee
 
11:48 PM
^ probably repost
 
@PeeHaa seen that joke so many times
 
@PeeHaa this one could have a great impact if we launch that using the SE javascript bot. It could become a new genre: troll propaganda
 
BTW if anyone is still at the job in here somewhere around the globe please tell me to stop posting shit in the office :)
 
Hey!
 
HEY! HEY!
 
11:50 PM
We are looking for programmers for our group.
 
We are a teenage group and program in various languages
We have some awesome programmers
 
@javawarrior like java?
 
and we need some for our website
of course java XD
 
What the f*ck is flourishlib supposed to be? I mean I suck at OOP and even I think it's terrible. @PeeHaa that's the second time I've seen you link to it, you're not having to use it or something are you?
 
11:51 PM
We need some people for php for our site
 
@PeeHaa 'XD' java
 
If you want to join, contact me on sktpe
 
I think I will switch off my troll parameter
 
*skype
 
@DaveRandom neh it came up in some discussion. I always like to start yelling in the middle of a discussion I'm not in
 
11:52 PM
my username is theamazinggya
 
lol very close to "the amazing gay" which sounds like a superhero name
Special powers include bitchy put-downs that make the bad guys feel bad about themselves.
 
@DaveRandom maybe this username is banned from skype filter
 
well?
 
Super interior-decor criticising skills
(not that I'm perpetuating a stereotype or anything)
 
11:55 PM
@javawarrior @javayou know it's a php room right?
 
@DaveRandom of course not
 
yes
We need php people for our website
 
@PeeHaa > Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
:-(
Oh it's working now :-)
 
@DaveRandom Hola crap batman you're right :(
not for me :(
 
@PeeHaa lol
 
11:58 PM
lol wtf I had to watch that few times before I could see what he actually did there, that's brilliant
 
user895378
About to try out xhprof for the first time. Will report back with my findings ...
 
@javawarrior what's the site?
 
@rdlowrey Affirmative. over
:)
 
user895378
Roger that.
 
faragames.tk
 
user895378
11:59 PM
The fox is in the hen house.
 
but the website we're working on is
faragames.de.vu
 

« first day (824 days earlier)      last day (4140 days later) »