« first day (1347 days earlier)      last day (3617 days later) » 

12:03 AM
@Danack Holy ...
That dudes going to get fired.
@DaveRandom Hi
 
@DaveRandom it's something I can't say. Picture what that may mean
 
@ircmaxell Any good with image resizing? I need some advice.
 
12:25 AM
@ircmaxell I'm guessing PayPal
I've been looking into changing payment gateway since they announced that PayPal was moving to node.js
 
@Ocramius I've heard of node.js, what exactly is it?
 
lol
 
I'l take that as I asked a stupid question.
 
12:41 AM
where can I find the official references of medical codes like DRG groups, ICD9, ICD10,CPT,HCPCS some source like the government?
where http://findacode.com get these codes?
 
No idea what they are.
Im sure a php chat wont be able to answer that, but then again, I'm new to php.. Try Yahoo answers?
 
If someone know
 
I need some help with php myself :P
 
what do you need?
 
@EmilioGort I have a script so far, it adds a watermark to the image and stores it on the server. Im needing to find out how I can store it in multiple sizes.
 
12:56 AM
do you have the code online?
 
reading
 
@EmilioGort So basically i'm wanting to upload 1 image, and then it would create 3 images, one small with watermark (but with a fixed width), height depends on width. One largish with watermark, and one original (very large, no watermark)
Also somehow need to figure how to store them in 3 different folders :s this is gonna be hard!
(small watermarked),(medium watermarked),(large non-watermarked).
 
you merge the image here imagecopymerge($dst_img, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $transparency);
create an image from watermark file
if(!strcmp("jpg",$wext) || !strcmp("jpeg",$wext)) $watermark=imagecreatefromjpeg($watermark_file);

if(!strcmp("png",$wext)) $watermark=imagecreatefrompng($watermark_file);

if(!strcmp("gif",$wext)) $watermark=imagecreatefromgif($watermark_file);

// get watermark width
$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);

// place watermark image on the right left of the main image
$dest_x = $old_x - $watermark_width - 5;
$dest_y = $old_y - $watermark_height - 5;
you have to do this for every image you want to create
 
Oh dear
 
1:04 AM
and set the size you want...the width and the hight
 
No idea how i'm gonna do this lol, 3 days into php
 
teamvier
 
You seem like a php pro
 
1:35 AM
@EmilioGort nudge
See chat?
 
1:53 AM
hey everyone
 
@EmilioGort wont leme on
wierd kicked me off
resend?
 
7ggv71
 
 
1 hour later…
3:15 AM
Oi from Lubuntu.
 
user1642018
3:41 AM
hello, i have asked question here
 
user1642018
0
Q: How to assign values from one array to another for n times

