« first day (744 days earlier)      last day (4219 days later) » 

2:01 PM
@NullPointer No, it's okay to use it. Just don't spam it :)
@NullPointer Also, there's a newer version
 
@MadaraUchiha could you give
 
@MadaraUchiha thank you ..:)
 
user1125394
is it possible to create a css background image using 2 images url
 
@cyril Yes, CSS3 supports multiple backgrounds.
 
user1125394
2:05 PM
I'd like one on top of the other but just height:100px like a banner
 
@Leigh I think that if we want to nail this, our best bet would be a dedicated website, just for this, with an appropriate domain.
@cyril Yes, CSS3 supports multiple backgrounds.
 
For anyone one the US East Coast (or wanting to laugh at the east coast): hint.fm/wind
 
@MadaraUchiha I have a domain lined up, from previous discussions
 
user1125394
ok
 
@Leigh Which?
 
2:06 PM
@MadaraUchiha I can't publicly share it, it's lucrative :D
 
extmysqlsucksbal.ls?
 
shorter
 
yousuckbal.ls?
 
@cyril try
 
@Leigh phpmysqltutorial.com? hopefully?
 
2:07 PM
     background-image: url("img1.ong"),url("img2.png")
 
@MadaraUchiha no, the previous discussions on a php tutorial "wiki" or some such were not so specific
 
doesn't load?
oh right, it just takes 10 secs
 
user1125394
@NullPointer yes and background-size: 100% 100px, 100% 100%;
 
If you really want to be on top of Google, you need the title, the domain name, and the content have those keywords in them
 
2:10 PM
@MadaraUchiha The problem is getting people on board, and dedicating time to it
 
@Leigh Not at all.
First the link needs to be UP
Then add some good content to it.
Then link it here in the don't use mysql_* comments
 
First, system needs to be developed... again, lots of things were discussed, and none of them were so specific in their task, of simply providing a mysql tutorial
there was some discussion of reputation based contribution of tutorial articles and such
 
@Leigh I think the entire site should be a single .html page, where people can suggest changes to it.
There's no need for a whole system here, it's only one article.
Want to suggest changes? Go to github
 
@MadaraUchiha In this instance, yes, but there isn't necessarily only one article forever
 
fork it, edit it, and pull-request is
@Leigh We'll cross THAT bridge when we get to it.
Trust me, I'm an engineer (not really)
 
2:15 PM
And I don't think they should be html pages, I think they should be markdown
 
@Leigh Because they are not likely to change very often (at least after the initial stage of editing to correct typos/etc), and the relatively high traffic it's expected to get, I'd vote for a static HTML page
That can be regenerated from markdown when an edit occurs, sure.
 
@cyril but is not supported by ie7 ... :(
 
@MadaraUchiha I'd vote for markdown in the repo, post-commit hook to generate static html
 
user1125394
@NullPointer ok it will be the surprise when I'll check
 
2:18 PM
Far easier to deal with pull requests where there's no tags and shit ;)
 
@Leigh Exactly
 
@MadaraUchiha hhaha
 
@NullPointer I was waiting all day to pull that one off :D
Well, I go take a shower
@Leigh Your homework for today, find a domain name which has and in it
Shortest as possible, and preferably a .com
 
@MadaraUchiha I'll toy with the idea of leaking details of the domain I already have lined up..
 
@Leigh What domain do you have right now?
 
2:21 PM
Like I said, if I say it, someone will buy it ;)
 
post it for a second and delete it.
 
and I don't want to buy it if it will never get used.
Although, I could probably just do some SEO awesome and put adverts on it
 
Is that your domain name?
 
user1125394
@DaveRandom the !important css rule might have been done by a ¡spanish
 
@MadaraUchiha I wasn't watching, but it looked far too long from the short flash i saw
Well, get your credit card out then ;)
 
2:25 PM
It shouldn't be shorter than that, as it contains all keywords
Is that the one you were thinking of?
 
No
Damnit, why can't you send private messages on SO
i'll think about buying the one I was thinking of tonight, and I'll tell you if I get it
 
Alrighty
Do you know of a good (hopefully free) hosting which supports git?
 
@Leigh I have an idea for that, got 1001 other things to do first though.
 
