Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. You need to point MX records to the IP address or domain name where the MTA (Mail Transfer Agent) is. Ask your host. Edit: Wait, you're having trouble sending mails. Still, you would have to ask your host. They know exactly how their systems are setup (hopefully!).
  2. What's a semi-dedicated? Like a VPS?
  3. A statement is ended either explicitly using a semi-colon or implicitly by stepping out of PHP mode using ?>, so in this case it makes no difference.
  4. Use a proper relational database.
  5. 1. Learn to read board descriptions (I moved it for you this time). 2. Use rsync. 3. ??? 4. PROFIT
  6. Buy more RAM or see if can make it tail recursive to reduce the memory needed for the call stack. At any rate, you will need a lot of memory because of the factorial growth. At only 20 items, the number of permutations will be 243,2902,008,176,640,000. Also, please don't bump topics that are so old!
  7. Well, no. You're limited to 6.5 Mbps... Depending on your traffic, that may or may not be an insignificant limitation though.
  8. So add an additional array for skip+no count and add an extra conditional in the if-chain in the loop.
  9. Yes and no. 'Yes' because there won't be anyone telling you that you're not allowed to put one more site on the machine. 'No' because the more sites you host on a single machine, the more spread thin your resources will be. If you have no experience with server administration, not easy at all. You can opt for a managed dedicated server (so the hosting company will take care of the administration), but these are typically significantly more expensive. In between shared hosting and dedicated hosting you can also go with a VPS (Virtual Private Server). This way works by running multiple virtual machines (VM) on a single physical machine so you'll still have your own separate environment but at a lower cost than renting an entire physical machine. There are pros and cons of all three types of hosting though.
  10. Just flip it each day except weekends: <?php $month = 2; $year = 2010; $curDay = mktime(0,0,0,$month,1,$year); $numDays = (int) date('t', $curDay); $skip = array(5); $days = array(); for ($i = 1, $prev = 1; $i <= $numDays; ++$i, $curDay = strtotime('+1 day', $curDay)) { if (date('N', $curDay) >= 6) { $days[$i] = null; } else if (in_array($i, $skip)) { $prev = !$prev; $days[$i] = null; } else { $prev = $days[$i] = (int) !$prev; } } var_dump($days);
  11. No, it's just a shitty website. There are still loads of these around. Of course all of them are utterly useless.
  12. The HTML may not necessarily be in another file or in the database. It may also be generated by the script based on data in another format.
  13. bdlog could easily mean "BitDefender Log".
  14. You're also forgetting that if your code is a mess, it will also be difficult for you to maintain in six months when it's no longer clear in your head what you did and why you did it (if you even knew that in the first place).
  15. Well, yeah, but that's pretty useless. For instance, best-case running time of path finding algorithms is also Θ(1) because if you already are at your destination you don't have to move anywhere. Even when using a randomized algorithm, it's still highly unlikely that you'll guess it the first time (assuming the password is selected randomly). Plus you'll now have the extra overhead of needing to keep track of all the passwords you've already tried. That problem doesn't exist when you're checking sequentially.
  16. Presumably a log file for some program...
  17. Google generates it automatically based on what it finds most useful. There is no way you can tell it to use particular links, but you can manually block a link using Google Webmaster Tools.
  18. For redirection you should send a 301, 302, 303 or 307 response code along with the Location header. Redirection using javascript is a hack solution.
  19. Of the three you mentioned, I would say blogs.
  20. TLDR.
  21. if (empty($_GET['formradio1'])) { // ... } else if ($_GET['formradio1'] == 'foo') { // ... } else if ($_GET['formradio1'] == 'bar') { // ... } // ... else { // something else // ... } Or using a switch: if (empty($_GET['formradio1'])) { // ... } else { switch($_GET['formradio1']) { case 'foo': // ... break; case 'bar': // ... break; default: // ... break; } }
  22. Radio buttons and check boxes will only be submitted by the browser if they're checked. Use isset or array_key_exists to check if the index exists. Also, use an else if for the other conditions because they're all mutually exclusive.
  23. You'd had to research US patents, which is extremely difficult and laborious and you would probably need a patent lawyer to do it.
  24. If you have confirmed that you had a virus, I would do a clean install of the OS personally.
×
×
  • 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.