« first day (1992 days earlier)      last day (2970 days later) » 

11:00 AM
@JoeWatkins @JoeWatkins I think you articulate extremely well in internals.
 
Mornings
 
@tereško I don't see what's so funny...
That he got it wrong..?
 
o/ @Saitama
 
A properties default value should always be defined in user land. Although I still think error on set only is the way to go, I'd rather it threw if read when unset than an implied value returned.
 
@MadaraUchiha pong
 
11:07 AM
I consider it a dupe of Learning Regular Expressions because it is asks for something evident, that is extremely frequent, that is thoroughly explained in thousands of SO and non-SO posts.Wiktor Stribiżew 6 mins ago
is closing questions as a dupe of that common practice in the tag?
 
@MadaraUchiha it's not uncommon
 
@HamZa You understand my concerns?
 
@MadaraUchiha yes
Basically they close it as a dupe of that question to say "go learn regex"
 
Exactly.
 
@JoeWatkins "introducing expicitly nullable types, or union types" <- who's working on this?
 
11:10 AM
I'm brewing a meta about it...
I understand there's plenty of crap in , but closing arbitrary questions as "go RTFM and leave us alone" is unacceptable.
 
mornin'
 
@MadaraUchiha to be fair, the link given in the comment does address the exact problem asked about
 
@MadaraUchiha well, it happens a lot. I also don't blame him
 
can anyone guide me where to read angular js ?
 
@MukeshKumar the documentation #captain obvious
 
11:13 AM
@PaulCrovella Hardly. Those question/answer are far too general to be helpful as anything but a reference.
 
@MukeshKumar github has the source which you can read I assume
 
give me the particular link for this @PeeHaa
 
@MukeshKumar angular1 or 2?
 
Is your google/baidu broken?
 
@MukeshKumar Or... just use Google
 
11:16 AM
@LeeDavis @LeviMorrison is/will
@MadaraUchiha What should it be closed at instead?
 
@NikiC As one of the existing close reasons, or an actual, helpful, duplicate.
If there's a duplicate question with an answer explaining how to take N regexs and combine them into one, that's a good duplicate.
 
@MadaraUchiha considering the asker said "I can't find any info on how to create one regex pattern that will look for all" they apparently needed a simple general reference, which they were pointed to
 
Hi... working on MVC and I have a thumbnail creating library function inside image class.But whenever I call that from inside contrroller it shows like this...Warning: imagepng(localhost/adxPortfolio/manage/public/uploads/category/…): failed to open stream: HTTP wrapper does not support writeable connections in H:\xampp\htdocs
 
@PaulCrovella that
 
woop
 
11:19 AM
witch framework is best
Laravel or Yii or cakephp ?
 
@PaulCrovella That's... a bit of a stretch. Especially when you link to a question titled "learn regular expressions"
 
laracackyi is
 
hello all
 
@MukeshKumar Death by a) train b) plane c) truck?
 
@PeeHaa laracackyiigniter
 
11:21 AM
@MukeshKumar phpquery
 
If the question "how do I combine N regexs into 1" comes up often, then there should be no problem finding a suitable dupe for it.
 
@MadaraUchiha the title of the target question is irrelevant, the answer has what they needed
 
When all options are horrible I chose a chance card
 
@PaulCrovella It's like someone having PHP array troubles and you link to a duplicate that explains how to write PHP (including arrays).
 
@peehaa plane
 
11:23 AM
Yes, technically it contains what they wanted, but let's be real here...
 
bullshit. do you speak regex at all?
 
@PaulCrovella Sure
 
can anyone help me with MVC?
 
@astrosixer the framework you created earlier?
 
@astrosixer That does not make any sense
 
11:25 AM
hehehe
 
@MadaraUchiha so you honestly expect an answer that covers how to merge N arbitrary regexes to be more useful to that person than one that deals with the basics of character classes, alternation, and such
 
@PaulCrovella Yeah, definitely.
 
@astrosixer Yes
 
Much more than a general "this is how you regex" question, for sure.
 
then you didn't read their question
 
11:26 AM
I did'nt create it i got it from somewhere else...
 
