« first day (595 days earlier)      last day (4579 days later) » 

15:01
@GordonM I ordered SQL Antipatterns this morning and I'm waiting for it to be delivered. Is it any good?
yes, it is
someone should write "PHP Antipatterns"
4
Hi @tereško I'm looking forward to reading it. I think it was you recommended it the other day.
@ircmaxell , you could start an article series on that
@tereško This is probably the best idea someone in here has had.
15:02
Happy Saturday
to all
Oh, what? PHP Antipatterns?
like Singleton
prob. I actually have started a book: Development Anti-Paradigms
Most antipatterns in PHP are applicable to programming in general though.
15:03
@fluty , the antipattern is global state
singleton is just a form of it
Of course there's PHP-specific ones like mingling code and markup.
yeah it can be included among PHP AntiPAtterns
since php is no shared architecture ,so singleton has no place in php
@tereško Great idea also for a talk. PHP Antipatterns.
@fluty emm .. so you are saying that it has place in java ?
teresko .... depend on the requirement
15:06
Singleton has no place anywhere. The fact that PHP is SNA by design just makes it less relevant too.
Actually I take it back. Singleton has one valid use
@GordonM that's not true
Controlling access to a hardware register or resource of which there's only one.
well if you proactively use global state, it's fine if you know what you do. it's not global state that is the problem but how to deal with it.
@ircmaxell Which isn't? That Singleton has no use, or SNA makes singleton less relevant?
@chris have you seen the new (beta) soundcloud?
15:08
@GordonM Singleton has no use (in general)
how does price comparison engine(used to compare various product from various e-commerce website) works?,simply by crawler or anything else? any idea
@ircmaxell OK, getting confused now. Are you saying that singleton has no use? Or are you saying my statement that singleton has no use is wrong? (cos if it's the second I took it back already).
no, I am disagreeing with the statement that Singleton Has No Use
singleton is incarnation of this in COP (class oriented programming):
function foo()
{
   global $bar = 1:
   $bar++;
}
15:13
@fluty By selling the listing places to the shops. Crawling is not productive, not technically effective nor financially useful.
@hakre thanks ,was thinking same
@ircmaxell Now I'm getting confused :D Are you saying that singleton has use? :P
@NikiC yes
Ah, okay :)
But not with SNA?
@ircmaxell OK, glad that's cleared up. And yeah, there are a very few uses, but only a very few
@tereško those answers lol :)
@NikiC Systems Network Architecture?
Share Nothing Architecture
Ahhh
Correct, in an SNA, singletons have practically no use to Object Oriented Programming
15:20
@ircmaxell And when do they have use?
In certain case with multi-threaded applications where having more than one instance of a class can literally cause major problems...
@NikiC The one valid use I can think of off the top of my head is controlling access to a hardware device/register of which there is only one. This is something you're never going to run into in PHP though, it's more a scenario from microcontroller firmware programming.
And as PHP isn't multithreaded there's another reason for singletons to not be valid in it.
Yes, with multithreading you probably do sometimes need true globals
@RepWhoringPeeHaa , its becoming worse and worse
@tereško it is? lemme check
15:23
All semaphores are basically singletons...
... Those answers are so bad I think they gave me cancer.
whoah it sure is :P
reputation has an inverse correlation to quality in this case
0
A: I can not properly divide the text

Sebas$string = "1|true" . chr(13) . chr(10) . "5|false"; You will have to adapt the chr(13/10) to your target encoding.