AMBI am trying to create a schedule of who uses a specific item on which day. I have 2 arrays. one with dates & another with names and how many days they can use the item. i have managed to create dates array using this. function dateArray($from, $to, $value = NULL) { $begin = new DateTime($f...

 
4:21 AM
hi
i'm looking for Facebook Style or Google Picasa style image uploader anyone know tutorial?
 
5:05 AM
can i connect to port 25 in php while i am at my local pc?
 
5:35 AM
Is CURLOPT_URL naturally slow? I'm trying to get a file from another site, and it's painfully slow..
 
5:58 AM
can we connect to port 25 using curl?
 
good morning
 
Morning
Can anyone help me out? My cURL requests are taking so damn long ~10 seconds
 
6:22 AM
@HamZa Yeah, depends on your own preferences :P
Morning peoples
@Axel And you know the server you are connecting to should not take that long?
 
Yes, I ran the debugs
 
Ran the debugs? What do you mean by that?
 
One second, I'll link you
 
Like you know the request in itself does not take 10 seconds?
 
I'm opening the same url in that debug
That's around 1-2 seconds
 
6:25 AM
I see, yeah
but if you cURL it, it takes 10 seconds?
 
Take a look. 10 seconds if I'm lucky
 
Aha. And you still do only 1 cURL call?
 
Yes
 
Ah, yeah that's your guild's activity feed
 
Yeah, working with Blizzard API
http://us.battle.net/api/wow/guild/aerie-peak/horde%20warchiefs?fields=news

That's the file i'm trying to get, but it's slow as hell
I even limit it to the first 15, but still
 
6:28 AM
171 ms, slow with cURL?
Or are you getting longer response times on that link you just posted?
 
With the link I just posted
 
If you open it in your browser, what is your response time? The last link you posted
 
Ranges, from 10-15 seconds.
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $api_guild_news_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070319 Firefox/2.0.0.3");
$file_contents = curl_exec($ch);
curl_close($ch);

Not sure if this helps, but I think I'm doing it properly.
 
It might have something to do with request limitations, like it will slow down requests if you generate too many in a short amount of time?
I'll try that out as well then, see what I get
 
Please let me know.
I tried it over at my friends guilds site, and he gets about 0.5-1 second
On my first test, it's in milliseconds, but the second I start listing out my recent activity, it slows down to that range I mentioned
 
6:33 AM
It might be something to do with request limiting
[total_time] => 2.041567
 
You get 2.04 seconds?
You think it's on blizzards end?
 
I get 1,5 to 2,3
Doing 10 in 1 request now, let's see if I can find something out here :P
 
So it's probably my server then
Wait can I send you my script? And you can dispaly the activity?
 
[0] => 2.212491
[1] => 2.207166
[2] => 2.277916
[3] => 2.194751
[4] => 2.281581
[5] => 6.495358
[6] => 2.2206
[7] => 1.488542
[8] => 2.446232
[9] => 2.295268
I don't have a public server, virtual machine
 
Ah
 
6:37 AM
Srry ;)
At work atm
 
It's okay lol, this is making me rage so much
 
but would it not be better to cache that sort of info anyway? For at least 1 or 5 minutes?
Another 10 requests, average total_time = 2,2 sec
 
I was thinking of downloading the info every 5 mins to my server, then using it locally to project it
 
I wouldn't automatically download it, but instead cache it
So you only refresh it if it's requested after the cache expires
Otherwise you'll be doing requests even if noone is asking for the info
That's better practice if you are dealing with public APIs (in my opinion), to at least somewhat relieve them, even though your one request per 5 minutes would probably not have any impact, but imagine an API from a smaller company/server, they might struggle if everyone just auto-refreshed off their API every couple of minutes
But that's just my take on it :P
@Axel Good luck either way :P
 
isthere a readline() function for fsockopen() instead of fgets()
?
 
6:48 AM
@JanakaRRajapaksha No, what's wrong with fgets?
 
@SecondRikudo i am not sure exactly. i used fgets($connect, 4096); so i am not sure i can get entire line with that. in case of is there more than 4096 bytes. correct me if wrong
 
@JanakaRRajapaksha fgets($connect, 99999999999);
fgets gets one line at a time regardless of length
Just put something that is likely to be bigger than one whole line.
It works best if you're in some well known format.
 
why would you specify a length ?
 
morning
 
7:03 AM
Mørning
 
mroning
 
Good way to start your day
I just lost the game...
 
roaming
 
oh it is actually for read a line. i am sorry
 
@JoeWatkins I keep forgetting that fgets' limit is optional.
 
7:04 AM
;)
 
Yeah, @JanakaRRajapaksha just fgets($connect) should be enough
 
right
is there a way to put a line into textarea from foreach loop. like textBox.Text = value in c#?
i guess something like inject
 
@JanakaRRajapaksha By the time the textarea loads at the browser, PHP has finished running, so no, not really.
 
there is a difference between http and desktop applications
you should learn it
you wouldn't ask this kind of question
 
7:20 AM
@FlorianMargaine i just asked if someone has an idea, because it is not a language issue.
 
