« first day (2498 days earlier)      last day (2676 days later) » 

01:00
s/can't find my shoes/had to touch some CSS/
 
3 hours later…
03:52
o/
04:24
Good morning
@Jeeves o/
@Linus What is your purpose?
04:57
!!dad
Did you hear about the cheese factory that exploded in France? There was nothing left but de Brie
05:11
posted on August 18, 2017

New Cyanide and Happiness Comic

05:32
how to be good in backend?
05:53
@winresh24 IDK, but I guess lubricator helps
06:03
o/
hi
what is "fine documentation" on php.net, somebody pointed me to "fine documentation" of shuffle() there
the comments underneath?
I searched in google and this is not showing
I actually don't read comments yet
user924016
mornings
what is "fine documentation", would you know?
of php.net shuffle(), lets say
the comments?
06:20
@AaronSmith it just means person considers php.net a good documentation.
:)
no, this was not meant
fine dining... not that
I was thinking the comments, like "fine print"
I guess this was it, but I am not sure
"php.net/manual/en/function.shuffle.php read the fine documentation"
well, then ask the person who told you that what s/he meant
morgen Gordon,RonniSkansing
06:40
@Trowski We could just setup CloudFlare now for TLS.
user924016
time to write a job application
does anyone now why $_Session lost first time to retrieve its data on other php after first attempt it worked fine anyone know?
user924016
error in code
cant find any error i am becoming dull
07:10
@RonniSkansing ... the genetic one
@Jimbo o/ mon-ring
user924016
@tereško lol
good morning!
happy friday all!
07:37
\o
\o
so .. did you buy the candles, @JoeWatkins?
I had a bath instead ...
:D
.. the things lazy people do
07:49
:P
Anonymous
monring
preg_grep() is not reporting PREG_BAD_UTF8_ERROR – #75089
Anonymous
Anonymous
!!wotd
confabulate: to converse informally; chat.
08:03
So this is the Room 11 Confabulator?
Anonymous
11 Confabulators
Anonymous
@PeeHaa your mum's a confabulator
that's a fucking brilliant word
Too much Fabian in it
I find it very annoying that when you do apt-get install php-fpm it installs a binary php-fpm7.0 but the service is called php7-fpm
Anonymous
08:12
for centos it's just php-fpm
Anonymous
christoph
08:29
Good morning :B
@Alesana sorry I had to go last night, got a mad work rush on because deadline today and I lost 2 days this week
Ah that's the worst
Not a problem mate
I've been pretty busy myself I'm trying to get beta testers for my current program within the next few days then from there I am going to be working on building a website for a charity :B
OK no worries, well if you add me as a collab on bitbucket I should be able to give it some eyes this weekend @Alesana
@DaveRandom Don't say I didn't warn you :P I added you last night
I oh weird, I didn't get any kind of notification, can you ping me the repo url?
08:39
Yup give me a sec
What time is it there?
9:39am
Ah okay
9:40am
Oh you don't have to update me every minute :P
I must have done something wrong but I think I got you on there now
9:41am
08:41
There are I think 2 bugs that I found that I need to fix then it is gold
ah yeh I see it now
Dedication :P
:S I warned you
OK I won't be looking at it til much later anyway, possibly sunday
Okay no big deal
I am finishing up the landing page, then I will start on the billing part
I kind of started the billing but I didn't do much
Anyays, will get beta testers before that part
does anyone know, why mktime creates the second 2 hour timestamp instead of the first?or what might cause this problem?
Anonymous
08:49
seriously thinking about showing fastgood.cheap to my boss to make a point ...
I want one of those on my refridgerators
wow, that was a bad question xD
@Naruto errr... wat?
Should I trim() GET and POST data globally:
array_walk_recursive($_POST, function (&$val)
{
    $val = trim($val);
});
Or when I define each variable:
$category = trim($_POST["category"]) ?? "";
Where do I find what goes into the SAPI headers? I am missing some fields, like User Agent
09:05
it's web server dependent
afaik
the web server sends a set of key-value pairs, those are built into a HT, there's special handling for some of them (like Cookie) but afaik none of them are explicitly set by any method other than just blindly copying what the web server sent
there's some weirdness around how the built-in server works with headers though, it doesn't store them in the same place iirc
SAPI headers are a zend_llist. not a HT.
oh right, because the same header can be present more than once
which SAPI are you trying to do stuff with?
apache, fpm, cgi
do people still cgi for anything? :-/
some
well, fcgi
09:10
I've seen that bit of fpm, let my try and find it
@AaronSmith fine 'might' be a euphemism: urbandictionary.com/define.php?term=RTFA
ah, crap. Now I get it @DaveRandom. the sapi headers are the response headers. Right?
well the SAPI is a layer that (amongst other things) deals with translating the headers between PHP's internal storage and a format the web server, or whatever external app, the caller, understands
what are you actually trying to do, just read the headers in a portable-ish way?
@DaveRandom Yes, but not for PHP. :D
@DaveRandom our app allows tracking of certain user-defined request and response headers, e.g. if you are interested in finding all requests coming from Lynx, you'd filter traces to header.ua like lynx and so on
09:20
I would just copypasta from the apache_request_headers impl if I were you
> Nothing changes if I remove that line, I still get the same warning. This code works on PHP 7.1.3 with that line in place.
that's the "official" way of getting that data, i.e. the most portable way because it works with apache, fpm and cli server
dunno if it works with cgi, I never tried because... cgi
i've implemented this the last few days (with some kind help of Joe) but now realize the sapi header seem to be response headers only
@DaveRandom you likely mean getallheaders
09:22
@Gordon lxr.room11.org/xref/php-src%40master/main/SAPI.h#122 is the response headers, if that's what you are talking about
@Gordon alias of apache_request_headers
and before you shout at me, I didn't write it :-P
yes, that's the headers I am talking about
oooh cgi_main.c has an impl of apache_request_headers as well
yeh, just aliases
@DaveRandom nothing, just brain fart, I worked around the problem, good enough, shitty project, meh..
09:25
@kelunik I don't have the energy to deal with that. I mean that is blatantly user error. The code screams user error in the first place, and it's just not possible to get that error when you remove that line, since that error is only generated when an attempt to set that value in OpenSSL fails
@Gordon this is one of those things where it might be best to actually invoke the PHP-level function
that will at least give you consistency without needing to worry about how the SAPI is dealing with it
yeah, probably
it's less than ideal but you only need to do it once so it won't have a meaningful impact
what's wrong with this code <input type="date" class="form-control" value="<?php echo '12/22/33' ?>" />
can't print retrieved date from db to input date
i have tried 01/01/01 also
var_dump the date
and explain what you mean by "can't print". what happens?
var dump : string(10) "17/08/2017"
converting strtotime : 1970-01-01
09:37
so you can apparently retrieve the date from the db. Since you now mention converting strtotime, I assume you somehow use strtotime in an incorrect way. Show how you do the conversion.
actual code and output pastebin.com/GBmh8Wtd
@Gordon I just checked how ext/session gets at the cookie, it uses $_COOKIE rather than some internal API so I guess there just isn't one.
feels like a thing that could use fixing tbh
@jagdish you are inputting 17/08/2017, e.g. dd/mm/YY which is an unsupported format. You'd have to use DateTime::createFromFormat() or retrieve your data from the database in a format strtotime understands or directly fetch it in the desired out format
Marvel Defenders baby! Let's do this.
@DaveRandom Meter arrived.
Sans battery though
09:46
what's wrong with this statement ?
<input type="date" class="form-control" value="<?php echo '01/01/01' ?>" />
@Fabor naturally
@jagdish what's wrong with you? I just told you.
@jagdish listen to what people tell you, also ;
I know what's wrong with it @jagdish, what's wrong is you ignored @Gordon's answer.
user5876173
hi guys this is my array from this i want to display the start and finsih dates

