« first day (646 days earlier)      last day (4524 days later) » 

00:01
00:15
lolwut
user895378
00:47
@tereško sorry can't really respond in depth right now -- I'm out of town until tomorrow evening. On my phone right now
01:48
i have to write code at some other time
whenever i get a question , nobody's around
 
1 hour later…
02:53
@NikiC: be sure to link your generator RFC under the main RFC section of the wiki: wiki.php.net/rfc
03:47
function countData ( $tables = '', $where = '') {
$num = "SELECT COUNT(*) FROM {$tables} WHERE {};";

return sqlQuery($num);
}
please check my code
04:03
two blog posts written... Two more started... Let's see if I can keep up this 3 times a week schedule (past history says no-way)
04:57
Anyone know how do I get a url to show up as /question?q=the+question+is, instead of /question?q=the%20question%20is on user input searches?
Nvm found url encoding
 
2 hours later…
06:33
@Darius use urlencode instead of rawurlencode.

See the http://www.php.net/manual/en/function.urlencode.php return values section.
06:46
want to create a db to store users message for facebook
hello
07:28
morning
07:51
evening
UGT please
@ircmaxell Thanks, forgot to do that
08:18
why can't everyone just say "hi" or some from of the same? avoids the time difference :P
Howdy.
there he goes again :P
Howdy partner..
cowboys eh??
Today, yes. :3
@NikiC: Can generators have both return and yield? (I'll assume not - what happens currently if you try and use both?)
@Leigh error ;)
08:27
@Leigh in a concurrency context - sure why not
if you add yield delegation support then return will provide the return value of the delegation instruction ;)
@NikiC In simple terms?
So you could have something like $name = yield* $this->parseName();
I.e. $this->parseName() receives tokens/events (via yield) and at the end returns a value
This way you can split up a coroutine based parser into multiple functions ;)
@NikiC Oh, I wasn't thinking of returning a yielded value, I was thinking of your generator auto-detection without * marker. If you have a yield, and a separate return.
@Leigh Not sure what you mean. Return (with value) is currently invalid inside a generator. Yield delegation would make it valid again and basically make it "the return value of the coroutine"
(The delegation is explained in here: python.org/dev/peps/pep-0380)
08:34
@NikiC Hm, let me come up with an example I guess to clarify. In the mean time, from your RFC "There is an existing generator implementation in HipHop PHP, which uses automatic-detection. Using the asterix modifier would break compatibility."
You're making a decision based on not breaking compatibility with hiphop? isn't that their problem, not PHPs
or is this Sara's influence?
To answer my own question about return, it explicitly closes the generator.
@Leigh Ah, I think I misunderstood you
You were talking about just return; without value, right?
@NikiC with or without
@Leigh To some part :D But generally nobody seemed to like the poor little asterix :(
08:40
@NikiC I like it! I like the indication that "this function returns none or more things"
@Leigh The behavior is different between the two. Just return; closes the generator. But if you try to return $value; it throws an error ;)
Has the asterisk actually been removed from the syntax? Or just made optional
@Leigh I removed it completely
Aww :(
Imho it should either be there or not. Not something in between ;)
08:42
Well, I still don't think breaking HipHop is a valid reason
@Leigh There are other reasons in there :D
Like function *&foo looking really ugly ^^
I know there are, but still it should be for those reasons, not because some guy at Facebook doesn't want to change a few lines of code
And also the fact that everyone else automatically detects ;)
@Leigh "I'll be upfront, if you were to modify your patch to match HPHP's syle (no asterix), that'd make my life easier, but it's such a minor point, that I'm not going to ask too hard. :)"
So, let's say that that wasn't the main reason ;)
Looks like it's the first step towards FB controlling PHPs development ;) (although I wouldn't go as far as saying they made you their bitch, yet)
morning
08:46
@Leigh I'd have to move for that :P
@hakre morning
@BasicBridge no, mysqli is available since PHP 5.0.0 not 5.4.0
I'll delete that comment, it was a low blow even by my standards
sorry
lol
don't be sorry :D
A desk there would probably be nice, after all :P
Though personally I'd prefer working at Google ;)
I just like their products more ^^
I shouldn't imply your hard work on PHP has ulterior motives though.
I'm already agitated this morning, I've got a support ticket asking me to do work I've already done, so I've been over a bunch of code to see if something got missed, only to see the ticket is a couple of weeks old, and nobody assigned it to me until today.
I don't mind wasting time, I'd just rather waste it on things that I decide on
Candidate for possibly worst book ever? >:-3
08:50
haha
@deceze :D
Publication Date: December 29, 2007 - Wow, he really was trying to get ahead of the game there eh. I wonder what PHP 6 features it specifically deals with.
@Leigh Probably UTF-8. ;-P
@deceze is this a joke or just retarded people :|
08:59
@hakre wow - my biggest Delphi nitpick is the fact the VCL is bloatware
and the best way to get the current date time in format 2012-07-23 10:00:00 php< 5.3 is..............
@sanders date('Y-m-d H:i:s');
hehe worked it out ;-)
@Leigh what is the easiest way to add 7 days?
@sanders date('Y-m-d H:i:s', time()+(7*24*60*60));
maybe want to make that calculation a constant ;)
@Leigh you mean in a separate function or so
@webarto For some reason he doesn't have PHP 5.3+, no idea why he's living in a cave with no internet, but he is.
hm, sorry haven't seen it is < 5.3
@Lei
09:07
@Leigh You can solve that by forgetting about it via VLC and a good movie :)
@sanders define('SEVEN_DAYS', 604800); then use that. saves you having to do the maths overhead each time (not sure if the PHP compiler pre-calculates constant expressions)
@leigh @webarto I WISH i could use DateTime but our client hosting platform does not support 5.3 yet
@sanders Well I guess the question is. Why would you chose a host that doesn't see the benefits of not using out of date software
I would understand 5.4, but 5.3 :pokerface:
because our complany is not over yet on 5.3 but we're moving now to a new hosting platform. which will support 5.3
09:09
@hakre I ended up using KOL + sysreplacement and D7SE as my standard delphi development environment.
@hakre Just because that one question with the bounty got deleted, doesn't mean that you have to delete everything now...
I moved from 5.2 to 5.4 and I didn't have to replace a line of code... have you tried to move it? @sanders
@sanders 5.5 features are being ironed out, do you really want to be 2 versions behind again by the end of the year?
@webarto Upgrading from 5.3 to 5.4 alone was a massive performance increase for me.
09:12
yup, I'm on Apache 2.4.2 and PHP 5.4.4, it feels like 2x faster than aforementioned...
or maybe it's that feeling when you know you have latest versions :P
@webarto Switch to nginx + php-fpm and you'll get 2x faster again, at least :P
@Leigh unfortunately it's not up to me....
@Leigh :P
09:13
I really love gzip_static + git post-receive hook to gzip static content
@NikiC Wow.
I'd say it's bad if one dislikes using the switch statement. But it's good for programmers who like the switch statement. For which kind of programmers do you ask your question? For switch likers or haters? — hakre 1 min ago
^ LOL
You can always solve problems that needs to be multi-threaded using CURL while using php. The only advantage of supported multi-threading is that you write less code. — PLB 44 secs ago
^ O_o
dafuq did I just read
@deceze uh, what?
ROR,Python use multithreading. cricinfo.com type site can not be developed using PHP, where you need to update many things simultaneously. — diEcho 2 mins ago
^ O_O;;
What is this thread?!
09:23
that whole thing needs to be deleted
Purge with FIRE!
it is used to update things simultaneously ... what a noob, this cricinfo.com is developed in HTML...
I've just realised my t-shirt says "brit-pop" on it, with a picture of a cola bottle... I thought I was getting a deal for a £4 shirt that had nice feeling material, now I think I got screwed... I should learn to read things before I buy them
@NikiC Everything? That's more than an overstatement. I'm just following the tail of that question a bit along the road. I'm eager to learn.
@hakre To me it looks like you're sulking and want your revenge :D
09:27
bit.ly HTTP: 301 Moved , Length: 196 , Redirected to: blog.ircmaxell.com/2012/07/… HTTP: 200 OK , Length: 0
some servers do not send content-length?
Why would you send content-length for a redirect?
(hint: no content)
sorry, I'm following redirect, from bit.ly (Length: 196) to ircmaxell blog, which sends content-length 0, or none... afaik
@webarto So your 'Length' is taken directly from the returned content-length header?
@webarto sends a content length for me
Any Drupal developers around? I've got a problem after upgrading from 6.25 to 6.26 which I can't figure out.
09:31
deceze$ curl -i blog.ircmaxell.com/2012/07/so-you-like-to-read.html
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Expires: Mon, 23 Jul 2012 09:30:33 GMT
Date: Mon, 23 Jul 2012 09:30:33 GMT
Cache-Control: private, max-age=0
Last-Modified: Mon, 23 Jul 2012 04:02:53 GMT
ETag: "403bfa4e-e418-4d76-8b23-1642fe491ed8"
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Server: GSE
Transfer-Encoding: chunked
^ No Content-Length...?
Hm, I get content-length via chrome, but you don't via curl
(╯°□°)╯︵ ┻━┻
I don't use chunked
Mebby Chrome's just filling in a default value?
can you show your request headers?
09:33
I'm not trusting Webkit's Inspector entirely, it doesn't show cookies going back and forth for instance (under some circumstances?).
Okay well I've upgraded from 6.25 to 6.26 and I'm now getting this error:

Call to undefined function _system_theme_data()

All the google results I find date back to Drupal 5 time when people were trying to get on to version 6. Nothing recent enough to help me.
@Leigh What was the curl option for that...? :3
@deceze I think it's curl -v (I think it's probably down to the chunked encoding)
@NikiC @deceze @Leigh thanks
$ curl -iv blog.ircmaxell.com/2012/07/so-you-like-to-read.html
* About to connect() to blog.ircmaxell.com port 80 (#0)
*   Trying 173.194.69.121... connected
* Connected to blog.ircmaxell.com (173.194.69.121) port 80 (#0)
> GET /2012/07/so-you-like-to-read.html HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: blog.ircmaxell.com
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
09:36
Req:
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Encoding:gzip, deflateAccept-Language:en-us,en;q=0.5Cache-Control:max-age=0Connection:keep-aliveHost:blog.ircmaxell.comIf-Modified-Since:Mon, 23 Jul 2012 04:02:53 GMTIf-None-Match:"403bfa4e-e418-4d76-8b23-1642fe491ed8"User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Res:
hello
Cache-Control:private, max-age=0Date:Mon, 23 Jul 2012 09:35:50 GMTEtag:"403bfa4e-e418-4d76-8b23-1642fe491ed8"Expires:Mon, 23 Jul 2012 09:35:50 GMTServer:GSE
wats this
@webarto hm, so you don't get chunked encoding
@love A proper HELO response. ;-3
09:37
@deceze you speak SMTP too? :D
@NikiC Revenge for what? I got my bounty restored - if it's about revenge for points (which was 50 only, I must admit, I don't care about those points). Revenge for not making the argument? Well I do make arguments for a reason so if other are countering the argument, the argument needs to improve. That's not revenge, that is just finding out.
@Leigh 250 Ok
But it's great to see actually you care. Some of the answers given are more or less frightening me.
Just an over generalization which is exactly what I was asking about: context. But looks like nobody cares. So if you are able to create some attraction with a specific question, you can pretty easily manipulate it.
@webarto Mine also comes back with content-encoding: gzip. You have accept-encoding: gzip in your request, but it doesn't send it back to you like that... strange
Knowing about the tools and the style-of-thinking you can even trick an moderator to delete a question quickly.
I wonder nobody does see that even I wrote it. The question got so many downvotes already, I have problems to interpret that, but it looks like it is not a good sign.
09:42
root@debian:~# curl --head -L bit.ly/MpRxx6
HTTP/1.1 301 Moved
Server: nginx
Date: Mon, 23 Jul 2012 09:42:08 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie: _bit=500d1c70-000fb-006dc-3b1cf10a;domain=.bit.ly;expires=Sat Jan 19 09:42:08 2013;path=/; HttpOnly
Cache-control: private; max-age=90
Location: blog.ircmaxell.com/2012/07/…
MIME-Version: 1.0
Content-Length: 196

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
@Leigh see, content-length 0, sometimes 24x bytes, neither is true...
@webarto --head sends a HEAD request? (or just displays headers)
If it's not doing a GET, it wont return content, and thus no content-length
HEAD :)
Sure HEAD requests should return the content-length if the object requested does have a content-length. The reason of the HEAD request is to be able to find out before sending a GET.
@hakre I think it's mainly because of bounty was used to prevent closing (if I got that right) and that's something people don't particularly like ;)
@hakre what if the content is dynamically generated?
Should a HEAD actually call the script?
09:47
@Leigh Theoretically a HEAD request should be identical to a GET request, except that only the headers are returned.
In practice that's often not exactly the case...
@NikiC Well, I've brought up that point as well, but it looks like that deleting is specifically ok and well accepted.
root@debian:~# curl -iL bit.ly/MpRxx6
HTTP/1.1 301 Moved
Server: nginx
Date: Mon, 23 Jul 2012 09:46:50 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie: _bit=500d1d8a-003cb-063c7-281cf10a;domain=.bit.ly;expires=Sat Jan 19 09:46:50 2013;path=/; HttpOnly
Cache-control: private; max-age=90
Location: blog.ircmaxell.com/2012/07/…
MIME-Version: 1.0
Content-Length: 196

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
still the same, GET issued
I guess strlen() will do the trick :P
@Leigh Try with PHP, it's exactly what happens. Is PHP a good example? No idea, however, I'd say that's correct. And as GET is replay-able (and like @deceze wrote, HEAD should return the response headers of a GET request), you can already warm your server-side caches.
@deceze Well, I'm not an expert on what HTTP should/shouldn't do. But I wouldn't expect a HEAD request to trigger a full request of a script, i.e. fetching db content and whatnot. (Maybe my expectations are wrong)
you can't return headers only, content must be fetched either way... some servers support Range headers, so I fetch only let's say, 1kb...
09:51
@Leigh Take a look how PHP does it. It does exactly that. So how can you not expect it? I'd say it's more than common.
7
A: Super fast getimagesize in php

