Пример #1
0
function printAll_content()
{
    ?>
    <table class="CSSTableGenerator">
        <tr>
            <td>Internt<br />databas-ID</td>
            <td>Ark-ID</td>
            <td>Rad</td>
            <td>&Aring;r</td>
            <td>Kvalit&eacute;</td>
            <td>V&auml;rde</td>
            <td>Val&ouml;r</td>
            <td>Land</td>
            <td>Notering</td>
            <td>&Auml;ndra</td>
        </tr>
        <?php 
    printAll();
    ?>
    </table>
    <br />
    <b>m = Metallvärde</b>
    <br /><br />
    <a href="system.php">Tillbaka till kontrollpanelen</a>
<?php 
}
Пример #2
0
function printAll($a)
{
    if (!is_array($a)) {
        return $a;
    }
    foreach ($a as $k => $v) {
        echo printAll($k) . ' => ' . printAll($v) . '<br>';
    }
}
function getAllBallsForColor($colorOfBall)
{
    $conn = connectToDatabase();
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    $query = "SELECT * FROM BALL WHERE Ball.Color = '{$colorOfBall}'";
    $result = $conn->query($query);
    if (!$result) {
        die('Invalid query' . mysql_error());
    } else {
        echo "You searched for the color {$colorOfBall} and got {$result->num_rows} rows!";
        printAll($result);
    }
    $conn->close();
}
Пример #4
0
    $Att[7] = $Bug;
    $Att[8] = $Ghost;
    $Att[9] = $Fire;
    $Att[10] = $Water;
    $Att[11] = $Grass;
    $Att[12] = $Electric;
    $Att[13] = $Psychic;
    $Att[14] = $Ice;
    $Att[15] = $Dragon;
}
function sendtoTable()
{
    global $Att;
    //Populate Each row at a time
    for ($y = 0; $y < count($Att[0]); $y++) {
        //INSERT INTO TYPE_IN (TNAME,NORMAL,FIGHTING....)
        //VALUES ( $Att[0][$y], $Att[1][$y].......)
    }
}
function printAll()
{
    global $Att;
    for ($y = 0; $y < count($Att[0]); $y++) {
        echo $Att[0][$y] . " " . $Att[1][$y] . " " . $Att[2][$y];
    }
}
//=============================================
parseType();
sendtoTable();
printAll();
Пример #5
0
<?php 
if ($session->logged_in) {
    ?>
<div class="nextprevbar">
<div class="prev"><?php 
    echo getPrev();
    ?>
</div>
<div class="next"><?php 
    echo getNext();
    ?>
</div>
</div>
<?php 
    echo printAll();
    ?>
<div class="nextprevbar">
<div class="prev"><?php 
    echo getPrev();
    ?>
</div>
<div class="next"><?php 
    echo getNext();
    ?>
</div>
</div>
<?php 
} else {
    require_once 'include/pages/_login.php';
}
    $balconyFilter = array_filter($rooms, function (Room $room) {
        if ($room->getHasBalcony() == true) {
            return true;
        }
        return false;
    });
    $bathtubFilter = array_filter($rooms, function (Room $room) {
        if (in_array(Extra::BATHTUB, $room->getExtras())) {
            return true;
        }
        return false;
    });
    $roomNumbers = function ($room) {
        return $room->getRoomId();
    };
    $bathtubRoomNumbers = array_map($roomNumbers, $bathtubFilter);
    echo "</br><font color=\"red\"><strong>Filter the array by bedrooms and apartments with a price less or equal to 250.00: </strong></font>";
    printAll($priceFilter);
    echo "</br><font color=\"red\"><strong>Filter the array by all rooms with a balcony: </strong></font>";
    printAll($balconyFilter);
    echo "</br><font color=\"red\"><strong>Return the room numbers of all rooms which have a bathtub in their extras: </strong></font></br>";
    printAll($bathtubRoomNumbers);
} catch (Exception $ex) {
    echo $ex->getMessage();
}
function printAll($inputArray)
{
    foreach ($inputArray as $element) {
        echo $element . "</br>";
    }
}
Пример #7
0
?>
{
	<?php 
printAll('xs');
?>
}
<?php 
sm_media();
?>
{
	<?php 
printAll('sm');
?>
}
<?php 
md_media();
?>
{
	<?php 
printAll('md');
?>
}
<?php 
lg_media();
?>
{
	<?php 
printAll('lg');
?>
}
Пример #8
0
     $extractorClassName = $extractor . EXTRACTOR;
     Logger::debug($extractorClassName . " Status: " . $status);
     $extractorClass = new ReflectionClass($extractorClassName);
     $extractorInstance = $extractorClass->newInstance();
     $extractorInstance->setStatus($status);
     $extractorInstance->addAdditionalInfo($metainfo);
     //$extractorInstance->addMetaData(ExtractorConfiguration::getMetadata($language, $extractorClassName));
     Statistics::addExtractorMetaArray($extractorInstance->getMetadata());
     //Statistics::addExtractorMeta($extractorInstance->getExtractorID(),'status',
     $group->addExtractor($extractorInstance);
 }
 $job->addExtractionGroup($group);
 Timer::stop("main::init");
 $manager->execute($job);
 if (Options::getOption('debug_die_after_one')) {
     printAll($lastarticles, $language);
     die;
 }
 /*
         printAll();
         die;
 */
 //var_dump($key, $article);
 //$live = new LiveExtraction();
 //$live->start($article,false);
 /*
     Timer::printTime();
 */
 /*
     Statistics::printStats();
 */
Пример #9
0
//
$cal = new calendar();
$cal2 = new calendar();
$cal->set_now_date();
$cal->set_hour(0);
$cal->set_min(0);
$cal->set_sec(0);
for ($i = 0; $i < 10000; $i++) {
    $s = $cal->get_string();
    $cal2->set_julian($cal->get_julian());
    $s2 = $cal2->get_string();
    if ($s !== $s2) {
        print "error {$s} / {$s2} <br>\n";
    }
    //print "$s <br>\n";
    $cal->calculation_day(1);
}
$cal->set_string('19701125020300');
printAll($cal);
////////////
function printAll($cal)
{
    print "year\t" . $cal->get_year() . "\n";
    print "mon\t" . $cal->get_month() . "\n";
    print "day\t" . $cal->get_day() . "\n";
    print "hour\t" . $cal->get_hour() . "\n";
    print "min\t" . $cal->get_minute() . "\n";
    print "min2\t" . $cal->get_min() . "\n";
    print "sec\t" . $cal->get_second() . "\n";
    print "sec2\t" . $cal->get_sec() . "\n";
}
Пример #10
0
<?php

// PHP 5.5+ (5.4 might work)
printAll(take(5, squaresOf(Integers::all())));
function printAll($collection)
{
    collection_walk($collection, function ($line) {
        echo "{$line}\n";
    });
}
/**
 * @param int $count
 * @param array|Iterator $collection
 * @return Iterator
 */
function take($count, $collection)
{
    return new LimitIterator(collection_to_iterator($collection), 0, $count);
}
/**
 * @param array|Iterator $collection
 * @return Iterator
 */
function collection_to_iterator($collection)
{
    return is_array($collection) ? new ArrayIterator($collection) : $collection;
}
/**
 * @param array|Iterator $collection
 * @return Iterator
 */