Jump to content

requinix

Administrators
  • Posts

    15,218
  • Joined

  • Last visited

  • Days Won

    425

Everything posted by requinix

  1. I don't remember if Intelephense provided the feature or not. In fact I might not even have tried it with PHP - maybe it was another language. But I assume the concept works the same way everywhere. But yeah, the hover or autocomplete list has always been sufficient for me. Oh well, whatever works best for each person.
  2. It might work a little more cleanly in PHPStorm, but when I tried it in VS Code, I found it much more complicated to try to select text or read through code when the editor was injecting those things into the view. Maybe if they weren't inline, though I can't imagine how not, they might be nicer for me... But I'm also a proponent of the idea that you should be able to tell what the parameter is, be that through a variable name or an obvious literal value (or a constant...), and if you can't tell then you should do something about that. // this is obvious on what the parameters are password_verify($password, $hashedPassword) // this is not password_verify($value, $row[1])
  3. That said, how the heck do you know what "6" means? Use column names instead.
  4. The code you posted is not using alert(). Is it possible that the code you posted is meant to return a message to display? And since you're returning a message that looks like HTML, it is alert()ing that HTML? If so then the code you need to fix isn't what you posted...
  5. There's nothing in here that should show a normal Javascript alert()...
  6. And where is that? I'm guessing that you're expecting to see those two events in your version of the code but, according to that one screenshot, are not. Without seeing code or data, I'm also guessing it's going to be one or more of: - You don't have the data for the events - The data for the events is present but incorrect - The query to retrieve the data is incorrect - The query is correct but the code to display the data is incorrect
  7. Misunderstood. Frameworks are a bunch of code that other people wrote to do stuff. Using them saves you the time of having to write your own bunch of code to do stuff. They do so much stuff that the intention is you take what they provide as a foundation and then add what you want. There's also libraries, which are a bunch of code that other people wrote to do stuff that saves you the time of having to write your own code to do stuff, but they're much smaller in scope than frameworks. They're basically about solving small individual problems, so using libraries means you don't have to solve those same problems yourself and you can focus on more important issues. There is overlap between frameworks and libraries. The distinction is in how they get used: are you taking a bunch of stuff and adding more, or are you using stuff to create other separate stuff? VS Code and Dreamweaver (if anyone still uses that) are "integrated development environments", but everybody just calls them IDEs. IDEs are glorified text editors, in that they let you type stuff into a text file just like any simple text editor does, but IDEs also have tons of features dedicated to dealing with code and so are much nicer to use than text editors. Like they can be aware of language syntax nuances and tell you when you wrote something wrong, while text editors might be able to do a little bit of that but would care more about checking your spelling. I don't like "template" as a metaphor. A template is about taking something and supplying a few bits here and there and you're done. You go to some blog creator website (coughwordpress) and they'll give you a template for a site: you set a name, colors, images, whatever, but all you're doing is customizing the same basic thing that everybody else is using. This forum is basically a template because we installed Invision Power Board and customized it a bunch. A framework is about you having a starting point for actually building something - not just customizing. You write code to do things, you implement features, you make decisions about how things work, and so on. Making a complicated website involves many different things, and frameworks have a lot of that designed for you so you don't have to make it all yourself. Where are you seeing "controls"? That typically means things like text boxes and buttons and links, like right now I'm typing into a "textarea" control that has a bunch of formatting button controls at the top and a "submit" button control below it. But people don't normally use the word "control" much these days. I think maybe you shouldn't worry much about what a control is. It's such a generic term that it doesn't really say much. "Text box" and "button" and "link" are specific types of controls, and talking about those is much easier (but also kinda off-topic from what we're talking about now).
  8. It pretty clearly says "bad credentials" in the error message...
  9. Ah: {filter:brightness (50%)} It's silly but you can't have a space between "brightness" and the "(50%)". Remove that. TIL
  10. I'm using my browser tools to inject a CSS rule exactly like what I said earlier and it's working for me. But I'd probably edit it to be .home-banner .porto-ibanner:hover > img /* or */ .home-banner .porto-ibanner:hover .porto-ibanner-img and I recommend adding some fade-in and fade-out transitions (it looks kinda weird to un-hover and the brightness returns but the popup thing takes a second before it hides again).
  11. So you have it checking all the rows, in that the outer loop counts rows (first index) and the inner loop looks at the cells in the row. You can use the exact same technique for checking the columns. (Hint: reverse your usage of the rows and columns.) That won't work for checking the grids, though. For the grids, you need to look at both rows and columns at once, but only a portion of them. So the "first" grid would be rows 0,1,2 and columns 0,1,2. "Second" would be rows 0,1,2 but columns 3,4,5. Then 0,1,2 and 6.7.8. Then repeat but with rows 3,4,5, and then again with 6,7,8. Give that a try and we'll see what you have.
  12. And you're sure that means they're installed, not simply available to install? And you're sure that you restarted whatever is running PHP (which is probably Apache but it depends on your setup)? Tried restarting the whole server? What all does `locale -a` list, and what does it say specifically for en_US? Everything I can find says that the issue is some combination of not having installed the locales and/or not restarting after doing so.
  13. Are you able to check the rows and columns? It's the exact same thing but you're picking different squares... Exactly what part is it that you're having problems with? Do you have code for it so far?
  14. You mean besides literally checking the rows, columns, and grids to see that they contain all of the numbers 1-9?
  15. Simply upgrading PHP shouldn't cause locales to change. Are you sure nothing else happened at the same time? And I assume you've tried `dpkg-reconfigure locales` and restarted everything after? Does your system have the en_US locales installed?
  16. The only require you need is for vendor/autoload.php. Remove the others. "PHPMailer" is the name of the class, yes, but it also exists in a namespace. Do you have at least this particular use statement use PHPMailer\PHPMailer\PHPMailer; at the top of your file? I'm grabbing that directly from the packagist.org page you linked to.
  17. requinix

    num_rows

    You're mixing PDO and mysql. Which is bad for two reasons: you're mixing two different libraries together (so of course they won't work) and one of them is the old mysql library (which is so bad it's been removed from PHP). You're using PDO. That's good. Find out what the "num rows" solution for PDO is. Hint: look in the documentation to see if anything seems relevant.
  18. If you're asking why it shut down unexpected, it may be due to a blocked port, or missing dependencies, or improper privileges, or a crash, or a shutdown by another method. To find out why, you should press the Logs button to view error logs. You can also check the Windows Event Viewer for more clues. But if that still doesn't work, you can copy and post the entire log window in the forums.
  19. Seems you've already done that. So what's the problem?
  20. Yes it will. If something throws an exception, it bubbles up to the closest try/catch, and if that doesn't handle it (or throws it again) then it continues up to the next-closest try/catch, and so on. Doesn't matter what functions those try/catch blocks are in.
  21. What do you mean "ideally"? That is how it will work: if any of those three methods throws an exception then the try/catch will catch it. Because that's what it does.
  22. If you're asking what you have to do to make this work, the answer is: I don't know what the answer is because all you've given me to work with is a bit of HTML and something that may or may not match the CSS rules you're actually using. What I do know is that what you're trying to do, in principle, does work. Which is why I offered the advice of how you can find out what the problem is, by which I mean a way for you to "debug" the CSS. Find out what rules are and are not applying, with your actual site that only you can see, and that should help you get closer to finding out what you have to do to make this work.
  23. Working for me. https://jsfiddle.net/w936eko0/ No, you can have as many rules as you want, even duplicates, but it does mean you need to pay attention to conflicting rules. Which is what I think is going on here. Use your browser tools to force the .porto-ibanner into a hover state, then check what CSS rules it is and isn't applying.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.