« first day (685 days earlier)      last day (4489 days later) » 

13:00
@edorian I think i'm nikic_ there ;)
because someone else already took nikic :/
@NikiC happy Friday!
A happy friday to you too @salathe :)
morning
13:18
Hi just a quick question - does anyone know how to disable an input element just through php - I tried this stackoverflow.com/questions/2311573/… but it doesn't work
It is tagged @RichardHousham
yeah - but is todo with css - isn't it?
@RichardHousham Nopez. PHP is a substitution for jQuery
And jQuery is a substitution for c++
k - just thought I could get some quick help - no worries - thanks for having a quick look
user895378
@NikiC So even if you set variables_order to "ES" php will still parse the query string, form-encoded request body and cookie headers even though the superglobals won't be assigned?
13:23
@RichardHousham PHP works on the server. What you are talking about is really how HTML behaves with your browser. PHP can respond with HTML if that is desired. So, this is really a HTML question. This might help anyway: stackoverflow.com/questions/1227212/…
@rdlowrey Dunno, I would have to check the source
13:43
I have found your question not constructive. Can someone help me? — hakra 25 secs ago
Sure I'll help you close it
?
Are you stalking me? ;)
I just hope that you don't intend to provide that as an SO answer?
@PeeHaa GitHub is :P
@NikiC Just some general reference which may be useful somewhere in the future :)
13:46
@PeeHaa Btw, you haven't voted yet: wiki.php.net/rfc/generators :P
Thanks for reminding me
Not like it needs my vote :P
What does alan_k have against it?
the gist please :)
Uhm
Why you ask me?
you guys are weird...
@NikiC Your RFC ;) And I haven't spent much time on internals to see anything come by lately about it :)P
@PeeHaa Just cause it's my RFC I can't read other peoples mind about it :P
13:50
@NikiC You cannot? You suck!
you need jQuery
I don't know who he is, in any case ;)
Sem
Sem
@webarto , don't worry man. @PeeHaa gets high at work from time to time.
@Sem Cannot use that excuse right now considering it's my holiday :)
But searching in GMail shows that he is like Lester, just a little bit less stupid ;)
13:52
hehe no need to say more :D
E.g. he is the one who wanted to revert the addition of E_STRICT to E_ALL in PHP 5.4
Sem
Sem
@PeeHaa OOOoouuwwhh!! Can I haz DAL Class? :D
@Sem I may have totally forgot about that one :)
Sem
Sem
Which means.... I can't haz it? :<
@PeeHaa is it usual that these "Patches for review" in docs sit around about month?
13:55
Hey again
@webarto yes
Let me go through the RFC again and get something to eat somewhere. I might get something to eat in the bar. If that is the case it would be tonight at best ;)
If not I'll find it within an hour :)
@markcial you say this isn't trolling?
@NikiC Okay :'(
Sem
Sem
@PeeHaa To bad :)
@MikeB Thanks added to the list
ah damn... guy is ditching UTF-8 in favor of ISO- ... it ain't 1996
His deep research means trying as many things as he can find without understanding them
or maybe he is backend mate
14:01
Aug 14 at 14:19, by user1065129
you guys are my friends :) backend friends :)
@MikeB ...watching porn for 3 hours and then copy/pasting out of a 10-year-old tutorial, perhaps?
@DaveRandom Y U NO CLICK CLOSE?
Sem
Sem
w3schools is getting in my google results again :( It was gone for so long...
@webarto Sorry, not paying attention. Done.
It's Okay Dave ol' chap
> This limit applies only to each nesting level of a multi-dimensional input array.
can someone translate this to me please?
14:10
Which limit?
Is there a question or someone who can explain the circumstances for when PHP (maybe xdebug) shows a backtrace step on line 0? i.imgur.com/kt78m.png (second from bottom)
stupid max_input_vars limit @DaveRandom I don't know what is each nesting level
user895378
@webarto I was wondering what exactly that meant myself.
Like var[0] is level 1, var[0][0] is level 2, var[0][0][0] is level 3?
@rdlowrey maybe that means it counts recursively, meaning, you can have 1 level one array, with e.g. thousands or keys & values...
didn't come out in English
count($_POST) would return 1, but you can have an array of arrays of arrays of arrays of arrays of arrays of arrays of arrays of arrays of arrays until RAM starts to melt...
14:15
I'm out drinking. Cya all later
user895378
later
Sem
Sem
Cya @Petra
@rdlowrey PHP bitches about errors on line 0 when something goes wrong at init. For example this, and I seem to remember there is something the LDAP extension does that can cause on line 0 errors.
pulling my hair out over mod_rewrite. Considering the following .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /example/index.php/$1/ [L]

How can I add a trailing slash if there isn't one already?
Sem
Sem
How the hell do I get the Code from this XMLobject?
object(SimpleXMLElement)#3 (1) {
  ["Product"]=>
  object(SimpleXMLElement)#4 (1) {
    ["@attributes"]=>
    array(3) {
      ["Code"]=>
      string(2) "-1"
      ["ID"]=>
      string(17) "?T26139-Y4530-V1?"
      ["ErrorMessage"]=>
      string(54) "No xml data for this product or product code incorrect"
    }
  }
}
14:17
@JezenThomas RewriteRule ^(.*?)/?$ /example/index.php/$1/
user895378
@webarto So that means you could have an infinite number of key-value pairs in your input vars, just as long as each "level" doesn't have more than the max_input_vars number of values. Which would mean the max_input_vars directive would not be an aggregate limit for all the input superglobals, but just limit the number of keys that each could have to avoid the hash collision attack.
user895378
I think
@rdlowrey Surely the limit applies to the number of key/value pairs?
@DaveRandom sadly not working :/
user895378
@DaveRandom That's essentially what I was trying to say -- may not have come out right :)
Sem
Sem
14:19
@rdlowrey Mind helping me this friday afternoon?
@Sem something like $product->attributes()['Code'] us2.php.net/manual/en/simplexmlelement.attributes.php
@JezenThomas Result? I missed the [L] flag off and I didn't mean to.
user895378
@DaveRandom I think that it only limits the number on a per-level basis, because that's all that is needed to prevent hash collision attack -- of course, I'm not even sure how you would generate a multi-dimensional $_POST array from raw input, for example.
Sem
Sem
@MikeB Gives me a syntax error.
user895378
11 mins ago, by webarto
> This limit applies only to each nesting level of a multi-dimensional input array.
14:22
@Sem You probably need to split it up into 2 ops. $attributes = $product->attributes(); $attributes['Code'];
count($_POST); # 1, count($_POST, COUNT_RECURSIVE); # 100 (limit)
I sent 'post[][1..500]'...
@DaveRandom It doesn't do anything
if I go to example.com/en, I would want it to rewrite to example.com/en/
@rdlowrey I'm actually investigating this because I work in a hosting company and I think this issue will be encountered sooner or later... when some decides to send large number of vars...
$obj->getArray()['key'] is that php5.4 or 5?
@JezenThomas Wait, you mean you want it to change the URL in the browser, not just the value you are passing to PHP?
Sem
Sem
14:24
@MikeB , thanks. Almost there. The value is still a XML object. Do I really have to intval() it?
user895378
@webarto lol I feel like working with a hosting company in that kind of capacity would be frustrating. I imagine you get all kinds of morons doing stupid things :)
@rdlowrey I'm working far away from people but I see support staff struggling with various "WP programmers" etc :)
@DaveRandom The issue is relative URLS. If the user is on example.com/en and clicks on a link (i.e., 'about'), they are then taken to example.com/about, whereas if they are on example.com/en/ then when they click the link, they are taken to example.com/en/about
And if I can build some tool that will make their job easier I do so... not.
Sem
Sem
@webarto Are you a freelancer?
14:27
not, I had enough of "freelancing" for life
Sem
Sem
Then why do you work far away from your company?
I have my own servers and I'm the only PHP guy, and I work remotely... I don't know anyone except the owner...
and I hang with you guys here because I get lonely
RewriteEngine On

