« first day (2904 days earlier)      last day (2270 days later) » 
00:00 - 16:0016:00 - 00:00

00:04
Thanks @Wes
Wes
Wes
i didn't want to repeat what paul said, but for once i knew the answe :B
What did paul say? :p
Wes
Wes
to check the line from componere
 
5 hours later…
05:14
Anyone here?
I have a short bit of code, where one section executes, the other section does not execute, and I cannot figure out why
alert('potato')
var orderList =
{"BFLBambooBlueMix":25,"BambooBlackGold":100};
for (var product in orderList) {
if (orderList.hasOwnProperty(product)) {
putInCart(product,orderList[product]);
}
}
sendList(false);
alert("Hello! I am an alert box!!");
The first alert executes. The second alert does not
The solution is not the missing semicolon after "alert('potato')" I just checked.
Nevermind, I think I solved it
One of the functions is returning a fatal error
05:41
that's javascript :p
Hi, Can you people help me with an issue ?
I am new here
05:58
Just ask your question.
hi , i have made a post request to the url , its working on localhost but not on live server , any idea what might be the issue and how to bypass restriction if any
06:28
I am creating an offline billing page with php and javascript. All main calculations are happening using javascript since its offline. PHP code is used only to fetch and confirm the last bill number. When i use cache manifest to make page offline php codes are not working even if internet is there. Is there any soultion for this ?
install a webserver/vagrant/mamp/wamp and run your code on there.
SrinVost, check both the sending AND the receiving pages. If just one of them is different from the local, that could explain your issue.
06:47
hi
i have issue in paypal refund api
got response like:
Requested resource ID was not found.
{
"name": "MALFORMED_REQUEST",
"message": "Method type not supported for this operation",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST",
"debug_id": "85ba3ecb85ff2"
}
Hi
How can I get item_id value from this object ? 3v4l.org/Ma2Zl
> Within class methods non-static properties may be accessed by using -> (Object Operator): $this->property (where property is the name of the property).
@Exception: Are you looking for that?
@hakre got it thanks 3v4l.org/NkE19
07:36
morns
08:03
apparently this is a poem:
< > ! * ' ' #
^ " ` $ $ -
! * = @ $ _
% * < > ~ # 4
& [ ] . . /
| { , , SYSTEM HALTED
3
and it goes like
Waka waka bang splat tick tick hash,
Caret quote back-tick dollar dollar dash,
Bang splat equal at dollar under-score,
Percent splat waka waka tilde number four,
Ampersand bracket bracket dot dot slash,
Vertical-bar curly-bracket comma comma CRASH!
o/
08:39
moinsen
Wes
Wes
08:51
le morning
Hello there is something i have been trying to understand, how do i create a timed script in php
A script that updates like say every 1 hour
@BobbyAxe You might want to look into Cron Jobs.
A loop will be infinite and any other method i came up with just implies that the script never ends which is not good
Cron jobs?
@musafar006 any learning link please
You can Google it. It is pretty simple.
@BobbyAxe google it you'l find thousands of resources on this, there are even some cron job generators, which ill provide you with the configuration based on your specs etc
08:57
Yup that's how i got stuck with procedural style and never accepted PDO till date, i would like the newest and proper method
@mega6382 alright any thing i should watch out for ?
Morning.
Thanks everyone
Any time. :D
09:29
@Tpojka nice :P
!!friday
@BobbyAxe i) use supervisord to make a script be executed continually ii) record the last run time iii) wait a few seconds between runs. iv) Test if it's time to do the thing again.
@mega6382 Sure thing. :D How are yo doing?
extremely good, cause its friday, and how are you doing?
09:34
Pretty much well, too. Thanks. But I tend to behave that way regardless of day of the week. :D
Wes
Wes
09:50
@NikiC in php 7.1, do i have the guarantee that
if($array === []){ // then
    $array[] = "x"; // will result in
    assert([0 => "x"] === $array);
}
or is it possible that $array[] will start from an offset different from 0?
@Wes nope
the "next key" is never reset when elements are removed
Wes
Wes
@pmmaga 3v4l.org/nJgR8 interesting... can i rely at least on this?
which btw is what i actually want to rely on :P
i don't want that in a new function appending an element to an empty array will result in something weird
@Wes hmm.. I guess so, but I'm not sure
Wes
Wes
that should totally be a defined behavior btw
i have seen code and i do myself assert(array_values($foo) === $foo); to check whether the iteration order matches the indexes
so maybe entering a new function should reset the "next index" of array push
unless you allow me to peek at the "next index" of the array
@Wes ah, so the previous case seems to be just because it was an empty array so the copy doesn't care about the "next index"
@Wes I think that's not exposed :/
Wes
Wes
10:03
i forgot i needed the same thing also for non-empty arrays :B
yeah it's not
it probably shouldn't be. i just want to know if push() results in the same thing as if i recreated the array and then push()ed the value
yeah, not necessarily
Wes
Wes
except this must recreate the whole array in order to check that
10:20
@Wes simpler 3v4l.org/SZWhi
Wes
Wes
so the next index is always === count if the array is "normalized" in that way?
what about negative indexes, or something, if they are a thing now?
@Wes depends on your definition of normalized. if it means 0..n, then yes :)
if it just means "without holes" then you could subtract the array_key_first
Wes
Wes
hm?
@Wes this but yeah, for negative indexes it doesn't work yet. (for now, it will always jump to 0)
have you guys seen @Joe's new look?
Wes
Wes
10:31
@JoeWatkins what happened to the beard??
@krakjoe, Spain
President of the goto appreciation society, ex beard owner, biker, bi, also #php.
2.6k tweets, 1.8k followers, following 108 users
That does not look like an adult person's face
5
Nice Photoshop.
Wes
Wes
lol
seriously, bring back the beard, you look like a kid @JoeWatkins
"bring back the beard" lol
Wes
Wes
ah array_key_last is 7.3, damnit
Wes
Wes
10:56
@pmmaga the $a[] = "next"; trick is pretty bad anyway, as that copies the entire array as well :(
@Wes IIRC so does passing it to the function anyway :P but that's still cheaper than recreating as before
Wes
Wes
@pmmaga passing it doesn't trigger COW, only modifying it
hmm.. dunno why I had that idea then
Wes
Wes
i'm not sure that's what it actually does, i just think it does that, as that's how it should work :B would be quite expensive copying an array every time it enters a function
How can i loop 4 ul in 1 loop i dont want to repeat ul just want inner li
<ul class="tile__list grid-lisUi Initial_Screening h-100">

@foreach($applicants as $ap)
<li data-userId='{{$ap->global_Id}}' data-recurimentStatus='1' data-recuritmentProcess='2'> <a href='#' data-toggle="modal" data-target=".user-request" class='each-grid'>
<span class='name'>{{$ap->name}}</span>
<span class='designation'>{{$ap->presentDesignation}}</span>
{{-- <span class='present-company'>Pakistan Tareek Insaaf long name for show Pakistan Tareek Insaaf long name for show </span> --}}
11:26
@Tpojka but there is no feeling like, when its almost the weekend ljdchost.com/50500jc.gif :D
Heheh. Can't disagree to that. :D
11:44
how to split single array into multi dimesional array
[]
["name": "Admin" +"global_Id": "e6dd470d-60c4-11e8-9dcb-2c4138604667" +"id": 1 +"industryInWork": "3" +"expIn": "6" +"presentDesignation": "dgdgdg" +"titleofdegrees": "4" +"expectedSalary": "1" +"industry_interest": "3" +"job_process_status": 2]
@Noni By what criteria?
12:04
i want to sort via job_process_status
if 2 if 3 if 4
You have to post what you have (you did) and also how should look expected result. But here in chat is pretty much unreadable, even your array has some pluses from github/bitbcket c/p probably.
@Tpojka pluses from github/bitbcket c/p probably.(sorry for bad english )
i dont understand
Because of those extra characters, your array s syntacticly incorrect and thus hard to read.
oh sorry I just copy the result and past it
no iv just dd the code
you dd the code? into what?
oh means i just dd(array) and paste on chat
sorry for this
of=/dev/null is probably not a bad idea
Wes
Wes
@pmmaga i see you are up for php-src changes :P
12:25
@Wes hum?
> Your script was stopped while abusing our resources
Sorry, @Sjon :P
Wes
Wes
sorry :B read any of the outputs :B
@pmmaga let me just give the server some love :P
Wes
Wes
copy on write makes a 1:1 copy, rather than starting with an empty C array
that is a bitch if you do functional style kinda operations
the memory keeps growing bigger even if the arrays contain nothing
12:31
@Sjon :)
Morgen
@Wes I think that would be too slow for most cases. Maybe we could specialize the case where it's empty but I'm not sure
@PeeHaa buenos dias
evenin
@Tiffany you are just finding out? :P
Wes
Wes
@pmmaga when you "copy on write" you copy the array anyway, right? php should allocate an array of nexPowOf2(itemsCount($originalArray)), what it does instead is a straight copy of $originalArray's C buffer, even if it doesn't contain many elements
12:37
@mega6382 which? that wordpress sucks? or the article?
that the wordpress sucks
@Wes yes, because AFAIK doing a memcopy 1:1 will always be faster/more effective than recreating the array from scratch (which you would need to do if you want it to only take the necessary space)
@mega6382 I learned that a month or so after hanging around here.
@Wes that's.. not what "copy on write" means
@Wes there may be a smarter way to accomplish what you are saying but I can't think of one
Wes
Wes
12:38
i know what copy on write means
@pmmaga maybe if the array contains only integer indexes it could be faster, as i think you don't need to rehash when making the copy?
@Tiffany Let him who doesn't like JS and CSS in PHP code of application cast the first stone.
@Tpojka I can throw all the stones you want
tell me where, I'll do that right away
I'm a poet but I use stones instead of words. Here, I made this poem for you; it is a pile of stones.
@Wes but you still need to recreate it that way. with or without rehashing
That WP really sucks.I hope I won't need to work much on it any more.
Wes
Wes
12:46
@pmmaga i would love to try so much...
unfortunately i don't have the slight clue about how to do that :B
maybe there is a way to shrink it back after the cow, possibly that would be your best bet
Wes
Wes
doubt that
as shrinking would require hashing
... dunno
not for empty ones :P
@Wes not with that attitude
Wes
Wes
what attitude
you jumped in the discussion between me and maga and immediately assumed i didn't know what i was saying
also not the first time you are patronizing with me
you mean that attitude?
12:54
do you see the arrow next to my message?
it tells you which message it's replying to
Wes
Wes
yes. i did see that, so?
@Wes yeah, it's very easy to mess with you
@Wes so, if you want to have a clue, dive into the code and look at it, saying "I don't have the slight clue about how to do that" won't do anything to anyone
Wes
Wes
@FlorianMargaine glad you are having fun then. much appreciated
So, looking a bit at the code.. It seems like if here it went with nNumUsed instead of nNumOfElements it would probably give you what you want in your example
but I can't test it right now and dunno other implications, but... it sounds reasonable
because basically, it already has special cases for empty arrays and packed arrays, etc..
@PeeHaa we.......we probably ought to have a rule about that sort of thing.
I already do. If you use env files you are doing it wrong :P
wow.. you have to be really careless..
Wes
Wes
@pmmaga thank you.
MyType *arData;
what does the asterisk mean here?
13:08
@Wes let me know if you give it a try
@Wes that it is a pointer. so arData has a pointer to a MyType
Wes
Wes
i am reading but my attitude is preventing me from succeeding
@pmmaga oh God, the horrors //cc @PeeHaa
Morning.
what's your guys' opinion on using .gitkeep files in empty directories?
Wes
Wes
i might actually give it a go, but again... my attitude
13:13
@Tiffany Don't
Use a gitignore file instead
@PeeHaa but you can't do that for an empty directory that you want git to recognize (at least that's what I read, I haven't tried it)
Sure you can
oh you mean put a gitignore file in the empty directory
Yeah
my problem with that is the file name makes it confusing
13:16
*
!.gitignore
gitignore typically means "I want git to ignore [whatever]"
Which is what it does
It ignores all content in the directory
no, I mean an empty directory that you want committed in the initial commit, but you haven't populated yet with files
and you will at a later commit
huh
In that case don't commit the directory
It has no use
but it will in the near future
13:18
So commit the directory in the near future
@Wes nope, there it is to an array further reading
@PeeHaa I see your point. I keep thinking of this scenario: I start a project, I somehow, magically, have planned out a logical directory path system at the beginning, but I haven't populated the directories yet with files, however, I want git to start tracking these anyway. On the one hand, I'll just have git track the folders when I've begun populating them with files, on the other hand, I'm forgetful as fuck and git is my life preserver.
Just write down your intended directory structure
I find it super confusing when people do that @Tiffany.
It's harder to tell what the application is actually doing because you're guessing what the directories will be for.
I don't know what it's like to work on a team :/ I'm not able to relate
Wes
Wes
13:26
@pmmaga it's my attitude, not c that doesn't make fucking sense
it was a joke.. chill.. it's friday :)
@Wes its probably both
gaahhh...
now I can't chill
I just got a bug report that a page in the CMS was using the wrong redirect.
13:33
First Friday back and I'm back on the board.
window.location.href = '/foobar';
that was in the custom javascript set for the page.
@Tiffany the typical use case is creating an empty foo/.gitkeep file
@Danack Yeah, you should teach your devs how to spell fubar.
@Danack Do you people do frontend testing?
@PeeHaa are you asking as i) a potential client ii) a potential hire iii) someone looking to sue me?
13:35
:P
Interested party :)
we do some testing with Behat.....nowhere near enough. We ought to switch to TDD for that bit at least.
And ii if you want :P
I still need to give cypress a good run instead of simple test cases and dicking around
13:50
yeah give it a good run instead of dicking around
I mean
mornings
14:07
@FlorianMargaine that was my original question :P chat.stackoverflow.com/transcript/message/44096647#44096647
@PeeHaa For example, if I make a boilerplate template for something, and images must be in /src/assets/img/ for them to be included correctly - but I don't want any images in my boilerplate - I think it would be appropriate to commit that directory without having any files in it
Yes could make sense although I would probably generate the directories on composer install instead
Or part of my build pipeline
I see
14:22
But that would be a valid reason to include the empty directory
going back to a library I haven't worked with in a couple years, one of the first lines in the code global $error, $e, $logfile; >.<
@PeeHaa It's the most recent one I've seen. I did it in an earlier project - I can't remember why... probably wasn't a valid reason when I did it haha
My issue mostly with @Tiffany use case is that it is imo adding things premature
14:39
the commit history for the project I have the most time using git with is messy :P
problems of not working on a team with organization
Doesn't it slowly get better over time?
yeah
I haven't come up with a working system for tagging though
fwiw having somebody else yell at you does really help sometimes :P
Even if it is future you
I hate both future and past me
@PeeHaa there's only one other person here that has used git, and he used it back in college, he doesn't use it in his current position... everyone else will not touch it
I've tried getting people on board with using it, but the problem I had when I first started pushing people to use git was that I didn't know enough about git to be able to convince people to use it. If someone had a question I would go "uhhh"
14:46
now I'm familiar enough with it to where if my supervisor says "make sure to get a backup before you start..." (her idea of version control) I can say "that's what git is for"
\o/ progress
(not to say that git replaces backups, we have another system for that)
(or not ^^^)
@hakre or not to which point?
@Tiffany Do you also have to manage that side?
14:48
@PeeHaa fortunately, no
good good
our server admin takes care of backups :P and I occasionally have to ask him to restore a dev server from a backup because I fucked something up horribly, or I need a file from a day ago
he's had to restore the prod website server once because I fucked it up :S (at least we know backups work)
lol
How can you be a developer in any capacity and not have learned the virtues of version control, even by accident?
If you needed to go back to backup you fucked it up properly :D
14:50
That was like almost everywhere from the second I started Googling about stuff.
@Allenph we used to use OpenVMS for our ERP/database system
We all have been there at some point in time btw
OpenVMS has built-in version control
so people who develop with/work with our ERP system never had to learn how to use a version control system like git
when we switched to Linux, we lost that feature, and DBA never wanted to take the time to learn git
I Googled OpenVMS and then just closed the tab when I saw the words "operating system."
:P
it's ooooooooooold, and the hardware support for it is waning
14:52
@tereško That thing about 4Chan was pretty funny by the way.
Wes
Wes
@pmmaga it wasn't a joke
> Since OpenVMS installations tend to only grant access to trusted staff, the main threat here is dodgy or bribed employees seeking to commandeer systems, rather than outside hackers.
apparently "next month" other ways how it can be exploited would be revealed, I'll have to see if there's a followup article
Wes
Wes
@bwoebi is it possible ot analyze a pattern and see if it has matches in common with another pattern? :P ftr i don't actually want to do this, just curious
for example /^[a-z]$/ matches a subset of /^[a-z_]$/
33
A: Regex: Determine if two regular expressions could match for the same input?

