Endeavoring to be more of a producer than a consumer, ran across Project Euler which looks to be low friction but somewhat useful and interesting. Unfortunately their register/login system is broken:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/admin/domains/projecteuler.net/public_html/includes/login_preprocess.php on line 11
So I’ll keep track on my own blog I guess and see how far along I get.
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
And my solution, in PHP:
$sum = 0;
for($i = 0; $i < 1000; ++$i)
{
if(!($i % 3) || !($i % 5))
{
$sum += $i;
}
}
echo number_format($sum);
Answer: 233,168
Subscribe to comments feed (this is global, not just for this entry)
Endeavoring to be more of a producer than a consumer, ran across Project Euler which looks to be low friction but somewhat useful and interesting. Unfortunately their register/login system is broken: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/admin/domains/projecteuler.net/public_html/includes/login_preprocess.php on line 11 So I’ll keep track on my own blog I guess [...]
Soldiering on with Aptana, fighting as I go, here’s how I was able to set up automatic synchronization between my project and a remote server accessed through a mounted/mapped drive. Set up your project Set up your remote preview server Set up an (S)FTP deployment connection, make sure you check “Automatically sync my changes” Go [...]
At work we are stuck with Subversion 1.4 clients (cough, Dreamweaver, ahem), so any new IDE I try has to use the SVN 1.4 api and format. Every 6 months or so I like to test drive IDEs, but most new editors and IDEs long ago gave up support for SVN 1.4 (except for PHPStorm, [...]