« first day (1643 days earlier)      last day (3290 days later) » 

3:11 AM
@tereško Just read the But I want an i7! story ... wow, just wow.
 
3:51 AM
@JoeWatkins how do you intend to pass current scope variables into anonymous classes?

$baz = 10;
$anonClass = new class($baz){ public $foo = $baz; };
(new $anonClass())->foo;
$anonClass = new class use ($baz){ public $foo = $baz; }; // perhaps
$anonClass = new class use ($this as $that){ public $foo = $that; }; // with alias
 
 
1 hour later…
4:59 AM
Guys, in terms of SQL-injection, is it safe to leave PDO::ATTR_EMULATE_PREPARES as true? Yeah, I know it's kind of very common practice to turn them off, but still wondering if it's safe?
 
it shouldn't make a difference in terms of security.
 
5:57 AM
morning
 
@bad_boy Ask drupal whether that is a good idea
Hint: no, no it is not
 
@PeeHaa I don't think that has anything to do with pdo's emulated prepares, though.
 
6:32 AM
i thought emulated prepares were a good thing for portability
 
@PeeHaa Fair enough, in their case the native prepare would have made it harder.
 
6:56 AM
I don't understand this one, can someone have a look, please? pastebin.com/zYMtqUVa
 
@SergeyTelshevsky Looks like variable path parts
?
 
@PeeHaa sorry, don't understand what you mean
 
/foo/%s/%s
?
Just a wild guess though :)
 
still don't understand :(
 
moin
 
7:01 AM
@SergeyTelshevsky $router->currentRoute->getParams() must be stored in a local variable first.
Makes more sense to use array_map() here.
Oh wait ... no, you can't use that heh
I would just go with a standard foreach loop.
 
@Ja͢ck gosh, looks like you're right, it's about that part.. I though it was complaining about (&$actionArguments)
yeah, I already thought about that
 
Nay, first argument to array_walk() must be ref.
 
thank you very much.. sometimes it's much more simple than you think :)
 
those are the good times heh
 
7:22 AM
 
7:33 AM
morning @Jimbo
 
@Ja͢ck I was laughing, hilarious story
 
Seriously twisted little boy
 
good morning!
 
there are plenty of them
I bet he wanted an i7 because his friends had one, or because they had i5
 
7:56 AM
What do you guys think of the new SO profiles?
 
I like it
 
Hmmm... dilemma...
Does anyone have an "auto-scale" solution for websocket servers?
like... what happens when I want to have >65k connected users? Spawn a new server, let the users connect there instead?
(I'm actually thinking "one PHP process per user" to be precise)
 
@Ocramius I don't, but I started working on one... theoretically... you'd have a ServerArbiter responsible for making connection decisions, and in the event that certain thresholds were met, you'd have a ServerManager used to pop up new servers when required...
They were just my thought patterns
 
yes, that's the idea, I'm mainly looking for:
- either already existing stuff
- or at least an example of how it has been done before
The last time I built such a thing, I used an ejabberd server, which worked fine
but yeah, ejabberd is a bit more sophisticated
hmm, thinking of it
why the eff bother doing this shite in PHP? Jabber can do
just sending a stanza to "client-id@my-domain/session-id" should probably be enough
 
Scale in terms of servers?
 
8:04 AM
@Fabor I pretty much need to redirect the client so that each server has a decent (acceptable) amount of open connections
but I now really think that ejabberd may be the best solution
 
Amazon has some auto-spawning instances with it's EC2s. Which you can configure fairly easily. Or that sort of thing not an option?
 
given "anonymous-user@my-domain.com/$someSid" and enforcing signature of packages, I can pretty much send notifications to each user without worrying about it at all
and should work with WebSockets/Sockets/POSH
@Fabor yeah, but how do I re-route them from PHP? During handshake operations?
I may miss some basic WS knowledge here
 
Does it have to be PHP and not a load balancer?
 
@Ocramius I don't know, it was simply because I would have precise control of everything that happens
 
It's sockets, no? They are constantly open: I don't think a load balancer would do either, because of OS limitations
@Jimbo yeah, still looking at possible solutions: no clear ideas so far
 
8:08 AM
I auto-scaled with ec2 but it was a long-running process that would check against some config file and if the thresholds were met it would spawn a new box via the ec2 api
As each box, you pay for the hour for, it would also make sure that it didn't shut down a box until 55 minutes or so had passed
My English sucks today
 
I don't know much either but maybe clustering websockets?
 
@Ocramius There are some patterns here that I didn't implement buy may help... Router/Dealer, Pub/Sub... ZeroMQ etc
 
So you deal with it during an UPGRADE request?
@Fabor yeah, but that seems likely to crash if the apache in front of it will have >64k users or such
 
@Jimbo you can set those parameters in an autoscale configuration.
 
or whatever OS limit you have for the amount of open connections
 
8:11 AM
@Ja͢ck The parameters were only discernible by making a call to MySQL to see how many records were in a table (yes, my previous company used a db as a queuing system)
 
or, again, I'm not understanding if apache is hit only during the "UPGRADE" request
 
@Jimbo that can be added as a custom signal.
 
@Ocramius I believe your question is in @rdlowrey field of expertise. So if you're still discussing options by the time he's on, I'd give him a prod.
 
@Ja͢ck Interesting, is it hard to set up?
 
Indeed. If you could, please nudge me @rdlowrey :-) Otherwise, I'll print the websocket spec and study it whenever they're not looking at me at work :P
 
