« first day (1508 days earlier)      last day (3426 days later) » 

2:08 PM
This is a date regex /^(19|20)\d\d[\-\/.]0[1-9]|([012])[\-\/.](0[1-9]|[12][0-9]|3[01])$/ it accepts 2014-04-04 but it does not accept 2014-4-4 How can I edit it to accept one or two numbers in month field
 
@Lana do you understand the regex?
 
@RonniSkansing yes, his writer wrote the explanation
 
@Lana you need to have just somekind of minimal understand of what you are asking or you are just asking for free work... =]
I seems you did not understand what I asked you. Do you understand the regex you copied and have you tried to solve it?
Yourself
 
I think not :)
 
Morning
 
2:15 PM
Morning @DanLugg, and Hi Naruto =]
 
@RonniSkansing I am not asking for free work, I am asking what is the parameter that allow to accept one or two number because it is my first time to deal with regex, and yes I have tried and still trying
 
@Lana try making a new regex. One that only is focused on accepting 0-9 or 01-12, this way removing all the noise and focusing on the problem.
Try for example looking at stackoverflow.com/questions/3148240/…
 
I just had one of those fake "we are the technical support department and we are getting error reports from your computer, please download this software" calls.
I think I made the guy cry.
 
@Danack what did you do?
 
lol
 
2:20 PM
I asked him if he was religious, (he is) and then I asked him if he thought his god punishes people who do evil things.
He said he was forced to do bad things due to a lack of opportunities.....
 
Yo @Patrick
 
@Danack auch!
 
@Danack the slayer
 
I know I shouldn't be laughing, and I'm a terrible person, but...
32
Q: My boss slapped me over a calculation error

user5115My boss slapped me because My Excel file had a calculational error. I fixed the error and saved the file to the network. If I complain, I guess I will just get fired. But I don't want to work for someone like this. How should I talk to her about it?

 
@Duikboot hm?
 
2:30 PM
Nvm found the error (I was checking out your tutorial)
- patricklouys/http v1.1.0 requires php >=5.5.0 -> no matching package found.
 
^ wrong php version?
 
and one answer (with -18), starts with:
> Did she slap you in the face or below the neck?
 
yes
 
I might have to make that more clear, not the first time that happened :)
 
@Jimbo Just open carry a gun = no slaps.
 
2:33 PM
How can she slap!?
 
Or work remote = no slaps. :P
 
:p Dammit my built-in version is also only 5.4 Dammit :)
 
17
Q: Office flatulence is getting out of control

gerdiWe work in a small office with only male developers, so it's not such a major issue if someone lets one rip every now and then. Big deal. However, there is one work colleague who has taken this to a whole new level. Please, I am being serious about this. He can literally fart the whole day and I...

 
@Jimbo How can she slap?
 
Man, I love this site sometimes...
 
2:34 PM
@RonniSkansing I fixed it now it looks like '/^(19|20)\d\d[\-\/.](0[1-9]|1[0-2]|[1-12])[\-\/.](0[1-9]|[12][0-9]|3[01])$/' , Thanks for the link very helpful
 
@Lana great job =] your rock
 
@Patrick The best part of that video is just how many people walk onto the set.
 
hi guys, I have an array with numeric indexes [0,1,2,3,...] i have a number that must be the starting index for when I want to display data, I also want to append the elements before such number at end of the array. how I would do that efficiently?
 
@Jimbo I got slapped by a drunk girl for no reason whatsoever, didn't even know her.
 
@webarto Did you hit her back? If you didn't, you were being sexist. Don't forget - equality!
 
2:38 PM
It would be below neck, way below, if you know what I mean...
:weirdstalkersexoffendersmiley:
 
Still would have retaliated properly first, then suggested other slap types
lol
 
i figured I could slice the array and append later, but it looks not cool. maybe something better exists
 
@sathia This bit "I also want to append the elements before such number at end of the array." doesn't make any sense. Can you give an example of what you want the end result to be?
 
@Jimbo I was with with a friend at a bar and we said hello to a couple, that started to fight for some reason, the girl was hitting her boyfriend, and some dude came and pulled a gun on all of us saying that the boyfriend (who was being hit) leaves the girl alone.
 
@webarto Whaaaat
:|
 
2:39 PM
@Danack sure: suppose: 0,1,2,3,4,5,6,7,8,9,10 the number I should start iterating the array is 5, so I'd like to return this array: 5,6,7,8,9,10,0,1,2,3,4
 
What happened?
 
Yeah, drunk idiots, thus me not going to (mainstream) bars.
 