hello friends..
15:26
i want to parse word document using php..
@ircmaxell omfg
delvdelvdelv
If the question was "How to I split this string?" then "With a newline" is probably as valid an answer as any.
Though given how stupid the question was, the answer can't help but also be stupid.
@Milap Good luck with that :)
Thanks @GordonM
i can parse doc but not all format..
question now is history.
@Milap I hate doc format. It's useless. It's complicated. It's not so operable. It always makes problems. And it suggests folks should by Microsoft Office. But I can not suggest to buy that software.
15:34
yah @ha
But the worst part is:
i am agree with you..
The really worst part is:
Some developers are pushed to use PHP to deal with these files.
And then they ask questions here on SO how to do that.
but in my application , i need to deal with doc files as well..
And it's like there is soo much hope that there would be an answer to that question.
Totally neglegting reality: The definition of the DOC format per-se is, that only microsoft products should open it.
15:37
i am giving option to user to upload doc files and i can parse most of all versions of doc
@Milap That's easy: Buy a windows license. Buy a office license. Load the files via COM. Deal with the files programmatically. That's how it is intended to work.
but getting junk characters in some versions
yah @hakre it is
You might stand a chance at parsing a .docx file. But a .doc file? Almost certainly not.
@harke stop editing tags! angry face
Is hakre killing off php5?
15:45
@NikiC killing php5?
you mean back to php 3?
I have to view "newest" questions, in order to not get pages and pages full of @hakre reviving old questions by editing the tags.
ah yeah
I'm killing the php5 tag where appropriate.
It's far more annoying than beneficial.
also reviewing those questions.
@hakre Can't it be mass-mod-killed-and-banned?
15:47
@NikiC I can't tell so far, I only reviewed a fraction right now.
@salathe Everyone is on newest!
It's highly likely, yes, but I'm going back in time.
So a question asked in april tagged php5 is most likely not php5 specifc.
however maybe when asked in 2008, but I'm not there yet.
I'm all like, "ooh, the tag has a bunch of activity… *looks* … oh, it's just @hakre".
And it's nothing new today, you've been doing this for a while.
yeah since weeks. we can soon celebrate two month w/o PHP5 tag.
@hakre I always thought the various php$version tags should just alias the main PHP tag
15:49
@hakre More like celebrating a complete waste of your time.
Stop it @salathe
And mine.
Better commit that mysql docs patch :P
@NikiC Stop what?
I want to see the warnings :)
15:50
Maybe later :)
yeah, don't lurk on SO, code, test, patch and release .
;)
ok .. im singing off of the for few hours .. gonna play some Arcanum
@hakre right back at you. :)
@salathe: let me know if you've got something to test.
@hakre sorry?
15:51
I have something to test :P
@NikiC what?
@hakre repost? where's the original question?
@salathe deleted
15:57
@RepWhoringPeeHaa thanks for not helping
@NikiC thanks :)
@RepWhoringPeeHaa "where is something?" "deleted" -- your reply was not helpful in any way, that's all I meant to say.
@salathe jesus do you have sand in your buttcrack? :P Just take a relax pill :-)
@RepWhoringPeeHaa Not in the slightest, do you?
wow. let's grab some popcorn.
:)
@salathe Nopez. Not really, but maybe you want to come check it :P
@salathe is having a bad day :)
@RepWhoringPeeHaa I'll delegate that task to @hakre
I noticed
@salathe :-)
16:01
@RepWhoringPeeHaa You noticed wrong, I'm actually having a really great day today!
Jon
Jon
Hello, Any CSS fans there want to help fitting text inside this one-sided trapezium? jsfiddle.net/bYa4K
@salathe You have a really strange way of showing it :)
Are we CSS fans now? ;P
@RepWhoringPeeHaa He's a Peter after all :P
@RepWhoringPeeHaa And you have a strange way of answering questions; that makes us even.
@salathe You are right!
@NikiC :-)
Jon
Jon
16:02
@RepWhoringPeeHaa sorry just bugging me
Sorry @Jon cannot really help you with this one. I'm not really that big of a CSS fan ;) But am I correct when I say you want to text on the border?
I'm a big CSS fan, but I can't help either, sorry.
Jon
Jon
perhaps a position inside with z-index i dont know, i tried a rectangle with a triangle on the end, but its not responsive...
omg
thanks im a fool
np
Don't know whether it is the correct way to do it though. I mostly try to avoid aboslute positioned elements
16:08
@RepWhoringPeeHaa @hakre
@hakre pls add an example showing DI
@NikiC tnx :)
Using animals to explain OOP can lead to this: "I have a rabbit animal. And I want my rabbit to have, for example, reptile skin. Just want to decorate a common rabbit with reptile skin." (found here)
lol
16:27
hehe @hakre
Nice
the only thing that makes me nervous is that toggler jquery
that stuff shouldn't be awaytoggleable or should it?
user50049
Deprecation notices generally aren't .. they are big fat "don't use this in new code" markers
@NikiC it does the same as the other blocks... toggles to show the title. So there's still a big red bar visible on the page.
@salathe Oh, I never noticed that
Well, then everything's great :)
16:37
@NikiC and if you've clicked the toggle, you've already seen the message.
before wasting time on deprecating something that actually works as announced, why not fix those parts that are important, too, but are broken?
damn .. no games foe me .. portupgrade is still running
@hakre Hm?
mysql doesn't really work though. Not any more. You'll be hard pressed to find many mysql 4 databases in production these days.
@hakre You're more than welcome to fix those parts that are important and broken.
16:39
So now we have to wait til docs.php.net/mysql_affected_rows updates :)
And dropping old code leaves less code to maintain, making fixes in other places more likely :)
@NikiC collapsed looks like…
@salathe I always do at least a bug report.
@NikiC Yeah, shouldn't take too long.
@salathe that's cool!
16:40
@hakre Great, that's more than 99.99% of everyone else. :)
Hehe, just noticed it's got my completely unrelated reading there, on the middle tab. :P
@hakre Just out of interest, what would those broken, but !important things?
antiquarian work? :D
For example making json_decode actually return UTF-8 by principle and not by luck
@NikiC Yeah, I'm actually an archaeologist if you only look at my academic history.
feel free to upvote the problem.
Interesting, an archaeologist programmer :)
16:44
and there is software archaeology
@hakre And you call that important? The actual problem is that json_encode does not return false when passed invalid UTF-8. That sucks. And it was fixed but backed out before release :/
@hakre .. thats one way of calling it , when you are plopped down at a symfony 1.0 codebase
@tereško hehe
i however would file it under "cruel and unusual punishment"
@tereško that sounds like archaeology to me. :)
16:48
well , my kid-brother is historian/archaeologist
.. relatively speaking .. he has 15 kilos on me
@NikiC We need to be more strict with encodings.
We should not do the same mistake as wordpress.
user50049
17:12
3
Anger management

