« first day (1825 days earlier)      last day (3133 days later) » 

Anonymous
12:00 AM
@Jesse also if you are interested in a blog app github.com/fastpress/docs
 
I dont really like using other code with my code
Last thing youll catch me doing is loading up jquery because I want to send an xhr
 
Anonymous
same here, but what you said does not add up to what I am suggesting
 
I am not interested in a blog app :)
 
Anonymous
You could help make it if you want.
 
Anonymous
we have too much shortage of contributers
 
12:05 AM
Aw man, cmon
I got a day job
as a developer
 
Anonymous
so ... having a day job + being a developer = forbids you from contributing to an open-source project ...
 
Anonymous
makes a perfect sense.
 
Depends on the project
a blog ... nah man
Are you devving a game?
Sure man
 
Anonymous
it's not just a blog, but it's cool.
 
Anonymous
no hard feelings :)
 
12:11 AM
Is it yours?
I don't want to mistakenly insult anyone
Ah, yes it is
My bad dude
 
Anonymous
The code is bad, but that is the reason I am asking for help.
 
Anonymous
And yes, it is mine
 
Anonymous
Insults are actually a feedback, so let them out
 
I'll help if it somehow gives me more SO rep
2k rep would be nice
 
Anonymous
eh, you want to get paid in advance? smart move
 
12:14 AM
lol
 
Anonymous
I will give you 50 reps now, and the rest 1950 after the project is complete.
 
haha :D
Just +50 bounty all my answers LOL
Funny
 
Anonymous
I gave you 50. That's enough
 
Anonymous
Now your ass is mine,
 
Anonymous
GET TO WORK
 
12:16 AM
lmfao
the automatic thing later will likely remove those
unless you genuinely liked those answers
idk
 
Anonymous
nah, if it is 50, it won't be removed.
 
i feel dirty now
unsolicited dirty
 
Anonymous
But, how dirty are you going to feel when I .. ( ͡° ͜ʖ ͡°)
 
Anonymous
you can join the gitter room feel free to drop an idea whenever you can, or just discuss about beer
 
I'll do that
You got my oauth ... My empty github data is yours ...
ooh
 
Anonymous
12:21 AM
you can press up to edit your post
 
Anonymous
but that gitter page is not mine, I hope you know that by now.
 
nice
joining your gitter tho
 
Anonymous
Gitter is an instant messaging and chat room system for developers and users of GitHub repositories. Gitter is provided as software-as-a-service, with a free option providing all basic features and the ability to create a single private chat room, and paid subscription options for individuals and organisations, which allows them to create arbitrary numbers of private chat rooms. Individual chat rooms can be created for individual git repositories on GitHub. Chatroom privacy follows the privacy settings of the associated GitHub repository: thus, a chatroom for a private (i.e. members-only) GitHub...
 
Anonymous
remember, if I don't get any result by the end of the month, I will take back 50 reps plus interest from you. @Jesse
 
Anonymous
now off to sleep
 
12:33 AM
LOL
Ugh, nvm the guy deleted his answer, what a waste of time
 
Anonymous
were you writing an answer?
 
Nah man. Hard to explain.
 
Anonymous
the title indicates some wrong doing to mysqli
 
he had a misspelling in his question (bindparam vs bind_param) so I answered it and he updated his question with the underscores (including the error message) and said "same error message" but he would NOT get the same error message with what he had ever, but wouldnt provide one, idk anyway
He claimed that he put the question and error message into SO with the underscores missing by mistake and did not provide a new error message when asked
So he probably realized that I was right and then deleted his question, waste of time
Yea, when pasting 30 lines of code into SO and a pasted timestamped error message, its common to remove random underscores right ...
 
Anonymous
Meh, tough luck
 
Anonymous
12:39 AM
I almost never answer without checking users reps / profiles (for answer accepts rates)
 
I dont want to do that but, its getting that way
Cant get much rep burning 40 minutes on a deleted question
 
Anonymous
yeah, it feels wrong but there are some users who have 20 questions without one accepted answer.
 