webartofunction ranger($url){ $headers = array( "Range: bytes=0-32768" ); $curl = curl_init($url); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($curl); curl_close($curl); return $data; } $start = ...

@hakre If that's what happens, I'll accept it :) I'm glad to be wrong and learn something.
@Leigh That's the default behaviour. However, if you in your PHP script do some other branch in case of a HEAD request ($_SERVER['REQUEST_METHOD']`), then you can do whatever you want technically.
For the HTTP standards, I try to fetch you a link.
Hi, I was trying to get content of web site, but the line I need is not showing when I save it or open with file_get_contents. Why is that happening? Because it should send me html content which includes that line.
Site: www.starfm.lv
09:56
@DanielsPitkevičs Not a real question. It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.
And text in right side: ŠOBRĪD SKAN
NICKELBACK - LULLABY (NOT SHOWING)
Oh cmon, it is not that bad with my question. There must be just a few things that make that happen.
PHP output it would get, but what else?
@Leigh This means it is a SHOULD, so you normally should return that. If you have a very special reason, do something different, however, do not expect this works with all of your HTTP clients well.
@DanielsPitkevičs Hehe. :) Maybe was a bit quick... ;P
@DanielsPitkevičs Answer's simple: it's dynamically filled in with Javascript.
09:59
@deceze I thought of that, but when it is filled with javascript, then it changes source code, and arent im getting just the source code?
And is there any ways to retrieve just that what is filled with javascript?
-_-;;
Javascript runs on the client, in this case in a browser. The browser gets the "empty" HTML and evaluates the Javascript source code in it.
You are only getting the source with PHP, but you're not evaluating the Javascript in it.
@deceze Ok, get it. Thank You :)
Poke around the Javascript to figure out where it gets its information from.
@deceze Found, it is just loading from different html. So now I will be able to use it :)
10:10
is there any way, how to send sms with php for free to one particular phone number?
dafuq is with that SMS thing
@webarto why not? I want to alert myself with sms
@webarto i mentioned - free
it is free, when you buy it :P
what is your mobile operator?
IMHO, if it is not paid, it is not reliable...
10:13
@webarto Tele2
google: tele2 email to sms
which will get you to: TELE2 Users: add e-mail forward to [email protected], where XXXXXXX is mobile number.
jesus el cristo savior santa maria della salute
he;;p
hello*
10:21
Anybody knows a plugin for user defined functions parameters autocompletion>
?
@hookman A plugin for what
@Leigh Sublime text 2
oops)
IDE?
@webarto show me the IDE as stylish as Sublime and as Fast as Sublime is...
@hookman editplus is as fast as sublime. Not so stylish, but WTF does it need to be stylish?
10:28
I'm not some needs to be pretty fag
@PeeHaa probably a mac user ;)
function over form
@webarto I bet that's what you tell all the ladies ;D
wats dat? :D
10:29
@PeeHaa Have you tried sublime?
@hookman We have it here in the office, but I don't use it
@PeeHaa It's quite nice once you've memorised all of the keyboard shortcuts
But don't expect heavyweight IDE features
The biggest issue I had with it is the fact that it couldn't handle big files as good as editplus does.
@PeeHaa I can't live without Sublime's GoToAnything :(
10:32
Hm, never had an issue with them personally, I've accidentally opened some binaries before and it coped
in Lounge<C++>, 39 mins ago, by Cat Plus Plus
Idiotmatic code.
noice
"Idiot-proven code"?
my code is so fast that I need to put sleep(rand(0,5)); to make it look like it is crunching something
lol
10:37
CID - Cerified Idiotic Code
*Certified
18 hours ago, by tereško
you can edit improve text in this chat , just press "arrow up" key
test edit wow that really works didn't even know awesome that's fun I should @webarto someone so there are lots of pings ping pong pong ping foo bar baz hello world I'm having lots of fun :D
she said
we should all write in edits, so it looks like we're typing in real-time. will get quite confusing though after a while, i think.
this is AJAX driven node.js nginx jQuery JSON2 SublimeText2 made on Mac chat powered by IIS
10:39
yeah, much cooler that way
It's Google Wave all over again! O_o
make it stop
@hakre Yeah. Think I'm going to get a hamburger
hamburger ins Hamburg
10:50
@hakre the markup in the question is messy, if you write a better markup you can have more options with jquery
@PeeHaa I start with a banana
> Only because you post code here, it does not mean it is programming related. In a world full of open source code, it first of all means it is program related.
Please contact the original vendor for support :)
Oh hier gibts Hamburger
neat
screw you guys, I'm hungry now
Hi Mr.Webarto How are you
hello, I have in my array some values with date and times for example '2012-07-23 16:00:00' now i want to check in my array if there is a value with 2012-07-23. array_search will return false because it looks only to full strings. Any idea how i could solve this?
11:03
I am using mysql_real_escape_string with out second parameter in my sql query which is working fine in my localhost but not in server? Also I tried by giving connection as second parameter which is also not working in server ? Do i need to set configuration in my server ?
chances are that you are not connected
I am using linux with lamp
@sanders loop + strpos?
2 days ago, by Truth
Please stop writing new code with the ancient mysql_* functions. They are no longer maintained and community has begun the deprecation process. Instead you should learn about prepared statements and use either PDO or MySQLi. If you care to learn, here is a quite good PDO-related tutorial.
@webarto without array_search?
11:06
why array_search in first place? it is not designed to do that
wordpress anyone?..
@webarto because it has to find the value in my array
yes but it will search IDENTICAL, not PARTIAL
@webarto want to show you an example, which site for pasting code
11:09
OK
@webarto which site?
I tried with following code
...
$db = $this->_getConnection();
echo $usql = "UPDATE `module_usercontent` SET `content` = '" . mysqli_real_escape_string($db,serialize($params['content'])) . "' , `updated_time` = '" . $current_time . "' where `usercontent_id` = $usercontent_id"; exit;
....

