Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/29/2023 in all areas

  1. One option would be to write a function that gathers the necessary height information. Then run the function to initialize your height variable(s). If something is hidden after the initialization, run the function again to update the variable(s). You could also check to see if there's an event listener built into JavaScript for detecting changes to the page height. If something like that is available, you could have that run the necessary code to update the height information. For example, the "resize" event listener might be useful when gather height information when the user changes their browser's window size. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event Additional listeners may be available for other events that impact page height.
    1 point
  2. From the manual: So when you're dividing your timestamp variable, you get a floating point number due to the values not dividing evenly. Attempting to use % on that result causes PHP to convert it to an integer instead, loosing whatever fractional value existed in the process. In the past, this happened silently. Now there's the notice about it to highlight the potential bug. Convert your floating point value to an integer value yourself explicitly to remove the error. You can do this in that code by just changing the floor function to only operate on the division instead of the whole expression. $hours += floor($timestamp / 3600) % 24; $min = floor($timestamp / 60) % 60;
    1 point
  3. We're excited to announce that we have a Discord server now. We've been trying to come up with a supplemental way for users to interact, connect, learn and teach through chat. The IRC server hasn't exactly been very dependable, and we've agreed this is the next best thing. Click the link below to join us! https://discord.gg/fza5pmEjrF
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.