!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/main_file/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/   drwxr-xr-x
Free 13.12 GB of 57.97 GB (22.64%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     SumSquares.php (3.91 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace PhpOffice\PhpSpreadsheet\Calculation\MathTrig;

use 
PhpOffice\PhpSpreadsheet\Calculation\Exception;
use 
PhpOffice\PhpSpreadsheet\Calculation\Functions;
use 
PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;

class 
SumSquares
{
    
/**
     * SUMSQ.
     *
     * SUMSQ returns the sum of the squares of the arguments
     *
     * Excel Function:
     *        SUMSQ(value1[,value2[, ...]])
     *
     * @param mixed ...$args Data values
     *
     * @return float|string
     */
    
public static function sumSquare(...$args)
    {
        try {
            
$returnValue 0;

            
// Loop through arguments
            
foreach (Functions::flattenArray($args) as $arg) {
                
$arg1 Helpers::validateNumericNullSubstitution($arg0);
                
$returnValue += ($arg1 $arg1);
            }
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        return 
$returnValue;
    }

    private static function 
getCount(array $array1, array $array2): int
    
{
        
$count count($array1);
        if (
$count !== count($array2)) {
            throw new 
Exception(ExcelError::NA());
        }

        return 
$count;
    }

    
/**
     * These functions accept only numeric arguments, not even strings which are numeric.
     *
     * @param mixed $item
     */
    
private static function numericNotString($item): bool
    
{
        return 
is_numeric($item) && !is_string($item);
    }

    
/**
     * SUMX2MY2.
     *
     * @param mixed[] $matrixData1 Matrix #1
     * @param mixed[] $matrixData2 Matrix #2
     *
     * @return float|string
     */
    
public static function sumXSquaredMinusYSquared($matrixData1$matrixData2)
    {
        try {
            
$array1 Functions::flattenArray($matrixData1);
            
$array2 Functions::flattenArray($matrixData2);
            
$count self::getCount($array1$array2);

            
$result 0;
            for (
$i 0$i $count; ++$i) {
                if (
self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {
                    
$result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]);
                }
            }
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        return 
$result;
    }

    
/**
     * SUMX2PY2.
     *
     * @param mixed[] $matrixData1 Matrix #1
     * @param mixed[] $matrixData2 Matrix #2
     *
     * @return float|string
     */
    
public static function sumXSquaredPlusYSquared($matrixData1$matrixData2)
    {
        try {
            
$array1 Functions::flattenArray($matrixData1);
            
$array2 Functions::flattenArray($matrixData2);
            
$count self::getCount($array1$array2);

            
$result 0;
            for (
$i 0$i $count; ++$i) {
                if (
self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {
                    
$result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]);
                }
            }
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        return 
$result;
    }

    
/**
     * SUMXMY2.
     *
     * @param mixed[] $matrixData1 Matrix #1
     * @param mixed[] $matrixData2 Matrix #2
     *
     * @return float|string
     */
    
public static function sumXMinusYSquared($matrixData1$matrixData2)
    {
        try {
            
$array1 Functions::flattenArray($matrixData1);
            
$array2 Functions::flattenArray($matrixData2);
            
$count self::getCount($array1$array2);

            
$result 0;
            for (
$i 0$i $count; ++$i) {
                if (
self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {
                    
$result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]);
                }
            }
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        return 
$result;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0065 ]--