Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
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!).
-
What's a semi-dedicated? Like a VPS?
-
Is there a variable limit when performing many php calculations?
Daniel0 replied to fmesco's topic in PHP Coding Help
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. -
Use a proper relational database.
-
1. Learn to read board descriptions (I moved it for you this time). 2. Use rsync. 3. ??? 4. PROFIT
-
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!
-
Well, no. You're limited to 6.5 Mbps... Depending on your traffic, that may or may not be an insignificant limitation though.
-
So add an additional array for skip+no count and add an extra conditional in the if-chain in the loop.
-
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.
-
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);
-
No, it's just a shitty website. There are still loads of these around. Of course all of them are utterly useless.
-
How does PHP appear as Html/CSS on browser source codes?
Daniel0 replied to dezinerite's topic in Miscellaneous
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. -
bdlog could easily mean "BitDefender Log".
-
Well after 15 years of programming you would think that I have seen it all
Daniel0 replied to MiCR0's topic in Miscellaneous
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). -
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.
-
Presumably a log file for some program...
-
Google search result and Google site map question
Daniel0 replied to chk125's topic in Miscellaneous
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. -
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.
-
Of the three you mentioned, I would say blogs.
-
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; } }
-
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.
-
You'd had to research US patents, which is extremely difficult and laborious and you would probably need a patent lawyer to do it.