-
Posts
15,264 -
Joined
-
Last visited
-
Days Won
431
requinix last won the day on February 8
requinix had the most liked content!
About requinix

Profile Information
-
Gender
Not Telling
-
Location
America/Los_Angeles
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
requinix's Achievements
-
If you'd like to ask a bot to tell you how to make that traffic generator, I'VE GOT GOOD NEWS FOR YOU!
-
how to make a fake traffic generator BOT in php?
requinix replied to zatat1's topic in PHP Coding Help
No thanks. -
Delete Problems List in VSC
requinix replied to LeonLatex's topic in Editor Help (PhpStorm, VS Code, etc)
You're reinstalling VS Code for this? Either the error isn't fixed like you think, or the thing presenting the error is running from a cached version that somehow hasn't updated. Reloading the window, let alone quitting and restarting, should resolve the latter. Maybe some more specific information would be helpful? -
Services Offered has been a place for people to offer their services for hire. Over time, it's "evolved" to support companies to announce themselves as well (provided their services are on-topic), and today it primarily functions as a pseudo-sanctioned forum for spam. There's a slight moderation burden in monitoring it for off-topic spam and removing replies (which are against rules but the forum software isn't able to enforce this adequately). Job Offerings has been the other side of the coin, where people and companies could post about jobs they have available. It doesn't see much activity these days - 5 threads in the last two years. Given that Services Offered is more of a burden than a benefit and that Job Offerings isn't much of an offering anymore, we're looking to close them down within the next week or so. Thoughts?
-
- 1
-
-
Delete Problems List in VSC
requinix replied to LeonLatex's topic in Editor Help (PhpStorm, VS Code, etc)
The "Problems" tab is a list of problems detected by the IDE and/or various extensions. You clear the list by fixing the problems, or somehow otherwise turning off the error reporting. You can hide the tab entirely through the right-click menu on the tab area, and similarly for the problems list in the status bar. -
Something doesn't make sense here. Why can you look at IV values in the "current" element but for the pills/syrup you have to look "ahead"? I'm also not really following the algorithm. Given the example there, exactly what steps are you (as a human) following to get exactly what output?
-
This post implies using their UsesServiceTrait to handle the mocking (well, faking of results) as seen in places like S3's MultipartUploaderTest.
-
Don't? Just give it the whole document you're working with. When you did what, it did what with your what? It will make some alterations if necessary to make the document valid, which means if it's doing something then that likely means the source was somewhat incorrect HTML. Spend a bit of time getting familiar with DOM as a whole (not PHP's implementation, I mean the concept itself) and what it can do. With the sample you posted, I would expect an implementation that (1) finds H2 elements, (2) grabs their nextSiblings for the first paragraph, and (3) grabs their nextSiblings for the second paragraphs. It's also possible to do XPath queries for more advanced searching, but the new DOM API offers querySelector/querySelectorAll which is nearly as powerful. 🌎🧑🚀🔫🧑🚀 Always have been.
-
You cannot run Javascript code inside your PHP code. It does not work and never will work. The only reason you saw "3072" before was because your PHP literally outputted that <script>, the Javascript executed in your browser, and what the code does is literally write the value to the page. The only way to get values like screen.width to PHP is through some sort of request to the server, such as AJAX. If that's not working for you then fix that and then you'll be able to use AJAX just like everyone else. But that's probably the wrong thing. Why does your PHP need to know the screen width?
-
First step to manually parsing HTML is to stop manually parsing HTML. Use DOM instead.
-
Best way to log last logged in IP address and registered IP address
requinix replied to mobbdeep's topic in PHP Coding Help
You've got three basic options for storage: a string, a number, or as binary A string is the obvious choice because human beings think of IP addresses as strings. You can support IPv4 and IPv6 easily because it's just a string. You can do exact searches because it's just a string, but CIDR-ranged searches are hard. A number is another choice, as an IP address is essentially a number. That's fine for IPv4 addresses, but the IPv6 is too large to support. Exact and CIDR searches are easy. There's also binary, which is probably the least convenient form to work with. It has the strengths of strings (variable-width) but its own disadvantages (binary data, inefficient ranged searches), as well as the strength of numbers (efficient storage) as well as their disadvantages (need to convert to/from string format). If you don't need ranged searches then use strings, if you think you need ranged searches then think again because you probably don't. Because this is one of those times where you can get lost overthinking the problem. Besides that, Don't store just the last IP address. Store all of them. Since you're dealing with user accounts you'll also have a session, and in there you can remember the IP address, and that means you can know if it changes (which would mostly mean a mobile device switching networks, but even that isn't especially common these days). Fun side effect of this is that you're more likely to think about session security, like how you should reauthenticate a user if a request comes from the "wrong" IP address... -
You need to add [the] path [to php.exe] to [the] "php.executables" setting. Open the VS Code settings, find "php.executable", and put the path to your php.exe in there.
-
Less sarcastic answer is, Apparently the diff says that the two <aaaa> nodes are different, likely due to the attributes, so they can't be merged. What happens if they have the same attributes? Or is it that the diff somehow isn't being recursive?
-
I like how you said "it works as it should", then you post the output of the diff which clearly shows what it's doing. So no problem, right? It's all working as it should, which means your expectations are incorrect. 👍
-
Merging XML cannot happen in a generic way that will support everything. If you know the structure of the documents then the best thing will be to write code to merge the two together. The big question for that code is going to be how XMLDiff works. Have you seen what $diff looks like? Does that hold any clues as to what's happening when you try to "merge" it into the first document?