« first day (2482 days earlier)      last day (2692 days later) » 

00:11
Hi guys! I am working on my first full PHP project on GitHub. Does anybody know of a good way to get some code reviews on open source software?
I am using the automated Codacy reviewing tool but it is proving a bit rubbish!
00:46
mornin
@Alesana what are you working on brother ?
A tool for publishers to earn via advertisements, why do you ask?
i'm lonely
in what platform ?
i mean language
 
1 hour later…
02:01
OMG @WesStark!!! I believe I just experienced the need for one of your crazy ideas!!!! I must be getting sick
so yeah, right now, I'd use a namespaced constant. I think you said somethign like that a few months ago
:B ?
hide name
someone just commented on my blog
don't know where the traffic is coming from. probably twitter
what crazy idea do you need?
well, I'm making an overhaul of a pitiful pagination class for someone on main (I am bored) and would have shared a constant between classes
i don't use constants. global state sux :B
i am a bit more anxious about writing a blog now. i mean, now that i know that people actually do read the shit i write :B
02:14
@FélixGagnon-Grenier, remember about the php problem yesterday?
hrmmm... in all honesty, no I don't, but if you introduce me back a bit, I will
sorry, eh?
so canadian
also a comment from Ryan F yesterday
and from what he wrote it seems he actually read what i wrote :B
@EarvinNillCastillo did you have any other concerns?
02:39
@FélixGagnon-Grenier, i cant return string array from php to ajax. and from what @PaulCrovella said yesterday, it was the error in charset/encoding.
when i tried to follow his instruction to placed
$mysqli->set_charset('utf8');
*utf8mb4
@EarvinNillCastillo you can edit your messages for a couple minutes after posting them. either via pressing arrow up for the most recent or via the menu available on the message
@PaulCrovella sorry
@EarvinNillCastillo oh, no worries, just letting you know that you can do that
an example of a one liner identity lambda in php
Is it possible to ping multiple ip address in php
02:57
I can ping the ip address but how can i return it if it is online or not?
im pinging the local servers here
03:28
@NikiC I solved most of the JSON bikeshed by pushing commits which make the suggested changes… and thus make the comment threads vanish! Code review in action :p
04:28
holodeck javascript api
good morning
room
Good morning
Linus
@tereško don't hurt yourself love you all <3
o/
04:44
Hello
How to avoid Undefined index: username
I tried the method in the posts but not working
$username=NULL;

