« first day (748 days earlier)      last day (4216 days later) » 

6:00 PM
if($loggedIn) { //your code here } else {};
very basics of it, but that's the idea
 
@relentless Alright. Thank you
 
@PeeHaa very gud evening ....:-)
 
hiya @NullPointer
 
Our sales department is incredible. They can sell things that haven't even been invented yet!
 
@SomeKittens lol......
 
6:07 PM
hm, maybe someone in here can help me. I'm trying to update phpunit via pyrus, but pyrus does not have the equivalent of update-channels, and it's refusing to install 3.7, even with pyrus upgrade phpunit/phpunit
 
@SomeKittens It's not only in your organization. It's a global sales thing
 
@PeeHaa You mean we aren't the market leaders in segment X? Awww, but our Marketing lead said so!
 
:P
Yes I just closed a question! Satisfaction!!!!!
@igorw What is pyrus?
 
@PeeHaa was that a serious question or trolling?
 
@igorw Honest question
 
6:16 PM
it's the new version of the pear package manager: pear2.php.net
 
@igorw Ah. k. Sorry can't help you. Luckily i can stear away from pear packages most of the time
* I and * steer :)
 
@PeeHaa * Edit your message :)
 
@PeeHaa. @igorw .. do you have any insights to share about naming conventions of Traits ?
 
@Christian And multiping people for my own stupidity? No way.
;)
:P
 
@PeeHaa never underestimate the power of stupidity in large crowds
 
6:20 PM
@PeeHaa Wow. I'm so annoyed by the double ping, I'm insulted. Gonna post on twitter how bad SO PHP chat has been to me lately. :D
 
(there was something about that in "Mostly Harmless" , IIRC)
 
@PeeHaa Super Mega Uber Multi Ping
 
@tereško Sorry I wouldn't be much of a help about naming concentions for Traits specifically. :(
 
:-P
 
ok .. well here come the problem description
 
6:21 PM
You know you are on my ignore list right? ;) @DaveRandom
@Christian I might come to Malta next summer so you can tell me in person :D
 
Friday = Annoy People Day
 
@tereško I have only created a trait once, and I suffixed the trait-name with "Trait". "EventEmitterTrait", right next to "EventEmitter" and "EventEmitterInterface".
 
@PeeHaa If you do, feel free to call me. I don't mind showing you around. (I'm serious about this).
 
no more closevotes already :-(
 
I have two classes from two different (directly unrelated) namespaces. Both classes deal with completely unrelated problems. But they both have a shared method. I would like to place that method in a trait. My problem is how should i call the namespace in which the trait is located.
Said trait needs a namespace for autoloading purposes
so ... ideas , suggestions ?
 
6:24 PM
@tereško but honestly I kind of dislike the "Interface" suffixing practice. Reminds me of "Impl" suffix - ugh. But in those cases where there is a standard implementation in the same namespace it is an ok compromise imho.
 
Basically i have App\Foo\LoremKlass and App\Bar\IpsumKlass
 
hi guys!
Anybody knows how to set preg_match() not to give me trash with results?
I am using it to uri routing.
preg_match($pattern, $uri, $matches)

And the matches array contains indexes like : 0, 1 ,3 beside with the requested values
 
is there any reason not to use composition in this case?
 
Guys is it possible to just color just one parameter(hour, minute etc.) in php date format?
aka apply style to it
 
@JamaicaBob yes it is. What is your current code?
 
6:26 PM
@igorw because it is a single simple method , and it is optionally a part of autoloader . Having it injectable would cause widespread changes in code, when using autoloader which does not need this method.
 
@Jocelyn date('G:i',strtotime($row["sTime"])
 
@appl3r Uhm....arrays have to have indices...
 
Exmpl.:
pattern: #^/name/(?P[A-z0-9]+)/(?P[A-z0-9]+)$#
uri: /name/asdasd/asdasds
array(5) {
[0]=>
string(20) "/name/asdasd/asdasds"
["name"]=>
string(6) "asdasd"
[1]=>
string(6) "asdasd"
["action"]=>
string(7) "asdasds"
[2]=>
string(7) "asdasds"
}
 
@Christian I'm crashing at a friend's place so I think I'll be fine. Tnx for the offer though. But when I get thrown out I'm sure to give you a @ping ;)
 
@tereško who autoloads the autoloder? ;-)
 
6:27 PM
@JamaicaBob echo '<strong>' . date('G',strtotime($row["sTime"]) . '</strong>' . date('i',strtotime($row["sTime"]);
 
@PeeHaa Heh :) Don't forget that to get to the main land takes an hour or so travelling. ;)
Yeah, I always said crossing Europe is faster than the stretch of sea between Gozo and Malta.
 
@Jocelyn Oh, you just separate them. Great :D Thank you :))
 
