« first day (1129 days earlier)      last day (3813 days later) » 

12:14 AM
JS closures in setInterval are fired after everything is loaded?
 
12:25 AM
emm .. wut ?
 
@webarto What do you mean? Is setInterval in a onload handler of some sort?
 
t = setInterval(function()
{
  $(...)

}, 200);
/* load jquery */
works...
UMM HOW i word this... ok u take 20 lbs no lifting for 30lb if guy, so divide 2 u dont sit, u get 10 but for guy it no 30, so 20 would be for guy if u werent a girl ?
 
because $ is in global scope
 
@webarto $(/*codez*/); means "when the document loads, do this"
 
Ok, check it: jsfiddle.net/685A3 & jsfiddle.net/jE9CY (reference error)
I vaguely know what's happening here, but can't word it.
 
12:33 AM
setInterval() keeps firing until it is stopped
 
The second one's using $ before it's declared.
 
after 200 seconds the $ is defined in global scope, which is why you see no reference error
bottom line: @webarto, your question has nothing to do with closures
 
I think you're not correct... probably nothing to do with closures...
 
"not correct" about what ?
also, browsers stop execution of JS while new script is being loaded
 
now you're maybe correct :)
Thanks.
Unrelated, CSS transitions are slow as JS animations?
I really haven't done any useful UI in year or two, or three...
 
12:49 AM
Interesting. Michael Wallner (someone paid by SmugMug to work full-time on PHP core) thinks that the part of PHP that needs the most work/revamping is HTTP:
> HTTP. It’s kind of an obsession. PHP is named web language and made it very easy to rapidly create web applications, but sophisticated HTTP support has only been important the latest time.
 
By sophisticated HTTP support he means?
 
I don't know exactly.
I did find it interesting though, given all of the HTTP client/servers that have popped up lately for PHP.
 
I guess there is no need to invent something new, just see how "best" do it, and copy :)
 
@webarto no, CSS transitions are faster, but they are not equally supported and have a lot less flexibility (you usually will want to have some logic tied to animations .. or more likely - some animation to mask the time that logic takes)
 
That makes sense, I guess I failed, opted for using JS and setting 100ms timeout, transition: background-position was CPU intense.
Thanks.
I <3 Imagemagick
@tereško are you employed?
 
1:11 AM
nope
 
Why not?
 
haven't begun looking for a job yet
I think I should soon
I want to find something till january
 
I'm applying in company I worked for, only for higher pay/position... think there's more room if you are in those things...
 
I would have to think about that
if I decided to work remotely, there is a risk that I will begin to gather mold
 
I gathered kilos...
 
1:17 AM
Hi there! I'm looking for hosting with plesk. Do you guys have any suggestions?
 
www.google.com
 
^ it's a new thing, you should try
 
I tried many companies
Just looking for some suggestions
Any experience you had or something
 
honestly, i have never understood the point of plesk
 
To be honest I'm bored of cPanel and looking to try with Plesk
 
1:20 AM
.. or you could learn how to use CLI for configuration
 
Plesk is...
Don't know what to say...
 
I'm not that advanced..
Is it really shit?
 
I think you're better off with cPanel...
 
@ManolisC. that's the "learning" part
 
@tereško care to review webarto.com/dm@php.net.pdf
 
1:22 AM
I've been use it for years.. Just for simple things, subdomains, dbs, backups, emails etc
The thing is that i'm really unhappy with my current host. I installed WooCommerce and for example when I upload an image it takes 1 minute to refresh
Check cpanel and the I/O Usage gets full for some secs
Then it's ok
And it's the first time I'm experiencing this
I can't imagine what would happen if I install Magento
 
Isn't it easier to change your host? What host are you talking about?
 
It's namecheap
 
I can recommend Site5
 
I'm happy with their support but they couldn't explain this with I/O usage
 
@webarto emm .... is it Joel-Brown President or Joel Brown-President? Is the "President" name or surname?
 
1:27 AM
@tereško Forgot :before :\ And it's Bootstrap error (non-sense actually).
 
"debian thing" links to some image
also, you will be asked why you had 3 4 jobs in 2012th
 
Hah, true dat.
Maybe I can say we agreed it's non-exclusive employment, right...
Delivering results is actually what mattered...
You're just not allowed to work in same branch for other company, full-time...
 
hello any one can help me... when i want to go my wordpress admin panel then show

projuktichowa.com 403 Forbidden Error Page

If you arrived here due to a search or clicking on a link click your Browser's back button to return to the previous page. Thank you.
how i can solve this..
 
@CoolBoy no, we cannot help you
 
I was getting write error only to find out I have 8kb space left on disk, wonderful...
@tereško :D
Not sure how they come here in the first place?
 
