« first day (815 days earlier)      last day (4124 days later) » 

12:00 AM
@Mechanicalsnail And when spoken in german it sounds like a Polish word I remember, yes ;)
@Alexander Good night.
 
@hakre fair enough
 
12:15 AM
@ircmaxell It would have wondered me a little as well, because there is this PDF about that algo: cs.umd.edu/~samir/498/vitter.pdf - however one can do mistakes everywhere so it's good to have some test!
 
12:38 AM
the HACK ATTACK is back ;) — hakre 21 secs ago
2
 
0
Q: RLE encoding/decoding tool, review source

Ivica8080I've developed mini utility, the source code can get reviewed here: http://rle.codeplex.com/SourceControl/BrowseLatest It's developed in C#, in the general page there is a description. I'm listening to well criticism to make code more elegant and better to work with.

 
1:35 AM
@Ivica8080 you know that this here is the PHP channel?
 
Question appears, answers appear, answers disappear, question disappears :D
 
user50049
2:28 AM
@ircmaxell What's up?
 
word
was pinging you about something, but posted it in meta chat, and all is well
 
a wild @TimPost appears
 
a user accusing another mod in here of racial discrimination for closing a post
 
user50049
Oh wonderful
 
wasn't that the other day?
or was this again ?
 
2:31 AM
again
 
sigh
 
user50049
Give me a second, on the phone
 
user50049
how far back was this?
 
I'll find it
7 hours ago, by goodmood
@ircmaxell ok , i think there is little racist moderators ,
 
user50049
Let me find the last one where they went ape shit on meta. <sigh>
 
2:35 AM
in Tavern on the Meta on Meta Stack Overflow Chat, 6 hours ago, by ircmaxell
hrm, was hoping for Tim Post... But just wanted to make them aware of something: http://chat.stackoverflow.com/transcript/message/7059145#7059145 It's BS, but still worth bringing up
 
user50049
Well, seems to be entirely different from racist downvote guy
 
user50049
I'm taking a few weeks off from moderating to get some things in order, but I'll leave myself logged into chat
 
user50049
If he shows up again with that crap, or you need something else just ping me
 
HAY GUYS I HAVE THE BEST IDEA EVER LETS SHIP ALL OUR PHP SCRIPTS WITH A UTF8 BOM! shopplugin.net/kb/broken-images-on-windows-server
I don't believe these people.
 
user50049
2:52 AM
That's like saying you wear your pants as your shirt and it's someone else's problem that you do
 
Thanks a bunch
and enjoy the time off!!!
 
user50049
I wish, moving and all is just not fun
 
@TimPost Don't break a leg!
Or your furniture.
 
yeah, I'm looking at possibly buying a new condo... Dreading the move...
then again, going to hire a moving company to do it. I ain't lugging my 200 lbs couch down 4 flights of stairs...
 
@Charles LOL, eh, then run it on hiphop afterwards
 
2:58 AM
run it up a flag pole and see... Who looks, but no one every does...
 
Good Morning!
 
3
Q: How to enable full UTC support for Leap Seconds in PHP's DateTime?

hakreI wanted to do some DateTime calculations with Leap Seconds, but it stopped pretty early because I could not tell DateTime what I meant: ### June 30, 2012 at 23:59:60 UTC ### $leap = new DateTime('2012-06-30T23:59:60UTC'); var_export($leap); Output: DateTime::__set_state(array( 'date' =&g...

 
morning' shiplu
 
@shiplu.mokadd.im good morning. and I need to go to bed now, it's way too late for me.
@ircmaxell Start training ;)
 
I can do it. But f&*#$%*$#&^%#$% that
 
3:06 AM
If he blows out his back he won't be able to blog.
 
@hakre Good night. Its 9AM here.
 
@shiplu.mokadd.im Good morning. I ask for a coffee later then ;)
 
@Lusitanian pedantic note: if I blow my back out again, I will have more time to blog ;-)
 