@JanakaRRajapaksha It is. You are misunderstanding the way web application works.
 
 
@hakre lolwut?
What's that supposed to be?
 
it's if you need a name for your project and you're uncreative, you can generate one in the style of those NSA project names.
 
7:37 AM
sigh
 
f....
 
good morning
hm.. what can be done with that user?
 
I heard that education can help
 
42
Q: Flag abusive users

RSolbergI think the community does a great job policing questions/answers, etc. and the community has some good tools available to do this. Between flagging questions with some reasons behind it and editing posts, closing them, and deleting them, the only thing that seems to be missing to me is the abil...

 
@hakre And castration.
Mods are already aware of that user, @hakre @AlmaDo
 
7:44 AM
Lobotomy ( "lobe (of brain)"; τομή tomē "cut, slice") is a neurosurgical procedure, a form of psychosurgery, also known as a leukotomy or leucotomy (from the Greek λευκός leukos "clear, white" and tome). It consists of cutting or scraping away most of the connections to and from the prefrontal cortex, the anterior part of the frontal lobes of the brain. While the procedure, initially termed a leucotomy, has been controversial since its inception in 1935, it was a mainstream procedure for more than two decades, prescribed for psychiatric (and occasionally other) conditions, despite gene...
(:
 
@Magikaas Waiting for episode 12 to be released :D
 
well I could do some dirty jokes as well, but I spare those at the moment.
 
@HamZa Hell yeah :P
@HamZa 1 day and 8 hours to go
 
@Magikaas and then?
 
Oops, wrong person xD
@hakre Sorry <3
 
7:47 AM
and is your nick Magic Cheese?
 
Why, yes, yes it is indeed
 
@Magikaas np and goedemorgen
 
@hakre Hahaha, moggeh :P
 
@Magikaas You check it from horrible subs?
 
@Magikaas just curious. :D
 
7:47 AM
more like magic ass :D :p
 
@AlmaDo ehehehe
 
@HamZa Yup, that's where I download them from mostly, that and baka-updates
 
//no offense :p
 
@AlmaDo T____T
@AlmaDo y u no Magikarp
 
E_DUTCH
 
7:49 AM
Hehehe
 
And I thought @hakre is from germany?
 
$em_array[$domain] = array();
how do i put a new value to that sub array with key = integer
 
Morning
 
@JanakaRRajapaksha $em_array[$domain]["key"] = "value";
@Fabien Morning sir
 
@HamZa if i use $em_array[$domain][] = "value"; is it auto increment the key and assign the new value to it?
so that i don't have to count and assign a key
 
7:56 AM
@JanakaRRajapaksha Try it before asking
much faster, and you will learn slighty more
 
stackoverflow.com/questions/24381147/… why it's so often Indians? :\
 
ok, thts better
 
@HamZa E_ZEE_GERMANS
 
Hehehe
 
8:01 AM
mornin guys
 
is there a simple way to fill the sort_order column with values incrementing from 0 for all the rows with the same article_id, then start from 0 again if the article_id changes? Or do I need to write a loop for that? paste.jesse-obrien.ca/6LJ
 
Nope ;) Typo question, off-topic, so comments only for me :p — Niet the Dark Absol 10 mins ago
^ oh kolink is not answering :O
hehe
 
^ crappy. Why "monitor" disappeared :p either only PC should disappear or all devices (so mouse & keyboard too). Also, near the table should be a trash can, where all those things should appear
 
As he dragged it to the trashcan, his monitor could have slided slowly toward the bin :P
Funny though :)
 
@SecondRikudo Haha, seen that last week 2, pretty awesome :)
 
@ircmaxell I'm just a fan / part of the promo team. All credits go to @ronni :)
Y U NO respond on my tweet? I put a lot of effort in it! ;-) @rdlowrey
Also morningin fine room
1 message moved to bin
 
Magik still no use :P it's still taking 10-12 seconds for the request
 
@Axel What have you changed then? Or just waited a bit before continuing testing?
 
