« first day (1770 days earlier)      last day (3182 days later) » 

12:03 AM
@user1740058 Can you paste the actual error?
 
fuck , it's 3AM
I need to stop reading manga and go to sleep
 
@tereško what's you favorite manga to live action movie adaptation?
@tereško This is one of my favs: imdb.com/title/tt0112750
 
           $imgPath=$upload_directory.'dog.jpg';  $imgPath2=$upload_directory.'dog.png';                                                            convert $iPath  $iPath2;     Parse error: syntax error, unexpected '$imgPath' (T_VARIABLE)
make that - convert $imgPath $imgPath2;
basically how does convert know where file is located. all examples i see use only file name "image1.jpg".
 
12:18 AM
@user1740058 Is this meant to be from the command line or in a php file?
 
from php file
 
@user1740058 Ok, then this:
convert $iPath  $iPath2;
is not valid.
If you want to run it from inside PHP, you need to use the Imagick methods like all of the examples on phpimagick.com/Imagick/adaptiveBlurImage
I'm guessing you want something like:
 
Just found something similar. Thanks for answer. was driving me crazy
 
$imagick = new Imagick($upload_directory.'dog.jpg');
$imagick-> setImageFormat('png');
$imagick->writeImage($upload_directory.'dog.png');
 
@ircmaxell I've been thinking about your twitter war with Taylor and from that I gather that the coupling is a major issue for you (and rightly so). I like what the "league of extraordinary packages" is doing. That had me thinking...(in the form of a tweet)...
@thephpleague @philsturgeon Would the best "framework" simply be good documentation on how a collection of packages is config/used together?
 
i also needed to resize image and give border. I thought i would be able to do all this on same line.
 
@KevinMGranger reading that now. Seems to be exactly the answer to my question....
 
@user1740058 if you want to do that, then calling convert with exec is the way to be doing it, rather than trying to call the Imagick extension.
 
@prograhammer indeed :) still needs more added to it but it's the closest thing to what you've suggested.
 
^ it's also not polished. The documentation needs to be in part "marketing". And also perhaps a composer package that installed all these packages along with config files and folders and all the "framework boilerplate".
 
12:32 AM
@prograhammer that defeats the purpose
 
No no, the purpose is de-coupling but to compete with frameworks...
 
But if it picks the dependencies for you... then it's just a framework that isn't put together already
 
> that installed all these packages along with config files
 
Newbies benefit from the "general setup". But as they grow, they may change that boilerplate or whatever.
 
Hmm, perhaps a good compromise would be fully fleshed out examples? As in "click to see the entire codebase as it would stand during this chapter"
 
12:35 AM
Take a popular framework (ie. Laravel) and match that, but using existing packages on GitHub.
 
git clone $NO_FRAMEWORK_TUTORIAL && cd no-framework-tutorial
git checkout chapter-2 && composer install && php -S
that could be the entire tutorial right there
I think someone in here had a sorta-framework where they combined many of the mentioned libraries in that tutorial, but I can't remember who it was
 
Yeah, but again...it's all about the marketing. The reason frameworks are still controlling marketshare is because they give that sense of "we thought these parts out and they work together and it's secure and here's the docs..."
 
Then perhaps you could make some sort of script that asks you which components you want to use, and downloads and sets it all up with sensible defaults?
 
There are gaps. Gaps like "what kind of directory structure should I start with?". "What is a good suggestion on where to put all the environment variables for these packages at?" "How would I use them with the IOC container package?" "How would I use the router and call a controller and get a view to [insert template engine here]?"
Maybe call the framework "Suggestion".
The Suggestion framework.
 
I'm thinking it could have some sort of templated documentation that fills in based on which libs you picked
 
12:39 AM
Everything is a suggestion. It's a general purpose framework. The docs are good. But you dont' have to fear you have got yourself into a coupling nightmare.
 
But I also have the feeling that there are people who are afraid of having to read through this tutorial, and want to use frameworks since it will just tell them what to do. Those folks will likely not benefit from not using a framework.
 