i could make a couple of foreach, but doesn't look elegant to me
maybe there's a better way
 
@Jimbo Security folks calmed the situation down and we left...
 
2:40 PM
Never did that before.
Is it hard to upgrade to a new php version on MAC?
I did that but not that much :Dhappend
 
gif posting competition
 
@Duikboot I would suggest to use vagrant
 
user1642018
hi all ., i have a quick javascript query.
 
user1642018
can anybody tell me , whats the difference in these 2

$(function (){ do something});

$(document).ready(function (){do something});

is it that , first fires ASAP page loads and seconds fires after document fully loads , am i right ?
 
Could use that too :) but Its also handy to have my system up to date.
 
@AMB You should ask this in the JS channel.
 
user1642018
@Duikboot sure, thanks
 
@Duikboot which version of php do you need? i have 5.5.14 on yosemite
 
Here's a stupid question , if i used htmlspecialchars($string, ENT_QUOTES) on all my entries be it gets or posts even if i am not going to necessarily be outputting all of them into my browser, can i have any negative effects ?
 
user1642018
2:43 PM
@Duikboot thanks man.
 
@Duikboot then just upgrade to yosemite
@Danack I'll use splice then I figured there was a oneliner for this
 
:P
 
@Duikboot I used this back when I was using osx php-osx.liip.ch
 
Is Yosemite ok?
Thanks, @Patrick
 
@Duikboot you said you wanted to have your system up to date :)
 
2:50 PM
You can also adjust your PATH do include that directory, eg. write into your ~/.profile file the following
Is it possible that that doens't yet exist?
-bash: /Users/Duikb00t/.profile: No such file or directory
 
How do you handle dependencies from a ConcreteFactory pattern?
 
@Fabor Can you rephrase that question?
 
Sure. Basically I have a service where I receive a message and send a result to the given postback in the message. That postback can be a uri (http) or a message queue like sqs or rabbitmq. So I use a factory to choose load the correct class from the given message.
 
Morning Folks
 
So in their individual classes they construct with either artax, amazon sqs etc..
How should I handle that from the factory?
 
3:00 PM
When I say date("Y-m-d");
will the date come from my local computer?
So, let's say the date is not in sync with real date.
 
posted on December 02, 2014 by Anthony Ferrara

Last week I post a post called Alternatives To MVC. In it, I described some alternatives to MVC and why they all suck as application architectures (or more specifically, are not application architectures). I left a pretty big teaser at the end towards a next post. Well, I'm still working on it. It's a lot bigger job than I realized. But I did want to make a comment on a comment that was

2
 
For instance, my computer date says 1st of december today
Will date("Y-m-d"); gives me 1st dec or today's (2nd dec) ?
 
@ircmaxell >I post a post
 
Please clarify
 
3:02 PM
@Fabor Your factory is responsible for creating the class. So you have your new calls in there. If you need to inject dependencies you do that there too. If you need other classes for that, you can make them a dependency of the factory.
 
I see
 
Morning.
 
posted on December 02, 2014 by kbironneau

/* by Kay */

 
@NikiC Yes, in this case I want to forbid inheritance and the addition of properties.
 
user3949359
3:41 PM
I have xampp running, but when I attempt to run a php file (in my htdocs folder) in Chrome i get the source code of the file instead of what it's supposed to display. Why is this?
 
@KevinMGranger fixed
 
@nosille is the file named something.php ?
 
user3949359
@RonniSkansing yes
 
I'm just going to say it: if you've got such a complicated dependency tree that composer was taking >20 minutes, it's not composer, it's you
 
3:55 PM
: )
 
@ircmaxell It's not people's dependency tree. It's the fact that packagist has a lot of forks of popular libraries on it, and that it evaluates a whole load of the forks as possible packages to use that you wouldn't expect.
 
Can someone explain the difference between : <img src="img/bah.png" /> or <img src=/img/bah.png"/>
 
@nosille hmm. Are you sure you "turned it on"? Does the file start with <?php , what is the url you are using to access it?
 
e.g. if you include a symfony component, then any fork of that component might be suitable....which leads to the huge amount of data that needs to be crunched.
@Duikboot one's relative to the current directory, the other isn't.
 
user3949359
@RonniSkansing file sure as heck starts with <?php and Apache and MySQL are both running
 
3:58 PM
@Danack wait, what? if I declare a dependency on a project, it can silently use a fork?
 
Some d*chbg used /img/ .. when I move the project to another folder on a website... al images are broken. When I remove the / it's fixed.
 