@ircmaxell i'm operating in the fantasy world where you rely on your back to blog :D
 
lol
 
3:14 AM
@hakre The only mention of leap seconds in the entire PHP documentation is inside strptime, and I can't even get it to parse the string that strftime generates. Infuriating:
> "tm_sec" includes any leap seconds (currently upto 2 a year).
 
it's handled by the timezone code
 
... can't get it to parse because NEEDLE/HAYSTACK oh gods why am I coding on cold meds.
 
@Charles I need to check that later, bookmarked
 
lol
 
gn8 everyone. now finally.
 
3:18 AM
@hakre night
 
@hakre night
If anyone in here happens to be a Notre Dame fan I sincerely apologize for what you're going through right now :)
 
Yeah, appears that DateTime isn't recognizing the last leap second: 3v4l.org/W552E
 
@ircmaxell That's probably causing maddeningly frustrating issues for someone somewhere.
 
Tossed up a token LOLPHP answer.
 
doesn't have the last one either: 3v4l.org/edfUa
 
3:32 AM
That's not good...it was never programmed with support for them?
 
dude, dates are SOOOOOOO hard to deal with...
 
Yes -- I agree
 
@ircmaxell Do we know that the leap second is recorded inside the tz database being used there? Grasping at straws here.
 
@Charles know, no. There's a record for it. But whether or not it's used, I have no idea
 
user50049
If your crap question was closed, it was closed because it was crap. However convenient it may seem to do, don't duck behind the race card.
9
 
user50049
3:44 AM
... in case it comes up again.
 
++
 
@TimPost +1 would read again
 
user50049
Of all the problems Stack Overflow has, racism isn't one of them.
 
CAM
4:21 AM
has anyone worked with the bufferapp api ?
I can't seem to trap auth'd users profile Id's for posting to their buffers
 
4:43 AM
@hakre @Charles @andho @CAM @DaveRandom Hi !!!
 
@CAM What?
 
posted on January 08, 2013 by Paul M. Jones

Implicit in Taylor’s approach is the idea that management always aims at the single goal of effciency (understood as labor productivity). But efficiency is just one of several possible competing goals that management might pursue. Profitability, customer satisfaction, or maintaining … Continue reading →

 
5:08 AM
posted on January 08, 2013 by Paul M. Jones

Taylor confused the logical proposition that planning and doing are distinct functions with the empirical claim that these two functions are always best performed by two distinct classes of people endowed with distinct educational pedigrees, clothing styles, and patterns of … Continue reading →

 
Now I know why NullPointer edited his message :)
 
@ShaquinTrifonoff its cool...........
 
hi
any one here
i need some help
 
6:26 AM
> You don't have to ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will.
 
i am creating price comparision
website
using amazon
CJ, Linkshare
how can i create using datafeeds. please guide me
 
6:44 AM
any one here
 
Anonymous
I am here, but I'm helpless :)
 
ok thanks for your reply. any other persons please help
 
Anonymous
you need to call the existing people by tagiing them. First type the @ symbol, then type their name. That will wake them up
 
Anonymous
Like this @hing Something Wrong
 
ok sure
 
7:32 AM
> holy shit. its only tuesday
 
7:51 AM
@SomethingWrong what exactly do you need guidance with ? did you post a question on SO ?
 
8:05 AM
@webarto how good are you at native JS ?
 
@tereško Not so good, I believe @DaveRandom is, what's up?
 
8:25 AM
@webarto i am looking a way to deal with this function : jsbin.com/upimew/2/edit
 
@godka
i would like to create price comparison website like junglee.com
 
hire a team of developers
 
using Amazon api, Commission junction and Linkshare
 
@tereško Great :)
 
Anonymous
hello bad news
 
8:33 AM
@tereško deal with it?
 
@andho it's confusing a fak, large and hackish
if i were good a coping with such issues, i wouldn't be me
 