RewriteCond %{REQUEST_URI} !^.*/$
RewriteRule ^/?(.*)$ http://%{HTTP_HOST}/$1/ [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /example/index.php/$1/ [L]
How do you do multiline code in chat?
CTRL + A, CTRL + K, zOMG
@Sem I was trying to say, far away from stupid people :)
Sem
Sem
@webarto Hah :D same here, only webdeveloper. Well we are some sort of lucky having to deal less with managers.
14:31
I don't need a manager, I need tech specs...
Sem
Sem
No caffeine? No nice chair? What about some stimulating music? B)
@DaveRandom Now I'm being taken to the server root. If I got to localhost/example/en/about I get redirected to localhost/sv/home
@Sem sorry, I was making 5th coffee, and I spilled some while trying to sit in my Aeron chair, while listening to crystal clear sound from Bang & Olufsen #firstworldproblems
@JezenThomas No way the above could cause that. There's something else going on there.
Anyone else care to weigh in?
@DaveRandom you're such a noob, I should troll you (says so in starred messages)
14:35
@DaveRandom There is CodeIgniter routing going on
Sem
Sem
@webarto Caffeine addict huh? Silly you :)
well that couldn't be helpful @JezenThomas
@Sem heart attack :) I'm not addict, I just shake sometimes...
@webarto It is mostly
CI is not an Answer, it's a Question.
Sem
Sem
@webarto Having some energy drink or coffee does boost your productivity by a tenfold. Which is sad but true. I always wanted to be the guy without caffeine, failed. :)
14:38
@webarto What's wrong with that? If there's no trailing slash in the URL add it, then fall through the basic rewrite? No? Care to the ? :-P
@DaveRandom nothing wrong with your code I ass u me
everything works just fine, it's just relative URIs that's causing an issue
@Sem I'm not productive at all, I just drink coffee as an excuse... sad but true :)
Sem
Sem
Server maintenance 4 life!
if the user is at example.com/sv and clicks a link, they're taken to example.com/$thelink
14:41
@webarto Stop that! It's silly. Ass u me indeed. I'll Ass u if you're not careful. I know where you live...
but if they're at example.com/sv/ then everything works
because, they're then taken to example.com/sv/$thelink
I'm wondering if perhaps I should build my links differently
i.e., include the language code in the link
14:55
lol .. another subject from CodeIgniter sect has wondered in
it's like amish wondering in apple shop in usa
I know you don't like it
and it's not a true MVC or whatever
and it's much closer to RoR
or whatever
I don't really care
you have to be quite the snob to look down on people who are less experienced, and compare them to the amish
my problem with CI is not that it is not MVC , it's the quality of code and userbase which does not care about it
and my problem with your attitude is that it's sarcastic, condescending, and isn't going to help me to become a better developer
riiight ...
Does this look right for a hash table grow function?
protected function resize() {
    if ($this->load / $this->size >= $this->loadFactor) {
        $size = $this->size;
        $this->load = 0;
        $this->size *= 2;
        $a = $this->array;
        $this->array = new SplFixedArray($this->size);
        for ($i = 0; $i < $size; $i++) {
            if (isset($a[$i])) {
                $node = $a[$i];
                while ($node) {
                    $this->offsetSet($node->key, $node->value);
                    $node = $node->next;
                }
15:03
OMFG the MS Access ODBC driver is f*cking stupid. Since when does '0' === NULL?
clearly '0' ===ish NULL
hoorah! Fixed my link problem by building the links differently in my helper function
@ircmaxell Not necessarily. Initial implementation is initial. There are some things I want to do to improve that class overall.
No, I'm writing my own from memory, and that was my "grow" routine
Ohhh, different reply address
@rdlowrey I don't remember having anything planned for it. It's as stable as you can call pre-ALPHA software :)
15:07
@ircmaxell Seems reasonable
yeah, the overall class is a lot bigger than I would like, but I can't see how to cut it down significantly
@MikeB I think we need a new comp operator ===ish. Something that is subtly different to ==. It's not confusing enough to new developers
@ircmaxell It looks correct but it's been a while since I implemented that portion myself.
it works, that's all I know
@MikeB How about a sortof operator?
15:11
@NikiC @ircmaxell Have you guys reviewed this yet? github.com/php/php-src/pull/180/files
I saw it, buit didn't have time to dig into it
just-about, kind-of-like, basically-the-same.. there's tons of these. I don't know how PHP has gotten by without it
I've been moving apartments the last few days. Had 50 unread messages in my email this morning.
Seems like a job for jQuery to me. if (1.3 kindoflike 1) { $(internet).work(); }
@LiverpoolFTW Your nick is unacceptable. Get out. :-P
15:20
Good morning, everyone!
Morning? It's 25 past 4 here!
@DaveRandom I just made that account to annoy you :P
Haha.. 9am here. I hope things are good on the other side of the planet.
It's just about not managing to rain, here in the North-West of England.. How's the weather in...where you are?
it's morning if you come to chat room even if it's Saturday night and you are at a club... and if you come, you have some issues...
15:25
@CallumMcLean It's raining in Stockport
It is dry.. Most of the US in a drought right now. And if they are not, it is hurricane season.. Also, really smoky where I'm at.. Live in the NW US.
> if you come, you have some issues...
Depends what sort of club it is
don't you have pubs?
Ah, I can see why you weren't keen on @LiverpoolFTW.
Here in Runcorn, it's looking dodgy, but holding off. Which is the best we can hope for.
@DaveRandom youtube.com/watch?v=jxBKgOyMzSc this song always reminds me of England
15:26
@CallumMcLean Runcorn looks dodgy even when the skies are clear blue
user895378
@GregWiley It's been raining nonstop for weeks where I live in the southeast :)
user895378
I forget what the sun looks like. Getting tired of all the rain.
@rdlowrey Should I have already known that? I don't recall knowing that bit.
@rdlowrey, doesn't that have something to do with hurricane Irene?
user895378
@GregWiley Not where I live.
15:28
@webarto Nothing more British than talking about the weather
Oh, well good for you..
@DaveRandom, so true. I miss England.
user895378
@LeviMorrison I'm sick of it -- it's not like flood disaster or anything, but I think has rained every day for the last three weeks here.
user895378
Kind of like BYU raining points on Washington State last night.
:)
Go Cougars!
Aye, that's true.
Still, I study in Liverpool, so.... =P
15:32
Does anyone feel up to answering a mysql question?
I know, wrong room and all, but thought it would be worth a shot.
0
Q: Meaning of tA tC and tP

Greg WileyIf this is a duplicate I appoligize, but looking for two-letter strings is quite hard in any search. I'm looking for the meaning of tA tC and tP in the context of a mysql query. And in the spirit of "teaching a man how to fish" it would be great if you could point me in the right direction of w...

@GregWiley SELECT * FROM PHPRoom WHERE understandsMySQL = 1 AND COALESCE(wantsToAnswer, boredEnoughToAnswerAnything) != NULL
0 results
@rdlowrey 7.3k? Man, you have been repwhoring a lot lately.
I knew that, but you've been more successful with it than I have.
lol @DaveRandom
@webarto As much as that's a great piece of music - why England?
Just messing with Dave.
15:38
@GregWiley Seriously though, they are table aliases.
ok so the "tA" has no significance? It could be justStuff?
@GregWiley yes
look at the constants
you'll see where they are getting defined
Yes the actual name is irrelevant as long as it's a valid identifier
Give a man an upvote and you give him rep for a day. Teach him how to rep-whore and you give him rep for a lifetime.
16
Question: I am using codeigniter and Tank Auth to create a simple login system. The problem is i cannot remove the index.php from my url. http://54.245.109.172 the .htaccess i am using is the same as in this forum post: codeigniter.com/forums/viewthread/153950/#745195 anyone got some ideas?
15:40
People usually use them to shorten the table names for readability, there are some situation where they are required (such as derived tables from sub queries)
@tereško Your CI ridiculing skillz are required.
"curl up and die" ^_^
gods below , please stop the pain
@DaveRandom this is a subquery.. Thanks for the help!
@webarto Harsh but fair
Don't you purchase stuf from codeigniter? Couldn't the developer support that? That's what you are paying them for, right?
15:43
@LiverpoolFTW , what do you mean by "cannot remove index.php from URL" ?
@rdlowrey Woah, wait, seriously? They are fully inheritable in anything that implements it as well. Awe-some.
@LiverpoolFTW , as i see it , everything you need to know is explained in that post
@tereško 'index_file' => false, in Kohana
of course you have to make sure that you are running your application on apache and have FileInfo directive enabled
@webarto , as i understand it , the problem is in the input , not output
his app is not routing without index.php
@tereško I have been through that forum post and all the tutorials i can find, however no matter what i put in my .htaccess file it still has index.php in my url
somehow I think there is someone just downvoting me daily just because he can.
@tereško trying other server would be starting point
function rand2($m) {
    static $t;
    if (!$t) {
        $t = md5(microtime(true), true);
    }
    $m--;
    $bits = ceil(log($m, 2));
    $bytes = ceil($bits / 8);
    $mask = ((int) pow(2, $bits)) - 1;
    do {
        $t = md5($t, true);
        $int = 0;
        for ($i = 0; $i < $bytes; $i++) {
            $int += ord($t[$i]) << ($i * 8);
        }
        $int &= $mask;
    } while ($int > $m);
    return $int;
}
a non-biased random function based on md5 as the PSRNG
@Gordon downvoting your questions?
@webarto no, my answers. I got a few dv's w\out explanation recently and I cannot see why
16:01
@Gordon I see, that kind of sucks, I get downvoted (my highest 2-3 rated answers), probably persons whom we closed the questions :)
@webarto yeah, probably
@webarto 75000 results...jquery can't do that
@Gordon data.se hasn't been updated in way too long
16:12
@Lusitanian might be, but I sure didnt close 75k question ;)
i know :P
lies, it's on google
I need some OOP guidance.
Singleton
No question
Let's say i have a Parameter object and a Builder object. The Builder object builds a string based on the Parameter object.
Do I inject the Builder to the Parameter object or the Parameter object to the Builder?
Or based on which rules/guides do I decide that?
16:16
The param object to the builder - in singleton form - and make the param a super::$tatic
It seems to me, though, that the Builder depends on the param
Yes it's kind of. However I could make the dependency the other way round, too.
Ah, okay, you mean I need to follow the path of the dependency.
As the builder can only operate on the parameter object, it needs to depend on it.
Whereas the parameter object can operate without the builder
so it shouldn't need to know about it or have one
However I wonder if this is not conflicting with SRP because if I change the parameters, the builder need to change as well.
correct me if I'm wrong since we're talking abstractly
hm.
@Lusitanian Yes that is how I would have done it anyway. However once I had a printer and a document and I passed the document to the printer however it was the wrong way IIRC.
16:19
o.o
I need to fetch that question probably.
that's reasonable
$document->print($printer);
Does PDO Class really implemented via myslq_* functions internally????
user895378
@LeviMorrison Yeah -- I was excited to learn that yesterday
vs $printer->print($document);
16:20
@hakra You feed data into a manipulator, feeding a manipulator into the data makes no sense. You feed letters into a sorting machine, the sorting machine tends to be too big to fit in an envelope.
@metal_fan no
@metal_fan no
where you did you hear something so retarded ?!?
on some forums
@DaveRandom except OOP isn't perfectly aligned with the real world -- though I tend to agree with you
as long as the document and printer each have a defined interface it should be okay though
16:22
@metal_fan It uses the MySQL C API, and the names of function in the mysql PHP extension reflect the names of the corresponding C API functions. It may be that they were talking about the C functions, not the PHP ones.
What's diffs between $db->query($some_binds)->fetchAll(PDO::FETCH_ASSOC) AND $db->query($some_binds) ?
The first executes a query, assumes it will be successful and fetches the results. The second just executes the query.
*not query, but exec()
in first one
well .. did you try to read the manual ?
Do not do the first one. If the query fails it will emit a fatal error about which you can do nothing (Edit: unless you set ERRMODE_EXCEPTION). If there's an error that can be checked, check it.
16:24
also , the first one would violate law of demeter
and it has nothing to do with query() vs exec()
@tereško yes I did http://php.net/manual/en/pdo.query.php it has 3 items on it
lolwut
sorry. I mean 4 PDO Statements in descr. section
@tereško thank you. I'll do that immediately.
@DaveRandom thanks
16:30
Right, time to drink off these hippie drugs. I'm going home. Just you try and stop me...
16:41
Liverpool FTW
@DaveRandom Yes, it's just circulating around. BTW I think I will have the Parameter which represents something so it is A and then the Builder is A, too so it can extend.
So SRP is not violated.
And LSP should work nicely, too.
pce
pce
hi!
16:58
Heh. Extend. Violated.
Sorry, couldn't resist. =P
I'mma slink back to JavaScript now.
@CallumMcLean ?
Any system where it's **harder** to handle the error properly than to ignore it is insufficient in my book. #PHP
@hakra Hmm? =P
posted on August 31, 2012 by Eli White

