« first day (2245 days earlier)      last day (2707 days later) » 

3:00 PM
If I wanted to add a command to Jeeves, where should I start?
other than forking the repo
 
@JayIsTooCommon thanks :)
 
Yeah, I was going to say that
 
user895378
@PeeHaa @DaveRandom is there a future scope for Jeeves beyond SO? Are you guys trying to make a generalized chat bot or a personal assistant or something?
 
Anonymous
3:02 PM
Oct 22 at 19:32, by JayIsTooCommon
@DaveRandom @PeeHaa Make Jeeves a voice controlled, client based AI bot please.
 
yes please++
 
He's pretty robust
I love you @Jeeves
 
@Tiffany I love you too :-)
 
@rdlowrey I know @kelunik at some point hinted at wanting to make him more generalized
 
Anonymous
@Jeeves you alright baby?
 
3:03 PM
@JayIsTooCommon I'm ok, how are you?
 
and his random responses of, "Hello <something said after "I am">, can I just call you <first word after "I am">?" is pretty funny.
!!should I read more about improving my programming ability or annotate the 50 page ADA compliance report I need to go through for a meeting today?
 
You should annotate the 50 page ADA compliance report you need to go through for a meeting today.
 
lol
 
!!should I eat pizza, a bagel, or fruit?
 
You should eat pizza, a bagel,.
 
3:05 PM
you broke him
 
Pizza and a bagel, now you're speaking my language!
 
poor @Jeeves
 
@Tiffany Yeah you?
 
Pizzabagel
 
!!should I poke your codes tonight or go out and get some beers
 
3:06 PM
You should go out and get some beers.
 
our boss is taking us out to lunch today for a Christmas luncheon
 
Anonymous
oof rejected
 
user895378
@PeeHaa is Jeeves all amp based?
 
@Jeeves <3
 
@Ekin I love you too :-)
 
3:07 PM
awww.... bot love ftw!
 
@rabbitguy is that the crappy steakhouse dinner?
 
user895378
At least on the backend ... ?
 
mostly amp, artax etc I think
 
@Tiffany nope... Mellow Mushroom!
 
user895378
I really need to finish the artax rewrite
 
3:07 PM
All amp based @rdlowrey
 
if yall don't have those there, it's a great pizza joint...
 
user895378
That makes me feel good. At least my old code has been useful in my absence.
 
We have a carry-in (i.e. potluck, I guess "carry-in" is a colloquialism around this area) tomorrow. Multiple departments participating, and fried chicken is provided.
 
probably the best thin crust I've had in a "chain" restaurant... they definitely have one of my fav pizzas... It's called "Holy Shiitake"
 
@rabbitguy Have you tried Imo's Pizza?
 
3:09 PM
we don't have that here
 
I'm not a thin crust person, but I do enjoy Imo's Pizza.
Their crust is cracker-like
"St. Louis style pizza"
 
yeah, that's the kinda thin crust I like... I want it almost crunchy... I should be able to hold the pizza and it not bend much
 
sounds like St. Louis style pizza
 
@PeeHaa You still have to set up chrooting on the os, right? fpm doesn't do any wizardry to chroot for you
 
@Jeeves are you all okay now? After becoming a clever-bot
 
3:11 PM
@Ekin Yes, I'm OK. Are you OK?
 
@jeeves do you have a magic 8ball?
 
@rabbitguy I'm Ok.
 
i see
 
@Jeeves Yes I am, thank you sir elephpant
 
@Ekin You're welcome!
 
3:12 PM
@Jeeves You're smart now?
 
@littlepootis Yes, why do you ask?
 
I wonder how this will do now
in Nothing to see here, 16 hours ago, by K__
@Jeeves earlier Ekin wanted me to remind you I am just a clone of the same elephpant you are.
 
@Ekin Yes.
 
lol
 
Hello everyone, I just made a script but I have a problem. I want to show the result ( echo number_format($row['AVG(price)'], 2);) on an HTML page with background. If I use this the only thing that I see is the result of the php script, but I don't see the background. Can anyone help me?
<?php

