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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smabpro.picotech.app/public_html/vendor/php-ds/php-ds/src/Traits/   drwxr-xr-x
Free 28.52 GB of 117.98 GB (24.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Capacity.php (3.1 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Ds\Traits;

use 
Ds\Deque;

/**
 * Common to structures that deal with an internal capacity. While none of the
 * PHP implementations actually make use of a capacity, it's important to keep
 * consistent with the extension.
 */
trait Capacity
{
    
/**
     * @var int internal capacity
     */
    
private $capacity self::MIN_CAPACITY;

    
/**
     * Returns the current capacity.
     */
    
public function capacity(): int
    
{
        return 
$this->capacity;
    }

    
/**
     * Ensures that enough memory is allocated for a specified capacity. This
     * potentially reduces the number of reallocations as the size increases.
     *
     * @param int $capacity The number of values for which capacity should be
     *                      allocated. Capacity will stay the same if this value
     *                      is less than or equal to the current capacity.
     */
    
public function allocate(int $capacity)
    {
        
$this->capacity max($capacity$this->capacity);
    }

    
/**
     * @return float the structures growth factor.
     */
    
protected function getGrowthFactor(): float
    
{
        return 
2;
    }

    
/**
     * @return float to multiply by when decreasing capacity.
     */
    
protected function getDecayFactor(): float
    
{
        return 
0.5;
    }

    
/**
     * @return float the ratio between size and capacity when capacity should be
     *               decreased.
     */
    
protected function getTruncateThreshold(): float
    
{
        return 
0.25;
    }

    
/**
     * Checks and adjusts capacity if required.
     */
    
protected function checkCapacity()
    {
        if (
$this->shouldIncreaseCapacity()) {
            
$this->increaseCapacity();
        } else {
            if (
$this->shouldDecreaseCapacity()) {
                
$this->decreaseCapacity();
            }
        }
    }

    
/**
     * @param int $total
     */
    
protected function ensureCapacity(int $total)
    {
        if (
$total $this->capacity()) {
            
$this->capacity max($total$this->nextCapacity());
        }
    }

    
/**
     * @return bool whether capacity should be increased.
     */
    
protected function shouldIncreaseCapacity(): bool
    
{
        return 
$this->count() >= $this->capacity();
    }

    protected function 
nextCapacity(): int
    
{
        return (int) (
$this->capacity() * $this->getGrowthFactor());
    }

    
/**
     * Called when capacity should be increased to accommodate new values.
     */
    
protected function increaseCapacity()
    {
        
$this->capacity max(
            
$this->count(),
            
$this->nextCapacity()
        );
    }

    
/**
     * Called when capacity should be decrease if it drops below a threshold.
     */
    
protected function decreaseCapacity()
    {
        
$this->capacity max(
            
self::MIN_CAPACITY,
            (int) (
$this->capacity()  * $this->getDecayFactor())
        );
    }

    
/**
     * @return bool whether capacity should be increased.
     */
    
protected function shouldDecreaseCapacity(): bool
    
{
        return 
count($this) <= $this->capacity() * $this->getTruncateThreshold();
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

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