I announced this on twitter yesterday, but figured I should blog about it a bit more today. As of yesterday, I published a new PHP Framework on github: Treb Yeah, I know, the world really doesn’t need another PHP Framework, there are tons of them out there.  So why did I create this new one?   Well honestly, I didn’t set out to do so.   You see at numerous previous jobs: Digg, TripAdvisor, Hi

17:14
@Feeds Someone who releases a framework and doesn't call it the greatest thing since sliced bread. Kudos.
@LeviMorrison Hmm. Yeah. Oh. No. Not really. Hmm.
@ircmaxell does your math have to be very strong to become a good programmer?
ambiguous question is ambiguous
@DineshVenkata Depends on which kind of math
@NikiC And what kind of programming.
17:26
And what kind of good
@NikiC I was told that my logic wasn't good and henceforth I cannot program well which they related to my math as my math was weak
Well, logic is exceedingly important
Yes, logic is important
how do I know my logic is good or not?
my dreams were almost shattered when they said this to me
But other kind of math is probably less important ;) E.g. you don't need to be able to solve differential equations to be a good programmer ;)
17:28
work at it
Who is "they"?
the people who employed me for internship I have developed quite a number of Android apps but never did things in systematic manner though
I thought I was a decent developer
but then this what I was in for
the thing that differentiates good programmers from great ones is not their intelligence (that helps), it's not their background knowledge (that helps), it's not their schooling (that helps), it's their drive and motivation to constantly improve themselves (especially when others put them down)...
@ircmaxell I left a job in networking for programming and yea this is my first job
and they are almost certain that they don't want me in the team
@DineshVenkata Always keep in mind, that people are giving reasons for reasons. It must not be you because they don't want to pay you. It could be for example that it's cheaper to use interns for android apps.
17:39
@hakra I'm sorry I didn't get you
Hey guys one question. I benchmarked two different mysql queries. Number 2 wins every time. Does it remain the same with database records increase?
You need to clear the query cache
6
Q: Clear MySQL query cache without restarting server

