« first day (963 days earlier)      last day (4210 days later) » 

14:02
$message_query = mysql_query(" SELECT messages_id, from_id, message, date FROM messages ORDER BY date WHERE group_hash='$hash' ");
can anybody help me to find what is the problem in writing this script?
Anonymous
or die (mysql_error());
Anonymous
add that at the end
@Stefanos There are two things; 1) you're using mysql_query() and 2) date is a reserved word and should be enclosed by backticks.
it's the part that says mysql_
any suggestions how to write it correctly?
Anonymous
14:04
$message_query = mysql_query(" SELECT messages_id, from_id, message, `date` FROM messages ORDER BY date WHERE group_hash='$hash' ") or die (mysql_error());
@phpNoOBఠ_ఠ no. or throw Exception(mysql_error());
Anonymous
maybe...
@Jack I got a captcha the paste would have triggered the spam detection filter.
14:09
Say what now?
How can a class extend the same class? Wierd......!
Can anyone explain this?
class SplStack extends \SplStack implements Serializable
@udaysagar Different namespace.
okay bbl people, have fun
aha, okay...
@bwoebi only throw errors if you are trying to make reusable code.
14:12
@Jack where could be the location of that namespace?
@dragon112 no. exceptions and their backtraces...
@bwoebi I meant to say only throw Exceptions if you are making reusable code.
@udaysagar Well, look for namespace statement in the file you're looking at.
ok thanks people
namespace Zend\Stdlib;
14:14
@udaysagar So, Zend\Stdlib\SplStack extends \SplStack.
okay....
thanks @Jack
@dragon112 sounds like an odd argument.
@dragon112 and why?
@bwoebi Probably a reference to this, but taken out of context.
@Jack In that case we should have two different SplStack php file right?
I could only see 1 in the whole application
I mean at two different locations
14:19
@udaysagar The other one is here.
It comes with PHP.
OMG! PHP is an ocean or what?
ha ha
couldnt differentiate what is user defined and whats built-in..
@udaysagar Ehm no, according to some it's a pile of crap ;-)
Is there a way I can achieve the following result with the following code:
Does anyone know if it's possible to check if part of a URL is a file using htaccess? e.g. "/es/contact" would check if "contact.php" is a file?
14:23
I have 2 arrays, if ev1 is in the first array the first message of the last array should be parsed if the second element is in the first array the second element should be called.
ev1 matches 0
ev2 matches 1
ev3 matches 2
@Duikboot You want to know at which index a value is found in the array?
Wait .. the first array comes from checkboxes being submitted via a form isn't it?
Why are you calling them ev1, ev2, etc.? Give them the value of the indices in the second array.
So, extending the Reflection* classes; since (for example) $reflectionFunction->getParameters() returns an array of type ReflectionParameter, I'm guessing if I want to extend a MyReflectionFunction to return MyReflectionParameter, I'll have to override all the pertinent methods; there's no built-in way to pass a custom type of parameter (like, for example with simplexml_load_*)
ev is event
14:28
@Duikboot Then ev[0], ev[1] should be the checkbox names.
@Bracketworks Yep :)
Phooey Balooey.
It makes sense, really.
@Jack Well, yes it does.
And when the hell is there going to be a generic CallableReflection with a factory method!?
What would be the use-case?
CallableReflection::create(function () { }) and CallableReflection::create(['Class', 'method'])
So when I have function myFunction(callable $callable) I don't have to perform so much inspection on $callable myself.
14:33
Isn't callable type-hint already doing that for you?
instanceof \Closure and is_array and is_string and so forth.
@Jack Not when I want to create a reflection of whatever was typechecked.
Just write it once and tuck it away somewhere ;-)
@Jack And thar be the issue; I hate having to extend PHP because I always end up with a shit-lib of garbage pseudo-core functions.
Better get used to it :)
You will always want a language to do more than it currently does.
@Jack I refuse to
14:37
Except perhaps for Brainfuck, that's pretty feature complete :)
@Jack lol, and Ook
Esoterics aside; anyone can find a feature hole in a language when you have a localized issue, but there are far too many non-localized issues.
Such as?
Such as a non-unified reflection API, especially with respect to handling functions.
We all accept the shortcomings of PHP, the other option being stop using it; but I'm starting to deride the "deal with it" response.
Besides reflection =p
Yes, besides reflection ;)
@bwoebi It's [tag:cv-pls] ;-)
Otherwise it doesn't get recorded in ze backlog.
hyphens? in my cv-pls request?
Anyone help with a simple regex? I want to parse non-arbritary HTML with regex. I need the value here: ">23432</hx:include>. I'm using />.*?<\/hx:include>/g - I'm close, what am I missing?
15:02
What's up with the /g? JavaScript? @Jimbo
Looks like so.
Unfortunately JS, yep
And you're sure that's HTML? How are you even getting that data?
@webarto Got it, capital S for strings
capital S for stuff that ain't spaces.
15:05
S = ^s
\S = [^\s]
Err.. yea
@Jimbo rubular.com/r/9KHP5x7QJl You can define what is a "string" inside [].
Why the [\w]+? Just \w+
for [a-z0-9\-\?\...] stuff...
@Jack which backlog??
@Jack do we need thsi?
@bwoebi Yes.
why?
because
@bwoebi Because [cv-pls].
15:11
what?!?
@bwoebi do you even know why we use those tags to close questions?
to highlight them?
@webarto jsfiddle.net/6Meyt Is the regex slightly different for JS?
the backlog records those entries to make sure they eventually get closed.
ah okay....
@bwoebi wat?
because you answered it?
@Jack no.
But the question is a normal question; maybe not of a very high quality, OP unable to rtfm...
but nothing that deserves a cv
If I give questions a cv, I normally don't answer and leave eventually only a comment.
@webarto Brilliant, I just got it working with multiple .replace(), cheers :)
15:23
;)
@bwoebi I would sometimes both answer and cv :)
Sorting questions are in today.
0
Q: Find array in array, in sequence

