Search notes:

PowerShell: filter

A filter is a function that just has a process block.
The following two command are equivalent:
filter twice {
    2 * $_
}

function times_two {
    param(
        [parameter(mandatory, valueFromPipeline)]
        [int] $num
    )

    process {
        2 * $num
    }
}
These commands can be invoked in a pipeline like so:
7,21,48 | twice
8,24,11 | times_two

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1758199967, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/function/filter/index(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78