« first day (929 days earlier)      last day (4019 days later) » 

9:04 AM
2 messages moved to bin
monring
 
@PeeHaa埽 morning !
@hakre After to edits to the question, I still have no idea what he wants to do ...
 
@HamZaDzCyberDeV Implementing a 404 action? But even though, it's not clear how because his system is mysterious :)
 
@hakre yep
 
The design question: let's assume you have some class like LastTweetsCommand, with such interface:
1. constructor accepts twitter username

$cmd = new LastTweetsCommand('zerkms');
2. and every command has the only required method execute()

$tweets = $cmd->execute();
But, this command has a dependency of a TwitterClient, that performs a query to a twitter API and holds all credentials
how would you satisfy such dependency?
You cannot change constructor or execute() definitions. Plus it's desirable for the command user to don't know such a details like dependencies injections
thoughts?
 
9:20 AM
Let's invoke @tereško
 
@zerkms You give them a $lastTweetsCommandFactory instance, which has a create() method which accepts the username arg, and has an internal TwitterClient instance. So the consumer does $cmd = $lastTweetsCommandFactory->create('zerkms');, but the factory internally does return new LastTweetsCommand('zerkms', $this->twitterClient);
 
@DaveRandom: yep, that was one of thoughts, but creating a factory for every command is boring and not cool
(there will be a lot of commands here)
 
Well realistically you either do that or you have tight coupling between your LastTweetsCommand and your TwitterClient. I can't see any other option.
That may not necessarily be wrong though, there will only ever be one twitter, presumably there will only ever be one twitter client...
 
Well, it's possible for every command to ask some DI container to satisfy their dependencies, but retrieve it (DI container) from the registry :-)
@DaveRandom it actually will be wrong, since in the command you don't have sufficient knowledge about how to create a client instance
 
true
 
9:28 AM
one of modifications of your idea was to create a single commands factory
but it would return ICommand, which isn't nice as well
 
Yeh I toyed with that idea for a fleeting second but it's not really a true factory in that case, it will end up containing logic that needs to be tested
 
I'm back!
 
Well, another question then
give some advice about music for programming? Too tired of what I usually listen last.fm/user/zerkms
Lol, how could m. jackson get there :-S
 
9:43 AM
@crypticツ wat?
 
$cmd = $commandFactory->build(new LastTweetsGetCommand('zerkms'));
 
@hakre: and how build() is implemented?
 
btw, morning
Thank you, facebook, for not communicating API changes in FQL
 
these days they give plenty of time before they apply changes that may break something
you still have to monitor them though )
 
@zerkms It creates the build command object based on the command objects type based on it's configuration. It then executes the build of the command (or defers it into a lazy-build command that will build it when the actual command is executed).
 
9:58 AM
@hakre: how it's configured?
where/how do we define dependencies
 
Can you formulate an answer and stop spamming? Clearly you never done routing so you can't answer my question... it's a common problem in routing and you should know what i'm referring to just from the title. — Daniel Shlomo 2 mins ago
@hakre loooool
 
@zerkms In your software. You wrote that your commands have certain dependencies. Those depenencies I guess must come from somewhere.
 
@hakre from where "somewhere"?
if they are not tied to command classes themselves - then it's very error-prone
 
@zerkms they didn't on this one =_= looks like it was listed but shouldn't have
so I coded against wrong api =______________=
 
@Ocramius but anyway - it's a bad idea to show a stacktrace for the users
 
@zerkms They are tied. By the type itself even. For each type of a command you have one factory as well. As you wrote, you don't want to change the constructor so you need to move the details of constructing away. One common way is to move that into the factory.
 
@hakre it increases number of classes twice... And that's what I'd like to avoid :-)
 
Hello
 
@zerkms okay, if you want to keep classes low, you can also just take strings and a dependency injection container.
But that is less distinct, because of using strings - not types.
 
@FawadGhafoor Hello @
 
10:08 AM
can you please have a look to this question if you get min free
0
Q: How would I convert Zend JOINS to SubQuery?

Fawad GhafoorHow would i convert below query to sub query? I don't want to use JOINS I want to do same through sub query protected $_name = 'sale_package_features'; public function getAllSalePackageFeatures(){ $sql = $this->select()->setIntegrityCheck(false) ->from(array('spf' => $this->_name...

its a simple question
i just dont know zend syntax for this
 
@hakre @HamZaDzCyberDeV you guys should really learn routing and understand it. That Daniel guy clearly does because he asked that 'question' so someone can write code for him...
 
@FawadGhafoor same here
 
@HamZaDzCyberDeV Hey
 
@FawadGhafoor Zend is a company.
 
@kaᵠ I've no idea what routing is, seems like OOP to me ...
Plus I know how to use regex, he should just have mentioned what to match, I told him twice ...
Why does he presume that everyone knows routing ?
 
