Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. You mean kind of like on Google Books?
  2. I think most people are willing to do that if you ask. Probably not Fortune 500 businesses, but small clients.
  3. You could use SCP or SFTP, both of which are much more secure. Or you could store your files in an SVN repository and do an SVN export/checkout on the server via CLI (my preferred method; makes it much easier).
  4. People are still using FTP these days?
  5. Locked as duplicate/repeat topic.
  6. Not really. All applications I develop I still maintain 100% ownership of the source code. The client is effectively purchasing a licence to use it. If you were to hand over the rights to the source code then your client could have the right to prevent you using that code in any other project you work on. Just like buying a copy of microsoft office. You have the licence to install and use the product but microsoft still owns the rights to the source code preventing you making modifications if it were available. There is a difference between buying a mass-distributed product that you can buy in a retail store and hiring a team of developers to write an entirely new product from scratch. I'll still hold on to my statement that you'll have to specify in the contract if you wish to retain partial of full ownership as a developer/designer. Note however, that the copyright of course only applies to the work as a whole, not parts of it. For instance, I'm reading a book right now, and there is a sentence that says "Suppose now that A and B are finite subsets of a universal set U." That sentence cannot be copyrighted. I could formulate that sentence entirely independently of that book, but it's highly unlikely that I would write the same book, or even a chapter in the book independently. Therefore, the "your client could have the right to prevent you using that code in any other project you work on" argument doesn't hold. He would prevent you from reusing the project in its entirety (and reasonably so, IMO), but not individual components that are too generic to be copyrighted anyway. Selling a license to a commercial product and selling custom development as a service are two entirely different things. No, of course not. You cannot reassign ownership of something you do not own. Nor can you sell something you do not own. I'm exclusively talking about code you specifically wrote for the client, or artwork you created for the client.
  7. Are you sure about that? If I'm paying someone to create something for me, I think it's reasonable to expect that full ownership will be transferred too me unless otherwise stated in a contract. If I pay someone to build me a house, I expect that I'll actually own the house. I don't see why it's different with a website. Also, if you're at work and you write a piece of software. Obviously you'll not retain ownership of what you wrote. You did it on company time and they paid you to do it. As far as I'm concerned, it's not different just because you're a freelancer and isn't physically in the client's house (or whatever) doing it. If you want to retain partial or full ownership of things you did for a client you should specify it in the contract.
  8. Perhaps check out this tutorial: http://www.phpfreaks.com/tutorial/working-with-checkboxes-and-a-database
  9. Can't you just use addslashes or addcslashes?
  10. Change session.save_path
  11. I can come over and wave my magic wand if you wish. It usually works. No, seriously, what are you trying to do? How can we make it work if we don't know what it's supposed to do?
  12. The path that PHP is configured to save sessions in does either not exist or is not writable/readable by the webserver.
  13. Maybe a better place to start would be to familiarize yourself with how RSS feeds are built, the tag names that are used etc.?
  14. You'd probably want to do: UPDATE users SET style = $styleId WHERE user_id = $userId Assuming of course that the user's ID is called user_id in the table and that you have two variables holding integers called $styleId and $userId.
  15. Funny use of statistics Which is the best depends greatly on your own needs and of course personal preference. You cannot categorically say that one particular piece of software will the best for everybody in any given situation. Maybe check this out: http://en.wikipedia.org/wiki/Weblog_software#Free_and_open_source_software http://en.wikipedia.org/wiki/Comparison_of_content_management_systems#PHP_2
  16. As he said, make sure your server's clock is not off.
  17. Not necessarily. From a purely mathematical standpoint there is no difference. First of all, I get [tex]f(x)=1.88504580039545 \cdot e^{0.186345541507008605x}[/tex] using Maple. We know that [tex]\left( x^a \right)^b = x^{ab}[/tex]. This means that [tex]e^{0.186345541507008605x} = \left(e^{0.186345541507008605}\right)^x[/tex]. So our base is [tex]e^{0.186345541507008605}=1.20483851017[/tex], which is what Mark got as well.
  18. Try checking out date_default_timezone_set.
  19. Possibly you're calling it twice and it is the second one that is giving you the error?
  20. Because they have no idea what they are doing, or they don't care because their customers don't know what they're doing.
  21. Take a close look at this statement: strtotime(sprintf('%s/%s/%s', $m, $d, $y) > time()) Evaluating from the inside and out we've got: A = sprintf('%s/%s/%s', $m, $d, $y) - presumably, this is the some date in the format m/d/y. This is a string. B = time() - this is the current UNIX timestamp and an integer. So we are evaluating A > B. A will get cast to an integer because we are doing a numeric comparison. The way PHP handles this is by chopping off from the first non-numeric character. So essentially we are checking if the given month is larger than the current UNIX timestamp. This will never be the case, so the operation will return false (a boolean value). Now, a boolean value is an invalid argument to strtotime(), and the way it handles this is by returning false. This means the ternary statement will always return the "false" component, i.e. "#F00" in this case. You can of course fix this by fixing the parentheses: strtotime(sprintf('%s/%s/%s', $m, $d, $y)) > time() I'll let you work out the logic in that statement yourself
  22. Maybe the write permissions to the session folder (usually the OS tmp folder) are screwed. You could try changing the path or writing a save handler to store it in a RDBMS instead.
  23. The fact that you say "classes are not necessary" shows that you do not understand OOP. OOP is a paradigm as opposed to just using a class as a kind of "construct" in the procedural paradigm. Anyway, there are lots of things you can do. A forum, blog, wiki, CMS, etc.
  24. It'll not work as intended though. Match up the parentheses and see why for yourself
  25. Well, like it or not, the computer cannot read your mind. If you don't tell it what to do it just won't know it. It doesn't just know something. There is no inherent relationship between the integer 1 and the string 'basic'. I showed you how you would tell PHP your rules. You asked if it was possible to just know it. I answered "no" and told you the reason why based on how programming works. I don't see how that makes me an "ass".
×
×
  • 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.