8:13 AM
@Ocramius Please tell me this is not related to a project I know about.
 
I do scale with Ec2 but it's for job queues rather than sockets.
 
@Jimbo Not really, you can set up a periodic process that checks your db and then sends alarm using the api
 
@Danack it's shite
I'm mainly concerned about stackoverflow.com/questions/2332741/…
I doubt I'll ever reach 64K myself, but I also am designing a general-purpose thing here, not just for myself.
 
Just put an @todo in for 64k limit :-)
 
/me slaps Jimbo with some unix
 
8:25 AM
good mornings!
 
Morning sir!
 
good mornings
 
good mornings
 
mornhaakrbu
 
ThW
Morning
 
Anonymous
morning
 
Mornings ^
 
heja!
 
8:48 AM
moin
 
@PeeHaa cool page .. the author is about to drop under the red line, though =S
 
9:20 AM
@PeeHaa I love the "writing in red" there
 
:P If you don't want people to do something don't tell them to not do something :P
 
9:50 AM
hi guys is there a short way to tell array_reduce to use the && to do its reduction?
 
function add_op($op1, $op2) { return $op1 && $op2; }
 
I feared this answer...
this is so sad :(
@Ja͢ck but ty anyway :)
 
what did you expect? array_reduce($array, &&)? :)
 
u read in my mind ;P
but now I'm curious. Don't u like something like that?
 
<?magicphp return buildWebsite(['design' => 'cool', 'functionality' => 'full', 'works' => true]);
 
10:05 AM
I forget to mention in the question Urahara san (@Ja͢ck) so: "Don't u like something like that?"
 
I don't like parse errors in my code.
 
@Ja͢ck o c'mon I mean if it was possible :P
 
Maybe .. if operators could be used in Polish notation :)
i.e. &&($a, $b) hehe
 
@Ja͢ck nice, now I'm satisfied ;P
 
10:35 AM
moin
 
Morndom
 
So yeh, turns out the reason we never see any Greeks in here is because there's basically no internet in Greece. It's like that south park episode.
 
10:54 AM
@DaveRandom You're alive!
 
moinz
 
@Jimbo E_SUBJECTIVE
 
Seeing as you're always so evasive when I ask where you've been, I won't :P
 
No, this time I've just been on holiday, Corfu
 
Oh very nice
Living the high life now ;p
Any pics?
 
11:17 AM
Hi Mr. @DaveRandom...can u please help me to solve this problem??
4
Q: Puzzled using codeigniter on shared hosting server

blackbull77This ones a new on me. I'm transferring a site I made in codeigniter to a godaddy shared hosting server. I can get to the home page with: http://www.example.com But when I try to go to the other pages like: http://www.example.com/about-us/ It throws me this error message: Not Found ...

please help me on this thread.....!!!!!!!!!!!!!!!!!!!
hello everyone????
please help me on this question???
 
