« first day (1524 days earlier)      last day (3414 days later) » 

12:09 AM
@PaulCrovella If it's working, don't panic. Slap a unit test in there and move on
 
@AndreaFaulds Most of those nights were when I was maintaining an exceptionally large, hairy, and old perl codebase. "Testable" didn't so much apply.
 
@PaulCrovella Oh, I see...
Also, I said that largely tongue-in-cheek.
 
12:25 AM
@PaulCrovella definitely the former
 
since the natural state of code is "broken"
 
12:44 AM
@PaulCrovella what the fuck
 
@AndreaFaulds I know, right? Account deleted even though she don't broke anyone. Dickbag instagram.
 
@PaulCrovella oh you
 
1:02 AM
@PaulCrovella is it even "she"?
 
@zerkms Rule of thumb I follow: if she presents herself as a "she" then she likely identifies as a "she" so I'm calling her a "she" because she's a "she."
 
@PaulCrovella it makes sense
never thought of that before
 
 
1 hour later…
3:00 AM
any way to preg_split without replacing the search query?
 
3:17 AM
@LucasB the question is not clear
 
@LucasB , check flags.
 
 
3 hours later…
5:53 AM
Good Morning folks
 
6:18 AM
morning
 
All seems to be in Christmas and Hats mood ;)
 
I'm playing "Whack an XSS mole" here; who wants to join? ;-)
 
haha
 
6:35 AM
moin
 
Morning @Joe
 
zan
morning
 
Morning
 
buenos días
 
zan
so when is php7 is releasing
 
@AndreaFaulds Just for curiosity Why "buenos días" does not have "mañana" in it? :p
 
@Rikesh Because it means "good day" and not "good morning"
 
Ohky Google says its Good Morning
:p
buenos días usted también @AndreaFaulds
 
zan
@AndreaFaulds Thanks
 
Yay, imitation crab hat is mine!
 
7:00 AM
(y)
 
Downvote 5+ posts in one day :)
 
haha that also on same question
you being cruel for hats ;)
 
yayaya
 
@Ja͢ck - btw your next goal should be to grab the "Joga Bonito" cap get simply by doing 10 reviews ;)
 
It was a Claw-Plagh, it was.
 
7:26 AM
Morning.
Or to quote Benjamin Franklin: Early to bed and early to rise, makes a man healthy, wealthy and wise.
 
tcp 0 0 172.31.6.203:53 0.0.0.0:* LISTEN <- how to explode this by space . as no of spaces is different here
 
array_filter(explode(' ', $line), 'strlen')
 
@Jack what a sneaky solution :D
 
@Ja͢ck Wrong
 
regex split I would ...
 
7:34 AM
strtok maybe
 
`Array
(
[0] => tcp
[8] => 0
[14] => 0
[15] => 127.0.0.1:53
[27] => 0.0.0.0:*
[42] => LISTEN
)`
 
Python's split does a split by whitespace with no delimeter, I wish we had that
 
output looks good
but key of array ? o.O
 
You could do this: $bits = [strtok($line, ' ')]; while (($bit = $strtok($line)) !== NULL) { $bits[] = $bit; }
 
7:36 AM
btw I wish PHP had an explode iterator
 
Ok, new job hunt for me.
 
@Duikboot what are you looking for? wordpress? codeigniter? drupal?
 
Current marketing company stops with the 2 in-house webdevelopers because of the financierl issiue -_-'
 
I kid, I kid...
 
Actually I am a front-ender ;)
 
7:38 AM
@JoeWatkins will use this :)
 
But Im here to learn and do some more PHP stuff. As in learning OO etc.
 
@Duikboot Ah one of those with a macbook and beard? ;)
What are you looking for? and where?
 
I just trimmed my beard. :D
But yes the macbook is a fact :D
Im looking in Belgium :) for a job opportunity
I noticed I like working in a small company instead of a large one
 
@Duikboot same here
 
same here. I like startups where you work on their app/website full time (instead of an agency where you do lots of small sites)
 
7:41 AM
 
god why is strtok so awful
hnghghgh
 
Also in BE?
 
anybody going to get a copy? leanpub.com/discoveringdoctrinewithddd
So I'm writing a book! It'll be about learning Doctrine and using it with DDD and it has jokes! More info next year. https://leanpub.com/discoveringdoctrinewithddd
 
I don't think so... Doctrine gives me too many headaches...
 