user3949359
@RonniSkansing file:///C:/xampp/htdocs/phptutorial.php
 
user3949359
I'm on a PC
 
php.net/manual/en/features.gc.performance-considerations.php tells about 10000. 10000 of what? 10000 of created objects?
 
@ircmaxell Not any more (it used to) but it still does a whole load more work comparing forks than you would expect / is sane.
 
3:59 PM
@Danack So you're saying that if Composer is slow, it's trying to fork you
 
@nusille, ok, it is because you are using the wrong url =]
 
I'm saying I don't believe the people running it are completely sane.
 
@Danack well, that's important. If it can ever use a fork, that would be a massive security issue
 
try something like 127.0.0.1/phptutorial.php or localhost/phptutorial.php @nosille
 
user3949359
@RonniSkansing thank you
 
4:01 PM
But still - the current slowness is due to it still evaluating every fork of popular packages, which leads to gigabytes of data for an update, which leads to the slowness.
 
@Danack How does packagist determine that vendor1/package is a fork of vendor2/package? Is it just "replace": {} or is it more magical?
 
@DaveRandom It's 'just' replace. But the issue is when you have things like Symfony that have all of it's sub-packages as packages, as well as in the main symfony repo
 
@nosille no problem, have fun coding =]
 
So if you fork the main symfony library and give it a a new name, it still does a replace on all of the sub-packages that the main package contains e.g. "symfony/browser-kit"
 
I think that it could be if you are using custom repositories. Your private repository could be replaced with repository from packagist.
With the same vendor/name
 
4:07 PM
So each of fork of symfony creates one new version of each of the symfony sub-packages.
 
@Danack "not a security issue" lol
 
I'm out.. peace!
 
@ircmaxell Honestly - there are some people I actively avoid working with because they are apparently insane, and have convinced other people through group-think. I don't want to get caught up in the insanity.
/laters
 
@Danack (semi-tangent) wait... so symfony maintains the component codebase in two places?
 
@Danack which? Jordi? Nils? someone else?
@Gordon mostly good, just replied to one part in particular
 
4:12 PM
later @Naruto
 
@Danack , I do not belive that composer checks all forks. When you create package you have to define repository.
composer checks all known sources of packages.
Anyway what does 10000 mean? Is it number of newly created objects?
 
If I want an internal class to be final, where do I set the ZEND_ACC_FINAL_CLASS flag? In my PHP_MINIT_FUNCTION?
 
@LeviMorrison Why do you want it?
 
Because I want the class to be final ^^
I should never have to justify final classes; you should have to justify virtual inheritance.
 
4:31 PM
too bad, justify it!
 
^ that please
In totally unrelated news: I had to work with this today
 
Firstly, it's less error prone when writing C classes that are final.
Secondly, they are faster because you don't have to lookup the method entry; you know it's final so you can call the C function directly.
 
I'm messing with you, I agree
 
(I mean when calling from internal places)
 
4:36 PM
ah ok
 
This extension has two major points: expressive APIs and fast implementations when possible.
The first bit is harder than the second one ^^
 
@PeeHaa I read every word of README.md, I have no idea what that actually does.
Seems to have been written by a salesman who doesn't know any technical details of the product.
 
Hmm. This line causes my build to fail when generating phar.php:
> zend_class_implements(vector_ce TSRMLS_CC, 1, spl_ce_Countable);
I've included ext/spl/spl_iterators.h which defines that ce.
Is there something else I must do?
 
show me ?
committed ?
 
Just a second and I'll push.
 
4:45 PM
k
 
Ah, fixed. I had to add something to the m4 saying spl is a dependency.
 
load order
morning everyone :)
 
MornJoe
 
ping @m6w6?
 
5:04 PM
@JoeWatkins Question: I see everything that uses offsetSet to define a write dimension handler.
 
that's not a question
 
But they also define a PHP_METHOD for offsetSet.
Why?
 
oh
probably because stuff in spl uses it's own intterfaces for interop, but stuff in /Zend uses object handlers ...
 
posted on December 02, 2014 by kbironneau

/* by @abstractalgo */

 
So… should I define both?
 
5:07 PM
it's safe enough to set handlers, that works, so long as you don't declare that you implement any interfaces
 
But if I declare ArrayAccess I should define both.
 
it depends what you want to document or allow users to override
yeah
 
Oh they can't override anything. Class is final.
 
still if you declare you implement the user interface, you have to implement the methods ...
 
Can you explain what those are?
 
sure they are used in different contexts, BP_VAR_UNSET for example to fetch for an unset, BP_VAR_R for read, BP_VAR_W for write, RW for read/write, REF for reference
 