10:11 AM
@HamZaDzCyberDeV I was being ironic, he's a douche
 
Plus is this a valid PHP syntax ?
 
@kaᵠ Yeah, as well, what he asks about is extremely common - which explains it can not have a common answer as well.
 
route('test/(:n)',function($id){
    echo $id;
});
I've seen it in jQuery but not in PHP ...
 
@webarto Sir what u mean ? Zend is a company
 
@FawadGhafoor You are talking about (Zend) Framework which is abbreviated as ZF and not Zend (which is a name of the company).
 
10:12 AM
@zerkms I enabled it while I'm working
 
@webarto ok sir i know
@webarto myMistake
 
Just saying :)
 
thanx BTW
Can you please look to this if u get a lil time
0
Q: How would I convert Zend JOINS to SubQuery?

Fawad GhafoorHow would i convert below query to sub query? I don't want to use JOINS I want to do same through sub query protected $_name = 'sale_package_features'; public function getAllSalePackageFeatures(){ $sql = $this->select()->setIntegrityCheck(false) ->from(array('spf' => $this->_name...

 
@hakre @kaᵠ So does it deserve a CV ?
 
10:16 AM
@HamZaDzCyberDeV Just flag the user as offensive if you think so I would say.
This should be exceptional so it requires moderator attention.
 
lolz, I think so too :p
 
@hakre flag the user? as in flag the comment? and use the other field?
 
First downvote in about 2months :o
 
The first you received or you voted?
 
10:22 AM
voted
last one was on mar 6
 
@kaᵠ as superfluous as stones in bread.
 
Anonymous
10:42 AM
hi hamza
 
@PHPfan Hello !
 
Anonymous
Sup
 
good, with you
?
 
Anonymous
Yeah.. I just officially started teaching me some javascript ;)
 
10:45 AM
Oh nice, javascript is the shit :)
right after php ofcourse
 
Anonymous
yep. I can finally fulfill my dream of creating a chat website without any help
 
Anonymous
and then rest in peace
 
I'm actually checking this xD
http://tryruby.org
 
Heretic!
 
Wow... how dare you even mention ruby in a sentence without a lot of nasty words?
 
10:47 AM
hahahahahha
 
Anonymous
When I hear people talkin abt ruby, I keep assuming it that is an old language no on cares to learn anymore
 
That's fairly accurate if you ask me:)
 
Anonymous
I get the same impression about asp, vb, perl and cgi
 
Well, I'm a bit interested in hacking and there is a framework called metasploit build with Ruby
 
Anonymous
hmm hacking em?.. well remind me not to show my chat site, when i finish building it @HamZaDzCyberDeV
 
10:50 AM
wow again no nasty words.. you must really like it :p
 
Anonymous
:)
 
lolz, guys I checked the hello world part that's not something to be proud about ...
 
I'm telling you HamZa run while you still can..
Had Ruby (****) in school for a bit :p
 
@dragon112 what should I learn then ?
C++ ? Python ? Perl ?
@PHPfan just make sure to use PDO/mysqli xD
 
c
 
Anonymous
10:55 AM
Have been using PDO ever since, some nice people + teresko mentioned it to me in this room
 
I'd say for mobile start with android/objective-c for desktop go C#
And C++ is pretty cool too
 
lolz, I think tereško is actually a part of those nice people ^^
 
From @PHPfan 's profile: Interests:
likes: God, PHP, PS3 & Christopher Walken
dislikes: Javascript, and tereško
 
Yeah read that ...
 
I think that explains that comment:p
 
10:58 AM
I'll be back laterz
 
Bye:)
 
Anonymous
later
 
11:09 AM
Yes you can use PHP to output a CSS value that you inject with some jQuery via javascript to change the background color. - on document ready
 
cool!
 
@HamZaDzCyberDeV as much as I dislike ruby. that site is nice
 
@Gordon how do I determine when 'best' passwords need rehashing?
 
@iroegbu $password % 42 ? rehash() : keep()
 
42? What hash is that?
 
11:29 AM
@hakre that's like making brain surgery through ass with a paperclip
3
s/making/doing
 
Still awesome enough to be quoted
 
You wanted me, here I am!
2
 
@ircmaxell ROFL :D
 
Wow... that's just awesome
 
11:34 AM
LOL
 
I thought you'd like that
 
My day has just been made
 
I'm back
 
posted on May 02, 2013 by TechPortal

Automated testing is big news these days. There's hardly a PHP conference happening without a talk on testing automation or derivative methodologies. TDD (Test-Driven Development) and BDD (Behaviour Driven Development) are all around us. So why should you care about all this? Well, there are many excellent reasons to do automated testing, including assuring application quality and inspiring dev

 
Welcome back
 