@DaveRandom Not interested in your MITM sniffing of other peoples chats!
@MadaraUchiha I have a server which would quite happily churn out static pages
It basically needs a reinstall at the moment though.
 
2:42 PM
@Leigh Than I think we're set to go.
 
posted on October 29, 2012 by Matthew Turland

This post is a bit belated, but 7php interviewed me last month about how I got started with PHP, my work on the PHP Master book, the Phergie project, my advice to beginning PHP developers, and other assorted topics. Feel free to give it a look.

 
@MadaraUchiha If you were to send an email to my stackoverflow username, with the letter T on the end, and that address was at gmail dot com, you'd probably reach me privately :)
 
@Leigh Check it
 
did
 
Did you get it?
 
2:47 PM
@Leigh SSL + Open Source == I can't get away with that ;-)
 
@MadaraUchiha I replied
 
> Top traffic sources - chat.stackoverflow.com
Woo, thanks guys!
 
@SomeKittens huh?
 
On my blog. Top source of traffic is you guys (and the JS room)
 
oh
awesome :D
Well fellas, gtg
cya later :D
 
3:02 PM
@PeeHaa Take a look at this that the kind folks in JS just pointed me to - hack-o-rama but robust enough and a potential answer to performance destroying mutation events.
 
Gotta love those JS people
 
Fail. I read a question, shows no evidence of attempt to fix himself. I comment what have you tried? At the auto-update after commenting, it shows that he's edited it to add what he's tried.
 
user1125394
it would be good that the question versions are publicly visible
 
user1125394
or maybe it is with more rep
 
3:18 PM
They are, just click on the edited 4 min ago link
 
user1125394
ok sry
 
Though there's a grace period where edits by the OP less than five minutes after posting aren't recorded.
 
...unless someone else edits before the OP within the grace period
 
Is the use of <?= $var ?> recommended?
 
3:27 PM
Not by me because too much of the world still runs on <5.4
 
@SomeKittens I just hate short open echos whether they are supported by default or not
 
@SomeKittens Probably recommended if the target PHP configuration has support for it.
 
user1125394
@PeeHaa I like to save 3 chars
 
@SomeKittens Not to mention that you can replace those short open tags when rendering the template to avoid conflicts.
 
user1125394
3:34 PM
is there a shor for method_exists( $this, $method )
 
user1125394
with $this by default
 
user1125394
function_exists()...
 
No (AFAIK), but why would you need one? What's wrong with method_exists()?
 
9 mins ago, by cyril
@PeeHaa I like to save 3 chars
 
morning
 
3:44 PM
good mornings @NikiC :)
 
3:58 PM
posted on October 29, 2012 by Sean Coates

Over the weekend, I saw a discussion on Twitter about a particular developer who is worried about his future as PHP becomes less the de facto platform for all web development, and he moves to other technologies. (These are my words, and my interpretation, not his.) This got me thinking about how I’ve recently gone through a similar change in how I think about my own career, and how I was in a

 
Hey all.. I've a general question about best practice...

Imagine a CMS which has the ability to change pages. Different pages on the site may have different layouts/styles - with varying content areas/editable content. If someone adds a page and selects the template - what is the best way to handle the additional content fields? Eg.. if the page template has a drop in area for related 'handpicked' pages, would these fields be hosted on a second page of the form?
I should mention that I've seen this done using Javascript. Templates are recorded in a database table, and each have "meta data" outlining which fields should be added to the form if the template is selected.
But I don't find it particularly elegant.
 
4:21 PM
@DarrenCraig ..your question does not seems to be general ...:P
 
Well it's fairly general. It's not tied to PHP specifically :)
 
Good afternoon
 
what he was trying to say is, terms like "content fields" and "page templates" mean nothing without a proper context
 
user50049
@DarrenCraig I can't say I've seen that done in a way that didn't suck. The last time I came across a spec that said editors need to do that, I just put in a general 'markdown' field for text input and extended markdown a bit.
 
@Robik good afternoon but its always good morning here
 
4:30 PM
those are just blanket-terms, that marketing people would use for speaking to client, when they do not know the answer
 
user50049
But it was still an ugly, impossible to normalize hack
 