GOOOOOOD MOOOOOORNINGGGG STACKOVERFLOOOWWWW
 
@tereško so you wanna rewrite it just because ?? :)
 
Morning people
 
morning @PeeHaa
 
8:50 AM
@MadaraUchiha :( @DaveRandom
 
Anonymous
morning
 
morning
 
Guys which file in ubuntu contains the PHP errors in /var/log? I'm guessing it's in apache2 folder
 
@MarioS it's not specified by default
commented out
 
I see, thanks!
 
8:54 AM
@MarioS by default PHP errors are in *.php files
 
alright!
 
Mornings
 
@MarioS /var/log/apache2/error.log on a clean install, question for SU
 
Yea I am viewing that now, thanks guys! And why post a question if you guys are so helpful here? :P
 
to help others searching for the same thing as you
 
8:59 AM
@PeeHaa How are you doing with your server? I am basically ready to test updates and the roll out. We only need to be able to serve static files at the moment but I'd rather make the right choice about the update URL now because trying to change it later will be a headf*ck (it is possible but we'd need to leave the old one live for a while).
 
I'm not going to post a question for something that can be found by asking the right people. I already guessed the right folder, it would only have been a question of time before I found it anyways.
Hey Dave!
 
Yo
@MarioS N.B. you can check httpd.conf if you don't know where the error log is, it's controlled by the ErrorLog directive.
 
any of you did some machine pattern recognition? like recognizing similarities in a group of entries
 
I got it, but i'll add that to my notes for installs that are not mine ^^
 
@DaveRandom I can set it up pretty fast somewhere this week / this weekend. Probably this weekend, because I go to my bed when I get home. (I still have a fatal cold)
 
9:06 AM
@tereško What do you want to do with it? Refactor it? It's just a ridiculously complicated way of aliasing addEventListener() to a global function called on() which takes the target el as an argument instead of attaching it as a method.
@PeeHaa If you still have it now it's probably flu, sucks man, get well soon
 
> which takes the target el as an argument instead of attaching it as a method.
wat
 
@DaveRandom tnx
 
Indeed
@tereško If you just concentrate on
function (type, element, callback) {
        element.addEventListener(type,
                                 func(element, callback),
                                 typeof fix[type] !== undefined);
    };
It's probably more obvious
 
wat
 
The fix business is just aliasing the blur and focus events, I think it's an old skool IE hack
 
9:09 AM
hey guys
how are y'all?
 
@DaveRandom an what would be the "new school" ?
 
lol
I mean I think it's a hack for IE6
(which means I do not care about it)
 
if(file_exists($preurl.$posturl))
{
$fullimageurl = $preurl.$posturl;
}else{
$fullimageurl = "NoImageFound";
}
The above code always makes control enter else statement but not in if. Why?
 
@DaveRandom the blur and focus events do not bubble in IE6. IE7 and IE8
so , let me rephrase
WAT
 
Actually @tereško I've just noticed that typeof fix[type] !== undefined will always be true, typeof will never be undefined, you should remove the typeof if you are going to use that code and have it work as intended. Personally I'd just f*ck it off, ugly browser abstractions like that are what jQuery actually is good for.
@tereško All the way up to 8? I concur: WAT
2
 
9:16 AM
can anyone please help. What could be the reasons? And my $posturl is not in the directory where my php code resides, so is this the reason?
 
@DaveRandom the jquery version that would have to use is 1.2.2
let's say , i prefer something from this decade
 
What? Why? That's insane. Can't you just include a newer lib and redefine its jQuery global to some other name and remove the $ alias?
 
no, i cannot
 
A ruddy good morning to all :)
 
good morning..!
 