Why do you use so many punctuation marks?
 
is it urgent?
 
yes plese sir help me
i want help to solve this issue
 
which problem? the question you posted has an accepted answer
 
Anonymous
how do you solve a problem with already acepted answer?
 
11:23 AM
sir..actually i have this same problem not solve by use tricks given in answer
actually i want to comment on this question...but i have not enough reputations..so
 
Hey guys. I changed my root password on localhost now I can't get in
 
Then can you please post a new question describing your exact problem?
@Martin For mysql?
 
i am banned
 
Yeah, sorry. MySQL using WAMPServer
 
11:25 AM
@AshokGujjar ask a question, refer this question with a link, describe what you have done and what results do you get when you use the solution from accepted answer
 
@Martin Have you tried starting mysql is safe mode
 
Anonymous
@Martin xamp?
 
@SergeyTelshevsky..i am reached limit
to ask new ques
 
so i come here on chat
for help
 
11:27 AM
52
Q: What can I do when getting “We are no longer accepting questions/answers from this account”?

Robert HarveyDo not repost the question you were about to ask until you have READ EVERYTHING WE ARE ABOUT TO TELL YOU. While trying to ask a question, one could get: We are no longer accepting questions from this account. See the Help Center to learn more. Likewise, for answers: We are no longer a...

 
@AshokGujjar your question has an accepted answer
so, it was answered
 
@SergeyTelshevsky that's very similar to another solution I've found. I can't find mysqld-nt in my mysql/bin though :/
 
does anybody know whether you can override @property or @param annotations in child classes without redefining the parent property? for example, Child extends Parent. the constructor for Parent takes an interface and sets it as a protected property. I'd like to my IDE to pick up type hints for that property in Child -- but the parent's protected property only references the interface, not the concrete class.
 
@AshokGujjar so ... what the fuck else you want now ?!
 
i used tricks given in answer..but its not working
 
11:30 AM
Tricksy hobbitses
 
@ArunPoudel No
 
User who have asked ques find solution....he had written in comment
 
by that you mean "I copy-pasted, but it nothing happened"
 
@samaYo Do you mean try try xamp or are you asking if I'm using xamp..?
 
@Martin it may be named differently, I don't remember how it was on windows, but try any other executable
 
11:31 AM
@hohner "the parent's protected property only references the interface, not the concrete class." - I can't understand what you want to happen instead.
 
@SergeyTelshevsky I have a few here. mysqld.exe seems to be the closest bet though
 
yes, I think that's what you want
 
Ok I'll give this a shot
 
@Martin you cannot get in where exactly ?
 
@tereško....please read comment of blackbll7's comment on that ques.
 
11:32 AM
in db , in user account, in desktop environment ?
 
@tereško Good point. I am trying to get into phpmyadmin.
 
@Martin can you get in the root account (system user's root, not mysql user)?
 
my whole project's launch is depend on this solution..
 
@tereško it's windows
 
11:33 AM
@Danack Parent is referencing FooInterface. The child has ConcreteFoo injected into it. I want to access the methods of ConcreteFoo rather than FooInterface. Now that I think about it, I shouldn't even have an interface if the concrete versions are mostly different. I need to group them somehow though...
 
3
Q: Puzzled using codeigniter on shared hosting server

blackbull77This ones a new on me. I'm transferring a site I made in codeigniter to a godaddy shared hosting server. I can get to the home page with: http://www.example.com But when I try to go to the other pages like: http://www.example.com/about-us/ It throws me this error message: Not Found ...

 
9 mins ago, by Martin
Hey guys. I changed my root password on localhost now I can't get in
 
@tereško You mean like root@localhots, right? When phpmyadmin tries to run, it is not using a password. I would like to change the password it's trying to use
Sorry I phrased that badly
 
@tereško as I understood it's mysql's root user
 
@SergeyTelshevsky yeah
 
11:34 AM
please
@Martin
 
@SergeyTelshevsky mysql does not have "root". It has administrators.
multiple
 
@tereško well the default administrator user is root, isn't it?
 
@SergeyTelshevsky sometimes
 
@tereško Well every GUI has referred to the default 'admin' users as root user
 
@hohner Hmm, that's semi-reasonable. I think you can put the re-definition outside the class:
/**
 * ChildClass
 * @property ConcreteFoo $foo
 */
 class ChildClass{
}
 
11:36 AM
@AshokGujjar don't try to get attention by flooding and pinging people.
 
@Danack yep, I just got that to work. I was putting the type in the wrong place :)
 