can you please explain

[1] => stdClass Object
(
[uniqueid] => 2#1
[scormid] => 13
[attempt] => 1
[userid] => 2
[picture] => 0
[firstname] => Admin
[lastname] => User
[username] => admin
[firstnamephonetic] =>
[lastnamephonetic] =>
[middlename] =>
[alternatename] =>
[imagealt] =>
[email] => [email protected]
[idnumber] => 1
[times] => stdClass Object
(
[start] => 1501494602
[finish] => 1501495102
)

)
user5876173
09:51
here is the code of that one $attempts = $DB->get_records_sql($query);

$row = array();
if($attempts)
{
foreach ($attempts as $scouser) {
if (!empty($scouser->attempt)) {
$timetracks = scorm_get_sco_runtime($scorm->id, false, $scouser->userid, $scouser->attempt);
} else {
$timetracks = '';
}
$scouser->times = $timetracks;
$row[] = $scouser;
echo "<pre>";
print_r($row);
}
}


?>
I'm out guys o/
I wasn't really in but I am out
@Alesana o/ later
Please use a pastie site for long questions
I'll grab some curry sausage with fries
ThW
ThW
@user3663 not readable, and it's an object, not an array
09:53
@Gordon For me too please. That sounds AMAZING.
user5876173
@ThW ha sorry
user5876173
can you please explain how to get thise values in
user5876173
table
Good mornings
user5876173
somewhow i can able to get the values liek this
09:54
!!friday
user5876173
<td><?php echo $row[]=$scouser->username;?></td>
<td><?php echo $row[]=$scouser->firstname;?></td>
user5876173
@ThW same as i want to get time values
@Fabor wait… does that mean you never had a currywurst?
!!? define currywurst
09:55
Search for "define currywurst" (https://www.google.com/search?q=define+currywurst&lr=lang_en)
• Currywurst - Wikipedia - Currywurst is a fast food dish of German origin consisting of steamed, then fried pork sausage (Ger… (https://en.wikipedia.org/wiki/Currywurst)
• Urban Dictionary: Currywurst - 27 mrt. 2011 - It is still controversial if the Currywurst was invented by H. Heuwer (f) in Berlin… (http://www.urbandictionary.com/define.php?term=Currywurst)
• Currywurst dictionary definition | currywurst def… - currywurst definition: Noun 1. A German national dish consisting of hot pork sausage
No, I have. Just not in a long time
Curry ketchup too.
So good. We used to get a German market at Christmas when I was in England
Hi guys
Can anybody please help me with the logic for versioning my rest api service
Actually i am not getting how to start
@Learning if you want to keep it simple, you include the version in the url. the proper rest way is to send it as part of the request headers
10:00
Yes like this :
https://cloud.google.com/translate/v2/using_rest
But my question is how i will generate this versions
like v1 then v2
and should there be a table where i would be storing this versions?
table?
your urls should work independently from any db tables
I mean database table
Shouldnt i would be storing this versions in my application table?
no
you could do that. but you shouldnt have to.
so lets say user created some endpoints which was using version : v1
but now latest version is v3
but still user using that version v1 is valid
in that case how i would verify it without storing anywhere
Sorry actually right now i am in process of implementing this versioning for my rest api service
but i am not getting how to start it
what should be the approach
My personal preference is to use a separate sub-domain for different versions
treat them as totally separate applications
but I remember seeing a think arguing against that a while ago, I forget what the reasoning was
10:10
Shall i start my version from v1?
> If you're going to use v1 then make sure its a different codebase, don't make one app do all versions ever because IT WONT WORK AND STOP TRYING WHY DO YOU KEEP TRYING STOP IT!
1 important question is that is versioning can be done through code or it is done manually based on what changes we would be giving minor or major?
?
This is how twitter is doing :
This is what twitter states :
If the current version of the Ads API is 2.0 and we add a new set of attributes that expose the Twitter screen_name on the promotable_user object, this would be a backwards compatible change and we’d bump the version to 2.1.
In a subsequent change, if we removed the user_id attribute from the same object, this would be a backwards incompatible change and would require a MAJOR version bump, so this change would be introduced in version 3.0
Yes, that's semver
they even link it from that article
10:17
Ok so versioning should be automatically incremented through code?
till then let me read the article
versioning is dictated by the kind of changes you are making, and the way the consumer is interacting with your API
Yes so it cant be done through code right
It should be manually done by user
correct me if i am wrong
semantic versioning makes sense for things where computers are taking to other computers. For things that people are interacting with directly, an approach more like jetbrains' might make more sense
@Learning you can't automate version numbers, no
it's part of the development process
While we are on the topic... How do you add support for different return types (xml, json etc)?
well you probably could automate it actually, but I'm not aware of any tools that do it and writing such a tool that would actually be flexible enough to be useful would be a massive undertaking
10:21
v1.server/api/users.json
v1.server/api/users.xml

v2.server/api/users.json
^^ that?
@DaveRandom Yes so if twitter is saying that when they add a new set ot attributes then this would be a backwards compatible change and we’d bump the version to 2.1 but this kind of changes only developers will know and hence they will update version accrodingly
@IROEGBU you could also do this, it's a little less flexible but it's probably simpler to implement in many ways
the Accept header has support for a preference hierarchy, which is probably not necessary most of the time
@Learning yes
So this versioning is a complete manual process?
@DaveRandom I think it's way better... I was about to ask how to handle translations using the method I put...
10:24
!!help
Sorry if my question is stupid
@DaveRandom Well, no hierarchy, just preference values for each item. :P
!!uptime
dammit @Jeeves
oh :P it's constantly throwing LogicException: Promise already resolved in /srv/www/Jeeves/vendor/amphp/amp/lib/Placeholder.php:70
10:26
yeh, weird
that's a problem in amp by the looks of it
@Ekin Just set const AMP_DEBUG = true; to get a trace.
It's in my head, so now it's in yours:
@DaveRandom We don't have bugs. :P
:P
"unexpected features"
10:28
!!uptime
╔══════════════════════════════════╗
║ [17 seconds] without an accident ║
║   since [2017-08-18 10:28:28]    ║
╚══════════════════════════════════╝
!!record
!!uptime
╔══════════════════════════════════╗
║ [43 seconds] without an accident ║
║   since [2017-08-18 10:28:28]    ║
╚══════════════════════════════════╝
\o/
What's his longest uptime?
10:30
@kelunik I'll dig around later, I think one of the rooms might have gone inactive and it didn't handle it properly
hodor \o
@IROEGBU couple of weeks
!!alias thejoke say Air traffic control, this is "the joke" seeking clearance.
"the joke", this is air traffic control. Maintain an altitude of 10,000 feet agl and proceed normally over the head.
Air traffic control, this is "the joke", roger.
doesn't do multi-line commands
9 messages moved to Trash
10:32
I can have !!say interpollate \n probably
Would be useful.
Values for interned_strings_buffer and memory_consumption can lead to crash – #75092
10:52
anybody good with regex?
I've been stuck on one example for quite some time
I have it almost worked out
but not fully yet...
\[indent]((?:[^[]|[(?!/?indent])|(?R))+)[/indent]
basically this part:
( (?: [^[] | [ (?! /?indent] ) | (?R)) +)
kind of hard to get it all together
| - OR
(?: ... ) - non-capturing group
(?! ... ) - negative lookahead
(?R) - recursion - (lets say "A | B | C"; does the recursion "C" apply to the "A" and "B" at the same time?)
/? - match "/" zero or one time
( +) - match one or more of the preceding token
Morngins
10:59
[^[] - match anything that is not "[" (but this is within the non-capturing group and with the ?R, which is what I don't understand as a whole)

« first day (2498 days earlier)      last day (2676 days later) »