if(isset($_GET['searchperson']) || ($_GET['username']!=NULL))
{//search person
$username=$_GET['username'];
So you have an or in there
Which means that if the index searchperson is set, OR if the index username is not null, it will execute the function
If you want to assure that something is both set, and is not empty, the quickest way in PHP would be to check if the first character of the variable is set.
if(isset($_GET['searchperson'][0]) && isset($_GET['username'][0])) { ... }
Oh I see
But maybe you wanted to do the OR? I am not sure
I want that if anyone of the conditions is set then do the following
Well, in that case, if $_GET['searchperson'] is set, but $_GET['username'] is not set, how do you expect to set $username to equal $_GET['username'] if it is not set?
04:54
Yes you are right
But what can we do in this situation?
I think look for array key exist...
I don't know what you want to do
We can do one thing first check if $_GET['username']!=NULL
then check isset($_GET['searchperson'])
No thats wrong
Very
$username=NULL;
if(isset($_GET['searchperson']) || ($_GET['username']!=NULL))
{//search person
if($_GET['username']!=NULL)
{
$username=$_GET['username'];
}
This seems to be right
05:02
I don't understand why you are checking $_GET['username']!=NULL more than once
It doesn't make sense to me
Morning !
It is because if anyone of the conditions is correct then it will execute the below code.
But what if $_GET['username']!=NULL is not true? It will still execute the below code.
$_GET['username'] will not contain any value in the below code and it will give undefined index error
hello aLL..
@PrakashPatil why can't you add issset for both as @Alesana suggested?
05:14
Yeah I did that.
if(isset($_GET['searchperson']) || isset($_GET['username']))
{//search person
if(isset($_GET['username']))
{
$username=$_GET['username'];
}
This resolved the error.
> This resolved the error.
That doesn't mean it's right :P
But I am still not sure if it actually solved the problem because it is not echoing the $username[0];
OR

if(isset($_GET['searchperson']))
{
//Do the stuff here
}elseif(isset($_GET['username'])){
//Do the stuff here
}
In this situation, I will have to repeat the same code twice.
There is a very long stuff there.
I don't think so! it will reduce the conditions!
05:18
Yes it will work for sure!
@PrakashPatil Okay ! Up to you ! That's what my suggestion!
Thanks Akshay
@Akshay I think that he wants to search a person if the searchperson is set or the username is set, and the second conditional is not related to the first one
Surely somewhere lower down he has a third conditional checking if $username is null :P
Yes thats true
Ahh okay! From the given code I though there was no need to do conditions twice for username! :p
@Alesana I apologize from the deepest blood cell of my heart!!! :D
05:23
hahaha
@Akshay Haha don't apologize, I am still pretty sure there is something wrong with it
The project is showing the results without any error. I don't know what I did was correct because it din't echo username. But the results are correct. No discrepancy.
@PrakashPatil It won't give an error, but the username is NULL
So it won't echo it
I see
Yes you're right again.
If you want more information about a variable that will not echo
do var_dump($var);
05:39
Thats a nice idea
06:32
o/
\o
!!dad
I used to hate facial hair, but then it grew on me
06:52
mornin all
Hi. Can anyone kindly have a look at this question. It is php and jpgraph. I posted a while ago and did not get a single answer. stackoverflow.com/questions/45305131/…
Hi all, please have a look on this question: stackoverflow.com/questions/45453338/…
:)
07:07
\o
Morning 11!
\o
o/
07:22
Hi all! Please help. I'm new to php classes.
class MailSystem(){

	public function __construct($settings){
		$mailbox = PhpImap\Mailbox(from $settings);
	}
	// ...
}
but returns the following error:
Fatal error: Class 'PhpImap\Mailbox' not found
is the class defined with such a namespace?
if I do the same line in the construct method, but outside the class, it works
I edited it
what is $mailbox = PhpImap\Mailbox(from $settings); supposed to do?
is Mailbox a function or a class?
07:25
it's supposed to instantiate PhpImap\Mailbox class
Mailbox is a class
then you are missing new
what I mean is that If I do the same $mailbox = PhpImap\Mailbox(from $settings); but outside a class, it works
no, it doesn't
morning
@Earlee you need to also read up about how namespaces work in PHP
that too
namespaces issue. guys, I forgot to place the new keyword as I retyped it here
@tereško, @Sjon, thanks i'll read that
07:41
Good morning guys and girls
helping yourself to the assumption that it's a good morning there ...
it is not, I haven't slept more than 2 hours at a time ...
the atmosphere, the weather, and my dogs conspired against me to keep me awake ...
than bad morning @JoeWatkins
that feels mean ...
it's morning, let's just agree on that ...
okay let me try one more time
morning guys and girls how are you?(all except @JoeWatkins since he told already how he feels)
lol, acceptable ...
07:47
okay! you should consider buying some fishes
they wont be able to wake you up
for the two first things i dont have a solution really
I tried that ... I'm very bad at keeping fish, they die very easily, and actually when the fish are in your office, it's pretty upsetting to have something die in your office every week ... so I gave up fish ...
probably the dogs were kept awake by the same things I was, can't really blame them ...
Well in order to keep fish you need to have a good filtration, and some plants in there to regulate the no2,no3 levels and the other crap.And having some filter media will keep them alive :D It doesn't cost that much but it will keep the fish alive.I' a big fish fanatic i keep Discus in my office.Wait il send a pic
I'd take howling instead of a cat jumping on my face and ...scratches
Bad morning is bad
omg, I spent so much money on all kinds of crap that I read they needed in books, so freaking much ... started out with just a basic tank, I had kept goldfish before, but they started dying and I started spending more and more on it, and time, I would literally just stare at the tank all the time ...
@Ekin me too, let's wallow in self pity together ... I'm excellent at wallowing ...
Get a mechanical fish
07:53
@Fabor excellent idea
If you kill mecha-fish, maybe try a mechanical cactus.
good morning all
lol
@Daruchini we've just done this ... it is only morning ...
@JoeWatkins it's simple tho when you just pick up some basics.When people buy fish they put it in the tank emedialty.But you have to cycle the tank, that the heality bacteria build up than the fishes will be healty and they wont die.Like if you put fishes in a not cycles tank they will die within 2-3 monts....
@Fabor why not living fish :D?
07:55
The living part is non-maintainable :P
@JoeWatkins fair enough
@Fabor it is just pay 200$ extra and you don't have to worry :D(for fishes at least)
I know about all of that, I know about treating the water, and filters, not to clean the tank too often, not to remove too much water, what kinds of fish you can keep together ... it didn't seem to matter, I'm just bad at it ...
@Ekin aaaa follow me on twitter please!!!
07:57
the fish whisperer
@JoeWatkins heh, I'm in. Could do that
@Daruchini nahhhh its just a hobby from childhood
Buy a flat LCD screen and a rapsberry pi, find a fish graphic and get it to randomize behaviour, stick on wall. voila
I'm glad other people can keep fish, they are very beautiful ... I just accept it's not for me, like skydiving, or running ...
You think one day we will have such cheap good quality screens we will replace windows with them?
07:59
@Arslan.H that fish at the centre looks sad
Pet it
@Fabor that's depressing as fuck
I dunno, I wouldn't mean all windows, but a nice changing landscape would be fun for me.
well I suppose it depends what you can see out your window
if you live in a highrise block and can only see another high rise block, not depressing at all
Or some rooms don't have windows, so just add one. It could run on Windows!!! Me gusta, BILL GATES was ahead of us all!
@Fabor covering the ceiling would be nice - bright blue sky, soft fluffy clouds
08:00
or nightsky
@PaulCrovella that sounds cool to be honest
which we never get to see, ever ...
@PaulCrovella That was always one of my "mega rich fantasies". A secret cubby room where the floor is a trampoline covered in pillows and the ceiling is a giant screen. Speakers in built around the room. Hnnng, the possibilities.
sounds like you just want mdma
I'd subscribe to screens over windows.
08:02
@Fabor and some bi*** would be nice and the situation would be perfect
The poor mans version of that is a VR, bed and earphones.
What kind of music are you into guys and girls and @JoeWatkins?
Anonymous
mornin
hola Jay
chat is getting weirder lately
08:16
@WesStark you're weird ...
Anonymous
!!wotd
dorp: a village; hamlet.
Anonymous
Stop being such a dorp @PeeHaa
4
@JoeWatkins maybe i'm not getting it
If i write something wired shit @MadaraUchiha will ban me so il just keep reading :D
08:19
!!urban dorp
[ dorp ] A dorp is a South African expression similar to 'One horse town' - meaning a small town. "yawn and you could miss it"
Anonymous
@littlepootis lol
Anonymous
who cancelled the stars on my wes selfie??
Anonymous
@WesStark...
Morning! So I have a question... I have a PDO connection class method that will interact with my database and it will only ever be called in a forgotten password class method...
Would it be wiser to put the method into the forgotten password class or keep it in the PDO connection class?
Anonymous
08:21
Why is it only called via forgotten password?
Because the functionality of that method is completely unique and more than likely will not be used for anything else.
Anonymous
why is the connection different if they go via forgotten password?
We always do wotd then use it more for what it sounds like than what it means :P
German humour at it's finest ^ (that's a German pub)
@JayIsTooCommon The connection isn't different apologies, The method is an SQL query verifying a user's token... which I can only see would only ever be called in the Forgotten Password class.
Anonymous
08:26
@MinistryofChaps Very contextual and hard to answer without seeing code but no, it doesn't sound like that belongs in your class which handles PDO connection.
@JayIsTooCommon yeah I understand it's hard to describe properly, thanks though.
If I can say it another way, I would say that I feel that any PDO connections should stay in the PDO connection class as a library of PDO connections even if a method will 99% be used once by another class.
PDO connection was said way too much there lol.
moin
'nin
08:47
Hi everyone. I have a mysql, php, jpgraph question. I posted a while ago and asked here in this chat also but nobody replied and also got 2 down votes. The question is clear and to my knowledge no such question exists on SO or anywhere else. If someone can have a look and give a solution, I would be thankful. Kindly don't down vote it. stackoverflow.com/questions/45305131/…
Anonymous
@user1406155 it's downvoted because you haven't asked a question.
^ that
@JayIsTooCommon It is on the link. I did not want to write the question here as it is quite an extensive question. Or you mean it is not clearly explained on the page itself
@user1406155 do you not understand what a "question" is?
"I have a problem, give me solution" is not a question
@MinistryofChaps "PDO connection class" ?! So you have made a PDO wrapper. That's where it all went wrong.
@tereško what is your opinion of it?
08:54
@MinistryofChaps the trailer was lame: imdb.com/title/tt1396484
@tereško I meant the PDO wrapper.
@Andrea The ruby on your website looks misaligned
:-P
@MinistryofChaps they are pointless
PDO is not something you extend. It is a dependency that you inject
@tereško The question is how to use db data instead of static data as in the example on jpgraph page. The sample of jpgraph uses array1, array2, array3 etc to stacked the graph. I need something like array[$i] and then stack the values
09:00
... odd .. your SO post does not contain "how"
instead all I see is basically "I have code X and it doesn't work"
on the plus side only 4 more days until game of thrones
@tereško instead new accbarplot->array($plot1, $plot2, $plot3) something like new accbarplot->$plot[$i]
@tereško I have also updated the link to read more like a question. But I still think that is not the basis to down vote. I have made sure that word HOW is there.
Anonymous
yo christy
09:23
posted on August 02, 2017

New Cyanide and Happiness Comic

control over object interactions – #75022
09:54
Hi everyone ! I was wondering if anyone has done ajax combination loading here on Prestashop ? I'd like to load only the default combination when landing on the product page and then load the other customizations as the user changes the attributes values
10:09
If anyone is in german rap this song rocks youtube.com/…
10:28
> german rap
there is no such thing :B
moin v0.42
Anonymous
sup tit
shut your adorable face ...
Anonymous
aw <3
Anonymous
!!wotd
10:32
dorp: a village; hamlet.
@JayIsTooCommon stop being such a dorp
Anonymous
that's really offensive.
your face is offensive.
we are friends, we are just joking.
Anonymous
10:37
@Arslan.H flag it please.
what an ass
@JayIsTooCommon nah you were rude once to me
Anonymous
May 22 at 15:33, by Arslan.H
@JayIsTooCommon go fuck of
he's rude with anyone
10:38
@JayIsTooCommon okay flagged
@WesStark sorry man do you want me to flag something for you
can we be growed ups, please ...
stahp
@Ekin HAMMERTIME!
@Ekin it has been in my wishlist for ages, but I will wait till it gets as -50%
Anonymous
10:39
I didn't think he'd actually flag...
2 mins ago, by Wes Stark
we are friends, we are just joking.
@JayIsTooCommon i did it no joke
Anonymous
@JayIsTooCommon happy now?
10:40
2 hours ago, by Wes Stark
chat is getting weirder lately
I was referring to the stupid flagging, everyone sees it, it's climbing to the roof and shouting "we are dick heads, come look" ...
@WesStark will you forgive me
Anonymous
@JoeWatkins my fault
10:42
@JayIsTooCommon I agree, it was your fault ...
@Ekin the prettiest female programer i'v seen so far!
@JoeWatkins i agree what ever you say
@Arslan.H ummm... dafuq
Anonymous
and here comes @PeeHaa to stomp him out.
the title of prettiest programmer goes to @rdlowrey anyway ...
4
@Ekin seni seviyorum !!!
10:43
if you won't cut it out I will kick you
fine, better
@MadaraUchiha I don't think he learned much of 6 days
has he done that before ?
Yes
And was suspended for a week
@MadaraUchiha noooo
10:44
well ... that's much creepier ...
@Ekin i just gave you a compliment okay okay
on a more important note @MadaraUchiha got 2 flags in 2 days. are there prizes if i get more? :B
@Arslan.H This is the last, and I do mean the very last warning you'll get. This is a professional chat, flirting/swearing/being a jerk will not be tolerated
@WesStark can i kick @MadaraUchiha for a week out that he sees how it feels ?!(just kidding dont do it again please)
sorry i slipped on the button
10:46
:-P
@MadaraUchiha unless it's me swearing, or flirting with @rdlowrey, @JayIsTooCommon, or @PeeHaa ...
Nobody minds
He won't learn
@JoeWatkins Unless it's in good taste
everything I do is in good taste, pretty sure of it ...
10:46
@JoeWatkins Yeah don't want to to miss that
@JoeWatkins Not so sure about that though
Anonymous
So I'm not allowed to call you pretty anymore @MadaraUchiha :( ?
I do think that we could do with an article to point people explaining what is wrong with that kind of thing in detail, in a non-condescending way
@DaveRandom if people need that they can just stay away
I get the impression that a lot of it is simply cultural differences rather than willful ignorance
Morning all
10:48
@PeeHaa It's hard to unlearn things that you have lived with your whole life
@DaveRandom it also might be generation gap. Since most of people here have grown up on IRC
what are you talking about cultural differences ... there are adverts on the television reminding people not to rape other people ... without implying there's any kind of comparison to be made between those things ... there are just a certain sort of person that doesn't know how to behave themselves, and needs reminding ...
@DaveRandom I lived among killing sociopaths. No excuse in court for me
@JoeWatkins those ads are creepy as hell
on multiple levels
I don't know what words you would use for any kind of warning ...
10:50
Is this a prepared statement?

$new_entry_content = "'".$mysqli->escape_string(trim($_POST['entry']))."'";
$new_entry_title = "'".$mysqli->escape_string(trim($_POST['title']))."'";
$new_entry_language = "'".$mysqli->escape_string(trim($_POST['language']))."'";
$entry_id = $entry->get_id();

$new_entry = $mysqli->query("UPDATE snippets_entries SET entry_content = $new_entry_content, entry_name = $new_entry_title, entry_language = $new_entry_language WHERE entry_id = $entry_id");
@tereško they definitely are, I can hardly believe it's happening, every time ...
@Adam no
!!sqli
2785
Q: How can I prevent SQL injection in PHP?

Andrew G. JohnsonIf user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the us...

All I'm saying is that jumping immediately to "don't be an asshole" without at least offering an explanation of why what they did is regarded as being an asshole doesn't solve anything.
10:51
Read that @Adam ^^^
Thank you!
@DaveRandom He has been a dick for weeks now
It's hardly immediately
Thank you all. :)
haters gona hate
ono of you will be able to wheelie like me
@MadaraUchiha never !!!!
10:52
did everyone else see @Jimbo appear at the same time as the wheelie challenge ?
Yeap :P
I didn't know there was a wheelie challenge?
I'd scream if I dropped the Panigale, it has anti-wheelie electronics on (I'd have to disable them)
Good. You'll only fall of your bike again. Don't even think about it
:P
@JoeWatkins well .. we have ads reminding people to prevent drunk friends from driving
10:53
@tereško yeah we have those seasonally, but they don't make me sad for humanity in the same kind of way ...
Anonymous
@DaveRandom agreed. In this context it is an ass-hole cause though
user5876173
i am getting this error in moodle "SESSION TIMED OUT..PLEASE LOGIN AGAIN" i connected the moodle to my php application..can anyone explain me..why this error happens..i tried a lot..but i couldn't find the solution..
you know that you can ride a bike without being a dumbass, right?
no @Wes, no you can't ... tell him @Jimbo ...
@JoeWatkins dunno. Your ads seem more like hysteria.
10:54
@Arslan.H Fine by me
Take a month off this time
I sincerely hope you improve if/when you return.
@WesStark Is not possible, the reason you get a bike in the first place is because you want to be able to go full retard without anyone seeing
gods below, I need some coffee
ugh, same
10:56
Good mornings
Reminds me, coffee makes my boss sleep.
@JayIsTooCommon That's... just Dutch
Oh it even says so :D
I just ate half a chicken.
what did you do with the other half ?
Anonymous
@Jimbo was it dead?
10:57
:P
:D
@Jimbo how is that a good thing :B
ALTER TABLE [dbo].[Contact]  WITH CHECK ADD  CONSTRAINT [FK_Contact_Contact] FOREIGN KEY([ContactID])
REFERENCES [dbo].[Contact] ([ContactID])
Somebody please sanity check - that FK is referencing itself, right?
10:58
i like speed, i like driving. wheelie is just showing off
sometimes it's just what happens when you go fast, no showing off involved, physics raises the front wheel ...
@DaveRandom Sure looks like it
Although I thought it was [dbo].[Contact].[ContactID]

« first day (2482 days earlier)      last day (2692 days later) »