@igorw The bootloader, obviously!
 
@igorw if i use trait, the only change for case, when i need to manually load the trait would be inclusion of it in the bootstrap , but that was just my particular usecase
 
@JamaicaBob replace <strong> with whatever HTML/CSS code you want
 
6:28 PM
@Christian :)
 
@Jocelyn I understand, thank you. :))
 
the general question was : *What to al the namespace , which contains Trait, that is used by two unrelated classes from unrelated namespaces?"
 
@tereško That supposed to be a question? Come on, you can do better than that... :)
 
there might be more then one usecase , which is why i an looking for generalized suggestions
this was just a recap
 
@tereško That's exactly the (/ one of the) bad thing about traits --> Util class reborn
 
6:31 PM
@Christian Assoc? I don't need the original string or the results twice. Once with name and again with an numerical index.
 
What does the Trait do? @tereško
 
leads array from JSON
 
@appl3r A proper match will have at least matches+1 entries, the first entry being the whole matching string (which is a match in itself).
 
    protected function fetchConfig( $filepath )
    {
        if ( !file_exists( $filepath ) )
        {
            throw new \Exception( "File '$filepath' not found!" );
        }

        $json = file_get_contents( $filepath );
        $data = json_decode( $json, TRUE );

        if ( $data === NULL )
        {
            throw new \Exception( "Not valid JSON from '$filepath' file!" );
        }

        return $data;
    }
@PeeHaa , this is what it would contain
and I know that traits a glorified compiler-assisted copy-paste, but in this case it is exactly whats called for here
 
@tereško I know you know
 
6:34 PM
@Christian Okay, so im not going to get rid of them. :D
 
classes which use it (currently) are Fracture\Autoloader\JsonNamespaceMap and Fracture\Routing\Router
 
\Config\Parser\ ?
 
maybe i should just create a simple function .. but then i would have to load it manually
hmm ... Parser might do , now i just need to come up with adjective for naming the trait itself
 
@tereško BTW. How are you going to swap it for a XML / whatever config loader?
 
currently , i don't
hmm ..
 
6:38 PM
Exactly :(
 
well ... actually you can do it , by swapping the map class
 
Would work for JsonNamespaceMap, but Router doesn't sound so swappable
 
yeah
 
@DaveRandom Did I hurt your feelings? You're so quite :)
 
posted on November 02, 2012 by Ilia Alshanetsky

My slides from PHP True North talk on Memcached extension are now available online and can be downloaded at: http://ilia.ws/files/tnphp_memcached.pdf

 
6:41 PM
@Feeds Slides in pdf? What is this? 1999
 
do you also have the constructive suggestion , that goes with your constructive criticism
or it's the "your problem, deal with it"
 
@tereško About the pdf thing or about the traits thing?
 
i might need to grab a beer
 
Always works for me
 
5 mins ago, by PeeHaa
@tereško BTW. How are you going to swap it for a XML / whatever config loader?
about this , in regards to router
not that there was any alternative option planned for router .. i guess i should have
assuming that you have see the router's API floating around in the channel, where should i start picking at it ?
 
6:45 PM
@tereško you should check for $json !== 'null' ;-)
 
that is not valid JSON
 
sure is
 
@tereško Well as I see it the question is: do you want it to be swapable? (my personal preference would be hell yes). If answer is "Yes": drop that traits solution and go the composition route. If the answer is "No" eeeew. Again my personal preference and why I think traits are really not the solution to your problem
 
@tereško ah sorry, you're right. I was looking at json.org.
 
6:48 PM
@tereško I have seen it, but I haven't had a look at it.
Will read back soon (after I have build some feed and moar beer)
 
the relevant part is this:
$router = new Router( new RouteBuilder );
$router->import( __DIR__ . '/config/routes.json' );
 
@tereško also: php -r 'var_dump(json_decode("null")); var_dump(json_last_error());'
 
it still returns NULL
which is default value for invalid JSON, and in my case , it ok
all use-cases expect an array
 
@tereško fair enough ;-) just wanted to point out that it is possible to represent "null" in JSON.
 