Doctrine vs Eloquent
 
7:46 AM
I played around with it once. But using YAML or even worse annotations just doesn't feel right.
at least to me
 
Been using it for about a year with annotations at work. That part is ok. The performance is the problem
That and really weird bugs that are almost impossible to debug
 
@Patrick that was about doctrine?
good morning everyone
 
morning
 
@SergeyTelshevsky yes
 
@Patrick can you suggest any alternative?
 
7:49 AM
For me it's a huge drawback to be able to use popos as Domain Objects at the cost of bloating the model with annotations.
It just didn't feel "right" somehow
 
It's definitely not the right way to do it. But it "works". It's a big improvement above all the AR alternatives but it's still not great imo
 
^this. That's why I'm currently searching for a comfortable method to manage my persistance layer
 
@Patrick true, I was asking to know if there appeared anything new lately
 
@SergeyTelshevsky nope. These days I tend to go more into the direction of no ORM and just use PDO instead of some wrapper
 
@Patrick I like Doctrine ORM despite all the hate to it's annotations, it just saves sooo much time but the downsides are obvious as you mentioned
 
7:59 AM
Annotations are your friend!
@AndreaFaulds Wrong how?
 
@Ja͢ck anyway, better than yaml :)))
 
Damn ><
I have to type in a php string m².
But it seems there are many options: preg_replace or htmlentitites,...
 
@Patrick thought about that too... but writing queries manually for all the simple CRUD operations is annoying... especially if you used some kind of AR implementation before
and with some kind of AR implementation I mean eloquent :D
 
hey all, is there anybody can answer my question?? in this link stackoverflow.com/q/27517288/4368559 .. anyone can solve the problem..? thanks
 
Using : &sup2; fixed it :)
 
8:17 AM
help me please
2
Q: Add / Update Custom Fields After Select Pictures in Media Window (Wordpress)

Teguh SupriyadiI have a question about wordpress, I just added a button called Add Slider in Add/Edit Post Page. here's my code in my function.php : //Add button to create slider add_action('media_buttons','add_my_media_button',15); function add_my_media_button(){ echo '<a href="#" id="insert-my-media" cl...

 
is your life in danger ?
 
no, isn't .. hehe
 
I'm going to call 911 if my life in danger
haha.. lol
I was post a question there, nothing answered..
 
This is a PHP chat group, we don't know wordpress
 
8:19 AM
Coming to think of it, the PHP room would be a pretty horrible emergency response team :)
 
good meurning!
 
@Ja͢ck Yes I know he is bleeding to death, but he needs to fix his diet first before we can help
 
@Naruto Good Morning..Have you got "Naruto" cap yet? ;)
 
mornin'
 
8:35 AM
@Patrick I know the patient is bleeding to death, but he really shouldn't use mysql_ functions!
 
@Rikesh the what? :D
 
@Naruto - Don't tell me you don't know about the hats. You might like to visit winterbash2014.stackexchange.com
 
net::ERR_EMPTY_RESPONSE wtf ?>
 
anybody here comfortable with Auryn?
If yes. Is there a way to make use of setter injection with automatic dependency resolution?
oh nvm... I really should learn reading carefully
 
8:53 AM
^ where do you need that? So far I have only implemented the constructor dependency resolution
 
Just to be able to automatically resolve dependencies in "controller" methods
 
@ThomasDavidPlat Are you still passing in the params? And are you mixing camelcase with snakecase on purpose? :P
 
@Patrick passing what in the params? The injector? :)
nah I used to camlecase everything. But I read a few days ago here in the chat that somebody is using snakecase for local variables. Currently just trying out this one.
 
@ThomasDavidPlat no I mean the route params, when you have something like /article/:id
 
@Rikesh ah.. yeah noticed it.. but don' really have time for that right now.. :P
 
9:07 AM
@Patrick route params aren't implemented. It is not even a real router (Just compares the path info with registered routes). No parameters or something. My only purpose is to play a bit with Auryn :)
But when it's necessary I will just pull in some router.
 
Good morning
 
@ThomasDavidPlat I see. I just mentioned it because usually I pass in the $params as the only argument for my controller methods
 
good mornings
 
9:23 AM
@Patrick that's probably the way to go :)
 
morning
 
morning HamZa
 
good morning
 
@ThomasDavidPlat wasn't snake case meant as a convention for php-internals (C)?
 