theclueless1How to code up a [find-array-in-array] function? Psuedo-code Haystack: array(0=a, 1=b, 2=a, 3=b, 4=c, 5=c, 6=a, 7=b, 8=d, 9=c, 10=a, 11=b, 12=a, 13=b, 14=c); Needle: array(a, b, c); Return: array ( array (2, 3, 4), array(12, 13, 14) ) Desired: The Keys from Haystack that match Needl...

> Surprised there isn't a built in function?
@Jack a comment (or hint) is enough for a cv deserving question
15:40
@bwoebi I feel we should, where practical, be prudent in closing but generous in providing answers.
Windows 8.1 Preview
@LightningDust woah more colors
now please make it useful.
I like the search improvements
@LightningDust I'd like to call windows good enough for use.
@LightningDust I like the fact that I'm not going to use it :)
15:49
@Jack Most of us have to use Windows at some point, I'd rather it sucks less when I do. :P
@LightningDust That's the worst about windows. Nearly everybody has it.
@LightningDust mine sucks less. I upgraded from windows to non-windows
@Ocramius I have an Arch box and several OpenBSD servers. :P
I'm quite versed in non-Windows, and also versed in its limitations.
@LightningDust who uses windows as server is insane. but as a PC version I see it far too often :-(
@bwoebi It's not bad for a mail server, other than that I wouldn't touch.
The PC version is common because it Just WorksTM and runs everything.
15:52
@LightningDust configuring a Mail server is one of the worst things you can do on *nix systems.
@LightningDust I can you tell the same about OS X.
@bwoebi Precisely, whereas Exchange can be up in half an hour
OSX doesn't run everything
And you can't run it on cheap PCs, which are the vast majority of PCs in today's ecosystem
@LightningDust windows doesn't run what runs on *nix/os x
@bwoebi Windows runs just about everything you run on *nix
@LightningDust ah?
It may not run it as well, but it does run it
Without an emulation layer
15:54
and how?
I can't name a popular *nix program that makes me think 'Oh, I need Linux to run this'
I thought win only supports exe's?
There's nothing from *nix that I miss when using Windows, except the nice CLI
Which I can get with cygwin
*nix is easier to secure, which makes it better for serving
@LightningDust There's nothing on os x what I miss from Windows. And os x has a better cli.
And it runs on far lower system requirements, which makes it better for my netbook
15:56
too good to pass up
@CarrieKendall this was when I was born...
Hi guys, I've a problem with php character, I've in my sql schema a columns "città", but if I write <td>".$row['città']."</td> it doesn't work because of "à" I suppose, how can I fix it?
@bwoebi Can you think of anything you run on UNIX that you cant run on Windows, excepting specific DEs?
thanks for the answer, is there a way without edit the mysql schema?
15:59
@LightningDust and inverse?
@bwoebi - Photoshop
@bwoebi - IE (important for testing)
@bwoebi - A functional Skype client
@LightningDust Safari doesn't run on windows
(since v6)
PS and Skype I have on OS X.
@bwoebi A lot less people use Safari than use IE
@LightningDust There exist vm's
for the little amount of time you need IE.
@bwoebi VMs aside, because yes I run one all the time with Debian to run my Apache processes (I hate running Apache in Windows)
Windows permissions are too much effort
That's the biggest gripe I have with the OS as a whole, no simple permissions control
And related but not the same: very poor symlink support
But... it does just work, it does run everything, and you don't need to spend $2,000 on hardware which is worth $1,000 for it to operate properly.
16:03
@LightningDust that's not an issue... Just have admin privilege and you can do anything
@iroegbu I don't want to run Apache as Administrator
@LightningDust did you ever really calculate the price? it's worth less than the price, but it's only about 80%, not 50%.
you have complicated your problem... I have just 2 account: Admin and Guest
@bwoebi I would expect it's lower than 80% but I'm in the UK and pricing here is awkward
and another question, in my php table creation I have echo '<table> class="gridatble"';
but what I see is the table but the write class="gridatble", how can I fix this?
16:05
@LightningDust Is maybe country dependent
windows has internet explorer <-- not a valid reason to be loyal to windows
he gave more than that
more so, its a reason to want to throw anything with windows on it out of the window and curse the name of microsoft :]
But compare, the newest MBP retina has an i7 third gen, normal notebooks today have an i5 second gen. This is a price difference of about 300-400€
16:06
Or the memory: 16 GB against ±8GB
I'm pretty sure I can buy a PC with very similar spec to this for £1,200
@LightningDust Search one.
@CarrieKendall IE10 isn't a bad browser
Anonymous
damnit
@LightningDust not even what i am implying :]
Anonymous
16:07
now i gotta learn abt ruby
@LightningDust Just like XP, I'll stick with Windows 7 :)
@LightningDust But it still isn't perfect. It has far more bugs than webkit/gecko browsers
the fact that you have to be on a windows OS to test (properly) IE is stupid
@Jack I agree... W8 at the moments is kinda counter productive
@CarrieKendall How else would you suggest we test IE?
16:08
@CarrieKendall YES.
its shows laziness as a company, and complete and total lack of respect for all web developers
@bwoebi No browser is perfect
@Jack micisoft should release an IE 10 for os x
But yes Firefox is still ahead
2chainz we own it sounds lyk katy perry's et
16:09
@Jack well, apple's solution was to create a windows friendly version of safari
@bwoebi Nope, because then you'll get platform specific bugs =p
ff sux, I just posted in d aftrnoon, they should come out with a stable version
I don't expect the browsers to be perfect, but the IE has too much bugs (still).
@bwoebi Hahaha previous version IE 5.5 for Mac
@Bracketworks ^^
16:09
@CarrieKendall Which sucked ... until now I think ... still, Safari on Mac !== Safari on Windows.
I remember clearfix hacks specifically for IE 5.5 for Mac...
@CarrieKendall why do you think apple has stopped porting safari to win?
@Bracketworks really? LOL.
something like html /**/ * /**/ .clearifx { ... }
@Jack sure there are differences, but it is a concerted effort to relieve some stress caused by testing
I forget; thankfully I can forget with confidence.
16:11
@Bracketworks this is also for win-IE browsers
@bwoebi Nah, it was specifically for IE on mac.
I forget what the syntax was, but there was an edge case.'
@bwoebi PC laptop is £600 cheaper (33%) than an equivelant Mac.
@CarrieKendall Yeah, and introduce other stress ;-)
16:12
@bwoebi And has a 2" bigger screen to boot, and better GPU, and Blu-Ray
@LightningDust is without SSD
And that's after a £400 discount on the mac
@Jack not really.. the differences are minimal and the outcome is well worth it in the eyes of many nonmac devs
a SSD is about 400 more
Intel HD 4000 vs 2GB dedicated 675M GPU
Whats the gap there?
16:13
Gap is 'can it play solitaire?' vs 'can it play crysis' ;)
Still, if I had the $$$, I'd blow it on a mac, then run linux on it and virtualise os x
microsoft laughs at you and your 5 virtual machines to test all of their shit browsers
I spent £1100 on an i7, 8GB RAM, 256GB SSD laptop. If I wanted a similar mac with no touchscreen and no 1080p display it was a MacBook Air at £1300.
@Jimbo get Alienware and do what you like :p
16:15
@CarrieKendall In the eyes of the qa that statement holds no ground :) regardless, every self respecting dev shall have a multitude of test environments, installed on selected family members' machines ;-)
And I bought a Sony so not like I was going for a cheap brand in the first place, Apple was still £200 higher without two of the core features.
@Jack I just have an Arch box with 32GB RAM and a bunch of Xen containers on VNC
Easy way :D
@Jack not disagreeing, only pointing out that microsoft makes no effort to help devs in this aspect
Well, easy is another thing, but that's definitely one way :)
@Jack Used servers are easy to come by at very low prices
@CarrieKendall They won't, because doing so would admit that there other operating systems than the almighty Windows.
16:18
@Jack exactly, its a stupid mentality that will ultimately lose
@CarrieKendall I hope we shall all live to see that happen ;-)
indeed ^^
It's not really good for IE anyway
If IE had more testing, more sites would work in IE, and more people would use IE
Which you'd have thought would be good for MS
Why test for IE8+ when you can let them emulate IE7 and only test for IE7? heh
Granted you have to keep using jQuery 1.x lol
I haven't tried jQuery 2 yet
Does it deprecate much?
16:23
@LightningDust IE 6, 7, 8 :)
IE6/7/8?
Seems bad :S
IE8 still has a lot of market share
I disagree >D
I like my sites to work for 90+% of my visitors :P
If you need to support those versions of IE don't use 2, use 1.9
And no, telling them to 'Get a better browser' is not a solution.
16:24
@LightningDust microsoft and logic go together like pickles and jelly ;]
Nobody is telling you to use jQuery 2.0
I've deprecated IE6 support recently, I just don't see the point in wasting that many dev hours on it.
I like my sites to only work for those worthy of witnessing greatness.
And jQuery "branching" to not support older versions of IE is a good thing imo
16:26
IE7 I still support, FF3.5 I still support
@CarrieKendall This is not the massacre you're looking for?
@cspray - I agree that in the long run we need to drop support for old browsers, just don't think we should be dropping support for a 5 year old browser still in regular use yet.
@Jack what massacre?
@CarrieKendall didn't you just link to an article about a legislation on privacy?
16:29
@LightningDust Again, nobody is telling you to do any such thing. If you still need to support those older browsers then just dont' use jQuery 2.0. Devs who don't need to support the crap needed for these legacy browsers shouldn't need to have it baked into their libraries
@Jack what massacre meaning since they're not releasing any evidence...
@cspray I'm aware that nobody's forcing me to use anything. Nobody's forcing me to use jQuery at all, I just think it's a poor development decision to drop support for things which are that new and hold that large of a market share.
@CarrieKendall Ah right. So basically what I said then :)
@LightningDust How in the world are they dropping support? They also released 1.9 that provides a good majority of 2.0 changes with backward compatibility support for older browsers
@Jack right-o
16:31
@cspray Presumably 1.9 won't receive any new updates with new 2.1, 2.2, 2.3 features.
@LightningDust It allows for a leaner jQuery for mobile projects.
@LightningDust Which is to be expected. You can't have backward compatibility and still get to move on to progress and evolve with new technologies
@cspray That's why we have Modernizr
@LightningDust That has nothing to do with whether or not jQuery 2.0 should support IE8- or not
Modernizr and jQuery are not mutually exclusive.
16:33
@cspray jQuery 2.0 could support IE8- on those features which support IE8- and degrade them where they don't, as I believe jQuery 1.x does.
Pretty sure a lot of jQuery animations aren't cross browser.
@LightningDust Clearly the designers felt there was enough overhead in supporting IE8 that it was worth it for performance/maintainability to not support it
Keeping all jQuery devs happy is not easy :)
Clearly, which leaves most developers forced to use browser detection (which we were hoping to get rid of) to determine which JavaScript libraries to load.
From here we will have browser detection to load whatever.ie8.js and whatever.js, and have to code most of our js twice, in order to maintain support for something which is still about 15% of the market.
@LightningDust Or not? Again, if you have to support the older versions of IE you just wouldn't use 2.0 at all
That's assuming most developers choose to use jQuery 2.0 ... @LightningDust
16:38
I mean, any dev that chooses to code their apps in jQuery 2.0 AND 1.9 deserve that nightmare.
@cspray Good practices tell me that it's best to use progressive enhancement. You don't eschew the use of good features because some users won't see them, but you also don't make the site reliant on them to the point where some users can't use it.
@LightningDust Only time will tell.
I'm already coding my apps in synchronous and AJAX, which is painful enough.
synchronous what?
Standard POST requests with HTML5/PHP and AJAX requests with JS->PHP
16:40
Evening
So that people with that damned NoScript plugin can use the site.
@LightningDust Then don't do that in your app? I don't get why jQuery should have to maintain a bloated codebase forever because you want to use jquery-2.0.js and not jquery-1.9.js
@cspray There should be some comfortable option for devs who don't want to pick between new features and a solid fallback
By your logic we should never have gone to PHP5 because now PHP4 apps don't work well and vice versa.
Not the same, we have 100% control over what's on our servers, we have no control over the browsers our clients use.
16:41
@LightningDust Then what magic third option are you proposing? I think they handled removal of IE8- support rather well
Fuck NoScript plugin.
If I had to get every one of my users to download something to use PHP5, I wouldn't use it.
@LightningDust Then don't use 2.0
@cspray I won't, until it introduces a feature which I can't live without :P
@cspray To be honest I'm falling back on Protolicious over jQuery more and more now anyway.
@LightningDust Do you have 2880px or more in width on your laptop?
16:46
@bwoebi - No, it's an 11 inch screen
@LightningDust too small.
@bwoebi - 1920x1080
@bwoebi I fly a lot, economy, need something I can use in economy carriage
@LightningDust even a 17" fits in economy.
@bwoebi My old 15" was bad enough
what do you mean with bad here?
16:47
I mean I had to put the screen at an awkward angle to fit it behind the chair in front
@bwoebi Much as I would love a retina display, I didn't want to add £500 to my purchase price for one. The 13" MacBook Pro that wasn't £1400 didn't have one, and didn't have an i7.
@LightningDust the non retina MBP weren't really upgraded last year.
@bwoebi I think £1400 is outside a reasonable range to spend on a laptop for most people. That's why I don't see Apple ever getting a comparable market share to Windows.
Even my £1,100 laptop is pretty expensive by average earnings standards, it's two weeks' wages for a lot of people.
@LightningDust I feel that the OS also is worth something. I like it more than win.
@bwoebi I didn't like OSX at all last time I used it (Leopard)
@LightningDust two weeks are not too much for sth you buy every 3-4 years
16:52
Windows and I have had mixed results, I used to use it through necessity and only recently would I say I've found things I actually like about it.
I buy a laptop every year @bwoebi.
@LightningDust why?
@LightningDust I see no reason to do so?
@bwoebi Because mine gets used 4 hours/day minimum, gets swung around in a bag, the battery eventually starts to lose longevity.
I could probably go to every 2 years, but right now I see no way I'd wait 3-4.
My Acer laptop (12" display) lasted 16 months. Day I bought it the battery gave me 4 hours. Day I bought this one, battery gave me 82 minutes.
(Acer battery that is)
Plus most laptops have notorious build quality, feet fall off, keyboards wear down etc.
@LightningDust with SSD, you have no problems when it gets swung... And the battery… I had my last MBP 17" for about 4 years. The battery only lost 63% of its health. (and I really used it every day)
(Admittedly, Apple is good in this regard)
The last MBP I bought was in 2010, the last ones with Leopard on
Still works for the most part but the original HDD died (first gen SSD)
@LightningDust ssd lifetime recently evolved quickly...
16:57
@bwoebi Yes, it did. It's getting better. Still wouldn't use it in a server yet.
wb
Using it in a server is a bad idea, yeah. On a server you have permanently loads of writes.
Even on my MBP though, I installed Linux after a week
OSX was just un usable for me
@LightningDust give it time. You aren't habituated so fast...
@bwoebi I expect control over my system, I didn't have it
16:59
@bwoebi No it just sucks
Couldn't even put a dark theme on.
@LightningDust I never felt I need to switch appearance...

« first day (963 days earlier)      last day (4210 days later) »