hmm .. naah .. had a bit of thinking , i see no point in providing other routing options
the router itself is a simple class , you can replace it with your custom implementation of Router, and inject same RouteBuilder
the older version of that class is 70 lines (that's including all the spacing and variables , and the above mentioned fetchJson() method)
 
7:07 PM
@tereško In that case just name the trait JsonToArray in some Parser namespace
 
that would actually fit
tnx, @PeeHaa
 
7:23 PM
@tereško Yw
c'mon cv-ring (a.k.a. circle jerks) do your thing.
 
no votes .. well .. at least i still have few down-votes i can cast
 
user1125394
7:40 PM
I don't rememver is there an apache module to enable for gettext, I think no?
 
user1125394
it's native
 
^ In case anyone's interested to give it a quick look.
 
Nice handle: uuf6429 :P
 
@PeeHaa Used to be a Google password.
 
7:46 PM
:-)
 
Dunno why I started using it as a username.
 
How often does Facebook/LinkedIn/Twitter change their auth methods? I.e., if I developed a autoposting thing, how much would I support it?
 
@Christian That's a very insecure password.
 
@SomeKittens As in OAuth?
 
@ShaquinTrifonoff It wasn't ~5 years ago.
 
7:47 PM
True.
 
Good evenink
 
@SomeKittens In facebook, if you request "offline access" scope (permission), it should be indefinitely. But it does change hashes every now and then.
 
@PeeHaa I guess? I've only worked with Twitter (and that wasn't too bad).
 
@Christian that jumping in and out of "php mode" doesn't really help make it readable
 
@Christian Interesting. You might want to append a random value to __NICE_R_INFINITE_RECURSION_PROTECT__ to prevent unexpected behaviour when an array contains __NICE_R_INFINITE_RECURSION_PROTECT__, though.
 
7:49 PM
@SomeKittens Not that often. Twitter is still using oath1. And others are mostly using (and pushing) oauth2. So you should be ok for a couple of years
 
@ShaquinTrifonoff I don't think the printer should be printing itself. :D
 
@PeeHaa Great, thanks!
 
np :-)
 
@PeeHaa I didn't understand that. What were you talking about?
 
oauth2 suuuuucks
It has turned into an ugly behemoth of an auth system that needs killing with fire
 
$nice_r = array(
    '__NICE_R_INFINITE_RECURSION_PROTECT__' => 'recursion',
    'replaces' => 'print_r'
);
nice_r($nice_r);
 
@PeeHaa if there was hell, people who write that sort of code would have a special place in it
 
@DaveRandom I do agree, but as long as everybody uses it and everybody does implement it somewhat the same it's fine with me. I just filed it under "puke like other stuff when I want to access a service" and called it the day :)
 
@tereško I'm honoured :D
@ShaquinTrifonoff Fair point...though whoever does that, deserves it. ;)
 
Hi
 
7:55 PM
@PeeHaa I know, I always worry when I make comments like that (which I do believe whole-heartedly) someone is going to say "show me the alternative then" - and that I cannot do. I do think that OAuth 3 should back to v1 as a base and start over though, v2 needs to be the end of that particular rotten, overloaded branch.
 
@tereško On most occasions I would like to get an invitation in hell, because that is where all the fun would be, but in this case I'll pass
@jefffan24 Hello
 
user1125394
If I want to add a file on the commit in HEAD^ , I'd do git revert HEAD^ git add the_file git commit --amend , and how can I be sure I don"t lose the top commit and put it back on top?
 
@PeeHaa nice headings ... i loved the "Eran is an asshole" one
 
7:59 PM
:P
@Christian let's just say: I kinda like the ouput, but I'm not that fond of the code :)
 
Heh
 
@cyril no, revert is not what you're looking for. I would do a commit and then an interactive rebase, squashing the new commit into the previous one using "fixup"
 
> In fact, one of the compromises was to rename it from a protocol to a framework, and another to add a disclaimer that warns that the specification is unlike [sic] to produce interoperable implementations.
 
@PeeHaa I'm particularly dissatisfied with the extra functions. Regarding the HTML/PHP mix...it looks better in an IDE than echos - though if you guys have an alternative to share, I'm hear to listen. :)
 
That about sums it up I think
 