if (isset($_GET["age"])) {
$age = ($_GET["age"]);

include($_SERVER["DOCUMENT_ROOT"] . "/3/includes/config.php");

$con=mysqli_connect($dbhost,$dbuser,$dbpass,$dbname);

if (mysqli_connect_errno($con)) {
 
Anonymous
3:13 PM
@PeeHaa can you pull? I want someone to talk to
 
@Jeeves just wanted to know
 
@littlepootis Yes! I'm fine!!!
@littlepootis Yes, and you?
 
:D lol
 
Anonymous
damn, we were getting away with it as well
 
@Julian Can you post the HTML/CSS to JSfiddle? And indicate with HTML comments where the PHP output should go.
 
3:15 PM
@Tiffany Yes, wait a minute.
 
@Julian Also, you'll want to sanitize your $_GET["age"], since you're open to SQL injection
!!bobby tables
awwww
 
!!xkcd little bobby tables
 
@Sean Thanks :D
 
lol
prepared statements ftw!
 
@Tiffany Is this what you asked? jsfiddle.net/ajr0cau7 Never worked with jsfiddle :-$
 
JSfiddle won't handle PHP code
 
@JayIsTooCommon Need to restart him. Will do once I have told the client on the other end of the phone to get lost :)
 
I can make a screenshot of what I got on my localhost @Tiffany (the output)
 
@Julian alright
 
3:20 PM
!!tell PeeHaa's client to get lost
 
@Ekin :O
 
@Sean fpm does chrooting
 
@Tiffany The screenshot: prntscr.com/dgx9on
 
@PeeHaa Whoa.
That's good.
 
Anonymous
@PeeHaa Not if it's Mojo, keep them on side please
 
3:21 PM
@rdlowrey Very
@JayIsTooCommon :)
 
@Tiffany Thanks for the information about SQL injection, I heard from it earlier today. Did some research about how it works, but don't know how to implement it in my own code.
 
You'll just need to address it.
 
@Julian The site I linked should help.
 
Anonymous
!!canon sqli
 
Cannot find the canon for you... :-( Use !!canon list to list all supported canonicals.
 
3:22 PM
The article tiffany linked to tells you how.
 
2786
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...

 
@Tiffany Will take a look after this problem has been solved ;-).
 
@Julian Can you paste what's in include($_SERVER["DOCUMENT_ROOT"] . "/3/includes/config.php"); ? Remove or obfuscate any confidential information like dbuser, dbpass, etc.
 
Are there any fpm pool name restrictions? E.g could I call a pool name my.domain.com?
 
I'm le tired
 
3:23 PM
<?php

// Database
$dbhost = '';
$dbuser = '';
$dbpass = '';
$dbname = '';

?>
 
@rabbitguy then have a nap
@rabbitguy AND FIRE ZE MISSILES
 
Anonymous
gross
 
lol
glad someone get's that reference
 
that's oooooold
 
yeah, but I said that the other day somewhere and someone responded, "le tired? are you french or something?"
 
3:25 PM
@Tiffany I am sorry if I am asking stupid questions, lol. I am just a self-learning PHP/HTML/CSS noob
 
@rdlowrey Yeah. Also don't forget to thank @bwoebi for being such a great ambassador
 
@Julian that's the best way to learn... there are no stupid questions
 
my yubikeys came
 
@JoeWatkins eeeeeew
1 min ago, by JayIsTooCommon
gross
 
@Julian gimme a second to play around with it
 
3:26 PM
@Tiffany Allright
 
@rdlowrey Yeah, really my fault that they use amp… And they've also found some few more edge case bugs I've managed to fix in amp and uv
 
@rabbitguy Are there any stupid questions?
 
@rdlowrey After all, @Jeeves is an amazing piece of code :-)
 
@bwoebi Yes, I'm OK. Are you OK?
 
:D
 