9:27 AM
Well unfortunately the most productive thing I can say is along the lines of "sucks to be you". You could refactor it, it's been designed in a way that prioritises performance over readability, that's why it returns closures, to avoid an if/else tree on every call. Also it has been designed to support attaching listeners to xhrs, which seems a bit stupid to me, maybe you could pull that code out. The performance gain is tiny compared to the readability loss.
Unfortunately there's no way to just shim addEventListener() because older browsers (and I think still IE) won't let you modify the prototype of DOM elements.
Interestingly since it seems to be designed for cross compat, it has no support for activex xhrs - so it won't work in IE<7 anyway if that functionality is used anywhere.
Unless there's some IE6 XMLHttpRequest shim somewhere else in the codebase
@Jimbo Morning
To be honest though, since it doesn't implement an internal stack for event listeners attached via properties (which it does fall back to) you might as well just use properties everywhere, because there won't (shouldn't) be anywhere in the codebase that attaches multiple listeners. That would improve readability considerably.
 
Anonymous
I was just reading the PHP manual for file uploading, and saw comments about how $_FILES['userfile']['type']; can not trusted, as a used can upload php files by naming it .gif or any other mime type and execute it.

I think I must be missing something, but since when does a php file with .gif extention run on a server..
Someone, enlighten me pls
 
Anonymous
*user
 
Anonymous
@DaveRandom ^
 
9:42 AM
@TheCOMPLETEPHPNewbie the type doesn't specify the filename, it specifies the mine type. You can upload a .php file and tell the server it's image/gif - which is why you should not trust it.
It's also possible to embed PHP code into gifs, in such a way that they validate as a gif, but will execute if given a php extension
 
@TheCOMPLETEPHPNewbie just the other day someone posted a Q on SO about running files that had a .php 'sub-extension' like image.php.gif Need to have your server setup right!
 
@godka $ is your friend
 
$$$ ? :D
 
Anonymous
but server can not run a php file called file.gif can it?
 
@godka \.php$
 
9:45 AM
yea... there are multiple ways to handle it
 
@TheCOMPLETEPHPNewbie depends how your server is set up :)
@TheCOMPLETEPHPNewbie Could combine embedded PHP in a gif upload with local file inclusion attack perhaps
 
just so I don't reinvent the wheel, do something like a pattern classification exist or ideas on how to accomplish something like that?
 
@godka What do you mean by "pattern classification" ?
 
posted on January 08, 2013 by TechPortal

Another year has passed, and yet again we find ourselves reflecting on what has happened in the world of PHP over the past year. Let's take a moment to look back over our 2012 predictions and see how close we were! Framework Convergence In 2011 we said that major frameworks would start to converge on similar strategies for basic functionality. The PSR-0 standard defined a common autoloading s

 
array of strings ('qwerty-iuh-98', 'qwerty-ikjhas-25','qwerty-jndnd-88') to output something like /qwerty-[a-z]{3,6}-\d{2}/ :D
 
9:50 AM
@godka There is nothing to automatically generate regex from strings
 
thought so, but at least a lower level then?
 
@godka Again, what exactly do you mean? :)
 
like.. recognize there's a pattern in those 3 strings
 
you can find how similar the strings are with similar_text but I doubt that's what you want
 
first to know at least they start with 'qwerty-', better if it would get 'qwerty--'
similar text is good BUT i only get the number of chars, i also need to know the chars to start it of
 
9:52 AM
You'd have to implement your own algorithm, there is nothing built-in to do that.
 
interesting
and strange
 
Why would there be, it's not really a common scenario.
 
Anonymous
got it
 
in statistics i'd guess there'd be a point
 
Generally people know what they expect strings to look like, so they can write a pattern that matches those strings. Not often they want to take random input and see what patterns are there.
Well, there may be something in a PECL module, but I don't consider those built-in functions :)
 
9:55 AM
doesn't matter where it it if i don't have to reinvent the wheel...
any pointers?
 
google :p
Then write your own algorithm, and ask on SO when you get stuck
 
10:06 AM
@godka What you are talking about is almost a very simple AI. Entities like Google have spend hundreds of millions developing algorithms to do that kind of thing, it's unlikely they are going to give their secrets away.
One thing I do know is that regex won't help you much, the "reg" part is "regular" and your strings are not regular.
 