@astrosixer so you develop it in asp.net?
 
@PaulCrovella If you feel like I'm wrong, close the question again. I won't dispute it.
I'm still thinking that there's something wrong if we're closing a ton of questions as a super generic (and kinda rude sounding) question.
 
@SergeyTelshevsky its php that i know
 
Even if it's a high voted canonical.
 
if you think it sounds rude, edit it
 
11:30 AM
@astrosixer MVC framework is for asp.net, you may use some of it's logic in PHP but you may not use the framework
 
@SergeyTelshevsky the imagepng() function is failed to create the thumb image with the new name in the same folder as to which I uploaded the original image
 
@astrosixer how is that related to MVC?
 
@NikiC You were pretty late … already after midnight CEST :-P But thanks anyway
 
hi
 
@SergeyTelshevsky you are right I think, only the modal ,view ,controller idea is using. That logic.
 
11:34 AM
im just a beginner in php.. just needed your help
 
@astrosixer it doesn't make any sense... "only the modal ,view ,controller idea is using"
 
is it possible to show file upload progress without using ajax
 
@astrosixer please formulate the question first, then post it to the stackoverflow QA part
 
or is a hosting with AJAX required
 
11:35 AM
heheheh
 
your host doesn't need to support AJAX to do AJAX
 
WTF is going on in here :P
 
heck, you don't need AJAX for file upload progress these days, I think
 
@Andrea okay... im a noob..
 
11:36 AM
there's some way to do it in JavaScript
 
@techno are you trying to upload to some host from a different host?
 
the host supports jquery
but they said they told they wont do ajax
6
 
lol
 
@SergeyTelshevsky No... just uploading to a server
 
11:37 AM
Am I seeing that right that ext/socket is needed for raw IP sockets? no way with ext/streams? why?
 
@techno from the same server?
 
@techno I have to ask now
Who's your host?
 
@bwoebi maybe it provides the stream handler for tcp:// ?
 
godaddy in 3... 2...
1...
 
@Andrea hmm? Point is actually submitting ICMP requests
 
11:38 AM
is AJAX considered harmful or offensive?
 
@PeeHaa #NOPE #YOLO
 
yes it is
 
@bwoebi there's a tcp:// stream handler IIRC. but maybe ext/socket provides it
 
I'm from Rotterdam dude
Ajax sucks
:P
 
@Saitama Ok I using the logic of MVC in php..but what i wanted to know is how to create an thumbnail in a custom mvc .
 
11:38 AM
@Andrea not talking about TCP…
 
Maybe udp:// too
 
@techno Ajax /xhr are just requests like any other
 
@Andrea udp and tcp are built upon IP… but I can't access the raw IP directly?? (or icmp)
 
Helpppppppppppppppppppp
 
@PeeHaa is AJAX a sexually transmitted disease?
 
11:40 AM
 
@PeeHaa I thought you were from some far away village (achterhoek?)
 
@astrosixer Maybe this can help, but i dunno for sure stackoverflow.com/questions/11376315/…
 
I'm using a same server .... i need to upload a file using php
and i need a way to show progress to the user
 
@HamZa lolwut
nope :P
 
11:41 AM
lol
 
@PeeHaa Netherlands?
 
@techno who is your host?
 
@RonniSkansing haha, remember that one
 
@SergeyTelshevsky Something like that yeah en.wikipedia.org/wiki/AFC_Ajax
 
@techno use AJAX, it works
 
11:41 AM
@MadaraUchiha Site Ground
 
@littlepootis Nope Rotterdam Nigeria :P
;-)
 
@SergeyTelshevsky so it will simply work?
 
there are many examples on net with ajax .. but i dont know it will work
 
@SergeyTelshevsky hehehe
 
11:42 AM
@SergeyTelshevsky :P
 
@techno try it
 
And maybe even learn something from it
 
@SergeyTelshevsky I just chatted with their support
-sales support
 
Thats unneeded
 
they told it wont work
 
11:43 AM
wut.....
 
lol. Upselling FTW!
 
sales support told you AJAX won't work?
 
@SergeyTelshevsky yeah
 