Wait until they bounty it, LOL
Sometimes you see people with super high rep moving into a new field of programming, like a C+ guy going to html, and see some crazy downvoted questions.
I guess they dont care since they have high enough rep
 
@LeviMorrison question about void vs null. Would the union types RFC allow function() : A|B|void {} because this edge case seems like a showstopper in favor of null.
 
Anonymous
Yeah, or most of the newly created accounts are by the same people just ashamed to ask ridiculous questions, as for the bounty though, bountied questions are outside the scope of my knowledge so no gold mine there for me :/
 
12:45 AM
@samayo - I like poking around the bounty questions.
Sometimes you can just spend an hour or so learning how to do what they want and then answer their question :D
So you get to learn too
 
Of course you could prevent void from being used on type unions, but it makes void look like a weird design decision.
 
Anonymous
Yeah, they are more relaxing and rewarding. Even if you don't get the reps, you learn something from it. Have you answered (accepted) a bounty question @JacqueGoupil
 
Someone must have me blocked :/
 
Anonymous
Nope @marcio is talking to himself :P
 
@samayo - careful, his pic looks like he'd probably hunt you down and take you out
:p
 
Anonymous
12:50 AM
@Jesse if anyone blocks or rather ignores you in this room, you can see their messages, only they won't see yours. That is what ignoring someone allows you to do
 
don't worry, I can see you both :P
 
:o
hides
 
I can see deadbeef
4
 
Anyone see The Martian yet?'
 
Anonymous
nope
 
1:02 AM
I thought it was pretty legit .. But I like space movies
Not the traditional space wars etc, like stranded in space movies
 
I am thinking about passing coupon code as get variable. Are there any security issues with it?
 
@user3692125 - Yes and No. What is happening on the other end to the coupon code? Is the coupon code supposed to be hidden from the user?
 
@Jesse No, the user knows the coupon code. He inputs it actually.
 
@user3692125 - That's what GET is for. I would only worry about mangling of the GET data if it contains values that are url encoded and you need to do things on the other end, and of course if you are interacting with a database you are going to want to clean that up (aka, little bobby tables)
 
@Jesse Sorry, too sleep deprived. You're right. Thanks!
 
1:21 AM
I like turtles
 
That is random
 
You have not heard of the turtles kid?
@user3692125 - Pretty old, but here it is
And I just watched it 10 more times
 
> In practice, is the intent to add a "no return at all" type of function (ie, $a = foo() is a syntax error now where it was not before)
When this guy says "syntax error", does he really mean it?
 
Good question
yes and no, right?
More like a syntax error as in the syntax is wrong in how PHP is handling this, but not syntax as in "you forgot that semi-colon"
 
1:39 AM
no no no, read the entire email.
 
I did
I think they mean 'syntax' as in, 'i should not be able to do this'
 
Yeah, C doesn't have a syntactical procedure/function distinction
 
yea, it's the second time he brings it up, I hope he knows it won't be possible to disallow the assignment and further usage of $a consistently with a compile time check on PHP.
 
@Andrea But in C you have to declare variables, whereas in PHP you don't so the implicit null return is really the result of the runtime. i.e. void is technically null as far as PHP is concerned.
That's a good thing really. PHP makes null safer.
Well, safe-ish
 
I think, function(): null {} is making much more sense than void. Ok, we loose the compile time check, but that's not really the reason I wanted void anyway.
 
1:52 AM
Morning's roomies
 
1) functions declared with `function(): void {}` will still return null (so void is a little lie)
2) null interacts better with union types
3) null is already reserved
 
void will just never make sense with PHP because of implicit returns
But hey, we still document functions that don't return as void
implicit null is a well-defined language feature
People should just get over it
 
@Sherif the point is that void or null as ret types would allow interfaces to be more complete (even on this topic null has advantage)
 
@marcio Depends on how you look at it, I suppose. If the expectation is that void should enforce the function does not return anything, then yea. If the expectation is that the existing behavior stays in place (i.e. implicit null) then you just have to force null.
Oh wait, I read that as "more complicated" not "more complete"
heh
 