indeed @DaveRandom a very simple AI, i guess i better start writing and publishing code :D
 
Hai all
 
@godka Perhaps you could read up on edit distance between strings? I know it's not exactly what you are looking for, but I think it uses a number of strategies you might be looking for as well.
 
@Oyeme hai
 
@TheCOMPLETEPHPNewbie You can easily configure the server to throw files with a .gif extension through the PHP interpreter. But that's not what this is about, this is about data the user has supplied to you. Consider this: You don't want to trust that the user has really uploaded an image/gif without verifying that the data is valid, because they could easily have just uploaded a PHP script.
 
10:10 AM
@SAHIL hola
 
@Jasper on my list, thanx
 
@TheCOMPLETEPHPNewbie With images what you should do is actually create a new image and copy the pixel data out of the supplied data with GD, because it's actually possible to embed PHP code within an image, so that the file headers (the binary data of the file) make it look like an image, but it has malicious code concealed inside. GD can prevent this.
 
@Oyeme Cómo estás
 
@SAHIL bien ,and you? :)
 
so i need ur suggestion
 
10:16 AM
xm
so what do u need to do?
 
@Oyeme Soy bueno
so here , i am creating tables to stores the data
how many tables i need to create here
created table for category with auto increment primary key
@Oyeme
 
employees,categories
 
Anonymous
My god, this is all tough
 
ok and how to link up those two tables
by using the id ?
@Oyeme
 
Categories
-Id
-name

employees
-id
-category_id
-name
-address
-contact_no
using simple join
 
10:23 AM
@TheCOMPLETEPHPNewbie It will take you a long time to get your head around exactly what needs to be escaped in what way where, but you must persist with it, it is very important. What it comes down to is, if you aren't the original creator of the data, it needs to be escaped. Exactly how it needs to be escaped depends on what you are doing with it - another very common attitude/mistake is to just throw it through every escape routine available at the very start, but that's not right either.
 
thats great @Oyeme
thanks for ur suggestion @Oyeme
@Oyeme Gracias
 
assigning root privileges to apache - absolutely do not ever do this. Ever. — DaveRandom 24 secs ago
-________-
 
wow
must be a windows user...
(so am I, but still)
 
@DaveRandom why did you feel the need to say that now?
 
Hi Everyone
 
Hi all! ))
 
Helo dezigo
can anybody tell me how to get last element of an array
?
 
@RohitGoel use end()
 
@RohitGoel array_pop() (if you wan't to remove it) or end() (if you don't)
 
end() ?
$fruits = array('apple', 'banana', 'cranberry');
echo end($fruits); // cranberry
 
10:41 AM
thanks guys
it works
end()
 
If it's associative and you want the key as well then do end($arry); return each($arry);
Note though that end() modifies the array pointer
 
@shiplu.mokadd.im try to calculate a data that you get
 
@Oyeme OP is asking how to check if there is any new changes.
 
10:53 AM
Just for an unbiased opinion. I grabbed PHPStorm during their doomsday sale, I'm quite enjoying it.
Still using sublime text a lot, so it's not a replacement.
 
@shiplu.mokadd.im the best way is to parse a data that you have,then trying search it in the DB
some kind of reg.exp.
 
@DaveRandom end() + key() perhaps ;)
 
if you don't have any field to compare.
 
@Leigh I tried the PHPStorm trial, but don't like it. Nothing can replace Notepad++ :D
 
@ShaquinTrifonoff Sublime text replaces notepad++
 
10:58 AM
@ShaquinTrifonoff Oo
 
NotePad++ is great on win*, have you checked jEdit ?
 
How can a text editor (except for VIM) beat a full fledged IDE?
 
Any text editor lacks the ID of an IDE
 
Go home IE, you're retarded!
 

« first day (815 days earlier)      last day (4124 days later) »