So I switch on that type. If I don't support references I'd error when that type is passed, I assume?
 
finished watching "Lucy" (2014)
not sure what I think of it .. a strange story
 
that's it yeah ...
 
5:15 PM
next stop "Guardians of the Galaxy"
 
@JoeWatkins Do I need to mask it?
 
Lucy was interesting enough. Not a bad way to spend 1.5-2 hours.
 
@JoeWatkins I'm not sure why a BP_VAR_W would ever make sense for a read_dimension?
 
because you might fetch the dimension for writing, we do that fetching dimension address thing and reusing the pointer basically ...
 
5:21 PM
But isn't setting the value the write dimension?
That's what I don't get.
 
I don't see an example of read_dimension being called with that type in master anyway
zend_fetch_dimension_address_read is always R, so only worry about stuff that makes sense :)
 
It could be REF though, right?
 
can't find anything other than R
R/RW/UNSET
 
And what's RW?
 
wait that's W
strangely
 
5:29 PM
3v4l.org/SoL0p ... good work, hhvm!
 
FETCH_DIM_RW opcode is never compiled
so I think ignore that too ...
 
All I need to support is read only operations. Everything else is not supported.
 
optimizer optimizes it but the compiler never creates it ...
 
So I just need to do R?
 
yeah
 
5:30 PM
@salathe DateTime is hard.
 
I think it's okay to laugh at others misfortune in this case ...
 
The second zval passed to read dimension; what is it? The SPL array stuff doesn't use it: lxr.php.net/xref/PHP_TRUNK/ext/spl/…
 
user4661379
2
Q: How to connect to remote FTP server and upload an image file to it at specific location using PHP?

PHPNutI'm a newbie to advanced PHP. I'm using PHP 5.5.18 for my website. The scenario is, I have one remote FTP server. I want to get connect to it, upload an image file at specific location on that FTP server, save the file in that folder on FTP server. I've successfully written a code to upload the...

 
it's complex stuff, a lot of the time ... but c'mon, 02, first day of the month ?? we can laugh at that ...
> zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_get, "offsetGet", &rv, offset);
its the return_value
(use it, in case not clear)
I'm gonna be here for like five more minutes, then I'm gonna go stuff my face with food ... so, quick scan over the next chunk and ask questions in the next five minutes or so ...
 
@sectus It checks any that has a replace in it for the original package name.
 
5:38 PM
I think I'm good for now, Joe. Thanks.
 
@DaveRandom Yes. Both it and Zend 2 predate composer (I think), so they had to have everything in one place to make it easy to install composer.
 
@LeviMorrison always a pleasure :)
 
5:56 PM
@AndreaFaulds I figure you may know about empty semantics from internals; do you just convert to bool and check if truthy?
I'm implementing the has_dimension handler and am unsure how to do an empty check from internals.
 
Is there anyone from Scotland here?
Ahoy!
 
@DaveRandom I'll be actually online in about an hour
 
user3949359
6:12 PM
How do I start populating an empty SQL database with php varabiles? It seems to me that I cannot use UPDATE SET, since there's nothing to overwrite, am I right?
 
6:29 PM
Is that ok to move composer's folder? I want to have it somewhere to use it for all of my projects.
Is that ok to move it and just change the autoload path?
 
> God put me on this earth to accomplish a certain number of things. Right now I am so far behind that I will never die. -- Bill Watterson
 
6:51 PM
> The best English translation of the Odyssey in my opinion is the Robert Fagles version
That's what my contact said, @NikiC
How much of that is archaic or poetic? I don't know. That's just what they said.
 
@user3002233 if your projects each depend on something, then that something should be in that project's composer.json
 
@DaveRandom It is used by some flash application to get data from the serverside
And yes it is flash and yes it is horrible
 
@Capt.JackSparrow @AndreaFaulds is in Scotland (I think)
 
@JoeWatkins Yep
@Capt.JackSparrow Oui, j'habite dans l'Écosse. Ici nous parlons français.
 
@AndreaFaulds Ces langues que personne n'aime!
 
7:13 PM
/me just scrolled through that one composer commit. What /me cannot realize - is why composer consumes that much memory and creates that much objects so that it becomes a problem on a really tiny graphs?
Is there a simple answer why it's that slow at first place?
 
@DaveRandom pong
 
@zerkms ^^ I don't know.
 
@LeviMorrison does it surprise you as well or am I just missing something obvious?
 
Am I surprised? No.
 
:-S
 
7:17 PM
Basically I see people using arrays way too much or objects way too much ^^
 