yup, If we consider that a type represents a range of possible values, null is a type and void is a weirdo because there's no much value in an empty range of types in a language that do implicit return of null ^^
 
2:02 AM
True
void may just add to PHP's already confusing dyslexia
Is it a double is it a float is it a plane... Who knows!
The fact that you can cast to (unset) to me is just one of those many examples where PHP is definitely not helping make things obvious.
So I would definitely appreciate it if no one continued down that trend :)
 
ok I don't love void anymore, null ftw.
 
I mean does no-one else find it confusing that you can cast something to (unset) but not (null) ?
 
@Sherif the only people with this knowledge are here on room 11, at least I've never seen (unset) on wild
 
Or the fact that casting something to (int) or (integer) are the same and (string) and (binary) are the same and (float) and (double) are the same ... but (unset) and (null) are not!
Oh I know why it does that. I'm just poking at the logic that someone actually thought this was a good decision at some point in time.
Oh yea, you won't see it very often. It's rare, but people do use it. Which is how I first came to discover that you could even cast to something (unset) in the first place.
I think it was like 5 years ago that I found it and someone asked Rasmus about it on twitter.
The response was like "Yea unset is a type..." and I'm like ... "WAT?!"
 
that must have been an embarrassing moment (for him)
 
Anonymous
2:29 AM
You know you are ready to sleep when this doesn't make sense to you
 
Anonymous
> Highest scoring answer that outscored an accepted answer with score of more than 10 by more than 2x
 
'mornin
and lol @samayo
 
Anonymous
damn, it's morning already .. gotta go to sleep now .. :)
 
sleep well
 
Anonymous
I need to see at least one movie before I sleep
 
2:32 AM
lol. isn't it morning already?
 
Hi, , can someone help sorting an array in ascending through a for loop?
 
xD
but I can not do it, and look in google, otherwise you would not be asking.
 
I don't think I understand what you just wrote.
 
2:39 AM
I'm sorry that my language is Spanish
my array is an avanced json, can help me?
 
1. convert json array to php array with json_decode
2. use normal php functions to sort array in ascending order
3. put your array in json using json_encode
 
I already did
can check my code?
 
Good day friends!
 