11:43 AM
@ircmaxell will it be advisable to use PASSWORD_DEFAULT over PASSWORD_BCRYPT?
 
depends on what you're doing
personally, I suggest it
but others may not
 
ok... I'm doing authentication
I think I'll use the first
 
just be sure to do the DB as varchar(255)
 
@dragon112 did you follow a HBO study ?
 
@ircmaxell yes, thanks
 
11:52 AM
@HamZaDzCyberDeV I have, yes. I'm finished now
 
@dragon112 Do you know if there is a security researcher study ?
 
I can now put Ing. in front or BICT behind my name :p
Uhhh I think that's mainly on Universiteit level. There were some minors in that area at my school..
 
hmmm ok thanks
 
I know there is a asp.net/mssql security master at the HAN in Arnhem
Or with the HAN.
 
@dragon112 Ah I mean more like "ethical hacker"
And if you did knew something useful in PHP, the title i provided was sufficient enough in order to understand the problem. — Daniel Shlomo 56 mins ago
Sigh ...
 
12:02 PM
hi
 
@shankar.parsanamoni hello
 
@ircmaxell would "How to read OP Codes" be a suitable topic for your target audience?
 
I found my problem. I needed to save it as a .php and not html — user2342875 16 mins ago
This problems I like when a totally other thing is asked...
 
@bwoebi hahahahaha
 
@HamZaDzCyberDeV I laughed too ;-)
 
@kaᵠ hhahahah
 
anyone made desktop UI apps in php? got a sample?
 
Currently working on one.
But its only local currently.
 
@tgkprog php-gtk is pretty much dead. and in fact, it never was much alive either. I wrote a file explorer with PHP-GTK. The performance sucked. If you want to do scripted desktop apps, use Python, not PHP.
 
But what doe you exactly understand under UI apps in php?
 
12:15 PM
never really tried to make one. i have an app in vb6 - developeed years earlier. but do not ahve vb6 studio any more. was thinking about moving it to java or if i can something faster (java swing starts up real slow)
an app that makes its own window and process in my desktop
 
Like an offline cacoo then?
 
@HamZaDzCyberDeV how arwe you
 
@shankar.parsanamoni fine and you ?
 
@Gordon Sure
in fact, I'm giving a talk like that in DPC
 
@ircmaxell I won't be there :(
 
12:26 PM
then come!
 
not sure what cacoo is
"scripted desktop apps, use Python" okay i wil google this unless you have the turorial i can go to ?
 
@ircmaxell 3 days Citizen M plus Train Ticket plus Conf Ticket plus Socializing costs = ~ 1200 Euro. #nocando
 
get work to pay ;-)
 
@tgkprog googling is great. you should use every opportunity to become better in it.
 
googling is fun. reading the results is not
 
12:30 PM
@ircmaxell It's a little bit expensive, the tutorial day is ~430 euro (incl. VAT) :(
 
@HamZaDzCyberDeV I doubt that's a subject at any school. There's a lot of shit around hacking in general with all those DDoS attacks and other hacks.
 
@HamZaDzCyberDeV yeah, I know
 
That's more than my month salary xD
 
@HamZaDzCyberDeV for a commercial conf it's quite cheap. Any Java Conf will easily cost double
 
@dragon112 ah ok ... I have to orient myself for the next year
 
12:32 PM
@Gordon it's not even commercial
 
hmmm I see
 
Tkinter standard GUI toolkit included with Python maybe i will start with that.
 
holy cr@p
 
hi all
 
/me is off to work
later all
 
12:34 PM
@tereško Yes I have. Works pretty good!
 
@ircmaxell DPC is commercial. iBuildings is not doing that for the fun of it.
 
@ircmaxell later
 
goodbye:)
 
@Gordon how would a student pay 400euro :(
 
i have one small problem in php sql code, anyone can help me 0.0?
 
12:35 PM
@HamZaDzCyberDeV Parents maybe? or save up/get a (better) job?
 
I live in the neighboorhood, I can go with the bicycle to DPC. If it were 50-100 euro's I would be able to ...
 
one small problem for man. one large one for he-man!
 
please><
 
what is your issue
 
I quote the room description:
> You don't have to ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will.
 
12:36 PM
@dragon112 lolz, 400 euro's ? I have yet to get my driver licence. As for the job I have 2, but they don't pay good ...
 
@HamZaDzCyberDeV Then get a better paying job :p
 
jobNo jobDate drvID distNo
J0001 xx-xx-xxxx D0004 DST01
J0002 xx-xx-xxxx D0001 DST01
J0003 xx-xx-xxxx D0004 DST02
J0004 xx-xx-xxxx D0002 DST05
J0005 xx-xx-xxxx D0003 DST07
J0006 xx-xx-xxxx D0001 DST05
J0001 xx-xx-xxxx D0005 DST03


in this table, driver "D0002" only have one job, so he is minimum of the job in this table.
how to use sql code to find "drvID" with minimum of the job in this table.
 
@dragon112 Suggestions ? I work at sixarp (<-- reverse it) and have a second job as developer (0uur contract) ...
 
Is it possible withouth php to count all the values from a column in mysql?
 
J0001 xx-xx-xxxx D0005 DST03 // ignore this please
 
12:38 PM
@Duikboot there is count() in mysql
 
@Duikboot Count or sum?
Your question sounds like you need sum
 
Oh I used count dammit :p
 
@HamZaDzCyberDeV ask your employer to pay it for you
 
thanks!
 
np :)
 