@techno They were lying or misinformed.
AJAX will work.
 
@MadaraUchiha thanks :)
 
11:44 AM
It's sales so at least they were lying
 
good to know that
i was going to cancel my hosting..
 
As will jQuery, as will MooTools, as will React, as will any other goddamn JavaScript ability, because it has nothing to do with that host you're on :)
 
@techno you better do this ASAP
 
@MadaraUchiha They were just doing their job
 
@MadaraUchiha okay :)
 
11:44 AM
@MadaraUchiha brb writing a node app
 
@SergeyTelshevsky what?
 
@littlepootis A sale's rep's job is to lie to you, sure.
 
ha ha
 
But lie to you in a way that makes you want them more, not less
 
@Saitama creating thumbnail from controller while uploading an image and store that thumbnail into database. I have coded it but only problem is it does not create the thumbnail image
 
11:45 AM
the poor guy may not have tech knowlege
 
@techno Hence, lying or misinformed
 
@MadaraUchiha yeah..
well me??? im just another noon
*noob
 
@astrosixer Have you debug-ed your code yet??
 
@MadaraUchiha because you didn't pay attention
 
how the crap can you work sales, or support, or sales support even, at a web host and not understand at least the basics of the technologies involved
 
11:46 AM
I really liked these lines:
$escaped_values = array_map('mysql_real_escape_string', array_values($cols));
$stmt = $this->db->prepare("INSERT into $table ($columns) VALUES ('$values')");
 
@PaulCrovella lol
Welcome to the real world :D
 
@tereško hehe that is funny
 
my sales guy used to be CTO at his previous company
 
@tereško Gotta admit, that's actually funny :D
 
@Saitama yes even the thumbnail image get stored in the database but not the thumbnail image is creating should i post code here..
 
11:48 AM
@PaulCrovella you know almost each support has a script for almost any situation? :)
 
Our salespeople are freaking wizards, truly. But they don't know jack about how it really works underneath, nor they need to.
 
@Saitama
public static function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale) {
        list($imagewidth, $imageheight, $imageType) = getimagesize($image);
        $imageType = image_type_to_mime_type($imageType);

        $newImageWidth = ceil($width * $scale);
        $newImageHeight = ceil($height * $scale);
        $newImage = imagecreatetruecolor($newImageWidth, $newImageHeight);// This is the image dimension we want to set
        switch ($imageType) {
 
@MadaraUchiha not the ones that are communicating with clients
 
thermal googles are so expensive =(
 
so.. this one will do for me
even-though i will be uploading files of any format..
 
11:51 AM
@MadaraUchiha the salespeople I've worked with have been a healthy mix, but even the least tech literate had the good sense to ask us about shit they didn't understand
 
@tech TRY IT =)
 
can someone give me a example project which is noob friendly :)
@RonniSkansing okayy
 
@PaulCrovella I once had a very technical sales guy. That was really nice to have
Prevented a lot of clusterfucks right at the door
 
i take it none of you actually know the answer then - so really this has been a complete waste of time. — sjingo 1 min ago
 
11:53 AM
@Gordon I would not recommend this guy to do that considering his level, also, I think in your case it's a bad recommendation
 
Said the guy who just got 4 answers
I'm starting to regret reopening that.
 
First job on new job is on Frydaii.. never tried that before.. go to new job, go to weekend!
 
@MadaraUchiha Soooooooooooo hard not to add a snarky remark...
 
@PeeHaa word, I've had a couple of those too... probably my least favorite was one who was just technical enough to be dangerous though, she started quite a few clusterfucks right at the door :/
 
@SergeyTelshevsky imo its a prime example for that refactoring
 
11:56 AM
@Gordon creating a class per mime type?
I'd say it's an example where polymorphism is a total overkill
 
@PaulCrovella why would she do stuff like that just at the door? does she feel no shame? :O
 
You've gotten 2 correct answers to your very vague question. You've completely ignored anything we said about editing and clarifying what you want, and you're complaining that this was a waste of your time? I'm closing this question, and I apologize @WiktorStribiżew for disputing his decision earlier. — Madara Uchiha ♦ 13 secs ago
 
@MadaraUchiha lol, exactly why "close & rtfm" is appropriate in most cases
 
@Naruto none at all, actually
 
my kind of woman ^^
 
11:58 AM
@SergeyTelshevsky not per mimetype as given in the switch case but per gif, png, jpg. then move the switch/case into a factory that just knows how to create the appropriate image objects
 
@Gordon move that to a separate function - yes, use strpos - yes.. but not polymorphism IMO
 
!!eval $foo = mysql_real_escape_string('no connection'); var_dump($foo);
 
[ hhvm-3.8.1 - 3.12.0 ] Warning: supplied argument is not a valid MySQL-Link resource in /in/WUc9K on line 1 bool(false)
 
anyone had any xp with rescaling svg images?
 
[ 7.0.0 - 7.0.5 ] Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /in/WUc9K:1 Stack trace: #0 {main} thrown in /in/WUc9K on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
 
12:01 PM
@Naruto Rescaling... SVG images?
 
[ 5.5.0 - 5.6.19 ] Fatal error: Call to undefined function mysql_real_escape_string() in /in/WUc9K on line 1 <br/><i>Process exited with code <b title="Generic Error">255</b>.</i>
 
I think the entire point is that SVG scales itself..
 
@Naruto they're vector, not raster, so they scale by themselves
 
@Saitama imgpng() function is not working it shows cannot write or create the image in the class Image
 
ah.. I had absolutely 0 idea :P so basically I don't need to scale them, just set widths and heights of the img?
 
12:02 PM
@astrosixer do you have the php-gd lib installed.....?
 
@Naruto yes, or use the browser zoom :)
 