I tried my downloading work, it works perfectly if I'm requesting the file from my own server
then I waited about 30 minutes, and still the same range
 
8:22 AM
Strange... Have you googled to see if anyone else is having the same problems?
 
Yes, lots of people do with different applications, but no definite solution
 
morning
 
Mørning
 
morning, @JoeWatkins
 
You think it's maybe because of json_decode, and then I do a foreach loop?
 
8:24 AM
mornings
 
I just got a linkedin invite to connect with myself
seems to be legit as well, no evidence of phishing that I can see
 
I use case, and switch between the different types.
 
@DaveRandom Monrinig
 
treat everything with the utmost suspicion @DaveRandom
 
8:26 AM
YOu know what json.pieterhordijk.com is missing? The ability to expand/collapse
 
@PeeHaa How is your service better than chrome's console for example?
 
@PeeHaa Oooh good call
That should be pretty simples as well I would have though
 
@Axel what are you trying to do? Or what is the problem? didn't follow discussion
 
@SecondRikudo It was an hour spent while bored. Also the point of it is not that page, it's the CSS/JS to make it easy to put highlighted JSON on any page
 
8:37 AM
oic
 
@SecondRikudo I think it's useful and use it sometimes so in that way it is already better :)
Also as @DaveRandom notes. It's a library and I also use it on requestable
 
Also been meaning to do a proper lint feature, that probably means writing an actual parser though so I haven't bothered yet
 
json_decode($string);
if (json_last_error() === JSON_ERROR_NONE) echo 'JSONLINT SAYS VALID!';
@DaveRandom ^ :)
 
:-P
bare in mind it's pure JS...
 
@DaveRandom BTW Doesn't crockford have some opensauce json parser?
 
8:43 AM
0
Q: click next previous button wd calendar append duplicate values

Dhanush BalaI am using jQuery calender plugin, you can see its demo http://www.web-delicious.com/jquery-plugins-demo/wdCalendar/sample.php. Now, the problem is that whenever I am trying to refresh data by clicking on refresh button it give me duplicate values. my jquery //previous date range ...

 
It already says "doesn't working" and tells you what the error thrown by JSON.parse() was, which is usually at least partially sane, but I meant a sexy UI thing that highlights the place where the error is
 
@DaveRandom just so you know, your JSON.prettify can be replaced with: JSON.stringify(obj, null, 4)
 
@FlorianMargaine Not with sexy colourisation and brace matching though
 
ah, true
I'd do that externally though
 