posted on December 18, 2014 by kbironneau

/* by Masiar */

 
9:37 AM
^^ ROFL
 
@HamZa dunno to be honest. But I dropped the usage of snake case for local vars. mixing just doesn't feel good :D
 
9:54 AM
lol @ Css
 
Hey want to add image/text watermark on video file using php and I didn't found any reference on google please tell me any link or solution...
 
@Sandesh try with ffmpeg
 
Yeah I read about this but I cant understand the process
will you explain some more thing about this
i got this
How to overlay text on the video at a specific window position.

Code:

ffmpeg -i sub_video3.mp4 -vf \
drawtext="fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf: \
text='Text to write is this one, overlaid':fontsize=20:fontcolor=red:x=100:y=100" \
with_text3.mp4
but How to use this
 
@Sandesh the process is simple. ffmpeg is a program and you usually use it with command line. You can execute commands with php using exec() or some other function
 
yeah I read this exec()
 
10:02 AM
@Sandesh then I think you have all the pieces to complete the puzzle. Have fun
 
hey @hamza Should I download the ffmpeg?
 
@Sandesh lolwut
of course you should -_-
 
ok
 
btw there is also an extension for php
hmm at least there used to be..
 
Is it possible without ffmpeg to create text/image watermark on video using php
 
10:17 AM
@Sandesh in your opinion, do you think php is meant for editing videos?
 
I am not using php for editing videos but I have a requirment for making a kind of application for this in php
 
I'm out...
 
ffmped understands 27635823567 different video streams and containers
there's no point in reinventing the wheel
 
@Patrick I am beginner level in php I am searching for a full example I am looking for a example to guide me to do that...
but facing problem in auth: { key: "YOUR-AUTH-KEY" },
 
@Sandesh read docs on basic usage of PHP-FFMpeg, there's a filter called WatermarkFilter, to apply it you need to call $video->filters()->watermark(image src, coords);
 
@Sandesh If you are a beginner, why not first learn more? Then you are not a beginner anymore and it will be easy
 
@Patrick thanks !!!
I wll
 
10:58 AM
@Patrick how many years will that take ? ;-)
 
Mornings!
[=
 
@ErikBaan All of them.
 
Morning room
 
mornin'
 
Hello All I Got error (Database connection "Mysql" is missing, or could not be created. ) in Cake php
Can any one help me ?
 
11:02 AM
@AkashDeep how can we help you?
 
You are missing PDO_mysql, probably
mornings
 
how can i add it
@dave
@DaveRandom
Please help me ?
 
Depends on your operating system
 
I have Tryed all but noone run
My code is this public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '50.114.228.120',
'login' => 'aubhadia',
'password' => 'Password123',
'database' => 'hcm_common',
'prefix' => '',
//'encoding' => 'utf8',
);
 
11:06 AM
0
Q: following query is slow because of the subquery used in column list?