for an average project dependency graph contains say a hundred of vertexes
HOW can one make a problem from such a tiny data set?
It's not million of nodes
 
Well each node is an object. And they may have used edges as an object, and there are probably objects that contain algorithms to work with them.
And there probably objects inside of the node too.
 
btw, it consumed 500mb+ of corporate traffic for that page. Ohhhhh
@LeviMorrison still - people analyze huge amounts of data in other languages and don't spend half of runtime in a GC
 
My understanding is that the GC keeps trying to collect stuff but can't.
But since memory usage is high it still tries.
 
generational GCs for the win
 
7:31 PM
Hi
first time i going to migrate MS Sql DB to Mysql DB
i have installed workbench and ODBC in my system
but i can't connect source system
Is any i wanna install in source machine also???
 
@zerkms it's a SAT solver
In computer science, the Boolean Satisfiability Problem (sometimes called Propositional Satisfiability Problem and abbreviated as SATISFIABILITY or SAT) is the problem of determining if there exists an interpretation that satisfies a given Boolean formula. In other words, it asks whether the variables of a given Boolean formula can be consistently replaced by the values TRUE or FALSE in such a way that the formula evaluates to TRUE. If this is the case, the formula is called satisfiable. On the other hand, if no such assignment exists, the function expressed by the formula is identically FALSE...
which means that it basically tries permutations of combinations until everything is satisfied. Adding a single vertex increases the number of permutations by a factor of 2, 3, 4, 5 and so forth depending on the number of edges it introduces
What makes it difficult isn't the number of vertices, but the number of edges and the relationships of the vertices
 
7:52 PM
user image
5
 
8:06 PM
@ircmaxell this is useful, thanks
 
@salathe nothing new. we all knew you were evil in the first place
 
8:25 PM
@ircmaxell hehe >:)
 
^^ That dude is pretty awesome.
 
8:41 PM
He's pretty groovy. Be sure to watch for his cat in every video.
 
Aw, didn't notice, just backgrounded it.
 
9:11 PM
@ircmaxell went through the article. Still it's not clear - why for example apt-get resolves dependencies instantly, in like a sub-second
what special magic do they do to be 2+ orders of magnitude faster (and consume 1+ order of magnitude less memory)
 
@DanLugg Smooth McGroove is smooth and has the groove
@LeviMorrison empty() just checks for truthy, yes.
 
@zerkms they don't have many cyclic dependencies, and they don't have nearly as many versions to check
 
9:28 PM
Fermi-oooons... fermi-oooons... and other states of matter.
 
barions
or even:
or even better
2
 
9:43 PM
mornings
ping @PeeHaa
 
@DaveRandom yo
 
what you saying boi?
 
@DaveRandom Do you have any clue what happens when nginx tells me:
 
Put ZPP Failure on Overflow to a vote.
 
booting machine
 
9:45 PM
nginx tells you Andrea put an RFC to a vote?
 
@DaveRandom That's one smart web server!
 
> nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/ssl/certs/pieterhordijk_com.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
nginx: configuration file /etc/nginx/nginx.conf test failed
I looks like there is a mismtach between either my csr, key or cert
However...
openssl rsa -noout -modulus -in /etc/ssl/certs/pieterhordijk_com.key
openssl req -noout -modulus -in /root/ssh_keys_generated/pieterhordijk_com.csr
openssl x509 -noout -modulus -in /etc/ssl/certs/pieterhordijk_com.chained.crt
^ returns the same output for all three
 
nope, I just read it again and I still don't understand the problem that reflection aliases RFC is trying to solve
 
You are my last shot :P Next step is calling the cert issuer and asking WTF :)
 
9:50 PM
@PeeHaa It seems likely that the priv key and cert don't match
What's your nginx config?
 
@DaveRandom Yeah but the modulus is the same :|
 
@PeeHaa The order of the certs in the chained file matters, with nginx. Are you 100% certain that your end cert is the first valid cert in the file?
 
@DaveRandom ATM I only have the actual cert in there without the intermediate. I have also tried with the intermediate with the same error
Is the intermadiate mandatory in there?
 
nginx should start without it
is there a sane way you can send me the cert and the key?
probably not :-/
 
Well I got it by mail so that is as sane as it gets :P
 
9:56 PM
It's more the key I'm concerned about
Did you generate a new key or did you reuse your old one?
 
new key
whatever@daverandom.com rite?
 
yup
You are 110% sure you are using the new key file and not the old one?
 
yes
 

« first day (1508 days earlier)      last day (3426 days later) »