@KevinMGranger the idea is to have a middle-ground. Frameworks take control. They don't think "hmmm....will you include this part?". No they assume it. So do the same. Just assume the collection of packages will all be perfect for the dev. Make the docs that way. But the key difference is what @ircmaxell suggests is his big problem with frameworks. The key is to not force the parts on the dev. The parts should be de-coupled packages that exist on GitHub naturally.
Take the Aura php framework as an example....
But something is off about Aura
The idea behind this "Suggestion Framework" is to offer a very thin layer across a set of commonly used packages (like that tutorial you show) that makes them feel as if they all belong together.
Fill in the gaps. Provide the directory structure (except of course the directory where the app exists) and config files. Maybe even a vagrant file to get a virtualized box up and to support the packages included.
 
when using imagemagic convert jpg to png, is old file overwritten, or destroyed
 
Perhaps a requirement for the "Suggest Framework" is that in the docs it is showed how every part can be substituted out with another package underneath.
 
Usually no, it converts one image to another.
with a different output filename.
 
12:53 AM
so i have to make sure to delete old files or images will be saved twice
 
yes, though having an external task to remove old uploaded files is not a bad idea either, as that would catch cases where PHP threw an exception before reaching the 'delete old file' stage.
 
@KevinMGranger well I tweeted and pitched the idea to the phpleague
 
1:09 AM
@prograhammer you really shouldn't write that as one word, I read that as PHPlague
 
lol
php league
 
I am developing a site and need to make sure that the user is selecting a decent username like "joshhangon" or "davidwilson" how can I only allow letters and no spaces? so its a nice, neat username.
 
@LiamHardy Validate it. There's plenty of ways to do it both client and server side (you should be doing both)
You can define a regex on the form element itself or have JS take over form submission, validating first
 
1:28 AM
anybody ever implemented a marker interface in PHP?
 
DNC
1:40 AM
About databases(MySQL): I am going to load some rows of info from the database into my iPhone app. Will the loading time be longer when the database has 10000 rows compared to when the database has 20 rows?
The info that will be loaded into my app contains 10 rows
 
Morning, guys
 
Abe
2:06 AM
morning
 
3:02 AM
@ircmaxell can I add you to a private repo on github? It's the preprocessor we were talking about, I don't want to open the repo yet as it's in a very embryonic state.
 
@prograhammer that is not a framework, it is a collection of libraries. A framework by very definition imparts architecture choices
@marcio yes
 
Ok, added, there are many things that will suffer huge refactories. The tests inside tests/phppt/ have a good coverage and give a good idea about how it works.
 
Got it, will look tomorrow
 
:)
 
morning
 
3:15 AM
@cspray read above ^. can I add you too so you can see the src?
 
3:28 AM
@DNC yes ... but depending on how you structure the database and how you query the data out it's not likely to be 500x longer
 
should I talk about my weird issue or simple stupid issue first?
 
@esswilly depends on what you mean by that.
 
@crypticツ I see what you tried to do there ... unfortunately it didn't work :)
 
3:40 AM
I get this error when I'm working locally through apache as the local server:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

    Fatal error: Unknown: Failed opening required '/Volumes/Levy's LaCie Rugged/blevy2 WNM Web Projects/ontheway/destination_update.php' (include_path='.:') in Unknown on line 0
 
@Orangepill I tried =o( I should have encoded the URL
 
but when I try to go to the same file using php -S localhost:8000 it works just fine
 
works in firefox... not so much in chrome
 
Abe
@crypticツ #fail
 
@cryptic getting sacked by chrome's XSS Auditor
i didn't even realize that was a thing
 
4:23 AM
Crazy. I literally just hit the button to register php.io and it told me it was taken. It was available when I added it to cart. Too good to be true?
heh
 
Abe
oh dear. looks like i found some very nasty bug in php 3v4l.org/1bYJv :|
12
 
Abe
4:36 AM
i made a search and left a tab open thinking "ok, i'm gonna need this soon". then happened that i started refactoring. 2 weeks have passed, i didn't finish the refactor yet and the tab is still open. fml
 
I'm getting so close to fixing my issues...I just can't seem to get the trip name and the rest of the information at the same time. I can get either one but not both. benlevywebdesign.com/ontheway/destination_edit.php?id=49
The name should say Ben's August 2015 Test!
 
4:56 AM
hello
Any php experts here :) ?
 
