Author: ToneDJCampbell
eXorithm – Execute Algorithm: View / Run Algorithm sorted
function sorted ($array
{
$len = count$array);
for$i=1; $i$len; $i++) {
if$array$i-1] > $array$i])
return false;
}
return true;
}
eXorithm – Execute Algorithm: View / Run Algorithm magic8ball
function magic8ball ()
{
$answers =array'It is certain', 'It is decidedly so', 'Without a doubt'
'Yes – definitely', 'You may rely on it', 'As I see it, yes'
'Most likely', 'Outlook good', 'Signs point to yes', 'Yes'
'Reply hazy, try again', 'Ask again later'
'Better not tell you now', 'Cannot predict now'
'Concentrate and ask again', 'Don't bet on it'
'My reply is no', 'My sources say no', 'Outlook not so good'
'Very doubtful' );
$index = rand(0, count$answers));
return ($answers$index]);
}
eXorithm – Execute Algorithm: History For Algorithm sort_multi_array
Unity
<?php /** * unity * * Returns digit summation of any numerical value given for passkey (up to 14 digits in length) * * @version 1.2 * @author Contributors at eXorithm * @link /algorithm/view/unity Listing at eXorithm * @link /algorithm/history/unity History at eXorithm * @license /home/show/license * * @param number $passkey enter any numerical "whole" digits (non-negative) * @return mixed */ function unity($passkey=75025) { $ubn = array(); while ($passkey > 9) { if (strlen($passkey) > 1) $passkey = array_sum(str_split($passkey)); else $passkey = $passkey; } $ubn[] = $passkey; return end($ubn); } ?>
eXorithm – Execute Algorithm: Algorithms Beginning with J
eXorithm – Execute Algorithm: View / Run Algorithm round_up
function round_up ($num, $precision
{
$pow = pow(10, $precision);
return ceil$num * $pow)/$pow
}
eXorithm – Execute Algorithm: Please Login or Register
Log In or Create Account
You need to log in to access this part of the website. Use the form on the left side of the screen.
If you are not yet registered, you can create an account. Registering is free, and allows you to edit algorithms, participate on the forums, and more!
eXorithm – Execute Algorithm: Embed Algorithm overlay_image
Embed This Algorithm
This page will help you embed the algorithm overlay_image on a page on your own website. Just configure the inputs, then click the generate button to get a snippet of code you can paste onto your site. You have two options.
- You can embed the entire form. Users will be able to enter their own arguments, and will need to press the run button to execute the algorithm.
- You can add only the output of the algorithm to your website. There will be no argument inputs or run button.
eXorithm – Execute Algorithm: Embed Algorithm validate_domain
Embed This Algorithm
This page will help you embed the algorithm validate_domain on a page on your own website. Just configure the inputs, then click the generate button to get a snippet of code you can paste onto your site. You have two options.
- You can embed the entire form. Users will be able to enter their own arguments, and will need to press the run button to execute the algorithm.
- You can add only the output of the algorithm to your website. There will be no argument inputs or run button.