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
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.
Now when you save your file, it will automatically be copied over to your server via mapped drive instead of uploaded through FTP.
As far as I can tell, the only place the “Automatically sync” option appears is in the “Create a FTP connection” dialog, but once you create the FTP connection, you can change it to a Filesystem connection and the sync option remains and works.
Playing around with Ruby, Rails, RefineryCMS… anything installed? ~ $ which ruby nope, ok… ~ $ sudo apt-get install ruby The following NEW packages will be installed: libreadline5 libruby1.8 ruby ruby1.8 hmm, ruby 1.8? let’s try to get the current version, 1.9.2 just for grins… ~ $ sudo apt-get install ruby1.9.2-full nothing. hmmm, refinerycms.com suggests [...]
Spring racing season is over for me after running today’s Bun Run 5k. To that in a moment, but let’s call the season a success. The goal was to get faster in the shorter distances this Spring and I did that. Four races, 3 PRs. The lone non-PR race, the Capitol 10,000, was still a [...]
I’d like to polish the Knob more often, hopefully this is a start. I still have goals, and I thought it was beneficial in the past to recount them here, so I’d like to resume that habit. It’s tiresome to be so navel-gazing all the time though, so I’d like the Knob to branch out [...]