« first day (4123 days earlier)      last day (808 days later) » 

12:42 AM
Hey
 
1:32 AM
\o
 
1:44 AM
@Sara whatcha doin
 
1:59 AM
@Tiffany goin' ta hell if I don't change m'ways
 
#mood
 
 
2 hours later…
3:42 AM
hi
I am working on a simple CRUD application and it's in PHP.

I want to be able to select an item and after selecting it, the information about that item automatically loads below in a table.

Say I select a city name say- New York, the table below which has column headings of Population, Country, Employment Rate, Life Span, etc should fill automatically with details about New York.

When I select a different city, say Cairo, the same should be done.



I have failed to understand how to capture the id of the selected item and then load its data automatically with ajax or just JS in a table.
 
 
2 hours later…
JRL
5:17 AM
did you just post this in r/php too?
ah, yeah, must be
honestly, you're much better off asking somewhere that is more JS/front end focused, but perhaps someone here will be able to help
that won't be me though, i'm awful at JS
or, not really, but i hate working in it
 
6:05 AM
@JRL yeah sure i did, looking for a quick fix
i suck at js and so not really sure what to do with this
 
JRL
just an fyi on that though it'll be removed from there
im not a mod there or anything
but they don't allow help posts, there's r/phphelp for that
 
but thanks. guess i will have to push it to front end
ok
 
 
4 hours later…
10:01 AM
@Dr.Mukama Your question is very hard to answer since your not asking about something specific. I create a small example to demonstrate how you can implement this. jsfiddle.net/87zr9xau This approach becomes unmanageable for large JS applications but it's good enough for something small.
 
 
6 hours later…
4:01 PM
I think ReflectionClass missing getAttribute method
 
@Mwthreex eh? 3v4l.org/dt8R3
 
it has only plural version of this, it has getMethod and also getMethods but not for Attribute
$attributes = collect((new ReflectionClass($this))->getAttributes());

if ($attributes->first(fn($item) => $item instanceof NeedExplanation)) {
//
}
i forced to do this
 
4:35 PM
@Mwthreex The first param of ->getAttributes() is an optional attribute class. 3v4l.org/enf8M I assume there's no ->getAttribute() because even the same class can be repeatable. Although a case could be made that that's unnecessary for non-repeatable attributes.
 
@IluTov didnt know about the first, thanks! good enough for me :)
param*
 
5:23 PM
Wtf is the logic of CS's side note?????
Also @MarkR sorry been really really really busy so haven't had time to participate in that thread >_>
 
5:50 PM
@Girgias No worries. Your input would be appreciated, but there's no imminent rush, it may be a month or more before pulling the trigger to start a formal RFC.
 
Ok ok :)
 
6:06 PM
@Girgias everyone should be blindly using static analyzers in their code base, without analyzing potential benefits/downsides of using one
That's how I interpreted it, anyway ¯\_(ツ)_/¯
 
6:44 PM
@DaveRandom Which Linux distro are you using?
CentOs EOL was December 2021 and I can't choose an alternative, I need your opinion
 
Static analysers are really, really powerful... but it's defence in depth. No sane person would say that a car doesn't need airbags because you've tested that the breaks work.
 
 
1 hour later…
8:09 PM
@samayo pop!_os since a few weeks. It's actually the only distro with Gnome that didn't lag like hell for me. Maybe I just suck at configuring nvidia drivers. Manjaro/KDE before that. Worked fine too, there's just more visual inconsistency. But really it doesn't matter too much, they are all fine.
@samayo oh sorry, you meant server side :D
 
JRL
8:26 PM
Voters aren't required to use logic, explain their decisions, or even be factually correct. So I'm not sure it exactly matters what the logic is of CS's side note.
Though all of those things are rather critical to having a vote that has integrity as a voting system, so it's not like you can "fix" that.
To be fair though, he isn't presenting it as a matter of inescapable logic, but instead a matter of opinion about the importance of different workflows.
 
@Girgias Seatbelts are bad because then people think they don't need to drive well.
 
@IluTov Ah yes
 
8:41 PM
@Girgias You get it now. Glad to help.
 
@IluTov I mean now that you say it, it is totally clear. Why do we even wear seatbelts
Where is my freedom
 
 
2 hours later…
10:58 PM
> which makes the application sensible to CSRF attacks.
Anyone able to guess the native language and word that got translated as that?
 
11:30 PM
@Danack sensible from french …
An 1:1 translation would be maybe sensitive.
 
@bwoebi Yeah....and in the sense of vulnerable, maybe?
 
@Danack sort of, though it does not exactly mean vulnerable, but something close to it
 

« first day (4123 days earlier)      last day (808 days later) »