« first day (963 days earlier)      last day (4210 days later) » 

02:06
How would one use docblock to indicate an object "implements" an interface by decorating another object? I'm using @method ... statements now, which is duplicated effort to maintain.
02:25
@DaveRandom Apparently they didn't bother to remove the duplicate first paragraph from that article =p
03:06
I wish there was some kind of getting started tutorial for composer from a library author's point of view and not just people wanting to use the library.
Nah, that would make it too easy :)
Yea
We can't have every Tom, Dick and Harry write libraries for Composer =p
Hai to all
I have a problem with fusion widgets can anyone help me
I have a codebase I'm planning on migrating to a different organizational structure in GitHub to break modules out into their own repos. I want to have a "skeleton app" that uses composer to get the modules
I like the idea of Composer
But some of their documentation is vague or ambiguous
Or I just dont' understand it
@bhari Fusion?
Like...that ColdFusion stuff?
03:10
No Fusion Charts
I think any kind of dependency tool suffers from this, though.
You should see the threads on emerge (Gentoo package tool) :)
@Jack Yea, but I think it might maybe increase adoption, or at least interest, in the library.
But once I start the move to this new structure I'm kinda stuck doing that until I'm done
It isn't something I can keep developing while I do
And I don't like the idea of starting it without an understanding of Composer. But I won't understand Composer until I do it.
Making your project work with Composer should just be a matter of writing the "piping"
Well, right now I'm very confused by the Composer versions
How does the version in "cspray/lib": "1.0.0" map back to the git repository?
Does composer look for a branch named 1.0.0?
Do they look for a tag in some master branch?
I'm guessing they look for tag.
Tags are essentially versions anyway.
03:18
Well, I'm probably gonna write a blog post about the whole journey anyway so I guess we're about to find out :P
 
1 hour later…
04:33
16
Q: how to implement a decorator in PHP?

omgSuppose there is a class called "Class_A", it has a member function called "func". I want the "func" to do some extra work by wrapping Class_A in a decorator class. $worker = new Decorator(new Original()); Can someone give an example? I've never used OO with PHP. ==========================...

Some answers in there are in need of review, and only one answer actually makes use of what would be the logical choice of __call(), although it's ripped from @Gordon's earlier answer :)
WTF Is wrong with this rule?

RewriteRule ^hot-water/?$ hot_water.php [NC]
its correct @Mr.Alien
Than this is not working the url is like 127.0.0.1/~domain/ (Note, 127 is actually a different ip)
Is any other rule is present for hot_water.php or not. If yes use [NC,L]
Nope, just single rule
I used same rule and its working here. @Mr.Alien
@YogeshSuthar I am going wrong somewhere and this is becoming frustrating
May be and my url was localhost/short/hot-water
WOrks on my local, fails on server
May be mod_rewrite is not installed on server.
05:05
nah, it should work..
I am sure it fails cuz of url like this ip/~name/
morning
how stupid i was ... stackoverflow.com/a/12439029/1723893 when i can off magic quote gpc from php.ini
Hi guys , does any one know how can I prevent attacks like sql injection in joomla...
I am doing something like this
$db = JFactory::getDBO();
$query = $db->setQuery(" select * from abc where id=1");

Im doing this I don't like to use joomla inbuilt functions ....

so guys can I use PDO way or any other way to achieve this ?
05:21
hey guys, I have a json results like this [{"userid":"[email protected]","movieid":"72190","watched":"1","releasedate":"2000-06-","movietitle":"World War Z","imagemurl":"http:\/\/cf2.imgobject.com\/t\/p\/w154\/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg"}

using print json_encode($rows);

how to I can get a result like this

"results":[{"userid":"[email protected]","movieid":"72190","watched":"1","releasedate":"2000-06-","movietitle":"World War Z","imagemurl":"http:\/\/cf2.imgobject.com\/t\/p\/w154\/gAt1PrsrFY1nX6UzebeiHP8njE9.jpg"}]
@RodrigoSchreiner serialization ?
@RodrigoSchreiner you can simply decode that and insert it to a associative array with key result and again encode
@Ruwantha but this format looks like by serialize function isnt it ?
@YogeshSuthar I told you, it was this ~ which was causing redirection issue
@Mr.Alien So is ~ necessary in your url or not.
@NullPoiиteя yah.. but what if it cause other concerns like security... Just put a simple way :)
@NullPoiиteя It's json :)
serialize() gives a different representation.
@Jack yupp agreed .. damn on my eyes
:P ty
@RodrigoSchreiner The result that you want is not valid JSON, so it can't be achieved using regular functions, you would have to do string concatenation or sth ... what are you going to use it for anyway?
-1
Q: Coffeescript: Why is this function in this class saying its parameter is undefined?