Mahoor13Is there any way to clear mysql query cache without restarting mySQL server?

I wanted to ask if it is guaranteed that winning piece of code will be actually faster even when there are hundreds of rows in database.
What's a winning piece of code?
ill show you
sec
SELECT bpoint.sName as name, bpoint.sAddr as adr ,bimages.iURL as url FROM bpoint, bimages WHERE bpoint.pointID = bimages.pointID AND bpoint.pointID IN ($input)

VS separate

SELECT iURL FROM bimages WHERE pointID IN($input)
SELECT sName, sAddr FROM bpoint WHERE pointID IN($input)
join is 50% faster all the time
17:49
That's generally true about joins
so, when there are hundreds of database rows, will join still be faster?
@Feeds another sad joke of a framework
@DineshVenkata It might be that the reasons they tell you are different from the actual reasons.
Where is a good tutorial on .htaccess files? I am having serious issues removing the index.php in my url. I am using codeigniter and have Tank Auth setup. I have tried pretty much every .htaccess associated with the two and nothing seems to work.
18:49
You are not looking for a .htaccess tutorial I guess. You just want to understand how readable URLs and codeigniter work which is something I never properly figured out because I stopped using it quick enough ;)
Well at this point in time my knowledge of .htaccess files is copy and paste what i can find online. I feel if i can actually understand what is going on I can figure out why I am having so many issues with it.
@edorian: Thanks for sharing the Rich Hickey talk!
@tereško You tell him/her/it. Damn cheeky feed bot.

« first day (685 days earlier)      last day (4489 days later) »