Skip to main content

Posts

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

Good guide on getting output from a stored procedure

https://technet.microsoft.com/en-us/library/ms187004(v=sql.105).aspx The sp itself.. USE AdventureWorks2008R2; GO IF OBJECT_ID('Sales.uspGetEmployeeSalesYTD', 'P') IS NOT NULL DROP PROCEDURE Sales.uspGetEmployeeSalesYTD; GO CREATE PROCEDURE Sales.uspGetEmployeeSalesYTD @SalesPerson nvarchar(50), @SalesYTD money OUTPUT AS SET NOCOUNT ON; SELECT @SalesYTD = SalesYTD FROM Sales.SalesPerson AS sp JOIN HumanResources.vEmployee AS e ON e.BusinessEntityID = sp.BusinessEntityID WHERE LastName = @SalesPerson; RETURN GO the call to get the value  -- Declare the variable to receive the output value of the procedure. DECLARE @SalesYTDBySalesPerson money; -- Execute the procedure specifying a last name for the input parameter -- and saving the output value in the variable @SalesYTDBySalesPerson EXECUTE Sales.uspGetEmployeeSalesYTD N'Blythe', @SalesYTD = @SalesYTDBySalesPerson OUTPUT; -- Display the value returned by the procedure....