public function _getConnection($type = 'core_write') {
return Mage::getSingleton('core/resource')->getConnection($type);
}
@sanders
$search = '';

foreach($array as $key => $value)
{
    if(strpos($value, $search) !== false)
    {
        return $key;
    }
}
is this what you are looking for?
i regenerated the fields of a php form in a new div by calling the same function by ajax.. but after that the related save function saves only the data from the last array of fields independent of the number of times the function has been called with ajax.. can somebody give me a little hint
11:15
I tried with mysqli , still not working. Am using magento
@Dinesh sorry, I can't help you, you are using Singleton
@webart tnx
@webarto why i should not use singleton with mysqli_real_escape_string ?
@sanders seriously, was that hard to figure out? :)
11:21
@nope but didn't know i should use strpos in stead of array_search.
;-)
who says you should or shouldn't? :)
@Dinesh What are you using (i.e. what does connection contain)?
In Magento i can connect sql using below code
public function _getConnection($type = 'core_write') {
return Mage::getSingleton('core/resource')->getConnection($type);
}
@Dinesh I've seen that turd yeah, but what is it? mysql_* / mysqli_* / pdo?
11:38
@PeeHaa okay i am trying to use mysql_real_escape_string in sql query. Works fine in localhost not in server. Then i tried the same with mysqli, but still facing same
:pokerface:
I think this trainwreck of a thread should be 'd stackoverflow.com/questions/11611414/…
choo choo
hey guys, i'm facing a prob in phpmyadmin, it showing null, thought its actually not null
what could be the prob?
phpmyadmin
11:48
^ that
phpMyAdmin :)
@NokImchen "thought its actually not null" , what is it?
NULL
@GeoPhoenix i edited the rows manually, but when i browse , it shows NULL
wait, i'll post a screen print
no need, it is your fault...
epic
when can i paste pic without registration?
im using Apache/2.2.22 (Win32) PHP/5.4.3
and phpMyAdmin version: Version information: 3.5.1, latest stable version: 3.5.2
NULL values, probably, cuz of no column name.
What is Your table structure?
repair your tables
reapair? how?
tables structure? wait, let me screen print it also :)
11:56
@NokImchen Edit table structure, re-create table
@DanielsPitkevičs re-create means deleted & create again?
Please learn about functions first before you use them, that includes learning about the meaning of each parameter as well as learning about the return value and the type of error handling that is used with the function. — hakre 1 min ago
@NokImchen Indeed, and can You show table creation script?
$x = y == false? false: true;
11:58
@DanielsPitkevičs oh, i create the table & the columns manually using the default setting , i changed only the data type to TEXT :)
I say, repair

« first day (646 days earlier)      last day (4524 days later) »