!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/fzaninotto/faker/test/Faker/Provider/   drwxr-xr-x
Free 116.78 GB of 200.55 GB (58.23%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     BiasedTest.php (2.8 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Faker\Test\Provider;

use 
Faker\Provider\Biased;
use 
Faker\Generator;

class 
BiasedTest extends \PHPUnit_Framework_TestCase
{
    const 
MAX 10;
    const 
NUMBERS 25000;
    protected 
$generator;
    protected 
$results = array();
    
    protected function 
setUp()
    {
        
$this->generator = new Generator();
        
$this->generator->addProvider(new Biased($this->generator));

        
$this->results array_fill(1self::MAX0);
    }
    
    public function 
performFake($function)
    {
        for(
$i 0$i self::NUMBERS$i++) {
            
$this->results[$this->generator->biasedNumberBetween(1self::MAX$function)]++;
        }
    }
    
    public function 
testUnbiased()
    {
        
$this->performFake(array('\Faker\Provider\Biased''unbiased'));

        
// assert that all numbers are near the expected unbiased value
        
foreach ($this->results as $number => $amount) {
            
// integral
            
$assumed = (self::MAX $number) - (self::MAX * ($number 1));
            
// calculate the fraction of the whole area
            
$assumed /= 1;
            
$this->assertGreaterThan(self::NUMBERS $assumed .95$amount"Value was more than 5 percent under the expected value");
            
$this->assertLessThan(self::NUMBERS $assumed 1.05$amount"Value was more than 5 percent over the expected value");
        }
    }
    
    public function 
testLinearHigh()
    {
        
$this->performFake(array('\Faker\Provider\Biased''linearHigh'));

        foreach (
$this->results as $number => $amount) {
            
// integral
            
$assumed 0.5 pow(self::MAX $number2) - 0.5 pow(self::MAX * ($number 1), 2);
            
// calculate the fraction of the whole area
            
$assumed /= pow(12) * .5;
            
$this->assertGreaterThan(self::NUMBERS $assumed .9$amount"Value was more than 10 percent under the expected value");
            
$this->assertLessThan(self::NUMBERS $assumed 1.1$amount"Value was more than 10 percent over the expected value");
        }
    }
    
    public function 
testLinearLow()
    {
        
$this->performFake(array('\Faker\Provider\Biased''linearLow'));

        foreach (
$this->results as $number => $amount) {
            
// integral
            
$assumed = -0.5 pow(self::MAX $number2) - -0.5 pow(self::MAX * ($number 1), 2);
            
// shift the graph up
            
$assumed += self::MAX;
            
// calculate the fraction of the whole area
            
$assumed /= pow(12) * .5;
            
$this->assertGreaterThan(self::NUMBERS $assumed .9$amount"Value was more than 10 percent under the expected value");
            
$this->assertLessThan(self::NUMBERS $assumed 1.1$amount"Value was more than 10 percent over the expected value");
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0263 ]--