1:34 AM
well ... on BSD you tend to get negative space in those cases
because OS attempts to expand into there filesystems to compensate
 
Didn't know that "trick", thanks for the info.
And he's gone.
curl -iL --head projuktichowa.com
HTTP/1.1 406 Not Acceptable
Server: nginx admin
Date: Mon, 18 Nov 2013 01:36:07 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 382
Connection: keep-alive
It's 406, doh.
 
 
5 hours later…
vs7
6:47 AM
Hi morning
 
7:20 AM
less-high people are usually not greeting phases of day
 
:D
 
7:32 AM
Good morning!! :-)
 
good moaning~
 
mroaempgna
^ current status :)
 
7:51 AM
i should go to sleep
it's way past my bedtime
 
morning
 
Morning.
 
@tereško I think you hear buzzing and fever in your head by now...
 
nope
 
Well I am, even tho I slept 3-4hrs :D
 
8:01 AM
only reason why I am actually contemplating sleeping is simple: i'm gonna get hungry soon .. but today is a national holiday
 
We have a strike today, so no college. HOLIDAYS! :D
 
kill'd
I just ate, like lots...
Yeah, we'll die soon :D
:heartattack:
 
hi is it possible to developer a chatbot for facebook
 
8:09 AM
@gokul yes it is
 
i have done a simple chat bot using switch case in my site but how to make a facebookchat bot in php @HamZa
 
Please don't star random messages
@gokul I don't know, but it's possible
 
thanks @HamZa
 
21
Q: Chat room stars, personal vs. room

Dan LuggAlternative While I believe functionality in this proposal would be optimal, it is perfectly understandable that such an implementation may be too large for reasonable expectations. Alternatively, as has been discussed elsewhere and in the comments (and additional notes) below, a reputation min...

Needs moar upvotes.
 
I want to start new open source in php.
Why I want?
There are many frameworks/ CMS, etc already like wordpress, joomla, Yii, etc. I have used, joomla, wordpress, magento, etc. Problem with them is either we have to learn to work on it, or to hack (changing core) them (which is not a good idea). I want some library which is easy, and it should be like use it or leave it. Like jquery library, if you don't know something use javascript. Else jquery is there. There are many more ideas. But I am not expert, so I don't know about security, etc. Is this a good idea?If so, how other people will get
 
8:23 AM
You're looking for a project that you don't need to learn how to use?
 
:D
 
7
Q: How to reset CURLOPT_CUSTOMREQUEST

ScytaleI’m using a REST API which, among other things, uses the DELETE method like this: DELETE /resources/whatever/items/123 To access this using PHP I’m using cURL like this: self::$curl = curl_init(); curl_setopt_array(self::$curl, array( CURLOPT_AUTOREFERER => true, CURLOPT_FOLLOWLOCATION =

doh! silly php :)
 
If you don't want to learn, then hire a developer.
 
not like that, I know core php more
 
No you don't :)
 
8:27 AM
and sometimes, it's hard to do little things, like adding changing title , adding alexa page rank on all pages, so on...
 
That sounds hard if you are a designer...
 
@web2students.com are you w3schools certified ?
 
You need to determine your audience.
 
i am not w3schools certiried :P
 
Wait, you're saying that adding Alexa page rank on all pages is hard with Wordpress?
 
8:30 AM
@web2students.com nice
 
@Jack Nice catch!
 
jack, this work was given to me on wordpress, joomla , magento, and other also not only wordpress
 
@webarto Thanks :) I happened to stumble upon that question when I had to implement something very similar.
The other answer mentioned setting the value to null as well, but it obviously doesn't work with the current versions of php ... not sure whether it has ever worked tbh.
 
Probably not :)
@Jack It's always like that :D
 
good morings
 
8:37 AM
@webarto Yep, but in this case I felt compelled to actually make it work :)
 
ok,i will start and show you what i want,
 
It's just ridiculous that you have to specify the method every time you want to make another request on the same server.
 
does anyone know how to create a chatbot for facebook in php ?
 
Is it just for method or every NULL value? @Jack
> CURLOPT_HTTPHEADER Pass a NULL to this to reset back to no custom headers.
e.g.
 
@webarto It's specific to REQUEST_METHOD atm.
 
8:39 AM
Ah, then it probably never worked.
 
@webarto That particular option gets handled separately :)
Here to be exact.
 
@gokul stop being lazy and start researching. After the research do the coding
 
@Jack Awesome :)
 
Still trying to find other values that are nullable :)
Ooh, there's CURLOPT_FTPPORT :)
And four more ... suppose I could add those as well =D
 
