$collection = collect(['Я', 'не', 'читаю', 'документацию']);
$collection->forget(1);
$collection->dump(); // ['Я', 'читаю', 'документацию']
unset
тоже сработает: unset($collection[1]);
public function getCodeAttribute(): string
{
return file_get_contents(storage_path("pages/page_{$this->id}.html"));
}
public function setCodeAttribute(string $html_code): void
{
file_put_contents(storage_path("pages/page_{$this->id}.html"), $html_code);
}
function encode($unencoded,$key) {
$string = base64_encode($unencoded);
$arr = array();
$x = 0;
$newstr = '';
while ($x++< strlen($string)) {
$arr[$x-1] = md5(md5($key.$string[$x-1]).$key);
$newstr = $newstr.$arr[$x-1][3].$arr[$x-1][6].$arr[$x-1][1].$arr[$x-1][2];
}
return $newstr;
}
function decode($encoded, $key){
$strofsym = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM=";
$x = 0;
while ($x <= strlen($strofsym)) {
$tmp = md5(md5($key.$strofsym[$x-1]).$key);
$encoded = str_replace($tmp[3].$tmp[6].$tmp[1].$tmp[2], $strofsym[$x-1], $encoded);
$x++;
}
return base64_decode($encoded);
}
const numb = 1234567;
const numbFmt = new Intl.NumberFormat('ru-RU').format(numb);
console.log('Отформатированное число: ' + numbFmt); // 1 234 567
const numb = 1234567;
const numbFmt = numb.toLocaleString('ru-RU');
console.log('Отформатированное число: ' + numbFmt); // 1 234 567
Get-Process | Where-Object {$_.ProcessName -eq '1cv8'}
(Get-Process -PID $PID).SessionId
Get-Process | Where-Object {$_.ProcessName -eq '1cv8'} | select si,sessionid
$si = (Get-Process -PID $PID).SessionId; Get-Process | Where-Object {($_.SI -eq $si) -and ($_.ProcessName -eq '1cv8')}