Nope. All the experts are down the hall and to your left.
If you see the vending machine you've gone too far.
 
Mornin
@Abe yeah, friday solves it ;)
@Shivinnarayan What do you need? I'm not the expert but i can pretend it.
 
moin
also, yay, friday
 
morning
 
5:07 AM
thank VeeeneX
Let me ask
 
@Shivinnarayan Don't ask just....
 
main/main.o:(.data+0x0): undefined reference to `php_register_internal_extensions'
collect2: error: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
make: *** Waiting for unfinished jobs....
main/main.o:(.data+0x0): undefined reference to `php_register_internal_extensions'
collect2: error: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
main/main.o:(.data+0x0): undefined reference to `php_register_internal_extensions'
collect2: error: ld returned 1 exit status
make: *** [sapi/phpdbg/phpdbg] Error 1
someone broke php7 build
 
pull
 
already did ...
 
@VeeeneX : Is there any security advantges of setting http_response_code() in php?
 
5:12 AM
hi i have one array like this array(1,3,6,7,4.....n);
 
@Shivinnarayan I don't think so, but it depends on usage.. maybe, it just adds header.
 
@saravananmp I dont have
 
how to find particular number exist o not .. without using inbuilt function
 
@saravananmp in_array("number")
 
@JoeWatkins Try to switch to beta3 tag. I just finished building
 
5:13 AM
@saravananmp use in_array()
 
@JasonYoung that doesn't solve the problem
 
@VeeeneX Explain me
 
without using in built function
like in_array
 
@saravananmp Something to do with math?
 
@Abe my new cli error screen!
 
Abe
5:14 AM
@SergeyTelshevsky :D
 
@VeeeneX : let me know one usage
 
@VeeeneX yes
interview quetion thy asked
i told foreach { if(){}}
 
@saravananmp : yeah Just traverse through array
 
@Shivinnarayan For example if you have a really bad code and you do something like http_response_code(500) and somewhere else you have if http_response_code() === 200 drop users :D
@saravananmp what about count($arr) >= $number, if array values are numeric, starting from 1 and each number is incremented by one.
 
@VeeeneX :(
 
5:35 AM
a good interview question would be to "create a function that will return the number of occurrences of a given value in an array without using any builtin functions or any conditional statements".
 
but they replied performance based its not a good solution
is there any other way to do it with better performance
 
@saravananmp what's the code exactly you gave them ... there might be a way to improve the best case.
@saravananmp where you dumping out of the loop once a match was found or going all the way to the end.?
 
@Orangepill foreach($array as $a){ if($a==7){ echo "exist";}}...if 1000 values in that array if we write like this performance based it ll affect
they told
so how to improve this code
is there any other way to find this
 
@saravananmp And values are (n+1,...n)?
 
<?php

$haystack = [1,2,3,4,5,6,7,8,9];

$needle = "5";

$found = false;

for($i =0; $i <  count($haystack); $i++){
    if ($haystack[$i]==$needle) {
        $found = true;
        break;
    }
}

var_dump($found);
 
5:43 AM
Or just a random numbers?
 
random numbers @VeeeneX
 
The improvements are 1) by using for instead of foreach you take out a variable assignment
 
@Orangepill count is build-in function :D
 
if that number is in last in that array...
 
Abe
do some of you know where i can find a php oop implementation of semver? something like $version->getMajor() $version->getPatch() $version->compareTo($other) ? can't find anything decent
 
5:47 AM
@Veenex true ... so you would have to use foreach
 
@Orangepill But you are right, because you foreach in C use count too.
 
I am just gonna work on it tomorrow
 
the biggest perf improvement is it only loops until it finds a match because of the break statement
 
@Abe Maybe roll your own?
 
Abe
could do, but i hate getting fossilized on cosmetic stuff :P
 
5:50 AM
@saravananmp so a big optimization would be to add a break after your echo
 
You are not alone , Abe :D
 
@abe maybe this
 
Abe
wonder if the tag gets sorted correctly
"take the one with the lexicographically larger tag"
it's ok though. thanks
starts modifying it massively
damn you, OCD
 
@abe changing the case of the class names?
 
Abe
that's for a start :D
 
6:05 AM
hi i need a suggestion to rewrite hyphened url containing multiple hyphens in keywords. is it correct place or i gone wrong for chat?
 
6:15 AM
g'night php
 
6:26 AM
0
A: Error in the exercise of oop

Hassan AlthafIt is because there is no constructor in the Conta class. Because, in the child class ContaPoupanca, you called the constructor of the parent class which is Conta like this: parent::__construct($Agencia, $Codigo, $DataCriacao, $Titular, $Senha, $Saldo); Therefore, to make this work, the paren...

Hilarious.
The OP is getting down votes like crazy
 
@user2349450 maybe... assuming you are doing that in php
 
@Abe Damn, that person trolled Oracle so hard.
 
Abe
:P
 
Happy friday!
\o/
 
6:42 AM
Ye, time to listen to Rebecca Black - Friday.
 
damn generators are cool. I just started really playing with them.
 
time for sleep
before its friday
 
6:59 AM
function add_nu(){

$output='';

$output.=$this->num1;
$new='';
$new.=$this->num2;

$c= $output+$new;
return $c;
}
why this function didn't return
 
Because you probably didn't call the function?
 
no in main file i call it the only issue with return keyword else with echo its work
 
Oh I know.
You have to do like this:
$var = add_nu();
So that the return value of the function is saved in that variable name.
 
posted on August 21, 2015 by kbironneau

/* by Frankie */

 
 
7:02 AM
what i heared $var is going older its just my knowledge may be i am wrong
 
@CSᵠ It's the other way around dude. :P
 
no really, it's better that way
@Abe nasty nasty bug dude, I hope they patch that by tomorrow, that should never be seen again
 
@CSᵠ Whats buggy on that? I don't get it.
 
Abe
:P
 
ohh man, that's the worst bug I seen in years, maybe it's better you can't see it, they usually patch those critical ones by the end of the day...
 
7:13 AM
mornings
 
@Sherif Wrong video mate.
 
@Sherif Wow, you totally got me there
I was expecting Rebecca
 
;)
You see what I did there...
I put the shoe on the other foot!
 
7:23 AM
OK, now that Friday has started time to put the coffee on and get goin.
 
moring!
@FlorianMargaine you almost got me with that link :P
 
7:40 AM
Good friday morning o/
 
@PeeHaa some folks in the HTML, CSS room are missing you. And morning.
 
Yeah I've been pretty much busy lately. Need to give them some more love. They deserve it
 
morning.
 
Abe
@Sjon ahahahahahahahahahaha good job :D
 
@Abe hehe, thought you'd like that :P
 
Abe
7:51 AM
loved it :D
 
Good m00,000,000rning
 
good mooing to you too
 
# apt-get moo
                 (__)
                 (oo)
           /------\/
          / |    ||
         *  /\---/\
            ~~   ~~
..."Have you mooed today?"...
 
sudo apt-get install moo --force --now
 
so... another php bug: 3v4l.org/1bYJv
3
 
Abe
8:01 AM
:P got countertrolled by @Sjon i shouldn't have clicked my own link
 
haha
 
Abe
well played :P
 
8:23 AM
blacklisting rebecca* at fw level...
 
Anonymous
moings o/
 
@JoeWatkins gulp
 
inorite, is horrible
 
Well....
Go also lets you do some horrible things with the thread id
Perhaps not so horrible
 
8:39 AM
still, I'm scared ...
 
you should be
 
can I use of cookie instead of session for detecting login being ?
 
@FlorianMargaine please may you tell me why ?
 
@Sajad please try to understand how cookies and sessions work in HTTP. You wouldn't ask this question if you did.
 
8:43 AM
@FlorianMargaine but, I can call this $_COOKIE['login'] in the each page ... exactly like session
 
@Sajad A session uses a cookie.
 
I said "work in HTTP". Not in php.
 
@HassanAlthaf stop giving terrible advice.
 
8:46 AM
@HassanAlthaf tnx
@FlorianMargaine look, I need to show the reputation of each user. should I send a query before loading each page ?
because it may change
 
@Sajad No, store user data as objects.
 
@Sajad You're not making sense, sorry
 
@FlorianMargaine What?
@Sajad on login create an object of a user class of the logged in User and store all data needed in that and update it when data change along with the database.
 
@HassanAlthaf how store data in a object ? your mean is using session ?
 
8:51 AM
@Sajad Like this: pastebin.com/sP43mXqv
But you have to ensure you use the same instance throughout.
 
@HassanAlthaf ok tnx
 
But make sure you do the setters and getters functions
I cbf to do them
 
@Sherif I think this is wrong, because session is server side, cookie is client side
 
@Sajad Yes, they are, and no it's not wrong. The session is stored on the server, but the session id is stored with the client as well. Otherwise, how does the server know which session belongs to which client.
 
Anonymous
@Sherif That's awesome
 
8:55 AM
@Sherif I see !
 
Hmmm... exponential bloom filters are way trickier than I thought. I need me some nums...
 
Anonymous
@Jimbo o/
 
@FlorianMargaine can you please take a look to my codes, I feel they are not optimized
 
9:08 AM
@FlorianMargaine ok
 
you're not following the most basic advices I gave you (i.e. learn how sessions/cookies work in HTTP, which would make you learn HTTP), so I don't see why I would help you
 
Can I please get some help on php gearman ?
I have some very specific questions
 
you told don't use cookie instead of session, I did ! I used of session for detecting login being
 
no
I told you to try to understand how they work
 
@Sajad Chill the fk down.
 
9:11 AM
@FlorianMargaine I know !
 
@Sajad Look, if you want to optimise your code, you have to work on it yourself. We can help you with bugs/errors and help you to do something based on our willingness to help. However, if you really want to optimise your code, then head over to Code Review
 
my problem is "sending a request to database for getting reputation before loading every page"
 
@Sajad You might wanna know the definition of Programming which is Computer programming (often shortened to programming) is a process that leads from an original formulation of a computing problem to executable computer programs. If we tell you how to solve a problem, then what do you do exactly? You basically copy-paste..
3
 
ok ! tnx
 
Time to do a ProjectEuler challenge in Swift.
 
9:24 AM
@marcio @samaYo All backend code is currently private in two GitHub repositories, but the frontend is already open source: github.com/kelunik/dev.kelunik.com. I'm not yet sure, if the backend will ever be open sourced or not.
 
Good mooing :)
 
Anonymous
@salathe o/
 
9:41 AM
hi
 
9:56 AM
Can some mysql user tell me whether I can rename schemas yet?
 
Morning
 
@PeeHaa schemas?
do you mean tables?
 
databases
 
you can't
but you can rename&move tables to other dbs
 
9:59 AM
so with a little loop it's pretty straightforward
 
> To perform the task of upgrading database names with the new encoding, use ALTER DATABASE db_name UPGRADE DATA DIRECTORY NAME instead (see Section 13.1.1, “ALTER DATABASE Syntax”).
 
RENAME DATABASE "was removed in MySQL 5.1.23"
 
@FlorianMargaine IIRC that may corrupt data
@Sjon Fuck you retardsql
 

« first day (1770 days earlier)      last day (3182 days later) »