Category Archives: General

By Love of Math.

I have to say, I absolutely adore math. It is probably one of the most amazing things, well, ever. It is obviously applicable in the programming environment – but this is the first time I’ve messed around with math itself.

Debates (38% filled, 24 of 63 speaker positions filled, 39 available)

Here’s the quick ‘n’ dirty script to get it done. Place all of the UIDs inside their own array, and apply this.

$countfilled = count($numfilled);
$countfree = count($numfree);

$total = $countfree + $countfilled;

if ($countfilled != 0 AND $countfree != 0) {
$filledfreeratio = floor($countfilled / $total * 100);
} else { // evade divide by zero
$filledfreeratio = '0';
<h2>Debates <span style="color:#999999;">
(<?php echo $filledfreeratio; ?>% filled, <?php echo $countfilled; ?> of 
<?php echo $countfree + $countfilled; ?> speaker positions filled, <?php echo $countfree; ?> available)

Leave a comment

Filed under General

We are DebateWare.

Welcome to the DebateWare blog, where we will write about development and other news related or not related to DebateWare.

1 Comment

Filed under General