Get the nth entry.
@param int $n Index.
@return mixed[] Value.
177197
public function &offsetGet($n) {
        if(!$this->offsetExists($n)) {
            throw new IndexNotFoundException((string) $n);
        }
        return $this->data[$n];
    }
311498
def getTauLeibniz(n):
    
    myTau = tauGenLeibniz()
    result = []
    if n > 0:
        result += [next(myTau) for i in range(n)]
    myTau.close()
    return result
435321
protected function readBuffer($n)
    {
        $n = min($n, strlen($this->buffer) - $this->offset);
        if ($n === 0) {
            // substr('', 0, 0) => false, which screws up read loops that are
            // expecting non-blocking reads to return ''. This avoids that edge
            // case when the buffer is empty/used up.
            return '';
        }
        $block = substr($this->buffer, $this->offset, $n);
        $this->offset += $n;
        return $block;
    }
754492
public function nth( $nth ) {

		if ( empty( $nth ) ) {
			$nth = 2;
		}

		$offset   = 0;
		$negative = false;

		if ( 'even' === $nth ) {
			$nth = 2;
		} elseif ( 'odd' === $nth ) {
			$negative = true;
			$nth      = 2;
		} elseif ( false !== strpos( $nth, '+' ) ) {
			$nth = explode( '+', $nth );

			if ( isset( $nth[1] ) ) {
				$offset += (int) trim( $nth[1] );
			}

			$nth = (int) trim( $nth[0], ' n' );
		} elseif ( false !== strpos( $nth, '-' ) ) {
			$nth = explode( '-', $nth );

			if ( isset( $nth[1] ) ) {
				$offset -= (int) trim( $nth[1] );
			}

			$nth = (int) trim( $nth[0], ' n' );
		}//end if

		$nth    = (int) $nth;
		$offset = (int) $offset;

		if ( 0 === ( ( $this->row_number % $nth ) + $offset ) ) {
			return ( $negative ? false : true );
		}

		return ( $negative ? true : false );
	}
1141464
public function gexp(int $n):int{

		if($n < 0){
			$n += 255;
		}
		elseif($n >= 256){
			$n -= 255;
		}

		return Polynomial::table[$n][0];
	}
228861
function get_rules( $nt ){
		$rules = array();
		if( isset($this->ntindex[$nt]) ){
			foreach( $this->ntindex[$nt] as $i ){
				$rules[$i] = $this->rules[$i]; 
			}
		} 
		return $rules;
	}
1213660
public function skip(int $n): self
    {
        return new self(new Limit($this->getIterator(), $n), $this->type);
    }
1314629
def _nth(arr, n):
    
    try:
        return arr.iloc[n]
    except (KeyError, IndexError):
        return np.nan
984458
public function allocateTo($n)
    {
        if (!is_int($n)) {
            throw new \InvalidArgumentException('Number of targets must be an integer');
        }

        if ($n <= 0) {
            throw new \InvalidArgumentException('Cannot allocate to none, target must be greater than zero');
        }

        return $this->allocate(array_fill(0, $n, 1));
    }
1070509
public function skip(int $n) : int
    {
        if ($n <= 0) {
            return 0;
        }

        $skipped = 0;
        $skipLimit = min(self::MAX_SKIP_BUFFER_SIZE, $n);
        while ($skipped < $n) {
            $buf = $this->read(min($skipLimit, $n - $skipped));
            if ($buf === null) {
                break;
            }
            $skipped += strlen($buf);
        }
        return $skipped;
    }
664297
public function slice($n)
    {
        if ($this->length < $n) {
            throw new BufferUnderflowException();

        } elseif ($this->length === $n) {
            return new Buffer($this->buffer);

        } else {
            return new Buffer(substr($this->buffer, 0, $n));
        }
    }
1246513
public function numPages()
    {
        if ($this->numPage) {
            $this->numPage;
        };

        $entries = $this->entries();
        $count = count($entries);

        if ($this->numPerPage()) {
            $this->numPage = ceil($count / $this->numPerPage());
        } else {
            $this->numPage = 1;
        }

        return $this->numPage;
    }
1157854
public static function intToArray($value)
    {
        if ($value <= 0){
            return [];
        }else{
            $arr=[];
            $nLeave = $value;
            $nT = 0x01;
            while ($nLeave > 0){
                if (($nLeave & 1) == 1){
                    $arr[]=$nT;
                }
                $nLeave = ($nLeave >> 1);
                if ($nLeave > 0){
                    $nT = ($nT << 1);
                }
            }
            return $arr;
        }
    }
1054689
public function encryptInteger($n) {
		if (!is_numeric($n)) return null;
		return (PHP_INT_SIZE == 4 ? self::encrypt32($n) : self::encrypt64($n)) ^ $this->encPassword;
	}
129999
public function peek($n = 0)
    {
        $n += $this->pos;
        if (isset($this->input[$n])) {
            return $this->input[$n];
        }
        return null;
    }
885844
public function fib($n)
    {
        if ($n < 3) return 1;
        $k = $n / 2;
        $a = $this->fib($k + 1);
        $b = $this->fib($k);
        if ($n % 2 == 1) {
            return $a * $a + $b * $b;
        } else {
            return $b * (2 * $a - $b);
        }
    }
1266443
public function nextNode($nID)
    {
        if ($nID <= 0 || !isset($this->nodesRawIndex[$nID])) {
            return -3;
        }
        $this->runCurrNode($nID);
        $nodeOverride = $this->moveNextOverride($nID);
        if ($nodeOverride > 0) {
            return $nodeOverride;
        }
        //if ($nID == $GLOBALS["SL"]->treeRow->TreeLastPage) return -37;
        $nextNodeInd = $this->nodesRawIndex[$nID]+1;
        if (!isset($this->nodesRawOrder[$nextNodeInd])) {
            return -3;
        }
        $nextNodeID = $this->nodesRawOrder[$nextNodeInd];
        return $nextNodeID;
    }