@Jimbo My misses' sister lives there so was mostly done on the cheap
 
Guys, please don't flag 'spam' .
And @AshokGujjar please don't flag people giving you advice.
 
10 messages moved to bin
 
@SergeyTelshevsky....i am banned from ask new ques...and i have not enough reputation to comment..
 
11:39 AM
@AshokGujjar Which is why Sergey was giving you advice on how to ask things better.
 
Okay I got it
 
@Martin did you already try followin instructions here ? dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
 
This is what solved it: askubuntu.com/questions/118772/…
I needed to change the password phpmyadmin tries to use to access
 
few recommendations for you, @Martin:
 
Go ahead
 
11:41 AM
1. install Mysql Workbench. It's a much better tool and you can use SSH tunnel if you need to access restricted system too
 
Heh, that's what got me into this mess. It wouldn't let me install without setting a password for the user root@localhost
 
@DaveRandom How badly sunburnt did you get?
 
2. add a different admin-level account. If I were to try to hack your DB, I would start by attempting "root" user
 
RE:2 - It's alright. This is strictly on my home computer and nobody can access from outside
 
3. think about migrating away from WAMP/XAMPP as development environment and switch to VBox based linux or bsd virtual machine with custom installed setup
 
11:43 AM
@Fabor Actually I think I got away with tan-only, somehow. Was sunny most of the time, although not that warm. My misses bet me a tenner I wouldn't jump in the outdoor pool at the hotel, I should have let her keep her tenner...
 
heh.
 
Is there a way I can have like a headless vm that just exposes it's HTTP server?
 
yes
 
This was about 12hrs after they filled the pool, so it was basically just mains water temperature
 
Awesome. I've wanted to use a linux vm but my computer's RAM makes it a real nightmare.
I'll try to find out how to do this
Thanks for the help!
 
11:45 AM
@Martin toptensoftware.com/vboxheadlesstray and "exposing webserver" is done via port forwarding
also, RAM is quite cheap
 
@Martin For a dev server, if you are just running a web server and PHP, you can get away with giving the VM 256MB
 
Like a raspberry pi
 
Yeah, so long as I can access it from my host
But I will investigate these solutions. Thanks guys
 
oh, yeah , RBpi is a really good solutions for development environments ... and it costs like 25$
 
Really?
 
11:48 AM
Development being the operative word.
 
of course
 
@PeeHaa How is "blue" a theme? That guy's sister really needs to work on her imagination.
 
Anonymous
@Fabor I have a problem, pronouncing pi as pie
 
Anonymous
I can never unlearn it
 
11:59 AM
It is Pie isn't it?
 
hello all
i have some questions can any one help me
theoritical questions
i am a winfrom programmer and new to asp.net (C#) i want to ask some questions about php
 
sure
 
Anonymous
> Pi is because originally we were going to produce a computer that could only really run Python. So the Pi in there is for Python. Now you can run Python on the Raspberry Pi but the design we ended up going with is much more capable than the original we thought of, so it's kind of outlived its name a little bit
 
@DaveRandom :P
@DaveRandom Where have you been?
 
@samaYo In English (and I think Greek) that's what you say. I believe the French pronunciation is "Pee" but the French are wrong about many things. /cc @FlorianMargaine
@PeeHaa Corfu
 
12:04 PM
oooh nice
Nice food and nice beer
malaka!
 
@r.hamd 1st thing you will have to deal with in PHP will be: there is no "official framework". It's an anarchy. There are loads of different frameworks (most of them shitty). And for lib manager we have this thing "composer".
 
Yeh was pretty sweet, basically went and got pissed in the sun for a week
 
I assume you at least learned malaka right?
 
@PeeHaa Free rep for piihaa
 
12:06 PM
@PeeHaa Umm... no, I'm a nice person :-P
 
Anonymous
@DaveRandom As someone who speaks French and lives in the French-speaking part of Switzerland, I can confirm. :)
 