user1125394
@igorw ow, is that so complicated to just return to the state before with unstaged files and nicely edit the top commit :(
 
@cyril I highly suggest learning how to use git rebase -i. it's not so hard and extremely powerful for specifically cases like this
if you're too scared of it, you can do a git log, copy the current commit ID
then do a git reset --hard HEAD~1
then do your changes, git commit -a --amend
 
user1125394
ok I'v made another branch as backup, readin git rebase --help thx
 
and finally
git cherry-pick <pasted commit id>
 
@PeeHaa Also, if you like fixing the source yourself, I won't be saying no. Plus, you'd be the first pull request I've accepted in history! :D
 
user1125394
8:06 PM
git rebase -i HEAD^ is ok or it wants the hash?
 
that should be fine, but you'll probably want more than one previous commit of context
 
@Christian What is the minimal php version you are targeting?
 
so I'd go for git rebase -i HEAD~3
 
@PeeHaa 5.1...didn't test though (got 5.2 here)
 
user1125394
HEAD~2 != HEAD^ ? ~2 should do it
 
8:08 PM
no, HEAD~2 is the same as HEAD^^
 
user1125394
it's already far enough
 
user1125394
A--B--C <HEAD want to edit B
 
yeah, adding more commits to the rebase usually doesn't do any harm. when you don't have enough, you need to re-start it. that's why I put 3.
 
user1125394
ok let's go, I smell the disaster
 
@Christian I might fork it at some point and do some changes on it. But it might become an overhaul. Feel free to reject if you want. :-) But it will have to wait until I have finished some other projects. Lately I only get moar work today and I finish less :(
 
8:11 PM
@cyril did you make a commit for the changes in HEAD?
 
@PeeHaa No problem. The way it is right now currently works, so no hurry.
 
user1125394
yes
 
user1125394
I'll put edit to the before-last then
 
user1125394
hmm need to add the files first :~
 
@cyril that's why I asked if you made a commit.
 
user1125394
8:14 PM
@igorw my working tree is (was) clean, I want to add 2 untracked files
 
@cyril once you have them added, you can go into interactive rebase, move the newest commit D up by one, so that it is in between B and C, and mark it as "fixup"
 
user1125394
ok all went perfect, git's a beauty
 
user1125394
thx @igorw
 
@cyril She is ;)
 
8:18 PM
@cyril you're welcome. wasn't that hard after all, eh? :)
 
I just got some junk mail: Supposedly a Bing Webmaster Tool survey (from "Bing Webmaster Tool Team" <v-beliga@microsoft.com>). The IP is from Israel (definitely not Microsoft) :P
 
@AngeloMoreira I know who I need to ask for that, yes.
I don't have any more CVs. But still can delete.
 
Don't you guys have a job to attend to during the day? All those "outta cv's talks" :(
 
user1125394
when you want to include a html header file (<script> ...) in your view , you'd use require|include (_once)?
 
@PeeHaa you missed the raid last night : stackoverflow.com/users/583916/…
 
Yeah, PeeHaa missed that session ;)
 
What happened?
Should I review the posts too?
 
Holy crap lol
 
People then complain that we lynch them in chat :(
 
8:51 PM
@PeeHaa suit yourself. There are masses of bad questions. If you meet that guy online with a new question, please tell him he learns by answering other peoples questions, not asking own questions.
 
@MadaraUchiha Tim was around ... he did no mind
 
Tim is (thank god) not your average mod
 
@MadaraUchiha You have not reviewed the questions. Also I wrote him a comment but he decided to not answer to it but just deleted the whole question right ahead.
@MadaraUchiha I would so wish seeing that guy complain on meta ;)
 
8:53 PM
-31
Q: What to do if high reputation users are downvoting/closing your question without actual reasons?

Radiohttp://stackoverflow.com/questions/13100847/transparent-pixel-renders-different-on-pc-and-iphone#comment17806276_13100847 In this clearly stated question I got an absolutely non-sense answer from a high reputation user who offers me a solution that is not related to the question being asked. ...

Like this one? :)
 
@MadaraUchiha No I mean that user himself.
 
@hakre I know what you meant, you're waiting for a post like this from him, right?
 
@MadaraUchiha Well after he incarnated a puppet which did upvoted his questions, sure ;)
 
9:01 PM
.. and this has exceeded my up/down vote limit
basically , i have no votes left .. what so ever
 
Yay! Shiny badge!
;)
 
i think i have already all voting badges
 
Hello, are there any Yii developer ?
 
@Eray Sure there are.
Who has made it otherwise?
 
9:15 PM
Hi @PeeHaa , i have problem with CButtonColumn
I'm using parameters like documentation but this isn't changing DELETE button's URL paste.ubuntu.com/1327535
 
Yii has mostly one developer .. but there might be some users around
 
This isn't working too : paste.ubuntu.com/1327540
 
I'm not a Yii developer, but I'm sure there are some somewhere ;)
@tereško Is it mostly a one man job?
 
afaik , yes , it is .. or at least, it originally was
 
ahahaha you misunderstood me :D
ok i'll ask again, are there any one who has experience with Yii framework.
:))
sorry for English
 
9:18 PM
@Eray np. Just playing with you ^^. But sorry can't help you with that
 
So, i'll ask a question on stackoverflow.com
thank you ;)
 
:D
 
@Eray is the template actually rendered ?
 
yes?
 