@NullPointer Will remember :)
 
@Tim
 
user50049
Actually, it could have been normalized if the client didn't run out of money, but meh.
 
4:32 PM
@TimPost yeah - that's the problem I'm struggling with. I don't really want to redirect users to a second part of a form once they've filled part one in either.
 
user50049
@DarrenCraig It's difficult to implement without hard constraints on the content people will be submitting.
 
user50049
Basically, do the best you can to make it easy, and hope to God the content lends to some generalizations.
 
user50049
There's no one size fits all solution, at least none that I've found.
 
The more I think about it, the more a tabbed interface for adding pages might work. it's not particularly nice, but you could potentially have a "General" tab and a "Patches" (for want of a better description) tab. The fields in the Patches tab would depend on the the template chosen. Each tab would essentially be it's own page/method. Not the best user experience, but clean, simple and doesn't rely on Javascript.
 
user50049
@DarrenCraig That's basically what I did .. "Don't see something that fits? Create a new template here .. " where the user just dragged elements from the 'stock' category and modified them a bit. I thought that would work, it didn't, I ended up taking it out because no matter how hard I tried to simplify it, it was too confusing to moms blogging about soccer games.
 
user50049
@DarrenCraig If you do come up with a new approach, I'd love to see it.
 
user50049
(Disclaimer, if they uninstalled 19 out of the 22 browser toolbars they had, it would have looked a lot better!)
 
@TimPost haha - free smilies everywhere!!
@TimPost - I might go for the tabbed idea then. Thanks for your input!
 
user50049
4:44 PM
@DarrenCraig Good luck with it, I hope you do better than I did. If you see some success, please post the outcome here :)
 
user50049
I'm just not sure it's possible to do 'nicely' unless the fields count on the user wanting to enter content of a specific genre.
 