Yes.. I tried creating thumbnail of image with plain php. Its working fine....
 
@LeeDavis Levi
 
ThW
@Naruto that is only half true, svgs still have a size and a raster. The vectors need coordinates to work with. Scaling up works fine but scaling down can result in blurry images. For small images (icons and the like) you still have to manually align and optimize the lines. To avoid that you will need HiDPI monitors :-)
 
@Saitama i dont whether php gd lib installed or not but i have created the thumbnail in plain php
 
12:14 PM
@ThW TIL, I had the exact same problem on an Android app!
 
@ThW For some reason I have the feeling that giving your visitors free monitors is easier than fixing the image
 
ThW
@PeeHaa Well, mostly I end up recreating the icon for the really small sizes (16px, 22px).
 
Can't you just create the smallest version an scale it up instead?
 
12:43 PM
evenin
 
Heya @AnmolRaghuvanshiVersion1.0
 
dat name though...
 
ThW
1:01 PM
@PeeHaa Yes, but 48px allow for a lot more details
 
True
 
Never thought I'd say this... I just used traits...
 
Oh no, I'm scared. The Optimizer memory leak that's breaking all my tests... is with alloca
 
@Andrea it was nice knowing you
 
1:07 PM
@Andrea then there's just some free_alloca() missing…
 
@AnmolRaghuvanshiVersion1.0 Yeah. Too broad
 
@bwoebi yeah, adding it appears to fix
@FlorianMargaine adieu
 
@Andrea so, why are you scared?
 
@bwoebi before I was wondering if it was some sort of complicated cross-platform memory allocation issue
it's not, it's lazy coding that only works on a machine where use_heap is ignored or something
 
@PeeHaa it makes me sad, that schools are still not teaching the basics of chaos theory ... especially in places like Sweden
 
1:15 PM
Ah, it's not some uncautiously modified code. The function was written in a single commit. Guess Dmitry just forgot the free, then.
Makes me wonder why it doesn't leak on some platforms.
 
heh
 
I am kinda serious
I was thought that in university like 10 years ago
ahh, fuck .. and now I feel old
 
@tereško there's a lot of critical thinking stuff kids really should be taught
 
@tereško :P
 
some basic statistical, philosophical and psychological tenets would go a long way
 
1:19 PM
then again, it was a fluke, that I got very non-standard education
 
I didn't understand chaos theory until I started learning JS
 
hehe i started teaching php to some college student syallbus is still teaching mysql_ and outdated stuff..
 
