« first day (4426 days earlier)      last day (504 days later) » 

1:22 AM
Am I just slow writing emails or.... like the reply to Marco took me 2h
 
How many re-writes?
 
Not that many, just trying to be meticuous and clear
 
Is this a ML thing?
 
Yeah
 
You've trained an AI to respond to internals? awesome.
 
1:33 AM
if only
But that's a fun side project...
I've learned that someone wrote their master thesis using GPT-3 and got a good grade smh
 
Ballsey
 
@Girgias I find writing decent emails does take a long time....though possibly that it's quite late at night probably doesn't help.
 
Also @Danack finally going back to the function autoloading now that I've got better APIs in core
 
cool.
 
@Danack I slept from 1730 to 2230 so this is kinda like Monday morning now for me lol
 
1:35 AM
Being a monday morning doesn't help speed either...
 
very true
 
oh, how did your resits go? are you still london based?
 
Kinda the same boat. I drove to Oxford and back this weekend, as soon as I got home I went straight to bed for several hours and now im still up
 
1:54 AM
@Danack I'm still in London yes, and that's a discussion over a pint as it's kinda complicated
 
Ben
Morning all! Can I ask a favour?
What is this line doing?
echo '<img id="loadinggif" src="./cathroll2.gif" onload="setTimeout(function() { document.pin.submit() }, 2000)">'
 
@Ben it's echoing (printing) a string that looks like html.
 
Ben
From my understanding it's doing that every 2 seconds?
2ish
 
no. PHP runs on the server. javascript runs in the browser.
so maybe it's doing something in the browser every 2 seconds but that's not the line of PHP.
 
Ben
Yeah it's a bit messy ^^' I'm trying to clean it up a bit.
<?php $insert = mysqli_query($con, 'INSERT INTO rollcall.rollcall_log (UID, status, hostname, username) VALUES ("'.htmlspecialchars($_GET['id']).'","0","'.$_SERVER['REMOTE_HOST'].'","'.$_SERVER['REMOTE_USER'].'")');
echo '<img id="loadinggif" src="./cathroll2.gif" onload="setTimeout(function() { document.pin.submit() }, 2000)">'; ?>
<meta http-equiv="refresh" content="1;URL='/'">
So it does the insert into the db, then runs that print function, then it refreshes the page after 1 sec
I just know if the setTimeout value is greater than the refresh value, it gets stuck in a loop
 
2:01 AM
you should probably split your code into separate functions so that it is readable. And you should use mysqli prepared statements, so that you don't have horrible security holes in your code.
 
Ben
Oh definitely. But the first step is understanding what it's doing first, and why haha
This isn't my code, it's a quick little project made by a guy >7 years ago, there were no comments, it's been adapted into a later version of PHP, and now I'm the first guy that's worked here since that has any understanding of code
but my strength is C# haha
 
 
11 hours later…
12:49 PM
@Ben It's executing JS pin.submit() function every 2 seconds.
 
Good Morning
 
\o
 
 
1 hour later…
2:13 PM
Welcome home! 0/
 
 
1 hour later…
3:17 PM
anyone have an sql-server merge example merging an array or maybe an array of arrays into a table handy?
 
3:36 PM
No... but I would advise that if you're utilizing server merge that you have some fail-safe in place to have it verify the data in both the source and destination of data, and if they don't match have it force to re-merge missing data.
We're getting ready to change POS vendors because of merge issues with their software that doesn't validate the data and occurs due to an apparent known Microsoft merge issue that can occur.
 
Gr8
 
3:57 PM
By all parameters, I could able to check, mysql installed is 8.0.31. PHPStorm is showing (connected to? and it should be "Ver 8.0.31 for macos12.6 on x86_64 (Homebrew)") 8.0.11. Why so?
 
4:15 PM
However, I wanted to increase 'group_concat_max_len'. I succeeded although version output in PHPStorm is not what I expected to be.
 
 
3 hours later…
6:49 PM
\o
 
7:06 PM
Still haven't figured out sql server upsert. The current attempt is to put the insert execute in a try and the update in the catch :(
 
o/
 
"Make it work, make it right, make it fast."
If that does work for you, go with it. Or at least go from there.
 
I've been to 30-40 websites and I can find it for anything not sql server, except the pages that are just wrong. I lost 2 reputation points figuring out I need to use merge, but every merge example is for two tables, not for an array of values into a table, except 2 that don't work
It can't be that only mysql programmers upsert.
 
7:44 PM
@Jimbus orderId is prone to duplication? Maybe you can check which orderId's already exist, update those, and insert others?
 
Yeah, the status with the orders change and we want to capture the latest, so we'll be running it nightly for today -6
F###ING A! It worked!
 
Nice. :)
What was it?
 
There was a lot of little stuff after the latest rearrangement, but the try insert catch try update scheme seems to have it
working on a bit bigger data set
I suspect that merge is the "right way," but until I get a better example I'm happy
The speed isn't an issue on the sql end, shipStations's API is much slower, I suspect they are getting spanked this time of year
 
8:03 PM
Glad to see you managing that. ;)
 
Me too, I've spent about three days working on just this upsert and my rage and battle fatigue were starting to win out :)
 
8:33 PM
Ok then, here is something for relax:

https://twitter.com/mumtuum/status/1596530065269227520
 
9:08 PM
What the heck>?
 
9:51 PM
:D Not AC/DC fan?
 
I think he went out that last hit
 

« first day (4426 days earlier)      last day (504 days later) »