veronica fernadisWhile working on one of my project I am facing problem of slow query. ( SELECT mem.mem_id, mem.photo, mem.fname, mem.lname, mem.email, mem.profilenam, mem.birthday, mem.phone, mem.sn_flag, (SELECT stat FROM invite WHERE email = mem.email AND mem_id = 48) AS ...

 
hey all, I am looking for a real need of Interface in the OO programming?
 
guys please help on above query
 
why do we need it if we can have same name methods in different classses and call them with their respective objects
 
@John there is an answer for your question
 
@SergeyTelshevsky yes I had tried but didnt help
 
11:09 AM
@John elaborate with the answerer
 
@DaveRandom Can you help me ?
 
He sure knows what he's saying considering the amount of rep he has
 
@SergeyTelshevsky I want to optimize the union query
 
can someone help me with interfaces?
 
@OMTheEternity you are asking why we need interfaces?
 
there is unnecessary subquery in column list which needs to be remove and and add equivalent in join
 
@Rikesh I have been thru this thread before, but still on the same question WHY?
 
@OMTheEternity - I guess now you should read this stackoverflow.com/questions/122883/…
 
I have always found this type of example, A classic example might be IVehicle, which has a Move() method. You could have classes Car, Bike and Tank, which implement IVehicle. They can all Move(), and you could write code that didn't care what kind of vehicle it was dealing with, just so it can Move().
But the question still stays there why if i can do this without the use of interface
 
Do you fully understand polymorphism and encapsulation?
 
11:14 AM
@AkashDeep I don't really know anything about CakePHP so... probably not. That error message is quite unhelpful, need a more specific error message really. I'd suggest you start by making sure that you have an available MySQL driver in your PHP installation and making sure that the MySQL server is running and accepting connections
 
@OMTheEternity think of interface as a contract
between the provider and the consumer
 
@OMTheEternity You could write your code entirely without vowels, so why do you use them?
 
ok let me put in this way
what should make me use interface
 
@SergeyTelshevsky any suggestion
 
11:16 AM
@John I would say if there would be one
@OMTheEternity concretenss, specification, stability
 
I completel understaand the analogy of Vehicle, Animal Person etc..
 
@SergeyTelshevsky one what?
 
@John nevermind
 
morning
 
@OMTheEternity read about polymorphism and don't stick to PHP language
 
11:19 AM
What I see is if there is no interface with me, i can still use methods with different signature in different classes
@SergeyTelshevsky I did the same, not sticking to PHP
 
@OMTheEternity but you have no guarantees that your object has all the methods you need.
And someone else looking at your method does not know what methods you require, he would have to go through all your code and find all the edge cases
 
so u mean , using interface will force me to decribe the methods
 
@OMTheEternity yes
 
Yes, it's a contract that defines the boundary between classes
 
but how would "someone" know that i have used any interface and it has any such method declared
 
11:22 AM
Because you are type hinting against the interface
If he passes in anything else, it will error
 
likewise?
 
if he implements the interface and misses a method, it will error
 
so that means if someone created new class, then it is usefull
supose
I am the someone
and I am into new codebase
I am not aware of any use of interface in it
and I am willing to create new vehicle class
now how would I know that there is an interface
 
@OMTheEternity say you are coming to work on this application
 
11:25 AM
@OMTheEternity Here you have a PageReader as dependency
 
what that meanss
"as dependency"?
 
@SergeyTelshevsky please suggest any solution over question .I am stuck from last 2 days
 
@OMTheEternity It means that the class requires another class when it is constructor
of the defined type
 
@John please quit pinging me or anyone else. Everyone who can help will help you
 
crap my network admin has blocked the blogs\
 
11:27 AM
here it is a PageReader (which is an interface)
 
ok
then!
 
@OMTheEternity I am using a dependency injector so here you can check to see which specific class is injected for an interface
@OMTheEternity You can see that it is FilePageReader. So now you want to use a DatabasePageReader instead for example
So you just write your new class that also implements the same interface, then you go to the dependencies.php file and just change from one class to the other
Your application now works with the new PageReader without you having to change any other code
The less you have to change, the less change of new bugs that are introduced
 
@OMTheEternity consider an example of writing unit tests, you don't inject real DB driver object, rather a dummy which implements the same methods but executes them differently.
 
@OMTheEternity If it is still unclear, I would recommend my tutorial. It goes over this a little and could be helpful
 
I am not very clear with the point
 
11:31 AM
what, specifically, isn't clear
 
@John a) is there a good reason for using the subqueries instead of a join? b) the ORDER BY TRIM() is likely to be hurting performance
Also you do have some indexing issues
 
like Its still haunting me that, anyways new developer must be aware of the existance of an interface which has some declarations
 
@SergeyTelshevsky thanks for reply
 
@Patick I will definitly go through the tutorials
but i think it wont give me a straight away oneliner
 
@DaveRandom I have used subqueries and performance of query was boosted up bu when I add it back to union then result decreased
 
11:34 AM
But I feel like You guys have directed me to good way to research on iot
 
Turns out I'm going to have to do some work with a SOAP API #fml
 
Let me try it my back again following your understandings
Thanks a Lot Guys
 
@DaveRandom I am so, so very sorry.
 
@Patrick - Good efforts !! And nice tutorial of creating our own framework
 
bye for now.... Thanks everyone
 
11:37 AM
@DaveRandom I removed trim() but still getting same time.. I have also added index on email+mem_id+stat as composite index but still no difference
 
@Rikesh nooo... the whole point is that it's not using a framework :D
 
@John moment, let me dissect it properly
@PaulCrovella The only positive is that it is a rare thing in that it seems to be reasonably well documented
 
@Patrick - If Own Framework == No framework then yes ;)
 
I've not looked to see if the docs actually match what it does yet, of course...
anyone seen @AlmaDo recently?
 