user1125394
can abstract class have a magic function __call (sry if it's a stupid question)
 
@cyril Yes, no pb. They just can't be instanciated.
 
user50049
@cyril Why would you .. want to do that?
 
user50049
That's just going to obscure typos :P
 
user50049
4:53 PM
You may think it won't, but it will.
 
user1125394
@TimPost anyway I placed __call in it's child class now
 
user50049
@cyril Your future self will send you chocolates for that.
 
user50049
Every time you use __call() you probably want to walk away for a few minutes. We used it in CI's redis library because it saved implementing and keeping up with every command that Redis has, since we knew the types the wire protocol understood ahead of time. If redis ever implements foobazzle then , well, $redis->foobazzle() works, or you get an error from the server, which is handled.
 
I find __invoke() fun
 
user50049
5:01 PM
If you're operating on some injected object .. yeah it could work with sanity
 
user50049
But that's cart before horse, IMHO.
 
user50049
You probably want an interface instead.
 
@weierophinney Nice to see you around
 
user50049
 
user50049
5:05 PM
Spent the weekend here ^^^^^^
 
@TimPost is that the riviera in palm springs?
 
user50049
@Stephane The Sheridan resort, Palawan, Philippines
 
user1125394
and is __call inherited?
 
ohhh..
nice
 
user1125394
I mean does class extending a class with __call use this __call as well
 
user50049
5:08 PM
@cyril Yes. Call a method from the parent in the child constructor.
 
user1125394
ah just noticed that __call is not called when the function exists
 
user50049
@cyril Yeah, that's pretty much the point of it
 
user50049
__call() is entered when no matching method exists.
 
user1125394
sry I'm noob in that
 
why would you extend a class which has __call() method ?
 
user50049
5:12 PM
@cyril Move past codeigniter here and look at how _call() is being used.
 
user50049
Using it, we did not have to implement 200+ methods to talk to Redis, the method passed to _call() is the command sent to the server.
 
hello ... any drupal expert here??
 
@TimPost are you implying that we should learn from that code ?
 
user50049
@tereško Huh?
 
user1125394
5:16 PM
@TimPost it's just used to shorten then code and avoid implementing 200 functions?
 
user50049
@cyril It's used to give people that know Redis well the ability to interact with it for pretty much everything (including transactions) you'd want to use Redis to do.
 
user50049
$redis->hmset('foo', $array); , done.
 
user1125394
yep just a thing, it's probably bad practise, but if I use __invoke it's called everytime right?
 
user50049
Or simply $redis->set('foo', 'bar'); $fooval = $redis->get('foo');
 
user50049
... without inherting 100k+ LOC
 
user50049
5:21 PM
The argument here, magic __call() usually leads to very hard to find bugs later.
 
user1125394
I don't understand what are the arguments for __invoke by the way
 
user1125394
@TimPost and no docs generated, and no IDE completion
 
@cyril Well you could do something like ... $q = new Query then $q('SELECT blah'); and finally $r = $q->result ... Not saying it's good, just trying to think of an example for you
Come to think of it, the only place I have actually seen __invoke used, is on DB classes.
 
user1125394
ahh ok I didn't understand its use thx, it's like a fake constructor
 
user1125394
people can't debug their shit, they put it on SO
 
Yeas there is the one or other ouch moment. For example a guy that is running a speed comparison test between Redis and Mysql. Then wonders why Mysql is so freaking fast so was in the need to post a question.
The test was extremely seriously because the MySQL error got unnoticed. Speed compare writing to X with writing to /dev/nul.
2
Q: MySQL is faster than Redis. Am I missing something here?

tukiI've been considering using Redis in a project that uses a lot of writes. So, after setting it up on my server, I created a simple PHP script using Predis with a simple loop to add records. I also created a second script that does a similar thing, only on a MySQL table (InnoDB) using PHP's MySQ...

 
@hakre oh dear
 
user1125394
lol
 
6:07 PM
hey peeps
 
yes lol, but my answer only got downvotes: stackoverflow.com/a/13126540/367456
hi @kabuto178
 
user1125394
@hakre the author surely
 
wow
 
6:16 PM
@hakre You answer is a bit...uh...redundant.
I mean, "use the right tools for the job"...I was under the impression that the guy was trying to find those tools...
 
6:31 PM
@Christian I was under the impression that the guy just blurped in a question because of WAAAAAAAhhhh. And then? Any updates? Any fixes to the question?
 
dam
 
@hakre hi
 
6:48 PM
^ OP duplicates own question <= 30 mins :/
@Baba hi
 
Evening
 
yo
 
jo
 
yo.
 
7:21 PM
ouch-compilation (not for the faint of heart)
 
evening
 
afternoon in canada
 
@Gordon Hello
 
trying to do compsci hw after lectures lol
 
7:30 PM
Hiya new room enterers
:)
 
Random Fun Fact: I think I will buy the Google Nexus 4 and 7 and 10. I find all of them awesome and they are too cheap not to buy. rough total ~ 1100 euros
 
i think it's funny
they don't teach PHP at school
 
I've found that they don't teach anything useful at school.
 
^ lol true
+1
 
The best schools give you just enough knowledge to survive, and then spend the rest of the time fostering an environment of creativity and innovation.
 
7:33 PM
stuff they teach u in lecture is a joke
I got marks off at midterms for COMMENTING
 
In my school teacher said we will learn programming in 3rd grade. Looking at his application he shown I'm afraid we will learn VB6.
 
like they have this super-uber-strange comment format
and you have to comment even if it's common sense -__-
 
Worst ones think that memorization of useless facts is key to survival.
 
lol VB6... not bad :P I did VB6 in Grade 10... high school
they have strange conventions
for example at my uni you're not allowed to use the break statement
anyone here has a girlfriend lol??
i can't seem to get one x)
 
@WilliamYang I even have a wife
 
7:37 PM
lool great :)
fml i am not a chick magnet
 
For example, at my uni, you can hand in homework in whatever (standard) language you want, so long as it's commented well enough that our professor can understand it.
 
Wilfird Laurier is retarded.. we do python on paper for first year
anyway
 
@rlemon glad you could join us
 
any of you do crazy security with your web projects?
 
it's on my favorites list.
rejoin all
you know..
 
7:41 PM
I am trying to understand how this thing works unitstep.net/projects/CHAP-PHP/src/demo/index.php
it's great to be paranoid :)
 
