Jump to content

requinix

Administrators
  • Posts

    15,266
  • Joined

  • Last visited

  • Days Won

    431

Everything posted by requinix

  1. You can settle for 0.75pt, if that's an option. Honestly I would still stick with 1pt increments, given that I wasn't able to see an explanation when I checked the libgd source (which actually shells out this work to the FreeType library). ImageMagick is rather good, but requires a bit more stuff installed on the server, and using it tends to involve calling the program - it's not often used as a library like GD. If you need to do this "seriously" then I recommend it. Upscaling would be easy and get you the 0.1pt resolution you want. At the expense of higher memory usage, but that may not be a problem. Going to an entirely different language seems like a lot of effort and is, frankly, an overreaction.
  2. libgd isn't the highest quality stuff. Look into imagemagick, or else use a 10x upscale/downscale.
  3. Yeah. Though technically it's libgd doing the work, not PHP itself. Stick with integral font sizes. Or you can upscale the image even further. But you haven't mentioned what you're trying to get out of this. What is your actual goal here?
  4. Unfortunately, if you're looking for someone (me included) to learn your application and do the work for you, you're probably going to have to pay them. But help and advice is free, as long as you're willing to put some effort into it. I assume you've tried entering more than 275 characters already? To see what happens? So: what happens?
  5. There's really no way whatsoever for us to know from just your description. Maybe the limitation is in the code. Maybe it's in the database. Maybe there is no limitation and it's just lying to you. Exactly how much do you know about the code?
  6. I'm not sure it can help you... What is the amount changed since yesterday? Do you have that value? What is yesterday's price? Do you have that value? Do you possibly have a way of calculating that value? What is 100?
  7. Please no. It is a number. Treat it like a number.
  8. If you mask the link then how will the browser know where to go? If the browser knows then the user can know.
  9. (int) will truncate the number. The actual value is something like 27852.99999999997. Spoiler for most floating-point problems: round().
  10. Set up the second page to show what you want, then use Javascript to "redirect" to the download. If you think not showing them the link means they can't download the file at will, you're quite a bit mistaken.
  11. Long enough to remember the internet of yester-decade. I think it's made good progress since then.
  12. There doesn't need to be a whole lot of rewriting. For example, mysql_num_rows becomes mysqli_num_rows. The two are very similar. Then there are others like mysql_free_result. mysqli has one too, but it's in the "statement" side of things and so is called mysqli_stmt_free_result. The other case is the ones that take the connection. mysql functions put it last, mysqli functions put it first. Additionally it's optional with mysql but required with mysqli. You can get, like, 99% done by looking at the mysql function name and finding a corresponding mysqli function name; it lists by the object-oriented method there (eg, mysqli_stmt::free_result), but the docs page will tell you about the procedural alias. The docs also have the arguments list - check that in case there's a difference in how the function is called.
  13. If by "simply changing it to mysqli" you mean adding an 'i' in, well yes: while it's very similar to mysql, the biggest difference is that it takes the connection parameter first instead of last. But besides that it shouldn't be that hard. Which means the problem is dealing with the "doesn't work" aspect. What doesn't work, how, and what have you tried?
  14. You're trying to avoid having to keep track of every single thing/fruit, right? That's the problem you want to avoid. So a solution that involves having to track every single fruit probably isn't the right thing to do. Look into URL rewriting. What you will do is tell your web server (Apache) that you want to match a URL pattern and turn it into something else. The pattern looks like /Category/Subcategory1/Subcategory2/Item/Page, but I can't tell whether those three categories are fixed (always three) or not. But before you get there, you need a PHP page that can look up what it needs given the path. Like the Foods/index.php examples, except you should make the "Foods" generic too. As in index.php?cat=Foods index.php?cat=Foods&cat1=Fruits index.php?cat=Foods&cat1=Fruits&cat2=Apples index.php?cat=Foods&item=Red-Delicious When you make that work, then you can worry about setting up the URLs to work with the nicer-looking versions. However, if the three categories are not fixed then you have to do something different...
  15. A sure-fire way to become a good developer is to give up. But at least part of the blame lies on Google for featuring an article about downloading the Windows installer for Composer? Yeah, no. That's dumb. Don't do that. Find your composer.json file. It should be at or near the root of your project. Do you also have a composer.phar there? If not, do the Manual Download to get it. Then run it like php composer.phar update update will also redo the autoloads.
  16. Informing the user about the delete is the app's responsibility, not yours. If you want to provide an endpoint that lists "child" resources then you can do that, but otherwise once that DELETE comes in don't try to second-guess it.
  17. Nope. Note the "url" in those names. You're working with files, not URLs. Your question was whether to create the dump-autoload as a file or run it as code. If you've gone into the CLI documentation you should know how (a) what dump-autoload is, (b) that it is neither a file or code, and instead (c) how you are supposed to run it. dump-autoload is a "command" (argument) you give to the composer.phar application. That you should have a copy of... though you may not, actually, so if you don't then the first thing you have to do is download it.
  18. Sounds like you need a starter course on what Composer is.
  19. While that link may be helpful in the general case, it will do nothing to help your specific problem. No comment on whether that user is in the UK, or even in that same hemisphere, as they claim to be. You're looking at Composer autoload files. Don't do anything to them. Instead, tell Composer to regenerate all that data by running `composer dump-autoload`.
  20. I'll wait five minutes for you to see this reply, then remove your account.
  21. Seems you have a $db that's magically coming from... nowhere.
  22. If imgroot had just joined then I would be leery too, but I think after ~280 posts they've earned some trust. Perhaps you could try aiming all of your posts in a more helpful direction and away from the critical and insulting?
  23. The best way is to not do it yourself: sending 100k emails per day from a generic hosting company is a reliable way to get your server blacklisted and emails blocked. There are plenty of services that provide APIs.
  24. USE WHICHEVER YOU WANT
×
×
  • 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.