12:39 PM
select min(count(*)), drvId from tableName group by drvId
 
@HamZaDzCyberDeV Hmmm Well what I did was start as a freelance ZZP-er.
It's pretty hard to find non-fulltime work in programming
 
@tgkprog oh thank you, let me try
 
heyman it will be something like that its a sql issue. try it if dont work i will have to test n a real table
 
you can try with sqlfiddle.com
 
@Gordon the first job is in a DIY store, with that I ensure a monthly pay. The second one (developing actually creating sites in Joomla xD) doesn't pay really good plus I have to pay a lot of taxes for the second one. The developer job is just on demand, so sometimes I have work and sometimes not ...
 
12:42 PM
that is a good idea heyman go to sqlfiddle.com make a sample and give is the id
 
That's why I recommend to start as ZZP-er
 
@HamZaDzCyberDeV do you intend to work as a developer when your studies are over?
 
@dragon112 I'm not good with selling, handling with clients, business in general, when I help someone I tend to do it for free ... So I prefere to work for someone who handles everything and I just have to code ...
 
@HamZaDzCyberDeV if so, quit both jobs and get a student job as a developer that can sustain you
 
12:44 PM
@Gordon yes of course
 
@tgkprog select min(count(*)), drvID from schedule group by drvID
it show "ERROR 111 (HY000): invalid use of group function
 
@Gordon the problem is that I've searched for a parttime developer job, but couldn't find one in the area ...
 
is anyone here really familiar with drupal? i have this plugin and even though it receives the datetime information in a certain timezone (europe/zurich) it always stores them in the database with the timezone "UTC" but not converted to UTC (the actual timestamp remains in localtime instead)
 
im sure i have used this before, but i am getting unexpected T_OBJECT_OPERATOR now, anyone any clue what im doing wrong with this: class TestClass { public function Run() { } } (new TestClass())->Run();
 
@ThiefMaster who are you working for in Switzerland? Liip?
 
12:46 PM
cern
 
@ThiefMaster niiice :)
do they run the LHC on PHP?
3
 
hahaha
i'd bet that the status image is created using PHP
 
@ircmaxell password_verify($password, $this_user['password']) is always returning false.
 
@ThiefMaster i've recently noticed mysql has a storage type called blackhole. So that sounds like a good choice for their data
 
so yeah, why cant i use class instances anonymously? PHP not implement this or have i done it wrong?
 
12:55 PM
SELECT min( drv ) , drv, count( * ) AS cnt
FROM `tt`
GROUP BY drv
ORDER BY cnt ASC
LIMIT 0 , 1
 
@bizzehdee what do you mean by anonymously?
 
@heyman is mysql this will do it (above) else remove the limit part and in code only take the first roww
 
@Gordon: (new TestClass())->Run(); as with C++ and Java and other OO languages
 
hi
 
@bizzehdee works as of PHP 5.4
 
12:57 PM
@Eugene Hello
 
ahh, THAT is why i have had it working before and not now. been running php5.4 localhost for a while at home, still on 5.3.3 at work
 
@bizzehdee 3v4l.org/qL2DG
 
I'm not fluent in English, but do know it well. This is actually the reason why I'm asking. Is this phrase correct? What d you think guys?
 
thanks @Gordon
 
"Angular is what HTML would have been had it been designed for applications."
Seems like second been is out of place
 
12:58 PM
sounds okay to me Eugene maybe a comma after first been
 
I'm not asking in English SE, since I will probably need to explain about what I'm asking.
 
user652649
hey, someone can explain me why i'm getting this error? "Cannot bind an instance to a static closure
" $c = \Closure::bind($this->__testFunc, $this, $this);
 
Angular is what HTML would have been, if it were designed for applications.
 
what you had is fine, though you can ditch the 2nd been if you like by using: "Angular is what HTML would have been were it designed for applications"
 
i think english Se will get it without too much background
 
user652649
12:59 PM
$this->__testFunc was declared in a static scope, now i want to bind it to an object... can i?
 

« first day (929 days earlier)      last day (4019 days later) »