« first day (2331 days earlier)      last day (2843 days later) » 

00:06
Hey guys, I have implemented a reset password script. This script generates a bcrypt hash and stores it into the user table at the user that is trying to reset their password. Everything works, it gets sent to the user, the user uses it and it gets expired after he/she has used it, but how do I make it expire after x amount of time (let us say 24 hours) if he/she never uses that token?
In other words, how do I recurringly check if 24 hours have passed (I know how to check how many hours have passed, I just do not know how to check it every x amount of times)
00:53
Should I maybe look into Cron jobs ?
 
2 hours later…
02:36
yes, you should. Look at this question stackoverflow.com/questions/1194857/…
03:02
$query = "SELECT SF.survey_id, SF.surveytitle, SF.surveycategory, C.categoryname, Q.Option_1, Q.Option_2, Q.Option_3, Q.Option_4, Q.Option_5, Q.Option_6, Q.Option_7, Q.Option_8, Q.Option_9, Q.Option_10
Im getting unidentified index: Option_10
but whenever I remove Q.Option_10
It will show me that i have unidentified index: Option_9
Why does that happen?
Wes
Wes
04:03
mornings
I created some images for use in my application, then before backing them up I went to test the "Delete Image" function and deleted them >.<
successful test at least
Wes
Wes
lol
04:28
True
04:52
morning room
Wes
Wes
05:15
\o
morning r11
o/
Good morning roomies
office ? @Linus
05:19
yeah :P
You don't have leave every Saturday?
not on sunday too..
seriously so you are working for all 30 days!!! -_-
yeah anyhow they call me on sunday to work...
05:40
Hello Friends
Does anybody uses dompdf here?
06:04
Hello can I ask doubts regarding seo here?
Hello, why do I have this error:
Parse error: syntax error, unexpected 'calculatePercent' (T_STRING), expecting '(' in C:\xampp\htdocs\test\index.php on line 45