@WilliamYang csrf tokens
Cross-site request forgery, also known as a one-click attack or session riding and abbreviated as CSRF (sometimes pronounced sea-surf Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser. History CSRF vulnerabilities have been known and in some cases exploited since 2001. Because it is carried out from the user's IP address, some website logs might not have evidence of CSRF. there are few well-documented examples. About 18 million users of eBay's Internet Auction Co. at Auction.co.kr in Kor...
sort of :)
> This system is not without weaknesses; in particular, it leaks information about when a user has logged in and thus can confirm if a user account exists or not.
Doesn't sound so nice
 
hmm interesting
 
@rlemon We've been missing your trolling around ;)
 
7:46 PM
my approach so far is embed a challenge-response in every input field in existence
^ lol
 
@WilliamYang security's next semester. Our curriculum tends to be more conceptual.
 
I love IE!, jQuery is awesome! PHP Stinky!!!! ASP (pre .NET) ALL THE WAY!!!!
@NikiC better?
 
loool at my place we don't even start OO and sorts till next year x)
 
@rlemon better :P
 
the result of going into a business school
 
7:48 PM
sorry I've been pre-occupied in the C# room as I'm now supporting an old application I wrote for XP.. .NET 3.5 :P fun times in VS2012 which no longer "officially" supports building for XP
 
my approach is basically secure sessions, check headers & cookies from page to page, and a challenge-response system on all input fields
 
WIX is my bitch.. :(
or is it the other way around? I always get confused my that
 
classic
 
user image
4
 
@WilliamYang challenge-response on all input fields sounds ... very ... userfriendly ;)
 
7:49 PM
this always gets me
 
@rlemon lol
 
@rlemon nice one
 
@Ni
@NikiC it's done with hidden inputs & client-side js
so the users won't actually see it
 
and i'm gone like the wind .... runs
 
lolwut
oooh i c what u did there
 
7:51 PM
@WilliamYang Do you know hidden input fields can be seen and even edited? :)
 
@Robik yes but then if the response don't match they'll just get kicked out and back to login
@Robik anything client-sided can be modified by the client
aaand they'll have their session destroyed, kicked back to login, and start all over again :)
 
Okay.
 
okay I need to do my stupid homework =__=
dorms don't feel like a home
it feels more like a jail... with a door
 
@WilliamYang Just wait till you get a job
 
7:59 PM
abend
 
@DaveRandom Abend / Avond / Evening / απόγευμα
 
I don't like languages that can't be sensibly represented by ISO-8859-*
 
:-) owkay: kalispera!
 
:-D
 
I love how you leave a trail everywhere you go @rlemon ;)
 
8:17 PM
anyone willing to find a dupe for stackoverflow.com/questions/13128889/…
found one
 
@GDmac thanks but already found one
 
Does anyone know if it's possible to convert S-Video to VGA?
 
@some
@SomeKittens probably yes with a converter
 
I've been searching, and all I can find are converters that go the other way
 
8:32 PM
@SomeKittens dx.com/p/…
 
@SomeKittens Not in a useful way. It's a different type of signal that needs processing so you end up with lag that's only acceptable if your using it for passive video with no sound, or you have to offset the sound signal and sync it back up again. I wouldn't bother. Just buy another/a better GFX card.
 
Ah. So sounds like I'll need to get a second video card for a third monitor.
I've only got one PCI-e slot (GTX 9800)
 
@SomeKittens Yes, and you'll probably need an identical pair. I'm a bit out of touch with GFX cards but last time I checked you needed two cards for > 2 displays.
 
Blast, so I'll need a new mobo
 
8:36 PM
Actually, maybe not, but you will need a fair ol' chunk of cash: misco.co.uk/product/Q293789/…
Seems that with the advent of HDMI it's easier to squeeze more out of it. But you might start struggling if you still need VGA, that one has a DVI-I so it will do 1 VGA but there's no analogue components in HDMI
 
@NikiC can you tell the OP that he doesn't need that: stackoverflow.com/questions/13129198/…
 
@Gordon Hm?
 
@NikiC the OP thinks s/he needs to concatenate all includes in a file in order to run php-parser on it
 
8:52 PM
@PeeHaa I have to mark my territory on the internet
future generations need to know about rlemon and his (my) antics
off into the night again
 

« first day (744 days earlier)      last day (4219 days later) »