@DaveRandom I saw him
 
11:44 AM
:-P
Just wanted to check you hadn't been lynched by ze Germans
 
heh. No. I will have 2-weeks vacations. First time per last 4.5 years (:
But I'm missing lots of stuff here :p Just have no time currently, since before Christmas everyone want to "finish that little bit"
 
@John you need to use less varchars, is one thing I would say
AND fm.verified = 'y'
AND fm.deleted = 'N'
AND profile_type != 'C'
^ they should all be ints
You seem to have a stringly typed database...
 
As of MySQL 5.6 subqueries would be automatically transformed to joins, if that is possible (so dependency condition allows that)
 
how can mentioned column be int as we can see they are character
`AND mem.verified = 'y'`
`AND mem.deleted = 'N'`
`AND profile_type != 'C'`
 
Yes, they should be converted to ints, but I realise that will be a huge job
verified and deleted should both be TINYINT(1) (i.e. bool)
and profile_type should be an integer, either referencing an external status table or just an enum over the column
 
11:59 AM
While ENUM is indeed faster for indexing/comparisons that string types - I would say - in most cases it's an anti-pattern, to use it - and performance increase will not worth problems, coming from that data type
 
got output array(0) from AWS PHP SDk .. what does that means :/
 
that means you have an array with no elements
 
@DaveRandom I confirmed, reorder + squash works in rebase :)
 
that means empty array ..?
 
you gotta be careful with conflicts during the rebase, but otherwise it works fine
(I had a conflict with a constructor on which I added a dependency... before the commit I actually added the dependency in)
 
12:03 PM
Guys
What is the best way to handle validation checks?
On the data user inputs?
Well, return the errors from the validation checks
 
changing column type to TINYINT(1) is giving error
and profile_type cannot be change as there are different values excluding "C"
 
@AlmaDo server respond that after success.. how to verify then empty($result);
 
Guys, please help.
 
hehe
 
12:11 PM
I might want to move the thing to a dedi domain :P
 
why?
 
Because IIRC google punishes when you get too many DMCA things
 
@HassanAlthaf throw exceptions...?
 
@iroegbu I meant in a neat way in a specific HTML DIV?
 
@iroegbu No. There is nothing exceptional about bad user input. In fact it's the norm.
 
12:13 PM
I am stuck with this part
Because I am using Composer with FastRoute and many more stuff
-.-
 
@HassanAlthaf save in session and display on the form
 
Uhh, but that would be messy to write PHP in an HTML file.
There is no PHP in my HTML.
xD
 
@John Yeh you can't just do it, you need to do a proper redesign of the DB
 
moin
 
@John does pastebin.com/MezxfhYX perform any better?
 
12:16 PM
hi, @Joe
 
@PeeHaa stick HTTP auth in front of it?
@FlorianMargaine Awesomesauce :-)
 
morning!
 
moin nikita
roll on friday, I am exhausted ...
 
12:35 PM
I just spilled tea on my white T shirt
not happy
 
you may tell everyone it's whiskey
 
Probably wouldn't be hard to believe, I probably smell of alcohol already
 
likely all the whiskey in your tea
 
@DaveRandom I was hit by a truck and my best T-shirt was screwed :(
 
12:45 PM
lol @DaveRandom I think it is @Fabor's company that did it :P
Didn't you work for audiolock @Fabor?
 
/me disowns @Fabor
 
btw
@Fabor == @Fabien ?
 
@AlmaDo If that's what you're concerned about from that whole incident...
 
@JoeWatkins got a new video up?
 
12:47 PM
@AlmaDo "I was hit by a truck and all I got was this lousy tshirt" :P
 
@DaveRandom yep, it was my best torn t-shirt
now its.. well, too torn :p
 
@SergeyTelshevsky nope, have you tried it?
I might try it out tonight
 
f*ck. How to prevent composer being caught by Xdebug in phpStorm ? Of course, I can stop listening connections before update, but E_TOO_LAZY
 
@AlmaDo you can use php.ini withou xdebug by default and create an alias for example like this phpd='php -c php.ini-with-xdebug' and use phpd whenever you need to debug
 
https://github.com/bolt/bolt/blob/master/src/SetcontentNode.php
seems trange :P
 
12:58 PM
.oO
 
*strange
 

« first day (1524 days earlier)      last day (3414 days later) »