meaning , is the problem only with the URL setting or is the whole CButtonColumn widget failing ?
 
9:25 PM
@PeeHaa Erasure? Not really my cup of tea...
^^ that's my cup of tea
 
lol
 
@Eray , can you change "deleteButtonLabel" ?
and what do you see when you inspect the tag
 
Sorry teresko, i'll try it now
just a minute
"deleteButtonLabel"=>"TEST" this is working
now anchor's title attr is TEST
and
<a href="/sitelerimacikmi/index.php?r=pano/delete&amp;id=1" title="TEST" class="delete"><img alt="TEST" src="/sitelerimacikmi/assets/8b5e1623/gridview/delete.png"></a>
 
wasn't that what you wanted ? @Eray
it looks like like what you would have intended
 
I want to change url of link. I mean href attr of <a>
 
user1125394
9:34 PM
@tereško what's the point to do that: $router = new Router( new RouteBuilder ); (from your code earlier)
 
@Eray <a href="/sitelerimacikmi/index.php?r=pano/delete&amp;id=1" .. href of <a>
 
user1125394
you could just do new Router;
 
@cyril the goal is decoupling
 
user1125394
I mean your new RouteBuilder has no references
 
@tereško , i want to change url. My delete action's url is domain.com/?r=pano/deleteSite not pano/delete . pano/delete is default. I want to change this.
stackoverflow.com/questions/13203284/… this is my detailed question
 
9:36 PM
oh ..
 
user1125394
@tereško oh sorry you mean you could do a new Router (new FooBar) ;
 
@cyril , this is for me?
 
@Eray you would have to make a digging expedition
 
"digging expedition" ? :)
 
edit your code add var_dump( $label . '--' .$url ); before and after that line
 
9:39 PM
before / after which line? worry
 
digging expeditions is the default style of developement in Yii
 
sorry*
 
@Eray the one that got highlighted
$url=isset($button['url']) ? $this->evaluateExpression($button['url'],array('data'=>$data,'row'=>$row)) : '#';
at the bottom of the file
 
of you mean core files. ok. just a second please
 
i think the CComponent::evaluateExpression() might be getting bad data from somewhere
 
9:41 PM
Undefined variable: url
 
@cyril , no i couldn't , because RouteBuilder has a very specific roule
 
$button["url"]
 
@Eray , did you edit the CButtonColumn source ?
 
yeap. Just it should be $button["url"] instead of $url
string(82) "Update--Yii::app()->controller->createUrl("update",array("id"=>$data->primaryKey))" string(82) "Update--Yii::app()->controller->createUrl("update",array("id"=>$data->primaryKey))" Update string(80) "TEST--Yii::app()->controller->createUrl("delete",array("id"=>$data->primaryKey))" string(80) "TEST--Yii::app()->controller->createUrl("delete",array("id"=>$data->primaryKey))"
string(82) "Update--Yii::app()->controller->createUrl("update",array("id"=>$data->primaryKey))" string(82) "Update--Yii::app()->controller->createUrl("update",array("id"=>$data->primaryKey))" Update string(80) "TEST--Yii::app()->controller->createUrl("delete",array("id"=>$data->primaryKey))" string(80) "TEST--Yii::app()->controller->createUrl("delete",array("id"=>$data->primaryKey))"
 
remove the change , and go to the definition of protected function initDefaultButtons()
make a vardump of $this->deleteButtonUrl
@Eray wait .... WHAT ?!??!777
can you make a pastebin of what you originally changed ?
 
9:46 PM
ok
just a min
 
i don't make vardump for $this->deleteBUttoUrl yet
@tereško ?
 
i am kinda thinking
 
oh ok :)
 
trying to figure out what could have generated the "Yii::app()->controller->createUrl("delete",array("id"=>$data->primaryKey))"
 
9:52 PM
why we are looking for core files? is it a possible bug ?
 
(and yes, it is a string, which in CComponent::evaluateExpression() is pushed though eval()
what you set in the config was ok , what comes out is the default ... somewhere in between there was a problem
see what you get from $this->deleteButtoUrl at the top of initDefaultButtons() method
 
ok
 
it might be a but or it might be an undocumented behavior
 
string(74) "Yii::app()->controller->createUrl("delete",array("id"=>$data->primaryKey))"
(at top of initDefaultBUtton())
 
so , it already comes with "delete" set
 
9:55 PM
yes but i'm overwriting it
 
ok .. reverse all the changes
 
ok
 
in initColumns() before $column=Yii::createComponent($column, $this); do a var_dump( $column )
 
it's a little ugly
 

« first day (748 days earlier)      last day (4216 days later) »