Proposed Q&A site for everyone from different walks of life who find themselves in situations that call upon anger -- in speech, in expression or in action.

Currently in definition.

@TimPost That sounds like a site I need.
As reading this starts to make me angry! grrr
everybody who has enough karma, please take a look here for rewording: stackoverflow.com/edit-tag-wiki/13296
Is this "It would replace the 5.x series of PHP releases" really necessary?
Sounds like bla bla bla.
I'll cut that, too, mom
@TimPost :D
@hakre "PHP6 was the working name for the current PHP 5.4 version." óÒ
17:26
@hakre P.S. doesn't php.net/~derick/meeting-notes.html also contain stuff that went into 5.4?
Also "Moving APC to core functionality" is not in 5.4
@NikiC Fixed, saw it my own as well. But we're getting closer, don't we?
@NikiC Maybe I should write "PHP6 turned out to be the working name for the current PHP 5.4 version." ?
@NikiC cool!
17:37
Added a few links to the features
@hakre delv vote that one? stackoverflow.com/questions/3241241/…
@NikiC yes please, I meant that's not a question at all.
Why close that one?
It seems like a valid list at the time of writing
@NikiC That's exactly the point. A valid answer would be to tell that the version does not matter, but the resource. And that one is available on the php.net page - for each version.
17:49
That one's still mmissing a delv stackoverflow.com/questions/10863755/…
@NikiC yes, mine ;)
@hakre thanks
19:09
I need some boolean logic assistance
Let's say I have an error_reporting setting I don't know which it is
but i want to disable E_DEPRECATED
Does this work?:
defined('E_DEPRECATED') && error_reporting(error_reporting() || E_DEPRECATED);
@hakre You want to disable E_DEPRECATED ?
@Donut I want to do that conditionally, yes. If it's not set it should not set it either, was wondering if I can do it that way.
but if it is set, it should be unset.
If set, unset, otherwise nothing?
right
19:25
@hakre error_reporting() & E_DEPRECATED && error_reporting(error_reporting() && (0 << 13))
0 << 13 ??? No magic numbers please.
;)
Isn't it possible w/o checking first?
It checks
yes I see that. But logic wise, isn't it possible to use a specific operator that just does it that way?
Fixed: error_reporting() & E_DEPRECATED && error_reporting(error_reporting() && (!E_DEPRECATED))
What I've done...
It's so messy
!E_DEPRECATED -> will cast to bool I think
defined('E_DEPRECATED') && (error_reporting() && E_DEPRECATED) && error_reporting(error_reporting() || E_DEPRECATED);
19:28
defined('E_DEPRECATED') will always return true, doesn't it?
on PHP 5.3, not on PHP 5.2
hey @russianbox
@Donut anyway mine is broken, too.
I think I need the ^ operator
@russianbox hi, what's on the grill?
I'm having problems using mkdir( , 0755), I'm making a directory in a directory in a directory then uploading a picture into it, then chmod (, 0644) 'ing it. but I can't seem to delete the file now. I'm having permission issues
19:34
permission issues are easy to solve, you only need to set the right permissions.
@hakre It does not work for you?
> anyway mine is broken, too.
if i make and upload the directories with an ftp client then everythings fine
19:37
@Donut this one works now: defined('E_DEPRECATED') && (error_reporting() && E_DEPRECATED) && error_reporting(error_reporting() ^ E_DEPRECATED);
@russianbox learn first under which user you PHP script runs.
@russianbox whoami
most likely it will be "nobody" , or maybe "www-data"
nobody
:(
lol
if i upload the picture into a folder i made with my ftp client then it doesn't give me issues. so its the mkdir stuff thats doing it
19:42
@hakre Weird, your solution seem to not work, mine looks like working
posted on June 02, 2012 by Larry Garfield

On Friday, Dries merged in the first major work from the Web Services and Context Core Initiative (WSCCI). In short, it means we are now making use of all of the Symfony2 Components that we've pulled into core in the past few months. It is also step one in the biggest change in Drupal's design since Drupal 4.7. read more

so what does this mean then?
iinside my ftp program, everything seems fine, maybe i should post this as a question on SO
20:39
@Donut paranthesis and operator precedence
@Feeds That's interesting - how will this turn out?
20:52
i was unable to decide
seemed more like a case of "doing it wrong"
More like a case of WTF did you expect IMHO
what the hell is with all that content incoming
in past 3 day there have been more yii posts then codeigniter in "stream"
was there something on smashing magazine or nettuts about it?
must be a troll post...
20:58
well .. something's causing this
"Statistically, currently yiiframework is the best framework in the market." OH MY GOD
statistically ?!?
I've recently more and more often want to punch people in the face
Something's wrong with me :/
naah .. thats normal
20:59
Nopez.
we all have gone though this .. it will (as they say) plato-out
> It runs on Unix and Windows platforms.
wow lol
sadly no linux
since linux does not come from "unix bloodline" .. its only a unix-like operating system
i am not sure about Solaris
hi @vascowhite
@RepWhoringPeeHaa .. emm ... why there is symfony 1.4 in an article written 3 days ago ?
and the 62 FB-likes scare me
@tereško because the article is idiotic and I am tempted to comment on it saying it is utter shit
at least only a single g+ .. from author i would guess
@RepWhoringPeeHaa , wanna bet that comments have to be "confirmed" before they are published ?
21:17
@tereško Only one way to find out :)
hehe that sucks :P
"few days ago i fucked up a 20k+ member site, help"
yeah, I could be a bitch and leave a sarcastic comment.
@tereško actually better YII than CI.
Can anybody please answer my question stackoverflow.com/questions/10865906/…
21:30
@NikiC da best fram3w0rk
@Rakesh , this is equivalent of putting your hand in tiger's mouth , to see if it has eaten enough
@hakre @tereško nice. 3 comments telling you need backups when you screwed something up :P
Now that I read it again. I don't think it was a 20k site
> I had a problem with new member spam in an ExpressionEngine Site.
@hakre damnit I justed wanted to delete my answer and cv'ed it
:P
@RepWhoringPeeHaa yeah, but now it has some value ;) at least it should suggest something like "abstraction" can be useful.
Wow if you actually read this question, well, anger management: stackoverflow.com/q/10866184/367456
I mean, what is that? Mixing three types of database connectivity in one script in 10 lines?
I found this on ther interwebs. It does not work. Please help!
@RepWhoringPeeHaa yeah. there should be some protection period on those questions. some time-filter: noob users see other noob-users questions first. after 30 minutes others users, see them, too.
It should go like so because this is what I need - style.
@hakre I would like to see that implemented. Although that would mean a lot more shit / noise will be added to the system :(
I know exactly how to fix it now but I don't deserve down votes? — Spencer May 54 mins ago
omfg
@RepWhoringPeeHaa yeah. priceless. let's create a tv show. or youtube best of.
@RepWhoringPeeHaa , should we flag it as "offensive" ?
because i sure am tempted
@hakre :-)
@tereško Neh don't want to bother mods with this
22:00
mods need a laugh too
hehe true
I have the feeling that I haven't found any decent question this whole week :(
The stupidity is all over the place (and no I'm not new on SO)
:P
2 upvotes ??? Satan does exist: stackoverflow.com/questions/10866301/…
Sam
Sam
22:26
Evening
evening @Sam
Sam
Sam
Having a nice weekend?
0
A: How to echo lines of text vertically in PHP?

hakreAs others have already demonstrated, array_map is able to do the flip over which is basically the main problem you need to solve. The rest is how you arrange the code. I think your version is very good because it's easy to understand. If you're looking more to some other extreme, handle with car...

Sam
Sam
Knackered and too much work todo, so a normal weekend for me ;)
22:33
@Sam Drinking booze helps ;)
Sam
Sam
That was last night :P I finished the 10 shot challenge, so i was pretty wasted haha
Im going to get off to bed, i cant concentrate anymore.

See ya later @RepWhoringPeeHaa
l8ers @sam

« first day (595 days earlier)      last day (4579 days later) »