Anyway, it was really just a time-killing project, I'm aware it's not the most useful thing on earth (or even the most useful thing I've written)
 
8:47 AM
yeah sure, just mentioning this often-not-known feature
 
@FlorianMargaine Yes I admit I didn't know about it when I first wrote that
 
@Axel Sorry, was away for a bit, do your requests to the API themselves take 10 seconds or the request your code does? If you check the total_time in your code, what does it say?
 
@Axel curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close')); /cc @Magikaas
 
@DaveRandom Does it otherwise wait for the connection to time out before closing it?
 
Depends, but there's a pretty good chance that's what the problem is. I'm not sure if it depends on cURL version or what, but sometimes that seems to be required. Basically in HTTP, the server is responsible for closing the connection. That header instructs the server to close the connection immediately after it has sent the response.
I guess there is some cURL version where Content-Length behaviour is buggy or something, either that or their server is misbehaving
If the problem is that the client is waiting for the server to close the connection, though, that usually fixes it
idk, it could be something else entirely, but I've certainly had that fix similar issues in the past
 
9:05 AM
Seems like a good possibility to try out
 
It certainly won't hurt anything, put it that way
 
9:22 AM
$request = new HttpRequest($_GET, $_POST, $_FILES, $_SERVER);
$cookies = new CookieCollection($_COOKIE);
$session = new NativeSessionHandler($_SESSION);
$response = new HttpResponse($cookies);
thoughts? do the $_SERVER and $_FILES values belong into the request object?
 
imho yes
BTW with your library what happens if I need the raw posts data?
 
While they are global, they belong to that specific request
 
@PeeHaa never thought about that, are there use cases for that? I guess I could feet it php://input instead
 
@Patrick Yes there are usecases for that
SOAP is one use case
 
> Hello sexual prince Are you okay? How is your mood? I am very worried and do not know how to start this letter. I am a beautiful, kind and sexy girl. my name Chastity.
 
9:33 AM
I see. Thanks. Will have to do some reading
 
Sometimes I love spam
 
Lol, that is so bad it's almost good
Almost
 
@Patrick I've never been totally happy with $_SERVER being there, but I've also never yet come up with a better place, because they are technically part of the request environment. Stuff like DOCUMENT_ROOT doesn't feel like it belongs there to me though
> I forgot when in my life there was a sex.
 
@DaveRandom yeah some of it seems to belong to the request, other variables seem to belong into a config class. I guess I could split it up in my library but it might make things more complicated for the user
 
shouldn't you have a factory to create a SessionHandler? So that you can just pass a SessionHandler with DI and not worry whether it's native or something else
 
9:39 AM
now I had my hopes up that I can write my own http headers with stdout, but turns out it only writes to the server console... :(
 
@DaveRandom Congrats.
 
@FlorianMargaine This would be in the bootstrap file only though, I would hint the SessionHandler interface when I actually use it
 
@Patrick In the past I have just stored parts of specific parts of $_SERVER in the request - extracting request method, URI, HTTP headers etc, stuff that actually belongs there, and then discarded the rest. tbh I'm not sure I've ever actually used stuff like DOCUMENT_ROOT anyway...
@Patrick That's what header() is for, what's wrong with using that?
 
@DaveRandom I want to keep the response as a data holder object only, so that will go at the end of the bootstrap file. Would have been nice to just be able to echo the complete http response instead of having to loop through the header etc
 
@DaveRandom The only thing I use is REMOTE_ADDR I think
You already had that one too :)
 
9:49 AM
@Patrick you can do that. Just run the header calls before sending the body
 
@Patrick I'm actually not a huge fan of that approach anyway, it limits you a great deal. Your application should be structured in such a way that it never produces any output until all the logic that would need to set headers has been executed, so I'd rather write all output directly to the webserver instead of buffering it. Buffering it uses more memory and is slower (not appreciably, but it mounts up)
I have used response abstractions with complicated buffering mechanisms in before but now I generally would not do that
 
@DaveRandom But I use the response object in my views. How else would I keep things testable?
 
@PeeHaa That's actually temporally unique though, so it arguably belongs on the request. No sane application will have a variable DOCUMENT_ROOT...
 
Nope
 
The sender is a property of the request
Actually I'm not sure
 
9:52 AM
@DaveRandom so Request depends on RequestSender? and then add a method send()?
 
The sender is a property of the "transaction" (sucky term, can't think of a better one), and the request is also a property of the "transaction"
But no-one has a parent obj for the request and it feels bad as well
 
@DaveRandom Yes but the actual sender's address is part of the request
imho
 
@PeeHaa is it in the request headers?
 
^ this. this is the point
 
9:54 AM
if not, it's part of the request metadata, if you want, but not part of the request
 
It's not part of the request, if you inspect the request data you can't tell where it came from
 
Sure it is
 
I want sushi
 
I want a private yacht
 
Really though?
 
9:55 AM
I want a billion dollars
WHY WONT ANYONE GIVE IT TO ME
 
@Fabien At worst I could sell it and buy something I actually want
@FlorianMargaine Because you are aiming too low
 
@DaveRandom so would it make sense if the Request object has a getter for the IP and returns a RequestData object (or something like that? maybe just different collections for get, post etc?)
 
I'd still like sushi
 

« first day (1347 days earlier)      last day (3617 days later) »