non-standard ;)
 
Holy fuck that wikipedia banner is huuuuuge
!!wiki Elementary event
 
In probability theory, an elementary event (also called an atomic event or simple event) is an event which contains only a single outcome in the sample space. Using set theory terminology, an elementary event is a singleton. Elementary events and their corresponding outcomes are often written interchangeably for simplicity, as such an event corresponds to precisely one outcome. The following are examples of elementary events: All sets {k}, where k ∈ N if objects are being counted and the sample space is S = {0, 1, 2, 3, ...} (the natural numbers). {HH}, {HT}, {TH} and {TT} if a coin is tossed twice...
 
1:19 PM
@Andrea sorry
 
Like really REALLY REALLY huge
 
@tereško don't worry. English spelling makes little sense :D
 
@PeeHaa I don't see it :/
Does it count as an ad?
 
@PeeHaa I see one but it's tiny. Screenshot?
 
That's like half my screen
 
1:21 PM
Huh, maybe they're rolling it out to selected users.
That reminds me...
 
@NikiC For ad blcokers it shouldn't
@Andrea I feel so damn privileged right now...
 
@PeeHaa not sure getting an obnoxious banner is a, uh, privilege :p
but maybe they really like you. maybe you're special
user image
6
There we go. Thank you past me.
 
lol still epic
 
ikr :D
I think I made it during one of the scalar type debates or something
No, it was earlier. Something was happening in May 2014. Anyone remember?
 
mysql killing?
 
1:25 PM
No, that was September
 
:P
 
@Andrea I take stuff like this seriously. You can expect others to to be good at something, if you don't intend to be better :D
 
how the fuck do I export a (ext/socket) socket as stream_socket (ext/stream or main/streams) [without recurring to /proc/ fs hacks…]
 
@PeeHaa super annoying
 
1:29 PM
HI, i have this datetime 2016-03-30 06:05:47 -0400 and i want to cut -0400 using regex because it changeable,can someone help?
 
@Devilion substr -6?
^ no need to star that...
 
hey, hey
 
thanx :D
 
just two more days until phpinfo() egg logo day!!!!
the day of the year when the PHP logo in phpinfo() changes
we have a new one this year :3
are you excited? :D
 
Good morning
 
1:32 PM
@ircmaxell Heya
 
Morn @ircmaxell
 
I'm annoyed by PHP: I can covert a stream to socket. I can create a socket of an arbitrary type (e.g. raw IP) … but I have no way to convert socket back to stream for use in stream_select() (and no way in stream to create a stream of arbitrary type)
ARGH
 
@Andrea Hyped!
 
oh, and this year's egg day is a very special egg day. it's also a Friday!
 
I have that urge to create a socket_export_stream() function…
 
1:34 PM
Basically, you know how you don't open links on Fridays? Well that'll be especially true this Friday
 
phpriday
 
@Andrea you make me want to check phpinfo() source now...
 
@FlorianMargaine make sure to git blame while you're at it :)
but uh
maybe not spoiling yourself might be a good idea
though unless you actually can decode base64 PNGs in your head, you can do that even when reading the source code
 
what's the good word?
 
@Devilion is this the timestring you cut T and Z from yesterday? Because if it is, you might be better off parsing it into a DateTime object instead and reformat it to your needs. But I told you that yesterday already.
 
1:39 PM
@ircmaxell ?
 
@ircmaxell please. Please unfuck ext/stream or ext/sockets.
 
(what's up)
 
@ircmaxell have you heard of updog?
 
@ircmaxell is that an american English expression?
 
!!urban good word
 
1:40 PM
[ Good Words ] A response used to express absolute agreement, reserved for situations when someone is preaching the truth.
 
@Andrea yes I have
 
@ircmaxell darn :p
 
@Gordon right, and that's not quite equivalent to "what's up", hence I wonder
 
@ircmaxell everything I say
 
1:41 PM
Today I fixed two PHP bugs, yay. Only one of which was my fault!
 
@bwoebi look at the right UD article ;-)
 
@ircmaxell oh okay :-)
 