$data = file_get_contents($jsonfile);
$games = json_decode($data, true);
$gamesnum = count($games['data']['games']['game']);
$gamesnum = $gamesnum-1;
$home_team = '';
$away_team = '';
for ($i=$gamesnum;$i>=0;$i--) {
$home_name_abbrev[$i]= $games['data']['games']['game'][$i]['home_name_abbrev'];
$hometeam[$i]= $games['data']['games']['game'][$i]['home_team_name'];
$away_name_abbrev[$i]= $games['data']['games']['game'][$i]['away_name_abbrev'];
$awayteam[$i]= $games['data']['games']['game'][$i]['away_team_name'];
$status[$i] = $games['data']['games']['game'][$i]['status'];
$etime[$i] = $games['data']['games']['game'][$i]['first_pitch_et'];
$time = strtotime($etime[$i]);
$startTime = date("h:i", strtotime('-30 minutes', $time));
 
2:53 AM
this seems like a deeply nested array.
 
i need order variables in descending
 
well, it looks like it should work. what's the problem?
 
when printing the variable such as "$ home_name_abbrev [$ i]" is printed in ascending order and need in descending order
 
oh. then remove the $i on the left of the = sign
$home_name_abbrev[]= $games['data']['games']['game'][$i]['home_name_abbrev'];
 
LGL
What is the best way to compress image? current Im using Imagick but Im losing a lot of resolution :/
 
3:01 AM
if I understood correctly
 
You can not erase it: /
I will send all code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Apuestas</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.4.2.js'></script>
<script type='text/javascript'>
$(window).load(function(){
function getStorage(key_prefix) {
if (window.localStorage) {
return {
set: function(id, data) {
 
try it. it will not erase it.
 
I already try and not work
run the code on your server so you can understand
i need order "HOU Astros" first and second "KC Royals"
 
 
1 hour later…
4:19 AM
Hi anyone with PHP regex expertise?
I have a sample regex I'm working on here regex101.com/r/hK1gL9/11
What I want to do is get all the text around the word the 0-45 in length.
Yes white space can be captured in a group
So basically any string should be captured around the word the
 
Sooooo... what shouldn't be captured?
Should newlines be captured?
 
Basically anything around the word the
 
Sooooo.... ".*"?
 
I actually tried that originally. regex101.com/r/hK1gL9/12
But as you would notice in that example the last few lines are not captured.
 
(.{0,45})the(.{0,45})
Don't make it un-greedy.
Also, should false positives be matched?
e.g., "the" in "theme"?
 
4:33 AM
yes it should be matched
them, theme, they
 
And, in your first example, you have HTML tags... Should those tags be included as well?
 
I think I have a working sample. However the last line is not matched
'(?s)(.*?)the(.*?)(?=the)'
Yes including HTML tags.
I"m updating that demo
 
Why the lookahead?
 
The lookahead, so the group capture stops by the time it finds another the
 
So... You want to match

abcd the abcd the

but not match

abcd the abcd

Right? That's what the lookahead is doing...
 
4:39 AM
Is there a way I can just get that abcd and put them in a captured group?
Group1: (abcd) the Group2: (abcd)
And if the entire text is like this
abcd the abcd the efgh
the result will be
Group1: (abcd) the Group2: (abcd) the Group3: (efgh)
Make sense?
 
So, you want

abcd the efgh the ijkl the mnop

as the following, separate groups:
abcd
efgh
ijkl
mnop
 
exactly
is that possible?
 
$lowercaseString = strtolower($originalString);
$sizingParts = explode("the", $lowercaseString);
$workingParts = array;
$curOffset = 0;
foreach ($sizingParts as $sizingPart) { // Yep, Egyptian braces. Suck it.
    $workingParts[] = substr($originalString, $curOffset, strlen($sizingPart);
    $offset += strlen($sizingPart) +3;
}
Note, not tested.
That's really not something that Regex is that good at.
 
I see. So you think this can't be done via regex?
I see.
 
It can be done... but really, cthulhu fhtagn. It'll be far faster to do it by getting the sizes of the snippets you want, then pulling out the strings you're really after, and easier to maintain in the future when the requirements inevitably change.
 
4:51 AM
I thought regex be-all and end-all when it comes to string searches.
 
Regex is a write-only tool.
Here's regex to almost correctly pull an email adress: ex-parrot.com/pdw/Mail-RFC822-Address.html
 
wtf
 
And, here's what happens when you try to parse HTML with regex... stackoverflow.com/a/1732454/4854216
Regex does have its uses... but when you start layering in conditions and edge cases, it's time to switch to something that has if statements.
 
Now, it wouldn't surprise me if there are people who do regex as full-time job.
Thanks heaps!
 
Those are called Perl programmers... and that language also has a reputation as being write-only.
 
5:06 AM
moin
 
Morning
 
m1k
Hello
Good morning all
Dear community members could you please rectify following issue
0
Q: Handling SessionID parameter tampering in php

m1kDuring vulnerability scan of my application when i performed tampering of post request of PHPSESSID by giving single quote at the end is leading to sql injection. GET /indexdup.php HTTP/1.1 Host: site.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 Accept...

 
"Rectify"... Silly word... Reminds me of Tron: Legacy.
 
@JoeWatkins I can't seem to find any reference usage for ZEND_NS_FE. See http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_API.h#95

Trying to register a namespaced function. Where should I be using ZEND_NS_FE? I'm guessing it has to be registered in a function table but I'm not sure which.
 
@m1k You asked that seconds before posting here. Why don't you wait around a bit, and see why your question gets closed, follow the advice in the many, many, many versions of that question that already have amazing answers... and since you at least show a basic interest in security (which really is a good trait around these parts), go spend some time at owasp.org learning security basics.
 
5:19 AM
in the global one, in zend_module_entry zend_function_entry[]
 
Cool thanks.
 
so someone posts this in skype yesterday, says "we could probably use this" github.com/jwagner/smartcrop.js response was "cool, does it detect boobs?"
people who work on adult sites have a strange kind of focus :D
 
Sounds like a fair call in that context.
 
totally, it's an "important question" ... which is really weird ...
 
@tereško : been using sf2 since 2.0 and you have saved me some time in the past
 
5:27 AM
@JoeWatkins should I specify the function entry table above PHP_MINIT and below the ext name in the main module_entry? Currently NULL.
 
morning
 
yeah, or forward decl for entries
moin
 
@JoeWatkins its just repwhoring
morning
 
I can't believe someone answered ...
 
-10
Q: what is stackoverflow re re re re rerer

Shafin M Salam► put returns between paragraphs ► for linebreak add 2 spaces at end ► italic or bold ► indent code by 4 spaces ► backtick escapes like _so_ ► quote by placing > at start of line ► to make links grfgfgfgfgfgfgfgf ► basic HTML also allowed formatting help » asking help »

^spam flag please
lol stackoverflow.com/q/33140537/1723893 check the php cod e
 
6:33 AM
posted on October 15, 2015 by nlecointre

/* by Naxilolz */

 
7:02 AM
Good morning
 
morning Epodax
 
7:21 AM
morning
 
Abe
7:33 AM
o/
 
o/
 
Abe
@Andrea @LeviMorrison when extending a method returning void, should i be allowed to change the return type? i imagine void being a "supertype"
class A{ function test() : void{} }
class B extends A{ function test() : string{} } // valid
 
What is: string {} ?
 
Abe
php7 return type
 
7:43 AM
Oh, didn't knew that thanks.
 
@Abe return types are invariant
 
Abe
@PaulCrovella they are invariant for now
 
morningninings
 
o/ morning
 
7:55 AM
@NikiC ping
 
8:11 AM
hello everyone
i have a qurious problem , i am using tcpdf to generate pdf of all orders in a for loop to print pdf of each order one by one
but it skips all orders and prints the pdf of just the last order
why so ?
 
@BhawinParkeria Without any code, how are we suppose to know? - And why not post it as a question on the site? :)
 
Anonymous
8:31 AM
 
good mornings
 
mornin
 
Monring
I have an infant loop issues I think pastie.org/10481888 and I am not sure how to break it.
I have tired to use "continue"
 
posted on October 15, 2015 by nlecointre

/* by Johnvox */

 
contrinue only lets you get faster to the next iteration
 
8:36 AM
what about break
 
break will let you stop the current loop
(I suspect that your issue is in the while and not the for)
btw, you variable names are shit .. seriously .. they all look the same
 
@tereško I am translating some old VB code and am using the variable names from there so I know whats what.
@tereško TBF I dont even know what to code does, I just know that it works to fix a problem haha
 
Wrap it in a function an call RETURN
 
OH in colleagues e-mail asking for ideas: "Dependency injection - Might need it, might not.". Deleted email.
 
Mogguh
 
8:46 AM
@Jimbo wat ?!
 
ping @NikiC really hard ...
 
@tereško Email:
 
moin
 
> I'm going to need tools for:

HTTP Client - to make HTTP requests to the API but I also need to be able to swap it out for a dummy client with the same interface so I can do dummy successes and failures, for testing purposes.
Testing - Does PHPUnit still cut the mustard? Opinions please.
Dependency injection - Might need it, might not. I want to be able to inject the URL to the API (again, I want the dependency on the <proprietary 5.2 framework> config file to be outside the lib) and of course the dummy HTTP client.
 
it might be a good idea to shop around for a better job
 
8:49 AM
In the process :)
 
8:59 AM
@Jimbo sounds like you should do a workshop around these things
 

« first day (1825 days earlier)      last day (3133 days later) »