8:58 AM
My problem is not solve yet, I expect someone help — Mizanur Rahman 2 hours ago
 
moin
 
buenos dias, señor Joe
 
morning
 
0
Q: Get notified on stock unavailability

Mr_GreenI am trying to create a "Notify me" feature if the stock is unavailable. On search on admin panel, I could find only that a user should sign up / log in to get notified about the stock availability. But I just want to let the user (a guest) enter only his/her email address to get notified. How...

^ Need help in magento :(
 
9:13 AM
@AlmaDo What if $a appears in $b? :)
 
@Jack Do it :)
 
@webarto I was going to, but there's a bunch of #ifdef declarations that would have to be copied ... trying to think of another way :)
 
@Jack ah, yes. those first strpos is redundant
but it will work fine
I've removed that part (it remained from recursion variant which I later changed)
eh.. who is upvoting wrong answer ? O_o
 
Hi @JoeWatkins ....
 
9:35 AM
morning
 
morning
 
*downvotes @AlmaDo*
 
Based on the question I would assume OP means longest substring between two strings.
 
@salathe you're welcome. But for me it's very strange to see when totally wrong answer gots +7 in 2-3 minutes
 
9:39 AM
It's official. Radiators are on.
 
@AlmaDo it might be strange, but unfortunately it's not uncommon. :(
 
hi, @Fabien
 
morning @AlmaDo
 
@salathe what do you mean?
 
@AlmaDo I see wrong answers getting lots of upvotes regularly.
 
9:40 AM
 
@Jimbo et al.
 
@salathe well - that is because lack of expert's reviews..
hi, @Jimbo
@salathe btw - I don't agree with your cv :D not because there's my answer. But because of link you've provided - no common or similar SO questions :p
 
1
A: Finding matching portions of two strings in PHP

JonThis would be the answer. Ready-to-use PHP function.

tada :)
 
@Jack yes, you are correct
 
@AlmaDo rubbish, there are dozens of "common substring" questions tagged for php
 
9:43 AM
just want to type that argee with your link :p
 
@salathe If you're searching on the site itself, you will get these five.
 
@Jack SO site search isn't very good
 
'cause google set higher standards :P
 
@webarto agreed. SO's search isn't good enough in comparison to google
 
Anyway, that question is a duplicate of many, many others. Fact.
 
9:49 AM
I agree that the site search isn't great ... I wonder if they have any plans on improving that.
Of course, Google now takes care of that :)
 
why do that.. let google be front-end for SO
 
because site search has more granular controls.
like ... if you mention php in a python question, the [python] search option makes it clear what you're after.
 
10:10 AM
Are there any notable PhpStorm plugins?
 
@ircmaxell I sent some of your blog articles to the person who teaches advanced OOP in the Hebrew University in Jerusalem (one of the top 100 ranked universities for CS). Long story short they'll teach it :)
 
:)
 
She mainly liked the first article from your recent series, I think it's the best out of them too.
 
Is it Technion?
 
No, it's the Hebrew University. We're better at CS but not as good at engineering
 
10:17 AM
Ah, sorry, missed that, you already stated.
 
10:28 AM
In factory pattern, there should be factory for every thing like vehicleFactory->carFactory.. busFactory.. etc.. or there should be a global factory that does everything?
 
@JonyKale That depends on the level of abstraction. If you've got a factory that delegates to other factories of different types it's called an "abstract factory"
 
So if my script is not going to be that big, that focuses on one thing, unlike a CMS, then I should use a single factory, right?
 
@JonyKale If that makes sense - yes. It's more of an art than a science. Do what makes the most sense.
 
Okay thanks
 
What does your factory actually make?
 
10:36 AM
Not sure, didn't design it yet, just wondering
Going to give it a shot now.
 
Don't overthink design patterns, iterate and refactor.
 
unless you're building a rocket .. in which case you might want to consider something else than php =D
 
I still dont really understand factories
I'm ashamed to admit
 
Madara Uchiha explained me it pretty well in hebrew
 
@SweetieBelle You don't understand what they do or when to apply them?
 
10:50 AM
@Jack When to apply them
 
@SweetieBelle Do you know some JavaScript?
There are pretty obvious examples in the browser with JavaScript
 
There are a few reasons I can think of; an instance may not be required immediately (or at all) or use up a lot of resources to create.
 
@Jack that's not what a factory solves.
 
It's a problem that it solves regarding object creation :)
 
It's not lazy instantiation - factories don't usually give you that at all. Factories just handle generic creation.
 
11:02 AM
Of course, its intended use is to defer the exact object type that will be created.
 
Just like document.createElement in JavaScript that gets the element type and creates an element of that type although different elements have different properties and logic associated with them.
 
