Skip to main content

Posts

Showing posts from October, 2015

Why didn't anyone ever let me know that these posix classes existed ?

http://www.regular-expressions.info/posixbrackets.html POSIX Description ASCII Unicode Shorthand Java [:alnum:] Alphanumeric characters [a-zA-Z0-9] [\p{L&}\p{Nd}] \p{Alnum} [:alpha:] Alphabetic characters [a-zA-Z] \p{L&} \p{Alpha} [:ascii:] ASCII characters [\x00-\x7F] \p{InBasicLatin} \p{ASCII} [:blank:] Space and tab [ \t] [\p{Zs}\t] \h \p{Blank} [:cntrl:] Control characters [\x00-\x1F\x7F] \p{Cc} \p{Cntrl} [:digit:] Digits [0-9] \p{Nd} \d \p{Digit} [:graph:] Visible characters (i.e. anything except spaces, control characters, etc.) [\x21-\x7E] [^\p{Z}\p{C}] \p{Graph} [:lower:] Lowercase letters [a-z] \p{Ll} \p{Lower} [:print:] Visible characters and spaces (i.e. anything except control characters, etc.) [\x20-\x7E] \P{C} \p{Print} [:punct:] P

Just say you wanted a csv file with dimension details of your image library - doing this with powershell

Get-ChildItem -Recurse C:\yourphotosdir -Filter *.jpg | % {     $image = [System.Drawing.Image]::FromFile($_.FullName)     if ($image.width -t 500 -and $image.height -gt 500) {         New-Object PSObject -Property @{         height_pixels = $image.Height         width_pixels = $image.Width         megapixels = ($image.Height * $image.Width)/1000/1000         megabytes = (($_.Length)/1024)/1024         name = $_.Name         fullname = $_.Fullname         date = $_.LastWriteTime         }     } } | Export-Csv 'C:\yourphotosdir\img.csv' -NoTypeInformation