3:27 PM
That answer…?! … What did trigger it? :-D
 
ahaha
 
@littlepootis I believe I said there are no stupid questions, lol
 
@bwoebi he's now a cleverbot
 
@rabbitguy But, are there any stupid questions?
 
3:28 PM
I hate when I try to save something in npp, it doesn't let me edit the file path like other programs do. The file path is a dropdown menu, which is useless for me since I connect to a lot of servers through their network path
 
@PeeHaa lol, @Jeeves answering messages not addressed to him… fix that :-D
 
@bwoebi How old are you?
 
@Tiffany It's time you flock to vim
 
lol this is fun
 
eih yeah :-D
 
3:29 PM
hahahahaha
 
@rabbitguy I have one question by the way, how to change the . (dot) to a , (comma)? If I replace echo number_format($row['AVG(price)'] by echo number_format($row['AVG(price)'], 2, ','); it gives an error.
 
@PeeHaa have you implemented cleverbot or dumbbot? <.<
 
@Julian I'm not the one to ask. I am no PHP pro by a long shot
 
@Julian Have you tried looking in your browser's dev tools yet?
 
Oh okay lol @rabbitguy
@Tiffany Why should I look there? :-$
 
3:30 PM
@Julian I use PHP sparingly here in the office. I mainly code in Java
 
!!xkcd Java
 
@Julian because the echoed output is getting added to the <body> but not into <div class="homepage"></div> in my test.
 
Huh what do you mean? Can you make a screenshot? @Tiffany
 
@Julian Your CSS has * { background: transparent; }, and .main-content { background: #FF4632; }. If what is getting echoed is not getting appended to <div class="main-content"></div>, then the browser sees it as an empty tag, and won't display it.
@Julian You need to append your output as a child to <div class="main-content"></div>.
This is the example code I used:
<?php

echo number_format("7.500000", 2);

?>

<html>
<head>
<title>Building!</title>
<style>
* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

.homepage {
  position: fixed;
  background: #FF4632;
  height: 100%;
  width: 100%;
}
</head>
<body>
<div class="homepage">
</div>
</body>
</html>
 
3:35 PM
@Tiffany give me a second please
 
A typical thing I have seen first time
I have a variable $type , when I am echoing it , its showing value "Recibido",
But when I am chekcing condition like if($type == "Recibido"), its false, the condition is not entering into the if block. why ?
 
@Julian screenshot: imgur.com/a/Ts6Rn
 
@ParnasreeChowdhury Don't use echo for debugging
!!docs var_dump
 
[ var_dump() ] Dumps information about a variable
 
@PeeHaa I remember @DaveRandom saying he doesn't use var_dump() anymore, what's wrong with var_dump?
 
3:37 PM
Ah this is what you mean. But now is the question; how to echo it in the main content div? @Tiffany
 
@Tiffany Nothing, @DaveRandom is just a hipster
Or he uses an actual debugger
Which would be the proper way
 
Anonymous
nah var_dump() is the best way
 
var_dump($type ) showing string(10) " Recibido"
 
How many characters does Recibido have?
 
@Julian <div class="main-content"><?= number_format($row['AVG(price)'], 2); ?></div> but this is probably not the best way of doing it. Javascript may be a more efficient way for you to do it, if you don't have to worry about accessibility.
I'm sure one of the PHP veterans will criticize my example :P
 
3:40 PM
Yeah there's a space before Recibido. var_dump has solved it .. :)
 
@Tiffany Tried that before, but right now I have placed the PHP script in the div. That works too.
 
@ParnasreeChowdhury \o/
 
@Julian There's a more elegant way of doing it, certainly, I"m just not prepared for programming this morning.
So I can't think of anything.
You could put it in a variable
like
 
Oh alas!, But still the condition is getting false .. No clue
 
while($row = mysqli_fetch_array($result)) {
  $price = number_format($row['AVG(price)'], 2);
}
<div class="main-content">
  <p><?= $price ?></p>
</div>
 
3:43 PM
Fixed bug #73423 (Reproducible crash with GDB backtrace).
^ Those are great entries in the PHP release notes.
 
var_dump($type ) showing string(10) " Recibido"
But , if($ype == " Recibido") condition is false, what may be the possible reason ?
 
wtf... I am using wamp on this server for internal websites, and I know it get redirected to a network folder for one of the sites, but I can't find where I did that in the setup!
 
@Tiffany I will try that :p
 
@kelunik Those are in particular great bug titles by the submitter…
 
but that's the best I can do for now, @Julian. I have to annotate a huge fucking ADA compliance report, so coming up with something more elegant than that won't be happening this morning.
 
3:44 PM
@bwoebi Sure, but those shouldn't make it into the notes then. The title should be changed by the assignee.
 
@kelunik I agree on that ^^
 
funny thing is, the report is 50 pages, but we were told that our website "is excellent at following ADA requirements."
 
Thanks a lot @Tiffany :-)
 
@Julian np
@Julian now go read on SQL injection
 
@Tiffany I will do that after I figured out how to change the . (dot) to a , (comma). If I replace echo number_format($row['AVG(price)'] by echo number_format($row['AVG(price)'], 2, ','); it gives an error. So that first..
 
3:45 PM
 
@bwoebi Also: We really need to improve here. We say it's a security release, then link to a bunch of changes. You have to read through all of them to find the security issues. There's no summary.
 
@Julian try using double quotes instead of single quotes
in your parameter call
"," instead of ','
 
Warning: Wrong parameter count for number_format()
@Tiffany
 
you're doing number_format($row['AVG(price)'], 2, ","); right?
hm
 
number_format($row['AVG(price)'], 2, ","); this is what I have
 
3:51 PM
apparently it doesn't matter, now that I'm reading the php docs
try like this: number_format($number, 2, ',', '');
 
It works :-) thanks
Now, lets read about mysql injections
 
we are to expose our wallet through apis like amazon or paytm....what should be best architecture and practices ...
 
it helped me figure out PDO
 
@Tiffany Is mysql injection only by inserting data, or also by getting data from the db.
 
it can happen with both
you should use prepared statements anytime you're interacting with the database on a website, no matter what.
 
3:58 PM
Allright, but how to implement it in my script? @Tiffany
I have this: <?php

if (isset($_GET["age"])) {
$age = ($_GET["age"]);

include($_SERVER["DOCUMENT_ROOT"] . "/3/includes/config.php");

$con=mysqli_connect($dbhost,$dbuser,$dbpass,$dbname);

if (mysqli_connect_errno($con)) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con,"SELECT AVG(price) FROM data WHERE age= '$age'") or die("Error: " . mysqli_error($con));

while($row = mysqli_fetch_array($result)) {
echo number_format($row['AVG(price)'], 2, ',', '');
But I don't know where to do the db prepare part etc.
 
read the article I linked
you start out with your connection, where you set $con
 
Morning.
 
\o
 
hey levi o/
 
This browser doesn't support security keys
/me throws firefox in the bin
 
4:03 PM
o/
 
@Tiffany That is about PDO. I now have this and it works, but is it protected for Mysql Injections? <?php

if (isset($_GET["age"])) {
$age = ($_GET["age"]);

include($_SERVER["DOCUMENT_ROOT"] . "/3/includes/config.php");

$dbConnection=mysqli_connect($dbhost,$dbuser,$dbpass,$dbname);

if (mysqli_connect_errno($dbConnection)) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$stmt = $dbConnection->prepare("SELECT AVG(price) FROM data WHERE age= ?");
$stmt->bind_param('s', $age);
 
@Julian you're still using mysqli, not PDO, but looks like you should be protected against injection
!!docs pdo
 
[ PDO ] Represents a connection between PHP and a database server.
 
@Tiffany I know that this is mysqli. One question; where is that 's' for at the bind_param
 
string
 
4:08 PM
Ah thanks.
 
when in doubt: google is your friend :P
 
mm, never used b before, should give it a go once ^^
 
like @rabbitguy, I'm pretty crappy with PHP, I've just been around programming and programmers for a long time
 
I will say that I love PHP for the fact that you can do OOP in it
 
Well, that's file 1 protected. Only 1 to go.
 
4:10 PM
back to annotating this report
wheeee
 
Anonymous
@rabbitguy you can do OOP in most languages
 
yes, but it's optional in PHP
 
Anonymous
2 mins ago, by rabbit guy
I will say that I love PHP for the fact that you can do OOP in it
 
yes?
and?
 
Anonymous
your response doesn't match up with what you said
 
Anonymous
4:14 PM
moving on
 
2?
 
I said that you can do OOP in it, but it's optional. You don't have to do it
 
Mailservers are assholes
 
nah, it's the spamfilters that are the worst
 
Those are the worst
 
Anonymous
4:15 PM
@PeeHaa Yo, do you know what I need to do to fix GH ? Chris is pretty busy so struggling to find a good time to go through it with him
 
Especially that smartscreen MS thing
@JayIsTooCommon Nope but if you tell me what the problem is I maybe can tell you
 
Which specification char do I need to use for a number with 2 decimals. With this, you can only send numbers without decimals (for price/$money): $stmt = $conn->prepare("INSERT INTO data (age, price, Datesent) VALUES (?, ?, CURRENT_TIMESTAMP())");
$stmt->bind_param('ss', $age, $money);
 
Anonymous
@PeeHaa it doesn't post in multiple rooms and doesn't care whether it's disabled or not, it'll still post :P
 
hehe nice feature
 
Anonymous
:P
 
4:17 PM
@Julian Use INT and cents. Also add the currency.
 
Is this related @JayIsTooCommon cc @kelunik github.com/Room-11/Jeeves/pull/107
 
@kelunik The currency is already before the input thing. It is not for in the mysql database settings. I am talking about the specification char at bind_param. With 's' you can only insert numbers without decimals.
 
var_dump($type ) showing string(10) " Recibido"
But , if($ype == " Recibido") condition is false, what may be the possible reason ?
 
Anonymous
@PeeHaa yes, i need to go and learn about generators before I carry on actually
 
@Julian Dunno, I'm not used to bind_param, but if you deal with money, don't use decimals.
 
4:21 PM
allright.
 
@PeeHaa What's with that?
 
there's also i = integer and d = double but I have no context, carry on
 
Anyone know how to deal with Youtube Api if a channel exists but no videos are uploaded?
 
Anonymous
what does 'deal with' mean?
 
What is your goal?
 
4:27 PM
@kelunik @JayIsTooCommon wants to fix outstanding issues with !!github
 
Anonymous
I forgot about that PR tbh, i think it does what we want and is waiting for me to change shit on it
 
/me is out for beers, cheers 11 o/
 
Anonymous
dheise o/
 
My head will burst for sure
 
@PeeHaa Does Jeeves have an imgur API access token?
 
4:34 PM
My goal is to be able to display user feedback when a youtube channel is created but no videos are public
 
Anonymous
@Tiffany just Twitter, bitly and ms-translate AFAIK
 
Obviously there is more to it but I would like to be able to add user feedback
 
@JayIsTooCommon would it be possible to get an imgur access token? I want to write a command that pulls a random picture from imgur.com/r/cats/top when !!cat is used
 
Anonymous
@DaveRandom @PeeHaa ^ :)
 
room 118's chatbot has cat commands, and I'm jealous.
 
4:39 PM
Hi everyone! This is my first chat message ;)
 
hello
 
@Tiffany tes we are using several services with access tokens alreadt
@JayIsTooCommon it's a good staring point. I see there are comments on it already
 
@PeeHaa so there is an imgur access token?
 
@Tiffany no but it can't be hard to get ine
 
@PeeHaa Nope.
 
4:47 PM
Does it actually need oauth2 or can you juat pass the token in the url?
 
Does anyone of you "PHP-People" know the answer for me? stackoverflow.com/questions/41044210/…
 
Does anyone use Viscosity on OS X? (VPN tool) - I'm trying to set something that should be simple up and could use a hand - Viscosity doesn't have a PPTP setting
 
Wow this is strange. In Safari I am able to place something with a decimal in the input with type number, and in Google chrome not.. lol
 
@PeeHaa I'll dink around with it when I go home tonight. I'll need an extra serving of guilt-tripping to make myself do it.
 
5:02 PM
@Tiffany I have a problem with the same script as we had an hour ago..
 
@Julian sorry, I gotta work on something, don't really have the time right now :/ maybe in a bit
 
Shall we just take @kelunik's PR and fix all the remaining stuff based on that @JayIsTooCommon
@Tiffany yes looks like you can just send the clientid in the url
 
5:18 PM
@Tiffany Good luck with your work :p
I need to eat right now.
 
@Jimbo cough bootcamp cough
hey @Jeeves
 
@PeeHaa Yes.
 
@Jeeves What's up
 
@PeeHaa Not much. What's up with you?
@PeeHaa Do you ever cuz.
 
@Jeeves Nothing much
 
5:20 PM
@PeeHaa What's your name?
@PeeHaa What are you doing?
 
@Jeeves peter
 
@PeeHaa Who is?
 
@Jeeves I am
 
@PeeHaa Hi Peter!(:.
@PeeHaa Yes you are what?
@PeeHaa I'm not a computer, you are a computer.
 
lol
 
5:20 PM
@Jeeves I see you just got worse :P
 
@PeeHaa Are you a girl?
 
@Jeeves I'm a bot
 
@PeeHaa I'm sorry.
@PeeHaa Your name implies it, yes.
 
I really need to gain 50 rep. on stackoverflow so I can comment everywhere lol.
 
@PeeHaa Ok but what's your name?
 
5:21 PM
!!uptime
 
@PeeHaa I have been running for 2 minutes and 32 seconds, since 2016-12-08 17:18:54
 
Did you made a bot lol
 
What do you thnk about @Jimbo's mom @Jeeves?
@Jeeves hello?
 
@PeeHaa Hello Hello.
 
HA
 
5:22 PM
That's odd :P
 
@Jeeves Is @PeeHaa's mom any good?
4
 
@Jimbo Very good.
5
 
Seems like @Jeeves prefers to say nothing.
 
@kelunik That's what Mark Pellegrino says...
 
What do you think about @Jimbo's mom @Jeeves?
 
5:23 PM
That's clearly @DaveRandom pretending to be him
 
What the hell
 
;D
Looks at source code
 
What do you think about Jimbo's mom @Jeeves?
It's not the quote isn't it @Jeeves?
It is :)
 
if (strstr($input, 'Jimbo\'s mom')) return false;
 
I get export of my database like this:
mysqldump -u root -p mydb > h://backup.sql
but it doesn't contain EVENTS
How can I include EVENTS ?
 
5:25 PM
Hmm someone unpinned my job offer attempt, @PeeHaa?
 
@Jimbo hmmm flowery's also gone
No idea who unpinned it
@Jimbo Just be a rebel and pin it again :)
 
@PeeHaa Actually I get the option to unpin it
:-/
 
@Jimbo I get the same :|
 
5:42 PM
please help --> echo $message giving output

"Reply 05 / 07 dic" Enviado

I don't want to display the double quote . But I tried str_replace(), which is not removing the quote
 
You want to just remove the quotes from the string?
I don't know how you used str_replace() but it should work...
 
They could be "smart" quotes
 
!!uptime
 
@PeeHaa I have been running for 31 minutes and 49 seconds, since 2016-12-08 17:18:54
 
@JoeWatkins still waiting for mine, what day did you order on?
Or I guess more importantly, what day did you get your "order shipped" mail?
 

« first day (2245 days earlier)      last day (2707 days later) »