Okay, you have a class that will create, within it, multiple versions of another object in a loop.
Pass in a factory and have the factory build those for you - no new keywords in your method
 
"No new keywords" has nothing to do with factory.
 
It's merely a result, for how I've implemented it anyway
 
You don't need new even if you don't have factories.
Yeah, sure.
@Jimbo why a loop?
 
11:05 AM
@BenjaminGruenbaum Retrieving data from an API, populating new objects providing a server-side (yours) representation of the data
 
@Jimbo A loop has nothing to do with a Factory. That's not a factory..
 
@BenjaminGruenbaum I didn't say it did... I'm using a factory within a loop.
 
Ah, ok. Thought you meant the other way around.
 
A loop within a factory? LOL
 
Pulling data from the server is definitely not a factory :)
 
11:07 AM
No. That's mvc. #troll
Bit of md5 in there
 
11:25 AM
What do you use instead of new?
 
@SweetieBelle The factory creates the object for you, $user = $this->$factory->create('User');
 
@JonyKale Doesn't that make it tight coupled?
 
Not really, i should give you the example madara gave me
sec
 
@SweetieBelle Here you don't know if it creates an actual user - the logic of what to provide to you is inside the factory effectively performing a form of decoupling.
 
class Service {

    public function register($username, $password) {
        $user = new User;
        $user->setUsername($username);
        $user->setPassword($password);

        return $user;
    }

}
for example, but we have a problem. Let's say tomorrow I want to enter a different object there
    public function register($username, $password) {
        $user = $this->doFactory->create('User');
        $user->setUsername($username);
        $user->setPassword($password);

        return $user;
    }
 
11:29 AM
Why?
Why would you have several user types?
 
Dunno that's how he explained it
 
I don't understand that use case :P
 
"Tomorrow I want to register aliens instead of users" doesn't sound like a real use case to me..
 
probably he was a bit metaphoric to explain it lol
 
11:36 AM
You may want to create a Truck instead of a Car I guess?
But that doesnt tell me why I shouldnt use new
 
Because the logic of creation and the logic of usage are separate.
 
Unstar the above two
Seriously
 
@BenjaminGruenbaum In a real use-case though, why not use new?
I honestly don't know
 
Because, the logic of deciding which object to create can get really complicated.
 
What if I know which object to create?
 
11:39 AM
That logic should not be in the same place as the logic actually doing things with the object.
It's separation of concerns and SRP.
Anyway, I got to go - there are a ton of real use cases, I'm sure someone around here can help you find one.
 
12:10 PM
Is there a more friendly way of handling ajax requests in PHP?
For example, to handle ajax I need to create a separated php file and then access the source in a different way. If I will not do that, the ajax will just return whatever the source returns when you load the website
IP.Board uses a lot of ajax, and i've never seen it using a separated php file for ajax, i've seen an ajax class though.
What is a good pattern to handle and reply ajax requests?
 
Detect if the request is an XMLHttpRequest
Then respond differently if it is
 
user895378
So ... It's been about 8 hours and I'm still getting 503 Service Unavailable when I try to git push ... I don't see how this could be a problem on my end unless github is using the 503 status code incorrectly. Has anyone run into a similar problem?
 
user895378
503 when I git pull too ... github, you're killing me.
 
user895378
12:34 PM
Nevermind. Solution: always use SSH instead of HTTP when dealing with github.
 
Yes, SSH is much better.
 
s/dealing with github/possible/gi;
@rdlowrey
 
user895378
good point.
 
I am going to post non-pone music in here, for the first time ever.
Have had this on repeat for about 25 minutes now
 
user895378
@SweetieBelle would've been a lot cooler if youtube didn't force me to watch 15 seconds of lady gaga first ;)
 
12:48 PM
@rdlowrey no AdBlock?
 
user895378
I don't believe in AdBlock, personally.
 
user895378
and youtube is the only site I ever use that slaps me in the face with ads so it's not a big deal.
 
Yea, I dont have AdBlock either, there are a few legit cases where it's the only way a company can survive on
Like as a gamer like myself: teamliquid.net :D they need clicks =)
 
As you may be aware, the PHP.net site was the target of security attack that made it spread malware for a while. The circumstances of this attack were the main topic of discussion between Manuel Lemos, Jim Malico of OWASP and Chris Cornutt of PHPDeveloper.org.

They also commented on the latest efforts to make PHP more secure, as well what PHP developers can do to develop more secure Web sites and applications, and minimizing the damages of eventual security attacks.

This podcast is totally dedicated to PHP security matters and is strongly recommended in particular for security conscientio
What
 

« first day (1129 days earlier)      last day (3813 days later) »