tieTYTWhen I run my code it gives me this error: TypeError: pivot is undefined Here's the relevant class that the error is referring to: class Hero constructor: (@color, @direction, @x, @y) -> pivots: [] addPivot: (pivot) -> @pivots.push(pivot) onPivot: (pivot) -> pivot.x == @x && pivot....

Ahh, the "beauty" of CoffeeScript =p
Give people the ability to declare classes in JavaScript and they will jump on it.
05:57
@YogeshSuthar ~ was the cause of issue, I ported to a proper domain and things are workin well
@Jack ANy idea using base tag + CSS for 404?
@Mr.Alien Say what now?
@Jack am using base, script files has relative url... if am on home page it works kwel, even if I am on say domain.com/services.php which is rewritten to domain.com/services/ here too css works well, but when we view source, it goes 404..
Base does more bad than good imho ;-)
You're talking about <base href="..."> right?
any other way to handle links apart from using absolute urls
yap
I almost exclusively use absolute URI.
It's just too painful without them :)
06:11
so kinda define a constant with a full url, and than use it in each link like <a href="<?php echo BASE_LINK.'/services'; ?>">Link</a>
Yeah, that would work.
hmmmm..
thanks..
ff sux big tym, they should rake a break and release a stable version
Hello?
0
Q: PHP not working on Nginx...?

user2432782Stack trace: #0 /usr/share/nginx/html/basic/includes/db.php(7): PDO->__construct('...', '...', '...') #1 /usr/share/nginx/html/basic/index.php(3): require_once('/usr/share/ngin...') #2 {main} thrown in /usr/share/nginx/html/basic/includes/db.php on line 7" while reading response header from ups...

Morning Folks!
What are Factory classes? What is their job? In the context of zendframework 2
Good morning everyone! Have a nice dev-day!
http://framework.zend.com/manual/2.0/en/modules/zend.navigation.pages.factory.html
http://www.kimbs.cn/2009/07/factory-pattern-in-zend-framework/
06:27
Thanks @Duikboot Will have a look at them!
06:37
Just ran phploc on a very simple Silex app; 26k LLOC =/
The app itself is only 450 ... =O
06:51
Can anyone explain me in an example when u use passed by reference variables, what could be a reason in 'human language' I use it when I create some application?
I understand what it does but Im not sure when to use.
If you understand what references do, you will also know when to use them.
@Jack very true
In my own experience, hardly ever.
30
Q: What's the difference between passing by reference vs. passing by value?

rituWhat is difference between a parameter passed by reference, and a parameter passed by value? Could you give me some examples, please?

0
Q: Error while loading a webpage in ipad/iphone

VictorI have a hosting product website built in PHP Symfony framework. The entire website is loading fine in all of the web based browsers. However, when the same website is loaded in Ipad/Iphone, it doesn't allow the user to order any product. The following error is seen in the checkOut phase. 500 |...

@Mr.Alien Learnt a new word "doublicating" :)
07:21
1
Q: Why doesn't this PHP recursive function return the value?

