Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. I don't see anything that even indicates there's a problem... What do you see in the browser? Some text is going red?
  2. Don't think about it in terms of references. Those are really just about &s. What PHP does with everything, not just arrays, is called copy-on-write. Meaning PHP will reuse a value up until you try to change it. That is when it starts making a copy. That's why they say never to use references to save memory: PHP is already saving memory for you.
  3. You adjusted the php.ini. Did you adjust all the required settings? There's a few. How about settings with the web server software (eg, Apache or nginx) itself? Are you being limited there. Saying it didn't "go through" doesn't mean a whole lot, technically speaking. Is there an error code in $_FILES? Do you get an error page from PHP or the server? Can you see the browser uploading the file and then stop at some point before it was able to upload everything?
  4. Wouldn't it be easier to just post the problem and see what happens?
  5. There really ought to be a good, clean CSS answer to this.
  6. The error is complaining about a comma in the code. There is no comma in that code.
  7. Well, all I can really do is tell you about the problems you post here, and this current one is because you're typing two apostrophes in the place of one quotation mark. If you still have problems after fixing that then we'll deal with them. But you'll have to describe them.
  8. I take it you've seen " before but never typed it out until now? That there is (supposed to be) a double quote, not two single quotes. Shift + '
  9. Oh, I saw a thread about that a second ago... Here. That looks like it talks about your question exactly.
  10. You're running MySQL and only have 1GB in use out of 32? Increase that now, then watch how the server behaves.
  11. Oh damn, I didn't even see this thread when it was first created. Yeah, I don't know what happened. Nobody changed anything. Couple days ago I applied the latest IPB patch and the problem went away. I suspect it was some sort of template caching problem.
  12. That's a whole lot of code to have to read through without having any idea of what to look for - "having an issue" really doesn't say much...
  13. It is true, traits cannot be hinted - they are designed to be, and really do work very much like, language-assisted copy and paste.
  14. If not, then you can't use that approach of the root interface having two arguments and child interfaces for pie and time charts having their own interfaces with three arguments. Eh, the only thing I have is to create a sort of ExtraChartDataThing class, then you have methods for the pie and time charts to add data to it, then those classes can pull the data back out when they want it. And if there is no data they throw up. Or slight variation, maybe better, it's still a key/value store, but the key is a class name (thus unique) and the value an instance of it, then you stuff your Parameter/TimeOffset data into without needing special chart methods.
  15. Traits are copy and paste. If there is any meaning to the code besides you wanting to simply save yourself some copying and pasting then a trait is not the right answer.
  16. Obligatory "welcome to the world of software development". Things change. Try to anticipate and plan for what might happen, but otherwise you're kinda stuck just responding to changing business needs. Saying that everything gets an optional data structure of "stuff" makes sense. Not all chart types may need it, but a general purpose "stuff" thing doesn't sound unreasonable to me. It could only work if the pie and time charts could come up with some sort of reasonable default behavior. If not, then...
  17. The common denominator is that the method takes an ID, name or label, and extra data. For regular charts there is no extra data (so far...), for time charts there is some time thing, and for pie charts there is some data thing. Or alternatively, if there is any way you could modify the pie and time charts to work without the data/time thing, the common denominator is an ID and name/label. You could then use a new interface that provides an optional third argument according to whatever - optional so it remains compatible with the base interface.
  18. Maybe you're creating and recreating connections multiple times per script. Maybe your queries are taking too long. Maybe something else. Hard to say. Add and remove your new functions until you find out which one is causing the problem.
  19. What is the problem? What code have you tried and what was it doing wrong?
  20. So you may have noticed that the code you posted is a bit messed up. Can you try again? Hit <> to bring up the little editor window and paste into there.
  21. 1. The DNS for both domains needs to be the same IP address to the server - no aliases, no redirects, just a basic DNS setup 2. The web server needs to be configured so that both domains go to the same "site" The second part you may or may not be able to do, depending what you have access to. It's quite possible they may have locked this part of the process down enough so that clever people wouldn't be able to get around their paywall. Or maybe they didn't.
  22. Thinking about it as "relaxing" will lead you into conclusions like that. Contravariance is about making sure that if your class claims to be some Thing, it is capable of supporting at least as much as whatever the Thing could support. AnimalInterface says that it supports calling foo with a string argument #1 and a string argument #2. $animal_interface->foo($string_1, $string_2); If your Dog removes the type from argument #2 then that's okay because it still supports a string - it's just that it supports other types as well. $animal_interface = new Dog(); $animal_interface->foo($string_1, $string_2); // still works If your Dog removes argument #2 entirely then that's not okay because you no longer support that argument. Yes, PHP allows passing more arguments than required, and you could let you get at it through func_get_arg/s, however (a) that's only because of how PHP itself supports function calling, but more importantly (b) if your function doesn't care about argument #2 then there might be something wrong with it. Your example is too abstract to answer this effectively. What's the real situation?
  23. Is it just me or have you basically just stated that what you've been trying to do in this thread is impossible?
  24. That isn't quite the code you used. $_GET["sl"] still works, but you should test if that value exists with isset() first before trying to get it.
  25. Yeah no. One server can handle multiple websites. It's how a lot of the web works.
×
×
  • 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.