with this code on line 45: $percentageGrade = function calculatePercent($x, $y){
You have a missing ')' parenthesis just before that function. @Hello
or a semi-colon
I just chcked it again.. I don't appear to
$earnedParticipation = $_POST['earnedParticipation'];
$earnedQuiz = $_POST['earnedQuiz'];
$earnedLab = $_POST['earnedLab'];
$earnedPracticum = $_POST['earnedPracticum'];

$maxParticipation = $_POST['maxParticipation'];
$maxQuiz = $_POST['maxQuiz'];
$maxLab = $_POST['maxLab'];
$maxPracticum = $_POST['maxPracticum'];

$weightParticipation = $_POST['weightParticipation'];
$weightQuiz = $_POST['weightQuiz'];
$weightLab = $_POST['weightLab'];
$weightPracticum = $_POST['weightPracticum'];

this is all before it
Oops!
$percentageGrade = function calculatePercent($x, $y){
remove that 'function' from the code
oh, how come? didnt know that could cause an issue
$percentageGrade = function calculatePercent($x, $y){
$result = $x / $y;
$result = $result * 100;
return $result;
}
06:17
you just call a function with just the name
ahh
$percentageGrade = function calculatePercent($x, $y);
posted on March 04, 2017

New Cyanide and Happiness Comic

hmm
can i explain what i'm attempting to accomplish?
 function calculatePercent($x, $y){
$result = $x / $y;
$result = $result * 100;
return $result;
}
you have to define the function before you call it like the above
06:21
how would I assign the variable $percentageGrade to it?
basically, I have an html form, entering in grades earned, max grade, and weight for four different grade components Participation, Quiz, Lab, and Practicum

I need to make a function that returns the percentage grade, and another function that returns the weighted percentage, and then I need to output the values on a different page
$percentageGrade = calculatePercent($x, $y);
Dont use the keyword function for a function call
ohh
Now if you want
weighted percentage
$weightedPercentage =calculatePercent($x, $y);
I have a doubt, say in DB i have "4 Tables" and each tables has "two or more columns" Now, i am fetching these values in an array for "Quick suggestion" in json. the problem is i cannot sort them based on keyword typed.
Is there any PHP guru around?
06:26
ah thanks Astro
@astrosixer what does undefined index mean on the post lines?
Calling bind_param for each array, is it a bad idea?
<?php
#collects data from each form field
$earnedParticipation = $_POST['earnedParticipation'];
$earnedQuiz = $_POST['earnedQuiz'];
$earnedLab = $_POST['earnedLab'];
$earnedPracticum = $_POST['earnedPracticum'];

$maxParticipation = $_POST['maxParticipation'];
$maxQuiz = $_POST['maxQuiz'];
$maxLab = $_POST['maxLab'];
$maxPracticum = $_POST['maxPracticum'];

$weightParticipation = $_POST['weightParticipation'];
$weightQuiz = $_POST['weightQuiz'];
$weightLab = $_POST['weightLab'];
$weightPracticum = $_POST['weightPracticum'];
did I not assign variables to the form fields properly?
been working on this all day
That value you are trying to access is not in the post @hello
06:31
:O
how do I fix that?
You have to assign the correct variable name you are posting in the name attribute in the form
I thought they were the same
offcourse it need to be same
I used the same name in the input name I thought
06:37
@Hello check this link w3schools.com/php/php_forms.asp
oh, was I supposed to use double quotes?
<form action="welcome_get.php" method="post">
please verify the method attribute in the form element
is it post ?
yup
how to add fields for php array into csv files?
All of my values of the index are equal to the name attribute I thought, @astrosixer
06:42
and check your action attribute
how to display values only into csv file and also how to add field name for that…!
Where the data is submitted
to another page called finalgrade.php
this is my code-
thanks ,do if-else statements count as decision structures?
because we arent allowed to use that
for this
06:52
hats off to you brother! @linus
@astrosixer hello, can you please delete the pastebin now? just for privacy concerns
Thanks for helping
greatly appreciated
You have to pass values
$percentageGrade = calculatePercent($x, $y);
instead of $x and $y
Okay I will
Thank you sir, and yes I think thats teh way to go
@Akshay :p
07:16
What classifies as an advanced operator in php?
I don't know what is meant by this
 
1 hour later…
08:24
morning
morning
hey
Wes
Wes
\o
undefined index in php is caused by what?
(thx @MadaraUchiha, I needed it. Also thx for banning me only 3 hours and not 3 days, you're the greatest mod and I shall sacrifice a virgin to thy glory)
08:55
Hello All
Need your support regarding this question: stackoverflow.com/questions/42593980/…
Wes
Wes
@Trucy don't know what's worse, being addicted to a chat or realizing you are so addicted that you can't quit it without a ban :B
/me can quit whenever he wants
/me lies
09:16
Mornings
09:40
mornin'
@Wes :P
10:01
posted on March 04, 2017 by kelunik

- Simplified error handler - Fixed documentation

@DaveRandom WAT?
@kelunik Yeah, it's my/Dmitrys fault… he introduced a bug into 7.1 and I've ended up fixing it only in master until it was noticed a few days ago… will be fixed in 7.1.3…
10:16
mornin
10:49
morngin
@Ekin ./server.php: $this->logger->debug('Mem: ' . (memory_get_usage() / 1024 / 1024));
K
well it's always 0 anyway when running on valgrind
That's pretty low on resources to use :D
can you open up gitamp on a tab please and let it run? :-)
done
nice job on @Jeeves @DaveRandom
@PeeHaa On black ops.
ThW
ThW
10:56
Morning
morning
@Jeeves You could call it that. But I call it operation desert elephant
@PeeHaa Do you like biology?
@ThW mornign
I like to hear standard English accent. I can't put up with tutors on youtube speaking English in a bizarre accent.
11:01
in general, that's indian accent :P
> Mar 04 13:47:36 GitAmp-Ubuntu php[7095]: [2017-03-04 10:47:36] notice Undefined offset: 0 in /opt/gitamp/vendor/amphp/aerys/lib/Server.php on line 313
Mar 04 13:47:36 GitAmp-Ubuntu php[7095]: [2017-03-04 10:47:36] critical Error: Cannot use object of type Amp\Deferred as array in /opt/gitamp/vendor/amphp/aerys/lib/Websocket/Rfc6455Endpoint.php:739
Mar 04 13:47:36 GitAmp-Ubuntu php[7095]: Stack trace:
@Ekin ^
oh nvm
nvm here?
yeah it did that on sysctl stop gitamp
@ZhengquanBai TBH, you should avoid youtube tutorials - they are almost universally shit. Focus on books.
11:03
Does it always do that on shutdown btw?
running it on valgrind at the moment
actually it's the first time I saw that I think, upon stopping the service
@tereško Yes. I don't take youtube videos that seriously. I look at them as resources for which I can sit back and see what the tutors have to say about what I'm learning.
also last night I forgot gitamp running on local valgrind :B I saw DefaultResolver throwing fwrite notices after 7hrs of run like Paul mentioned. But I think Trowski did something about that.
@PeeHaa it should never do that though
Agreed
There is currently too much going on / worth investigating for this early time of day :P
11:08
        foreach ($this->pendingTlsStreams as list(, $socket)) {
            $this->failCryptoNegotiation($socket, key($this->clientsPerIP) /* doesn't matter after stop */);
        }
for some reason key() must be returning false
Sometimes tells me I have seen that before only for non cryto streams
also /me still doesn't know what to make of these two valgrind results gist.github.com/ekinhbayar/f15c3b0edef4c00f445b3e956dd1bc50 (yes, waaay too long files)
@PeeHaa fixed the fatal error in master though ($promise vs $promises)
ty <3
@Ekin I am sorry E. I am pretty useless for this stuff. /cc @bwoebi
@Ekin Are you using the newest php-uv master?
11:13
that was on 7.1.3, local run
Ah yes I am, well, unless anything changed since last night
I am looking for some help in one of the regex patterns i am working on
is this the right place and time to ask?
@YogeshMistry Just ask your question if somebody is here and wants to help they might
@Ekin well, 3.3 2:11 MESZ is the last commit
ok.. have never joined chat rooms before so was just asking before posting anything here
!!dad
11:16
I’d like to give a big shout out to all the sidewalks for keeping me off the streets
i want to build a regex pattern in php to accept a string starting with any alphabet followed by numbers.. total string length must be <=10
this is what i have done till now /(^([a-Z]{1})([0-9]{1,10})$)/
this gives me a pattern error saying '- Character range is out of order' on regex101
any help would be appreciated
@bwoebi yes, I can see the same last commit on my copy
Okay, going to have to check then
@YogeshMistry For starters you can drop the {1}, because that's already implied
Secondly 1 + {1,10} -> so 10 means 11 characters
So change {1,10} to {1,8}
I don't know regex, but it's A-Za-z. Not a-Z.
There's no character range a-Z.
11:20
Does [a-Z] even make sense in case sensitive mode?
And that
also moin
And you are at least going to need the u modifier me thinks
Considering the any alphabet requirement
Althought that requirement will get hairy fast
u has no effect unless you use a \P{} or sth
Just convert all texts in the world to ascii
That would be easier
11:21
II aagreeee
^ that's Dutch
@DaveRandom Wrong way round, could be A-z, but that also includes [, \, ], ^, _ and `.
@kel
@kelunik i had read somewhere that we can use a-Z instead of a-zA-Z in regex
(^([a-Z]{1})([0-9]{1,10})$) this is what a guy from regex101 chat room helped me with
@YogeshMistry Maybe in some implementations, but if it gives you an error, then obviously not in PHP.
I've never come across a flavor that supports a-Z.
11:25
!!> var_dump(preg_match('/[a-Z]/', 'b'));
[ 5.6.0 - 5.6.30, 7.0.0 - 7.1.2 ] Warning: preg_match(): Compilation failed: range out of order in character class at offset 3 in /in/tdLCB on line 1 bool(false)
[ hhvm-3.15.4 - 3.17.1 ] Warning: Compilation failed: range out of order in character class at offset 3 in /in/tdLCB on line 1 bool(false)
@kelunik it is supported in java i guess stackoverflow.com/questions/4923380/…
@YogeshMistry Did you actually read the answer?
@YogeshMistry where does it say it does?
!!> var_dump(preg_match('/[A-z]/', '^'));
well, shit
> int(1)
huh
no exceptions logged
its actually A-z and not a-Z. sorry my mistake
11:29
weird
@YogeshMistry that includes things that are not alpha 3v4l.org/oJRtT
@YogeshMistry You are most likely rather looking for a-z with the i flag
@YogeshMistry And it doesn't do what you think it does, as I already replied earlier.
But as said the any alphabet requirement gets hairy
11:32
> Unhandled exception while executing ChatAction for chat.stackoverflow.com#11: Allowed transfer timeout exceeded: 120000 ms
@JayIsTooCommon complete troll - I have a date conflict and will not be at SC this year :(
but please go, the conference is awesome!
!!version
@PeeHaa looks like SE just randomly failed to respond in time, we need a much shorter timeout and a retry strategy
Imo artax itself should have a much saner default
Assuming it's the artax default
Same for !!get foo
11:35
!!issue post actions need a much shorter timeout and a retry strategy / Current timeout is 120sec, no handling for TimeoutException
@PeeHaa Artax needs a rewrite anyway.
@PeeHaa agreed, 2 mins is pretty ridiculous, generally you either want <10secs or unlimited
/me showers
@kelunik I will open a ticket so that it's not forgotten @DaveRandom
11:37
@DaveRandom 10 seconds is the limit we use at work for it.
11:48
Is there anything I can / have to do right now regarding gitamp @Ekin?
Wes
Wes
Lmao. When your application needs an extra feature after release. Via https://www.reddit.com/user/Mtelling https://t.co/zYhQU3ImKB
(click the pic)
@PeeHaa not that I can think of at the moment, maaaybe try to find a nice way about auto-fqn all the things? :P
ah well, you already opened an issue about that
:-)
11:51
yep
@Wes ahahah...
I will update code coverage and test whether that fixes the function import issue we have been saaing
alright
Wes
Wes
twitter sucks, btw. i enjoy so much visualizing in my mind the twitter's ui team. it is either made by a single guy that has to do all the things, has to take decisions for hundreds of issues daily, has to solve bugs alone. or, team's composed by hundreds of people that always fight each other and fail to do anything in consequence
Do you guys use any frameworks, or do you do the "no-framework" approach?
11:55
lol! I heard the easter egg for the first time! :D @PeeHaa
(on gitamp)
really? \o/
That's awesome!
@PeeHaa Should be pretty easy to write a tool for that.
@kelunik I would love to hear suggestions on that. I / we have no idea how to set up somethign sane
@PeeHaa Will try something later.
cool
Wes
Wes
12:04
what easter egg? what? i wanna see/hear it too
@Wes It's kinda hard to hit
So it's really special if you find it :)
Wes
Wes
is it you singing ricky martin?
Nope. Although I may add that as an eater egg for april fools
:)
Wes
Wes
i just need to listen to gitamp, right?
s/hear/listen to
:P
Filthy foreigner
Wes
Wes
12:06
i corrected myself, for once
:D progress \p/
But the chance of hitting the easter egg is really slim :D
Wes
Wes
also, how do you keep your sanity while listening to gitamp? just run fruity loops already. i know you can use it..
fruity loops? infidel...
Get a proper daw
Now I wonder, if I set USE_ZEND_ALLOC=0 when running on valgrind memory_get_usage() always prints 0, else it gives me the numbers, why? @bwoebi
Wes
Wes
i'm live in the '90. in the '90 fruity loops is the shit
12:09
rebirth was :D
Or reason
@Ekin because it reports the numbers from the zend allocator… if there's no zend allocator, well, you cannot get numbers from it
ah okay, makes sense
I should install reason if it still is a thing for shits and giggles
Wes
Wes
just do something. maybe with a theme picker. rock/classical/ambient/whatever
tnx btw @SebastianBergmann. the token stream fix fixes our coverage issues <3
Wes
Wes
12:11
thanks @SebastianBergmann \o/
@Wes I tried adding electronic sounds but it sounded like shit and I nuked it
I still have the source file though
wow, heard it twice now again :P
wtf
lucky day
why don't I hear it :(
I feel left behind
oooooh
yay
Wes
Wes
12:12
how many samples are there? the xylophone thing i hear must have at least 5-6 notes
hahahahahahah
:D
so awesome \o/
it is indeed :D
@Wes 1 sec
Wes
Wes
12:13
is there something like fruity loops that is free that i can use to try something?
3 swells, 24 clavs, and 24 celestas currently in use
Wes
Wes
no
fast / impulse tracker is free :P
@bwoebi also... if it matters/helps, this was the result of the last hour running on valgrind on server this time, again without zend alloc
Wes
Wes
i get paid for writing software. i can't be a pirate. that would be wrong :B
12:16
I get paid for bugging people with ads. I feel nothing but good feels by running an adblocker
Wes
Wes
still no easter egg
@Wes It should be coming through any moment now I guess
Wes
Wes
@PeeHaa you are a bad person
Yes on multiple levels
@Ekin … question… how did the script finish? via exit() or such or cleanly?
if via exit() or fatal, then that's useless
12:17
uhm I think I just interrupted it myself
well, yeah, then it's useless
what should I be doing?
@PeeHaa Hi buddy
I am your fan
3
lol
ok I just realized two things @Ekin. 1) I am missing some tests in \ekinhbayar\GitAmp\Client::GitAmp and the huge thing I just found out about is we don't test the handler at all :P
12:19
ugh :P
Wes
Wes
still no easter egg
@Ekin try \Amp\stop() in Aerys\lib\Process.php:81 instead
@TetrixCat You came to all my concerts and bought all my merchandise?
@bwoebi will do, thank you
Artists gotta make a living to ya know
@Wes Maybe you missed it :(
> Test Coverage has decreased to 81% (-18%).
:(
12:22
stahp @PeeHaa :P
@Ekin HAMMERTIME!
That should've pinged you
@PeeHaa nope , but fan because of your repo on stack :D
I am trying to find out what is not covered in the client first. But the scrutinizer interface is so bad
@TetrixCat oh :-)(
do you have the inspection link?
Wes
Wes
did it die?
all sounds stopped
yes
killed it
@Wes hmm that's odd you should have had a proper backlog by now
Still playing here
here as well o.O
Wes
Wes
12:37
doesn't work anymore
Not sure if @Ekin killed it
well , it's been running again on valgrind ~9mins by now
Also works for me
Wes
Wes
however....
that could be a consequence of the fact that i've closed it :B:B:B
hahahaha
12:39
:P
Wes
Wes
:B
!!rfcs
There are no RFCs in voting. Sorry, but we can't have nice things.
http:https://i.imgur.com/N4NbUGG.gifv (/me when playing with async code)
12:46
lol that's a whole new level of fail :P @DaveRandom :D
That's probably my imgur replacer :D
BTW @Wes what are your thoughts about max this year?
Wes
Wes
@PeeHaa i'm sorry for you guys but the renault engine seems super shit already. already broke 4 times.
my guess it's going to be mercs vs ferrari, mostly mercs
yea mercs
:(
I still hope they can get their shit together though
Wes
Wes
@brzuchal done. makes sense
@bwoebi would this be useful still if I interrupt it myself?
12:52
@Ekin It should.
As long as exit() is not called
Okay, I see
Wes
Wes
@PeeHaa renault started a new engine. which means it can equally be good or bad, reliable or not
The fact that they cannot even get a proper battery makes me scared :P
Wes
Wes
it is really strange for renault, considered they have unlimited resources
@Wes thx
Wes
Wes
12:56
ferrari is a small company, they have 2-3 different teams just for the engine. each engine is tested for months, then improved to see how powerful it can get with upgrades
renault instead, despite their resources, seem they have just that one design
They are french so there is that
@ekin is there any reason why emit and sendConnectedUsersCount are public?
Wes
Wes
honda is even worse
the problem with them is imho the fact that they are trying to build the engine and the car as a single unit, and uk and japan are very far apart
in the past cars had to adapt to the engine, not the opposite
and well there's your problem :B

« first day (2331 days earlier)      last day (2843 days later) »