Nordic MainframeThere's no halting problem involved here. All you need is to compute if the intersection of ^xy1\d and [^\d]\d2$ in non-empty. I can't give you an algorithm here, but here are two discussions of a method to generate the intersection without resorting the construction of a DFA: http://sulzmann...

15:08
@Wes That should be implemented in most regex engines
That got really mathy really quick.
Wes
Wes
maybe pcre supports it, it's just available in php?
is there any way in laravel that if updateOrCreate other element set active=0?
@Wes basic regex yes, with PCRE it gets quickly very complicated :-D
11
Q: Intersection of two regular expressions

HenryIm looking for function (PHP will be the best), which returns true whether exists string matches both regexpA and regexpB. Example 1: $regexpA = '[0-9]+'; $regexpB = '[0-9]{2,3}'; hasRegularsIntersection($regexpA,$regexpB) returns TRUE because '12' matches both regexps Example 2: $regexpA =...

15:12
uhhhhh
@Allenph yeah, that guy is quite good and really tries to be objective
@tereško Do you like history channels?
@Wes I'm curious how that came up. Care to elaborate?
@Allenph I think he's building a CSS parser?
Figured it had something to do with that, but still not sure how that need would come up.
Wes
Wes
simplified example
execRegex( string $onstring, string $argRegexCharSet1, string $argRegexCharSet2);
where argRegexCharSet* is used e.g. "/^[" . $set . "]{3,10}$/"
but before i do that, i want to assert that
$regex1->isSubsetOf($regex2)
15:27
@NikiC @bwoebi do you guys know of any articles/manual pages that describe early and late binding in PHP?
Ahh. I see.
@LeviMorrison As in class binding times? No, not really.
Yes, that's what I meant.
can i ask laravel question over here
@Noni you can ask, but the likelihood of receiving an answer is slim
Wes
Wes
15:43
i like the new phpstorm though, they've removed a bunch of noisy buttons that people never used from the ui
for example expand all, collapse all etc... now they are in the context menu
not an in-program update :(
@NikiC I'm just reading you wrote "We may also want to move from the C# syntax to something where get/set are specified more akin to independent methods." regarding property accessors. I'm a bit failing to imagine how that reasonably should work out?
If I were to implement property accessors, I'd propose one particular difference in semantics to C#: Properties with getters are uninitialized by default. You can assign a value to a property with a getter. The getter is only invoked as long as the property is not uninitialized.
I found it quite annoying in C# to typically end up with two properties of the same type, just one with the getter and one without - and the getter returning the other property.
That way it is also trivial to express a lazily cached value with getters: public $foo { get => $this->foo = $this->bar + 1; } public $bar { set => { $this->foo = $value; unset($this->bar); } }
Why are floats represented by scientific notation? Seems like a lot of the time it results in more memory needed, more processor power to compute with, and wild inaccuracy when used in math functions.
@Allenph yeah, good luck counting the digits of a float with the value 10 ** 58
Scientific notation in particular cuts off insignificant digits which lie beyond the precision of floats @Allenph
Couldn't you make it more efficient by specifying certain criteria for when you should give up and use scientific notation and when it would be more efficient not to?
Because it seems like that vast majority of cases involve very few significant digits, and if you're converting to scientific notation you clearly have the ability to discern what is significant or not before doing a calculation.
15:58
huh?
00:00 - 16:0016:00 - 00:00

« first day (2904 days earlier)      last day (2270 days later) »