# C++
Return Investment after X years
Great for beginners who need to learn C++, this is a basic C++ code that returns an investment
after a set number of years. All you need to do is change the yearTo (the default is 4). It include loops,
user interaction and some math (everyone's favourite subject).
/* JavaScript
Directory Not Updating - Joomla: MosetsTree Fix
When I was working on Mosets Tree for the 1800Ambulance site, there was a bug in Moset's version 2.1.x where if you tried updating the category dynamically in the box, the categories would not update at all (would show up blank). I sent the fix to Mosets, but don't know if they're going to fix it for later versions. If not, here's the fix for that error. You can find the file in your Joomla installation folder > components > com_mtree > js > category.js. It's around line 72. Change the following line from:
to
// PHP
List Images in Directory
This can be modified to scan specific, non-image files (such as .html, .php, whatever.)
In which case, you will have to change how the results echo.
Random Image on Refresh (Numbers)
The image sizes are predetermined, but the order is not (hence random).
Make sure your images are numbered (1 to infinity), not by name (a-z).
Self-Writing Breadcrumb Trail v1.1
The original breadcrumb was written by Tim Bennett at DrQuincy. The original grabbed the name of the file as the trail; I modded it to pass variables through the function. Rather than have a static title and different trail, this basically combines the meta/title tag so that when you pass through the title, this shows as your last link. I combined that with an exploding array to grab one word from the title.