So, my great achievement for PHP this year is making it finally warn you when you've been using JS too much and try to add strings together with +
It's the first time I've tried to fix OPcache's handling of something myself. Disabling optimisations, yay :D
Now I need to connive a new scheme to slow down PHP, as part of my contract with Guido
 
@Andrea you want to do python?
 
/me reads _zval_get_long_func_no_isy and wonders what it means until realizing that it's actually zval_get_long_func_noisy
 
1:45 PM
@FlorianMargaine I was hired by Guido to distract people from Python 2/3's failure by making PHP even worse
 
^ and failed miserably, we know…
 
@Andrea ah, but nobody cares about php
php is already the retarded kid
 
@FlorianMargaine huh? what happened?!
 
@bwoebi php has always been the retarded kid...
 
@FlorianMargaine that's news…
 
1:47 PM
... no?
 
obviously… PHP has always been the smartest language ever available … you didn't know?!!?
3
 
sorry, I was writing in Lisp
 
@bwoebi I mean, Rasmus Lerdorf is widely hailed as a genius and the world's greatest programmer. Better, even, than Stroustrup.
 
"More good code has been written in languages denounced as bad than in languages proclaimed wonderful - much more." - Bjarne Stroustrup
 
@FlorianMargaine where everything is reversed in meaning you mean?
 
1:48 PM
even Bjarne thinks PHP is good
2
 
@Andrea who is Stroustrup?
 
@FlorianMargaine invented C++ by cobbling every poorly-conceived and poorly-implemented programming language idea onto C and adding a ++ at the end
 
... I should've added /s
 
if($count == 1 || $count == 4 || $count == 7) how do i make this more efficient for when $count is over a hundred as it would be silly to continue like that
 
@MatthewSmart what are you trying to figure out? if it's a multiple of 3, plus one?
 
1:51 PM
yes
 
@MatthewSmart Do you know about the % operator and what it does? You might find it helpful here.
 
I dont think so
 
is java compiled lang or interpretor ?
 
Okay, % divides one number by another and gives you the remainder. So 3 % 3 is 0, 6 % 3 is 0, 4 % 3 is 1, 2 % 3 is 2
 
1:52 PM
@Phoenix not quite either
@MatthewSmart can you see how you could use % to do what you need?
 
47
Q: Is Java a Compiled or an interpreted programming language?

EduardoIn the past I have used C++ as a programming language. I know that the code written in C++ goes through a compilation process until it becomes object code "machine code". I would like to know how Java works in that respect. How is the Java code analyzed by the computer?

 
kind of
2 secs let me try and work it out
 
@Andrea ty
 
if( $count % 3 == 1) ?
 
if( $count % 3 === 1)*
 
1:55 PM
@MatthewSmart Yeah, that would work. I was going to say ($count - 1) % === 0, which does the same thing, I think.
 
i see how yours would work aswell
 
!!eval var_dump((1 % 3), (4 % 3), (7 % 3));
 
[ 5.5.0 - 7.0.5, hhvm-3.8.1 - 3.12.0 ] int(1) int(1) int(1)
 
@MatthewSmart this worked properly, I hope?
I'm curious what you needed it for
 
2:43 PM
@PeeHaa, looks like you just got schooled
> Yes rand() is not completely random since it uses the system time but depending on how random it has to be it can be useful.
 
o_O
 
it one of those "internet makes me sad" moments
 
@tereško hehehe
 
@tereško well, it's true in a way. But just in a way.
 
> throw new Exception("This code is unreachable but the compiler isn't clever enough to realise that");
^ found in lib code
 
2:52 PM
I'm still waiting for tereško to join my "Please deprecate the var keyword just to annoy crappy wordpress plugin builders" foundation.
 
Hello is there any neat way, function based, other then a for loop to return two arrays into one two dimensional array , my first array has file names 'complete paths', my second array has the base name 'file name stripped from it's path' , i want them returned by couple in one array so i would access them like so , array(3) { array(2){[0]=> string(10) "full path",[1]=> string(10) "basename"}, array(2) .... and so on
 

« first day (1992 days earlier)      last day (2970 days later) »