coderunnerI was working on an API for ustream which returns the following array Array ( [results] => Array ( [0] => Array ( [id] => 33756327 [userName] => sachintaware [title] => Mobile record [protected] => ...

Recursion is hard, let's use Iterators :)
good day people
^^ my recursion is not working ... hey, have you tried without the recursion?
Good morning
hola~
07:28
what's going on?
falling asleep at my desk ...
had to bring my kid to the emergency clinic at 2am =/
:-(
everything ok?
good mornings
he's okay now, his vocal chords were swollen due to croup.
they gave him steroids ... how cool is that!
That's not good
07:30
apparently the dosage they gave is still considered safe
of course
steroids are used all the time
they are dialators. They can be used when swelling or constriction of veins or airways becomes severe enough to be a problem
yeah, they use similar stuff for asthma as well iirc
Yup
Those can be steriod or non-steroidal...
depending on the desired effect
HA! They say that the gate I'm going to next is a 10 minute walk. Took me 20 when I came this way...
happy he's better though, but we only left the place at 4am ... the upside was that traffic was ultra smooth :D
I'm sure they all enjoy brisk walks heh
There's a 3am? Why hasn't anyone told me about this before? #jetlag #thisWillBeFun
07:36
Saw this guy for first tym :p stackoverflow.com/users/168175/flexo
@JackWanna learn few more ;)
What's up with the profile views? Mine are like half of that =/
@Jack mods get more views
This is not fair :p
Ah sorry, it's Flexo .. of course.
Hard to see the username on that page for some reason .. maybe it's missing the funny characters at the back ;-)
LOL how foolish question, how to decide whether it's a c or c++ code, this is something like how do I make out whether a file is html, xml
07:43
YAAAAWN
And even it gets 200+ upvotes. lolzzz
what qn?
Ya, that's why am amazed, it's sheep voting, nothing else
found it.
the question was actually closed before as NC, but it was reopened.
07:47
I've cv'ed it ;-)
good morning @ircmaxell :)
@Jack Actually sometimes I don't understand this website, check this question here, its not that old, no doubt answer freaking awesome, but question sucks, I mean, upload any jiggly image, and ask can we do it or not and if you are lucky to get 2-3 upvotes in a minute(If upvoter loved the image), then there you go, others will blindly upvote, sheep pattern is what I say
what's the good word?
Silly airport wifi, bits are for kids
@Mr.Alien if it was just asked, I would close as NaRQ ... but now I would think twice, it's kinda cool :)
And it has had 40k views.
@Jack jus cuz of upvotes the answer got ;)
but answer is a thrasher, right on the face.. super talent
07:51
@Mr.Alien the answer is awesome. :)
@ircmaxell Oh yes, yest I pinged you, though hakre told me, but do you have any idea how fb can say whether we've a minor error in our pswd?
@YogeshSuthar Yea
@Mr.Alien unless it's ripped from somewhere else, that answer comes from a very talented dev ;-)
Surprisingly it had 1 downvote =/
@Jack Jealousy :p and yes, she is in lead for css3
I need few upvotes in css3 to get in top 10
@Mr.Alien yes, they are storing it in either a reversible way (or in plain text), or using Homeomorphic Encryption or storing a soundex of the password separately (or a similar algorithm)
07:58
All are a bad indication
Anyway, going to go wander, later
@ircmaxell Plain text, I take that as joke from u :p
me is going to swim, later.
@hakre happpy swimmin
08:16
@hakre Oh how I wish to go out and do something fun :p
Working for another 7 hours:p
morning
Good morning!!
Good morning all
Hey Jimbo:)
08:36
@dragon112 9 hours here. :P
Also hi all.
mornings
@DaveRandom Hey, have you ever created a decorator with private visibility before?
I've created a standard decorator using __call(), but I'm only using the "proxied" methods inside my own class.
@Jack Ummm... can you elaborate on that? Classes don't have visibility in PHP :-P
Hold on, I'll dig it up.
@Mr.Alien no, it wasn't a joke
08:43
@ircmaxell Where are you? I hope not at home or you should be in bed young man
I'll tell on you...
:-P
I'm in Frankfurt at the airport waiting for my flight to Amsterdam
Hey @dragon112
Hey @DaveRandom, did you head to phpnw then?
@DaveRandom
lol
I will be at PHPNW this year
@ircmaxell wut? rfc?
08:45
:D
:9818416 #fail, no I didn't make it home until ~7.30 so was way too late really
@Jack you never know what secret voodoo I'm cooking up under my repositories
haha
what's next? sub classes?
or that others are working on
You can do that already
class A { class B { ... } ... } ?
08:47
@Jack OK, and in that context what do you mean? As it stands that's a little pointless as it doesn't actually add anything, and what are the two private statics about? I can't see then used anywhere...
what we call this type of functions or what we call this
`<?php
function sayHello()
{
echo "Hello";
}
$function_holder = "sayHello";
$function_holder();
?>`
@DaveRandom It wraps exceptions thrown from the rest client into another exception class.
@Jack That's still basically class visibility though
@Jack Ahh OK, is that all you need it for? Where does private come into it then?
08:49
@ircmaxell o_0"
class A, class B { __construct_A() { . . . } __construct_B() { . . . } }
:O
@DaveRandom Well, I don't want outside code to be able to directly hit the rest client.
lol
At this point you could do $c = new Client(new RestClient(...)); $c->doGet('whatever');. @DaveRandom
No biggie.
08:50
@Jack Ahh OK, well that should be fine then? I've done that exact same thing a few times, I don't know of a good reason why you shouldn't (doesn't mean there isn't one though)
@ircmaxell OK I give up. Wat?
It's A subscript a
@ircmaxell That's the jetlag talking :)
@DaveRandom I'm happy with the code so far ... I was just wondering about the possibilities of making it private :)
And it's possible of course ... with some magic reflection sauce =D
Actually .. I could just create a separate decorator class and assign that to my private var .. aduh~!
I think I'm missing something here, let me look at it again
Let me just dump the whole class in there.
So you don't want the thing that has the Client instance to be able to call doGet() or what? Or you don't want the thing that has the Client to be able to call the RestClient's public methods?
Essentially, what do you want to hide?
09:00
The former :)
Because that would otherwise allow code to "jump over" the Client instance ... not that I would ever do that myself, it's the theory of the matter ;-)
So what use are the methods if nothing can call them?
They're used internally, so the decorated methods are only called as a result of Client's public methods.
I could of course put try { } catch statements in every method and chain the exception there, but I figured it would be easier to do it this way.
So if I consider return $this->rest->getBase(); vs. $this->doPost( ... ) - couldn't that just be written as $this->rest->doPost(); ?
@DaveRandom Yes, it could be written that way except in the case of an exception.
@Jack Oh it just clicked
Hmm...
Well, there's no real reason to use __call() magic. You can just create a private method restProxy() (or whatever) with the same logic and call that instead
09:09
Yeah, that did come to mind ...
It's basically __call() semantics but with a different name and private visibility :)
You just need to adapt it to func_get_args(), that's the only difference
Yeah, the only downside is that I lose IDE auto-completion hehe
Wait, what .. I'm not using emacs? =O
How do you get it at the moment? o_O
It's not really possible to derive the methods of $rest being available in the class via static analysis is it?
Ahh, see that docblock above the class?
09:12
=D
Apparently that @method notation was specifically made for PHP __class magic soup :)
Right, well I would argue that auto-completion doesn't really matter. It's private to this class, once you've written this class you won't need it
The <CENTER> tag in #HTML5 has the same meaning as the <RAINBOWDASH> tag. None. And no, @Google using it doesn't make it right.
Indeed :)
In fact I would argue that it doesn't matter in general, I just use a text editor :-P
Ehm okay, I actually use it quite often hehe
Thanks for taking the time to look into my c0dez btw :) much obliged.
09:16
np, I feel sure there's a cleaner solution hanging there but I can't quite see it
Must get on with some real work now, I may revisit this in a bit
I could write a RestClientDecorator that basically does the exception wrapping and then call that via $this->rest->...
Probably the least magical of all.
And hey, I could even generalize that into a ObjectDecorator() that can be extended to apply your own custom pre- and post code :)
how do i use html5 auto play using flowplayer.i used like this player = $(".flowplayer").flowplayer({autoPlay : true});
player.load();But sometime showing html5:video file not found
Hmm, can html5 video do programmatic autoplay?
@Jack html5 has autoplay but i want do it programmtically
09:23
Is it normal that people downvote some random answer of me when I give them somewhere a -1?
@bwoebi Yes.
Or rather, it happens.
@bwoebi - Yeah I've had that a few times, one guy downvoted about 20 of my answers. o.O
@LightningDust That's usually caught by the mods though.
But imo that's why many downvoters don't leave a comment.
@Jack - Oh good, hopefully he'll get some time out then. :P
@LightningDust but for so many downvotes, there should be a reversal at 3:00?
09:25
@bwoebi - There may have been, I don't monitor my rep that avidly to be honest, unless it jumps by like 200 in a day.
I get a fair bit of trickle rep from old questions & answers.
I'd propose that the downvoter's answers are protected from downvoting for an hour or so :)
anyone familiar with qtp
?
@Jack but is it good to downvote without giving a hint why he got the -1?
anyone familiar with qtp ?
I need to insatll a "QTPWEB_00086" patch for qtp .Can anyone tell where i can find the patch file for download except hp website ?
@Jack: yeah,... Post this please on meta :o
09:27
@bwoebi Good, bad ... personally I don't think it matters enough to make it a big deal ;-)
anyone familiar with qtp here ?
@bwoebi maybe ... let me see.
@Jack no. But it's boring to see this.
@Jack I'd propose preventing downvotes without comments. :/
stackoverflow.com/questions/16935570/… ... And then I got a downvote on stackoverflow.com/questions/16714107/malicious-php-file-content/… an answer where nothing is principally wrong
09:30
@bwoebi Sometimes its community which is downvoting all wrong answer.
I really dislike when I get a downvote without a reason. If you're going to indicate that I'm wrong, at least tell me why.
@LightningDust That's been asked before, and they will never do that.
@LightningDust Exact.
Usually I will just comment on it without downvoting ...
@YogeshSuthar yeah, but then it also has to be wrong.
09:31
But then, if it does get downvoted, they would think it's me anyway. There's just no winning ;-)
Technically downvoting is not (only) for wrong answers.
It's for answers that are not useful.
@Jack I specifically write '-1' if I downvote.
@LightningDust Not all people will realize that convention.
Something of the form
@bwoebi Frankly saying whenever Your Common Sense gives answer, he is downvoting other answer.
-1: You haven't shown any evidence of research.
Yeah, Your Common Sense has obviously downvoted me several times.
For no good reason.
09:34
Yeah. That's why I also downvoted him: not useful
Yeah, that's why I like to call him "Your Common Nonsense" ;-)
He said he downvoted me for a spelling mistake once (no, not in the code).
Anyone used smarty here before? :-)
@Duikboot - Long time ago.
unfortunately
09:34
@Duikboot Hey, we told you not to use that stuff anymore :)
Yeah but I have to finish first a project where I used it. So after that I'll not use it anymore @Jack
There should be certain people prohibited from downvoting moderatively.
Smarty is good for code which you plan to distribute.
Like your common nonsense.
I agree with that, few others too.
09:35
@bwoebi Like it or not, that's his prerogative :)
Im trying to receive the data from 3 checkboxes in my post variable.
We have to flag him to moderator for review :P
But for some reason my data got displayed on a strange way :
@Jack yeah. But not the abuse of it.
@bwoebi Well, then complain on meta ... doubt you'll get far, but maybe.
09:37
I receive it this way: pastebin.com/9BZyvRwv
Why does smarty put brackets in the name values? :/
This is the problem. I also doubt it...
If someone checks the box I want to receive a '1' else I want a '0'
But im a bit suck in how implement it that way.
I don't use smarty, but I like the DoT js template engine. Yeah, you have to do an ajax call, but it is faster after the first visit as the browser caches the tpl. So the dynamic data will be the only thing to load. Static data often consume lots of traffic...
@bwoebi Is that like jQuery templates?
Some people told me to start using : twig.sensiolabs.org
09:41
Heh, I'm still using PHPTAL :)
Whatever jquery templates are...?
@bwoebi Hmm okay, never mind then ;-) archive.plugins.jquery.com/project/jquerytemplate
Hmm?
Though ... that doesn't look right at all.
Guess I haven't used that stuff for a long time heh
The project has been suspended from what I can tell.
09:54
@Jack I haven't worked on templates. Can you tell me is it necessary to use templates for showing content?
wb
@YogeshSuthar -1. NC :)
@Jack For answer?
Your question on templates ... of course it's not necessary to use templates :)

« first day (963 days earlier)      last day (4210 days later) »