« first day (1254 days earlier)      last day (3919 days later) » 

00:02
Help me understand something: If I'm building a CMS, and I load EVERY script file on each page call, this shouldn't be a problem if Apache keeps the pages in memory?
 
1 hour later…
 
1 hour later…
02:30
@David I don't think so. I can type on QWERTY keyboard without looking at the keys. I was typing using QWERTY layout on a DVORAK keyboard for some time without any issues. So I don't really see it as a problem if you can touch type.
Alright, I think I figured it out.
02:47
hey every one (=
hi @danieldorn
03:24
whats up andho? (=
evening
03:56
trying out gilab. I've never successfully installed it
04:26
mornin'
Could some one please please help me! I am doing a school project which is due in a weak time and I can not get ajax working the way I need thank you!
0
Q: Calling a php function from Javascript and using a javascript var in the php code

reidjakoJavaScript function calcPrimesLoop() { var primes = document.getElementById('primes'); primes.appendChild(document.createTextNode('\n'+this.prime.nextPrime())); $.ajax({ url: "/test.php", type: "post", data: {prime: this.prime.nextPrime()}, success: f...

@reidjako you didn't mention any issue with your code.
my friend went to interview for some unix admininstration work, why they asked him for db optimization on the query layer skills? E.g., why should he know how EXPLAIN for mysql works, if he need to update linux core on time?
they didn't ask for "EXPLAIN", I just assumed an example
04:53
query layer?
@andho Yes i did....
> The issue is the numbers aren't being recorded
@reidjako not very informative. At what point does your code fail. Does the ajax call go through?
why admin should analyze slow query log
how he could know ?
@andho Well the ajax goes through I believe. I am not sure thats the issue.
@AxelFoley slow query log is a DB admin issue, which a sys admin can also do. There is no SQL knowledge required. It's a matter of configuring MySQL, and monitoring.
05:02
Probably, he was afraid about programmer side, when they asked him for admin side..
@reidjako you can make sure very easily using firebug/chrome dev tools and just echoing something from php side. If the ajax successfully works (with correct data), you can work on debugging your php file separately
@andho Yeah I added an alert the Ajax is working. But when I add a form to the php script and submit it that works. So the ajax and php scripts are not working together as such
@reidjako it would be helpful if you include this in your question
@andho Another question is, is there a way to get more people to view it?
one way is to include a bounty, but you will need to improve your question.
@reidjako so just to confirm, the correct data is being sent to /test.php from your ajax request and there is no error in the php script?
> $content = stripslashes('content'"\n");
what does that do
> PHP Parse error: syntax error, unexpected '"\n"' (T_CONSTANT_ENCAPSED_STRING)
05:19
Thats because I didn't repost my modified code. It should be 'prime'
@reidjako make sure your question includes things you've tried and don't have errors like above. Any one trying to help will be stumped by the following error and just point it out, which is just a waste of their time, isn't it? Update your question as you go along trying people's suggestions.
'prime' is not the issue. That code has a syntax error
I have been changing the code as I try their suggestions. I changed it to prime.

$content = stripslashes($_POST['prime'];"\n");
work?
@andho
no it doesn't work
06:57
@reidjako How are you calculating the prime numbers ? With JS or PHP ?
 
3 hours later…
09:47
codepad.viper-7.com/XQYnCd // How can I remove this part form string "<div class=producturl>*</div>"
tried something like: phpliveregex.com/p/4nZ without luck /:
@Jacta You would need the s modifier since the dot doesn't match a newline by default. Also use .*? instead of .*
did really still have anyluck :/
@Jacta Enable error reporting, I think you should escape <\/div> or use other delimiters than "/"
10:07
isn't this site attracking user? spotguesthouses.weebly.com
or just user doesn't need to go thru?
@Jenny attacking or attracting ?
and it comes in google search like in 9th page how can i get it indexed better
sorry attracting
morning
@HamZa ill try, thanks - thanks for your time
10:38
welcome
Morning ya'll
Morning, Are abstractions like mathiasverraes/money still relevant in PHP 5.4/5.5 or has working with large floating points been solved really?
10:54
@Aren money is not about floating points. its about semantics. its a value object.
Understandable that when we represent money, there's more to it than the actual value (amount?). I'm just trying to determine if I'm overcomplicating by using an abstraction when I'm only supporting one currency type and numbers under 100,000.00
I mean, built in rounding strategies seems to be the only thing I get out the library provided that the floating point math isn't an issue.
@Gordon can u check this site? spotguesthouses.weebly.com isn't it sttarctive for user? :/
@Aren and on a more general level: martinfowler.com/eaaDev/quantity.html
so money is more complex that just a floating point value
@Jenny the page makes my screen look like it's full of dust. I actually wiped over my screen twice before I realized thats in the background images
HAHAHA
ouch :(
Dear god, I just did it too, even after you mentioned it, I thought you were talking about in the dark spots, but i saw something in the light spots and instinctively wiped my screen.
11:10
heehe no it is nt dust :D
so i have to change it then
I would suggest you do. That doesn't really add much for the user aside from annoyance.
rest is fine?
@Jenny rest looks like it was made with a wysiwyg tool straight from the late 90s
urgh anyway
if this is to appeal to a traveler's aesthetic sense, then it needs improving
like when I check lodges and hotels and stuff, I expect the visuals to catch me immediately
11:15
@Gordon ya it is made for business purpose and not getting business through this somehow
so i have added images
doesnt them help
@Jenny it's basically lacking a design. it's more like a page with information
check out some other pages, for instance sa-rota.com/agroturism-hotel-country-mallorca/index.php
the mood there is much lighter and the pictures are way bigger
ya i am checking it
ok need changes
I got it @Gordon need to be clean and bright
thanks
you have to get your visitors into the mood. they have to visit your page and think "I want to be there"
11:20
and the other thing i have added meta keywords but still this appears like on 10th page on google search is there anythn that i can do to improve that too?
@Jenny it's been a while that I did SEO but afaik most of the on-site optimizations don't help as much as off-site linkage to your page helps
off site likage means
@Jenny links to your site on pages elsewhere on the internet
how can i do that? who would link my page to their sites?
or do u mean something like adward?
@Jenny booking sites
11:28
i have to pay for it?
depends on the booking site
@Gordon Isn't that a bit of a no-no and will result in you getting a penalty (paying for links)
@Leri Yeah sure, sounds good
11:31
@SecondRikudo not that I know of. Besides, when I find some nice looking resort on TripAdvisor I usually want to see the website. why should search engines penalize that?
@Gordon thank you
@SecondRikudo yes it doesnt . I dont think google pay for renting houses web sites
@Gordon IIRC, paying for someone to link to you in order to get SE rank results in a penalty.
@Jenny you're welcome. in general, don't expect to have too many people booking on your site directly. partner with vooking sites because traveler's use these sites because they have the biggest selection and search facilities.
@SecondRikudo that would mean all sites listed on something like trip advisor or booking.com or something like that would get penalized.
@Gordon ya i got it
I think she talks about adsense. And i think booking houses sites do not do adsense instead they have to advertise theirs paying google o.O
@Jenny i did not suggest adsense or stuff like that but listing the guesthouse on booking sites
11:36
@JoeWatkins hey, please continue work on phpdbg :-)
@Gordon no i said that @SecondRikudo thinks like that. I got what you said early
@Jenny She?
@SecondRikudo sorrry i did not ckeck profile profile pic not much visible just said
@SecondRikudo thats what you get for your manga naming :D
@Gordon I could understand "Madara Uchiha" being mistaken as female
But "Second Rikudo"?
That's totally gender neutral.
11:43
@SecondRikudo but theres a long haired girl on your avatar picture and your self description can easily be interpreted as a feministic statement ;P
freak, can someone spoonfeed this guy please
@Gordon o/
i saw only Second part of you name some how ur total name visible now sorry
@SecondRikudo ayo o/
@Mr.Alien \o sup?
and here comes an Alien from which planet are you now? @Mr.Alien
11:45
@SecondRikudo waiting for 7 pm, we got a match with the west indies.. t20 wcup going on ;)
@Jenny hello, currently am on earth :)
12:22
hello all
JS channel is quiet. Anyone here?
12:42
@JoeWatkins Finally… there are now no known bugs with watchpoints… I hope there won't be any other bugs…
@JoeWatkins I'd be happy if you could test them too.
13:19
Deleting a local copy of a git repository… over 20k files in (one!) subtree cache, takes eternities to delete them all :-/
Morning.
14:33
i hate this question. i've seen it so often
and of course John Conde has to repwhore on it
user2286243
14:49
Can anyone give me a little help regarding PHP framework terminologies? How are vendors and plugin different?
user2286243
15:25
@SecondRikudo Man I need help with this question. Am having the same problem...
Congratulations to me. I've just published my first chrome web-store extension.
FYI I updated the examples and a few other things in the Return Type-hinting RFC.
 
1 hour later…
16:56
can anyone help me with something?
17:13
@SecondRikudo How long have those rules been going for?
17:28
@David Check the repo at the footer
About a month or so it seems
17:55
Guys a question, I'm a bit new to web development, you can call me a newbie, shall I try and learn on MVC's already? Or shall I keep hard coding for a bit?
sigh
curse your ruby on rails for making legions of developers think MVC is something special everyone needs to know
Well it kinda is. ^
I.e. one should know design patterns.
there is so many more important patterns than MVC
@OsamaDaraghme I think it's more important to know WHAT MVC is, what it's strengths & weaknesses are and then make a decision for yourself if it suits your project.
Thank you guys, what other design patterns I should check out and try to understand?
18:08
All the Gang Of Four patterns except Singleton
Plus the Domain Logic Patterns and Base Patterns from POEAA
Thank you all! :D
dn5
dn5
Is this relative place where I can ask about .htaccess and RewriteRule?
@Gordon Singleton is not that bad (not talking about php... and web, in general).
@Leri right, it's not that bad. It's even worse.
@Simon_eQ 50 days left
dn5
dn5
Anyway, whats wrong with the second rewriterule, it throws me error "Object not found": pastebin.com/jHjAtadV ; First one works fine.
18:13
@Gordon Seriously, what should I use when I want to maintain per-process in-memory cache but singleton?
I mean platforms like winforms, android application framework, etc.
@Leri why does it have to be unique? why do you need global access to it?
@crypticツ Rainbao!!!1
good morning
pastebin.com/BVhgJ8wv Is this overkill, or is there a better way of error checking arguments?
@Gordon Increase performance. For instance, reading from file is hell slow in Android, so I read stuff once, cache it in singleton instance and pass one around like it was injected.
However, fact remains that data is cached in singleton instance.
@crypticツ Morning.
@DoctorDerp Personally, I wouldn't try to define behaviour on a plain array. Instead encapsulate the data in a class that has the behaviour that you desire.
18:18
@Leri initializing an instance with data from a file doesnt make it a Singleton.
No. If I was at work, I'd show you real use-case. I'll make some pseudo example now.
@DoctorDerp your error checking says the function requires three arguments and they cannot be null. why do you make the arguments in the function optional then?
@Gordon Now I see, that's a bit redundant.
@Danack What do you mean?
@Simon_eQ I've lifted the suspension. Just let me know if you want me to put it back.
@DoctorDerp You're doing empty($passedArgumentsArray[1] to presumably prevent an empty wordList being passed. You could make a class called WordList, which takes a list of words as it's contructor parameter. Then in your function have the parameter be type hinted to accept a WordList param.
Which would be (almost) guaranteed to not be empty.
18:24
@DoctorDerp you can remove all that error handling by changing the function to public function sort($numberOfWords, $alphabet, $wordList = null)?
@Gordon Something like: pastebin.com/tKwRScz6
@Leri I'd prefer a singleton (lowercase s on purpose) in that case, e.g. I'd have the instance managed through a DIC or Factory
@Gordon In any case, instance should be remained static so it can survive in memory and at some point you can argue about using global scope that is the only solution here. In the example given there's no difference between newing object or calling getInstance method. :) so if you call it properly, you won't notice polution that is brought by global scope.
@Leri its not only the pollution of the global scope. if that was the only problem you could use simply use a registry. It's also the impaired testability and the hiding of dependencies.
When you are limited and want to get maximum out of platform you may violate some of those good principles. Just in an acceptable doses.
Honestly, I have not seen real-world product which is completely testable.
19:01
hi all
I nned help from anybody
hi guys I am trying to get how many days remained for the next birthday but it seems like am not wining please check my try codes it here on pastebin
pastebin.com/Ufp2a7T2
any help please
Anonymous
19:47
@Gordon why? Did you think I needed it?
@Simon_eQ huh? no, you asked for 2 months but since you came in today I thought you might want to get it lifted
Anonymous
@Gordon Liar!! Why not just be honest and say you missed me ? :p Anyway, I do that often just to see if there is any interesting/new thing to read here.
@Simon_eQ want me to put the suspension back?
Anonymous
@Gordon is there infinit suspension?
@Simon_eQ no
Anonymous
19:53
@Gordon What is the longest then ?
@Simon_eQ 9999 hours
Anonymous
Nahh, Just make it a year.
Anonymous
thanks for all the fish btw, (incase I never show up again)
@Simon_eQ done
@Simon_eQ you're welcome. wish all you the best
20:28
has anyone encountered the problem of unable to save files in notepad++ in WinSCP?
winSCP is killing me on their default editor....
:(
21:25
Anybody good with string conversion? stackoverflow.com/questions/22597267/…
@bigmike7801 wait more than 1 minute to ask in chat. Seriously, do you have no patience?
You just posted the question. Wait for someone to respond.
I didn't know there was a time limit.
@bigmike7801 Numeric HTML entities are always UCS, getting the numeric 1252 codepoints doesn't really make any sense
One of the benefits of using named entities is that they are character set agnostic, they refer to a character rather than a code point
21:43
does anybody know how to get an internet music broadcasting license in India?.. the last word is the most important part... because it's a confused country... :P..
The reason I need it is that I'm parsing an XML file that has strict requirements of using WINDOWS-1251
Let me rephrase. I am sending an XML file to a 3rd party vendor that has a strict requirements of using WINDOWS-1251 within the XML document.
OK, well you should just covert the text to that encoding, and substitute only the special characters.
If the document declares its encoding to be cp1252, that means you can use literal cp1252 sequences
(in other words, iconv and htmlspecialchars is what you need)
Also FYI @bigmike7801, if they are using numeric entities that refer to a character set other than UCS, they are violating the XML standard
Can you maybe put an example as a response? Thank you.
user2518044
Hello!
cwd
cwd
I'm currently trying to switch over to PDO and could use some help with the syntax issues I'm having if someone wouldn't mind helping me out.
I didn't feel it was appropriate to ask this as a question on the site as it's more of a personal issue.
Here is the link to the code so I could collaborate in real time with someone. [MY CODE](http://code.stypi.com/tywzi9bw)
user2518044
21:54
Does anyone know if PSR-4 Autoloader can have multiple paths to a single namespace?
cwd
cwd
FYI I'm trying to shorten the words in a post and add ... after so many word counts
user924016
ning
spent the weekend doing things I shouldn't ... docs.php.net/uopz everyone can join in :D
user924016
yea great job, cool stuff
22:05
@bigmike7801 I don't have time to write a proper answer out at the moment I'm afraid. To sum it up in a sentence though: Make sure your text is encoded as cp1252, pass it through htmlspecialchars() with the appropriate flags (depends exactly where you are using the output) and specifying the encoding as cp1252, then use the strings directly in your output.
@JoeWatkins Ummm... you rewrote runkit?
sorta, accidentally ...
@JoeWatkins jup you should have written some code for phpdbg…
yeah, I'll get to it ... I didn't choose to write this ... nobody is paying me to work on pthreads or phpdbg ;)
@JoeWatkins pay yourself so that you feel paid. ... were you paid for uopz?!
user924016
lol
22:09
@Bartek Yes. For example with Composer, you could have the same namespace used by two different vendors, which would be in separate directories.
@bwoebi I had to write it for work, we have a huge unit testing suite that fails all the time because of test_helpers and runkit, so I was tasked with solving the problem and once it was written I was told it was okay to release it .... so yes, I was paid to write it ... it only took a day or so ...
@JoeWatkins ...and what exactly is wrong with runkit? Aside from the fact that using anything like that in general is almost certainly code stench oh you just answered it :-P
@JoeWatkins oh really… that I didn't expect now…
the only time it's really acceptable is unit testing there are things you need to do, or not need, but make life a whole lot easier anyway, this serves that purpose only, I don't suggest you should start writing all your code with uopz_compose, however cool it may be :D
@JoeWatkins runtime trait binding like in scala? :-D
22:16
yeah ... some of it would be pretty cool in core, but it's never going to happen ...
I doubt that we have an overall majority against that if someone drafts a RFC…
well I figure it must be some design concern that we can't do this stuff by default ... but on the other hand why are all these functions ZEND_API if they aren't intended to be used outside of /Zend ... best not to try to make sense of it ...
if phil says he's up for it, then maybe he'll do an rfc for some of it, but I had my fun, as usual ;) I think compose/function/extend/implement are pretty useful as core features personally, but I am probably wrong ...
Well, ya… Because PHP :-)
extend/implement is maybe a bad idea as it binds classes to interfaces even when they shouldn't…
I guess the problem would be that for them to be really useful you would kinda need all of it ...
Btw @JoeWatkins ping me when you encounter any watchpoints bug or if it's ready to be merged into phpdbg/master
I've managed to fix all the known bugs today…
22:25
yeah, I will, if it' ready I'll merge it myself ... don't suppose you've looked at lexer branch yet ?? would be nice if you could do the prep work to merge with lexer branch so they can both be merged soonish ...
yeah I saw your activity ;)
@JoeWatkins I'd maybe first merge that one into master and then update lexer branch
and then I'll review that branch
well I was looking at the patch last week and noticed it was behind master even, I think I remember that ... I'll look during the week anyway
yes, it's a bit behind master, but that's easily mergeable
It's just not mergeable with the lexer branch
22:30
foo
bar
(say baz!)
template<typename... Args> zval_ptr(Args&&... args) : ptr{new zval{std::forward<Args>(args)...}} {}
@NikiC What's that awfulness?
@JoeWatkins merged master into watchpoints_recursive.
@bwoebi That's C++ ^^
@NikiC well, I have no idea, it just looks awful and I have no idea what that should do…
22:34
whatcha doing @NikiC ?
@bwoebi It's about the same as writing function __construct(...$args) { $ptr = new zval(...$args); } in PHP. Just with types and preservation of move semantics and stuff. And yes, it looks hideous ^^
@NikiC I just hope php-src never will look like that.
@bwoebi Yeah, continue to hope ;)
On the other hand, that allows you to write zval_ptr zv(42); and it will automatically allocate and initialize a zval with type IS_LONG and value 42 :)
oh another implementation of php on reddit, this time a java one ...
@NikiC or just ZVAL_LONG(zv, 42) ?
after the init?
22:40
@bwoebi You mean zval *zv; MAKE_STD_ZVAL(zv); ZVAL_LONG(zv, 42) ;)
sorry, mixed up an init pzval there ... I can never remember all those macros
@bwoebi zval_ptr zv(42) is normal in C++, note niki said it allocates, initializes etc ... not just sets value, is shorthand for zval_ptr zv = new zv(42)
create a macro series MAKE_ZVAL_LONG(zv, 42) and C++ has no advantage.
@bwoebi oh, it has
I just don't have enough motivation to explain it to you
what an answer.
cwd
cwd
Not sure who was In the room helping me out. But thank you very much I appreciate it!
22:43
@bwoebi It only gets really interesting because refcounting also happens automatically ;)
and you can do cool things like define allocators and what not ...
@NikiC at the cost of perf?
@bwoebi no
I don't think there's no advantage to using C++, but think there's an awful lot of added complexity, I'm not sure it would really be good for PHP to be rewritten in C++ some of it could be though ...
user924016
gn
22:45
nite @RonniSkansing
@JoeWatkins The C source for PHP is Macro Hell.
I'm not sure how much of it could be cleaned up with C++.
@LeviMorrison I'm not entirely sure yet either. That's why I'm trying it out
@LeviMorrison I think mainly the *_TYPE() (where TYPE is LONG etc.) could be saved but that's no major gain I think…
If I remember correctly there are a few places where inheritance might help as well.
@LeviMorrison object handlers maybe?
but I don't think we'd have a really big overall benefit here with C++, just some more possibilities to make code look ugly.
22:51
@bwoebi Says the person who doesn't know any c++
@NikiC well, yes exactly. To make code look ugly for someone who doesn't know C++.
@bwoebi We'll discuss that once I have some working implementation. Makes little sense to argue over things that don't exist
I'd like to say something like "Good luck with wasting your time" if it wouldn't be rude :-/
lol
wasting time is what I do
but maybe… we'll see what time brings
@NikiC explain?
23:00
@bwoebi I do little apart from wasting time
As long as it's a pleasant and instructive way to waste my time, I'm okay with it :)
@NikiC You mean everything except studying is wasting time?
@bwoebi Studying is not a waste of time? :P
@NikiC studying what Voltaires messages in Zadig were is wasting time, yes. But studying maths is not…
@bwoebi In that case, porting php-src to C++ also isn't a waste of time. Refreshes my C++ knowledge, which is definitely useful skill. Also I'm finding opportunities for optimization in the existing implementation along the way.
Actually, now that I think about it, the only true way to waste your time is participating in internals discussions :P
4
@NikiC okay, just let's see what time brings :-)
23:06
As long as you don't do that, you're doing something semi-productive ^^
@NikiC hehe
@bwoebi So, what are you up to?
Studying maths? :P
no, the first one :'-(
having today a test in French…
eek
today?
oh, that today
damn that ordre immuable dans l'univers … -.-
@NikiC yes, that today, not looked on the clock?
23:08
@bwoebi The term today is undefined between 12pm and going to bed ;)
but it becomes defined in a context…
or do you think it's possible I'd write the test just after midnight? :-D
good night…
good night
and have fun with Voltaire :P
no, I don't/won't :P
btw, french was one of the things I was really bad at
Usually I manage to be good even with things I don't like, but french...
23:38
@NikiC French is a stupid language which (in my experience) is taught only by people with distractingly stupid hair. It's impossible to learn anything from a guy with a combover and a ponytail, it just looks so wrong.
Not that there's anything wrong with the ponytail, but it looks so out of place with a combover
Honestly, you can't stop looking at it. I've got the image back in my head now and it won't leave.

« first day (1254 days earlier)      last day (3919 days later) »