self-proclamation.
 
@DaveRandom All greek guys say that to eachother :)
Also greek porn movies also like the term
 
Hi there. I'm asking this here, because it's not really a question that would fit in SO, more of just me asking for advice.

So, settings - I've been considering storing them in a json blob in a mysql database. (mostly just because I am comfortable with that) Basically I want the ability to easily add new settings on the fly. Is this practice fine, or is there a much better way to handle this?
 
So I have heard :P
 
12:07 PM
@PeeHaa Well I was hanging around with my misses' sister + family most of the time, so I didn't find it necessary to learn any Greek expletives, we just swore in English
 
:D
So you did learn birra
Mythos is nice
 
It's OK, Alfa is better (IMO)
Although actually most places serve Amstel so...
 
:P
 
There's also a bunch of guys who've set up brewing "real" beer corfubeer.com/index.html
 
Talking of beer - what on earth is going on with the price of Heineken and Amstel? It's gone up to £4.20 in Bristol, when decent beer is still just £3.40.
 
12:11 PM
@Danack Define "decent beer"
 
"not lager"
 
Real ales are always way cheaper, for some reason
 
Imported stuff is generally disproportionately expensive, I think because paying for name
 
@DaveRandom That makes no sense....they're harder to brew I thought?
 
12:13 PM
@JordanRichards short answer is "it depends". If you need to use data from those settings then you will have to "extract" few of those settings as separate columns
 
£4.20 sounds about average for a pint of not-real-ale in Manc, and actually sounds like a good price for Amstel ("premium" imported beer)
 
You should try the beer in latvia, tis lovely. And doesn't make you feel horrible the next day.
 
@tereško Right -- The tricky part also would be updating a specific setting after it's already inside of the json object blob.
 
@Danack Yeh, plus most of them don't have the same economies of scale that a big name like Amstel has. But it's just like smoking Marlboro... they're no more expensive to produce than Richmond or whatever, but they market themselves as a "premium brand"
@Fabor Only UK lager brews give me hangovers, because they're full of crap because of all the chemical processes they use to make the brew cycle quicker
 
@JordanRichards you just extract it, update and store back. Such JSON dumps are used for things that are not really in the logic. For example, I use them to store iOS app settings. Because I only need them as whole, when iOS app requests the API for settings.
 
12:19 PM
@tereško Are there any other methods you know of that are suitable too? (Instead of using a json blob)
 
not really
but I would recommend for you to go with a hybrid solutions: store the "raw settings" as json blob, but some of those settings also store in separate columns, like date of birth and country and time zone
 
the more I use HttpFoundation/Request the more I hate it
 
@tereško Ok, thank you for your advice teresko :)
 
@SergeyTelshevsky making HTTP request abstraction is quite tricky
I know, I have tried
 
I understand
 
12:23 PM
has your workplace begun the migration to Sf2.x ?
 
but it lacks so much necessary methods
 
like ..
 
e.g. I can't extract 'path' part of url
it has getQueryString()
 
your project should live at domain root
=)
 
oh shit.
it has that...
it does live there
it doesn't live there on dev :)
 
12:26 PM
yeah .. that's a really retarded setup (we have it here too)
 
and no, it's just me pulling some unshitty code to our projects
hopefully unshitty
anyway, I'm thinking about rewriting to custom Request class
I remember someone here had an alternative to it, @PeeHaa ?
I'm sure Patrick had it in his nofw tutorial
 
@PaulCrovella thanks
 
@SergeyTelshevsky I think I have made a couple request classes in the past somewhere yeah :P
 
I mean I think I've seen some on your github
nvm, I think I'll use Patrick's
 
12:46 PM
I need a name for service which manages profile details
ideas ?
 
ProfileManager :P
 
PotatoProcessor
 
John.
 
@tereško You'll need a Factory and Provider for that
and an Interface with the word "Interface" at the end
 
12:54 PM
and a lowercase i at the beginning for luck.
and .class.php so people know what it is.
 
and write that in perl
 
You know you're all on a list now.
 
The "ProPHPDeveloper List"?
We use Wordpress too
 

« first day (1643 days earlier)      last day (3290 days later) »